diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/cmd/influxd/main.go b/cmd/influxd/main.go index <HASH>..<HASH> 100644 --- a/cmd/influxd/main.go +++ b/cmd/influxd/main.go @@ -20,13 +20,16 @@ import ( // These variables are populated via the Go linker. var ( - version = "0.9" - commit string - branch string + version string + commit string + branch string ) func init() { // If commit, branch, or build time are not set, make that clear. + if version == "" { + version = "unknown" + } if commit == "" { commit = "unknown" } diff --git a/cmd/influxd/run/command.go b/cmd/influxd/run/command.go index <HASH>..<HASH> 100644 --- a/cmd/influxd/run/command.go +++ b/cmd/influxd/run/command.go @@ -71,8 +71,8 @@ func (cmd *Command) Run(args ...string) error { runtime.GOMAXPROCS(runtime.NumCPU()) // Mark start-up in log. - log.Printf("InfluxDB starting, version %s, branch %s, commit %s, built %s", - cmd.Version, cmd.Branch, cmd.Commit, cmd.BuildTime) + log.Printf("InfluxDB starting, version %s, branch %s, commit %s", + cmd.Version, cmd.Branch, cmd.Commit) log.Printf("Go version %s, GOMAXPROCS set to %d", runtime.Version(), runtime.GOMAXPROCS(0)) // Write the PID file.
Removed builtTime reference from influxd. Removed default version information from influxd.
diff --git a/lib/webcomment_config.py b/lib/webcomment_config.py index <HASH>..<HASH> 100644 --- a/lib/webcomment_config.py +++ b/lib/webcomment_config.py @@ -17,7 +17,7 @@ ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. -# pylint: disable-msg=C0301 +# pylint: disable=C0301 """WebComment configuration parameters."""
kwalitee: adapt disable-msg to new pylint * Changed all codebase to adapt enable-msg/disable-msg pylint comments to a new pylint version that leaves -msg part out.
diff --git a/sh.py b/sh.py index <HASH>..<HASH> 100644 --- a/sh.py +++ b/sh.py @@ -668,8 +668,10 @@ class Command(object): #("fg", "bg", "Command can't be run in the foreground and background"), ("err", "err_to_out", "Stderr is already being redirected"), ("piped", "iter", "You cannot iterate when this command is being piped"), - ("piped", "no_pipe", "Using a pipe doesn't make sense if you've\ + ("piped", "no_pipe", "Using a pipe doesn't make sense if you've \ disabled the pipe"), + ("no_out", "iter", "You cannot iterate over output if there is no \ +output"), )
added new incompatible args, closes #<I>
diff --git a/java-cloudbuild/synth.py b/java-cloudbuild/synth.py index <HASH>..<HASH> 100644 --- a/java-cloudbuild/synth.py +++ b/java-cloudbuild/synth.py @@ -17,6 +17,8 @@ import synthtool.gcp as gcp import synthtool.languages.java as java +AUTOSYNTH_MULTIPLE_COMMITS = True + gapic = gcp.GAPICGenerator() service='devtools-cloudbuild'
chore: enable context aware commits (#<I>)
diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index <HASH>..<HASH> 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -28,11 +28,11 @@ class Configuration implements ConfigurationInterface{ ->end() ->end() ->arrayNode('parameters') - ->prototype('scalar')->end() + ->prototype('variable')->end() ->end() ->arrayNode('services') ->prototype('array') - ->prototype('scalar')->end() + ->prototype('variable')->end() ->end() ->end() ->end();
di/configuration: use 'variable' prototype for 'parameters' and 'services' to allow any type of values
diff --git a/test/requests.js b/test/requests.js index <HASH>..<HASH> 100644 --- a/test/requests.js +++ b/test/requests.js @@ -444,6 +444,26 @@ var tests = function(web3) { }) + it("should respond with correct txn hash", function(done) { + var provider = web3.currentProvider; + var transaction = new Transaction({ + "value": "0x00", + "gasLimit": "0x5208", + "from": accounts[0], + "to": accounts[1], + "nonce": "0x02" + }) + + var secretKeyBuffer = Buffer.from(secretKeys[0].substr(2), 'hex') + transaction.sign(secretKeyBuffer) + + web3.eth.sendSignedTransaction(transaction.serialize(), function(err, result) { + assert.equal(result, to.hex(transaction.hash())) + done(err) + }) + + }) + }) describe("contract scenario", function() {
Add test for eth_sendRawTransaction response with signature
diff --git a/lib/specinfra/version.rb b/lib/specinfra/version.rb index <HASH>..<HASH> 100644 --- a/lib/specinfra/version.rb +++ b/lib/specinfra/version.rb @@ -1,3 +1,3 @@ module Specinfra - VERSION = "2.34.2" + VERSION = "2.34.3" end
Bump up version [skip ci]
diff --git a/cf/commands/securitygroup/security_groups.go b/cf/commands/securitygroup/security_groups.go index <HASH>..<HASH> 100644 --- a/cf/commands/securitygroup/security_groups.go +++ b/cf/commands/securitygroup/security_groups.go @@ -31,7 +31,7 @@ func (cmd SecurityGroups) Metadata() command_metadata.CommandMetadata { return command_metadata.CommandMetadata{ Name: "security-groups", Description: T("List all security groups"), - Usage: "CF_NAME security-group", + Usage: "CF_NAME security-groups", } }
Fix the Usage info in cf security-groups command
diff --git a/tsdb/head_append.go b/tsdb/head_append.go index <HASH>..<HASH> 100644 --- a/tsdb/head_append.go +++ b/tsdb/head_append.go @@ -305,13 +305,21 @@ func (s *memSeries) appendable(t int64, v float64) error { // AppendExemplar for headAppender assumes the series ref already exists, and so it doesn't // use getOrCreate or make any of the lset sanity checks that Append does. -func (a *headAppender) AppendExemplar(ref uint64, _ labels.Labels, e exemplar.Exemplar) (uint64, error) { +func (a *headAppender) AppendExemplar(ref uint64, lset labels.Labels, e exemplar.Exemplar) (uint64, error) { // Check if exemplar storage is enabled. if !a.head.opts.EnableExemplarStorage || a.head.opts.MaxExemplars.Load() <= 0 { return 0, nil } + + // Get Series s := a.head.series.getByID(ref) if s == nil { + s = a.head.series.getByHash(lset.Hash(), lset) + if s != nil { + ref = s.ref + } + } + if s == nil { return 0, fmt.Errorf("unknown series ref. when trying to add exemplar: %d", ref) }
Fix remote write receiver endpoint for exemplars (#<I>)
diff --git a/polyfill/require.js b/polyfill/require.js index <HASH>..<HASH> 100644 --- a/polyfill/require.js +++ b/polyfill/require.js @@ -551,8 +551,6 @@ _register('requireDynamic', require); _register('requireLazy', requireLazy); - define.amd = {}; - global.define = define; global.require = require; global.requireDynamic = require;
Stop pretending we're AMD compatible
diff --git a/middleware/swagger-ui.js b/middleware/swagger-ui.js index <HASH>..<HASH> 100644 --- a/middleware/swagger-ui.js +++ b/middleware/swagger-ui.js @@ -130,7 +130,7 @@ exports = module.exports = function swaggerUIMiddleware (rlOrSO, apiDeclarations var isSwaggerUiPath = path === options.swaggerUi || path.indexOf(options.swaggerUi + '/') === 0; debug('%s %s', req.method, req.url); - debug(' Will process: %s', isApiDocsPath || isSwaggerUiPath ? 'no' : 'yes'); + debug(' Will process: %s', isApiDocsPath || isSwaggerUiPath ? 'yes' : 'no'); if (isApiDocsPath) { debug(' Serving API Docs');
Fixed issue with invalid debugging in swagger-ui
diff --git a/libcontainer/error.go b/libcontainer/error.go index <HASH>..<HASH> 100644 --- a/libcontainer/error.go +++ b/libcontainer/error.go @@ -60,9 +60,9 @@ func (c ErrorCode) String() string { type Error interface { error - // Returns a verbose string including the error message - // and a representation of the stack trace suitable for - // printing. + // Returns an error if it failed to write the detail of the Error to w. + // The detail of the Error may include the error message and a + // representation of the stack trace. Detail(w io.Writer) error // Returns the error code for this error.
Fix the outdated comment for Error interface
diff --git a/packages/swagger2openapi/index.js b/packages/swagger2openapi/index.js index <HASH>..<HASH> 100644 --- a/packages/swagger2openapi/index.js +++ b/packages/swagger2openapi/index.js @@ -738,7 +738,7 @@ function processPaths(container, containerName, options, requestBodyCache, opena entry.refs = []; requestBodyCache[rbSha256] = entry; } - let ptr = '#/'+containerName+'/'+jptr.jpescape(p)+'/'+method+'/requestBody'; + let ptr = '#/'+containerName+'/'+encodeURIComponent(jptr.jpescape(p))+'/'+method+'/requestBody'; requestBodyCache[rbSha256].refs.push(ptr); }
Both escape and URI encode when creating JSON pointers
diff --git a/travis-ci/urls.py b/travis-ci/urls.py index <HASH>..<HASH> 100644 --- a/travis-ci/urls.py +++ b/travis-ci/urls.py @@ -1,19 +1,5 @@ -import os +from django.conf.urls import include, url -version = os.environ.get("DJANGO_VERSION", "1.6") - -values = version.split(".") -major = values[0] -minor = values[1] - -if major == 1 and minor < 10: - from django.conf.urls import patterns, include, url - from django.contrib import admin - urlpatterns = patterns('', - # Examples: - # url(r'^$', 'project.views.home', name='home'), - # url(r'^blog/', include('blog.urls')), - # url(r'^', include('userservice.urls')), - ) -else: - urlpatterns = [] +urlpatterns = [ + url(r'^rc/', include('restclients.urls')), +]
Include the urls for travis-ci
diff --git a/lib/mustachio.rb b/lib/mustachio.rb index <HASH>..<HASH> 100644 --- a/lib/mustachio.rb +++ b/lib/mustachio.rb @@ -12,19 +12,23 @@ Magickly.dragonfly.configure do |c| c.analyser.add :face_data_as_px do |temp_object| data = Mustachio.face_client.faces_detect(:file => temp_object.file, :attributes => 'none')['photos'].first # TODO use #face_data - data['tags'].map! do |face| - Mustachio::FACE_POS_ATTRS.each do |pos_attr| - if face[pos_attr].nil? - puts "WARN: missing position attribute '#{pos_attr}'" - else + new_tags = [] + data['tags'].map do |face| + has_all_attrs = Mustachio::FACE_POS_ATTRS.all? do |pos_attr| + if face[pos_attr] face[pos_attr]['x'] *= (data['width'] / 100.0) face[pos_attr]['y'] *= (data['height'] / 100.0) + true + else + # face attribute missing + false end end - face + new_tags << face if has_all_attrs end + data['tags'] = new_tags data end
ignore faces that are missing a face attr
diff --git a/test/TemplateWriterTest.js b/test/TemplateWriterTest.js index <HASH>..<HASH> 100644 --- a/test/TemplateWriterTest.js +++ b/test/TemplateWriterTest.js @@ -583,14 +583,20 @@ test.skip("JavaScript with alias", async t => { evf.init(); let files = await fastglob.async(evf.getFileGlobs()); - t.deepEqual(evf.getRawFiles(), [ - "./test/stubs/writeTestJS/**/*.11ty.js", - "./test/stubs/writeTestJS/**/*.js" - ]); - t.deepEqual(files, [ - "./test/stubs/writeTestJS/sample.js", - "./test/stubs/writeTestJS/test.11ty.js" - ]); + t.deepEqual( + evf.getRawFiles().sort(), + [ + "./test/stubs/writeTestJS/**/*.11ty.js", + "./test/stubs/writeTestJS/**/*.js" + ].sort() + ); + t.deepEqual( + files.sort(), + [ + "./test/stubs/writeTestJS/sample.js", + "./test/stubs/writeTestJS/test.11ty.js" + ].sort() + ); let tw = new TemplateWriter( "./test/stubs/writeTestJS",
Sort when comparing arrays because some versions of node... I don't really know why but order is different and it matters
diff --git a/ecommerce_worker/configuration/base.py b/ecommerce_worker/configuration/base.py index <HASH>..<HASH> 100644 --- a/ecommerce_worker/configuration/base.py +++ b/ecommerce_worker/configuration/base.py @@ -70,7 +70,7 @@ SITE_OVERRIDES = None # .. toggle_use_cases: open_edx # .. toggle_creation_date: 2021-02-09 # .. toggle_target_removal_date: None -# .. toggle_warnings: None +# .. toggle_warning: None # .. toggle_tickets: ENT-4071 BRAZE = { 'BRAZE_ENABLE': False,
refactor: rename toggle_warnings to toggle_warning (#<I>) Rename toggle_warnings to toggle_warning for consistency with setting_warning.
diff --git a/src/meta/dependency.js b/src/meta/dependency.js index <HASH>..<HASH> 100644 --- a/src/meta/dependency.js +++ b/src/meta/dependency.js @@ -29,7 +29,7 @@ return loadDependencies(manager, moduleMeta); } - if (moduleMeta.plugins) { + if (moduleMeta.plugins && moduleMeta.plugins.length) { return manager.pipelines.dependency .run(moduleMeta.plugins) .then(dependenciesFinished, Utils.forwardError); diff --git a/src/meta/transform.js b/src/meta/transform.js index <HASH>..<HASH> 100644 --- a/src/meta/transform.js +++ b/src/meta/transform.js @@ -21,7 +21,7 @@ return moduleMeta; } - if (moduleMeta.plugins) { + if (moduleMeta.plugins && moduleMeta.plugins.length) { return manager.pipelines.transform .run(moduleMeta.plugins) .then(transformationFinished, Utils.forwardError);
fixed issue with empty list of plugins keeping the rest of the middleware providers from executing
diff --git a/django_cryptography/__init__.py b/django_cryptography/__init__.py index <HASH>..<HASH> 100644 --- a/django_cryptography/__init__.py +++ b/django_cryptography/__init__.py @@ -1,5 +1,5 @@ from django_cryptography.utils.version import get_version -VERSION = (0, 1, 0, 'final', 0) +VERSION = (0, 2, 0, 'alpha', 0) __version__ = get_version(VERSION) diff --git a/docs/releases.rst b/docs/releases.rst index <HASH>..<HASH> 100644 --- a/docs/releases.rst +++ b/docs/releases.rst @@ -1,6 +1,9 @@ Releases ======== +0.2 - master_ +------------- + 0.1 - 2016-05-21 ---------------- diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -148,7 +148,7 @@ setup( author_email='george@georgemarshall.name', license='BSD', classifiers=[ - 'Development Status :: 5 - Production/Stable', + 'Development Status :: 2 - Pre-Alpha', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers',
Bumped version to <I> pre-alpha
diff --git a/file_reader.go b/file_reader.go index <HASH>..<HASH> 100644 --- a/file_reader.go +++ b/file_reader.go @@ -187,14 +187,14 @@ func (f *FileReader) Read(b []byte) (int, error) { } } - if f.blockReader == nil { - err := f.getNewBlockReader() - if err != nil { - return 0, err + for { + if f.blockReader == nil { + err := f.getNewBlockReader() + if err != nil { + return 0, err + } } - } - for { n, err := f.blockReader.Read(b) f.offset += int64(n) @@ -204,9 +204,12 @@ func (f *FileReader) Read(b []byte) (int, error) { return n, err } else if n > 0 { return n, nil - } else { - f.blockReader.Close() - f.getNewBlockReader() + } + + err = f.blockReader.Close() + f.blockReader = nil + if err != nil { + return n, err } } }
Don't swallow errors from BlockReader.Close
diff --git a/lib/fog/openstack.rb b/lib/fog/openstack.rb index <HASH>..<HASH> 100644 --- a/lib/fog/openstack.rb +++ b/lib/fog/openstack.rb @@ -1,5 +1,6 @@ require 'fog/openstack/compute' require 'fog/openstack/identity_v2' +require 'fog/openstack/identity_v3' require 'fog/openstack/image' require 'fog/openstack/metering' require 'fog/openstack/network'
Add missing require of identitty v3 Otherwise we get exception with missing Fog::Identity::OpenStack::V3
diff --git a/pysparkling/sql/dataframe.py b/pysparkling/sql/dataframe.py index <HASH>..<HASH> 100644 --- a/pysparkling/sql/dataframe.py +++ b/pysparkling/sql/dataframe.py @@ -1233,6 +1233,9 @@ class DataFrame(object): assert isinstance(col, Column), "col should be Column" return DataFrame(self._jdf.withColumn(colName, col), self.sql_ctx) + def withColumnRenamed(self, existing, new): + return DataFrame(self._jdf.withColumnRenamed(existing, new), self.sql_ctx) + class DataFrameNaFunctions(object): def __init__(self, df):
Implement DataFrame.withColumnRenamed
diff --git a/helpers/translation/class.TranslationFile.php b/helpers/translation/class.TranslationFile.php index <HASH>..<HASH> 100644 --- a/helpers/translation/class.TranslationFile.php +++ b/helpers/translation/class.TranslationFile.php @@ -332,11 +332,17 @@ class tao_helpers_translation_TranslationFile // If the translation unit exists, we replace the target with the new one if it exists. foreach($this->getTranslationUnits() as $tu) { + if ($tu->getSource() == $translationUnit->getSource()) { - - $tu->setTarget($translationUnit->getTarget()); - $tu->setAnnotations($translationUnit->getAnnotations()); - + // If we are here, it means that this TU is being overriden by + // another one having the same source... + // + // Let's make sure we don't override the existing one with an empty target! + if ($translationUnit->getTarget() !== '') { + $tu->setTarget($translationUnit->getTarget()); + $tu->setAnnotations($translationUnit->getAnnotations()); + } + return; } }
Empty translations were overriding non-empty ones.
diff --git a/src/Content/Migration/Base.php b/src/Content/Migration/Base.php index <HASH>..<HASH> 100644 --- a/src/Content/Migration/Base.php +++ b/src/Content/Migration/Base.php @@ -493,7 +493,7 @@ class Base // Use the MySQL driver for this $database = \JDatabase::getInstance( array( - 'driver' => 'mysql', + 'driver' => \Config::get('dbtype', 'pdo'), 'host' => \Config::get('host'), 'user' => \Config::get('user'), 'password' => \Config::get('password'), @@ -1036,7 +1036,7 @@ class Base // Use the MySQL driver for this $database = \JDatabase::getInstance( array( - 'driver' => 'mysql', + 'driver' => \Config::get('dbtype', 'pdo'), 'host' => \Config::get('host'), 'user' => \Config::get('user'), 'password' => \Config::get('password'),
[fix] Honor configuration choice for database type (#<I>)
diff --git a/estimote-sticker/estimote-sticker.js b/estimote-sticker/estimote-sticker.js index <HASH>..<HASH> 100644 --- a/estimote-sticker/estimote-sticker.js +++ b/estimote-sticker/estimote-sticker.js @@ -50,10 +50,10 @@ EstimoteSticker.prototype.onDiscover = function(peripheral) { // id can be looked up: https://cloud.estimote.com/v1/stickers/<id>/info // response: {"identifier":"<id>","type":"shoe","color":"blueberry","category":"shoe"} - var id = manufacturerData.slice(3, 7).toString('hex'); + var id = manufacturerData.slice(3, 11).toString('hex'); var major = parseInt(manufacturerData.slice(7, 9).toString('hex'), 16); var minor = parseInt(manufacturerData.slice(9, 11).toString('hex'), 16); - var uuid = 'd0d3fa86ca7645ec9bd96af4' + id; + var uuid = 'd0d3fa86ca7645ec9bd96af4' + manufacturerData.slice(3, 7).toString('hex'); var type = (manufacturerData[11] === 0x4) ? 'SB0' : 'unknown'; var firmware = null;
fix id comparing to the estimate APP
diff --git a/lib/nano.js b/lib/nano.js index <HASH>..<HASH> 100644 --- a/lib/nano.js +++ b/lib/nano.js @@ -554,7 +554,7 @@ module.exports = exports = nano = function dbScope(cfg) { follows: true, length: Buffer.isBuffer(att.data) ? att.data.length : Buffer.byteLength(att.data), - content_type: att.contentType + 'content_type': att.contentType }; multipart.push({body: att.data}); });
Fixes codestyle from #<I>
diff --git a/cumulusci/tasks/metadata_etl/tests/test_help_text.py b/cumulusci/tasks/metadata_etl/tests/test_help_text.py index <HASH>..<HASH> 100644 --- a/cumulusci/tasks/metadata_etl/tests/test_help_text.py +++ b/cumulusci/tasks/metadata_etl/tests/test_help_text.py @@ -408,4 +408,3 @@ class TestAddPicklistValues: assert test_elem is not None assert test_elem.inlineHelpText.text == "foo" -
Update task with suggested naming convention. Added overwrite flag to allow for a cautious approach to editing help text fields
diff --git a/config/build.js b/config/build.js index <HASH>..<HASH> 100644 --- a/config/build.js +++ b/config/build.js @@ -52,7 +52,9 @@ TYPES_TARGETS.forEach((target) => { const providersDir = path.join(process.cwd(), "/src/providers") -const files = fs.readdirSync(providersDir, "utf8") +const files = fs + .readdirSync(providersDir, "utf8") + .filter((file) => file !== "index.js") let importLines = "" let exportLines = `export default {\n`
build(provider): filter index.js to be more forgiving
diff --git a/test/spec/modules/yieldmoBidAdapter_spec.js b/test/spec/modules/yieldmoBidAdapter_spec.js index <HASH>..<HASH> 100644 --- a/test/spec/modules/yieldmoBidAdapter_spec.js +++ b/test/spec/modules/yieldmoBidAdapter_spec.js @@ -145,8 +145,18 @@ describe('YieldmoAdapter', () => { }; it('should return a tracker with type and url as parameters', () => { - // not ios, so tracker will fail - expect(spec.getUserSync(options)).to.deep.equal([]); + if (/iPhone|iPad|iPod/i.test(window.navigator.userAgent)) { + expect(spec.getUserSync(options)).to.deep.equal([{ + type: 'iframe', + url: SYNC_ENDPOINT + utils.getOrigin() + }]); + + options.iframeEnabled = false; + expect(spec.getUserSync(options)).to.deep.equal([]); + } else { + // not ios, so tracker will fail + expect(spec.getUserSync(options)).to.deep.equal([]); + } }); }); });
Fix getUserSync test for ios (#<I>)
diff --git a/lib/flor/punit/fork.rb b/lib/flor/punit/fork.rb index <HASH>..<HASH> 100644 --- a/lib/flor/punit/fork.rb +++ b/lib/flor/punit/fork.rb @@ -17,11 +17,8 @@ class Flor::Pro::Fork < Flor::Procedure @node['tree'] = Flor.dup(tree) @node['replyto'] = nil - ms = super - nid = ms.any? ? ms.first['nid'] : nil - wrap('flavour' => 'fork', 'nid' => parent, 'ret' => nid) + - ms + super end end diff --git a/spec/punit/fork_spec.rb b/spec/punit/fork_spec.rb index <HASH>..<HASH> 100644 --- a/spec/punit/fork_spec.rb +++ b/spec/punit/fork_spec.rb @@ -52,7 +52,7 @@ describe 'Flor punit' do expect(r['point']).to eq('terminated') expect(r['payload']['ret']).to eq(nil) - expect(r['payload']['forked']).to eq('0_0_0_1_0') + expect(r['payload']['forked']).to eq('0_0_0_1') expect( @unit.traces.collect(&:text).join(' ')
Let "fork" return its own nid Since it behaves like a "sequence" for its children in their forked parent
diff --git a/src/Expression/Func/FuncArguments.php b/src/Expression/Func/FuncArguments.php index <HASH>..<HASH> 100644 --- a/src/Expression/Func/FuncArguments.php +++ b/src/Expression/Func/FuncArguments.php @@ -29,7 +29,7 @@ class FuncArguments implements ExpressionInterface } if (is_array($argument)) { - $this->args += $argument; + $this->args += $argument; return $this; }
Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on <URL>
diff --git a/atx/device/android.py b/atx/device/android.py index <HASH>..<HASH> 100644 --- a/atx/device/android.py +++ b/atx/device/android.py @@ -79,8 +79,8 @@ class AndroidDevice(DeviceMixin, UiaDevice): """ self.__display = None serialno = serialno or getenvs('ATX_ADB_SERIALNO', 'ANDROID_SERIAL') - self._host = kwargs.get('host', getenvs('ATX_ADB_HOST', 'ANDROID_ADB_SERVER_HOST') or '127.0.0.1') - self._port = int(kwargs.get('port', getenvs('ATX_ADB_PORT', 'ANDROID_ADB_SERVER_PORT') or 5037)) + self._host = kwargs.get('host') or getenvs('ATX_ADB_HOST', 'ANDROID_ADB_SERVER_HOST') or '127.0.0.1' + self._port = int(kwargs.get('port') or getenvs('ATX_ADB_PORT', 'ANDROID_ADB_SERVER_PORT') or 5037) self._adb_client = adbkit.Client(self._host, self._port) self._adb_device = self._adb_client.device(serialno)
fix exception when passing port=None
diff --git a/lib/handlers/session.js b/lib/handlers/session.js index <HASH>..<HASH> 100644 --- a/lib/handlers/session.js +++ b/lib/handlers/session.js @@ -115,6 +115,14 @@ module.exports = Observable.extend({ email: req.param('email', '') }, _this = this; + if (req.user) { + return this.respond(res, 400, { + ok: false, + message: 'Too late I\'m afraid, that username is taken.', + step: '2.3' + }); + } + if (!params.name || !params.key) { return res.json(400, {ok: false, error: 'Missing username or password'}); }
Checking for existence of username before creating account
diff --git a/system/Test/FeatureTestCase.php b/system/Test/FeatureTestCase.php index <HASH>..<HASH> 100644 --- a/system/Test/FeatureTestCase.php +++ b/system/Test/FeatureTestCase.php @@ -168,7 +168,6 @@ class FeatureTestCase extends CIDatabaseTestCase // instance get the right one. Services::injectMock('request', $request); - ob_start(); $response = $this->app ->setRequest($request) ->run($this->routes, true); diff --git a/tests/system/Test/FeatureTestCaseTest.php b/tests/system/Test/FeatureTestCaseTest.php index <HASH>..<HASH> 100644 --- a/tests/system/Test/FeatureTestCaseTest.php +++ b/tests/system/Test/FeatureTestCaseTest.php @@ -189,6 +189,7 @@ class FeatureTestCaseTest extends FeatureTestCase 'Tests\Support\Controllers\Popcorn::canyon', ], ]); + ob_start(); $response = $this->get('home'); $response->assertSee('Hello-o-o'); }
place ob_start() in test
diff --git a/asn1crypto/crl.py b/asn1crypto/crl.py index <HASH>..<HASH> 100644 --- a/asn1crypto/crl.py +++ b/asn1crypto/crl.py @@ -107,6 +107,29 @@ class CRLReason(Enumerated): 10: 'aa_compromise', } + @property + def human_friendly(self): + """ + :return: + A unicode string with revocation description that is suitable to + show to end-users. Starts with a lower case letter and phrased in + such a way that it makes sense after the phrase "because of" or + "due to". + """ + + return { + 'unspecified': 'an unspecified reason', + 'key_compromise': 'a compromised key', + 'ca_compromise': 'the CA being compromised', + 'affiliation_changed': 'an affiliation change', + 'superseded': 'certificate supersession', + 'cessation_of_operation': 'a cessation of operation', + 'certificate_hold': 'a certificate hold', + 'remove_from_crl': 'removal from the CRL', + 'privilege_withdrawn': 'privilege withdrawl', + 'aa_compromise': 'the AA being compromised', + }[self.native] + class CRLEntryExtensionId(ObjectIdentifier): _map = {
Added .human_friendly to CRLReason
diff --git a/src/Http/Controllers/VoyagerBaseController.php b/src/Http/Controllers/VoyagerBaseController.php index <HASH>..<HASH> 100644 --- a/src/Http/Controllers/VoyagerBaseController.php +++ b/src/Http/Controllers/VoyagerBaseController.php @@ -401,8 +401,10 @@ class VoyagerBaseController extends Controller // Delete Files foreach ($dataType->deleteRows->where('type', 'file') as $row) { - foreach (json_decode($data->{$row->field}) as $file) { - $this->deleteFileIfExists($file->download_link); + if (isset($data->{$row->field})) { + foreach (json_decode($data->{$row->field}) as $file) { + $this->deleteFileIfExists($file->download_link); + } } } }
Fix BREAD file type bug while delete
diff --git a/Vps/Util/ClearCache.php b/Vps/Util/ClearCache.php index <HASH>..<HASH> 100644 --- a/Vps/Util/ClearCache.php +++ b/Vps/Util/ClearCache.php @@ -229,7 +229,7 @@ class Vps_Util_ClearCache } } if (in_array('setup', $types)) { - unlink('application/cache/setup.php'); + if (file_exists('application/cache/setup.php')) unlink('application/cache/setup.php'); } foreach ($this->getDbCacheTables() as $t) { if ($server) {
avoid error if cache file does not exist
diff --git a/lib/urban_dictionary.rb b/lib/urban_dictionary.rb index <HASH>..<HASH> 100644 --- a/lib/urban_dictionary.rb +++ b/lib/urban_dictionary.rb @@ -1,4 +1,25 @@ +require 'uri' +require 'net/http' + require 'urban_dictionary/version' +require 'urban_dictionary/word' +require 'urban_dictionary/entry' module UrbanDictionary + DEFINE_URL = 'http://www.urbandictionary.com/define.php' + RANDOM_URL = 'http://www.urbandictionary.com/random.php' + + def self.define(str) + Word.from_url("#{DEFINE_URL}?term=#{URI.encode(str)}") + end + + def self.random_word + url = URI.parse(RANDOM_URL) + req = Net::HTTP::Get.new(url.path) + rsp = Net::HTTP.start(url.host, url.port) {|http| + http.request(req) + } + + Word.from_url(rsp['location']) + end end \ No newline at end of file
Add static methods to UrbanDictionary
diff --git a/ajax/endpoints.py b/ajax/endpoints.py index <HASH>..<HASH> 100644 --- a/ajax/endpoints.py +++ b/ajax/endpoints.py @@ -71,7 +71,7 @@ class ModelEndpoint(object): return encoder.encode(result) - def get_queryset(self, request): + def get_queryset(self, request, **kwargs): return self.model.objects.none() def list(self, request):
get_queryset takes kwargs for future expansion.
diff --git a/src/core/Common.js b/src/core/Common.js index <HASH>..<HASH> 100644 --- a/src/core/Common.js +++ b/src/core/Common.js @@ -35,7 +35,7 @@ var Common = {}; if (source) { for (var prop in source) { - if (deepClone && source[prop].constructor === Object) { + if (deepClone && source[prop] && source[prop].constructor === Object) { if (!obj[prop] || obj[prop].constructor === Object) { obj[prop] = obj[prop] || {}; Common.extend(obj[prop], deepClone, source[prop]);
fixed issue with extending null properties
diff --git a/fixedsticky.js b/fixedsticky.js index <HASH>..<HASH> 100644 --- a/fixedsticky.js +++ b/fixedsticky.js @@ -107,20 +107,22 @@ return $el.each(function() { $( this ) - .removeData() + .removeData( [ keys.offset, keys.position ] ) .removeClass( S.classes.active ) - .next().remove(); + .nextUntil( S.classes.clone ).remove(); }); }, init: function( el ) { var $el = $( el ); - if (S.hasFixSticky()) return; + if( S.hasFixSticky() ) { + return; + } return $el.each(function() { var _this = this; $( win ).bind( 'scroll.fixedsticky', function() { - S.update( _this); + S.update( _this ); }).trigger( 'scroll.fixedsticky' ); $( win ).bind( 'resize.fixedsticky', function() {
Cleanup destroy code, was a little ambiguous. A few style changes.
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,6 @@ import * as THREE from 'three'; class Line extends THREE.Line { // ref. https://stackoverflow.com/questions/31399856/drawing-a-line-with-three-js-dynamically constructor(maxPoints, color=0xff0000) { - this.version = __version; let geometry = new THREE.BufferGeometry(); let positions = new Float32Array( maxPoints * 3 ); geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3)); @@ -15,6 +14,7 @@ class Line extends THREE.Line { }); super(geometry, material); + this.version = __version; this._maxPoints = maxPoints; this._numPoints = 0; }
Fix the runtime error due to `this.version` coming before `super()`
diff --git a/angr/engines/vex/engine.py b/angr/engines/vex/engine.py index <HASH>..<HASH> 100644 --- a/angr/engines/vex/engine.py +++ b/angr/engines/vex/engine.py @@ -579,7 +579,7 @@ class SimEngineVEX(SimEngine): first_imark = True for stmt in irsb.statements: - if isinstance(stmt, pyvex.stmt.IMark): + if type(stmt) is pyvex.stmt.IMark: # pylint: disable=unidiomatic-typecheck addr = stmt.addr + stmt.delta if not first_imark and self.is_stop_point(addr): # could this part be moved by pyvex?
SimEngineVEX._first_stop_point(): Switch from isinstance() to type() to make it faster. (#<I>)
diff --git a/src/Http/Response.php b/src/Http/Response.php index <HASH>..<HASH> 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -19,7 +19,6 @@ use Cake\Filesystem\File; use Cake\Http\Cookie\Cookie; use Cake\Http\Cookie\CookieCollection; use Cake\Http\Cookie\CookieInterface; -use Cake\I18n\Time; use Cake\Log\Log; use Cake\Network\CorsBuilder; use Cake\Network\Exception\NotFoundException; @@ -2084,7 +2083,7 @@ class Response implements ResponseInterface $cookie = new Cookie( $name, '', - new Time(1), + DateTime::createFromFormat('U', 1), $options['path'], $options['domain'], $options['secure'],
no need for I<I>n
diff --git a/plugin/Backup/Methods/Storagebox/InformationCollector/SidekickCollector.php b/plugin/Backup/Methods/Storagebox/InformationCollector/SidekickCollector.php index <HASH>..<HASH> 100644 --- a/plugin/Backup/Methods/Storagebox/InformationCollector/SidekickCollector.php +++ b/plugin/Backup/Methods/Storagebox/InformationCollector/SidekickCollector.php @@ -16,7 +16,7 @@ class SidekickCollector implements InformationCollector { * @return */ public function collect(InputInterface $input, OutputInterface $output, &$data) { - $databaseService = $data->getDatabase()->getService(); + $databaseService = $data->getBackup()->getServiceName(); $composeParser = $data->getComposeParser(); $service = $data->getService(); $composeData = $data->getComposeData();
fixed SidekickCollector using the Servicename from the database instead of the one from the backup.
diff --git a/bundles/org.eclipse.orion.client.core/web/edit/setup.js b/bundles/org.eclipse.orion.client.core/web/edit/setup.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.core/web/edit/setup.js +++ b/bundles/org.eclipse.orion.client.core/web/edit/setup.js @@ -177,12 +177,10 @@ exports.setUpEditor = function(isReadOnly){ var searcher = new mSearchClient.Searcher({serviceRegistry: serviceRegistry, commandService: commandService}); - var model = new mTextModel.TextModel(); - model = new mProjectionTextModel.ProjectionTextModel(model); var textViewFactory = function() { return new mTextView.TextView({ parent: editorDomNode, - model: model, + model: new mProjectionTextModel.ProjectionTextModel(new mTextModel.TextModel()), stylesheet: ["/orion/textview/textview.css", "/orion/textview/rulers.css", "/examples/textview/textstyler.css", "/css/default-theme.css", "/orion/editor/editor.css"],
fix model created outside of text view factory
diff --git a/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java b/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java +++ b/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java @@ -36,6 +36,12 @@ public interface DeploymentAspectManager /** Get the name for this aspect manager */ String getName(); + /** Get the optional parent for this manager */ + DeploymentAspectManager getParent(); + + /** Set the optional parent for this manager */ + void setParent(DeploymentAspectManager dam); + /** Get the ordered list of registered deployment aspects */ List<DeploymentAspect> getDeploymentAspects();
Use 'Pre' and 'Post' for JSE handling Move notion of parent to DAM instead of DAM intaller Revert container integration version back to snapshot Sort out commented requires, provides clauses
diff --git a/lib/support/cli.js b/lib/support/cli.js index <HASH>..<HASH> 100644 --- a/lib/support/cli.js +++ b/lib/support/cli.js @@ -530,7 +530,13 @@ module.exports.parseCommandLine = function parseCommandLine() { .option('processStartTime', { type: 'boolean', default: false, - describe: 'Capture browser process start time (in milliseconds).' + describe: + 'Capture browser process start time (in milliseconds). Android only for now.' + }) + .option('edge.edgedriverPath', { + describe: + 'To run Edge you need to supply the path to the msedgedriver that match your Egde version.', + group: 'edge' }) .option('safari.ios', { default: false,
Added Egde to the cli
diff --git a/tests/integration/boxscore/test_nba_boxscore.py b/tests/integration/boxscore/test_nba_boxscore.py index <HASH>..<HASH> 100644 --- a/tests/integration/boxscore/test_nba_boxscore.py +++ b/tests/integration/boxscore/test_nba_boxscore.py @@ -165,14 +165,12 @@ class TestNBABoxscore: assert df1.empty def test_nba_boxscore_players(self): - boxscore = Boxscore(BOXSCORE) - - assert len(boxscore.home_players) == 13 - assert len(boxscore.away_players) == 13 + assert len(self.boxscore.home_players) == 13 + assert len(self.boxscore.away_players) == 13 - for player in boxscore.home_players: + for player in self.boxscore.home_players: assert not player.dataframe.empty - for player in boxscore.away_players: + for player in self.boxscore.away_players: assert not player.dataframe.empty
Fix NBA Boxscore integration tests The NBA Boxscore integration tests randomly started failing while attempting to create an instance of the Boxscore class. The issue is now resolved, allowing the tests to complete as expected again.
diff --git a/Neos.Neos/Classes/Controller/Backend/MenuHelper.php b/Neos.Neos/Classes/Controller/Backend/MenuHelper.php index <HASH>..<HASH> 100644 --- a/Neos.Neos/Classes/Controller/Backend/MenuHelper.php +++ b/Neos.Neos/Classes/Controller/Backend/MenuHelper.php @@ -164,7 +164,10 @@ class MenuHelper } $this->moduleListFirstLevelCache[$moduleName] = array_merge( $this->collectModuleData($controllerContext, $moduleName, $moduleConfiguration, $moduleName), - ['group' => $moduleName, 'submodules' => $submodules] + [ + 'group' => $moduleName, + 'submodules' => (new PositionalArraySorter($submodules))->toArray(), + ] ); } @@ -217,7 +220,8 @@ class MenuHelper 'label' => $moduleConfiguration['label'] ?? '', 'description' => $moduleConfiguration['description'] ?? '', 'icon' => $icon, - 'hideInMenu' => (bool)($moduleConfiguration['hideInMenu'] ?? false) + 'hideInMenu' => (bool)($moduleConfiguration['hideInMenu'] ?? false), + 'position' => $moduleConfiguration['position'] ?? null, ]; } }
FEATURE: Allow setting the position of backend modules This change only makes it possible for the menu when displayed inside backend modules other than the content module. The content module needs an additional change in the Neos.UI. Relates: #<I>
diff --git a/backup/util/helper/backup_cron_helper.class.php b/backup/util/helper/backup_cron_helper.class.php index <HASH>..<HASH> 100644 --- a/backup/util/helper/backup_cron_helper.class.php +++ b/backup/util/helper/backup_cron_helper.class.php @@ -512,7 +512,8 @@ abstract class backup_cron_automated_helper { // MDL-33531: use different filenames depending on backup_shortname option if ( !empty($config->backup_shortname) ) { - $courseref = $course->shortname; + $context = get_context_instance(CONTEXT_COURSE, $course->id); + $courseref = format_string($course->shortname, true, array('context' => $context)); $courseref = str_replace(' ', '_', $courseref); $courseref = textlib::strtolower(trim(clean_filename($courseref), '_')); } else {
MDL-<I> backup Added format_string to course shortname
diff --git a/lib/grape-markdown/route.rb b/lib/grape-markdown/route.rb index <HASH>..<HASH> 100644 --- a/lib/grape-markdown/route.rb +++ b/lib/grape-markdown/route.rb @@ -36,7 +36,7 @@ module GrapeMarkdown end def list? - %w(GET POST).include?(route_method) && !route_path.include?(':id') + route_method == 'GET' && !route_path.include?(':id') end def route_binding
Why was POST considered a list endpoint?
diff --git a/packages/@vue/cli/lib/GeneratorAPI.js b/packages/@vue/cli/lib/GeneratorAPI.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli/lib/GeneratorAPI.js +++ b/packages/@vue/cli/lib/GeneratorAPI.js @@ -283,7 +283,7 @@ class GeneratorAPI { this._injectFileMiddleware(async (files) => { const data = this._resolveData(additionalData) const globby = require('globby') - const _files = await globby(['**/*'], { cwd: source }) + const _files = await globby(['**/*'], { cwd: source, dot: true }) for (const rawPath of _files) { const targetPath = rawPath.split('/').map(filename => { // dotfiles are ignored when published to npm, therefore in templates
feat: make globby includes dot files (#<I>) <URL>
diff --git a/library/Garp/Db/Table/Row.php b/library/Garp/Db/Table/Row.php index <HASH>..<HASH> 100755 --- a/library/Garp/Db/Table/Row.php +++ b/library/Garp/Db/Table/Row.php @@ -46,6 +46,16 @@ class Garp_Db_Table_Row extends Zend_Db_Table_Row_Abstract { return $props; } + public function __wakeup() { + parent::__wakeup(); + + // Immediately connect the row again, to not be bothered + // by "Cannot save row unless it is connected". + if ($this->_tableClass) { + $this->setTable(new $this->_tableClass); + } + } + /** * ATTENTION: * This code is copied and altered from Zend_Db_Table_Abstract::findManyToManyRowset().
Change wakeup to connect after unserialization
diff --git a/webapi_tests/setup.py b/webapi_tests/setup.py index <HASH>..<HASH> 100644 --- a/webapi_tests/setup.py +++ b/webapi_tests/setup.py @@ -6,7 +6,7 @@ from setuptools import setup from setuptools import find_packages PACKAGE_VERSION = '0.1' -deps = ['marionette_client==0.7.1', +deps = ['marionette_client>=0.7.1.1', 'marionette_extension >= 0.1', 'moznetwork>=0.24', 'tornado>=3.2',
Upgrade marionette dependency to above <I> This contains the wait module which is needed by some tests.
diff --git a/openpnm/algorithms/NernstPlanckMultiphysics.py b/openpnm/algorithms/NernstPlanckMultiphysics.py index <HASH>..<HASH> 100644 --- a/openpnm/algorithms/NernstPlanckMultiphysics.py +++ b/openpnm/algorithms/NernstPlanckMultiphysics.py @@ -124,7 +124,7 @@ class NernstPlanckMultiphysics(GenericAlgorithm): phase.update(e.results()) # Poisson eq - phys[0].regenerate_models() + [x.regenerate_models() for x in phys] g_old[p_alg.name] = p_alg[p_alg.settings['quantity']].copy() p_alg._run_reactive(x0=g_old[p_alg.name]) g_new[p_alg.name] = p_alg[p_alg.settings['quantity']].copy() @@ -133,7 +133,7 @@ class NernstPlanckMultiphysics(GenericAlgorithm): g_old[p_alg.name]**2 - g_new[p_alg.name]**2)) # Update phase and physics phase.update(p_alg.results()) - phys[0].regenerate_models() + [x.regenerate_models() for x in phys] if g_convergence: print('Solution converged')
regenerate all phys attached to the project
diff --git a/melody.go b/melody.go index <HASH>..<HASH> 100644 --- a/melody.go +++ b/melody.go @@ -232,6 +232,16 @@ func (m *Melody) BroadcastOthers(msg []byte, s *Session) error { }) } +// BroadcastMultiple broadcasts a text message to multiple sessions given in the sessions slice. +func (m *Melody) BroadcastMultiple(msg []byte, sessions []*Session) error { + return m.BroadcastFilter(msg, func(q *Session) bool { + for _, sess := range sessions { + return sess == q + } + return false + }) +} + // BroadcastBinary broadcasts a binary message to all sessions. func (m *Melody) BroadcastBinary(msg []byte) error { if m.hub.closed() {
Add convenience function to broadcast to multiple sessions
diff --git a/mqlight/src/main/java/com/ibm/mqlight/api/impl/NonBlockingClientImpl.java b/mqlight/src/main/java/com/ibm/mqlight/api/impl/NonBlockingClientImpl.java index <HASH>..<HASH> 100644 --- a/mqlight/src/main/java/com/ibm/mqlight/api/impl/NonBlockingClientImpl.java +++ b/mqlight/src/main/java/com/ibm/mqlight/api/impl/NonBlockingClientImpl.java @@ -1210,6 +1210,7 @@ public class NonBlockingClientImpl extends NonBlockingClient implements FSMActio externalState = ClientState.RETRYING; clientListener.onRetrying(callbackService, stoppedByUser ? null : lastException); + lastException = null; logger.exit(this, methodName); }
Ensure correct exception reported after a new state change
diff --git a/wasync/src/main/java/org/atmosphere/wasync/transport/TransportsUtil.java b/wasync/src/main/java/org/atmosphere/wasync/transport/TransportsUtil.java index <HASH>..<HASH> 100644 --- a/wasync/src/main/java/org/atmosphere/wasync/transport/TransportsUtil.java +++ b/wasync/src/main/java/org/atmosphere/wasync/transport/TransportsUtil.java @@ -80,7 +80,7 @@ public class TransportsUtil { public static Object matchDecoder(Event e, Object instanceType, List<Decoder<? extends Object, ?>> decoders) { for (Decoder d : decoders) { Class<?>[] typeArguments = TypeResolver.resolveArguments(d.getClass(), Decoder.class); - if (instanceType != null && typeArguments.length > 0 && typeArguments[0].equals(instanceType.getClass())) { + if (instanceType != null && typeArguments.length > 0 && typeArguments[0].isAssignableFrom(instanceType.getClass())) { boolean replay = ReplayDecoder.class.isAssignableFrom(d.getClass()); logger.trace("{} is trying to decode {}", d, instanceType);
Proper resolving decoder
diff --git a/src/ConnectHollandSuluBlockBundle.php b/src/ConnectHollandSuluBlockBundle.php index <HASH>..<HASH> 100644 --- a/src/ConnectHollandSuluBlockBundle.php +++ b/src/ConnectHollandSuluBlockBundle.php @@ -23,6 +23,8 @@ class ConnectHollandSuluBlockBundle extends Bundle */ public function boot() { + $rootDirectory = $this->container->get('kernel')->getRootDir(); + $this->registerStream($rootDirectory); $this->container->get('twig')->getLoader()->addPath($this->getPath().'/Resources/views', 'sulu-block-bundle'); parent::boot();
Fix container building Sometimes the Kernel only boots and is not build, so partially revert 1a<I>ac7a8be7b<I>a<I>a<I>e3c<I>a3a<I>.
diff --git a/base.php b/base.php index <HASH>..<HASH> 100644 --- a/base.php +++ b/base.php @@ -45,7 +45,7 @@ final class Base extends Prefab implements ArrayAccess { //@{ Framework details const PACKAGE='Fat-Free Framework', - VERSION='3.7.3-Release'; + VERSION='3.7.4-Dev'; //@} //@{ HTTP status codes (RFC 2616) @@ -1376,7 +1376,7 @@ final class Base extends Prefab implements ArrayAccess { if ($this->hive['CLI']) echo PHP_EOL.'==================================='.PHP_EOL. 'ERROR '.$error['code'].' - '.$error['status'].PHP_EOL. - $error['text'].PHP_EOL.PHP_EOL.$error['trace']; + $error['text'].PHP_EOL.PHP_EOL.(isset($error['trace']) ?: ''); else echo $this->hive['AJAX']? json_encode($error):
fix: trace not present in error handler when in CLI mode and !DEBUG, #<I>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -228,7 +228,7 @@ setup( packages=find_packages(), package_data={'ugali': ['data/catalog.tgz']}, description="Ultra-faint galaxy likelihood toolkit.", - long_description=read('README.md'), + long_description="See README on %s"%URL, platforms='any', classifiers = [_f for _f in CLASSIFIERS.split('\n') if _f] )
Replaced long_description with link to github
diff --git a/amino/either.py b/amino/either.py index <HASH>..<HASH> 100644 --- a/amino/either.py +++ b/amino/either.py @@ -28,6 +28,16 @@ class Either(Generic[A, B], Implicits, implicits=True): else: return Left('{} has no attribute {}'.format(mod, name)) + @staticmethod + def import_path(path): + from amino.list import List + return ( + List.wrap(path.rsplit('.', 1)) + .lift_all(0, 1) + .to_either('invalid module path: {}'.format(path)) + .flat_map2(Either.import_name) + ) + @property def is_right(self): return boolean.Boolean(isinstance(self, Right))
`Either.import_path`
diff --git a/tests/Feature/BuiltInSearchTest.php b/tests/Feature/BuiltInSearchTest.php index <HASH>..<HASH> 100644 --- a/tests/Feature/BuiltInSearchTest.php +++ b/tests/Feature/BuiltInSearchTest.php @@ -26,7 +26,6 @@ class BuiltInSearchTest extends TestCase Config::set('larecipe.search.enabled', true); Config::set('larecipe.search.default', 'internal'); - $this->withoutExceptionHandling(); $this->get('/docs/search-index/1.0') ->assertStatus(200) ->assertJsonStructure([ @@ -36,7 +35,5 @@ class BuiltInSearchTest extends TestCase 'headings' ] ]); - - $this->assertTrue(true); } }
Update BuiltInSearchTest.php
diff --git a/molgenis-omx-protocolmanager/src/main/java/org/molgenis/omx/workflow/WorkflowServiceImpl.java b/molgenis-omx-protocolmanager/src/main/java/org/molgenis/omx/workflow/WorkflowServiceImpl.java index <HASH>..<HASH> 100644 --- a/molgenis-omx-protocolmanager/src/main/java/org/molgenis/omx/workflow/WorkflowServiceImpl.java +++ b/molgenis-omx-protocolmanager/src/main/java/org/molgenis/omx/workflow/WorkflowServiceImpl.java @@ -273,8 +273,6 @@ public class WorkflowServiceImpl implements WorkflowService List<ObservedValue> observedValues = database.find(ObservedValue.class, new QueryRule( ObservedValue.OBSERVATIONSET, EQUALS, observationSet), new QueryRule(AND), new QueryRule( ObservedValue.FEATURE, EQUALS, observableFeature)); - if (observedValues.size() > 1) throw new RuntimeException( - "expected exactly one value for a row/column combination"); String colName = "key"; KeyValueTuple tuple = new KeyValueTuple(); @@ -311,6 +309,8 @@ public class WorkflowServiceImpl implements WorkflowService observedValue.setValue(value); database.add(observedValue); } + else if (observedValues.size() > 1) throw new RuntimeException( + "expected exactly one value for a row/column combination"); else { Value value = observedValues.get(0).getValue();
bug fix: perform size check of after null check
diff --git a/src/Generator/Writer/Model/Steps/StubReplaceAccessorsAndMutators.php b/src/Generator/Writer/Model/Steps/StubReplaceAccessorsAndMutators.php index <HASH>..<HASH> 100644 --- a/src/Generator/Writer/Model/Steps/StubReplaceAccessorsAndMutators.php +++ b/src/Generator/Writer/Model/Steps/StubReplaceAccessorsAndMutators.php @@ -33,7 +33,13 @@ class StubReplaceAccessorsAndMutators extends AbstractProcessStep $parameterString = implode(', ', $parameters); } - $replace .= $this->tab() . "public function get" . studly_case($name) . "Attribute({$parameterString})\n" + $methodSignature = "public function " + . (array_get($accessor, 'mutator') ? 'set' : 'get') + . studly_case($name) + . "Attribute" + . "({$parameterString})"; + + $replace .= $this->tab() . $methodSignature . "\n" . $this->tab() . "{\n" . $accessor['content'] . $this->tab() . "}\n"
allowed accessors to set mutators with a boolean 'mutator' flag
diff --git a/spyderlib/widgets/sourcecode/syntaxhighlighters.py b/spyderlib/widgets/sourcecode/syntaxhighlighters.py index <HASH>..<HASH> 100644 --- a/spyderlib/widgets/sourcecode/syntaxhighlighters.py +++ b/spyderlib/widgets/sourcecode/syntaxhighlighters.py @@ -337,7 +337,7 @@ class PythonSH(BaseSH): title = title.lstrip("#% ") if title.startswith("<codecell>"): title = title[10:].lstrip() - if title.startswith("In["): + elif title.startswith("In["): title = title[3:].rstrip("]:") oedata = OutlineExplorerData() oedata.text = title
elif is clearer here
diff --git a/lib/async.js b/lib/async.js index <HASH>..<HASH> 100644 --- a/lib/async.js +++ b/lib/async.js @@ -886,7 +886,7 @@ } workers += 1; var cb = only_once(_next(q, tasks)); - async.setImmediate(worker(data, cb)); + worker(data, cb); } } },
fix tests in node <I>
diff --git a/javascript/dashboards.js b/javascript/dashboards.js index <HASH>..<HASH> 100644 --- a/javascript/dashboards.js +++ b/javascript/dashboards.js @@ -90,6 +90,7 @@ } }, draggable: { + handle: '.dashlet-title h3', stop: function(e, i) { /* * If objects have changed position, cycle through all changed objects
Use a drag handle for dashlets istead of whole dashlet
diff --git a/iaas/amazonec2/amazonec2.go b/iaas/amazonec2/amazonec2.go index <HASH>..<HASH> 100644 --- a/iaas/amazonec2/amazonec2.go +++ b/iaas/amazonec2/amazonec2.go @@ -1,12 +1,11 @@ package amazonec2 import ( + "context" "encoding/json" "fmt" "io/ioutil" - "context" - "github.com/docker/machine/drivers/amazonec2" "github.com/docker/machine/libmachine" "github.com/docker/machine/libmachine/drivers/rpc" @@ -145,8 +144,5 @@ func (p *Provider) CreateMachine() (machine *iaas.Machine, err error) { func (p *Provider) DeleteMachine() (err error) { err = p.Host.Driver.Remove() defer p.Client.Close() - if err != nil { - return - } return }
iaas/amazonec2/amazonec2: Fixed context import and return into deleteMachine. (#<I>)
diff --git a/cachalot/monkey_patch.py b/cachalot/monkey_patch.py index <HASH>..<HASH> 100644 --- a/cachalot/monkey_patch.py +++ b/cachalot/monkey_patch.py @@ -1,3 +1,4 @@ +import re from collections.abc import Iterable from functools import wraps from time import time @@ -21,6 +22,13 @@ from .utils import ( WRITE_COMPILERS = (SQLInsertCompiler, SQLUpdateCompiler, SQLDeleteCompiler) +SQL_DATA_CHANGE_RE = re.compile( + '|'.join([ + fr'(\W|\A){re.escape(keyword)}(\W|\Z)' + for keyword in ['update', 'insert', 'delete', 'alter', 'create', 'drop'] + ]), + flags=re.IGNORECASE, +) def _unset_raw_connection(original): def inner(compiler, *args, **kwargs): @@ -133,9 +141,7 @@ def _patch_cursor(): if isinstance(sql, bytes): sql = sql.decode('utf-8') sql = sql.lower() - if 'update' in sql or 'insert' in sql or 'delete' in sql \ - or 'alter' in sql or 'create' in sql \ - or 'drop' in sql: + if SQL_DATA_CHANGE_RE.search(sql): tables = filter_cachable( _get_tables_from_sql(connection, sql)) if tables:
table invalidation condition enhanced (#<I>)
diff --git a/modules/logging.js b/modules/logging.js index <HASH>..<HASH> 100644 --- a/modules/logging.js +++ b/modules/logging.js @@ -11,8 +11,21 @@ module.exports = { initMaster: function(config) { var logStream = process.stdout; - if(config.logging && config.logging.logFile) - logStream = fs.createWriteStream(config.logging.logFile, {'flags': 'a'}); + var watcher; + if(config.logging && config.logging.logFile) { + function openLogFile() { + logStream = fs.createWriteStream(config.logging.logFile, {'flags': 'a'}); + logStream.on('open', function() { + watcher = fs.watch(config.logging.logFile, function(action, filename) { + if(action == 'rename') { + watcher.close(); + openLogFile(); + } + }); + }); + } + openLogFile(); + } process.on('msg:log', function(data) { var str = JSON.stringify(data) + "\n";
Detect log file renaming and reopen log file. (for log rotation)
diff --git a/summary/__init__.py b/summary/__init__.py index <HASH>..<HASH> 100644 --- a/summary/__init__.py +++ b/summary/__init__.py @@ -205,14 +205,16 @@ class Summary(object): stream = response.iter_content(config.CHUNK_SIZE) # , decode_unicode=True response.stream = stream while True: - chunk = next(stream) - self._html += chunk - tag = find_tag(tag_name) - if tag: - return tag - if len(self._html) > config.HTML_MAX_BYTESIZE: - raise HTMLParseError('Maximum response size reached.') - response.consumed = True + try: + chunk = next(stream) + self._html += chunk + tag = find_tag(tag_name) + if tag: + return tag + if len(self._html) > config.HTML_MAX_BYTESIZE: + raise HTMLParseError('Maximum response size reached.') + except StopIteration: + response.consumed = True tag = find_tag(tag_name) return decode(tag, encoding) # decode here
Properly iterate stream response content.
diff --git a/test/tests.js b/test/tests.js index <HASH>..<HASH> 100644 --- a/test/tests.js +++ b/test/tests.js @@ -1,7 +1,7 @@ var assert = require("assert"); var hasOwn = Object.prototype.hasOwnProperty; -describe("import statements", function () { +describe("import declarations", function () { it("should work in nested scopes", function () { import { name, id } from "./name"; assert.strictEqual(name, "name.js"); @@ -40,7 +40,7 @@ describe("import statements", function () { }); }); -describe("export statements", function () { +describe("export declarations", function () { it("should allow * exports", function () { import def, { a, b, c as d, @@ -82,7 +82,7 @@ describe("export statements", function () { assert.strictEqual(si, "cee"); }); - it("should be able to contain import statements", function () { + it("should be able to contain import declarations", function () { import { outer } from "./nested"; assert.deepEqual(outer(), ["a", "b", "c"]); });
Update statement/declaration terminology in test code.
diff --git a/loggers/FileLogger.php b/loggers/FileLogger.php index <HASH>..<HASH> 100644 --- a/loggers/FileLogger.php +++ b/loggers/FileLogger.php @@ -7,6 +7,15 @@ use mpf\WebApp; class FileLogger extends Logger{ + public $visibleLevels = array( + Levels::EMERGENCY, + Levels::CRITICAL, + Levels::ALERT, + Levels::ERROR, + Levels::WARNING, + Levels::NOTICE, + Levels::INFO + ); /** * Path for file where to save the logs * Can use key words like {MODULE}, {CONTROLLER} for web apps and {APP_ROOT} for all. @@ -71,7 +80,7 @@ class FileLogger extends Logger{ } } } - if (false === @file_put_contents($this->_path, $details . "\n")){ + if (false === @file_put_contents($this->_path, $details . "\n", FILE_APPEND)){ $this->_writeFailure = true; } }
Removed debug from logs. Logs are now appended to old file.
diff --git a/tests/lib/test-papi-functions-filters.php b/tests/lib/test-papi-functions-filters.php index <HASH>..<HASH> 100644 --- a/tests/lib/test-papi-functions-filters.php +++ b/tests/lib/test-papi-functions-filters.php @@ -26,21 +26,6 @@ class WP_Papi_Functions_Filters extends WP_UnitTestCase { } /** - * Test _papi_body_class. - * - * @since 1.0.0 - */ - - public function test_papi_body_class() { - global $post; - $post = get_post( $this->post_id ); - $page_type = add_post_meta( $post->ID, '_papi_page_type', 'simple-page-type' ); - $arr = apply_filters( 'body_class', array() ); - tests_add_filter( 'body_class', '_papi_body_class' ); - $this->assertTrue( in_array( 'simple-page-type', $arr ) ); - } - - /** * Test _papi_filter_default_sort_order. * * @since 1.0.0
Removing body class test since it aint working correct
diff --git a/packages/vaex-core/vaex/cpu.py b/packages/vaex-core/vaex/cpu.py index <HASH>..<HASH> 100644 --- a/packages/vaex-core/vaex/cpu.py +++ b/packages/vaex-core/vaex/cpu.py @@ -334,7 +334,10 @@ class TaskPartAggregations: N = i2 - i1 if filter_mask is not None: - N = filter_mask.astype(np.uint8).sum() + if blocks: + N = len(blocks[0]) + else: + N == filter_mask.sum() blocks = [array_types.to_numpy(block, strict=False) for block in blocks] for block in blocks: assert len(block) == N, f'Oops, got a block of length {len(block)} while it is expected to be of length {N} (at {i1}-{i2}, filter={filter_mask is not None})'
perf: avoid counting filtered rows
diff --git a/src/com/opera/core/systems/WaitState.java b/src/com/opera/core/systems/WaitState.java index <HASH>..<HASH> 100644 --- a/src/com/opera/core/systems/WaitState.java +++ b/src/com/opera/core/systems/WaitState.java @@ -92,7 +92,7 @@ public class WaitState { private Response response; private boolean seen; private long remainingIdleTimeout; - private DesktopWindowInfo desktopWindowInfo; // No idea if this is right but it will + private DesktopWindowInfo desktopWindowInfo; private QuickMenuInfo quickMenuInfo; private QuickMenuID quickMenuId; private QuickMenuItemID quickMenuItemID;
Not sure what this comment was meant to serve for
diff --git a/application/Controllers/Checks.php b/application/Controllers/Checks.php index <HASH>..<HASH> 100644 --- a/application/Controllers/Checks.php +++ b/application/Controllers/Checks.php @@ -7,6 +7,15 @@ use CodeIgniter\I18n\Time; use CodeIgniter\Model; use Config\Database; +/** + * NOTE: This is not a valid file for actual tests. + * This file came about as a small testbed I was using that + * accidentally got committed. It will be removed prior to release + * If you commit any changes to this file, it should be accompanied + * by actual tests also. + * + * @package App\Controllers + */ class Checks extends Controller { use ResponseTrait;
[ci_skip] Quick note to the Checks controller
diff --git a/symphony/assets/symphony.duplicator.js b/symphony/assets/symphony.duplicator.js index <HASH>..<HASH> 100644 --- a/symphony/assets/symphony.duplicator.js +++ b/symphony/assets/symphony.duplicator.js @@ -224,8 +224,14 @@ var header = template.find(settings.headers).addClass('header'); var option = widgets.selector.append('<option />') .find('option:last'); - - option.text(header.text()).val(position); + + var header_children = header.children(); + if (header_children.length) { + header_text = header.get(0).childNodes[0].nodeValue + ' (' + header_children.filter(':eq(0)').text() + ')'; + } else { + header_text = header.text(); + } + option.text(header_text).val(position); templates.push(template.removeClass('template')); });
When building dropdown list options for a duplicator, if the heading contains child elements put this text in brackets. [Closes Issue #<I>]
diff --git a/lib/deas/version.rb b/lib/deas/version.rb index <HASH>..<HASH> 100644 --- a/lib/deas/version.rb +++ b/lib/deas/version.rb @@ -1,3 +1,3 @@ module Deas - VERSION = "0.14.1" + VERSION = "0.15.0" end
version to <I> * make the Deas logger available in the template scope (#<I>) * have the test runner `halt` return a `HaltArgs` class for use in testing (#<I>)
diff --git a/PhpCheckstyle/src/PHPCheckstyle.php b/PhpCheckstyle/src/PHPCheckstyle.php index <HASH>..<HASH> 100644 --- a/PhpCheckstyle/src/PHPCheckstyle.php +++ b/PhpCheckstyle/src/PHPCheckstyle.php @@ -2214,9 +2214,12 @@ class PHPCheckstyle { || $nextTokenText == ".="); // Check the following token - $nextTokenInfo = $this->tokenizer->peekNextValidToken($nextTokenInfo->position); - $nextTokenText = $this->tokenizer->extractTokenText($nextTokenInfo->token); - $isSearchResult = in_array($nextTokenText, $this->_config->getTestItems('strictCompare')); + $isSearchResult = false; + if ($this->_isActive('strictCompare')) { + $nextTokenInfo = $this->tokenizer->peekNextValidToken($nextTokenInfo->position); + $nextTokenText = $this->tokenizer->extractTokenText($nextTokenInfo->token); + $isSearchResult = in_array($nextTokenText, $this->_config->getTestItems('strictCompare')); + } // Check if the variable has already been met if (empty($this->_variables[$text]) && !in_array($text, $this->_systemVariables)) {
Issue <I>: New Rule : Use of "==" in strpos
diff --git a/core/src/main/java/smile/regression/OLS.java b/core/src/main/java/smile/regression/OLS.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/smile/regression/OLS.java +++ b/core/src/main/java/smile/regression/OLS.java @@ -177,6 +177,10 @@ public class OLS implements Regression<double[]> { int n = x.length; p = x[0].length; + + if (n <= p) { + throw new IllegalArgumentException(String.format("The input matrix is not over determined: %d rows, %d columns", n, p)); + } // weights and intercept double[] w1 = new double[p+1]; diff --git a/core/src/main/java/smile/regression/RidgeRegression.java b/core/src/main/java/smile/regression/RidgeRegression.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/smile/regression/RidgeRegression.java +++ b/core/src/main/java/smile/regression/RidgeRegression.java @@ -189,6 +189,11 @@ public class RidgeRegression implements Regression<double[]> { int n = x.length; p = x[0].length; + + if (n <= p) { + throw new IllegalArgumentException(String.format("The input matrix is not over determined: %d rows, %d columns", n, p)); + } + ym = Math.mean(y); center = Math.colMean(x);
add early detection of input matrix size for linear and ridge regression
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -85,7 +85,7 @@ function scopedChain(parent) { title = prefix ? prefix.join(' ') : null; var targetArgs = title ? [title] : []; targetArgs = fn ? targetArgs.concat(fn) : targetArgs; - return target.apply(target, [title, fn]); + return target.apply(target, targetArgs); }); return chain.test; diff --git a/spec/test.js b/spec/test.js index <HASH>..<HASH> 100644 --- a/spec/test.js +++ b/spec/test.js @@ -1,10 +1,22 @@ 'use strict'; var test = require('../'); +test.beforeEach(function (t) { + t.context.test = 'test'; +}); + +test(function (t) { + t.is(true, true); +}); + test('is compatible with ava', function (t) { t.is(true, true); }); +test('is compatible with ava context', function (t) { + t.true(t.context.test === 'test'); +}); + test.describe('describe', function (test) { test('can be used to nest tests', function (t) { t.is(true, true);
Prevent exception when using beforeEach (#4)
diff --git a/js/exx.js b/js/exx.js index <HASH>..<HASH> 100644 --- a/js/exx.js +++ b/js/exx.js @@ -196,10 +196,10 @@ module.exports = class exx extends Exchange { const ids = Object.keys (response); for (let i = 0; i < ids.length; i++) { const id = ids[i]; - if (!(id in this.marketsById)) { + if (!(id in this.markets_by_id)) { continue; } - const market = this.marketsById[id]; + const market = this.markets_by_id[id]; const symbol = market['symbol']; const ticker = { 'date': timestamp,
exx marketsById → markets_by_id #<I>
diff --git a/src/GitHub_Updater/API.php b/src/GitHub_Updater/API.php index <HASH>..<HASH> 100644 --- a/src/GitHub_Updater/API.php +++ b/src/GitHub_Updater/API.php @@ -211,7 +211,7 @@ abstract class API extends Base { } // Allows advanced caching plugins to control REST transients to avoid double caching - if ( false === apply_filters( 'ghu_use_remote_call_transients', true, $id, $response ) ) { + if ( false === apply_filters( 'ghu_use_remote_call_transients', true ) ) { return false; } return get_site_transient( $transient );
fix notices from vars that don't exist
diff --git a/lib/loglevel.js b/lib/loglevel.js index <HASH>..<HASH> 100644 --- a/lib/loglevel.js +++ b/lib/loglevel.js @@ -35,7 +35,7 @@ if (method.bind === undefined) { if (Function.prototype.bind === undefined) { return function() { - method.apply(console, arguments); + Function.prototype.apply.apply(method, [console, arguments]); }; } else { return Function.prototype.bind.call(console[methodName], console);
Transformed apply() to make it work in IE8's with weird callable object console methods. Fixes #<I>, fixes #<I>.
diff --git a/tests/unit/deprecate-test.js b/tests/unit/deprecate-test.js index <HASH>..<HASH> 100644 --- a/tests/unit/deprecate-test.js +++ b/tests/unit/deprecate-test.js @@ -9,14 +9,14 @@ let originalEnvValue; let originalDeprecateHandler; module('ember-debug', { - setup() { + beforeEach() { originalEnvValue = Ember.ENV.RAISE_ON_DEPRECATION; originalDeprecateHandler = HANDLERS.deprecate; Ember.ENV.RAISE_ON_DEPRECATION = true; }, - teardown() { + afterEach() { HANDLERS.deprecate = originalDeprecateHandler; Ember.ENV.RAISE_ON_DEPRECATION = originalEnvValue;
Replace legacy QUnit 1.x API with 2.x version. After the general dependency updates done recently we are pulling in QUnit 2.x which no longer supports `setup` and `teardown`.
diff --git a/src/CloudApi/Client.php b/src/CloudApi/Client.php index <HASH>..<HASH> 100644 --- a/src/CloudApi/Client.php +++ b/src/CloudApi/Client.php @@ -313,7 +313,7 @@ class Client extends GuzzleClient /** * @param string $id - * @param string $domains + * @param array $domains * @return StreamInterface */ public function purgeVarnishCache($id, $domains)
Changes type hinting on domains.
diff --git a/lib/Core/Persistence/Doctrine/Layout/Handler.php b/lib/Core/Persistence/Doctrine/Layout/Handler.php index <HASH>..<HASH> 100644 --- a/lib/Core/Persistence/Doctrine/Layout/Handler.php +++ b/lib/Core/Persistence/Doctrine/Layout/Handler.php @@ -666,7 +666,7 @@ class Handler implements LayoutHandlerInterface $nextBlockPosition = $this->getNextBlockPosition( $block->layoutId, - $block->zoneIdentifier, + $zoneIdentifier, $status );
Fix exception in some cases when moving the block to zone
diff --git a/NamedBuilderBagTest.php b/NamedBuilderBagTest.php index <HASH>..<HASH> 100644 --- a/NamedBuilderBagTest.php +++ b/NamedBuilderBagTest.php @@ -11,7 +11,6 @@ namespace ONGR\ElasticsearchBundle\Tests\Unit\DSL; - use ONGR\ElasticsearchBundle\DSL\NamedBuilderBag; use ONGR\ElasticsearchBundle\DSL\NamedBuilderInterface;
Changed warmer parameter from connection to manager
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -335,8 +335,8 @@ function vuCoin(host, port, authenticated, withSignature, intialized){ dealMerkle(ResultTypes.Voting, '/registry/amendment/' + number + '/' + algo + '/voters/out', opts, done); }, - flow: function (number, algo, done) { - getVote('/registry/amendment/' + number + '/' + algo + '/flow', done); + statement: function (number, algo, done) { + getVote('/registry/amendment/' + number + '/' + algo + '/statement', done); }, vote: function (number, algo, done) {
Renaming 'flow' to 'statement'
diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -122,7 +122,12 @@ module Jekyll # # Returns the path to the source file def path - self.data.fetch('path', File.join(@dir, @name).sub(/\A\//, '')) + self.data.fetch('path', self.relative_path.sub(/\A\//, '')) + end + + # The path to the page source file, relative to the site source + def relative_path + File.join(@dir, @name) end # Obtain destination path. diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -124,7 +124,12 @@ module Jekyll # # Returns the path to the file relative to the site source def path - self.data.fetch('path', File.join(@dir, '_posts', @name).sub(/\A\//, '')) + self.data.fetch('path', self.relative_path.sub(/\A\//, '')) + end + + # The path to the post source file, relative to the site source + def relative_path + File.join(@dir, '_posts', @name) end # Compares Post objects. First compares the Post date. If the dates are
Post + Page: extract real path retrieval into separate method (@parkr)
diff --git a/lib/muack.rb b/lib/muack.rb index <HASH>..<HASH> 100644 --- a/lib/muack.rb +++ b/lib/muack.rb @@ -48,12 +48,14 @@ module Muack end end - class Unexpected < RuntimeError + class Unexpected < Exception + attr_reader :expected, :was def initialize obj, defi, args - super( - "\nExpected: #{obj.inspect}.#{defi.message}(#{defi.args.map(&:inspect).join(', ')})\n" \ - " but was: #{obj.inspect}.#{defi.message}(#{args.map(&:inspect).join(', ')})" - ) + @expected = "#{obj.inspect}.#{defi.message}(" \ + "#{defi.args.map(&:inspect).join(', ')})" + @was = "#{obj.inspect}.#{defi.message}(" \ + "#{args.map(&:inspect).join(', ')})" + super("\nExpected: #{expected}\n but was: #{was})") end end end
make Unexpected an Exception to avoid rescued wrongly, and ezer to test
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,8 @@ try: stringify_py('images', 'tk_tools/images.py') except NameError: print('warning: stringify not present at time of install,' - ' you may wish to run this script again') + ' you may wish to run this script if tk_tools.images' + ' needs to be regenerated') setup( name='tk_tools',
Updating error that occurs when 'stringify' is not installed during run of setup.py
diff --git a/angular-hal.js b/angular-hal.js index <HASH>..<HASH> 100644 --- a/angular-hal.js +++ b/angular-hal.js @@ -217,6 +217,7 @@ angular case 2: if (res.data) return createResource(href, options, res.data); if (res.headers('Content-Location')) return res.headers('Content-Location'); + if (res.headers('Location')) return res.headers('Location'); return null; default:
add support to HTTP Response Header Location
diff --git a/src/GrumPHP/Task/Phpunit.php b/src/GrumPHP/Task/Phpunit.php index <HASH>..<HASH> 100644 --- a/src/GrumPHP/Task/Phpunit.php +++ b/src/GrumPHP/Task/Phpunit.php @@ -57,7 +57,7 @@ class Phpunit extends AbstractExternalTask )); if ($config['config_file']) { - $this->processBuilder->add('-c' . $config['config_file']); + $this->processBuilder->add('--configuration=' . $config['config_file']); } $process = $this->processBuilder->getProcess();
Fixed a problem when running phpunit in Symfony, throwing exceptions with the message 'Unable to guess the Kernel directory.'
diff --git a/SearchEndpoint/AggregationsEndpoint.php b/SearchEndpoint/AggregationsEndpoint.php index <HASH>..<HASH> 100644 --- a/SearchEndpoint/AggregationsEndpoint.php +++ b/SearchEndpoint/AggregationsEndpoint.php @@ -40,7 +40,7 @@ class AggregationsEndpoint implements SearchEndpointInterface */ public function normalize(NormalizerInterface $normalizer, $format = null, array $context = []) { - if (!empty($this->bag->all())) { + if (count($this->bag->all()) > 0) { return $this->bag->toArray(); } }
AggregationsEndpoint is now using count() instead of empty()
diff --git a/lyrics.py b/lyrics.py index <HASH>..<HASH> 100644 --- a/lyrics.py +++ b/lyrics.py @@ -689,13 +689,13 @@ def run_mp(filename): audiofile.tag.save() return Mp_res(source, filename, runtimes) else: - logger.info('-- '+source.__name__+': Could not find lyrics for ' + filename + '\n') + logger.info(f'-- {source.__name__}: Could not find lyrics for {filename}\n') except (HTTPError, HTTPException, URLError, ConnectionError) as e: # if not hasattr(e, 'code') or e.code != 404: # logger.exception(f'== {source.__name__}: {e}\n') - logger.info('-- '+source.__name__+': Could not find lyrics for ' + filename + '\n') + logger.info(f'-- {source.__name__}: Could not find lyrics for {filename}\n') finally: end = time.time()
Changed java-style string adding for f-strings
diff --git a/bibliopixel/drivers/network_receiver.py b/bibliopixel/drivers/network_receiver.py index <HASH>..<HASH> 100644 --- a/bibliopixel/drivers/network_receiver.py +++ b/bibliopixel/drivers/network_receiver.py @@ -1,14 +1,8 @@ -import threading -import os +import os, threading -try: - import SocketServer -except: - import socketserver as SocketServer +import socketserver as SocketServer from .. drivers.return_codes import RETURN_CODES from . network import CMDTYPE - -os.sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from .. util import log
Stop network_receiver.py from changing `sys.path` (fix #<I>)