diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/test/runner-in-node.js b/src/test/runner-in-node.js index <HASH>..<HASH> 100644 --- a/src/test/runner-in-node.js +++ b/src/test/runner-in-node.js @@ -1,4 +1,8 @@ +// Usage: +// cd path/to/src/test +// snode runner-in-node.js --base ../ + /** * @fileoverview Run test cases in node environment. * @author lifesinger@gmail.com (Frank Wang)
add usage comments to runner-in-node.js
diff --git a/salestax.js b/salestax.js index <HASH>..<HASH> 100644 --- a/salestax.js +++ b/salestax.js @@ -27,7 +27,8 @@ function salestax(taxRates) { seneca.act({role: plugin, cmd: 'resolve_salestax', taxCategory: taxCategory, taxRates: taxRates}, function(err, taxRate) { if(err) { - callback(err, undefined) + seneca.log.error(err) + callback(new Error('could not resolve the given tax rate: '+JSON.stringify(taxCategory)), undefined) } else { seneca.act({role: plugin, cmd: 'calculate_salestax', net: args.net, taxRate: taxRate}, function(err, calculatedTax) { callback(err, calculatedTax) @@ -95,7 +96,7 @@ function resolve_salestax(attributes, taxRates, trace, callback) { if(rate) { callback(undefined, rate) } else { - callback(new Error('Could not resolve tax rate '+JSON.stringify(attributes)+' for taxRates '+JSON.stringify(taxRates) + ' at '+trace)) + callback(new Error('Could not resolve tax rate')) } }
better error message when the tax rate cannot be resolved
diff --git a/Tests/Transformer/ModelToElasticaAutoTransformerTest.php b/Tests/Transformer/ModelToElasticaAutoTransformerTest.php index <HASH>..<HASH> 100644 --- a/Tests/Transformer/ModelToElasticaAutoTransformerTest.php +++ b/Tests/Transformer/ModelToElasticaAutoTransformerTest.php @@ -280,7 +280,7 @@ class ModelToElasticaAutoTransformerTest extends \PHPUnit_Framework_TestCase $document = $transformer->transform(new POPO(), array( 'sub' => array( 'type' => 'nested', - 'properties' => array('foo' => '~') + 'properties' => array('foo' => array()) ) )); $data = $document->getData();
Attempted fix for php <I>
diff --git a/lib/bx/align/core.py b/lib/bx/align/core.py index <HASH>..<HASH> 100644 --- a/lib/bx/align/core.py +++ b/lib/bx/align/core.py @@ -221,10 +221,7 @@ class Component( object ): try: x = self.index[ pos - self.get_forward_strand_start() ] except: - print "Pos = " + str(pos) - print "start = " + str(self.get_forward_strand_start()) - print self.index - sys.exit() + raise "Error in index." return x # return coord_to_col( self.get_forward_strand_start(), self.text, pos )
Sorry for the poor code... under pressure :). This should be better.
diff --git a/lib/handlers/init/callback.js b/lib/handlers/init/callback.js index <HASH>..<HASH> 100644 --- a/lib/handlers/init/callback.js +++ b/lib/handlers/init/callback.js @@ -44,14 +44,8 @@ module.exports = function(retrieveTokens, config) { Anyfetch.getAccessToken(config.appId, config.appSecret, tempToken.anyfetchCode, rarity.carry([accountName, providerData, tempToken], cb)); }, function setAccountName(accountName, providerData, tempToken, anyfetchAccessToken, cb) { - request(process.env.MANAGER_URL || "https://manager.anyfetch.com") - .post('/access_token/account_name') - .send({ - access_token: anyfetchAccessToken, - account_name: accountName - }) - .expect(204) - .end(rarity.carryAndSlice([accountName, providerData, tempToken, anyfetchAccessToken], 5, cb)); + var anyfetchClient = new Anyfetch(anyfetchAccessToken); + anyfetchClient.postAccountName(accountName, rarity.carryAndSlice([accountName, providerData, tempToken, anyfetchAccessToken], 5, cb)); }, function createNewToken(accountName, providerData, tempToken, anyfetchAccessToken, cb) { // Create new token
Use anyfetch.js to do accountName request
diff --git a/webroot/js/typeahead.js b/webroot/js/typeahead.js index <HASH>..<HASH> 100644 --- a/webroot/js/typeahead.js +++ b/webroot/js/typeahead.js @@ -66,6 +66,11 @@ var typeahead = typeahead || {}; timeout: that.timeout, triggerLength: that.min_length, method: 'get', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Authorization': 'Bearer ' + that.api_token + }, preProcess: function(data) { if (data.success === false) { // Hide the list, there was some error
add request headers, including authorization, on typeahead ajax requests (task #<I>)
diff --git a/fusionbox/error_logging/middleware.py b/fusionbox/error_logging/middleware.py index <HASH>..<HASH> 100644 --- a/fusionbox/error_logging/middleware.py +++ b/fusionbox/error_logging/middleware.py @@ -1,6 +1,6 @@ from django.conf import settings from django.core.exceptions import ImproperlyConfigured -from django.middleware import _is_ignorable_404, _is_internal_request +from django.middleware.common import _is_ignorable_404, _is_internal_request from django.core.mail import mail_managers from fusionbox.error_logging.models import Logged404
fixed import from commom middleware
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -300,10 +300,10 @@ module ActiveRecord # # === A word of warning # - # Don't create associations that have the same name as instance methods of - # ActiveRecord::Base. Since the association adds a method with that name to - # its model, it will override the inherited method and break things. - # For instance, +attributes+ and +connection+ would be bad choices for association names. + # Don't create associations that have the same name as [instance methods](http://api.rubyonrails.org/classes/ActiveRecord/Core.html) of + # <tt>ActiveRecord::Base</tt>. Since the association adds a method with that name to + # its model, using an association with the same name as one provided by <tt>ActiveRecord::Base</tt> will override the method inherited through <tt>ActiveRecord::Base</tt> and will break things. + # For instance, +attributes+ and +connection+ would be bad choices for association names, because those names already exist in the list of <tt>ActiveRecord::Base</tt> instance methods. # # == Auto-generated methods # See also Instance Public methods below for more details.
Issue <I>: adds link to list of instance methods [ci skip] Update associations.rb Update associations.rb updates link to instance methods [ci skip]
diff --git a/impl/src/test/java/org/ehcache/GettingStarted.java b/impl/src/test/java/org/ehcache/GettingStarted.java index <HASH>..<HASH> 100644 --- a/impl/src/test/java/org/ehcache/GettingStarted.java +++ b/impl/src/test/java/org/ehcache/GettingStarted.java @@ -168,7 +168,7 @@ public class GettingStarted { .buildConfig(Long.class, String.class); PersistentCacheManager persistentCacheManager = CacheManagerBuilder.newCacheManagerBuilder() - .with(new PersistenceConfiguration(new File(System.getProperty("java.io.tmpdir") + "/persistent-cache-data"))) + .with(new PersistenceConfiguration(new File(getClass().getClassLoader().getResource(".").getFile() + "/../../persistent-cache-data"))) .withCache("persistent-cache", cacheConfiguration) .build(true);
#<I>: move persistent data directory to gradle's build folder
diff --git a/middleware.go b/middleware.go index <HASH>..<HASH> 100644 --- a/middleware.go +++ b/middleware.go @@ -115,8 +115,6 @@ func parseRequestBody(c *Client, r *Request) (err error) { return } } - } else { - r.Header.Del(hdrContentTypeKey) } CL:
#<I> removed the line which cleans up the content-type header when payload is not present
diff --git a/src/Propel/Generator/Util/SchemaValidator.php b/src/Propel/Generator/Util/SchemaValidator.php index <HASH>..<HASH> 100644 --- a/src/Propel/Generator/Util/SchemaValidator.php +++ b/src/Propel/Generator/Util/SchemaValidator.php @@ -1,4 +1,4 @@ -Schema<?php +<?php /** * This file is part of the Propel package.
[Generator] removed extra Schema word after a quick copy/paste operation.
diff --git a/src/Wsdl2PhpGenerator/Generator.php b/src/Wsdl2PhpGenerator/Generator.php index <HASH>..<HASH> 100644 --- a/src/Wsdl2PhpGenerator/Generator.php +++ b/src/Wsdl2PhpGenerator/Generator.php @@ -116,10 +116,6 @@ class Generator implements GeneratorInterface $this->log('Generation complete', 'info'); } - public function setLogger(LoggerInterface $logger) - { - $this->logger = $logger; - } /** * Load the wsdl file into php @@ -400,16 +396,6 @@ class Generator implements GeneratorInterface } /** - * Returns the loaded config - * - * @return Config The loaded config - */ - public function getConfig() - { - return $this->config; - } - - /** * Takes a string and removes the xml namespace if any * * @param string $str @@ -475,6 +461,29 @@ class Generator implements GeneratorInterface /* + * Setters/getters + */ + + /** + * @param LoggerInterface $logger + */ + public function setLogger(LoggerInterface $logger) + { + $this->logger = $logger; + } + + /** + * Returns the loaded config + * + * @return Config The loaded config + */ + public function getConfig() + { + return $this->config; + } + + + /* * Singleton logic for backwards compatibility * TODO: v3: remove */
Move getters/setters to single location
diff --git a/lib/html/pipeline/syntax_highlight_filter.rb b/lib/html/pipeline/syntax_highlight_filter.rb index <HASH>..<HASH> 100644 --- a/lib/html/pipeline/syntax_highlight_filter.rb +++ b/lib/html/pipeline/syntax_highlight_filter.rb @@ -13,7 +13,7 @@ module HTML doc.search('pre').each do |node| default = context[:highlight] && context[:highlight].to_s next unless lang = node['lang'] || default - next unless lexer = get_lexer(lang) + next unless lexer = lexer_for(lang) text = node.inner_text html = highlight_with_timeout_handling(lexer, text) @@ -35,12 +35,8 @@ module HTML nil end - def get_lexer(lang) - lexer = Linguist::Language[lang] && Linguist::Language[lang].lexer - unless lexer - lexer = Pygments::Lexer[lang] - end - lexer + def lexer_for(lang) + (Linguist::Language[lang] && Linguist::Language[lang].lexer) || Pygments::Lexer[lang] end end end
Simplify and rename get_lexer
diff --git a/js/calendar.js b/js/calendar.js index <HASH>..<HASH> 100644 --- a/js/calendar.js +++ b/js/calendar.js @@ -183,12 +183,7 @@ if(!String.prototype.format) { function Calendar(params, context) { this.options = $.extend(true, {}, defaults, params); - if(this.options.language && window.calendar_languages && (this.options.language in window.calendar_languages)) { - this.strings = $.extend(true, {}, strings, calendar_languages[this.options.language]); - } - else { - this.strings = strings; - } + this.setLanguage(this.options.language); this.context = context; context.css('width', this.options.width); @@ -199,13 +194,18 @@ if(!String.prototype.format) { Calendar.prototype.setOptions = function(object) { $.extend(this.options, object); + if('language' in object) { + this.setLanguage(object.language); + } } Calendar.prototype.setLanguage = function(lang) { if(window.calendar_languages && (lang in window.calendar_languages)) { this.strings = $.extend(true, {}, strings, calendar_languages[lang]); + this.options.language = lang; } else { this.strings = strings; + delete this.options.language; } }
Small locale-related optimizations here and there
diff --git a/jquery.flot.stack.js b/jquery.flot.stack.js index <HASH>..<HASH> 100644 --- a/jquery.flot.stack.js +++ b/jquery.flot.stack.js @@ -15,7 +15,7 @@ key (which can be any number or string or just "true"). To specify the default stack, you can set the stack option like this: series: { - stack: null or true or key (number/string) + stack: null/false, true, or a key (number/string) } You can also specify it for a single series, like this: @@ -55,7 +55,7 @@ charts or filled areas). } function stackData(plot, s, datapoints) { - if (s.stack == null) + if (s.stack == null || s.stack === false) return; var other = findMatchingSeries(s, plot.getData());
Allow 'false' to be provided as a stack option. This resolves #<I>, but without catching zero, which is a valid key.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -37,7 +37,8 @@ var gulpBundleAssets = function (options) { try { config = new ConfigModel(file, options); } catch (e) { - logger.log(gutil.colors.red('Failed to parse config file')); + logger.log(gutil.colors.red('Failed to parse config file:'), gutil.colors.red(file.path)); + logger.log(e); this.emit('error', new gutil.PluginError('gulp-bundle-assets', e)); return done(); } diff --git a/lib/watch/index.js b/lib/watch/index.js index <HASH>..<HASH> 100644 --- a/lib/watch/index.js +++ b/lib/watch/index.js @@ -18,6 +18,7 @@ module.exports = function (opts) { configFile = require(opts.configPath); config = new ConfigModel(configFile, opts); } catch (e) { + gutil.log(e); throw new gutil.PluginError('gulp-bundle-assets', 'Failed to parse config file'); }
no longer swallow error when parsing the config file
diff --git a/grade/report/grader/styles.php b/grade/report/grader/styles.php index <HASH>..<HASH> 100644 --- a/grade/report/grader/styles.php +++ b/grade/report/grader/styles.php @@ -4,6 +4,7 @@ .gradestable th.user img { width: 20px; + height: 20px; } .gradestable th.user, .gradestable th.range {
MDL-<I> Specify both width and height for user image Merged from STABLE_<I>
diff --git a/src/XeroPHP/Traits/PracticeManager/CustomFieldValueTrait.php b/src/XeroPHP/Traits/PracticeManager/CustomFieldValueTrait.php index <HASH>..<HASH> 100644 --- a/src/XeroPHP/Traits/PracticeManager/CustomFieldValueTrait.php +++ b/src/XeroPHP/Traits/PracticeManager/CustomFieldValueTrait.php @@ -46,7 +46,7 @@ trait CustomFieldValueTrait $this->getGUID() ); - $url = new URL($this->_application, $uri); + $url = new URL($this->_application, $uri, URL::API_PRACTICE_MANAGER); $request = new Request($this->_application, $url, Request::METHOD_GET); $request->send();
Corrected API for CustomFieldvalueTrait
diff --git a/src/test/java/net/ravendb/client/driver/RavenTestDriver.java b/src/test/java/net/ravendb/client/driver/RavenTestDriver.java index <HASH>..<HASH> 100644 --- a/src/test/java/net/ravendb/client/driver/RavenTestDriver.java +++ b/src/test/java/net/ravendb/client/driver/RavenTestDriver.java @@ -190,7 +190,7 @@ public abstract class RavenTestDriver implements CleanCloseable { int leased = connectionManager.getTotalStats().getLeased(); if (leased > 0 ) { - Thread.sleep(100); + Thread.sleep(500); // give another try leased = connectionManager.getTotalStats().getLeased();
increased timeout for leaked connection check
diff --git a/scripts/lib/mha_config_helper.py b/scripts/lib/mha_config_helper.py index <HASH>..<HASH> 100644 --- a/scripts/lib/mha_config_helper.py +++ b/scripts/lib/mha_config_helper.py @@ -124,7 +124,7 @@ class MHA_global_config_helper(object): hosts = [] for section in config.sections(): - if section == 'server default': + if section == 'default': continue hosts.append(section)
Add support in config_helper to fetch slave health check port for a given host
diff --git a/salt/states/archive.py b/salt/states/archive.py index <HASH>..<HASH> 100644 --- a/salt/states/archive.py +++ b/salt/states/archive.py @@ -79,8 +79,8 @@ def extracted(name, this archive, such as 'J' for LZMA. Using this option means that the tar executable on the target will be used, which is less platform independent. - Main operators like -x, --extract, --get, -c, etc. and -f/--file are - **shoult not be used** here. + Main operators like -x, --extract, --get, -c, etc. and -f/--file + **should not be used** here. If this option is not set, then the Python tarfile module is used. The tarfile module supports gzip and bz2 in Python 2.
fix gramar & typo in states.archive.extracted
diff --git a/condorpy/node.py b/condorpy/node.py index <HASH>..<HASH> 100644 --- a/condorpy/node.py +++ b/condorpy/node.py @@ -10,6 +10,7 @@ from job import Job from logger import log from exceptions import CircularDependency + class Node(object): """ @@ -22,16 +23,16 @@ class Node(object): pre_script_args=None, post_script=None, post_script_args=None, - variables=None, # VARS JobName macroname="string" [macroname="string"... ] - priority=None, # PRIORITY JobName PriorityValue - category=None, # CATEGORY JobName CategoryName - retry=None, # JobName NumberOfRetries [UNLESS-EXIT value] - pre_skip=None, # JobName non-zero-exit-code + variables=None, # VARS JobName macroname="string" [macroname="string"... ] + priority=None, # PRIORITY JobName PriorityValue + category=None, # CATEGORY JobName CategoryName + retry=None, # JobName NumberOfRetries [UNLESS-EXIT value] + pre_skip=None, # JobName non-zero-exit-code abort_dag_on=None, # JobName AbortExitValue [RETURN DAGReturnValue] dir=None, noop=None, done=None, - ): + ): """ Node constructor
update style to comply with pep8
diff --git a/tests/test_index.py b/tests/test_index.py index <HASH>..<HASH> 100644 --- a/tests/test_index.py +++ b/tests/test_index.py @@ -1,5 +1,6 @@ import ctypes import pickle +import sys import tempfile import unittest from typing import Dict, Iterator, Tuple @@ -463,11 +464,13 @@ class IndexSerialization(unittest.TestCase): ), ] - # go through the traversal and see if everything is close - assert all( - all(np.allclose(a, b) for a, b in zip(L, E)) - for L, E in zip(leaves, expected) - ) + if sys.maxsize > 2**32: + # TODO: this fails with CPython 3.7 manylinux i686 i.e. 32-bit + # go through the traversal and see if everything is close + assert all( + all(np.allclose(a, b) for a, b in zip(L, E)) + for L, E in zip(leaves, expected) + ) hits2 = sorted(list(idx.intersection((0, 60, 0, 60), objects=True))) self.assertTrue(len(hits2), 10)
Skip part of test_interleaving for <I>-bit systems (#<I>)
diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -451,7 +451,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count */ public function hydrate(array $data) { - $this->_values = $this->cleanData($data); + $this->_values = array_merge($this->_values, $this->cleanData($data)); $this->_data = array_merge($this->_data, $data); $this->prepareIdentifiers(true);
fixed: old mapped values were deleted when data was hydrated into an existing record (lazy-loading)
diff --git a/test/textbringer/test_buffer.rb b/test/textbringer/test_buffer.rb index <HASH>..<HASH> 100644 --- a/test/textbringer/test_buffer.rb +++ b/test/textbringer/test_buffer.rb @@ -1283,4 +1283,35 @@ EOF buffer2 = Buffer.new(name: "foo") assert_equal("#<Buffer:foo>", buffer2.inspect) end + + def test_goto_line + buffer = Buffer.new(<<EOF) +foo +bar +baz +quux +quuux +EOF + buffer.goto_line(0) + assert_equal(1, buffer.line) + assert_equal(1, buffer.column) + buffer.goto_line(1) + assert_equal(1, buffer.line) + assert_equal(1, buffer.column) + buffer.goto_line(2) + assert_equal(2, buffer.line) + assert_equal(1, buffer.column) + buffer.goto_line(4) + assert_equal(4, buffer.line) + assert_equal(1, buffer.column) + buffer.goto_line(5) + assert_equal(5, buffer.line) + assert_equal(1, buffer.column) + buffer.goto_line(6) + assert_equal(6, buffer.line) + assert_equal(1, buffer.column) + buffer.goto_line(7) + assert_equal(6, buffer.line) + assert_equal(1, buffer.column) + end end
Add a test for goto_line.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -12,8 +12,11 @@ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() -readme = open('README.rst').read() -history = open('HISTORY.rst').read().replace('.. :changelog:', '') +with open('README.rst') as readme_file: + readme = readme_file.read() + +with open('HISTORY.rst') as history_file: + history = history_file.read().replace('.. :changelog:', '') requirements = ['binaryornot>=0.2.0', 'jinja2>=2.4', 'PyYAML>=3.10'] test_requirements = []
Ensure file handles are closed using with statement
diff --git a/includes/class-freemius.php b/includes/class-freemius.php index <HASH>..<HASH> 100755 --- a/includes/class-freemius.php +++ b/includes/class-freemius.php @@ -12140,7 +12140,13 @@ * @author Vova Feldman (@svovaf) */ $args = array( - 'public' => 1, + /** + * Commented out in order to handle the migration of site options whether the site is public or not. + * + * @author Leo Fajardo (@leorw) + * @since 2.2.1 + */ + // 'public' => 1, 'archived' => 0, 'mature' => 0, 'spam' => 0,
[ms] [migration] When loading the sites in a multisite network, include both public and non-public sites (this is needed when migrating site options to network).
diff --git a/lib/validators.js b/lib/validators.js index <HASH>..<HASH> 100644 --- a/lib/validators.js +++ b/lib/validators.js @@ -1,7 +1,7 @@ 'use strict'; const - joi = require('joi'); + joi = require('@hapi/joi'); const blockTypes = { i: 'interface',
Moved to @hapi/joi
diff --git a/livetests.py b/livetests.py index <HASH>..<HASH> 100755 --- a/livetests.py +++ b/livetests.py @@ -53,7 +53,7 @@ def _initialize(api): @pytest.fixture(scope="module", - params=["2.14.20", "2.15.13", "2.16.7", "3.0.0-rc0"]) + params=["2.14.20", "2.15.13", "2.16.7", "3.0.0-rc1"]) def gerrit_api(request): """Create a Gerrit container for the given version and return an API.""" with GerritContainer(request.param) as gerrit:
Run livetests against <I>-rc1 Change-Id: Ic<I>e<I>ae3f1ae<I>b<I>ec<I>d<I>
diff --git a/spec/models/resource_export_file_spec.rb b/spec/models/resource_export_file_spec.rb index <HASH>..<HASH> 100644 --- a/spec/models/resource_export_file_spec.rb +++ b/spec/models/resource_export_file_spec.rb @@ -23,6 +23,7 @@ describe ResourceExportFile do manifestation.save! export_file = ResourceExportFile.new export_file.user = users(:admin) + export_file.save! export_file.export! file = export_file.resource_export expect(file).to be_truthy
explicitly save resource_export_file record.
diff --git a/src/AdamWathan/Form/Elements/FormOpen.php b/src/AdamWathan/Form/Elements/FormOpen.php index <HASH>..<HASH> 100644 --- a/src/AdamWathan/Form/Elements/FormOpen.php +++ b/src/AdamWathan/Form/Elements/FormOpen.php @@ -54,6 +54,11 @@ class FormOpen extends Element return $this->setHiddenMethod('PUT'); } + public function patch() + { + return $this->setHiddenMethod('PATCH'); + } + public function delete() { return $this->setHiddenMethod('DELETE');
added PATCH method to FormOpen.php
diff --git a/src/video/texture_cache.js b/src/video/texture_cache.js index <HASH>..<HASH> 100644 --- a/src/video/texture_cache.js +++ b/src/video/texture_cache.js @@ -60,11 +60,9 @@ class TextureCache { /** * @ignore */ - remove(image) { + delete(image) { if (!this.cache.has(image)) { - if (this.cache.remove(image) === true) { - this.length--; - } + this.cache.delete(image); } }
fix & rename internal cache delete function only decrease length when removing a texture unit cache, and not image.
diff --git a/saspy/sasiohttp.py b/saspy/sasiohttp.py index <HASH>..<HASH> 100644 --- a/saspy/sasiohttp.py +++ b/saspy/sasiohttp.py @@ -948,8 +948,8 @@ class SASsessionHTTP(): headers = {"Accept":"text/plain", "Authorization":"Bearer "+self.sascfg._token} done = False - delay = kwargs.get('GETstatusDelay' , 0.5) - excpcnt = kwargs.get('GETstatusFailcnt', 5) + delay = kwargs.get('GETstatusDelay' , 0) + excpcnt = kwargs.get('GETstatusFailcnt', 5) while not done: try:
change default delay in http poll in submit
diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/rails.rb +++ b/lib/puppet/rails.rb @@ -29,7 +29,9 @@ module Puppet::Rails ActiveRecord::Base.verify_active_connections! begin - ActiveRecord::Base.establish_connection(database_arguments()) + args = database_arguments + Puppet.info "Connecting to #{args[:adapter]} database: #{args[:database]}" + ActiveRecord::Base.establish_connection(args) rescue => detail if Puppet[:trace] puts detail.backtrace @@ -46,7 +48,7 @@ module Puppet::Rails case adapter when "sqlite3" - args[:dbfile] = Puppet[:dblocation] + args[:database] = Puppet[:dblocation] when "mysql", "postgresql" args[:host] = Puppet[:dbserver] unless Puppet[:dbserver].empty? args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].empty?
Fix #<I> puppetqd doesn't give an error when no config is given Added an info message about what database we're connecting to. In the case of the default database, it looks like: info: Connecting to sqlite3 database: /var/lib/puppet/state/clientconfigs.sqlite3 Also squashes the deprecation warning #<I>, since fixing that makes this patch smaller.
diff --git a/malcolm/parts/ADCore/hdfwriterpart.py b/malcolm/parts/ADCore/hdfwriterpart.py index <HASH>..<HASH> 100644 --- a/malcolm/parts/ADCore/hdfwriterpart.py +++ b/malcolm/parts/ADCore/hdfwriterpart.py @@ -137,6 +137,8 @@ class HDFWriterPart(ChildPart): # write between each flush. Thus we need to know the exposure time. Get # it from the last FDM. (There's probably only one, and we don't care # about other cases.) + # Choose a default exposure time in case there is no FDM. + exposure_time = 0.1 # seconds for mutator in params.generator.mutators: if isinstance(mutator, FixedDurationMutator): exposure_time = mutator.duration
Add default exposure time for HDF flushing maths
diff --git a/example/src/dragular.js b/example/src/dragular.js index <HASH>..<HASH> 100644 --- a/example/src/dragular.js +++ b/example/src/dragular.js @@ -3,7 +3,7 @@ require("./dragular.css"); var Angular = require("angular"); Angular.module("dragular", [ - require("angular-drag-drop").name, + require("../../src/angular-drag-drop").name, require("controllers/game").name, ])
Refer to the local instance of the lib
diff --git a/trunk/JLanguageTool/src/test/java/org/languagetool/rules/patterns/PatternRuleTest.java b/trunk/JLanguageTool/src/test/java/org/languagetool/rules/patterns/PatternRuleTest.java index <HASH>..<HASH> 100644 --- a/trunk/JLanguageTool/src/test/java/org/languagetool/rules/patterns/PatternRuleTest.java +++ b/trunk/JLanguageTool/src/test/java/org/languagetool/rules/patterns/PatternRuleTest.java @@ -337,7 +337,7 @@ public class PatternRuleTest extends TestCase { if (s.indexOf('|') >= 0) { System.err.println("The " + lang.toString() + " rule: " + ruleId + ", token [" + tokenIndex + "], contains | (pipe) in " - + " regexp part [" + matcher.group(2) + + " regexp bracket expression [" + matcher.group(2) + "] which is unlikely to be correct."); }
Minor change in warning given by "ant test".
diff --git a/lib/endpoint/find-routes.js b/lib/endpoint/find-routes.js index <HASH>..<HASH> 100644 --- a/lib/endpoint/find-routes.js +++ b/lib/endpoint/find-routes.js @@ -34,6 +34,10 @@ function findRoutes (state) { const hasExampleRoutes = !!routeBlocks.slice(1).find(block => { const prevBlock = state.blocks[state.blocks.indexOf(block) - 1] + if (prevBlock.type === 'exampleTitle') { + return true + } + if (prevBlock.type !== 'description') { return false }
build: better endpoint parsing, stop mistaking examples as valid endpoint routes
diff --git a/test/test_form_builder.rb b/test/test_form_builder.rb index <HASH>..<HASH> 100644 --- a/test/test_form_builder.rb +++ b/test/test_form_builder.rb @@ -51,7 +51,7 @@ class JudgeFormBuilderTest < ActionView::TestCase end def test_time_zone_select - assert_dom_equal expected_time_zone_select, builder.time_zone_select(:time_zone, ActiveSupport::TimeZone.us_zones, :include_blank => true, :validate => true) + assert builder.time_zone_select(:time_zone, ActiveSupport::TimeZone.us_zones, :include_blank => true, :validate => true), "time zone select not present" end def builder
Make time_zone_select test a general assertion instead of asserting DOM equal (time zones are variable)
diff --git a/GPy/models/GP_regression.py b/GPy/models/GP_regression.py index <HASH>..<HASH> 100644 --- a/GPy/models/GP_regression.py +++ b/GPy/models/GP_regression.py @@ -79,7 +79,7 @@ class GP_regression(model): return self.kern._get_params_transformed() def _get_param_names(self): - return self.kern._get_params_names_transformed() + return self.kern._get_param_names_transformed() def _model_fit_term(self): """
Fix error introduced into GP_regression when doing name changes.
diff --git a/signaturit_sdk/signaturit_client.py b/signaturit_sdk/signaturit_client.py index <HASH>..<HASH> 100644 --- a/signaturit_sdk/signaturit_client.py +++ b/signaturit_sdk/signaturit_client.py @@ -15,7 +15,7 @@ class SignaturitClient: 'mandatory_photo', 'mandatory_voice', 'branding_id', 'templates', 'method', 'sms_auth', 'data'] - STORAGE_S3 = ['bucket, key, secret'] + STORAGE_S3 = ['bucket', 'key', 'secret'] STORAGE_SFTP_PASSWORD = ['password'] STORAGE_SFTP_KEY = ['passphrase', 'public', 'private']
Fixed a typo on a storage constant
diff --git a/test/actions/showDocumentation.js b/test/actions/showDocumentation.js index <HASH>..<HASH> 100644 --- a/test/actions/showDocumentation.js +++ b/test/actions/showDocumentation.js @@ -16,7 +16,7 @@ describe('Action: Show Documentation', () => { it('returns the correct parts', async () => { let {documentation, serverInformation} = await api.specHelper.runAction('showDocumentation') - expect(Object.keys(documentation).length).to.equal(6) // 6 actions + expect(Object.keys(documentation).length).to.equal(7) // 7 actions expect(serverInformation.serverName).to.equal('actionhero') }) })
Updating action count for showDocumentation test.
diff --git a/lib/server/console.js b/lib/server/console.js index <HASH>..<HASH> 100644 --- a/lib/server/console.js +++ b/lib/server/console.js @@ -72,14 +72,14 @@ cwd : CWD }, - onMessage = function(command) { - log(ConNum, command); + onMessage = function(conNum, command) { + log(conNum, command); if (onMsg) onMsg(command, callback); else - spawnify(command, Clients[ConNum], callback); - }, + spawnify(command, Clients[conNum], callback); + }.bind(null, ConNum), onDisconnect = function(conNum) { Clients[conNum] = null;
fix(console) one directory for all consoles
diff --git a/src/main/java/com/zaxxer/hikari/pool/HikariPool.java b/src/main/java/com/zaxxer/hikari/pool/HikariPool.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/zaxxer/hikari/pool/HikariPool.java +++ b/src/main/java/com/zaxxer/hikari/pool/HikariPool.java @@ -127,7 +127,7 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener HikariMBeanElf.registerMBeans(configuration, this); } - houseKeepingTimer = new Timer("Hikari Housekeeping Timer", true); + houseKeepingTimer = new Timer("Hikari Housekeeping Timer (pool " + configuration.getPoolName() + ")", true); addConnectionExecutor = PoolUtilities.createThreadPoolExecutor(configuration.getMaximumPoolSize(), "HikariCP connection filler");
Fix #<I> add pool name to housekeeping timer thread
diff --git a/gulpfile.js/lib/webpack-multi-config.js b/gulpfile.js/lib/webpack-multi-config.js index <HASH>..<HASH> 100644 --- a/gulpfile.js/lib/webpack-multi-config.js +++ b/gulpfile.js/lib/webpack-multi-config.js @@ -18,6 +18,7 @@ module.exports = function(env) { context: jsSrc, plugins: [], resolve: { + root: jsSrc, extensions: [''].concat(extensions) }, module: {
Added resolve-root jsSrc Taking advantage of the configuration property resolve-root. <URL>
diff --git a/Integration/TrustedFormIntegration.php b/Integration/TrustedFormIntegration.php index <HASH>..<HASH> 100644 --- a/Integration/TrustedFormIntegration.php +++ b/Integration/TrustedFormIntegration.php @@ -131,6 +131,7 @@ class TrustedFormIntegration extends AbstractEnhancerIntegration $this->logger->error( 'TrustedForm: Certificate already expired ('.$trustedFormClaim.') with contact '.$identifier.': '.(!empty($data->expired_at) ? $data->expired_at : '') ); + break 2; // no break case 200: @@ -212,7 +213,7 @@ class TrustedFormIntegration extends AbstractEnhancerIntegration 'TrustedForm: Unrecognized response code '.(!empty($response->code) ? '('.$response->code.')' : '').' (try '.$try.'/'.$tryLimit.') with contact '.$identifier.': '.(!empty($response->body) ? $response->body : '') ); usleep(250000); - break; + break 2; } } }
[ENG-<I>] Do not retry if cert is already expired.
diff --git a/support/Config.php b/support/Config.php index <HASH>..<HASH> 100644 --- a/support/Config.php +++ b/support/Config.php @@ -21,7 +21,7 @@ interface Config extends collections\Dictionary { * @return self * @throws \LogicException if $config is not defined or not an array */ - public function load( $file ); + public function load( $file, $key = '' ); /** * Merge an array into the current configuration.
Support for loading a config file into a specific key
diff --git a/lib/tool.js b/lib/tool.js index <HASH>..<HASH> 100644 --- a/lib/tool.js +++ b/lib/tool.js @@ -204,14 +204,20 @@ class WebpackTool { return compiler; } - createDevServerOptions(webpackConfig, devServer) { + createDevServerOptions(webpackConfig, devServer = {}) { const { output } = webpackConfig; + const { headers = {}, index, methods, mimeTypes, publicPath, writeToDisk } = devServer; return { + index, + writeToDisk, + mimeTypes, + methods, + publicPath: publicPath || output.publicPath, headers: { 'x-webpack': 'easywebpack', 'cache-control': 'max-age=0', + ...headers, }, - publicPath: output.publicPath }; }
fix: add webpack-dev-middleware missing options
diff --git a/js/binance.js b/js/binance.js index <HASH>..<HASH> 100644 --- a/js/binance.js +++ b/js/binance.js @@ -3746,7 +3746,7 @@ module.exports = class binance extends Exchange { return this.parseFundingRate (response); } - async fetchFundingRateHistory (symbol, since = undefined, limit = undefined, params = {}) { + async fetchFundingRateHistory (symbol, limit = undefined, since = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); const request = {
Switched argument limit for binance.fetchFundingRateHistory because this argument is not taken by gate.io
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ required = [ setup( name='unwrapper', - version='0.0.8', + version='1.0.0', url='https://github.com/shaunvxc/unwrap', license='MIT', author='Shaun Viguerie',
bump to <I> :balloon:
diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index <HASH>..<HASH> 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -1177,6 +1177,14 @@ module Sinatra set(:public_folder, value) end + def public_dir=(value) + self.public_folder = value + end + + def public_dir + public_folder + end + private # Condition for matching host name. Parameter might be String or Regexp. def host_name(pattern) diff --git a/test/settings_test.rb b/test/settings_test.rb index <HASH>..<HASH> 100644 --- a/test/settings_test.rb +++ b/test/settings_test.rb @@ -484,6 +484,18 @@ class SettingsTest < Test::Unit::TestCase end end + describe 'public_dir' do + it 'is an alias for public_folder' do + @base.public_dir = File.dirname(__FILE__) + assert_equal File.dirname(__FILE__), @base.public_dir + assert_equal @base.public_folder, @base.public_dir + + @application.public_dir = File.dirname(__FILE__) + assert_equal File.dirname(__FILE__), @application.public_dir + assert_equal @application.public_folder, @application.public_dir + end + end + describe 'lock' do it 'is disabled by default' do assert ! @base.lock?
alias public_folder as public_dir
diff --git a/hack/build-local-images.py b/hack/build-local-images.py index <HASH>..<HASH> 100755 --- a/hack/build-local-images.py +++ b/hack/build-local-images.py @@ -257,6 +257,9 @@ for image in image_config: ) debug("Initiating Docker build with Dockerfile:\n{}".format(open(join(context_dir, "Dockerfile")).read())) + # re-pull the original image before building it so we're not accumulating layers each time we + # rebuild the image. + call(["docker", "pull", full_name(image) + ":" + image_config[image]["tag"]]) call(["docker", "build", "-t", full_name(image), "."], cwd=context_dir) remove(join(context_dir, "Dockerfile"))
always pull image before rebuilding local images
diff --git a/xclim/core/locales.py b/xclim/core/locales.py index <HASH>..<HASH> 100644 --- a/xclim/core/locales.py +++ b/xclim/core/locales.py @@ -141,7 +141,7 @@ def get_local_dict(locale: Union[str, Sequence[str], Tuple[str, dict]]): ) if isinstance(locale[1], dict): return locale - with open(locale[1]) as locf: + with open(locale[1], encoding="utf-8") as locf: return locale[0], json.load(locf)
Clearly set utf-8 in `get_local_dict` file handler to prevent opening files using Windows default charsets
diff --git a/src/ChrisKonnertz/DeepLy/DeepLy.php b/src/ChrisKonnertz/DeepLy/DeepLy.php index <HASH>..<HASH> 100644 --- a/src/ChrisKonnertz/DeepLy/DeepLy.php +++ b/src/ChrisKonnertz/DeepLy/DeepLy.php @@ -17,11 +17,6 @@ class DeepLy { /** - * The length of the text for translations is limited by the API - */ - const MAX_TRANSLATION_TEXT_LEN = 5000; - - /** * All supported language code constants */ const LANG_AUTO = 'auto'; // Let DeepL decide which language it is (only works for the source language) @@ -48,6 +43,11 @@ class DeepLy ]; /** + * The length of the text for translations is limited by the API + */ + const MAX_TRANSLATION_TEXT_LEN = 5000; + + /** * Constants that are names of methods that can be called via the API */ const METHOD_TRANSLATE = 'LMT_handle_jobs'; // Translates a text
Moved the constant to a better palce
diff --git a/lib/nightcrawler_swift/connection.rb b/lib/nightcrawler_swift/connection.rb index <HASH>..<HASH> 100644 --- a/lib/nightcrawler_swift/connection.rb +++ b/lib/nightcrawler_swift/connection.rb @@ -16,6 +16,7 @@ module NightcrawlerSwift connected_attr_reader :catalog, :admin_url, :upload_url, :public_url, :internal_url def auth_response + @auth_response ||= nil authenticate! if @auth_response.nil? @auth_response end
Initialize the variable before use it to avoid warnings
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -17,9 +17,6 @@ import re import io -import textwrap -import sys -import shutil from setuptools import setup @@ -60,12 +57,3 @@ setup( 'Programming Language :: Python' ], ) - -# Check that the pandoc-xnos script is on the PATH -if not shutil.which('pandoc-xnos'): - msg = """ - ERROR: `pandoc-xnos` script not found. This will need to - be corrected. If you need help, please file an Issue at - https://github.com/tomduck/pandoc-xnos/issues.\n""" - print(textwrap.dedent(msg)) - sys.exit(-1)
Removed script check that was causing a developer pip error.
diff --git a/lib/puppet/provider/service/freebsd.rb b/lib/puppet/provider/service/freebsd.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/provider/service/freebsd.rb +++ b/lib/puppet/provider/service/freebsd.rb @@ -78,7 +78,7 @@ Puppet::Type.type(:service).provide :freebsd, :parent => :init do # Add a new setting to the rc files def rc_add(service, rcvar, yesno) - append = "\n\# Added by Puppet\n#{rcvar}_enable=\"#{yesno}\"" + append = "\# Added by Puppet\n#{rcvar}_enable=\"#{yesno}\"\n" # First, try the one-file-per-service style if File.exists?(@@rcconf_dir) File.open(@@rcconf_dir + "/#{service}", File::WRONLY | File::APPEND | File::CREAT, 0644) {
Fix for #<I> -- Newline goes at the _end_ of the line Fredrik Eriksson's suggested change, from the ticket.
diff --git a/webapps/client/scripts/repository/controllers/cam-cockpit-repository-view-ctrl.js b/webapps/client/scripts/repository/controllers/cam-cockpit-repository-view-ctrl.js index <HASH>..<HASH> 100644 --- a/webapps/client/scripts/repository/controllers/cam-cockpit-repository-view-ctrl.js +++ b/webapps/client/scripts/repository/controllers/cam-cockpit-repository-view-ctrl.js @@ -157,7 +157,6 @@ define([ updateSilently({ deployment: focused.id, resource: null, - resourceName: null, viewbox: null, editMode: null }); @@ -169,7 +168,6 @@ define([ updateSilently({ deployment: null, resource: null, - resourceName: null, viewbox: null, editMode: null }); @@ -208,7 +206,7 @@ define([ }; } else if (resourceName) { - + resources = resources || []; for(var i=0, resource; !!(resource = resources[i]); i++) { if (resource.name === resourceName) { return {
chore(repository): keep resource name related to CAM-<I>
diff --git a/pycm/pycm_obj.py b/pycm/pycm_obj.py index <HASH>..<HASH> 100644 --- a/pycm/pycm_obj.py +++ b/pycm/pycm_obj.py @@ -542,6 +542,7 @@ def __overall_stat_init__(cm): cm.TPR_Micro = cm.overall_stat["TPR Micro"] cm.PPV_Micro = cm.overall_stat["PPV Micro"] cm.F1_Macro = cm.overall_stat["F1 Macro"] + cm.F1_Micro = cm.overall_stat["F1 Micro"] cm.Overall_RACC = cm.overall_stat["Overall RACC"] cm.Overall_RACCU = cm.overall_stat["Overall RACCU"] cm.PI = cm.overall_stat["Scott PI"]
fix : F1 Micro added to object
diff --git a/lib/clever-ruby/clever_object.rb b/lib/clever-ruby/clever_object.rb index <HASH>..<HASH> 100644 --- a/lib/clever-ruby/clever_object.rb +++ b/lib/clever-ruby/clever_object.rb @@ -198,9 +198,13 @@ module Clever # @api private # @return [Object] def add_accessors(keys) + obj = self metaclass.instance_eval do keys.each do |k| next if @@permanent_attributes.include? k + unless obj.class.linked_resources.nil? + next if obj.class.linked_resources.include? k + end k_eq = :"#{k}=" define_method(k) { @values[k] } define_method(k_eq) { |v| @values[k] = v }
only add accessor for attributes if they dont refer to nested resources
diff --git a/asv/commands/publish.py b/asv/commands/publish.py index <HASH>..<HASH> 100644 --- a/asv/commands/publish.py +++ b/asv/commands/publish.py @@ -103,14 +103,24 @@ class Publish(Command): repo = get_repo(conf) benchmarks = Benchmarks.load(conf) + def copy_ignore(src, names): + # Copy only *.js and *.css in vendor dir + ignore = [fn for fn in names + if (os.path.basename(src).lower() == 'vendor' and + not fn.lower().endswith('.js') and + not fn.lower().endswith('.css'))] + return ignore + template_dir = os.path.join( os.path.dirname(os.path.abspath(__file__)), '..', 'www') - shutil.copytree(template_dir, conf.html_dir) + shutil.copytree(template_dir, conf.html_dir, ignore=copy_ignore) # Ensure html_dir is writable even if template_dir is on a read-only FS os.chmod(conf.html_dir, 0o755) for (pre, ds, fs) in os.walk(conf.html_dir): - for x in fs + ds: + for x in fs: + os.chmod(os.path.join(pre, x), 0o644) + for x in ds: os.chmod(os.path.join(pre, x), 0o755) log.step()
publish: only copy vendor/*.{js,css}, and don't set +x on copied files
diff --git a/packages/interaction/src/InteractionManager.js b/packages/interaction/src/InteractionManager.js index <HASH>..<HASH> 100644 --- a/packages/interaction/src/InteractionManager.js +++ b/packages/interaction/src/InteractionManager.js @@ -1431,7 +1431,7 @@ export default class InteractionManager extends EventEmitter const events = this.normalizeToPointerData(originalEvent); - if (events[0].pointerType === 'mouse') + if (events[0].pointerType === 'mouse' || events[0].pointerType === 'pen') { this.didMove = true;
Update the mouse position in onPointerMove when using a pen tablet (#<I>)
diff --git a/stream.js b/stream.js index <HASH>..<HASH> 100644 --- a/stream.js +++ b/stream.js @@ -48,7 +48,7 @@ DuplexStream.prototype._end = function (end) { if(isError(end)) this.sink.end(end) //otherwise, respect pause - else if(!this.sink.paused) { + else if(this.buffer.length === 0) { this.sink.end(end) this.paused = this.sink.paused } @@ -63,10 +63,12 @@ DuplexStream.prototype.resume = function () { while(this.buffer.length && !this.sink.paused) { var data = this.buffer.shift() this._preread(data) - this.sink.write(data) + //check if it's paused again, uncase a credit allocation in _preread + //has changed the pause state. + if(!this.sink.paused) this.sink.write(data) } - if(this.ended && this.buffer.length == 0 && !this.sink.paused) + if(this.ended && this.buffer.length == 0) this.sink.end(this.ended) }
breaking change: pause doesn't prevent end
diff --git a/src/FinalHandler.php b/src/FinalHandler.php index <HASH>..<HASH> 100644 --- a/src/FinalHandler.php +++ b/src/FinalHandler.php @@ -113,7 +113,7 @@ class FinalHandler if ($this->request instanceof Http\Request && $this->request->originalUrl) { $url = $this->request->originalUrl; } else { - $this->request->getUrl(); + $url = $this->request->getUrl(); } $escaper = new Escaper();
Fixed missing variable declaration in FinalHandler
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -31,7 +31,8 @@ var input = [ // HTTP/S Transport Protocol , ["http://host.xz/path/to/repo.git/", false] , ["https://host.xz/path/to/repo.git/", false] - + , ["http://host.xz:8000/path/to/repo.git/", false] + , ["https://host.xz:8000/path/to/repo.git/", false] // Local (Filesystem) Transport Protocol , ["/path/to/repo.git/", false] , ["path/to/repo.git/", false]
add tests for urls with ports
diff --git a/lib/mongo_mapper/document.rb b/lib/mongo_mapper/document.rb index <HASH>..<HASH> 100644 --- a/lib/mongo_mapper/document.rb +++ b/lib/mongo_mapper/document.rb @@ -341,10 +341,6 @@ module MongoMapper end def save(options={}) - if options === false - ActiveSupport::Deprecation.warn "save with true/false is deprecated. You should now use :validate => true/false." - options = {:validate => false} - end options.reverse_merge!(:validate => true) perform_validations = options.delete(:validate) !perform_validations || valid? ? create_or_update(options) : false diff --git a/test/functional/test_document.rb b/test/functional/test_document.rb index <HASH>..<HASH> 100644 --- a/test/functional/test_document.rb +++ b/test/functional/test_document.rb @@ -721,17 +721,12 @@ class DocumentTest < Test::Unit::TestCase end end - should "insert document" do + should "insert invalid document" do doc = @document.new + doc.expects(:valid?).never doc.save(:validate => false) @document.count.should == 1 end - - should "work with false passed to save" do - doc = @document.new - doc.save(false) - @document.count.should == 1 - end end context "#save (with options)" do
Deprecations are for projects that are past <I>. ;) Enjoy life on the edge!
diff --git a/src/wyone/core/SolverState.java b/src/wyone/core/SolverState.java index <HASH>..<HASH> 100644 --- a/src/wyone/core/SolverState.java +++ b/src/wyone/core/SolverState.java @@ -137,7 +137,7 @@ public final class SolverState implements Iterable<WFormula> { WFormula f = rassignments.get(x); //System.out.println("STATE BEFORE: " + this + " (" + System.identityHashCode(this) + "), i=" + i + "/" + worklist.size() + " : " + f); for(InferenceRule ir : solver.theories()) { - if(assignments.size() >= limit) { + if(worklist.size() >= limit || assignments.size() >= limit) { return; } else if(assertions.get(x)) { ir.infer(f, this, solver);
Ok, hmmm, that didn't work very well.
diff --git a/tests/Doctrine/DBAL/Migrations/Tests/ConfigurationTest.php b/tests/Doctrine/DBAL/Migrations/Tests/ConfigurationTest.php index <HASH>..<HASH> 100644 --- a/tests/Doctrine/DBAL/Migrations/Tests/ConfigurationTest.php +++ b/tests/Doctrine/DBAL/Migrations/Tests/ConfigurationTest.php @@ -209,9 +209,9 @@ class ConfigurationTest extends MigrationTestCase public function testGetVersionNotFound() { - $this->setExpectedException(MigrationException::class); - $config = $this->getSqliteConfiguration(); + + $this->setExpectedException(MigrationException::class); $config->getVersion('foo'); }
Move expected exception after getSqliteConfiguration call in test
diff --git a/transformers/websockets/server.js b/transformers/websockets/server.js index <HASH>..<HASH> 100644 --- a/transformers/websockets/server.js +++ b/transformers/websockets/server.js @@ -27,7 +27,7 @@ module.exports = function server() { * @api private */ function noop(err) { - if (err) logger.error(err.message, err); + if (err) logger.error(err); } //
[fix] When logging errors, use the error as the first argument of the logger
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -1 +1,4 @@ -module.exports = require('./dav'); +module.exports = { + dav: require('./dav'), + web3: require('./web3wrapper') +}; \ No newline at end of file
fix: expose web3 from dav-js
diff --git a/src/Service/Plugin/SettingsGetter.php b/src/Service/Plugin/SettingsGetter.php index <HASH>..<HASH> 100644 --- a/src/Service/Plugin/SettingsGetter.php +++ b/src/Service/Plugin/SettingsGetter.php @@ -157,7 +157,7 @@ class SettingsGetter extends Registration * @return array * List of these files */ - public static function getAdditionelHelpFiles() + public static function getAdditionalHelpFiles() { return static::$additionalHelpFiles; } diff --git a/src/View/Messages.php b/src/View/Messages.php index <HASH>..<HASH> 100644 --- a/src/View/Messages.php +++ b/src/View/Messages.php @@ -198,7 +198,7 @@ class Messages $this->readHelpFile(KREXX_DIR . 'resources/language/Help.ini'); - foreach (SettingsGetter::getAdditionelHelpFiles() as $filename) { + foreach (SettingsGetter::getAdditionalHelpFiles() as $filename) { $this->readHelpFile($filename); } }
Fixed a typo in the method name.
diff --git a/cli/Valet/Site.php b/cli/Valet/Site.php index <HASH>..<HASH> 100644 --- a/cli/Valet/Site.php +++ b/cli/Valet/Site.php @@ -304,11 +304,19 @@ class Site $caSrlParam = ' -CAserial ' . $caSrlPath; } - $this->cli->run(sprintf( + $result = $this->cli->runAsUser(sprintf( 'openssl x509 -req -sha256 -days 730 -CA "%s" -CAkey "%s"%s -in "%s" -out "%s" -extensions v3_req -extfile "%s"', $caPemPath, $caKeyPath, $caSrlParam, $csrPath, $crtPath, $confPath )); + // If cert could not be created using runAsUser(), use run(). + if (strpos($result, 'Permission denied')) { + $this->cli->run(sprintf( + 'openssl x509 -req -sha256 -days 730 -CA "%s" -CAkey "%s"%s -in "%s" -out "%s" -extensions v3_req -extfile "%s"', + $caPemPath, $caKeyPath, $caSrlParam, $csrPath, $crtPath, $confPath + )); + } + $this->trustCertificate($crtPath); }
handle SSL .crt creation "Permission denied" failure
diff --git a/lib/dm-validations.rb b/lib/dm-validations.rb index <HASH>..<HASH> 100644 --- a/lib/dm-validations.rb +++ b/lib/dm-validations.rb @@ -41,13 +41,13 @@ module DataMapper def create(attributes = {}, context = :default) resource = new(attributes) return resource unless resource.valid?(context) - resource.save + resource.save!(context) resource end - def create!(attributes = {}) + def create!(attributes = {}, context = :default) resource = new(attributes) - resource.save! + resource.save!(context) resource end end @@ -59,7 +59,7 @@ module DataMapper # def save_with_validations(context = :default) return false unless valid?(context) - save! + save!(context) end # Return the ValidationErrors
Ensure that context gets passed to Resource#save! Because of the way hooks are implemented, you cannot hook save_with_validations (save), but instead you always hook Resource#save (save!). Since dm-core's save method takes an optional context (but does nothing with it), I've updated dm-validations to call save!(context), which allows you do hook :save, and get the context it was saved in.
diff --git a/daftlistings/daft.py b/daftlistings/daft.py index <HASH>..<HASH> 100644 --- a/daftlistings/daft.py +++ b/daftlistings/daft.py @@ -155,7 +155,7 @@ class Daft: if self._filters: payload["filters"] = self._filters if self._ranges: - payload["range"] = self._ranges + payload["ranges"] = self._ranges if self._geoFilter: payload["geoFilter"] = self._geoFilter payload["paging"] = self._paging
(#<I>) range -> ranges
diff --git a/server.go b/server.go index <HASH>..<HASH> 100644 --- a/server.go +++ b/server.go @@ -2434,8 +2434,8 @@ func newServer(listenAddrs []string, db database.DB, chainParams *chaincfg.Param } // allow nondefault ports after 50 failed tries. - if fmt.Sprintf("%d", addr.NetAddress().Port) != - activeNetParams.DefaultPort && tries < 50 { + if tries < 50 && fmt.Sprintf("%d", addr.NetAddress().Port) != + activeNetParams.DefaultPort { continue }
server.go: Optimize newAddressFunc Change the order of conditions to avoid calling fmt.Sprintf unnecessarily.
diff --git a/src/Strava/API/Service/REST.php b/src/Strava/API/Service/REST.php index <HASH>..<HASH> 100644 --- a/src/Strava/API/Service/REST.php +++ b/src/Strava/API/Service/REST.php @@ -482,7 +482,7 @@ class REST implements ServiceInterface public function getStreamsRoute($id) { - $path = '/routes/' . $id . '/streams/'; + $path = '/routes/' . $id . '/streams'; $result = $this->adapter->get($path, array(), $this->getHeaders()); return $this->format($result); diff --git a/tests/Strava/API/Service/RESTTest.php b/tests/Strava/API/Service/RESTTest.php index <HASH>..<HASH> 100644 --- a/tests/Strava/API/Service/RESTTest.php +++ b/tests/Strava/API/Service/RESTTest.php @@ -545,7 +545,7 @@ class RESTTest extends PHPUnit_Framework_TestCase { $pestMock = $this->getPestMock(); $pestMock->expects($this->once())->method('get') - ->with($this->equalTo('/routes/1234/streams/')) + ->with($this->equalTo('/routes/1234/streams')) ->will($this->returnValue('{"response": 1}')); $service = new Strava\API\Service\REST('TOKEN', $pestMock);
Remove trailing slash from streams URL (#<I>)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ HERE = os.path.dirname(__file__) setup( name=NAME, - version='0.0.7', + version='0.0.8', packages=find_packages(), install_requires=['requests', 'werkzeug'], package_data={'': ['*.txt', '*.rst']},
Make new release (<I>)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ def is_requirement(line): setup( name='edx-ecommerce-worker', - version='0.8.1', + version='0.8.2', description='Celery tasks supporting the operations of edX\'s ecommerce service', long_description=long_description, classifiers=[
Bumping version after latest commit (#<I>) Added new Email template for Enterprise Portal Emails ENT-<I>
diff --git a/resources/lang/de-DE/dashboard.php b/resources/lang/de-DE/dashboard.php index <HASH>..<HASH> 100644 --- a/resources/lang/de-DE/dashboard.php +++ b/resources/lang/de-DE/dashboard.php @@ -23,16 +23,16 @@ return [ 'incident-templates' => 'Ereignis Vorlagen', 'updates' => [ 'title' => 'Vorfall Updates für :incident', - 'count' => '{0} Zero Updates|[1] One Update|[2] Two Updates|[3,*] Several Updates', + 'count' => '{0} 0 Updates|[1] Ein Update|[2] Zwei Updates|[3,*] Mehrere Updates', 'add' => [ 'title' => 'Vorfall-Update erstellen', - 'success' => 'Your new incident update has been created.', - 'failure' => 'Something went wrong with the incident update.', + 'success' => 'Dein Vorfall Update wurde erstellt.', + 'failure' => 'Etwas ist mit dem Vorfall Update schief gelaufen.', ], 'edit' => [ 'title' => 'Vorfall Update bearbeiten', 'success' => 'Vorfall Update wurde aktualisiert.', - 'failure' => 'Aktualisierung des Vorfall Updates fehlgeschlagen', + 'failure' => 'Etwas ist mit dem Aktualisieren des Vorfall Updates schief gelaufen', ], ], 'add' => [
New translations dashboard.php (German)
diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index <HASH>..<HASH> 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -1411,7 +1411,6 @@ class Controller * @param bool $addToLayout Add to layout, instead of page * * @return ComponentBase|null Component object. Will return `null` if a soft component is used but not found. - * * @throws CmsException if the (hard) component is not found. * @throws SystemException if the (hard) component class is not found or is not registered. */
Remove newline between "throws" and "return"
diff --git a/cake/libs/i18n.php b/cake/libs/i18n.php index <HASH>..<HASH> 100644 --- a/cake/libs/i18n.php +++ b/cake/libs/i18n.php @@ -321,8 +321,10 @@ class I18n extends Object { $this->__domains[$domain][$this->__lang][$this->category] = array(); return $domain; } - - if ($head = $this->__domains[$domain][$this->__lang][$this->category][""]) { + + if (isset($this->__domains[$domain][$this->__lang][$this->category][""])) { + $head = $this->__domains[$domain][$this->__lang][$this->category][""]; + foreach (explode("\n", $head) as $line) { $header = strtok($line,":"); $line = trim(strtok("\n"));
Fixing notice errors caused by accessing headers in po files that don't exist. Fixes #<I>
diff --git a/mongo_orchestration/__init__.py b/mongo_orchestration/__init__.py index <HASH>..<HASH> 100644 --- a/mongo_orchestration/__init__.py +++ b/mongo_orchestration/__init__.py @@ -20,7 +20,7 @@ from mongo_orchestration.servers import Servers from mongo_orchestration.replica_sets import ReplicaSets from mongo_orchestration.sharded_clusters import ShardedClusters -__version__ = '0.6.8' +__version__ = '0.6.9.dev0' def set_releases(releases=None, default_release=None): diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -81,7 +81,7 @@ class test(Command): setup( name='mongo-orchestration', - version='0.6.8', + version='0.6.9.dev0', author='MongoDB, Inc.', author_email='mongodb-user@googlegroups.com', description='Restful service for managing MongoDB servers',
Begin work on <I>
diff --git a/factory.py b/factory.py index <HASH>..<HASH> 100644 --- a/factory.py +++ b/factory.py @@ -20,6 +20,7 @@ import os import sys +import urllib import warnings from flask import Blueprint @@ -72,7 +73,9 @@ class WSGIScriptAliasFix(object): def __call__(self, environ, start_response): """Parse path from ``REQUEST_URI`` to fix ``PATH_INFO``.""" if environ.get('WSGI_SCRIPT_ALIAS') == environ['SCRIPT_NAME']: - path_info = urlparse(environ.get('REQUEST_URI')).path + path_info = urllib.unquote_plus( + urlparse(environ.get('REQUEST_URI')).path + ) # addresses issue with url encoded arguments in Flask routes environ['SCRIPT_NAME'] = '' environ['PATH_INFO'] = path_info return self.app(environ, start_response)
base: fix for wsgi PATH_INFO handling * Addresses issue with url encoded arguments in Flask routes. E.g. for route `/collection/<name>` the view argument `name` was not unescaped when accessed by `/collection/Books%<I>%<I>%<I>Reports` on Apache and this led to error during lookup in database. (closes #<I>)
diff --git a/tests/conftest.py b/tests/conftest.py index <HASH>..<HASH> 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -64,10 +64,13 @@ quiet: False timing: False """.format(expect_colors) - +if expect_colors: + color_str = 'True ' +else: + color_str = 'False' SHOW_LONG = """abbrev: True # Accept abbreviated commands case_insensitive: True # upper- and lower-case both OK -colors: True # Colorized output (*nix only) +colors: {} # Colorized output (*nix only) continuation_prompt: > # On 2nd+ line of input debug: False # Show full error stack on error default_file_name: command.txt # for ``save``, ``load``, etc. @@ -77,7 +80,7 @@ feedback_to_output: False # include nonessentials in `|`, `>` results prompt: (Cmd) # quiet: False # Don't print nonessential feedback timing: False # Report execution times -""" +""".format(color_str) class StdOut(object):
Fixed long-form show unit test to deal with Windows not having colors.
diff --git a/test/merge_patch_test.rb b/test/merge_patch_test.rb index <HASH>..<HASH> 100644 --- a/test/merge_patch_test.rb +++ b/test/merge_patch_test.rb @@ -207,19 +207,9 @@ describe "README example" do } JSON - expected = <<-JSON.strip_heredoc.gsub(/\s/, "") - { - "title": "Goodbye!", - "author" : { - "phoneNumber": "+01-123-456-7890", - "givenName" : "John", - }, - "tags":["example"], - "content": "This will be unchanged" - } - JSON + expected = %q'{"title":"Hello!","author":{"givenName":"John"},"tags":["example"],"content":"This will be unchanged"},"phoneNumber":"+01-123-456-7890"' - pending do + pending do assert_equal expected, JSON.merge(document, merge_patch) end end
fix up README test. Now it's in line with the new README.
diff --git a/docs/app/Components/ComponentDoc/ComponentExample.js b/docs/app/Components/ComponentDoc/ComponentExample.js index <HASH>..<HASH> 100644 --- a/docs/app/Components/ComponentDoc/ComponentExample.js +++ b/docs/app/Components/ComponentDoc/ComponentExample.js @@ -138,7 +138,7 @@ class ComponentExample extends Component { resetJSX = () => { const { sourceCode } = this.state const original = this.getOriginalSourceCode() - if (sourceCode !== original && confirm('Loose your changes?')) { // eslint-disable-line no-alert + if (sourceCode !== original && confirm('Lose your changes?')) { // eslint-disable-line no-alert this.setState({ sourceCode: original }) this.renderSourceCode() }
fix(ComponentExample): typo "loose" to "lose" (#<I>) fix(ComponentExample): typo "loose" to "lose"
diff --git a/src/wormhole/cli/cmd_send.py b/src/wormhole/cli/cmd_send.py index <HASH>..<HASH> 100644 --- a/src/wormhole/cli/cmd_send.py +++ b/src/wormhole/cli/cmd_send.py @@ -48,10 +48,9 @@ class Sender: w = wormhole(APPID, self._args.relay_url, self._reactor, self._tor_manager, timing=self._timing) - try: - yield self._go(w) - finally: - w.close() + d = self._go(w) + d.addBoth(w.close) # must wait for ack from close() + yield d def _send_data(self, data, w): data_bytes = dict_to_bytes(data)
cmd_send: wait for ack from close() Without this, the sender drops the connection before the "close" message has made it to the server, which leaves the mailbox hanging until it expires. It still lives in a 'd.addBoth()' slot, so it gets closed even if some error occurrs, but we wait for it's Deferred to fire in both success and failure cases.
diff --git a/fabfile.py b/fabfile.py index <HASH>..<HASH> 100644 --- a/fabfile.py +++ b/fabfile.py @@ -9,6 +9,7 @@ from prettyprint import pp import re VERSION_PATTERN = r'^v\d+(\.\d+)+?$' +env.releases_directory = "release" env.root_dir = os.path.abspath(os.path.dirname(__file__)) env.release = "HEAD" @@ -27,7 +28,6 @@ def latest_git_tag(): latest_tag = None return latest_tag - def compare_versions(x, y): """ Expects 2 strings in the format of 'X.Y.Z' where X, Y and Z are @@ -81,7 +81,13 @@ def release(): test() tag = make_tag() local("mvn package -pl enabler -am") - local("scripts/updatedocs.sh") + # Must have keystore info configured in ~/.m2/settings + local("mvn install -Prelease -pl enabler") + local("mkdir -p %(releases_directory)s" % env) + local("cp enabler/target/openxc-enabler.apk enabler/target/openxc-enabler-%s.apk" % tag) + local("cp enabler/target/openxc-enabler-signed-aligned.apk enabler/target/openxc-enabler-release-%s.apk" % tag) + + # local("scripts/updatedocs.sh") @task def snapshot():
Build production release APK in release fab task.
diff --git a/cobra/core/Object.py b/cobra/core/Object.py index <HASH>..<HASH> 100644 --- a/cobra/core/Object.py +++ b/cobra/core/Object.py @@ -66,9 +66,6 @@ class Object(object): def __contains__(self, x): return self.id.__contains__(x) - def __iter__(self): - return list(self.id).__iter__() - def __getitem__(self, index): return self.id[index] @@ -76,7 +73,7 @@ class Object(object): return self.id[i:j] def __repr__(self): - return repr(self.id) + return "<%s %s at 0x%x>" % (self.__class__.__name__, self.id, id(self)) def __str__(self): return str(self.id)
core.Object has __repr__ and not __iter__ The __repr__ now returns <CLASS ID 0xMEMORY_LOCATION> so it is clear if an entity is a string id for a reaction or a reaction itself from the __repr__. This fixes gh#<I> The lack of __iter__ makes it easy to check for lists of core.Object using duck-typing instead of explicitly using isinstance
diff --git a/pnc_cli/utils.py b/pnc_cli/utils.py index <HASH>..<HASH> 100644 --- a/pnc_cli/utils.py +++ b/pnc_cli/utils.py @@ -44,10 +44,8 @@ def checked_api_call(api, func, **kwargs): else: return response - epoch = datetime.datetime.utcfromtimestamp(0) - def unix_time_millis(dt): millis = int((dt - epoch).total_seconds() * 1000.0) return millis @@ -96,3 +94,10 @@ def get_config(): "New config file written to ~/.config/pnc-cli/pnc-cli.conf. Configure pncUrl and keycloakUrl values.") exit(1) return config + + +def get_internal_repo_start(environment): + if "stage" in environment: + return 'git+ssh://pnc-gerrit-stage@code-stage.eng.nay.redhat.com:29418/' + elif "devel" in environment: + return 'git+ssh://user-pnc-gerrit@pnc-gerrit.pnc.dev.eng.bos.redhat.com:29418/'
update utils added function to retrieve the appropriate internal_scm beginning based upon the configured PNC url
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ from setuptools import setup from rejected import __version__ +import os import sys classifiers = ['Development Status :: 5 - Production/Stable', @@ -22,6 +23,9 @@ extras_require = {'html': ['beautifulsoup4']} if sys.version_info < (2, 7, 0): install_requires.append('importlib') +if os.environ.get('READTHEDOCS', None) == 'True': + install_requires.append('pyev==0.8.1') + setup(name='rejected', version=__version__, description='Rejected is a Python RabbitMQ Consumer Framework and '
Install a pinned version of pyev due to build errors on rtd
diff --git a/local_settings/loader.py b/local_settings/loader.py index <HASH>..<HASH> 100644 --- a/local_settings/loader.py +++ b/local_settings/loader.py @@ -93,8 +93,7 @@ class Loader(Base): for k in v: v[k] = self._do_interpolation(v[k], settings) elif isinstance(v, Sequence): - for i, item in enumerate(v): - v[i] = self._do_interpolation(item, settings) + v = v.__class__(self._do_interpolation(item, settings) for item in v) return v def _convert_name(self, name):
Handle tuples in Loader._do_interpolation() Reported by @yorkedork
diff --git a/tests/test_signed_div.py b/tests/test_signed_div.py index <HASH>..<HASH> 100644 --- a/tests/test_signed_div.py +++ b/tests/test_signed_div.py @@ -9,7 +9,7 @@ import os test_location = str(os.path.dirname(os.path.realpath(__file__))) -def run_strtol(threads): +def run_signed_div(): test_bin = os.path.join(test_location, "../../binaries-private/tests/i386/test_signed_div") b = angr.Project(test_bin) @@ -21,9 +21,8 @@ def run_strtol(threads): nose.tools.assert_equal(out_angr, stdout_real) -def test_strtol(): - yield run_strtol, None - yield run_strtol, 8 +def test_signed_div(): + yield run_signed_div if __name__ == "__main__": - run_strtol(4) + run_signed_div()
Rename the signed_div test case, and ... disable the multithreaded test case.
diff --git a/lib/elastic_apm/sql_summarizer.rb b/lib/elastic_apm/sql_summarizer.rb index <HASH>..<HASH> 100644 --- a/lib/elastic_apm/sql_summarizer.rb +++ b/lib/elastic_apm/sql_summarizer.rb @@ -25,7 +25,7 @@ module ElasticAPM end def summarize(sql) - sql = sql.encode(UTF8, invalid: :replace, replace: nil) + sql = sql.encode(UTF8, invalid: :replace, undef: :replace) self.class.cache[sql] ||= REGEXES.find do |regex, sig| if (match = sql[0...1000].match(regex))
Handle undefined characters as well (#<I>)
diff --git a/jams/tests/jams_test.py b/jams/tests/jams_test.py index <HASH>..<HASH> 100644 --- a/jams/tests/jams_test.py +++ b/jams/tests/jams_test.py @@ -186,6 +186,10 @@ def test_jamsframe_add_observation_fail(): yield __test, ann, 0.0, None, 'foo', 1 yield __test, ann, None, 1.0, 'foo', 1 + yield __test, ann, -1, -1, 'foo', 1 + yield __test, ann, 0.0, -1, 'foo', 1 + yield __test, ann, -1, 1.0, 'foo', 1 + def test_jamsframe_interval_values():
Added negative value test cases to add_observation
diff --git a/command/__init__.py b/command/__init__.py index <HASH>..<HASH> 100644 --- a/command/__init__.py +++ b/command/__init__.py @@ -1,17 +1,7 @@ """distutils.command Package containing implementation of all the standard Distutils -commands. Currently this means: - - build - build_py - build_ext - install - install_py - install_ext - dist - -but this list will undoubtedly grow with time.""" +commands.""" __revision__ = "$Id$" @@ -21,5 +11,6 @@ __all__ = ['build', 'install', 'install_py', 'install_ext', + 'clean', 'sdist', ]
Simplified doc string. Added 'clean' to list of commands.
diff --git a/src/Saft/Sparql/Query.php b/src/Saft/Sparql/Query.php index <HASH>..<HASH> 100644 --- a/src/Saft/Sparql/Query.php +++ b/src/Saft/Sparql/Query.php @@ -550,6 +550,16 @@ class Query return $result; } + + /** + * Returns raw query, if available. + * + * @return string + */ + public function getQuery() + { + return $this->query; + } /** * Parsing the given queryand extract its parts. @@ -672,6 +682,36 @@ class Query $this->setOffset($parts['offset'][1][0]); } } + + /** + * Checks if query is a DELETE query. + * + * @return boolean + */ + public function isDeleteQuery() + { + return false !== strpos($this->getProloguePart(), 'DELETE'); + } + + /** + * Checks if query is an INSERT query. + * + * @return boolean + */ + public function isInsertQuery() + { + return false !== strpos($this->getProloguePart(), 'INSERT'); + } + + /** + * Checks if query is SPARQL UPDATE by checking if its either an insert- or delete query. + * + * @return boolean + */ + public function isUpdateQuery() + { + return $this->isInsertQuery() || $this->isDeleteQuery(); + } public function getProloguePart() {
Add isDeleteQuery, isInsertQuery, isUpdateQuery, getQuery These helper functions check which type the query is. A delete query contains DELETE in the prologue part, same for INSERT. An update query is either a delete- or insert query.
diff --git a/src/OkulBilisim/OjsImportBundle/Helper/ImportCommand.php b/src/OkulBilisim/OjsImportBundle/Helper/ImportCommand.php index <HASH>..<HASH> 100644 --- a/src/OkulBilisim/OjsImportBundle/Helper/ImportCommand.php +++ b/src/OkulBilisim/OjsImportBundle/Helper/ImportCommand.php @@ -4,6 +4,8 @@ namespace OkulBilisim\OjsImportBundle\Helper; use Doctrine\DBAL\Connection; use Doctrine\ORM\EntityManager; +use Monolog\Handler\StreamHandler; +use Monolog\Logger; use Psr\Log\LoggerInterface; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; @@ -54,6 +56,9 @@ class ImportCommand extends ContainerAwareCommand ->createConnection($parameters); $this->em = $this->getContainer()->get('doctrine.orm.entity_manager'); + + $path = $this->getContainer()->getParameter('kernel.root_dir') . '/logs/import.log'; $this->logger = $this->getContainer()->get('logger'); + $this->logger->pushHandler(new StreamHandler($path, Logger::INFO)); } } \ No newline at end of file
Save import logs to its own file
diff --git a/lib/resque.rb b/lib/resque.rb index <HASH>..<HASH> 100644 --- a/lib/resque.rb +++ b/lib/resque.rb @@ -163,7 +163,7 @@ module Resque # A shortcut to unregister_worker # useful for command line tool def remove_worker(worker_id) - worker = Resque::Worker.find(worker_id) + worker = Worker.find(worker_id) worker.unregister_worker end
Adding missing remove_worker for resque command line tool
diff --git a/h2o-py/h2o/connection.py b/h2o-py/h2o/connection.py index <HASH>..<HASH> 100644 --- a/h2o-py/h2o/connection.py +++ b/h2o-py/h2o/connection.py @@ -491,6 +491,7 @@ class H2OConnection(object): files = {file_upload_info["file"] : open(file_upload_info["file"], "rb")} return requests.post(url, files=files, headers=headers) elif method == "POST": + headers["Content-Type"] = "application/x-www-form-urlencoded" return requests.post(url, data=post_body, headers=headers) elif method == "DELETE": return requests.delete(url, headers=headers)
Set Content-Type: application/x-www-form-urlencoded for regular POST requests.