diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/test/unit/core/core.transformations/transformations.serialize.js b/test/unit/core/core.transformations/transformations.serialize.js index <HASH>..<HASH> 100644 --- a/test/unit/core/core.transformations/transformations.serialize.js +++ b/test/unit/core/core.transformations/transformations.serialize.js @@ -42,10 +42,11 @@ describe('Core Transformations', function() { */ before(function() { - var collections = {}, + var collections = [], waterline = new Waterline(); - collections.customer = Waterline.Collection.extend({ + collections.push(Waterline.Collection.extend({ + identity: 'customer', tableName: 'customer', attributes: { uuid: { @@ -53,16 +54,17 @@ describe('Core Transformations', function() { primaryKey: true } } - }); + })); - collections.foo = Waterline.Collection.extend({ + collections.push(Waterline.Collection.extend({ + identity: 'foo', tableName: 'foo', attributes: { customer: { model: 'customer' } } - }); + })); var schema = new Schema(collections); transformer = new Transformer(schema.foo.attributes, schema.schema);
fix test to accept collections as an array
diff --git a/clonevirtualenv.py b/clonevirtualenv.py index <HASH>..<HASH> 100644 --- a/clonevirtualenv.py +++ b/clonevirtualenv.py @@ -6,7 +6,7 @@ import shutil import subprocess import sys -version_info = (0, 1, 2) +version_info = (0, 2, 2) __version__ = '.'.join(map(str, version_info))
forgot to update version info in module.
diff --git a/lib/jekyll/drops/drop.rb b/lib/jekyll/drops/drop.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll/drops/drop.rb +++ b/lib/jekyll/drops/drop.rb @@ -3,7 +3,7 @@ module Jekyll module Drops class Drop < Liquid::Drop - NON_CONTENT_METHODS = [:[], :[]=, :inspect, :to_h, :fallback_data, :to_s].freeze + NON_CONTENT_METHODS = [:fallback_data].freeze # Get or set whether the drop class is mutable. # Mutability determines whether or not pre-defined fields may be @@ -86,7 +86,7 @@ module Jekyll # Returns an Array of strings which represent method-specific keys. def content_methods @content_methods ||= ( - self.class.instance_methods(false) - NON_CONTENT_METHODS + self.class.instance_methods - Jekyll::Drops::Drop.instance_methods - NON_CONTENT_METHODS ).map(&:to_s).reject do |method| method.end_with?("=") end
look up the content methods for drops in a smarter way
diff --git a/rope/contrib/findit.py b/rope/contrib/findit.py index <HASH>..<HASH> 100644 --- a/rope/contrib/findit.py +++ b/rope/contrib/findit.py @@ -71,8 +71,8 @@ def find_definition(project, code, offset, resource=None): A `Location` object is returned if the definition location can be determined, otherwise ``None`` is returned. """ - pymodule = project.pycore.get_string_module(code, resource) - pyname = rope.base.evaluate.eval_location(pymodule, offset) + main_module = project.pycore.get_string_module(code, resource) + pyname = rope.base.evaluate.eval_location(main_module, offset) if pyname is not None: module, lineno = pyname.get_definition_location() name = rope.base.worder.Worder(code).get_word_at(offset)
findit: choosing a better name for pymodule in find_definition()
diff --git a/lib/jss.rb b/lib/jss.rb index <HASH>..<HASH> 100644 --- a/lib/jss.rb +++ b/lib/jss.rb @@ -67,7 +67,7 @@ module JSS ### The minimum JSS version that works with this gem, as returned by the API ### in the deprecated 'jssuser' resource - MINIMUM_SERVER_VERSION = '9.4'.freeze + MINIMUM_SERVER_VERSION = '10.2.1'.freeze ### The current local UTC offset as a fraction of a day (Time.now.utc_offset is the offset in seconds, ### 60*60*24 is the seconds in a day) @@ -118,7 +118,6 @@ module JSS class APIObject; end class APIConnection; end - class Client; end class DBConnection; end class Server; end class Icon; end @@ -191,6 +190,9 @@ module JSS module MDM; end module ManagementHistory; end + ### Class-like modules + module Client; end + end # module JSS ### Load the rest of the module
min server is now <I>, might become <I> soon
diff --git a/src/Module.php b/src/Module.php index <HASH>..<HASH> 100644 --- a/src/Module.php +++ b/src/Module.php @@ -2,6 +2,8 @@ namespace luya; +use luya\components\UrlRule; + class Module extends \luya\base\Module { /** @@ -19,6 +21,6 @@ class Module extends \luya\base\Module * @var array */ public $urlRules = [ - ['class' => 'luya\components\UrlRule'], + ['class' => 'luya\components\UrlRule', 'position' => UrlRule::POSITION_LUYA], ]; }
added url rule position for luya module as luya position.
diff --git a/src/Services/KeylistsService.php b/src/Services/KeylistsService.php index <HASH>..<HASH> 100644 --- a/src/Services/KeylistsService.php +++ b/src/Services/KeylistsService.php @@ -36,6 +36,9 @@ class KeylistsService public function getKeyValue($keyType, $keyValue) { $list = Keyvalue::getKeyvaluesByKeyType($keyType); - return $list[$keyValue]; + if (isset($list[$keyValue])) { + return $list[$keyValue]; + } + return null; } }
Return null rather than throw error on value not found
diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index <HASH>..<HASH> 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -222,7 +222,7 @@ InteractionManager.prototype.addEvents = function () this.interactionDOMElement.style['-ms-touch-action'] = 'none'; } - this.interactionDOMElement.addEventListener('mousemove', this.onMouseMove, true); + window.document.addEventListener('mousemove', this.onMouseMove, true); this.interactionDOMElement.addEventListener('mousedown', this.onMouseDown, true); this.interactionDOMElement.addEventListener('mouseout', this.onMouseOut, true); @@ -252,7 +252,7 @@ InteractionManager.prototype.removeEvents = function () this.interactionDOMElement.style['-ms-touch-action'] = ''; } - this.interactionDOMElement.removeEventListener('mousemove', this.onMouseMove, true); + window.document.removeEventListener('mousemove', this.onMouseMove, true); this.interactionDOMElement.removeEventListener('mousedown', this.onMouseDown, true); this.interactionDOMElement.removeEventListener('mouseout', this.onMouseOut, true);
moved mouse move event to the document this means mouse move gets called all the time even if the user is not over the renderer. fixes #<I>
diff --git a/lib/app/helper_model/criteria.js b/lib/app/helper_model/criteria.js index <HASH>..<HASH> 100644 --- a/lib/app/helper_model/criteria.js +++ b/lib/app/helper_model/criteria.js @@ -673,8 +673,10 @@ Criteria.setMethod(function select(field) { } } else { - if (typeof field == 'object' && field instanceof Classes.Alchemy.Criteria.FieldConfig) { - field = field.name; + if (typeof field == 'object') { + if (field instanceof Classes.Alchemy.Criteria.FieldConfig || field.name) { + field = field.name; + } } if (this._select) {
Add small workaround for Criteria select issue
diff --git a/src/com/esotericsoftware/kryo/serializers/DefaultSerializers.java b/src/com/esotericsoftware/kryo/serializers/DefaultSerializers.java index <HASH>..<HASH> 100644 --- a/src/com/esotericsoftware/kryo/serializers/DefaultSerializers.java +++ b/src/com/esotericsoftware/kryo/serializers/DefaultSerializers.java @@ -291,7 +291,7 @@ public class DefaultSerializers { } public void write (Kryo kryo, Output output, StringBuffer object) { - output.writeString(object == null ? null : object.toString()); + output.writeString(object); } public StringBuffer read (Kryo kryo, Input input, Class<StringBuffer> type) { @@ -312,13 +312,11 @@ public class DefaultSerializers { } public void write (Kryo kryo, Output output, StringBuilder object) { - output.writeString(object == null ? null : object.toString()); + output.writeString(object); } public StringBuilder read (Kryo kryo, Input input, Class<StringBuilder> type) { - String value = input.readString(); - if (value == null) return null; - return new StringBuilder(value); + return input.readStringBuilder(); } public StringBuilder copy (Kryo kryo, StringBuilder original) {
Updated StringBuilderSerializer and StringBufferSerializer.
diff --git a/src/Yggdrasil/Core/Routing/Router.php b/src/Yggdrasil/Core/Routing/Router.php index <HASH>..<HASH> 100644 --- a/src/Yggdrasil/Core/Routing/Router.php +++ b/src/Yggdrasil/Core/Routing/Router.php @@ -157,13 +157,27 @@ final class Router continue; } + $httpMethods = ['Get', 'Post', 'Put', 'Delete']; + $isApiAction = false; + + foreach ($httpMethods as $method) { + if (strstr($action, $method)) { + $isApiAction = true; + } + } + $actionAlias = str_replace( - ['Get', 'Post', 'Put', 'Delete', 'Action'], + array_merge($httpMethods, ['Action']), '', $action->getName() ); $alias = $controllerAlias . ':' . $actionAlias; + + if ($isApiAction) { + $alias = 'API:' . $alias; + } + $queryMap[$alias] = $this->getQuery($alias); } }
[Router] Add REST support for getQueryMap
diff --git a/lib/repository.js b/lib/repository.js index <HASH>..<HASH> 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -484,14 +484,14 @@ Repository.prototype.createCommitOnHead = function( message, callback){ var repo = this; + var index; - return repo.openIndex().then(function(index) { - index.read(true); - - filesToAdd.forEach(function(filePath) { - index.addByPath(filePath); - }); - + return repo.openIndex().then(function(index_) { + index = index_; + index.read(1); + return index.addAll(); + }) + .then(function() { index.write(); return index.writeTree(); @@ -643,8 +643,8 @@ Repository.prototype.fetchAll = function( /** * Merge a branch onto another branch * - * @param {String|Ref} from * @param {String|Ref} to + * @param {String|Ref} from * @return {Oid|Index} A commit id for a succesful merge or an index for a * merge with conflicts */ @@ -807,8 +807,8 @@ Repository.prototype.checkoutBranch = function(branch, opts) { var name = ref.name(); - return repo.setHead(name, - repo.defaultSignature(), + return repo.setHead(name, + repo.defaultSignature(), "Switch HEAD to " + name); }) .then(function() {
Fix `createCommitOnHead` The convenience method `createCommitOnHead` was adding files being ignored via `.gitignore` which is really bad. Now it's changed to use the `Index.prototype.addAll` method since it's available now and it wasn't when that method was written.
diff --git a/repository/lib.php b/repository/lib.php index <HASH>..<HASH> 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -199,15 +199,15 @@ abstract class repository { $params = (array)$params; require_once($CFG->dirroot . '/repository/'. $type . '/repository.class.php'); $classname = 'repository_' . $type; - if (self::has_admin_config()) { - $configs = self::get_option_names(); + $record = new stdclass; + if (call_user_func($classname . '::has_admin_config')) { + $configs = call_user_func($classname . '::get_option_names'); $options = array(); foreach ($configs as $config) { $options[$config] = $params[$config]; } - $record->data1 = serialize($options); + $record->data1 = serialize($options); } - $record = new stdclass; $record->repositoryname = $params['name']; $record->repositorytype = $type; $record->timecreated = time();
MDL-<I>, self::static_func doesn't work well on php <I>, change to another way to do this
diff --git a/pmag.py b/pmag.py index <HASH>..<HASH> 100755 --- a/pmag.py +++ b/pmag.py @@ -8452,6 +8452,8 @@ def read_criteria_from_file(path,acceptance_criteria): acceptance_criteria[crit]['value']=rec[crit] acceptance_criteria[crit]['threshold_type']="inherited" acceptance_criteria[crit]['decimal_points']=-999 + # LJ add: + acceptance_criteria[crit]['category'] = None # bollean flag elif acceptance_criteria[crit]['threshold_type']=='bool':
(temporary?) fix for measurement_step_max key error in thellier_gui auto interpreter with older data sets
diff --git a/examples/dev-kits/main.js b/examples/dev-kits/main.js index <HASH>..<HASH> 100644 --- a/examples/dev-kits/main.js +++ b/examples/dev-kits/main.js @@ -4,9 +4,9 @@ module.exports = { ember: { id: 'ember', title: 'Ember', - url: 'https://deploy-preview-9210--storybookjs.netlify.com/ember-cli', + url: 'https://deploy-preview-9210--storybookjs.netlify.app/ember-cli', }, - cra: 'https://deploy-preview-9210--storybookjs.netlify.com/cra-ts-kitchen-sink', + cra: 'https://deploy-preview-9210--storybookjs.netlify.app/cra-ts-kitchen-sink', }, webpack: async (config) => ({ ...config,
FIX refs examples by using the correct domain from netlify
diff --git a/test/fixtures/active_record.rb b/test/fixtures/active_record.rb index <HASH>..<HASH> 100644 --- a/test/fixtures/active_record.rb +++ b/test/fixtures/active_record.rb @@ -963,9 +963,9 @@ class PostResource < JSONAPI::Resource end def self.sortable_fields(context) - super(context) - [:id] + super(context) - [:id] + [:"author.name"] end - + def self.verify_key(key, context = nil) super(key) raise JSONAPI::Exceptions::RecordNotFound.new(key) unless find_by_key(key, context: context) diff --git a/test/test_helper.rb b/test/test_helper.rb index <HASH>..<HASH> 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -116,14 +116,6 @@ module Pets end end -class PostResource < JSONAPI::Resource - attribute :id - - def self.sortable_fields(context) - (super(context) << :"author.name") - [:id] - end -end - JSONAPI.configuration.route_format = :underscored_route TestApp.routes.draw do jsonapi_resources :people
Add relationship sortable field to PostResource and take out of TestHelper
diff --git a/scripts/configure_test_slurm.py b/scripts/configure_test_slurm.py index <HASH>..<HASH> 100755 --- a/scripts/configure_test_slurm.py +++ b/scripts/configure_test_slurm.py @@ -1,6 +1,7 @@ from socket import gethostname from string import Template from subprocess import call +from getpass import getuser SLURM_CONFIG_TEMPLATE = ''' # slurm.conf file generated by configurator.html. @@ -33,7 +34,7 @@ SlurmctldPort=6817 SlurmdPidFile=/var/run/slurmd.pid SlurmdPort=6818 SlurmdSpoolDir=/tmp/slurmd -SlurmUser=john +SlurmUser=$user #SlurmdUser=root #SrunEpilog= #SrunProlog= @@ -80,7 +81,7 @@ PartitionName=debug Nodes=$hostname Default=YES MaxTime=INFINITE State=UP def main(): - template_params = {"hostname": gethostname()} + template_params = {"hostname": gethostname(), "user": getuser()} config_contents = Template(SLURM_CONFIG_TEMPLATE).substitute(template_params) open("/etc/slurm-llnl/slurm.conf", "w").write(config_contents) call("slurmctld")
Touch up configure_test_slurm.py for non-my-laptop setups.
diff --git a/src/ace/Document.js b/src/ace/Document.js index <HASH>..<HASH> 100644 --- a/src/ace/Document.js +++ b/src/ace/Document.js @@ -381,7 +381,7 @@ ace.Document = function(text, mode) { this.$insertLines(firstRow, lines); var addedRows = lastRow - firstRow + 1; - this.fireChangeEvent(firstRow, lastRow+addedRows); + this.fireChangeEvent(firstRow); return addedRows; };
fix "copy lines up/down"
diff --git a/werkzeug/wsgi.py b/werkzeug/wsgi.py index <HASH>..<HASH> 100644 --- a/werkzeug/wsgi.py +++ b/werkzeug/wsgi.py @@ -738,13 +738,6 @@ class FileWrapper(object): raise StopIteration() -def make_limited_stream(stream, limit): - """Makes a stream limited.""" - if not isinstance(stream, LimitedStream) and limit is not None: - stream = LimitedStream(stream, limit) - return stream - - def _make_chunk_iter(stream, limit, buffer_size): """Helper for the line and chunk iter functions.""" if isinstance(stream, (bytes, bytearray, text_type)): @@ -755,7 +748,9 @@ def _make_chunk_iter(stream, limit, buffer_size): if item: yield item return - _read = make_limited_stream(stream, limit).read + if not isinstance(stream, LimitedStream) and limit is not None: + stream = LimitedStream(stream, limit) + _read = stream.read while 1: item = _read(buffer_size) if not item:
Some internal refactoring for limited streams on chunk iters
diff --git a/tests/Controller.js b/tests/Controller.js index <HASH>..<HASH> 100644 --- a/tests/Controller.js +++ b/tests/Controller.js @@ -133,4 +133,14 @@ describe('Controller', () => { controller.getSignal('foo')(new Date()) }) }) + it('should throw when pointing to a non existing signal', () => { + const controller = new Controller({}) + assert.throws(() => { + controller.getSignal('foo.bar')() + }) + }) + it('should return undefined when grabbing non existing state', () => { + const controller = new Controller({}) + assert.equal(controller.getState('foo.bar'), undefined) + }) })
test(Controller): write tests for missing signal and missing state
diff --git a/test/serve.test.js b/test/serve.test.js index <HASH>..<HASH> 100644 --- a/test/serve.test.js +++ b/test/serve.test.js @@ -33,6 +33,7 @@ describe('serve', function() { }); it('finds next unused port', function() { + this.timeout(10000); return createDirectory('foo').then(path => { process1 = spawn('node', ['./src/tabris', 'serve', path]); let port1;
Increase timeout of slow serve test Spawning serve several times sequentially may take more than 2 seconds, which leads to errors in a shared resource test environment. Change-Id: I3ec<I>caec<I>d<I>b6d<I>ef0ddf<I>
diff --git a/safe_qgis/test_utilities.py b/safe_qgis/test_utilities.py index <HASH>..<HASH> 100644 --- a/safe_qgis/test_utilities.py +++ b/safe_qgis/test_utilities.py @@ -2,6 +2,7 @@ import unittest import sys import os +from unittest import expectedFailure from PyQt4.QtCore import QVariant # Add parent directory to path to make test aware of other modules @@ -347,6 +348,7 @@ class UtilitiesTest(unittest.TestCase): myHtml = impactLayerAttribution(myKeywords) self.assertEqual(len(myHtml), 320) + @expectedFailure def test_localisedAttribution(self): """Test we can localise attribution.""" os.environ['LANG'] = 'id'
Mark localsed attribution as expected to fail
diff --git a/src/Commands/TestCommand.php b/src/Commands/TestCommand.php index <HASH>..<HASH> 100644 --- a/src/Commands/TestCommand.php +++ b/src/Commands/TestCommand.php @@ -31,9 +31,9 @@ class TestCommand extends Command } if (in_array(config('app.env'), config('larabug.environments'))) { - $this->info('✓ [Larabug] Correct environment found'); + $this->info('✓ [Larabug] Correct environment found (' . config('app.env') . ')'); } else { - $this->error('✗ [LaraBug] Environment not allowed to send errors to LaraBug, set this in your config'); + $this->error('✗ [LaraBug] Environment (' . config('app.env') . ') not allowed to send errors to LaraBug, set this in your config'); $this->info('More information about environment configuration: https://www.larabug.com/docs/how-to-use/installation'); }
Added the environment to the output of the test command Added the environment to the output of the test command
diff --git a/tests/test_connection.py b/tests/test_connection.py index <HASH>..<HASH> 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -297,7 +297,7 @@ class TestConnection(XvfbTest): cookies.append((i, c)) for i, c in cookies: try: - name = ''.join(c.reply().name) + name = c.reply().name.to_string() except xcffib.xproto.BadAtom: continue atoms.update({i: name}) # Lookup by number
ok, really fix the test this time :)
diff --git a/src/Receita/CNPJParser.php b/src/Receita/CNPJParser.php index <HASH>..<HASH> 100644 --- a/src/Receita/CNPJParser.php +++ b/src/Receita/CNPJParser.php @@ -58,7 +58,7 @@ class CNPJParser { { $ret = array(); if($text==self::nao_informada or $text==self::asterisks){ - $ret['code'] = '00'; + $ret['code'] = '00.00-0-00'; $ret['text'] = $text; } else { $split = explode(' - ',$text);
CNPJParser: Fixed code for undefined activity The code now uses tha same format as a normal code.
diff --git a/_distutils_importer/__init__.py b/_distutils_importer/__init__.py index <HASH>..<HASH> 100644 --- a/_distutils_importer/__init__.py +++ b/_distutils_importer/__init__.py @@ -25,7 +25,7 @@ class DistutilsMetaFinder: return self.get_distutils_spec() def get_distutils_spec(self): - import importlib + import importlib.util class DistutilsLoader(importlib.util.abc.Loader):
Fix AttributeError when `importlib.util` was not otherwise imported.
diff --git a/lib/varnish/utils.rb b/lib/varnish/utils.rb index <HASH>..<HASH> 100644 --- a/lib/varnish/utils.rb +++ b/lib/varnish/utils.rb @@ -1,2 +1 @@ -require 'varnish/utils/buffer_set' require 'varnish/utils/timer'
Belatedly stop including a file that's been killed.
diff --git a/test/simple.rb b/test/simple.rb index <HASH>..<HASH> 100644 --- a/test/simple.rb +++ b/test/simple.rb @@ -303,6 +303,8 @@ module SimpleTestMethods end def test_time_with_default_timezone_local + skip "with_system_tz not working in tomcat" if ActiveRecord::Base.connection.raw_connection.jndi? + with_system_tz 'Europe/Prague' do Time.use_zone 'Europe/Prague' do with_timezone_config default: :local do @@ -325,6 +327,8 @@ module SimpleTestMethods # def test_preserving_time_objects_with_utc_time_conversion_to_default_timezone_local + skip "with_system_tz not working in tomcat" if ActiveRecord::Base.connection.raw_connection.jndi? + with_system_tz 'America/New_York' do # with_env_tz in Rails' tests with_timezone_config default: :local do time = Time.utc(2000) @@ -341,6 +345,8 @@ module SimpleTestMethods end def test_preserving_time_objects_with_time_with_zone_conversion_to_default_timezone_local + skip "with_system_tz not working in tomcat" if ActiveRecord::Base.connection.raw_connection.jndi? + with_system_tz 'America/New_York' do # with_env_tz in Rails' tests with_timezone_config default: :local do Time.use_zone 'Central Time (US & Canada)' do
[test] skip tests using with_system_tz in JNDI config ..because it's not working from inside the tomcat container
diff --git a/bench_test.go b/bench_test.go index <HASH>..<HASH> 100644 --- a/bench_test.go +++ b/bench_test.go @@ -25,7 +25,7 @@ func benchRequest(b *testing.B, router http.Handler, r *http.Request) { func BenchmarkRouter(b *testing.B) { router := New() - router.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {}) + router.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {}, "GET,HEAD") r, _ := http.NewRequest("GET", "/hello", nil) benchRequest(b, router, r) }
benchmark for methods GET/HEAD
diff --git a/PBB_Core.py b/PBB_Core.py index <HASH>..<HASH> 100755 --- a/PBB_Core.py +++ b/PBB_Core.py @@ -2253,13 +2253,13 @@ class MergeError(Exception): class FormatterWithHeader(logging.Formatter): # http://stackoverflow.com/questions/33468174/write-header-to-a-python-log-file-but-only-if-a-record-gets-written def __init__(self, header, **kwargs): - super().__init__(**kwargs) + super(FormatterWithHeader, self).__init__(**kwargs) self.header = header # Override the normal format method self.format = self.first_line_format def first_line_format(self, record): # First time in, switch back to the normal format function - self.format = super().format + self.format = super(FormatterWithHeader, self).format return self.header + "\n" + self.format(record)
made superclass calls Python<I> compatible
diff --git a/moco-core/src/main/java/com/github/dreamhead/moco/resource/ResourceConfigApplierFactory.java b/moco-core/src/main/java/com/github/dreamhead/moco/resource/ResourceConfigApplierFactory.java index <HASH>..<HASH> 100644 --- a/moco-core/src/main/java/com/github/dreamhead/moco/resource/ResourceConfigApplierFactory.java +++ b/moco-core/src/main/java/com/github/dreamhead/moco/resource/ResourceConfigApplierFactory.java @@ -67,7 +67,7 @@ public final class ResourceConfigApplierFactory { } private abstract static class SelfResourceConfigApplier extends BaseResourceConfigApplier { - private String id; + private final String id; private SelfResourceConfigApplier(final String id) { this.id = id; @@ -80,7 +80,7 @@ public final class ResourceConfigApplierFactory { } private abstract static class EmbeddedResourceConfigApplier extends BaseResourceConfigApplier { - private Resource resource; + private final Resource resource; private EmbeddedResourceConfigApplier(final Resource resource) { this.resource = resource;
added missing final to resource config applier factory
diff --git a/okdownload/src/test/java/com/liulishuo/okdownload/core/file/DownloadUriOutputStreamTest.java b/okdownload/src/test/java/com/liulishuo/okdownload/core/file/DownloadUriOutputStreamTest.java index <HASH>..<HASH> 100644 --- a/okdownload/src/test/java/com/liulishuo/okdownload/core/file/DownloadUriOutputStreamTest.java +++ b/okdownload/src/test/java/com/liulishuo/okdownload/core/file/DownloadUriOutputStreamTest.java @@ -152,8 +152,8 @@ public class DownloadUriOutputStreamTest { when(pdf.getFileDescriptor()).thenReturn(fd); final File file = new File("/test"); - DownloadUriOutputStream outputStream = (DownloadUriOutputStream) new DownloadUriOutputStream.Factory() - .create(context, file, 1); + DownloadUriOutputStream outputStream = (DownloadUriOutputStream) new DownloadUriOutputStream + .Factory().create(context, file, 1); assertThat(outputStream.pdf).isEqualTo(pdf); assertThat(outputStream.out).isNotNull(); assertThat(outputStream.fos.getFD()).isEqualTo(fd);
chore: fix stylecheck issue on download-uri-output-stream
diff --git a/pods/testing/datasets_tests.py b/pods/testing/datasets_tests.py index <HASH>..<HASH> 100644 --- a/pods/testing/datasets_tests.py +++ b/pods/testing/datasets_tests.py @@ -17,6 +17,8 @@ dataset_helpers = [ "download_rogers_girolami_data", "downloard_url", "datenum", + "date2num", + "num2date", "datetime64_", "data_details_return", "download_data", @@ -30,7 +32,6 @@ dataset_helpers = [ "cmu_urls_files", "kepler_telescope_urls_files", "kepler_telescope", - "datenum", "decimalyear", "permute", "categorical", diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -17,11 +17,11 @@ from setuptools import find_packages, setup, Command # Package meta-data. NAME = "pods" DESCRIPTION = "Python software for Open Data Science" -URL = "https://github.com/lawrennd/ods" +URL = "https://github.com/sods/ods" EMAIL = "lawrennd@gmail.com" AUTHOR = "Neil D. Lawrence" REQUIRES_PYTHON = ">=3.6.0" -VERSION = "v0.0.21-alpha" +VERSION = "v0.0.31a0" # What packages are required for this module to be executed? REQUIRED = [
Update ready for pypi release.
diff --git a/test/test_svtyper.py b/test/test_svtyper.py index <HASH>..<HASH> 100644 --- a/test/test_svtyper.py +++ b/test/test_svtyper.py @@ -44,7 +44,7 @@ class TestCigarParsing(TestCase): self.assertEqual(get_end_diagonal(split_piece), 34 - (2 + 8)) split_piece2 = SplitRead.SplitPiece(1, 25, False, cigarstring_to_tuple(cigar_string), 60) split_piece2.set_reference_end(34) - self.assertEqual(get_start_diagonal(split_piece2), 32 - (2 + 8)) + self.assertEqual(get_end_diagonal(split_piece2), 34 - (2 + 8)) if __name__ == '__main__': unittest.main()
reference length is the same, either way
diff --git a/src/kff.View.js b/src/kff.View.js index <HASH>..<HASH> 100644 --- a/src/kff.View.js +++ b/src/kff.View.js @@ -769,12 +769,12 @@ kff.View = kff.createClass( if(oldModels) { - for(key in oldModels) + var keys = Object.keys(oldModels); + for(i = 0, l = keys.length; i < l; i++) { - if(oldModels.hasOwnProperty(key)) - { - this.models[key] = oldModels[key]; - } + key = keys[i]; + this.models[key] = oldModels[key]; + } } @@ -784,12 +784,12 @@ kff.View = kff.createClass( if(oldHelpers) { - for(key in oldHelpers) + var keys = Object.keys(oldHelpers); + for(i = 0, l = keys.length; i < l; i++) { - if(oldHelpers.hasOwnProperty(key)) - { - this.helpers[key] = oldHelpers[key]; - } + key = keys[i]; + this.helpers[key] = oldHelpers[key]; + } }
refactor(kff.View): use Object.keys instead of for in loops
diff --git a/bin/webpack-dev-server.js b/bin/webpack-dev-server.js index <HASH>..<HASH> 100755 --- a/bin/webpack-dev-server.js +++ b/bin/webpack-dev-server.js @@ -361,6 +361,14 @@ function startDevServer(wpOpt, options) { throw e; } + ["SIGINT", "SIGTERM"].forEach(function(sig) { + process.on(sig, function() { + console.log(`Gracefully shutting down server after ${sig}...`); + server.close(); + process.exit(); // eslint-disable-line no-process-exit + }); + }); + if(options.socket) { server.listeningApp.on("error", function(e) { if(e.code === "EADDRINUSE") {
Explicitely but gracefully handle SIGINT and SIGTERM signals. (#<I>) Fixes #<I>.
diff --git a/test/data_set_test.rb b/test/data_set_test.rb index <HASH>..<HASH> 100644 --- a/test/data_set_test.rb +++ b/test/data_set_test.rb @@ -38,8 +38,8 @@ class DataSetTest < Minitest::Test sets = [ { name: "FullTestT#{one}", - code: "FTT#{one}", - short_name: "FTT#{one}", + code: "FullTestT#{one}", + short_name: "FullTestT#{one}", data_element_ids: data_elements.map(&:id), organisation_unit_ids: org_units.map(&:id) } @@ -48,7 +48,7 @@ class DataSetTest < Minitest::Test assert_equal true, status.success? assert_equal 1, status.total_imported - created_set = Dhis2.client.data_sets.list(filter:"code:eq:FTT#{one}", fields: ":all").first + created_set = Dhis2.client.data_sets.list(filter:"code:eq:FullTestT#{one}", fields: ":all").first refute_empty created_set.organisation_units data_element1 = Dhis2.client.data_elements.find(data_elements.first.id)
Adapt find by code to match dataset created.
diff --git a/pyvim/commands/commands.py b/pyvim/commands/commands.py index <HASH>..<HASH> 100644 --- a/pyvim/commands/commands.py +++ b/pyvim/commands/commands.py @@ -331,6 +331,7 @@ def _(editor): quit(editor, all_=True, force=False) +@cmd('h') @cmd('help') def _(editor): """
Added ':h' alias for ':help'
diff --git a/alot/command.py b/alot/command.py index <HASH>..<HASH> 100644 --- a/alot/command.py +++ b/alot/command.py @@ -523,6 +523,8 @@ class ReplyCommand(Command): references = old_references[:1] + references references.append(msg.get_message_id()) reply['References'] = ' '.join(references) + else: + reply['References'] = msg.get_message_id() ui.apply_command(ComposeCommand(mail=reply))
forgot to set References on first replies
diff --git a/tests/HashTest.php b/tests/HashTest.php index <HASH>..<HASH> 100644 --- a/tests/HashTest.php +++ b/tests/HashTest.php @@ -9,6 +9,12 @@ class HashTest extends PHPUnit_Framework_TestCase public function testValidHash() { + $s = new Stringizer("1260fc5e"); + $this->assertEquals(true, $s->isHash("crc32")); + + $s = new Stringizer("d87f7e0c"); + $this->assertEquals(true, $s->isHash("crc32b")); + $s = new Stringizer("3ca25ae354e192b26879f651a51d92aa8a34d8d3"); $this->assertEquals(true, $s->isHash("sha1"));
Added basic tests for crc<I> and crc<I>b
diff --git a/tasks/fetchpages.js b/tasks/fetchpages.js index <HASH>..<HASH> 100644 --- a/tasks/fetchpages.js +++ b/tasks/fetchpages.js @@ -70,13 +70,15 @@ module.exports = function (grunt) { 'urls': [] }); - if ((typeof options.baseURL === 'undefined') || (options.baseURL === '')) { - grunt.log.error('"baseURL" option is mandatory!'); - return false; - } + if (this.files && this.files.length) { + if ((typeof options.baseURL === 'undefined') || (options.baseURL === '')) { + grunt.log.error('"baseURL" option is mandatory when files feature is used!'); + done(false); + } - if (options.baseURL.substr(options.baseURL.length - 1) !== '/') { - options.baseURL += '/'; + if (options.baseURL.substr(options.baseURL.length - 1) !== '/') { + options.baseURL += '/'; + } } if ((options.target !== '') && (options.target.substr(options.target.length - 1) !== '/')) {
allow omitting of "baseURL" option when no "files" are defined
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='soundscrape', - version='0.20.0', + version='0.21.0', packages=['soundscrape'], install_requires=required, include_package_data=True,
<I> - adds set title as album when downloading sets
diff --git a/classes/Boom/Asset/Finder.php b/classes/Boom/Asset/Finder.php index <HASH>..<HASH> 100644 --- a/classes/Boom/Asset/Finder.php +++ b/classes/Boom/Asset/Finder.php @@ -32,28 +32,6 @@ class Finder extends Boom\Finder\Finder return new Finder\Result($assets); } - /** - * - * @return array - */ -// public function get_count_and_total_size() -// { -// $query = clone $this->_query; -// $query->reset(); -// -// $this->_applyFilters($query); -// -// $result = $query -// ->select(array(DB::expr('sum(filesize)'), 'filesize')) -// ->select(array(DB::expr('count(*)'), 'count')) -// ->find(); -// -// return array( -// 'count' => $result->get('count'), -// 'filesize' => $result->get('filesize') -// ); -// } - public function setOrderBy($field, $direction = null) { in_array($field, $this->_allowedOrderByColumns) || $field = 'title';
Deleted commented code in asset finder
diff --git a/master/buildbot/data/resultspec.py b/master/buildbot/data/resultspec.py index <HASH>..<HASH> 100644 --- a/master/buildbot/data/resultspec.py +++ b/master/buildbot/data/resultspec.py @@ -152,14 +152,14 @@ class NoneComparator: def __ne__(self, other): return self.value != other.value - def __gt_(self, other): + def __gt__(self, other): if self.value is None and other.value is None: return False elif self.value is None: return False elif other.value is None: return True - return self.value < other.value + return self.value > other.value class ReverseComparator:
data: Fix __gt__() comparison operator in NoneComparator
diff --git a/elki-clustering/src/main/java/elki/evaluation/clustering/Entropy.java b/elki-clustering/src/main/java/elki/evaluation/clustering/Entropy.java index <HASH>..<HASH> 100644 --- a/elki-clustering/src/main/java/elki/evaluation/clustering/Entropy.java +++ b/elki-clustering/src/main/java/elki/evaluation/clustering/Entropy.java @@ -203,9 +203,9 @@ public class Entropy { */ private void computeMIFull(int[][] contingency, int r, int c, int n, int m, double byn, double mlogn, double[] logs) { // Precompute log(factorial) table: - double[] lfacs = new double[n]; + double[] lfacs = new double[Math.max(n, 1)]; double tmp = 0.; - for(int i = 2, e = n - m; i <= e; i++) { + for(int i = 2, e = Math.max(n - m, 2); i <= e; i++) { lfacs[i - 2] = tmp += log(i, logs); } final int[] lastrow = contingency[r];
Fix potential corner case in Entropy when n=m
diff --git a/tools.py b/tools.py index <HASH>..<HASH> 100644 --- a/tools.py +++ b/tools.py @@ -6,9 +6,9 @@ tools.py: """ __author__ = 'Jason R. Coombs <jaraco@sandia.gov>' -__version__ = '$Revision: 25 $'[11:-2] +__version__ = '$Revision: 26 $'[11:-2] __vssauthor__ = '$Author: Jaraco $'[9:-2] -__date__ = '$Modtime: 04-05-14 11:29 $'[10:-2] +__date__ = '$Modtime: 04-05-14 12:24 $'[10:-2] import string, urllib, os import logging @@ -627,7 +627,7 @@ class hashSplit( dict ): self.__getNext__() return self[ i ] -class iterQueue( iter ): +class iterQueue( object ): def __init__( self, getNext ): self.queued = [] self.getNext = getNext @@ -642,11 +642,6 @@ class iterQueue( iter ): def enqueue( self, item ): self.queued.insert( 0, item ) -def callbackIter( getNext ): - queue = [] - while 1: - - def ordinalth(n): """Return the ordinal with 'st', 'th', or 'nd' appended as appropriate. >>> map( ordinalth, xrange( -5, 22 ) )
Fixed some syntax errors in iter split code.
diff --git a/pyxel/examples/05_color_palette.py b/pyxel/examples/05_color_palette.py index <HASH>..<HASH> 100755 --- a/pyxel/examples/05_color_palette.py +++ b/pyxel/examples/05_color_palette.py @@ -3,13 +3,13 @@ import pyxel def draw_palette(x, y, col): col_val = pyxel.colors[col] - hex_col = "#{:06X}".format(col_val) - rgb_col = "{},{},{}".format(col_val >> 16, (col_val >> 8) & 0xFF, col_val & 0xFF) + hex_col = f"#{col_val:06X}" + rgb_col = f"{col_val >> 16},{(col_val >> 8) & 0xFF},{col_val & 0xFF}" pyxel.rect(x, y, 13, 13, col) pyxel.text(x + 16, y + 1, hex_col, 7) pyxel.text(x + 16, y + 8, rgb_col, 7) - pyxel.text(x + 5 - (col // 10) * 2, y + 4, "{}".format(col), 7 if col < 6 else 0) + pyxel.text(x + 5 - (col // 10) * 2, y + 4, f"{col}", 7 if col < 6 else 0) if col == 0: pyxel.rectb(x, y, 13, 13, 13)
Changed to use f-strings
diff --git a/lib/active_record/connection_adapters/oracle_enhanced/quoting.rb b/lib/active_record/connection_adapters/oracle_enhanced/quoting.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/oracle_enhanced/quoting.rb +++ b/lib/active_record/connection_adapters/oracle_enhanced/quoting.rb @@ -150,7 +150,7 @@ module ActiveRecord end # Cast a +value+ to a type that the database understands. - def type_cast(value, column) + def type_cast(value, column = nil) if column && column.cast_type.is_a?(Type::Serialized) super else
type_cast arity change refer <URL>
diff --git a/src/Application.php b/src/Application.php index <HASH>..<HASH> 100644 --- a/src/Application.php +++ b/src/Application.php @@ -21,6 +21,7 @@ use Symfony\Component\Console\Input\InputInterface; use Illuminate\Console\Application as BaseApplication; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use Illuminate\Contracts\Container\Container as ContainerContract; +use NunoMaduro\LaravelDesktopNotifier\LaravelDesktopNotifierServiceProvider; /** * This is the Zero Framework application class. @@ -64,6 +65,7 @@ class Application extends BaseApplication implements ArrayAccess protected $providers = [ \Illuminate\Events\EventServiceProvider::class, Providers\Composer\ServiceProvider::class, + LaravelDesktopNotifierServiceProvider::class, ]; /**
Adds desktop notifier into the core
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -53,8 +53,11 @@ const kernelsBound = Observable.bindCallback(kernels) const getKernelResourcesBound = Observable.bindCallback(getKernelResources) function asObservable() { - var potentialKernelDirs = jp.dataDirs().map(dir => path.join(dir, 'kernels')) - var o = Observable.fromArray(potentialKernelDirs) + return Observable.fromPromise(jp.dataDirs({ withSysPrefix: true })) + .flatMap(x => { + return Observable.fromArray(x) + }) + .map(d => path.join(d, 'kernels')) .flatMap(x => {return kernelsBound(x)}) .filter(x => x !== {}) .flatMap(x => { @@ -66,7 +69,6 @@ function asObservable() { .filter(x => !x.err) .publish() .refCount() - return o } function asPromise() {
Problem: we weren't providing the sys.prefix paths Solution: Ask for them from jupyter-paths
diff --git a/tasks/run-command.js b/tasks/run-command.js index <HASH>..<HASH> 100644 --- a/tasks/run-command.js +++ b/tasks/run-command.js @@ -4,7 +4,7 @@ module.exports = function(gulp, config) { return function(command, cb) { var _ = require('lodash'); var spawn = require('child_process').spawn; - var env = _.extend({}, process.env, config.server.environmentVariables); + var env = _.extend({}, config.server.environmentVariables, process.env); var argv = process.argv.slice(2); var proc = spawn('node', [command].concat(argv), { env: env, stdio: 'inherit' });
feat(run-command): allow environment to override variables defined in tasks config
diff --git a/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php b/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php +++ b/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php @@ -101,7 +101,7 @@ class LogoutUrlHelper extends Helper if ('/' === $logoutPath[0]) { $request = $this->container->get('request'); - $url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBasePath().$logoutPath; + $url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath; if (!empty($parameters)) { $url .= '?'.http_build_query($parameters);
Fix the logout path when not using the router This needs to use the base url, not the base path, so that it goes through the front controller when not using url rewriting.
diff --git a/lib/filter/jade.js b/lib/filter/jade.js index <HASH>..<HASH> 100644 --- a/lib/filter/jade.js +++ b/lib/filter/jade.js @@ -15,6 +15,7 @@ module.exports = function (src, dst, opts, callback) { DEBUG && debug('jade', src, '-->', dst); opts = opts || {}; opts.filename = src; + opts.pretty = true;// XXX: make configurable! jade.render(srcData, opts, function (err, dstData) { if (err) { DEBUG && debug('jade err', err);
turn on jade's pretty option.
diff --git a/src/resources/views/api/detail.blade.php b/src/resources/views/api/detail.blade.php index <HASH>..<HASH> 100644 --- a/src/resources/views/api/detail.blade.php +++ b/src/resources/views/api/detail.blade.php @@ -143,7 +143,7 @@ <div class="checkbox-inline"> <label> - @if(array_key_exists($key_type, $current_workers)) + @if(!is_null($current_workers) && array_key_exists($key_type, $current_workers)) @if(!is_null($current_workers[$key_type]) && in_array($worker, $current_workers[$key_type]))
Add a check for cases where api keys may have `null` constraints.
diff --git a/grunt.js b/grunt.js index <HASH>..<HASH> 100644 --- a/grunt.js +++ b/grunt.js @@ -437,11 +437,6 @@ module.exports = function( grunt ) { created = path + filename.replace( "dist/", "" ); - if ( !/^\//.test( path ) ) { - log.error( "File '" + created + "' was NOT created." ); - return; - } - file.write( created, file.read(filename) ); log.writeln( "File '" + created + "' created." );
Don't be so picky about path separators
diff --git a/wafer/talks/views.py b/wafer/talks/views.py index <HASH>..<HASH> 100644 --- a/wafer/talks/views.py +++ b/wafer/talks/views.py @@ -81,7 +81,8 @@ class TalkCreate(LoginRequiredMixin, CreateView): @revisions.create_revision() def form_valid(self, form): if not getattr(settings, 'WAFER_TALKS_OPEN', True): - raise ValidationError # Should this be SuspiciousOperation? + # Should this be SuspiciousOperation? + raise ValidationError("Talk submission isn't open") # Eaaargh we have to do the work of CreateView if we want to set values # before saving self.object = form.save(commit=False)
ValidationError must be instantiated
diff --git a/lib/FSi/DoctrineExtensions/Translatable/Entity/Repository/TranslatableRepository.php b/lib/FSi/DoctrineExtensions/Translatable/Entity/Repository/TranslatableRepository.php index <HASH>..<HASH> 100644 --- a/lib/FSi/DoctrineExtensions/Translatable/Entity/Repository/TranslatableRepository.php +++ b/lib/FSi/DoctrineExtensions/Translatable/Entity/Repository/TranslatableRepository.php @@ -341,12 +341,11 @@ class TranslatableRepository extends EntityRepository protected function areTranslationsIndexedByLocale($translationAssociation) { $translationAssociationMapping = $this->getClassMetadata()->getAssociationMapping($translationAssociation); - $translationExtendedMeta = $this->getTranslationExtendedMetadata($translationAssociation); - if (!isset($translationAssociationMapping['indexBy'])) { return false; } + $translationExtendedMeta = $this->getTranslationExtendedMetadata($translationAssociation); return ($translationAssociationMapping['indexBy'] == $translationExtendedMeta->localeProperty); }
Micro-optimization in TranslatableRepository
diff --git a/Context/CurrencyContext.php b/Context/CurrencyContext.php index <HASH>..<HASH> 100644 --- a/Context/CurrencyContext.php +++ b/Context/CurrencyContext.php @@ -4,6 +4,7 @@ namespace Netgen\Bundle\EzSyliusBundle\Context; use Sylius\Bundle\CoreBundle\Context\CurrencyContext as BaseCurrencyContext; use Doctrine\DBAL\Exception\TableNotFoundException; +use Sylius\Component\Core\Model\UserInterface; class CurrencyContext extends BaseCurrencyContext { @@ -18,4 +19,17 @@ class CurrencyContext extends BaseCurrencyContext return null; } } + + protected function getUser() + { + if ( + $this->securityContext->getToken() && + $this->securityContext->getToken()->getUser() instanceof UserInterface + ) + { + return parent::getUser(); + } + + return null; + } }
Override getUser method in currency context to return null if we are not dealing with eZ user
diff --git a/visidata/selection.py b/visidata/selection.py index <HASH>..<HASH> 100644 --- a/visidata/selection.py +++ b/visidata/selection.py @@ -78,7 +78,7 @@ def unselectByIdx(self, rowIdxs): @Sheet.api def gatherBy(self, func, gerund='gathering'): 'Generate only rows for which the given func returns True.' - for i in Progress(rotateRange(self.nRows, self.cursorRowIndex), total=self.nRows, gerund=gerund): + for i in Progress(rotateRange(self.nRows, self.cursorRowIndex-1), total=self.nRows, gerund=gerund): try: r = self.rows[i] if func(r):
[selection] mass select starts with current row
diff --git a/grimoire_elk/elk/telegram.py b/grimoire_elk/elk/telegram.py index <HASH>..<HASH> 100644 --- a/grimoire_elk/elk/telegram.py +++ b/grimoire_elk/elk/telegram.py @@ -40,15 +40,22 @@ class TelegramEnrich(Enrich): def get_elastic_mappings(self): + from grimoire_elk.utils import kibiter_version + + fielddata = '' + if kibiter_version == '5': + fielddata = ', "fielddata": true' + mapping = """ { "properties": { "text_analyzed": { "type": "string", "index":"analyzed" + %s } } - } """ + } """ % (fielddata) return {"items":mapping}
[enrich][telegram] Update text_analyzed so it exists as aggregatable
diff --git a/lib/pdf/reader/object_cache.rb b/lib/pdf/reader/object_cache.rb index <HASH>..<HASH> 100644 --- a/lib/pdf/reader/object_cache.rb +++ b/lib/pdf/reader/object_cache.rb @@ -6,7 +6,7 @@ class PDF::Reader # A Hash-like object for caching commonly used objects from a PDF file. # - # This is an internal class used by PDF::Reader::ObjectHash + # This is an internal class, no promises about a stable API. # class ObjectCache # nodoc diff --git a/lib/pdf/reader/object_hash.rb b/lib/pdf/reader/object_hash.rb index <HASH>..<HASH> 100644 --- a/lib/pdf/reader/object_hash.rb +++ b/lib/pdf/reader/object_hash.rb @@ -44,7 +44,7 @@ class PDF::Reader @pdf_version = read_version @xref = PDF::Reader::XRef.new(@io) @trailer = @xref.trailer - @cache = PDF::Reader::ObjectCache.new + @cache = opts[:cache] || PDF::Reader::ObjectCache.new @sec_handler = build_security_handler(opts) end
make ObjectCache available document-wide * to experiment with caching 'stuff' at a higher level than just PDF objects * prime candidates are PDF::Reader::Page and PDF::Reader::FormXObject's that can memoize expensive parsing calls
diff --git a/blackjack.py b/blackjack.py index <HASH>..<HASH> 100644 --- a/blackjack.py +++ b/blackjack.py @@ -253,7 +253,7 @@ class BJ(object): root = NULL def __init__(self, iterable=None, comparator=cmp): - self._comparator = cmp + self._comparator = comparator if iterable is not None: for item in iterable: @@ -312,6 +312,26 @@ class Deck(object): def __delitem__(self, key): self._bj.discard(key) + def iteritems(self): + return iter(self._bj) + + def iterkeys(self): + for k, v in self.iteritems(): + yield k + + def itervalues(self): + for k, v in self.iteritems(): + yield v + + def items(self): + return list(self.iteritems()) + + def keys(self): + return list(self.iterkeys()) + + def values(self): + return list(self.itervalues()) + from unittest import TestCase
Well, that more or less works. Sort of.
diff --git a/src/components/popup/popup.js b/src/components/popup/popup.js index <HASH>..<HASH> 100644 --- a/src/components/popup/popup.js +++ b/src/components/popup/popup.js @@ -54,7 +54,7 @@ popupDialog.prototype.hide = function (shouldCallback = true) { if (!document.querySelector('.vux-popup-dialog.vux-popup-show')) { this.mask.classList.remove('vux-popup-show') } - shouldCallback === false && this.params.onClose && this.params.onClose(this) + shouldCallback === false && this.params.onClose && this.params.hideOnBlur && this.params.onClose(this) } popupDialog.prototype.html = function (html) {
Popup: Call onClose only when hideOnBlur is true
diff --git a/lib/ledger_web/price_lookup.rb b/lib/ledger_web/price_lookup.rb index <HASH>..<HASH> 100644 --- a/lib/ledger_web/price_lookup.rb +++ b/lib/ledger_web/price_lookup.rb @@ -12,14 +12,14 @@ module LedgerWeb def lookup params = { - a: @min_date.month - 1, - b: @min_date.day, - c: @min_date.year, - d: @max_date.month - 1, - e: @max_date.day, - f: @max_date.year, - s: @symbol, - ignore: '.csv', + 'a' => @min_date.month - 1, + 'b' => @min_date.day, + 'c' => @min_date.year, + 'd' => @max_date.month - 1, + 'e' => @max_date.day, + 'f' => @max_date.year, + 's' => @symbol, + 'ignore' => '.csv', } query = params.map { |k,v| "#{k}=#{v}" }.join("&")
Remove some <I>isms
diff --git a/src/Illuminate/Queue/Console/ListenCommand.php b/src/Illuminate/Queue/Console/ListenCommand.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Queue/Console/ListenCommand.php +++ b/src/Illuminate/Queue/Console/ListenCommand.php @@ -72,6 +72,11 @@ class ListenCommand extends Command { */ protected function getQueue($connection) { + if ($connection === NULL) + { + $connection = $this->laravel['config']->get("queue.default"); + } + $queue = $this->laravel['config']->get("queue.connections.{$connection}.queue", 'default'); return $this->input->getOption('queue') ?: $queue; @@ -107,4 +112,4 @@ class ListenCommand extends Command { ); } -} \ No newline at end of file +}
Sane default connection/queue if none specified If you execute the command `php artisan queue:listen` then queue the system uses will end up as `default` even if the real default queue for your selected queue driver is different. This should fix that.
diff --git a/base/serialize.go b/base/serialize.go index <HASH>..<HASH> 100644 --- a/base/serialize.go +++ b/base/serialize.go @@ -383,7 +383,7 @@ func (c *ClassifierSerializer) WriteMetadataAtPrefix(prefix string, metadata Cla func CreateSerializedClassifierStub(filePath string, metadata ClassifierMetadataV1) (*ClassifierSerializer, error) { // Open the filePath - f, err := os.OpenFile(filePath, os.O_RDWR|os.O_TRUNC, 0600) + f, err := os.OpenFile(filePath, os.O_RDWR|os.O_TRUNC|os.O_CREAT, 0600) if err != nil { return nil, err }
base: try to correct 'no such file or directory' error
diff --git a/graphite_influxdb.py b/graphite_influxdb.py index <HASH>..<HASH> 100644 --- a/graphite_influxdb.py +++ b/graphite_influxdb.py @@ -52,7 +52,21 @@ class InfluxdbReader(object): start = points[0][0] end = points[-1][0] step = points[1][0] - start - datapoints = [p[2] for p in points] + steps = int((end - start) / step) + if len(points) == steps + 1: + logger.debug("No steps missing") + datapoints = [p[2] for p in points] + else: + logger.debug("Fill missing steps with None values") + next_point = 0 + for s in range(0, steps): + if points[next_point][0] <= start + step * s: + datapoints.append(points[next_point][2]) + if next_point < len(points): + next_point += 1 + else: + datapoints.append(None) + except Exception: pass time_info = start, end, step
Fill missing values (within the step interval) with None values Provide functional compatibility to whisper db, where missing values generate None (null). Without filling the gaps, Graphite-Web is generating wrong graphics.
diff --git a/etcd/etcd.go b/etcd/etcd.go index <HASH>..<HASH> 100644 --- a/etcd/etcd.go +++ b/etcd/etcd.go @@ -82,6 +82,7 @@ func (e *Etcd) Run() { } else if e.Config.Verbose { log.Verbose = true } + if e.Config.CPUProfileFile != "" { profile(e.Config.CPUProfileFile) }
chore(main): add a space line between the two if statements
diff --git a/ps_alchemy/resources.py b/ps_alchemy/resources.py index <HASH>..<HASH> 100644 --- a/ps_alchemy/resources.py +++ b/ps_alchemy/resources.py @@ -150,17 +150,11 @@ class ListResource(BaseResource): @property def items_per_page(self): - default = 5 - - if not getattr(self, '__parent__', True): - registry = get_current_registry() - return int( - registry.settings.get( - 'ps_alchemy.items_per_page', - default - ) + return int( + get_current_registry().settings.get( + 'ps_alchemy.items_per_page', 5 ) - return default + ) def __getitem__(self, name): if name == 'create':
fix up sacrud/pyramid_sacrud#<I>
diff --git a/compliance_checker/suite.py b/compliance_checker/suite.py index <HASH>..<HASH> 100644 --- a/compliance_checker/suite.py +++ b/compliance_checker/suite.py @@ -330,7 +330,7 @@ class CheckSuite(object): textchars = ''.join(map(chr, [7,8,9,10,12,13,27] + range(0x20, 0x100))) is_binary_string = lambda bytes: bool(bytes.translate(None, textchars)) - with open(ds_str) as f: + with open(ds_str, 'rb') as f: first_chunk = f.read(1024) if is_binary_string(first_chunk): # likely netcdf file
Open files in binary mode, fixes #<I>
diff --git a/pyqode/python/widgets/interactive.py b/pyqode/python/widgets/interactive.py index <HASH>..<HASH> 100644 --- a/pyqode/python/widgets/interactive.py +++ b/pyqode/python/widgets/interactive.py @@ -30,9 +30,8 @@ class PyInteractiveConsole(InteractiveConsole): self.set_writer(self._write) self.setMouseTracking(True) self.PROG = QtCore.QRegExp( - r'\s*File "[a-zA-Z\/_\d:\\\.]*((.\.[a-zA-Z\/_\d:\\]*")|(")), ' - r'line [0-9]*.*') - self.FILENAME_PROG = QtCore.QRegExp(r'"[a-zA-Z\/_\.\d:\\]*"') + r'\s*File ".*", line [0-9]*, in ') + self.FILENAME_PROG = QtCore.QRegExp(r'".*"') self.LINE_PROG = QtCore.QRegExp(r'line [0-9]*') self.setLineWrapMode(self.NoWrap) self._module_color = QtGui.QColor('blue')
Simplify PyInteractiveConsole file regex and fix bug if exception occur in dist-packages (there was an issue with the previous regex which did not take '-' into account)
diff --git a/lib/merb-core/logger.rb b/lib/merb-core/logger.rb index <HASH>..<HASH> 100644 --- a/lib/merb-core/logger.rb +++ b/lib/merb-core/logger.rb @@ -97,11 +97,13 @@ module Merb # The idea here is that instead of performing an 'if' conditional check # on each logging we do it once when the log object is setup - undef write_method if defined? write_method - if aio - alias :write_method :write_nonblock - else - alias :write_method :write + @log.instance_eval do + undef write_method if defined? write_method + if @aio + alias :write_method :write_nonblock + else + alias :write_method :write + end end Merb.logger = self
Changed alias of write_method to operate on the @log instance.
diff --git a/jax/lax/lax_control_flow.py b/jax/lax/lax_control_flow.py index <HASH>..<HASH> 100644 --- a/jax/lax/lax_control_flow.py +++ b/jax/lax/lax_control_flow.py @@ -621,6 +621,17 @@ def cond(*args, **kwargs): Pred must be a scalar type. + Note that true_fun/false_fun may not need to refer to an `operand` to compute + their result, but one must still be provided to the `cond` call and be + accepted by both the branch functions, e.g.: + + jax.lax.cond( + get_predicate_value(), + lambda _: 23, + lambda _: 42, + operand=None) + + Arguments: pred: Boolean scalar type, indicating which branch function to apply. Collections (list, tuple) are not supported.
Clarify docs on jax.lax.cond. (#<I>)
diff --git a/boblib/composer.php b/boblib/composer.php index <HASH>..<HASH> 100644 --- a/boblib/composer.php +++ b/boblib/composer.php @@ -88,7 +88,7 @@ task('composer.json', array('composer_spec.php'), function($task) { $pkg = include($task->prerequisites[0]); if (!is_array($pkg)) { - printLn('ERROR: composer_spec.php MUST return an array'); + println('Error: composer_spec.php MUST return an array'); exit(1); } @@ -104,7 +104,7 @@ task('composer.json', array('composer_spec.php'), function($task) { $json = json_encode($pkg, $jsonOptions); - printLn('Writing composer.json'); + println('Writing composer.json'); @file_put_contents($task->name, $json); });
Changed printLn -> println
diff --git a/src/com/google/bitcoin/core/BlockChain.java b/src/com/google/bitcoin/core/BlockChain.java index <HASH>..<HASH> 100644 --- a/src/com/google/bitcoin/core/BlockChain.java +++ b/src/com/google/bitcoin/core/BlockChain.java @@ -308,11 +308,11 @@ public class BlockChain { private void sendTransactionsToWallet(StoredBlock block, NewBlockType blockType, HashMap<Wallet, List<Transaction>> newTransactions) throws VerificationException { - for (Wallet wallet : newTransactions.keySet()) { + for (Map.Entry<Wallet, List<Transaction>> entry : newTransactions.entrySet()) { try { - List<Transaction> txns = newTransactions.get(wallet); + List<Transaction> txns = entry.getValue(); for (Transaction tx : txns) { - wallet.receive(tx, block, blockType); + entry.getKey().receive(tx, block, blockType); } } catch (ScriptException e) { // We don't want scripts we don't understand to break the block chain so just note that this tx was
Minor efficiency improvement: use entrySet() instead of keySet()+get(). Clears out a FindBugs warning.
diff --git a/tests/project/settings.py b/tests/project/settings.py index <HASH>..<HASH> 100644 --- a/tests/project/settings.py +++ b/tests/project/settings.py @@ -7,7 +7,26 @@ INSTALLED_APPS = [ 'markitup', ] -TEMPLATE_DIRS = [join(BASE_DIR, 'templates')] +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + join(BASE_DIR, 'templates'), + ], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.debug', + 'django.template.context_processors.i18n', + 'django.template.context_processors.media', + 'django.template.context_processors.static', + 'django.template.context_processors.tz', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] ROOT_URLCONF = 'tests.project.urls'
Use TEMPLATES setting in tests.
diff --git a/src/Composer/Util/Svn.php b/src/Composer/Util/Svn.php index <HASH>..<HASH> 100644 --- a/src/Composer/Util/Svn.php +++ b/src/Composer/Util/Svn.php @@ -43,7 +43,7 @@ class Svn /** * @var bool */ - protected $cacheCredentials = false; + protected $cacheCredentials = true; /** * @param string $url @@ -70,7 +70,7 @@ class Svn $this->credentials['username'] = $this->io->ask("Username: "); $this->credentials['password'] = $this->io->askAndHideAnswer("Password: "); - $this->cacheCredentials = $this->io->askConfirmation("Should Subversion cache these credentials? (yes/no) ", false); + $this->cacheCredentials = $this->io->askConfirmation("Should Subversion cache these credentials? (yes/no) ", true); return $this; }
Cache credentials by default since that's the default svn behavior
diff --git a/src/tuwien/auto/calimero/knxnetip/KNXnetIPTunnel.java b/src/tuwien/auto/calimero/knxnetip/KNXnetIPTunnel.java index <HASH>..<HASH> 100644 --- a/src/tuwien/auto/calimero/knxnetip/KNXnetIPTunnel.java +++ b/src/tuwien/auto/calimero/knxnetip/KNXnetIPTunnel.java @@ -177,7 +177,9 @@ public class KNXnetIPTunnel extends ClientConnection layer = Objects.requireNonNull(knxLayer, "Tunneling Layer"); if (knxLayer == RawLayer) throw new KNXIllegalArgumentException("Raw tunnel to KNX network not supported"); - connect(localEP, serverCtrlEP, new TunnelCRI(knxLayer, tunnelingAddress), useNAT); + final var cri = tunnelingAddress.equals(KNXMediumSettings.BackboneRouter) ? new TunnelCRI(knxLayer) + : new TunnelCRI(knxLayer, tunnelingAddress); + connect(localEP, serverCtrlEP, cri, useNAT); } protected KNXnetIPTunnel(final TunnelingLayer knxLayer, final Connection connection,
Distinguish basic/extended cri
diff --git a/components/lib/fileupload/FileUpload.js b/components/lib/fileupload/FileUpload.js index <HASH>..<HASH> 100644 --- a/components/lib/fileupload/FileUpload.js +++ b/components/lib/fileupload/FileUpload.js @@ -74,7 +74,11 @@ export const FileUpload = React.memo(React.forwardRef((props, ref) => { return; } - let currentFiles = filesState ? [...filesState] : []; + let currentFiles = []; + if (props.multiple) { + currentFiles = filesState ? [...filesState] : []; + } + let selectedFiles = event.dataTransfer ? event.dataTransfer.files : event.target.files; for (let i = 0; i < selectedFiles.length; i++) { let file = selectedFiles[i];
Fix #<I>: FileUpload single mode only allow 1 file (#<I>)
diff --git a/src/Resources/skeleton/security/UserProvider.tpl.php b/src/Resources/skeleton/security/UserProvider.tpl.php index <HASH>..<HASH> 100644 --- a/src/Resources/skeleton/security/UserProvider.tpl.php +++ b/src/Resources/skeleton/security/UserProvider.tpl.php @@ -36,8 +36,8 @@ class <?= $class_name ?> implements UserProviderInterface<?= $password_upgrader { return $this->loadUserByIdentifier($username); } -<?php endif ?> +<?php endif ?> /** * Refreshes the user after being reloaded from the session. *
Update src/Resources/skeleton/security/UserProvider.tpl.php
diff --git a/rules/readfile.go b/rules/readfile.go index <HASH>..<HASH> 100644 --- a/rules/readfile.go +++ b/rules/readfile.go @@ -122,6 +122,7 @@ func NewReadFile(id string, conf gosec.Config) (gosec.Rule, []ast.Node) { rule.clean.Add("path/filepath", "Clean") rule.clean.Add("path/filepath", "Rel") rule.Add("io/ioutil", "ReadFile") + rule.Add("os", "ReadFile") rule.Add("os", "Open") rule.Add("os", "OpenFile") return rule, []ast.Node{(*ast.CallExpr)(nil)} diff --git a/testutils/source.go b/testutils/source.go index <HASH>..<HASH> 100644 --- a/testutils/source.go +++ b/testutils/source.go @@ -1788,6 +1788,22 @@ func main() { package main import ( +"os" +"log" +) + +func main() { + f := os.Getenv("tainted_file") + body, err := os.ReadFile(f) + if err != nil { + log.Printf("Error: %v\n", err) + } + log.Print(body) + +}`}, 1, gosec.NewConfig()}, {[]string{` +package main + +import ( "fmt" "log" "net/http"
feat: add os.ReadFile to G<I> (#<I>) In Go <I> or higher, the `io/ioutil` has been deprecated and the `ioutil.ReadFile` function now calls `os.ReadFile`.
diff --git a/test/marketing.unit.js b/test/marketing.unit.js index <HASH>..<HASH> 100644 --- a/test/marketing.unit.js +++ b/test/marketing.unit.js @@ -1,6 +1,5 @@ 'use strict'; -const errors = require('storj-service-error-types'); const chai = require('chai'); const expect = chai.expect; const chaiDate = require('chai-datetime'); diff --git a/test/referral.unit.js b/test/referral.unit.js index <HASH>..<HASH> 100644 --- a/test/referral.unit.js +++ b/test/referral.unit.js @@ -1,6 +1,5 @@ 'use strict'; -const errors = require('storj-service-error-types'); const chai = require('chai'); const expect = chai.expect; const chaiDate = require('chai-datetime');
Remove error types. Accidentally added and removed on wrong files
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -58,12 +58,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.39'; - const VERSION_ID = 20739; + const VERSION = '2.7.40-DEV'; + const VERSION_ID = 20740; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; - const RELEASE_VERSION = 39; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 40; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '05/2018'; const END_OF_LIFE = '05/2019';
bumped Symfony version to <I>
diff --git a/rxjava-core/src/test/java/rx/ObservableTests.java b/rxjava-core/src/test/java/rx/ObservableTests.java index <HASH>..<HASH> 100644 --- a/rxjava-core/src/test/java/rx/ObservableTests.java +++ b/rxjava-core/src/test/java/rx/ObservableTests.java @@ -1027,4 +1027,29 @@ public class ObservableTests { }); o.subscribe(); } + + @Test + public void testTakeWhileToList() { + int[] nums = {1, 2, 3}; + final AtomicInteger count = new AtomicInteger(); + for(final int n: nums) { + Observable + .from(Boolean.TRUE, Boolean.FALSE) + .takeWhile(new Func1<Boolean, Boolean>() { + @Override + public Boolean call(Boolean value) { + return value; + } + }) + .toList() + .doOnNext(new Action1<List<Boolean>>() { + @Override + public void call(List<Boolean> booleans) { + count.incrementAndGet(); + } + }) + .subscribe(); + } + assertEquals(nums.length, count.get()); + } }
New test case for takeWhile that currently fails
diff --git a/lib/runner.js b/lib/runner.js index <HASH>..<HASH> 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -334,6 +334,8 @@ Runner.prototype.run = function() { pluginPostTestPromises.push(plugins.postTest(false, testInfo)); }); + log.debug('Running with spec files ' + self.config_.specs); + return require(frameworkPath).run(self, self.config_.specs). then(function(testResults) { return q.all(pluginPostTestPromises).then(function(postTestResultList) {
chore(debugging): add info about current spec file list when troubleshooting Running with the `--troubleshoot` flag will now list the spec files for each runner instance.
diff --git a/nfc/dev/__init__.py b/nfc/dev/__init__.py index <HASH>..<HASH> 100644 --- a/nfc/dev/__init__.py +++ b/nfc/dev/__init__.py @@ -34,6 +34,7 @@ usb_device_map = { (0x04cc, 0x0531) : "pn53x_usb", # Philips demo board (0x054c, 0x0193) : "pn53x_usb", # Sony demo board (0x04cc, 0x2533) : "pn53x_usb", # NXP PN533 demo board + (0x04cc, 0x0531) : "pn53x_usb", # SCM SCL3710 (0x04e6, 0x5591) : "pn53x_usb", # SCM SCL3711 (0x04e6, 0x5593) : "pn53x_usb", # SCM SCL3712 (0x054c, 0x02e1) : "rcs956_usb", # Sony RC-S330/360/370
added usb vendor/product id for SCM SCL<I>
diff --git a/Tests/AdminFactoryTest.php b/Tests/AdminFactoryTest.php index <HASH>..<HASH> 100644 --- a/Tests/AdminFactoryTest.php +++ b/Tests/AdminFactoryTest.php @@ -96,7 +96,17 @@ class AdminFactoryTest extends Base ] ]); $admin = $adminFactory->getAdminFromRequest($request); + // test fake admin name + $this->assertExceptionRaised('Exception', function () use ($adminFactory) { + $adminFactory->getAdmin('invalid_test'); + }); + $admin->createEntity(); $this->assertInstanceOf('BlueBear\AdminBundle\Admin\Admin', $admin, 'Admin not found in request'); + $this->assertInstanceOf('BlueBear\AdminBundle\Admin\Admin', $adminFactory->getAdmin('test'), 'Invalid admin'); + $this->assertEquals($admin, $adminFactory->getAdmin('test'), 'Invalid admin'); + $this->assertEquals('test', $admin->getName(), 'Invalid admin name'); + $this->assertEquals('Test\TestBundle\Entity\TestEntity', $admin->getEntityNamespace(), 'Invalid admin namespace'); + $this->assertTrue($admin->getEntity() || count($admin->getEntities()), 'No entities were found'); } protected function getFakeAdminsConfiguration()
Improve AdminFactory tests
diff --git a/MenuItem.php b/MenuItem.php index <HASH>..<HASH> 100644 --- a/MenuItem.php +++ b/MenuItem.php @@ -876,7 +876,7 @@ class MenuItem implements \ArrayAccess, \Countable, \IteratorAggregate { $class[] = 'current'; } - elseif ($this->getIsCurrent($depth)) + elseif ($this->getIsCurrentAncestor($depth)) { $class[] = 'current_ancestor'; } @@ -1160,15 +1160,10 @@ class MenuItem implements \ArrayAccess, \Countable, \IteratorAggregate */ public function getIsCurrent() { - $currentUri = $this->getCurrentUri(); - - if(null === $currentUri) { - return false; - } - - if ($this->isCurrent === null) + if (null === $this->isCurrent) { - $this->isCurrent = ($this->getUri() === $currentUri); + $currentUri = $this->getCurrentUri(); + $this->isCurrent = null !== $currentUri && ($this->getUri() === $currentUri); } return $this->isCurrent;
Fix current item and ancestor item detection
diff --git a/azurerm/resource_arm_storage_account.go b/azurerm/resource_arm_storage_account.go index <HASH>..<HASH> 100644 --- a/azurerm/resource_arm_storage_account.go +++ b/azurerm/resource_arm_storage_account.go @@ -505,6 +505,7 @@ func resourceArmStorageAccountRead(d *schema.ResourceData, meta interface{}) err d.Set("enable_file_encryption", file.Enabled) } } + d.Set("account_encryption_source", string(encryption.KeySource)) } // Computed
Ensuring we set the encryption source
diff --git a/sos/report/plugins/foreman.py b/sos/report/plugins/foreman.py index <HASH>..<HASH> 100644 --- a/sos/report/plugins/foreman.py +++ b/sos/report/plugins/foreman.py @@ -84,6 +84,7 @@ class Foreman(Plugin): "/etc/foreman-proxy/", "/etc/sysconfig/foreman", "/etc/sysconfig/dynflowd", + "/etc/smart_proxy_dynflow_core/settings.yml", "/etc/default/foreman", "/etc/foreman-installer/", "/var/log/foreman/dynflow_executor*log*",
[foreman] collect /etc/smart_proxy_dynflow_core/settings.yml Resolves: #<I>
diff --git a/packages/ember-htmlbars/lib/helpers/-concat.js b/packages/ember-htmlbars/lib/helpers/-concat.js index <HASH>..<HASH> 100644 --- a/packages/ember-htmlbars/lib/helpers/-concat.js +++ b/packages/ember-htmlbars/lib/helpers/-concat.js @@ -1,4 +1,9 @@ /** +@module ember +@submodule ember-templates +*/ + +/** Concatenates input params together. Example: @@ -11,7 +16,7 @@ @public @method concat - @for Ember.HTMLBars + @for Ember.Templates.helpers */ export default function concat(params) { return params.join('');
[DOC release] move concat helper to the right spot
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1827,7 +1827,7 @@ module ActiveRecord builder = Builder::HasAndBelongsToMany.new name, self, options - join_model = builder.through_model + join_model = ActiveSupport::Deprecation.silence { builder.through_model } const_set join_model.name, join_model private_constant join_model.name @@ -1856,7 +1856,7 @@ module ActiveRecord hm_options[k] = options[k] if options.key? k end - has_many name, scope, hm_options, &extension + ActiveSupport::Deprecation.silence { has_many name, scope, hm_options, &extension } _reflections[name.to_s].parent_reflection = habtm_reflection end end
Suppress deprecation message to `has_and_belongs_to_many` only once Passing a class to `has_and_belongs_to_many` show deprecation message three times. It is enough only once.
diff --git a/lib/assets/Asset.js b/lib/assets/Asset.js index <HASH>..<HASH> 100644 --- a/lib/assets/Asset.js +++ b/lib/assets/Asset.js @@ -204,6 +204,9 @@ class Asset extends EventEmitter { commonTargetType !== incomingRelation.targetType && !AssetGraph[commonTargetType].prototype[ 'is' + incomingRelation.targetType + ] && + !AssetGraph[incomingRelation.targetType].prototype[ + 'is' + commonTargetType ] ) { this._warnIncompatibleTypes([
Don't complain that eg. an SVG is "used as both Image and Svg"
diff --git a/currency.go b/currency.go index <HASH>..<HASH> 100644 --- a/currency.go +++ b/currency.go @@ -9,6 +9,7 @@ type Currency struct { Disabled int `json:"disabled"` Frozen int `json:"frozen"` Delisted int `json:"delisted"` + IsGeofenced int `json:"isGeofenced"` } type Currencies struct {
Add IsGeofenced field
diff --git a/app/models/staypuft/deployment/vips.rb b/app/models/staypuft/deployment/vips.rb index <HASH>..<HASH> 100644 --- a/app/models/staypuft/deployment/vips.rb +++ b/app/models/staypuft/deployment/vips.rb @@ -2,7 +2,7 @@ module Staypuft class Deployment::VIPS < Deployment::AbstractParamScope VIP_NAMES = [:ceilometer, :cinder, :db, :glance, :heat, :horizon, :keystone, :loadbalancer, - :nova, :neutron, :qpid, :swift] + :nova, :neutron, :amqp, :swift] COUNT = VIP_NAMES.size def self.param_scope
Rename :quid vip to :amqp vip
diff --git a/tests/integration/store/test_version_store.py b/tests/integration/store/test_version_store.py index <HASH>..<HASH> 100644 --- a/tests/integration/store/test_version_store.py +++ b/tests/integration/store/test_version_store.py @@ -1005,6 +1005,10 @@ def test_write_metadata_followed_by_append(library): library.write_metadata(symbol, metadata={'field_b': 1}) # creates version 2 (only metadata) library.append(symbol, data=mydf_b,metadata={'field_c': 1}) # creates version 3 + # Trigger GC now + library._prune_previous_versions(symbol, 0) + time.sleep(2) + v = library.read(symbol) assert_frame_equal(v.data, mydf_a.append(mydf_b)) assert v.metadata == {'field_c': 1} @@ -1139,6 +1143,10 @@ def test_restore_version_followed_by_append(library): library.restore_version(symbol, as_of=1) # creates version 3 library.append(symbol, data=mydf_c, metadata={'field_c': 3}) # creates version 4 + # Trigger GC now + library._prune_previous_versions(symbol, 0) + time.sleep(2) + v = library.read(symbol) assert_frame_equal(v.data, mydf_a.append(mydf_c)) assert v.metadata == {'field_c': 3}
trigger gc in the tests after the append
diff --git a/console-util/src/main/java/net/morimekta/console/chr/CharUtil.java b/console-util/src/main/java/net/morimekta/console/chr/CharUtil.java index <HASH>..<HASH> 100644 --- a/console-util/src/main/java/net/morimekta/console/chr/CharUtil.java +++ b/console-util/src/main/java/net/morimekta/console/chr/CharUtil.java @@ -485,7 +485,7 @@ public class CharUtil { if ((Character) c == Char.ESC) { tmp.write(Char.ESC); } - tmp.write((Character) c); + tmp.write(new Unicode((Character) c).toString().getBytes(UTF_8)); } else if (c instanceof Integer) { if ((Integer) c == (int) Char.ESC) { tmp.write(Char.ESC); @@ -499,6 +499,14 @@ public class CharUtil { } else { tmp.write(c.toString().getBytes(UTF_8)); } + } else if (c instanceof CharSequence) { + CharStream.stream((CharSequence) c).forEach(ch -> { + try { + tmp.write(ch.toString().getBytes(UTF_8)); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + }); } else { tmp.write(c.toString().getBytes(UTF_8)); }
iValisate char and string input to ensure UTF-8 and control encoding.
diff --git a/src/main/java/com/github/noraui/application/steps/MailSteps.java b/src/main/java/com/github/noraui/application/steps/MailSteps.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/github/noraui/application/steps/MailSteps.java +++ b/src/main/java/com/github/noraui/application/steps/MailSteps.java @@ -106,6 +106,7 @@ public class MailSteps extends Step { Element link = doc.selectFirst(firstCssQuery); try { String response = httpService.get(link.attr("href")); + logger.debug("response is {}.", response); } catch (HttpServiceException e) { logger.error(Messages.format(Messages.getMessage(Messages.FAIL_MESSAGE_MAIL_ACTIVATION), subjectMail), e); new Result.Failure<>("", Messages.format(Messages.getMessage(Messages.FAIL_MESSAGE_MAIL_ACTIVATION), subjectMail), false, Context.getCallBack(Callbacks.RESTART_WEB_DRIVER));
Sonar: add logs on response (mail feature)
diff --git a/lib/timer.js b/lib/timer.js index <HASH>..<HASH> 100644 --- a/lib/timer.js +++ b/lib/timer.js @@ -125,6 +125,11 @@ timers.create(id, options, (err) => { create(id, body, cb) { const payload = body; const transport = this.transports[payload.callback.transport]; + if (!transport) { + const err = new Error(`Unknown transport ${payload.callback.transport}`) + err.code = 'ENOTRANSPORT' + return setImmediate(cb, err) + } if ( this.has( id ) ) { const err = new Error(`Timer with id ${id} already exists` ); err.code = 'EKEYEXISTS';
timer: add error handler for case when a transport isn't defined
diff --git a/ui/EditInlineNodeCommand.js b/ui/EditInlineNodeCommand.js index <HASH>..<HASH> 100644 --- a/ui/EditInlineNodeCommand.js +++ b/ui/EditInlineNodeCommand.js @@ -17,7 +17,7 @@ class EditInlineNodeCommand extends Command { let annos = this._getAnnotationsForSelection(params) if (annos.length === 1 && annos[0].getSelection().equals(sel)) { newState.disabled = false - newState.node = annos[0] + newState.nodeId = annos[0].id } return newState }
Use primitive command state for EditInlineCommand.