diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/packages/@vue/cli/lib/util/configTransforms.js b/packages/@vue/cli/lib/util/configTransforms.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli/lib/util/configTransforms.js +++ b/packages/@vue/cli/lib/util/configTransforms.js @@ -13,7 +13,7 @@ const isObject = val => val && typeof val === 'object' const transformJS = { read: ({ filename, context }) => { try { - return loadModule(filename, context, true) + return loadModule(`./${filename}`, context, true) } catch (e) { return null }
fix: fix config merging during `vue invoke` in Node.js <I> (#<I>) The root cause here is the same as #<I> The failing `loadModule` call will return `undefined` for a js config read operation, which later caused config being overwritten.
diff --git a/regression/clear_datastore.py b/regression/clear_datastore.py index <HASH>..<HASH> 100644 --- a/regression/clear_datastore.py +++ b/regression/clear_datastore.py @@ -21,7 +21,6 @@ from gcloud.datastore import _implicit_environ _implicit_environ._DATASET_ENV_VAR_NAME = 'GCLOUD_TESTS_DATASET_ID' -datastore.set_defaults() FETCH_MAX = 20 diff --git a/regression/datastore.py b/regression/datastore.py index <HASH>..<HASH> 100644 --- a/regression/datastore.py +++ b/regression/datastore.py @@ -24,7 +24,6 @@ from regression import populate_datastore _implicit_environ._DATASET_ENV_VAR_NAME = 'GCLOUD_TESTS_DATASET_ID' -datastore.set_defaults() class TestDatastore(unittest2.TestCase): diff --git a/regression/populate_datastore.py b/regression/populate_datastore.py index <HASH>..<HASH> 100644 --- a/regression/populate_datastore.py +++ b/regression/populate_datastore.py @@ -21,7 +21,6 @@ from gcloud.datastore import _implicit_environ _implicit_environ._DATASET_ENV_VAR_NAME = 'GCLOUD_TESTS_DATASET_ID' -datastore.set_defaults() ANCESTOR = ('Book', 'GoT')
Using fully implicit auth in datastore regression.
diff --git a/src/message.js b/src/message.js index <HASH>..<HASH> 100644 --- a/src/message.js +++ b/src/message.js @@ -1,8 +1,9 @@ /// Implements Bitcoin's feature for signing arbitrary messages. -var SHA256 = require('crypto-js/sha256') -var ecdsa = require('./ecdsa') +var Address = require('./address') var convert = require('./convert') +var ecdsa = require('./ecdsa') +var SHA256 = require('crypto-js/sha256') var Message = {} @@ -59,7 +60,8 @@ Message.verifyMessage = function (address, sig, message) { pubKey.compressed = isCompressed // Compare address to expected address - return address === pubKey.getAddress().toString() + address = new Address(address) + return address.toString() === pubKey.getAddress(address.version).toString() } module.exports = Message
Adds version support to Message.verifyMessage
diff --git a/android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java b/android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java index <HASH>..<HASH> 100644 --- a/android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java +++ b/android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java @@ -49,7 +49,7 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom private void createAndAddScreenStack(int position) { ScreenStack newStack = new ScreenStack(activity, params.tabParams.get(position)); screenStacks[position] = newStack; - newStack.setVisibility(GONE); + newStack.setVisibility(INVISIBLE); addView(newStack, 0, new LayoutParams(MATCH_PARENT, MATCH_PARENT)); } @@ -170,7 +170,7 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom private void hideCurrentStack() { ScreenStack currentScreenStack = getCurrentScreenStack(); - currentScreenStack.setVisibility(GONE); + currentScreenStack.setVisibility(INVISIBLE); } private ScreenStack getCurrentScreenStack() {
Use INVISIBLE to hide screens so they get measured on creation
diff --git a/src/js/tree.js b/src/js/tree.js index <HASH>..<HASH> 100644 --- a/src/js/tree.js +++ b/src/js/tree.js @@ -270,13 +270,13 @@ expand = expand === undefined ? $li.hasClass('open') : false; if(expand) this.store[id] = expand; else delete this.store[id]; - this.store.time = new Date(); + this.store.time = new Date().getTime(); $.zui.store[this.options.name ? 'set' : 'pageSet'](this.selector, this.store); } else { var that = this; this.store = {}; this.$.find('li').each(function() { - that.store($(this)); + that.preserve($(this)); }); } };
* fix error in preserve method of tree.
diff --git a/src/Bkwld/Decoy/Models/Worker.php b/src/Bkwld/Decoy/Models/Worker.php index <HASH>..<HASH> 100644 --- a/src/Bkwld/Decoy/Models/Worker.php +++ b/src/Bkwld/Decoy/Models/Worker.php @@ -160,10 +160,15 @@ class Worker extends \Illuminate\Console\Command { } /** - * Write Command input types to the log + * Write Command output types to the log */ public function log($level, $message, $context = array()) { - if (empty($this->logger)) throw new Exception('Worker logger not created'); + + // This will be empty when output messages are triggered by the command + // when it's NOT called by a worker option + if (empty($this->logger)) return; + + // Call the logger's level specific methods $method = 'add'.ucfirst($level); $this->logger->$method($message, $context); }
Fixing error when worker not called via worker options
diff --git a/example/config/routes.rb b/example/config/routes.rb index <HASH>..<HASH> 100644 --- a/example/config/routes.rb +++ b/example/config/routes.rb @@ -1,4 +1,5 @@ Rails.application.routes.draw do + resources :attached_files resources :issue_comments devise_for :users resources :projects
be rails g resource_route attached_files
diff --git a/test/tests.js b/test/tests.js index <HASH>..<HASH> 100644 --- a/test/tests.js +++ b/test/tests.js @@ -4,7 +4,7 @@ var r = function(suite) { } var fetch = [ - "level1/core", + "level1/core", "level1/html", "level1/svg", "level2/core", @@ -12,10 +12,13 @@ var fetch = [ "level2/style", "level2/extra", "level3/core", - "level3/ls", + //"level3/ls", "level3/xpath", - /*"window",*/ - "jsdom" + /* + TODO: this needs work, will break everything if included. + "window",*/ + "jsdom", + "sizzle" ]; module.exports = {}; @@ -25,3 +28,4 @@ module.exports = {}; fetch.forEach(function(k) { module.exports[k] = r(k); }); +
remove level3 from the runner as it seems to be breaking stuff
diff --git a/GPy/util/caching.py b/GPy/util/caching.py index <HASH>..<HASH> 100644 --- a/GPy/util/caching.py +++ b/GPy/util/caching.py @@ -57,13 +57,15 @@ class Cacher(object): for ind in combined_args_kw: if ind is not None: ind_id = self.id(ind) - ref, cache_ids = self.cached_input_ids[ind_id] - if len(cache_ids) == 1 and ref() is not None: - ref().remove_observer(self, self.on_cache_changed) - del self.cached_input_ids[ind_id] - else: - cache_ids.remove(cache_id) - self.cached_input_ids[ind_id] = [ref, cache_ids] + tmp = self.cached_input_ids.get(ind_id, None) + if tmp is not None: + ref, cache_ids = tmp + if len(cache_ids) == 1 and ref() is not None: + ref().remove_observer(self, self.on_cache_changed) + del self.cached_input_ids[ind_id] + else: + cache_ids.remove(cache_id) + self.cached_input_ids[ind_id] = [ref, cache_ids] self.logger.debug("removing caches") del self.cached_outputs[cache_id] del self.inputs_changed[cache_id]
[caching] catching key error, when individuum is already gone
diff --git a/shutdownmanagers/awsmanager/aws.go b/shutdownmanagers/awsmanager/aws.go index <HASH>..<HASH> 100644 --- a/shutdownmanagers/awsmanager/aws.go +++ b/shutdownmanagers/awsmanager/aws.go @@ -193,21 +193,23 @@ func (awsManager *AwsManager) handleMessage(message string) bool { go awsManager.gs.StartShutdown(awsManager) return true } else if awsManager.config.Port != 0 { - awsManager.forwardMessage(hookMessage, message) + if err := awsManager.forwardMessage(hookMessage, message); err != nil { + awsManager.gs.ReportError(err) + return false + } return true } return false } -func (awsManager *AwsManager) forwardMessage(hookMessage *lifecycleHookMessage, message string) { +func (awsManager *AwsManager) forwardMessage(hookMessage *lifecycleHookMessage, message string) error { host, err := awsManager.api.GetHost(hookMessage.EC2InstanceId) if err != nil { - awsManager.gs.ReportError(err) - return + return err } _, err = http.Post(fmt.Sprintf("http://%s:%d/", host, awsManager.config.Port), "application/json", strings.NewReader(message)) - awsManager.gs.ReportError(err) + return err } // ShutdownStart calls Ping every pingTime
Do not delete sqs message from queue if http fails.
diff --git a/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLResultsetAbstract.java b/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLResultsetAbstract.java index <HASH>..<HASH> 100755 --- a/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLResultsetAbstract.java +++ b/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLResultsetAbstract.java @@ -157,7 +157,7 @@ public abstract class OCommandExecutorSQLResultsetAbstract extends OCommandExecu protected Object getResult() { if (tempResult != null) { - for (OIdentifiable d : tempResult) + for (Object d : tempResult) if (d != null) request.getResultListener().result(d); }
SQL: flatten() now creates projection even on non-records
diff --git a/drivers/ruby/test.rb b/drivers/ruby/test.rb index <HASH>..<HASH> 100644 --- a/drivers/ruby/test.rb +++ b/drivers/ruby/test.rb @@ -544,6 +544,14 @@ class ClientTest < Test::Unit::TestCase id_sort(rdb.filter{r[:id] < 5}.run.to_a)) end + def test_pluck + e=r.expr([{ 'a' => 1, 'b' => 2, 'c' => 3}, + { 'a' => 4, 'b' => 5, 'c' => 6}]) + assert_equal(e.pluck().run(), [{}, {}]) + assert_equal(e.pluck('a').run(), [{ 'a' => 1 }, { 'a' => 4 }]) + assert_equal(e.pluck('a', 'b').run(), [{ 'a' => 1, 'b' => 2 }, { 'a' => 4, 'b' => 5 }]) + end + def test_pickattrs # PICKATTRS, # UNION, # LENGTH q1=r.union(rdb.map{r[:$_].pickattrs(:id,:name)}, rdb.map{|row| row.attrs(:id,:num)}) q2=r.union(rdb.map{r[:$_].attrs(:id,:name)}, rdb.map{|row| row.pick(:id,:num)})
Adding ruby test for pluck
diff --git a/src/Symfony/Component/Console/Helper/DialogHelper.php b/src/Symfony/Component/Console/Helper/DialogHelper.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Console/Helper/DialogHelper.php +++ b/src/Symfony/Component/Console/Helper/DialogHelper.php @@ -20,7 +20,7 @@ use Symfony\Component\Console\Formatter\OutputFormatterStyle; * @author Fabien Potencier <fabien@symfony.com> * * @deprecated Deprecated since version 2.5, to be removed in 3.0. - * Use the question helper instead. + * Use {@link \Symfony\Component\Console\Helper\QuestionHelper} instead. */ class DialogHelper extends InputAwareHelper { @@ -28,6 +28,12 @@ class DialogHelper extends InputAwareHelper private static $shell; private static $stty; + public function __construct() + { + trigger_error('DialogHelper is deprecated since version 2.5 and will be removed in 3.0. Use QuestionHelper instead.', E_USER_DEPRECATED); + + parent::__construct(); + } /** * Asks the user to select a value. *
[Console] Adding a deprecation note about DialogHelper
diff --git a/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ActivityUtils.java b/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ActivityUtils.java index <HASH>..<HASH> 100755 --- a/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ActivityUtils.java +++ b/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ActivityUtils.java @@ -234,7 +234,9 @@ class ActivityUtils { getCurrentActivity().finish(); inst.sendKeyDownUpSync(KeyEvent.KEYCODE_BACK); activityList.clear(); - + if (activityMonitor != null) { + inst.removeMonitor(activityMonitor); + } } catch (Exception ignored) {} super.finalize(); }
Remove added ActivityMonitor during ActivityUtils finalisation. Otherwise, each Solo instance leaks an ActivityMonitor into Instrumentation, with knock-on effects for other tests using ActivityMonitors.
diff --git a/annis-gui/src/main/java/annis/gui/visualizers/component/rst/RSTImpl.java b/annis-gui/src/main/java/annis/gui/visualizers/component/rst/RSTImpl.java index <HASH>..<HASH> 100644 --- a/annis-gui/src/main/java/annis/gui/visualizers/component/rst/RSTImpl.java +++ b/annis-gui/src/main/java/annis/gui/visualizers/component/rst/RSTImpl.java @@ -392,16 +392,7 @@ public class RSTImpl extends Panel implements SGraphTraverseHandler // since we have found some tokens, it must be a sentence in RST. if (token.size() > 0) { - data.put("sentence", sb.toString()); - - String color = null; - if (markedAndCovered != null - && markedAndCovered.containsKey(token.get(0)) - && (color = getHTMLColor(token.get(0))) != null) - { - data.put("color", color); - } }
Do not put the color information into a json property.
diff --git a/java/server/src/org/openqa/selenium/grid/node/local/LocalNode.java b/java/server/src/org/openqa/selenium/grid/node/local/LocalNode.java index <HASH>..<HASH> 100644 --- a/java/server/src/org/openqa/selenium/grid/node/local/LocalNode.java +++ b/java/server/src/org/openqa/selenium/grid/node/local/LocalNode.java @@ -461,7 +461,7 @@ public class LocalNode extends Node { private URI rewrite(String path) { try { return new URI( - gridUri.getScheme(), + "ws", gridUri.getUserInfo(), gridUri.getHost(), gridUri.getPort(),
[java] Return a ws scheme instead of the http scheme of the grid
diff --git a/globalify.js b/globalify.js index <HASH>..<HASH> 100644 --- a/globalify.js +++ b/globalify.js @@ -10,8 +10,6 @@ var browserify = require('browserify'), }, rootPath = __dirname; -console.log(rootPath); - module.exports = function globalify(settings, callback){ settings = settings || {}; diff --git a/index.js b/index.js index <HASH>..<HASH> 100755 --- a/index.js +++ b/index.js @@ -1,6 +1,5 @@ #!/usr/bin/env node -"use strict"; -const program = require('commander'), +var program = require('commander'), globalify = require('./globalify'), packageJson = require('./package.json'), fs = require('fs'); @@ -17,11 +16,11 @@ if (program.args.length !== 1) { program.help() } -const moduleNameAndVersion = program.args[0].split('@'), +var moduleNameAndVersion = program.args[0].split('@'), moduleName = moduleNameAndVersion[0], version = moduleNameAndVersion[1] || 'x.x.x'; -const outStream = fs.createWriteStream(program.out || `${moduleName}.js`); +var outStream = fs.createWriteStream(program.out || moduleName + '.js'); globalify({ module: moduleName,
Remove the other console.log in globalify.js and es6 code.
diff --git a/tasks/html.js b/tasks/html.js index <HASH>..<HASH> 100644 --- a/tasks/html.js +++ b/tasks/html.js @@ -107,7 +107,7 @@ function loadData () { var dataFile = fs.readFileSync(datapath, 'utf8') if (ext === '.js') { - data[name] = requireFromString(dataFile, datapath).data + data[name] = requireFromString(dataFile, datapath).data() } else if (ext === '.yml' || ext === '.yaml') { data[name] = yaml.safeLoad(dataFile).data } diff --git a/web/data/templates.js b/web/data/templates.js index <HASH>..<HASH> 100644 --- a/web/data/templates.js +++ b/web/data/templates.js @@ -1 +1,3 @@ -exports.data = ['at', 'bt'] +exports.data = function () { + return ['at', 'bt'] +}
Module data loaded as function to allow pre-processing
diff --git a/openhtf/plugs/__init__.py b/openhtf/plugs/__init__.py index <HASH>..<HASH> 100644 --- a/openhtf/plugs/__init__.py +++ b/openhtf/plugs/__init__.py @@ -516,6 +516,7 @@ class PlugManager(object): if self._xmlrpc_server: _LOG.debug('Shutting down Plug XMLRPC Server.') self._xmlrpc_server.shutdown() + self._xmlrpc_server.server_close() self._xmlrpc_server = None _LOG.debug('Tearing down all plugs.')
Also close the underlying socket for the plug manager's xmlrpc server
diff --git a/src/services/search-builder.js b/src/services/search-builder.js index <HASH>..<HASH> 100644 --- a/src/services/search-builder.js +++ b/src/services/search-builder.js @@ -152,7 +152,9 @@ function SearchBuilder(model, opts, params, fieldNamesRequested) { if (!Number.isNaN(value)) { if (Number.isInteger(value) && !Number.isSafeInteger(value)) { - value = BigInt(params.search); + // NOTE: Numbers higher than MAX_SAFE_INTEGER need to be handled as + // strings to circumvent precision problems + value = params.search; } condition[field.field] = value;
fix(search): handle tables that contain floats and bigints
diff --git a/testing/provisioner.go b/testing/provisioner.go index <HASH>..<HASH> 100644 --- a/testing/provisioner.go +++ b/testing/provisioner.go @@ -92,6 +92,10 @@ func (a *FakeApp) ProvisionUnits() []provision.AppUnit { return a.units } +func (a *FakeApp) AddUnit(u *FakeUnit) { + a.units = append(a.units, u) +} + func (a *FakeApp) SetUnitStatus(s provision.Status, index int) { if index < len(a.units) { a.units[index].(*FakeUnit).Status = s diff --git a/testing/provisioner_test.go b/testing/provisioner_test.go index <HASH>..<HASH> 100644 --- a/testing/provisioner_test.go +++ b/testing/provisioner_test.go @@ -20,6 +20,12 @@ type S struct{} var _ = gocheck.Suite(&S{}) +func (s *S) TestFakeAppAddUnit(c *gocheck.C) { + app := NewFakeApp("jean", "mj", 0) + app.AddUnit(&FakeUnit{Name: "jean/0"}) + c.Assert(app.units, gocheck.HasLen, 1) +} + func (s *S) TestFindApp(c *gocheck.C) { app := NewFakeApp("red-sector", "rush", 1) p := NewFakeProvisioner()
testing/provisioner: added method to add units to a fake app
diff --git a/lib/render/renderer.js b/lib/render/renderer.js index <HASH>..<HASH> 100644 --- a/lib/render/renderer.js +++ b/lib/render/renderer.js @@ -42,6 +42,7 @@ Renderer.prototype.hr = function() { }; Renderer.prototype.after = function(text, token, parser) { + if(!text) return text; // crude way of removing escapes return unescape(text); }
Guard against undefined text in after().
diff --git a/selenium_test/environment.py b/selenium_test/environment.py index <HASH>..<HASH> 100644 --- a/selenium_test/environment.py +++ b/selenium_test/environment.py @@ -320,6 +320,15 @@ def before_scenario(context, scenario): def after_scenario(context, _scenario): driver = context.driver + # Close all extra tabs. + handles = driver.window_handles + if handles: + for handle in handles: + if handle != context.initial_window_handle: + driver.switch_to_window(handle) + driver.close() + driver.switch_to_window(context.initial_window_handle) + # # Make sure we did not trip a fatal error. # @@ -379,15 +388,6 @@ def after_scenario(context, _scenario): dump_javascript_log(context) assert_false(terminating, "should not have experienced a fatal error") - # Close all extra tabs. - handles = driver.window_handles - if handles: - for handle in handles: - if handle != context.initial_window_handle: - driver.switch_to_window(handle) - driver.close() - driver.switch_to_window(context.initial_window_handle) - def before_step(context, step): if context.behave_captions:
Close tabs first. It is unclear why this has never bit us before but now we close the tabs first. Doing this ensures that the async code is run on the main page, which is what we want. Otherwise, the async code may run on some documentat tab, and fail.
diff --git a/lib/cxxproject/ext/rake.rb b/lib/cxxproject/ext/rake.rb index <HASH>..<HASH> 100644 --- a/lib/cxxproject/ext/rake.rb +++ b/lib/cxxproject/ext/rake.rb @@ -1,5 +1,7 @@ require 'cxxproject/ext/stdout' require 'cxxproject/utils/exit_helper' +require 'cxxproject/errorparser/error_parser' + require 'rake' require 'stringio' @@ -82,6 +84,26 @@ module Rake super(args, invocation_chain) Dir.chdir(@bb.project_dir) do + if Dir.pwd != @bb.project_dir and File.dirname(Dir.pwd) != File.dirname(@bb.project_dir) + isSym = false + begin + isSym = File.symlink?(@bb.project_dir) + rescue + end + if isSym + message = "Symlinks only allowed with the same parent dir as the target: #{@bb.project_dir} --> #{Dir.pwd}" + res = Cxxproject::ErrorDesc.new + res.file_name = @bb.project_dir + res.line_number = 0 + res.severity = Cxxproject::ErrorParser::SEVERITY_ERROR + res.message = message + Rake.application.idei.set_errors([res]) + Cxxproject::Printer.printError message + set_failed + return + end + end + file_tasks = @bb.create_object_file_tasks enhance(file_tasks) return if file_tasks.length == 0
added error if symlink has other parent dir than target
diff --git a/object.lookup.go b/object.lookup.go index <HASH>..<HASH> 100644 --- a/object.lookup.go +++ b/object.lookup.go @@ -5,6 +5,14 @@ import ( "time" ) +func (c *ObjectStorage) Exists(objectname string) bool { + id := "internal" + if o, _ := c.lookup(&id, &objectname, true); o != nil { + return true + } + return false +} + func (c *ObjectStorage) Lookup(client_identifier, objectname string) (*Object, error) { return c.lookup(&client_identifier, &objectname, false) }
Add the Exists method to object lookups This does a quieter lookup and will, in the future, exclude the inline_payload fetching of the lookup process.
diff --git a/src/extensions/default/JavaScriptCodeHints/unittests.js b/src/extensions/default/JavaScriptCodeHints/unittests.js index <HASH>..<HASH> 100644 --- a/src/extensions/default/JavaScriptCodeHints/unittests.js +++ b/src/extensions/default/JavaScriptCodeHints/unittests.js @@ -832,7 +832,7 @@ define(function (require, exports, module) { testEditor.setCursorPos(start); var hintObj = expectHints(JSCodeHints.jsHintProvider); runs(function () { - hintsPresentExact(hintObj, ["getAmountDue", "getName", "name", "setAmountDue"]); + hintsPresentExact(hintObj, ["amountDue", "getAmountDue", "getName", "name", "setAmountDue"]); }); });
Update expected results, as Tern now gives us better results than what the test was expecting.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -84,7 +84,7 @@ if __name__ == '__main__': zip_safe=False, extras_require={ 'docs': [ - 'sphinx>=1.7.1', + 'sphinx==1.6.9', ], 'tests': [ 'flake8>=3.5.0',
attempted fix for readthedocs/sphinx bug
diff --git a/lib/Yucca/Component/Iterator/ShowMoreIterator.php b/lib/Yucca/Component/Iterator/ShowMoreIterator.php index <HASH>..<HASH> 100644 --- a/lib/Yucca/Component/Iterator/ShowMoreIterator.php +++ b/lib/Yucca/Component/Iterator/ShowMoreIterator.php @@ -10,7 +10,7 @@ namespace Yucca\Component\Iterator; -class ShowMoreIterator extends \LimitIterator { +class ShowMoreIterator extends \LimitIterator implements \Countable { protected $offset; protected $limit; @@ -55,4 +55,13 @@ class ShowMoreIterator extends \LimitIterator { public function canShowMore() { return $this->getInnerIterator()->count() > ($this->offset + $this->limit); } -} + + /** + * give model count + * @return int + */ + public function count() + { + return $this->getInnerIterator()->count(); + } +}
[SHOW MORE ITERATOR] Is now countable
diff --git a/workflow/util/util.go b/workflow/util/util.go index <HASH>..<HASH> 100644 --- a/workflow/util/util.go +++ b/workflow/util/util.go @@ -410,6 +410,11 @@ func selectorMatchesNode(selector fields.Selector, node wfv1.NodeStatus) bool { nodeFields := fields.Set{ "displayName": node.DisplayName, "templateName": node.TemplateName, + "phase": string(node.Phase), + } + if node.TemplateRef != nil { + nodeFields["templateRef.name"] = node.TemplateRef.Name + nodeFields["templateRef.template"] = node.TemplateRef.Template } if node.Inputs != nil { for _, inParam := range node.Inputs.Parameters {
Make phase and templateRef available for unsuspend and retry selectors (#<I>)
diff --git a/test/test_notification_warning.py b/test/test_notification_warning.py index <HASH>..<HASH> 100755 --- a/test/test_notification_warning.py +++ b/test/test_notification_warning.py @@ -43,7 +43,7 @@ class TestConfig(ShinkenTest): self.sched.actions[n.id] = n self.sched.put_results(n) #Should have raised something like "Warning : the notification command 'BADCOMMAND' raised an error (exit code=2) : '[Errno 2] No such file or directory'" - self.assert_(self.log_match(1, 'BADCOMMAND')) + self.assert_(self.log_match(1, u'BADCOMMAND')) if __name__ == '__main__':
Fix: (a try) to get Jenkins happy with this test and all utf8 things.
diff --git a/manager/state/raft/raft.go b/manager/state/raft/raft.go index <HASH>..<HASH> 100644 --- a/manager/state/raft/raft.go +++ b/manager/state/raft/raft.go @@ -999,6 +999,11 @@ func (n *Node) ProcessRaftMessage(ctx context.Context, msg *api.ProcessRaftMessa defer n.stopMu.RUnlock() if n.IsMember() { + if msg.Message.To != n.Config.ID { + n.processRaftMessageLogger(ctx, msg).Errorf("received message intended for raft_id %x", msg.Message.To) + return &api.ProcessRaftMessageResponse{}, nil + } + if err := n.raftNode.Step(ctx, *msg.Message); err != nil { n.processRaftMessageLogger(ctx, msg).WithError(err).Debug("raft Step failed") }
raft: Ignore messages intended for a different member If a node managed to join raft twice, it would receive messages meant for both the new and old raft members. There was no check verifying that the recipient of message is correct. Adding this check makes sure that if this situation were to arise (perhaps because the leader is an older version that allows Join to be called twice by the same node), extra messages meant for a different raft member wouldn't be passed through to Step and possibly cause a panic.
diff --git a/state/environ.go b/state/environ.go index <HASH>..<HASH> 100644 --- a/state/environ.go +++ b/state/environ.go @@ -514,3 +514,13 @@ func assertEnvAliveOp(envUUID string) txn.Op { var isEnvAliveDoc = bson.D{ {"life", bson.D{{"$in", []interface{}{Alive, nil}}}}, } + +func checkEnvLife(st *State) error { + env, err := st.Environment() + if (err == nil && env.Life() != Alive) || errors.IsNotFound(err) { + return errors.New("environment is no longer alive") + } else if err != nil { + return errors.Annotate(err, "unable to read environment") + } + return nil +}
state: added checkEnvLife helper To be used to evaluate if a txn aborted because of the environment life assertion.
diff --git a/src/content/treeView.js b/src/content/treeView.js index <HASH>..<HASH> 100644 --- a/src/content/treeView.js +++ b/src/content/treeView.js @@ -174,6 +174,7 @@ objectExtend(TreeView.prototype, { } commands.push("pause"); + commands.push("store"); commands.sort(); Editor.GENERIC_AUTOCOMPLETE.setCandidates(XulUtils.toXPCOMString(this.editor.getAutoCompleteSearchParam("commandAction")),
added store command r<I>
diff --git a/tests/test_examples.py b/tests/test_examples.py index <HASH>..<HASH> 100755 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -81,6 +81,9 @@ class ExamplesTestCase(testlib.SDKTestCase): except: pass + def test_build_dir_exists(self): + self.assertTrue(os.path.exists("../build"), 'Run setup.py build, then setup.py dist') + def test_binding1(self): result = run("binding1.py") self.assertEquals(result, 0)
add a test to check for the build directory
diff --git a/lib/podio/models/form.rb b/lib/podio/models/form.rb index <HASH>..<HASH> 100644 --- a/lib/podio/models/form.rb +++ b/lib/podio/models/form.rb @@ -5,6 +5,7 @@ class Podio::Form < ActivePodio::Base property :domains, :array property :field_ids, :array property :attachments, :boolean + property :status, :string alias_method :id, :form_id delegate_to_hash :settings, :captcha, :text, :theme, :setter => true @@ -38,5 +39,13 @@ class Podio::Form < ActivePodio::Base def find(form_id) member Podio.connection.get("/form/#{form_id}").body end + + def disable(form_id) + Podio.connection.post("/form/#{form_id}/deactivate").body + end + + def enable(form_id) + Podio.connection.post("/form/#{form_id}/activate").body + end end end
Added activate/deactivate method to the form model.
diff --git a/pyvips/__init__.py b/pyvips/__init__.py index <HASH>..<HASH> 100644 --- a/pyvips/__init__.py +++ b/pyvips/__init__.py @@ -88,7 +88,7 @@ if vips_lib.vips_init(sys.argv[0].encode()) != 0: logger.debug('Inited libvips') if not API_mode: - from pyvips import vdecls + from .vdecls import cdefs major = vips_lib.vips_version(0) minor = vips_lib.vips_version(1) @@ -100,7 +100,7 @@ if not API_mode: 'api': False, } - ffi.cdef(vdecls.cdefs(features)) + ffi.cdef(cdefs(features)) from .error import * diff --git a/pyvips/pyvips_build.py b/pyvips/pyvips_build.py index <HASH>..<HASH> 100644 --- a/pyvips/pyvips_build.py +++ b/pyvips/pyvips_build.py @@ -38,7 +38,7 @@ features = { 'api': True, } -from pyvips import vdecls +import vdecls # handy for debugging #with open('vips-source.txt','w') as f:
don't try to import vdecls via pyvips perhaps this will fix Travis
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup_params = dict( 'lxml', 'six', ], - requires='BeautifulSoup', + requires=['BeautifulSoup', 'lxml'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers',
lxml in both places
diff --git a/packages/cozy-stack-client/src/AppCollection.js b/packages/cozy-stack-client/src/AppCollection.js index <HASH>..<HASH> 100644 --- a/packages/cozy-stack-client/src/AppCollection.js +++ b/packages/cozy-stack-client/src/AppCollection.js @@ -32,4 +32,24 @@ export default class AppCollection { next: false } } + + async find() { + throw new Error('find() method is not yet implemented') + } + + async get() { + throw new Error('get() method is not yet implemented') + } + + async create() { + throw new Error('create() method is not available for applications') + } + + async update() { + throw new Error('update() method is not available for applications') + } + + async destroy() { + throw new Error('destroy() method is not available for applications') + } }
feat: ⚠️ Throw error for not available appcollection methods
diff --git a/pgmpy/tests/test_readwrite/test_XMLBeliefNetwork.py b/pgmpy/tests/test_readwrite/test_XMLBeliefNetwork.py index <HASH>..<HASH> 100644 --- a/pgmpy/tests/test_readwrite/test_XMLBeliefNetwork.py +++ b/pgmpy/tests/test_readwrite/test_XMLBeliefNetwork.py @@ -1,10 +1,13 @@ import unittest from io import StringIO + import numpy as np import numpy.testing as np_test + from pgmpy.readwrite import XMLBeliefNetwork from pgmpy.models import BayesianModel from pgmpy.factors import TabularCPD +from pgmpy.extern import six try: from lxml import etree except ImportError: @@ -17,6 +20,7 @@ except ImportError: warnings.warn("Failed to import ElementTree from any known place") +@unittest.skipIf(six.PY2, "Unicode issues with tests") class TestXBNReader(unittest.TestCase): def setUp(self): string = """<ANALYSISNOTEBOOK NAME="Notebook.Cancer Example From Neapolitan" ROOT="Cancer">
skip tests for python2
diff --git a/common-core-open/src/main/java/com/bbn/bue/common/InContextOf.java b/common-core-open/src/main/java/com/bbn/bue/common/InContextOf.java index <HASH>..<HASH> 100644 --- a/common-core-open/src/main/java/com/bbn/bue/common/InContextOf.java +++ b/common-core-open/src/main/java/com/bbn/bue/common/InContextOf.java @@ -1,6 +1,7 @@ package com.bbn.bue.common; import com.google.common.annotations.Beta; +import com.google.common.base.Function; import com.google.common.base.Objects; import static com.google.common.base.Preconditions.checkNotNull; @@ -52,4 +53,14 @@ public final class InContextOf<T, CtxT> { return Objects.equal(this.item, other.item) && Objects.equal(this.context, other.context); } + + public static <F, T, C> Function<InContextOf<F, C>, InContextOf<T, C>> passThroughContext( + final Function<F, T> f) { + return new Function<InContextOf<F, C>, InContextOf<T, C>>() { + @Override + public InContextOf<T, C> apply(final InContextOf<F, C> input) { + return InContextOf.createXInContextOfY(f.apply(input.item()), input.context()); + } + }; + } }
Allow passing functions through InContextOfs
diff --git a/store.go b/store.go index <HASH>..<HASH> 100644 --- a/store.go +++ b/store.go @@ -1043,12 +1043,15 @@ func (s *store) SetNames(id string, names []string) error { } if rlstore.Exists(id) { + defer rlstore.Touch() return rlstore.SetNames(id, deduped) } if ristore.Exists(id) { + defer ristore.Touch() return ristore.SetNames(id, deduped) } if rcstore.Exists(id) { + defer rcstore.Touch() return rcstore.SetNames(id, deduped) } return ErrLayerUnknown
Mark stores as modified by SetNames() Use the lockfile to mark that a store's contents need to be reloaded by other consumers whenever we call SetNames() to update a by-name index.
diff --git a/spyderlib/utils/introspection/jedi_plugin.py b/spyderlib/utils/introspection/jedi_plugin.py index <HASH>..<HASH> 100644 --- a/spyderlib/utils/introspection/jedi_plugin.py +++ b/spyderlib/utils/introspection/jedi_plugin.py @@ -91,6 +91,10 @@ class JediPlugin(IntrospectionPlugin): calltip = getsignaturefromtext(call_def.doc, name) argspec = calltip[calltip.find('('):] docstring = call_def.doc[call_def.doc.find(')') + 3:] + elif '(' in call_def.doc.splitlines()[0]: + calltip = call_def.doc.splitlines()[0] + name = call_def.doc.split('(')[0] + docstring = call_def.doc[call_def.doc.find(')') + 3:] else: calltip = name + '(...)' argspec = '()' @@ -110,7 +114,9 @@ class JediPlugin(IntrospectionPlugin): mod_name) argspec = argspec.replace(' = ', '=') calltip = calltip.replace(' = ', '=') - doc_info = dict(name=call_def.name, argspec=argspec, + debug_print(call_def.name) + + doc_info = dict(name=name, argspec=argspec, note=note, docstring=docstring, calltip=calltip) return doc_info
Fix handling of improper calldef.name.
diff --git a/Tank/Plugins/TotalAutostop.py b/Tank/Plugins/TotalAutostop.py index <HASH>..<HASH> 100644 --- a/Tank/Plugins/TotalAutostop.py +++ b/Tank/Plugins/TotalAutostop.py @@ -21,6 +21,8 @@ class TotalAutostopPlugin(AbstractPlugin, AggregateResultListener): autostop.add_criteria_class(TotalHTTPCodesCriteria) autostop.add_criteria_class(TotalNetCodesCriteria) autostop.add_criteria_class(TotalNegativeHTTPCodesCriteria) + autostop.add_criteria_class(TotalNegativeNetCodesCriteria) + autostop.add_criteria_class(TotalHTTPTrendCriteria) def prepare_test(self): pass
bugfix: include criteria to totalautostop plugin
diff --git a/lib/renderer/window-setup.js b/lib/renderer/window-setup.js index <HASH>..<HASH> 100644 --- a/lib/renderer/window-setup.js +++ b/lib/renderer/window-setup.js @@ -121,11 +121,11 @@ module.exports = (ipcRenderer, guestInstanceId, openerId, hiddenPage) => { } window.alert = function (message, title) { - ipcRenderer.sendSync('ELECTRON_BROWSER_WINDOW_ALERT', message, title) + ipcRenderer.sendSync('ELECTRON_BROWSER_WINDOW_ALERT', `${message}`, `${title}`) } window.confirm = function (message, title) { - return ipcRenderer.sendSync('ELECTRON_BROWSER_WINDOW_CONFIRM', message, title) + return ipcRenderer.sendSync('ELECTRON_BROWSER_WINDOW_CONFIRM', `${message}`, `${title}`) } // But we do not support prompt().
Convert message/title to strings in render process
diff --git a/app/models/glue/pulp/package.rb b/app/models/glue/pulp/package.rb index <HASH>..<HASH> 100644 --- a/app/models/glue/pulp/package.rb +++ b/app/models/glue/pulp/package.rb @@ -45,6 +45,10 @@ module Glue::Pulp::Package def nvrea Util::Package::build_nvrea(self.as_json.with_indifferent_access, false) end + + def as_json(options = nil) + super(options).merge id: id + end end end
<I>: Add missing id to package json `katello package list` was showing list without package ids. <URL>
diff --git a/proxy.go b/proxy.go index <HASH>..<HASH> 100644 --- a/proxy.go +++ b/proxy.go @@ -81,6 +81,7 @@ func (h *Host) session(c caps) (map[string]interface{}, int) { if err != nil { return nil, seleniumError } + defer resp.Body.Close() var reply map[string]interface{} err = json.NewDecoder(resp.Body).Decode(&reply) if err != nil {
Closing request body anyway (related to #<I>)
diff --git a/test-app/app/src/main/assets/internal/ts_helpers.js b/test-app/app/src/main/assets/internal/ts_helpers.js index <HASH>..<HASH> 100644 --- a/test-app/app/src/main/assets/internal/ts_helpers.js +++ b/test-app/app/src/main/assets/internal/ts_helpers.js @@ -119,9 +119,10 @@ } } - global.__native = __native; - global.__extends = __extends; - global.__decorate = __decorate; + Object.defineProperty(global, "__native", { value: __native }); + Object.defineProperty(global, "__extends", { value: __extends }); + Object.defineProperty(global, "__decorate", { value: __decorate }); + global.JavaProxy = JavaProxy; global.Interfaces = Interfaces; -})() \ No newline at end of file +})()
feat(typescript): Play nice with tslib (#<I>) AngularApp started adding tslib in the web pack project. This PR will set the __native, __extends and __decorate on the global using Object.defineProperty, so the tslib won't be able to overwrite them. Ideally adding tslib to a project should bring support for async/await etc.
diff --git a/lib/double_entry/line.rb b/lib/double_entry/line.rb index <HASH>..<HASH> 100644 --- a/lib/double_entry/line.rb +++ b/lib/double_entry/line.rb @@ -58,7 +58,6 @@ module DoubleEntry class Line < ActiveRecord::Base belongs_to :detail, :polymorphic => true - before_save :do_validations def amount self[:amount] && Money.new(self[:amount], currency) @@ -152,10 +151,6 @@ module DoubleEntry private - def do_validations - check_balance_will_not_be_sent_negative - end - def check_balance_will_not_be_sent_negative if self.account.positive_only and self.balance < Money.new(0) raise AccountWouldBeSentNegative.new(account)
fix merge, remove the callback as per master
diff --git a/lib/MwbExporter/Core/Model/Column.php b/lib/MwbExporter/Core/Model/Column.php index <HASH>..<HASH> 100644 --- a/lib/MwbExporter/Core/Model/Column.php +++ b/lib/MwbExporter/Core/Model/Column.php @@ -33,7 +33,7 @@ abstract class Column extends Base protected $isUnique = false; protected $local; - protected $foreign; + protected $foreigns; public function __construct($data, $parent) { @@ -85,7 +85,10 @@ abstract class Column extends Base public function markAsForeignReference( \MwbExporter\Core\Model\ForeignKey $foreign) { - $this->foreign = $foreign; + if($this->foreigns == null) { + $this->foreigns = array(); + } + $this->foreigns[] = $foreign; } public function getColumnName()
The foreign attribute is replaced by a foreigns attribute to store multiple foreignKey for one column.
diff --git a/quantecon/models/__init__.py b/quantecon/models/__init__.py index <HASH>..<HASH> 100644 --- a/quantecon/models/__init__.py +++ b/quantecon/models/__init__.py @@ -6,8 +6,10 @@ objects imported here will live in the `quantecon.models` namespace """ __all__ = ["AssetPrices", "CareerWorkerProblem", "ConsumerProblem", - "JvWorker", "LucasTree", "SearchProblem", "GrowthModel"] + "JvWorker", "LucasTree", "SearchProblem", "GrowthModel", + "solow"] +from . import solow from .asset_pricing import AssetPrices from .career import CareerWorkerProblem from .ifp import ConsumerProblem
Fixed import statements in __init__.py to include solow module.
diff --git a/src/raven.js b/src/raven.js index <HASH>..<HASH> 100644 --- a/src/raven.js +++ b/src/raven.js @@ -4,7 +4,7 @@ // If there is no JSON, we no-op the core features of Raven // since JSON is required to encode the payload var _Raven = window.Raven, - hasJSON = !!(isObject(JSON) && JSON.stringify), + hasJSON = !!(typeof JSON === 'object' && JSON.stringify), lastCapturedException, lastEventId, globalServer, diff --git a/template/_footer.js b/template/_footer.js index <HASH>..<HASH> 100644 --- a/template/_footer.js +++ b/template/_footer.js @@ -4,10 +4,10 @@ if (typeof define === 'function' && define.amd) { define('raven', function(Raven) { return (window.Raven = Raven); }); -} else if (isObject(module)) { +} else if (typeof module === 'object') { // browserify module.exports = Raven; -} else if (isObject(exports)) { +} else if (typeof exports === 'object') { // CommonJS exports = Raven; } else {
Fix ReferenceErrors since we can't qualify with `window` btw, this is the worst language. Fixes #<I>
diff --git a/world/components.go b/world/components.go index <HASH>..<HASH> 100644 --- a/world/components.go +++ b/world/components.go @@ -190,6 +190,7 @@ func (maker ComponentMaker) BBS(argv ...string) ifrit.Runner { maker.Artifacts.Executables["bbs"], append([]string{ "-address", maker.Addresses.BBS, + "-auctioneerAddress", "http://" + maker.Addresses.Auctioneer, "-etcdCluster", maker.EtcdCluster(), "-etcdCertFile", maker.SSL.ClientCert, "-etcdKeyFile", maker.SSL.ClientKey,
Pass auctioneer address to BBS [#<I>]
diff --git a/satsearch/search.py b/satsearch/search.py index <HASH>..<HASH> 100644 --- a/satsearch/search.py +++ b/satsearch/search.py @@ -95,7 +95,7 @@ class Search(object): """ Return Items from collection with matching ids """ col = cls.collection(collection) items = [] - base_url = urljoin(config.API_URL, 'collections/%s/items' % collection) + base_url = urljoin(config.API_URL, 'collections/%s/items/' % collection) for id in ids: try: items.append(Item(cls.query(urljoin(base_url, id))))
Update search.py Fixed a bug that the joined url did not include 'items' in the path
diff --git a/mod/scorm/version.php b/mod/scorm/version.php index <HASH>..<HASH> 100644 --- a/mod/scorm/version.php +++ b/mod/scorm/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die(); -$module->version = 2014031700; // The current module version (Date: YYYYMMDDXX). -$module->requires = 2013110500; // Requires this Moodle version. -$module->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics). -$module->cron = 300; +$plugin->version = 2014031700; // The current module version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics). +$plugin->cron = 300;
MDL-<I> scorm: revert accidental change of variable module back to plugin
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,14 +1,16 @@ 'use strict'; -/** - * Module dependences - */ - var dateformat = require('dateformat'); +var typeOf = require('kind-of'); + +module.exports = function(date, format) { + if (typeOf(date) !== 'date') { + format = date; + date = new Date(); + } -module.exports = function date(format) { if (typeof format !== 'string' || format === 'today') { format = 'mmmm dd, yyyy'; } - return dateformat(new Date(), format); -}; \ No newline at end of file + return dateformat(date, format); +};
support passing an instance of `Date`
diff --git a/src/frontend/org/voltdb/iv2/SpScheduler.java b/src/frontend/org/voltdb/iv2/SpScheduler.java index <HASH>..<HASH> 100644 --- a/src/frontend/org/voltdb/iv2/SpScheduler.java +++ b/src/frontend/org/voltdb/iv2/SpScheduler.java @@ -1059,6 +1059,14 @@ public class SpScheduler extends Scheduler implements SnapshotCompletionInterest final CompleteTransactionTask task = new CompleteTransactionTask(m_mailbox, txn, m_pendingTasks, msg, m_drGateway); queueOrOfferMPTask(task); + } else { + // Generate a dummy response message when this site has not seen previous FragmentTaskMessage, + // the leader may have started to wait for replicas' response messages. + // This can happen in the early phase of site rejoin before replica receiving the snapshot initiation, + // it also means this CompleteTransactionMessage message will be dropped because it's after snapshot. + final CompleteTransactionResponseMessage resp = new CompleteTransactionResponseMessage(msg); + resp.m_sourceHSId = m_mailbox.getHSId(); + handleCompleteTransactionResponseMessage(resp); } }
ENG-<I>: Newly rejoined replica may receive a CompleteTransactionMessage without seeing FragmentTaskMessage from its leader, leading not creating CompleteTransactionTask. The leader may hence start to wait for replica's CompleteTransactionResponseMessage and deadlock the MP transaction in this way. This fix is to generate a dummy CompleteTransactionResponseMessage without going into the site task queue. (#<I>)
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/ConfigurationTest.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -48,6 +48,6 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase $config = $processor->process($tree, array($config)); $this->assertFalse(array_key_exists('factory', $config), 'The factory key is silently removed without an exception'); - $this->assertEquals(array(), $config['factories'], 'The factories key is jsut an empty array'); + $this->assertEquals(array(), $config['factories'], 'The factories key is just an empty array'); } }
[SecurityBundle] Fixed typo
diff --git a/lib/mobility/configuration.rb b/lib/mobility/configuration.rb index <HASH>..<HASH> 100644 --- a/lib/mobility/configuration.rb +++ b/lib/mobility/configuration.rb @@ -5,6 +5,8 @@ Stores shared Mobility configuration referenced by all backends. =end class Configuration + RESERVED_OPTION_KEYS = %i[backend model_class].freeze + # Alias for mobility_accessor (defaults to +translates+) # @return [Symbol] attr_accessor :accessor_method @@ -14,9 +16,18 @@ Stores shared Mobility configuration referenced by all backends. attr_accessor :query_method # Default set of options. These will be merged with any backend options - # when defining translated attributes (with +translates+). + # when defining translated attributes (with +translates+). Default options + # may not include the keys 'backend' or 'model_class'. # @return [Hash] - attr_accessor :default_options + attr_reader :default_options + def default_options=(options) + if (keys = options.keys & RESERVED_OPTION_KEYS).present? + raise ReservedOptionKey, + "Default options may not contain the following reserved keys: #{keys.join(', ')}" + else + @default_options = options + end + end # Option modules to apply. Defines which module to apply for each option # key. Order of hash keys/values is important, as this becomes the order in @@ -70,5 +81,7 @@ Stores shared Mobility configuration referenced by all backends. locale_accessors: LocaleAccessors } end + + class ReservedOptionKey < Exception; end end end
Mark some option keys in default options as reserved
diff --git a/addok/config/default.py b/addok/config/default.py index <HASH>..<HASH> 100644 --- a/addok/config/default.py +++ b/addok/config/default.py @@ -77,9 +77,9 @@ RESULTS_FORMATTERS = [ 'addok.helpers.formatters.geojson', ] INDEXERS = [ + 'addok.helpers.index.housenumbers_indexer', 'addok.helpers.index.fields_indexer', 'addok.helpers.index.filters_indexer', - 'addok.helpers.index.housenumbers_indexer', 'addok.helpers.index.document_indexer', ] DEINDEXERS = [
Move housenumber indexer before field indexer If it comes later, it will overide the fields boost.
diff --git a/client/python/conductor/conductor.py b/client/python/conductor/conductor.py index <HASH>..<HASH> 100644 --- a/client/python/conductor/conductor.py +++ b/client/python/conductor/conductor.py @@ -47,7 +47,7 @@ class BaseClient(object): if headers is not None: theHeader = self.mergeTwoDicts(self.headers, headers) if body is not None: - jsonBody = json.dumps(body, ensure_ascii=False) + jsonBody = json.dumps(body, ensure_ascii=False).encode('utf8') resp = requests.post(theUrl, params=queryParams, data=jsonBody, headers=theHeader) else: resp = requests.post(theUrl, params=queryParams, headers=theHeader) @@ -62,7 +62,7 @@ class BaseClient(object): theHeader = self.mergeTwoDicts(self.headers, headers) if body is not None: - jsonBody = json.dumps(body, ensure_ascii=False) + jsonBody = json.dumps(body, ensure_ascii=False).encode('utf8') resp = requests.put(theUrl, params=queryParams, data=jsonBody, headers=theHeader) else: resp = requests.put(theUrl, params=queryParams, headers=theHeader)
encode body to utf8
diff --git a/nomad/deploymentwatcher/deployment_watcher.go b/nomad/deploymentwatcher/deployment_watcher.go index <HASH>..<HASH> 100644 --- a/nomad/deploymentwatcher/deployment_watcher.go +++ b/nomad/deploymentwatcher/deployment_watcher.go @@ -511,7 +511,10 @@ FAIL: } // If permitted, automatically promote this canary deployment - w.autoPromoteDeployment(updates.allocs) + err = w.autoPromoteDeployment(updates.allocs) + if err != nil { + w.logger.Error("failed to auto promote deployment", "error", err) + } // Create an eval to push the deployment along if res.createEval || len(res.allowReplacements) != 0 {
log error on autoPromoteDeployment failure
diff --git a/src/Router.php b/src/Router.php index <HASH>..<HASH> 100644 --- a/src/Router.php +++ b/src/Router.php @@ -163,17 +163,8 @@ class Router extends Header { if ($this->home !== null) return; $home = dirname($_SERVER['SCRIPT_NAME']); - // @codeCoverageIgnoreStart - if ($home === '.') - # CLI quirks - $home = '/'; - if ($home[0] != '/') - # CLI quirks - $home = '/' . $home; - // @codeCoverageIgnoreEnd - if ($home != '/') - $home = rtrim($home, '/'); - $home = rtrim($home, '/') . '/'; + $home = !$home || $home[0] != '/' + ? '/' : rtrim($home, '/') . '/'; $this->home = $home; } @@ -229,11 +220,8 @@ class Router extends Header { $rpath = parse_url($url)['path']; # remove home - if ($rpath != '/') { + if ($rpath != '/') $rpath = substr($rpath, strlen($this->home) - 1); - if (!$rpath) - $rpath = '/'; - } # trim slashes $rpath = trim($rpath, "/");
Add default home value to prevent null. Also remove CLI-specific hack. Let CLI activities do manual home and host setup.
diff --git a/lib/filelib.php b/lib/filelib.php index <HASH>..<HASH> 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -677,7 +677,7 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea } // unchanged file or directory - we keep it as is unset($newhashes[$oldhash]); - if (!$file->is_directory()) { + if (!$oldfile->is_directory()) { $filecount++; } }
MDL-<I> File API: Fixed calculation of the number of current files when merging with the draft area
diff --git a/wallet/wsapi/wsapi.go b/wallet/wsapi/wsapi.go index <HASH>..<HASH> 100644 --- a/wallet/wsapi/wsapi.go +++ b/wallet/wsapi/wsapi.go @@ -72,6 +72,8 @@ func handleV2Request(j *factom.JSON2Request) (*factom.JSON2Response, *factom.JSO resp, jsonError = handleGenerateECAddress(params) case "generate-factoid-address": resp, jsonError = handleGenerateFactoidAddress(params) + case "import-addresses": + resp, jsonError = handleImportAddresses(params) default: jsonError = newMethodNotFoundError() }
added api endpoint for import-addresses
diff --git a/spec/integration/util/settings.rb b/spec/integration/util/settings.rb index <HASH>..<HASH> 100755 --- a/spec/integration/util/settings.rb +++ b/spec/integration/util/settings.rb @@ -7,9 +7,13 @@ require 'puppet_spec/files' describe Puppet::Util::Settings do include PuppetSpec::Files + def minimal_default_settings + { :noop => {:default => false, :desc => "noop"} } + end + it "should be able to make needed directories" do settings = Puppet::Util::Settings.new - settings.setdefaults :main, :maindir => [tmpfile("main"), "a"] + settings.setdefaults :main, minimal_default_settings.update( :maindir => [tmpfile("main"), "a"] ) settings.use(:main) @@ -18,7 +22,7 @@ describe Puppet::Util::Settings do it "should make its directories with the corret modes" do settings = Puppet::Util::Settings.new - settings.setdefaults :main, :maindir => {:default => tmpfile("main"), :desc => "a", :mode => 0750} + settings.setdefaults :main, minimal_default_settings.update( :maindir => {:default => tmpfile("main"), :desc => "a", :mode => 0750} ) settings.use(:main)
Bug #<I> Spec failed due to missing manditory setting in mock Puppet::Util::Settings#use now requires the :noop setting to exist, and this test was not providing one in its mocked default structure.
diff --git a/eth_abi/grammar.py b/eth_abi/grammar.py index <HASH>..<HASH> 100644 --- a/eth_abi/grammar.py +++ b/eth_abi/grammar.py @@ -405,6 +405,7 @@ TYPE_ALIASES = { 'fixed': 'fixed128x18', 'ufixed': 'ufixed128x18', 'function': 'bytes24', + 'byte': 'bytes1', } TYPE_ALIAS_RE = re.compile(r'\b({})\b'.format( diff --git a/tests/test_grammar.py b/tests/test_grammar.py index <HASH>..<HASH> 100644 --- a/tests/test_grammar.py +++ b/tests/test_grammar.py @@ -196,7 +196,7 @@ def test_valid_abi_types(type_str): 'type_str, normalized', tuple(TYPE_ALIASES.items()) + ( ('(int,uint,fixed,ufixed)', '(int256,uint256,fixed128x18,ufixed128x18)'), - ('(function,function,function)', '(bytes24,bytes24,bytes24)'), + ('(function,function,(function,byte))', '(bytes24,bytes24,(bytes24,bytes1))'), ), ) def test_normalize(type_str, normalized):
Add alias "byte" for "bytes1"
diff --git a/src/Generators/RouteGenerate.php b/src/Generators/RouteGenerate.php index <HASH>..<HASH> 100644 --- a/src/Generators/RouteGenerate.php +++ b/src/Generators/RouteGenerate.php @@ -19,9 +19,9 @@ class RouteGenerate * * @param NamesGenerate */ - public function __construct(NamesGenerate $names) + public function __construct() { - $this->names = $names; + $this->names = app()->make('NamesGenerate'); } /**
refactor RouteGenerate class
diff --git a/lib/nuggets/util/cli.rb b/lib/nuggets/util/cli.rb index <HASH>..<HASH> 100644 --- a/lib/nuggets/util/cli.rb +++ b/lib/nuggets/util/cli.rb @@ -157,11 +157,13 @@ module Util end end - def load_config(file = options[:config] || defaults[:config]) + def load_config(file = options[:config] || default = defaults[:config]) + return unless file + if ::File.readable?(file) @config = ::YAML.load_file(file) - elsif file != defaults[:config] - quit "No such file: #{file}" + else + quit "No such file: #{file}" unless default end end
lib/nuggets/util/cli.rb (load_config): Complain about missing config file as soon as it's specified, not just when it differs from default.
diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index <HASH>..<HASH> 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -2517,9 +2517,9 @@ type PodSpec struct { // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts // file if specified. This is only valid for non-hostNetwork pods. // +optional - // +patchMergeKey=IP + // +patchMergeKey=ip // +patchStrategy=merge - HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"IP" protobuf:"bytes,23,rep,name=hostAliases"` + HostAliases []HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"` } // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the
fix patchMergyKey to ip instead of IP
diff --git a/mutagen/mp4/__init__.py b/mutagen/mp4/__init__.py index <HASH>..<HASH> 100644 --- a/mutagen/mp4/__init__.py +++ b/mutagen/mp4/__init__.py @@ -311,6 +311,7 @@ class MP4Tags(DictProxy, Tags): * '\\xa9mvi' -- Movement Index * 'shwm' -- work/movement * 'stik' -- Media Kind + * 'hdvd' -- HD Video * 'rtng' -- Content Rating * 'tves' -- TV Episode * 'tvsn' -- TV Season @@ -852,6 +853,7 @@ class MP4Tags(DictProxy, Tags): b"pcst": (__parse_bool, __render_bool), b"shwm": (__parse_integer, __render_integer, 1), b"stik": (__parse_integer, __render_integer, 1), + b"hdvd": (__parse_integer, __render_integer, 1), b"rtng": (__parse_integer, __render_integer, 1), b"covr": (__parse_cover, __render_cover), b"purl": (__parse_text, __render_text),
MP4: Add support for iTunes HD Video tag The atom is named "hdvd", it's an 8 bit integer where: 0 - SD 1 - <I>p 2 - <I>p iTunes and Apple TV refer to it rather than actual resolution info from the video stream, so it's a helpful tag to have.
diff --git a/closure/goog/net/xhrmanager.js b/closure/goog/net/xhrmanager.js index <HASH>..<HASH> 100644 --- a/closure/goog/net/xhrmanager.js +++ b/closure/goog/net/xhrmanager.js @@ -81,6 +81,12 @@ goog.net.XhrManager = function( goog.isDef(opt_timeoutInterval) ? Math.max(0, opt_timeoutInterval) : 0; /** + * Add credentials to every request. + * @private {boolean} + */ + this.withCredentials_ = !!opt_withCredentials; + + /** * The pool of XhrIo's to use. * @type {goog.net.XhrIoPool} * @private @@ -199,7 +205,9 @@ goog.net.XhrManager.prototype.send = function( url, goog.bind(this.handleEvent_, this, id), opt_method, opt_content, opt_headers, opt_callback, goog.isDef(opt_maxRetries) ? opt_maxRetries : this.maxRetries_, - opt_responseType, opt_withCredentials); + opt_responseType, + goog.isDef(opt_withCredentials) ? opt_withCredentials : + this.withCredentials_); this.requests_.set(id, request); // Setup the callback for the pool.
Added the missing implementation of withCredentials in XhrManager The behavior is promised in the jsdoc but is not implemented. RELNOTES: Added the missing implementation of withCredentials in XhrManager ------------- Created by MOE: <URL>
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index <HASH>..<HASH> 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -72,7 +72,7 @@ _FORCE_ENVIRON_FOR_WRAPPERS = { _POLLING_STRATEGIES = { - 'linux': ['epoll', 'poll', 'poll-cv'] + 'linux': ['epollex', 'epoll', 'poll', 'poll-cv'] }
Add epollex polling engine to run_tests.py
diff --git a/gnsq/reader.py b/gnsq/reader.py index <HASH>..<HASH> 100644 --- a/gnsq/reader.py +++ b/gnsq/reader.py @@ -197,7 +197,7 @@ class Reader(object): self.on_exception = blinker.Signal() if message_handler is not None: - self.on_message.connect(message_handler) + self.on_message.connect(message_handler, weak=False) if max_concurrency < 0: self.max_concurrency = cpu_count()
Don't store week reference to message_handler.
diff --git a/src/de/mrapp/android/preference/activity/parser/PreferenceHeaderParser.java b/src/de/mrapp/android/preference/activity/parser/PreferenceHeaderParser.java index <HASH>..<HASH> 100644 --- a/src/de/mrapp/android/preference/activity/parser/PreferenceHeaderParser.java +++ b/src/de/mrapp/android/preference/activity/parser/PreferenceHeaderParser.java @@ -243,8 +243,15 @@ public final class PreferenceHeaderParser { */ private static CharSequence parseTitle(final Context context, final TypedArray typedArray) { - return parseCharSequence(context, typedArray, + CharSequence title = parseCharSequence(context, typedArray, R.styleable.PreferenceHeader_android_title); + + if (title == null) { + throw new RuntimeException( + "<header> tag must contain title attribute"); + } + + return title; } /**
A RuntimeException is now thrown, if the title of a preference header is missing.
diff --git a/src/FieldHandlers/RelatedFieldHandler.php b/src/FieldHandlers/RelatedFieldHandler.php index <HASH>..<HASH> 100644 --- a/src/FieldHandlers/RelatedFieldHandler.php +++ b/src/FieldHandlers/RelatedFieldHandler.php @@ -54,9 +54,8 @@ class RelatedFieldHandler extends BaseFieldHandler $fieldName = $this->_getFieldName($table, $field, $options); $input = ''; - + $input .= '<div class="form-group' . ((bool)$options['fieldDefinitions']['required'] ? ' required' : '') . '">'; $input .= $cakeView->Form->label($field); - $input .= '<div class="input-group">'; $input .= '<span class="input-group-addon" title="Auto-complete"><strong>&hellip;</strong></span>'; @@ -88,6 +87,7 @@ class RelatedFieldHandler extends BaseFieldHandler $input .= '</div>'; } $input .= '</div>'; + $input .= '</div>'; $input .= $cakeView->Form->input($fieldName, ['type' => 'hidden', 'value' => $data]);
add form-group wrapper and required flag on related fields (task #<I>)
diff --git a/lib/profile/index.js b/lib/profile/index.js index <HASH>..<HASH> 100644 --- a/lib/profile/index.js +++ b/lib/profile/index.js @@ -46,6 +46,8 @@ function generate (inputs, opts) { } if (typeof(inputs.carbratio) != "undefined") { profile.carb_ratio = carb_ratios.carbRatioLookup(inputs); + } else { + console.error("Profile wan't given carb ratio data, cannot calculate carb_ratio"); } return profile;
Add an error message to console in case carb sensitivity data is missing
diff --git a/tests/test_live.py b/tests/test_live.py index <HASH>..<HASH> 100644 --- a/tests/test_live.py +++ b/tests/test_live.py @@ -24,7 +24,7 @@ class liveTests(unittest.TestCase): parser=configargparse.getArgumentParser('pynYNAB') args=parser.parse_known_args()[0] connection = nYnabConnection(args.email, args.password) - self.client = nYnabClient(connection, budget_name='My Budget') + self.client = nYnabClient(connection, budget_name=args.budgetname) def setUp(self): self.reload()
budget name should not default to "My Budget"
diff --git a/lib/server.js b/lib/server.js index <HASH>..<HASH> 100644 --- a/lib/server.js +++ b/lib/server.js @@ -178,7 +178,14 @@ server.onPhantomPageCreate = function(req, res) { _this.checkIfPageIsDoneLoading(req, res, req.prerender.status === 'fail'); }, (req.prerender.pageDoneCheckTimeout || _this.options.pageDoneCheckTimeout || PAGE_DONE_CHECK_TIMEOUT)); - req.prerender.page.open(encodeURI(req.prerender.url.replace(/%20/g, ' ')), function(status) { + var uri = encodeURI(req.prerender.url.replace(/%20/g, ' ')); + + //html5 push state URLs that have an encoded # (%23) need it to stay encoded + if(uri.indexOf('#!') === -1) { + uri = uri.replace(/#/g, '%23') + } + + req.prerender.page.open(uri, function(status) { req.prerender.status = status; }); });
make sure we encode # (%<I>) for html5 push state URLs
diff --git a/src/Provider/Facebook.php b/src/Provider/Facebook.php index <HASH>..<HASH> 100755 --- a/src/Provider/Facebook.php +++ b/src/Provider/Facebook.php @@ -144,7 +144,7 @@ class Facebook extends AbstractProvider */ protected function getContentType(ResponseInterface $response) { - $type = join(';', (array) $response->getHeader('content-type')); + $type = parent::getContentType($response); // Fix for Facebook's pseudo-JSONP support if (strpos($type, 'javascript') !== false) {
Add better implementation of content-type fix. Thanks @rtheunissen
diff --git a/plugins/pretokenise.js b/plugins/pretokenise.js index <HASH>..<HASH> 100644 --- a/plugins/pretokenise.js +++ b/plugins/pretokenise.js @@ -120,7 +120,7 @@ return { startIdx : tk.start, endIdx : tk.end, - str : code.substr(tk.start, tk.end), + str : code.substring(tk.start, tk.end), type : tp }; }};
fix issues with hack around acorn parser - eg 'get status'
diff --git a/code/controllers/CMSPageHistoryController.php b/code/controllers/CMSPageHistoryController.php index <HASH>..<HASH> 100644 --- a/code/controllers/CMSPageHistoryController.php +++ b/code/controllers/CMSPageHistoryController.php @@ -201,7 +201,7 @@ class CMSPageHistoryController extends CMSMain { ), new CheckboxField( 'CompareMode', - _t('CMSPageHistoryController.COMPAREMODE', 'Compare mode'), + _t('CMSPageHistoryController.COMPAREMODE', 'Compare mode (select two)'), $compareModeChecked ), new LiteralField('VersionsHtml', $versionsHtml),
MINOR: added note to select two entries
diff --git a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java index <HASH>..<HASH> 100644 --- a/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java +++ b/xchange-bitmex/src/main/java/org/knowm/xchange/bitmex/BitmexAdapters.java @@ -372,10 +372,10 @@ public class BitmexAdapters { public static FundingRecord adaptFundingRecord(BitmexWalletTransaction walletTransaction) { String datePattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; - SimpleDateFormat dateFormat = new SimpleDateFormat(datePattern); - Date dateFunding = null; + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + Date dateFunding = null; if (walletTransaction.getTransactTime() != null) { try { dateFunding = dateFormat.parse(walletTransaction.getTransactTime());
[bitmex] Corrected parsing of FundingRecord timestamp
diff --git a/public/assets/js/build-plugins/warnings.js b/public/assets/js/build-plugins/warnings.js index <HASH>..<HASH> 100644 --- a/public/assets/js/build-plugins/warnings.js +++ b/public/assets/js/build-plugins/warnings.js @@ -101,13 +101,12 @@ var warningsPlugin = ActiveBuild.UiPlugin.extend({ var i = 0; for (var key in self.keys) { - self.chartData[i].data.push(parseInt(self.data[build][key])); + + self.chartData.datasets[i].data.push(parseInt(self.data[build][key])); i++; } } - console.log(self.chartData); - self.drawChart(); },
Fix for warnings chart, courtesy of @Henk8 closes #<I>
diff --git a/lib/rspec/active_model/mocks/mocks.rb b/lib/rspec/active_model/mocks/mocks.rb index <HASH>..<HASH> 100644 --- a/lib/rspec/active_model/mocks/mocks.rb +++ b/lib/rspec/active_model/mocks/mocks.rb @@ -238,7 +238,7 @@ EOM def stub_model(model_class, stubs={}) model_class.new.tap do |m| m.extend ActiveModelStubExtensions - if defined?(ActiveRecord) && model_class < ActiveRecord::Base + if defined?(ActiveRecord) && model_class < ActiveRecord::Base && model_class.primary_key m.extend ActiveRecordStubExtensions primary_key = model_class.primary_key.to_sym stubs = {primary_key => next_id}.merge(stubs)
guard against ActiveRecord models with no primary_key (e.g. database view backed models)
diff --git a/app/validators/slug_validator.rb b/app/validators/slug_validator.rb index <HASH>..<HASH> 100644 --- a/app/validators/slug_validator.rb +++ b/app/validators/slug_validator.rb @@ -77,6 +77,11 @@ protected end class GovernmentPageValidator < InstanceValidator + def url_parts + # Some inside govt slugs have a . in them (eg news articles with no english translation) + super.map {|part| part.gsub(/\./, '') } + end + def applicable? record.respond_to?(:kind) && prefixed_whitehall_format_names.include?(record.kind) end diff --git a/test/validators/slug_validator_test.rb b/test/validators/slug_validator_test.rb index <HASH>..<HASH> 100644 --- a/test/validators/slug_validator_test.rb +++ b/test/validators/slug_validator_test.rb @@ -70,6 +70,10 @@ class SlugTest < ActiveSupport::TestCase assert document_with_slug("government/test/foo", kind: "policy").valid? assert document_with_slug("government/test/foo/bar", kind: "policy").valid? end + + should "allow . in slugs" do + assert document_with_slug("government/world-location-news/221033.pt", kind: "news_story").valid? + end end context "Specialist documents" do
Allow . in inside govt slugs. Some insige govt items (eg world location news items with no english translation) have a .locale on the end.
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 @@ -50,7 +50,7 @@ class TreesController < ApplicationController false end - if ActionPack::VERSION::MAJOR == 5 + if ActionPack::VERSION::MAJOR >= 5 def default_render render body: action_name end @@ -334,7 +334,7 @@ class HasScopeTest < ActionController::TestCase protected - if ActionPack::VERSION::MAJOR == 5 + if ActionPack::VERSION::MAJOR >= 5 # TODO: Remove this when we only support Rails 5. def get(action, params = {}) super action, params: params
Support Rails 6 in our tests It was checking exclusively for Rails 5 to do the necessary workarounds, not we just check if it's the major version is higher than 5.
diff --git a/salt/states/file.py b/salt/states/file.py index <HASH>..<HASH> 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -251,7 +251,7 @@ from salt.exceptions import CommandExecutionError from salt.utils.serializers import yaml as yaml_serializer from salt.utils.serializers import json as json_serializer from six.moves import map -import six +import salt.utils.six as six from six import string_types, integer_types log = logging.getLogger(__name__)
Replaced import six in file /salt/states/file.py
diff --git a/metaseq/results_table.py b/metaseq/results_table.py index <HASH>..<HASH> 100644 --- a/metaseq/results_table.py +++ b/metaseq/results_table.py @@ -365,6 +365,8 @@ class ResultsTable(object): tuple([new_ind] + list(block[1:])) ) else: + if hasattr(ind, 'values'): + ind = ind.values _genes_to_highlight.append( tuple([ind] + list(block[1:])) )
support for pandas <I> bug with numpy
diff --git a/src/SourceLocator/Type/PhpInternalSourceLocator.php b/src/SourceLocator/Type/PhpInternalSourceLocator.php index <HASH>..<HASH> 100644 --- a/src/SourceLocator/Type/PhpInternalSourceLocator.php +++ b/src/SourceLocator/Type/PhpInternalSourceLocator.php @@ -115,10 +115,6 @@ final class PhpInternalSourceLocator extends AbstractSourceLocator return false; } - if ( ! \file_exists($expectedStubName) || ! \is_readable($expectedStubName) || ! \is_file($expectedStubName)) { - return false; - } - - return true; + return \is_file($expectedStubName) && \is_readable($expectedStubName); } }
#<I> simplified some minor file lookup operations
diff --git a/exp/lmdbscan/scanner_test.go b/exp/lmdbscan/scanner_test.go index <HASH>..<HASH> 100644 --- a/exp/lmdbscan/scanner_test.go +++ b/exp/lmdbscan/scanner_test.go @@ -23,6 +23,12 @@ func TestScanner_err(t *testing.T) { for scanner.Scan() { t.Error("loop should not execute") } + if scanner.Set(nil, nil, lmdb.First) { + t.Error("Set returned true") + } + if scanner.SetNext(nil, nil, lmdb.NextNoDup, lmdb.NextDup) { + t.Error("SetNext returned true") + } return scanner.Err() }) if !lmdb.IsErrnoSys(err, syscall.EINVAL) {
lmdbscan: add missing test cases Adds error handling tests for Scanner.Set* methods.
diff --git a/modules/uadetector-core/src/test/java/net/sf/uadetector/datastore/AbstractRefreshableDataStoreTest.java b/modules/uadetector-core/src/test/java/net/sf/uadetector/datastore/AbstractRefreshableDataStoreTest.java index <HASH>..<HASH> 100644 --- a/modules/uadetector-core/src/test/java/net/sf/uadetector/datastore/AbstractRefreshableDataStoreTest.java +++ b/modules/uadetector-core/src/test/java/net/sf/uadetector/datastore/AbstractRefreshableDataStoreTest.java @@ -30,6 +30,12 @@ public class AbstractRefreshableDataStoreTest { Assert.assertSame(data2, store.getData()); } + @Test(expected = IllegalStateException.class) + public void setData_withEmptyData() { + final TestXmlDataStore store = new TestXmlDataStore(); + store.setData(Data.EMPTY); + } + @Test(expected = IllegalArgumentException.class) public void setUpdateOperation_null() { final TestXmlDataStore store = new TestXmlDataStore();
Added test to check that 'setData' does not accept a Data.EMPTY
diff --git a/cltk/tokenize/word.py b/cltk/tokenize/word.py index <HASH>..<HASH> 100644 --- a/cltk/tokenize/word.py +++ b/cltk/tokenize/word.py @@ -6,13 +6,14 @@ import re from nltk.tokenize.punkt import PunktLanguageVars from nltk.tokenize.punkt import PunktSentenceTokenizer, PunktParameters +from cltk.utils.cltk_logger import logger do_arabic = False try: import pyarabic.araby as araby do_arabic = True except ImportError: - print('Arabic not supported. Install `pyarabic` library to tokenize Arabic.') + logger.info('Arabic not supported. Install `pyarabic` library to tokenize Arabic.') pass __author__ = ['Patrick J. Burns <patrick@diyclassics.org>', 'Kyle P. Johnson <kyle@kyle-p-johnson.com>']
ch pyarabic printout to log
diff --git a/js/stex.js b/js/stex.js index <HASH>..<HASH> 100644 --- a/js/stex.js +++ b/js/stex.js @@ -175,6 +175,9 @@ module.exports = class stex extends Exchange { 'maker': 0.002, }, }, + 'commonCurrencies': { + 'BHD': 'Bithold', + }, 'options': { 'parseOrderToPrecision': false, },
Stex BHD -> Bithold mapping
diff --git a/sunspot/lib/sunspot/search/standard_search.rb b/sunspot/lib/sunspot/search/standard_search.rb index <HASH>..<HASH> 100644 --- a/sunspot/lib/sunspot/search/standard_search.rb +++ b/sunspot/lib/sunspot/search/standard_search.rb @@ -70,7 +70,7 @@ module Sunspot # If no query was given, or all terms are present in the index, # return Solr's suggested collation. if terms.length == 0 - collation = solr_spellcheck['suggestions'][-1] + collation = solr_spellcheck['collations'][-1] end collation
Fix spellcheck_collation. With the solr 5 update, the collation response format changed. This change matches the update
diff --git a/src/EasyDB.php b/src/EasyDB.php index <HASH>..<HASH> 100644 --- a/src/EasyDB.php +++ b/src/EasyDB.php @@ -43,6 +43,11 @@ class EasyDB \PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION ); + + if (empty($dbEngine)) { + $dbEngine = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); + } + $this->dbEngine = $dbEngine; }
Get engine from connection when none provided The currently used database engine can be fetched from PDO if it is not set at runtime. Fixes #<I>
diff --git a/pkg/k8s/version/version.go b/pkg/k8s/version/version.go index <HASH>..<HASH> 100644 --- a/pkg/k8s/version/version.go +++ b/pkg/k8s/version/version.go @@ -87,6 +87,10 @@ var ( // discovery was introduced in K8s version 1.21. isGEThanAPIDiscoveryV1 = versioncheck.MustCompile(">=1.21.0") + // Constraint to check support for discovery/v1beta1 types. Support for + // v1beta1 discovery was introduced in K8s version 1.17. + isGEThanAPIDiscoveryV1Beta1 = versioncheck.MustCompile(">=1.17.0") + // isGEThanMinimalVersionConstraint is the minimal version required to run // Cilium isGEThanMinimalVersionConstraint = versioncheck.MustCompile(">=" + MinimalVersionConstraint) @@ -117,6 +121,7 @@ func updateVersion(version semver.Version) { cached.capabilities.MinimalVersionMet = isGEThanMinimalVersionConstraint(version) cached.capabilities.APIExtensionsV1CRD = isGEThanAPIExtensionsV1CRD(version) cached.capabilities.EndpointSliceV1 = isGEThanAPIDiscoveryV1(version) + cached.capabilities.EndpointSlice = isGEThanAPIDiscoveryV1Beta1(version) } func updateServerGroupsAndResources(apiResourceLists []*metav1.APIResourceList) {
pkg/k8s/version: Set EndpointSlice cap when version >=<I> updateVersion only set EndpointSliceV1, but not EndpointSlice. Fix this, so that tests can set the capabilities correctly via Force() for older k8s versions. Fixes: 7a<I>f<I> ("k8s: Consolidate check for EndpointSlice support")
diff --git a/src/Autocomplete.js b/src/Autocomplete.js index <HASH>..<HASH> 100644 --- a/src/Autocomplete.js +++ b/src/Autocomplete.js @@ -151,6 +151,18 @@ const Autocomplete = React.createClass({ ); }, + /** + * Focus or blur the autocomplete + */ + focus() { + const { input } = this.refs; + input.focus(); + }, + blur() { + const { input } = this.refs; + input.blur(); + }, + render() { const { onPaste, size, placeholder } = this.props; const { value, focused, loading, results } = this.state; @@ -158,6 +170,7 @@ const Autocomplete = React.createClass({ return ( <div className="Autocomplete"> <Input + ref="input" value={value} placeholder={placeholder} size={size} diff --git a/src/ContextMenu.js b/src/ContextMenu.js index <HASH>..<HASH> 100644 --- a/src/ContextMenu.js +++ b/src/ContextMenu.js @@ -3,6 +3,7 @@ const ReactDOM = require('react-dom'); const classNames = require('classnames'); const Backdrop = require('./Backdrop'); +const Dropdown = require('./Dropdown'); const MENU_RIGHT_SPACING = 300; const MENU_BOTTOM_SPACING = 160;
Add focus and blur on Autocomplete (#<I>)
diff --git a/metrics/endpoint.go b/metrics/endpoint.go index <HASH>..<HASH> 100644 --- a/metrics/endpoint.go +++ b/metrics/endpoint.go @@ -48,6 +48,8 @@ func printCounters(w http.ResponseWriter, r *http.Request) { // Histograms hists := getAllHistograms() for name, dat := range hists { + fmt.Fprintf(w, "%shist_%s_count %d\n", prefix, name, *dat.count) + fmt.Fprintf(w, "%shist_%s_kept %d\n", prefix, name, *dat.kept) for i, p := range gatherPercentiles(dat) { fmt.Fprintf(w, "%shist_%s_pctl_%d %d\n", prefix, name, i*5, p) } @@ -88,8 +90,8 @@ func gatherPercentiles(dat *hdat) []uint64 { pctls[0] = *dat.min pctls[20] = *dat.max - for i := uint64(1); i < 20; i++ { - idx := kept * i / 20 + for i := 1; i < 20; i++ { + idx := len(buf) * i / 20 pctls[i] = buf[idx] }
Adding count and kept to metrics endpoint for histograms. Fixing small bug when collecting more metrics than the buffer holds.
diff --git a/src/googleclouddebugger/capture_collector.py b/src/googleclouddebugger/capture_collector.py index <HASH>..<HASH> 100644 --- a/src/googleclouddebugger/capture_collector.py +++ b/src/googleclouddebugger/capture_collector.py @@ -19,6 +19,7 @@ import copy import datetime import inspect +import itertools import logging import os import re @@ -566,7 +567,14 @@ class CaptureCollector(object): return {'value': r} # Add an additional depth for the object itself - members = self.CaptureVariablesList(value.__dict__.items(), depth + 2, + items = value.__dict__.items() + if six.PY3: + # Make a list of the iterator in Python 3, to avoid 'dict changed size + # during iteration' errors from GC happening in the middle. + # Only limits.max_list_items + 1 items are copied, anything past that will + # get ignored by CaptureVariablesList(). + items = list(itertools.islice(items, limits.max_list_items + 1)) + members = self.CaptureVariablesList(items, depth + 2, OBJECT_HAS_NO_FIELDS, limits) v = {'members': members}
Call list() on dict.items() in Python 3 to avoid 'dict changed size during iteration'. ------------- Created by MOE: <URL>
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -147,7 +147,7 @@ module.exports = function (db, opts, keys) { }) } - db.createFeed = function (keys) { + db.createFeed = function (keys, opts) { return createFeed(db, keys, opts) } @@ -329,10 +329,12 @@ module.exports = function (db, opts, keys) { db.getLatest = function (id, cb) { lastDB.get(id, function (err, v) { if(err) return cb(err) + //callback null there is no latest clockDB.get([id, toSeq(v)], function (err, hash) { - if(err) return cb(err) + if(err) return cb() db.get(hash, function (err, msg) { - cb(err, {key: hash, value: msg}) + if(err) cb() + else cb(null, {key: hash, value: msg}) }) }) }) @@ -569,3 +571,4 @@ module.exports = function (db, opts, keys) { +
ignore db errors on getLatest, we expect this when it is a new feed