diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/cherrypy/lib/static.py b/cherrypy/lib/static.py index <HASH>..<HASH> 100644 --- a/cherrypy/lib/static.py +++ b/cherrypy/lib/static.py @@ -148,6 +148,10 @@ def serve_file(path, contentType=None, disposition=None, name=None): response.body = bodyfile return response.body +def serve_download(path, name=None): + """Serve 'path' as an application/x-download attachment.""" + # This is such a common idiom I felt it deserved its own wrapper. + return serve_file(path, "application/x-download", "attachment", name) def _attempt(filename, content_types):
New static.serve_download function (sugar for serve_file with application/x-download attachment).
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index <HASH>..<HASH> 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -1143,7 +1143,7 @@ public class ClassSymbol extends TypeSymbol { other.constructor.setInfo(constructor.info()); other.mangled = mangled; other.module = module; - other.thisSym = thisSym; + if (thisSym != this) other.setTypeOfThis(typeOfThis()); return other; }
- bug fix: cloneSymbol in ClassSymbol correctly... - bug fix: cloneSymbol in ClassSymbol correctly sets thisSym for the new symbol
diff --git a/addon/components/bs-switch.js b/addon/components/bs-switch.js index <HASH>..<HASH> 100755 --- a/addon/components/bs-switch.js +++ b/addon/components/bs-switch.js @@ -24,7 +24,7 @@ var bsSwitchComponent = Ember.Component.extend({ var that = this; // Ensure bootstrap-switch is loaded... - Ember.assert("bootstrap-switch has to exist on Ember.$.fn.bootstrapSwitch", Ember.$.fn.bootstrapSwitch); + Ember.assert("bootstrap-switch has to exist on Ember.$.fn.bootstrapSwitch", typeof Ember.$.fn.bootstrapSwitch === "function" ); // console.log('this.$(input):', this.$('input')); this.$('input').bootstrapSwitch({
Fix the issue of Ember <I> compatibility.
diff --git a/src/application/application.js b/src/application/application.js index <HASH>..<HASH> 100644 --- a/src/application/application.js +++ b/src/application/application.js @@ -95,7 +95,7 @@ class Application { */ reset() { // point to the current active stage "default" camera - var current = state.current(); + var current = state.get(); if (typeof current !== "undefined") { this.viewport = current.cameras.get("default"); }
use `get()` for better code clarity
diff --git a/lib/telegram_bot/version.rb b/lib/telegram_bot/version.rb index <HASH>..<HASH> 100644 --- a/lib/telegram_bot/version.rb +++ b/lib/telegram_bot/version.rb @@ -1,3 +1,3 @@ module TelegramBot - VERSION = "0.0.1" + VERSION = "0.0.2" end
bumped version to <I>
diff --git a/gohll.go b/gohll.go index <HASH>..<HASH> 100644 --- a/gohll.go +++ b/gohll.go @@ -117,17 +117,18 @@ func NewHLL(p uint8) (*HLL, error) { // Hasher function func (h *HLL) Add(value string) { hash := h.Hasher(value) - switch h.format { - case NORMAL: - h.addNormal(hash) - case SPARSE: - h.addSparse(hash) - } + h.AddHash(hash) } -// Add will add the given string value to the HLL using the specified hasher function. +// AddWithHasher will add the given string value to the HLL using the specified +// hasher function. func (h *HLL) AddWithHasher(value string, hasher func(string) uint64) { hash := hasher(value) + h.AddHash(hash) +} + +// AddHash will add the given uint64 hash to the HLL +func (h *HLL) AddHash(hash uint64) { switch h.format { case NORMAL: h.addNormal(hash)
Added AddHash method to resolve #7
diff --git a/spec/functional/mongoid/safety_spec.rb b/spec/functional/mongoid/safety_spec.rb index <HASH>..<HASH> 100644 --- a/spec/functional/mongoid/safety_spec.rb +++ b/spec/functional/mongoid/safety_spec.rb @@ -137,6 +137,10 @@ describe Mongoid::Safety do Mongoid.persist_in_safe_mode = true end + after do + Mongoid.persist_in_safe_mode = false + end + describe ".create" do before do
Don't polute other tests with persist_in_safe_mode setting.
diff --git a/client/my-sites/themes/index.node.js b/client/my-sites/themes/index.node.js index <HASH>..<HASH> 100644 --- a/client/my-sites/themes/index.node.js +++ b/client/my-sites/themes/index.node.js @@ -12,5 +12,6 @@ export default function( router ) { if ( config.isEnabled( 'manage/themes' ) ) { router( '/design', makeLayout ); router( '/design/type/:tier', makeLayout ); + router( '/design/*', makeLayout ); // Needed so direct hits don't result in a 404. } }
Themes: Add catch-all route to avoid <I> for single-site view
diff --git a/topydo/lib/PrettyPrinterFilter.py b/topydo/lib/PrettyPrinterFilter.py index <HASH>..<HASH> 100644 --- a/topydo/lib/PrettyPrinterFilter.py +++ b/topydo/lib/PrettyPrinterFilter.py @@ -71,7 +71,7 @@ class PrettyPrinterColorFilter(PrettyPrinterFilter): p_todo_str) # tags - p_todo_str = re.sub(r'\b\S+:[^/\s]\S+\b', + p_todo_str = re.sub(r'\b\S+:[^/\s]\S*\b', metadata_color + r'\g<0>' + color, p_todo_str)
Highlight tags when the value is one character long. Tags with a value of length 1 were not highlighted with the metadata color. Compare: <URL>
diff --git a/picoweb/__init__.py b/picoweb/__init__.py index <HASH>..<HASH> 100644 --- a/picoweb/__init__.py +++ b/picoweb/__init__.py @@ -17,11 +17,12 @@ def get_mime_type(fname): return "text/plain" def sendstream(writer, f): + buf = bytearray(64) while True: - buf = f.read(512) - if not buf: + l = f.readinto(buf) + if not l: break - yield from writer.awrite(buf) + yield from writer.awrite(buf, 0, l) def jsonify(writer, dict):
picoweb: sendstream: Use readinto/3-arg awrite. Also, optimize buffer size for low-heap systems like esp<I> (need to make adaptive in the future).
diff --git a/src/DateTime.php b/src/DateTime.php index <HASH>..<HASH> 100644 --- a/src/DateTime.php +++ b/src/DateTime.php @@ -44,7 +44,13 @@ class DateTime extends DT implements JsonSerializable switch (gettype($time)) { case 'object': if ($time instanceof \DateTimeInterface) { - parent::__construct($time->format(\DateTimeInterface::ATOM), $timezone); + if($timezone!==null){ + throw new InvalidArgumentException('Time zone must be null when passing DateTime object.'); + } + parent::__construct( + $time->format(self::STRING_IO_FORMAT_MICRO), + $time->getTimezone() + ); break; } // no break, fall through if not instance of DateTimeInterface
Fixed constructor handling of DateTime object.
diff --git a/test/rql_test/drivers/driver.js b/test/rql_test/drivers/driver.js index <HASH>..<HASH> 100644 --- a/test/rql_test/drivers/driver.js +++ b/test/rql_test/drivers/driver.js @@ -543,7 +543,7 @@ function err_regex(err_name, err_pat, err_frames) { err_frames, err_name + "(\""+err_pat+"\")"); } -function err_predicate(err_name, err_predicate, err_frames, desc) { +function err_predicate(err_name, err_pred, err_frames, desc) { var err_frames = null; // TODO: test for frames var fun = function(other) { if (!(other instanceof Error)) return false; @@ -553,7 +553,7 @@ function err_predicate(err_name, err_predicate, err_frames, desc) { other.msg = other.msg.replace(/:\n([\r\n]|.)*/m, "."); other.msg = other.msg.replace(/\nFailed assertion([\r\n]|.)*/m, ""); - if (!err_predicate(other.msg)) return false; + if (!err_pred(other.msg)) return false; if (err_frames && !(eq_test(other.frames, err_frames))) return false; return true; }
Make function not have the same name as its parameter.
diff --git a/pygubudesigner/previewer.py b/pygubudesigner/previewer.py index <HASH>..<HASH> 100644 --- a/pygubudesigner/previewer.py +++ b/pygubudesigner/previewer.py @@ -157,8 +157,8 @@ class Preview: self.canvas.itemconfigure(self.shapes['window'], window=canvas_window) canvas_window.update_idletasks() canvas_window.grid_propagate(0) - self.w = self.min_w = preview_widget.winfo_width() - self.h = self.min_h = preview_widget.winfo_height() + self.w = self.min_w = preview_widget.winfo_reqwidth() + self.h = self.min_h = preview_widget.winfo_reqheight() self.resize_to(self.w, self.h)
Set correct width and height of widget preview.
diff --git a/src/components/UrlRule.php b/src/components/UrlRule.php index <HASH>..<HASH> 100644 --- a/src/components/UrlRule.php +++ b/src/components/UrlRule.php @@ -42,9 +42,10 @@ class UrlRule extends \luya\base\UrlRule $composition = new \luya\collection\PrefixComposition(); $composition->set($compositionKeys); - Yii::$app->collection->composition = $composition; + yii::$app->collection->composition = $composition; - /* new get default url route @ 07.01.2015 */ + // set the yii app language param based on the composition fullUrl + yii::$app->language = $composition->getFull(); $parts = explode("/", $request->getPathInfo()); // can be deleted after reshuffle array
added the yii app language during luya urlrule "boot".
diff --git a/eac.rb b/eac.rb index <HASH>..<HASH> 100644 --- a/eac.rb +++ b/eac.rb @@ -6,9 +6,8 @@ module EAC class << self def parse(content) xml_doc = Nokogiri::XML(content) - namespaces = xml_doc.collect_namespaces entity_types = xml_doc.xpath("//ns:cpfDescription/ns:identity/ns:entityType", - ns:namespaces['xmlns']) + ns:'urn:isbn:1-931666-33-4') if entity_types.nil? || entity_types.length < 1 raise ArgumentError.new("entityType not found") end
explicit namespace, since it is referred to in the schema
diff --git a/pyinfra/cli.py b/pyinfra/cli.py index <HASH>..<HASH> 100644 --- a/pyinfra/cli.py +++ b/pyinfra/cli.py @@ -142,7 +142,7 @@ def setup_logging(log_level): def print_facts_list(): - print(json.dumps(list(get_fact_names()), indent=4)) + print(json.dumps(list(get_fact_names()), indent=4, default=json_encode)) def print_fact(fact_data): @@ -214,7 +214,7 @@ def print_meta(state): def print_data(inventory): for host in inventory: print('[{0}]'.format(colored(host.name, attrs=['bold']))) - print(json.dumps(host.data.dict(), indent=4)) + print(json.dumps(host.data.dict(), indent=4, default=json_encode)) print() @@ -529,11 +529,13 @@ def make_inventory( # Read the files locals into a dict file_data = import_locals(data_filename) - # Strip out any pseudo module imports + # Strip out any pseudo module imports and _prefixed variables data.update({ key: value for key, value in six.iteritems(file_data) if not isinstance(value, PseudoModule) + and not key.startswith('_') + and key.islower() }) # Attach to group object
Only accept data attributes which are lowercase and don't start `_`.
diff --git a/Console/Command/AssetCompressShell.php b/Console/Command/AssetCompressShell.php index <HASH>..<HASH> 100644 --- a/Console/Command/AssetCompressShell.php +++ b/Console/Command/AssetCompressShell.php @@ -113,11 +113,25 @@ class AssetCompressShell extends AppShell { $this->err('No ' . $ext . ' build files defined, skipping'); return; } + $this->_clearPath(TMP, $themes, $targets); + $path = $this->_Config->cachePath($ext); if (!file_exists($path)) { $this->err('Build directory ' . $path . ' for ' . $ext . ' does not exist.'); return; } + $this->_clearPath($path, $themes, $targets); + } + +/** + * Clear a path of build targets. + * + * @param string $path The path to clear. + * @param array $themes The themes to clear. + * @param array $targets The build targets to clear. + * @return void + */ + protected function _clearPath($path, $themes, $targets) { $dir = new DirectoryIterator($path); foreach ($dir as $file) { $name = $base = $file->getFilename();
Have console tool clear new temporary cache files too. The clear command should clear all the temp files too. Its only polite really.
diff --git a/src/Internal/ErrorHandler.php b/src/Internal/ErrorHandler.php index <HASH>..<HASH> 100644 --- a/src/Internal/ErrorHandler.php +++ b/src/Internal/ErrorHandler.php @@ -99,7 +99,7 @@ class ErrorHandler } $addContent('Message', $message, true, true); $addContent('Simple trace', implode("\n", $simpleTrace), true, true); - //$addContent('Full trace', print_r($trace, true), false, true); + $addContent('Full trace', print_r($trace, true), false, true); } $addContent('Request', $app->request->method . ' ' . $app->request->base . $app->request->path, true, true); $addContent('PHP variables', print_r([
Added full trace to the detailed error log.
diff --git a/src/com/opera/core/systems/scope/services/ums/OperaExec.java b/src/com/opera/core/systems/scope/services/ums/OperaExec.java index <HASH>..<HASH> 100644 --- a/src/com/opera/core/systems/scope/services/ums/OperaExec.java +++ b/src/com/opera/core/systems/scope/services/ums/OperaExec.java @@ -231,17 +231,9 @@ public class OperaExec extends AbstractService implements IOperaExec { public void key(String key, boolean up) { if (up) { - if (!keys.contains(key)) { - throw new WebDriverException("Impossible to release key " + key - + " while it's not down"); - } action("_keyup", key); keys.remove(key); } else { - if (keys.contains(key)) { - throw new WebDriverException("Impossible to push " + key - + " while it's down"); - } action("_keydown", key); keys.add(key); }
Remove check for pressing already pressed key. There are no adverse effects, isn't required by the Se test suite, and will make some future changes easier.
diff --git a/js/southxchange.js b/js/southxchange.js index <HASH>..<HASH> 100644 --- a/js/southxchange.js +++ b/js/southxchange.js @@ -8,7 +8,6 @@ let { ExchangeError } = require ('./base/errors'); // --------------------------------------------------------------------------- module.exports = class southxchange extends Exchange { - describe () { return this.deepExtend (super.describe (), { 'id': 'southxchange', @@ -251,4 +250,4 @@ module.exports = class southxchange extends Exchange { let response = await this.fetch2 (path, api, method, params, headers, body); return response; } -} +};
southxchange: linting
diff --git a/h2o-py/h2o/group_by.py b/h2o-py/h2o/group_by.py index <HASH>..<HASH> 100644 --- a/h2o-py/h2o/group_by.py +++ b/h2o-py/h2o/group_by.py @@ -2,7 +2,7 @@ from __future__ import print_function from __future__ import absolute_import from past.builtins import basestring from .expr import ExprNode -from . import h2o +import h2o class GroupBy: diff --git a/h2o-py/h2o/h2o.py b/h2o-py/h2o/h2o.py index <HASH>..<HASH> 100644 --- a/h2o-py/h2o/h2o.py +++ b/h2o-py/h2o/h2o.py @@ -511,7 +511,7 @@ def download_pojo(model,path="", get_jar=True): print("Filepath: {}".format(filepath)) if path == "": print(java.text) else: - with open(filepath, 'wb') as f: + with open(filepath, 'w') as f: f.write(java.text) if get_jar and path!="": url = H2OConnection.make_url("h2o-genmodel.jar")
stupid relative imports don't work in py2
diff --git a/lib/espresso-runner.js b/lib/espresso-runner.js index <HASH>..<HASH> 100644 --- a/lib/espresso-runner.js +++ b/lib/espresso-runner.js @@ -143,11 +143,18 @@ class EspressoRunner { async buildNewModServer () { let buildConfiguration = {}; if (this.espressoBuildConfig) { - logger.info(`Using build configuration JSON from: '${this.espressoBuildConfig}'`); + let buildConfigurationStr; + if (await fs.exists(this.espressoBuildConfig)) { + logger.info(`Loading the build configuration from '${this.espressoBuildConfig}'`); + buildConfigurationStr = await fs.readFile(this.espressoBuildConfig, 'utf8'); + } else { + logger.info(`Loading the build configuration from 'espressoBuildConfig' capability`); + buildConfigurationStr = this.espressoBuildConfig; + } try { - buildConfiguration = JSON.parse(await fs.readFile(this.espressoBuildConfig, 'utf8')); + buildConfiguration = JSON.parse(buildConfigurationStr); } catch (e) { - logger.error('Failed to parse build configuration JSON', e); + logger.error('Cannot parse the build configuration JSON', e); throw e; } }
feat: Make it possible to provide a build config directly from capabilities (#<I>)
diff --git a/pkg/hubble/relay/pool/manager.go b/pkg/hubble/relay/pool/manager.go index <HASH>..<HASH> 100644 --- a/pkg/hubble/relay/pool/manager.go +++ b/pkg/hubble/relay/pool/manager.go @@ -200,7 +200,6 @@ func (m *Manager) manageConnections() { } m.mu.Unlock() for _, p := range retry { - m.disconnect(p) m.connect(p, false) } }
hubble/relay: do not call disconnect before connection attempt This is not necessary as the connect function closes pre-existing connections.
diff --git a/jest/base.config.js b/jest/base.config.js index <HASH>..<HASH> 100644 --- a/jest/base.config.js +++ b/jest/base.config.js @@ -1,6 +1,9 @@ const path = require('path') module.exports = { + collectCoverage: true, + coverageDirectory: '<rootDir>/coverage', + coverageReporters: ['lcov'], modulePathIgnorePatterns: ['<rootDir>/scripts/'], rootDir: path.resolve(__dirname, '..'), setupFiles: ['raf/polyfill', '<rootDir>/jest/setup.js']
feat: test coverage output; just because
diff --git a/daemon/daemon.go b/daemon/daemon.go index <HASH>..<HASH> 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -520,8 +520,6 @@ func (d *Daemon) compileBase() error { args[initArgMode] = mode args[initArgDevice] = option.Config.Device - - args = append(args, option.Config.Device) } else { if option.Config.IsLBEnabled() && strings.ToLower(option.Config.Tunnel) != "disabled" { //FIXME: allow LBMode in tunnel
daemon: Remove unnecessary and unsafe arg append for init.sh The append was adding Device beyond initArgMax which was not used by init.sh
diff --git a/devil/devil/android/device_utils.py b/devil/devil/android/device_utils.py index <HASH>..<HASH> 100644 --- a/devil/devil/android/device_utils.py +++ b/devil/devil/android/device_utils.py @@ -3045,7 +3045,11 @@ class DeviceUtils(object): Raises: CommandTimeoutError on timeout. """ - return self.GetProp('ro.product.cpu.abilist', cache=True).split(',') + supported_abis = self.GetProp('ro.product.cpu.abilist', cache=True) + return [ + supported_abi for supported_abi in supported_abis.split(',') + if supported_abi + ] @decorators.WithTimeoutAndRetriesFromInstance() def GetFeatures(self, timeout=None, retries=None):
Filter empty strings out of the list returned by GetSupportedABIs. Bug: chromium:<I> Change-Id: Ie<I>b<I>c<I>c8c<I>b<I>dbbf7 Reviewed-on: <URL>
diff --git a/src/java/net/jpountz/lz4/LZ4FrameOutputStream.java b/src/java/net/jpountz/lz4/LZ4FrameOutputStream.java index <HASH>..<HASH> 100644 --- a/src/java/net/jpountz/lz4/LZ4FrameOutputStream.java +++ b/src/java/net/jpountz/lz4/LZ4FrameOutputStream.java @@ -43,8 +43,8 @@ import java.util.Locale; */ public class LZ4FrameOutputStream extends FilterOutputStream { - protected static final int INTEGER_BYTES = Integer.SIZE >>> 3; // or Integer.BYTES in Java 1.8 - protected static final int LONG_BYTES = Long.SIZE >>> 3; // or Long.BYTES in Java 1.8 + static final int INTEGER_BYTES = Integer.SIZE >>> 3; // or Integer.BYTES in Java 1.8 + static final int LONG_BYTES = Long.SIZE >>> 3; // or Long.BYTES in Java 1.8 static final int MAGIC = 0x184D2204; static final int LZ4_MAX_HEADER_LENGTH = @@ -392,7 +392,7 @@ public class LZ4FrameOutputStream extends FilterOutputStream { } } - public static class FrameInfo { + static class FrameInfo { private final FLG flg; private final BD bd; private final StreamingXXHash32 streamHash;
Change the accessibility of INTEGER_BYTES, LONG_BYTES, and FrameInfo to package, because external classes do not need them
diff --git a/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/converter/VariantContextToVariantConverter.java b/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/converter/VariantContextToVariantConverter.java index <HASH>..<HASH> 100644 --- a/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/converter/VariantContextToVariantConverter.java +++ b/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/converter/VariantContextToVariantConverter.java @@ -139,7 +139,13 @@ public class VariantContextToVariantConverter implements Converter<VariantContex + ":" + StringUtils.join(variantContext.getAlternateAlleles(), ",")); Map<String, String> attributes = new HashMap<>(); for (String key : variantContext.getAttributes().keySet()) { - attributes.put(key, variantContext.getAttributeAsString(key, "")); + // Do not use "getAttributeAsString" for lists. + // It will add brackets surrounding the values + if (variantContext.getAttribute(key, "") instanceof List) { + attributes.put(key, StringUtils.join(variantContext.getAttributeAsList(key), VCFConstants.INFO_FIELD_ARRAY_SEPARATOR)); + } else { + attributes.put(key, variantContext.getAttributeAsString(key, "")); + } } // QUAL
tools: Bugfix while parsing INFO column. Htsjdk adds brackets to fields that are read as lists when they are obtained with getAttributeAsString.
diff --git a/test/has_scope_test.rb b/test/has_scope_test.rb index <HASH>..<HASH> 100644 --- a/test/has_scope_test.rb +++ b/test/has_scope_test.rb @@ -44,6 +44,16 @@ class TreesController < ApplicationController alias :edit :show protected + # Silence deprecations in the test suite, except for the actual deprecated String if/unless options. + # TODO: remove with the deprecation. + def apply_scopes(*) + if params[:eval_plant] + super + else + ActiveSupport::Deprecation.silence { super } + end + end + def restrict_to_only_tall_trees? true end
Silence deprecations temporarily in the test suite They are very noisy in all other methods that don't need it.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -5,15 +5,13 @@ from setuptools import setup, find_packages -with open('README.md') as readme_file: +with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() -requirements = [ - "RPi.GPIO" -] +requirements = [] setup_requirements = []
changed the Readme back to .rst
diff --git a/spyderlib/utils/external/path.py b/spyderlib/utils/external/path.py index <HASH>..<HASH> 100644 --- a/spyderlib/utils/external/path.py +++ b/spyderlib/utils/external/path.py @@ -62,7 +62,6 @@ _base = str _getcwd = os.getcwd try: if os.path.supports_unicode_filenames: - import locale _base = unicode _getcwd = os.getcwdu except AttributeError:
External path library: Remove unneeded import which was causing a crash after last update
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 @@ -38,9 +38,11 @@ def delete_generated_files test_case, example=nil Dir.chdir(dir) do [ "#{test_case}.c", "#{test_case}.so", "Makefile", - "extconf.rb" , "#{test_case}.o" + "extconf.rb" , "#{test_case}.o", "#{test_case}.bundle", + "#{test_case}.dll" + ].each do |f| - FileUtils.rm f + FileUtils.rm(f) if File.exist?(f) end end end
allow support for .bundle files and .dll files teardown in specs
diff --git a/spec/actv/asset_spec.rb b/spec/actv/asset_spec.rb index <HASH>..<HASH> 100644 --- a/spec/actv/asset_spec.rb +++ b/spec/actv/asset_spec.rb @@ -1,5 +1,4 @@ require 'spec_helper' -require 'pry' describe ACTV::Asset do
Removes pry from asset spec
diff --git a/spec/functional/chef/source/git_spec.rb b/spec/functional/chef/source/git_spec.rb index <HASH>..<HASH> 100644 --- a/spec/functional/chef/source/git_spec.rb +++ b/spec/functional/chef/source/git_spec.rb @@ -263,11 +263,11 @@ module Librarian end context "if the path option is right" do - let(:repo_path) { tmp_path.join('repo/resolve') } + let(:repo_path) { tmp_path.join("repo/resolve") } before do repo_path.rmtree if repo_path.exist? repo_path.mkpath - repo_path.join('cookbooks').mkpath + repo_path.join("cookbooks").mkpath cheffile = Helpers.strip_heredoc(<<-CHEFFILE) #!/usr/bin/env ruby cookbook "sample",
Use double-quoted string literals by convention.
diff --git a/tests/test_bot_get.py b/tests/test_bot_get.py index <HASH>..<HASH> 100644 --- a/tests/test_bot_get.py +++ b/tests/test_bot_get.py @@ -16,7 +16,8 @@ from .test_bot import TestBot from .test_variables import (TEST_CAPTION_ITEM, TEST_COMMENT_ITEM, TEST_PHOTO_ITEM, TEST_SEARCH_USERNAME_ITEM, TEST_USER_ITEM, TEST_USERNAME_INFO_ITEM, - TEST_TIMELINE_PHOTO_ITEM, TEST_USER_TAG_ITEM) + TEST_TIMELINE_PHOTO_ITEM, TEST_USER_TAG_ITEM, + TEST_MEDIA_LIKER) class TestBotGet(TestBot):
Added TEST_MEDIA_LIKER
diff --git a/lib/twitter4j4r/client.rb b/lib/twitter4j4r/client.rb index <HASH>..<HASH> 100644 --- a/lib/twitter4j4r/client.rb +++ b/lib/twitter4j4r/client.rb @@ -1,5 +1,3 @@ -require 'jruby/core_ext' - require 'jar/twitter4j-core-2.2.6.jar' require 'jar/twitter4j-stream-2.2.6.jar' require 'jar/twitter4j-async-2.2.6.jar' @@ -33,7 +31,6 @@ module Twitter4j4r end def start(search_terms) - Listener.become_java! @stream.addListener(Listener.new(self, @status_block, @exception_block, @limitation_block)) @stream.filter(Java::Twitter4j::FilterQuery.new(0, nil, search_terms.to_java(:string))) end diff --git a/lib/twitter4j4r/listener.rb b/lib/twitter4j4r/listener.rb index <HASH>..<HASH> 100644 --- a/lib/twitter4j4r/listener.rb +++ b/lib/twitter4j4r/listener.rb @@ -1,4 +1,5 @@ require 'jar/twitter4j-stream-2.2.6.jar' +require 'jruby/core_ext' module Twitter4j4r class Listener @@ -29,3 +30,5 @@ module Twitter4j4r end end end + +Twitter4j4r::Listener.become_java!
Move the become_java! call to listener.rb
diff --git a/src/suggestions.js b/src/suggestions.js index <HASH>..<HASH> 100644 --- a/src/suggestions.js +++ b/src/suggestions.js @@ -19,7 +19,7 @@ function makeSuggestion(queryName, element, content, {variant, name}) { let warning = '' const queryOptions = {} const queryArgs = [ - queryName === 'Role' || queryName === 'TestId' + ['Role', 'TestId'].includes(queryName) ? content : getRegExpMatcher(content), ]
chore: Update suggestions.js (#<I>)
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -81,7 +81,6 @@ describe("phantom html to pdf", function () { fs.unlinkSync(filePath); } catch (e) { } - ; } } };
Adding empty endline to test file
diff --git a/src/you_get/processor/ffmpeg.py b/src/you_get/processor/ffmpeg.py index <HASH>..<HASH> 100644 --- a/src/you_get/processor/ffmpeg.py +++ b/src/you_get/processor/ffmpeg.py @@ -18,11 +18,7 @@ def get_usable_ffmpeg(cmd): except: return None -get_usable_ffmpeg_result = get_usable_ffmpeg('ffmpeg') or get_usable_ffmpeg('avconv') -if get_usable_ffmpeg_result: - FFMPEG, FFMPEG_VERSION = get_usable_ffmpeg_result -else: - FFMPEG, FFMPEG_VERSION = None, None +FFMPEG, FFMPEG_VERSION = get_usable_ffmpeg('ffmpeg') or get_usable_ffmpeg('avconv') or (None, None) def has_ffmpeg_installed(): return FFMPEG is not None
set FFMPEG and FFMPEG_VERSION gracefully
diff --git a/examples/s3/presignedpostpolicy.go b/examples/s3/presignedpostpolicy.go index <HASH>..<HASH> 100644 --- a/examples/s3/presignedpostpolicy.go +++ b/examples/s3/presignedpostpolicy.go @@ -51,5 +51,4 @@ func main() { fmt.Printf("-F %s=%s ", k, v) } fmt.Printf("-F file=@/etc/passwd ") - fmt.Printf(config.Endpoint + "/mybucket\n") }
Update presignedpostpolicy.go
diff --git a/public/suite.js b/public/suite.js index <HASH>..<HASH> 100644 --- a/public/suite.js +++ b/public/suite.js @@ -120,6 +120,7 @@ out.sourceURL = err.sourceURL out.message = err.message out.assertion = err.assertion + out.elapsed = err.elapsed } else { out = {pass:true} } @@ -132,7 +133,7 @@ message: err_name , sourceURL: script , lineNumber: line - , assertion: is_assert + , assertion: is_assert }) test.emit('end') } @@ -251,19 +252,23 @@ function suite(name, fn) { var test_suite = new TestSuite(name) , name = 'test-module-'+(+new Date()) + , now = +new Date() , timeout __c__.attach(test_suite) window.onerror = function(err_name, script, line) { // errors at this point are probably syntax errors. - console.log(err_name, script, line) + + err_name.elapsed = +new Date() - now + test_suite.push_update(test_suite.urls.error) - test_suite.add_result({name:name}, 'error', { + test_suite.add_result({name:name}, 'error', typeof err_name === 'string' ? { message: err_name , sourceURL: script , line: line - }) + , elapsed: +new Date() - now + } : err_name) test_suite.finish() }
making require.js-based errors a little bit more parse-able
diff --git a/package/cloudshell/cp/vcenter/common/utilites/savers/linked_clone_artifact_saver.py b/package/cloudshell/cp/vcenter/common/utilites/savers/linked_clone_artifact_saver.py index <HASH>..<HASH> 100644 --- a/package/cloudshell/cp/vcenter/common/utilites/savers/linked_clone_artifact_saver.py +++ b/package/cloudshell/cp/vcenter/common/utilites/savers/linked_clone_artifact_saver.py @@ -128,7 +128,7 @@ class LinkedCloneArtifactHandler(object): folder = self.pv_service.get_folder(self.si, path) if not folder: self.logger.info('Could not find folder: {0}'.format(path)) - result = 'Could not find folder {0}'.format(path) + result = SUCCESS else: self.logger.info('Found folder: {0}'.format(path)) result = self.folder_manager.delete_folder(folder, self.logger)
dont fail delete saved if folder not found
diff --git a/Controller/Toolkit.php b/Controller/Toolkit.php index <HASH>..<HASH> 100644 --- a/Controller/Toolkit.php +++ b/Controller/Toolkit.php @@ -256,7 +256,8 @@ class sb_Controller_Toolkit extends sb_Controller{ $protocol = isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http'; - $str = "var sbBase = '".$protocol."://".Gateway::$http_host."/surebert/load/';\n"; + + $str = "if(!sbBase){var sbBase = '".$protocol."://".Gateway::$http_host."/surebert/load/';}\n"; $surebert = array_merge($surebert, $this->request->args); $str .= $this->concat_files($surebert, $version);
only defines sbBase if not defined already
diff --git a/lib/datalib.php b/lib/datalib.php index <HASH>..<HASH> 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -771,13 +771,6 @@ function get_records_sql($sql) { foreach ($records as $key => $record) { $objects[$key] = (object) $record; } - // log performance info - if ($rs->RecordCount() > 100 - && !empty($CFG->perfdebug) - && function_exists('memory_get_usage')) { - error_log("get_records_sql() in $_SERVER[REQUEST_URI]. Fetched $rs->RecordCount() records. Memory allocated: " - . memory_get_usage()); - } return $objects; } else { return false;
Backed out unrelated block from last commit
diff --git a/nexl-client/public/util-functions/nexl-ui.js b/nexl-client/public/util-functions/nexl-ui.js index <HASH>..<HASH> 100644 --- a/nexl-client/public/util-functions/nexl-ui.js +++ b/nexl-client/public/util-functions/nexl-ui.js @@ -82,7 +82,7 @@ var module = (function (module) { function putDataIntoOutputArea(data) { if (!isString(data)) { - data = JSON.stringify(data); + data = JSON.stringify(data, null, 4); } if (isArray(data)) {
- output become formatted in nexl-client;
diff --git a/payment/src/main/java/org/killbill/billing/payment/invoice/InvoicePaymentControlPluginApi.java b/payment/src/main/java/org/killbill/billing/payment/invoice/InvoicePaymentControlPluginApi.java index <HASH>..<HASH> 100644 --- a/payment/src/main/java/org/killbill/billing/payment/invoice/InvoicePaymentControlPluginApi.java +++ b/payment/src/main/java/org/killbill/billing/payment/invoice/InvoicePaymentControlPluginApi.java @@ -597,10 +597,7 @@ public final class InvoicePaymentControlPluginApi implements PaymentControlPlugi } private Invoice getAndSanitizeInvoice(final UUID invoiceId, final InternalCallContext context) throws InvoiceApiException { - final Invoice invoicePriorRebalancing = invoiceApi.getInvoiceById(invoiceId, context); - invoiceApi.consumeExistingCBAOnAccountWithUnpaidInvoices(invoicePriorRebalancing.getAccountId(), context); final Invoice invoice = invoiceApi.getInvoiceById(invoiceId, context); - if (checkForIncompleteInvoicePaymentAndRepair(invoice, context)) { // Fetch new repaired 'invoice' return invoiceApi.getInvoiceById(invoiceId, context);
payment: Optimize priorCall to avoid unnecessary logic and limit # invoice queries. See #<I>
diff --git a/libs/verysimple/Phreeze/CriteriaFilter.php b/libs/verysimple/Phreeze/CriteriaFilter.php index <HASH>..<HASH> 100644 --- a/libs/verysimple/Phreeze/CriteriaFilter.php +++ b/libs/verysimple/Phreeze/CriteriaFilter.php @@ -51,7 +51,7 @@ class CriteriaFilter foreach ($propertyNames as $propName) { $dbfield = $criteria->GetFieldFromProp($propName); - $where .= $orDelim . $dbfield ." like '". $criteria->Escape($this->Value) . "'"; + $where .= $orDelim . $criteria->Escape($dbfield) ." like '". $criteria->Escape($this->Value) . "'"; $orDelim = ' or '; } $where .= ') ';
criteria filter now sql escapes column/property names
diff --git a/lib/commands/touch.js b/lib/commands/touch.js index <HASH>..<HASH> 100644 --- a/lib/commands/touch.js +++ b/lib/commands/touch.js @@ -27,7 +27,7 @@ commands.performActions = async function (actions) { } } : {})); this.log.debug(`Preprocessed actions: ${JSON.stringify(preprocessedActions, null, ' ')}`); - return await this.uiautomator2.jwproxy.command('/actions', 'POST', {actions}); + return await this.uiautomator2.jwproxy.command('/actions', 'POST', {actions: preprocessedActions}); }; Object.assign(extensions, commands);
fix: wrong parameter in performActions (#<I>) ActionChains in selenium have a PointerInput whose kind(pointerType) is "mouse". We should change this to "touch" for android devices to work properly. (I confired "mouse" doesn't work and "touch" works.) There is code for converting "mouse" to "touch" ("preprocessedActions") But wrong old variable was used.
diff --git a/pyramid_multiauth/__init__.py b/pyramid_multiauth/__init__.py index <HASH>..<HASH> 100644 --- a/pyramid_multiauth/__init__.py +++ b/pyramid_multiauth/__init__.py @@ -261,9 +261,19 @@ def policy_factory_from_module(config, module): # Find the most recent IAuthenticationPolicy action, and grab # out the registering function so we can call it ourselves. for action in reversed(config.action_state.actions): - if action[0] is not IAuthenticationPolicy: + # Extract the discriminator and callable. This is complicated by + # Pyramid 1.3 changing action from a tuple to a dict. + try: + discriminator = action["discriminator"] + callable = action["callable"] + except TypeError: # pragma: nocover + discriminator = action[0] # pragma: nocover + callable = action[1] # pragma: nocover + # If it's not setting the authn policy, keep looking. + if discriminator is not IAuthenticationPolicy: continue - def grab_policy(register=action[1]): # NOQA + # Otherwise, wrap it up so we can extract the registered object. + def grab_policy(register=callable): # NOQA old_policy = config.registry.queryUtility(IAuthenticationPolicy) register() new_policy = config.registry.queryUtility(IAuthenticationPolicy)
Compatability with Pyramid <I>. Pyramid <I> changes the API of the internal ActionState object, which pyramid_multiauth uses for deep introspection. This patch tries the <I> API first and falls back to the previous API if that fails.
diff --git a/lib/actions/field-trip.js b/lib/actions/field-trip.js index <HASH>..<HASH> 100644 --- a/lib/actions/field-trip.js +++ b/lib/actions/field-trip.js @@ -234,7 +234,7 @@ export function addFieldTripNote(request, note, intl) { } /** - * Updates a particular field/set of fields of a given field trip request. + * Invokes OTP Datatstore to update a field trip request or its related notes or itineraries. */ function updateFieldTripRequest( request,
refactor(actions/field-trip): Tweak comment.
diff --git a/src/main/java/net/fortuna/ical4j/validate/DefaultCalendarValidatorFactory.java b/src/main/java/net/fortuna/ical4j/validate/DefaultCalendarValidatorFactory.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/fortuna/ical4j/validate/DefaultCalendarValidatorFactory.java +++ b/src/main/java/net/fortuna/ical4j/validate/DefaultCalendarValidatorFactory.java @@ -10,9 +10,13 @@ import static net.fortuna.ical4j.validate.ValidationRule.ValidationType.OneOrLes * Created by fortuna on 13/09/15. */ public class DefaultCalendarValidatorFactory implements CalendarValidatorFactory { + + private static final ValidationRule REQUIRED_PROPERTIES_RULE = new ValidationRule(One, PRODID, VERSION); + private static final ValidationRule OPTIONAL_PROPERTIES_RULE = new ValidationRule(OneOrLess, CALSCALE, METHOD); + @Override public Validator<Calendar> newInstance() { - return new CalendarValidatorImpl(new ValidationRule(One, PRODID, VERSION), - new ValidationRule(OneOrLess, CALSCALE, METHOD)); + return new CalendarValidatorImpl(REQUIRED_PROPERTIES_RULE, + OPTIONAL_PROPERTIES_RULE); } }
Extract constant rules in DefaultCalendarValidatorFactory Reduces memory footprint & garbage collection. gh-<I>
diff --git a/elasticsearch-extensions/lib/elasticsearch/extensions/ansi/response.rb b/elasticsearch-extensions/lib/elasticsearch/extensions/ansi/response.rb index <HASH>..<HASH> 100644 --- a/elasticsearch-extensions/lib/elasticsearch/extensions/ansi/response.rb +++ b/elasticsearch-extensions/lib/elasticsearch/extensions/ansi/response.rb @@ -31,7 +31,11 @@ module Elasticsearch Actions.send(m, self, options) end - output.compact.join("\n") + unless output.compact.empty? + output.compact.join("\n") + else + self.respond_to?(:awesome_inspect) ? self.awesome_inspect : self.inspect + end end end
[EXT] Added, that ANSI extension uses the `awesome_print` gem for "unknown" handlers
diff --git a/distutils/tests/test_msvccompiler.py b/distutils/tests/test_msvccompiler.py index <HASH>..<HASH> 100644 --- a/distutils/tests/test_msvccompiler.py +++ b/distutils/tests/test_msvccompiler.py @@ -110,6 +110,26 @@ class TestSpawn(unittest.TestCase): thread.join() assert all(threads) + def test_concurrent_safe_fallback(self): + """ + If CCompiler.spawn has been monkey-patched without support + for an env, it should still execute. + """ + import distutils._msvccompiler as _msvccompiler + from distutils import ccompiler + compiler = _msvccompiler.MSVCCompiler() + compiler._paths = "expected" + + def CCompiler_spawn(self, cmd): + "A spawn without an env argument." + assert os.environ["PATH"] == "expected" + + with unittest.mock.patch.object( + ccompiler.CCompiler, 'spawn', CCompiler_spawn): + compiler.spawn(["n/a"]) + + assert os.environ.get("PATH") != "expected" + def test_suite(): return unittest.makeSuite(msvccompilerTestCase)
Add test capturing failed expectation. Ref pypa/distutils#<I>.
diff --git a/patreon/schemas/goal_spec.py b/patreon/schemas/goal_spec.py index <HASH>..<HASH> 100644 --- a/patreon/schemas/goal_spec.py +++ b/patreon/schemas/goal_spec.py @@ -26,9 +26,7 @@ def test_schema_attributes_are_properly_formatted(attributes): def test_schema_relationships_are_properly_formatted(relationships): - for relationship_name in relationships: - value = getattr(goal.Relationships, relationship_name, None) - assert value is not None and value is relationship_name + assert len(relationships) is 0 def test_schema_has_expected_default_attributes(): @@ -40,4 +38,4 @@ def test_schema_has_expected_default_attributes(): def test_schema_has_expected_default_relationships(): - assert goal.default_relationships == [] + assert len(goal.default_relationships) is 0
Modify goal spec to check for empty list since that's what we have.
diff --git a/lib/stripe/util.rb b/lib/stripe/util.rb index <HASH>..<HASH> 100644 --- a/lib/stripe/util.rb +++ b/lib/stripe/util.rb @@ -124,7 +124,7 @@ module Stripe when NilClass {} when String - {api_key: opts} + {:api_key => opts} when Hash opts.clone else
Fix use of <I>-style hashes
diff --git a/models/classes/class.TestsService.php b/models/classes/class.TestsService.php index <HASH>..<HASH> 100644 --- a/models/classes/class.TestsService.php +++ b/models/classes/class.TestsService.php @@ -91,7 +91,7 @@ class taoTests_models_classes_TestsService * @author Joel Bout, <joel@taotesting.com> * @return core_kernel_classes_Class */ - public function getRootclass() + public function getRootClass() { return $this->getClass(TaoOntology::CLASS_URI_TEST); }
TAO-<I> - The GetRootclass renamed to GetRootClass
diff --git a/src/frontend/org/voltdb/export/ExportGeneration.java b/src/frontend/org/voltdb/export/ExportGeneration.java index <HASH>..<HASH> 100644 --- a/src/frontend/org/voltdb/export/ExportGeneration.java +++ b/src/frontend/org/voltdb/export/ExportGeneration.java @@ -115,6 +115,7 @@ public class ExportGeneration implements Generation { @Override public void run() { final HostMessenger messenger = ExportManager.instance().getHostMessenger(); + // We need this null check for tests which TestExportGeneration without messenger. if (messenger != null) { for (Map.Entry<Integer, String> entry : m_partitionLeaderZKName.entrySet()) { messenger.getZK().delete( @@ -746,6 +747,7 @@ public class ExportGeneration implements Generation { private void cleanup(final HostMessenger messenger) { shutdown = true; + //We need messenger NULL guard for tests. if (m_mbox != null && messenger != null) { for (Integer partition : m_dataSourcesByPartition.keySet()) { final String partitionDN = m_mailboxesZKPath + "/" + partition;
ENG-<I>-<I>: Add comments
diff --git a/jsoncmd.go b/jsoncmd.go index <HASH>..<HASH> 100644 --- a/jsoncmd.go +++ b/jsoncmd.go @@ -5960,7 +5960,7 @@ func (cmd *SignMessageCmd) UnmarshalJSON(b []byte) error { // RawTxInput models the data needed for a raw tx input. type RawTxInput struct { Txid string `json:"txid"` - Vout int `json:"vout"` + Vout uint32 `json:"vout"` ScriptPubKey string `json:"scriptPubKey"` RedeemScript string `json:"redeemScript"` }
Change RawTxInput.Vout to uint<I> as well. This was missed by the previous commit.
diff --git a/molgenis-data/src/main/java/org/molgenis/data/support/QueryImpl.java b/molgenis-data/src/main/java/org/molgenis/data/support/QueryImpl.java index <HASH>..<HASH> 100644 --- a/molgenis-data/src/main/java/org/molgenis/data/support/QueryImpl.java +++ b/molgenis-data/src/main/java/org/molgenis/data/support/QueryImpl.java @@ -31,19 +31,19 @@ public class QueryImpl<E extends Entity> implements Query<E> private Repository<E> repository; - public static Query<Entity> query() + public static <T extends Entity> Query<T> query() { return new QueryImpl<>(); } - public static Query<Entity> EQ(String attributeName, Object value) + public static <T extends Entity> Query<T> EQ(String attributeName, Object value) { - return query().eq(attributeName, value); + return QueryImpl.<T>query().eq(attributeName, value); } - public static Query<Entity> IN(String attributeName, Iterable<?> values) + public static <T extends Entity> Query<T> IN(String attributeName, Iterable<?> values) { - return query().in(attributeName, values); + return QueryImpl.<T>query().in(attributeName, values); } public QueryImpl()
[REFACTOR] Make QueryImpl EQ, IN and query methods generic.
diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index <HASH>..<HASH> 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -29,7 +29,10 @@ class VendorImporter: for prefix in self.search_path: try: __import__(prefix + target) - mod = sys.modules[fullname] = sys.modules.pop(prefix + target) + mod = sys.modules[prefix + target] + sys.modules[fullname] = mod + if sys.version_info > (3, 3): + del sys.modules[prefix + target] return mod except ImportError: pass
Based on experimentation, the canonical module name needs to be in sys.modules on Python prior to <I>, but must be omitted on Python <I> and later. --HG-- branch : feature/issue-<I>
diff --git a/source/org/jasig/portal/security/md5passwd.java b/source/org/jasig/portal/security/md5passwd.java index <HASH>..<HASH> 100644 --- a/source/org/jasig/portal/security/md5passwd.java +++ b/source/org/jasig/portal/security/md5passwd.java @@ -4,7 +4,7 @@ * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + *u * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * @@ -73,6 +73,12 @@ public class md5passwd { String spass; int cnt = 0; + // Make sure user is specified correctly + if (user == null || user.trim().length() <= 0) { + System.out.println("You did not specify a valid user name. Please try again."); + System.exit(0); + } + // Check to see if the user exists conn = rdbm.getConnection(); @@ -95,6 +101,7 @@ public class md5passwd { r.nextBytes(rnd); md.update(rnd); System.out.print("Enter Password for " + user + ": "); + System.out.flush(); // Needed for prompt to appear when running from Ant. BufferedReader d = new BufferedReader(new InputStreamReader(System.in)); spass = d.readLine(); hash = md.digest(spass.getBytes());
Made some minor adjustments so that md5passwd can be run from Ant. git-svn-id: <URL>
diff --git a/lib/beaker-vagrant/version.rb b/lib/beaker-vagrant/version.rb index <HASH>..<HASH> 100644 --- a/lib/beaker-vagrant/version.rb +++ b/lib/beaker-vagrant/version.rb @@ -1,3 +1,3 @@ module BeakerVagrant - VERSION = '0.6.4' + VERSION = '0.6.5' end
(GEM) update beaker-vagrant version to <I>
diff --git a/app/controllers/effective/regions_controller.rb b/app/controllers/effective/regions_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/effective/regions_controller.rb +++ b/app/controllers/effective/regions_controller.rb @@ -4,6 +4,8 @@ module Effective layout false before_filter :authenticate_user! if defined?(Devise) + skip_log_page_views :quiet => true, :only => [:snippet, :snippets, :templates] if defined?(EffectiveLogging) + skip_before_filter :verify_authenticity_token, :only => [:update] def edit diff --git a/lib/effective_regions/version.rb b/lib/effective_regions/version.rb index <HASH>..<HASH> 100644 --- a/lib/effective_regions/version.rb +++ b/lib/effective_regions/version.rb @@ -1,3 +1,3 @@ module EffectiveRegions - VERSION = "0.3.12" + VERSION = "0.3.13" end
skip_log_page_views if EffectiveLogging is installed. Version <I>
diff --git a/packages/lingui-react/src/I18nProvider.js b/packages/lingui-react/src/I18nProvider.js index <HASH>..<HASH> 100644 --- a/packages/lingui-react/src/I18nProvider.js +++ b/packages/lingui-react/src/I18nProvider.js @@ -28,9 +28,13 @@ class I18nManager { development?: Object, i18n?: I18n }) { - this.i18n = i18n || new I18n(language, messages, languageData) + this.i18n = i18n || new I18n() if (development) this.i18n.development(development) + + if (messages) this.i18n.load(messages) + if (languageData) this.i18n.loadLanguageData(languageData) + this.i18n.activate(language) } subscribe = (callback: Function) => { diff --git a/packages/lingui-react/src/dev/index.js b/packages/lingui-react/src/dev/index.js index <HASH>..<HASH> 100644 --- a/packages/lingui-react/src/dev/index.js +++ b/packages/lingui-react/src/dev/index.js @@ -1,4 +1,3 @@ // Most React projects will import everything from lingui-react module. // Reexport dev from lingui-i18n to make it easier. export { default } from 'lingui-i18n/dev' -
fix: Load messages after dev data are setup
diff --git a/raiden/transfer/mediated_transfer/initiator.py b/raiden/transfer/mediated_transfer/initiator.py index <HASH>..<HASH> 100644 --- a/raiden/transfer/mediated_transfer/initiator.py +++ b/raiden/transfer/mediated_transfer/initiator.py @@ -273,7 +273,7 @@ def send_lockedtransfer( # amount, as a guarantee to the mediator that the fee will be claimable # on-chain. total_amount = PaymentWithFeeAmount( - transfer_description.amount + route_states[0].estimated_fee # FIXME + transfer_description.amount + route_state.estimated_fee ) lockedtransfer_event = channel.send_lockedtransfer(
Fix fee calculation in `send_lockedtransfer`
diff --git a/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb b/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb index <HASH>..<HASH> 100644 --- a/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +++ b/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb @@ -5,7 +5,11 @@ module Katello def prepare_host if params['uuid'] - @host = Katello::Host::SubscriptionFacet.find_by(uuid: params['uuid']).host + @host = Katello::Host::SubscriptionFacet.find_by(uuid: params['uuid'])&.host + if @host.nil? + msg = N_("Host was not found by the subscription UUID: '%s', this can happen if the host is registered already, but not to this Foreman") % params['uuid'] + fail ActiveRecord::RecordNotFound, msg + end @host.assign_attributes(host_params('host')) @host.save! else
Fixes #<I> - Global Registration fails when host not found (#<I>) Fix for case, when the host is already registered by subscription-manager, but does not exists in Foreman.
diff --git a/src/Composer/Installer/LibraryInstaller.php b/src/Composer/Installer/LibraryInstaller.php index <HASH>..<HASH> 100644 --- a/src/Composer/Installer/LibraryInstaller.php +++ b/src/Composer/Installer/LibraryInstaller.php @@ -268,7 +268,7 @@ class LibraryInstaller implements InstallerInterface } // attempt removing the bin dir in case it is left empty - if ($this->filesystem->isDirEmpty($this->binDir)) { + if ((is_dir($this->binDir)) && ($this->filesystem->isDirEmpty($this->binDir))) { @rmdir($this->binDir); } }
Ensure the bin directory exists before checking empty Line <I> has similar logic so avoided doing the check withiin `isDirEmpty()`
diff --git a/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php b/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php index <HASH>..<HASH> 100644 --- a/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/MergeSharedEntitiesTest.php @@ -94,7 +94,7 @@ class MergeSharedEntitiesTest extends OrmFunctionalTestCase /** * @group DDC-2704 */ - public function testMergeInheritedTransientProperties() + public function testMergeInheritedTransientPrivateProperties() { $admin1 = new MSEAdmin(); $admin2 = new MSEAdmin();
DDC-<I> - renaming test case for clarity
diff --git a/lib/array_logic/version.rb b/lib/array_logic/version.rb index <HASH>..<HASH> 100644 --- a/lib/array_logic/version.rb +++ b/lib/array_logic/version.rb @@ -1,3 +1,3 @@ module ArrayLogic - VERSION = "0.0.6" + VERSION = "0.1.0" end
Moved to beta version <I>
diff --git a/src/geo/leaflet/leaflet.js b/src/geo/leaflet/leaflet.js index <HASH>..<HASH> 100644 --- a/src/geo/leaflet/leaflet.js +++ b/src/geo/leaflet/leaflet.js @@ -271,7 +271,14 @@ }, invalidateSize: function() { - this.map_leaflet.invalidateSize({ pan: false}); + // there is a race condition in leaflet. If size is invalidated + // and at the same time the center is set the final center is displaced + // so set pan to false so the map is not moved and then force the map + // to be at the place it should be + this.map_leaflet.invalidateSize({ pan: false })//, animate: false }); + this.map_leaflet.setView(this.map.get("center"), this.map.get("zoom") || 0, { + animate: false + }); } }, {
fixed problem resizing leaflet layers CDB-<I>
diff --git a/lxd/events/events.go b/lxd/events/events.go index <HASH>..<HASH> 100644 --- a/lxd/events/events.go +++ b/lxd/events/events.go @@ -46,13 +46,13 @@ func (s *Server) AddListener(projectName string, allProjects bool, connection *w listenerCommon: listenerCommon{ Conn: connection, messageTypes: messageTypes, - location: location, localOnly: localOnly, ctx: ctx, ctxCancel: ctxCancel, id: uuid.New(), }, + location: location, allProjects: allProjects, projectName: projectName, } @@ -178,6 +178,7 @@ func (s *Server) broadcast(event api.Event, isForward bool) error { type Listener struct { listenerCommon + location string allProjects bool projectName string }
lxd/events/events: Server
diff --git a/canvas_renderer.js b/canvas_renderer.js index <HASH>..<HASH> 100644 --- a/canvas_renderer.js +++ b/canvas_renderer.js @@ -12,6 +12,9 @@ CanvasRenderer.prototype.init = function CanvasRendererInit () this.selection_info.setAttribute('class', 'label'); this.selection_info.style.display = 'none'; + this.tile_min = Point(0, 0); + this.tile_max = Point(this.tile_scale, -this.tile_scale); + this.initMapHandlers(); }; @@ -272,7 +275,7 @@ CanvasRenderer.prototype.renderTile = function renderTile (tile, context) var layer = renderer.layers[t]; tile.layers[layer.name].features.forEach(function(feature) { // Scale mercator coords to tile pixels - feature.geometry.pixels = this.scaleGeometryToPixels(feature.geometry, tile.min, tile.max); + feature.geometry.pixels = this.scaleGeometryToPixels(feature.geometry, renderer.tile_min, renderer.tile_max); // Draw visible geometry if (layer.visible != false) {
fix canvas renderer to work with locally scaled (0-<I>) tiles
diff --git a/sigar_windows.go b/sigar_windows.go index <HASH>..<HASH> 100644 --- a/sigar_windows.go +++ b/sigar_windows.go @@ -181,7 +181,7 @@ func (fs *FileSystemUsage) Get(path string) error { return fmt.Errorf("FileSystemUsage (%s): %s", path, err) } - m := uint64(SectorsPerCluster * BytesPerSector) + m := uint64(SectorsPerCluster * BytesPerSector / 1024) fs.Total = uint64(TotalNumberOfClusters) * m fs.Free = uint64(NumberOfFreeClusters) * m fs.Avail = fs.Free
windows should return disk stats in KB not bytes - matches linux behavior [#<I>]
diff --git a/lavalink/__init__.py b/lavalink/__init__.py index <HASH>..<HASH> 100644 --- a/lavalink/__init__.py +++ b/lavalink/__init__.py @@ -11,4 +11,4 @@ from .enums import NodeState, PlayerState, TrackEndReason, LavalinkEvents from .rest_api import Track from . import utils -__version__ = "0.7.0" +__version__ = "0.7.1" diff --git a/lavalink/node.py b/lavalink/node.py index <HASH>..<HASH> 100644 --- a/lavalink/node.py +++ b/lavalink/node.py @@ -323,7 +323,8 @@ class Node: else: self.event_handler(op, event, data) elif op == LavalinkIncomingOp.PLAYER_UPDATE: - state = PlayerState(**data.get("state")) + state = data.get("state", {}) + state = PlayerState(position=state.get("position", 0), time=state.get("time", 0)) self.event_handler(op, state, data) elif op == LavalinkIncomingOp.STATS: stats = Stats(
Fix a `TypeError` on incomplete state dict (#<I>)
diff --git a/benchmarks/index.js b/benchmarks/index.js index <HASH>..<HASH> 100644 --- a/benchmarks/index.js +++ b/benchmarks/index.js @@ -234,7 +234,7 @@ function startRelay(type) { '--benchRelayPort', String(self.ports.relayServerPort), '--traceRelayPort', String(self.ports.relayTraceServerPort), '--type', type, - '--instances', String(self.instanceCount), + '--instances', type === 'trace-relay' ? '1' : String(self.instanceCount), self.opts.trace ? '--trace' : '--no-trace', self.opts.debug ? '--debug' : '--no-debug' ]);
multi_bench: do not set multiple instances for trace server
diff --git a/functional/mock_tests.js b/functional/mock_tests.js index <HASH>..<HASH> 100644 --- a/functional/mock_tests.js +++ b/functional/mock_tests.js @@ -6,6 +6,7 @@ var co = require('co'), exports['Should correctly perform a simple server connection using mock'] = { metadata: { requires: { + generators: true, topology: "single" } }, @@ -66,6 +67,7 @@ exports['Should correctly perform a simple server connection using mock'] = { exports['Should correctly connect to a replicaset where the primary hangs causing monitoring thread to hang'] = { metadata: { requires: { + generators: true, topology: "single" } },
Added test support to handle generators test exclusion when runtime does not support them
diff --git a/config.go b/config.go index <HASH>..<HASH> 100644 --- a/config.go +++ b/config.go @@ -56,7 +56,7 @@ func (b *ggrBrowsers) find(browser, version string, platform string, excludedHos platform = b.DefaultPlatform } for _, v := range b.Versions { - if strings.HasPrefix(v.Number, version) && strings.HasPrefix(v.Platform, platform) { + if strings.HasPrefix(v.Number, version) && (v.Platform == "" || strings.HasPrefix(v.Platform, platform)) { version = v.Number next: for _, r := range v.Regions { diff --git a/config_test.go b/config_test.go index <HASH>..<HASH> 100644 --- a/config_test.go +++ b/config_test.go @@ -99,7 +99,7 @@ func TestFindDefaultVersion(t *testing.T) { } func TestFindVersion(t *testing.T) { - hosts, version, _ := browsersWithMultipleVersions.find("browser", "1.0", "", newSet(), newSet()) + hosts, version, _ := browsersWithMultipleVersions.find("browser", "1.0", "LINUX", newSet(), newSet()) AssertThat(t, version, EqualTo{"1.0"}) AssertThat(t, len(hosts), EqualTo{1}) AssertThat(t, hosts[0].Name, EqualTo{"browser-1.0"})
Fixed issue with not matched version if XML platform is empty
diff --git a/module/__init__.py b/module/__init__.py index <HASH>..<HASH> 100644 --- a/module/__init__.py +++ b/module/__init__.py @@ -489,8 +489,8 @@ class Connection(object): buf = Unpacker(e) return event(buf) - @ensure_connected def send_request(self, flags, xcb_parts, xcb_req): + self.invalid() return C.xcb_send_request(self._conn, flags, xcb_parts, xcb_req) # More backwards compatibility
Don't use the decorator to wrap send_request
diff --git a/packages/core/types/index.js b/packages/core/types/index.js index <HASH>..<HASH> 100644 --- a/packages/core/types/index.js +++ b/packages/core/types/index.js @@ -1600,11 +1600,11 @@ export type Optimizer<ConfigType> = {| */ export type Compressor = {| compress({| - stream: stream$Readable, + stream: Readable, options: PluginOptions, logger: PluginLogger, |}): Async<{| - stream: stream$Readable, + stream: Readable, type?: string, |}>, |};
Use imported Readable flow type instead of global (#<I>)
diff --git a/minicluster/src/main/java/tachyon/master/LocalTachyonMaster.java b/minicluster/src/main/java/tachyon/master/LocalTachyonMaster.java index <HASH>..<HASH> 100644 --- a/minicluster/src/main/java/tachyon/master/LocalTachyonMaster.java +++ b/minicluster/src/main/java/tachyon/master/LocalTachyonMaster.java @@ -43,8 +43,6 @@ public final class LocalTachyonMaster { // TODO should this be moved to TachyonURI? Prob after UFS supports it private final String mTachyonHome; - private final String mDataDir; - private final String mLogDir; private final String mHostname; private final UnderFileSystemCluster mUnderFSCluster; @@ -68,12 +66,6 @@ public final class LocalTachyonMaster { throws IOException { mTachyonHome = tachyonHome; - mDataDir = path(mTachyonHome, "data"); - mLogDir = path(mTachyonHome, "logs"); - - UnderFileSystemUtils.mkdirIfNotExists(mDataDir, tachyonConf); - UnderFileSystemUtils.mkdirIfNotExists(mLogDir, tachyonConf); - mHostname = NetworkAddressUtils.getConnectHost(ServiceType.MASTER_RPC, tachyonConf); // To start the UFS either for integration or unit test. If it targets the unit test, UFS is
Remove unused variables in LocalTachyonMaster
diff --git a/lib/modules/core/index.js b/lib/modules/core/index.js index <HASH>..<HASH> 100644 --- a/lib/modules/core/index.js +++ b/lib/modules/core/index.js @@ -61,6 +61,10 @@ Archiver.prototype._normalizeSource = function(source) { return source; }; +Archiver.prototype._onModuleError = function(err) { + this.emit('error', err); +}; + Archiver.prototype._onQueueEnd = function() { if (typeof this._module.finalize === 'function') { this._module.finalize(); @@ -93,6 +97,7 @@ Archiver.prototype._onQueueError = function(err) { }; Archiver.prototype._pipeModuleOutput = function() { + this._module.on('error', this._onModuleError.bind(this)); this._module.pipe(this); this._moduleOutputPiped = true;
core: catch module errors and bubble them up the chain.
diff --git a/inputrules.js b/inputrules.js index <HASH>..<HASH> 100644 --- a/inputrules.js +++ b/inputrules.js @@ -94,13 +94,13 @@ class InputRules { function getContext(doc, pos) { let parent = doc.path(pos.path) - let isPlain = parent.type.plainText + let isCode = parent.type.isCode let textBefore = "" for (let offset = 0, i = 0; offset < pos.offset;) { let child = parent.child(i++), size = child.offset textBefore += offset + size > pos.offset ? child.text.slice(0, pos.offset - offset) : child.text if (offset + size >= pos.offset) { - if (child.styles.some(st => st.type.name == "code")) // FIXME generalize? + if (child.styles.some(st => st.type.isCode)) isPlain = true break }
Don't test for code style by name when deciding whether to apply input rules
diff --git a/src/main/java/net/engio/mbassy/bus/AbstractSyncAsyncMessageBus.java b/src/main/java/net/engio/mbassy/bus/AbstractSyncAsyncMessageBus.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/engio/mbassy/bus/AbstractSyncAsyncMessageBus.java +++ b/src/main/java/net/engio/mbassy/bus/AbstractSyncAsyncMessageBus.java @@ -75,7 +75,7 @@ public abstract class AbstractSyncAsyncMessageBus<T, P extends ISyncAsyncPublica } } }); - dispatcher.setName("Message dispatcher"); + dispatcher.setName("MsgDispatcher-"+i); dispatchers.add(dispatcher); dispatcher.start(); }
uniquely name each msg bus dispatcher thread
diff --git a/termbox_inputfield.go b/termbox_inputfield.go index <HASH>..<HASH> 100644 --- a/termbox_inputfield.go +++ b/termbox_inputfield.go @@ -141,7 +141,7 @@ func (i *InputField) HandleEvent(event termbox.Event) bool { } } else if event.Key == termbox.KeyCtrlU { // Ctrl+U Clears the Input (before the cursor) - i.value = i.value[i.cursor:] + i.value = i.value[i.cursor+len(i.value):] } else { // Get the rune to add to our value. Space and Tab are special cases where // we can't use the event's rune directly
Fix Ctrl+U Behavior (Delete line before cursor)
diff --git a/spec/controller/catch_all_spec.rb b/spec/controller/catch_all_spec.rb index <HASH>..<HASH> 100644 --- a/spec/controller/catch_all_spec.rb +++ b/spec/controller/catch_all_spec.rb @@ -94,6 +94,23 @@ describe "Stealth::Controller::CatchAll" do expect($redis.get(controller.current_session.session_key)).to eq('vader->my_action') end + it "should release the session lock after the maximum number of catch_all levels have been reached" do + allow(controller).to receive(:fetch_error_level).and_return(1, 2, 3, 4) + session = Stealth::Session.new(id: controller.current_session_id) + session.set_session(new_flow: 'vader', new_state: 'my_action') + expect(controller).to receive(:release_lock!) + controller.run_catch_all + controller.run_catch_all + controller.run_catch_all + controller.run_catch_all + end + + it "should release the session lock if the bot does not have a CatchAll flow" do + FlowMap.flow_spec[:catch_all] = nil + expect(controller).to receive(:release_lock!) + controller.run_catch_all + end + it "should NOT run the catch_all if do_nothing is called" do controller.current_session.set_session(new_flow: 'vader', new_state: 'my_action3') controller.action(action: :my_action3)
Release the locks after running the catch_all
diff --git a/benchexec/tools/symbiotic3.py b/benchexec/tools/symbiotic3.py index <HASH>..<HASH> 100644 --- a/benchexec/tools/symbiotic3.py +++ b/benchexec/tools/symbiotic3.py @@ -82,13 +82,13 @@ class Tool(benchexec.tools.template.BaseTool): return result.RESULT_TRUE_PROP elif line == 'UNKNOWN': return result.RESULT_UNKNOWN - elif line == 'FALSE': - return result.RESULT_FALSE_REACH - elif line == 'FALSE (valid-deref)': + elif line.startswith('FALSE (valid-deref)'): return result.RESULT_FALSE_DEREF - elif line == 'FALSE (valid-free)': + elif line.startswith('FALSE (valid-free)'): return result.RESULT_FALSE_FREE - elif line == 'FALSE (valid-memtrack)': + elif line.startswith('FALSE (valid-memtrack)'): return result.RESULT_FALSE_MEMTRACK + elif line.startswith('FALSE'): + return result.RESULT_FALSE_REACH return result.RESULT_ERROR
symbiotic3.py: fix parsing of result we can have some more info after the result (which acts like a garbagge in this case), so check only for the beginning of the string
diff --git a/py/nupic/support/configuration_base.py b/py/nupic/support/configuration_base.py index <HASH>..<HASH> 100644 --- a/py/nupic/support/configuration_base.py +++ b/py/nupic/support/configuration_base.py @@ -389,11 +389,13 @@ class Configuration(object): configVar = os.environ['NTA_CONF_DIR'] # Return as a list of paths configPaths = configVar.split(':') - elif os.path.exists(os.path.join( - nupic.rootDir, 'conf', 'site', 'default')): - configPaths = [os.path.join(nupic.rootDir, 'conf', 'site', 'default')] - else: + elif ( + not os.path.exists(os.path.join( + nupic.rootDir, 'conf', 'site', 'default')) and + os.path.exists(os.path.join(nupic.rootDir, 'conf', 'default'))): configPaths = [os.path.join(nupic.rootDir, 'conf', 'default')] + else: + configPaths = [os.path.join(nupic.rootDir, 'conf', 'site', 'default')] return configPaths
Rearrange configuration defaults to match unit tests.
diff --git a/src/stratum/stratum-messages.js b/src/stratum/stratum-messages.js index <HASH>..<HASH> 100644 --- a/src/stratum/stratum-messages.js +++ b/src/stratum/stratum-messages.js @@ -248,3 +248,22 @@ export function broadcastTx ( onFail } } + +export function fetchEstimateFee ( + blocksToBeIncludedIn: string, + onDone: (fee: number) => void, + onFail: OnFailHandler +): StratumTask { + const method = 'blockchain.estimatefee' + return { + method, + params: [blocksToBeIncludedIn], + onDone (reply: any) { + if (reply === null || reply === undefined) { + throw new Error(`blockchain.estimatefee error. reply ${reply}`) + } + onDone(parseInt(reply)) + }, + onFail + } +}
added fetchEstimateFee to get fallback fees
diff --git a/pybib/formatters.py b/pybib/formatters.py index <HASH>..<HASH> 100644 --- a/pybib/formatters.py +++ b/pybib/formatters.py @@ -34,7 +34,10 @@ def get_common_parts(r): """Gets citation parts which are common to all types of citation""" def format_title(title): - return title[0] + try: + return title[0] + except IndexError: + return "No Title" def format_author_list(authors): author_list = []
Ensure that title absence is handled gracefully
diff --git a/tests/src/Steam/Command/WebApiUtil/GetSupportedApiListTest.php b/tests/src/Steam/Command/WebApiUtil/GetSupportedApiListTest.php index <HASH>..<HASH> 100644 --- a/tests/src/Steam/Command/WebApiUtil/GetSupportedApiListTest.php +++ b/tests/src/Steam/Command/WebApiUtil/GetSupportedApiListTest.php @@ -2,7 +2,7 @@ namespace Steam\Command\WebApiUtil; -class GetSupportedAPIListTest extends \PHPUnit_Framework_TestCase +class GetSupportedApiListTest extends \PHPUnit_Framework_TestCase { /** * @var GetSupportedAPIList @@ -11,7 +11,7 @@ class GetSupportedAPIListTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->instance = new GetSupportedAPIList(); + $this->instance = new GetSupportedApiList(); } public function testValues()
Updated class name in test as it was causing fatal error due to case sensitivity
diff --git a/lib/art-decomp/fsm.rb b/lib/art-decomp/fsm.rb index <HASH>..<HASH> 100644 --- a/lib/art-decomp/fsm.rb +++ b/lib/art-decomp/fsm.rb @@ -41,12 +41,11 @@ module ArtDecomp class FSM end def to_kiss - ins = @inputs.transpose - outs = @outputs.transpose st = @state.map { |e| e == DontCare ? '*' : e } nxt = @next_state.map { |e| e == DontCare ? '*' : e } - lines = (0...@state.size).map { |i| [ins[i].join, st[i], nxt[i], outs[i].join].join ' ' } - KISS.new(lines).formatted + div = Array.new @state.size, ' ' + cols = @inputs + [div, st, div, nxt, div] + @outputs + KISS.new(cols.transpose.map(&:join)).formatted end def x_encoding i, rows
refactor FSM#to_kiss
diff --git a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/XbaseScopeProvider.java b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/XbaseScopeProvider.java index <HASH>..<HASH> 100644 --- a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/XbaseScopeProvider.java +++ b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/XbaseScopeProvider.java @@ -171,7 +171,8 @@ public class XbaseScopeProvider extends XtypeScopeProvider { } public IEObjectDescription getSingleElement(EObject object) { - throw new UnsupportedOperationException(); + Iterable<IEObjectDescription> elements = getElements(object); + return (isEmpty(elements)) ? null : elements.iterator().next(); } public IEObjectDescription getSingleElement(QualifiedName name) {
[xbase] Extended constructor call scope
diff --git a/kafka/client.py b/kafka/client.py index <HASH>..<HASH> 100644 --- a/kafka/client.py +++ b/kafka/client.py @@ -404,7 +404,7 @@ class SimpleClient(object): return [responses[tp] for tp in original_ordering] def __repr__(self): - return '<KafkaClient client_id=%s>' % (self.client_id) + return '<SimpleClient client_id=%s>' % (self.client_id) def _raise_on_response_error(self, resp):
Update string representation of SimpleClient
diff --git a/src/preloadjs/LoadQueue.js b/src/preloadjs/LoadQueue.js index <HASH>..<HASH> 100644 --- a/src/preloadjs/LoadQueue.js +++ b/src/preloadjs/LoadQueue.js @@ -790,6 +790,13 @@ this.createjs = this.createjs || {}; * object will contain that value as a property. */ + /** + * Although it extends {{#crossLink "AbstractLoader"}}{{/crossLink}}, the `initialize` event is never fired from + * a LoadQueue instance. + * @event initialize + * @private + */ + // public methods /** * Register a custom loaders class. New loaders are given precedence over loaders added earlier and default loaders.
Documentation: Updated LoadQueue.initialize event to show it is not dispatched (thanks @marvin)
diff --git a/src/base/base_object.js b/src/base/base_object.js index <HASH>..<HASH> 100644 --- a/src/base/base_object.js +++ b/src/base/base_object.js @@ -2,21 +2,22 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -var _ = require('underscore'); -var extend = require('./utils').extend; -var Events = require('./events'); +var _ = require('underscore') +var extend = require('./utils').extend +var Events = require('./events') -var pluginOptions = ['container']; +var pluginOptions = ['container'] -var BaseObject = function(options) { - options || (options = {}); - _.extend(this, _.pick(options, pluginOptions)); - this.initialize.apply(this, arguments); -}; +class BaseObject extends Events { + constructor(options) { + options || (options = {}) + _.extend(this, _.pick(options, pluginOptions)) + if (this.initialize) { + this.initialize.apply(this, arguments) + } + } +} -_.extend(BaseObject.prototype, Events); - -BaseObject.extend = extend; - -module.exports = BaseObject; +BaseObject.extend = extend +module.exports = BaseObject
base object: change to es6 syntax
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -463,7 +463,7 @@ func (me *Client) connectionLoop(t *torrent, c *connection) error { err = errors.New("received unexpected bitfield") break } - c.PeerPieces = msg.Bitfield[:len(t.NumPieces())] + c.PeerPieces = msg.Bitfield[:t.NumPieces()] for index, has := range c.PeerPieces { if has { me.peerGotPiece(t, c, index)
Trivial fix for one of the last commits
diff --git a/lib/rest-core/client.rb b/lib/rest-core/client.rb index <HASH>..<HASH> 100644 --- a/lib/rest-core/client.rb +++ b/lib/rest-core/client.rb @@ -60,8 +60,8 @@ module RestCore::Client end def inspect - "#<struct #{self.class.name} #{attributes.map{ |k, v| - "#{k}=#{v.inspect}" }.join(', ')}>" + fields = attributes.map{ |k, v| "#{k}=#{v.inspect}" }.join(', ') + "#<struct #{self.class.name}#{if fields.empty? then '' else fields end}>" end def lighten! o={}
client.rb: fix inspect if there's no fields at all
diff --git a/csp.py b/csp.py index <HASH>..<HASH> 100644 --- a/csp.py +++ b/csp.py @@ -106,8 +106,8 @@ class CSP(search.Problem): var = find_if(lambda v: v not in assignment, self.vars) result = [] for val in self.domains[var]: - if self.nconflicts(self, var, val, assignment) == 0: - a = assignment.copy; a[var] = val + if self.nconflicts(var, val, assignment) == 0: + a = assignment.copy(); a[var] = val result.append(((var, val), a)) return result
Fixed a bug pylint pointed out in unused code. Still untested.
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -62,6 +62,15 @@ class PublicationServer { } /** + * Broadcast a message to all connected clients. + * + * @param {Object} msg The message to send to all connected clients. + */ + broadcast(msg) { + this._primus.write(msg); + } + + /** * Gracefully shutdowns the publication server. * * @param {Number} timeout The amount of time we'll give the WebSocket server
Add ability to broadcast messages to all clients
diff --git a/src/Utility/Rsync.php b/src/Utility/Rsync.php index <HASH>..<HASH> 100644 --- a/src/Utility/Rsync.php +++ b/src/Utility/Rsync.php @@ -32,6 +32,7 @@ class Rsync * Start rsync process. * * @param string|string[] $source + * @phpstan-param array{flags?: string, options?: array, timeout?: int|null, progress_bar?: bool, display_stats?: bool} $config * @throws RunException */ public function call(Host $host, $source, string $destination, array $config = []): void diff --git a/src/functions.php b/src/functions.php index <HASH>..<HASH> 100644 --- a/src/functions.php +++ b/src/functions.php @@ -538,6 +538,7 @@ function invoke(string $taskName): void * * @param string|string[] $source * @param array $config + * @phpstan-param array{flags?: string, options?: array, timeout?: int|null, progress_bar?: bool, display_stats?: bool} $config * * @throws RunException */
upload(): add more precise phpdocs (#<I>) * upload(): add more precise phpdocs * Update Rsync.php * Update Rsync.php * Update functions.php