diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lang/lt/lang.php b/lang/lt/lang.php index <HASH>..<HASH> 100644 --- a/lang/lt/lang.php +++ b/lang/lt/lang.php @@ -63,6 +63,8 @@ 'amount' => 'Amount', 'author' => 'Author', 'link' => 'Link', + 'is_default' => 'Is default', + 'symbol' => 'Symbol', 'sort_order' => 'Sorting', 'created_at' => 'Created',
New translations lang.php (Lithuanian)
diff --git a/django_cron/__init__.py b/django_cron/__init__.py index <HASH>..<HASH> 100644 --- a/django_cron/__init__.py +++ b/django_cron/__init__.py @@ -113,6 +113,9 @@ class CronJobManager(object): def make_log(self, *messages, **kwargs): cron_log = self.cron_log + cron_job = getattr(self, 'cron_job', self.cron_job_class) + cron_log.code = cron_job.code + cron_log.is_success = kwargs.get('success', True) cron_log.message = self.make_log_msg(*messages) cron_log.ran_at_time = getattr(self, 'user_time', None) @@ -139,8 +142,7 @@ class CronJobManager(object): def __enter__(self): - cron_job = self.cron_job_class - self.cron_log = CronJobLog(code=cron_job.code, start_time=timezone.now()) + self.cron_log = CronJobLog(start_time=timezone.now()) return self
fill the code field in CronJobLog after instantiating the job (not before) to allow jobs to modify their code in runtime
diff --git a/js/jquery.fileupload-fp.js b/js/jquery.fileupload-fp.js index <HASH>..<HASH> 100644 --- a/js/jquery.fileupload-fp.js +++ b/js/jquery.fileupload-fp.js @@ -1,5 +1,5 @@ /* - * jQuery File Upload File Processing Plugin 1.2.1 + * jQuery File Upload File Processing Plugin 1.2.3 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2012, Sebastian Tschan @@ -62,9 +62,13 @@ // fileupload widget (via file input selection, drag & drop or add // API call). See the basic file upload widget for more information: add: function (e, data) { - $(this).fileupload('process', data).done(function () { - data.submit(); - }); + if (data.autoUpload || (data.autoUpload !== false && + ($(this).data('blueimp-fileupload') || + $(this).data('fileupload')).options.autoUpload)) { + $(this).fileupload('process', data).done(function () { + data.submit(); + }); + } } },
Respect the autoUpload setting and process only when submitting.
diff --git a/actstream/views.py b/actstream/views.py index <HASH>..<HASH> 100644 --- a/actstream/views.py +++ b/actstream/views.py @@ -21,7 +21,11 @@ def follow_unfollow(request, content_type_id, object_id, follow=True): } if follow: Follow.objects.get_or_create(**lookup) + if 'next' in request.REQUEST: + return HttpResponseRedirect(request.REQUEST['next']) return type('Created', (HttpResponse,), {'status_code':201})() + if 'next' in request.REQUEST: + return HttpResponseRedirect(request.REQUEST['next']) Follow.objects.get(**lookup).delete() return type('Deleted', (HttpResponse,), {'status_code':204})()
if next in request, redirect instead of sending fancy responses
diff --git a/mycluster/slurm.py b/mycluster/slurm.py index <HASH>..<HASH> 100644 --- a/mycluster/slurm.py +++ b/mycluster/slurm.py @@ -95,23 +95,18 @@ def create_submit(queue_id, **kwargs): num_tasks = 1 if 'num_tasks' in kwargs: num_tasks = kwargs['num_tasks'] + else: + raise ValueError("num_tasks must be specified") tpn = tasks_per_node(queue_id) queue_tpn = tpn if 'tasks_per_node' in kwargs: tpn = min(tpn, kwargs['tasks_per_node']) - nc = node_config(queue_id) - qc = available_tasks(queue_id) - - num_tasks = min(num_tasks, qc['max tasks']) - - num_threads_per_task = nc['max thread'] if 'num_threads_per_task' in kwargs: num_threads_per_task = kwargs['num_threads_per_task'] - num_threads_per_task = min(num_threads_per_task, - int(math.ceil(float(nc['max thread']) - / float(tpn)))) + else: + raise ValueError("num_threads_per_task must be specified") my_name = "myclusterjob" if 'my_name' in kwargs:
Don't silently reduce parameters passed by user
diff --git a/backup/controller/backup_controller.class.php b/backup/controller/backup_controller.class.php index <HASH>..<HASH> 100644 --- a/backup/controller/backup_controller.class.php +++ b/backup/controller/backup_controller.class.php @@ -1,5 +1,4 @@ <?php - // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify @@ -16,7 +15,9 @@ // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** - * @package moodlecore + * Backup controller and related exception classes. + * + * @package core_backup * @subpackage backup-controller * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later @@ -641,7 +642,7 @@ class backup_controller extends base_controller { } } -/* +/** * Exception class used by all the @backup_controller stuff */ class backup_controller_exception extends backup_exception {
MDL-<I> backup: Code style fixes for the file
diff --git a/pages/Login/subscriptions.js b/pages/Login/subscriptions.js index <HASH>..<HASH> 100644 --- a/pages/Login/subscriptions.js +++ b/pages/Login/subscriptions.js @@ -1,7 +1,5 @@ -import errorManager from '@shopgate/pwa-core/classes/ErrorManager'; -import { EINVALIDCREDENTIALS } from '@shopgate/pwa-core/constants/Pipeline'; -import { SHOPGATE_USER_LOGIN_USER } from '@shopgate/pwa-common/constants/Pipelines'; -import { appWillStart$ } from '@shopgate/pwa-common/streams/app'; +import { errorManager, EINVALIDCREDENTIALS, SHOPGATE_USER_LOGIN_USER } from '@shopgate/pwa-core'; +import { appWillStart$ } from '@shopgate/pwa-common/streams'; import { toggleLogin } from 'Components/Navigator/action-creators'; import disableNavigatorSearch from 'Components/Navigator/actions/disableNavigatorSearch'; import enableNavigatorSearch from 'Components/Navigator/actions/enableNavigatorSearch';
PWA-<I> Optimized and cleaned codebase.
diff --git a/test/plugin-apply-test.js b/test/plugin-apply-test.js index <HASH>..<HASH> 100644 --- a/test/plugin-apply-test.js +++ b/test/plugin-apply-test.js @@ -263,7 +263,8 @@ test.cb("emit inline asset", t => { io.read(path.join(OUTPUT_PATH, "inline-asset.html")).then(output => { io.read(sourceFile).then(source => { - t.true(output.includes(source)); + const sourceWithoutNewlines = source.replace(/\r?\n|\r/g, ""); + t.true(output.includes(sourceWithoutNewlines)); t.end(); }); });
Inconsistent webpack version newline output
diff --git a/graylog2-web-interface/webpack.config.js b/graylog2-web-interface/webpack.config.js index <HASH>..<HASH> 100644 --- a/graylog2-web-interface/webpack.config.js +++ b/graylog2-web-interface/webpack.config.js @@ -160,6 +160,10 @@ if (TARGET === 'build') { minimize: true, sourceMap: true, compress: { + // Conditionals compression caused issue #5450 so they should be disabled for now. + // Looking at uglify-js issues, it seems that the latest changes in version 3.4.9 broke conditionals + // compression. For example: https://github.com/mishoo/UglifyJS2/issues/3269 + conditionals: false, warnings: false, }, mangle: {
Fix assets compression on production builds (#<I>) Due to a bug in uglify-js <I>, compressing conditionals during asset minimization is broken, leading to #<I>. This commit disables conditionals compression until we can test it is fixed in a future uglify-js release. There are several reports in the upstream project, one of them is: <URL>
diff --git a/salt/utils/pyobjects.py b/salt/utils/pyobjects.py index <HASH>..<HASH> 100644 --- a/salt/utils/pyobjects.py +++ b/salt/utils/pyobjects.py @@ -71,8 +71,8 @@ class StateRegistry(object): id_, state.full_func )) - else: - attr[id_] = OrderedDict() + else: + attr[id_] = OrderedDict() # if we have requisites in our stack then add them to the state if len(self.requisites) > 0:
Oops. <I>d9ef was wrong. The indent was right the first time. Undoing.
diff --git a/spec/jira/resource/issue_spec.rb b/spec/jira/resource/issue_spec.rb index <HASH>..<HASH> 100644 --- a/spec/jira/resource/issue_spec.rb +++ b/spec/jira/resource/issue_spec.rb @@ -8,10 +8,10 @@ describe JIRA::Resource::Issue do response = mock() response.stub(:body).and_return('{"key":"foo","id":"101"}') JIRA::Resource::Issue.stub(:collection_path).and_return('/jira/rest/api/2/issue') - client.should_receive(:get).with('/jira/rest/api/2/issue/foo') - .and_return(response) - client.should_receive(:get).with('/jira/rest/api/2/issue/101') - .and_return(response) + client.should_receive(:get).with('/jira/rest/api/2/issue/foo'). + and_return(response) + client.should_receive(:get).with('/jira/rest/api/2/issue/101'). + and_return(response) issue_from_id = JIRA::Resource::Issue.find(client,101) issue_from_key = JIRA::Resource::Issue.find(client,'foo')
Periods must be trailing for <I>
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ var dynamicMatch = typeof window !== 'undefined' ? window.matchMedia : null; function Mql(query, values){ var self = this; if(dynamicMatch){ - var mql = dynamicMatch(query); + var mql = window.matchMedia(query); this.matches = mql.matches; this.media = mql.media; // TODO: is there a time it makes sense to remove this listener?
Force call to window.matchMedia to work in IE<I>/IE<I>
diff --git a/Tests/Mock/WhenBuilder.php b/Tests/Mock/WhenBuilder.php index <HASH>..<HASH> 100644 --- a/Tests/Mock/WhenBuilder.php +++ b/Tests/Mock/WhenBuilder.php @@ -37,21 +37,25 @@ class WhenBuilder /** * @param mixed ... + * @return $this */ public function thenThrow($exception) { foreach (func_get_args() as $exception) { $this->mock->_stubbed_calls[] = new CallStub($this->methodCall, Functions::throwException($exception)); } + return $this; } /** * @param mixed ... + * @return $this */ public function thenAnswer() { foreach (func_get_args() as $callback) { $this->mock->_stubbed_calls[] = new CallStub($this->methodCall, $callback); } + return $this; } }
Added chain to mock when (issue #<I>).
diff --git a/lib/core/error.js b/lib/core/error.js index <HASH>..<HASH> 100644 --- a/lib/core/error.js +++ b/lib/core/error.js @@ -55,7 +55,11 @@ class MongoError extends Error { * @returns {boolean} returns true if the error has the provided error label */ hasErrorLabel(label) { - return this[kErrorLabels] && this[kErrorLabels].has(label); + if (this[kErrorLabels] == null) { + return false; + } + + return this[kErrorLabels].has(label); } addErrorLabel(label) {
refactor: explicitly return a boolean for errorLabel presence
diff --git a/course/lib.php b/course/lib.php index <HASH>..<HASH> 100644 --- a/course/lib.php +++ b/course/lib.php @@ -418,7 +418,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per echo "</td>\n"; $fullname = fullname($log, $isteacher); echo "<td class=\"r$row c3\" nowrap=\"nowrap\">\n"; - echo " <a href=\"../user/view.php?id={$log->userid}&amp;course={$log->course}\">$fullname</a>\n"; + echo " <a href=\"$CFG->wwwroot/user/view.php?id={$log->userid}&amp;course={$log->course}\">$fullname</a>\n"; echo "</td>\n"; echo "<td class=\"r$row c4\" nowrap=\"nowrap\">\n"; link_to_popup_window( make_log_url($log->module,$log->url), 'fromloglive',"$log->module $log->action", 400, 600);
Fix for bug <I> from Tim Takemoto
diff --git a/i3pystatus/xkblayout.py b/i3pystatus/xkblayout.py index <HASH>..<HASH> 100644 --- a/i3pystatus/xkblayout.py +++ b/i3pystatus/xkblayout.py @@ -16,6 +16,8 @@ class Xkblayout(IntervalModule): ``layouts`` can be stated with or without variants, e.g.: ``status.register("xkblayout", layouts=["de neo", "de"])`` + Requires xkbgroup (from PyPI) + .. rubric:: Available formatters * `{num}` — current group number
Xkblayout: document PyPI dependency
diff --git a/salt/utils/process.py b/salt/utils/process.py index <HASH>..<HASH> 100644 --- a/salt/utils/process.py +++ b/salt/utils/process.py @@ -806,7 +806,7 @@ def default_signals(*signals): old_signals = {} for signum in signals: try: - old_signals[signum] = signal.getsignal(signum) + saved_signal = signal.getsignal(signum) signal.signal(signum, signal.SIG_DFL) except ValueError as exc: # This happens when a netapi module attempts to run a function @@ -816,6 +816,8 @@ def default_signals(*signals): 'Failed to register signal for signum %d: %s', signum, exc ) + else: + old_signals[signum] = saved_signal # Do whatever is needed with the reset signals yield
Fix <I> error when using wheel_async When `wheel_async` is used, the job completes, but for the same reason we couldn't replace the signal in the first place, we fail to restore it after control is returned to the context manager. This fixes this by only adding the signal data to the `old_signals` dict when we successfully override the signal handling, so that we don't incorrectly attempt to "restore" the signal later.
diff --git a/timer.go b/timer.go index <HASH>..<HASH> 100644 --- a/timer.go +++ b/timer.go @@ -24,14 +24,14 @@ func (t *Timer) Finish() { // Writes a log message with extra data or the elapsed time shown. Pass nil or // use Finish() if there is no extra data. -func (t *Timer) Log(data Data) { +func (t *Timer) Log(data Data) error { if data == nil { data = make(Data) } data["at"] = "finish" data["elapsed"] = t.durationUnit(t.Elapsed()) - t.context.Log(data) + return t.context.Log(data) } func (t *Timer) Elapsed() time.Duration {
Timer is a Logger too
diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index <HASH>..<HASH> 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -615,7 +615,7 @@ class Client(Methods, BaseClient): if phone is not None: self.peers_by_phone[phone] = input_peer - if isinstance(entity, types.Chat): + if isinstance(entity, (types.Chat, types.ChatForbidden)): chat_id = entity.id peer_id = -chat_id @@ -625,7 +625,7 @@ class Client(Methods, BaseClient): self.peers_by_id[peer_id] = input_peer - if isinstance(entity, types.Channel): + if isinstance(entity, (types.Channel, types.ChannelForbidden)): channel_id = entity.id peer_id = int("-100" + str(channel_id)) @@ -634,7 +634,7 @@ class Client(Methods, BaseClient): if access_hash is None: continue - username = entity.username + username = getattr(entity, "username", None) input_peer = types.InputPeerChannel( channel_id=channel_id,
Fetch ChatForbidden and ChannelForbidden peers This fixes unwanted PEER_ID_INVALID errors in cases where a user or a bot was kicked/banned from a group, supergroup or channel
diff --git a/iktomi/web/url_templates.py b/iktomi/web/url_templates.py index <HASH>..<HASH> 100644 --- a/iktomi/web/url_templates.py +++ b/iktomi/web/url_templates.py @@ -66,7 +66,7 @@ def construct_re(url_template, match_whole_str=False, converters=None, variable = groups['variable'] builder_params.append((variable, conv_object)) url_params[variable] = conv_object - result += '(?P<%s>[.a-zA-Z0-9_%%:-]+)' % variable + result += '(?P<%s>[.a-zA-Z0-9:@&+$,_%%-]+)' % variable continue raise ValueError('Incorrect url template "%s"' % url_template) if match_whole_str:
all unquoted by webob symbols #<I> all unquoted by webob symbols are included in URL template regex #<I>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from os import path from distutils.version import LooseVersion from setuptools import find_packages, setup -VERSION = '1.25.3' +VERSION = '1.25.4' # Import README.md into long_description pwd = path.abspath(path.dirname(__file__))
Bump package version to <I>
diff --git a/modules/system/classes/ErrorHandler.php b/modules/system/classes/ErrorHandler.php index <HASH>..<HASH> 100644 --- a/modules/system/classes/ErrorHandler.php +++ b/modules/system/classes/ErrorHandler.php @@ -49,7 +49,7 @@ class ErrorHandler extends ErrorHandlerBase // Route to the CMS error page. $controller = new Controller($theme); - return $controller->run('/error'); + return $controller->run('/error')->getContent(); } /**
Fixed custom error pages outputting headers If we don't have this method called, then the controller returns an object. From then on, [Symfony converts this object in to a string](<URL>` returns a string and everything works as expected.
diff --git a/svchost/auth/credentials.go b/svchost/auth/credentials.go index <HASH>..<HASH> 100644 --- a/svchost/auth/credentials.go +++ b/svchost/auth/credentials.go @@ -16,6 +16,10 @@ import ( // there is no good reason to do so. type Credentials []CredentialsSource +// NoCredentials is an empty CredentialsSource that always returns nil +// when asked for credentials. +var NoCredentials CredentialsSource = Credentials{} + // A CredentialsSource is an object that may be able to provide credentials // for a given host. //
svchost/auth: expose a "NoCredentials" credentials source For situations where no credentials are needed but where a working CredentialsSource is still required, this variable provides a convenient way to get a fully-functional-but-empty credentials source.
diff --git a/lib/array.js b/lib/array.js index <HASH>..<HASH> 100644 --- a/lib/array.js +++ b/lib/array.js @@ -1 +1,16 @@ +//Delete an element of the array +module.exports.delete = function(array, item) +{ + //Get the index of the item + var index = array.indexOf(item); + //Check the index + if(index !== -1) + { + //Remove the item from the array + array.splice(index, 1); + } + + //Return the array + return array; +};
lib/array.js: added method to remove an element of an array
diff --git a/rllib/models/torch/complex_input_net.py b/rllib/models/torch/complex_input_net.py index <HASH>..<HASH> 100644 --- a/rllib/models/torch/complex_input_net.py +++ b/rllib/models/torch/complex_input_net.py @@ -115,6 +115,7 @@ class ComplexInputNetwork(TorchModelV2, nn.Module): name="one_hot_{}".format(i), ) concat_size += self.one_hot[i].num_outputs + self.add_module("one_hot_{}".format(i), self.one_hot[i]) # Everything else (1D Box). else: size = int(np.product(component.shape)) @@ -133,6 +134,7 @@ class ComplexInputNetwork(TorchModelV2, nn.Module): ) self.flatten_dims[i] = size concat_size += self.flatten[i].num_outputs + self.add_module("flatten_{}".format(i), self.flatten[i]) # Optional post-concat FC-stack. post_fc_stack_config = {
[RLlib] Fix complex torch one-hot and flattened layers not being added to module list. (#<I>)
diff --git a/tensor2tensor/rl/trainer_model_based_test.py b/tensor2tensor/rl/trainer_model_based_test.py index <HASH>..<HASH> 100644 --- a/tensor2tensor/rl/trainer_model_based_test.py +++ b/tensor2tensor/rl/trainer_model_based_test.py @@ -17,6 +17,9 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function +import os +import shutil + from tensor2tensor.rl import trainer_model_based import tensorflow as tf @@ -26,10 +29,19 @@ FLAGS = tf.flags.FLAGS class ModelRLExperimentTest(tf.test.TestCase): - def test_basic(self): + def setUp(self): + super(ModelRLExperimentTest, self).setUp() FLAGS.output_dir = tf.test.get_temp_dir() - FLAGS.loop_hparams_set = "rl_modelrl_tiny" + shutil.rmtree(FLAGS.output_dir) + os.mkdir(FLAGS.output_dir) FLAGS.schedule = "train" # skip evaluation for world model training + + def test_basic(self): + FLAGS.loop_hparams_set = "rl_modelrl_tiny" + trainer_model_based.main(None) + + def test_ae(self): + FLAGS.loop_hparams_set = "rl_modelrl_ae_tiny" trainer_model_based.main(None)
Add a test for the AE experiment
diff --git a/tests/test_hdate.py b/tests/test_hdate.py index <HASH>..<HASH> 100644 --- a/tests/test_hdate.py +++ b/tests/test_hdate.py @@ -73,3 +73,14 @@ class TestHDate(object): @pytest.mark.parametrize('execution_number', range(10)) def test_hdate_get_size_of_hebrew_years(self, execution_number, random_hdate): assert random_hdate._h_size_of_year == hj._get_size_of_hebrew_year(random_hdate._h_year) + + def test_rosh_hashana_day_of_week(self, random_hdate): + for year, info in HEBREW_YEARS_INFO.items(): + random_hdate.hdate_set_hdate(random_hdate._h_day, random_hdate._h_month, year) + assert random_hdate._h_new_year_weekday == info[0] + + def test_pesach_day_of_week(self, random_hdate): + for year, info in HEBREW_YEARS_INFO.items(): + random_hdate.hdate_set_hdate(15, 7, year) + assert random_hdate._weekday == info[2] + assert random_hdate.get_holyday() == 15
Test for first day of rosh hashana and pesach
diff --git a/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java b/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java index <HASH>..<HASH> 100644 --- a/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java +++ b/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java @@ -1042,7 +1042,7 @@ public class CmsDefaultXmlContentHandler implements I_CmsXmlContentHandler { public boolean isSearchable(I_CmsXmlContentValue value) { // check for name configured in the annotations - Boolean anno = m_searchSettings.get(value.getName()); + Boolean anno = m_searchSettings.get(CmsXmlUtils.removeXpath(value.getPath())); // if no annotation has been found, use default for value return (anno == null) ? value.isSearchable() : anno.booleanValue(); }
Improved XSD search settings for considering XPaths instead names.
diff --git a/jenetics/src/main/java/io/jenetics/AbstractAlterer.java b/jenetics/src/main/java/io/jenetics/AbstractAlterer.java index <HASH>..<HASH> 100644 --- a/jenetics/src/main/java/io/jenetics/AbstractAlterer.java +++ b/jenetics/src/main/java/io/jenetics/AbstractAlterer.java @@ -26,7 +26,7 @@ import io.jenetics.internal.util.Requires; * * @author <a href="mailto:franz.wilhelmstoetter@gmail.com">Franz Wilhelmstötter</a> * @since 1.0 - * @version 3.0 + * @version 5.2 */ public abstract class AbstractAlterer< G extends Gene<?, G>,
Set getter as deprecated.
diff --git a/docs/icons.stories.js b/docs/icons.stories.js index <HASH>..<HASH> 100644 --- a/docs/icons.stories.js +++ b/docs/icons.stories.js @@ -11,6 +11,7 @@ stories.add('icon', () => { 'icon twitter': 'icon twitter', 'icon facebook': 'icon facebook', 'icon github': 'icon github', + 'icon google': 'icon google', 'icon youtube': 'icon youtube', 'icon close': 'icon close', 'octocat animate': 'octocat animate',
feat: add google icon to storybook's icon story
diff --git a/openquake/engine/engine.py b/openquake/engine/engine.py index <HASH>..<HASH> 100644 --- a/openquake/engine/engine.py +++ b/openquake/engine/engine.py @@ -55,8 +55,7 @@ UNABLE_TO_DEL_HC_FMT = 'Unable to delete hazard calculation: %s' UNABLE_TO_DEL_RC_FMT = 'Unable to delete risk calculation: %s' LOG_FORMAT = ('[%(asctime)s %(calc_domain)s #%(calc_id)s %(hostname)s ' - '%(levelname)s %(processName)s/%(process)s %(name)s] ' - '%(message)s') + '%(levelname)s %(processName)s/%(process)s] %(message)s') TERMINATE = str2bool(config.get('celery', 'terminate_workers_on_revoke')) @@ -94,11 +93,6 @@ def _update_log_record(self, record): record.calc_domain = self.calc_domain if not hasattr(record, 'calc_id'): record.calc_id = self.calc.id - logger_name_prefix = 'oq.%s.%s' % (record.calc_domain, record.calc_id) - if record.name.startswith(logger_name_prefix): - record.name = record.name[len(logger_name_prefix):].lstrip('.') - if not record.name: - record.name = 'root' class LogStreamHandler(logging.StreamHandler):
Simplified the LOG_FORMAT by removing the name Former-commit-id: 2bafce0e<I>e<I>cedad5d9a<I>f<I>c8a3a<I>
diff --git a/lib/cuke_slicer/version.rb b/lib/cuke_slicer/version.rb index <HASH>..<HASH> 100644 --- a/lib/cuke_slicer/version.rb +++ b/lib/cuke_slicer/version.rb @@ -1,4 +1,4 @@ module CukeSlicer # The current version for the gem. - VERSION = "2.0.3" + VERSION = "2.0.2" end
Restoring version number Reducing the version number back to the last released version because no significant code changes have actually occurred.
diff --git a/scripts/build/babel.js b/scripts/build/babel.js index <HASH>..<HASH> 100644 --- a/scripts/build/babel.js +++ b/scripts/build/babel.js @@ -8,7 +8,7 @@ const babelConfig = require("./babel.config") const Packaging = require("./packaging") const { asyncMkDirP } = require("./utils") -const ignorePatterns = [/\.test.js$/] +const ignorePatterns = [/\.test.js$/, /\/fixtures\//] function walk(base, relativePath = "") { let files = []
wip: ignore fixtures in babel
diff --git a/gorequest.go b/gorequest.go index <HASH>..<HASH> 100644 --- a/gorequest.go +++ b/gorequest.go @@ -906,7 +906,7 @@ func changeMapToURLValues(data map[string]interface{}) url.Values { // For example: // // resp, body, errs := gorequest.New().Get("http://www.google.com").End() -// if (errs != nil) { +// if errs != nil { // fmt.Println(errs) // } // fmt.Println(resp, body)
Fix typo in doc Parenthesis are not required around the condition in a if-statement in Go
diff --git a/client/pages/datasets.js b/client/pages/datasets.js index <HASH>..<HASH> 100644 --- a/client/pages/datasets.js +++ b/client/pages/datasets.js @@ -102,7 +102,13 @@ module.exports = PageView.extend({ }); reader.onload = function (ev) { - csv.parse(ev.target.result, function (err, data) { + var options = { + columns: true, // treat first line as header with column names + relax_column_count: false, // accept malformed lines + comment: '' // Treat all the characters after this one as a comment. + }; + + csv.parse(ev.target.result, options, function (err, data) { if (err) { console.warn(err.message); app.message({
Treat first line in CSV file as header with column names Closes #<I>
diff --git a/gameserver/php/Neuron/GameServer/Mappers/PlayerMapper.php b/gameserver/php/Neuron/GameServer/Mappers/PlayerMapper.php index <HASH>..<HASH> 100644 --- a/gameserver/php/Neuron/GameServer/Mappers/PlayerMapper.php +++ b/gameserver/php/Neuron/GameServer/Mappers/PlayerMapper.php @@ -380,7 +380,7 @@ class Neuron_GameServer_Mappers_PlayerMapper } else { - $total = count ($total) > 0 ? $total[0]['total'] : 1; + $rank = self::countAll (); } $rank = $rank + 1;
Fixing tiny error in ranking of PlayerMapper.
diff --git a/migrate.go b/migrate.go index <HASH>..<HASH> 100644 --- a/migrate.go +++ b/migrate.go @@ -33,7 +33,9 @@ type MigrationSet struct { // SchemaName schema that the migration table be referenced. SchemaName string // IgnoreUnknown skips the check to see if there is a migration - // ran in the database that is not in MigrationSource + // ran in the database that is not in MigrationSource. + // + // This should be used sparingly as it is removing a saftey check. IgnoreUnknown bool } @@ -106,6 +108,8 @@ func SetSchema(name string) { // SetIgnoreUnknown sets the flag that skips database check to see if there is a // migration in the database that is not in migration source. +// +// This should be used sparingly as it is removing a saftey check. func SetIgnoreUnknown(v bool) { migSet.IgnoreUnknown = v }
Add a comment to iterate that IgnoreUnknown should be used sparingly
diff --git a/tuf/utils/role_sort.go b/tuf/utils/role_sort.go index <HASH>..<HASH> 100644 --- a/tuf/utils/role_sort.go +++ b/tuf/utils/role_sort.go @@ -19,6 +19,9 @@ func (r RoleList) Len() int { func (r RoleList) Less(i, j int) bool { segsI := strings.Split(r[i], "/") segsJ := strings.Split(r[j], "/") + if len(segsI) == len(segsJ) { + return strings.Compare(r[i], r[j]) == -1 + } return len(segsI) < len(segsJ) }
make roles sort alphabetically when equivalent number of segments
diff --git a/language/phpmailer.lang-sk.php b/language/phpmailer.lang-sk.php index <HASH>..<HASH> 100644 --- a/language/phpmailer.lang-sk.php +++ b/language/phpmailer.lang-sk.php @@ -3,6 +3,7 @@ * Slovak PHPMailer language file: refer to English translation for definitive list * @package PHPMailer * @author Michal Tinka <michaltinka@gmail.com> + * @author Peter Orlický <pcmanik91@gmail.com> */ $PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.'; @@ -23,4 +24,4 @@ $PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.'; $PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: '; $PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: '; -//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; +$PHPMAILER_LANG['extension_missing'] = 'Chýba rozšírenie: ';
Update Slovak translation (#<I>)
diff --git a/webdriver/test/com/googlecode/jmeter/plugins/webdriver/config/RemoteDriverConfigTest.java b/webdriver/test/com/googlecode/jmeter/plugins/webdriver/config/RemoteDriverConfigTest.java index <HASH>..<HASH> 100644 --- a/webdriver/test/com/googlecode/jmeter/plugins/webdriver/config/RemoteDriverConfigTest.java +++ b/webdriver/test/com/googlecode/jmeter/plugins/webdriver/config/RemoteDriverConfigTest.java @@ -60,6 +60,8 @@ public class RemoteDriverConfigTest { assertThat(config.getCapability(), is(RemoteCapability.FIREFOX)); config.setCapability(RemoteCapability.INTERNET_EXPLORER); assertThat(config.getCapability(), is(RemoteCapability.INTERNET_EXPLORER)); + config.setCapability(RemoteCapability.PHANTOMJS); + assertThat(config.getCapability(), is(RemoteCapability.PHANTOMJS)); } @Test
Add tests to PhantomJS (GhostDriver) capability Test PhantomJS (GhostDriver) capability
diff --git a/src/language/HTMLInstrumentation.js b/src/language/HTMLInstrumentation.js index <HASH>..<HASH> 100644 --- a/src/language/HTMLInstrumentation.js +++ b/src/language/HTMLInstrumentation.js @@ -884,6 +884,10 @@ define(function (require, exports, module) { textAfterID; /** + * We initially put new edit objects into the `newEdits` array so that we + * can fix them up with proper positioning information. This function is + * responsible for doing that fixup. + * * The `beforeID` that appears in many edits tells the browser to make the * change before the element with the given ID. In other words, an * elementInsert with a `beforeID` of 32 would result in something like @@ -899,7 +903,7 @@ define(function (require, exports, module) { * * @param {int} beforeID ID to set on the pending edits */ - var addBeforeID = function (beforeID) { + var finalizeNewEdits = function (beforeID) { newEdits.forEach(function (edit) { // elementDeletes don't need any positioning information if (edit.type !== "elementDelete") { @@ -1182,7 +1186,7 @@ define(function (require, exports, module) { } else { // Since this element hasn't moved, it is a suitable "beforeID" // for the edits we've logged. - addBeforeID(oldChild.tagID); + finalizeNewEdits(oldChild.tagID); currentIndex++; oldIndex++; }
Renamed addBeforeID to finalizeNewEdits
diff --git a/src/ol/tilequeue.js b/src/ol/tilequeue.js index <HASH>..<HASH> 100644 --- a/src/ol/tilequeue.js +++ b/src/ol/tilequeue.js @@ -105,11 +105,12 @@ ol.TileQueue.prototype.loadMoreTiles = function() { */ ol.TileQueue.prototype.reprioritize = function() { if (!this.queue_.isEmpty()) { - var queue = this.queue_; - this.queue_ = new goog.structs.PriorityQueue(); + var values = /** @type {Array.<Array>} */ this.queue_.getValues(); + this.queue_.clear(); this.queuedTileKeys_ = {}; - while (!queue.isEmpty()) { - this.enqueue.apply(this, /** @type {Array} */ (queue.remove())); + var i; + for (i = 0; i < values.length; ++i) { + this.enqueue.apply(this, values[i]); } } };
Improved reprioritization
diff --git a/p2p/host/peerstore/pstoremem/peerstore.go b/p2p/host/peerstore/pstoremem/peerstore.go index <HASH>..<HASH> 100644 --- a/p2p/host/peerstore/pstoremem/peerstore.go +++ b/p2p/host/peerstore/pstoremem/peerstore.go @@ -11,20 +11,20 @@ import ( type pstoremem struct { peerstore.Metrics - memoryKeyBook - memoryAddrBook - memoryProtoBook - memoryPeerMetadata + *memoryKeyBook + *memoryAddrBook + *memoryProtoBook + *memoryPeerMetadata } // NewPeerstore creates an in-memory threadsafe collection of peers. func NewPeerstore() *pstoremem { return &pstoremem{ Metrics: pstore.NewMetrics(), - memoryKeyBook: *NewKeyBook(), - memoryAddrBook: *NewAddrBook(), - memoryProtoBook: *NewProtoBook(), - memoryPeerMetadata: *NewPeerMetadata(), + memoryKeyBook: NewKeyBook(), + memoryAddrBook: NewAddrBook(), + memoryProtoBook: NewProtoBook(), + memoryPeerMetadata: NewPeerMetadata(), } }
fix: make close work again Reference pstoremem components by pointer to: 1. Avoid copying locks around on construction. 2. Avoid copying these around when calling `weakClose`. 3. Ensures that they all implement the `io.Closer` interface (it's implemented on the pointer, not the value). Technically, we could have just taken a reference when calling `weakClose`, but this is cleaner.
diff --git a/dropwizard-core/src/main/java/com/yammer/dropwizard/config/Environment.java b/dropwizard-core/src/main/java/com/yammer/dropwizard/config/Environment.java index <HASH>..<HASH> 100644 --- a/dropwizard-core/src/main/java/com/yammer/dropwizard/config/Environment.java +++ b/dropwizard-core/src/main/java/com/yammer/dropwizard/config/Environment.java @@ -309,8 +309,7 @@ public class Environment extends AbstractLifeCycle { * @param value the value of the Jersey property * @see ResourceConfig */ - public void setJerseyProperty(String name, - @Nullable Object value) { + public void setJerseyProperty(String name, @Nullable Object value) { config.getProperties().put(checkNotNull(name), value); } @@ -535,7 +534,7 @@ public class Environment extends AbstractLifeCycle { } public void setJerseyServletContainer(ServletContainer jerseyServletContainer) { - this.jerseyServletContainer = jerseyServletContainer; + this.jerseyServletContainer = checkNotNull(jerseyServletContainer); } public String getName() {
Enforce the existence of a replacement Jersey container. Fixes #<I>.
diff --git a/lib/Widget/Resource/i18n/zh-CN/validator.php b/lib/Widget/Resource/i18n/zh-CN/validator.php index <HASH>..<HASH> 100644 --- a/lib/Widget/Resource/i18n/zh-CN/validator.php +++ b/lib/Widget/Resource/i18n/zh-CN/validator.php @@ -167,6 +167,9 @@ return array( '%name% must be valid phone number' => '%name%必须是有效的电话号码', '%name% must not be phone number' => '%name%不能是电话号码', + '%name% must be valid Chinese plate number' => '%name%必须是正确的车牌格式', + '%name% must not be valid Chinese plate number' => '%name%不能是正确的车牌格式', + // postcode '%name% must be six length of digit' => '%name%必须是6位长度的数字', '%name% must not be postcode' => '%name%必须是6位长度的数字',
added zh-CN messages for plate number validator
diff --git a/lib/vagrant-vbguest/installers/linux.rb b/lib/vagrant-vbguest/installers/linux.rb index <HASH>..<HASH> 100644 --- a/lib/vagrant-vbguest/installers/linux.rb +++ b/lib/vagrant-vbguest/installers/linux.rb @@ -78,7 +78,7 @@ module VagrantVbguest opts = { :sudo => true }.merge(opts || {}) - communicate.test('lsmod | grep vboxguest && test -e /lib/modules/`uname -r`/misc/vboxsf.ko', opts, &block) + communicate.test('grep -qE "^vboxguest\s.+\s\([^\s]*O[^\s]*\)$" /proc/modules && test -e /lib/modules/`uname -r`/misc/vboxsf.ko', opts, &block) end # This overrides {VagrantVbguest::Installers::Base#guest_version}
Better detection of "running" guest additions Avoid detecting the guest additions as running when the in-kernel module is loaded and the additions have just been built.
diff --git a/lib/svg/__init__.py b/lib/svg/__init__.py index <HASH>..<HASH> 100644 --- a/lib/svg/__init__.py +++ b/lib/svg/__init__.py @@ -420,7 +420,7 @@ def parse_transform(e, path): from nodebox.graphics import Transform t = Transform() if mode == "matrix": - t._set_matrix(v) + t.set_matrix(v) elif mode == "translate": t.translate(*v) path = t.transformBezierPath(path) diff --git a/shoebot/data/transforms.py b/shoebot/data/transforms.py index <HASH>..<HASH> 100644 --- a/shoebot/data/transforms.py +++ b/shoebot/data/transforms.py @@ -31,6 +31,9 @@ class Transform: ''' def __init__(self, transform=None): self.stack = [] + self.set_matrix(transform) + + def set_matrix(self, transform=None): if transform is None: pass elif isinstance(transform, Transform):
Use a set_matrix method in Transforms Originally meant to play nice with the SVG lib, but it's better to have it as a dedicated method instead of only in __init__
diff --git a/admin/cli/upgrade.php b/admin/cli/upgrade.php index <HASH>..<HASH> 100644 --- a/admin/cli/upgrade.php +++ b/admin/cli/upgrade.php @@ -49,13 +49,21 @@ list($options, $unrecognized) = cli_get_params( array( 'non-interactive' => false, 'allow-unstable' => false, - 'help' => false + 'help' => false, + 'lang' => 'en' ), array( 'h' => 'help' ) ); +global $SESSION; +if ($options['lang']) { + $SESSION->lang = $options['lang']; +} else { + $SESSION->lang = 'en'; +} + $interactive = empty($options['non-interactive']); if ($unrecognized) { @@ -74,6 +82,7 @@ Options: --non-interactive No interactive questions or confirmations --allow-unstable Upgrade even if the version is not marked as stable yet, required in non-interactive mode. +--lang=CODE Set preferred language for CLI output, during upgrade process (default:en). -h, --help Print out this help Example:
MDL-<I> upgrade: Option to display CLI upgrade messages in English
diff --git a/wooey/backend/utils.py b/wooey/backend/utils.py index <HASH>..<HASH> 100644 --- a/wooey/backend/utils.py +++ b/wooey/backend/utils.py @@ -248,7 +248,7 @@ def add_wooey_script(script_version=None, script_path=None, group=None, script_n checksum=checksum, script__script_name=script_name ).order_by('script_version', 'script_iteration').last() - if existing_version is not None: + if existing_version is not None and (script_version is not None and existing_version != script_version): return { 'valid': True, 'errors': None,
Add in a check if the existing version is the script currently being added
diff --git a/ford/__init__.py b/ford/__init__.py index <HASH>..<HASH> 100644 --- a/ford/__init__.py +++ b/ford/__init__.py @@ -48,7 +48,7 @@ __appname__ = "FORD" __author__ = "Chris MacMackin" __credits__ = ["Balint Aradi", "Iain Barrass", "Izaak Beekman", "Jérémie Burgalat", "David Dickinson", - "Gavin Huttley", "Harald Klimach", "Ibarrass-qmul", + "Gavin Huttley", "Harald Klimach", "Nick R. Papior", "Marco Restelli", "Schildkroete23", "Stephen J. Turnbull", "Jacob Williams", "Stefano Zhagi"] __license__ = "GPLv3"
"Ibarrass-qmul" is "Iain Barrass"
diff --git a/lib/rack/gc_tracer.rb b/lib/rack/gc_tracer.rb index <HASH>..<HASH> 100644 --- a/lib/rack/gc_tracer.rb +++ b/lib/rack/gc_tracer.rb @@ -6,10 +6,10 @@ require 'gc_tracer' module Rack class GCTracerMiddleware - def initialize app, view_page_path: nil, filename: nil, **kw + def initialize app, view_page_path: nil, filename: nil, logging_filename: nil, **kw @app = app @view_page_path = view_page_path - @logging_filename = filename || GC::Tracer.env_logging_filename + @logging_filename = filename || logging_filename || GC::Tracer.env_logging_filename if @logging_filename && view_page_path @view_page_pattern = /\A#{view_page_path}/
add logging_filename for backword compatibility
diff --git a/src/module/Max7219.js b/src/module/Max7219.js index <HASH>..<HASH> 100644 --- a/src/module/Max7219.js +++ b/src/module/Max7219.js @@ -62,5 +62,38 @@ this._board.send([0xf0, 4, 8, 2, 0xf7]); }; + proto.animate = function(data, times, duration, callback) { + var p = 0; + + if (typeof arguments[arguments.length - 1] === 'function') { + callback = arguments[arguments.length - 1]; + } else { + callback = function() {}; + } + + var run = function() { + this.on(data[p++ % data.length]); + this._timer = setTimeout(run, times); + }.bind(this); + + var stop = function() { + clearTimeout(this._timer); + callback(); + }.bind(this); + + if (times && times > 0) { + run(); + } + + if (duration && duration > 0) { + this._timerDuration = setTimeout(stop, duration); + } + }; + + proto.animateStop = function() { + clearTimeout(this._timer); + clearTimeout(this._timerDuration); + }; + scope.module.Max7219 = Max7219; })); \ No newline at end of file
Fixed bug: animate of max<I>.
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index <HASH>..<HASH> 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.13.1 +current_version = 1.13.2 commit = False tag = False diff --git a/microcosm_flask/fields/enum_field.py b/microcosm_flask/fields/enum_field.py index <HASH>..<HASH> 100644 --- a/microcosm_flask/fields/enum_field.py +++ b/microcosm_flask/fields/enum_field.py @@ -4,6 +4,8 @@ Enum-valued field. Supports both by name (preferred) and by value (discouraged) encoding. """ +from enum import Enum + from marshmallow.fields import Field @@ -28,7 +30,7 @@ class EnumField(Field): def _serialize(self, value, attr, obj): if value is None: return value - elif isinstance(value, str): + elif isinstance(value, str) and not isinstance(value, Enum): return value elif self.by_value: return value.value diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import find_packages, setup project = "microcosm-flask" -version = "1.13.1" +version = "1.13.2" setup( name=project,
Handle enums that are both string and enum.
diff --git a/aws/data_source_aws_outposts_outposts.go b/aws/data_source_aws_outposts_outposts.go index <HASH>..<HASH> 100644 --- a/aws/data_source_aws_outposts_outposts.go +++ b/aws/data_source_aws_outposts_outposts.go @@ -38,6 +38,11 @@ func dataSourceAwsOutpostsOutposts() *schema.Resource { Optional: true, Computed: true, }, + "owner_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, }, } } @@ -71,6 +76,10 @@ func dataSourceAwsOutpostsOutpostsRead(d *schema.ResourceData, meta interface{}) continue } + if v, ok := d.GetOk("owner_id"); ok && v.(string) != aws.StringValue(outpost.OwnerId) { + continue + } + arns = append(arns, aws.StringValue(outpost.OutpostArn)) ids = append(ids, aws.StringValue(outpost.OutpostId)) }
Added owner_id argument in outposts data source.
diff --git a/bin/traceur.js b/bin/traceur.js index <HASH>..<HASH> 100644 --- a/bin/traceur.js +++ b/bin/traceur.js @@ -5963,9 +5963,6 @@ var $__src_syntax_Parser_js =(function() { this.eatPossibleImplicitSemiColon_(); return new ExportMappingList(this.getTreeLocation_(start), mappings); }, - peekExportMapping_: function() { - return this.peek_(TokenType.OPEN_CURLY) || this.peekId_(); - }, parseExportMapping_: function(load) { var start = this.getTreeStartLocation_(); var specifierSet, expression; diff --git a/src/syntax/Parser.js b/src/syntax/Parser.js index <HASH>..<HASH> 100644 --- a/src/syntax/Parser.js +++ b/src/syntax/Parser.js @@ -474,10 +474,6 @@ export class Parser { return new ExportMappingList(this.getTreeLocation_(start), mappings); } - peekExportMapping_() { - return this.peek_(TokenType.OPEN_CURLY) || this.peekId_(); - } - parseExportMapping_(load) { // ExportMapping ::= // Identifier ("from" ModuleExpression(load))?
Remove dead code (peekExportMapping_) from parser
diff --git a/src/ConnectionInterface.php b/src/ConnectionInterface.php index <HASH>..<HASH> 100644 --- a/src/ConnectionInterface.php +++ b/src/ConnectionInterface.php @@ -21,4 +21,11 @@ interface ConnectionInterface * @return ConnectionInterface */ public static function getDb($dbname = null); + + /** + * Creates API command. + * @param array $config + * @return mixed response + */ + public function createCommand(array $config = []); }
+ createCommand to ConnectionInterface
diff --git a/spec/models/article_spec.rb b/spec/models/article_spec.rb index <HASH>..<HASH> 100644 --- a/spec/models/article_spec.rb +++ b/spec/models/article_spec.rb @@ -171,6 +171,11 @@ describe Article, type: :model do allow(mock_pinger).to receive(:send_pingback_or_trackback) article.save! + + 10.times do + break if Thread.list.count == 1 + sleep 0.1 + end end it 'lets a Ping::Pinger object send pingback to the external URLs' do @@ -178,13 +183,6 @@ describe Article, type: :model do with(article.permalink_url, Ping) expect(mock_pinger).to have_received :send_pingback_or_trackback end - - after do - 10.times do - break if Thread.list.count == 1 - sleep 0.1 - end - end end end
Ensure threads are done before checking calls
diff --git a/lib/OpenLayers/Format/SLD/v1.js b/lib/OpenLayers/Format/SLD/v1.js index <HASH>..<HASH> 100644 --- a/lib/OpenLayers/Format/SLD/v1.js +++ b/lib/OpenLayers/Format/SLD/v1.js @@ -667,8 +667,16 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.XML, { }, "PolygonSymbolizer": function(symbolizer) { var node = this.createElementNSPlus("PolygonSymbolizer"); - this.writeNode(node, "Fill", symbolizer); - this.writeNode(node, "Stroke", symbolizer); + if(symbolizer.fillColor != undefined || + symbolizer.fillOpacity != undefined) { + this.writeNode(node, "Fill", symbolizer); + } + if(symbolizer.strokeWidth != undefined || + symbolizer.strokeColor != undefined || + symbolizer.strokeOpacity != undefined || + symbolizer.strokeDashstyle != undefined) { + this.writeNode(node, "Stroke", symbolizer); + } return node; }, "Fill": function(symbolizer) {
Create Fill and Stroke nodes only for PolygonSymbolizers that actually have fill and stroke symbolizer properties. r=tschaub (closes #<I>) git-svn-id: <URL>
diff --git a/tofu/geom/_core.py b/tofu/geom/_core.py index <HASH>..<HASH> 100644 --- a/tofu/geom/_core.py +++ b/tofu/geom/_core.py @@ -2025,7 +2025,7 @@ class CoilPF(StructOut): def set_current(self, current=None): """ Set the current circulating on the coil (A) """ - C0 = I is None + C0 = current is None C1 = type(current) in [int, float, np.int64, np.float64] C2 = type(current) in [list, tuple, np.ndarray] msg = "Arg current must be None, a float or an 1D np.ndarray !"
[quick-bf] I variable name was left un-refactored
diff --git a/src/Xavrsl/Cas/Sso.php b/src/Xavrsl/Cas/Sso.php index <HASH>..<HASH> 100644 --- a/src/Xavrsl/Cas/Sso.php +++ b/src/Xavrsl/Cas/Sso.php @@ -85,11 +85,7 @@ class Sso { private function configureSslValidation() { // set SSL validation for the CAS server - if ($this->config['cas_validation'] == 'self') - { - phpCAS::setCasServerCert($this->config['cas_cert']); - } - else if ($this->config['cas_validation'] == 'ca') + if ($this->config['cas_validation'] == 'ca' || $this->config['cas_validation'] == 'self') { phpCAS::setCasServerCACert($this->config['cas_cert']); } diff --git a/src/config/cas.php b/src/config/cas.php index <HASH>..<HASH> 100644 --- a/src/config/cas.php +++ b/src/config/cas.php @@ -55,8 +55,8 @@ return [ | CAS Validation |-------------------------------------------------------------------------- | - | CAS server SSL validation: 'self' for self-signed certificate, 'ca' for - | certificate from a CA, empty for no SSL validation. + | CAS server SSL validation: 'ca' for certificate from a CA or self-signed + | certificate, empty for no SSL validation. | */
Remove self signed cert option the "bogus setCasServerCert() function" has been removed from phpCAS. Use setCasServerCACert() for self-signed certs. configureSslValidation() still checks for 'self' as_validation option and uses setCasServerCACert() for backwards compatibility.
diff --git a/src/ResourceBase.js b/src/ResourceBase.js index <HASH>..<HASH> 100644 --- a/src/ResourceBase.js +++ b/src/ResourceBase.js @@ -25,6 +25,7 @@ class ResourceBase { // Setup options const opts = Object.assign(options, {}) // clone options opts.from = await this.contractService.currentAccount() + opts.gas = options.gas || 50000 // Default gas // Get contract and run trasaction const contractDefinition = this.contractDefinition const contract = await contractDefinition.at(address) diff --git a/src/resources/purchases.js b/src/resources/purchases.js index <HASH>..<HASH> 100644 --- a/src/resources/purchases.js +++ b/src/resources/purchases.js @@ -40,7 +40,7 @@ class Purchases extends ResourceBase{ } async sellerConfirmShipped(address) { - return await this.contractFn(address, "sellerConfirmShipped") + return await this.contractFn(address, "sellerConfirmShipped",[], {gas: 80000}) } async buyerConfirmReceipt(address) {
Metamask's gas estimates/defaults are sometimes too low. Metamask and web3's default gas sent values change from release to release. What worked before can be too low later. We'll set a default gas amount of <I> for origin.js transactions. (This is about <I> cents in at current gas prices.) As before, and individual origin.js API contract transactions can set their own gas to be sent.
diff --git a/lib/capistrano/configuration/server.rb b/lib/capistrano/configuration/server.rb index <HASH>..<HASH> 100644 --- a/lib/capistrano/configuration/server.rb +++ b/lib/capistrano/configuration/server.rb @@ -27,14 +27,15 @@ module Capistrano def select?(options) options.each do |k,v| callable = v.respond_to?(:call) ? v: ->(server){server.fetch(v)} - result = case k - when :filter, :select - callable.call(self) - when :exclude - !callable.call(self) - else - self.fetch(k) == v - end + result = \ + case k + when :filter, :select + callable.call(self) + when :exclude + !callable.call(self) + else + self.fetch(k) == v + end return false unless result end return true diff --git a/spec/lib/capistrano/application_spec.rb b/spec/lib/capistrano/application_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/capistrano/application_spec.rb +++ b/spec/lib/capistrano/application_spec.rb @@ -51,7 +51,7 @@ describe Capistrano::Application do def command_line(*options) options.each { |opt| ARGV << opt } - def subject.exit(*_args) + subject.define_singleton_method(:exit) do |*_args| throw(:system_exit, :exit) end subject.run
Fix lint warnings identified by RuboCop
diff --git a/lib/active_record/connection_adapters/sqlserver_adapter.rb b/lib/active_record/connection_adapters/sqlserver_adapter.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -97,7 +97,11 @@ module ActiveRecord end def table_klass - @table_klass ||= table_name.classify.constantize rescue nil + @table_klass ||= begin + table_name.classify.constantize + rescue StandardError, NameError, LoadError + nil + end (@table_klass && @table_klass < ActiveRecord::Base) ? @table_klass : nil end
Column reflection on table name rescues LoadError and a few others.
diff --git a/src/Mcfedr/QueueManagerBundle/Command/RunnerCommand.php b/src/Mcfedr/QueueManagerBundle/Command/RunnerCommand.php index <HASH>..<HASH> 100644 --- a/src/Mcfedr/QueueManagerBundle/Command/RunnerCommand.php +++ b/src/Mcfedr/QueueManagerBundle/Command/RunnerCommand.php @@ -150,6 +150,8 @@ abstract class RunnerCommand extends Command implements ContainerAwareInterface if (isset($handle)) { pcntl_signal_dispatch(); } + + gc_collect_cycles(); } while ($running && ($ignoreLimit || $limit > 0)); }
add call to gc_collect Seems like this shouldn’t be needed. But it helps keep the amount of memory used down. Php doesn’t seem to be very clever about calling this itself
diff --git a/test/main.js b/test/main.js index <HASH>..<HASH> 100755 --- a/test/main.js +++ b/test/main.js @@ -160,7 +160,7 @@ describe('gulp-twig', function () { }, }); - var fakeFile = new gutil.File({ + var fakeFile = new Vinyl({ base: 'test/', cwd: 'test/', path: path.join(__dirname, '/templates/file.twig'),
Fixed tests for #<I> (#<I>)
diff --git a/pyairtable/__init__.py b/pyairtable/__init__.py index <HASH>..<HASH> 100644 --- a/pyairtable/__init__.py +++ b/pyairtable/__init__.py @@ -1,3 +1,3 @@ -__version__ = "1.0.1" +__version__ = "1.1.0" from .api import Api, Base, Table # noqa
Publish Version: <I>
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js index <HASH>..<HASH> 100644 --- a/lib/determine-basal/determine-basal.js +++ b/lib/determine-basal/determine-basal.js @@ -477,7 +477,9 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ minPredBG = Math.min(minPredBG, maxCOBPredBG); } // set snoozeBG to minPredBG if it's higher - snoozeBG = round(Math.max(snoozeBG,minPredBG)); + if (minPredBG < 400) { + snoozeBG = round(Math.max(snoozeBG,minPredBG)); + } rT.snoozeBG = snoozeBG; //console.error(minPredBG, minIOBPredBG, minUAMPredBG, minCOBPredBG, maxCOBPredBG, snoozeBG);
don't set snoozeBG if minPredBG >= <I>
diff --git a/tests/inc/TestCase.php b/tests/inc/TestCase.php index <HASH>..<HASH> 100644 --- a/tests/inc/TestCase.php +++ b/tests/inc/TestCase.php @@ -44,7 +44,7 @@ class TestCase extends Tester\TestCase $configurator = new Configurator(); if (!Helper::isRunByRunner()) { - $configurator->enableDebugger(__DIR__ . '/log'); + $configurator->enableDebugger(__DIR__ . '/../log'); } $hashData = json_encode($dbConfig);
tests: fix log dir when simply run with debugger
diff --git a/lib/closure_tree/support_attributes.rb b/lib/closure_tree/support_attributes.rb index <HASH>..<HASH> 100644 --- a/lib/closure_tree/support_attributes.rb +++ b/lib/closure_tree/support_attributes.rb @@ -1,12 +1,11 @@ require 'forwardable' module ClosureTree module SupportAttributes - extend Forwardable def_delegators :model_class, :connection, :transaction, :table_name, :base_class, :inheritance_column, :column_names def advisory_lock_name - "ClosureTree::#{base_class.name}" + Digest::SHA1.hexdigest("ClosureTree::#{base_class.name}")[0..32] end def quoted_table_name
use first <I> chars from Digest::SHA1 of class
diff --git a/lib/torrent.js b/lib/torrent.js index <HASH>..<HASH> 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -362,7 +362,10 @@ Torrent.prototype.destroy = function (cb) { clearInterval(self._rechokeIntervalId) self._rechokeIntervalId = null } - + + self.files.forEach(function (file) { + if (file._blobURL) window.URL.revokeObjectURL(file._blobURL) + }) if (self._torrentFileURL) window.URL.revokeObjectURL(self._torrentFileURL) var tasks = []
fixed #<I> blobURL cleanup Couldn't find tests to go along with the changes
diff --git a/lib/prerender_rails.rb b/lib/prerender_rails.rb index <HASH>..<HASH> 100644 --- a/lib/prerender_rails.rb +++ b/lib/prerender_rails.rb @@ -2,7 +2,7 @@ module Rack class Prerender require 'net/http' - DISALLOW_PHANTOMJS_HEADERS = %w( + DISALLOWED_PHANTOMJS_HEADERS = %w( cache-control content-length content-type @@ -154,7 +154,7 @@ module Rack # Pass through only applicable prerendered_response.each do |name, val| - next if DISALLOW_PHANTOMJS_HEADERS.include? name + next if DISALLOWED_PHANTOMJS_HEADERS.include? name Rails.logger.debug "Prerender response header: #{name} #{val}" response[name] = val end
Better naming for phantomjs filtered headers constant.
diff --git a/src/main/java/org/jongo/Insert.java b/src/main/java/org/jongo/Insert.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jongo/Insert.java +++ b/src/main/java/org/jongo/Insert.java @@ -80,9 +80,7 @@ class Insert { private DBObject convertToDBObject(Object pojo, Object id) { BsonDocument document = marshallDocument(pojo); - DBObject dbo = new AlreadyCheckedDBObject(document.toByteArray(), id); - dbo.put("_id", id); - return dbo; + return new AlreadyCheckedDBObject(document.toByteArray(), id); } private BsonDocument marshallDocument(Object pojo) {
No longer put _id into DBObject during insert
diff --git a/gulpfile.babel.js b/gulpfile.babel.js index <HASH>..<HASH> 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -41,6 +41,7 @@ const bs = browserSync.create(), exclude: [ './node_modules/process-es6/browser.js', './node_modules/rollup-plugin-node-globals/src/global.js', + './node_modules/symbol-observable/es/index.js' ] }), babel(),
ignore symbol-observable in rollup, throws import / export failure
diff --git a/index.js b/index.js index <HASH>..<HASH> 100755 --- a/index.js +++ b/index.js @@ -152,6 +152,11 @@ player.use(localfile); player.use(youtube); player.use(transcode); +player.use(function(ctx, next) { + if (!ctx.options.type) ctx.options.type = 'video/mp4'; + next(); +}); + if (!opts.path) { player.attach(opts, ctrl); } else {
always use 'video/mp4' as mime-type if nothing else was specified
diff --git a/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/annotations/SipAnnotationProcessor.java b/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/annotations/SipAnnotationProcessor.java index <HASH>..<HASH> 100644 --- a/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/annotations/SipAnnotationProcessor.java +++ b/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/annotations/SipAnnotationProcessor.java @@ -65,8 +65,10 @@ public class SipAnnotationProcessor extends DefaultAnnotationProcessor { protected boolean lookupResourceInServletContext(Object instance, Field field, String annotationName) { String typeName = field.getType().getCanonicalName(); + if(annotationName == null || annotationName.equals("")) annotationName = typeName; Object objectToInject = sipContext.getServletContext().getAttribute(typeName); - if(objectToInject != null && field.getType().isAssignableFrom(objectToInject.getClass())) { + if(objectToInject != null && + field.getType().isAssignableFrom(objectToInject.getClass())) { boolean accessibility = false; accessibility = field.isAccessible(); field.setAccessible(true);
Geeralized lookup - any matching name found in the servlet context would be injected. Date: <I>-<I>-<I> <I>:<I>:<I> git-svn-id: <URL>
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,6 +19,7 @@ github_sponsors_url = f'{github_url}/sponsors' extensions = [ 'sphinx.ext.extlinks', # allows to create custom roles easily + 'sphinx.ext.intersphinx', # allows interlinking external docs sites 'jaraco.packaging.sphinx', 'rst.linker', ] @@ -155,3 +156,10 @@ nitpicky = True # Ref: https://github.com/python-attrs/attrs/pull/571/files\ # #diff-85987f48f1258d9ee486e3191495582dR82 default_role = 'any' + + +# Allow linking objects on other Sphinx sites seamlessly: +intersphinx_mapping = { + 'python': ('https://docs.python.org/3', None), + 'python2': ('https://docs.python.org/2', None), +}
Enable intersphinx to link against CPython docs
diff --git a/km3pipe/io/hdf5.py b/km3pipe/io/hdf5.py index <HASH>..<HASH> 100644 --- a/km3pipe/io/hdf5.py +++ b/km3pipe/io/hdf5.py @@ -339,7 +339,7 @@ class HDF5Sink(Module): if arr.dtype != tab.dtype: try: - arr = Table(arr, tab.dtype) + arr = Table(arr.astype(tab.dtype)) except ValueError: self.log.critical( "Cannot write a table to '%s' since its dtype is "
Try to change dtypes on the fly
diff --git a/packages/mip/src/components/mip-fixed.js b/packages/mip/src/components/mip-fixed.js index <HASH>..<HASH> 100644 --- a/packages/mip/src/components/mip-fixed.js +++ b/packages/mip/src/components/mip-fixed.js @@ -10,6 +10,12 @@ class MipFixed extends CustomElement { const viewer = window.MIP.viewer const platform = window.MIP.util.platform + // Hack: mip1 站点强制重写 mip-layout-container display,导致无法隐藏 loading + // 针对 mip-fixed 先把 mip-layout-container 去掉,这个不会对现有样式造成影响 + // TODO: 1. 考虑针对 mip-fixed 统一不使用 layout 处理 2. 推动下游去掉这个 class 的重写 + // 站点 http://mip.cntrades.com/15995352952/sell/itemid-170607633.html + this.element.classList.remove('mip-layout-container') + if (this.element.getAttribute('mipdata-fixedidx')) { return }
fix: hide loading in mip1 site (#<I>)
diff --git a/spec/runner.rb b/spec/runner.rb index <HASH>..<HASH> 100755 --- a/spec/runner.rb +++ b/spec/runner.rb @@ -4,19 +4,25 @@ require 'rest_client' require 'json' # setup tunnel +retries = 30 begin + `rm -f BrowserStackLocal.zip BrowserStackLocal` `curl https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip > BrowserStackLocal.zip` `unzip BrowserStackLocal.zip` `chmod a+x BrowserStackLocal` - tunnel = IO.popen './BrowserStackTunnel --key $BS_AUTHKEY --local-proxy-port 9292 --local-identifier $TRAVIS_JOB_ID' + tunnel = IO.popen './BrowserStackLocal --key $BS_AUTHKEY --only localhost,9292,0 --local-identifier $TRAVIS_JOB_ID' loop do break if tunnel.gets.start_with? 'You can now access' end rescue => e - puts "Error while using a BrowserStackTunnel: #{e.inspect}" - retry + puts "Error while using a BrowserStackLocal: #{e.inspect}" + sleep 5 + retries -= 1 + retry if retries > 0 + puts "No retries left" + exit end # configure based on environment variables
Try replacing BrowserStackTunnel again
diff --git a/xapian_backend.py b/xapian_backend.py index <HASH>..<HASH> 100644 --- a/xapian_backend.py +++ b/xapian_backend.py @@ -195,8 +195,7 @@ class SearchBackend(BaseSearchBackend): database = self._open_database(readwrite=True) if not models: query = xapian.Query('') # Empty query matches all - enquire = xapian.Enquire(database) - enquire.set_query(query) + enquire = self._get_enquire(database, query) for match in enquire.get_mset(0, DEFAULT_MAX_RESULTS): database.delete_document(match.get_docid()) else:
Changed clear to use private _get_enquire method
diff --git a/src/mappers/waterfall-svg/index.js b/src/mappers/waterfall-svg/index.js index <HASH>..<HASH> 100644 --- a/src/mappers/waterfall-svg/index.js +++ b/src/mappers/waterfall-svg/index.js @@ -171,7 +171,7 @@ function customiseSvgSettings (settings, resources) { barPadding: settings.padding / 2, barHeight: settings.barHeight, padding: settings.padding, - resources: resources.map(mapSvgResource.bind(null, settings) + resources: resources.map(mapSvgResource.bind(null, settings)) }; }
Add missing parenthesis to function call.
diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/BadImport.java b/core/src/main/java/com/google/errorprone/bugpatterns/BadImport.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/BadImport.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/BadImport.java @@ -70,7 +70,8 @@ public class BadImport extends BugChecker implements ImportTreeMatcher { "Entry", "Enum", "Type", - "Key"); + "Key", + "Id"); private static final ImmutableSet<String> BAD_STATIC_IDENTIFIERS = ImmutableSet.of( "builder",
Add "Id" to list of excluded import names for nested classes. ------------- Created by MOE: <URL>
diff --git a/modal.go b/modal.go index <HASH>..<HASH> 100644 --- a/modal.go +++ b/modal.go @@ -126,6 +126,12 @@ func (m *Modal) ClearButtons() *Modal { return m } +// SetFocus shifts the focus to the button with the given index. +func (m *Modal) SetFocus(index int) *Modal { + m.form.SetFocus(index) + return m +} + // Focus is called when this primitive receives focus. func (m *Modal) Focus(delegate func(p Primitive)) { delegate(m.form) diff --git a/textview.go b/textview.go index <HASH>..<HASH> 100644 --- a/textview.go +++ b/textview.go @@ -298,8 +298,9 @@ func (t *TextView) SetRegions(regions bool) *TextView { // SetChangedFunc sets a handler function which is called when the text of the // text view has changed. This is useful when text is written to this io.Writer -// in a separate goroutine. This does not automatically cause the screen to be -// refreshed so you may want to use the "changed" handler to redraw the screen. +// in a separate goroutine. Doing so does not automatically cause the screen to +// be refreshed so you may want to use the "changed" handler to redraw the +// screen. // // Note that to avoid race conditions or deadlocks, there are a few rules you // should follow:
Added SetFocus() to Modal, focuses on the provided button. Resolves #<I>
diff --git a/src/serialization/sb3.js b/src/serialization/sb3.js index <HASH>..<HASH> 100644 --- a/src/serialization/sb3.js +++ b/src/serialization/sb3.js @@ -21,7 +21,7 @@ const loadSound = require('../import/load-sound.js'); const serialize = function (runtime) { // Fetch targets const obj = Object.create(null); - obj.targets = runtime.targets; + obj.targets = runtime.targets.filter(target => target.isOriginal); // Assemble metadata const meta = Object.create(null);
Don't serialize clones when saving
diff --git a/cmd/converger/main_test.go b/cmd/converger/main_test.go index <HASH>..<HASH> 100644 --- a/cmd/converger/main_test.go +++ b/cmd/converger/main_test.go @@ -105,8 +105,9 @@ var _ = Describe("Converger", func() { } bbsArgs = bbsrunner.Args{ - Address: fmt.Sprintf("127.0.0.1:%d", 13000+GinkgoParallelNode()), - EtcdCluster: etcdCluster, + Address: fmt.Sprintf("127.0.0.1:%d", 13000+GinkgoParallelNode()), + AuctioneerAddress: "some-address", + EtcdCluster: etcdCluster, } })
Add auctioneer address to BBS start command [#<I>]
diff --git a/Classes/Validation/Validator/ClassExistsValidator.php b/Classes/Validation/Validator/ClassExistsValidator.php index <HASH>..<HASH> 100644 --- a/Classes/Validation/Validator/ClassExistsValidator.php +++ b/Classes/Validation/Validator/ClassExistsValidator.php @@ -14,10 +14,9 @@ namespace Romm\ConfigurationObject\Validation\Validator; use Romm\ConfigurationObject\Core\Core; -use TYPO3\CMS\Core\SingletonInterface; use TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator; -class ClassExistsValidator extends AbstractValidator implements SingletonInterface +class ClassExistsValidator extends AbstractValidator { /**
[BUGFIX] Remove `SingletonInterface` from validator A class using arguments in constructor can't be a singleton.
diff --git a/src/Phinx/Db/Adapter/AdapterWrapper.php b/src/Phinx/Db/Adapter/AdapterWrapper.php index <HASH>..<HASH> 100644 --- a/src/Phinx/Db/Adapter/AdapterWrapper.php +++ b/src/Phinx/Db/Adapter/AdapterWrapper.php @@ -536,4 +536,12 @@ abstract class AdapterWrapper implements AdapterInterface, WrapperInterface { return $this->getAdapter()->castToBool($value); } + + /** + * {@inheritdoc} + */ + public function getConnection() + { + return $this->getAdapter()->getConnection(); + } }
Missing function in AdapterWrapper (#<I>) * Missing function in AdapterWrapper * Missing function in AdapterWrapper
diff --git a/packages/text/src/Text.js b/packages/text/src/Text.js index <HASH>..<HASH> 100644 --- a/packages/text/src/Text.js +++ b/packages/text/src/Text.js @@ -476,6 +476,13 @@ export class Text extends Sprite // ['#FF0000', '#00FF00', '#0000FF'] over 2 lines would create stops at 0.125, 0.25, 0.375, 0.625, 0.75, 0.875 totalIterations = (fill.length + 1) * lines.length; currentIteration = 0; + + // There's potential for floating point precision issues at the seams between gradient repeats. + // The loop below generates the stops in order, so track the last generated one to prevent + // floating point precision from making us go the teeniest bit backwards, resulting in + // the first and last colors getting swapped. + let lastIterationStop = 0; + for (let i = 0; i < lines.length; i++) { currentIteration += 1; @@ -489,8 +496,14 @@ export class Text extends Sprite { stop = currentIteration / totalIterations; } - gradient.addColorStop(stop, fill[j]); + + // Prevent color stop generation going backwards from floating point imprecision + let clampedStop = Math.max(lastIterationStop, stop); + + clampedStop = Math.min(clampedStop, 1); // Cap at 1 as well for safety's sake to avoid a possible throw. + gradient.addColorStop(clampedStop, fill[j]); currentIteration++; + lastIterationStop = clampedStop; } } }
Fix floating point imprecision could break vertical text gradient generation (#<I>)
diff --git a/pandas/core/groupby.py b/pandas/core/groupby.py index <HASH>..<HASH> 100644 --- a/pandas/core/groupby.py +++ b/pandas/core/groupby.py @@ -198,7 +198,7 @@ class GroupBy(object): for name, raveled in name_list: factor = Factor.fromarray(raveled) levels.append(factor.levels) - labels.append(factor.labels) + labels.append(factor.labels[mask]) index = MultiIndex(levels=levels, labels=labels) return DataFrame(output, index=index)
BUG: need to mask out aggregated levels
diff --git a/Collection.php b/Collection.php index <HASH>..<HASH> 100644 --- a/Collection.php +++ b/Collection.php @@ -251,7 +251,14 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator */ public function offsetSet($key, $value) { - $this->items[$key] = $value; + if(is_null($key)) + { + $this->items[] = $value; + } + else + { + $this->items[$key] = $value; + } } /**
Allow incrementing offsets in a collection.
diff --git a/context_test.go b/context_test.go index <HASH>..<HASH> 100644 --- a/context_test.go +++ b/context_test.go @@ -384,12 +384,21 @@ func TestContextSetCookie(t *testing.T) { assert.Equal(t, c.Writer.Header().Get("Set-Cookie"), "user=gin; Path=/; Domain=localhost; Max-Age=1; HttpOnly; Secure") } +func TestContextSetCookiePathEmpty(t *testing.T) { + c, _ := CreateTestContext(httptest.NewRecorder()) + c.SetCookie("user", "gin", 1, "", "localhost", true, true) + assert.Equal(t, c.Writer.Header().Get("Set-Cookie"), "user=gin; Path=/; Domain=localhost; Max-Age=1; HttpOnly; Secure") +} + func TestContextGetCookie(t *testing.T) { c, _ := CreateTestContext(httptest.NewRecorder()) c.Request, _ = http.NewRequest("GET", "/get", nil) c.Request.Header.Set("Cookie", "user=gin") cookie, _ := c.Cookie("user") assert.Equal(t, cookie, "gin") + + _, err := c.Cookie("nokey") + assert.Error(t, err) } func TestContextBodyAllowedForStatus(t *testing.T) {
Improve cookie tests code coverage (#<I>)
diff --git a/addon/spaniel-engines/ember-spaniel-engine.js b/addon/spaniel-engines/ember-spaniel-engine.js index <HASH>..<HASH> 100644 --- a/addon/spaniel-engines/ember-spaniel-engine.js +++ b/addon/spaniel-engines/ember-spaniel-engine.js @@ -1,5 +1,5 @@ import Ember from 'ember'; -const rAF = (typeof window === 'object') && typeof window.requestAnimationFrame === 'function' ? window.requestAnimationFrame : () => {}; +const rAF = (typeof window === 'object') && typeof window.requestAnimationFrame === 'function' ? window.requestAnimationFrame : (callback) => callback(); export default { reads: [],
Execute work even if rAF doesn't exist Fixes memory leak <URL>
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -11,7 +11,13 @@ module.exports = function (grunt) { } }, concat: { - banner: "Some information", + options: { + stripBanners: { + 'block': true, + 'line': true + }, + banner: '/*\n<%= pkg.name %> <%= pkg.version %> - <%= pkg.description %> \n(C) 2013 - <%= pkg.author %> \nLicense: <%= pkg.license %> \nSource: <%= pkg.url %> \nDate Compiled: <%= grunt.template.today("yyyy-mm-dd") %> \n*/\n' + }, dist: { src: ['src/provider.js', 'src/directive.js', 'src/module.js'], dest: 'ngProgress.js'
Strip banners from src and place new banner
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -20,7 +20,7 @@ def next_available_tcp_port $current_tcp_port += 1 begin - sock = Timeout.timeout(0.1) { TCPSocket.new("localhost", $current_tcp_port) } + sock = Timeout.timeout(1) { TCPSocket.new("localhost", $current_tcp_port) } rescue Errno::ECONNREFUSED break $current_tcp_port end
specs: Increase sanity timeout on port connect test It actually failed in practice on JRuby: <URL>
diff --git a/core/control/Director.php b/core/control/Director.php index <HASH>..<HASH> 100755 --- a/core/control/Director.php +++ b/core/control/Director.php @@ -329,10 +329,6 @@ class Director { * @deprecated 2.4 Use {@link Director::get_current_page()}. */ static function currentPage() { - user_error ( - 'Director::currentPage() is deprecated, please use Director::get_current_page()', E_USER_NOTICE - ); - return self::get_current_page(); }
MINOR: Director::currentPage() is deprecated but shouldn't throw a notice-level error until the next major release. (from r<I>) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9
diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -218,7 +218,6 @@ class Finder implements \IteratorAggregate, \Countable * * $finder->notContains('Lorem ipsum') * $finder->notContains('/Lorem ipsum/i') - * * @param string $pattern A pattern (string or regexp) *
fix CS into Finder fix CS into Finder
diff --git a/src/Composer/Command/RemoveCommand.php b/src/Composer/Command/RemoveCommand.php index <HASH>..<HASH> 100644 --- a/src/Composer/Command/RemoveCommand.php +++ b/src/Composer/Command/RemoveCommand.php @@ -75,7 +75,7 @@ EOT } elseif (isset($composer[$altType][$package])) { $this->getIO()->writeError('<warning>'.$package.' could not be found in '.$type.' but it is present in '.$altType.'</warning>'); if ($this->getIO()->isInteractive()) { - if ($this->getIO()->askConfirmation('Do you want to remove it from '.$altType.' [<comment>yes</comment>]?', true)) { + if ($this->getIO()->askConfirmation('Do you want to remove it from '.$altType.' [<comment>yes</comment>]? ', true)) { $json->removeLink($altType, $package); } }
Space after ? (so it doesnt glue answer to ?)
diff --git a/spec/webrat/core/configuration_spec.rb b/spec/webrat/core/configuration_spec.rb index <HASH>..<HASH> 100755 --- a/spec/webrat/core/configuration_spec.rb +++ b/spec/webrat/core/configuration_spec.rb @@ -25,13 +25,23 @@ describe Webrat::Configuration do config.should open_error_files end + it "should have selenium setting defaults" do + config = Webrat::Configuration.new + config.selenium_environment.should == :selenium + config.selenium_port.should == 3001 + end + it "should be configurable with a block" do Webrat.configure do |config| config.open_error_files = false + config.selenium_environment = :test + config.selenium_port = 4000 end config = Webrat.configuration config.should_not open_error_files + config.selenium_environment.should == :test + config.selenium_port.should == 4000 end [:rails,
adding specs for the selenium environment/port settings
diff --git a/pyspectral/utils.py b/pyspectral/utils.py index <HASH>..<HASH> 100644 --- a/pyspectral/utils.py +++ b/pyspectral/utils.py @@ -123,9 +123,10 @@ INSTRUMENTS = {'NOAA-19': 'avhrr/3', 'Feng-Yun 3D': 'mersi-2' } -HTTP_PYSPECTRAL_RSR = "https://zenodo.org/record/2617441/files/pyspectral_rsr_data.tgz" +HTTP_PYSPECTRAL_RSR = "https://zenodo.org/record/2653487/files/pyspectral_rsr_data.tgz" RSR_DATA_VERSION_FILENAME = "PYSPECTRAL_RSR_VERSION" -RSR_DATA_VERSION = "v1.0.5" +RSR_DATA_VERSION = "v1.0.6" + ATM_CORRECTION_LUT_VERSION = {} ATM_CORRECTION_LUT_VERSION['antarctic_aerosol'] = {'version': 'v1.0.1',
Point to the new dataset on zenodo with updated MetImage rsr
diff --git a/salt/modules/aliases.py b/salt/modules/aliases.py index <HASH>..<HASH> 100644 --- a/salt/modules/aliases.py +++ b/salt/modules/aliases.py @@ -17,6 +17,8 @@ def __get_aliases_filename(): ''' if 'aliases.file' in __opts__: return __opts__['aliases.file'] + elif 'aliases.file' in __pillar__: + return __pillar__['aliases.file'] else: return '/etc/aliases'
Allow aliases file to be defined in pillar