diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php
+++ b/src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php
@@ -85,8 +85,6 @@ class BasicAuthenticationListener implements ListenerInterface
return;
}
- $event->stopPropagation();
-
$event->setResponse($this->authenticationEntryPoint->start($request, $failed));
}
}
|
[Security] Removed useless method call
|
diff --git a/openhtf/util/measurements.py b/openhtf/util/measurements.py
index <HASH>..<HASH> 100644
--- a/openhtf/util/measurements.py
+++ b/openhtf/util/measurements.py
@@ -63,7 +63,6 @@ Examples:
import collections
-import itertools
import logging
from enum import Enum
@@ -350,10 +349,8 @@ class Collection(mutablerecords.Record('Collection', ['_measurements'],
raise NotAMeasurementError('Not a measurement', name, self._measurements)
def __iter__(self): # pylint: disable=invalid-name
- def _GetMeasurementValue(item): # pylint: disable=invalid-name
- """Extract a single MeasurementValue's value."""
- return item[0], item[1].value
- return itertools.imap(_GetMeasurementValue, self._values.iteritems())
+ """Extract each MeasurementValue's value."""
+ return ((key, val.value) for key, val in self._values.iteritems())
def __setattr__(self, name, value): # pylint: disable=invalid-name
self[name] = value
|
Cleanup measurements.Collection.__iter__
Replaced a function and itertools.imap() call with a simpler generator expression
|
diff --git a/src/main/java/com/cloudbees/jenkins/support/impl/NetworkInterfaces.java b/src/main/java/com/cloudbees/jenkins/support/impl/NetworkInterfaces.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudbees/jenkins/support/impl/NetworkInterfaces.java
+++ b/src/main/java/com/cloudbees/jenkins/support/impl/NetworkInterfaces.java
@@ -122,8 +122,8 @@ public class NetworkInterfaces extends Component {
bos.append(" ** Index - ").append(ni.getIndex()).append("\n");
Enumeration<InetAddress> inetAddresses = ni.getInetAddresses();
while (inetAddresses.hasMoreElements()) {
- NetworkInterface networkInterface = networkInterfaces.nextElement();
- bos.append(" ** InetAddress - ").append(networkInterface).append("\n");
+ InetAddress inetAddress = inetAddresses.nextElement();
+ bos.append(" ** InetAddress - ").append(inetAddress).append("\n");
}
bos.append(" ** MTU - ").append(ni.getMTU()).append("\n");
bos.append(" ** Is Up - ").append(ni.isUp()).append("\n");
|
Refer to inetAddress in loop.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -86,8 +86,13 @@ setup(
'pyyaml',
'webencodings',
'gevent==1.1.2',
- 'webassets',
- ],
+ 'webassets==0.12.0',
+ 'pyamf'
+ ],
+ dependency_links=[
+ 'git+https://github.com/ikreymer/webassets.git@pyinstaller#egg=webassets-0.12.0',
+ 'git+https://github.com/t0m/pyamf.git@python3#egg=pyamf-0.8.0'
+ ],
tests_require=[
'pytest',
'WebTest',
|
setup: add specific dependencies for webassets, pyamf
|
diff --git a/lib/Api/Campaigns.php b/lib/Api/Campaigns.php
index <HASH>..<HASH> 100644
--- a/lib/Api/Campaigns.php
+++ b/lib/Api/Campaigns.php
@@ -131,7 +131,7 @@ class Campaigns extends Api
return $this->makeRequest($this->endpoint.'/'.$id.'/contacts', $parameters);
}
- /**
+ /**
* Clone an Existing campaign
*
* @param int $id Campaign ID
|
one more space so it looks perty
|
diff --git a/src/ol/interaction/selectinteraction.js b/src/ol/interaction/selectinteraction.js
index <HASH>..<HASH> 100644
--- a/src/ol/interaction/selectinteraction.js
+++ b/src/ol/interaction/selectinteraction.js
@@ -179,8 +179,20 @@ ol.interaction.Select.prototype.handleMapBrowserEvent =
* @inheritDoc
*/
ol.interaction.Select.prototype.setMap = function(map) {
+ var currentMap = this.getMap();
+ var selectedFeatures = this.featureOverlay_.getFeatures();
+ if (!goog.isNull(currentMap)) {
+ selectedFeatures.forEach(function(feature) {
+ currentMap.getSkippedFeatures().remove(feature);
+ });
+ }
goog.base(this, 'setMap', map);
this.featureOverlay_.setMap(map);
+ if (!goog.isNull(map)) {
+ selectedFeatures.forEach(function(feature) {
+ map.getSkippedFeatures().push(feature);
+ });
+ }
};
|
Handle skipped features when setting the map
When a Select interaction is removed from the map, it should
remove its selected features from the map's skippedFeatures
collection. When it is added to a map, it should add them.
|
diff --git a/lib/tools/adb-commands.js b/lib/tools/adb-commands.js
index <HASH>..<HASH> 100644
--- a/lib/tools/adb-commands.js
+++ b/lib/tools/adb-commands.js
@@ -9,6 +9,8 @@ import Logcat from '../logcat';
import { sleep, waitForCondition } from 'asyncbox';
import { SubProcess } from 'teen_process';
import B from 'bluebird';
+import { quote } from 'shell-quote';
+
const SETTINGS_HELPER_ID = 'io.appium.settings';
const WIFI_CONNECTION_SETTING_RECEIVER = `${SETTINGS_HELPER_ID}/.receivers.WiFiConnectionSettingReceiver`;
@@ -1541,12 +1543,14 @@ methods.screenrecord = function (destination, options = {}) {
cmd.push('--bugreport');
}
cmd.push(destination);
- log.debug(`Building screenrecord process with the command line: adb shell ${cmd.join(' ')}`);
- return new SubProcess(this.executable.path, [
+
+ const fullCmd = [
...this.executable.defaultArgs,
'shell',
...cmd
- ]);
+ ];
+ log.debug(`Building screenrecord process with the command line: adb ${quote(fullCmd)}`);
+ return new SubProcess(this.executable.path, fullCmd);
};
export default methods;
|
Improve logging for the screenrecord command (#<I>)
* Improve logging for the screenrecord command
* Use shell-quote call
|
diff --git a/src/Symfony/Component/HttpFoundation/RedirectResponse.php b/src/Symfony/Component/HttpFoundation/RedirectResponse.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/HttpFoundation/RedirectResponse.php
+++ b/src/Symfony/Component/HttpFoundation/RedirectResponse.php
@@ -37,10 +37,13 @@ class RedirectResponse extends Response
}
parent::__construct(
- sprintf('<html>
+ sprintf('<!DOCTYPE html>
+<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="1;url=%1$s" />
+
+ <title>Redirecting to %1$s</title>
</head>
<body>
Redirecting to <a href="%1$s">%1$s</a>.
|
[RedirectResponse] Added missing `doctype` and `title` tag
|
diff --git a/pax-web-extender-war/src/main/java/org/ops4j/pax/web/extender/war/internal/parser/WebFilterAnnotationScanner.java b/pax-web-extender-war/src/main/java/org/ops4j/pax/web/extender/war/internal/parser/WebFilterAnnotationScanner.java
index <HASH>..<HASH> 100644
--- a/pax-web-extender-war/src/main/java/org/ops4j/pax/web/extender/war/internal/parser/WebFilterAnnotationScanner.java
+++ b/pax-web-extender-war/src/main/java/org/ops4j/pax/web/extender/war/internal/parser/WebFilterAnnotationScanner.java
@@ -96,6 +96,7 @@ public class WebFilterAnnotationScanner extends
}
WebAppFilterMapping mapping = new WebAppFilterMapping();
mapping.setDispatcherTypes(dispatcherSet);
+ mapping.setFilterName(name);
webApp.addFilterMapping(mapping);
} else {
WebAppInitParam[] initParams = filter.getInitParams();
@@ -153,6 +154,7 @@ public class WebFilterAnnotationScanner extends
}
WebAppFilterMapping mapping = new WebAppFilterMapping();
mapping.setDispatcherTypes(dispatcherSet);
+ mapping.setFilterName(name);
webApp.addFilterMapping(mapping);
}
}
|
[PAXWEB-<I>] - Annotated Filters miss to set the FilterName: "Filter
name is null."
|
diff --git a/spyderlib/utils/introspection/jedi_plugin.py b/spyderlib/utils/introspection/jedi_plugin.py
index <HASH>..<HASH> 100644
--- a/spyderlib/utils/introspection/jedi_plugin.py
+++ b/spyderlib/utils/introspection/jedi_plugin.py
@@ -172,7 +172,12 @@ class JediPlugin(IntrospectionPlugin):
def parse_call_def(self, call_def):
"""Get a formatted calltip and docstring from Jedi"""
- call_def = call_def[0]
+ for cd in call_def:
+ if cd.doc:
+ call_def = cd
+ break
+ else:
+ call_def = call_def[0]
name = call_def.name
if name is None:
return
|
Fix handling of multiple call defs.
|
diff --git a/aetros/logger.py b/aetros/logger.py
index <HASH>..<HASH> 100755
--- a/aetros/logger.py
+++ b/aetros/logger.py
@@ -99,22 +99,25 @@ class GeneralLogger(object):
self.write(buf)
+ flush_chars = [b'\n', b'\r']
+
while True:
try:
# needs to be 1 so we fetch data in near real-time
chunk = buffer.read(1)
if chunk == b'':
+ if current_line:
+ handle_line(current_line)
return
current_line += chunk
- while b'\n' in current_line:
- current_line = current_line.replace(b'\r', b'')
- pos = current_line.find(b'\n')
- line = current_line[:pos+1]
- current_line = current_line[pos+1:]
-
- handle_line(line)
+ for char in flush_chars:
+ while char in current_line:
+ pos = current_line.find(char)
+ line = current_line[:pos+1]
+ current_line = current_line[pos+1:]
+ handle_line(line)
except (KeyboardInterrupt, SystemExit):
raise
|
Use \r as flush character as well
|
diff --git a/cmd/runtimetest/main.go b/cmd/runtimetest/main.go
index <HASH>..<HASH> 100644
--- a/cmd/runtimetest/main.go
+++ b/cmd/runtimetest/main.go
@@ -68,7 +68,7 @@ func loadSpecConfig(path string) (spec *rspec.Spec, err error) {
cf, err := os.Open(configPath)
if err != nil {
if os.IsNotExist(err) {
- return nil, fmt.Errorf("%s not found", specConfig)
+ return nil, specerror.NewError(specerror.ConfigInRootBundleDir, err, rspec.Version)
}
return nil, err
|
runtimetest: Raise ConfigInRootBundleDir for missing config.json
This is a bit tricky, because before we load the config, we don't know
the target spec version. If a future spec version relaxes the current
requirement, we'll have difficulty reporting an "I couldn't find the
config" error as a spec violation. If/when that happens, I'm fine
dropping this block altogether, and having this error fall through as
a non-spec "you called us wrong" error.
|
diff --git a/pyes/query.py b/pyes/query.py
index <HASH>..<HASH> 100644
--- a/pyes/query.py
+++ b/pyes/query.py
@@ -1775,7 +1775,7 @@ class FunctionScoreQuery(Query):
class RandomFunction(FunctionScoreFunction):
"""Is a random boost based on a seed value"""
- _internal_name = 'random_Score'
+ _internal_name = 'random_score'
def __init__(self, seed, filter=None):
self.seed = seed
|
fixed typo which broke random_score function
|
diff --git a/lib/thrift_client.rb b/lib/thrift_client.rb
index <HASH>..<HASH> 100644
--- a/lib/thrift_client.rb
+++ b/lib/thrift_client.rb
@@ -210,14 +210,16 @@ module TimingOutThriftClient
end
def has_timeouts!
- if @options[:timeout_overrides].any?
- if (@options[:transport_wrapper] || @options[:transport]).method_defined?(:timeout=)
- return true
- else
- warn "ThriftClient: Timeout overrides have no effect with with transport type #{(@options[:transport_wrapper] || @options[:transport])}"
- end
+ transport_can_timeout? if @options[:timeout_overrides].any?
+ end
+
+ def transport_can_timeout?
+ if (@options[:transport_wrapper] || @options[:transport]).method_defined?(:timeout=)
+ true
+ else
+ warn "ThriftClient: Timeout overrides have no effect with with transport type #{(@options[:transport_wrapper] || @options[:transport])}"
+ false
end
- false
end
end
|
breaking out the timeout override and transport checks
|
diff --git a/src/CliRenderer.php b/src/CliRenderer.php
index <HASH>..<HASH> 100644
--- a/src/CliRenderer.php
+++ b/src/CliRenderer.php
@@ -130,7 +130,7 @@ class CliRenderer
/**
* @param string $inlineBlockClass
*
- * @return null|CliBlockRendererInterface
+ * @return null|CliInlineRendererInterface
*/
private function getInlineRendererForClass($inlineBlockClass)
{
|
Correct typehint - makes the IDE happier.
|
diff --git a/config/module.config.php b/config/module.config.php
index <HASH>..<HASH> 100644
--- a/config/module.config.php
+++ b/config/module.config.php
@@ -72,8 +72,7 @@ return array(
),
),
)),
-
- // Navigation-Konfig für die main_navigation
+
'navigation' => array(
'default' => array(
'settings' => array(
diff --git a/src/Settings/Listener/InjectSubNavigationListener.php b/src/Settings/Listener/InjectSubNavigationListener.php
index <HASH>..<HASH> 100644
--- a/src/Settings/Listener/InjectSubNavigationListener.php
+++ b/src/Settings/Listener/InjectSubNavigationListener.php
@@ -26,7 +26,7 @@ class InjectSubNavigationListener
}
$services = $event->getApplication()->getServiceManager();
- $navigation = $services->get('main_navigation');
+ $navigation = $services->get('Core/Navigation');
$settingsMenu = $navigation->findOneBy('route', 'lang/settings');
if ($settingsMenu->hasChildren()) {
|
[Core] renamed the "main_navigation" into Core/Navigation to fit the naming conventions.
|
diff --git a/javascript/node/selenium-webdriver/lib/until.js b/javascript/node/selenium-webdriver/lib/until.js
index <HASH>..<HASH> 100644
--- a/javascript/node/selenium-webdriver/lib/until.js
+++ b/javascript/node/selenium-webdriver/lib/until.js
@@ -205,7 +205,7 @@ exports.urlContains = function urlContains(substrUrl) {
'for URL to contain ' + JSON.stringify(substrUrl),
function(driver) {
return driver.getCurrentUrl().then(function(url) {
- return url.indexOf(substrUrl) !== -1;
+ return url && url.indexOf(substrUrl) !== -1;
});
});
};
|
fix: add until.urlContains null value check (#<I>)
`driver.getCurrentUrl()` can return `null` in some cases, which causes
a `TypeError` instead of continuing to retry for the expected time.
|
diff --git a/.size-limit.js b/.size-limit.js
index <HASH>..<HASH> 100755
--- a/.size-limit.js
+++ b/.size-limit.js
@@ -1,6 +1,6 @@
const shared = { webpack: false, running: false }
module.exports = [
- { path: "dist/vue-treeselect.umd.min.js", limit: "16 KB", ...shared },
+ { path: "dist/vue-treeselect.umd.min.js", limit: "16.5 KB", ...shared },
{ path: "dist/vue-treeselect.min.css", limit: "5 KB", ...shared },
]
|
increase the upper limit for the size of minified js file
|
diff --git a/tests/ATest.php b/tests/ATest.php
index <HASH>..<HASH> 100644
--- a/tests/ATest.php
+++ b/tests/ATest.php
@@ -222,4 +222,13 @@ class ATest extends PHPUnit_Framework_TestCase
$this->assertEquals(array(0, 2, 4, 6, 8, 10), $a->filter($even)->array);
$this->assertEquals(array(1, 3, 5, 7, 9), $a->filter($odd)->array);
}
+
+
+ public function testMappingValuesShouldSuccess()
+ {
+ $cube = function($n){return $n * $n * $n;};
+
+ $a = new A(range(1, 5));
+ $this->assertEquals(array(1, 8, 27, 64, 125), $a->map($cube)->array);
+ }
}
|
Unit testing for map feature of A class
|
diff --git a/src/Domains/Resource/ResourceBlueprint.php b/src/Domains/Resource/ResourceBlueprint.php
index <HASH>..<HASH> 100644
--- a/src/Domains/Resource/ResourceBlueprint.php
+++ b/src/Domains/Resource/ResourceBlueprint.php
@@ -10,7 +10,6 @@ use Illuminate\Support\Fluent;
* @method ResourceBlueprint model($model)
* @method ResourceBlueprint nav($nav)
* @method ResourceBlueprint resourceKey($key)
- * @method ResourceBlueprint label($label)
* @method ResourceBlueprint entryLabel($entryLabel)
*/
class ResourceBlueprint extends Fluent
@@ -22,6 +21,14 @@ class ResourceBlueprint extends Fluent
return $this->resourceKey ?? str_singular($this->table);
}
+ public function label($label)
+ {
+ $this->offsetSet('label', $label);
+ if (! $this->resourceKey) {
+ $this->resourceKey(str_slug(str_singular($label), '_'));
+ }
+ }
+
public function fill(array $attributes = [])
{
foreach ($attributes as $key => $value) {
|
Set resource key from label, if not set before
|
diff --git a/Eloquent/Concerns/HasAttributes.php b/Eloquent/Concerns/HasAttributes.php
index <HASH>..<HASH> 100644
--- a/Eloquent/Concerns/HasAttributes.php
+++ b/Eloquent/Concerns/HasAttributes.php
@@ -1178,6 +1178,8 @@ trait HasAttributes
} elseif ($this->hasCast($key, ['object', 'collection'])) {
return $this->castAttribute($key, $current) ==
$this->castAttribute($key, $original);
+ } elseif ($this->hasCast($key, ['real', 'float', 'double'])) {
+ return abs($this->castAttribute($key, $current) - $this->castAttribute($key, $original)) < PHP_FLOAT_EPSILON * 4;
} elseif ($this->hasCast($key)) {
return $this->castAttribute($key, $current) ===
$this->castAttribute($key, $original);
|
Correct implementation of float casting comparison (#<I>)
|
diff --git a/lib/chef/resource/rhsm_register.rb b/lib/chef/resource/rhsm_register.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/resource/rhsm_register.rb
+++ b/lib/chef/resource/rhsm_register.rb
@@ -64,7 +64,7 @@ class Chef
property :auto_attach,
[TrueClass, FalseClass],
description: "If true, RHSM will attempt to automatically attach the host to applicable subscriptions. It is generally better to use an activation key with the subscriptions pre-defined.",
- introduced: "16.5"
+ default: false
property :install_katello_agent, [TrueClass, FalseClass],
description: "If true, the 'katello-agent' RPM will be installed.",
|
fixes typo made in auto_attach edit
|
diff --git a/src/passes/bloom.js b/src/passes/bloom.js
index <HASH>..<HASH> 100644
--- a/src/passes/bloom.js
+++ b/src/passes/bloom.js
@@ -43,12 +43,11 @@ export class BloomPass extends Pass {
this.renderTargetX = new THREE.WebGLRenderTarget(1, 1, {
minFilter: THREE.LinearFilter,
magFilter: THREE.LinearFilter,
+ generateMipmaps: false,
stencilBuffer: false,
depthBuffer: false
});
- this.renderTargetX.texture.generateMipmaps = false;
-
/**
* A second render target.
*
@@ -67,6 +66,7 @@ export class BloomPass extends Pass {
*
* @property resolutionScale
* @type Number
+ * @default 0.5
*/
this.resolutionScale = (options.resolutionScale === undefined) ? 0.5 : options.resolutionScale;
@@ -185,7 +185,7 @@ export class BloomPass extends Pass {
this.convolutionMaterial.uniforms.tDiffuse.value = this.renderTargetX;
renderer.render(this.scene, this.camera, this.renderTargetY);
- // Render original scene with superimposed blur.
+ // Render the original scene with superimposed blur.
if(this.renderToScreen) {
this.quad.material = this.combineMaterial;
|
Code cleanup.
Made it more compact.
|
diff --git a/lib/gemspec.rb b/lib/gemspec.rb
index <HASH>..<HASH> 100644
--- a/lib/gemspec.rb
+++ b/lib/gemspec.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
require File.expand_path('../../vendor/refinerycms/refinery.rb', __FILE__)
-files = %w( .gitignore .yardopts Gemfile ).map { |file| Dir[file] }.flatten
+files = %w( .gitignore .yardopts Gemfile readme.md license.md changelog.md todo.md ).map { |file| Dir[file] }.flatten
%w(app bin config db features lib public script test themes vendor).sort.each do |dir|
files += Dir.glob("#{dir}/**/*")
end
|
Add all documentation to the gem.
license.md is particularly important because if you don't distribute software with a license, then it isn't licensed.
|
diff --git a/Tests/Formatter/AtomFormatterTest.php b/Tests/Formatter/AtomFormatterTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Formatter/AtomFormatterTest.php
+++ b/Tests/Formatter/AtomFormatterTest.php
@@ -141,7 +141,7 @@ class AtomFormatterTest extends \PHPUnit_Framework_TestCase
$output = $feed->render('atom');
$this->assertContains('<title><![CDATA[Fake title]]></title>', $output);
- $this->assertContains('<summary><![CDATA[Fake description or content]]></summary>', $output);
+ $this->assertContains('<summary type="html"><![CDATA[Fake description or content]]></summary>', $output);
$this->assertContains('<link href="http://github.com/eko/FeedBundle/article/fake/url"/>', $output);
}
|
Update AtomFormatter test with html type on summary element.
|
diff --git a/src/IterableCodeExtractor.php b/src/IterableCodeExtractor.php
index <HASH>..<HASH> 100644
--- a/src/IterableCodeExtractor.php
+++ b/src/IterableCodeExtractor.php
@@ -196,7 +196,7 @@ trait IterableCodeExtractor {
$files = new RecursiveIteratorIterator(
new RecursiveCallbackFilterIterator(
- new RecursiveDirectoryIterator( $dir, RecursiveDirectoryIterator::SKIP_DOTS ),
+ new RecursiveDirectoryIterator( $dir, RecursiveDirectoryIterator::SKIP_DOTS | RecursiveDirectoryIterator::UNIX_PATHS ),
function ( $file, $key, $iterator ) use ( $include, $exclude, $extensions ) {
/** @var RecursiveCallbackFilterIterator $iterator */
/** @var SplFileInfo $file */
|
Pass UNIX_PATHS flag to RecursiveDirectoryIterator constructor
This is needed so that the files in the RecursiveCallbackFilterIterator
callback have Unix-style paths for matching against $include and
$exclude.
|
diff --git a/BAC0/infos.py b/BAC0/infos.py
index <HASH>..<HASH> 100644
--- a/BAC0/infos.py
+++ b/BAC0/infos.py
@@ -10,6 +10,7 @@ Informations MetaData
__author__ = 'Christian Tremblay, P.Eng.'
__email__ = 'christian.tremblay@servisys.com'
-__url__ = 'http://www.servisys.com'
-__version__ = '0.98'
+__url__ = 'https://github.com/ChristianTremblay/BAC0'
+__download_url__ = 'https://github.com/ChristianTremblay/BAC0/archive/master.zip'
+__version__ = '0.98.1'
__license__ = 'LGPLv3'
\ No newline at end of file
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,10 +6,12 @@ from BAC0 import infos as infos
setup(name='BAC0',
version=infos.__version__,
- description='BACnet Scripting Library',
+ description='BACnet Scripting Framework for testing DDC Controls',
author=infos.__author__,
author_email=infos.__email__,
url=infos.__url__,
+ download_url = infos.__download_url__,
+ keywords = ['bacnet', 'building', 'automation', 'test'],
packages=[
'BAC0',
'BAC0.core',
|
Little tweaks to setup.py while configuring PyPI sync
|
diff --git a/test/tc_package.rb b/test/tc_package.rb
index <HASH>..<HASH> 100644
--- a/test/tc_package.rb
+++ b/test/tc_package.rb
@@ -78,7 +78,7 @@ class TestPackage < Test::Unit::TestCase
def test_validation
assert_equal(@package.validate.size, 0, @package.validate)
Axlsx::Workbook.send(:class_variable_set, :@@date1904, 9900)
- assert_equal(@package.validate.size, 2, @package.validate)
+ assert(@package.validate.size > 0)
end
def test_parts
|
patch spec for xerces/libxml parser differences
|
diff --git a/src/view/items/Yielder.js b/src/view/items/Yielder.js
index <HASH>..<HASH> 100644
--- a/src/view/items/Yielder.js
+++ b/src/view/items/Yielder.js
@@ -1,7 +1,6 @@
import Item from './shared/Item';
import Fragment from '../Fragment';
import parse from '../../parse/_parse';
-import runloop from '../../global/runloop';
import { warnIfDebug } from '../../utils/log';
import { removeFromArray } from '../../utils/array';
@@ -45,7 +44,6 @@ export default class Yielder extends Item {
bubble () {
if ( !this.dirty ) {
- runloop.addFragment( this.fragment );
this.containerFragment.bubble();
this.dirty = true;
}
|
no need to register the yielder fragment when bubbling via the container fragment
|
diff --git a/abstract.js b/abstract.js
index <HASH>..<HASH> 100644
--- a/abstract.js
+++ b/abstract.js
@@ -120,8 +120,7 @@ function abstractPersistence (opts) {
testInstance('store multiple retained messages in order', function (t, instance) {
var totalMessages = 1000
-
- t.plan(totalMessages * 2)
+ var done = 0
var retained = {
cmd: 'publish',
@@ -137,6 +136,9 @@ function abstractPersistence (opts) {
instance.storeRetained(packet, function (err) {
t.notOk(err, 'no error')
t.equal(packet.brokerCounter, index + 1, 'packet stored in order')
+ if (++done === totalMessages) {
+ instance.destroy(t.end.bind(t))
+ }
})
}
@@ -921,7 +923,7 @@ function abstractPersistence (opts) {
t.deepEqual(queue[0], updated1)
t.deepEqual(queue[1], updated2)
}
- t.end()
+ instance.destroy(t.end.bind(t))
})
})
})
|
Added missing instance destroy to fix tests on cached persistences (#<I>)
|
diff --git a/lib/ruby-lint/runner.rb b/lib/ruby-lint/runner.rb
index <HASH>..<HASH> 100644
--- a/lib/ruby-lint/runner.rb
+++ b/lib/ruby-lint/runner.rb
@@ -112,7 +112,7 @@ module RubyLint
#
def report_diagnostic(diagnostic, report)
report.add(
- :level => :error,
+ :level => :warning,
:message => diagnostic.message,
:line => diagnostic.location.line,
:column => diagnostic.location.column + 1,
|
Emit parser diagnostics as warnings.
|
diff --git a/src/NewCommand.php b/src/NewCommand.php
index <HASH>..<HASH> 100644
--- a/src/NewCommand.php
+++ b/src/NewCommand.php
@@ -30,7 +30,8 @@ class NewCommand extends \Symfony\Component\Console\Command\Command {
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->verifyApplicationDoesntExist(
- $directory = getcwd().'/'.$input->getArgument('name')
+ $directory = getcwd().'/'.$input->getArgument('name'),
+ $output
);
$output->writeln('<info>Crafting application...</info>');
@@ -48,7 +49,7 @@ class NewCommand extends \Symfony\Component\Console\Command\Command {
* @param string $directory
* @return void
*/
- protected function verifyApplicationDoesntExist($directory)
+ protected function verifyApplicationDoesntExist($directory, OutputInterface $output)
{
if (is_dir($directory))
{
|
Fix exception in verifyApplicationDoesntExist.
Previously the OutputInterface was not being passed to this method which
resulted in it throwing an "Undefined variable" exception.
|
diff --git a/cmd/pulsectl/flags.go b/cmd/pulsectl/flags.go
index <HASH>..<HASH> 100644
--- a/cmd/pulsectl/flags.go
+++ b/cmd/pulsectl/flags.go
@@ -77,7 +77,7 @@ var (
Usage: "The amount of time to run the task [appends to start or creates a start time before a stop]",
}
flTaskSchedNoStart = cli.BoolFlag{
- Name: "--no-start",
+ Name: "no-start",
Usage: "Do not start task on creation [normally started on creation]",
}
|
Remove -- from no-start flag in order for it to work properly
|
diff --git a/pylas/point/dims.py b/pylas/point/dims.py
index <HASH>..<HASH> 100644
--- a/pylas/point/dims.py
+++ b/pylas/point/dims.py
@@ -550,9 +550,19 @@ class ScaledArrayView:
return self.scaled_array()
def __array_function__(self, func, types, args, kwargs):
- args = tuple(
- arg.array if isinstance(arg, ScaledArrayView) else arg for arg in args
- )
+ converted_args = []
+ for arg in args:
+ if isinstance(arg, (tuple, list)):
+ top_level_args = []
+ converted_args.append(top_level_args)
+ else:
+ top_level_args = converted_args
+ arg = [arg]
+ top_level_args.extend(
+ a.array if isinstance(a, ScaledArrayView) else a for a in arg
+ )
+
+ args = converted_args
ret = func(*args, **kwargs)
if ret is not None:
if isinstance(ret, np.ndarray) and ret.dtype != np.bool:
|
ScaledArray.__array_function__ handle args which are tuple or list
|
diff --git a/nomad/structs/structs_test.go b/nomad/structs/structs_test.go
index <HASH>..<HASH> 100644
--- a/nomad/structs/structs_test.go
+++ b/nomad/structs/structs_test.go
@@ -278,6 +278,12 @@ func TestJob_SpecChanged(t *testing.T) {
Original: base,
New: change,
},
+ {
+ Name: "With Constraints",
+ Changed: false,
+ Original: &Job{Constraints: []*Constraint{{"A", "B", "="}}},
+ New: &Job{Constraints: []*Constraint{{"A", "B", "="}}},
+ },
}
for _, c := range cases {
|
core: add spec changed test with constriants
|
diff --git a/lib/utils/to-id.js b/lib/utils/to-id.js
index <HASH>..<HASH> 100644
--- a/lib/utils/to-id.js
+++ b/lib/utils/to-id.js
@@ -10,5 +10,9 @@ module.exports = docOrIdToId
*/
function docOrIdToId (docOrId) {
- return typeof docOrId === 'object' ? docOrId._id : docOrId
+ if (typeof docOrId === 'object') {
+ return docOrId._id || docOrId.id
+ }
+
+ return docOrId
}
|
fix(sync): sync objects with .id property
|
diff --git a/airflow/cli/commands/db_command.py b/airflow/cli/commands/db_command.py
index <HASH>..<HASH> 100644
--- a/airflow/cli/commands/db_command.py
+++ b/airflow/cli/commands/db_command.py
@@ -75,7 +75,7 @@ def shell(args):
f.flush()
execute_interactive(["mysql", f"--defaults-extra-file={f.name}"])
elif url.get_backend_name() == 'sqlite':
- execute_interactive(["sqlite3", url.database]).wait()
+ execute_interactive(["sqlite3", url.database])
elif url.get_backend_name() == 'postgresql':
env = os.environ.copy()
env['PGHOST'] = url.host or ""
|
Fix db shell for sqlite (#<I>)
closes: #<I>
|
diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py
index <HASH>..<HASH> 100644
--- a/salt/modules/cmdmod.py
+++ b/salt/modules/cmdmod.py
@@ -433,6 +433,20 @@ def _run(
if isinstance(cmd, (list, tuple)):
cmd = " ".join(map(_cmd_quote, cmd))
+ # Ensure directory is correct before running command
+ cmd = "cd -- {dir} && {{ {cmd}; }}".format(dir=_cmd_quote(cwd), cmd=cmd)
+
+ # Ensure environment is correct for a newly logged-in user by running
+ # the command under bash as a login shell
+ try:
+ user_shell = __salt__["user.info"](runas)["shell"]
+ if re.search("bash$", user_shell):
+ cmd = "{shell} -l -c {cmd}".format(
+ shell=user_shell, cmd=_cmd_quote(cmd)
+ )
+ except KeyError:
+ pass
+
# Ensure the login is simulated correctly (note: su runs sh, not bash,
# which causes the environment to be initialised incorrectly, which is
# fixed by the previous line of code)
|
Adding needed code to ensure cmd tests are passing.
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -261,8 +261,6 @@ gulp.task( 'clean-vendor-assets', function() {
paths.dev + '/sass/underscores',
paths.dev + '/js/skip-link-focus-fix.js',
paths.js + '/**/skip-link-focus-fix.js',
- paths.js + '/**/popper.min.js',
- paths.js + '/**/popper.js',
paths.js + paths.vendor,
] );
} );
@@ -306,15 +304,6 @@ gulp.task(
)
.pipe(
replace(
- '/js/popper.min.js',
- '/js' + paths.vendor + '/popper.min.js',
- {
- skipBinary: true,
- }
- )
- )
- .pipe(
- replace(
'/js/skip-link-focus-fix.js',
'/js' + paths.vendor + '/skip-link-focus-fix.js',
{ skipBinary: true }
|
Remove popper.js relic
popper.js and popper.min.js have been removed in <I>.
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -327,9 +327,10 @@ exports['Basic Query by Member'] = function(t) {
exports['Basic Query by Null Member'] = function(t) {
- t.expect(3);
+ t.expect(4);
geo.nearby('non-existent', 50000, function(err, replies) {
+ t.equal(err.message, 'ERR could not decode requested zset member');
t.equal((err === null), false);
t.equal(Array.isArray(replies), false);
t.equal(replies, null);
diff --git a/test/testNative.js b/test/testNative.js
index <HASH>..<HASH> 100644
--- a/test/testNative.js
+++ b/test/testNative.js
@@ -329,11 +329,10 @@ exports['Basic Query by Member'] = function(t) {
exports['Basic Query by Null Member'] = function(t) {
- t.expect(3);
+ t.expect(4);
geo.nearby('non-existent', 50000, function(err, replies) {
-
- console.log('NATIVE non-existent', err, replies);
+ t.equal(err.message, 'ERR could not decode requested zset member');
t.equal((err === null), false);
t.equal(Array.isArray(replies), false);
t.equal(replies, null);
|
Updating tests for non-existent members.
|
diff --git a/src/front-door/azext_front_door/_help.py b/src/front-door/azext_front_door/_help.py
index <HASH>..<HASH> 100644
--- a/src/front-door/azext_front_door/_help.py
+++ b/src/front-door/azext_front_door/_help.py
@@ -10,7 +10,7 @@ from azext_front_door.vendored_sdks.models import MatchVariable, Operator
# region FrontDoor
helps['network front-door'] = """
type: group
- short-summary: Manage Front Doors.
+ short-summary: Manage Classical Azure Front Doors. For managing Azure Front Door Standard/Premium, please refer https://docs.microsoft.com/en-us/cli/azure/afd?view=azure-cli-latest.
"""
helps['network front-door create'] = """
|
{AzureFrontDoor} Fix #<I>: Update documents (#<I>)
|
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py
index <HASH>..<HASH> 100644
--- a/pre_commit/languages/python.py
+++ b/pre_commit/languages/python.py
@@ -182,8 +182,8 @@ def py_interface(
version: str,
additional_dependencies: Sequence[str],
) -> None:
- additional_dependencies = tuple(additional_dependencies)
directory = helpers.environment_dir(_dir, version)
+ install = ('python', '-mpip', 'install', '.', *additional_dependencies)
env_dir = prefix.path(directory)
with clean_path_on_failure(env_dir):
@@ -193,9 +193,7 @@ def py_interface(
python = os.path.realpath(sys.executable)
_make_venv(env_dir, python)
with in_env(prefix, version):
- helpers.run_setup_cmd(
- prefix, ('pip', 'install', '.') + additional_dependencies,
- )
+ helpers.run_setup_cmd(prefix, install)
return in_env, healthy, run_hook, install_environment
|
Allow pip to be upgradable on windows
|
diff --git a/contact_form/views.py b/contact_form/views.py
index <HASH>..<HASH> 100644
--- a/contact_form/views.py
+++ b/contact_form/views.py
@@ -34,8 +34,9 @@ class ContactFormView(FormView):
# undesirable for performance reasons.
#
# Manually implementing this method, and passing the form
- # instance to get_context_data(), solves this issue (which
- # will be fixed in Django 1.9.1 and Django 1.10).
+ # instance to get_context_data(), solves this issue (which was
+ # fixed in Django 1.9.1 and will not be present in Django
+ # 1.10).
return self.render_to_response(self.get_context_data(form=form))
def get_form_kwargs(self):
|
form_invalid() bug was fixed in <I>, note that.
|
diff --git a/src/babel/transformation/transformers/minification/inline-expressions.js b/src/babel/transformation/transformers/minification/inline-expressions.js
index <HASH>..<HASH> 100644
--- a/src/babel/transformation/transformers/minification/inline-expressions.js
+++ b/src/babel/transformation/transformers/minification/inline-expressions.js
@@ -5,10 +5,12 @@ export var metadata = {
group: "builtin-setup"
};
-export function Expression(node, parent, scope) {
- var res = this.evaluate();
- if (res.confident) return t.valueToNode(res.value);
-}
+export var Expression = {
+ exit(node, parent, scope) {
+ var res = this.evaluate();
+ if (res.confident) return t.valueToNode(res.value);
+ }
+};
export function Identifier() {
// override Expression
|
move expression inlining to exit rather than enter in minification.inlineExpressions transformer
|
diff --git a/tests/phpunit/includes/testcase.php b/tests/phpunit/includes/testcase.php
index <HASH>..<HASH> 100644
--- a/tests/phpunit/includes/testcase.php
+++ b/tests/phpunit/includes/testcase.php
@@ -870,7 +870,14 @@ class Pods_UnitTestCase extends \WP_UnitTestCase {
self::$related_items[ 'author' ] = self::$related_items[ 'test_rel_user' ];
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function tearDownAfterClass() {
+ // Force WP_UnitTestCase to not delete all data
+ }
}
Pods_UnitTestCase::_initialize_config();
-Pods_UnitTestCase::_initialize_data();
+Pods_UnitTestCase::_initialize_data();
\ No newline at end of file
|
Add tearDownAfterClass override method
Add tearDownAfterClass override method to stop WP_UnitTestCase from deleting all data #<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -37,6 +37,10 @@ setup(
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.5',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
|
Add trove classifier to convey Python 3 support (#6)
* Add trove classifier to convey Python 3 support
* Add trove classifiers to match the one of django-recaptcha
|
diff --git a/examples/message_create.py b/examples/message_create.py
index <HASH>..<HASH> 100644
--- a/examples/message_create.py
+++ b/examples/message_create.py
@@ -31,7 +31,7 @@ try:
print(' scheduledDatetime : %s' % msg.scheduledDatetime)
print(' createdDatetime : %s' % msg.createdDatetime)
print(' recipients : %s\n' % msg.recipients)
- print
+ print()
except messagebird.client.ErrorException as e:
print('\nAn error occured while requesting a Message object:\n')
|
Update print to function in example
Update print to function in `examples/message_create.py`. The `print`
statement becomes the `print()` function in Python 3.
|
diff --git a/workflow/workflow.py b/workflow/workflow.py
index <HASH>..<HASH> 100644
--- a/workflow/workflow.py
+++ b/workflow/workflow.py
@@ -227,6 +227,7 @@ class Workflow(Printable):
if not sources or len(sources) != 1:
raise FactorDefinitionError("Aggregate tools require a single source node")
+ # TODO: Actually - it should be fine if the plates are all shared, except for the aggregation plate
if not sources[0].plate_ids or len(sources[0].plate_ids) != 1:
raise FactorDefinitionError("Aggregate tools require source node to live on a single plate")
|
beginning work on train/test splits
|
diff --git a/lib/cldr/export/data/lists.rb b/lib/cldr/export/data/lists.rb
index <HASH>..<HASH> 100644
--- a/lib/cldr/export/data/lists.rb
+++ b/lib/cldr/export/data/lists.rb
@@ -1,5 +1,3 @@
-require 'pry-nav'
-
module Cldr
module Export
module Data
|
Removing call to binding.pry
|
diff --git a/pipenv/utils.py b/pipenv/utils.py
index <HASH>..<HASH> 100644
--- a/pipenv/utils.py
+++ b/pipenv/utils.py
@@ -869,6 +869,16 @@ def is_installable_file(path):
path = urlparse(path['file']).path if 'file' in path else path['path']
if not isinstance(path, six.string_types) or path == '*':
return False
+ # If the string starts with a valid specifier operator, test if it is a valid
+ # specifier set before making a path object (to avoid breakng windows)
+ if any(path.startswith(spec) for spec in '!=<>'):
+ try:
+ pip.utils.packaging.specifiers.SpecifierSet(path)
+ # If this is not a valid specifier, just move on and try it as a path
+ except pip.utils.packaging.specifiers.InvalidSpecifier:
+ pass
+ else:
+ return False
lookup_path = Path(path)
return lookup_path.is_file() or (lookup_path.is_dir() and
pip.utils.is_installable_dir(lookup_path.resolve().as_posix()))
|
Add a check to see if entries are valid specifiers
- Should fix windows parsing of pipfiles
- I had this fix implemented somewhere before but I think I 'cleaned' it
out for some reason
|
diff --git a/dtool_azure/__init__.py b/dtool_azure/__init__.py
index <HASH>..<HASH> 100644
--- a/dtool_azure/__init__.py
+++ b/dtool_azure/__init__.py
@@ -2,6 +2,6 @@
import logging
-__version__ = "0.4.0"
+__version__ = "0.5.0"
logger = logging.getLogger(__name__)
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup
url = "https://github.com/jic-dtool/dtool-azure"
-version = "0.4.0"
+version = "0.5.0"
readme = open('README.rst').read()
setup(
|
Update version number to <I>
|
diff --git a/libnetwork/drivers/remote/driver.go b/libnetwork/drivers/remote/driver.go
index <HASH>..<HASH> 100644
--- a/libnetwork/drivers/remote/driver.go
+++ b/libnetwork/drivers/remote/driver.go
@@ -294,7 +294,7 @@ func (d *driver) Type() string {
// DiscoverNew is a notification for a new discovery event, such as a new node joining a cluster
func (d *driver) DiscoverNew(dType discoverapi.DiscoveryType, data interface{}) error {
if dType != discoverapi.NodeDiscovery {
- return fmt.Errorf("Unknown discovery type : %v", dType)
+ return nil
}
notif := &api.DiscoveryNotification{
DiscoveryType: dType,
@@ -306,7 +306,7 @@ func (d *driver) DiscoverNew(dType discoverapi.DiscoveryType, data interface{})
// DiscoverDelete is a notification for a discovery delete event, such as a node leaving a cluster
func (d *driver) DiscoverDelete(dType discoverapi.DiscoveryType, data interface{}) error {
if dType != discoverapi.NodeDiscovery {
- return fmt.Errorf("Unknown discovery type : %v", dType)
+ return nil
}
notif := &api.DiscoveryNotification{
DiscoveryType: dType,
|
Do not error on non discovery type messages in remote driver
|
diff --git a/core/src/main/java/hudson/matrix/MatrixProject.java b/core/src/main/java/hudson/matrix/MatrixProject.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/matrix/MatrixProject.java
+++ b/core/src/main/java/hudson/matrix/MatrixProject.java
@@ -666,6 +666,9 @@ public class MatrixProject extends AbstractProject<MatrixProject,MatrixBuild> im
}
public MatrixConfiguration getItem(Combination c) {
+ if (configurations == null) {
+ return null;
+ }
return configurations.get(c);
}
|
[FIXED JENKINS-<I>] Hotfix for regression in matrix project loading from <I>f5.
|
diff --git a/src/main/java/com/github/davidcarboni/cryptolite/Random.java b/src/main/java/com/github/davidcarboni/cryptolite/Random.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/davidcarboni/cryptolite/Random.java
+++ b/src/main/java/com/github/davidcarboni/cryptolite/Random.java
@@ -105,7 +105,8 @@ public class Random {
@Override
public int read() throws IOException {
if (count++ < length) {
- return Byte.toUnsignedInt(bytes(1)[0]);
+ return ((int) bytes(1)[0]) & 0xff;
+ // For Java 8: return Byte.toUnsignedInt(bytes(1)[0]);
} else {
return -1;
}
|
Tweaked to work with a Java 7 compiler.
|
diff --git a/tests/index.js b/tests/index.js
index <HASH>..<HASH> 100644
--- a/tests/index.js
+++ b/tests/index.js
@@ -21,8 +21,8 @@ describe('all rule files should be exported by the plugin', () => {
});
});
-describe('configurations', function() {
- it('should export a \'recommended\' configuration', function() {
+describe('configurations', () => {
+ it('should export a \'recommended\' configuration', () => {
assert(plugin.configs.recommended);
});
});
|
Fix test to pass lint.
|
diff --git a/lib/doc/jsdoc-template/publish.js b/lib/doc/jsdoc-template/publish.js
index <HASH>..<HASH> 100644
--- a/lib/doc/jsdoc-template/publish.js
+++ b/lib/doc/jsdoc-template/publish.js
@@ -20,7 +20,7 @@ var unprefix = R.pipe(
var trimCode = R.pipe(
R.split(/\n/),
- R.map(R.trim),
+ R.map(R.replace(/^[ ]{5}/, '')),
R.join('\n')
);
|
docs: fix indent
5 is a magic number for the amount of indent ramda has in its examples
@example
R.F(); //=> false
└─5─┘
publish: change \s to character group with space
|
diff --git a/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java b/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java
index <HASH>..<HASH> 100644
--- a/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java
+++ b/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java
@@ -2,6 +2,7 @@ package com.scottyab.rootbeer;
import android.content.Context;
import android.content.pm.PackageManager;
+import android.support.annotation.Nullable;
import com.scottyab.rootbeer.util.QLog;
@@ -202,11 +203,13 @@ public class RootBeer {
} catch (IOException e) {
e.printStackTrace();
}
+
+ // If input steam is null, we can't read the file, so return null
+ if (inputstream == null) return null;
+
String propval = "";
try {
-
propval = new Scanner(inputstream).useDelimiter("\\A").next();
-
} catch (NoSuchElementException e) {
e.printStackTrace();
}
|
Added null check on input stream
|
diff --git a/grunt.js b/grunt.js
index <HASH>..<HASH> 100644
--- a/grunt.js
+++ b/grunt.js
@@ -60,7 +60,7 @@ module.exports = function(grunt) {
tasks: 'js'
},
css: {
- files: ['assets/css/less/*.less', 'assets/css/less/bootstrap/*.less'],
+ files: ['assets/css/less/**/*.less'],
tasks: 'css'
}
}
|
Use path wildcard for Less watcher
|
diff --git a/tests/test_experiment_server.py b/tests/test_experiment_server.py
index <HASH>..<HASH> 100644
--- a/tests/test_experiment_server.py
+++ b/tests/test_experiment_server.py
@@ -28,6 +28,23 @@ class TestAppConfiguration(object):
StandaloneServer().load()
assert not webapp.application.debug
+ def test_gunicorn_worker_config(self, webapp, active_config):
+ with mock.patch('multiprocessing.cpu_count') as cpu_count:
+ active_config.extend({'threads': u'auto'})
+ cpu_count.return_value = 2
+ from dallinger.experiment_server.gunicorn import StandaloneServer
+ server = StandaloneServer()
+ assert server.options['workers'] == u'4'
+ cpu_count.return_value = 4
+ server.load_user_config()
+ assert server.options['workers'] == u'7'
+ active_config.extend({'worker_multiplier': 1.0})
+ server.load_user_config()
+ assert server.options['workers'] == u'5'
+ active_config.extend({'threads': u'2'})
+ server.load_user_config()
+ assert server.options['workers'] == u'2'
+
@pytest.mark.usefixtures('experiment_dir')
class TestAdvertisement(object):
|
Add test for worker config count.
|
diff --git a/lib/HttpRequest.js b/lib/HttpRequest.js
index <HASH>..<HASH> 100644
--- a/lib/HttpRequest.js
+++ b/lib/HttpRequest.js
@@ -63,6 +63,7 @@ HttpRequest.prototype.equals = function (other) {
return this === other || (
other instanceof HttpRequest &&
this.requestLine.equals(other.requestLine) &&
+ Boolean(this.encrypted) === Boolean(other.encrypted) &&
Message.prototype.equals.call(this, other)
);
};
diff --git a/test/HttpRequest.js b/test/HttpRequest.js
index <HASH>..<HASH> 100644
--- a/test/HttpRequest.js
+++ b/test/HttpRequest.js
@@ -133,4 +133,10 @@ describe('HttpRequest', function () {
httpRequest2 = new HttpRequest('GET /foo HTTP/1.1\r\nHost: bar.com\r\n\r\nquux');
expect(httpRequest1.equals(httpRequest2), 'to be false');
});
+
+ it('should consider instances with different encrypted flags different', function () {
+ var httpRequest1 = new HttpRequest({encrypted: true}),
+ httpRequest2 = new HttpRequest({encrypted: false});
+ expect(httpRequest1.equals(httpRequest2), 'to be false');
+ });
});
|
HttpRequest: Make the equals method aware of the encrypted flag.
|
diff --git a/addon/dialog/dialog.js b/addon/dialog/dialog.js
index <HASH>..<HASH> 100644
--- a/addon/dialog/dialog.js
+++ b/addon/dialog/dialog.js
@@ -25,6 +25,7 @@
} else { // Assuming it's a detached DOM element.
dialog.appendChild(template);
}
+ CodeMirror.addClass(wrap, 'dialog-opened');
return dialog;
}
@@ -47,6 +48,7 @@
} else {
if (closed) return;
closed = true;
+ CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
dialog.parentNode.removeChild(dialog);
me.focus();
@@ -102,6 +104,7 @@
function close() {
if (closed) return;
closed = true;
+ CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
dialog.parentNode.removeChild(dialog);
me.focus();
}
@@ -141,6 +144,7 @@
if (closed) return;
closed = true;
clearTimeout(doneTimer);
+ CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
dialog.parentNode.removeChild(dialog);
}
|
[dialog addon] Add class when dialog is open
|
diff --git a/lib/celluloid/supervision/container.rb b/lib/celluloid/supervision/container.rb
index <HASH>..<HASH> 100644
--- a/lib/celluloid/supervision/container.rb
+++ b/lib/celluloid/supervision/container.rb
@@ -50,17 +50,6 @@ module Celluloid
Internals::Logger.error "!!! Celluloid::Supervision::Container #{self} crashed. Restarting..."
end
end
-
- # Register one or more actors to be launched and supervised
- def supervise(config, &block)
- blocks << lambda do |container|
- container.add(Configuration.options(config, block: block))
- end
- end
- end
-
- def supervise(config, &block)
- add(Configuration.options(config, block: block))
end
finalizer :finalize
|
move all supervise definitions into their own file
|
diff --git a/chance.js b/chance.js
index <HASH>..<HASH> 100644
--- a/chance.js
+++ b/chance.js
@@ -20,8 +20,12 @@
// -- Basics --
- Chance.prototype.bool = function () {
- return this.random() * 100 < 50;
+ Chance.prototype.bool = function (options) {
+ options = options || {};
+ // likelihood of success (true)
+ options.likelihood = (typeof options.likelihood !== "undefined") ? options.likelihood : 50;
+
+ return this.random() * 100 < options.likelihood;
};
// NOTE the max and min are INCLUDED in the range. So:
|
Added likelihood to chance.bool()
On branch bool-with-likelihood
Changes to be committed:
modified: chance.js
|
diff --git a/laniakea/core/providers/gce/manager.py b/laniakea/core/providers/gce/manager.py
index <HASH>..<HASH> 100644
--- a/laniakea/core/providers/gce/manager.py
+++ b/laniakea/core/providers/gce/manager.py
@@ -358,6 +358,28 @@ class ComputeEngineManager:
return result
+ def terminate_nowait(self, nodes=None):
+ """Destroy one or many nodes, without waiting to see that the node is destroyed.
+
+ :param nodes: Nodes to be destroyed.
+ :type nodes: ``list``
+ """
+ if not self.is_connected():
+ return
+
+ nodes = nodes or self.nodes
+
+ try:
+ self.gce.ex_destroy_multiple_nodes(nodes, timeout=0, ignore_errors=False)
+ except Exception as error: # pylint: disable=broad-except
+ # directly check type since the exception should be exactly `Exception` and not a subclass
+ if type(error) is Exception and "timeout" in str(error).lower(): # pylint: disable=unidiomatic-typecheck
+ # success
+ logging.info('Requested destruction of %d nodes', len(nodes))
+ return
+ raise
+ raise Exception("Call to ex_destroy_multiple_nodes() returned unexpectedly.")
+
def terminate(self, nodes=None):
"""Destroy one or many nodes.
|
[GCE] Add terminate_nowait()
Request instance deletion without waiting for it to complete.
|
diff --git a/config/initializers/compass.rb b/config/initializers/compass.rb
index <HASH>..<HASH> 100644
--- a/config/initializers/compass.rb
+++ b/config/initializers/compass.rb
@@ -1,3 +1,8 @@
+require 'fileutils'
+FileUtils.mkdir_p(Rails.root.join("tmp", "stylesheets"))
+
+Sass::Plugin.options[:template_location] = (Rails.root + 'public' + 'stylesheets' + 'sass').to_s
+
require 'compass'
require 'compass/app_integration/rails'
Compass::AppIntegration::Rails.initialize!
|
alter compass initializer to load from tmp/stylesheets
|
diff --git a/Kwc/NewsletterCategory/Subscribe/RecipientsController.php b/Kwc/NewsletterCategory/Subscribe/RecipientsController.php
index <HASH>..<HASH> 100644
--- a/Kwc/NewsletterCategory/Subscribe/RecipientsController.php
+++ b/Kwc/NewsletterCategory/Subscribe/RecipientsController.php
@@ -6,9 +6,16 @@ class Kwc_NewsletterCategory_Subscribe_RecipientsController extends Kwc_Newslett
$this->_model = Kwf_Model_Abstract::getInstance('Kwc_NewsletterCategory_Subscribe_Model');
parent::_initColumns();
+ if ($this->_getParam('newsletterComponentId')) {
+ $newsletterComponentId = $this->_getParam('newsletterComponentId');
+ } else {
+ $newsletterComponentId = Kwf_Component_Data_Root::getInstance()
+ ->getComponentByDbId($this->_getParam('componentId'), array('ignoreVisible'=>true, 'limit'=>1))
+ ->parent->dbId;
+ }
$model = Kwf_Model_Abstract::getInstance('Kwc_NewsletterCategory_CategoriesModel');
$s = $model->select()
- ->whereEquals('newsletter_component_id', $this->_getParam('newsletterComponentId'))
+ ->whereEquals('newsletter_component_id', $newsletterComponentId)
->order('pos');
$categories = $model->getRows($s);
|
newsletter fix for last commit: newsletterComponentId doesn't have to exist
|
diff --git a/api/prometheus/v1/api_test.go b/api/prometheus/v1/api_test.go
index <HASH>..<HASH> 100644
--- a/api/prometheus/v1/api_test.go
+++ b/api/prometheus/v1/api_test.go
@@ -613,6 +613,7 @@ func TestAPIClientDo(t *testing.T) {
{
response: &apiResponse{
Status: "error",
+ Data: json.RawMessage(`null`),
ErrorType: ErrBadData,
Error: "end timestamp must not be before start time",
},
|
Add non-nil Data because Go <I> needs it
|
diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
+++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
@@ -515,9 +515,8 @@ class YamlDriver extends FileDriver
if ( ! isset($joinColumnElement['name'])) {
$joinColumnElement['name'] = $joinColumnName;
}
+ $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement);
}
-
- $joinTable['joinColumns'][] = $this->joinColumnToArray($joinColumnElement);
}
if (isset($joinTableElement['inverseJoinColumns'])) {
@@ -525,9 +524,8 @@ class YamlDriver extends FileDriver
if ( ! isset($joinColumnElement['name'])) {
$joinColumnElement['name'] = $joinColumnName;
}
+ $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement);
}
-
- $joinTable['inverseJoinColumns'][] = $this->joinColumnToArray($joinColumnElement);
}
$mapping['joinTable'] = $joinTable;
|
[DDC-<I>] Correct Error on manyToMany with composite primary key
|
diff --git a/test/inspectorFullSpec.js b/test/inspectorFullSpec.js
index <HASH>..<HASH> 100644
--- a/test/inspectorFullSpec.js
+++ b/test/inspectorFullSpec.js
@@ -5,7 +5,7 @@
fs = require("fs"),
feature = JSON.parse(fs.readFileSync("test/fixtures/results/results-example.json",'utf8'));
- describe.only("Inspector full", function() {
+ describe("Inspector full", function() {
it("should match top level specs", function() {
var expected = [
{"spec 1": "test/fixtures/spec/multiIt.feature:1"},
diff --git a/test/parserFactorySpec.js b/test/parserFactorySpec.js
index <HASH>..<HASH> 100644
--- a/test/parserFactorySpec.js
+++ b/test/parserFactorySpec.js
@@ -3,7 +3,7 @@ var ParserFactory = require('../lib/parserFactory'),
markdownParser = require('../lib/markdownParser'),
assert = require('assert');
-describe.only("parserFactory", function() {
+describe("parserFactory", function() {
var factory;
beforeEach(function() {
factory = new ParserFactory();
|
Re-enabled all tests.
|
diff --git a/db/migrate/20151231054310_create_viewable_block.rb b/db/migrate/20151231054310_create_viewable_block.rb
index <HASH>..<HASH> 100644
--- a/db/migrate/20151231054310_create_viewable_block.rb
+++ b/db/migrate/20151231054310_create_viewable_block.rb
@@ -2,7 +2,6 @@ class CreateViewableBlock < ActiveRecord::Migration
def change
create_table :viewable_blocks do |t|
t.string :uuid
- t.string :title
t.timestamps null: false
end
|
removed :title column in viewable_block
|
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
index <HASH>..<HASH> 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -357,10 +357,12 @@ def info_installed(*names, **kwargs):
t_nfo = dict()
# Translate dpkg-specific keys to a common structure
for key, value in pkg_nfo.items():
- if six.PY2 and type(value) == str:
+ if type(value) == str:
# Check, if string is encoded in a proper UTF-8
- # We only need to check this in Py2 as Py3 strings are already unicode
- value_ = value.decode('UTF-8', 'ignore').encode('UTF-8', 'ignore')
+ if six.PY3:
+ value_ = value.encode('UTF-8', 'ignore').decode('UTF-8', 'ignore')
+ else:
+ value_ = value.decode('UTF-8', 'ignore').encode('UTF-8', 'ignore')
if value != value_:
value = kwargs.get('errors') and value_ or 'N/A (invalid UTF-8)'
log.error('Package {0} has bad UTF-8 code in {1}: {2}'.format(pkg_name, key, value))
|
Don't completely skip UTF-8 check in Python3
|
diff --git a/pelix/internals/events.py b/pelix/internals/events.py
index <HASH>..<HASH> 100644
--- a/pelix/internals/events.py
+++ b/pelix/internals/events.py
@@ -34,11 +34,6 @@ __docformat__ = "restructuredtext en"
# ------------------------------------------------------------------------------
-# Pelix utility modules
-from pelix.utilities import Deprecated
-
-# ------------------------------------------------------------------------------
-
class BundleEvent(object):
"""
@@ -174,12 +169,3 @@ class ServiceEvent(object):
:return: the kind of service event
"""
return self.__kind
-
- @Deprecated("ServiceEvent: get_type() must be replaced by get_kind()")
- def get_type(self):
- """
- **DEPRECATED:** Use get_kind() instead
-
- Retrieves the kind of service event.
- """
- return self.__kind
|
Removed the deprecated ServiceEvent.get_type() method
It was flagged as deprecated since more than a year...
|
diff --git a/clint/textui/__init__.py b/clint/textui/__init__.py
index <HASH>..<HASH> 100644
--- a/clint/textui/__init__.py
+++ b/clint/textui/__init__.py
@@ -7,7 +7,10 @@ clint.textui
This module provides the text output helper system.
"""
-
+import sys
+if sys.platform.startswith('win'):
+ from ..packages import colorama
+ colorama.init()
from . import colored
from . import progress
|
Initialise colorama for textui on Windows.
Closes gh-<I>
|
diff --git a/lib/discordrb/bot.rb b/lib/discordrb/bot.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/bot.rb
+++ b/lib/discordrb/bot.rb
@@ -170,12 +170,7 @@ module Discordrb
return if async
debug('Oh wait! Not exiting yet as run was run synchronously.')
- sync
- end
-
- # Prevents all further execution until the websocket thread stops (e. g. through a closed connection).
- def sync
- @ws_thread.join
+ @gateway.sync
end
# Stops the bot gracefully, disconnecting the websocket without immediately killing the thread. This means that
diff --git a/lib/discordrb/gateway.rb b/lib/discordrb/gateway.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/gateway.rb
+++ b/lib/discordrb/gateway.rb
@@ -144,6 +144,11 @@ module Discordrb
debug('Confirmation received! Exiting run.')
end
+ # Prevents all further execution until the websocket thread stops (e. g. through a closed connection).
+ def sync
+ @ws_thread.join
+ end
+
# Whether the WebSocket connection to the gateway is currently open
def open?
@handshake.finished? && !@closed
|
Replace Bot#sync with Gateway#sync
|
diff --git a/tests/unit/test_resource_provider_register.py b/tests/unit/test_resource_provider_register.py
index <HASH>..<HASH> 100644
--- a/tests/unit/test_resource_provider_register.py
+++ b/tests/unit/test_resource_provider_register.py
@@ -45,11 +45,11 @@ class Test_ResourceProviderRegister__construction:
def test__after_creation__namespace_should_default_to_None(self):
instance = ResourceProviderRegister()
assert instance.namespace is None
-
+
def test__after_creation_with_namespace__namespace_should_be_as_given(self):
instance = ResourceProviderRegister('mynamespace')
assert instance.namespace == 'mynamespace'
-
+
def test__after_creation__resource_providers_should_be_empty(self):
instance = ResourceProviderRegister()
assert len(instance.resource_providers) == 0
|
Removes trailing whitespace in unit test
Trailing whitespace was removed from the unit tests for ResourceProviderRegister
|
diff --git a/libraries/lithium/g11n/catalog/adapter/Code.php b/libraries/lithium/g11n/catalog/adapter/Code.php
index <HASH>..<HASH> 100644
--- a/libraries/lithium/g11n/catalog/adapter/Code.php
+++ b/libraries/lithium/g11n/catalog/adapter/Code.php
@@ -169,9 +169,19 @@ class Code extends \lithium\g11n\catalog\Adapter {
* @return array The merged data.
*/
protected function _merge(array $data, array $item) {
- array_walk($item['ids'], function(&$value) {
- $value = substr($value, 1, -1);
- });
+ $filter = function ($value) use (&$filter) {
+ if (is_array($value)) {
+ return array_map($filter, $value);
+ }
+ return substr($value, 1, -1);
+ };
+ $fields = array('id', 'ids', 'translated');
+
+ foreach ($fields as $field) {
+ if (isset($item[$field])) {
+ $item[$field] = $filter($item[$field]);
+ }
+ }
return parent::_merge($data, $item);
}
}
|
Updating `Code` adapter test with changes to item structure.
|
diff --git a/test/compile.js b/test/compile.js
index <HASH>..<HASH> 100644
--- a/test/compile.js
+++ b/test/compile.js
@@ -27,7 +27,10 @@ const testFiles = readdirSync(fixtures)
const compareSources = async (t, { js, re }) => {
- t.is(compile(await js), format(await re))
+ const result = compile(await js)
+ const expected = format(await re)
+ t.is(result, expected)
+ t.is(result, format(result))
}
Object.entries(testFiles).forEach(([moduleName, source]) => {
|
Ensure result is formatted after compile
|
diff --git a/src/interactive-auth.js b/src/interactive-auth.js
index <HASH>..<HASH> 100644
--- a/src/interactive-auth.js
+++ b/src/interactive-auth.js
@@ -318,8 +318,6 @@ InteractiveAuth.prototype = {
*/
_doRequest: async function(auth, background) {
try {
- if (Object.keys(auth).length === 0 &&
- auth.constructor === Object) auth = null;
const result = await this._requestCallback(auth, background);
this._resolveFunc(result);
this._resolveFunc = null;
|
Revert hack to set auth = null
|
diff --git a/plaso/__init__.py b/plaso/__init__.py
index <HASH>..<HASH> 100644
--- a/plaso/__init__.py
+++ b/plaso/__init__.py
@@ -19,7 +19,7 @@
__version__ = '1.2.0'
VERSION_DEV = True
-VERSION_DATE = '20141208'
+VERSION_DATE = '20141209'
def GetVersion():
diff --git a/plaso/preprocessors/macosx.py b/plaso/preprocessors/macosx.py
index <HASH>..<HASH> 100644
--- a/plaso/preprocessors/macosx.py
+++ b/plaso/preprocessors/macosx.py
@@ -232,6 +232,8 @@ class MacOSXKeyboard(PlistPreprocessPlugin):
def ParseKey(self, key, key_name):
"""Determines the keyboard layout."""
value = super(MacOSXKeyboard, self).ParseKey(key, key_name)
+ if type(value) in (list, tuple):
+ value = value[0]
_, _, keyboard_layout = value.rpartition('.')
return keyboard_layout
|
Code review: <I>: Fix for Issue #<I> OSX Preprocessor keyboard_layout
|
diff --git a/org.openbel.framework.api/src/test/java/org/openbel/framework/api/KamBuilder.java b/org.openbel.framework.api/src/test/java/org/openbel/framework/api/KamBuilder.java
index <HASH>..<HASH> 100644
--- a/org.openbel.framework.api/src/test/java/org/openbel/framework/api/KamBuilder.java
+++ b/org.openbel.framework.api/src/test/java/org/openbel/framework/api/KamBuilder.java
@@ -27,13 +27,6 @@ public class KamBuilder {
this.usingLongForm = usingLongForm;
}
- public KamBuilder(final KamInfo kamInfo, final boolean usingLongForm) {
- this.kamInfo = kamInfo;
- this.knodes = new LinkedHashMap<String, TestKamNode>();
- this.kedges = new LinkedHashMap<String, TestKamEdge>();
- this.usingLongForm = usingLongForm;
- }
-
public KamBuilder addNodes(final String... nodes) {
if (hasItems(nodes)) {
for (final String n : nodes) {
|
Fix build; missed duplicate constructor in merge
|
diff --git a/framework/core/views/frontend/content/index.blade.php b/framework/core/views/frontend/content/index.blade.php
index <HASH>..<HASH> 100644
--- a/framework/core/views/frontend/content/index.blade.php
+++ b/framework/core/views/frontend/content/index.blade.php
@@ -16,5 +16,7 @@ $url = app('Flarum\Http\UrlGenerator');
@endforeach
</ul>
- <a href="{{ $url->to('forum')->route('index') }}?page={{ $page + 1 }}">{{ $translator->trans('core.views.index.next_page_button') }} »</a>
+ @if (isset($document->links->next))
+ <a href="{{ $url->to('forum')->route('index') }}?page={{ $page + 1 }}">{{ $translator->trans('core.views.index.next_page_button') }} »</a>
+ @endif
</div>
|
Only display pagination link if necessary
Otherwise, search engines start indexing pages that aren't filled yet.
Refs #<I>.
|
diff --git a/src/com/google/javascript/jscomp/DefaultPassConfig.java b/src/com/google/javascript/jscomp/DefaultPassConfig.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/DefaultPassConfig.java
+++ b/src/com/google/javascript/jscomp/DefaultPassConfig.java
@@ -29,6 +29,7 @@ import com.google.javascript.jscomp.ExtractPrototypeMemberDeclarations.Pattern;
import com.google.javascript.jscomp.NodeTraversal.Callback;
import com.google.javascript.rhino.IR;
import com.google.javascript.rhino.Node;
+
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
@@ -341,6 +342,8 @@ public class DefaultPassConfig extends PassConfig {
checks.add(printNameReferenceReport);
}
+ checks.add(createEmptyPass("afterStandardChecks"));
+
assertAllOneTimePasses(checks);
return checks;
}
|
Make the Other passes be hot swap checks instead of normal optimizations.
R=johnlenz
DELTA=<I> (<I> added, <I> deleted, <I> changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=<I>
git-svn-id: <URL>
|
diff --git a/src/tagify.js b/src/tagify.js
index <HASH>..<HASH> 100644
--- a/src/tagify.js
+++ b/src/tagify.js
@@ -299,7 +299,7 @@ Tagify.prototype = {
},
/**
- * if the original input had any values, add them as tags
+ * if the original input has any values, add them as tags
*/
loadOriginalValues( value ){
var lastChild,
@@ -324,7 +324,7 @@ Tagify.prototype = {
if( value ){
if( _s.mode == 'mix' ){
- this.parseMixTags(value.trim())
+ this.parseMixTags(this.trim(value))
lastChild = this.DOM.input.lastChild;
|
fixes #<I> - "strim" setting has no affect on "loadOriginalValues" when in mix-mode
|
diff --git a/pkg/tls/certificate.go b/pkg/tls/certificate.go
index <HASH>..<HASH> 100644
--- a/pkg/tls/certificate.go
+++ b/pkg/tls/certificate.go
@@ -22,7 +22,7 @@ var (
`VersionTLS13`: tls.VersionTLS13,
}
- // MaxVersion Map of allowed TLS minimum versions
+ // MaxVersion Map of allowed TLS maximum versions
MaxVersion = map[string]uint16{
`VersionTLS10`: tls.VersionTLS10,
`VersionTLS11`: tls.VersionTLS11,
|
Fix typo in the godoc of TLS option MaxVersion
|
diff --git a/benchbuild/utils/db.py b/benchbuild/utils/db.py
index <HASH>..<HASH> 100644
--- a/benchbuild/utils/db.py
+++ b/benchbuild/utils/db.py
@@ -96,7 +96,7 @@ def persist_project(project):
name = project.name
desc = project.__doc__
- domain = project.domain
+ domain = str(project.domain)
group_name = project.group
version = str(project.variant)
try:
|
Ensure a project domain string conversion (#<I>)
Ensure that a projects domain is converted to a string before storing it
to the database. This is useful for projects that define their domain as
a to string convertable object.
|
diff --git a/lib/acts_as_api/base.rb b/lib/acts_as_api/base.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_api/base.rb
+++ b/lib/acts_as_api/base.rb
@@ -34,7 +34,7 @@ module ActsAsApi
# be contained in the api responses.
def api_accessible(api_template, options = {}, &block)
- attributes = api_accessible_attributes(api_template).try(:dup) || ApiTemplate.create(api_template)
+ attributes = api_accessible_attributes(api_template).try(:dup) || ApiTemplate.new(api_template)
attributes.merge!(api_accessible_attributes(options[:extend])) if options[:extend]
|
tweaking patch to work with stock acts_as_api as base
|
diff --git a/test/byteLength.js b/test/byteLength.js
index <HASH>..<HASH> 100644
--- a/test/byteLength.js
+++ b/test/byteLength.js
@@ -78,7 +78,7 @@ describe('Bytes', function () {
it('Should split on byte length, not character count', function (done) {
var streams = makeStreams(1)
- var multiByteChar = '\uDFFF'
+ var multiByteChar = "0xDFFF"
var byteLength = Buffer.byteLength(multiByteChar)
streams.collector.on('end', function () {
|
Use hex string to escape unicode.
Not too sure about this one, but it seems to be related to this:
<URL>
|
diff --git a/calendar-bundle/src/Resources/contao/dca/tl_calendar_events.php b/calendar-bundle/src/Resources/contao/dca/tl_calendar_events.php
index <HASH>..<HASH> 100644
--- a/calendar-bundle/src/Resources/contao/dca/tl_calendar_events.php
+++ b/calendar-bundle/src/Resources/contao/dca/tl_calendar_events.php
@@ -65,7 +65,7 @@ $GLOBALS['TL_DCA']['tl_calendar_events'] = array
(
'mode' => 4,
'fields' => array('startTime DESC'),
- 'headerFields' => array('title', 'jumpTo', 'tstamp', 'protected', 'allowComments', 'makeFeed'),
+ 'headerFields' => array('title', 'jumpTo', 'tstamp', 'protected', 'allowComments'),
'panelLayout' => 'filter;sort,search,limit',
'child_record_callback' => array('tl_calendar_events', 'listEvents'),
'child_record_class' => 'no_padding'
|
[Calendar] Remove left-over references to the "makeFeed" field (see #<I>).
|
diff --git a/lib/Auth/Basic.php b/lib/Auth/Basic.php
index <HASH>..<HASH> 100644
--- a/lib/Auth/Basic.php
+++ b/lib/Auth/Basic.php
@@ -72,7 +72,7 @@ class Auth_Basic extends AbstractController {
}
$m=$this->add('Model')
->setSource('Array',array(is_array($user)?$user:array($this->login_field=>$user,$this->password_field=>$pass)));
- $m->id_field='email';
+ $m->id_field=$this->login_field;
$this->setModel($m);
return $this;
}
|
fix remaining mention of 'email'.
|
diff --git a/src/WebServCo/Framework/Cli/Runner/Statistics.php b/src/WebServCo/Framework/Cli/Runner/Statistics.php
index <HASH>..<HASH> 100644
--- a/src/WebServCo/Framework/Cli/Runner/Statistics.php
+++ b/src/WebServCo/Framework/Cli/Runner/Statistics.php
@@ -5,6 +5,7 @@ final class Statistics
{
protected $duration; // <seconds>.<microseconds>
protected $memoryPeakUsage; // K
+ protected $result;
protected $timeStart;
protected $timeFinish;
protected $timeZone;
@@ -14,8 +15,9 @@ final class Statistics
$this->timeZone = date_default_timezone_get();
}
- public function finish()
+ public function finish($result)
{
+ $this->result = $result;
$this->timeFinish = $this->createCurrentTimeObject();
$this->duration = $this->timeFinish->format("U.u") - $this->timeStart->format("U.u");
$this->memoryPeakUsage = memory_get_peak_usage(true) / 1024;
@@ -31,6 +33,11 @@ final class Statistics
return $this->memoryPeakUsage;
}
+ public function getResult()
+ {
+ return $this->result;
+ }
+
public function start()
{
$this->timeStart = $this->createCurrentTimeObject();
|
Refactor Cli/Runner/Statistics
|
diff --git a/yfinance/base.py b/yfinance/base.py
index <HASH>..<HASH> 100644
--- a/yfinance/base.py
+++ b/yfinance/base.py
@@ -414,7 +414,7 @@ class TickerBase():
if isinstance(data.get('earnings'), dict):
try:
earnings = data['earnings']['financialsChart']
- earnings['financialCurrency'] = data['earnings']['financialCurrency']
+ earnings['financialCurrency'] = 'USD' if 'financialCurrency' not in data['earnings'] else data['earnings']['financialCurrency']
self._earnings['financialCurrency'] = earnings['financialCurrency']
df = _pd.DataFrame(earnings['yearly']).set_index('date')
df.columns = utils.camel2title(df.columns)
@@ -486,7 +486,7 @@ class TickerBase():
data = self._earnings[freq]
if as_dict:
dict_data = data.to_dict()
- dict_data['financialCurrency'] = self._earnings['financialCurrency']
+ dict_data['financialCurrency'] = 'USD' if 'financialCurrency' not in self._earnings else self._earnings['financialCurrency']
return dict_data
return data
|
Revert to 'USD' when there is no 'financialCurrency' does not exist
Revert to 'USD' when there is no 'financialCurrency' does not exist
|
diff --git a/backend/scrapers/employees/matchEmployees.js b/backend/scrapers/employees/matchEmployees.js
index <HASH>..<HASH> 100644
--- a/backend/scrapers/employees/matchEmployees.js
+++ b/backend/scrapers/employees/matchEmployees.js
@@ -303,7 +303,7 @@ class CombineCCISandEmployees {
const output = {};
for (const profile of person.matches) {
- for (const attrName in profile) {
+ for (const attrName of Object.keys(profile)) {
// Merge emails
if (attrName === 'emails') {
if (output.emails) {
diff --git a/common/classModels/Section.js b/common/classModels/Section.js
index <HASH>..<HASH> 100644
--- a/common/classModels/Section.js
+++ b/common/classModels/Section.js
@@ -136,7 +136,7 @@ class Section {
}
updateWithData(data) {
- for (const attrName in data) {
+ for (const attrName of Object.keys(data)) {
if ((typeof data[attrName]) === 'function') {
macros.error('given fn??', data, this, this.constructor.name);
continue;
|
Fixed two eslint bugs with package updates
|
diff --git a/phypno/viz/base.py b/phypno/viz/base.py
index <HASH>..<HASH> 100644
--- a/phypno/viz/base.py
+++ b/phypno/viz/base.py
@@ -78,7 +78,7 @@ class Colormap(ColorMap):
pos = linspace(limits[0], limits[1], coolwarm.shape[0])
color = coolwarm
- color = c_[color, 255 * ones((color.shape[0], 1))]
+ # color = c_[color, 255 * ones((color.shape[0], 1))]
super().__init__(pos, color)
|
revert to not using alpha, apparently it messes up opengl
|
diff --git a/examples/watch-live.php b/examples/watch-live.php
index <HASH>..<HASH> 100644
--- a/examples/watch-live.php
+++ b/examples/watch-live.php
@@ -5,7 +5,11 @@ include dirname(__DIR__) . "/vendor/autoload.php";
use Amp\Process\Process;
Amp\Loop::run(function () {
- $process = new Process("echo 1; sleep 1; echo 2; sleep 1; echo 3; exit 42");
+ // abuse ping for sleep, see https://stackoverflow.com/a/1672349/2373138
+ $command = \DIRECTORY_SEPARATOR === "\\"
+ ? "cmd /c echo 1 & ping -n 2 127.0.0.1 > nul & echo 2 & ping -n 2 127.0.0.1 > nul & echo 3 & exit 42"
+ : "echo 1; sleep 1; echo 2; sleep 1; echo 3; exit 42";
+ $process = new Process($command);
$process->start();
$stream = $process->getStdout();
|
Make examples/watch-live.php work on Windows
|
diff --git a/backend/controllers/ProductController.php b/backend/controllers/ProductController.php
index <HASH>..<HASH> 100644
--- a/backend/controllers/ProductController.php
+++ b/backend/controllers/ProductController.php
@@ -83,7 +83,7 @@ class ProductController extends Controller
[
'actions' => [
'save',
- 'add-image', 'delete-image',
+ 'add-image', 'delete-image', 'edit-image',
'add-video', 'delete-video',
'image-up', 'image-down',
'up', 'down', 'generate-seo-url',
|
Fixes permission for changing product image in ProductController.
|
diff --git a/eval_test.go b/eval_test.go
index <HASH>..<HASH> 100644
--- a/eval_test.go
+++ b/eval_test.go
@@ -1059,6 +1059,61 @@ func TestEvalInternal(t *testing.T) {
"63",
ast.TypeString,
},
+
+ // Unary
+ {
+ "foo ${-46}",
+ nil,
+ false,
+ "foo -46",
+ ast.TypeString,
+ },
+
+ {
+ "foo ${-46 + 5}",
+ nil,
+ false,
+ "foo -41",
+ ast.TypeString,
+ },
+
+ {
+ "foo ${46 + -5}",
+ nil,
+ false,
+ "foo 41",
+ ast.TypeString,
+ },
+
+ {
+ "foo ${-bar}",
+ &ast.BasicScope{
+ VarMap: map[string]ast.Variable{
+ "bar": ast.Variable{
+ Value: 41,
+ Type: ast.TypeInt,
+ },
+ },
+ },
+ false,
+ "foo -41",
+ ast.TypeString,
+ },
+
+ {
+ "foo ${5 + -bar}",
+ &ast.BasicScope{
+ VarMap: map[string]ast.Variable{
+ "bar": ast.Variable{
+ Value: 41,
+ Type: ast.TypeInt,
+ },
+ },
+ },
+ false,
+ "foo -36",
+ ast.TypeString,
+ },
}
for _, tc := range cases {
|
port unary tests back to hil, verified working
From <URL>
|
diff --git a/lib/pdf/reader/text_receiver.rb b/lib/pdf/reader/text_receiver.rb
index <HASH>..<HASH> 100644
--- a/lib/pdf/reader/text_receiver.rb
+++ b/lib/pdf/reader/text_receiver.rb
@@ -31,6 +31,9 @@ class PDF::Reader
# Usage:
# receiver = PDF::Reader::TextReceiver.new($stdout)
# PDF::Reader.file("somefile.pdf", receiver)
+ #
+ # DEPRECATED: this class was deprecated in version 0.11.0 and will
+ # eventually be removed
class TextReceiver
################################################################################
# Initialize with the library user's receiver
|
deprecate the TextReceiver class
|
diff --git a/lib/octokit/error.rb b/lib/octokit/error.rb
index <HASH>..<HASH> 100644
--- a/lib/octokit/error.rb
+++ b/lib/octokit/error.rb
@@ -1,7 +1,7 @@
module Octokit
# Custom error class for rescuing from all GitHub errors
class Error < StandardError
- def initialize(response)
+ def initialize(response=nil)
@response = response
super(build_error_message)
end
@@ -22,6 +22,8 @@ module Octokit
private
def build_error_message
+ return nil if @response.nil?
+
message = if response_body
": #{response_body[:error] || response_body[:message] || ''}"
else
|
Respect superclass's initializer arity in Error
This fixes rspec-mocks and probably other mocking libs that create instances of
error classes without arguments.
E.g. in rspec-mocks `api.stub(:foobar).and_raise(Octokit::NotFound)` would cause
an error because of the missing response argument in Octokit::Error#initializer.
|
diff --git a/packages/material-ui/src/Slider/Slider.js b/packages/material-ui/src/Slider/Slider.js
index <HASH>..<HASH> 100644
--- a/packages/material-ui/src/Slider/Slider.js
+++ b/packages/material-ui/src/Slider/Slider.js
@@ -154,6 +154,14 @@ export const styles = theme => ({
height: '100%',
padding: '0 11px',
},
+ // The primary input mechanism of the device includes a pointing device of limited accuracy.
+ '@media (pointer: coarse)': {
+ // Reach 42px touch target, about ~8mm on screen.
+ padding: '20px 0',
+ '&$vertical': {
+ padding: '0 20px',
+ },
+ },
},
/* Styles applied to the root element if `color="primary"`. */
colorPrimary: {
|
[Slider] Improve UX for pointing device with limited accuracy (#<I>)
|
diff --git a/functions.php b/functions.php
index <HASH>..<HASH> 100644
--- a/functions.php
+++ b/functions.php
@@ -20,7 +20,7 @@ $understrap_includes = array(
'/customizer.php', // Customizer additions.
'/custom-comments.php', // Custom Comments file.
'/jetpack.php', // Load Jetpack compatibility file.
- '/class-wp-bootstrap-navwalker.php', // Load custom WordPress nav walker.
+ '/class-wp-bootstrap-navwalker.php', // Load custom WordPress nav walker. Trying to get deeper navigation? Check out: https://github.com/understrap/understrap/issues/567
'/woocommerce.php', // Load WooCommerce functions.
'/editor.php', // Load Editor functions.
'/wp-admin.php', // /wp-admin/ related functions
|
NavWalker link to more info
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.