diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/test/lib/migrator_test.rb b/test/lib/migrator_test.rb index <HASH>..<HASH> 100644 --- a/test/lib/migrator_test.rb +++ b/test/lib/migrator_test.rb @@ -21,7 +21,7 @@ class MigratorTest < ActiveSupport::TestCase sub_test_case '.run_migrations' do setup do - FileUtils.touch Rails.root.join('db/migrate/20999999999999_create_foobars.rb') + File.write Rails.root.join('db/migrate/20999999999999_create_foobars.rb'), 'class CreateFoobars < ActiveRecord::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[5.0] : ActiveRecord::Migration; end' mock(ActiveRecord::Migrator).run(:up, ['db/migrate'], 20999999999999) mock(ActiveRecord::SchemaDumper).dump(ActiveRecord::Base.connection, anything) end
AR <I> requires each migration file to define a real migration class
diff --git a/runtime/classes/propel/util/BasePeer.php b/runtime/classes/propel/util/BasePeer.php index <HASH>..<HASH> 100644 --- a/runtime/classes/propel/util/BasePeer.php +++ b/runtime/classes/propel/util/BasePeer.php @@ -557,7 +557,7 @@ class BasePeer $stmt->bindValue(':p'.$i++, null, PDO::PARAM_NULL); - } else { + } elseif (isset($tableMap) ) { $cMap = $dbMap->getTable($tableName)->getColumn($columnName); $type = $cMap->getType(); @@ -591,6 +591,8 @@ class BasePeer } $stmt->bindValue(':p'.$i++, $value, $pdoType); + } else { + $stmt->bindValue(':p'.$i++, $value); } } // foreach }
Added support for populating with params without table names, allows adding for example a count(somecol) as result to the selectcolumns of a criteria and then using addHaving(->getNewCriterion(found, 3))
diff --git a/src/Illuminate/Console/Scheduling/Event.php b/src/Illuminate/Console/Scheduling/Event.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Console/Scheduling/Event.php +++ b/src/Illuminate/Console/Scheduling/Event.php @@ -601,10 +601,10 @@ class Event { { throw new LogicException("Must direct output to a file in order to e-mail results."); } - + $addresses = is_array($addresses) ? $addresses : func_get_args(); return $this->then(function(Mailer $mailer) use ($addresses) { - $this->emailOutput($mailer, is_array($addresses) ? $addresses : func_get_args()); + $this->emailOutput($mailer, $addresses); }); }
Update Event.php func_get_args() wrapped in an anonymous function will not receive args from method.
diff --git a/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/configuration/GraphDatabaseConfiguration.java b/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/configuration/GraphDatabaseConfiguration.java index <HASH>..<HASH> 100644 --- a/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/configuration/GraphDatabaseConfiguration.java +++ b/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/configuration/GraphDatabaseConfiguration.java @@ -415,7 +415,7 @@ public class GraphDatabaseConfiguration { * Ganglia data. Setting this config key has no effect unless * {@link #GANGLIA_INTERVAL} is also set. */ - public static final String GANGLIA_HOST_OR_GROUP = "host"; + public static final String GANGLIA_HOST_OR_GROUP = "hostname"; /** * The number of milliseconds to wait between sending Metrics data to the
Rename metrics.ganglia.host to .hostname Matches storage.hostname. There's no technical reason they have to match, I'm just trying to stick to precedent.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -61,6 +61,7 @@ setup( "pytz>=2017.2", "six>=1.10.0", "sqlalchemy>=1.3.0,<2", + "cached-property>=1.5.1,<2", ], extras_require={':python_version<"3.7"': ["dataclasses>=0.6"],}, classifiers=[
Sync setup.py with Pipfile (#<I>) * Sync setup.py with Pipfile * Address comment
diff --git a/src/livestreamer/plugins/ustreamtv.py b/src/livestreamer/plugins/ustreamtv.py index <HASH>..<HASH> 100644 --- a/src/livestreamer/plugins/ustreamtv.py +++ b/src/livestreamer/plugins/ustreamtv.py @@ -360,9 +360,16 @@ class UStreamTV(Plugin): for stream_index, stream_info in enumerate(provider_streams): stream = None stream_height = int(stream_info.get("height", 0)) - stream_name = (stream_info.get("description") or - (stream_height > 0 and "{0}p".format(stream_height)) or - "live") + stream_name = stream_info.get("description") + + if not stream_name: + if stream_height: + if not stream_info.get("isTranscoded"): + stream_name = "{0}p+".format(stream_height) + else: + stream_name = "{0}p".format(stream_height) + else: + stream_name = "live" if stream_name in streams: provider_name_clean = provider_name.replace("uhs_", "")
plugins.ustreamtv: Fix missing transcode streams. If a transcode is the same resolution as the source stream it does not get added to the list of streams.
diff --git a/lib/sfrest/task.rb b/lib/sfrest/task.rb index <HASH>..<HASH> 100644 --- a/lib/sfrest/task.rb +++ b/lib/sfrest/task.rb @@ -161,15 +161,13 @@ module SFRest end # Pauses a specific task identified by its task id. - # CURRENTLY NOT FUNCTIONING, ISSUES WITH REST TASK-PAUSING FUNCTIONALITY. def pause_task(task_id, level = 'family') current_path = '/api/v1/pause/' << task_id.to_s payload = { 'paused' => true, 'level' => level }.to_json @conn.post(current_path, payload) end - # Pauses a specific task identified by its task id. - # CURRENTLY NOT FUNCTIONING, ISSUES WITH REST TASK-PAUSING FUNCTIONALITY. + # Resumes a specific task identified by its task id. def resume_task(task_id, level = 'family') current_path = '/api/v1/pause/' << task_id.to_s payload = { 'paused' => false, 'level' => level }.to_json
DG-<I> clean out cruft since pause and resume for a specific task works now.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -24,14 +24,14 @@ setup( 'Topic :: Text Processing :: Linguistic', 'Topic :: Utilities', ], - description=('NLP support for Classical languages.'), + description='NLP support for Classical languages.', install_requires=['astroid', 'nltk', 'gnureadline', 'readline', 'requests', 'requests-toolbelt', - 'numpy'], + 'numpy', 'cltk'], keywords=['nlp', 'nltk', 'greek', 'latin'], license='MIT', long_description="The Classical Language Toolkit (CLTK) is a framework for natural language processing for Classical languages.", # pylint: disable=C0301
add cltk to reqs, cleanup
diff --git a/src/main/org/openscience/cdk/graph/ConnectivityChecker.java b/src/main/org/openscience/cdk/graph/ConnectivityChecker.java index <HASH>..<HASH> 100644 --- a/src/main/org/openscience/cdk/graph/ConnectivityChecker.java +++ b/src/main/org/openscience/cdk/graph/ConnectivityChecker.java @@ -62,6 +62,10 @@ public class ConnectivityChecker @TestMethod("testIsConnected_IAtomContainer,testPartitionIntoMolecules_IsConnected_Consistency") public static boolean isConnected(IAtomContainer atomContainer) { + // with one atom or less, we define it to be connected, as there is no + // partitioning needed + if (atomContainer.getAtomCount() < 2) return true; + IAtomContainer newContainer = atomContainer.getBuilder().newAtomContainer(); IMolecule molecule = atomContainer.getBuilder().newMolecule(); List<IAtom> sphere = new ArrayList<IAtom>();
With one atom or less, we define it to be connected, as there is no partitioning needed (fixes #<I>, NullPointerException on IAtomContainer with no atoms)
diff --git a/lib/jwt.rb b/lib/jwt.rb index <HASH>..<HASH> 100644 --- a/lib/jwt.rb +++ b/lib/jwt.rb @@ -220,14 +220,14 @@ module JWT end def raw_to_asn1(signature, private_key) - byte_size = (private_key.group.degree / 8.0).ceil + byte_size = (private_key.group.degree + 7) / 8 r = signature[0..(byte_size - 1)] s = signature[byte_size..-1] OpenSSL::ASN1::Sequence.new([r, s].map { |int| OpenSSL::ASN1::Integer.new(OpenSSL::BN.new(int, 2)) }).to_der end def asn1_to_raw(signature, public_key) - byte_size = (public_key.group.degree / 8.0).ceil + byte_size = (public_key.group.degree + 7) / 8 OpenSSL::ASN1.decode(signature).value.map { |value| value.value.to_s(2).rjust(byte_size, "\x00") }.join end end
Use integer division in ECDSA signature conversion method
diff --git a/bokeh/properties.py b/bokeh/properties.py index <HASH>..<HASH> 100644 --- a/bokeh/properties.py +++ b/bokeh/properties.py @@ -168,7 +168,8 @@ class PropertyDescriptor(PropertyGenerator): return default() def _raw_default(self): - """The raw_default() needs to be validated and transformed by prepare_value() before use. Prefer prepared_default().""" + """The raw_default() needs to be validated and transformed by prepare_value() + before use. Prefer prepared_default().""" return self._copy_default(self._default) def prepared_default(self, cls, name):
Wrap long line in properties.py
diff --git a/chef/lib/chef/index_queue/amqp_client.rb b/chef/lib/chef/index_queue/amqp_client.rb index <HASH>..<HASH> 100644 --- a/chef/lib/chef/index_queue/amqp_client.rb +++ b/chef/lib/chef/index_queue/amqp_client.rb @@ -68,6 +68,7 @@ class Chef end def disconnected! + Chef::Log.error("Disconnected from the AMQP Broker (RabbitMQ)") @amqp_client = nil reset! end @@ -76,12 +77,15 @@ class Chef retries = 0 begin exchange.publish({"action" => action.to_s, "payload" => data}.to_json) - rescue Bunny::ServerDownError, Bunny::ConnectionError, Errno::ECONNRESET => e - Chef::Log.error("Disconnected from the AMQP Broker, cannot queue data to the indexer") + rescue Bunny::ServerDownError, Bunny::ConnectionError, Errno::ECONNRESET disconnected! - retryies += 1 - retry unless retryies > 1 - raise e + if (retries += 1) < 2 + Chef::Log.info("Attempting to reconnect to the AMQP broker") + retry + else + Chef::Log.fatal("Could not re-connect to the AMQP broker, giving up") + raise + end end end
[CHEF-<I>] fix typos in amqp retry patch
diff --git a/peyotl/amendments/validation/adaptor.py b/peyotl/amendments/validation/adaptor.py index <HASH>..<HASH> 100644 --- a/peyotl/amendments/validation/adaptor.py +++ b/peyotl/amendments/validation/adaptor.py @@ -80,7 +80,7 @@ class AmendmentValidationAdaptor(object): if isinstance(self._curator, dict): for k in self._curator.keys(): try: - assert k in ['login', 'name'] + assert k in ['login', 'name', 'email',] except: errors.append("Unexpected key '{k}' found in curator".format(k=k)) if 'login' in self._curator: @@ -93,6 +93,12 @@ class AmendmentValidationAdaptor(object): assert isinstance(self._curator.get('login'), string_types) except: errors.append("Curator 'login' should be a string") + if 'email' in self._curator: + try: + assert isinstance(self._curator.get('email'), string_types) + except: + # TODO: Attempt to validate as an email address? + errors.append("Curator 'email' should be a string (a valid email address)") # test for a valid date_created (should be valid ISO 8601) self._date_created = obj.get('date_created')
Update validation to accept 'curator.email' field
diff --git a/git/cmd.py b/git/cmd.py index <HASH>..<HASH> 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -609,6 +609,12 @@ class Git(LazyMixin): # end handle try: + if sys.platform == 'win32': + CREATE_NO_WINDOW = 0x08000000 + creationflags = CREATE_NO_WINDOW + else: + creationflags = None + proc = Popen(command, env=env, cwd=cwd, @@ -619,6 +625,7 @@ class Git(LazyMixin): shell=self.USE_SHELL, close_fds=(os.name == 'posix'), # unsupported on windows universal_newlines=universal_newlines, + creationflags=creationflags, **subprocess_kwargs ) except cmd_not_found_exception as err: @@ -629,7 +636,13 @@ class Git(LazyMixin): def _kill_process(pid): """ Callback method to kill a process. """ - p = Popen(['ps', '--ppid', str(pid)], stdout=PIPE) + if sys.platform == 'win32': + CREATE_NO_WINDOW = 0x08000000 + creationflags = CREATE_NO_WINDOW + else: + creationflags = None + + p = Popen(['ps', '--ppid', str(pid)], stdout=PIPE, creationflags) child_pids = [] for line in p.stdout: if len(line.split()) > 0:
Prevent CMD windows being shown when starting git in a subprocess. This fixes a UI problem with using GitPython from a GUI python probgram. Each repo that is opened creates a git cat-file processs and that provess will create a console window with out this change.
diff --git a/tasks.py b/tasks.py index <HASH>..<HASH> 100644 --- a/tasks.py +++ b/tasks.py @@ -36,6 +36,10 @@ def test(ctx): @task def publish_coverage(ctx): if Utils.get_branch() == "master": + print("Downloading AWS CLI") + for line in cli.pull('garland/aws-cli-docker:latest', stream=True): + pass + Docker.run( cli, tag="garland/aws-cli-docker:latest",
downloading aws cli image first
diff --git a/clientv3/main_test.go b/clientv3/main_test.go index <HASH>..<HASH> 100644 --- a/clientv3/main_test.go +++ b/clientv3/main_test.go @@ -15,10 +15,12 @@ package clientv3_test import ( + "fmt" "os" "regexp" "strings" "testing" + "time" "github.com/coreos/etcd/auth" "github.com/coreos/etcd/integration" @@ -50,6 +52,10 @@ func TestMain(m *testing.M) { } v = m.Run() clus.Terminate(nil) + if err := testutil.CheckAfterTest(time.Second); err != nil { + fmt.Fprintf(os.Stderr, "%v", err) + os.Exit(1) + } } else { v = m.Run() }
clientv3: use CheckAfterTest after terminating cluster AfterTest() has a delay that waits for runtime goroutines to exit; CheckLeakedGoroutine does not. Since the test runner manages the test cluster for examples, there is no delay between terminating the cluster and checking for leaked goroutines. Instead, apply Aftertest checking before running CheckLeakedGoroutine to let runtime http goroutines finish.
diff --git a/xchange-bitbay/src/main/java/com/xeiam/xchange/bitbay/BitbayAdapters.java b/xchange-bitbay/src/main/java/com/xeiam/xchange/bitbay/BitbayAdapters.java index <HASH>..<HASH> 100644 --- a/xchange-bitbay/src/main/java/com/xeiam/xchange/bitbay/BitbayAdapters.java +++ b/xchange-bitbay/src/main/java/com/xeiam/xchange/bitbay/BitbayAdapters.java @@ -88,7 +88,7 @@ public class BitbayAdapters { for (BitbayTrade bitbayTrade : bitbayTrades) { - Trade trade = new Trade(null, bitbayTrade.getAmount(), currencyPair, bitbayTrade.getPrice(), new Date(bitbayTrade.getDate()), + Trade trade = new Trade(null, bitbayTrade.getAmount(), currencyPair, bitbayTrade.getPrice(), new Date(bitbayTrade.getDate()*1000), bitbayTrade.getTid()); tradeList.add(trade);
Fix bitbay trade timestamp. Bitbay use unix timestamp so we need to multiply it to <I>.
diff --git a/app/controllers/providers_controller.rb b/app/controllers/providers_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/providers_controller.rb +++ b/app/controllers/providers_controller.rb @@ -73,7 +73,10 @@ class ProvidersController < ApplicationController display_message = parse_display_message(error.response) error_text = _("Subscription manifest upload for provider '%{name}' failed." % {:name => @provider.name}) error_text += _("%{newline}Reason: %{reason}" % {:reason => display_message, :newline => "<br />"}) unless display_message.blank? - error_text += _("%{newline}If you are uploading an older manifest, you can use the Force checkbox to overwrite existing data." % { :newline => "<br />"}) + # In some cases, force_update will allow the manifest to be uploaded when it normally would not + if force_update == "false" + error_text += _("%{newline}If you are uploading an older manifest, you can use the Force checkbox to overwrite existing data." % { :newline => "<br />"}) + end notice error_text, {:level => :error} Rails.logger.error "error uploading subscriptions." Rails.logger.error error
<I> - show error message suggesting use of force upload not shown when force upload is already set
diff --git a/addons/docs/src/frameworks/ember/jsondoc.js b/addons/docs/src/frameworks/ember/jsondoc.js index <HASH>..<HASH> 100644 --- a/addons/docs/src/frameworks/ember/jsondoc.js +++ b/addons/docs/src/frameworks/ember/jsondoc.js @@ -10,7 +10,14 @@ export const getJSONDoc = () => { export const extractArgTypes = (componentName) => { const json = getJSONDoc(); + if (!(json && json.included)) { + return {}; + } const componentDoc = json.included.find((doc) => doc.attributes.name === componentName); + + if (!componentDoc) { + return ''; + } const rows = componentDoc.attributes.arguments.map((prop) => { return { name: prop.name, @@ -29,6 +36,9 @@ export const extractArgTypes = (componentName) => { export const extractComponentDescription = (componentName) => { const json = getJSONDoc(); + if (!(json && json.included)) { + return {}; + } const componentDoc = json.included.find((doc) => doc.attributes.name === componentName); if (!componentDoc) {
return early when there's no JSDoc for a component
diff --git a/lib/multirepo/files/tracking-files.rb b/lib/multirepo/files/tracking-files.rb index <HASH>..<HASH> 100644 --- a/lib/multirepo/files/tracking-files.rb +++ b/lib/multirepo/files/tracking-files.rb @@ -12,7 +12,7 @@ module MultiRepo def self.stage FILE_CLASSES.each do |c| - Git.run_in_current_dir("add -A #{c::FILENAME}", Runner::Verbosity::OUTPUT_ON_ERROR) + Git.run_in_current_dir("add --force #{c::FILENAME}", Runner::Verbosity::OUTPUT_ON_ERROR) end end
Force-adding tracking files, in case projects' gitignore patterns match important multirepo files.
diff --git a/mbed/mbed.py b/mbed/mbed.py index <HASH>..<HASH> 100644 --- a/mbed/mbed.py +++ b/mbed/mbed.py @@ -871,7 +871,7 @@ class Repo(object): if rev is None or len(rev) == 0: return 'latest' + (' revision in the current branch' if ret_rev else '') elif re.match(r'^([a-zA-Z0-9]{12,40})$', rev) or re.match(r'^([0-9]+)$', rev): - return 'rev' + (' #'+rev if ret_rev else '') + return 'rev' + (' #'+rev[0:12] if ret_rev else '') else: return 'branch' + (' '+rev if ret_rev else '')
Use <I>byte revision hashes in reports for consistency with developer.mbed.org .lib references use full <I>byte hashes
diff --git a/commands/application.angular.js b/commands/application.angular.js index <HASH>..<HASH> 100644 --- a/commands/application.angular.js +++ b/commands/application.angular.js @@ -36,7 +36,7 @@ const create = (appName, options) => { }; const addTemplate = (appName, options, evaluatingOptions) => { - runSchematicCommand(`add-app-template --project=${appName}`, options, evaluatingOptions); + runSchematicCommand(`add-app-template --project=${appName} --overwriteAppComponent`, options, evaluatingOptions); }; const addView = (viewName, options) => {
Add overwriteAppComand option to command (#<I>)
diff --git a/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java b/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java index <HASH>..<HASH> 100644 --- a/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java +++ b/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java @@ -236,6 +236,10 @@ public class RemoteWebDriver implements WebDriver, JavascriptExecutor, startSession(desiredCapabilities, null); } + /** + * @deprecated Use {@link #startSession(Capabilities)} instead. + */ + @Deprecated @SuppressWarnings({"unchecked"}) protected void startSession(Capabilities desiredCapabilities, Capabilities requiredCapabilities) {
No logical change: marking a method deprecated
diff --git a/contacts.js b/contacts.js index <HASH>..<HASH> 100644 --- a/contacts.js +++ b/contacts.js @@ -1,4 +1,5 @@ var Reduce = require('flumeview-reduce') +var isFeed = require('ssb-ref').isFeed //track contact messages, follow, unfollow, block module.exports = function (sbot, createLayer, config) { @@ -7,7 +8,7 @@ module.exports = function (sbot, createLayer, config) { var initial = false var hops = {} hops[sbot.id] = 0 - var index = sbot._flumeUse('contacts2', Reduce(3, function (g, data) { + var index = sbot._flumeUse('contacts2', Reduce(4, function (g, data) { if(!initial) { initial = true layer(g = g || {}) @@ -20,7 +21,7 @@ module.exports = function (sbot, createLayer, config) { data.value.content.following === false ? -2 : data.value.content.blocking || data.value.content.flagged ? -1 : null - if(from && to && value != null) + if(isFeed(from) && isFeed(to) && value != null) return layer(from, to, value) return g }))
check that follow types are really ids, sometimes people manually following forget and use @names
diff --git a/moco-runner/src/main/java/com/github/dreamhead/moco/parser/model/DynamicResponseHandlerFactory.java b/moco-runner/src/main/java/com/github/dreamhead/moco/parser/model/DynamicResponseHandlerFactory.java index <HASH>..<HASH> 100644 --- a/moco-runner/src/main/java/com/github/dreamhead/moco/parser/model/DynamicResponseHandlerFactory.java +++ b/moco-runner/src/main/java/com/github/dreamhead/moco/parser/model/DynamicResponseHandlerFactory.java @@ -144,7 +144,7 @@ public class DynamicResponseHandlerFactory extends Dynamics implements ResponseH public ResponseHandler apply(final Map.Entry<String, TextContainer> pair) { String result = COMPOSITES.get(name); if (result == null) { - throw new RuntimeException("unknown composite handler name [" + name + "]"); + throw new IllegalArgumentException("unknown composite handler name [" + name + "]"); } return createResponseHandler(pair, result);
replaced exception with illegal argument exception in dynamic response handler factory
diff --git a/src/Helper/ExportHelper.php b/src/Helper/ExportHelper.php index <HASH>..<HASH> 100644 --- a/src/Helper/ExportHelper.php +++ b/src/Helper/ExportHelper.php @@ -47,6 +47,7 @@ class ExportHelper extends AbstractExportHelper { /** * @inheritdoc + * @suppress PhanAccessMethodInternal */ public function encrypt($secret, $data) { diff --git a/src/Helper/IframeHelper.php b/src/Helper/IframeHelper.php index <HASH>..<HASH> 100644 --- a/src/Helper/IframeHelper.php +++ b/src/Helper/IframeHelper.php @@ -58,7 +58,7 @@ final class IframeHelper extends AbstractHelper * * @param IframeInterface $iframe the iframe meta data. * @param AccountInterface|null $account the configuration to return the url for. - * @param UserInterface $user + * @param UserInterface|null $user * @param array $params additional parameters to add to the iframe url. * @return string the iframe url. */
Fix Annotations and Suppress Phan internal method warning in phpseclib
diff --git a/clientv3/watch.go b/clientv3/watch.go index <HASH>..<HASH> 100644 --- a/clientv3/watch.go +++ b/clientv3/watch.go @@ -711,7 +711,11 @@ func (w *watchGrpcStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan str ws.closing = true close(ws.outc) ws.outc = nil - go func() { w.closingc <- ws }() + w.wg.Add(1) + go func() { + defer w.wg.Done() + w.closingc <- ws + }() case <-stopc: } }(w.resuming[i])
clientv3: register waitCancelSubstreams closingc goroutine with waitgroup Fixes #<I>
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -104,7 +104,7 @@ var amigo_url = a['AMIGO_DYNAMIC_URL'].value; var golr_private_url = a['AMIGO_PRIVATE_GOLR_URL'].value; var owltools_max_memory = a['OWLTOOLS_MAX_MEMORY'].value || '4G'; var owltools_runner = 'java -Xms2048M -DentityExpansionLimit=4086000 -Djava.awt.headless=true -Xmx' + owltools_max_memory + ' -jar ./java/lib/owltools-runner-all.jar'; -var owltools_ops_flags = '--merge-support-ontologies --remove-subset-entities upperlevel --remove-disjoints --reasoner elk --silence-elk'; +var owltools_ops_flags = '--merge-support-ontologies --remove-subset-entities upperlevel --remove-disjoints --silence-elk --reasoner elk'; var metadata_list = _tilde_expand_list(a['GOLR_METADATA_LIST'].value); var metadata_string = metadata_list.join(' '); var ontology_metadata = tilde(a['GOLR_METADATA_ONTOLOGY_LOCATION'].value);
order changed on comment from heiko
diff --git a/item.go b/item.go index <HASH>..<HASH> 100644 --- a/item.go +++ b/item.go @@ -98,6 +98,10 @@ func (item *Item) Len() int { return item.length } +func (item *Item) Space() int { + return len(item.bytes) - item.length +} + func (item *Item) TrimLastIf(b byte) bool { l := item.Len() - 1 if l == -1 || item.bytes[l] != b { diff --git a/item_test.go b/item_test.go index <HASH>..<HASH> 100644 --- a/item_test.go +++ b/item_test.go @@ -164,3 +164,12 @@ func (i *ItemTests) CloneDetachesTheObject() { item.Raw()[0] = '!' Expect(actual[0]).To.Equal(byte('o')) } + +func (i *ItemTests) ReturnsTheAvailableSpace() { + item := NewItem(10, nil) + Expect(item.Space()).To.Equal(10) + item.WriteString("hello") + Expect(item.Space()).To.Equal(5) + item.WriteString("world") + Expect(item.Space()).To.Equal(0) +}
Can call item.Space() to see how much space is left.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -127,7 +127,7 @@ def package_assets(example_path): ### dependencies ### _required = [ - 'bokeh >=0.12.13', # not strictly required but shouldn't be problematic + 'bokeh >=0.12.15', # not strictly required but shouldn't be problematic 'cartopy >=0.14.2', # prevents pip alone (requires external package manager) 'holoviews >=1.10.1', 'numpy >=1.0',
Bumped bokeh version requirement
diff --git a/util/pkg/vfs/gsfs.go b/util/pkg/vfs/gsfs.go index <HASH>..<HASH> 100644 --- a/util/pkg/vfs/gsfs.go +++ b/util/pkg/vfs/gsfs.go @@ -19,7 +19,6 @@ package vfs import ( "bytes" "encoding/base64" - "encoding/hex" "fmt" "io" "net/http" @@ -351,7 +350,7 @@ func (p *GSPath) Hash(a hashing.HashAlgorithm) (*hashing.Hash, error) { return nil, nil } - md5Bytes, err := hex.DecodeString(md5) + md5Bytes, err := base64.StdEncoding.DecodeString(md5) if err != nil { return nil, fmt.Errorf("Etag was not a valid MD5 sum: %q", md5) }
Google Cloud Storage md5 decoding fix The MD5 is presented base<I> encoded; we were trying to decode it as hex.
diff --git a/api-server.py b/api-server.py index <HASH>..<HASH> 100755 --- a/api-server.py +++ b/api-server.py @@ -58,7 +58,7 @@ def custom_background_code(): def main(): parser = argparse.ArgumentParser() - group = parser.add_mutually_exclusive_group() + group = parser.add_mutually_exclusive_group(required=True) group.add_argument("-m", "--mainnet", action="store_true", default=False, help="Use MainNet instead of the default TestNet") group.add_argument("-p", "--privnet", action="store_true", default=False,
need to manually specify the network to run on
diff --git a/tests/system/Database/Live/ModelTest.php b/tests/system/Database/Live/ModelTest.php index <HASH>..<HASH> 100644 --- a/tests/system/Database/Live/ModelTest.php +++ b/tests/system/Database/Live/ModelTest.php @@ -212,7 +212,7 @@ class ModelTest extends CIDatabaseTestCase $record = $model->first(); - $this->assertEquals(1, count($record)); + $this->assertInstanceOf('stdClass', $record); $this->assertEquals('foo', $record->key); }
Fix tests for no primary key first call.
diff --git a/lib/Doctrine/MongoDB/Query/Builder.php b/lib/Doctrine/MongoDB/Query/Builder.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/MongoDB/Query/Builder.php +++ b/lib/Doctrine/MongoDB/Query/Builder.php @@ -566,8 +566,8 @@ class Builder /** * Set sort and erase all old sorts. * - * @param $fieldName - * @param null $order + * @param string $fieldName + * @param string $order * @return Builder */ public function sort($fieldName, $order = null) @@ -613,8 +613,8 @@ class Builder /** * Specify a map reduce operation for this query. * - * @param $map - * @param $reduce + * @param string $map + * @param string $reduce * @param array $out * @param array $options * @return Builder
Added parameter types wherver it was missing in PHPDoc blocks.
diff --git a/lib/active_remote/rpc.rb b/lib/active_remote/rpc.rb index <HASH>..<HASH> 100644 --- a/lib/active_remote/rpc.rb +++ b/lib/active_remote/rpc.rb @@ -13,8 +13,7 @@ module ActiveRemote # Execute an RPC call to the remote service and return the raw response. # def remote_call(rpc_method, request_args) - remote = self.new - remote.execute(rpc_method, request_args) + rpc.execute(rpc_method, request_args) end # Return a protobuf request object for the given rpc request. @@ -32,6 +31,12 @@ module ActiveRemote def request_type(rpc_method) service_class.rpcs[rpc_method].request_type end + + # TODO: Make this a first class citizen instead of embedding it inside + # the remote class + def rpc + self.new + end end # Invoke an RPC call to the service for the given rpc method. @@ -58,7 +63,11 @@ module ActiveRemote # Execute an RPC call to the remote service and return the raw response. # def remote_call(rpc_method, request_args) - self.execute(rpc_method, request_args) + rpc.execute(rpc_method, request_args) + end + + def rpc + self.class.rpc end private
Execute RPC calls using .rpc instead of instances Currently, the RPC module is mixed into ARem::Base. This is a bad pattern that couples the RPC layer with the data model. Instead, there should be a clean separation much like AR's database connection. This is the first step in unraveling all the things.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -8,8 +8,8 @@ setup( version=version, author='Tarken', author_email='?', - maintainer = 'Mikhail Korobov', - maintainer_email='kmike84@gmail.com', +# maintainer = 'Mikhail Korobov', +# maintainer_email='kmike84@gmail.com', packages=['excel_response'],
pypi shows me instead of Tarken if maintainer meta info is in distutils options.
diff --git a/pyramid_swagger/__about__.py b/pyramid_swagger/__about__.py index <HASH>..<HASH> 100644 --- a/pyramid_swagger/__about__.py +++ b/pyramid_swagger/__about__.py @@ -12,7 +12,7 @@ __title__ = "pyramid_swagger" __summary__ = "Swagger tools for use in pyramid webapps" __uri__ = "" -__version__ = "0.3.2" +__version__ = "0.4.0" __author__ = "Scott Triglia" __email__ = "striglia@yelp.com"
Bump to <I> now that path validation is implemented
diff --git a/werkzeug/wrappers.py b/werkzeug/wrappers.py index <HASH>..<HASH> 100644 --- a/werkzeug/wrappers.py +++ b/werkzeug/wrappers.py @@ -1003,13 +1003,13 @@ class BaseResponse(object): the cookie should last only as long as the client's browser session. :param expires: should be a `datetime` object or UNIX timestamp. + :param path: limits the cookie to a given path, per default it will + span the whole domain. :param domain: if you want to set a cross-domain cookie. For example, ``domain=".example.com"`` will set a cookie that is readable by the domain ``www.example.com``, ``foo.example.com`` etc. Otherwise, a cookie will only be readable by the domain that set it. - :param path: limits the cookie to a given path, per default it will - span the whole domain. :param secure: If `True`, the cookie will only be available via HTTPS :param httponly: disallow JavaScript to access the cookie. This is an extension to the cookie standard and probably not
Reorder `path` param docstring in set_cookie This is minor change which simply reorders the parameter documention in BaseResponse.set_cookie such that the order matches the order in which the parameters are defined in the method signature.
diff --git a/billy/site/urls.py b/billy/site/urls.py index <HASH>..<HASH> 100644 --- a/billy/site/urls.py +++ b/billy/site/urls.py @@ -3,4 +3,5 @@ from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^api/', include('billy.site.api.urls')), (r'^browse/', include('billy.site.browse.urls')), + (r'^web/', include('billy.site.web.urls')), )
included /web/ urls
diff --git a/openquake/hazardlib/imt.py b/openquake/hazardlib/imt.py index <HASH>..<HASH> 100644 --- a/openquake/hazardlib/imt.py +++ b/openquake/hazardlib/imt.py @@ -20,7 +20,7 @@ types. import operator -__all__ = ('PGA', 'PGV', 'PGD', 'SA', 'IA', 'CSV', 'RSD', 'MMI') +__all__ = ('PGA', 'PGV', 'PGD', 'SA', 'IA', 'CAV', 'RSD', 'MMI') class _IMT(tuple):
Fixes error in imt file - CSV changed to CAV
diff --git a/test/RedisCommandsTest.php b/test/RedisCommandsTest.php index <HASH>..<HASH> 100644 --- a/test/RedisCommandsTest.php +++ b/test/RedisCommandsTest.php @@ -1285,6 +1285,21 @@ class RedisCommandTestSuite extends PHPUnit_Framework_TestCase { ); $this->assertEquals(array(1, 2, 3, 10, 30, 100), $this->redis->listRange('ordered', 0, -1)); + // with parameter GET + $this->redis->pushTail('uids', 1003); + $this->redis->pushTail('uids', 1001); + $this->redis->pushTail('uids', 1002); + $this->redis->pushTail('uids', 1000); + $sortget = array( + 'uid:1000' => 'foo', 'uid:1001' => 'bar', + 'uid:1002' => 'hoge', 'uid:1003' => 'piyo' + ); + $this->redis->setMultiple($sortget); + $this->assertEquals( + array_values($sortget), + $this->redis->sort('uids', array('get' => 'uid:*')) + ); + // wront type RC::testForServerException($this, RC::EXCEPTION_WRONG_TYPE, function($test) { $test->redis->set('foo', 'bar');
Added missing test for SORT ... GET
diff --git a/lib/pg_search/features/tsearch.rb b/lib/pg_search/features/tsearch.rb index <HASH>..<HASH> 100644 --- a/lib/pg_search/features/tsearch.rb +++ b/lib/pg_search/features/tsearch.rb @@ -42,7 +42,7 @@ module PgSearch # If :prefix is true, then the term will have :* appended to the end. # If :negated is true, then the term will have ! prepended to the front. terms = [ - ('!' if negated), + (Compatibility.build_quoted('!') if negated), Compatibility.build_quoted("' "), term_sql, Compatibility.build_quoted(" '"),
Use Compatibility.build_quoted to fix <I> support The version of Arel that Active Record <I> uses requires string literals to be quoted.
diff --git a/notemplate.js b/notemplate.js index <HASH>..<HASH> 100644 --- a/notemplate.js +++ b/notemplate.js @@ -48,7 +48,7 @@ function getWindow(str) { window.setTimeout = function(fun, tt) { fun(); }; window.run(jquery); window.setTimeout = tempfun; - jqueryPatches(window.jQuery); + window.jQuery.ajax = window.jQuery.globalEval = function() {}; return window; } @@ -70,17 +70,6 @@ function outer($nodes) { return ret; } -function jqueryPatches($) { - // jQuery monkey-patch - $.buildFragmentOrig = $.buildFragment; - $.buildFragment = function(args, nodes, scripts) { - var r = $.buildFragmentOrig(args, nodes, scripts); - // or else script.contentText will be run, this is a security risk - if (Array.isArray(scripts)) scripts.length = 0; - return r; - }; -} - function merge(view, options, callback) { var window = view.window; var $ = window.$;
Disable jQuery ajax and globalEval, prevents some script tags to be prepended to head, or to be eval'd.
diff --git a/lib/svtplay_dl/subtitle/__init__.py b/lib/svtplay_dl/subtitle/__init__.py index <HASH>..<HASH> 100644 --- a/lib/svtplay_dl/subtitle/__init__.py +++ b/lib/svtplay_dl/subtitle/__init__.py @@ -2,10 +2,9 @@ import xml.etree.ElementTree as ET import json import re from svtplay_dl.log import log -from svtplay_dl.utils import is_py2, is_py3, decode_html_entities +from svtplay_dl.utils import is_py2, is_py3, decode_html_entities, HTTP from svtplay_dl.utils.io import StringIO from svtplay_dl.output import output -from requests import Session from requests import __build__ as requests_version import platform @@ -16,7 +15,7 @@ class subtitle(object): self.subtitle = None self.options = options self.subtype = subtype - self.http = Session() + self.http = HTTP(options) self.subfix = subfix def download(self):
subtitle: use HTTP from utils instead of requets.
diff --git a/pymongo/__init__.py b/pymongo/__init__.py index <HASH>..<HASH> 100644 --- a/pymongo/__init__.py +++ b/pymongo/__init__.py @@ -70,7 +70,7 @@ SLOW_ONLY = 1 ALL = 2 """Profile all operations.""" -version_tuple = (3, 0, 2, 'dev0') +version_tuple = (3, 0, 2, '.dev0') def get_version_string(): if isinstance(version_tuple[-1], str):
Start <I> with proper formatting.
diff --git a/src/App.php b/src/App.php index <HASH>..<HASH> 100644 --- a/src/App.php +++ b/src/App.php @@ -431,10 +431,12 @@ class App * Runs app and echo rendered template. * * @throws \atk4\core\Exception + * @throws ExitApplicationException */ public function run() { try { + $this->run_called = true; $this->hook('beforeRender'); $this->is_rendering = true; @@ -457,9 +459,11 @@ class App } echo $this->html->template->render(); - } catch(ExitApplicationException $e) - { + } catch (ExitApplicationException $e) { + $this->callExit(); + } catch (\Throwable $e) { + $this->caughtException($e); } } @@ -923,7 +927,16 @@ class App } if (!$this->run_called) { - $this->run(); + try { + $this->run(); + } catch (ExitApplicationException $e) { + // already in shutdown + } catch (\Exception $e) { + $this->caughtException($e); + } + + // call with true to trigger beforeExit event + $this->callExit(true); } } );
refactor on shutdown for ExitApplicationException
diff --git a/src/linear-converter.js b/src/linear-converter.js index <HASH>..<HASH> 100644 --- a/src/linear-converter.js +++ b/src/linear-converter.js @@ -82,7 +82,7 @@ module.exports = function factory(Decimal) { * @return {Boolean} whether the presets are equivalent or not */ api.equivalentPresets = function equivalentPresets(presetA, presetB) { - return [api.getCoefficientA, api.getCoefficientB].every(function(coefficient) { + return [api.getCoefficientB, api.getCoefficientA].every(function(coefficient) { return coefficient(presetA).equals(coefficient(presetB)); }); };
perf: check coef b for equiv first as it is less expensive
diff --git a/src/search/QuickOpen.js b/src/search/QuickOpen.js index <HASH>..<HASH> 100644 --- a/src/search/QuickOpen.js +++ b/src/search/QuickOpen.js @@ -264,7 +264,7 @@ define(function (require, exports, module) { (regInfo[1] && isNaN(regInfo[1])) || (regInfo[3] && isNaN(regInfo[3]))) { - return; + return null; } result = {
Return null instead of just undefined
diff --git a/src/Native5/Route/HttpRequest.php b/src/Native5/Route/HttpRequest.php index <HASH>..<HASH> 100644 --- a/src/Native5/Route/HttpRequest.php +++ b/src/Native5/Route/HttpRequest.php @@ -72,14 +72,11 @@ class HttpRequest implements Request * @param mixed $key Param to retrieve based on key * * @access public - * @return void + * @return mixed Request param value */ public function getParam($key) { - if(isset($this->_rawRequest[$key])) - return $this->_rawRequest[$key]; - return null; - + isset($this->_rawRequest[$key]) ? $this->_rawRequest[$key] : null; }//end getParam() @@ -97,6 +94,19 @@ class HttpRequest implements Request /** + * hasParam + * + * @param mixed $key Param to check based on key + * + * @access public + * @return boolean True if request has the param, false otherwise + */ + public function hasParam($key) + { + isset($this->_rawRequest[$key]) ? true : false; + } + + /** * setKeys * * @param mixed $keys Mandatory Keys or not.
Added hasParam method to HttpRequest
diff --git a/themes-root/pressbooks-publisher-one/pb-catalog.php b/themes-root/pressbooks-publisher-one/pb-catalog.php index <HASH>..<HASH> 100644 --- a/themes-root/pressbooks-publisher-one/pb-catalog.php +++ b/themes-root/pressbooks-publisher-one/pb-catalog.php @@ -250,7 +250,7 @@ $h1_title = __( 'Catalog', 'pressbooks' ); ?> </div> <!-- end .catalog-content--> <div class="footer"> - <p> <a href="/">PressBooks: the CMS for Books.</a></p> + <p> <a href="http://pressbooks.com">PressBooks: the CMS for Books.</a></p> </div> </div> <!-- end .catalog-content-wrap -->
Ticket #<I>: 6. footer should link to pressbooks.com
diff --git a/graftm/tree_decorator.py b/graftm/tree_decorator.py index <HASH>..<HASH> 100644 --- a/graftm/tree_decorator.py +++ b/graftm/tree_decorator.py @@ -228,7 +228,8 @@ class TreeDecorator: self._rename(node, '; '.join(tax_string_array)) node.tax = len(tax_string_array) logging.info("Writing decorated tree to file: %s" % output_tree) - self.tree.write(path=output_tree, schema="newick") + if output_tree: + self.tree.write(path=output_tree, schema="newick") if output_tax: self._write_consensus_strings(output_tax)
do not attempt to write tree if no output file is provided
diff --git a/rpc/lib/server/http_server.go b/rpc/lib/server/http_server.go index <HASH>..<HASH> 100644 --- a/rpc/lib/server/http_server.go +++ b/rpc/lib/server/http_server.go @@ -25,7 +25,7 @@ func StartHTTPServer(listenAddr string, handler http.Handler, logger log.Logger) } proto, addr = parts[0], parts[1] - logger.Info(fmt.Sprintf("Starting RPC HTTP server on %s socket %v", proto, addr)) + logger.Info(fmt.Sprintf("Starting RPC HTTP server on %s", listenAddr)) listener, err = net.Listen(proto, addr) if err != nil { return nil, errors.Errorf("Failed to listen on %v: %v", listenAddr, err) @@ -49,7 +49,7 @@ func StartHTTPAndTLSServer(listenAddr string, handler http.Handler, certFile, ke } proto, addr = parts[0], parts[1] - logger.Info(fmt.Sprintf("Starting RPC HTTPS server on %s socket %v", proto, addr)) + logger.Info(fmt.Sprintf("Starting RPC HTTPS server on %s (cert: %q, key: %q)", listenAddr, certFile, keyFile)) listener, err = net.Listen(proto, addr) if err != nil { return nil, errors.Errorf("Failed to listen on %v: %v", listenAddr, err)
[rpc/lib] log cert and key files in StartHTTPAndTLSServer
diff --git a/src/Storage/Repository.php b/src/Storage/Repository.php index <HASH>..<HASH> 100644 --- a/src/Storage/Repository.php +++ b/src/Storage/Repository.php @@ -50,10 +50,12 @@ class Repository implements ObjectRepository */ public function create($params = [], ClassMetadata $metadata = null) { - $entity = $this->getEntityBuilder()->create($params, $metadata); - $preEventArgs = new HydrationEvent($params, ['entity' => $entity, 'repository' => $this]); + $params = new ArrayObject($params); + $preEventArgs = new HydrationEvent($params, ['repository' => $this]); $this->event()->dispatch(StorageEvents::PRE_HYDRATE, $preEventArgs); - $this->event()->dispatch(StorageEvents::POST_HYDRATE, $preEventArgs); + $entity = $this->getEntityBuilder()->create($params, $metadata); + $postEventArgs = new HydrationEvent($params, ['entity' => $entity, 'repository' => $this]); + $this->event()->dispatch(StorageEvents::POST_HYDRATE, $postEventArgs); return $entity; } @@ -325,7 +327,7 @@ class Repository implements ObjectRepository /** * Saves a single object. * - * @param object $entity The entity to delete. + * @param object $entity The entity to save. * @param bool $silent Suppress events * * @return bool
improve logic of hydration events on create
diff --git a/lib/puppet/network/http/handler.rb b/lib/puppet/network/http/handler.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/network/http/handler.rb +++ b/lib/puppet/network/http/handler.rb @@ -269,7 +269,6 @@ module Puppet::Network::HTTP::Handler end def configure_profiler(request_params) - Puppet.debug(request_params.to_yaml) if request_params.include?(:profile) Puppet::Util::Profiler.current = Puppet::Util::Profiler::WallClock.new(Puppet.method(:debug), request_params.object_id) else
(Maint) Remove accidentally added debug line I had added the debug of the request parameters at some point in order to understand what they were. That had accidentally been committed.
diff --git a/querier.go b/querier.go index <HASH>..<HASH> 100644 --- a/querier.go +++ b/querier.go @@ -413,12 +413,15 @@ func (s *populatedChunkSeries) Next() bool { for s.set.Next() { lset, chks := s.set.At() - from := -1 - for i, c := range chks { - if c.MaxTime < s.mint { - from = i - continue + for len(chks) > 0 { + if chks[0].MaxTime >= s.mint { + break } + chks = chks[1:] + } + + // Break out at the first chunk that has no overlap with mint, maxt. + for i, c := range chks { if c.MinTime > s.maxt { chks = chks[:i] break @@ -429,7 +432,6 @@ func (s *populatedChunkSeries) Next() bool { } } - chks = chks[from+1:] if len(chks) == 0 { continue }
Simply loop away from using tracking variables.
diff --git a/classes/String.php b/classes/String.php index <HASH>..<HASH> 100755 --- a/classes/String.php +++ b/classes/String.php @@ -12,6 +12,7 @@ */ class String { + use Module; /** * Fast string templating.
[New] String is now a Module
diff --git a/lib/techs/deps.js.js b/lib/techs/deps.js.js index <HASH>..<HASH> 100644 --- a/lib/techs/deps.js.js +++ b/lib/techs/deps.js.js @@ -19,7 +19,8 @@ exports.Tech = INHERIT(Tech, { getBuildResult: function(prefixes, suffix, outputDir, outputName) { - var deps = new Deps(this.getContext().opts.declaration.blocks); + var declaration = this.getContext().opts.declaration; + deps = new Deps(declaration.deps || declaration.blocks); return Q.when(deps.expandByFS(this), function() { return deps.stringify();
Deps format support in bemdecl
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ import hmmlearn VERSION = hmmlearn.__version__ -install_requires = ["scikit-learn>=0.16"] +install_requires = ["numpy", "scikit-learn>=0.16"] tests_require = install_requires + ["pytest"] docs_require = install_requires + [ "Sphinx", "sphinx-gallery", "numpydoc", "Pillow", "matplotlib"
adding numpy as dependency (fixes pip installation)
diff --git a/resources/lang/pt-PT/cachet.php b/resources/lang/pt-PT/cachet.php index <HASH>..<HASH> 100644 --- a/resources/lang/pt-PT/cachet.php +++ b/resources/lang/pt-PT/cachet.php @@ -33,6 +33,7 @@ return [ 'scheduled' => 'Manutenção Agendada', 'scheduled_at' => ', agendada :timestamp', 'posted' => 'Publicado :timestamp', + 'posted_at' => 'Posted at :timestamp', 'status' => [ 1 => 'Investigando', 2 => 'Identificado',
New translations cachet.php (Portuguese)
diff --git a/tests/support/pytest/helpers.py b/tests/support/pytest/helpers.py index <HASH>..<HASH> 100644 --- a/tests/support/pytest/helpers.py +++ b/tests/support/pytest/helpers.py @@ -6,6 +6,7 @@ """ import logging import os +import pathlib import shutil import tempfile import textwrap @@ -105,6 +106,8 @@ def temp_file(name=None, contents=None, directory=None, strip_first_newline=True try: if directory is None: directory = RUNTIME_VARS.TMP + elif isinstance(directory, pathlib.Path): + directory = str(directory) if name is not None: file_path = os.path.join(directory, name) @@ -126,12 +129,19 @@ def temp_file(name=None, contents=None, directory=None, strip_first_newline=True with salt.utils.files.fopen(file_path, "w") as wfh: wfh.write(file_contents) + log_contents = "{0} Contents {0}\n{1}\n{2} Contents {2}".format( + ">" * 15, file_contents, "<" * 15 + ) + log.debug("Created temp file: %s\n%s", file_path, log_contents) + else: + log.debug("Touched temp file: %s", file_path) yield file_path finally: try: os.unlink(file_path) + log.debug("Deleted temp file: %s", file_path) except OSError: # Already deleted pass
Add some log calls to know what's going on
diff --git a/extensions/testlib/src/com/google/inject/testing/throwingproviders/CheckedProviderSubject.java b/extensions/testlib/src/com/google/inject/testing/throwingproviders/CheckedProviderSubject.java index <HASH>..<HASH> 100644 --- a/extensions/testlib/src/com/google/inject/testing/throwingproviders/CheckedProviderSubject.java +++ b/extensions/testlib/src/com/google/inject/testing/throwingproviders/CheckedProviderSubject.java @@ -1,5 +1,7 @@ package com.google.inject.testing.throwingproviders; +import static com.google.common.base.Strings.lenientFormat; +import static com.google.common.truth.Fact.simpleFact; import static com.google.common.truth.Truth.assertAbout; import com.google.common.truth.FailureMetadata; @@ -106,7 +108,7 @@ public final class CheckedProviderSubject<T, P extends CheckedProvider<T>> } void doFail(String format, Object... args) { - failWithRawMessage(format, args); + failWithoutActual(simpleFact(lenientFormat(format, args))); } } }
Migrated from Subject.failWithRawMessage to Subject.failWithoutActual ------------- Created by MOE: <URL>
diff --git a/src/main/java/pro/zackpollard/telegrambot/api/chat/message/send/SendableVoiceMessage.java b/src/main/java/pro/zackpollard/telegrambot/api/chat/message/send/SendableVoiceMessage.java index <HASH>..<HASH> 100644 --- a/src/main/java/pro/zackpollard/telegrambot/api/chat/message/send/SendableVoiceMessage.java +++ b/src/main/java/pro/zackpollard/telegrambot/api/chat/message/send/SendableVoiceMessage.java @@ -137,6 +137,14 @@ public class SendableVoiceMessage implements SendableMessage, ReplyingOptions, N return this; } + /** + * *Optional* + * Sets the caption you want to send with the message + * + * @param caption The caption you want to send with the message + * + * @return The builder object + */ public SendableVoiceMessage.SendableVoiceMessageBuilder caption(String caption) { this.caption = caption;
Add in missed documentation for new caption method
diff --git a/packages/core/parcel-bundler/src/Resolver.js b/packages/core/parcel-bundler/src/Resolver.js index <HASH>..<HASH> 100644 --- a/packages/core/parcel-bundler/src/Resolver.js +++ b/packages/core/parcel-bundler/src/Resolver.js @@ -24,7 +24,7 @@ class Resolver { filename: parent, paths: this.options.paths, modules: builtins, - extensions: ['.js', '.json'], + extensions: Object.keys(this.options.extensions), packageFilter(pkg, pkgfile) { // Expose the path to the package.json file pkg.pkgfile = pkgfile;
Support resolving all extensions that are registered
diff --git a/src/Jigsaw.php b/src/Jigsaw.php index <HASH>..<HASH> 100644 --- a/src/Jigsaw.php +++ b/src/Jigsaw.php @@ -70,7 +70,7 @@ class Jigsaw protected function buildSite($useCache) { - $this->outputPaths = $this->siteBuilder + $output = $this->siteBuilder ->setUseCache($useCache) ->build( $this->getSourcePath(), @@ -78,6 +78,8 @@ class Jigsaw $this->siteData ); + $this->outputPaths = $output->keys(); + return $this; } diff --git a/src/SiteBuilder.php b/src/SiteBuilder.php index <HASH>..<HASH> 100644 --- a/src/SiteBuilder.php +++ b/src/SiteBuilder.php @@ -97,8 +97,10 @@ class SiteBuilder { $this->consoleOutput->writeWritingFiles(); - return $files->map(function ($file) use ($destination) { - return $this->writeFile($file, $destination); + return $files->mapWithKeys(function ($file) use ($destination) { + $outputLink = $this->writeFile($file, $destination); + + return [$outputLink => $file->inputFile()]; }); }
Include InputFile details when in collection returned from build()
diff --git a/plugins/guests/linux/cap/rsync.rb b/plugins/guests/linux/cap/rsync.rb index <HASH>..<HASH> 100644 --- a/plugins/guests/linux/cap/rsync.rb +++ b/plugins/guests/linux/cap/rsync.rb @@ -11,14 +11,14 @@ module VagrantPlugins machine.communicate.tap do |comm| comm.sudo("mkdir -p '#{opts[:guestpath]}'") - comm.sudo("find '#{opts[:guestpath]}' ! -user vagrant -print0 | " + + comm.sudo("find '#{opts[:guestpath]}' ! -user #{username} -print0 | " + "xargs -0 -r chown -v #{username}:") end end def self.rsync_post(machine, opts) machine.communicate.tap do |comm| - comm.sudo("find '#{opts[:guestpath]}' ! -user vagrant -print0 | " + + comm.sudo("find '#{opts[:guestpath]}' ! -user #{username} -print0 | " + "xargs -0 -r chown -v #{opts[:owner]}:#{opts[:group]}") end end
guests/linux: check for proper owner [GH-<I>]
diff --git a/tests/CookieConsentMiddlewareTest.php b/tests/CookieConsentMiddlewareTest.php index <HASH>..<HASH> 100644 --- a/tests/CookieConsentMiddlewareTest.php +++ b/tests/CookieConsentMiddlewareTest.php @@ -43,7 +43,7 @@ class CookieConsentMiddlewareTest extends TestCase } /** @test */ - public function it_does_not_use_a_sucre_cookie_if_session_secure_is_false() + public function it_does_not_use_a_secure_cookie_if_session_secure_is_false() { config(['session.secure' => false]);
Fix spelling of test name from sucre to secure (#<I>) I (heart) sucre cookies, but I suppose we're not testing for that here ;) `it_does_not_use_a_sucre_cookie_if_session_secure_is_false`
diff --git a/pandas/tests/test_expressions.py b/pandas/tests/test_expressions.py index <HASH>..<HASH> 100644 --- a/pandas/tests/test_expressions.py +++ b/pandas/tests/test_expressions.py @@ -20,9 +20,6 @@ from pandas.formats.printing import pprint_thing import pandas.util.testing as tm -if not expr._USE_NUMEXPR: - numexpr = pytest.importorskip('numexpr') - _frame = DataFrame(randn(10000, 4), columns=list('ABCD'), dtype='float64') _frame2 = DataFrame(randn(100, 4), columns=list('ABCD'), dtype='float64') _mixed = DataFrame({'A': _frame['A'].copy(), @@ -50,6 +47,7 @@ _mixed_panel = Panel(dict(ItemA=_mixed, ItemB=(_mixed + 3))) _mixed2_panel = Panel(dict(ItemA=_mixed2, ItemB=(_mixed2 + 3))) +@pytest.mark.skipif(not expr._USE_NUMEXPR, reason='not using numexpr') class TestExpressions(tm.TestCase): def setUp(self):
TST: control skipping of numexpr tests if its installed / used
diff --git a/spyderlib/widgets/projectexplorer.py b/spyderlib/widgets/projectexplorer.py index <HASH>..<HASH> 100644 --- a/spyderlib/widgets/projectexplorer.py +++ b/spyderlib/widgets/projectexplorer.py @@ -594,11 +594,14 @@ class ExplorerTreeWidget(OneColumnTree): def get_source_project(self, fname): """Return project which contains source *fname*""" - for project in self.projects: - if project.is_file_in_project(fname): - return project - else: - return self.default_project + return self.default_project # See Issue 490 + # See Issue 490: always using the default project to avoid performance + # issues with 'rope' when dealing with projects containing large files +# for project in self.projects: +# if project.is_file_in_project(fname): +# return project +# else: +# return self.default_project def get_project_from_name(self, name): for project in self.projects:
(Fixes Issue <I>) Editor: code completion was sometimes very slow when editing files within a Spyder project
diff --git a/Kwf/Rest/Controller/Model.php b/Kwf/Rest/Controller/Model.php index <HASH>..<HASH> 100644 --- a/Kwf/Rest/Controller/Model.php +++ b/Kwf/Rest/Controller/Model.php @@ -87,6 +87,8 @@ class Kwf_Rest_Controller_Model extends Kwf_Rest_Controller protected function _applySelectQuery($select, $query) { + $query = trim($query); + if (!$query) return; $ors = array(); if (!$this->_queryColumns) { throw new Kwf_Exception("_queryColumns are required");
skip query select if query is empty
diff --git a/lib/autokey/model/abstract_hotkey.py b/lib/autokey/model/abstract_hotkey.py index <HASH>..<HASH> 100644 --- a/lib/autokey/model/abstract_hotkey.py +++ b/lib/autokey/model/abstract_hotkey.py @@ -45,7 +45,7 @@ class AbstractHotkey(AbstractWindowFilter): modifiers.sort() self.modifiers = modifiers self.hotKey = key - if key is not None: + if key is not None and TriggerMode.HOTKEY not in self.modes: self.modes.append(TriggerMode.HOTKEY) def unset_hotkey(self):
Fix for TriggerMode.HOTKEY (3) showing up in modes in the save file twice
diff --git a/Pullable.js b/Pullable.js index <HASH>..<HASH> 100644 --- a/Pullable.js +++ b/Pullable.js @@ -12,7 +12,7 @@ import { ActivityIndicator, } from 'react-native'; -import styles from './style/index.css.js'; +import styles from './style/index.css'; // const padding = 2; //scrollview与外面容器的距离 const pullOkMargin = 100; //下拉到ok状态时topindicator距离顶部的距离 @@ -161,7 +161,7 @@ export default class extends Component { let topIndicator; if (this.props.topIndicatorRender == null) { topIndicator = ( - <View style={{flex: 1, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', height: defaultTopIndicatorHeight}}> + <View style={{flexDirection: 'row', justifyContent: 'center', alignItems: 'center', height: defaultTopIndicatorHeight}}> <ActivityIndicator size="small" color="gray" /> {this.state.pulling ? <Text>下拉刷新...</Text> : null} {this.state.pullok ? <Text>松开刷新......</Text> : null}
fix a bug, let topindicator component expand
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -57,6 +57,12 @@ function toSlack (jiraMD) { // Subscript .replace(/~([^~]*)~/g, '_$1') + // Pre-formatted text + .replace(/{noformat}/g, '```') + + // Un-named Links + .replace(/\[([^|{}\\^~[\]\s"`]+\.[^|{}\\^~[\]\s"`]+)\]/g, '<$1>') + // Smart Links .replace(/\[([^[\]|]+?)\|([^[\]|]+?)\|(smart-link)\]/g, '<$1>') @@ -66,12 +72,6 @@ function toSlack (jiraMD) { // Code Block .replace(/\{code(:([a-z]+))?\}([^]*)\{code\}/gm, '```$2$3```') - // Pre-formatted text - .replace(/{noformat}/g, '```') - - // Un-named Links - .replace(/\[([^|{}\\^~[\]\s"`]+\.[^|{}\\^~[\]\s"`]+)\]/g, '<$1>') - // Named Links .replace(/\[([^[\]|]+?)\|([^[\]|]+?)\]/g, '<$2|$1>')
Moved un-named and named links replace above strikethrough
diff --git a/shared/chat/conversation/messages/message-popup/attachment/index.js b/shared/chat/conversation/messages/message-popup/attachment/index.js index <HASH>..<HASH> 100644 --- a/shared/chat/conversation/messages/message-popup/attachment/index.js +++ b/shared/chat/conversation/messages/message-popup/attachment/index.js @@ -29,9 +29,9 @@ type Props = { const AttachmentPopupMenu = (props: Props) => { const items = [ - 'Divider', ...(props.yourMessage ? [ + 'Divider', { danger: true, disabled: !props.onDelete,
Show only one divider on attachments that aren't yours. (#<I>)
diff --git a/checker/tests/upstream_test.py b/checker/tests/upstream_test.py index <HASH>..<HASH> 100644 --- a/checker/tests/upstream_test.py +++ b/checker/tests/upstream_test.py @@ -45,7 +45,6 @@ class PyFontaineSubsetTest(TestCase): def tearDown(self): library.collections = self.old_collections - @tags('required') def test_font_coverage_subset_100(self): """ Is font fully coveraged subsets """ library.collections = ['subsets'] @@ -53,14 +52,10 @@ class PyFontaineSubsetTest(TestCase): contents = Builder.xml_(tree).doc.toprettyxml(indent=" ") docroot = lxml.etree.fromstring(contents) for orth in docroot.xpath('//orthography'): - try: - value = int(orth.xpath('./percentCoverage/text()')[0]) - if value != 100: - self.fail('%s coveraged only %s' % ( - orth.xpath('./commonName/text()')[0], value)) - break - except (ValueError, IndexError): - pass + value = int(orth.xpath('./percentCoverage/text()')[0]) + if value != 100: + self.fail('%s coveraged only %s%%' % ( + orth.xpath('./commonName/text()')[0], value)) class SimpleBulkTest(TestCase):
Improved error message for test on coverage of subset #<I>
diff --git a/tasks/leaptask/l2_unit1.py b/tasks/leaptask/l2_unit1.py index <HASH>..<HASH> 100644 --- a/tasks/leaptask/l2_unit1.py +++ b/tasks/leaptask/l2_unit1.py @@ -176,7 +176,7 @@ class Line(Shape): """ x = (x1 + x2) / 2 y = (y1 + y2) / 2 - super().__init__(x, y, color, gl=gl.GL_LINES, line_width=line_width) + super().__init__(color, gl=gl.GL_LINES, line_width=line_width) self.x1 = x1 self.y1 = y1 self.x2 = x2 diff --git a/tasks/setup.py b/tasks/setup.py index <HASH>..<HASH> 100644 --- a/tasks/setup.py +++ b/tasks/setup.py @@ -5,7 +5,7 @@ import setuptools setuptools.setup( name="leaptask", - version="0.0.16", + version="0.0.17", author="Vic Wang", author_email="305880887@qq.com", description='leap task',
update leaptask to <I>
diff --git a/pynubank/nubank.py b/pynubank/nubank.py index <HASH>..<HASH> 100644 --- a/pynubank/nubank.py +++ b/pynubank/nubank.py @@ -141,6 +141,10 @@ class Nubank: feed = self.get_card_feed() return list(filter(lambda x: x['category'] == 'transaction', feed['events'])) + def get_card_payments(self): + feed = self.get_card_feed() + return list(filter(lambda x: x['category'] == 'payment', feed['events'])) + def get_bills(self): if self._bills_url is not None: request = self._client.get(self._bills_url)
feat: Add payments list filter to credit cards (#<I>)
diff --git a/Collector/ThemeCollector.php b/Collector/ThemeCollector.php index <HASH>..<HASH> 100644 --- a/Collector/ThemeCollector.php +++ b/Collector/ThemeCollector.php @@ -98,6 +98,16 @@ final class ThemeCollector extends DataCollector /** * {@inheritdoc} */ + public function reset(): void + { + $this->data['used_theme'] = null; + $this->data['used_themes'] = []; + $this->data['themes'] = []; + } + + /** + * {@inheritdoc} + */ public function getName(): string { return 'sylius_theme';
Add reset method to DataCollectors, needed for SF4 compat
diff --git a/test/unit/models/classes/xml/XmlEditorTest.php b/test/unit/models/classes/xml/XmlEditorTest.php index <HASH>..<HASH> 100644 --- a/test/unit/models/classes/xml/XmlEditorTest.php +++ b/test/unit/models/classes/xml/XmlEditorTest.php @@ -8,6 +8,7 @@ use oat\taoQtiTest\models\xmlEditor\XmlEditor; use PHPUnit\Framework\MockObject\MockObject; use qtism\data\storage\xml\XmlDocument; use qtism\data\storage\xml\XmlStorageException; +use SplObjectStorage; use taoQtiTest_models_classes_QtiTestConverterException; use \taoQtiTest_models_classes_QtiTestService; use taoQtiTest_models_classes_QtiTestServiceException; @@ -116,15 +117,18 @@ EOL; "preConditions" => [ ], "branchRules" => [ - ] + ], + "observers" => new SplObjectStorage(), ] ], "testFeedbacks" => [ - ] + ], + "observers" => new SplObjectStorage(), ] ], "testFeedbacks" => [ - ] + ], + "observers" => new SplObjectStorage(), ]; $this->qtiTestServiceMock
fix: Fixed breaking test, added observers from qti-sdk.
diff --git a/apiserver/facades/controller/instancepoller/merge.go b/apiserver/facades/controller/instancepoller/merge.go index <HASH>..<HASH> 100644 --- a/apiserver/facades/controller/instancepoller/merge.go +++ b/apiserver/facades/controller/instancepoller/merge.go @@ -38,7 +38,9 @@ func newMergeMachineLinkLayerOp( // Build (state.ModelOperation) returns the transaction operations used to // merge incoming provider link-layer data with that in state. -func (o *mergeMachineLinkLayerOp) Build(_ int) ([]txn.Op, error) { +func (o *mergeMachineLinkLayerOp) Build(attempt int) ([]txn.Op, error) { + o.ClearProcessed() + if err := o.PopulateExistingDevices(); err != nil { return nil, errors.Trace(err) } @@ -52,7 +54,9 @@ func (o *mergeMachineLinkLayerOp) Build(_ int) ([]txn.Op, error) { return nil, jujutxn.ErrNoOperations } - o.normaliseIncoming() + if attempt == 0 { + o.normaliseIncoming() + } if err := o.PopulateExistingAddresses(); err != nil { return nil, errors.Trace(err)
Ensures that ClearProcessed is called before each transaction build attempt when setting provider-sourced link-layer data.
diff --git a/billy/tests/importers/test_filters.py b/billy/tests/importers/test_filters.py index <HASH>..<HASH> 100644 --- a/billy/tests/importers/test_filters.py +++ b/billy/tests/importers/test_filters.py @@ -13,3 +13,13 @@ def test_phone_filter(): ] for num in numbers: assert phone_filter(num) == number + + +def test_phone_filter_country(): + number = "1-555-606-0842" + numbers = [ + "+1-(555)-606-0842", + "+1 (555) 606-0842" + ] + for num in numbers: + assert phone_filter(num) == number
Adding in a country code checker
diff --git a/src/main/java/edu/jhu/gm/data/bayesnet/BayesNetReader.java b/src/main/java/edu/jhu/gm/data/bayesnet/BayesNetReader.java index <HASH>..<HASH> 100644 --- a/src/main/java/edu/jhu/gm/data/bayesnet/BayesNetReader.java +++ b/src/main/java/edu/jhu/gm/data/bayesnet/BayesNetReader.java @@ -18,6 +18,7 @@ import edu.jhu.gm.model.Var; import edu.jhu.gm.model.Var.VarType; import edu.jhu.gm.model.VarConfig; import edu.jhu.gm.model.VarSet; +import edu.jhu.prim.util.math.FastMath; public class BayesNetReader { @@ -84,7 +85,9 @@ public class BayesNetReader { // The double is the last value on the line. double value = Double.parseDouble(assns[assns.length-1]); - + // Factor graphs store the log value. + value = FastMath.log(value); + // Get the factor for this configuration, creating a new one if necessary. VarSet vars = config.getVars(); ExplicitFactor f = factorMap.get(vars);
Bug fix: taking log of BayesNet Reader inputs
diff --git a/starlink/ndfpack/Ndf.py b/starlink/ndfpack/Ndf.py index <HASH>..<HASH> 100644 --- a/starlink/ndfpack/Ndf.py +++ b/starlink/ndfpack/Ndf.py @@ -93,7 +93,10 @@ class Ndf(object): self.label = indf.label self.title = indf.title self.units = indf.units - self.wcs = indf.gtwcs() + try: + self.wcs = indf.gtwcs() + except NotImplementedError: + self.wcs = None # Read the axes self.axes = []
Storing wcs attribute depends on starlink.Ast being available
diff --git a/simulator/src/main/java/com/hazelcast/simulator/common/ShutdownThread.java b/simulator/src/main/java/com/hazelcast/simulator/common/ShutdownThread.java index <HASH>..<HASH> 100644 --- a/simulator/src/main/java/com/hazelcast/simulator/common/ShutdownThread.java +++ b/simulator/src/main/java/com/hazelcast/simulator/common/ShutdownThread.java @@ -32,7 +32,7 @@ public abstract class ShutdownThread extends Thread { protected ShutdownThread(String name, AtomicBoolean shutdownStarted, boolean shutdownLog4j) { super(name); - setDaemon(true); + setDaemon(false); this.shutdownStarted = shutdownStarted; this.shutdownLog4j = shutdownLog4j;
Fixed cut off logs in worker by making the ShutdownThread a user thread, so the Worker doesn't stop before the shutdown is completed.
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,6 @@ $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) +require 'tempfile' +require 'securerandom' require 'simplecov' SimpleCov.start do
add some requirement into spec_helper
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb @@ -293,6 +293,27 @@ module ActiveRecord result.rows.first.first end + # Sets the sequence of a table's primary key to the specified value. + def set_pk_sequence!(table, value, pk = nil, sequence = nil) #:nodoc: + unless pk and sequence + default_pk, default_sequence = pk_and_sequence_for(table) + pk ||= default_pk + sequence ||= default_sequence + end + + if pk + if sequence + quoted_sequence = quote_column_name(sequence) + + select_value <<-end_sql, 'SCHEMA' + SELECT setval('#{quoted_sequence}', #{value}) + end_sql + else + @logger.warn "#{table} has primary key #{pk} with no default sequence" if @logger + end + end + end + # Resets the sequence of a table's primary key to the maximum value. def reset_pk_sequence!(table, pk = nil, sequence = nil) #:nodoc: unless pk and sequence
Added region sequencing of primary keys for Postgres. Skip setting sequence on a table create if the value is 0 since it will start the first value at 1 anyway. This fixes the PG error 'setval: value 0 is out of bounds for sequence vms_id_seq...' encountered when migrating a new DB. BugzID: <I>,<I>,<I>,<I>
diff --git a/src/main/java/org/fit/layout/impl/DefaultLogicalArea.java b/src/main/java/org/fit/layout/impl/DefaultLogicalArea.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/fit/layout/impl/DefaultLogicalArea.java +++ b/src/main/java/org/fit/layout/impl/DefaultLogicalArea.java @@ -61,6 +61,12 @@ public class DefaultLogicalArea extends GenericTreeNode implements LogicalArea } @Override + public Area getFirstArea() + { + return ((Vector<Area>) areas).firstElement(); + } + + @Override public int getAreaCount() { return areas.size(); diff --git a/src/main/java/org/fit/layout/model/LogicalArea.java b/src/main/java/org/fit/layout/model/LogicalArea.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/fit/layout/model/LogicalArea.java +++ b/src/main/java/org/fit/layout/model/LogicalArea.java @@ -21,6 +21,8 @@ public interface LogicalArea extends AreaTreeNode<LogicalArea> public List<Area> getAreas(); + public Area getFirstArea(); + public int getAreaCount(); public void setText(String text);
API extension: first area in a logical area
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -60,7 +60,7 @@ gulp.task('styles-formio', () => { return gulp.src([`${tmpFolder}/components/formio/formio.component.scss`]) .pipe(sass().on('error', sass.logError)) .pipe(cleanCSS({compatibility: 'ie8'})) - .pipe(replace(/content\:'\\/g, "content:'\\\\")) + .pipe(replace(/\\/g, "\\\\")) .pipe(gulp.dest(`${tmpFolder}/components/formio`)); }); @@ -68,7 +68,7 @@ gulp.task('styles-builder', () => { return gulp.src([`${tmpFolder}/components/formbuilder/formbuilder.component.scss`]) .pipe(sass().on('error', sass.logError)) .pipe(cleanCSS({compatibility: 'ie8'})) - .pipe(replace(/content\:'\\/g, "content:'\\\\")) + .pipe(replace(/\\/g, "\\\\")) .pipe(gulp.dest(`${tmpFolder}/components/formbuilder`)); });
Fix replasing backslashes for all cases
diff --git a/lib/rubocop/cop/mixin/autocorrect_alignment.rb b/lib/rubocop/cop/mixin/autocorrect_alignment.rb index <HASH>..<HASH> 100644 --- a/lib/rubocop/cop/mixin/autocorrect_alignment.rb +++ b/lib/rubocop/cop/mixin/autocorrect_alignment.rb @@ -74,7 +74,7 @@ module RuboCop def autocorrect_line(corrector, line_begin_pos, expr, column_delta, heredoc_ranges) range = calculate_range(expr, line_begin_pos, column_delta) - # We must not change indentation of heredoc stings. + # We must not change indentation of heredoc strings. return if heredoc_ranges.any? { |h| within?(range, h) } if column_delta > 0
Heredocs don't sting (bees and wasps do)
diff --git a/lib/discover/local.go b/lib/discover/local.go index <HASH>..<HASH> 100644 --- a/lib/discover/local.go +++ b/lib/discover/local.go @@ -179,8 +179,11 @@ func (c *localClient) recvAnnouncements(b beacon.Interface) { } if newDevice { + // Force a transmit to announce ourselves, if we are ready to do + // so right away. select { case c.forcedBcastTick <- time.Now(): + default: } } }
lib/discovery: Receiving a new announcement should be non-blocking Pretty sure the intention of the select was for it to be non-blocking. Not that it will matter almost ever.
diff --git a/lib/Models/REpresentationalStateTransferCatalogFunction.js b/lib/Models/REpresentationalStateTransferCatalogFunction.js index <HASH>..<HASH> 100644 --- a/lib/Models/REpresentationalStateTransferCatalogFunction.js +++ b/lib/Models/REpresentationalStateTransferCatalogFunction.js @@ -43,12 +43,6 @@ function REpresentationalStateTransferCatalogFunction(terria) { this.url = undefined; /** - * Gets or sets the identifier of this REST process. This property is observable. - * @type {String} - */ - this.identifier = undefined; - - /** * Gets or sets whether to use key value pairs (KVP) embedded in Execute URL, or whether to make a POST request * with XML data. * @type {Boolean}
removed unnecessary identifier from copying WPS
diff --git a/spec/buffers_spec.js b/spec/buffers_spec.js index <HASH>..<HASH> 100644 --- a/spec/buffers_spec.js +++ b/spec/buffers_spec.js @@ -229,22 +229,30 @@ function model(type) { }; -describe('a standard buffer with an appropriate model', function() { - it('conforms to the model', function() { +describe('a standard buffer', function() { + it('conforms to the standard buffer model', function() { expect(buf(CHECKED)).toConformTo(model(CHECKED)); }); }); -describe('a standard buffer with an appropriate model', function() { - it('conforms to the model', function() { +describe('a dropping buffer', function() { + it('conforms to the dropping buffer model', function() { expect(buf(DROPPING)).toConformTo(model(DROPPING)); }); }); -describe('a standard buffer with an appropriate model', function() { - it('conforms to the model', function() { +describe('a sliding buffer', function() { + it('conforms to the sliding buffer model', function() { expect(buf(SLIDING)).toConformTo(model(SLIDING)); }); }); + + +// sanity check +describe('a standard buffer', function() { + it('does not conform to the dropping buffer model', function() { + expect(buf(CHECKED)).not.toConformTo(model(DROPPING)); + }); +});
improve test descriptions and add a check for failing conformity
diff --git a/src/APIRequest/RequestFactory/GenericRequestFactory.php b/src/APIRequest/RequestFactory/GenericRequestFactory.php index <HASH>..<HASH> 100644 --- a/src/APIRequest/RequestFactory/GenericRequestFactory.php +++ b/src/APIRequest/RequestFactory/GenericRequestFactory.php @@ -50,11 +50,6 @@ class GenericRequestFactory implements RequestFactory { $urlQueryData = []; if($urlQueryString = $parsedURL->getQueryString()) { parse_str($urlQueryString, $urlQueryData); - - //In case it's unable to be parsed, default to no params - if($urlQueryData === null) { - $urlQueryData = []; - } } $apiKey = $parsedURL->getAPIKey();
remove unreachable statement, under the assumption that str_parse cant fail
diff --git a/src/worker/scheduler/Scheduler.js b/src/worker/scheduler/Scheduler.js index <HASH>..<HASH> 100644 --- a/src/worker/scheduler/Scheduler.js +++ b/src/worker/scheduler/Scheduler.js @@ -4,11 +4,12 @@ import { merge } from "lodash-es"; // Internal dependencies. import Task from "./Task"; + const DEFAULT_CONFIGURATION = { pollTime: 50, }; -class Scheduler { +export default class Scheduler { /** * Initializes a Scheduler. * @@ -57,7 +58,7 @@ class Scheduler { tick() { this.executeNextTask() .then( () => { - setTimeout( this.tick, this._configuration.pollTime ); + this._pollHandle = setTimeout( this.tick, this._configuration.pollTime ); } ); } @@ -69,6 +70,7 @@ class Scheduler { stopPolling() { clearTimeout( this._pollHandle ); this._pollHandle = null; + this._started = false; } /** @@ -148,5 +150,3 @@ class Scheduler { } ); } } - -export default Scheduler;
Fix polling start and handle not being set or updated
diff --git a/command/format.go b/command/format.go index <HASH>..<HASH> 100644 --- a/command/format.go +++ b/command/format.go @@ -1,7 +1,6 @@ package command import ( - "bytes" "encoding/json" "errors" "fmt" @@ -53,17 +52,15 @@ var Formatters = map[string]Formatter{ } // An output formatter for json output of an object -type JsonFormatter struct { -} +type JsonFormatter struct{} func (j JsonFormatter) Output(ui cli.Ui, secret *api.Secret, data interface{}) error { - b, err := json.Marshal(data) - if err == nil { - var out bytes.Buffer - json.Indent(&out, b, "", "\t") - ui.Output(out.String()) + b, err := json.MarshalIndent(data, "", " ") + if err != nil { + return err } - return err + ui.Output(string(b)) + return nil } // An output formatter for yaml output format of an object
Output JSON with spaces not tabs
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -69,7 +69,7 @@ describe( 'buble', () => { var commandFile = path.resolve( dir, 'command.sh' ); var command = fs.readFileSync( commandFile, 'utf-8' ) - .replace( 'buble', 'node ' + binFile ); + .replace( 'buble', 'node "' + binFile + '"' ); child_process.exec( command, { cwd: dir }, ( err, stdout, stderr ) => {
fix cli test to work in directories with uncommon names
diff --git a/peer/main.go b/peer/main.go index <HASH>..<HASH> 100644 --- a/peer/main.go +++ b/peer/main.go @@ -42,7 +42,6 @@ import ( var logger = logging.MustGetLogger("main") // Constants go here. -const fabric = "hyperledger" const cmdRoot = "core" // The main command describes the service and
Remove unused constant fabric The constant "fabric" is not used in new release. Change-Id: Ie<I>ba<I>f<I>fda<I>dbe<I>fa9f<I>c
diff --git a/tds.go b/tds.go index <HASH>..<HASH> 100644 --- a/tds.go +++ b/tds.go @@ -1263,6 +1263,7 @@ initiate_connection: p.Host = sess.routedServer p.Port = uint64(sess.routedPort) if !p.HostInCertificateProvided && p.TLSConfig != nil { + p.TLSConfig = p.TLSConfig.Clone() p.TLSConfig.ServerName = sess.routedServer } goto initiate_connection
keep tls config in sync with msdsn host (#<I>)
diff --git a/MAVProxy/modules/mavproxy_misseditor/__init__.py b/MAVProxy/modules/mavproxy_misseditor/__init__.py index <HASH>..<HASH> 100644 --- a/MAVProxy/modules/mavproxy_misseditor/__init__.py +++ b/MAVProxy/modules/mavproxy_misseditor/__init__.py @@ -199,7 +199,8 @@ class MissionEditorModule(mp_module.MPModule): def mavlink_packet(self, m): - self.mavlink_message_queue.put(m) + if m.get_type() in ['WAYPOINT_COUNT','MISSION_COUNT', 'WAYPOINT', 'MISSION_ITEM']: + self.mavlink_message_queue.put(m) def process_mavlink_packet(self, m): '''handle an incoming mavlink packet''' @@ -209,6 +210,8 @@ class MissionEditorModule(mp_module.MPModule): #No "return" statement should be put in this method! self.gui_event_queue_lock.acquire() + # if you add processing for an mtype here, remember to add it + # to mavlink_packet, above if mtype in ['WAYPOINT_COUNT','MISSION_COUNT']: if (self.num_wps_expected == 0): #I haven't asked for WPs, or these messages are duplicates
misseditor: only enqueue specific message types Optimisation
diff --git a/backbone-associations.js b/backbone-associations.js index <HASH>..<HASH> 100644 --- a/backbone-associations.js +++ b/backbone-associations.js @@ -618,7 +618,10 @@ cleanup:function () { _.each(this.relations, function (relation) { var val = this.attributes[relation.key]; - val && (val.parents = _.difference(val.parents, [this])); + if(val) { + val._proxyCallback && val.off("all", val._proxyCallback, this); + val.parents = _.difference(val.parents, [this]); + } }, this); this.off(); },
cleanup method don't unbind _proxyCallback from a relationValue
diff --git a/imgaug/augmenters/contrast.py b/imgaug/augmenters/contrast.py index <HASH>..<HASH> 100644 --- a/imgaug/augmenters/contrast.py +++ b/imgaug/augmenters/contrast.py @@ -301,12 +301,11 @@ class _ContrastFuncWrapper(meta.Augmenter): def _augment_images(self, images, random_state, parents, hooks): nb_images = len(images) - seeds = random_state.randint(0, 10**6, size=(1+nb_images,)) - per_channel = self.per_channel.draw_samples((nb_images,), random_state=ia.new_random_state(seeds[0])) + rss = ia.derive_random_states(random_state, 1+nb_images) + per_channel = self.per_channel.draw_samples((nb_images,), random_state=rss[0]) result = images - for i, (image, per_channel_i, seed) in enumerate(zip(images, per_channel, seeds[1:])): - rs = ia.new_random_state(seed) + for i, (image, per_channel_i, rs) in enumerate(zip(images, per_channel, rss[1:])): nb_channels = 1 if per_channel_i <= 0.5 else image.shape[2] samples_i = [param.draw_samples((nb_channels,), random_state=rs) for param in self.params1d] if per_channel_i > 0.5:
Improve random state generation in contrast augs