diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/internal/model/api/shape.go b/internal/model/api/shape.go index <HASH>..<HASH> 100644 --- a/internal/model/api/shape.go +++ b/internal/model/api/shape.go @@ -35,6 +35,7 @@ type Shape struct { Type string Exception bool Enum []string + Flattened bool refs []*ShapeRef } @@ -119,6 +120,10 @@ func (ref *ShapeRef) GoTags(toplevel bool) string { code += `" ` } + if ref.Shape.Flattened { + code += `flattened:"true" ` + } + if toplevel { if ref.Shape.Payload != "" { code += `payload:"` + ref.Shape.Payload + `" `
Add flattened traits to generated model field tags
diff --git a/src/main/java/com/bandwidth/sdk/model/BaseEvent.java b/src/main/java/com/bandwidth/sdk/model/BaseEvent.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/bandwidth/sdk/model/BaseEvent.java +++ b/src/main/java/com/bandwidth/sdk/model/BaseEvent.java @@ -97,7 +97,8 @@ public class BaseEvent extends AbsModelObject implements Event { // } // protected BaseEvent(JSONObject json) { - eventType = EventType.getEnum((String) json.get("eventType")); + updateProperties(json); + eventType = EventType.getEnum((String) json.get("eventType")); } public Date getTime() {
fixed bug in new constructor for BaseEvent
diff --git a/src/means/tests/test_simulate.py b/src/means/tests/test_simulate.py index <HASH>..<HASH> 100644 --- a/src/means/tests/test_simulate.py +++ b/src/means/tests/test_simulate.py @@ -12,7 +12,7 @@ class ConstantDerivativesProblem(ODEProblem): right_hand_side=['c_1', 'c_2'], constants=['c_1', 'c_2']) -class TestSimulate(object): +class TestSimulate(unittest.TestCase): def test_simulation_of_simple_model(self): """
whoops, tests should inherit from unittest.TestCase
diff --git a/dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/InvokerTask.java b/dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/InvokerTask.java index <HASH>..<HASH> 100644 --- a/dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/InvokerTask.java +++ b/dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/InvokerTask.java @@ -237,6 +237,8 @@ public class InvokerTask implements Runnable, Synchronization { Config config = persistentExecutor.configRef.get(); if (persistentExecutor.deactivated || !config.enableTaskExecution) { + if (!config.enableTaskExecution) + persistentExecutor.inMemoryTaskIds.clear(); if (trace && tc.isEntryEnabled()) Tr.exit(this, tc, "run[" + taskId + ']', persistentExecutor.deactivated ? "deactivated" : ("enableTaskExecution? " + config.enableTaskExecution)); return;
Issue #<I> server loses ability to run timer if config update hits timing window
diff --git a/languagetool-core/src/test/java/org/languagetool/rules/LongSentenceRuleTest.java b/languagetool-core/src/test/java/org/languagetool/rules/LongSentenceRuleTest.java index <HASH>..<HASH> 100644 --- a/languagetool-core/src/test/java/org/languagetool/rules/LongSentenceRuleTest.java +++ b/languagetool-core/src/test/java/org/languagetool/rules/LongSentenceRuleTest.java @@ -41,7 +41,8 @@ public class LongSentenceRuleTest { "a a a a a a a a a a a " + "rather that short text.", rule, languageTool); - LongSentenceRule shortRule = new LongSentenceRule(TestTools.getEnglishMessages(), 6); + LongSentenceRule shortRule = new LongSentenceRule(TestTools.getEnglishMessages()); + shortRule.setDefaultValue(6); assertNoMatch("This is a rather short text.", shortRule, languageTool); assertMatch("This is also a rather short text.", shortRule, languageTool); assertNoMatch("These ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ don't count.", shortRule, languageTool);
test for LongSentenceRule fixed
diff --git a/lib/hammer_cli_katello/content_view_version.rb b/lib/hammer_cli_katello/content_view_version.rb index <HASH>..<HASH> 100644 --- a/lib/hammer_cli_katello/content_view_version.rb +++ b/lib/hammer_cli_katello/content_view_version.rb @@ -146,6 +146,12 @@ module HammerCLIKatello } ] + if params['update_systems']['included'].key?('ids') + params['update_systems'].delete('excluded') + else + params.delete('update_systems') + end + params.delete('id') params end
Fixes #<I>: Update incremental update based on server API changes.
diff --git a/src/com/startingblocktech/tcases/generator/Tuple.java b/src/com/startingblocktech/tcases/generator/Tuple.java index <HASH>..<HASH> 100755 --- a/src/com/startingblocktech/tcases/generator/Tuple.java +++ b/src/com/startingblocktech/tcases/generator/Tuple.java @@ -77,6 +77,14 @@ public class Tuple } /** + * Returns the number of variable bindings in this tuple. + */ + public int size() + { + return bindings_.size(); + } + + /** * Adds a binding to this tuple. */ public Tuple add( VarBindingDef binding) @@ -123,6 +131,7 @@ public class Tuple { boolean compatible; Iterator<VarBindingDef> bindings; + VarBindingDef binding = null; for( compatible = true, bindings = getBindings(); @@ -130,7 +139,18 @@ public class Tuple compatible && bindings.hasNext(); - compatible = bindings.next().getValueDef().getCondition().compatible( properties_)); + compatible = + (binding = bindings.next()) + .getValueDef().getCondition().compatible( properties_)); + + if( !compatible && size() == 1) + { + throw + new IllegalStateException + ( "Invalid " + binding + + ", value condition=" + binding.getValueDef().getCondition() + + " is incompatible its own properties=" + binding.getValueDef().getProperties()); + } return compatible; }
isCompatible: Fail if 1-tuple is self-inconsistent.
diff --git a/spacy/cli/link.py b/spacy/cli/link.py index <HASH>..<HASH> 100644 --- a/spacy/cli/link.py +++ b/spacy/cli/link.py @@ -46,8 +46,18 @@ def symlink(model_path, link_name, force): # Add workaround for Python 2 on Windows (see issue #909) if util.is_python2() and util.is_windows(): import subprocess - command = ['mklink', '/d', link_path, model_path] - subprocess.call(command, shell=True) + command = ['mklink', '/d', unicode(link_path), unicode(model_path)] + try: + subprocess.call(command, shell=True) + except: + # This is quite dirty, but just making sure other Windows-specific + # errors are caught so users at least see a proper error message. + util.sys_exit( + "Creating a symlink in spacy/data failed. You can still import " + "the model as a Python package and call its load() method, or " + "create the symlink manually:", + "{a} --> {b}".format(a=unicode(model_path), b=unicode(link_path)), + title="Error: Couldn't link model to '{l}'".format(l=link_name)) else: link_path.symlink_to(model_path)
Use unicode paths on Windows/Python 2 and catch other errors (resolves #<I>) try/except here is quite dirty, but it'll at least make sure users see an error message that explains what's going on
diff --git a/lib/rufus/scheduler/jobs.rb b/lib/rufus/scheduler/jobs.rb index <HASH>..<HASH> 100644 --- a/lib/rufus/scheduler/jobs.rb +++ b/lib/rufus/scheduler/jobs.rb @@ -612,7 +612,10 @@ module Rufus super(scheduler, cronline, opts, block) - @cron_line = cronline.is_a?(CronLine) ? cronline : opts[:_t] || CronLine.new(cronline) + @cron_line = + opts[:_t] || + (cronline.is_a?(CronLine) ? cronline : CronLine.new(cronline)) + set_next_time(nil) end
Give back its priority to opts[:_t] in CronLine#initialize
diff --git a/test.go b/test.go index <HASH>..<HASH> 100644 --- a/test.go +++ b/test.go @@ -176,11 +176,11 @@ func ThreadSafeAddTest(s Storage) func(*testing.T) { func BucketInstanceConsistencyTest(s Storage) func(*testing.T) { return func(t *testing.T) { // Create two bucket instances pointing to the same remote bucket - bucket1, err := s.Create("testbucket", 5, time.Millisecond) + bucket1, err := s.Create("testbucket", 5, time.Second) if err != nil { t.Fatal(err) } - bucket2, err := s.Create("testbucket", 5, time.Millisecond) + bucket2, err := s.Create("testbucket", 5, time.Second) if err != nil { t.Fatal(err) }
test: expire slower for more consistency
diff --git a/tests/shared.py b/tests/shared.py index <HASH>..<HASH> 100644 --- a/tests/shared.py +++ b/tests/shared.py @@ -22,7 +22,7 @@ def tmp_file(): def _tmp_root(): - root = '/tmp/peru/test' + root = os.path.join(tempfile.gettempdir(), 'peru', 'test') makedirs(root) return root
stop hardcoding the temp root Summary: The hardcoded value wasn't appropriate for Windows. Reviewers: sean Differential Revision: <URL>
diff --git a/packages/VSSvg/InfoFillIcon.js b/packages/VSSvg/InfoFillIcon.js index <HASH>..<HASH> 100644 --- a/packages/VSSvg/InfoFillIcon.js +++ b/packages/VSSvg/InfoFillIcon.js @@ -2,18 +2,19 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Svg, { G, Path } from 'react-native-svg'; -export default class InfoFillIcon extends Component { +export default class InfoIcon extends Component { render() { return ( <Svg width={ this.props.width } height={ this.props.height } - viewBox="0 0 16 16" + viewBox="-1 -1 18 18" > <G id="Info" transform={ { translate: '(-1606 -163)' } } - fill={ this.props.color } + fill={ this.props.fill } + stroke={ this.props.stroke} > <Path fillRule="evenodd" @@ -25,14 +26,16 @@ export default class InfoFillIcon extends Component { } } -InfoFillIcon.propTypes = { +InfoIcon.propTypes = { width: PropTypes.number, height: PropTypes.number, - color: PropTypes.string, + fill: PropTypes.string, + stroke: PropTypes.string, }; -InfoFillIcon.defaultProps = { +InfoIcon.defaultProps = { width: 25, height: 26, - color: 'black', + fill: 'black', + stroke: 'none', };
feature(InfoFIllICon): add stroke and fill to props
diff --git a/lib/browser.js b/lib/browser.js index <HASH>..<HASH> 100644 --- a/lib/browser.js +++ b/lib/browser.js @@ -1,4 +1,4 @@ -define(['litmus'], function (litmus) { +define(['litmus', 'formatting'], function (litmus, formatting) { /** * Namespace: litmus.browser - Litmus running in a browser @@ -17,7 +17,7 @@ define(['litmus'], function (litmus) { */ function addToBody (run) { - var formatter = new litmus.StaticHtmlFormatter(); + var formatter = new formatting.StaticHtmlFormatter(); var element = document.createElement('div'); element.setAttribute('class', 'litmus-results'); element.innerHTML = formatter.format(run); @@ -68,14 +68,19 @@ define(['litmus'], function (litmus) { for (var i = 0, l = tests.length; i < l; i++) { require([tests[i]], function (test) { - var run = test.createRun(); - run.finished.then(function () { - addToBody(run); - }); - run.start(); + ns.run(test); }); } }; + ns.run = function (test) { + console.log(test); + var run = test.createRun(); + run.finished.then(function () { + addToBody(run); + }); + run.start(); + } + return ns; });
Added dep on formatting module (like commandline). Moved test run logic to run method.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -11,15 +11,20 @@ setup( classifiers=[ "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Internet :: WWW/HTTP", "Environment :: Web Environment", + "Topic :: Internet :: WWW/HTTP :: Site Management", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Development Status :: 3 - Alpha", ], keywords='http,cryptography,web,joyent', - author='Adam Lindsay', + author='Adam T. Lindsay', author_email='a.lindsay+github@gmail.com', - url='http://github.com/atl/py-http-signature', + url='https://github.com/atl/py-http-signature', license='MIT', packages=find_packages(), include_package_data=True, zip_safe=True, - install_requires=['setuptools','pycrypto'], + install_requires=['pycrypto'], )
more classifiers for pypi
diff --git a/helper/schema/resource_diff.go b/helper/schema/resource_diff.go index <HASH>..<HASH> 100644 --- a/helper/schema/resource_diff.go +++ b/helper/schema/resource_diff.go @@ -237,7 +237,6 @@ func (d *ResourceDiff) clear(key string) error { // from ResourceDiff's own change data, in addition to existing diff, config, and state. func (d *ResourceDiff) diffChange(key string) (interface{}, interface{}, bool, bool) { old, new := d.getChange(key) - // log.Printf("\nkey:%s\n\nold:%s\n\nnew:%s\n", key, spew.Sdump(old), spew.Sdump(new)) if !old.Exists { old.Value = nil
helper/schema: Remove unused log line Meant to remove this before finalizing the PR. :P
diff --git a/app/models/product.go b/app/models/product.go index <HASH>..<HASH> 100644 --- a/app/models/product.go +++ b/app/models/product.go @@ -96,7 +96,6 @@ func (productImage *ProductImage) GetSelectedType() string { func (productImage *ProductImage) ScanMediaOptions(mediaOption media_library.MediaOption) error { if bytes, err := json.Marshal(mediaOption); err == nil { - productImage.File.Crop = true return productImage.File.Scan(bytes) } else { return err
Don't set crop to true when ScanMediaOptions
diff --git a/bin/lib/server.js b/bin/lib/server.js index <HASH>..<HASH> 100644 --- a/bin/lib/server.js +++ b/bin/lib/server.js @@ -28,7 +28,12 @@ module.exports = function (options, callback) { serverFactoryClassName = options.serverFactoryClassName, serverInstance; - var serverModule = require(path.join(options.serverRoot, "..", "index.js")); + var serverModule; + try { + serverModule = require(path.join(options.serverRoot, "..", "index.js")); + } catch(e){ + console.warn("WARN: No index.js for server module defined. Please add a index.js file in the project directory"); + } if (path.resolve(configPath) !== configPath) { configPath = path.join(serverRoot, configPath); @@ -36,7 +41,7 @@ module.exports = function (options, callback) { var config = {}, parameter = {}, - projectRequire = serverModule.require, + projectRequire = (serverModule ? serverModule.require : null), rappidRequire = require; try {
fixed server command if no index.js file is defined
diff --git a/javalite-async/src/main/java/org/javalite/async/CommandListener.java b/javalite-async/src/main/java/org/javalite/async/CommandListener.java index <HASH>..<HASH> 100644 --- a/javalite-async/src/main/java/org/javalite/async/CommandListener.java +++ b/javalite-async/src/main/java/org/javalite/async/CommandListener.java @@ -39,7 +39,7 @@ public class CommandListener implements MessageListener{ } } - <T extends Command> void onCommand(T command) { + protected <T extends Command> void onCommand(T command) { if(injector != null){ injector.injectMembers(command); }
#<I> Implement Command XML serialization in JavaLite Async - added protected to onCommand()
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ params = dict( 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ], )
Added Python <I> classifier in setup.py
diff --git a/Collection.php b/Collection.php index <HASH>..<HASH> 100644 --- a/Collection.php +++ b/Collection.php @@ -921,6 +921,23 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate } /** + * Split a collection into a certain number of groups. + * + * @param int $numberOfGroups + * @return static + */ + public function split($numberOfGroups) + { + if ($this->isEmpty()) { + return new static; + } + + $groupSize = ceil($this->count() / $numberOfGroups); + + return $this->chunk($groupSize); + } + + /** * Chunk the underlying collection array. * * @param int $size
[<I>] Add split method to collection class (#<I>) * add split function to collection * fix nitpicks * fix cs * more cs fixes * moar cs * return new instance
diff --git a/core/src/main/java/hudson/tasks/BuildStep.java b/core/src/main/java/hudson/tasks/BuildStep.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/hudson/tasks/BuildStep.java +++ b/core/src/main/java/hudson/tasks/BuildStep.java @@ -69,7 +69,7 @@ public interface BuildStep { Fingerprinter.DESCRIPTOR, JavadocArchiver.DESCRIPTOR, JUnitResultArchiver.DESCRIPTOR, - Mailer.DESCRIPTOR, - BuildTrigger.DESCRIPTOR + BuildTrigger.DESCRIPTOR, + Mailer.DESCRIPTOR ); }
mailer and other notifiers should come at the end so that reporting happens after everything that can go wrong went wrong. git-svn-id: <URL>
diff --git a/generators/generator-constants.js b/generators/generator-constants.js index <HASH>..<HASH> 100644 --- a/generators/generator-constants.js +++ b/generators/generator-constants.js @@ -50,7 +50,7 @@ const DOCKER_COUCHBASE = 'couchbase:6.0.3'; // waiting for https://github.com/jh const DOCKER_CASSANDRA = 'cassandra:3.11.6'; const DOCKER_MSSQL = 'mcr.microsoft.com/mssql/server:2017-latest-ubuntu'; const DOCKER_NEO4J = 'neo4j:4.0'; -const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:3.12.8'; +const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:3.12.9'; // waiting for https://github.com/jhipster/generator-jhipster/issues/11244 const DOCKER_MEMCACHED = 'memcached:1.5.22-alpine'; const DOCKER_REDIS = 'redis:5.0.7'; const DOCKER_KEYCLOAK = 'jboss/keycloak:9.0.0'; // The version should match the attribute 'keycloakVersion' from /docker-compose/templates/realm-config/jhipster-realm.json.ejs and /server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs
Update hazelcast/management-center docker image version to <I>
diff --git a/pycbc/workflow/coincidence.py b/pycbc/workflow/coincidence.py index <HASH>..<HASH> 100644 --- a/pycbc/workflow/coincidence.py +++ b/pycbc/workflow/coincidence.py @@ -606,6 +606,15 @@ def convert_trig_to_hdf(workflow, hdfbank, xml_trigger_files, out_dir, tags=[]): trig_files += trig2hdf_node.output_files return trig_files +def make_psd_file(workflow, segment_file, segment_name, out_dir, tags=None): + tags = [] if not tags else tags + node = PlotExecutable(workflow.cp, 'calculate_spectrum', ifo=segment_file.ifo, + out_dir=out_dir, tags=tags).create_node() + node.add_input_opt('--analysis-segment-file', psd_file) + node.add_opt('--segment-name', segment_name) + node.new_output_file_opt(workflow.analysis_time, '.hdf', '--output-file') + workflow += node + def setup_interval_coinc_inj(workflow, hdfbank, full_data_trig_files, inj_trig_files, background_file, veto_file, veto_name, out_dir, tags=[]): """
add workflow setup function for psd hdf file generation
diff --git a/src/foremast/configs/prepare_configs.py b/src/foremast/configs/prepare_configs.py index <HASH>..<HASH> 100644 --- a/src/foremast/configs/prepare_configs.py +++ b/src/foremast/configs/prepare_configs.py @@ -42,7 +42,7 @@ def process_git_configs(git_short=''): collections.defaultdict: Configurations stored for each environment found. """ - LOG.info('Processing application.json files from GitLab.') + LOG.info('Processing application.json files from GitLab "%s".', git_short) server = gitlab.Gitlab(GIT_URL, token=GITLAB_TOKEN)
feat: Include short Git name in INFO
diff --git a/lib/ripl/rc/squeeze_history.rb b/lib/ripl/rc/squeeze_history.rb index <HASH>..<HASH> 100644 --- a/lib/ripl/rc/squeeze_history.rb +++ b/lib/ripl/rc/squeeze_history.rb @@ -26,6 +26,7 @@ module Ripl::Rc::SqueezeHistory super end + # avoid double initialization for history def before_loop return super if SqueezeHistory.disabled? super if history.empty?
comment: # avoid double initialization for history
diff --git a/maxims/test/test_indirection.py b/maxims/test/test_indirection.py index <HASH>..<HASH> 100644 --- a/maxims/test/test_indirection.py +++ b/maxims/test/test_indirection.py @@ -34,6 +34,7 @@ class StoredLaser(item.Item): +@interface.implementer(ILaser) class Laser(object): """ A laser.
Indirection tests forget to declare implemented interface
diff --git a/lib/silo/cli.rb b/lib/silo/cli.rb index <HASH>..<HASH> 100644 --- a/lib/silo/cli.rb +++ b/lib/silo/cli.rb @@ -106,6 +106,12 @@ module Silo puts ' or: silo remote rm <name>' end case action + when nil + repo.remotes.each_value do |remote| + info = remote.name + info += " #{remote.url}" if $VERBOSE + puts info + end when 'add' if url.nil? repo.add_remote name, url diff --git a/lib/silo/remote/base.rb b/lib/silo/remote/base.rb index <HASH>..<HASH> 100644 --- a/lib/silo/remote/base.rb +++ b/lib/silo/remote/base.rb @@ -14,6 +14,9 @@ module Silo # @return [String] The name of this remote attr_reader :name + # @return [String] The URL of this remote + attr_reader :url + # Creates a new remote with the specified name # # @param [Repository] repo The Silo repository this remote belongs to
Allow listing all remotes via CLI
diff --git a/src/Cookie/ResponseCookie.php b/src/Cookie/ResponseCookie.php index <HASH>..<HASH> 100644 --- a/src/Cookie/ResponseCookie.php +++ b/src/Cookie/ResponseCookie.php @@ -37,6 +37,13 @@ final class ResponseCookie { list($name, $value) = $nameValue; + $name = \trim($name); + $value = \trim($value, " \t\n\r\0\x0B\""); + + if ($name === "") { + return null; + } + // httpOnly must default to false for parsing $meta = CookieAttributes::empty();
Remove leading and trailing whitespace to comply with RFC
diff --git a/graphics/sprite.py b/graphics/sprite.py index <HASH>..<HASH> 100644 --- a/graphics/sprite.py +++ b/graphics/sprite.py @@ -104,6 +104,7 @@ class Sprite: if not y is None: y -= 1 # To get pixel next to pixel which is on. + # Get coordinates the right way around. pos = (x, y) size = [len(image), len(image[0])] for i in range(4-side): diff --git a/touchingTest.py b/touchingTest.py index <HASH>..<HASH> 100644 --- a/touchingTest.py +++ b/touchingTest.py @@ -9,7 +9,7 @@ class Car(g.shapes.Image): super(Car, self).__init__() def genImage(self): - return [[0, 1, 0], [1, 1, 1], [0, 1, 0]] + return [[0, 1, 0], [0, 0, 0], [0, 1, 0]] def main(): @@ -57,6 +57,8 @@ def main(): str_ += str(2) if mover.touching(screen, 3): str_ += str(3) + if mover.touching(screen): + str_ += 'T' touchMeter.image.text = str_
Added test for any side to touchingTest.
diff --git a/nianalysis/nodes.py b/nianalysis/nodes.py index <HASH>..<HASH> 100644 --- a/nianalysis/nodes.py +++ b/nianalysis/nodes.py @@ -186,8 +186,7 @@ class MapNode(NiAnalysisNodeMixin, NipypeMapNode): nipype_cls = NipypeMapNode -sbatch_template = """ -#!/bin/bash +sbatch_template = """#!/bin/bash # Set the partition to run the job on SBATCH --partition={partition}
removed white-space from sbatch template
diff --git a/test/extended/util/test.go b/test/extended/util/test.go index <HASH>..<HASH> 100644 --- a/test/extended/util/test.go +++ b/test/extended/util/test.go @@ -422,6 +422,8 @@ var ( `should be rejected when no endpoints exist`, // https://bugzilla.redhat.com/show_bug.cgi?id=1711605 `PreemptionExecutionPath runs ReplicaSets to verify preemption running path`, // https://bugzilla.redhat.com/show_bug.cgi?id=1711606 `TaintBasedEvictions`, // https://bugzilla.redhat.com/show_bug.cgi?id=1711608 + // TODO(workloads): reenable + `SchedulerPreemption`, `\[Driver: iscsi\]`, // https://bugzilla.redhat.com/show_bug.cgi?id=1711627
CHECK(workloads): extended: disable SchedulerPreemption tests again
diff --git a/jsonschema/compat.py b/jsonschema/compat.py index <HASH>..<HASH> 100644 --- a/jsonschema/compat.py +++ b/jsonschema/compat.py @@ -3,9 +3,9 @@ import sys try: - from collections import MutableMapping, Sequence # noqa -except ImportError: from collections.abc import MutableMapping, Sequence # noqa +except ImportError: + from collections import MutableMapping, Sequence # noqa PY3 = sys.version_info[0] >= 3
Prefer importing ABCs from collections.abc
diff --git a/tests/HTML5ValueTest.php b/tests/HTML5ValueTest.php index <HASH>..<HASH> 100644 --- a/tests/HTML5ValueTest.php +++ b/tests/HTML5ValueTest.php @@ -84,7 +84,7 @@ class HTML5ValueTest extends SapphireTest return 'bit of test shortcode output'; } ); - $content = DBHTMLText::create('Test', ['shortcodes'=>true]) + $content = DBHTMLText::create('Test', ['shortcodes' => true]) ->setValue('<p>Some content with a [test_shortcode] and a <br /> followed by an <hr> in it.</p>') ->forTemplate(); $this->assertContains(
We need more 0x<I> captain!
diff --git a/cumulusci/tasks/bulkdata/mapping_parser.py b/cumulusci/tasks/bulkdata/mapping_parser.py index <HASH>..<HASH> 100644 --- a/cumulusci/tasks/bulkdata/mapping_parser.py +++ b/cumulusci/tasks/bulkdata/mapping_parser.py @@ -195,7 +195,10 @@ class MappingStep(CCIDictModel): elif values["api"] == DataApi.SMART and v is not None: assert 0 < v < 200, "Max 200 batch_size for Smart loads" logger.warning( - "If you set a `batch_size` you should also set an `api` to `rest` or `bulk`." + "If you set a `batch_size` you should also set an `api` to `rest` or `bulk`. " + "`batch_size` means different things for `rest` and `bulk`. " + "Please see the documentation for further details." + "https://cumulusci.readthedocs.io/en/latest/data.html#api-selection" ) else: # pragma: no cover # should not happen
Coverage and warning for SMART API+batch_size
diff --git a/src/main/java/org/mariadb/jdbc/MariaDbConnection.java b/src/main/java/org/mariadb/jdbc/MariaDbConnection.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/mariadb/jdbc/MariaDbConnection.java +++ b/src/main/java/org/mariadb/jdbc/MariaDbConnection.java @@ -1538,9 +1538,6 @@ public class MariaDbConnection implements Connection { if (securityManager != null && sqlPermission != null) { securityManager.checkPermission(sqlPermission); } - if (executor == null) { - throw ExceptionMapper.getSqlException("Cannot set the connection timeout: null executor passed"); - } try { protocol.setTimeout(milliseconds); } catch (SocketException se) {
[CONJ-<I>] Connection.setNetworkTimeout executor must not be mandatory
diff --git a/models/classes/notification/Notification.php b/models/classes/notification/Notification.php index <HASH>..<HASH> 100644 --- a/models/classes/notification/Notification.php +++ b/models/classes/notification/Notification.php @@ -52,9 +52,19 @@ class Notification implements NotificationInterface, JsonSerializable protected $updatedAt; /** - * AbstractNotification constructor. + * Notification constructor. + * + * @param string $userId + * @param string $title + * @param string $message + * @param string $senderId + * @param string $senderName + * @param string|null $id + * @param string|null $createdAt + * @param string|null $updatedAt + * @param int $status */ - public function __construct(string $userId, string $title, string $message, string $senderId, string $senderName, string $id = null, string $createdAt = null, string $updatedAt = null, int $status = 0) + public function __construct($userId, $title, $message, $senderId, $senderName, $id = null, $createdAt = null, $updatedAt = null, $status = 0) { $this->id = $id; $this->status = $status;
Removed param types to keep consistency of the class
diff --git a/tests/cases/data/entity/DocumentTest.php b/tests/cases/data/entity/DocumentTest.php index <HASH>..<HASH> 100644 --- a/tests/cases/data/entity/DocumentTest.php +++ b/tests/cases/data/entity/DocumentTest.php @@ -655,6 +655,8 @@ class DocumentTest extends \lithium\test\Unit { } public function testArrayConversion() { + $this->skipIf(!MongoDb::enabled(), "MongoDB not enabled, skipping conversion tests."); + $doc = new Document(array('data' => array( 'id' => new MongoId(), 'date' => new MongoDate()
Skipping Mongo data conversion tests in `Document` if Mongo not installed.
diff --git a/luigi/task.py b/luigi/task.py index <HASH>..<HASH> 100644 --- a/luigi/task.py +++ b/luigi/task.py @@ -17,6 +17,7 @@ import logging import parameter import warnings import traceback +import itertools import pyparsing as pp Parameter = parameter.Parameter @@ -472,11 +473,7 @@ class Task(object): warnings.warn("Task %r without outputs has no custom complete() method" % self) return False - for output in outputs: - if not output.exists(): - return False - else: - return True + return all(itertools.imap(lambda output: output.exists(), outputs)) def output(self): """The output that this Task produces.
Simplify Task.complete() Just using standard functional tools. Note that it's necessary to use itertools to not change the semantics, in case one of the exists() methods have side effects.
diff --git a/scapy/automaton.py b/scapy/automaton.py index <HASH>..<HASH> 100644 --- a/scapy/automaton.py +++ b/scapy/automaton.py @@ -670,8 +670,6 @@ class Automaton(six.with_metaclass(Automaton_metaclass)): for stname in self.states: setattr(self, stname, _instance_state(getattr(self, stname))) - - self.parse_args(*args, **kargs) self.start()
Automaton: avoid a double call to parse_args First call was in __init__ Second call results from .run() call
diff --git a/course/jumpto.php b/course/jumpto.php index <HASH>..<HASH> 100644 --- a/course/jumpto.php +++ b/course/jumpto.php @@ -7,11 +7,12 @@ require('../config.php'); - $jump = optional_param('jump', ''); +//TODO: fix redirect before enabling - SC#189 +/* $jump = optional_param('jump', ''); if ($jump) { redirect(urldecode($jump)); - } + }*/ redirect($_SERVER['HTTP_REFERER']);
temporary fix for XSS SC#<I>; merged from MOODLE_<I>_STABLE
diff --git a/simuvex/s_cc.py b/simuvex/s_cc.py index <HASH>..<HASH> 100644 --- a/simuvex/s_cc.py +++ b/simuvex/s_cc.py @@ -136,19 +136,24 @@ class SimCC(object): # Determine how many arguments this function has. # func = cfg.function_manager.function(function_address) - reg_args, stack_args = func.arguments + if func is not None: + reg_args, stack_args = func.arguments - for arg in reg_args: - a = SimRegArg(project.arch.register_names[arg]) - args.append(a) + for arg in reg_args: + a = SimRegArg(project.arch.register_names[arg]) + args.append(a) - for arg in stack_args: - a = SimStackArg(arg) - args.append(a) + for arg in stack_args: + a = SimStackArg(arg) + args.append(a) - for c in CC: - if c._match(project, args): - return c(project.arch, args, ret_vals) + for c in CC: + if c._match(project, args): + return c(project.arch, args, ret_vals) + + else: + # TODO: + pass # We cannot determine the calling convention of this function.
no panicking if the function does not exist in functionmanager.
diff --git a/src/Gica/MongoDB/Selector/Filter/Logical/AndGroup.php b/src/Gica/MongoDB/Selector/Filter/Logical/AndGroup.php index <HASH>..<HASH> 100644 --- a/src/Gica/MongoDB/Selector/Filter/Logical/AndGroup.php +++ b/src/Gica/MongoDB/Selector/Filter/Logical/AndGroup.php @@ -19,6 +19,13 @@ class AndGroup implements Filter $this->filters = $filters; } + public function withAddedFilter(Filter $filter):self + { + $other = clone $this; + $other->filters[] = $filter; + return $other; + } + public function getFields():array { $filterExpressions = []; diff --git a/src/Gica/MongoDB/Selector/Filter/Logical/OrGroup.php b/src/Gica/MongoDB/Selector/Filter/Logical/OrGroup.php index <HASH>..<HASH> 100644 --- a/src/Gica/MongoDB/Selector/Filter/Logical/OrGroup.php +++ b/src/Gica/MongoDB/Selector/Filter/Logical/OrGroup.php @@ -19,6 +19,13 @@ class OrGroup implements Filter $this->filters = $filters; } + public function withAddedFilter(Filter $filter):self + { + $other = clone $this; + $other->filters[] = $filter; + return $other; + } + public function getFields():array { $filterExpressions = [];
added \Gica\MongoDB\Selector\Filter\Logical\OrGroup::withAddedFilter
diff --git a/fragments/apply.py b/fragments/apply.py index <HASH>..<HASH> 100644 --- a/fragments/apply.py +++ b/fragments/apply.py @@ -149,7 +149,7 @@ def apply(*args): if len(merge_result) == 1 and isinstance(merge_result[0], tuple): # total conflict, skip yield "Changes in '%s' cannot apply to '%s', skipping" % (os.path.relpath(changed_path), os.path.relpath(other_path)) - elif tuple in (type(mr) for mr in merge_result): + elif tuple in set(type(mr) for mr in merge_result): # some conflicts exist with file(other_path, 'w') as other_file: for line_or_conflict in merge_result:
make this a set for faster identification
diff --git a/src/api.js b/src/api.js index <HASH>..<HASH> 100644 --- a/src/api.js +++ b/src/api.js @@ -72,11 +72,12 @@ class DialogFlowAPI_V2 { } else { try { const keyFile = require(config.keyFilename); - this.projectId = keyFile.project_id; + opts.projectId = keyFile.project_id; } catch (err) { throw new Error('projectId must be provided or available in the keyFile.'); } } + this.projectId = opts.projectId; if (config.credentials) { opts.credentials = config.credentials; }
Fix projectId not detected when passed in config This fixes the projectId option not being correctly detected when it is passed as a variable in the config object.
diff --git a/lib/miro/dominant_colors.rb b/lib/miro/dominant_colors.rb index <HASH>..<HASH> 100644 --- a/lib/miro/dominant_colors.rb +++ b/lib/miro/dominant_colors.rb @@ -63,7 +63,7 @@ module Miro def parse_result(hstring) hstring.scan(/(\d*):.*(#[0-9A-Fa-f]*)/).collect do |match| - [match[0].to_i, Object.const_get("Color::#{Miro.options[:quantize].upcase}").from_html(match[1])] + [match[0].to_i, eval("Color::#{Miro.options[:quantize].upcase}").from_html(match[1])] end end
Use eval instead of Object.const_get. Object.const_get does not function the same on the jruby platform as it does on MRI or rubinius.
diff --git a/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerMachineConfigurator.java b/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerMachineConfigurator.java index <HASH>..<HASH> 100644 --- a/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerMachineConfigurator.java +++ b/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerMachineConfigurator.java @@ -152,7 +152,13 @@ public class DockerMachineConfigurator implements MachineConfigurator { // Execute... try { - String containerName = this.scopedInstancePath.replaceFirst( "^/", "" ).replace( "/", "-" ).replaceAll( "\\s+", "_" ); + String containerName = this.scopedInstancePath + "_from_" + this.applicationName; + containerName = containerName.replaceFirst( "^/", "" ).replace( "/", "-" ).replaceAll( "\\s+", "_" ); + + // Prevent container names from being too long (see #480) + if( containerName.length() > 61 ) + containerName = containerName.substring( 0, 61 ); + CreateContainerCmd cmd = this.dockerClient.createContainerCmd( imageId ) .withName( containerName ) .withCmd( args.toArray( new String[ args.size()]));
#<I> Docker container names should include the application name
diff --git a/src/util/spawn-promise.js b/src/util/spawn-promise.js index <HASH>..<HASH> 100644 --- a/src/util/spawn-promise.js +++ b/src/util/spawn-promise.js @@ -2,10 +2,19 @@ const cp = require('child_process'), os = require('os'); module.exports = function spawnPromise(command, args, options, suppressOutput) { 'use strict'; - const actualCommand = os.platform() === 'win32' ? `"${command}"` : command, + const isWin = os.platform() === 'win32', + actualCommand = isWin ? `"${command}"` : command, normalDefaults = {env: process.env, cwd: process.cwd()}, windowsDefaults = Object.assign({shell: true}, normalDefaults), - defaultOptions = os.platform() === 'win32' ? windowsDefaults : normalDefaults; + defaultOptions = isWin ? windowsDefaults : normalDefaults; + + if (isWin) { + args.forEach((v, i) => { + if (/\s/.test(v)) { + args[i] = `"${v}"`; + } + }); + } return new Promise((resolve, reject) => { const subProcess = cp.spawn(actualCommand, args, Object.assign(defaultOptions, options)); if (!suppressOutput) {
spawn on windows fix for files with spaces
diff --git a/activerecord/test/cases/scoping/named_scoping_test.rb b/activerecord/test/cases/scoping/named_scoping_test.rb index <HASH>..<HASH> 100644 --- a/activerecord/test/cases/scoping/named_scoping_test.rb +++ b/activerecord/test/cases/scoping/named_scoping_test.rb @@ -590,7 +590,7 @@ class NamedScopingTest < ActiveRecord::TestCase [:destroy_all, :reset, :delete_all].each do |method| before = post.comments.containing_the_letter_e - post.association(:comments).send(method) + post.association(:comments).public_send(method) assert_not_same before, post.comments.containing_the_letter_e, "CollectionAssociation##{method} should reset the named scopes cache" end end
Association#destroy_all, reset, and delete_all are public methods
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,8 @@ setup(name='dispatch', 'djangorestframework == 3.6.2', 'pillow', 'requests == 2.6.0', - 'jsonfield' + 'jsonfield', + 'phonenumber_field == 1.3.0' ], extras_require={ 'dev': [
Added 'phonenumber_field' to setup.py
diff --git a/lib/em-synchrony.rb b/lib/em-synchrony.rb index <HASH>..<HASH> 100644 --- a/lib/em-synchrony.rb +++ b/lib/em-synchrony.rb @@ -18,14 +18,29 @@ require "em-synchrony/iterator" if EventMachine::VERSION > '0.12.10' module EventMachine - # A convenience method for wrapping EM.run body within + # A convenience method for wrapping a given block within # a Ruby Fiber such that async operations can be transparently # paused and resumed based on IO scheduling. - def self.synchrony(blk=nil, tail=nil, &block) - blk ||= block - context = Proc.new { Fiber.new { blk.call }.resume } + # It detects whether EM is running or not. + def self.synchrony(blk=nil, tail=nil) + # EM already running. + if reactor_running? + if block_given? + Fiber.new { yield }.resume + else + Fiber.new { blk.call }.resume + end + tail && add_shutdown_hook(tail) + + # EM not running. + else + if block_given? + run(nil, tail) { Fiber.new { yield }.resume } + else + run(Proc.new { Fiber.new { blk.call }.resume }, tail) + end - self.run(context, tail) + end end module Synchrony
EM.synchrony refactorized.
diff --git a/TYPO3.Media/Migrations/Postgresql/Version20150701113247.php b/TYPO3.Media/Migrations/Postgresql/Version20150701113247.php index <HASH>..<HASH> 100644 --- a/TYPO3.Media/Migrations/Postgresql/Version20150701113247.php +++ b/TYPO3.Media/Migrations/Postgresql/Version20150701113247.php @@ -31,7 +31,6 @@ class Version20150701113247 extends AbstractMigration { public function down(Schema $schema) { $this->abortIf($this->connection->getDatabasePlatform()->getName() != "postgresql"); - $this->addSql("CREATE SCHEMA public"); $this->addSql("ALTER TABLE typo3_media_domain_model_image ALTER width SET NOT NULL"); $this->addSql("ALTER TABLE typo3_media_domain_model_image ALTER height SET NOT NULL"); $this->addSql("ALTER TABLE typo3_media_domain_model_imagevariant ALTER width SET NOT NULL");
[BUGFIX] Fix a PostgreSQL down migration In cb<I>c7a<I>b<I>a0dd3b2b<I>fdb5c<I>c<I>ef<I> a missing migration was added. That migration works fine when migrating up, but in the down migration one line too much causes it to break.
diff --git a/lib/db/access.php b/lib/db/access.php index <HASH>..<HASH> 100644 --- a/lib/db/access.php +++ b/lib/db/access.php @@ -527,7 +527,6 @@ $moodle_capabilities = array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, 'legacy' => array( - 'teacher' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, 'coursecreator' => CAP_ALLOW, 'admin' => CAP_ALLOW
Merged fix for MDL-<I>
diff --git a/PZFileReader/src/test/java/net/sf/pzfilereader/parserutils/ParserUtilsSplitLineTest.java b/PZFileReader/src/test/java/net/sf/pzfilereader/parserutils/ParserUtilsSplitLineTest.java index <HASH>..<HASH> 100644 --- a/PZFileReader/src/test/java/net/sf/pzfilereader/parserutils/ParserUtilsSplitLineTest.java +++ b/PZFileReader/src/test/java/net/sf/pzfilereader/parserutils/ParserUtilsSplitLineTest.java @@ -138,6 +138,9 @@ public class ParserUtilsSplitLineTest extends TestCase { check("one two three", ' ', '\u0000', new String[] {"one", "two", "three"}); check("\"one\" \"two\" three", ' ', '\"', new String[] {"one", "two", "three"}); check("\"one\" \"two\" three", ' ', '\"', new String[] {"one", "", "two", "", "three"}); + + check (" , , ", ',', '"', new String[] {"","",""}); + check (" \t \t ", '\t', '"', new String[] {"","",""}); } /**
added test for empty tabs which is currently failing Former-commit-id: ee4de<I>fb<I>cb0ec<I>eea6ecec4f<I>b7
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/asyncTestWrapper.js b/bundles/org.eclipse.orion.client.core/web/orion/asyncTestWrapper.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.core/web/orion/asyncTestWrapper.js +++ b/bundles/org.eclipse.orion.client.core/web/orion/asyncTestWrapper.js @@ -61,12 +61,10 @@ orion.JSTestAdapter = (function() { } }); service.addEventListener("runDone", function(runName, obj) { - if (!runName) { - shutdown.then(function(noop) { - loaderPluginRegistry.shutdown(); - noop(); - }); - } + shutdown.then(function(noop) { + loaderPluginRegistry.shutdown(); + noop(); + }); }); console.log("Launching test suite: " + test);
temporary fix for async tests - still more to do.
diff --git a/salty/tests/test_data_manipulation.py b/salty/tests/test_data_manipulation.py index <HASH>..<HASH> 100644 --- a/salty/tests/test_data_manipulation.py +++ b/salty/tests/test_data_manipulation.py @@ -32,4 +32,4 @@ class data_manipulation_tests(unittest.TestCase): if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main()
iss3 ready for deply
diff --git a/src/Model/Loggable/LoggableTrait.php b/src/Model/Loggable/LoggableTrait.php index <HASH>..<HASH> 100644 --- a/src/Model/Loggable/LoggableTrait.php +++ b/src/Model/Loggable/LoggableTrait.php @@ -34,18 +34,18 @@ trait LoggableTrait public function getCreateLogMessage(): string { - return sprintf('%s #%d created', self::class, $this->getId()); + return sprintf('%s #%s created', self::class, $this->getId()); } public function getRemoveLogMessage(): string { - return sprintf('%s #%d removed', self::class, $this->getId()); + return sprintf('%s #%s removed', self::class, $this->getId()); } private function createChangeSetMessage(string $property, array $changeSet): string { return sprintf( - '%s #%d : property "%s" changed from "%s" to "%s"', + '%s #%s : property "%s" changed from "%s" to "%s"', self::class, $this->getId(), $property,
Update LoggableTrait.php (#<I>)
diff --git a/resources/assets/js/files.pathway.js b/resources/assets/js/files.pathway.js index <HASH>..<HASH> 100644 --- a/resources/assets/js/files.pathway.js +++ b/resources/assets/js/files.pathway.js @@ -74,14 +74,26 @@ return result; }; + var path = '', root_path = ''; - var root = wrap(app, '<span class="k-icon-home" aria-hidden="true"></span><span class="k-visually-hidden">'+app.container.title+'</span>', '', false) + // Check if we are rendering sub-trees + if (app.options.root_path) { + path = root_path = app.options.root_path; + } + + var root = wrap(app, '<span class="k-icon-home" aria-hidden="true"></span><span class="k-visually-hidden">'+app.container.title+'</span>', path, false) .addClass('k-breadcrumb__home') .getElement('a').getParent(); list.adopt(root); - var folders = app.getPath().split('/'), path = ''; + var base_path = app.getPath(); + + if (root_path) { + base_path = base_path.replace(root_path, ''); + } + + var folders = base_path.split('/'), path = root_path; folders.each(function(title){ if(title.trim()) {
#<I> Render pathways from root_path when available
diff --git a/jgettext/src/test/java/org/fedorahosted/tennera/jgettext/DynamicRoundtripTests.java b/jgettext/src/test/java/org/fedorahosted/tennera/jgettext/DynamicRoundtripTests.java index <HASH>..<HASH> 100644 --- a/jgettext/src/test/java/org/fedorahosted/tennera/jgettext/DynamicRoundtripTests.java +++ b/jgettext/src/test/java/org/fedorahosted/tennera/jgettext/DynamicRoundtripTests.java @@ -25,7 +25,7 @@ import org.junit.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -public class DynamicRoundtripTests { +public class DynamicRoundtripTests extends TestSuite{ public final static void generateTests(TestSuite ts) throws Throwable{ final Properties properties = new Properties(); @@ -44,7 +44,7 @@ public class DynamicRoundtripTests { final String key = (String) keys.nextElement(); final File rootDir = new File(properties.getProperty(key)); - TestCase test = new TestCase(key){ + TestCase test = new TestCase(key + " exists"){ @Override public void runTest() { assertTrue("No such file.", rootDir.exists()); @@ -150,7 +150,5 @@ public class DynamicRoundtripTests { } } } - - @Test - public void test(){} + }
avoid ugly hack from prvious commit to make dynamic test suite work in eclispe
diff --git a/Core/src/Artax/Ioc/Provider.php b/Core/src/Artax/Ioc/Provider.php index <HASH>..<HASH> 100644 --- a/Core/src/Artax/Ioc/Provider.php +++ b/Core/src/Artax/Ioc/Provider.php @@ -457,7 +457,6 @@ class Provider implements ProviderInterface, ArrayAccess protected function getDepsSansDefinition($class, array $args) { $deps = []; - for ($i=0; $i<count($args); $i++) { if (!$param = $args[$i]->getClass()) { throw new InvalidArgumentException( @@ -465,11 +464,10 @@ class Provider implements ProviderInterface, ArrayAccess .'for argument' . $i+1 ); } else { - $deps[] = isset($this->shared[$class]) - ? $this->shared[$class] - : new $param->name; + $deps[] = $this->make($param->name); } } + return $deps; }
Fixed bug affecting shared dependencies of lazy class listeners
diff --git a/MatchMakingLobby/Lobby/Plugin.php b/MatchMakingLobby/Lobby/Plugin.php index <HASH>..<HASH> 100644 --- a/MatchMakingLobby/Lobby/Plugin.php +++ b/MatchMakingLobby/Lobby/Plugin.php @@ -239,7 +239,7 @@ class Plugin extends \ManiaLive\PluginHandler\Plugin function onPlayerDisconnect($login, $disconnectionReason) { - \ManiaLive\Utilities\Logger::debug(sprintf('Player disconnected: %s', $login)); + \ManiaLive\Utilities\Logger::debug(sprintf('Player disconnected: %s (%s)', $login, $disconnectionReason)); $player = Services\PlayerInfo::Get($login); $player->setAway();
Adding player disconnection reason in logger
diff --git a/tests/Assets/TestCodeGenerator.php b/tests/Assets/TestCodeGenerator.php index <HASH>..<HASH> 100644 --- a/tests/Assets/TestCodeGenerator.php +++ b/tests/Assets/TestCodeGenerator.php @@ -67,12 +67,12 @@ class TestCodeGenerator self::TEST_ENTITY_NAMESPACE_BASE . self::TEST_ENTITY_ATTRIBUTES_ADDRESS, false, ], - [ - self::TEST_ENTITY_NAMESPACE_BASE . self::TEST_ENTITY_PERSON, - RelationsGenerator::HAS_REQUIRED_ONE_TO_MANY, - self::TEST_ENTITY_NAMESPACE_BASE . self::TEST_ENTITY_ALL_ARCHETYPE_FIELDS, - false, - ], +// [ +// self::TEST_ENTITY_NAMESPACE_BASE . self::TEST_ENTITY_PERSON, +// RelationsGenerator::HAS_REQUIRED_ONE_TO_MANY, +// self::TEST_ENTITY_NAMESPACE_BASE . self::TEST_ENTITY_ALL_ARCHETYPE_FIELDS, +// false, +// ], [ self::TEST_ENTITY_NAMESPACE_BASE . self::TEST_ENTITY_PERSON, RelationsGenerator::HAS_REQUIRED_ONE_TO_MANY,
removing person to archetype fields relation
diff --git a/libraries/joomla/client/http.php b/libraries/joomla/client/http.php index <HASH>..<HASH> 100644 --- a/libraries/joomla/client/http.php +++ b/libraries/joomla/client/http.php @@ -350,7 +350,7 @@ class JHttp $this->connections[$key] = fsockopen($host, $port, $errno, $err, $this->timeout); if ($this->connections[$key]) { - stream_settimeout($this->connections[$key], $this->timeout); + stream_set_timeout($this->connections[$key], $this->timeout); } return $this->connections[$key];
Fixed a typo in JHttp (stream_set_timeout vs stream_settimeout) as it caused a fatal error when using the class ;)
diff --git a/sqlpuzzle/_features/conditions.py b/sqlpuzzle/_features/conditions.py index <HASH>..<HASH> 100644 --- a/sqlpuzzle/_features/conditions.py +++ b/sqlpuzzle/_features/conditions.py @@ -90,7 +90,7 @@ class Conditions(sqlpuzzle._features.Features): 'allowList': True, 'allowedDataTypes': ( (str, unicode, sqlpuzzle._queries.select.Select), - (str, unicode, int, long, float, bool, list, tuple, datetime.date, datetime.datetime, sqlpuzzle.relations._RelationValue), + (str, unicode, int, long, float, bool, list, tuple, datetime.date, datetime.datetime, sqlpuzzle.relations._RelationValue, sqlpuzzle._queries.select.Select), (sqlpuzzle.relations._RelationValue,) ), },
allow subselect in right position in condition
diff --git a/lib/t/stream.rb b/lib/t/stream.rb index <HASH>..<HASH> 100644 --- a/lib/t/stream.rb +++ b/lib/t/stream.rb @@ -1,4 +1,3 @@ -require 't/cli' require 't/printable' require 't/rcfile' require 't/search'
Don't require the CLI class from the Stream class
diff --git a/chatterbot/adapters/plugins/evaluate_mathematically.py b/chatterbot/adapters/plugins/evaluate_mathematically.py index <HASH>..<HASH> 100644 --- a/chatterbot/adapters/plugins/evaluate_mathematically.py +++ b/chatterbot/adapters/plugins/evaluate_mathematically.py @@ -87,9 +87,9 @@ class EvaluateMathematically(PluginAdapter): it returns False. """ - if string.isdigit(): + try: return int( string ) - else: + except: return False @@ -100,7 +100,7 @@ class EvaluateMathematically(PluginAdapter): false. """ - if string in "+-/*^\(\)": + if string in "+-/*^()": return string else: return False
is_integer update & added additional tests
diff --git a/lib/source_route/tp_result.rb b/lib/source_route/tp_result.rb index <HASH>..<HASH> 100644 --- a/lib/source_route/tp_result.rb +++ b/lib/source_route/tp_result.rb @@ -20,11 +20,16 @@ module SourceRoute } def initialize(wrapper) + @logger = Logger.new(STDOUT) @wrapper = wrapper @output_config = @wrapper.condition.result_config @tp_events = @wrapper.condition.events + if @tp_events.length > 1 and @output_config[:selected_attrs] + @logger.warn 'selected_attrs was ignored, cause watched event was more than one ' + @output_config[:selected_attrs] = nil + end end def output_attributes(event)
set selected_attrs as nil when events length > 1, in this case, we prevent possible error of not supported by this event (RuntimeError)
diff --git a/SingularityService/src/main/java/com/hubspot/singularity/config/SingularityConfiguration.java b/SingularityService/src/main/java/com/hubspot/singularity/config/SingularityConfiguration.java index <HASH>..<HASH> 100644 --- a/SingularityService/src/main/java/com/hubspot/singularity/config/SingularityConfiguration.java +++ b/SingularityService/src/main/java/com/hubspot/singularity/config/SingularityConfiguration.java @@ -45,7 +45,7 @@ public class SingularityConfiguration extends Configuration { private long killDecomissionedTasksAfterNewTasksSeconds = 300; @NotNull - private long deltaAfterWhichTasksAreLateMillis = 300; + private long deltaAfterWhichTasksAreLateMillis = 5000; public long getCloseWaitSeconds() { return closeWaitSeconds;
give tasks 5 seconds to be considered late.
diff --git a/dev/com.ibm.ws.microprofile.metrics.monitor_fat/fat/src/com/ibm/ws/microprofile/metrics/monitor_fat/MetricsMonitorTest.java b/dev/com.ibm.ws.microprofile.metrics.monitor_fat/fat/src/com/ibm/ws/microprofile/metrics/monitor_fat/MetricsMonitorTest.java index <HASH>..<HASH> 100644 --- a/dev/com.ibm.ws.microprofile.metrics.monitor_fat/fat/src/com/ibm/ws/microprofile/metrics/monitor_fat/MetricsMonitorTest.java +++ b/dev/com.ibm.ws.microprofile.metrics.monitor_fat/fat/src/com/ibm/ws/microprofile/metrics/monitor_fat/MetricsMonitorTest.java @@ -117,7 +117,7 @@ public class MetricsMonitorTest { Log.info(c, testName, "------- Enable mpMetrics-1.0 and monitor-1.0: vendor metrics should not be available ------"); server.setServerConfigurationFile("server_mpMetric10Monitor10.xml"); server.startServer(); - Log.info(c, testName, server.waitForStringInLog("defaultHttpEndpoint-ssl",60000)); + Log.info(c, testName, server.waitForStringInLog("SRVE9103I",60000)); Log.info(c, testName, "------- server started -----"); checkStrings(getHttpsServlet("/metrics"), new String[] { "base:" },
Update MetricsMonitorTest.java
diff --git a/spoon/src/main/java/com/squareup/spoon/Spoon.java b/spoon/src/main/java/com/squareup/spoon/Spoon.java index <HASH>..<HASH> 100644 --- a/spoon/src/main/java/com/squareup/spoon/Spoon.java +++ b/spoon/src/main/java/com/squareup/spoon/Spoon.java @@ -128,6 +128,12 @@ public final class Spoon { } } + // Clean up anything in the work directory. + try { + FileUtils.deleteDirectory(new File(output, SpoonDeviceRunner.TEMP_DIR)); + } catch (IOException ignored) { + } + return summary.end().build(); }
Clean up work directory after run completion.
diff --git a/lib/twat/actions.rb b/lib/twat/actions.rb index <HASH>..<HASH> 100644 --- a/lib/twat/actions.rb +++ b/lib/twat/actions.rb @@ -176,7 +176,12 @@ module Twat end def account - @account = config.accounts[account_name] + @account ||= config.accounts[account_name] + unless @account + raise NoSuchAccount + else + return @account + end end def account_name
Fix a broken test for account validity
diff --git a/lib/itamae/resource/user.rb b/lib/itamae/resource/user.rb index <HASH>..<HASH> 100644 --- a/lib/itamae/resource/user.rb +++ b/lib/itamae/resource/user.rb @@ -11,6 +11,13 @@ module Itamae define_attribute :system_user, type: [TrueClass, FalseClass] define_attribute :uid, type: Integer + def pre_action + case @current_action + when :create + attributes.exist = true + end + end + def set_current_attributes current.exist = exist? @@ -74,4 +81,3 @@ module Itamae end end end -
Show difference of user resource when was created
diff --git a/tasks/dockerCompose.js b/tasks/dockerCompose.js index <HASH>..<HASH> 100644 --- a/tasks/dockerCompose.js +++ b/tasks/dockerCompose.js @@ -152,7 +152,7 @@ module.exports = function(grunt) { var cmd = buildCommandSkeleton(); cmd.push('docker-compose'); - if (grunt.option('baked', false) && grunt.option('debug', false)) { + if (!grunt.option('baked') && !grunt.option('debug')) { cmd.push('-f <%= dockerCompose.options.mappedComposeFile %>'); } else if (grunt.option('debug')) {
fix mapped command option, confusing boolean double negative
diff --git a/src/main/java/org/ubercraft/statsd/StatsdLoggerImpl.java b/src/main/java/org/ubercraft/statsd/StatsdLoggerImpl.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/ubercraft/statsd/StatsdLoggerImpl.java +++ b/src/main/java/org/ubercraft/statsd/StatsdLoggerImpl.java @@ -27,7 +27,7 @@ public class StatsdLoggerImpl implements StatsdLogger, Serializable { private static final long serialVersionUID = 6548797032077199054L; - private final Logger logger; + protected final Logger logger; public StatsdLoggerImpl(Logger logger) { this.logger = logger;
changed visibility of logger instance on StatsdLoggerImpl class to protected
diff --git a/LiSE/LiSE/tests/test_load.py b/LiSE/LiSE/tests/test_load.py index <HASH>..<HASH> 100644 --- a/LiSE/LiSE/tests/test_load.py +++ b/LiSE/LiSE/tests/test_load.py @@ -66,6 +66,7 @@ def test_multi_keyframe(tempdir): assert tick1 in eng._nodes_cache.keyframe['physical', ]['trunk'][1] assert eng._nodes_cache.keyframe['physical', ]['trunk'][0][tick0]\ != eng._nodes_cache.keyframe['physical', ]['trunk'][1][tick1] + eng.close() def test_keyframe_load_unload(tempdir):
Close engine properly at the end of test_multi_keyframe
diff --git a/tests/test_apps.py b/tests/test_apps.py index <HASH>..<HASH> 100644 --- a/tests/test_apps.py +++ b/tests/test_apps.py @@ -50,3 +50,7 @@ class ConfigTests(TestCase): expected_config_len = 1 actual = len(self.config) self.assertEqual(actual, expected_config_len) + + def test_failure_for_loading_config(self): + config = Config() + self.assertRaises(FileNotFoundError, config.load_from_pyfile, BASE_DIR, 'no_exists.py')
Refactor tests for load_from_pyfile
diff --git a/hydrachain/app.py b/hydrachain/app.py index <HASH>..<HASH> 100644 --- a/hydrachain/app.py +++ b/hydrachain/app.py @@ -237,7 +237,6 @@ def serve_until_stopped(*apps): evt = Event() gevent.signal(signal.SIGQUIT, evt.set) gevent.signal(signal.SIGTERM, evt.set) - gevent.signal(signal.SIGINT, evt.set) evt.wait() # finally stop for app in apps:
Remove unnecessary SIGINT handler The Console service already registers a SIGINT handler. Do so here again caused the app to exit instead of resume if console wasn't entered.
diff --git a/synapse/lib/filepath.py b/synapse/lib/filepath.py index <HASH>..<HASH> 100644 --- a/synapse/lib/filepath.py +++ b/synapse/lib/filepath.py @@ -359,11 +359,13 @@ def _parse_path(*paths): return fpobj -def openfile(*paths, mode='r'): +# KILL2.7 kwargs instead of mode='r' here because of python2.7 +def openfile(*paths, **kwargs): ''' Returns a read-only file-like object even if the path terminates inside a container file. - If the path is a regular os accessible path mode is passed through. If the path terminates - in a container file mode is ignored. + + If the path is a regular os accessible path mode may be passed through as a keyword argument. + If the path terminates in a container file mode is ignored. If the path does not exist a NoSuchPath exception is raised. @@ -377,7 +379,7 @@ def openfile(*paths, mode='r'): path = genpath(*paths) raise s_exc.NoSuchPath(path=path) - fd = fpobj._open(mode=mode) + fd = fpobj._open(mode=kwargs.get('mode', 'r')) return fd def isfile(*paths):
updated openfile to take generic keyword args so that it is syntax compliant with python<I>
diff --git a/lib/origen/application/release.rb b/lib/origen/application/release.rb index <HASH>..<HASH> 100644 --- a/lib/origen/application/release.rb +++ b/lib/origen/application/release.rb @@ -174,7 +174,7 @@ Your workspace has local modifications that are preventing the requested action # Pull the latest versions of the history and version ID files into the workspace def get_latest_version_files # Get the latest version of the version and history files - if Origen.app.rc.dssc? && !which('dssc').nil? + if Origen.app.rc.dssc? # Legacy code that makes use of the fact that DesignSync can handle different branch selectors # for individual files, this capability has not been abstracted by the newer object oriented # revision controllers since most others cannot do it
backed out conditional check using new which method to lower risk of PR
diff --git a/app/models/application.rb b/app/models/application.rb index <HASH>..<HASH> 100644 --- a/app/models/application.rb +++ b/app/models/application.rb @@ -14,7 +14,7 @@ class Application < ActiveRecord::Base before_validation :generate_uid, :generate_secret, :on => :create def self.authorized_for(resource_owner) - joins(:authorized_applications).where(:oauth_access_tokens => { :resource_owner_id => resource_owner.id }) + joins(:authorized_applications).where(:oauth_access_tokens => { :resource_owner_id => resource_owner.id }).uniq end def validate_redirect_uri
authorised applications' list should be unique in order to avoid repetitions in the authorised applications view.
diff --git a/tests/Gin/Foundation/ThemeTest.php b/tests/Gin/Foundation/ThemeTest.php index <HASH>..<HASH> 100644 --- a/tests/Gin/Foundation/ThemeTest.php +++ b/tests/Gin/Foundation/ThemeTest.php @@ -108,7 +108,7 @@ class ThemeTest extends TestCase /** * @test */ - public function it_should_return_same_object_on_factory_binding() + public function it_should_not_return_same_object_on_factory_binding() { $theme = Theme::getInstance(); @@ -153,4 +153,4 @@ class Stub { // } -} \ No newline at end of file +}
Fix test method name in ThemeTest
diff --git a/generators/generator-constants.js b/generators/generator-constants.js index <HASH>..<HASH> 100644 --- a/generators/generator-constants.js +++ b/generators/generator-constants.js @@ -38,7 +38,7 @@ const JIB_VERSION = '3.2.1'; const JHIPSTER_DEPENDENCIES_VERSION = '7.8.2-SNAPSHOT'; // The spring-boot version should match the one managed by https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/JHIPSTER_DEPENDENCIES_VERSION const SPRING_BOOT_VERSION = '2.7.0-RC1'; -const LIQUIBASE_VERSION = '4.6.1'; +const LIQUIBASE_VERSION = '4.9.1'; const LIQUIBASE_DTD_VERSION = LIQUIBASE_VERSION.split('.', 3).slice(0, 2).join('.'); const HIBERNATE_VERSION = '5.6.8.Final';
Update liquibase version to <I>
diff --git a/src/views/layouts/_angulardirectives.php b/src/views/layouts/_angulardirectives.php index <HASH>..<HASH> 100644 --- a/src/views/layouts/_angulardirectives.php +++ b/src/views/layouts/_angulardirectives.php @@ -284,7 +284,7 @@ use luya\admin\helpers\Angular; </div> <div class="filemanager-files-table"> <div class="table-responsive-wrapper"> - <table class="table table-hover table-responsive table-striped table-align-middle mt-4"> + <table class="table table-hover table-striped table-align-middle mt-4"> <thead class="thead-default"> <tr> <th>
remove class from table as defined in the wrapper
diff --git a/src/main.js b/src/main.js index <HASH>..<HASH> 100644 --- a/src/main.js +++ b/src/main.js @@ -5,9 +5,11 @@ var Player = require('./components/player') var IframePlayer = require('./components/iframe_player') var Mediator = require('mediator') +var version = require('../package.json').version global.DEBUG = false window.Clappr = { Player: Player, Mediator: Mediator, IframePlayer: IframePlayer } +window.Clappr.version = version module.exports = window.Clappr
main: add version attribute to Clappr (close #<I>)
diff --git a/lib/chef/knife/serve_essentials.rb b/lib/chef/knife/serve_essentials.rb index <HASH>..<HASH> 100644 --- a/lib/chef/knife/serve_essentials.rb +++ b/lib/chef/knife/serve_essentials.rb @@ -320,7 +320,7 @@ class Chef end def to_zero_path(entry) - path = entry.path.split('/') + path = entry.path.split('/')[1..-1] if path[0] == 'data' path = path.dup path[0] = 'data_bags'
Fix knife serve to return correct (non-.json) paths
diff --git a/client/lib/site/jetpack.js b/client/lib/site/jetpack.js index <HASH>..<HASH> 100644 --- a/client/lib/site/jetpack.js +++ b/client/lib/site/jetpack.js @@ -244,7 +244,7 @@ JetpackSite.prototype.deactivateModule = function( moduleId, callback ) { JetpackSite.prototype.toggleModule = function( moduleId, callback ) { const isActive = this.isModuleActive( moduleId ), method = isActive ? 'jetpackModulesDeactivate' : 'jetpackModulesActivate', - prevActiveModules = Object.assign( {}, this.modules ); + prevActiveModules = [ ...this.modules ]; if ( isActive ) { this.modules = this.modules.filter( module => module !== moduleId );
Modules: Remove js error when acivation of modules fails this.modules as incorrectly assigned to an Object instead of an Array which caused an error. When trying to figure out if a module is active or not. This PR fixes this by making sure that the module is ### Test Got to the security settings then visit your site jetpack dashboard on your jetpack site. And toggle the state of protect. This will cause the error because the module is already active for example. Notice that this there is no more JS error.
diff --git a/lang/nl/lang.php b/lang/nl/lang.php index <HASH>..<HASH> 100644 --- a/lang/nl/lang.php +++ b/lang/nl/lang.php @@ -63,6 +63,8 @@ 'amount' => 'Amount', 'author' => 'Author', 'link' => 'Link', + 'is_default' => 'Is default', + 'symbol' => 'Symbol', 'sort_order' => 'Sorting', 'created_at' => 'Created',
New translations lang.php (Dutch)
diff --git a/lib/active_scaffold/actions/field_search.rb b/lib/active_scaffold/actions/field_search.rb index <HASH>..<HASH> 100644 --- a/lib/active_scaffold/actions/field_search.rb +++ b/lib/active_scaffold/actions/field_search.rb @@ -20,6 +20,7 @@ module ActiveScaffold::Actions def store_search_params_into_session set_field_search_default_params(active_scaffold_config.field_search.default_params) unless active_scaffold_config.field_search.default_params.nil? super + active_scaffold_session_storage[:search] = nil if search_params.is_a?(String) end def set_field_search_default_params(default_params)
Bugfix: npe if resetting field_search with ruby <I>
diff --git a/src/phpDocumentor/Application.php b/src/phpDocumentor/Application.php index <HASH>..<HASH> 100644 --- a/src/phpDocumentor/Application.php +++ b/src/phpDocumentor/Application.php @@ -22,6 +22,7 @@ use Monolog\Logger; use phpDocumentor\Command\Helper\LoggerHelper; use phpDocumentor\Configuration; use phpDocumentor\Console\Input\ArgvInput; +use phpDocumentor\Transformer\Writer\Collection; use phpDocumentor\Transformer\Writer\Exception\RequirementMissing; use Symfony\Component\Console\Application as ConsoleApplication; use Symfony\Component\Console\Shell; @@ -305,9 +306,13 @@ class Application extends Cilex protected function verifyWriterRequirementsAndExitIfBroken() { try { - $this['transformer.writer.collection']->checkRequirements(); + /** @var Collection $writerCollection */ + $writerCollection = $this['transformer.writer.collection']; + $writerCollection->checkRequirements(); } catch (RequirementMissing $e) { - $this['monolog']->emerg( + /** @var Logger $logger */ + $logger = $this['monolog']; + $logger->emerg( 'phpDocumentor detected that a requirement is missing in your system setup: ' . $e->getMessage() ); exit(1);
#<I>: Fix warnings in Application
diff --git a/src/state.js b/src/state.js index <HASH>..<HASH> 100644 --- a/src/state.js +++ b/src/state.js @@ -172,7 +172,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { var name = state.name; if (!isString(name) || name.indexOf('@') >= 0) throw new Error("State must have a valid name"); - if (states.hasOwnProperty(name)) throw new Error("State '" + name + "'' is already defined"); + if (states.hasOwnProperty(name)) throw new Error("State '" + name + "' is already defined"); // Get parent name var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.'))
chore(state): remove unnecessary character - Remove unnecessary `'` character Closes #<I>
diff --git a/lib/Repository.js b/lib/Repository.js index <HASH>..<HASH> 100644 --- a/lib/Repository.js +++ b/lib/Repository.js @@ -187,8 +187,10 @@ class Repository extends Requestable { * @return {Promise} - the promise for the http request */ listCommits(options, cb) { - options = options || {}; - + if (typeof options === 'function') { + cb = options; + options = {}; + } options.since = this._dateToISO(options.since); options.until = this._dateToISO(options.until);
fix 'listCommits' when only callback is given
diff --git a/lib/discordrb/data.rb b/lib/discordrb/data.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/data.rb +++ b/lib/discordrb/data.rb @@ -1211,9 +1211,13 @@ module Discordrb alias_method :users, :members + # @param include_idle [true, false] Whether to count idle members as online. + # @param include_bots [true, false] Whether to include bot accounts in the count. # @return [Array<Member>] an array of online members on this server. - def online_members - @members.values.select(&:online?) + def online_members(include_idle: false, include_bots: true) + @members.values.select do |e| + ((include_idle ? e.idle? : false) || e.online?) && (include_bots ? true : !e.bot_account?) + end end # @return [Array<Channel>] an array of text channels on this server
Add include_idle and include_bots parameters to online_members
diff --git a/lib/opal_hot_reloader/server.rb b/lib/opal_hot_reloader/server.rb index <HASH>..<HASH> 100644 --- a/lib/opal_hot_reloader/server.rb +++ b/lib/opal_hot_reloader/server.rb @@ -65,7 +65,7 @@ module OpalHotReloader def send_updated_file(modified_file) - if modified_file =~ /\.rb$/ + if modified_file =~ /\.rb(\.erb)?$/ file_contents = File.read(modified_file).force_encoding(Encoding::UTF_8) update = { type: 'ruby',
Add optional .erb to regex First step to also watching for ERB file changes.
diff --git a/ajaxinclude.jquery.js b/ajaxinclude.jquery.js index <HASH>..<HASH> 100644 --- a/ajaxinclude.jquery.js +++ b/ajaxinclude.jquery.js @@ -43,7 +43,7 @@ if( url && method ){ - $(this) + el .data( "method", method ) .data( "url", url ) .data( "proxy", proxy ) @@ -65,7 +65,7 @@ } } - if( k === els.length-1 ){ + if( !proxy || k === els.length-1 ){ $.get( url, function( data ) { els.trigger( "ajaxInclude", [data] ); });
fixed up a bug in the non-proxied case
diff --git a/mbed/mbed.py b/mbed/mbed.py index <HASH>..<HASH> 100644 --- a/mbed/mbed.py +++ b/mbed/mbed.py @@ -1241,7 +1241,7 @@ class Repo(object): def write(self): up = urlparse(self.url) - url = up._replace(netloc=up.hostname).geturl() # strip auth string + url = up._replace(netloc=up.hostname + (':'+str(up.port) if up.port else '')).geturl() # strip auth string if os.path.isfile(self.lib): with open(self.lib) as f: @@ -1731,7 +1731,7 @@ def formaturl(url, format="default"): else: m = re.match(regex_repo_url, url) if m and m.group(1) == '': # no protocol specified, probably ssh string like "git@github.com:ARMmbed/mbed-os.git" - url = 'ssh://%s%s%s/%s.git' % (m.group(2) or 'git@', m.group(6), m.group(7) or '', m.group(8)) # convert to common ssh URL-like format + url = 'ssh://%s%s%s/%s' % (m.group(2) or 'git@', m.group(6), m.group(7) or '', m.group(8)) # convert to common ssh URL-like format m = re.match(regex_repo_url, url) if m:
Preserve port in repo URLs when striping out auth strings
diff --git a/lib/hatchet/reaper.rb b/lib/hatchet/reaper.rb index <HASH>..<HASH> 100644 --- a/lib/hatchet/reaper.rb +++ b/lib/hatchet/reaper.rb @@ -35,6 +35,17 @@ module Hatchet else # do nothing end + + # If the app is already deleted an exception + # will be raised, if the app cannot be found + # assume it is already deleted and try again + rescue Excon::Error::NotFound => e + body = e.response.body + if body =~ /Couldn\'t find that app./ + puts "#{@message}, but looks like it was already deleted" + retry + end + raise e end def destroy_oldest @@ -50,7 +61,8 @@ module Hatchet end def destroy_by_id(name:, id:, details: "") - puts "Destroying #{name.inspect}: #{id}. #{details}" + @message = "Destroying #{name.inspect}: #{id}. #{details}" + puts @message @platform_api.app.delete(id) end
Fix double deletes When running multiple test workers against the same account it’s possible that two of them try to delete the same app, when this happens we should not be raising an error, but instead see if the user is under the “threshold”, if they are do nothing, if not the next app should be removed. Repeat until the user is under the threshold.
diff --git a/test/unit/isValidProxy.js b/test/unit/isValidProxy.js index <HASH>..<HASH> 100644 --- a/test/unit/isValidProxy.js +++ b/test/unit/isValidProxy.js @@ -46,7 +46,7 @@ describe('isValidProxy(proxy)', function() { { ipAddress: '127.0.0.1', port: 8888, - protocols: null + protocols: ['invalid'], }, { ipAddress: '127.0.0.1', @@ -63,7 +63,7 @@ describe('isValidProxy(proxy)', function() { { ipAddress: '127.0.0.1', port: 80, - anonymityLevel: null + anonymityLevel: 'invalid' } ];
Null values are not considered "set"
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -11,6 +11,6 @@ module.exports = function(source) { } return source.replace(templateUrlRegex, function(match, url, ending) { - return 'template: require("' + path.posix.join(basePath, url) + '")' + ending; + return 'template: require(' + loaderUtils.stringifyRequest(this, path.posix.join(basePath, url)) + ')' + ending; }); };
Update index.js closes #1
diff --git a/__tests__/config.test.js b/__tests__/config.test.js index <HASH>..<HASH> 100644 --- a/__tests__/config.test.js +++ b/__tests__/config.test.js @@ -84,6 +84,7 @@ describe('jest configuration', () => { afterAll(() => { process.chdir(process.env.PLUGIN_TEST_DIR); + jest.unmock('serverless/lib/classes/CLI'); }); it('passes the serverless jest config through to jest', async () => {
Make sure serverless CLI is unmocked after config test
diff --git a/plugins/logger/index.js b/plugins/logger/index.js index <HASH>..<HASH> 100644 --- a/plugins/logger/index.js +++ b/plugins/logger/index.js @@ -1,8 +1,9 @@ var zlib = require('zlib'), fs = require('fs'); -var robohydra = require('robohydra'), - RoboHydraHead = robohydra.heads.RoboHydraHead, - Response = robohydra.Response; +var robohydra = require('robohydra'), + RoboHydraHead = robohydra.heads.RoboHydraHead, + Request = robohydra.Request, + Response = robohydra.Response; function printResponseBody(logFileFd, responseBody) { @@ -97,10 +98,13 @@ function getBodyParts(config) { name: 'logger', path: '/.*', handler: function(req, res, next) { + // Save the original request as it can be modified before + // the response object end callback gets executed + var origRequest = new Request(req); var fakeRes = new Response( function() { logRequestResponse(logFileFd, - req, + origRequest, fakeRes, function() { res.copyFrom(fakeRes);
Log the original request, not the possibly-modified
diff --git a/src/Filesystem/Command/FilesystemLsCommand.php b/src/Filesystem/Command/FilesystemLsCommand.php index <HASH>..<HASH> 100755 --- a/src/Filesystem/Command/FilesystemLsCommand.php +++ b/src/Filesystem/Command/FilesystemLsCommand.php @@ -119,7 +119,11 @@ class FilesystemLsCommand extends Command private function getFileMetadata($filesystem, $path) { if ('.' !== $path) { - $metaData = $filesystem->getMetadata($path); + try { + $metaData = $filesystem->getMetadata($path); + } catch (\Exception $e) { + // Do nothing. Assume this is a directory since some filesystems will not return metadata for directories + } } if (empty($metaData)) {
Added exception handling for file system which throw an exception when getting metadata for a directory