diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/test/www/jxcore/bv_tests/testThaliNativeLayer.js b/test/www/jxcore/bv_tests/testThaliNativeLayer.js
index <HASH>..<HASH> 100644
--- a/test/www/jxcore/bv_tests/testThaliNativeLayer.js
+++ b/test/www/jxcore/bv_tests/testThaliNativeLayer.js
@@ -1,6 +1,6 @@
'use strict';
-if (typeof Mobile === 'undefined') {
+if (!jxcore.utils.OSInfo().isMobile) {
return;
} | Disable the Thali native layer test on desktop.
It doesn't work anymore due to the way the Wifi infrastructure handles
the express router object. |
diff --git a/pysat/instruments/nasa_cdaweb_methods.py b/pysat/instruments/nasa_cdaweb_methods.py
index <HASH>..<HASH> 100644
--- a/pysat/instruments/nasa_cdaweb_methods.py
+++ b/pysat/instruments/nasa_cdaweb_methods.py
@@ -34,8 +34,8 @@ def list_files(tag=None, sat_id=None, data_path=None, format_str=None,
User specified file format. If None is specified, the default
formats associated with the supplied tags are used. (default=None)
supported_tags : (dict or NoneType)
- keys are tags supported by list_files routine. Values are the
- default format_str values for key. (default=None)
+ keys are sat_id, each containing a dict keyed by tag
+ where the values file format template strings. (default=None)
fake_daily_files_from_monthly : bool
Some CDAWeb instrument data files are stored by month, interfering
with pysat's functionality of loading by day. This flag, when true, | Updated docstring information on supported_tags |
diff --git a/lib/plugins/index.js b/lib/plugins/index.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/index.js
+++ b/lib/plugins/index.js
@@ -527,6 +527,7 @@ function resolvePluginRule(req) {
var rules = req.rules;
var plugin = req.pluginMgr = getPluginByRuleUrl(comUtil.rule.getUrl(rules.rule));
var _plugin = getPluginByPluginRule(rules.plugin);
+ req.ruleValue = plugin && comUtil.getMatcherValue(rules.rule);
if (_plugin) {
if (plugin) {
if (plugin != _plugin) { | refactor: Refine lib/plugins/index.js |
diff --git a/app/templates/gulp/watch-assets.js b/app/templates/gulp/watch-assets.js
index <HASH>..<HASH> 100644
--- a/app/templates/gulp/watch-assets.js
+++ b/app/templates/gulp/watch-assets.js
@@ -72,7 +72,6 @@ module.exports = function (gulp, plugins) {
plugins.watch([
'views/**/*.' + cfg.nitro.view_file_extension,
- '!' + cfg.nitro.view_partials_directory + '/*.' + cfg.nitro.view_file_extension, // exclude partials
cfg.nitro.view_data_directory + '/**/*.json',
'components/**/*.' + cfg.nitro.view_file_extension<% if (options.clientTpl) { %>,
'!components/**/template/**/*.hbs'<% } %>, | partial change reloads the browser |
diff --git a/src/Layers/DynamicMapLayer.js b/src/Layers/DynamicMapLayer.js
index <HASH>..<HASH> 100644
--- a/src/Layers/DynamicMapLayer.js
+++ b/src/Layers/DynamicMapLayer.js
@@ -70,6 +70,8 @@ L.esri.Layers.DynamicMapLayer = L.esri.Layers.RasterLayer.extend({
if(this.options.layers){
identifyRequest.layers('visible:' + this.options.layers.join(','));
+ } else {
+ identifyRequest.layers('visible');
}
identifyRequest.run(callback); | identify only visible layers in bindPopup |
diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java
index <HASH>..<HASH> 100644
--- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java
+++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2017 the original author or authors.
+ * Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. | Polish contribution
Closes gh-<I> |
diff --git a/plugins/SegmentEditor/Controller.php b/plugins/SegmentEditor/Controller.php
index <HASH>..<HASH> 100644
--- a/plugins/SegmentEditor/Controller.php
+++ b/plugins/SegmentEditor/Controller.php
@@ -26,7 +26,9 @@ class Piwik_SegmentEditor_Controller extends Piwik_Controller
foreach($segments as $segment) {
if($segment['category'] == Piwik_Translate('General_Visit')
&& $segment['type'] == 'metric') {
- $segment['category'] .= ' (' . lcfirst(Piwik_Translate('General_Metrics')) . ')';
+ $metricsLabel = Piwik_Translate('General_Metrics');
+ $metricsLabel[0] = strtolower($metricsLabel[0]);
+ $segment['category'] .= ' (' . $metricsLabel . ')';
}
$segmentsByCategory[$segment['category']][] = $segment;
} | Fixing lcfirst not available yet |
diff --git a/client/src/main/java/com/orientechnologies/orient/client/remote/message/ODistributedConnectResponse.java b/client/src/main/java/com/orientechnologies/orient/client/remote/message/ODistributedConnectResponse.java
index <HASH>..<HASH> 100644
--- a/client/src/main/java/com/orientechnologies/orient/client/remote/message/ODistributedConnectResponse.java
+++ b/client/src/main/java/com/orientechnologies/orient/client/remote/message/ODistributedConnectResponse.java
@@ -28,12 +28,14 @@ public class ODistributedConnectResponse implements OBinaryResponse {
@Override
public void write(OChannelDataOutput channel, int protocolVersion, ORecordSerializer serializer) throws IOException {
+ channel.writeInt(sessionId);
channel.writeInt(distributedProtocolVersion);
channel.writeBytes(token);
}
@Override
public void read(OChannelDataInput network, OStorageRemoteSession session) throws IOException {
+ this.sessionId = network.readInt();
distributedProtocolVersion = network.readInt();
token = network.readBytes();
} | fixed missing sessionId in distributed request |
diff --git a/src/Propel/Runtime/Map/DatabaseMap.php b/src/Propel/Runtime/Map/DatabaseMap.php
index <HASH>..<HASH> 100644
--- a/src/Propel/Runtime/Map/DatabaseMap.php
+++ b/src/Propel/Runtime/Map/DatabaseMap.php
@@ -184,7 +184,7 @@ class DatabaseMap
$this->addTableFromMapClass($tmClass);
return $this->tablesByPhpName[$phpName];
- } else if (class_exists($tmClass = substr_replace($phpName, '\\map\\', strrpos($phpName, '\\'), 1) . 'TableMap')) {
+ } else if (class_exists($tmClass = substr_replace($phpName, '\\Map\\', strrpos($phpName, '\\'), 1) . 'TableMap')) {
$this->addTableFromMapClass($tmClass);
return $this->tablesByPhpName[$phpName]; | Generator now creates the map and om folders camelcased Map and Om |
diff --git a/filesystem.go b/filesystem.go
index <HASH>..<HASH> 100644
--- a/filesystem.go
+++ b/filesystem.go
@@ -19,6 +19,7 @@ import (
"os"
"github.com/pkg/errors"
+ "regexp"
)
func EnsureDir(path string) error {
@@ -46,3 +47,21 @@ func GetFiles(path string) ([]string, error) {
}
return fileNames, nil
}
+
+func GetFilteredFiles(path string, filter string) ([]string, error) {
+ files, err := GetFiles(path)
+ if err != nil {
+ return nil, err
+ }
+ filterRegexp, err := regexp.Compile(filter)
+ if err != nil {
+ return nil, errors.Wrapf(err, "cannot compile filter regexp '%s'", filter)
+ }
+ filteredFiles := make([]string, 0, len(files))
+ for _, file := range files {
+ if filterRegexp.MatchString(file) {
+ filteredFiles = append(filteredFiles, file)
+ }
+ }
+ return filteredFiles, nil
+}
\ No newline at end of file | Add function to get files from directory, that match regexp. |
diff --git a/Form/Type/BaseType.php b/Form/Type/BaseType.php
index <HASH>..<HASH> 100644
--- a/Form/Type/BaseType.php
+++ b/Form/Type/BaseType.php
@@ -87,8 +87,10 @@ class BaseType extends AbstractFormType
$fieldOptions = array_merge($guess->getOptions(), $fieldOptions);
}
}
+ if ($meta->isAssociation($field)) {
+ $this->addValidConstraint($fieldOptions);
+ }
- $this->addValidConstraint($fieldOptions);
$builder->add($field, $fieldType, $fieldOptions);
}
} | Base form type: add "valid" constraint only for associations. |
diff --git a/lib/gds_zendesk/version.rb b/lib/gds_zendesk/version.rb
index <HASH>..<HASH> 100644
--- a/lib/gds_zendesk/version.rb
+++ b/lib/gds_zendesk/version.rb
@@ -1,3 +1,3 @@
module GDSZendesk
- VERSION = "1.0.1"
+ VERSION = "1.0.2"
end | Bump gem version to <I> (pushing to rubygems) |
diff --git a/src/rituals/invoke_tasks.py b/src/rituals/invoke_tasks.py
index <HASH>..<HASH> 100644
--- a/src/rituals/invoke_tasks.py
+++ b/src/rituals/invoke_tasks.py
@@ -23,6 +23,7 @@
# TODO: Move task bodies to common_tasks module, and just keep Invoke wrappers here
import os
+import sys
import shlex
import shutil
@@ -113,8 +114,18 @@ def dist(devpi=False, egg=True, wheel=False):
@task
def test():
"""Perform standard unittests."""
- config.load()
- run('python setup.py test')
+ cfg = config.load()
+ add_root2pypath(cfg)
+
+ try:
+ console = sys.stdin.isatty()
+ except AttributeError:
+ console = False
+
+ if console and os.path.exists('bin/py.test'):
+ run('bin/py.test --color=yes {0}'.format(cfg.testdir))
+ else:
+ run('python setup.py test')
@task | :arrow_upper_right: use colorized py.test output when printing to console |
diff --git a/test/mouse.spec.js b/test/mouse.spec.js
index <HASH>..<HASH> 100644
--- a/test/mouse.spec.js
+++ b/test/mouse.spec.js
@@ -136,5 +136,20 @@ module.exports.addTests = function({testRunner, expect, FFOX}) {
[200, 300]
]);
});
+ // @see https://crbug.com/929806
+ xit('should work with mobile viewports and cross process navigations', async({page, server}) => {
+ await page.goto(server.EMPTY_PAGE);
+ await page.setViewport({width: 360, height: 640, isMobile: true});
+ await page.goto(server.CROSS_PROCESS_PREFIX + '/mobile.html');
+ await page.evaluate(() => {
+ document.addEventListener('click', event => {
+ window.result = {x: event.clientX, y: event.clientY};
+ });
+ });
+
+ await page.mouse.click(30, 40);
+
+ expect(await page.evaluate('result')).toEqual({x: 30, y: 40});
+ });
});
}; | test(mouse): add failing for test for mobile + cross process navigation (#<I>) |
diff --git a/views/js/qtiRunner/modalFeedback/inlineRenderer.js b/views/js/qtiRunner/modalFeedback/inlineRenderer.js
index <HASH>..<HASH> 100644
--- a/views/js/qtiRunner/modalFeedback/inlineRenderer.js
+++ b/views/js/qtiRunner/modalFeedback/inlineRenderer.js
@@ -108,6 +108,10 @@ define([
firstFeedback = $(renderingData.dom);
}
+ $('img', renderingData.dom).on('load', function() {
+ iframeNotifier.parent('itemcontentchange');
+ });
+
//record rendered feedback for later reference
renderedFeebacks.push(renderingData);
if(renderedFeebacks.length === renderingQueue.length){ | Force frame resize when images nested inside inline feedback are loaded |
diff --git a/nodeconductor/structure/serializers.py b/nodeconductor/structure/serializers.py
index <HASH>..<HASH> 100644
--- a/nodeconductor/structure/serializers.py
+++ b/nodeconductor/structure/serializers.py
@@ -1,10 +1,11 @@
from __future__ import unicode_literals
+import re
+
from django.db import models as django_models
from django.contrib import auth
from django.core.exceptions import ValidationError
from rest_framework import serializers
-from rest_framework.reverse import reverse
from nodeconductor.core import serializers as core_serializers, utils as core_utils
from nodeconductor.structure import models, filters
@@ -503,13 +504,11 @@ class CreationTimeStatsSerializer(serializers.Serializer):
class PasswordSerializer(serializers.Serializer):
password = serializers.CharField(min_length=7)
- def validate(self, attrs):
- password = attrs.get('password')
-
- import re
-
- if not re.search('\d+', password):
+ def validate_password(self, value):
+ if not re.search('\d+', value):
raise serializers.ValidationError("Password must contain one or more digits")
- if not re.search('[^\W\d_]+', password):
+ if not re.search('[^\W\d_]+', value):
raise serializers.ValidationError("Password must contain one or more upper- or lower-case characters")
+
+ return value | Update password validation to DRF <I>
NC-<I> |
diff --git a/lib/health_inspector/checklists/cookbooks.rb b/lib/health_inspector/checklists/cookbooks.rb
index <HASH>..<HASH> 100644
--- a/lib/health_inspector/checklists/cookbooks.rb
+++ b/lib/health_inspector/checklists/cookbooks.rb
@@ -38,6 +38,7 @@ module HealthInspector
Chef::CookbookVersion::COOKBOOK_SEGMENTS.each do |segment|
cookbook.manifest[segment].each do |manifest_record|
path = cookbook_path.join("#{manifest_record['path']}")
+ next if path.basename.to_s == '.git'
if path.exist?
checksum = checksum_cookbook_file(path) | Fix a bug that happens with git submodules in some cases
Fixes #7 |
diff --git a/tooling/circle-cli/commands/verify-no-builds-on-branch.js b/tooling/circle-cli/commands/verify-no-builds-on-branch.js
index <HASH>..<HASH> 100644
--- a/tooling/circle-cli/commands/verify-no-builds-on-branch.js
+++ b/tooling/circle-cli/commands/verify-no-builds-on-branch.js
@@ -9,9 +9,22 @@ const tap = require(`../lib/tap`);
const blockUntilQueueEmpty = _.curry(function blockUntilQueueEmpty(argv, ci) {
return ci.getBranchBuilds(argv)
.then((builds) => {
- if (_.filter(builds, {status: `pending`}).length > 0 || _.filter(builds, {status: `running`}).length > 0) {
+
+ // lifecycle values:
+ // - queued
+ // - scheduled
+ // - not_run
+ // - not_running
+ // - running
+ // - finished
+ // I'm assuming not_run and finished are the only values the imply the
+ // build is not running or pending
+ const queued = builds
+ .filter((build) => build.lifecycle !== `finished` && build.lifecycle !== `not_run`);
+
+ if (queued.length > 0) {
return new Promise((resolve) => {
- console.log('waiting for queue to drain')
+ console.log(`waiting for queue to drain`);
setTimeout(() => resolve(blockUntilQueueEmpty(argv, ci)), argv.interval);
});
} | chore(tooling): adjust queuing logic |
diff --git a/pymbar/timeseries.py b/pymbar/timeseries.py
index <HASH>..<HASH> 100644
--- a/pymbar/timeseries.py
+++ b/pymbar/timeseries.py
@@ -389,7 +389,8 @@ def normalizedFluctuationCorrelationFunction(A_n, B_n=None, N_max=None, norm=Tru
N_max : int, default=None
if specified, will only compute correlation function out to time lag of N_max
norm: bool, optional, default=True
- if False will retrun the unnormalized correlation function D(t) = <A(t) B(t)>
+ if False will return the unnormalized correlation function D(t) = <A(t) B(t)>
+
Returns
-------
C_n : np.ndarray
@@ -488,6 +489,7 @@ def normalizedFluctuationCorrelationFunctionMultiple(A_kn, B_kn=None, N_max=None
if False, will return unnormalized D(t) = <A(t) B(t)>
truncate: bool, optional, default=False
if True, will stop calculating the correlation function when it goes below 0
+
Returns
-------
C_n[n] : np.ndarray
@@ -807,6 +809,7 @@ def statisticalInefficiency_fft(A_n, mintime=3, memsafe=True):
If this function is used several times on arrays of comparable size then one might benefit
from setting this option to False. If set to True then clear np.fft cache to avoid a fast
increase in memory consumption when this function is called on many arrays of different sizes.
+
Returns
-------
g : np.ndarray, | Fixes missing blank line before Returns section in docs |
diff --git a/src/Constraints/Enum.php b/src/Constraints/Enum.php
index <HASH>..<HASH> 100644
--- a/src/Constraints/Enum.php
+++ b/src/Constraints/Enum.php
@@ -17,8 +17,16 @@ class Enum implements Constraint
{
Assert::type($parameter, 'array', self::KEYWORD, $validator->getPointer());
- if (in_array($value, $parameter, true)) {
- return null;
+ if (is_object($value)) {
+ foreach ($parameter as $i) {
+ if (is_object($i) && $value == $i) {
+ return null;
+ }
+ }
+ } else {
+ if (in_array($value, $parameter, true)) {
+ return null;
+ }
}
return new ValidationError( | Fixes enum constraint edge case with objects equality (#<I>)
* Fixes enum constraint edge case with objects equality
closes #<I>
* fix code style |
diff --git a/pybliometrics/scopus/superclasses/search.py b/pybliometrics/scopus/superclasses/search.py
index <HASH>..<HASH> 100644
--- a/pybliometrics/scopus/superclasses/search.py
+++ b/pybliometrics/scopus/superclasses/search.py
@@ -60,7 +60,7 @@ class Search(Base):
ValueError
If the api parameter is an invalid entry.
"""
- params = {'count': count, 'view': view}
+ params = {'count': count, 'view': view, **kwds}
if isinstance(query, dict):
params.update(query)
name = "&".join(["=".join(t) for t in zip(query.keys(), query.values())]) | adding additionally provided parameters into account for the search paramters (#<I>) |
diff --git a/libaio/__init__.py b/libaio/__init__.py
index <HASH>..<HASH> 100644
--- a/libaio/__init__.py
+++ b/libaio/__init__.py
@@ -231,10 +231,10 @@ class AIOContext(object):
block (AIOBlock)
The IO block to cancel.
- Returns cancelled block's event data.
+ Returns cancelled block's event data (see getEvents).
"""
event = libaio.io_event()
- libaio.io_cancel(self._ctx, block._iocb, event)
+ libaio.io_cancel(self._ctx, byref(block._iocb), byref(event))
return self._eventToPython(event)
def getEvents(self, min_nr=1, nr=None, timeout=None):
@@ -250,6 +250,11 @@ class AIOContext(object):
timeout (float, None):
Time to wait for events.
If None, become blocking.
+
+ Returns a list of 3-tuples, containing:
+ - completed AIOBlock instance
+ - res, file-object-type-dependent value
+ - res2, another file-object-type-dependent value
"""
if nr is None:
nr = self._maxevents | libaio.AIOContext: Document event data a bit better.
Not documented by libaio, so found by reading kernel source.
Also, (hopefully) fix io_cancel arguments. |
diff --git a/src/core/renderers/webgl/managers/FilterManager.js b/src/core/renderers/webgl/managers/FilterManager.js
index <HASH>..<HASH> 100644
--- a/src/core/renderers/webgl/managers/FilterManager.js
+++ b/src/core/renderers/webgl/managers/FilterManager.js
@@ -203,6 +203,8 @@ FilterManager.prototype.applyFilter = function (filter, input, output, clear)
// bind the input texture..
input.texture.bind(0);
+ // when you manually bind a texture, please switch active texture location to it
+ renderer._activeTextureLocation = 0;
renderer.state.setBlendMode( filter.blendMode ); | when you manually bind a texture, please switch renderer active texture location to it |
diff --git a/lib/sass/plugin/staleness_checker.rb b/lib/sass/plugin/staleness_checker.rb
index <HASH>..<HASH> 100644
--- a/lib/sass/plugin/staleness_checker.rb
+++ b/lib/sass/plugin/staleness_checker.rb
@@ -104,7 +104,7 @@ module Sass
lambda do |dep|
begin
mtime(dep) > css_mtime || dependencies_stale?(dep, css_mtime)
- rescue Sass::SyntaxError
+ rescue Sass::SyntaxError, Errno::ENOENT
# If there's an error finding depenencies, default to recompiling.
true
end | [Sass] Make sure deleted dependencies are handled correctly. |
diff --git a/python/mxnet/libinfo.py b/python/mxnet/libinfo.py
index <HASH>..<HASH> 100644
--- a/python/mxnet/libinfo.py
+++ b/python/mxnet/libinfo.py
@@ -59,7 +59,7 @@ def find_lib_path(prefix='libmxnet'):
elif os.name == "posix" and os.environ.get('LD_LIBRARY_PATH', None):
dll_path[0:0] = [p.strip() for p in os.environ['LD_LIBRARY_PATH'].split(":")]
if os.name == 'nt':
- os.environ['PATH'] = os.path.dirname(__file__) + ';' + os.environ['PATH']
+ os.environ['PATH'] = os.path.dirname(__file__) + ';' + os.environ.get('PATH', '')
dll_path = [os.path.join(p, prefix + '.dll') for p in dll_path]
elif platform.system() == 'Darwin':
dll_path = [os.path.join(p, prefix + '.dylib') for p in dll_path] + \ | Fix Win Environ "PATH" does not exists Bug (#<I>)
When "PATH" are not in the environment, we will get error when reading os.environ['PATH'].
Change to os.environ.get('PATH', '') to fix it. |
diff --git a/closure/goog/vec/ray.js b/closure/goog/vec/ray.js
index <HASH>..<HASH> 100644
--- a/closure/goog/vec/ray.js
+++ b/closure/goog/vec/ray.js
@@ -36,17 +36,17 @@ goog.require('goog.vec.Vec3');
*/
goog.vec.Ray = function(opt_origin, opt_dir) {
/**
- * @type {goog.vec.Vec3.Number}
+ * @type {goog.vec.Vec3.Float64}
*/
- this.origin = goog.vec.Vec3.createNumber();
+ this.origin = goog.vec.Vec3.createFloat64();
if (opt_origin) {
goog.vec.Vec3.setFromArray(this.origin, opt_origin);
}
/**
- * @type {goog.vec.Vec3.Number}
+ * @type {goog.vec.Vec3.Float64}
*/
- this.dir = goog.vec.Vec3.createNumber();
+ this.dir = goog.vec.Vec3.createFloat64();
if (opt_dir) {
goog.vec.Vec3.setFromArray(this.dir, opt_dir);
} | Have goog.vec.Ray use Float<I>Array instead of Array.<number>. This
will make it easier to convert code that uses goog.vec.Ray to use
the new monomorphic goog.vec types.
-------------
Created by MOE: <URL> |
diff --git a/Serializer/Serializer.php b/Serializer/Serializer.php
index <HASH>..<HASH> 100644
--- a/Serializer/Serializer.php
+++ b/Serializer/Serializer.php
@@ -73,7 +73,7 @@ class Serializer implements SerializerInterface
*/
public final function normalize($data, $format = null)
{
- if ($this->customObjectNormalizers) {
+ if (is_object($data) && $this->customObjectNormalizers) {
foreach ($this->customObjectNormalizers as $normalizer) {
if ($normalizer->supportsNormalization($data, $format)) {
return $normalizer->normalize($data, $format);
diff --git a/Tests/Serializer/SerializerTest.php b/Tests/Serializer/SerializerTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Serializer/SerializerTest.php
+++ b/Tests/Serializer/SerializerTest.php
@@ -51,9 +51,12 @@ class SerializerTest extends \PHPUnit_Framework_TestCase
$list = new AuthorList();
$list->add(new Author('Bar'));
- $normalized = $serializer->normalize($list);
+ $normalized = $serializer->normalize($list);
$this->assertEquals(array(), $normalized);
+
+ $normalized = $serializer->normalize(array('foo'));
+ $this->assertEquals(array('foo'), $normalized);
}
public function testDenormalize() | minor performance tweak to reduce performance lost by previous commit |
diff --git a/packages/sproutcore-views/lib/views/container_view.js b/packages/sproutcore-views/lib/views/container_view.js
index <HASH>..<HASH> 100644
--- a/packages/sproutcore-views/lib/views/container_view.js
+++ b/packages/sproutcore-views/lib/views/container_view.js
@@ -8,17 +8,20 @@
require('sproutcore-views/views/view');
var get = SC.get, set = SC.set, meta = SC.meta;
+var childViewsProperty = SC.computed(function() {
+ return get(this, '_childViews');
+}).property('_childViews').cacheable();
+
SC.ContainerView = SC.View.extend({
init: function() {
var childViews = get(this, 'childViews');
- SC.defineProperty(this, 'childViews', SC.View.CHILD_VIEWS_CP);
+ SC.defineProperty(this, 'childViews', childViewsProperty);
this._super();
var _childViews = get(this, '_childViews');
-
childViews.forEach(function(viewName, idx) {
var view; | ContainerView should always delegate to _childViews. A ContainerView may not have virtual views as children. |
diff --git a/spec/bson/driver_bson_spec.rb b/spec/bson/driver_bson_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/bson/driver_bson_spec.rb
+++ b/spec/bson/driver_bson_spec.rb
@@ -29,15 +29,15 @@ describe 'Driver common bson tests' do
end
it 'parses the string value to the same value as the decoded document', if: test.from_string? do
- expect(BSON::Decimal128.from_string(test.string)).to eq(test.object)
+ expect(BSON::Decimal128.new(test.string)).to eq(test.object)
end
it 'parses the #to_s (match_string) value to the same value as the decoded document', if: test.match_string do
- expect(BSON::Decimal128.from_string(test.match_string)).to eq(test.object)
+ expect(BSON::Decimal128.new(test.match_string)).to eq(test.object)
end
it 'creates the correct object from a non canonical string and then prints to the correct string', if: test.match_string do
- expect(BSON::Decimal128.from_string(test.string).to_s).to eq(test.match_string)
+ expect(BSON::Decimal128.new(test.string).to_s).to eq(test.match_string)
end
it 'can be converted to a native type' do | Use #new on Decimal<I> when creating from a String |
diff --git a/src/core/instance/proxy.js b/src/core/instance/proxy.js
index <HASH>..<HASH> 100644
--- a/src/core/instance/proxy.js
+++ b/src/core/instance/proxy.js
@@ -15,9 +15,11 @@ if (process.env.NODE_ENV !== 'production') {
const warnNonPresent = (target, key) => {
warn(
- `Property or method "${key}" is not defined on the instance but ` +
- `referenced during render. Make sure to declare reactive data ` +
- `properties in the data option.`,
+ `Property or method "${key}" is not defined on the instance but` +
+ 'referenced during render. Make sure that this property is reactive, ' +
+ 'either in the data option, or for class-based components, by ' +
+ 'initializing the property.' +
+ 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
target
)
} | refactor: improve error msg for non-reactive properties (#<I>)
close #<I> |
diff --git a/src/ol/renderer/WebGL.js b/src/ol/renderer/WebGL.js
index <HASH>..<HASH> 100644
--- a/src/ol/renderer/WebGL.js
+++ b/src/ol/renderer/WebGL.js
@@ -236,6 +236,11 @@ ol.renderer.WebGL.prototype.draw = function(layers, center, resolution, animate)
for (j = 0; j < row.length; ++j) {
tile = row[j];
if (!tile.isLoaded()) {
+ if (!tile.isLoading()) {
+ tile.register('load', this.handleTileLoad, this);
+ tile.register('destroy', this.handleTileDestroy, this);
+ tile.load();
+ }
continue;
}
tileBounds = tile.getBounds(); | Trigger redraws on tile loads. |
diff --git a/djangoratings/views.py b/djangoratings/views.py
index <HASH>..<HASH> 100644
--- a/djangoratings/views.py
+++ b/djangoratings/views.py
@@ -86,5 +86,5 @@ class AddRatingFromModel(AddRatingView):
except ContentType.DoesNotExist:
raise Http404('Invalid `model` or `app_label`.')
- return super(AddRatingFromLabels, self).__call__(request, content_type.id,
+ return super(AddRatingFromModel, self).__call__(request, content_type.id,
object_id, field_name, score)
\ No newline at end of file | Quick fix for AddRatingFromModel |
diff --git a/jaraco/test/services.py b/jaraco/test/services.py
index <HASH>..<HASH> 100644
--- a/jaraco/test/services.py
+++ b/jaraco/test/services.py
@@ -328,7 +328,7 @@ class MongoDBFinder(paths.PathFinder):
# be found.
env_paths = [
os.path.join(os.environ[key], 'bin')
- for key in 'MONGODB_HOME'
+ for key in ['MONGODB_HOME']
if key in os.environ
]
candidate_paths = env_paths or heuristic_paths | Replace string constant with a list containing the string
Previously, the list comprehension would iterate over the
characters in the string, which is not the desired behavior.
--HG--
branch : fix-mongodbfinder |
diff --git a/lib/ohai/plugins/os.rb b/lib/ohai/plugins/os.rb
index <HASH>..<HASH> 100644
--- a/lib/ohai/plugins/os.rb
+++ b/lib/ohai/plugins/os.rb
@@ -18,10 +18,11 @@
provides "os", "os_version"
-require_plugin 'ruby'
+require 'rbconfig'
+
require_plugin 'kernel'
-case languages[:ruby][:host_os]
+case ::Config::CONFIG['host_os']
when /darwin(.+)$/
os "darwin"
when /linux/
@@ -42,7 +43,7 @@ when /mswin|mingw32|windows/
# subsystems.
os "windows"
else
- os languages[:ruby][:host_os]
+ os ::Config::CONFIG['host_os']
end
os_version kernel[:release] | OHAI-<I>: Dont use the ruby plugin to guess running OS.
We now directly use rbconfig, as does the ruby plugin. This allows ohai to run without a $PATH environment variable (but some plugins will not be accurate, as they need $PATH, as the ruby one). |
diff --git a/src/tests/test_acts_inspection.py b/src/tests/test_acts_inspection.py
index <HASH>..<HASH> 100644
--- a/src/tests/test_acts_inspection.py
+++ b/src/tests/test_acts_inspection.py
@@ -54,7 +54,7 @@ class PylintTest(unittest.TestCase):
assert parts[0] == 'pylint', "pylint is actually called"
assert '--reports=n' in parts, "no pylint reports by default"
assert '--rcfile=project.d/pylint.cfg' in parts, "pylint config is loaded"
- assert any(i.endswith('/src/tests/conftest.py"') for i in parts), "test files in pylint command: " + repr(parts)
+ assert '"src/tests/conftest.py"' in parts, "test files in pylint command: " + repr(parts)
assert '"setup.py"' in parts, "root files in pylint command: " + repr(parts)
def test_pylint_can_skip_test_files(self): | adapted test to new cwd path shortening |
diff --git a/ghost/admin/app/helpers/gh-format-post-time.js b/ghost/admin/app/helpers/gh-format-post-time.js
index <HASH>..<HASH> 100644
--- a/ghost/admin/app/helpers/gh-format-post-time.js
+++ b/ghost/admin/app/helpers/gh-format-post-time.js
@@ -3,7 +3,7 @@ import moment from 'moment';
import {assert} from '@ember/debug';
import {inject as service} from '@ember/service';
-export function formatPostTime(timeago, {timezone = 'ect/UTC', draft, scheduled, published}) {
+export function formatPostTime(timeago, {timezone = 'etc/UTC', draft, scheduled, published}) {
if (draft) {
// No special handling for drafts, just use moment.from
return moment(timeago).from(moment.utc()); | Fixed typo in default UTC timezone of `{{gh-format-post-time}}` helper
no issue
- was throwing errors from Moment.js in tests but not causing failures |
diff --git a/system_maintenance/admin.py b/system_maintenance/admin.py
index <HASH>..<HASH> 100644
--- a/system_maintenance/admin.py
+++ b/system_maintenance/admin.py
@@ -68,11 +68,11 @@ class MaintenanceAdmin(admin.ModelAdmin):
]
list_filter = [
+ 'status',
'system',
'maintenance_type',
'hardware',
'software',
- 'status',
'sys_admin',
] | Move 'status' to top of maintenance record list filter |
diff --git a/src/test/java/net/openhft/chronicle/map/StatelessMapClientTest.java b/src/test/java/net/openhft/chronicle/map/StatelessMapClientTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/net/openhft/chronicle/map/StatelessMapClientTest.java
+++ b/src/test/java/net/openhft/chronicle/map/StatelessMapClientTest.java
@@ -27,8 +27,8 @@ public class StatelessMapClientTest extends TestCase {
testReadValueWriteValue(new MyTestClass(3));
testReadValueWriteValue(new MyTestClassMarshallable(3));
- // testReadValueWriteValue(new MyTestClassExternalizable(3));
- // testReadValueWriteValue(new MyTestClassObjectGraph(3));
+ testReadValueWriteValue(new MyTestClassExternalizable(3));
+ testReadValueWriteValue(new MyTestClassObjectGraph(3));
}
@@ -165,14 +165,14 @@ public class StatelessMapClientTest extends TestCase {
public static class MyTestClassObjectGraph implements Serializable {
- MyTestClassMarshallable delegate;
+ MyTestClass delegate;
public MyTestClassObjectGraph() {
}
MyTestClassObjectGraph(int a) {
- delegate = new MyTestClassMarshallable(a);
+ delegate = new MyTestClass(a);
}
@Override | HCOLL-<I> Created a stateless map - added tests |
diff --git a/luigi/static/visualiser/js/visualiserApp.js b/luigi/static/visualiser/js/visualiserApp.js
index <HASH>..<HASH> 100644
--- a/luigi/static/visualiser/js/visualiserApp.js
+++ b/luigi/static/visualiser/js/visualiserApp.js
@@ -245,8 +245,9 @@ function visualiserApp(luigi) {
updateSidebar(tabId);
}
- function showErrorTrace(error) {
- $("#errorModal").empty().append(renderTemplate("errorTemplate", decodeError(error)));
+ function showErrorTrace(data) {
+ data.error = decodeError(data.error)
+ $("#errorModal").empty().append(renderTemplate("errorTemplate", data));
$("#errorModal").modal({});
} | Display decoded error message in graphs.
Error message was incorrectly passed to decodeError function. |
diff --git a/packages/babel-preset-pob-env/lib/index.js b/packages/babel-preset-pob-env/lib/index.js
index <HASH>..<HASH> 100644
--- a/packages/babel-preset-pob-env/lib/index.js
+++ b/packages/babel-preset-pob-env/lib/index.js
@@ -119,7 +119,10 @@ module.exports = function (context, opts) {
switch (targetOption) {
case 'node':
if (versionOption === 'current') {
- targetPreset = ['latest-node', { modules, loose, target: 'current' }];
+ targetPreset = [
+ resolvePreset('babel-preset-latest-node'),
+ { modules, loose, target: 'current' },
+ ];
} else {
// targetPreset = ['@babel/preset-env', { modules, loose, targets: { node: versionOption } }];
targetPreset = [ | fix(babel-preset-pob-env): resolve babel-preset-latest-node when version is current |
diff --git a/library/CM/FormField/File.js b/library/CM/FormField/File.js
index <HASH>..<HASH> 100644
--- a/library/CM/FormField/File.js
+++ b/library/CM/FormField/File.js
@@ -71,6 +71,13 @@ var CM_FormField_File = CM_FormField_Abstract.extend({
field.error(data.result.error.msg);
}
if (inProgressCount === 0) {
+ var cardinality = field.getOption("cardinality");
+ if (cardinality > 0) {
+ var $previews = field.$('.previews .preview');
+ if ($previews.length > cardinality) {
+ $previews.slice(0, $previews.length - cardinality).remove();
+ }
+ }
field.trigger("uploadComplete", data.files);
}
}, | Bring back cardinality check to CM_FormField_File |
diff --git a/ocrd_models/ocrd_page_user_methods/id.py b/ocrd_models/ocrd_page_user_methods/id.py
index <HASH>..<HASH> 100644
--- a/ocrd_models/ocrd_page_user_methods/id.py
+++ b/ocrd_models/ocrd_page_user_methods/id.py
@@ -1,5 +1,5 @@
@property
def id(self):
if hasattr(self, 'pcGtsId'):
- return self.pcGtsId
+ return self.pcGtsId or ''
return self.imageFilename | handle unset pcGtsId |
diff --git a/src/Http/Controllers/AppointmentController.php b/src/Http/Controllers/AppointmentController.php
index <HASH>..<HASH> 100644
--- a/src/Http/Controllers/AppointmentController.php
+++ b/src/Http/Controllers/AppointmentController.php
@@ -12,7 +12,6 @@ class AppointmentController extends AbstractController
public function __construct(BaseAdapterInterface $appointmentAdapter)
{
$this->appointmentAdapter = $appointmentAdapter;
- $this->middleware('auth:api');
}
public function index(Request $request = null)
diff --git a/src/Http/Controllers/PatientController.php b/src/Http/Controllers/PatientController.php
index <HASH>..<HASH> 100644
--- a/src/Http/Controllers/PatientController.php
+++ b/src/Http/Controllers/PatientController.php
@@ -14,7 +14,6 @@ class PatientController extends AbstractController
public function __construct( BaseAdapterInterface $patientAdapter )
{
$this->patientAdapter = $patientAdapter;
- $this->middleware('auth:api');
}
public function index(Request $request = null) | removed unused auth lines of code |
diff --git a/master/setup.py b/master/setup.py
index <HASH>..<HASH> 100755
--- a/master/setup.py
+++ b/master/setup.py
@@ -165,7 +165,6 @@ setup_args = {
'packages': [
"buildbot",
- "buildbot.buildslave",
"buildbot.configurators",
"buildbot.worker",
"buildbot.worker.protocols", | Don't build buildbot.buildslave package |
diff --git a/src/Option.php b/src/Option.php
index <HASH>..<HASH> 100644
--- a/src/Option.php
+++ b/src/Option.php
@@ -383,14 +383,6 @@ class Option
return $this->defaultValue;
}
- /*
- * set option spec key for saving option result
- */
- public function setKey($key)
- {
- $this->key = $key;
- }
-
/**
* get readable spec for printing.
* | setKey is not used, so it's removed |
diff --git a/conn.go b/conn.go
index <HASH>..<HASH> 100644
--- a/conn.go
+++ b/conn.go
@@ -28,6 +28,7 @@ type ConnConfig struct {
Password string
TLSConfig *tls.Config // config for TLS connection -- nil disables TLS
Logger Logger
+ KeepAlive uint16 // keep-alive period for the connetion (0 disables KeepAlive)
}
// Conn is a PostgreSQL connection handle. It is not safe for concurrent usage.
@@ -132,7 +133,11 @@ func Connect(config ConnConfig) (c *Conn, err error) {
}
} else {
c.logger.Info(fmt.Sprintf("Dialing PostgreSQL server at host: %s:%d", c.config.Host, c.config.Port))
- c.conn, err = net.Dial("tcp", fmt.Sprintf("%s:%d", c.config.Host, c.config.Port))
+ var d net.Dialer
+ if c.config.KeepAlive != 0 {
+ d.KeepAlive = time.Duration(c.config.KeepAlive) * time.Second
+ }
+ c.conn, err = d.Dial("tcp", fmt.Sprintf("%s:%d", c.config.Host, c.config.Port))
if err != nil {
c.logger.Error(fmt.Sprintf("Connection failed: %v", err))
return nil, err | Add keep-alive option by creating a dialer first, then setting KeepAlive option |
diff --git a/cake/console/libs/testsuite.php b/cake/console/libs/testsuite.php
index <HASH>..<HASH> 100644
--- a/cake/console/libs/testsuite.php
+++ b/cake/console/libs/testsuite.php
@@ -44,6 +44,9 @@ class TestSuiteShell extends Shell {
))->addArgument('file', array(
'help' => __('file name with folder prefix and without the test.php suffix.'),
'required' => true,
+ ))->addOption('filter', array(
+ 'help' => __('Filter which tests to run.'),
+ 'default' => false
));
return $parser;
}
@@ -106,6 +109,7 @@ class TestSuiteShell extends Shell {
$options = array();
$params = $this->params;
unset($params['help']);
+ $params = array_filter($params);
foreach ($params as $param => $value) {
$options[] = '--' . $param;
if (is_string($value)) { | Adding filter option to the testsuite, seems I forgot it. |
diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js
index <HASH>..<HASH> 100644
--- a/plugins/CoreHome/javascripts/broadcast.js
+++ b/plugins/CoreHome/javascripts/broadcast.js
@@ -315,6 +315,15 @@ var broadcast = {
}
}
+ var updatedUrl = new RegExp('&updated=([0-9]+)');
+ var updatedCounter = updatedUrl.exec(currentSearchStr);
+ if (!updatedCounter) {
+ currentSearchStr += '&updated=1';
+ } else {
+ updatedCounter = 1 + parseInt(updatedCounter[1]);
+ currentSearchStr = currentSearchStr.replace(new RegExp('(&updated=[0-9]+)'), '&updated=' + updatedCounter);
+ }
+
if (strHash && currentHashStr.length != 0) {
var params_hash_vals = strHash.split("&");
for (var i = 0; i < params_hash_vals.length; i++) { | make sure to reload page when requesting a new page |
diff --git a/lib/ronin/support/inflector.rb b/lib/ronin/support/inflector.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/support/inflector.rb
+++ b/lib/ronin/support/inflector.rb
@@ -22,7 +22,7 @@ module Ronin
# The Inflectors supported by ronin-support
INFLECTORS = {
:datamapper => {
- :path => 'dm-core/support/inflector',
+ :path => 'dm-core',
:const => 'DataMapper::Inflector'
},
:active_support => { | Require 'dm-core' for DataMapper::Support::Inflector.
* In dm-core edge they have removed 'dm-core/support/inflector.rb'. |
diff --git a/events_test.go b/events_test.go
index <HASH>..<HASH> 100644
--- a/events_test.go
+++ b/events_test.go
@@ -29,4 +29,5 @@ func TestEventDebounce(t *testing.T) {
if eventCount != eventsSeen {
t.Fatalf("expected to see %d events but got %d", eventCount, eventsSeen)
}
+ debouncer.stop()
} | Fix leaking goroutine in events_test.go |
diff --git a/mpop/satin/hdfeos_l1b.py b/mpop/satin/hdfeos_l1b.py
index <HASH>..<HASH> 100644
--- a/mpop/satin/hdfeos_l1b.py
+++ b/mpop/satin/hdfeos_l1b.py
@@ -91,7 +91,7 @@ class ModisReader(Reader):
if isinstance(kwargs.get("filename"), (list, set, tuple)):
# we got the entire dataset.
for fname in kwargs["filename"]:
- if fnmatch(fname, "M?D02?km*"):
+ if fnmatch(os.path.basename(fname), "M?D02?km*"):
resolution = self.res[os.path.basename(fname)[5]]
self.datafiles[resolution] = fname
else: | Fix name matching in hdfeos_l1b
The full name didn't work with fnmatch, take basename instead. |
diff --git a/pyqode/core/icons.py b/pyqode/core/icons.py
index <HASH>..<HASH> 100644
--- a/pyqode/core/icons.py
+++ b/pyqode/core/icons.py
@@ -15,7 +15,7 @@ except ImportError:
qta = None
#: This flag controls qtawesome icons should be preferred to theme/qrc icons.
-USE_QTAWESOME = True
+USE_QTAWESOME = False
#: Default options used for rendering an icon from qtawesome.
#: Options cannot be changed after the icon has been rendered so make sure | Set USE_QTAWESOME to False by default |
diff --git a/PHPCI/Command/InstallCommand.php b/PHPCI/Command/InstallCommand.php
index <HASH>..<HASH> 100644
--- a/PHPCI/Command/InstallCommand.php
+++ b/PHPCI/Command/InstallCommand.php
@@ -323,8 +323,8 @@ class InstallCommand extends Command
{
$output->write(Lang::get('setting_up_db'));
- $phinxBinary = escapeshellarg(PHPCI_DIR . 'vendor/bin/phinx');
- $phinxScript = escapeshellarg(PHPCI_DIR . 'phinx.php');
+ $phinxBinary = escapeshellarg(PHPCI_DIR . 'vendor/bin/phinx');
+ $phinxScript = escapeshellarg(PHPCI_DIR . 'phinx.php');
shell_exec($phinxBinary . ' migrate -c ' . $phinxScript);
$output->writeln('<info>'.Lang::get('ok').'</info>'); | Switching tabs to spaces as per style guide.
No functional changes. |
diff --git a/providence-tools-rpc/src/main/java/net/morimekta/providence/tools/rpc/RPCOptions.java b/providence-tools-rpc/src/main/java/net/morimekta/providence/tools/rpc/RPCOptions.java
index <HASH>..<HASH> 100644
--- a/providence-tools-rpc/src/main/java/net/morimekta/providence/tools/rpc/RPCOptions.java
+++ b/providence-tools-rpc/src/main/java/net/morimekta/providence/tools/rpc/RPCOptions.java
@@ -204,7 +204,8 @@ public class RPCOptions extends CommonOptions {
.collect(Collectors.toSet()));
throw new ArgumentException(
- "Unknown service %s in %s.\nFound %s",
+ "Unknown service %s in %s.\n" +
+ "Found %s",
service, namespace,
services.size() == 0 ? "none" : Strings.join(", ", services));
} | Exception nitpick in RPC tool. |
diff --git a/geomet/wkt.py b/geomet/wkt.py
index <HASH>..<HASH> 100644
--- a/geomet/wkt.py
+++ b/geomet/wkt.py
@@ -5,6 +5,9 @@ except ImportError:
import tokenize
+INVALID_WKT_FMT = 'Invalid WKT: `%s`'
+
+
def dump(obj, dest_file):
pass
@@ -125,7 +128,7 @@ def __load_point(tokens, string):
A GeoJSON `dict` representation of the WKT ``string``.
"""
if not tokens.next() == '(':
- raise ValueError('Invalid WKT: `%s`' % string)
+ raise ValueError(INVALID_WKT_FMT % string)
coords = []
try:
@@ -134,7 +137,7 @@ def __load_point(tokens, string):
break
coords.append(float(t))
except tokenize.TokenError:
- raise ValueError('Invalid WKT: `%s`' % string)
+ raise ValueError(INVALID_WKT_FMT % string)
return dict(type='Point', coordinates=coords) | wkt:
Defined a common/generic error message as a constant. |
diff --git a/core/src/main/java/net/automatalib/automata/base/fast/AbstractFastMutableNondet.java b/core/src/main/java/net/automatalib/automata/base/fast/AbstractFastMutableNondet.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/net/automatalib/automata/base/fast/AbstractFastMutableNondet.java
+++ b/core/src/main/java/net/automatalib/automata/base/fast/AbstractFastMutableNondet.java
@@ -16,6 +16,7 @@
package net.automatalib.automata.base.fast;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -73,7 +74,8 @@ public abstract class AbstractFastMutableNondet<S extends AbstractFastNondetStat
@Override
public Collection<T> getTransitions(S state, I input) {
int inputIdx = inputAlphabet.getSymbolIndex(input);
- return state.getTransitions(inputIdx);
+ final Collection<T> result = state.getTransitions(inputIdx);
+ return result == null ? Collections.emptySet() : result;
}
@Override | core: fix NPE on partial NFAs
(cherry picked from commit a<I>e<I>d<I>b<I>b<I>ae4d1c8e<I>dad8d) |
diff --git a/instaloader/structures.py b/instaloader/structures.py
index <HASH>..<HASH> 100644
--- a/instaloader/structures.py
+++ b/instaloader/structures.py
@@ -1182,7 +1182,11 @@ class Hashtag:
self._has_full_metadata = True
def _asdict(self):
- return self._node
+ json_node = self._node.copy()
+ # remove posts
+ json_node.pop("edge_hashtag_to_top_posts", None)
+ json_node.pop("edge_hashtag_to_media", None)
+ return json_node
def __repr__(self):
return "<Hashtag #{}>".format(self.name) | Omit media when saving Hashtag JSON |
diff --git a/libdokan/folderlist.go b/libdokan/folderlist.go
index <HASH>..<HASH> 100644
--- a/libdokan/folderlist.go
+++ b/libdokan/folderlist.go
@@ -56,15 +56,15 @@ func (fl *FolderList) reportErr(ctx context.Context,
// Dir.open as necessary.
func (fl *FolderList) open(ctx context.Context, oc *openContext, path []string) (f dokan.File, isDir bool, err error) {
fl.fs.log.CDebugf(ctx, "FL Lookup %#v", path)
+ if len(path) == 0 {
+ return oc.returnDirNoCleanup(fl)
+ }
+
defer func() {
fl.reportErr(ctx, libkbfs.ReadMode,
libkbfs.CanonicalTlfName(path[0]), err)
}()
- if len(path) == 0 {
- return oc.returnDirNoCleanup(fl)
- }
-
for oc.reduceRedirectionsLeft() {
name := path[0] | libdokan: Fix crash in github issue <I> |
diff --git a/gaugetest.py b/gaugetest.py
index <HASH>..<HASH> 100644
--- a/gaugetest.py
+++ b/gaugetest.py
@@ -4,7 +4,6 @@ import gc
import operator
import pickle
import random
-import sys
import time
import types
import weakref
@@ -820,8 +819,9 @@ def test_hypergauge_past_bugs(zigzag, bidir):
def test_randomly():
+ maxint = 2 ** 64 / 2
for y in range(100):
- seed = random.randint(0, sys.maxint)
+ seed = random.randrange(maxint)
g = random_gauge(seed)
for t, v in g.determine():
assert \ | don't use sys.maxint (deprecated at Python 3) |
diff --git a/salt/pillar/consul_pillar.py b/salt/pillar/consul_pillar.py
index <HASH>..<HASH> 100644
--- a/salt/pillar/consul_pillar.py
+++ b/salt/pillar/consul_pillar.py
@@ -114,9 +114,7 @@ from __future__ import absolute_import
# Import python libs
import logging
-
import re
-
import yaml
from salt.exceptions import CommandExecutionError
@@ -261,6 +259,10 @@ def get_conn(opts, profile):
pillarenv = opts_merged.get('pillarenv') or 'base'
params['dc'] = _resolve_datacenter(params['dc'], pillarenv)
+ consul_host = params.get('host')
+ consul_port = params.get('port')
+ consul_token = params.get('token')
+
if HAS_CONSUL:
# Sanity check. ACL Tokens are supported on python-consul 0.4.7 onwards only.
if CONSUL_VERSION >= '0.4.7': | Add consul host, port, and token values back in with conf.get() |
diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/ModelManager.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/ModelManager.java
index <HASH>..<HASH> 100644
--- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/ModelManager.java
+++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/ModelManager.java
@@ -43,7 +43,7 @@ public class ModelManager {
public void registerWellKnownNamespaces() {
if (namespaceManager != null) {
- if (namespaceManager.getNamespaceInfoFromUri("http://hl7.org/fhir") != null) {
+ if (namespaceManager.getNamespaceInfoFromUri("http://hl7.org/fhir") == null) {
namespaceManager.ensureNamespaceRegistered(new NamespaceInfo("FHIR", "http://hl7.org/fhir"));
}
namespaceManager.ensureNamespaceRegistered(new NamespaceInfo("ecqi.healthit.gov", "urn:healthit-gov")); | Added exception for FHIR as a well known namespace if the namespace manager is already aware of the namespace. |
diff --git a/lib/assets/models/index.js b/lib/assets/models/index.js
index <HASH>..<HASH> 100644
--- a/lib/assets/models/index.js
+++ b/lib/assets/models/index.js
@@ -17,7 +17,7 @@ if (config.use_env_variable) {
fs
.readdirSync(__dirname)
.filter(function(file) {
- return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) !== '.js');
+ return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
})
.forEach(function(file) {
var model = sequelize['import'](path.join(__dirname, file)); | [Fixed] Filtering of js files in models/index.js |
diff --git a/cache.go b/cache.go
index <HASH>..<HASH> 100644
--- a/cache.go
+++ b/cache.go
@@ -4,6 +4,7 @@ import (
"reflect"
"sync"
"sync/atomic"
+ "strings"
)
type cachedField struct {
@@ -76,6 +77,10 @@ func (s *structCacheMap) parseStruct(mode Mode, current reflect.Value, key refle
continue
}
+ if commaIndex := strings.Index(name, ","); commaIndex != -1 {
+ name = name[:commaIndex]
+ }
+
if mode == ModeExplicit && len(name) == 0 {
continue
} | get correct field name in struct tag that contain comma, such as json tag |
diff --git a/src/Rezzza/JobFlow/Scheduler/JobFlow.php b/src/Rezzza/JobFlow/Scheduler/JobFlow.php
index <HASH>..<HASH> 100644
--- a/src/Rezzza/JobFlow/Scheduler/JobFlow.php
+++ b/src/Rezzza/JobFlow/Scheduler/JobFlow.php
@@ -115,7 +115,7 @@ class JobFlow
$result = $this->runJob($msg);
- //$this->handleMessage($result);
+ $this->handleMessage($result);
}
return $result; | fix comment forgotten to close issue #9 |
diff --git a/shared/common-adapters/button.js b/shared/common-adapters/button.js
index <HASH>..<HASH> 100644
--- a/shared/common-adapters/button.js
+++ b/shared/common-adapters/button.js
@@ -26,7 +26,7 @@ export type Props = {
const Progress = ({small}) => (
<Box style={progress}>
- <ProgressIndicator style={progressStyle(small)} white={false} />
+ <ProgressIndicator style={progressStyle(small)} white={true} />
</Box>
) | button waiting state -> white (#<I>) |
diff --git a/grade/edit/tree/lib.php b/grade/edit/tree/lib.php
index <HASH>..<HASH> 100644
--- a/grade/edit/tree/lib.php
+++ b/grade/edit/tree/lib.php
@@ -273,12 +273,6 @@ class grade_edit_tree {
$root = true;
}
- $row_count_offset = 0;
-
- if (empty($category_total_item) && !$this->moving) {
- $row_count_offset = -1;
- }
-
$levelclass = "level$level";
$courseclass = '';
@@ -297,7 +291,7 @@ class grade_edit_tree {
$headercell->scope = 'row';
$headercell->attributes['title'] = $object->stripped_name;
$headercell->attributes['class'] = 'cell rowspan ' . $levelclass;
- $headercell->rowspan = $row_count+1+$row_count_offset;
+ $headercell->rowspan = $row_count + 1;
$row->cells[] = $headercell;
foreach ($this->columns as $column) { | MDL-<I> core_grade: removing some code that is messing up the categories and items screen when no grade categories are used |
diff --git a/locale/zh_CN.js b/locale/zh_CN.js
index <HASH>..<HASH> 100644
--- a/locale/zh_CN.js
+++ b/locale/zh_CN.js
@@ -19,7 +19,13 @@ const messages = {
image: (field) => `${field}不是一张有效的图片`,
included: (field) => `${field}不是一个有效值`,
ip: (field) => `${field}不是一个有效的地址`,
- length: (field, [minLength, maxLength]) => `${field}长度必须在${minLength}到${maxLength}之间`,
+ length: (field, [length, max]) => {
+ if (max) {
+ return `${field}长度必须在${length}到${max}之间`
+ }
+
+ return `${field}长度必须为${length}`
+ },
max: (field, [length]) => `${field}不能超过${length}个字符`,
max_value: (field, [max]) => `${field}必须小于或等于${max}`,
mimes: (field) => `${field}不是一个有效的文件类型`, | fix zh_CN message for length rule (#<I>)
* fix zh_CN message for length rule
* forget return |
diff --git a/symfit/core/fit.py b/symfit/core/fit.py
index <HASH>..<HASH> 100644
--- a/symfit/core/fit.py
+++ b/symfit/core/fit.py
@@ -729,7 +729,7 @@ class Constraint(Model):
# raise Exception(model)
if isinstance(constraint, Relational):
self.constraint_type = type(constraint)
- if isinstance(model, Model):
+ if isinstance(model, BaseModel):
self.model = model
else:
raise TypeError('The model argument must be of type Model.')
@@ -2269,4 +2269,4 @@ class ODEModel(CallableModel):
bound_arguments = self.__signature__.bind(*args, **kwargs)
Ans = namedtuple('Ans', [var.name for var in self])
ans = Ans(*self.eval_components(**bound_arguments.arguments))
- return ans
\ No newline at end of file
+ return ans | Constraint object work with all models now |
diff --git a/examples/authorization/routes/index.js b/examples/authorization/routes/index.js
index <HASH>..<HASH> 100644
--- a/examples/authorization/routes/index.js
+++ b/examples/authorization/routes/index.js
@@ -17,7 +17,7 @@ exports.login = function login(req, res) {
//
var user = db.getUser(req.body.username);
- if (!user) return res.send(401, { message: 'Bad credentials' });
+ if (!user) return res.status(401).send({ message: 'Bad credentials' });
//
// Check user's password and if it is correct return an authorization token.
@@ -28,7 +28,7 @@ exports.login = function login(req, res) {
return res.send(500, { message: 'Internal error' });
}
- if (user.key !== key) return res.send(401, { message: 'Bad credentials' });
+ if (user.key !== key) return res.status(401).send({ message: 'Bad credentials' });
var timestamp = Date.now(); | [example] Suppress a deprecation warning in the authorization example |
diff --git a/lib/simple_form/form_builder.rb b/lib/simple_form/form_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/simple_form/form_builder.rb
+++ b/lib/simple_form/form_builder.rb
@@ -527,7 +527,7 @@ module SimpleForm
case input_type
when :timestamp
:datetime
- when :string, nil
+ when :string, :citext, nil
case attribute_name.to_s
when /password/ then :password
when /time_zone/ then :time_zone | Set citext field type to email when field name is email |
diff --git a/alignak/objects/hostdependency.py b/alignak/objects/hostdependency.py
index <HASH>..<HASH> 100644
--- a/alignak/objects/hostdependency.py
+++ b/alignak/objects/hostdependency.py
@@ -261,6 +261,9 @@ class Hostdependencies(Items):
getattr(hostdep, 'dependent_host_name', None) is None:
continue
+ if hostdep.host_name not in hosts or hostdep.dependent_host_name not in hosts:
+ continue
+
hosts.add_act_dependency(hostdep.dependent_host_name, hostdep.host_name,
hostdep.notification_failure_criteria,
getattr(hostdep, 'dependency_period', ''), | Closes #<I>: host dependency exception when host not found |
diff --git a/pytest/test_grammar.py b/pytest/test_grammar.py
index <HASH>..<HASH> 100644
--- a/pytest/test_grammar.py
+++ b/pytest/test_grammar.py
@@ -46,6 +46,7 @@ def test_grammar():
unused_rhs.add("mkfunc_annotate")
unused_rhs.add("dict_comp")
unused_rhs.add("classdefdeco1")
+ unused_rhs.add("tryelsestmtl")
if PYTHON_VERSION >= 3.5:
expect_right_recursive.add((('l_stmts',
('lastl_stmt', 'come_froms', 'l_stmts')))) | Adjust grammar checking...
More conditional rules were added |
diff --git a/src/Illuminate/Database/DetectsLostConnections.php b/src/Illuminate/Database/DetectsLostConnections.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Database/DetectsLostConnections.php
+++ b/src/Illuminate/Database/DetectsLostConnections.php
@@ -51,6 +51,7 @@ trait DetectsLostConnections
'SQLSTATE[HY000]: General error: 1105 The last transaction was aborted due to Seamless Scaling. Please retry.',
'Temporary failure in name resolution',
'SSL: Broken pipe',
+ 'SQLSTATE[08S01]: Communication link failure',
]);
}
} | Add WSREP communication link failure for lost connection detection (#<I>) |
diff --git a/examples/sample3/scene/stage1.go b/examples/sample3/scene/stage1.go
index <HASH>..<HASH> 100644
--- a/examples/sample3/scene/stage1.go
+++ b/examples/sample3/scene/stage1.go
@@ -96,6 +96,7 @@ func (scene *Stage1) Initialize() {
// OnTouchBegin is called when Stage1 scene is Touched.
func (scene *Stage1) OnTouchBegin(x, y float32) {
scene.isTouching = true
+
}
// OnTouchMove is called when Stage1 scene is Touched and moved.
@@ -107,7 +108,9 @@ func (scene *Stage1) OnTouchMove(x, y float32) {
func (scene *Stage1) OnTouchEnd(x, y float32) {
scene.isTouching = false
- if scene.gamestate == readyToRestart {
+ if scene.gamestate == readyToStart {
+ scene.gamestate = started
+ } else if scene.gamestate == readyToRestart {
// TODO: methodize
scene.resetPosition()
scene.views.restart()
@@ -277,6 +280,8 @@ func (scene *Stage1) registerModels() {
// This is used to update sprites position.
// This will be called 60 times per sec.
func (scene *Stage1) Drive() {
- scene.models.Progress(scene.isTouching)
- scene.views.Progress(scene.isTouching)
+ if scene.gamestate == started {
+ scene.models.Progress(scene.isTouching)
+ scene.views.Progress(scene.isTouching)
+ }
} | [#<I>] temporary commit. |
diff --git a/pymzn/mzn/solvers.py b/pymzn/mzn/solvers.py
index <HASH>..<HASH> 100644
--- a/pymzn/mzn/solvers.py
+++ b/pymzn/mzn/solvers.py
@@ -116,7 +116,7 @@ class Solver:
seed : int
The random number generator seed to pass to the solver.
"""
- args = []
+ args = ['-s', '-v']
if all_solutions:
args.append('-a')
if num_solutions is not None: | solvers: put back statistics and verbose options |
diff --git a/seneca.js b/seneca.js
index <HASH>..<HASH> 100644
--- a/seneca.js
+++ b/seneca.js
@@ -184,7 +184,7 @@ module.exports = function init (seneca_options, more_options) {
var seneca = make_seneca(_.extend({}, seneca_options, more_options))
var options = seneca.options()
- seneca.log.info({kind: 'notice', notice: 'hello'})
+ seneca.log.info({kind: 'notice', notice: 'seneca started'})
// The 'internal' key of options is reserved for objects and functions
// that provide functionality, and are thus not really printable | Update seneca.js
Changed 'hello' to 'seneca started' based on user feedback |
diff --git a/salt/states/network.py b/salt/states/network.py
index <HASH>..<HASH> 100644
--- a/salt/states/network.py
+++ b/salt/states/network.py
@@ -276,8 +276,8 @@ def routes(name, **kwargs):
kwargs['test'] = __opts__['test']
# Build interface routes
try:
- old = __salt__['ip.get_routes'](**kwargs)
- new = __salt__['ip.build_routes'](**kwargs)
+ old = __salt__['ip.get_routes'](name)
+ new = __salt__['ip.build_routes'](name, **kwargs)
if __opts__['test']:
if old == new:
return ret
@@ -306,7 +306,7 @@ def routes(name, **kwargs):
# Apply interface routes
if apply_net_settings:
try:
- __salt__['ip.apply_network_routes'](**kwargs)
+ __salt__['ip.apply_network_settings'](**kwargs)
except AttributeError as error:
ret['result'] = False
ret['comment'] = error.message | Sync compatibility between network state and ip module |
diff --git a/core/dbt/compilation.py b/core/dbt/compilation.py
index <HASH>..<HASH> 100644
--- a/core/dbt/compilation.py
+++ b/core/dbt/compilation.py
@@ -46,8 +46,10 @@ def print_compile_stats(stats):
results = {k: 0 for k in names.keys()}
results.update(stats)
- stat_line = ", ".join(
- [dbt.utils.pluralize(ct, names.get(t)) for t, ct in results.items()])
+ stat_line = ", ".join([
+ dbt.utils.pluralize(ct, names.get(t)) for t, ct in results.items()
+ if t in names
+ ])
logger.info("Found {}".format(stat_line))
diff --git a/core/dbt/logger.py b/core/dbt/logger.py
index <HASH>..<HASH> 100644
--- a/core/dbt/logger.py
+++ b/core/dbt/logger.py
@@ -315,7 +315,7 @@ class HookMetadata(NodeMetadata):
]
-class TimestampNamed(JsonOnly):
+class TimestampNamed(logbook.Processor):
def __init__(self, name: str):
self.name = name
super().__init__() | fix for stdout logging of on-run- hooks |
diff --git a/rdfunit-core/src/main/java/org/aksw/rdfunit/validate/wrappers/RDFUnitStaticValidator.java b/rdfunit-core/src/main/java/org/aksw/rdfunit/validate/wrappers/RDFUnitStaticValidator.java
index <HASH>..<HASH> 100644
--- a/rdfunit-core/src/main/java/org/aksw/rdfunit/validate/wrappers/RDFUnitStaticValidator.java
+++ b/rdfunit-core/src/main/java/org/aksw/rdfunit/validate/wrappers/RDFUnitStaticValidator.java
@@ -65,6 +65,7 @@ public final class RDFUnitStaticValidator {
final boolean enableRDFUnitLogging = false;
final SimpleTestExecutorMonitor testExecutorMonitor = new SimpleTestExecutorMonitor(enableRDFUnitLogging);
+ testExecutorMonitor.setExecutionType(executionType);
final TestExecutor testExecutor = TestExecutorFactory.createTestExecutor(executionType);
checkNotNull(testExecutor, "TestExecutor should not be null"); | bug: add test execution type in monitor |
diff --git a/lib/cool.io/dsl.rb b/lib/cool.io/dsl.rb
index <HASH>..<HASH> 100644
--- a/lib/cool.io/dsl.rb
+++ b/lib/cool.io/dsl.rb
@@ -43,7 +43,7 @@ module Coolio
raise NameError, "No connection type registered for #{connection_name.inspect}"
end
- Cool.io::TCPServer.new host, port, klass, initializer_args
+ Cool.io::TCPServer.new host, port, klass, *initializer_args
end
# Create a new Cool.io::TCPSocket class | Blah, missing splat :( |
diff --git a/Generator/Column.php b/Generator/Column.php
index <HASH>..<HASH> 100644
--- a/Generator/Column.php
+++ b/Generator/Column.php
@@ -252,6 +252,9 @@ class Column
return $this->filterOn = $filterOn;
}
+ /**
+ * @param string $text
+ */
private function humanize($text)
{
return ucfirst(str_replace('_', ' ', $text)); | Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on <URL> |
diff --git a/source/source.go b/source/source.go
index <HASH>..<HASH> 100644
--- a/source/source.go
+++ b/source/source.go
@@ -23,6 +23,7 @@ import (
"bufio"
"os/exec"
"syscall"
+ "sync"
)
type Sourcer interface {
@@ -30,12 +31,12 @@ type Sourcer interface {
}
type Source struct {
- command string
- args []string
+ Command string
+ Args []string
}
func (s *Source) Generate(out chan interface{}, ech chan error) {
- cmd := exec.Command(s.command, s.args...)
+ cmd := exec.Command(s.Command, s.Args...)
reader, err := cmd.StdoutPipe()
if err != nil {
@@ -46,13 +47,14 @@ func (s *Source) Generate(out chan interface{}, ech chan error) {
scanner := bufio.NewScanner(reader)
- done := make(chan bool)
+ var done sync.WaitGroup
+ done.Add(1)
go func() {
for scanner.Scan() {
out <- scanner.Text()
}
close(out)
- done <- true
+ done.Done()
}()
if err = cmd.Start(); err != nil {
@@ -61,7 +63,7 @@ func (s *Source) Generate(out chan interface{}, ech chan error) {
return
}
- <-done
+ done.Wait()
status := cmd.Wait()
var waitStatus syscall.WaitStatus | Wait group added instread of blocking send |
diff --git a/app/models/user_notifier/base.rb b/app/models/user_notifier/base.rb
index <HASH>..<HASH> 100644
--- a/app/models/user_notifier/base.rb
+++ b/app/models/user_notifier/base.rb
@@ -1,5 +1,6 @@
class UserNotifier::Base < ActiveRecord::Base
self.abstract_class = true
+ after_commit :deliver
def self.notify_once(template_name, user, source = nil, params = {})
notify(template_name, user, source, params) if is_unique?(template_name, {self.user_association_name => user})
@@ -14,7 +15,7 @@ class UserNotifier::Base < ActiveRecord::Base
from_name: UserNotifier.from_name,
source: source,
self.user_association_name => user
- }.merge(params)).tap{|n| n.deliver }
+ }.merge(params))
end
def deliver | call deliver after commit changes to tha database |
diff --git a/puz.py b/puz.py
index <HASH>..<HASH> 100644
--- a/puz.py
+++ b/puz.py
@@ -14,6 +14,8 @@ maskstring = 'ICHEATED'
ACROSSDOWN = 'ACROSS&DOWN'
BLACKSQUARE = '.'
+ENCODING = 'ISO-8859-1'
+
extension_header_format = '< 4s H H '
def enum(**enums):
@@ -302,9 +304,8 @@ class PuzzleBuffer:
wraps a data buffer ('' or []) and provides .puz-specific methods for
reading and writing data
"""
- def __init__(self, data=None, enc='ISO-8859-1'):
+ def __init__(self, data=None):
self.data = data or []
- self.enc = enc
self.pos = 0
def can_read(self, bytes=1):
@@ -329,7 +330,7 @@ class PuzzleBuffer:
def read_until(self, c):
start = self.pos
self.seek_to(c, 1) # read past
- return unicode(self.data[start:self.pos-1], self.enc)
+ return unicode(self.data[start:self.pos-1], ENCODING)
def seek(self, pos):
self.pos = pos
@@ -348,7 +349,7 @@ class PuzzleBuffer:
def write_string(self, s):
s = s or ''
- self.data.append(s.encode(self.enc) + '\0')
+ self.data.append(s.encode(ENCODING) + '\0')
def pack(self, format, *values):
self.data.append(struct.pack(format, *values)) | Refactored encoding to be a module constant as we'll need it elsewhere |
diff --git a/views/errors.blade.php b/views/errors.blade.php
index <HASH>..<HASH> 100644
--- a/views/errors.blade.php
+++ b/views/errors.blade.php
@@ -1,3 +1,3 @@
-@if ( $errors->any() )
+@if ( isset($errors) && $errors->any() )
@include('notice::message', ['class' => 'alert-danger', 'message' => implode('',$errors->all('<p>:message</p>'))])
@endif
\ No newline at end of file | Updated errors view to check if $errors variable available |
diff --git a/Manager/LogManager.php b/Manager/LogManager.php
index <HASH>..<HASH> 100644
--- a/Manager/LogManager.php
+++ b/Manager/LogManager.php
@@ -657,7 +657,7 @@ class LogManager
$userSearch = null;
if (array_key_exists('filter', $data)) {
- $decodeFilter = json_decode(urldecode($data['filter']));
+ $decodeFilter = json_decode(urldecode($data['filter']), true);
if ($decodeFilter !== null) {
$action = $decodeFilter->action;
$range = $dateRangeToTextTransformer->reverseTransform($decodeFilter->range); | [CoreBundle] Fixing log manager. |
diff --git a/pkg/services/sqlstore/migrations/migrations_test.go b/pkg/services/sqlstore/migrations/migrations_test.go
index <HASH>..<HASH> 100644
--- a/pkg/services/sqlstore/migrations/migrations_test.go
+++ b/pkg/services/sqlstore/migrations/migrations_test.go
@@ -6,6 +6,7 @@ import (
"github.com/go-xorm/xorm"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
+ "github.com/inconshreveable/log15"
. "github.com/smartystreets/goconvey/convey"
)
@@ -28,7 +29,7 @@ func TestMigrations(t *testing.T) {
sqlutil.CleanDB(x)
mg := NewMigrator(x)
- //mg.LogLevel = log.DEBUG
+ mg.Logger.SetHandler(log15.DiscardHandler())
AddMigrations(mg)
err = mg.Start() | feat(logging): disable migrator logging during test |
diff --git a/bcbio/structural/plot.py b/bcbio/structural/plot.py
index <HASH>..<HASH> 100644
--- a/bcbio/structural/plot.py
+++ b/bcbio/structural/plot.py
@@ -30,12 +30,13 @@ def breakpoints_by_caller(bed_files):
merged = concat(bed_files)
if not merged:
return []
- grouped_start = merged.groupby(g=[1, 2, 2], c=4, o=["distinct"])
- grouped_end = merged.groupby(g=[1, 3, 3], c=4, o=["distinct"])
+ grouped_start = merged.groupby(g=[1, 2, 2], c=4, o=["distinct"]).filter(lambda r: r.end > r.start).saveas()
+ grouped_end = merged.groupby(g=[1, 3, 3], c=4, o=["distinct"]).filter(lambda r: r.end > r.start).saveas()
together = concat([grouped_start, grouped_end])
- final = together.expand(c=4)
- final = final.sort()
- return final
+ if together:
+ final = together.expand(c=4)
+ final = final.sort()
+ return final
def _get_sv_callers(items):
""" | Handle plotting edge cases with missing or out of order breakends |
diff --git a/worker/buildbot_worker/test/test_util_hangcheck.py b/worker/buildbot_worker/test/test_util_hangcheck.py
index <HASH>..<HASH> 100644
--- a/worker/buildbot_worker/test/test_util_hangcheck.py
+++ b/worker/buildbot_worker/test/test_util_hangcheck.py
@@ -186,6 +186,9 @@ def reportUnhandledErrors(case, d):
Make sure that any unhandled errors from the
given deferred are reported when the test case
ends.
+
+ :param case: The test case that will handle cleanup.
+ :param Deferred d: The deferred to check for unhandled errors.
"""
def cleanup():
if isinstance(d.result, Failure):
@@ -198,6 +201,10 @@ def listen(case, endpoint, factory):
"""
Listen on an endpoint and cleanup when the
test case ends.
+
+ :param case: The test case that will handle cleanup.
+ :param IStreamServerEndpoint endpoint: The endpoint to listen on.
+ :param IProtocolFactory factory: The factory for the server protocol.
"""
d = endpoint.listen(factory) | Add some more docstrings. |
diff --git a/session_security/static/session_security/script.js b/session_security/static/session_security/script.js
index <HASH>..<HASH> 100644
--- a/session_security/static/session_security/script.js
+++ b/session_security/static/session_security/script.js
@@ -83,8 +83,8 @@ yourlabs.SessionSecurity.prototype = {
// Throttle these checks to once per second
return;
+ var idleFor = Math.floor((now - this.lastActivity) / 1000);
this.lastActivity = now;
- var idleFor = Math.floor((new Date() - this.lastActivity) / 1000);
if (this.$warning.is(':visible')) {
// Inform the server that the user came back manually, this should | Check idleFor with lastActivity
When checking activity it should always compare the time vs how long the session has been idle and check it against the expire time that has been set. |
diff --git a/test/clone.js b/test/clone.js
index <HASH>..<HASH> 100644
--- a/test/clone.js
+++ b/test/clone.js
@@ -45,6 +45,7 @@ var URLS = [
'https://github.com/mafintosh/swap-to-level.git',
'https://github.com/mafintosh/telephone.git',
'https://github.com/mafintosh/what-line-is-this.git',
+ 'https://github.com/maxogden/dat-core',
'https://github.com/maxogden/standard-format.git',
// 'https://github.com/ngoldman/gh-release.git', // still using standard v2
'https://github.com/ngoldman/magnet-link.git', | tests: maxogden/dat-core is standard |
diff --git a/src/pyprinttags.py b/src/pyprinttags.py
index <HASH>..<HASH> 100755
--- a/src/pyprinttags.py
+++ b/src/pyprinttags.py
@@ -42,7 +42,7 @@ def script():
inputFunction = raw_input
else:
inputFunction = input
- if not args.batch and inputFunction("remove unsupported properties? [yN] ") in "yY":
+ if not args.batch and inputFunction("remove unsupported properties? [yN] ").lower() in ["y", "yes"]:
audioFile.removeUnsupportedProperties(audioFile.unsupported)
audioFile.save() | fix bug resulting in accidental data loss |
diff --git a/api/api_v1.py b/api/api_v1.py
index <HASH>..<HASH> 100644
--- a/api/api_v1.py
+++ b/api/api_v1.py
@@ -330,7 +330,7 @@ def search_people():
@app.route('/v1/transactions', methods=['POST'])
-@auth_required()
+#@auth_required()
@parameters_required(['signed_hex'])
@crossdomain(origin='*')
def broadcast_tx():
@@ -355,8 +355,8 @@ def broadcast_tx():
@app.route('/v1/addresses/<address>/unspents', methods=['GET'])
-@auth_required(exception_paths=[
- '/v1/addresses/19bXfGsGEXewR6TyAV3b89cSHBtFFewXt6/unspents'])
+#@auth_required(exception_paths=[
+# '/v1/addresses/19bXfGsGEXewR6TyAV3b89cSHBtFFewXt6/unspents'])
@crossdomain(origin='*')
def get_address_unspents(address): | remove the auth requirements from the unspents endpoint and the transaction posting endpoint |
diff --git a/spec/models/concerns/storable/collection_spec.rb b/spec/models/concerns/storable/collection_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/models/concerns/storable/collection_spec.rb
+++ b/spec/models/concerns/storable/collection_spec.rb
@@ -74,7 +74,7 @@ describe Concerns::Storable::Collection do
describe 'read from db' do
it 'db contains string' do
page = create(:page)
- create(:store, storable_type: 'Page', storable_id: page.id, name: 'foo', value: 'baz')
+ create(:store, storable_type: 'Page', storable_id: page.id, klass: 'string', name: 'foo', value: 'baz')
@config.add :foo, :string
collection = model.new(page, @config)
@@ -83,7 +83,7 @@ describe Concerns::Storable::Collection do
it 'db contains something else' do
page = create(:page)
- create(:store, storable_type: 'Page', storable_id: page.id, name: 'foo', value: 1337)
+ create(:store, storable_type: 'Page', storable_id: page.id, klass: 'string', name: 'foo', value: 1337)
@config.add :foo, :string
collection = model.new(page, @config) | Explicitly define the store klass as string. |
diff --git a/lib/DoctrineExtensions/Taggable/TagManager.php b/lib/DoctrineExtensions/Taggable/TagManager.php
index <HASH>..<HASH> 100644
--- a/lib/DoctrineExtensions/Taggable/TagManager.php
+++ b/lib/DoctrineExtensions/Taggable/TagManager.php
@@ -173,6 +173,10 @@ class TagManager
->delete($this->taggingClass, 't')
->where('t.tag_id')
->where($builder->expr()->in('t.tag', $tagsToRemove))
+ ->andWhere('t.resourceType = :resourceType')
+ ->setParameter('resourceType', $resource->getTaggableType())
+ ->andWhere('t.resourceId = :resourceId')
+ ->setParameter('resourceId', $resource->getTaggableId())
->getQuery()
->getResult()
; | [saveTagging method] add clause in doctrine query to delete only tagging of the resource given in parameter |
diff --git a/src/Configuration.php b/src/Configuration.php
index <HASH>..<HASH> 100644
--- a/src/Configuration.php
+++ b/src/Configuration.php
@@ -342,8 +342,8 @@ class Configuration implements ConfigurationInterface, ListenerAwareConfiguratio
* The array with the custom header mappings.
*
* @var array
- * @Type("array")
* @SerializedName("header-mappings")
+ * @Type("array<string, array<string, string>>")
*/
protected $headerMappings = array();
@@ -1042,17 +1042,7 @@ class Configuration implements ConfigurationInterface, ListenerAwareConfiguratio
*/
public function getHeaderMappings()
{
-
- // initialize the array for the custom header mappings
- $headerMappings = array();
-
- // try to load the configured header mappings
- if ($headerMappingsAvailable = reset($this->headerMappings)) {
- $headerMappings = $headerMappingsAvailable;
- }
-
- // return the custom header mappings
- return $headerMappings;
+ return $this->headerMappings;
}
/**
@@ -1062,17 +1052,7 @@ class Configuration implements ConfigurationInterface, ListenerAwareConfiguratio
*/
public function getImageTypes()
{
-
- // initialize the array for the custom image types
- $imageTypes = array();
-
- // try to load the configured image types
- if ($imageTypesAvailable = reset($this->imageTypes)) {
- $imageTypes = $imageTypesAvailable;
- }
-
- // return the custom image types
- return $imageTypes;
+ return $this->imageTypes;
}
/** | Refactor header-mappings structure |
diff --git a/src/de/lmu/ifi/dbs/elki/visualization/batikutil/ThumbnailRegistryEntry.java b/src/de/lmu/ifi/dbs/elki/visualization/batikutil/ThumbnailRegistryEntry.java
index <HASH>..<HASH> 100644
--- a/src/de/lmu/ifi/dbs/elki/visualization/batikutil/ThumbnailRegistryEntry.java
+++ b/src/de/lmu/ifi/dbs/elki/visualization/batikutil/ThumbnailRegistryEntry.java
@@ -226,7 +226,7 @@ public class ThumbnailRegistryEntry extends AbstractRegistryEntry implements URL
@Override
public ParsedURLData parseURL(String urlStr) {
if(logger.isDebuggingFinest()) {
- logger.debugFinest("parseURL: " + urlStr, new Throwable());
+ logger.debugFinest("parseURL: " + urlStr);
}
if(urlStr.startsWith(INTERNAL_PREFIX)) {
InternalParsedURLData ret = new InternalParsedURLData(urlStr.substring(INTERNAL_PREFIX.length())); | Less verbose logging. The tracebacks aren't that useful anymore. |
diff --git a/tests/integration/test_record_mode.py b/tests/integration/test_record_mode.py
index <HASH>..<HASH> 100644
--- a/tests/integration/test_record_mode.py
+++ b/tests/integration/test_record_mode.py
@@ -87,6 +87,22 @@ def test_new_episodes_record_mode_two_times(tmpdir):
response = urlopen('http://httpbin.org/').read()
+def test_once_mode_after_new_episodes(tmpdir):
+ testfile = str(tmpdir.join('recordmode.yml'))
+ with vcr.use_cassette(testfile, record_mode="new_episodes"):
+ # cassette file doesn't exist, so create.
+ response1 = urlopen('http://httpbin.org/').read()
+
+ with vcr.use_cassette(testfile, record_mode="once") as cass:
+ # make the same request again
+ response = urlopen('http://httpbin.org/').read()
+
+ # now that we are back in once mode, this should raise
+ # an error.
+ with pytest.raises(Exception):
+ response = urlopen('http://httpbin.org/').read()
+
+
def test_all_record_mode(tmpdir):
testfile = str(tmpdir.join('recordmode.yml')) | Adds a test to ensure that the cassette created with "new_episodes" has different expected behavior when opened with "once". |
diff --git a/src/main/java/org/codehaus/mojo/jaxb2/javageneration/AbstractJavaGeneratorMojo.java b/src/main/java/org/codehaus/mojo/jaxb2/javageneration/AbstractJavaGeneratorMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/codehaus/mojo/jaxb2/javageneration/AbstractJavaGeneratorMojo.java
+++ b/src/main/java/org/codehaus/mojo/jaxb2/javageneration/AbstractJavaGeneratorMojo.java
@@ -615,7 +615,7 @@ public abstract class AbstractJavaGeneratorMojo extends AbstractJaxbMojo {
if ("file".equalsIgnoreCase(current.getProtocol())) {
unwrappedSourceXSDs.add(FileSystemUtilities.relativize(
current.getPath(),
- getProject().getBasedir()));
+ new File(System.getProperty("user.dir"))));
} else {
unwrappedSourceXSDs.add(current.toString());
} | Fixes #5 XSD files computed relative to current directory |
diff --git a/lib/unparser/buffer.rb b/lib/unparser/buffer.rb
index <HASH>..<HASH> 100644
--- a/lib/unparser/buffer.rb
+++ b/lib/unparser/buffer.rb
@@ -30,7 +30,7 @@ module Unparser
if @content[-1] == NL
prefix
end
- @content << string
+ write(string)
self
end
@@ -43,7 +43,7 @@ module Unparser
# @api private
#
def append_without_prefix(string)
- @content << string
+ write(string)
self
end
@@ -76,7 +76,7 @@ module Unparser
# @api private
#
def nl
- @content << NL
+ write(NL)
self
end
@@ -127,7 +127,15 @@ module Unparser
# @api private
#
def prefix
- @content << INDENT_SPACE * @indent
+ write(INDENT_SPACE * @indent)
+ end
+
+ # Write to content buffer
+ #
+ # @param [String] fragment
+ #
+ def write(fragment)
+ @content << fragment
end
end # Buffer | Centralize buffer writes
* Makes it easier to inject debug statements. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.