diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/tempora.py b/tempora.py
index <HASH>..<HASH> 100644
--- a/tempora.py
+++ b/tempora.py
@@ -414,6 +414,9 @@ def divide_timedelta(td1, td2):
>>> divide_timedelta(one_hour, one_day) == 1 / 24
True
"""
- if six.PY2:
+ try:
+ return td1 / td2
+ except TypeError:
+ # Python 3.2 gets division
+ # http://bugs.python.org/issue2706
return td1.total_seconds() / td2.total_seconds()
- return td1 / td2 | timedelta division wasn't added until <I> |
diff --git a/geocoder/base.py b/geocoder/base.py
index <HASH>..<HASH> 100644
--- a/geocoder/base.py
+++ b/geocoder/base.py
@@ -136,6 +136,7 @@ class Base(object):
###
def _json(self):
+ self.fieldnames = []
for key in dir(self):
if not key.startswith('_') and key not in self._exclude:
self.fieldnames.append(key) | Clear fieldnames so it doesn't grow every query because it was
created as a class variable instead of an instance variable |
diff --git a/src/Extension/FluentExtension.php b/src/Extension/FluentExtension.php
index <HASH>..<HASH> 100644
--- a/src/Extension/FluentExtension.php
+++ b/src/Extension/FluentExtension.php
@@ -410,10 +410,14 @@ class FluentExtension extends DataExtension
*/
public function updateDeleteTables(&$queriedTables)
{
+ // Ensure a locale exists
+ $locale = $this->getRecordLocale();
+ if (!$locale) {
+ return;
+ }
+
// Fluent takes over deletion of objects
$queriedTables = [];
-
- $locale = $this->getRecordLocale();
$localisedTables = $this->getLocalisedTables();
$tableClasses = ClassInfo::ancestry($this->owner, true);
foreach ($tableClasses as $class) { | BUG Fix delete crashing when no locales have been created yet |
diff --git a/lib/Importer.js b/lib/Importer.js
index <HASH>..<HASH> 100644
--- a/lib/Importer.js
+++ b/lib/Importer.js
@@ -220,7 +220,7 @@ class Importer {
findOneJsModule(variableName) {
const jsModules = this.findJsModulesFor(variableName);
if (!jsModules) {
- this.message(`No JS module to import for variable ${variableName}`);
+ this.message(`No JS module to import for variable \`${variableName}\``);
return null;
} | Fix log message when no variable is found
I accidentally removed the backticks when porting this code earlier. |
diff --git a/src/Illuminate/Database/Connection.php b/src/Illuminate/Database/Connection.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Database/Connection.php
+++ b/src/Illuminate/Database/Connection.php
@@ -904,7 +904,7 @@ class Connection implements ConnectionInterface
$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
- 'dbname' => $this->getConfig('database'),
+ 'dbname' => $this->getDatabaseName(),
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver); | Use the current DB to create Doctrine Connections. (#<I>) |
diff --git a/src/main/java/org/jcodec/containers/mps/MPSDemuxer.java b/src/main/java/org/jcodec/containers/mps/MPSDemuxer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jcodec/containers/mps/MPSDemuxer.java
+++ b/src/main/java/org/jcodec/containers/mps/MPSDemuxer.java
@@ -475,7 +475,6 @@ public class MPSDemuxer extends SegmentReader implements MPEGDemuxer {
errors ++;
break;
default:
- System.out.println(marker);
if (state > 3 && sliceSize < 1) {
errors ++;
} | [mps] Removing the debug printf |
diff --git a/test/test_equality.js b/test/test_equality.js
index <HASH>..<HASH> 100644
--- a/test/test_equality.js
+++ b/test/test_equality.js
@@ -25,7 +25,7 @@
*/
var assert = require('assert');
-var setEq = require('../index.js');
+var setEq = require('../seteq.js');
assert.ok(!setEq(new Set([1,2]), new Set([1])));
assert.ok(setEq(new Set([1]), new Set([1]))); | Updated index.js reference to seteq.js |
diff --git a/lib/mlb_gameday/game.rb b/lib/mlb_gameday/game.rb
index <HASH>..<HASH> 100644
--- a/lib/mlb_gameday/game.rb
+++ b/lib/mlb_gameday/game.rb
@@ -94,6 +94,8 @@ module MLBGameday
end
def score
+ return [0, 0] if !game.in_progress? && !game.over?
+
[xpath("//game/@home_team_runs").to_i, xpath("//game/@away_team_runs").to_i]
end | Pre-Game and Preview games don't really have scores, so let's say 0-0 |
diff --git a/__init__.py b/__init__.py
index <HASH>..<HASH> 100644
--- a/__init__.py
+++ b/__init__.py
@@ -8,10 +8,6 @@ used from a setup script as
setup (...)
"""
-# Distutils version
-#
-# Updated automatically by the Python release process.
-#
-#--start constants--
-__version__ = "3.2.6"
-#--end constants--
+import sys
+
+__version__ = sys.version[:sys.version.index(' ')] | keep distutils version in sync with python version automatically |
diff --git a/environs/polling_test.go b/environs/polling_test.go
index <HASH>..<HASH> 100644
--- a/environs/polling_test.go
+++ b/environs/polling_test.go
@@ -56,6 +56,7 @@ func (inst *dnsNameFakeInstance) WaitDNSName() (string, error) {
return environs.WaitDNSName(inst)
}
+func (*dnsNameFakeInstance) Addresses() ([]instance.Address, error) { return nil, nil }
func (*dnsNameFakeInstance) Id() instance.Id { return "" }
func (*dnsNameFakeInstance) OpenPorts(string, []instance.Port) error { return nil }
func (*dnsNameFakeInstance) ClosePorts(string, []instance.Port) error { return nil } | Fix environs tests using dnsNameFakeInstance which didn't implement wqAddresses() |
diff --git a/lib/seneca.js b/lib/seneca.js
index <HASH>..<HASH> 100644
--- a/lib/seneca.js
+++ b/lib/seneca.js
@@ -1587,8 +1587,13 @@ function make_seneca(initial_options ) {
args.strargs ? jsonic( args.strargs ) : {}
)
- var fn = args.fn
- if( !fn ) {
+ var fn
+ if( args.fn ) {
+ fn = function(data,done){
+ return args.fn.call(self,data,done)
+ }
+ }
+ else {
fn = function(data,done){
if( args.strargs ) { | set context to self for zig functions |
diff --git a/lib/find-selectors.js b/lib/find-selectors.js
index <HASH>..<HASH> 100644
--- a/lib/find-selectors.js
+++ b/lib/find-selectors.js
@@ -28,7 +28,7 @@ FindSelectors.prototype.parseFileContent = function() {
FindSelectors.prototype.eachNodeCheck = function(node, selectors) {
if (node.type == 'CallExpression' && node.callee.object &&
- (node.callee.object.name === 'by' || node.callee.object.name === 'By')) {
+ node.callee.object.name.toLowerCase() === 'by') {
var lineInfo = node.arguments[0].loc.start;
var lineAndColumn = lineInfo.line + ':' + lineInfo.column;
@@ -43,4 +43,4 @@ FindSelectors.prototype.eachNodeCheck = function(node, selectors) {
}
-module.exports = new FindSelectors();
\ No newline at end of file
+module.exports = new FindSelectors(); | Update find-selectors.js
Removed case sensitive check. |
diff --git a/caravel/assets/visualizations/table.js b/caravel/assets/visualizations/table.js
index <HASH>..<HASH> 100644
--- a/caravel/assets/visualizations/table.js
+++ b/caravel/assets/visualizations/table.js
@@ -25,6 +25,15 @@ function tableVis(slice) {
var form_data = json.form_data;
var metrics = json.form_data.metrics;
+ // Removing metrics (aggregates) that are strings
+ var real_metrics = [];
+ for (var k in data.records[0]) {
+ if (metrics.indexOf(k) > -1 && !isNaN(data.records[0][k])) {
+ real_metrics.push(k);
+ }
+ }
+ metrics = real_metrics;
+
function col(c) {
var arr = [];
for (var i = 0; i < data.records.length; i++) { | [quickfix] support isNaN aggregates in Table viz |
diff --git a/addon/classes/events-base.js b/addon/classes/events-base.js
index <HASH>..<HASH> 100644
--- a/addon/classes/events-base.js
+++ b/addon/classes/events-base.js
@@ -110,7 +110,7 @@ export default class EventsBase extends Service {
return rhett;
}).sortBy('startDate', 'name');
obj.postrequisites = obj.postrequisites.map(postreq => this.createEventFromData(postreq, isUserEvent)).sortBy('startDate', 'name');
-
+ obj.isUserEvent = isUserEvent;
return obj;
} | set is-user-event flag on calendar-event creation for consumption further downstream. |
diff --git a/lib/circuitry/subscriber.rb b/lib/circuitry/subscriber.rb
index <HASH>..<HASH> 100644
--- a/lib/circuitry/subscriber.rb
+++ b/lib/circuitry/subscriber.rb
@@ -27,6 +27,7 @@ module Circuitry
TEMPORARY_ERRORS = [
Excon::Errors::InternalServerError,
Excon::Errors::ServiceUnavailable,
+ Excon::Errors::SocketError,
Excon::Errors::Timeout,
].freeze | Handle excon error for 'connection reset by peer' |
diff --git a/telemetry/telemetry/core/platform/profiler/perf_profiler.py b/telemetry/telemetry/core/platform/profiler/perf_profiler.py
index <HASH>..<HASH> 100644
--- a/telemetry/telemetry/core/platform/profiler/perf_profiler.py
+++ b/telemetry/telemetry/core/platform/profiler/perf_profiler.py
@@ -6,6 +6,7 @@ import logging
import os
import re
import signal
+import stat
import subprocess
import sys
import tempfile
@@ -124,6 +125,8 @@ class PerfProfiler(profiler.Profiler):
self._process_profilers = []
if platform_backend.GetOSName() == 'android':
android_prebuilt_profiler_helper.GetIfChanged('perfhost')
+ os.chmod(android_prebuilt_profiler_helper.GetHostPath('perfhost'),
+ stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
android_prebuilt_profiler_helper.InstallOnDevice(
browser_backend.adb, 'perf')
for pid, output_file in process_output_file_map.iteritems(): | Telemetry / Android: make perfhost prebuilt an executable.
Small follow-up from crrev.com/<I>
BUG=
Review URL: <URL> |
diff --git a/Unosquare.Tubular/Javascript/tubular/tubular-directives.js b/Unosquare.Tubular/Javascript/tubular/tubular-directives.js
index <HASH>..<HASH> 100644
--- a/Unosquare.Tubular/Javascript/tubular/tubular-directives.js
+++ b/Unosquare.Tubular/Javascript/tubular/tubular-directives.js
@@ -625,7 +625,7 @@
compile: function compile() {
return {
pre: function (scope, lElement, lAttrs) {
- lAttrs.label = lAttrs.label || (lAttrs.name || '').replace(/([a-z])([A-Z])/g, '$1 $2');
+ lAttrs.label = angular.isDefined(lAttrs.label) ? lAttrs.label : (lAttrs.name || '').replace(/([a-z])([A-Z])/g, '$1 $2');
var column = new ColumnModel(lAttrs);
scope.$component.addColumn(column); | Making it so the label attribute is not replaced when it's explicitly set as emtpy string |
diff --git a/tests/test-rest-attachments-controller.php b/tests/test-rest-attachments-controller.php
index <HASH>..<HASH> 100644
--- a/tests/test-rest-attachments-controller.php
+++ b/tests/test-rest-attachments-controller.php
@@ -80,13 +80,16 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control
'slug',
'status',
), $keys );
- $this->assertEqualSets( array(
+ $media_types = array(
'application',
'video',
'image',
'audio',
- 'text',
- ), $data['endpoints'][0]['args']['media_type']['enum'] );
+ );
+ if ( ! is_multisite() ) {
+ $media_types[] = 'text';
+ }
+ $this->assertEqualSets( $media_types, $data['endpoints'][0]['args']['media_type']['enum'] );
}
public function test_get_items() { | Multisite doesn't support `text` |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ class PyTest(TestCommand):
setup(
name='graphene',
- version='0.8.0',
+ version='0.8.1',
description='GraphQL Framework for Python',
long_description=open('README.rst').read(), | Updated Graphene version to <I> |
diff --git a/lib/uspec/formatter.rb b/lib/uspec/formatter.rb
index <HASH>..<HASH> 100644
--- a/lib/uspec/formatter.rb
+++ b/lib/uspec/formatter.rb
@@ -10,7 +10,7 @@ module Uspec
end
def color hue, text = nil
- esc("3#{colors[hue]};1") + "#{text}#{normal}"
+ "#{esc "3#{colors[hue]};1"}#{text}#{normal}"
end
def esc seq
@@ -18,7 +18,7 @@ module Uspec
end
def normal text=nil
- esc(0) + text.to_s
+ "#{esc 0}#{text}"
end
def colorize result, source
@@ -46,12 +46,12 @@ module Uspec
def trace error
error.backtrace.inject(String.new) do |text, line|
- text << hspace + line + newline
+ text << "#{hspace}#{line}#{newline}"
end
end
def message error
- red(classinfo error) + error.message
+ "#{red classinfo error}#{error.message}"
end
def classinfo object
@@ -71,7 +71,7 @@ module Uspec
end
def vspace
- newline + newline
+ "#{newline}#{newline}"
end
def newline | Replace with safer string interpolation. |
diff --git a/lib/prey.js b/lib/prey.js
index <HASH>..<HASH> 100644
--- a/lib/prey.js
+++ b/lib/prey.js
@@ -6,5 +6,6 @@ if(!common.config) common.load_config();
var agent = exports.agent = require('./prey/agent');
var hooks = exports.hooks = require('./prey/hooks');
var dispatcher = exports.dispatcher = require('./prey/dispatcher');
+var provider = exports.provider = require('./prey/provider_hub'); | Export provider_hub in ./lib/prey for easy access to third-party modules. |
diff --git a/scripts/setup.py b/scripts/setup.py
index <HASH>..<HASH> 100644
--- a/scripts/setup.py
+++ b/scripts/setup.py
@@ -266,7 +266,7 @@ setup(name = "gmpy2",
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
- 'Intended Audience :: Science/Research'
+ 'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X', | add one missing comma
found by lgtm |
diff --git a/src/components/ResultsList/ResultsList.js b/src/components/ResultsList/ResultsList.js
index <HASH>..<HASH> 100644
--- a/src/components/ResultsList/ResultsList.js
+++ b/src/components/ResultsList/ResultsList.js
@@ -17,7 +17,7 @@ import Sidebar from '../Sidebar/Sidebar';
import './ResultsList.css';
/**
- * Renders list categories with radio buttons and "Next" button.
+ * Renders results packages with radio buttons and "Select package" button.
*/
class ResultsList extends Component {
render() { | [#9] Fix description for component |
diff --git a/src/Graphql/Graphql.php b/src/Graphql/Graphql.php
index <HASH>..<HASH> 100644
--- a/src/Graphql/Graphql.php
+++ b/src/Graphql/Graphql.php
@@ -96,7 +96,7 @@ function schema($typeDefs, array $resolvers = [])
function resolvers(array $resolvers)
{
Executor::setDefaultFieldResolver(function ($source, $args, $context, ResolveInfo $info) use ($resolvers) {
- if (is_null($source) || !isset($source[$info->fieldName])) {
+ if (is_null($source)) {
$resolvers = $resolvers[$info->parentType->name];
$fieldName = $info->fieldName;
$property = null; | Fix bad resolver root value catching |
diff --git a/main.js b/main.js
index <HASH>..<HASH> 100755
--- a/main.js
+++ b/main.js
@@ -103,5 +103,5 @@ Emitter.Hybrid = Hybrid = function HybridEmitter(){
this[resolver] = {};
};
+Emitter.prototype = new Target();
Object.defineProperties(Hybrid.prototype,emitterBag);
-Object.defineProperties(Hybrid.prototype,targetBag); | Emitter.Hybrid is now an instance of Emitter.Target |
diff --git a/code/controllers/EventRegisterController.php b/code/controllers/EventRegisterController.php
index <HASH>..<HASH> 100644
--- a/code/controllers/EventRegisterController.php
+++ b/code/controllers/EventRegisterController.php
@@ -49,14 +49,14 @@ class EventRegisterController extends Page_Controller {
*/
public function index() {
$event = $this->time->Event();
-
if ($event->LimitedPlaces && ($this->time->getRemainingPlaces() < 1)) {
$message = _t('EventManagement.NOPLACES', 'This event has no more places available.');
- return array(
+ $controller = $this->customise(array(
'Title' => _t('EventManagement.EVENTISFULL', 'This Event Is Full'),
'Content' => "<p>$message</p>"
- );
+ ));
+ return $this->getViewer('index')->process($controller);
}
$title = sprintf( | Fixed an error with an action expecting a string rather than an array. |
diff --git a/elasticsearch_dsl/field.py b/elasticsearch_dsl/field.py
index <HASH>..<HASH> 100644
--- a/elasticsearch_dsl/field.py
+++ b/elasticsearch_dsl/field.py
@@ -143,6 +143,8 @@ class InnerObject(object):
our[name] = other[name]
def _to_python(self, data):
+ if data is None:
+ return None
# don't wrap already wrapped data
if isinstance(data, self._doc_class):
return data
diff --git a/test_elasticsearch_dsl/test_document.py b/test_elasticsearch_dsl/test_document.py
index <HASH>..<HASH> 100644
--- a/test_elasticsearch_dsl/test_document.py
+++ b/test_elasticsearch_dsl/test_document.py
@@ -32,6 +32,11 @@ class MyMultiSubDoc(MyDoc2, MySubDoc):
class DocWithNested(document.DocType):
comments = field.Nested(properties={'title': field.String()})
+def test_null_value_for_object():
+ d = MyDoc(inner=None)
+
+ assert d.inner is None
+
def test_inherited_doc_types_can_override_index():
class MyDocDifferentIndex(MySubDoc):
class Meta: | Allow None as value of Object field
Fixes #<I> |
diff --git a/update-urls/main.go b/update-urls/main.go
index <HASH>..<HASH> 100644
--- a/update-urls/main.go
+++ b/update-urls/main.go
@@ -6,7 +6,7 @@
// update-urls updates GitHub URL docs for each service endpoint.
//
// It is meant to be used periodically by go-github repo maintainers
-// to update stale GitHub Developer v3 API documenation URLs.
+// to update stale GitHub Developer v3 API documentation URLs.
//
// Usage (from go-github directory):
// go run ./update-urls/main.go | Correct spelling errors (#<I>) |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -86,7 +86,7 @@ setup(
long_description=long_description,
long_description_content_type='text/markdown',
classifiers=[ # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
- 'Development Status :: 4 - Beta',
+ 'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: Implementation :: PyPy',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
@@ -95,10 +95,10 @@ setup(
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: Apache Software License',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Bio-Informatics', | upd python version support and set production status in setup.py |
diff --git a/angularFire.js b/angularFire.js
index <HASH>..<HASH> 100644
--- a/angularFire.js
+++ b/angularFire.js
@@ -262,7 +262,7 @@ angular.module("firebase").factory("angularFireAuth", [
}
}
- function authRequiredRedirect(route, path) {
+ function authRequiredRedirect(route, path, self) {
if(route.authRequired && !self._authenticated){
if(route.pathTo === undefined) {
self._redirectTo = $location.path();
@@ -294,10 +294,10 @@ angular.module("firebase").factory("angularFireAuth", [
this._redirectTo = null;
this._authenticated = false;
if (options.path) {
- authRequiredRedirect($route.current, options.path);
+ authRequiredRedirect($route.current, options.path, self);
$rootScope.$on("$routeChangeStart", function(e, next, current) {
- authRequiredRedirect(next, options.path);
+ authRequiredRedirect(next, options.path, self);
});
} | Fix for issue #<I> part 2 |
diff --git a/mcpack/datapack.py b/mcpack/datapack.py
index <HASH>..<HASH> 100644
--- a/mcpack/datapack.py
+++ b/mcpack/datapack.py
@@ -146,6 +146,8 @@ class Recipe(JsonItem):
experience: Optional[float] = None
cookingtime: Optional[int] = None
count: Optional[int] = None
+ base: Optional[dict] = None
+ addition: Optional[dict] = None
StructureSchema = schema('StructureSchema', { | Update Recipe to reflect changes made in Mc <I> |
diff --git a/moto/ecs/models.py b/moto/ecs/models.py
index <HASH>..<HASH> 100644
--- a/moto/ecs/models.py
+++ b/moto/ecs/models.py
@@ -108,10 +108,10 @@ class ContainerInstance(BaseObject):
return response_object
-class Failure(BaseObject):
- def __init__(self, reason, arn):
+class ContainerInstanceFailure(BaseObject):
+ def __init__(self, reason, container_instance_id):
self.reason = reason
- self.arn = arn
+ self.arn = "arn:aws:ecs:us-east-1:012345678910:container-instance/{0}".format(container_instance_id)
@property
def response_object(self):
@@ -275,7 +275,7 @@ class EC2ContainerServiceBackend(BaseBackend):
if container_instance is not None:
container_instance_objects.append(container_instance)
else:
- failures.append(Failure(reason='MISSING', arn=container_instance_arn))
+ failures.append(ContainerInstanceFailure('MISSING', container_instance_id))
return container_instance_objects, failures | rename class Failure to ContainerInstanceFailure |
diff --git a/lib/capybara/session.rb b/lib/capybara/session.rb
index <HASH>..<HASH> 100644
--- a/lib/capybara/session.rb
+++ b/lib/capybara/session.rb
@@ -62,7 +62,7 @@ module Capybara
def fill_in(locator, options={})
msg = "cannot fill in, no text field, text area or password field with id, name, or label '#{locator}' found"
- raise "Must pass a hash containing 'with'" unless options.kind_of? Hash && !options.index(:with).nil?
+ raise "Must pass a hash containing 'with'" if not options.is_a?(Hash) or not options.has_key?(:with)
locate(:xpath, XPath.fillable_field(locator), msg).set(options[:with])
end | unless is never a good idea |
diff --git a/Classes/System/Solr/Node.php b/Classes/System/Solr/Node.php
index <HASH>..<HASH> 100644
--- a/Classes/System/Solr/Node.php
+++ b/Classes/System/Solr/Node.php
@@ -187,7 +187,7 @@ class Node {
{
$pathWithoutLeadingAndTrailingSlashes = trim(trim($this->path), "/");
$pathWithoutLastSegment = substr($pathWithoutLeadingAndTrailingSlashes, 0, strrpos($pathWithoutLeadingAndTrailingSlashes, "/"));
- return '/' . $pathWithoutLastSegment . '/';
+ return ($pathWithoutLastSegment === '') ? '/' : '/' . $pathWithoutLastSegment . '/';
}
/** | [BUGFIX:PORT:master] Build core base path right, when path is slash only
Fixes: #<I> |
diff --git a/Model/Behavior/FileValidationBehavior.php b/Model/Behavior/FileValidationBehavior.php
index <HASH>..<HASH> 100644
--- a/Model/Behavior/FileValidationBehavior.php
+++ b/Model/Behavior/FileValidationBehavior.php
@@ -333,6 +333,7 @@ class FileValidationBehavior extends ModelBehavior {
public function afterValidate(Model $model) {
if ($this->_tempFile) {
$this->_tempFile->delete();
+ $this->_tempFile = null;
}
return true; | Reset property so it doesn't leak to other models
If the FileValidation is used in multiple models which are validated
within a single request, since Behaviours are effectively singletons,
their internal state leaks over to the next model.
This prevents $_tmpFile still being set for the next model; otherwise
this file would be tried to be deleted again in the next model validation
which does not exist anymore. |
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -258,7 +258,7 @@ module Rails
end
def create_public_files
- build(:public)
+ build(:public_directory)
end
def create_public_image_files | Fix a bug in the generators from the previous commit |
diff --git a/lib/megam/api/version.rb b/lib/megam/api/version.rb
index <HASH>..<HASH> 100644
--- a/lib/megam/api/version.rb
+++ b/lib/megam/api/version.rb
@@ -15,6 +15,6 @@
#
module Megam
class API
- VERSION = "1.5.beta1"
+ VERSION = "1.5.beta2"
end
end | Yanked <I>beta1, and upgraded version to <I>.beta2 |
diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/formatters/doc.rb
+++ b/lib/chef/formatters/doc.rb
@@ -42,7 +42,8 @@ class Chef
end
def run_start(version)
- puts_line "Starting Chef Client, version #{version}"
+ puts_line "Starting Chef Client#{" (FIPS mode)" if Chef::Config[:openssl_fips]}" \
+ ", version #{version}"
end
def total_resources
diff --git a/lib/chef/formatters/minimal.rb b/lib/chef/formatters/minimal.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/formatters/minimal.rb
+++ b/lib/chef/formatters/minimal.rb
@@ -29,7 +29,8 @@ class Chef
# Called at the very start of a Chef Run
def run_start(version)
- puts "Starting Chef Client, version #{version}"
+ puts_line "Starting Chef Client#{" (FIPS mode)" if Chef::Config[:openssl_fips]}" \
+ ", version #{version}"
end
# Called at the end of the Chef run. | Add fips mode line to Starting chef client run |
diff --git a/lib/active_scaffold/actions/core.rb b/lib/active_scaffold/actions/core.rb
index <HASH>..<HASH> 100644
--- a/lib/active_scaffold/actions/core.rb
+++ b/lib/active_scaffold/actions/core.rb
@@ -69,13 +69,16 @@ module ActiveScaffold::Actions
@record.id = id
else
@record = params[:id] ? find_if_allowed(params[:id], :update) : new_model
- apply_constraints_to_record(@record) if @record.new_record?
- @record.id = nil
+ if @record.new_record?
+ apply_constraints_to_record(@record)
+ else
+ @record = @record.dup
+ end
value = column_value_from_param_value(@record, @column, params.delete(:value))
@record.send "#{@column.name}=", value
@record.id = params[:id]
end
- set_parent(@record) if @record.new_record? && params[:parent_controller] && params[:parent_id] && params[:child_association]
+ set_parent(@record) if @record.id.nil? && params[:parent_controller] && params[:parent_id] && params[:child_association]
after_render_field(@record, @column)
end | fix refresh_link on has_many associations |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ tests_require = [
setup(
name='django-geoip',
- version='0.2.3dev',
+ version='0.2.3',
author='Ilya Baryshev',
author_email='baryshev@gmail.com',
packages=find_packages(exclude=("tests")), | Bumped version to <I> |
diff --git a/dockerclient/client.go b/dockerclient/client.go
index <HASH>..<HASH> 100644
--- a/dockerclient/client.go
+++ b/dockerclient/client.go
@@ -129,12 +129,9 @@ func NewClientExecutor(client *docker.Client) *ClientExecutor {
}
func (e *ClientExecutor) DefaultExcludes() error {
- excludes, err := imagebuilder.ParseDockerignore(e.Directory)
- if err != nil {
- return err
- }
- e.Excludes = append(excludes, ".dockerignore")
- return nil
+ var err error
+ e.Excludes, err = imagebuilder.ParseDockerignore(e.Directory)
+ return err
}
// WithName creates a new child executor that will be used whenever a COPY statement | Copy .dockerignore into image for compatibility with Docker |
diff --git a/lib/netsuite/records/invoice.rb b/lib/netsuite/records/invoice.rb
index <HASH>..<HASH> 100644
--- a/lib/netsuite/records/invoice.rb
+++ b/lib/netsuite/records/invoice.rb
@@ -25,6 +25,8 @@ module NetSuite
:to_be_printed, :total, :total_cost_estimate, :tracking_numbers, :tran_date, :tran_id, :tran_is_vsoe_bundle,
:transaction_bill_address, :transaction_ship_address, :vat_reg_num, :vsoe_auto_calc
+ attr_reader :internal_id, :external_id
+
def initialize(attributes = {})
@internal_id = attributes.delete(:internal_id)
@external_id = attributes.delete(:external_id) | invoice should have readers for internal and external ids |
diff --git a/lib/puppet/module.rb b/lib/puppet/module.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/module.rb
+++ b/lib/puppet/module.rb
@@ -1,5 +1,6 @@
require 'puppet/util/logging'
require 'semver'
+require 'json'
# Support for modules
class Puppet::Module
@@ -57,8 +58,8 @@ class Puppet::Module
return false unless Puppet::FileSystem.exist?(metadata_file)
begin
- metadata = PSON.parse(File.read(metadata_file))
- rescue PSON::PSONError => e
+ metadata = JSON.parse(File.read(metadata_file))
+ rescue JSON::JSONError => e
Puppet.debug("#{name} has an invalid and unparsable metadata.json file. The parse error: #{e.message}")
return false
end
@@ -112,7 +113,7 @@ class Puppet::Module
end
def load_metadata
- @metadata = data = PSON.parse(File.read(metadata_file))
+ @metadata = data = JSON.parse(File.read(metadata_file))
@forge_name = data['name'].gsub('-', '/') if data['name']
[:source, :author, :version, :license, :puppetversion, :dependencies].each do |attr| | (PUP-<I>) Restore use of JSON (over PSON).
In master, we've officially introduced a dependency on the JSON library,
but the previous commit in this branch unintentionally reverted a part
of that commit due to merge conflicts.
This commit restores the use of the JSON library where it had been
previously removed. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -148,7 +148,7 @@ setup(name = 'GPy',
include_package_data = True,
py_modules = ['GPy.__init__'],
test_suite = 'GPy.testing',
- install_requires = ['numpy>=1.7', 'scipy>=0.16', 'six', 'paramz>=0.6.8'],
+ install_requires = ['numpy>=1.7', 'scipy>=0.16', 'six', 'paramz>=0.6.9'],
extras_require = {'docs':['sphinx'],
'optional':['mpi4py',
'ipython>=4.0.0', | chg: version update on paramz |
diff --git a/lfs/batcher_test.go b/lfs/batcher_test.go
index <HASH>..<HASH> 100644
--- a/lfs/batcher_test.go
+++ b/lfs/batcher_test.go
@@ -7,7 +7,7 @@ import (
)
func TestBatcherSizeMet(t *testing.T) {
- assertAll([]batcherTestCase{
+ runBatcherTests([]batcherTestCase{
{2, 4, false},
{3, 5, false},
{0, 0, false},
@@ -15,7 +15,7 @@ func TestBatcherSizeMet(t *testing.T) {
}
func TestBatcherExit(t *testing.T) {
- assertAll([]batcherTestCase{
+ runBatcherTests([]batcherTestCase{
{2, 4, true},
{3, 5, true},
{0, 0, true},
@@ -56,9 +56,9 @@ func (b batcherTestCase) Batches() int {
return b.ItemCount / b.BatchSize
}
-// assertAll processes all test cases, throwing assertion errors if they
+// runBatcherTests processes all test cases, throwing assertion errors if they
// fail.
-func assertAll(cases []batcherTestCase, t *testing.T) {
+func runBatcherTests(cases []batcherTestCase, t *testing.T) {
for _, c := range cases {
b := c.Batcher() | lfs/batcher: rename assertAll to runBatcherTests |
diff --git a/billing/integrations/pay_pal_integration.py b/billing/integrations/pay_pal_integration.py
index <HASH>..<HASH> 100644
--- a/billing/integrations/pay_pal_integration.py
+++ b/billing/integrations/pay_pal_integration.py
@@ -2,6 +2,8 @@ from billing import Integration
from django.conf import settings
from paypal.standard.conf import POSTBACK_ENDPOINT, SANDBOX_POSTBACK_ENDPOINT
from django.conf.urls.defaults import patterns, include
+from paypal.standard.ipn.signals import payment_was_flagged, payment_was_successful
+from billing.signals import transaction_was_successful, transaction_was_unsuccessful
class PayPalIntegration(Integration):
def __init__(self):
@@ -26,3 +28,16 @@ class PayPalIntegration(Integration):
(r'^', include('paypal.standard.ipn.urls')),
)
return urlpatterns
+
+def unsuccessful_txn_handler(sender, **kwargs):
+ transaction_was_unsuccesful.send(sender=sender.__class__,
+ type="purchase",
+ response=self)
+
+def successful_txn_handler(sender, **kwargs):
+ transaction_was_succesful.send(sender=sender.__class__,
+ type="purchase",
+ response=self)
+
+payment_was_flagged.connect(unsuccessful_txn_handler)
+payment_was_successful.connect(successful_txn_handler) | Added the transaction_was_successful and transaction_was_unsuccessful in the PayPal integration. Fixes #9. |
diff --git a/pyipmi/sel.py b/pyipmi/sel.py
index <HASH>..<HASH> 100644
--- a/pyipmi/sel.py
+++ b/pyipmi/sel.py
@@ -134,8 +134,7 @@ class SelEntry(State):
string.append(' Sensor Number: %d' % self.sensor_number)
string.append(' Event Direction: %d' % self.event_direction)
string.append(' Event Type: 0x%02x' % self.event_type)
- string.append(' Event Data: %s' % array('B',
- self.event_data).tolist())
+ string.append(' Event Data: %s' % array('B', self.event_data).tolist())
return "\n".join(string)
@staticmethod | Unnecessary line-break removed |
diff --git a/nion/instrumentation/test/HardwareSource_test.py b/nion/instrumentation/test/HardwareSource_test.py
index <HASH>..<HASH> 100644
--- a/nion/instrumentation/test/HardwareSource_test.py
+++ b/nion/instrumentation/test/HardwareSource_test.py
@@ -812,7 +812,7 @@ class TestHardwareSourceClass(unittest.TestCase):
document_model.append_data_item(data_item)
document_model.setup_channel(document_model.make_data_item_reference_key(hardware_source.hardware_source_id, "a"), data_item)
hardware_source.data_channels[0].update(DataAndMetadata.new_data_and_metadata(data), "complete", None, None, None, None)
- hardware_source.sleep = 0.10
+ hardware_source.sleep = 0.20
hardware_source.start_playing()
time.sleep(0.02)
hardware_source.abort_playing(sync_timeout=3.0) | Minor test adjustment to be more resilient. |
diff --git a/lib/dhis2/api/base.rb b/lib/dhis2/api/base.rb
index <HASH>..<HASH> 100644
--- a/lib/dhis2/api/base.rb
+++ b/lib/dhis2/api/base.rb
@@ -94,10 +94,12 @@ module Dhis2
def add_relation(relation, relation_id)
client.post("#{self.class.resource_name}/#{id}/#{relation}/#{relation_id}", attributes)
+ self
end
def remove_relation(relation, relation_id)
client.delete("#{self.class.resource_name}/#{id}/#{relation}/#{relation_id}", attributes)
+ self
end
def delete | Allow to add/remove from relationship. |
diff --git a/tests/unit/modules/test_tomcat.py b/tests/unit/modules/test_tomcat.py
index <HASH>..<HASH> 100644
--- a/tests/unit/modules/test_tomcat.py
+++ b/tests/unit/modules/test_tomcat.py
@@ -10,6 +10,7 @@ from tests.support.mock import MagicMock, patch
# Import salt module
import salt.modules.tomcat as tomcat
+from salt.ext.six import string_types
# Import 3rd-party libs
from io import StringIO, BytesIO
@@ -34,7 +35,7 @@ class TomcatTestCasse(TestCase, LoaderModuleMockMixin):
with patch('salt.modules.tomcat._urlopen', string_mock):
response = tomcat._wget('tomcat.wait', url='http://localhost:8080/nofail')
for line in response['msg']:
- self.assertTrue((isinstance(line, unicode) or isinstance(line, str)))
+ self.assertIsInstance(line, string_types)
with patch('salt.modules.tomcat._urlopen', bytes_mock):
try:
@@ -46,4 +47,4 @@ class TomcatTestCasse(TestCase, LoaderModuleMockMixin):
raise type_error
for line in response['msg']:
- self.assertTrue((isinstance(line, unicode) or isinstance(line, str)))
+ self.assertIsInstance(line, string_types) | Use six as backwards compatibility layer for string test |
diff --git a/src/Html/Attributes.php b/src/Html/Attributes.php
index <HASH>..<HASH> 100644
--- a/src/Html/Attributes.php
+++ b/src/Html/Attributes.php
@@ -7,5 +7,6 @@ class Attributes implements AttributesInterface {
use AttributesTrait {
renderAttributes as public;
renderTag as public;
+ createTag as public;
}
} | Attributes: use AttributesTrait::createTag() as public. |
diff --git a/restcomm/restcomm.mscontrol.mms/src/main/java/org/mobicents/servlet/restcomm/mscontrol/mgcp/MmsConferenceController.java b/restcomm/restcomm.mscontrol.mms/src/main/java/org/mobicents/servlet/restcomm/mscontrol/mgcp/MmsConferenceController.java
index <HASH>..<HASH> 100644
--- a/restcomm/restcomm.mscontrol.mms/src/main/java/org/mobicents/servlet/restcomm/mscontrol/mgcp/MmsConferenceController.java
+++ b/restcomm/restcomm.mscontrol.mms/src/main/java/org/mobicents/servlet/restcomm/mscontrol/mgcp/MmsConferenceController.java
@@ -535,6 +535,8 @@ public final class MmsConferenceController extends MediaServerController {
// Destroy Media Group
mediaGroup.tell(new StopMediaGroup(), super.source);
// Destroy Bridge Endpoint and its connections
+ here check if no slave is in mrb new table then go otherwise no
+ also check if this is last participant in whole conf then tell CMRC to destroy master conference ep.
cnfEndpoint.tell(new DestroyEndpoint(), super.source);
}
} | added hint #<I> for tomorrow |
diff --git a/lib/chef/resource/dmg_package.rb b/lib/chef/resource/dmg_package.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/resource/dmg_package.rb
+++ b/lib/chef/resource/dmg_package.rb
@@ -71,9 +71,9 @@ class Chef
description: "Specify whether to accept the EULA. Certain dmgs require acceptance of EULA before mounting.",
default: false, desired_state: false
- property :headers, [Hash, nil],
+ property :headers, Hash,
description: "Allows custom HTTP headers (like cookies) to be set on the remote_file resource.",
- default: nil, desired_state: false
+ desired_state: false
property :allow_untrusted, [TrueClass, FalseClass],
description: "Allow installation of packages that do not have trusted certificates.", | header property: Don't default to nil or accept nil
This is a old legacy leftover from LWRP-land |
diff --git a/lib/scorpio/schema.rb b/lib/scorpio/schema.rb
index <HASH>..<HASH> 100644
--- a/lib/scorpio/schema.rb
+++ b/lib/scorpio/schema.rb
@@ -26,6 +26,19 @@ module Scorpio
end
end
+ def match_to_object(object)
+ object = object.content if object.is_a?(Scorpio::JSON::Node)
+ if schema_node && schema_node['oneOf']
+ matched = schema_node['oneOf'].map(&:deref).map do |oneof|
+ oneof_matched = self.class.new(oneof).match_to_object(object)
+ if oneof_matched.validate(object)
+ oneof_matched
+ end
+ end.compact.first
+ end
+ matched || self
+ end
+
def subschema_for_index(index)
if schema_node['items'].is_a?(Scorpio::JSON::ArrayNode)
if index < schema_node['items'].size | Scorpio::Schema#match_to_object to replace match_schema functionality removing from SchemaObjectBase module #[] |
diff --git a/openprovider/modules/ssl.py b/openprovider/modules/ssl.py
index <HASH>..<HASH> 100644
--- a/openprovider/modules/ssl.py
+++ b/openprovider/modules/ssl.py
@@ -84,6 +84,12 @@ class SSLModule(common.Module):
))
return int(response.data.id)
+
+ def renew(self, order_id):
+ response = self.request(E.renewSslCertRequest(
+ E.id(order_id),
+ ))
+ return int(response.data.id)
def reissue(self, order_id, csr, software_id, organization_handle, approver_email=None,
signature_hash_algorithm=None, domain_validation_methods=None, hostnames=None, | added ssl renew api call |
diff --git a/backtrader/feed.py b/backtrader/feed.py
index <HASH>..<HASH> 100644
--- a/backtrader/feed.py
+++ b/backtrader/feed.py
@@ -70,7 +70,9 @@ class MetaAbstractDataBase(dataseries.OHLCDateTime.__class__):
super(MetaAbstractDataBase, cls).dopostinit(_obj, *args, **kwargs)
# Either set by subclass or the parameter or use the dataname (ticker)
- _obj._name = _obj._name or _obj.p.name or _obj.p.dataname
+ _obj._name = _obj._name or _obj.p.name
+ if not _obj._name and isinstance(_obj.p.dataname, string_types):
+ _obj._name = _obj.p.dataname
_obj._compression = _obj.p.compression
_obj._timeframe = _obj.p.timeframe | Avoid assigning a non-string dataname to _name |
diff --git a/src/msearch/daten/DatenFilm.java b/src/msearch/daten/DatenFilm.java
index <HASH>..<HASH> 100644
--- a/src/msearch/daten/DatenFilm.java
+++ b/src/msearch/daten/DatenFilm.java
@@ -571,7 +571,8 @@ public class DatenFilm implements Comparable<DatenFilm> {
"+++ Aus rechtlichen Gründen ist dieses Video nur innerhalb von Deutschland verfügbar. +++",
"+++ Aus rechtlichen Gründen kann das Video nur innerhalb von Deutschland abgerufen werden. +++ Due to legal reasons the video is only available in Germany.+++",
"+++ Aus rechtlichen Gründen kann das Video nur innerhalb von Deutschland abgerufen werden. +++",
- "+++ Due to legal reasons the video is only available in Germany.+++"
+ "+++ Due to legal reasons the video is only available in Germany.+++",
+ "+++ Aus rechtlichen Gründen kann das Video nur in Deutschland abgerufen werden. +++"
};
public static String cleanDescription(String s, String thema, String titel) { | Added new copyright text message for description removal. |
diff --git a/lib/deliver/deliver_process.rb b/lib/deliver/deliver_process.rb
index <HASH>..<HASH> 100644
--- a/lib/deliver/deliver_process.rb
+++ b/lib/deliver/deliver_process.rb
@@ -189,6 +189,7 @@ module Deliver
content = File.read(File.join(language_folder, "#{key}.txt")) rescue nil
next unless content
content = content.split("\n") if key == 'keywords'
+ content = content.strip if key == 'privacy_url' || key == 'software_url' || key == 'support_url'
@deploy_information[value] ||= {}
@deploy_information[value][language] ||= content | strip contents of file for URLs
Having a newline or something in the url files for metadata would cause
it to fail |
diff --git a/flux-core/src/main/java/org/apache/storm/flux/FluxBuilder.java b/flux-core/src/main/java/org/apache/storm/flux/FluxBuilder.java
index <HASH>..<HASH> 100644
--- a/flux-core/src/main/java/org/apache/storm/flux/FluxBuilder.java
+++ b/flux-core/src/main/java/org/apache/storm/flux/FluxBuilder.java
@@ -161,6 +161,7 @@ public class FluxBuilder {
} else {
grouping = (CustomStreamGrouping) clazz.newInstance();
}
+ applyProperties(def, grouping, context);
return grouping;
}
@@ -324,6 +325,7 @@ public class FluxBuilder {
} else {
spout = (IRichSpout) clazz.newInstance();
}
+ applyProperties(def, spout, context);
return spout;
}
@@ -361,6 +363,7 @@ public class FluxBuilder {
bolt = clazz.newInstance();
}
context.addBolt(def.getId(), bolt);
+ applyProperties(def, bolt, context);
}
} | fix issue with properties not being applied to spouts, bolts, and custom stream groupings. |
diff --git a/nolds/measures.py b/nolds/measures.py
index <HASH>..<HASH> 100644
--- a/nolds/measures.py
+++ b/nolds/measures.py
@@ -1382,7 +1382,7 @@ def hurst_multifractal_dm(data, qvals=[1], max_dists=range(5, 20)):
])
hhcorr = np.array(hhcorr, dtype="float32")
H = np.array([
- _aste_line_fit(np.log(range(1, md)), np.log(hhcorr[:md-1, qi]))[1]
+ _aste_line_fit(np.log(range(1, md+1)), np.log(hhcorr[:md, qi]))[1]
for qi in range(len(qvals))
for md in max_dists
], dtype="float32").reshape(len(qvals), len(max_dists)) | bugfix: adjusts limits for line fit (start at 1, include upper limit) |
diff --git a/lib/keyboard_reactor/output.rb b/lib/keyboard_reactor/output.rb
index <HASH>..<HASH> 100644
--- a/lib/keyboard_reactor/output.rb
+++ b/lib/keyboard_reactor/output.rb
@@ -25,7 +25,7 @@ module KeyboardReactor
end
def hex_file_path
- self.class.relative_path("#{firmware_path}/keymap_#{@id}")
+ self.class.relative_path("#{firmware_path}/#{@id}.hex")
end
def write_output(keyboard_json)
@@ -56,7 +56,8 @@ module KeyboardReactor
def write_hex_file
write_c_file
- `cd #{firmware_path.to_s} && make KEYMAP="#{id}"`
+ # Override the default target with our ID so that we create unique files
+ `cd #{firmware_path.to_s} && make clean && TARGET=#{id} make -e KEYMAP="#{id}"`
end
# post '/' do | Override TARGET, correct hex file location |
diff --git a/store/root/list.go b/store/root/list.go
index <HASH>..<HASH> 100644
--- a/store/root/list.go
+++ b/store/root/list.go
@@ -25,10 +25,16 @@ func (r *Store) Tree() (tree.Tree, error) {
root := simple.New("gopass")
addFileFunc := func(in ...string) {
for _, f := range in {
- ct := "text/plain"
- if strings.HasSuffix(f, ".b64") {
+ var ct string
+ switch {
+ case strings.HasSuffix(f, ".b64"):
ct = "application/octet-stream"
- f = strings.TrimSuffix(f, ".b64")
+ case strings.HasSuffix(f, ".yml"):
+ ct = "text/yaml"
+ case strings.HasSuffix(f, ".yaml"):
+ ct = "text/yaml"
+ default:
+ ct = "text/plain"
}
if err := root.AddFile(f, ct); err != nil {
fmt.Printf("Failed to add file %s to tree: %s\n", f, err) | Display full secrets paths for all content types (#<I>)
Fixes #<I> |
diff --git a/app/views/dashboard/incidents.blade.php b/app/views/dashboard/incidents.blade.php
index <HASH>..<HASH> 100644
--- a/app/views/dashboard/incidents.blade.php
+++ b/app/views/dashboard/incidents.blade.php
@@ -16,7 +16,7 @@
@if ($incidents->count() === 0)
<div class="list-group-item">Woah! No incidents, your doing well!</div>
@else
- <p>You have <strong>{{ $incidents->count() }}</strong> incidents.</p>
+ <p class='lead'>You have <strong>{{ $incidents->count() }}</strong> logged incidents.</p>
@endif
<div class="striped-list"> | Use .lead for first p tag |
diff --git a/src/screenfull.js b/src/screenfull.js
index <HASH>..<HASH> 100644
--- a/src/screenfull.js
+++ b/src/screenfull.js
@@ -90,7 +90,7 @@
if (/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)) {
elem[request]();
} else {
- elem[request](keyboardAllowed && Element.ALLOW_KEYBOARD_INPUT);
+ elem[request](keyboardAllowed ? Element.ALLOW_KEYBOARD_INPUT : {});
}
},
exit: function () { | Fix issue with Chrome <I>+ (#<I>) |
diff --git a/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java b/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java
index <HASH>..<HASH> 100644
--- a/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java
+++ b/languagetool-language-modules/de/src/main/java/org/languagetool/rules/de/GermanSpellerRule.java
@@ -270,6 +270,8 @@ public class GermanSpellerRule extends CompoundAwareHunspellRule {
String suggestion;
if ("WIFI".equals(word) || "wifi".equals(word)) {
return Collections.singletonList("Wi-Fi");
+ } else if ("genomen".equals(word)) {
+ return Collections.singletonList("genommen");
} else if ("ausversehen".equals(word)) {
return Collections.singletonList("aus Versehen");
} else if ("getz".equals(word)) { | [de] suggestion for 'genomen' |
diff --git a/future/__init__.py b/future/__init__.py
index <HASH>..<HASH> 100644
--- a/future/__init__.py
+++ b/future/__init__.py
@@ -172,7 +172,7 @@ else:
__ver_major__ = 0
__ver_minor__ = 3
-__ver_patch__ = 4
+__ver_patch__ = 5
__ver_sub__ = ''
__version__ = "%d.%d.%d%s" % (__ver_major__,__ver_minor__,__ver_patch__,__ver_sub__)
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -24,8 +24,7 @@ PACKAGES = ["future",
"future.backports.test",
"libfuturize",
"libfuturize.fixes2",
- "libfuturize.fixes3",
- "libfuturize.tests"]
+ "libfuturize.fixes3"]
PACKAGE_DATA = {'': [
'README.rst',
'LICENSE', | Remove empty directory libfuturize.tests from setup.py packages list
Otherwise "python setup.py build" bails with this message:
error: package directory 'libfuturize/tests' does not exist |
diff --git a/src/includes/classes/Core/Utils/WsVersion.php b/src/includes/classes/Core/Utils/WsVersion.php
index <HASH>..<HASH> 100644
--- a/src/includes/classes/Core/Utils/WsVersion.php
+++ b/src/includes/classes/Core/Utils/WsVersion.php
@@ -110,6 +110,12 @@ class WsVersion extends Classes\Core\Base\Core implements Interfaces\WsVersionCo
$m = substr($version, 2, 2); // Month.
$d = substr($version, 4, 2); // Day.
- return strtotime($Y.'-'.$m.'-'.$d);
+ $time = strtotime($Y.'-'.$m.'-'.$d.' 12:00 am');
+
+ if (preg_match('/^[0-9]{6}\.([0-9]+)/u', $version, $_m)) {
+ $time += $_m[1]; // Seconds into current day.
+ } // unset($_m); // Housekeeping.
+
+ return $time;
}
} | Adding `.[time]` to version-to-date converter. |
diff --git a/fabrik/recipes/django.py b/fabrik/recipes/django.py
index <HASH>..<HASH> 100644
--- a/fabrik/recipes/django.py
+++ b/fabrik/recipes/django.py
@@ -36,10 +36,7 @@ def after_deploy():
_migrate()
# Handle invalid collectstatic gracefully
- try:
- _collectstatic()
- except Exception as e: # NOQA
- pass
+ _collectstatic()
if "public_path" in env:
paths.symlink(paths.get_current_path(), env.public_path)
@@ -52,7 +49,7 @@ def _migrate():
def _collectstatic():
with(env.cd(paths.get_current_path())):
- env.run("python manage.py collectstatic --noinput")
+ env.run("python manage.py collectstatic --noinput", warn_only=True)
@hook("rollback") | Fixed issue with collecstatic failing |
diff --git a/tests/scripts/unit/wee-dom.js b/tests/scripts/unit/wee-dom.js
index <HASH>..<HASH> 100644
--- a/tests/scripts/unit/wee-dom.js
+++ b/tests/scripts/unit/wee-dom.js
@@ -920,12 +920,14 @@ describe('DOM', () => {
expect($('.child').length).to.equal(4);
expect($('.child')[3].innerHTML).to.equal('3');
+ expect($('.child')[3].parentNode.className).to.equal('parent');
});
it('should prepend selection to end of parent target', () => {
$('.parent').prepend($('#first'));
expect($('div', '.parent')[3].innerHTML).to.equal('3');
+ expect($('#first')[0].parentNode.className).to.equal('parent');
});
it('should execute callback and append return value', () => { | Add additional assertions for $prepend method |
diff --git a/Connection.php b/Connection.php
index <HASH>..<HASH> 100755
--- a/Connection.php
+++ b/Connection.php
@@ -5,7 +5,6 @@ namespace Illuminate\Database;
use PDO;
use Closure;
use Exception;
-use Throwable;
use LogicException;
use DateTimeInterface;
use Illuminate\Support\Arr;
@@ -479,7 +478,7 @@ class Connection implements ConnectionInterface
*/
public function pretend(Closure $callback)
{
- return $this->withFreshQueryLog(function() use ($callback) {
+ return $this->withFreshQueryLog(function () use ($callback) {
$this->pretending = true;
// Basically to make the database connection "pretend", we will just return
@@ -783,7 +782,6 @@ class Connection implements ConnectionInterface
if (isset($this->events)) {
$this->events->fire($event);
}
-
}
/** | Apply fixes from StyleCI (#<I>) |
diff --git a/lib/vagrant-mutate/converter/kvm.rb b/lib/vagrant-mutate/converter/kvm.rb
index <HASH>..<HASH> 100644
--- a/lib/vagrant-mutate/converter/kvm.rb
+++ b/lib/vagrant-mutate/converter/kvm.rb
@@ -17,7 +17,12 @@ module VagrantMutate
uuid = nil
gui = true
- disk_bus = @input_box.disk_interface
+
+ if @force_virtio == true
+ disk_bus = 'virtio'
+ else
+ disk_bus = @input_box.disk_interface
+ end
image_type = @output_box.image_format
disk = @output_box.image_name | Add force virtio support to kvm |
diff --git a/examples/node/xds/greeter_client.js b/examples/node/xds/greeter_client.js
index <HASH>..<HASH> 100644
--- a/examples/node/xds/greeter_client.js
+++ b/examples/node/xds/greeter_client.js
@@ -53,7 +53,9 @@ function main() {
user = 'world';
}
client.sayHello({name: user}, function(err, response) {
+ if (err) throw err;
console.log('Greeting:', response.message);
+ client.close();
});
} | Node xDS example: show error on failure, close client when done |
diff --git a/hca/dss/__init__.py b/hca/dss/__init__.py
index <HASH>..<HASH> 100644
--- a/hca/dss/__init__.py
+++ b/hca/dss/__init__.py
@@ -225,9 +225,11 @@ class DSSClient(SwaggerClient):
:param float min_delay_seconds: The minimum number of seconds to wait in between retries.
Download a bundle and save it to the local filesystem as a directory.
- By default, all data and metadata files are downloaded. To disable the downloading of data files,
- use `--data-files ''` if using the CLI (or `data_files=()` if invoking `download` programmatically).
- Likewise for metadata files.
+
+ By default, all data and metadata files are downloaded. To disable the downloading of data, use the
+ `--no-data` flag if using the CLI or pass the `no_data=True` argument if calling the `download()` API method.
+ Likewise, to disable the downloading of metadata, use the `--no-metadata` flag for the CLI or pass the
+ `no_metadata=True` argument if calling the `download()` API method.
If a retryable exception occurs, we wait a bit and retry again. The delay increases each time we fail and
decreases each time we successfully read a block. We set a quota for the number of failures that goes up with | Fix dss download docstring to use correct flags (#<I>) |
diff --git a/lib/oneview-sdk/image-streamer/resource/api300/plan_scripts.rb b/lib/oneview-sdk/image-streamer/resource/api300/plan_scripts.rb
index <HASH>..<HASH> 100644
--- a/lib/oneview-sdk/image-streamer/resource/api300/plan_scripts.rb
+++ b/lib/oneview-sdk/image-streamer/resource/api300/plan_scripts.rb
@@ -31,17 +31,9 @@ module OneviewSDK
# Retrieves the modified contents of the selected Plan Script as per the selected attributes.
# @return The script differences of the selected Plan Script
def retrieve_differences
- response = @client.rest_post("#{BASE_URI}/differences/#{extract_id_from_uri}")
+ response = @client.rest_post("#{BASE_URI}/differences/#{@data['uri'].split('/').last}")
@client.response_handler(response)
end
-
- private
-
- # Extracts the id of the uri.
- # @return The id of the plan script
- def extract_id_from_uri
- @data['uri'].split('/').last
- end
end
end
end | Adjusting the extraction of the id from uri |
diff --git a/telemetry/telemetry/desktop_browser_backend.py b/telemetry/telemetry/desktop_browser_backend.py
index <HASH>..<HASH> 100644
--- a/telemetry/telemetry/desktop_browser_backend.py
+++ b/telemetry/telemetry/desktop_browser_backend.py
@@ -98,8 +98,8 @@ class DesktopBrowserBackend(browser_backend.BrowserBackend):
return DoNothingForwarder(ports[0])
class DoNothingForwarder(object):
- def __init__(self, host_port):
- self._host_port = host_port
+ def __init__(self, *port_pairs):
+ self._host_port = port_pairs[0][0]
@property
def url(self): | Fix Telemetry after r<I> / r<I>.
DoNothingForwarder needs the same fix as applied in r<I>.
BUG=
TEST=./tools/telemetry/run_tests --browser=system testConsole
Review URL: <URL> |
diff --git a/cmd/route-emitter/main.go b/cmd/route-emitter/main.go
index <HASH>..<HASH> 100644
--- a/cmd/route-emitter/main.go
+++ b/cmd/route-emitter/main.go
@@ -8,11 +8,11 @@ import (
"time"
"code.cloudfoundry.org/bbs"
+ "code.cloudfoundry.org/cfhttp"
"code.cloudfoundry.org/cflager"
"code.cloudfoundry.org/consuladapter"
"code.cloudfoundry.org/debugserver"
"code.cloudfoundry.org/locket"
- "github.com/cloudfoundry-incubator/cf_http"
route_emitter "github.com/cloudfoundry-incubator/route-emitter"
"github.com/cloudfoundry-incubator/route-emitter/nats_emitter"
"github.com/cloudfoundry-incubator/route-emitter/routing_table"
@@ -140,7 +140,7 @@ func main() {
cflager.AddFlags(flag.CommandLine)
flag.Parse()
- cf_http.Initialize(*communicationTimeout)
+ cfhttp.Initialize(*communicationTimeout)
logger, reconfigurableSink := cflager.New(*sessionName)
natsClient := diegonats.NewClient() | Update and rename cf_http -> cfhttp
[#<I>] |
diff --git a/gcsweb/cmd/gcsweb/gcsweb.go b/gcsweb/cmd/gcsweb/gcsweb.go
index <HASH>..<HASH> 100644
--- a/gcsweb/cmd/gcsweb/gcsweb.go
+++ b/gcsweb/cmd/gcsweb/gcsweb.go
@@ -303,8 +303,12 @@ func (s *server) handleObject(w http.ResponseWriter, bucket, object string, head
}
defer objReader.Close()
- if headers.contentType != "" && headers.contentEncoding != "" {
- w.Header().Set("Content-Type", fmt.Sprintf("%s; charset=%s", headers.contentType, headers.contentEncoding))
+ if headers.contentType != "" {
+ if headers.contentEncoding != "" {
+ w.Header().Set("Content-Type", fmt.Sprintf("%s; charset=%s", headers.contentType, headers.contentEncoding))
+ } else {
+ w.Header().Set("Content-Type", headers.contentType)
+ }
}
if headers.contentDisposition != "" { | add a content-type header even when encoding is missing |
diff --git a/bin/now-deploy.js b/bin/now-deploy.js
index <HASH>..<HASH> 100755
--- a/bin/now-deploy.js
+++ b/bin/now-deploy.js
@@ -582,7 +582,7 @@ async function sync({ token, config: { currentTeam, user } }) {
)
}
const size = bytes(now.syncAmount)
- const syncCount = `${now.syncFileCount} file${now.syncFileCount > 1 && 's'}`
+ const syncCount = `${now.syncFileCount} file${now.syncFileCount > 1 ? 's' : ''}`
const bar = new Progress(
`> Upload [:bar] :percent :etas (${size}) [${syncCount}]`,
{ | Fix file count with 1 file (#<I>) |
diff --git a/tests/test_namespace.py b/tests/test_namespace.py
index <HASH>..<HASH> 100644
--- a/tests/test_namespace.py
+++ b/tests/test_namespace.py
@@ -1,4 +1,5 @@
-from collections import Mapping
+from collections.abc import Mapping
+from unittest.mock import patch
import pytest
@@ -46,6 +47,20 @@ def test_not_configured():
assert str(subject.does_nope_exist) == repr(subject.does.nope.exist)
+def test_collisions():
+ with patch('confidence.warnings') as warnings:
+ subject = Configuration({'key': 'value', 'keys': [1, 2], '_separator': '_'})
+
+ for collision in ('keys', '_separator'):
+ warnings.warn.assert_any_call('key {key} collides with member of Configuration type, use get() method to '
+ 'retrieve key {key}'.format(key=collision),
+ UserWarning)
+
+ assert subject.key == 'value'
+ assert callable(subject.keys)
+ assert subject._separator == '.'
+
+
def test_dir():
subject = Configuration({'key1': 'value', 'key2': 5, 'namespace.key3': False}) | Test key / member collisions during initialization |
diff --git a/code/libraries/koowa/components/com_activities/model/entity/activity.php b/code/libraries/koowa/components/com_activities/model/entity/activity.php
index <HASH>..<HASH> 100644
--- a/code/libraries/koowa/components/com_activities/model/entity/activity.php
+++ b/code/libraries/koowa/components/com_activities/model/entity/activity.php
@@ -482,7 +482,18 @@ class ComActivitiesModelEntityActivity extends KModelEntityRow implements KObjec
/**
* Get an activity object
*
- * @param array $config An optional configuration array.
+ * @param array $config An optional configuration array. The configuration array may contain
+ * activity object data as defined by ComActivitiesActivityObjectInterface. Additionally the
+ * following parameters may be passed in the configuration array:
+ *
+ * - find (string): the label of an object to look for. If not found the object being created
+ * is set as deleted (with its deleted property set to true) and non-linkable (with its url
+ * property set to null). A call to a _findObjectLabel method will be attempted for determining if an
+ * object with label as defined by Label exists.
+ *
+ * - translate (array): a list of property names to be translated. By default all properties containing
+ * the display prefix are set as translatables.
+ *
* @return ComActivitiesActivityObject The activity object.
*/
protected function _getObject($config = array()) | re #<I> Improved docblock
Documented the contents of the configuration array passed to the object getter method. |
diff --git a/lib/generators/instance/templates/instance_environment.rb b/lib/generators/instance/templates/instance_environment.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/instance/templates/instance_environment.rb
+++ b/lib/generators/instance/templates/instance_environment.rb
@@ -88,11 +88,11 @@ Radiant::Initializer.run do |config|
# standard extensions
config.gem "radiant-archive-extension", :version => "~> 1.0.0"
config.gem "radiant-clipped-extension", :version => "~> 1.0.0"
- config.gem "radiant-debug-extension", :version => "~> 1.0.0"
+ # config.gem "radiant-debug-extension", :version => "~> 1.0.0"
config.gem "radiant-exporter-extension", :version => "~> 1.0.0"
config.gem "radiant-markdown_filter-extension", :version => "~> 1.0.0"
config.gem "radiant-sheets-extension", :version => "~> 1.0.0.pre"
- config.gem "radiant-site_templates-extension", :version => "~> 1.0.0"
+ # config.gem "radiant-site_templates-extension", :version => "~> 1.0.0"
config.gem "radiant-smarty_pants_filter-extension", :version => "~> 1.0.0"
config.gem "radiant-textile_filter-extension", :version => "~> 1.0.0" | disbale the debug and site_templates extensions by default |
diff --git a/src/main/java/me/alb_i986/selenium/tinafw/domain/WebUser.java b/src/main/java/me/alb_i986/selenium/tinafw/domain/WebUser.java
index <HASH>..<HASH> 100644
--- a/src/main/java/me/alb_i986/selenium/tinafw/domain/WebUser.java
+++ b/src/main/java/me/alb_i986/selenium/tinafw/domain/WebUser.java
@@ -219,14 +219,14 @@ public class WebUser<T extends WebUser> {
public boolean equals(Object o) {
if(!(o instanceof WebUser))
return false;
- return equals((WebUser)o);
+ return equals((WebUser) o);
}
/**
* @param user
* @return true if the two users have the same username
*/
- public boolean equals(T user) {
+ public boolean equals(WebUser user) {
if(username == null || user == null)
return false;
return username.equals(user.getUsername()); | fix WebUser#equals
Previously, it could loop on #equals(Object). |
diff --git a/media/boom/js/boom.chunk.js b/media/boom/js/boom.chunk.js
index <HASH>..<HASH> 100755
--- a/media/boom/js/boom.chunk.js
+++ b/media/boom/js/boom.chunk.js
@@ -284,7 +284,7 @@ $.widget('ui.chunkLinkset', $.ui.chunk, {
});
this.dialog = $.boom.dialog.open({
- url: this.options.urlPrefix + '/linkset/' + $.boom.page.config.id,
+ url: this.options.urlPrefix + '/linkset/edit/' + $.boom.page.config.id,
title: 'Edit linkset',
id: self.element[0].id + '-boom-dialog',
width: 400,
@@ -473,9 +473,9 @@ $.widget('ui.chunkLinkset', $.ui.chunk, {
var link = {
- name: $(this).text(),
- uri: url,
- target_page_rid: $(this).attr('rel'),
+ title: $(this).text(),
+ url: url,
+ target_page_id: $(this).attr('rel'),
sequence: sequence
}; | Changed names of linkset links properties in _getData() |
diff --git a/app/src/Bolt/DataCollector/TwigDataCollector.php b/app/src/Bolt/DataCollector/TwigDataCollector.php
index <HASH>..<HASH> 100644
--- a/app/src/Bolt/DataCollector/TwigDataCollector.php
+++ b/app/src/Bolt/DataCollector/TwigDataCollector.php
@@ -168,7 +168,6 @@ class TwigDataCollector extends DataCollector
return $this->data['templatechosen'];
}
-
/**
* Getter for templateerror
* | PSR-2 clean up of DataCollector/TwigDataCollector.php |
diff --git a/astrocats/catalog/spectrum.py b/astrocats/catalog/spectrum.py
index <HASH>..<HASH> 100644
--- a/astrocats/catalog/spectrum.py
+++ b/astrocats/catalog/spectrum.py
@@ -20,6 +20,7 @@ class SPECTRUM(KeyCollection):
SNR = Key('snr', KEY_TYPES.NUMERIC, compare=False)
TIME = Key('time', KEY_TYPES.NUMERIC, compare=False, listable=True)
REDSHIFT = Key('redshift', KEY_TYPES.NUMERIC, compare=False)
+ AIRMASS = Key('airmass', KEY_TYPES.NUMERIC, compare=False)
FILENAME = Key('filename', KEY_TYPES.STRING)
U_FLUXES = Key('u_fluxes', KEY_TYPES.STRING, compare=False) | ENH: added `AIRMASS` key to `SPECTRUM` |
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/DependentFixtureTest.php b/tests/Doctrine/Tests/Common/DataFixtures/DependentFixtureTest.php
index <HASH>..<HASH> 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/DependentFixtureTest.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/DependentFixtureTest.php
@@ -154,6 +154,21 @@ class DependentFixtureTest extends BaseTest
$orderedFixtures = $loader->getFixtures();
}
+
+ public function test_inCaseGetFixturesReturnsDifferentResultsEachTime()
+ {
+ $loader = new Loader();
+ $loader->addFixture(new DependentFixture1);
+ $loader->addFixture(new BaseParentFixture1);
+
+ // Intentionally calling getFixtures() twice
+ $loader->getFixtures();
+ $orderedFixtures = $loader->getFixtures();
+
+ $this->assertCount(2, $orderedFixtures);
+ $this->assertInstanceOf(__NAMESPACE__ . '\BaseParentFixture1', array_shift($orderedFixtures));
+ $this->assertInstanceOf(__NAMESPACE__ . '\DependentFixture1', array_shift($orderedFixtures));
+ }
}
class DependentFixture1 implements FixtureInterface, DependentFixtureInterface | New test for calling Loader's getFixtures() method when using dependent fixtures. |
diff --git a/openpnm/models/physics/__init__.py b/openpnm/models/physics/__init__.py
index <HASH>..<HASH> 100644
--- a/openpnm/models/physics/__init__.py
+++ b/openpnm/models/physics/__init__.py
@@ -18,3 +18,5 @@ from . import thermal_conductance
from . import hydraulic_conductance
from . import multiphase
from . import generic_source_term
+from . import flow_shape_factors
+from . import poisson_shape_factors
\ No newline at end of file | Modified physics models init file |
diff --git a/poetry/packages/locker.py b/poetry/packages/locker.py
index <HASH>..<HASH> 100644
--- a/poetry/packages/locker.py
+++ b/poetry/packages/locker.py
@@ -152,7 +152,7 @@ class Locker:
def _get_content_hash(self): # type: () -> str
"""
- Returns the sha256 hash of the sorted content of the composer file.
+ Returns the sha256 hash of the sorted content of the pyproject file.
"""
content = self._local_config | Fix typo in comment (#<I>) |
diff --git a/src/aws/TagActiveWindow.php b/src/aws/TagActiveWindow.php
index <HASH>..<HASH> 100644
--- a/src/aws/TagActiveWindow.php
+++ b/src/aws/TagActiveWindow.php
@@ -54,7 +54,7 @@ class TagActiveWindow extends ActiveWindow
/**
* Getter tableName.
*
- * @return unknown|string
+ * @return string
*/
public function getTableName()
{
@@ -68,7 +68,7 @@ class TagActiveWindow extends ActiveWindow
/**
* Setter tableName.
*
- * @param unknown $tableName
+ * @param string $tableName
*/
public function setTableName($tableName)
{ | Update TagActiveWindow.php |
diff --git a/test/unit/blocks.js b/test/unit/blocks.js
index <HASH>..<HASH> 100644
--- a/test/unit/blocks.js
+++ b/test/unit/blocks.js
@@ -1,5 +1,5 @@
var test = require('tap').test;
-var Blocks = require('../../src/engine/Blocks');
+var Blocks = require('../../src/engine/blocks');
test('spec', function (t) {
var b = new Blocks(); | Fixing case problem with blocks.js tests |
diff --git a/src/main/java/org/spout/nbt/CompoundTag.java b/src/main/java/org/spout/nbt/CompoundTag.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/spout/nbt/CompoundTag.java
+++ b/src/main/java/org/spout/nbt/CompoundTag.java
@@ -29,7 +29,7 @@ package org.spout.nbt;
/**
* The {@code TAG_Compound} tag.
*/
-public final class CompoundTag extends Tag<CompoundMap> {
+public class CompoundTag extends Tag<CompoundMap> {
/**
* The value.
*/
diff --git a/src/main/java/org/spout/nbt/ListTag.java b/src/main/java/org/spout/nbt/ListTag.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/spout/nbt/ListTag.java
+++ b/src/main/java/org/spout/nbt/ListTag.java
@@ -33,7 +33,7 @@ import java.util.List;
/**
* The {@code TAG_List} tag.
*/
-public final class ListTag<T extends Tag<?>> extends Tag<List<T>> {
+public class ListTag<T extends Tag<?>> extends Tag<List<T>> {
/**
* The type of entries within this list.
*/ | Removed final from Compound and List tags |
diff --git a/test/PngQuant.js b/test/PngQuant.js
index <HASH>..<HASH> 100644
--- a/test/PngQuant.js
+++ b/test/PngQuant.js
@@ -25,9 +25,9 @@ describe('PngQuant', () => {
'when piped through',
new PngQuant([128, '--quality', '60-80', '--nofs']),
'to yield output satisfying',
- resultPngBuffer => {
+ expect.it(resultPngBuffer => {
expect(resultPngBuffer.length, 'to be within', 0, 8285);
- }
+ })
));
it.skipIf( | Wrap to satisfy function in expect.it |
diff --git a/test/recipe/RemoteServerTest.php b/test/recipe/RemoteServerTest.php
index <HASH>..<HASH> 100644
--- a/test/recipe/RemoteServerTest.php
+++ b/test/recipe/RemoteServerTest.php
@@ -9,7 +9,7 @@ use \Deployer\Helper\RecipeTester;
class RemoteServerTest extends RecipeTester
{
- const IP_REG_EXP = '#^::1#';
+ const IP_REG_EXP = '#^(::1)|(127.0.0.1)$#';
/**
* @var \Deployer\Type\Result | Fixed Travis CI build fails follow @MaartenStaa suggestion |
diff --git a/src/utils/emitter.js b/src/utils/emitter.js
index <HASH>..<HASH> 100644
--- a/src/utils/emitter.js
+++ b/src/utils/emitter.js
@@ -101,7 +101,15 @@ const setter = function(target, key, descriptor) {
return
}
- const changed = { type: key, from: prev, to: val }
+ const from = prev && isFunction(prev.toObject)
+ ? prev.toObject()
+ : prev
+
+ const to = val && isFunction(val.toObject)
+ ? val.toObject()
+ : val
+
+ const changed = { type: key, from, to }
let current
try { | Convert from and to changes to object if possible |
diff --git a/core/src/main/java/com/twitter/elephantbird/thrift/ThriftBinaryDeserializer.java b/core/src/main/java/com/twitter/elephantbird/thrift/ThriftBinaryDeserializer.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/twitter/elephantbird/thrift/ThriftBinaryDeserializer.java
+++ b/core/src/main/java/com/twitter/elephantbird/thrift/ThriftBinaryDeserializer.java
@@ -47,4 +47,7 @@ public class ThriftBinaryDeserializer extends TDeserializer {
protocol.setReadLength(bytes.length); // the class exists to do this
super.deserialize(base, bytes);
}
+
+ // TODO: should add deserialize(TBase, bytes, offset, length).
+ // it could avoid a copy in many cases.
} | add to TODO for buffer copy friendly deserialize(). |
diff --git a/src/js/libpannellum.js b/src/js/libpannellum.js
index <HASH>..<HASH> 100644
--- a/src/js/libpannellum.js
+++ b/src/js/libpannellum.js
@@ -985,8 +985,8 @@ function Renderer(container) {
this.image = new Image();
this.image.addEventListener('load', function() {
processLoadedTexture(self.image, self.texture);
- releaseTextureImageLoader(self);
self.callback(self.texture);
+ releaseTextureImageLoader(self);
});
}; | Fix multires texture loading artifacts (regression introduced in <I>c6cf<I>f7eb7c1accf<I>ab5fd2e<I>d<I>c<I>). |
diff --git a/lib/flapjack/cli/notifier.rb b/lib/flapjack/cli/notifier.rb
index <HASH>..<HASH> 100644
--- a/lib/flapjack/cli/notifier.rb
+++ b/lib/flapjack/cli/notifier.rb
@@ -158,6 +158,7 @@ module Flapjack
if File.exists?(filename + '.rb')
@log.debug("Loading the #{notifier.to_s.capitalize} notifier")
require filename
+ config.merge!(:logger => @log)
@notifiers << Flapjack::Notifiers.const_get("#{notifier.to_s.capitalize}").new(config)
else
@log.warning("Flapjack::Notifiers::#{notifier.to_s.capitalize} doesn't exist!") | pass in a logger when setting up a notifier |
diff --git a/werkzeug/contrib/fixers.py b/werkzeug/contrib/fixers.py
index <HASH>..<HASH> 100644
--- a/werkzeug/contrib/fixers.py
+++ b/werkzeug/contrib/fixers.py
@@ -102,8 +102,8 @@ class ProxyFix(object):
forwarded_host = getter('HTTP_X_FORWARDED_HOST', '')
environ.update({
'werkzeug.proxy_fix.orig_wsgi_url_scheme': getter('wsgi.url_scheme'),
- 'werkzeug.proxy_fix.orig_remote_addr': getter('REMOTE_ADDR'),
- 'werkzeug.proxy_fix.orig_http_host': getter('HTTP_HOST')
+ 'werkzeug.proxy_fix.orig_remote_addr': getter('REMOTE_ADDR'),
+ 'werkzeug.proxy_fix.orig_http_host': getter('HTTP_HOST')
})
if forwarded_for:
environ['REMOTE_ADDR'] = forwarded_for[0].strip() | Small reindent in the fixers |
diff --git a/packages/bonde-styleguide/src/cards/Card/Card.js b/packages/bonde-styleguide/src/cards/Card/Card.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-styleguide/src/cards/Card/Card.js
+++ b/packages/bonde-styleguide/src/cards/Card/Card.js
@@ -33,6 +33,10 @@ const CardTitle = ({ children }) => (
</Text>
)
+const NoTitle = styled.div`
+ height: 46px;
+`
+
/**
* The only true card.
*/
@@ -43,7 +47,10 @@ const Card = styled(({
...boxProps
}) => (
<div className={className}>
- {title && (<CardTitle>{title}</CardTitle>)}
+ {!title ?
+ <NoTitle /> :
+ <CardTitle>{title}</CardTitle>
+ }
<CardBox {...boxProps}>
{children}
</CardBox> | fix(styleguide): keep the space of card title |
diff --git a/bind.go b/bind.go
index <HASH>..<HASH> 100644
--- a/bind.go
+++ b/bind.go
@@ -110,6 +110,9 @@ func In(query string, args ...interface{}) (string, []interface{}, error) {
meta := make([]argMeta, len(args))
for i, arg := range args {
+ if a, ok := arg.(driver.Valuer); ok {
+ arg, _ = a.Value()
+ }
v := reflect.ValueOf(arg)
t := reflectx.Deref(v.Type()) | Valuer objects are evaluated before In expansion
Value() method of Valuer objects may change slices into non-slice objects or vice-versa.
Therefore we must do the evaluation before the expansion. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.