diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/dpl/provider/heroku/git.rb b/lib/dpl/provider/heroku/git.rb index <HASH>..<HASH> 100644 --- a/lib/dpl/provider/heroku/git.rb +++ b/lib/dpl/provider/heroku/git.rb @@ -2,14 +2,23 @@ module DPL class Provider module Heroku class Git < Generic + require 'netrc' + def git_url - "https://#{option(:api_key)}@git.heroku.com/#{option(:app)}.git" + "https://git.heroku.com/#{option(:app)}.git" end def push_app + write_netrc git_remote = options[:git] || git_url context.shell "git push #{git_remote} HEAD:refs/heads/master -f" end + + def write_netrc + n = Netrc.read + n['git.heroku.com'] = [user, option(:api_key)] + n.save + end end end end
heroku http git: write token to netrc, so it wont get printed to the logs accidentially
diff --git a/generators/generator-constants.js b/generators/generator-constants.js index <HASH>..<HASH> 100644 --- a/generators/generator-constants.js +++ b/generators/generator-constants.js @@ -60,7 +60,7 @@ const DOCKER_CASSANDRA = 'cassandra:3.11.11'; const DOCKER_MSSQL = 'mcr.microsoft.com/mssql/server:2019-CU13-ubuntu-20.04'; const DOCKER_NEO4J = 'neo4j:4.3.7'; const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:4.2021.06'; -const DOCKER_MEMCACHED = 'memcached:1.6.10-alpine'; +const DOCKER_MEMCACHED = 'memcached:1.6.12-alpine'; const DOCKER_REDIS = 'redis:6.2.5'; const DOCKER_KEYCLOAK = 'jboss/keycloak:15.0.2'; // The version should match the attribute 'keycloakVersion' from /docker-compose/templates/realm-config/jhipster-realm.json.ejs and /server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs const DOCKER_ELASTICSEARCH = 'docker.elastic.co/elasticsearch/elasticsearch:7.13.3'; // The version should be coherent with the one from spring-data-elasticsearch project
Update memcached docker image version to <I>-alpine
diff --git a/lib/puppet/provider/service/systemd.rb b/lib/puppet/provider/service/systemd.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/provider/service/systemd.rb +++ b/lib/puppet/provider/service/systemd.rb @@ -5,7 +5,14 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do commands :systemctl => "systemctl" - confine :exists => "/run/systemd/system" + if Facter.value(:osfamily).downcase == 'debian' + # With multiple init systems on Debian, it is possible to have + # pieces of systemd around (e.g. systemctl) but not really be + # using systemd. We do not do this on other platforms as it can + # cause issues when running in a chroot without /run mounted + # (PUP-5577) + confine :exists => "/run/systemd/system" + end defaultfor :osfamily => [:archlinux] defaultfor :osfamily => :redhat, :operatingsystemmajrelease => "7"
(PUP-<I>) Don't require /run/systemd/system for systemd 7fe<I>f<I>fc4c<I>cd6b<I>c<I>a<I>ff7c9f9 added this check; here we restrict it to Debian because it means systemd is not detected if running puppet within a chroot environment where this is not yet mounted.
diff --git a/src/protean/impl/repository/__init__.py b/src/protean/impl/repository/__init__.py index <HASH>..<HASH> 100644 --- a/src/protean/impl/repository/__init__.py +++ b/src/protean/impl/repository/__init__.py @@ -131,10 +131,7 @@ class Providers: ) self.domain._domain_element( - DomainObjects.REPOSITORY, - _cls=new_class, - aggregate_cls=aggregate_cls, - bounded_context=aggregate_cls.meta_.bounded_context, + DomainObjects.REPOSITORY, _cls=new_class, aggregate_cls=aggregate_cls, ) # FIXME Avoid comparing classes / Fetch a Repository class directly by its aggregate class diff --git a/tests/entity/test_entity_meta.py b/tests/entity/test_entity_meta.py index <HASH>..<HASH> 100644 --- a/tests/entity/test_entity_meta.py +++ b/tests/entity/test_entity_meta.py @@ -36,7 +36,6 @@ class TestEntityMeta: # Domain attributes assert hasattr(Person.meta_, "aggregate_cls") - assert hasattr(Person.meta_, "bounded_context") def test_entity_meta_has_declared_fields_on_construction(self): assert Person.meta_.declared_fields is not None
Remove `bounded_context` attribute everywhere The `domain` object (actually, the sub-domain) itself is representative of the bounded context. No further annotation necessary.
diff --git a/tests/losantrest_tests.py b/tests/losantrest_tests.py index <HASH>..<HASH> 100644 --- a/tests/losantrest_tests.py +++ b/tests/losantrest_tests.py @@ -30,7 +30,7 @@ class TestClient(unittest.TestCase): self.assertEqual(request.headers["Accept"], "application/json") self.assertEqual(request.headers["Content-Type"], "application/json") self.assertNotIn("Authorization", request.headers) - self.assertEqual(json.loads(request.body), creds) + self.assertEqual(json.loads(request.text), creds) @requests_mock.Mocker() def test_basic_call_with_auth(self, mock): @@ -68,7 +68,7 @@ class TestClient(unittest.TestCase): self.assertEqual(parsed_url.path, "/auth/user") self.assertEqual(request.headers["Accept"], "application/json") self.assertNotIn("Authorization", request.headers) - self.assertEqual(json.loads(request.body), creds) + self.assertEqual(json.loads(request.text), creds) @requests_mock.Mocker() def test_nested_query_param_call(self, mock):
fix tests for python <I> to <I>
diff --git a/lib/beaker-vmware/version.rb b/lib/beaker-vmware/version.rb index <HASH>..<HASH> 100644 --- a/lib/beaker-vmware/version.rb +++ b/lib/beaker-vmware/version.rb @@ -1,3 +1,3 @@ module BeakerVmware - VERSION = '0.1.0' + VERSION = '0.2.0' end
(GEM) update beaker-vmware version to <I>
diff --git a/config/locker.php b/config/locker.php index <HASH>..<HASH> 100644 --- a/config/locker.php +++ b/config/locker.php @@ -4,7 +4,7 @@ return [ 'Locker' => [ 'timeout' => 1000, 'FileLocker' => [ - 'dir' => '/tmp', + 'dir' => sys_get_temp_dir(), ], ], ]; diff --git a/src/Utility/Locker/FileLocker.php b/src/Utility/Locker/FileLocker.php index <HASH>..<HASH> 100644 --- a/src/Utility/Locker/FileLocker.php +++ b/src/Utility/Locker/FileLocker.php @@ -11,7 +11,7 @@ class FileLocker extends BaseLocker /** * @var $lockDir */ - private $lockDir = '/tmp'; + private $lockDir = null; /** * __construct method @@ -31,6 +31,10 @@ class FileLocker extends BaseLocker $this->lockDir = $dir; } + if (empty($this->lockDir)) { + $this->lockDir = sys_get_temp_dir(); + } + $lock = new FlockLock($this->lockDir); parent::__construct($key, $lock);
Replaced hardcoded dir to store lock files by default system one
diff --git a/tests/test_optics.py b/tests/test_optics.py index <HASH>..<HASH> 100644 --- a/tests/test_optics.py +++ b/tests/test_optics.py @@ -426,8 +426,6 @@ def test_RecurTraversal_no_change(): assert data[n] is result[n] -@pytest.mark.slow -@pytest.mark.performance def test_RecurTraversal_memoizes_hashable(): depth = 100 width = 10
Removed pytest marks They have to be registered now and the couple that were in use were unimportant.
diff --git a/src/components/media_control/media_control.js b/src/components/media_control/media_control.js index <HASH>..<HASH> 100644 --- a/src/components/media_control/media_control.js +++ b/src/components/media_control/media_control.js @@ -365,8 +365,7 @@ export default class MediaControl extends UIObject { this.currentSeekBarPercentage = 100 // true if dvr is enabled but not in use. E.g. live stream with dvr but at live point var dvrEnabledButNotInUse = this.container.isDvrEnabled() && !this.container.isDvrInUse() - if (this.container.settings.seekEnabled && !dvrEnabledButNotInUse) { - // if seek enabled or dvr is enabled and being used then set to the true percentage + if (!dvrEnabledButNotInUse) { this.currentSeekBarPercentage = (this.currentPositionValue / this.currentDurationValue) * 100 } this.setSeekPercentage(this.currentSeekBarPercentage)
media control: update seek bar percentage even if seek is disabled There are some cases (e.g. ads playback) in which seek is disabled, but the percentage is still needed
diff --git a/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb b/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb +++ b/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb @@ -672,7 +672,7 @@ module ActiveRecord case @connection.error_code(exception) when 1 RecordNotUnique.new(message) - when 942, 955, 1418 + when 900, 904, 942, 955, 1418, 17008 ActiveRecord::StatementInvalid.new(message) when 1400 ActiveRecord::NotNullViolation.new(message)
Add these errors to be recognized as `ActiveRecord::StatementInvalid` ORA-<I> "invalid SQL statement" ORA-<I> "invalid identifier" ORA-<I> "Closed Connection" ORA-<I> is likely reported only with JRuby and JDBC driver.
diff --git a/src/Phinx/Db/Adapter/SqlServerAdapter.php b/src/Phinx/Db/Adapter/SqlServerAdapter.php index <HASH>..<HASH> 100644 --- a/src/Phinx/Db/Adapter/SqlServerAdapter.php +++ b/src/Phinx/Db/Adapter/SqlServerAdapter.php @@ -68,13 +68,13 @@ class SqlServerAdapter extends PdoAdapter implements AdapterInterface } $dsn .= ';MultipleActiveResultSets=false'; - // charset support - if (isset($options['charset'])) { - $dsn .= ';charset=' . $options['charset']; - } - $driverOptions = array(\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION); + // charset support + if (isset($options['charset'])) { + $driverOptions[\PDO::SQLSRV_ATTR_ENCODING] = $options['charset']; + } + // support arbitrary \PDO::SQLSRV_ATTR_* driver options and pass them to PDO // http://php.net/manual/en/ref.pdo-sqlsrv.php#pdo-sqlsrv.constants foreach ($options as $key => $option) {
Correct SqlServer charset SqlServer charset is not done via the DSN, but via a driver flag/option.
diff --git a/lib/actions/form.js b/lib/actions/form.js index <HASH>..<HASH> 100644 --- a/lib/actions/form.js +++ b/lib/actions/form.js @@ -17,7 +17,7 @@ const { getDefaultQuery, getTripOptionsFromQuery, getUrlParams, - planParamsToQuery + planParamsToQueryAsync } = coreUtils.query export const settingQueryParam = createAction('SET_QUERY_PARAM') @@ -70,7 +70,7 @@ export function parseUrlQueryString (params = getUrlParams()) { }) const searchId = params.ui_activeSearch || coreUtils.storage.randId() // Convert strings to numbers/objects and dispatch - planParamsToQuery(planParams, getState().otp.config) + planParamsToQueryAsync(planParams, getState().otp.config) .then(query => dispatch(setQueryParam(query, searchId))) } }
refactor(actions/form): Use renamed method planParamsToQueryAsync from OTP-UI.
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index <HASH>..<HASH> 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -156,15 +156,17 @@ class TestUserInstallTest: @mock.patch('setuptools.command.easy_install.__file__', None) def test_user_install_implied(self): + # simulate setuptools installed in user site packages easy_install_pkg.__file__ = site.USER_SITE - site.ENABLE_USER_SITE = True # disabled sometimes - #XXX: replace with something meaningfull + site.ENABLE_USER_SITE = True + + # create a finalized easy_install command dist = Distribution() dist.script_name = 'setup.py' cmd = ei.easy_install(dist) cmd.args = ['py'] cmd.ensure_finalized() - assert cmd.user, 'user should be implied' + assert not cmd.user, 'user should not be implied' def test_multiproc_atexit(self): try:
Update test to match new expectation following pull request #<I>. Refs #<I>.
diff --git a/lib/rufus/sc/scheduler.rb b/lib/rufus/sc/scheduler.rb index <HASH>..<HASH> 100644 --- a/lib/rufus/sc/scheduler.rb +++ b/lib/rufus/sc/scheduler.rb @@ -423,7 +423,7 @@ module Rufus::Scheduler when Array mutex.reduce(block) do |memo, m| m = (@mutexes[m.to_s] ||= Mutex.new) unless m.is_a?(Mutex) - -> { m.synchronize { memo.call } } + lambda { m.synchronize { memo.call } } end.call else (@mutexes[mutex.to_s] ||= Mutex.new).synchronize { block.call }
use lambda instead of ->, be friendly to <I> rufus-scheduler has been around for a while, there are certainly lots of deployments out there still running on <I>.x, they don't get "->".
diff --git a/uisrv/offering.go b/uisrv/offering.go index <HASH>..<HASH> 100644 --- a/uisrv/offering.go +++ b/uisrv/offering.go @@ -160,6 +160,7 @@ func (s *Server) fillOffering(offering *data.Offering) error { offering.Status = data.MsgUnpublished offering.Agent = agent.EthAddr offering.BlockNumberUpdated = 1 + offering.CurrentSupply = offering.Supply // TODO: remove once prepaid is implemented. offering.BillingType = data.BillingPostpaid
offering's current supply update on agent side
diff --git a/flask_mongo_profiler/__init__.py b/flask_mongo_profiler/__init__.py index <HASH>..<HASH> 100644 --- a/flask_mongo_profiler/__init__.py +++ b/flask_mongo_profiler/__init__.py @@ -1 +1,3 @@ +from __future__ import absolute_import + from . import contrib
:wheelchair: Add absolute_import
diff --git a/lib/fast_haml/compiler.rb b/lib/fast_haml/compiler.rb index <HASH>..<HASH> 100644 --- a/lib/fast_haml/compiler.rb +++ b/lib/fast_haml/compiler.rb @@ -303,7 +303,7 @@ module FastHaml when value == true [[:haml, :attr, key, [:multi]]] when value == false - [] + [[:multi]] when value.is_a?(Hash) && key == 'data' data = AttributeBuilder.normalize_data(value) data.keys.sort.map do |k| @@ -315,7 +315,7 @@ module FastHaml end def compile_dynamic_attribute(key, value) - [[:haml, :attr, key, [:code, value]]] + [[:haml, :attr, key, [:dvalue, value]]] end def compile_script(ast) diff --git a/lib/fast_haml/html.rb b/lib/fast_haml/html.rb index <HASH>..<HASH> 100644 --- a/lib/fast_haml/html.rb +++ b/lib/fast_haml/html.rb @@ -23,7 +23,7 @@ module FastHaml else [:static, " #{name}=#{options[:attr_quote]}#{name}#{options[:attr_quote]}"] end - elsif value[0] == :code + elsif value[0] == :dvalue [:multi, [:code, "value = (#{value[1]})"], [:case, 'value',
Rename symbol because :code is used as another semantics
diff --git a/tohu/item_list.py b/tohu/item_list.py index <HASH>..<HASH> 100644 --- a/tohu/item_list.py +++ b/tohu/item_list.py @@ -4,6 +4,7 @@ import re import pandas as pd from operator import attrgetter from sqlalchemy import create_engine, inspect +from sqlalchemy.schema import CreateSchema logger = logging.getLogger('tohu') @@ -167,6 +168,10 @@ class ItemList: engine = create_engine(url) ins = inspect(engine) + if schema is not None and schema not in ins.get_schema_names(): + logger.debug(f"Creating non-existing schema: '{schema}'") + engine.execute(CreateSchema(schema)) + if table_name in ins.get_table_names(schema=schema) and if_exists == 'do_nothing': logger.debug("Table already exists (use if_exists='replace' or if_exists='append' to modify it).") return
Create schema if it doesn't exist
diff --git a/plugins/worker/server/api/worker.py b/plugins/worker/server/api/worker.py index <HASH>..<HASH> 100644 --- a/plugins/worker/server/api/worker.py +++ b/plugins/worker/server/api/worker.py @@ -46,8 +46,7 @@ class Worker(Resource): result['stats'] = status.stats() result['ping'] = status.ping() result['active'] = status.active() - result['queues'] = status.active_queues() - result['scheduled'] = status.scheduled() + result['reserved'] = status.reserved() return result @autoDescribeRoute(
API: Removes unused information about worker and return the queued tasks list
diff --git a/closure/goog/module/moduleloader.js b/closure/goog/module/moduleloader.js index <HASH>..<HASH> 100644 --- a/closure/goog/module/moduleloader.js +++ b/closure/goog/module/moduleloader.js @@ -108,20 +108,6 @@ goog.module.ModuleLoader.prototype.loadModulesInternal = function( /** - * Create a script tag. - * @param {string} uri The uri of the script. - * @return {Element} The new tag. - * @private - */ -goog.module.ModuleLoader.prototype.createScriptElement_ = function(uri) { - var scriptEl = goog.dom.createElement('script'); - scriptEl.src = uri; - scriptEl.type = 'text/javascript'; - return scriptEl; -}; - - -/** * Handles a successful response to a request for one or more modules. * * @param {goog.net.BulkLoader} bulkLoader The bulk loader.
Removed a dead function from ModuleLoader R=ebixon DELTA=<I> (0 added, <I> deleted, 0 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=<I> git-svn-id: <URL>
diff --git a/src/main/java/lv/semti/morphology/analyzer/Wordform.java b/src/main/java/lv/semti/morphology/analyzer/Wordform.java index <HASH>..<HASH> 100644 --- a/src/main/java/lv/semti/morphology/analyzer/Wordform.java +++ b/src/main/java/lv/semti/morphology/analyzer/Wordform.java @@ -41,7 +41,7 @@ public class Wordform extends AttributeValues implements Serializable{ private static final long serialVersionUID = 1L; private String token; private transient Ending ending; - transient Lexeme lexeme; + public transient Lexeme lexeme; public Wordform (String token, Lexeme lexeme, Ending ending) { this.token = token;
Exposed a property needed for LVTagger
diff --git a/tests/core/mock.py b/tests/core/mock.py index <HASH>..<HASH> 100644 --- a/tests/core/mock.py +++ b/tests/core/mock.py @@ -36,8 +36,7 @@ def is_authenticated(request): # xAuth return ( - request.headers.get('trakt-user-login') == 'mock' and - request.headers.get('trakt-user-token') == 'mock' + request.headers.get('trakt-user-login') == 'mock' and request.headers.get('trakt-user-token') == 'mock' )
Fixed formatting in [tests/core/mock.py]
diff --git a/salt/cloud/clouds/msazure.py b/salt/cloud/clouds/msazure.py index <HASH>..<HASH> 100644 --- a/salt/cloud/clouds/msazure.py +++ b/salt/cloud/clouds/msazure.py @@ -172,19 +172,19 @@ def avail_images(conn=None, call=None): for image in images: ret[image.name] = { 'category': image.category, - 'description': image.description.encode('utf-8'), + 'description': image.description.encode('ascii', 'replace'), 'eula': image.eula, 'label': image.label, 'logical_size_in_gb': image.logical_size_in_gb, 'name': image.name, 'os': image.os, } - if image.affinity_group: - ret[image.name] = image.affinity_group - if image.location: - ret[image.name] = image.location - if image.media_link: - ret[image.name] = image.media_link + if hasattr(image, 'affinity_group'): + ret[image.name]['affinity_group'] = image.affinity_group + if hasattr(image, 'location'): + ret[image.name]['location'] = image.location + if hasattr(image, 'media_link'): + ret[image.name]['media_link'] = image.media_link return ret
Tidy up --list-images in Azure driver
diff --git a/auth_state_machine.go b/auth_state_machine.go index <HASH>..<HASH> 100644 --- a/auth_state_machine.go +++ b/auth_state_machine.go @@ -36,6 +36,11 @@ func (c *akeContext) receiveMessage(msg []byte) (toSend []byte) { //TODO error? return } + + //TODO error + c.authState, toSend = c.authState.receiveRevealSigMessage(c, msg) + + //TODO set msgState = encrypted } return
Conversation receive Reveal Signature Message
diff --git a/resource_aws_cloudwatch_event_target.go b/resource_aws_cloudwatch_event_target.go index <HASH>..<HASH> 100644 --- a/resource_aws_cloudwatch_event_target.go +++ b/resource_aws_cloudwatch_event_target.go @@ -8,6 +8,7 @@ import ( "github.com/hashicorp/terraform/helper/schema" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" events "github.com/aws/aws-sdk-go/service/cloudwatchevents" ) @@ -94,6 +95,15 @@ func resourceAwsCloudWatchEventTargetRead(d *schema.ResourceData, meta interface d.SetId("") return nil } + if awsErr, ok := err.(awserr.Error); ok { + // This should never happen, but it's useful + // for recovering from https://github.com/hashicorp/terraform/issues/5389 + if awsErr.Code() == "ValidationException" { + log.Printf("[WARN] Removing CloudWatch Event Target %q because it never existed.", d.Id()) + d.SetId("") + return nil + } + } return err } log.Printf("[DEBUG] Found Event Target: %s", t)
Allow recovering from failed CW Event Target creation in state
diff --git a/help.php b/help.php index <HASH>..<HASH> 100644 --- a/help.php +++ b/help.php @@ -16,17 +16,13 @@ require_once('config.php'); - $file = optional_param('file', '', PARAM_CLEAN); + $file = optional_param('file', '', PARAM_PATH); $text = optional_param('text', 'No text to display', PARAM_CLEAN); $module = optional_param('module', 'moodle', PARAM_ALPHAEXT); $forcelang = optional_param('forcelang', '', PARAM_ALPHAEXT); print_header(); - if (detect_munged_arguments($module .'/'. $file)) { - error('Filenames contain illegal characters!'); - } - print_simple_box_start('center', '96%'); $helpfound = false;
better cleaning of $file parameter SC#<I>; merged from MOODLE_<I>_STABLE
diff --git a/src/com/google/javascript/jscomp/DefaultPassConfig.java b/src/com/google/javascript/jscomp/DefaultPassConfig.java index <HASH>..<HASH> 100644 --- a/src/com/google/javascript/jscomp/DefaultPassConfig.java +++ b/src/com/google/javascript/jscomp/DefaultPassConfig.java @@ -246,6 +246,10 @@ public final class DefaultPassConfig extends PassConfig { checks.add(checkProvides); } + if (options.generateExports && !options.skipNonTranspilationPasses) { + checks.add(generateExports); + } + // Late ES6 transpilation. // Includes ES6 features that are best handled natively by the compiler. // As we convert more passes to handle these features, we will be moving the transpilation @@ -282,13 +286,6 @@ public final class DefaultPassConfig extends PassConfig { checks.add(angularPass); } - // The following passes are more like "preprocessor" passes. - // It's important that they run before most checking passes. - // Perhaps this method should be renamed? - if (options.generateExports) { - checks.add(generateExports); - } - if (options.exportTestFunctions) { checks.add(exportTestFunctions); }
Moving generate exports pass to before the later transpilation step ------------- Created by MOE: <URL>
diff --git a/src/org/javasimon/SimonFactory.java b/src/org/javasimon/SimonFactory.java index <HASH>..<HASH> 100644 --- a/src/org/javasimon/SimonFactory.java +++ b/src/org/javasimon/SimonFactory.java @@ -29,6 +29,7 @@ public final class SimonFactory { } private SimonFactory() { + throw new UnsupportedOperationException(); } /**
Creating of utility class is now prohibited also internally. git-svn-id: <URL>
diff --git a/lib/eiscp.rb b/lib/eiscp.rb index <HASH>..<HASH> 100644 --- a/lib/eiscp.rb +++ b/lib/eiscp.rb @@ -1,6 +1,6 @@ # Library for controlling Onkyo receivers over TCP/IP. -class EISCP +module EISCP VERSION = '0.0.3' end
fixed class/module discrep
diff --git a/language/parser/parser.go b/language/parser/parser.go index <HASH>..<HASH> 100644 --- a/language/parser/parser.go +++ b/language/parser/parser.go @@ -683,7 +683,7 @@ func parseDirective(parser *Parser) (*ast.Directive, error) { func parseType(parser *Parser) (ast.Type, error) { start := parser.Token.Start var ttype ast.Type - if skip(parser, lexer.TokenKind[lexer.BRACE_L]) { + if skip(parser, lexer.TokenKind[lexer.BRACKET_L]) { t, err := parseType(parser) if err != nil { return t, err
Fix a bug in parser (expected BRACKET_L, got BRACE_L)
diff --git a/consul/client.go b/consul/client.go index <HASH>..<HASH> 100644 --- a/consul/client.go +++ b/consul/client.go @@ -20,7 +20,7 @@ const ( // eofError is also a substring returned by consul during EOF errors. eofError = "EOF" // connRefused connection refused - connRefused = "getsockopt: connection refused" + connRefused = "connection refused" // keyIndexMismatch indicates consul error for key index mismatch keyIndexMismatch = "Key Index mismatch" // nameResolutionError indicates no host found, can be temporary
fix connection refused error check (#<I>)
diff --git a/nfc/__init__.py b/nfc/__init__.py index <HASH>..<HASH> 100644 --- a/nfc/__init__.py +++ b/nfc/__init__.py @@ -19,7 +19,7 @@ # See the Licence for the specific language governing # permissions and limitations under the Licence. # ----------------------------------------------------------------------------- -__version__ = "0.9.1" +__version__ = "0.9.2" import logging logging.getLogger(__name__).addHandler(logging.NullHandler()) diff --git a/nfc/dev/acr122.py b/nfc/dev/acr122.py index <HASH>..<HASH> 100644 --- a/nfc/dev/acr122.py +++ b/nfc/dev/acr122.py @@ -78,7 +78,7 @@ class Chipset(pn53x.Chipset): if frame[0] != 0x80: log.error("expected a RDR_to_PC_DataBlock") raise IOError(errno.EIO, os.strerror(errno.EIO)) - if len(frame) != 10 + struct.unpack("<I", frame[1:5])[0]: + if len(frame) != 10 + struct.unpack("<I", buffer(frame, 1, 4))[0]: log.error("RDR_to_PC_DataBlock length mismatch") raise IOError(errno.EIO, os.strerror(errno.EIO)) return frame[10:]
merge fix from trunk: struct.unpack does not accept bytearray in Python <I> and earlier
diff --git a/eventsourcing/tests/test_sqlite.py b/eventsourcing/tests/test_sqlite.py index <HASH>..<HASH> 100644 --- a/eventsourcing/tests/test_sqlite.py +++ b/eventsourcing/tests/test_sqlite.py @@ -71,17 +71,21 @@ class TestSQLiteApplicationRecorder(ApplicationRecorderTestCase): def test_raises_operational_error_when_inserting_fails(self): recorder = SQLiteApplicationRecorder(SQLiteDatastore(":memory:")) with self.assertRaises(OperationalError): + # Haven't created table. recorder.insert_events([]) def test_raises_operational_error_when_selecting_fails(self): recorder = SQLiteApplicationRecorder(SQLiteDatastore(":memory:")) with self.assertRaises(OperationalError): + # Haven't created table. recorder.select_events(uuid4()) with self.assertRaises(OperationalError): + # Haven't created table. recorder.select_notifications(start=1, limit=1) with self.assertRaises(OperationalError): + # Haven't created table. recorder.max_notification_id()
Added comments to explain why operational error is expected.
diff --git a/indra/assemblers/graph_assembler.py b/indra/assemblers/graph_assembler.py index <HASH>..<HASH> 100644 --- a/indra/assemblers/graph_assembler.py +++ b/indra/assemblers/graph_assembler.py @@ -109,6 +109,7 @@ class GraphAssembler(): for stmt in self.statements: # Skip SelfModification (self loops) -- has one node if isinstance(stmt, SelfModification) or \ + isinstance(stmt, Translocation) or \ isinstance(stmt, ActiveForm): continue # Special handling for Complexes -- more than 1 node @@ -117,13 +118,17 @@ class GraphAssembler(): self._add_node(m) # All else should have exactly 2 nodes elif all([ag is not None for ag in stmt.agent_list()]): - assert len(stmt.agent_list()) == 2 + if not len(stmt.agent_list()) == 2: + logger.warning( + '%s has less/more than the expected 2 agents.' % stmt) + continue for ag in stmt.agent_list(): self._add_node(ag) # Second, create the edges of the graph for stmt in self.statements: # Skip SelfModification (self loops) -- has one node if isinstance(stmt, SelfModification) or \ + isinstance(stmt, Translocation) or \ isinstance(stmt, ActiveForm): continue elif isinstance(stmt, Complex):
Handle more one-agent statement types in GraphAssembler
diff --git a/src/clusterpost-model/index.js b/src/clusterpost-model/index.js index <HASH>..<HASH> 100644 --- a/src/clusterpost-model/index.js +++ b/src/clusterpost-model/index.js @@ -15,7 +15,10 @@ exports.input = Joi.object().keys({ remote : Joi.object().keys({ serverCodename: Joi.string().optional(), uri: Joi.string() - }).optional() + }).optional(), + local : Joi.object().keys({ + uri: Joi.string() + }) }); exports.jobpost = Joi.object().keys({
ENH: Allow 'local' for different types of inputs
diff --git a/lib/double_entry.rb b/lib/double_entry.rb index <HASH>..<HASH> 100644 --- a/lib/double_entry.rb +++ b/lib/double_entry.rb @@ -280,7 +280,6 @@ module DoubleEntry # and provided custom filters. # # @example Find the number of all $10 :save transfers in all :checking accounts per month for the entire year (Assume the year is 2014). - # time_range = DoubleEntry::TimeRange.make(2014, 1) # DoubleEntry.aggregate_array(:sum, :checking, :save, range_type: 'month', start: '2014-01-01', finish: '2014-12-31') # @param function [Symbol] The function to perform on the set of transfers. # Valid functions are :sum, :count, and :average
Don't need time_range for aggregate_array example
diff --git a/bootstrap/src/main/java/io/airlift/bootstrap/Bootstrap.java b/bootstrap/src/main/java/io/airlift/bootstrap/Bootstrap.java index <HASH>..<HASH> 100644 --- a/bootstrap/src/main/java/io/airlift/bootstrap/Bootstrap.java +++ b/bootstrap/src/main/java/io/airlift/bootstrap/Bootstrap.java @@ -71,10 +71,11 @@ public class Bootstrap private Map<String, String> requiredConfigurationProperties; private Map<String, String> optionalConfigurationProperties; private boolean initializeLogging = true; - private boolean strictConfig = false; + private boolean quiet; + private boolean strictConfig; private boolean requireExplicitBindings = true; - private boolean initialized = false; + private boolean initialized; public Bootstrap(Module... modules) { @@ -133,6 +134,12 @@ public class Bootstrap return this; } + public Bootstrap quiet() + { + this.quiet = true; + return this; + } + public Bootstrap strictConfig() { this.strictConfig = true; @@ -228,7 +235,9 @@ public class Bootstrap unusedProperties.keySet().removeAll(configurationFactory.getUsedProperties()); // Log effective configuration - logConfiguration(configurationFactory, unusedProperties); + if (!quiet) { + logConfiguration(configurationFactory, unusedProperties); + } // system modules Builder<Module> moduleList = ImmutableList.builder();
Add quiet method to Bootstrap to disable printing configuration properties
diff --git a/lib/fontello_rails_converter/railtie.rb b/lib/fontello_rails_converter/railtie.rb index <HASH>..<HASH> 100644 --- a/lib/fontello_rails_converter/railtie.rb +++ b/lib/fontello_rails_converter/railtie.rb @@ -1,7 +1,7 @@ module FontelloRailsConverter class Railtie < Rails::Railtie rake_tasks do - require File.join(File.dirname(__FILE__), '../tasks/fontello_rails_converter.rake') + load File.join(File.dirname(__FILE__), '../tasks/fontello_rails_converter.rake') end end end \ No newline at end of file
fix loading of the rake task. turns out require will try to add an .rb extension to the loaded file
diff --git a/HTTPStreaming.rb b/HTTPStreaming.rb index <HASH>..<HASH> 100644 --- a/HTTPStreaming.rb +++ b/HTTPStreaming.rb @@ -14,6 +14,7 @@ # to the underlying lib this stuff will need updating. require 'net/http' +require 'delegate' module Net @@ -104,4 +105,4 @@ module S3sync @innerStream.close end end -end #module \ No newline at end of file +end #module
Fixes "uninitialized constant S3sync::SimpleDelegator" issue
diff --git a/src/Hprose/HandlerManager.php b/src/Hprose/HandlerManager.php index <HASH>..<HASH> 100644 --- a/src/Hprose/HandlerManager.php +++ b/src/Hprose/HandlerManager.php @@ -69,7 +69,8 @@ abstract class HandlerManager { /*protected*/ abstract function afterFilterHandler(/*string*/ $request, stdClass $context); protected function getNextInvokeHandler(Closure $next, /*callable*/ $handler) { return Future\wrap(function(/*string*/ $name, array &$args, stdClass $context) use ($next, $handler) { - return call_user_func($handler, $name, $args, $context, $next); + $array = array($name, &$args, $context, $next); + return call_user_func_array($handler, $array); }); } protected function getNextFilterHandler(Closure $next, /*callable*/ $handler) {
Fixed a middleware bug of HandlerManager.
diff --git a/OpenPNM/Network/tools.py b/OpenPNM/Network/tools.py index <HASH>..<HASH> 100644 --- a/OpenPNM/Network/tools.py +++ b/OpenPNM/Network/tools.py @@ -1007,7 +1007,7 @@ def generate_base_points(num_points, domain_size, surface='reflected'): if len(domain_size) == 1: # Spherical domain_size = _sp.array(domain_size) spherical_coords = _sp.rand(num_points, 3) - r = spherical_coords[:, 0]*domain_size + r = (spherical_coords[:, 0]**0.5)*domain_size theta = spherical_coords[:, 1]*(2*_sp.pi) phi = spherical_coords[:, 2]*(2*_sp.pi) if surface == 'reflected': @@ -1022,7 +1022,7 @@ def generate_base_points(num_points, domain_size, surface='reflected'): elif len(domain_size) == 2: # Cylindrical domain_size = _sp.array(domain_size) cylindrical_coords = _sp.rand(num_points, 3) - r = cylindrical_coords[:, 0]*domain_size[0] + r = (cylindrical_coords[:, 0]**0.5)*domain_size[0] theta = cylindrical_coords[:, 1]*(2*_sp.pi) z = cylindrical_coords[:, 2] if surface == 'reflected':
Adjusted the random radius values by square rooting it so they are evenly spaced
diff --git a/pypump/models/activity.py b/pypump/models/activity.py index <HASH>..<HASH> 100644 --- a/pypump/models/activity.py +++ b/pypump/models/activity.py @@ -95,7 +95,11 @@ class Activity(AbstractModel): self.id = id def __repr__(self): - return '<Activity: {content}>'.format(content=re.sub('<.*?>', '', self.content)) + return '<Activity: {webfinger} {verb}ed {model}>'.format( + webfinger=self.actor.id[5:], # [5:] to strip of acct: + verb=self.verb.rstrip("e"), # english: e + ed = ed + model=self.obj.objectType + ) def __str__(self): return str(self.__repr__())
Fix unicode by constructing repr as <Activity: {webfinger} {verb}ed {object_type}>
diff --git a/server/workers/rekall_adapter/rekall_adapter.py b/server/workers/rekall_adapter/rekall_adapter.py index <HASH>..<HASH> 100644 --- a/server/workers/rekall_adapter/rekall_adapter.py +++ b/server/workers/rekall_adapter/rekall_adapter.py @@ -202,5 +202,11 @@ def test(): output = renderer.render(session.plugins.dlllist()) pprint.pprint(output) + + # Code coverage: These calls are simply for code coverage + renderer.format('foo') + renderer.section() + renderer.format('foo') + if __name__ == "__main__": test()
just puttin in code coverage calls
diff --git a/django_cas_ng/views.py b/django_cas_ng/views.py index <HASH>..<HASH> 100644 --- a/django_cas_ng/views.py +++ b/django_cas_ng/views.py @@ -221,8 +221,11 @@ class LogoutView(View): next_page = next_page or get_redirect_url(request) if settings.CAS_LOGOUT_COMPLETELY: - protocol = get_protocol(request) - host = request.get_host() + if hasattr(settings, 'CAS_ROOT_PROXIED_AS'): + protocol, host, _, _, _, _ = urllib_parse.urlparse(settings.CAS_ROOT_PROXIED_AS) + else: + protocol = get_protocol(request) + host = request.get_host() redirect_url = urllib_parse.urlunparse( (protocol, host, next_page, '', '', ''), )
Logout view now prioritizes the CAS_ROOT_PROXIED_AS setting when building urls
diff --git a/src/collectors/diskspace/diskspace.py b/src/collectors/diskspace/diskspace.py index <HASH>..<HASH> 100644 --- a/src/collectors/diskspace/diskspace.py +++ b/src/collectors/diskspace/diskspace.py @@ -142,7 +142,7 @@ class DiskSpaceCollector(diamond.collector.Collector): continue # Process the filters - if self.exclude_reg.match(mount_point): + if self.exclude_reg.search(mount_point): self.log.debug("Ignoring %s since it is in the " + "exclude_filter list.", mount_point) continue
Fixes #<I>, this fixes the regex search to actually not be anchored by default
diff --git a/gromacs/analysis/core.py b/gromacs/analysis/core.py index <HASH>..<HASH> 100755 --- a/gromacs/analysis/core.py +++ b/gromacs/analysis/core.py @@ -253,7 +253,7 @@ class Simulation(object): return p def plugindir(self, plugin_name, *args): - return self.select_plugin(plugin_name).plugindir(*args) + return self.get_plugin(plugin_name).plugindir(*args) def check_file(self,filetype,path): """Raise :exc:`ValueError` if path does not exist. Uses *filetype* in message.""" @@ -321,7 +321,7 @@ class Simulation(object): arguments for plugin plot function and possibly :func:`pylab.plot` """ kwargs['figure'] = figure - return self.select_plugin(plugin_name).plot(**kwargs) + return self.get_plugin(plugin_name).plot(**kwargs) def __str__(self): return 'Simulation(tpr=%(tpr)r,xtc=%(xtc)r,analysisdir=%(analysis_dir)r)' % vars(self)
fixed: forgot to change select_plugin --> get_plugin git-svn-id: svn+ssh://gonzo.med.jhmi.edu/scratch/svn/woolf_repository/users/oliver/Library/GromacsWrapper@<I> df5ba8eb-4b0b-<I>-8c<I>-c<I>f<I>b<I>c
diff --git a/lib/refresh.js b/lib/refresh.js index <HASH>..<HASH> 100644 --- a/lib/refresh.js +++ b/lib/refresh.js @@ -27,6 +27,12 @@ module.exports = function (Terminal) { row = y + this.ydisp; line = this.lines[row]; + if (!line) { + // simple solution in case we have more lines than rows + // could be improved to instead remove first line (and related html element) + return this.reset(); + } + out = ''; if (y === this.y && this.cursorState && this.ydisp === this.ybase && !this.cursorHidden) {
resetting terminal when we run out of rows
diff --git a/D/prototypes/Promise/index.js b/D/prototypes/Promise/index.js index <HASH>..<HASH> 100644 --- a/D/prototypes/Promise/index.js +++ b/D/prototypes/Promise/index.js @@ -138,18 +138,18 @@ export class Promise { toResolve++; - promise.then((value) => { - toResolve--; - array[i] = value; - - setTimeout(() => { - if (next.done && !toResolve) { - resolve(array); - } - }, 1); - }, reject); - - i++; + ((i) => { + promise.then((value) => { + toResolve--; + array[i] = value; + + setTimeout(() => { + if (next.done && !toResolve) { + resolve(array); + } + }, 1); + }, reject); + })(i++); } if (!i) { @@ -217,7 +217,7 @@ export class Promise { }); } - 'catch'(onReject) { + catch(onReject) { return resolveOrReject(this.$, null, onReject); } then(onResolve, onReject) {
Fix "no-closure" bug.
diff --git a/src/Configurator/RendererGenerators/PHP/XPathConvertor.php b/src/Configurator/RendererGenerators/PHP/XPathConvertor.php index <HASH>..<HASH> 100644 --- a/src/Configurator/RendererGenerators/PHP/XPathConvertor.php +++ b/src/Configurator/RendererGenerators/PHP/XPathConvertor.php @@ -304,7 +304,7 @@ class XPathConvertor $operators['='] = '=='; $operators['!='] = '!='; - $operands[] = ltrim($expr, '0'); + $operands[] = preg_replace('(^0(.+))', '$1', $expr); } else { diff --git a/tests/Configurator/RendererGenerators/PHP/XPathConvertorTest.php b/tests/Configurator/RendererGenerators/PHP/XPathConvertorTest.php index <HASH>..<HASH> 100644 --- a/tests/Configurator/RendererGenerators/PHP/XPathConvertorTest.php +++ b/tests/Configurator/RendererGenerators/PHP/XPathConvertorTest.php @@ -361,6 +361,10 @@ class XPathConvertorTest extends Test "\$node->textContent==3" ], [ + '.=0', + "\$node->textContent==0" + ], + [ '.=022', "\$node->textContent==22" ],
XPathConvertor: fixed comparison to 0
diff --git a/pippo-core/src/main/java/ro/fortsoft/pippo/core/Pippo.java b/pippo-core/src/main/java/ro/fortsoft/pippo/core/Pippo.java index <HASH>..<HASH> 100644 --- a/pippo-core/src/main/java/ro/fortsoft/pippo/core/Pippo.java +++ b/pippo-core/src/main/java/ro/fortsoft/pippo/core/Pippo.java @@ -15,9 +15,10 @@ */ package ro.fortsoft.pippo.core; +import ro.fortsoft.pippo.core.util.ServiceLocator; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import ro.fortsoft.pippo.core.util.ServiceLocator; /** * @author Decebal Suiu @@ -55,6 +56,15 @@ public class Pippo { WebServerSettings serverSettings = new WebServerSettings(application.getPippoSettings()); server.setSettings(serverSettings); + + Runtime.getRuntime().addShutdownHook(new Thread() { + + @Override + public void run() { + server.stop(); + } + + }); } return server;
Add a shutdown hook to gracefully terminate on ctrl+c
diff --git a/match.js b/match.js index <HASH>..<HASH> 100644 --- a/match.js +++ b/match.js @@ -7,12 +7,12 @@ match: '=' }, link: function(scope, elem, attrs, ctrl) { - scope.$watch(function() { - modelValue = ctrl.$modelValue || ctrl.$$invalidModelValue; - return (ctrl.$pristine && angular.isUndefined(modelValue)) || scope.match === modelValue; - }, function(currentValue) { - ctrl.$setValidity('match', currentValue); + scope.$watch('match', function(pass){ + ctrl.$validate(); }); + ctrl.$validators.match = function(modelValue){ + return (ctrl.$pristine && (angular.isUndefined(modelValue) || || modelValue === "")) || modelValue === scope.match; + }; } }; });
Fix: for AngularJS <I>.x Using the new `$validators` pipeline for validation.
diff --git a/config.js b/config.js index <HASH>..<HASH> 100644 --- a/config.js +++ b/config.js @@ -41,7 +41,7 @@ var defaults = { { path : "./views", url : "/", ext : "html" } ], - engines: { + pipelines: { html: "html", css: "css", js: "javascript" diff --git a/globals.js b/globals.js index <HASH>..<HASH> 100644 --- a/globals.js +++ b/globals.js @@ -40,7 +40,7 @@ module.exports = (function() { global.ports = { proxy : 27182 }; // Add engines in config - for (var ext in global.config.engines) - global.engines.addEngine(ext, global.config.engines[ext]); + for (var ext in global.config.pipelines) + global.engines.addEngine(ext, global.config.pipelines[ext]); });
Renames engines to pipelines While this is inconsistent with the Motors interface, it assumes the much more familiar language of “asset pipelines”
diff --git a/spec/doubles/stream_for_occurrence_double.rb b/spec/doubles/stream_for_occurrence_double.rb index <HASH>..<HASH> 100644 --- a/spec/doubles/stream_for_occurrence_double.rb +++ b/spec/doubles/stream_for_occurrence_double.rb @@ -6,6 +6,10 @@ class StreamForOccurrenceDouble < ConceptQL::Nodes::Node ds end + def evaluate(db) + query(db) + end + # Stole this from: # https://github.com/jeremyevans/sequel/blob/63397b787335d06de97dc89ddf49b7a3a93ffdc9/spec/core/expression_filters_spec.rb#L400 #
StreamForOccurrenceDouble#evaluate: add this
diff --git a/tests/test_kvstore.py b/tests/test_kvstore.py index <HASH>..<HASH> 100644 --- a/tests/test_kvstore.py +++ b/tests/test_kvstore.py @@ -176,15 +176,13 @@ class KVStoreBase(object): class TestBsddbStore(unittest.TestCase, KVStoreBase): DB = "tests.test_bsddb_store" - @classmethod - def setUpClass(cls): + def setUp(self): try: import bsddb bsddb # reference bsddb to satisfy pyflakes except ImportError: # pragma: no cover raise unittest.SkipTest("bsddb not installed") - def setUp(self): self.store = cobe.kvstore.BsddbStore(self.DB) def cleanup():
Move the TestBsddbStore Skip clause to setUp (from setUpClass) This matches the behavior of TestLevelDBStore and has the expected effect (skipping the test) when running in nosetests.
diff --git a/blueprints/ember-cli-blanket/files/tests/blanket-options.js b/blueprints/ember-cli-blanket/files/tests/blanket-options.js index <HASH>..<HASH> 100644 --- a/blueprints/ember-cli-blanket/files/tests/blanket-options.js +++ b/blueprints/ember-cli-blanket/files/tests/blanket-options.js @@ -1,9 +1,9 @@ -/*globals blanket, module */ +/* globals blanket, module */ var options = { - modulePrefix: "<%= dasherizedPackageName %>", - filter: "//.*<%= dasherizedPackageName %>/.*/", - antifilter: "//.*(tests|template).*/", + modulePrefix: '<%= dasherizedPackageName %>', + filter: '//.*<%= dasherizedPackageName %>/.*/', + antifilter: '//.*(tests|template).*/', loaderExclusions: [], enableCoverage: true, cliOptions: {
Cleanup blanket-options.js - [x] Add space in globals comment - [x] Consistent quotes
diff --git a/blockstack_client/actions.py b/blockstack_client/actions.py index <HASH>..<HASH> 100644 --- a/blockstack_client/actions.py +++ b/blockstack_client/actions.py @@ -3772,7 +3772,7 @@ def cli_set_zonefile_hash(args, config_path=CONFIG_PATH, password=None): help: Directly set the hash associated with the name in the blockchain. arg: name (str) 'The name to update' arg: zonefile_hash (str) 'The RIPEMD160(SHA256(zonefile)) hash' - arg: ownerkey (str) 'The key to be used if not the wallet's ownerkey' + arg: ownerkey (str) 'The key to be used if not the wallets ownerkey' """ password = get_default_password(password)
previous commit's comments cause argparsing failure in cli
diff --git a/examples/all.php b/examples/all.php index <HASH>..<HASH> 100644 --- a/examples/all.php +++ b/examples/all.php @@ -25,7 +25,7 @@ namespace Malenki; -include('../src/Malenki/Ansi.php'); +(@include_once __DIR__ . '/../vendor/autoload.php') || @include_once __DIR__ . '/../../../autoload.php'; foreach(array('black', 'red', 'green', 'yellow', 'blue', 'purple', 'cyan', 'white') as $color) { diff --git a/examples/colors.php b/examples/colors.php index <HASH>..<HASH> 100644 --- a/examples/colors.php +++ b/examples/colors.php @@ -25,7 +25,7 @@ namespace Malenki; -include('../src/Malenki/Ansi.php'); +(@include_once __DIR__ . '/../vendor/autoload.php') || @include_once __DIR__ . '/../../../autoload.php'; foreach(array('black', 'red', 'green', 'yellow', 'blue', 'purple', 'cyan', 'white') as $color) {
Use autoloader of composer for examples
diff --git a/flask_assistant/response/base.py b/flask_assistant/response/base.py index <HASH>..<HASH> 100644 --- a/flask_assistant/response/base.py +++ b/flask_assistant/response/base.py @@ -143,8 +143,26 @@ class _Response(object): ) if "DIALOGFLOW_MESSENGER" in self._integrations: - chip_resp = df_messenger._build_suggestions(*replies) - self._platform_messages["DIALOGFLOW_MESSENGER"].append(chip_resp) + existing_chips = False + for m in self._platform_messages["DIALOGFLOW_MESSENGER"]: + # already has chips, need to add to same object + if m.get("type") == "chips": + existing_chips = True + break + + if not existing_chips: + chip_resp = df_messenger._build_suggestions(*replies) + self._platform_messages["DIALOGFLOW_MESSENGER"].append(chip_resp) + + else: + df_chips = [] + for i in replies: + chip = df_messenger._build_chip(i) + df_chips.append(chip) + + for m in self._platform_messages["DIALOGFLOW_MESSENGER"]: + if m.get("type") == "chips": + m["options"].append(df_chips) return self
fix adding suggestions to existing chips df-msgr response
diff --git a/nessie.go b/nessie.go index <HASH>..<HASH> 100644 --- a/nessie.go +++ b/nessie.go @@ -394,11 +394,11 @@ func (n *nessusImpl) PluginFamilies() ([]PluginFamily, error) { return nil, err } defer resp.Body.Close() - var reply []PluginFamily + var reply PluginFamilies if err = json.NewDecoder(resp.Body).Decode(&reply); err != nil { return nil, err } - return reply, nil + return reply.Families, nil } func (n *nessusImpl) FamilyDetails(ID int64) (*FamilyDetails, error) {
Parse PluginFamilies json response into the new PluginFamilies struct
diff --git a/integration-tests/spec/cases/assets/simple.js b/integration-tests/spec/cases/assets/simple.js index <HASH>..<HASH> 100644 --- a/integration-tests/spec/cases/assets/simple.js +++ b/integration-tests/spec/cases/assets/simple.js @@ -70,7 +70,7 @@ module.exports = function simpleAssetTest() { job.waitForStatus('running'); return job; }) - .then(job => wait.forWorkersJoined(job.id(), workers, 10)) + .then(job => wait.forWorkersJoined(job.id(), workers, 20)) .then(r => expect(r).toEqual(workers)) .catch(fail) .finally(done); @@ -98,7 +98,7 @@ module.exports = function simpleAssetTest() { job.waitForStatus('running'); return job; }) - .then(job => wait.forWorkersJoined(job.id(), workers, 10)) + .then(job => wait.forWorkersJoined(job.id(), workers, 20)) .then(r => expect(r).toEqual(workers)) .catch(fail) .finally(done);
increasing the iterations on forWorkersJoined
diff --git a/symphony/lib/toolkit/class.entryquery.php b/symphony/lib/toolkit/class.entryquery.php index <HASH>..<HASH> 100644 --- a/symphony/lib/toolkit/class.entryquery.php +++ b/symphony/lib/toolkit/class.entryquery.php @@ -385,12 +385,7 @@ class EntryQuery extends DatabaseQuery if ($this->sectionId) { $section = (new SectionManager)->select()->section($this->sectionId)->execute()->next(); if ($section && $section->getSortingField()) { - $field = (new FieldManager)->select()->field($section->getSortingField())->execute()->next(); - if ($field && $field->isSortable()) { - $sort = $this->buildLegacySortingForField($field, $direction); - $sort = $this->replaceTablePrefix($sort); - $this->unsafe()->unsafeAppendSQLPart('order by', $sort); - } + $this->sort($section->getSortingField(), $section->getSortingOrder()); } } // No sort specified, so just sort on system id
Use sort() directly in default sort Picked from <I>f4fe7bd8 Picked from 7fd4aad<I>f Picked from fc5a<I>cdd2
diff --git a/tensor2tensor/layers/common_attention.py b/tensor2tensor/layers/common_attention.py index <HASH>..<HASH> 100644 --- a/tensor2tensor/layers/common_attention.py +++ b/tensor2tensor/layers/common_attention.py @@ -1080,6 +1080,7 @@ def multihead_attention_2d(query_antecedent, x = local_attention_2d( q, k, v, query_shape=query_shape, memory_flange=memory_flange) else: + assert attention_type == "masked_local_attention_2d" x = masked_local_attention_2d(q, k, v, query_shape=query_shape, memory_flange=memory_flange) x = combine_heads_2d(x)
Added an assert in common_attention. PiperOrigin-RevId: <I>
diff --git a/solvebio/test/test_shortcuts.py b/solvebio/test/test_shortcuts.py index <HASH>..<HASH> 100644 --- a/solvebio/test/test_shortcuts.py +++ b/solvebio/test/test_shortcuts.py @@ -22,8 +22,8 @@ class CLITests(SolveBioTestCase): user = User.retrieve() domain = user['account']['domain'] return \ - '{0}:test-client-{1}/1.0.0/test-{1}-{2}'.format( - domain, int(time.time()), random.randint(0, 10000)) + '{0}:test-client-{1}-{2}/1.0.0/test-{1}-{2}'.format( + domain, int(time.time()), random.randint(0, 100000)) def test_create_dataset(self): # TODO mock client responses or allow for hard
add random into depo as well
diff --git a/runtime/vm.js b/runtime/vm.js index <HASH>..<HASH> 100644 --- a/runtime/vm.js +++ b/runtime/vm.js @@ -97,6 +97,7 @@ VM.S = function(callee, self, args) { + " for " + self.$m.inspect(self, 'inspect')); } - return func.apply(self, args); + args.unshift(self); + return func.apply(null, args); };
Fix bug in super calls. Fixes 2 specs
diff --git a/packages/build/postcss/postcss-css-var-selectors.js b/packages/build/postcss/postcss-css-var-selectors.js index <HASH>..<HASH> 100644 --- a/packages/build/postcss/postcss-css-var-selectors.js +++ b/packages/build/postcss/postcss-css-var-selectors.js @@ -11,7 +11,7 @@ const createSelectorsForVar = (decl, options) => { }).props .map((p, i, newProps) => postcss.parse(` -.${prop + (newProps.length > 1 ? `-${p}` : '')} { ${p}: ${value}; } +.${prop + (newProps.length > 1 ? `--${p}` : '')} { ${p}: ${value}; } `) ) }
refactor(build): a bit more bem in the multi-prop modifiers
diff --git a/bem-views/404.blade.php b/bem-views/404.blade.php index <HASH>..<HASH> 100644 --- a/bem-views/404.blade.php +++ b/bem-views/404.blade.php @@ -9,4 +9,5 @@ @endif @stop -{{ /* THIS IS A SAMPLE VIEW */ }} + +{{-- THIS IS A SAMPLE VIEW --}}
Fix warning for call to Illuminate Support
diff --git a/src/Kernel/Application.php b/src/Kernel/Application.php index <HASH>..<HASH> 100755 --- a/src/Kernel/Application.php +++ b/src/Kernel/Application.php @@ -94,6 +94,10 @@ class Application extends Container require $bootstrap; } + $this->quitting(function() { + exit(0); + }); + $this->booted = true; }
Last quitting callback is now an soft exit
diff --git a/kernel/classes/ezcontentobject.php b/kernel/classes/ezcontentobject.php index <HASH>..<HASH> 100644 --- a/kernel/classes/ezcontentobject.php +++ b/kernel/classes/ezcontentobject.php @@ -2901,10 +2901,18 @@ class eZContentObject extends eZPersistentObject { $showInvisibleNodesCond = self::createFilterByVisibilitySQLString( $params['IgnoreVisibility'] ); } + + // related class identifier filter + $relatedClassIdentifiersSQL = ''; if ( isset( $params['RelatedClassIdentifiers'] ) && is_array( $params['RelatedClassIdentifiers'] ) ) { - $relatedClassIdentifiersString = implode( "', '", $params['RelatedClassIdentifiers'] ); - $relatedClassIdentifiersSQL = "ezcontentclass.identifier IN ('$relatedClassIdentifiersString') AND "; + $relatedClassIdentifiers = array(); + foreach( $params['RelatedClassIdentifiers'] as $classIdentifier ) + { + $relatedClassIdentifiers[] = "'" . $db->escapeString( $classIdentifier ) . "'"; + } + $relatedClassIdentifiersSQL = $db->generateSQLINStatement( $relatedClassIdentifiers, 'ezcontentclass.identifier', false, true, 'string' ). " AND"; + unset( $classIdentifier, $relatedClassIdentifiers ); } }
Improved related class filtering pull request code
diff --git a/php-packages/testing/tests/integration/TestCase.php b/php-packages/testing/tests/integration/TestCase.php index <HASH>..<HASH> 100644 --- a/php-packages/testing/tests/integration/TestCase.php +++ b/php-packages/testing/tests/integration/TestCase.php @@ -162,6 +162,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase function ($memo, $setCookieString) { $setCookie = SetCookie::fromSetCookieString($setCookieString); $memo[$setCookie->getName()] = $setCookie->getValue(); + return $memo; }, []
Apply fixes from StyleCI (#<I>) [ci skip] [skip ci]
diff --git a/ocf_writer.go b/ocf_writer.go index <HASH>..<HASH> 100644 --- a/ocf_writer.go +++ b/ocf_writer.go @@ -186,7 +186,7 @@ type Writer struct { // } func NewWriter(setters ...WriterSetter) (*Writer, error) { var err error - fw := &Writer{CompressionCodec: CompressionNull} + fw := &Writer{CompressionCodec: CompressionNull, blockSize: DefaultWriterBlockSize} for _, setter := range setters { err = setter(fw) if err != nil { @@ -270,7 +270,7 @@ func blocker(fw *Writer, toBlock <-chan interface{}, toEncode chan<- *writerBloc items = append(items, item) if int64(len(items)) == fw.blockSize { toEncode <- &writerBlock{items: items} - items = make([]interface{}, 0) + items = make([]interface{}, 0, fw.BlockSize) } } if len(items) > 0 {
Writer aggregates data items into blocks
diff --git a/src/directive/directive.js b/src/directive/directive.js index <HASH>..<HASH> 100644 --- a/src/directive/directive.js +++ b/src/directive/directive.js @@ -70,6 +70,11 @@ angular.module('jm.i18next').directive('ngI18next', ['$rootScope', '$i18next', ' if (attr === 'html') { element.empty().append(string); + /* + * Now compile the content of the element and bind the variables to + * the scope + */ + $compile(element.contents())(scope); } else if (attr === 'text') { @@ -80,11 +85,6 @@ angular.module('jm.i18next').directive('ngI18next', ['$rootScope', '$i18next', ' element.attr(attr, string); } - /* - * Now compile the content of the element and bind the variables to - * the scope - */ - $compile(element.contents())(scope); if (!$rootScope.$$phase) { $rootScope.$digest();
Compile only when necessary Compiling text makes angular create a useless "<span ng-scope/>" DOM node to enclose the text. This patch keeps the compilation behaviour for the only use case it is really needed for.
diff --git a/lib/foursquare/venue_proxy.rb b/lib/foursquare/venue_proxy.rb index <HASH>..<HASH> 100644 --- a/lib/foursquare/venue_proxy.rb +++ b/lib/foursquare/venue_proxy.rb @@ -12,7 +12,7 @@ module Foursquare raise ArgumentError, "You must include :ll" unless options[:ll] response = @foursquare.get('venues/search', options)["groups"].inject({}) do |venues, group| venues[group["type"]] ||= [] - venues[group["type"]] << group["items"].map do |json| + venues[group["type"]] += group["items"].map do |json| Foursquare::Venue.new(@foursquare, json) end venues
an array is better than two arrays
diff --git a/blimpy/filterbank.py b/blimpy/filterbank.py index <HASH>..<HASH> 100755 --- a/blimpy/filterbank.py +++ b/blimpy/filterbank.py @@ -33,10 +33,16 @@ from astropy.time import Time import scipy.stats from matplotlib.ticker import NullFormatter -from .utils import db, lin, rebin, closest, unpack_2to8 import logging as logger try: + from .utils import db, lin, rebin, closest, unpack_2to8 + from .sigproc import * +except: + from utils import db, lin, rebin, closest, unpack_2to8 + from sigproc import * + +try: import h5py HAS_HDF5 = True except ImportError: @@ -59,8 +65,6 @@ else: import pylab as plt -from .sigproc import * - ### # Config values ### diff --git a/blimpy/waterfall.py b/blimpy/waterfall.py index <HASH>..<HASH> 100755 --- a/blimpy/waterfall.py +++ b/blimpy/waterfall.py @@ -25,9 +25,14 @@ import os import sys import time -from .filterbank import Filterbank -from . import file_wrapper as fw -from .sigproc import * +try: + from .filterbank import Filterbank + from . import file_wrapper as fw + from .sigproc import * +except: + from filterbank import Filterbank + import file_wrapper as fw + from sigproc import * try: import h5py
Making it possible to use scripts when installation is not possible (although not the recommended way to use the code!!). Using the scripts directly would need to update your PYTHONPATH, the command line utilities are not available, and this only gives access to filterbank and waterfall. Former-commit-id: <I>cce<I>e<I>ed<I>e<I>dffe<I>ef<I>a5fe<I>
diff --git a/packages/qiskit-devs-anu/test/functional.js b/packages/qiskit-devs-anu/test/functional.js index <HASH>..<HASH> 100644 --- a/packages/qiskit-devs-anu/test/functional.js +++ b/packages/qiskit-devs-anu/test/functional.js @@ -34,6 +34,8 @@ describe('devs:anu:version', () => { describe('devs:anu:random', () => { it('should return a number between 0 and 1 without options', async () => { + this.retries(4); + const res = await qiskit.random(); dbg('Result', res); @@ -44,6 +46,8 @@ describe('devs:anu:random', () => { describe('devs:anu:genHex', () => { it('should return a hex string of the default length without options', async () => { + this.retries(4); + const res = await genHex(); dbg('Result', res); @@ -52,6 +56,8 @@ describe('devs:anu:genHex', () => { }); it('devs:anu:should return a hex string of the desired length if passed', async () => { + this.retries(4); + const len = 8; const res = await genHex(len); dbg('Result', res);
Mocha retries to some devs-anu tests due to API inconsistency
diff --git a/example_project/urls.py b/example_project/urls.py index <HASH>..<HASH> 100644 --- a/example_project/urls.py +++ b/example_project/urls.py @@ -20,6 +20,7 @@ from django.conf import settings urlpatterns = [ url(r'^admin/', admin.site.urls), + url(r'^auth/', include('django.contrib.auth.urls')), url(r'^', include('swiftwind.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/swiftwind/urls.py b/swiftwind/urls.py index <HASH>..<HASH> 100644 --- a/swiftwind/urls.py +++ b/swiftwind/urls.py @@ -40,6 +40,5 @@ urlpatterns = [ url(r'^', include('swiftwind.dashboard.urls', namespace='dashboard')), url(r'^', include(hordak_urls, namespace='hordak', app_name='hordak')), - url(r'^auth/', include('django.contrib.auth.urls')), ]
Moving auth urls include into example project
diff --git a/scrape/scrape.go b/scrape/scrape.go index <HASH>..<HASH> 100644 --- a/scrape/scrape.go +++ b/scrape/scrape.go @@ -1005,7 +1005,7 @@ func (sl *scrapeLoop) run(interval, timeout time.Duration, errc chan<- error) { var last time.Time - alignedScrapeTime := time.Now() + alignedScrapeTime := time.Now().Round(0) ticker := time.NewTicker(interval) defer ticker.Stop() @@ -1023,7 +1023,9 @@ mainLoop: // Temporary workaround for a jitter in go timers that causes disk space // increase in TSDB. // See https://github.com/prometheus/prometheus/issues/7846 - scrapeTime := time.Now() + // Calling Round ensures the time used is the wall clock, as otherwise .Sub + // and .Add on time.Time behave differently (see time package docs). + scrapeTime := time.Now().Round(0) if AlignScrapeTimestamps && interval > 100*scrapeTimestampTolerance { // For some reason, a tick might have been skipped, in which case we // would call alignedScrapeTime.Add(interval) multiple times.
Ensure that timestamp comparison uses wall clock time It's not possible to assume subtraction and addition of a time.Time will result in consistent values.
diff --git a/hazelcast-sql/src/test/java/com/hazelcast/jet/sql/impl/expression/predicate/BetweenOperatorIntegrationTest.java b/hazelcast-sql/src/test/java/com/hazelcast/jet/sql/impl/expression/predicate/BetweenOperatorIntegrationTest.java index <HASH>..<HASH> 100644 --- a/hazelcast-sql/src/test/java/com/hazelcast/jet/sql/impl/expression/predicate/BetweenOperatorIntegrationTest.java +++ b/hazelcast-sql/src/test/java/com/hazelcast/jet/sql/impl/expression/predicate/BetweenOperatorIntegrationTest.java @@ -199,7 +199,7 @@ public class BetweenOperatorIntegrationTest extends ExpressionTestSupport { Tuple2<List<SqlRow>, HazelcastSqlException> comparisonEquivalentResult = executePossiblyFailingQuery( // the queries have extra spaces so that the errors are on the same positions - "SELECT this FROM map WHERE (this >= ? AND this <= ?) OR (this <= ? AND this >= ?) ORDER BY this", + "SELECT this FROM map WHERE (this >= ? AND this <= ?) OR (this >= ? AND this <= ?) ORDER BY this", fieldType.getFieldConverterType().getTypeFamily().getPublicType(), biValue.field1(), biValue.field2(),
Ensure SQL symmetric between test verifies correct behaviour (#<I>)
diff --git a/addon/services/current-user.js b/addon/services/current-user.js index <HASH>..<HASH> 100644 --- a/addon/services/current-user.js +++ b/addon/services/current-user.js @@ -100,9 +100,6 @@ export default Service.extend({ canCreateOrUpdateUserInAnySchool: computed('session.data.authenticated.jwt', function(){ return this.getBooleanAttributeFromToken('can_create_or_update_user_in_any_school'); }), - canCreateCIReportInAnySchool: computed('session.data.authenticated.jwt', function(){ - return this.getBooleanAttributeFromToken('can_create_curriculum_inventory_report_in_any_school'); - }), async isDirectingSchool(school) { const user = await this.get('model'); const ids = user.hasMany('directedSchools').ids();
Remove canCreateCIReportInAnySchool property This is no longer provided in the token.
diff --git a/src/Valkyrja/Container/Managers/CacheableContainer.php b/src/Valkyrja/Container/Managers/CacheableContainer.php index <HASH>..<HASH> 100644 --- a/src/Valkyrja/Container/Managers/CacheableContainer.php +++ b/src/Valkyrja/Container/Managers/CacheableContainer.php @@ -68,7 +68,7 @@ class CacheableContainer extends Container /** * Before setup. * - * @param mixed $config + * @param ContainerConfig|array $config * * @return void */ @@ -179,7 +179,7 @@ class CacheableContainer extends Container /** * After setup. * - * @param mixed $config + * @param ContainerConfig|array $config * * @return void */
Update CacheableContainer.php
diff --git a/src/embed/world-renderer.js b/src/embed/world-renderer.js index <HASH>..<HASH> 100644 --- a/src/embed/world-renderer.js +++ b/src/embed/world-renderer.js @@ -236,8 +236,9 @@ WorldRenderer.prototype.setDefaultYaw_ = function(angleRad) { // Rotate the camera parent to take into account the scene's rotation. // By default, it should be at the center of the image. var display = this.controls.getVRDisplay(); + // For desktop, we subtract the current display Y axis var theta = display.theta_ || 0; - + // For devices with orientation we make the current view center if (display.poseSensor_) { display.poseSensor_.resetPose(); }
comments added to setDefaultYaw_
diff --git a/lib/environment.command.js b/lib/environment.command.js index <HASH>..<HASH> 100644 --- a/lib/environment.command.js +++ b/lib/environment.command.js @@ -61,7 +61,9 @@ module.exports = function (Aquifer) { command.action((name) => { let env = new Aquifer.api.environment(Aquifer, name); env.prompt() - .then(env.ping) + .then(() => { + return env.ping(); + }) .then(() => { Aquifer.console.log('The "' + name + '" environment exists and is accessible!', 'success'); })
Correctly chain prompt and ping.
diff --git a/test_bot.py b/test_bot.py index <HASH>..<HASH> 100644 --- a/test_bot.py +++ b/test_bot.py @@ -5,7 +5,7 @@ from tpb import TPB t = TPB() # when using a proxy site -# t = TPB('http://uberproxy.net/thepiratebay.sx') +# t = TPB(domain='http://uberproxy.net/thepiratebay.sx') for to in t.get_recent_torrents():
Fix the test bot's TPB initialization
diff --git a/lib/girffi/builder.rb b/lib/girffi/builder.rb index <HASH>..<HASH> 100644 --- a/lib/girffi/builder.rb +++ b/lib/girffi/builder.rb @@ -19,12 +19,11 @@ module GirFFI sym = info.symbol argnames = info.args.map {|a| a.name} - code = <<-CODE + return <<-CODE def #{info.name} #{argnames.join(', ')} Lib.#{sym} #{argnames.join(', ')} end CODE - return code.gsub(/(^\s*|\s*$)/, "") end def function_introspection_data namespace, function diff --git a/test/test_builder.rb b/test/test_builder.rb index <HASH>..<HASH> 100644 --- a/test/test_builder.rb +++ b/test/test_builder.rb @@ -43,7 +43,7 @@ class BuilderTest < Test::Unit::TestCase should "build correct definition of Gtk.main" do code = @builder.function_definition @go - assert_equal "def main\nLib.gtk_main\nend", code + assert_equal "def main\nLib.gtk_main\nend", code.gsub(/(^\s*|\s*$)/, "") end should "attach function to Whatever::Lib" do
Cleaning up whitespace is not functional.
diff --git a/src/extensions/cytoscape.renderer.canvas.js b/src/extensions/cytoscape.renderer.canvas.js index <HASH>..<HASH> 100644 --- a/src/extensions/cytoscape.renderer.canvas.js +++ b/src/extensions/cytoscape.renderer.canvas.js @@ -1231,6 +1231,27 @@ return imageContainer.image; } + // Attempt to replace the image object with a canvas buffer to solve zooming problem + CanvasRenderer.prototype.swapCachedImage = function(url) { + if (imageCache[url]) { + + if (image.complete) { + image = imageCache[url].image; + + var buffer = document.createElement("canvas"); + buffer.width = image.clientWidth; + buffer.height = image.clientHeight; + + + + } else { + return null; + } + } else { + return null; + } + } + CanvasRenderer.prototype.updateImageCaches = function() { for (var url in imageCache) {
Attempt to solve graphical glitch caused by zooming too far into a node custom image by replacing image object with a canvas buffer
diff --git a/logpush.go b/logpush.go index <HASH>..<HASH> 100644 --- a/logpush.go +++ b/logpush.go @@ -10,14 +10,15 @@ import ( // LogpushJob describes a Logpush job. type LogpushJob struct { - ID int `json:"id,omitempty"` - Enabled bool `json:"enabled"` - Name string `json:"name"` - LogpullOptions string `json:"logpull_options"` - DestinationConf string `json:"destination_conf"` - LastComplete *time.Time `json:"last_complete,omitempty"` - LastError *time.Time `json:"last_error,omitempty"` - ErrorMessage string `json:"error_message,omitempty"` + ID int `json:"id,omitempty"` + Enabled bool `json:"enabled"` + Name string `json:"name"` + LogpullOptions string `json:"logpull_options"` + DestinationConf string `json:"destination_conf"` + OwnershipChallenge string `json:"ownership_challenge"` + LastComplete *time.Time `json:"last_complete,omitempty"` + LastError *time.Time `json:"last_error,omitempty"` + ErrorMessage string `json:"error_message,omitempty"` } // LogpushJobsResponse is the API response, containing an array of Logpush Jobs.
Add OwnershipChallenge token field to LogpushJob struct
diff --git a/presto-cli/src/main/java/com/facebook/presto/cli/Console.java b/presto-cli/src/main/java/com/facebook/presto/cli/Console.java index <HASH>..<HASH> 100644 --- a/presto-cli/src/main/java/com/facebook/presto/cli/Console.java +++ b/presto-cli/src/main/java/com/facebook/presto/cli/Console.java @@ -104,7 +104,7 @@ public class Console throw new RuntimeException("both --execute and --file specified"); } try { - query = Files.toString(new File(clientOptions.file), UTF_8); + query = Files.asCharSource(new File(clientOptions.file), UTF_8).read(); hasQuery = true; } catch (IOException e) {
Update deprecated use of Files.toString
diff --git a/lib/fog/bluebox/requests/blb/add_machine_to_lb_backend.rb b/lib/fog/bluebox/requests/blb/add_machine_to_lb_backend.rb index <HASH>..<HASH> 100644 --- a/lib/fog/bluebox/requests/blb/add_machine_to_lb_backend.rb +++ b/lib/fog/bluebox/requests/blb/add_machine_to_lb_backend.rb @@ -21,6 +21,7 @@ module Fog :path => "/api/lb_backends/#{lb_backend_id}/lb_machines.json", :body => body.map {|k,v| "#{CGI.escape(k)}=#{CGI.escape(v.to_s)}"}.join('&') ) + end end class Mock
[bluebox|blb] missing end
diff --git a/lib/lifx/client.js b/lib/lifx/client.js index <HASH>..<HASH> 100644 --- a/lib/lifx/client.js +++ b/lib/lifx/client.js @@ -253,6 +253,7 @@ Client.prototype.send = function(msg) { } } + msg.sequence = this.sequenceNumber; packet.data = Packet.toBuffer(msg); this.messagesQueue.unshift(packet);
Fix sequence number not set in header #<I>
diff --git a/ui/src/utils/date.js b/ui/src/utils/date.js index <HASH>..<HASH> 100644 --- a/ui/src/utils/date.js +++ b/ui/src/utils/date.js @@ -308,7 +308,7 @@ export function extractDate (str, mask, dateLocale) { const date = new Date( d.year, d.month === null ? null : d.month - 1, - d.day, + d.day === null ? 1 : d.day, d.hour, d.minute, d.second,
fix(extractDate): default to first day of month instead of last day of prev month when day is missing in the mask #<I> (#<I>)
diff --git a/tweepy/utils.py b/tweepy/utils.py index <HASH>..<HASH> 100644 --- a/tweepy/utils.py +++ b/tweepy/utils.py @@ -12,5 +12,6 @@ def list_to_csv(item_list): def parse_datetime(datetime_string): return datetime.datetime.strptime( - datetime_string, "%Y-%m-%dT%H:%M:%S.%f%z" - ) + datetime_string, "%Y-%m-%dT%H:%M:%S.%fZ" + ).replace(tzinfo=datetime.timezone.utc) + # Use %z when support for Python 3.6 is dropped
Fix parse_datetime to parse API datetime string format with Python <I> The '%z' directive didn't accept 'Z' until Python <I>
diff --git a/test/http/mock.js b/test/http/mock.js index <HASH>..<HASH> 100644 --- a/test/http/mock.js +++ b/test/http/mock.js @@ -9,15 +9,15 @@ describe("gpf.http.mock", function () { }); it("exposes a method to mock requests", function () { - assert("function" === typeof gpf.http.mock); + assert(typeof gpf.http.mock === "function"); }); it("exposes a method to remove one specific mocking", function () { - assert("function" === typeof gpf.http.mock.remove); + assert(typeof gpf.http.mock.remove === "function"); }); it("exposes a method to reset all mocking", function () { - assert("function" === typeof gpf.http.mock.reset); + assert(typeof gpf.http.mock.reset === "function"); }); describe("Simple mocking example", function () { @@ -59,7 +59,7 @@ describe("gpf.http.mock", function () { })["catch"](done); }); - if (0 === config.httpPort) { + if (config.httpPort === 0) { return; }
!yoda style (#<I>)
diff --git a/analysis/index.js b/analysis/index.js index <HASH>..<HASH> 100644 --- a/analysis/index.js +++ b/analysis/index.js @@ -1,7 +1,11 @@ 'use strict'; const Services = require('./../services/'); const Realtime = require('./../utils/realtime.js'); - + +function stringify_msg(msg) { + return (typeof msg === 'object' && !Array.isArray(msg) ? JSON.stringify(msg) : String(msg)); +} + class Analysis { constructor(analysis, token) { this._token = token; @@ -16,7 +20,7 @@ class Analysis { let tago_console = new Services(token).console; function log() { if (!process.env.TAGO_RUNTIME) console.log.apply(null, arguments); - return tago_console.log(arguments); + return tago_console.log(Object.keys(arguments).map(x => stringify_msg(arguments[x])).join(' ')); } let context = {
Added stringify to the console log
diff --git a/src/mixins/menuable.js b/src/mixins/menuable.js index <HASH>..<HASH> 100644 --- a/src/mixins/menuable.js +++ b/src/mixins/menuable.js @@ -283,10 +283,6 @@ export default { this.dimensions = Object.assign({}, dimensions) }, updateDimensions () { - // Ensure that overflow calculation - // can work properly every update - this.resetDimensions() - const dimensions = {} // Activator should already be shown
fix(menuable): removed position reset position reset was causing some browsers to recalc position before it could be reset causing a wobble fixes #<I>
diff --git a/activesupport/lib/active_support/secure_random.rb b/activesupport/lib/active_support/secure_random.rb index <HASH>..<HASH> 100644 --- a/activesupport/lib/active_support/secure_random.rb +++ b/activesupport/lib/active_support/secure_random.rb @@ -164,13 +164,13 @@ module ActiveSupport hex = n.to_s(16) hex = '0' + hex if (hex.length & 1) == 1 bin = [hex].pack("H*") - mask = bin[0].ord + mask = bin[0] mask |= mask >> 1 mask |= mask >> 2 mask |= mask >> 4 begin rnd = SecureRandom.random_bytes(bin.length) - rnd[0] = (rnd[0].ord & mask).chr + rnd[0] = rnd[0] & mask end until rnd < bin rnd.unpack("H*")[0].hex else diff --git a/activesupport/test/secure_random_test.rb b/activesupport/test/secure_random_test.rb index <HASH>..<HASH> 100644 --- a/activesupport/test/secure_random_test.rb +++ b/activesupport/test/secure_random_test.rb @@ -12,4 +12,8 @@ class SecureRandomTest < Test::Unit::TestCase b2 = ActiveSupport::SecureRandom.hex(64) assert_not_equal b1, b2 end + + def test_random_number + assert ActiveSupport::SecureRandom.random_number(5000) < 5000 + end end
<I> compatibility for random_number method on SecureRandom. <I> has its own version.
diff --git a/sixpack/web.py b/sixpack/web.py index <HASH>..<HASH> 100644 --- a/sixpack/web.py +++ b/sixpack/web.py @@ -42,6 +42,7 @@ def status(): @app.route("/") def hello(): experiments = Experiment.all(db.REDIS) + experiments = [exp.name for exp in experiments] return render_template('dashboard.html', experiments=experiments)
fix broken dashboard, expects list of names
diff --git a/test_maya.py b/test_maya.py index <HASH>..<HASH> 100644 --- a/test_maya.py +++ b/test_maya.py @@ -138,3 +138,17 @@ def test_comparison_operations(): assert (now >= now_copy) is True assert (now >= tomorrow) is False + + # Check Exceptions + with pytest.raises(TypeError): + now == 1 + with pytest.raises(TypeError): + now != 1 + with pytest.raises(TypeError): + now < 1 + with pytest.raises(TypeError): + now <= 1 + with pytest.raises(TypeError): + now > 1 + with pytest.raises(TypeError): + now >= 1
test for AttributeError in MayaDT comparison operators
diff --git a/views/v3/templates/master.blade.php b/views/v3/templates/master.blade.php index <HASH>..<HASH> 100644 --- a/views/v3/templates/master.blade.php +++ b/views/v3/templates/master.blade.php @@ -26,8 +26,12 @@ <body class="{{ $bodyClass }}" js-page-id="{{$pageID}}"> <div class="site-wrapper"> - {{-- Site header --}} - @includeIf('partials.header') + {{-- Site header --}} + @section('site-header') + @if (!empty($headerLayout)) + @includeIf('partials.header.' . $headerLayout) + @endif + @show {{-- Notices Notice::add() --}}
Fix: Set header view based on headerLayout setting
diff --git a/src/context/client-window.js b/src/context/client-window.js index <HASH>..<HASH> 100644 --- a/src/context/client-window.js +++ b/src/context/client-window.js @@ -1,5 +1,5 @@ /** - * @license ciao + * @license MIT <Gianluca Casati> http://g14n.info/flow-view */ var windowFunctions = require('../functions/window'),
Update client-window.js
diff --git a/lib/discordrb/light/integrations.rb b/lib/discordrb/light/integrations.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/light/integrations.rb +++ b/lib/discordrb/light/integrations.rb @@ -14,6 +14,9 @@ module Discordrb::Light # @return [String] the ID of the connected account attr_reader :id + # @return [Array<Integration>] the integrations associated with this connection + attr_reader :integrations + # @!visibility private def initialize(data, bot) @bot = bot
Add a reader for a connection's integrations
diff --git a/machinist/_fsm.py b/machinist/_fsm.py index <HASH>..<HASH> 100644 --- a/machinist/_fsm.py +++ b/machinist/_fsm.py @@ -1,5 +1,5 @@ # Copyright Hybrid Logic Ltd. See LICENSE file for details. -# -*- test-case-name: hybridcluster.tests.test_fsm -*- +# -*- test-case-name: machinist.test.test_fsm -*- """ Implementation details for machinist's public interface. diff --git a/machinist/test/test_fsm.py b/machinist/test/test_fsm.py index <HASH>..<HASH> 100644 --- a/machinist/test/test_fsm.py +++ b/machinist/test/test_fsm.py @@ -18,7 +18,7 @@ from twisted.python.util import FancyStrMixin from twisted.python.constants import Names, NamedConstant from twisted.trial.unittest import TestCase -from hybridcluster.fsm import ( +from machinist import ( ExtraTransitionState, MissingTransitionState, ExtraTransitionInput, MissingTransitionInput, ExtraTransitionOutput, MissingTransitionOutput,
Use better and/or correct names for modules in a couple places.