diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/abstract.js b/abstract.js
index <HASH>..<HASH> 100644
--- a/abstract.js
+++ b/abstract.js
@@ -574,7 +574,7 @@ ee(Object.defineProperties(PersistenceDriver.prototype, assign({
name = ensureString(name);
keyPath = ensureString(keyPath);
promise = this._trackSize(name, {
- eventName: 'index:' + keyPath,
+ eventName: 'computed:' + keyPath,
recalculate: this.recalculateComputedSize.bind(this, name, keyPath, searchValue),
resolveEvent: function (event) {
return {
@@ -699,7 +699,7 @@ ee(Object.defineProperties(PersistenceDriver.prototype, assign({
data: nu,
old: old
};
- this.emit('index:' + ns, driverEvent);
+ this.emit('computed:' + ns, driverEvent);
this.emit('object:' + path, driverEvent);
return promise;
}.bind(this));
|
Rename event name prefix from 'index:' to 'computed:'
|
diff --git a/tests/tests.js b/tests/tests.js
index <HASH>..<HASH> 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -9,7 +9,7 @@
// NOTE: I need to rewrite this junk so it uses Quanah ...
//
// ~~ (c) SRW, 28 Nov 2012
-// ~~ last updated 20 May 2013
+// ~~ last updated 21 May 2013
(function () {
'use strict';
@@ -46,7 +46,11 @@
/*global phantom: false */
n -= 1;
if (n === 0) {
- console.log('Success! All tests passed :-)');
+ if (code === 0) {
+ console.log('Success! All tests passed :-)');
+ } else {
+ console.error('Exiting due to error ...');
+ }
setTimeout(phantom.exit, 0, code);
}
return;
|
Corrected the "Success!" message in tests
|
diff --git a/Form/DataTransformer/EmptyEntityToNullTransformer.php b/Form/DataTransformer/EmptyEntityToNullTransformer.php
index <HASH>..<HASH> 100644
--- a/Form/DataTransformer/EmptyEntityToNullTransformer.php
+++ b/Form/DataTransformer/EmptyEntityToNullTransformer.php
@@ -43,6 +43,7 @@ class EmptyEntityToNullTransformer implements DataTransformerInterface
if (
null !== $reflPropertyValue
&& ($this->strict || '' !== $reflPropertyValue)
+ && (!$reflPropertyValue instanceof \Countable || sizeof($reflPropertyValue) > 0)
) {
$hasNonEmptyValue = true;
break;
|
Recognize empty collection in EmptyEntityToNullTransformer
|
diff --git a/packages/tab/src/css/index.js b/packages/tab/src/css/index.js
index <HASH>..<HASH> 100644
--- a/packages/tab/src/css/index.js
+++ b/packages/tab/src/css/index.js
@@ -2,7 +2,7 @@ import core from '@pluralsight/ps-design-system-core'
import {
defaultName as themeDefaultName,
names as themeNames
-} from '@pluralsight/ps-design-system-theme/react'
+} from '@pluralsight/ps-design-system-theme/vars'
const listItemTextLightHover = {
color: core.colors.gray06
|
fix(tab): reference vars from vars instead of react module
|
diff --git a/proctor-common/src/main/java/com/indeed/proctor/common/dynamic/MetaTagsFilter.java b/proctor-common/src/main/java/com/indeed/proctor/common/dynamic/MetaTagsFilter.java
index <HASH>..<HASH> 100644
--- a/proctor-common/src/main/java/com/indeed/proctor/common/dynamic/MetaTagsFilter.java
+++ b/proctor-common/src/main/java/com/indeed/proctor/common/dynamic/MetaTagsFilter.java
@@ -3,6 +3,7 @@ package com.indeed.proctor.common.dynamic;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableSet;
import com.indeed.proctor.common.model.ConsumableTestDefinition;
import org.springframework.util.CollectionUtils;
@@ -15,7 +16,7 @@ public class MetaTagsFilter implements DynamicFilter {
public MetaTagsFilter(@JsonProperty("meta_tags") final Set<String> metaTags) {
Preconditions.checkArgument(!CollectionUtils.isEmpty(metaTags), "meta_tags should be non-empty string list.");
- this.metaTags = metaTags;
+ this.metaTags = ImmutableSet.copyOf(metaTags);
}
@JsonProperty("meta_tags")
|
PROC-<I>: Fix to use ImmutableSet to avoid being modified via getter
|
diff --git a/beekeeper/data_handlers.py b/beekeeper/data_handlers.py
index <HASH>..<HASH> 100644
--- a/beekeeper/data_handlers.py
+++ b/beekeeper/data_handlers.py
@@ -29,7 +29,7 @@ class DataHandlerMeta(type):
cls.registry.update(**{mimetype: cls for mimetype in dct.get('mimetypes', [dct.get('mimetype')])})
super(DataHandlerMeta, cls).__init__(name, bases, dct)
-DataHandler = DataHandlerMeta('DataHandler', (object,), {})
+DataHandler = DataHandlerMeta(str('DataHandler'), (object,), {})
class XMLParser(DataHandler):
mimetypes = ['application/xml', 'text/xml']
|
Adding explicit str() cast to accommodate python2 being unable to handle unicode variable names
|
diff --git a/concrete/src/Permission/Duration.php b/concrete/src/Permission/Duration.php
index <HASH>..<HASH> 100644
--- a/concrete/src/Permission/Duration.php
+++ b/concrete/src/Permission/Duration.php
@@ -66,7 +66,7 @@ class Duration extends AbstractRepetition
$dateEnd = '';
} else {
$dateEnd = $dateEndDT->format('Y-m-d H:i:s');
- if ($request->get('pdStartDateAllDayActivate')) {
+ if ($request->get('pdEndDateAllDayActivate')) {
// We need to work in the user timezone, otherwise we risk to change the day
$dateEnd = $service->toDateTime($dateEnd, 'user', 'system')->format('Y-m-d').' 23:59:59';
$pd->setEndDateAllDay(1);
|
Fix saving "all day" for the final date of permission duration
|
diff --git a/src/Twig/Extension/PhpFunctions.php b/src/Twig/Extension/PhpFunctions.php
index <HASH>..<HASH> 100644
--- a/src/Twig/Extension/PhpFunctions.php
+++ b/src/Twig/Extension/PhpFunctions.php
@@ -35,6 +35,7 @@ class PhpFunctions extends Twig_Extension
new Twig_SimpleFilter('getclass', 'get_class'),
new Twig_SimpleFilter('strlen', 'strlen'),
new Twig_SimpleFilter('count', 'count'),
+ new Twig_SimpleFilter('ksort', [$this, '_ksort']),
new Twig_SimpleFilter('php_*', [$this, '_callPhpFunction']),
];
}
@@ -58,4 +59,11 @@ class PhpFunctions extends Twig_Extension
return @call_user_func_array($func, $args);
}
+
+ function _ksort($array)
+ {
+ ksort($array);
+
+ return $array;
+ }
}
|
Alled filter ksort to Twig extension PhpFunctions
|
diff --git a/src/edeposit/amqp/harvester/structures.py b/src/edeposit/amqp/harvester/structures.py
index <HASH>..<HASH> 100755
--- a/src/edeposit/amqp/harvester/structures.py
+++ b/src/edeposit/amqp/harvester/structures.py
@@ -221,3 +221,12 @@ class Publication(object):
return False
return True
+
+class Publications(namedtuple("Publication", ["publications"])):
+ """
+ AMQP communication structured used to hold the transfered informations.
+
+ Attributes:
+ publications (list): List of :class:`Publication` namedtuples.
+ """
+ pass
|
structures.py: Added new class Publications. Fixed #9.
|
diff --git a/packages/heroku-run/commands/run.js b/packages/heroku-run/commands/run.js
index <HASH>..<HASH> 100644
--- a/packages/heroku-run/commands/run.js
+++ b/packages/heroku-run/commands/run.js
@@ -54,6 +54,14 @@ function readStdin(c) {
if (tty.isatty(0)) {
stdin.setRawMode(true);
stdin.pipe(c);
+ let sigints = 0;
+ stdin.on('data', function (c) {
+ if (c === '\u0003') sigints++;
+ if (sigints >= 5) {
+ cli.error('forcing dyno disconnect');
+ process.exit(1);
+ }
+ });
} else {
stdin.pipe(new stream.Transform({
objectMode: true,
|
disconnect from dyno after 5 sigints
|
diff --git a/BasePlugin.php b/BasePlugin.php
index <HASH>..<HASH> 100644
--- a/BasePlugin.php
+++ b/BasePlugin.php
@@ -44,8 +44,6 @@ class BasePlugin extends \miaoxing\plugin\BaseService
protected $require = [];
/**
- * 插件的唯一数字ID
- *
* @var int
*/
protected $id;
|
解决property $id has a superfluous comment description问题 #<I>
|
diff --git a/glue/ligolw/metaio.py b/glue/ligolw/metaio.py
index <HASH>..<HASH> 100644
--- a/glue/ligolw/metaio.py
+++ b/glue/ligolw/metaio.py
@@ -2,10 +2,6 @@ __author__ = "Kipp Cannon <kipp@gravity.phys.uwm.edu>"
__date__ = "$Date$"
__version__ = "$Revision$"
-try:
- import numarray
-except:
- pass
import re
import sys
from xml import sax
@@ -214,6 +210,7 @@ class Column(ligolw.Column):
# if the list like object has 0 length, causing numarray to
# barf. If the object is, in fact, a real Python list then
# numarray is made happy.
+ import numarray
if not len(self):
return numarray.array([], type = ToNumArrayType[self.getAttribute("Type")], shape = (len(self),))
return numarray.array(self, type = ToNumArrayType[self.getAttribute("Type")], shape = (len(self),))
|
Move import of numarray into one piece of code that needs it --- speeds up
module load significantly for the normal case in which numarray isn't needed.
|
diff --git a/tests/test_wappalyzer.py b/tests/test_wappalyzer.py
index <HASH>..<HASH> 100644
--- a/tests/test_wappalyzer.py
+++ b/tests/test_wappalyzer.py
@@ -204,4 +204,15 @@ def test_analyze_with_versions_and_categories():
analyzer = Wappalyzer(categories=categories, technologies=technologies)
result = analyzer.analyze_with_versions_and_categories(webpage)
- assert ("WordPress", {"categories": ["CMS", "Blog"], "versions": ["5.4.2"]}) in result.items()
\ No newline at end of file
+ assert ("WordPress", {"categories": ["CMS", "Blog"], "versions": ["5.4.2"]}) in result.items()
+
+def test_pass_request_params():
+
+ try:
+ webpage = WebPage.new_from_url('http://example.com/', timeout=0.00001)
+ assert False #"Shoud have triggered TimeoutError"
+ except requests.exceptions.ConnectTimeout:
+ assert True
+ except:
+ assert False #"Shoud have triggered TimeoutError"
+
|
Basic test for passing the params
|
diff --git a/tests/docker_mock.py b/tests/docker_mock.py
index <HASH>..<HASH> 100644
--- a/tests/docker_mock.py
+++ b/tests/docker_mock.py
@@ -100,8 +100,13 @@ def mock_docker(build_should_fail=False,
flexmock(docker.Client, start=lambda cid, **kwargs: None)
flexmock(docker.Client, tag=lambda img, rep, **kwargs: True)
flexmock(docker.Client, wait=lambda cid: 1 if wait_should_fail else 0)
- flexmock(docker.Client, get_image=lambda img, **kwargs: open("/dev/null",
- "rb"))
+ class GetImageResult(object):
+ data = b''
+ def __init__(self):
+ self.fp = open('/dev/null', 'rb')
+ def __getattr__(self, attr):
+ return getattr(self, self.fp, attr)
+ flexmock(docker.Client, get_image=lambda img, **kwargs: GetImageResult())
flexmock(os.path, exists=lambda p: True if p == DOCKER_SOCKET_PATH else old_ope(p))
for method, args in should_raise_error.items():
|
Make result of mocked docker.Client.get_image have 'data' attribute
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -31,6 +31,7 @@ setup(
dependency_links=["git+https://github.com/crytic/crytic-compile.git@master#egg=crytic-compile"],
license="AGPL-3.0",
long_description=long_description,
+ long_description_content_type='text/markdown',
entry_points={
"console_scripts": [
"slither = slither.__main__:main",
|
Fixed Pypi Markdown render
Added long_description_content_type value to have Pypi website correctly
render Readme.md with markdown
|
diff --git a/actionpack/lib/action_view/helpers/debug_helper.rb b/actionpack/lib/action_view/helpers/debug_helper.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_view/helpers/debug_helper.rb
+++ b/actionpack/lib/action_view/helpers/debug_helper.rb
@@ -32,7 +32,7 @@ module ActionView
content_tag(:pre, object, :class => "debug_dump")
rescue Exception # errors from Marshal or YAML
# Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
- content_tag(:code, object.to_yaml, :class => "debug_dump")
+ content_tag(:code, object.inspect, :class => "debug_dump")
end
end
end
|
Fix debug helper not inspecting on Exception
The debug helper should inspect the object when it can't be converted to YAML, this behavior was changed in 8f8d8eb<I>e2ed9b6f<I>aa9d<I>e<I>f<I>.
|
diff --git a/bin/copy-assets.js b/bin/copy-assets.js
index <HASH>..<HASH> 100644
--- a/bin/copy-assets.js
+++ b/bin/copy-assets.js
@@ -255,7 +255,11 @@ function start() {
function onBundleFinish({mcPath, bundlePath, projectPath}) {
console.log("[copy-assets] delete debugger.js bundle");
- fs.unlinkSync(path.join(mcPath, bundlePath, "debugger.js"))
+
+ const debuggerPath = path.join(mcPath, bundlePath, "debugger.js")
+ if (fs.existsSync(debuggerPath)) {
+ fs.unlinkSync(debuggerPath)
+ }
console.log("[copy-assets] copy shared bundles to client/shared");
moveFile(
|
[releases] check if the file exits (#<I>)
|
diff --git a/player_js.go b/player_js.go
index <HASH>..<HASH> 100644
--- a/player_js.go
+++ b/player_js.go
@@ -96,7 +96,12 @@ func toLR(data []byte) ([]int16, []int16) {
}
func (p *Player) Write(data []byte) (int, error) {
- p.bufferedData = append(p.bufferedData, data...)
+ m := getDefaultBufferSize(p.sampleRate, p.channelNum, p.bytesPerSample)
+ n := min(len(data), m - len(p.bufferedData))
+ if n < 0 {
+ n = 0
+ }
+ p.bufferedData = append(p.bufferedData, data[:n]...)
c := int64(p.context.Get("currentTime").Float() * float64(p.sampleRate))
if p.positionInSamples+positionDelay < c {
p.positionInSamples = c
@@ -123,7 +128,7 @@ func (p *Player) Write(data []byte) (int, error) {
p.positionInSamples += int64(len(il))
p.bufferedData = p.bufferedData[dataSize:]
}
- return len(data), nil
+ return n, nil
}
func (p *Player) Close() error {
|
Add limitation to buffers (JavaScript) (#6)
|
diff --git a/coolname/impl.py b/coolname/impl.py
index <HASH>..<HASH> 100755
--- a/coolname/impl.py
+++ b/coolname/impl.py
@@ -275,7 +275,6 @@ class RandomNameGenerator(object):
if not config['all'].get('__nocheck'):
_check_max_slug_length(self._max_slug_length, self._lists[None])
# Fire it up
- self.randomize()
assert self.generate_slug()
def randomize(self, seed=None):
|
Don't call randomize() on creation
|
diff --git a/epdb/telnetclient.py b/epdb/telnetclient.py
index <HASH>..<HASH> 100755
--- a/epdb/telnetclient.py
+++ b/epdb/telnetclient.py
@@ -45,6 +45,8 @@ class TelnetClient(telnetlib.Telnet):
def ctrl_c(self, int, tb):
self.sock.sendall(IAC + IP)
+ self.sock.sendall('close\n')
+ raise KeyboardInterrupt
def sigwinch(self, int, tb):
self.updateTerminalSize()
|
close connection on ctrl-c
|
diff --git a/test/unit/iterator.js b/test/unit/iterator.js
index <HASH>..<HASH> 100644
--- a/test/unit/iterator.js
+++ b/test/unit/iterator.js
@@ -302,13 +302,15 @@ var objectFixturesUUID = [
},
];
+// in the form of parsed docs
var alreadyInPGFixture = [
objectFixtures[0],
objectFixtures[1]
];
+// in the form of id/rev
var objectsNotInPGFixture = [
- objectFixtures[2]
+ objectFixturesUUID[2]
];
describe('iterator of couchdb data', function() {
|
mixed up docs and uuid inputs/returns. sorted now.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='vent',
- version='v0.4.1',
+ version='v0.4.2.dev',
packages=['vent', 'vent.core', 'vent.core.file-drop',
'vent.core.rq-worker', 'vent.core.rq-dashboard', 'vent.menus',
'vent.core.rmq-es-connector', 'vent.helpers', 'vent.api'],
|
bump to <I>.dev
|
diff --git a/packages/storybook/src/knobs.js b/packages/storybook/src/knobs.js
index <HASH>..<HASH> 100644
--- a/packages/storybook/src/knobs.js
+++ b/packages/storybook/src/knobs.js
@@ -1,8 +1,8 @@
-import * as nativeKnobs from "@storybook/addon-knobs/react";
+import * as builtInKnobs from "@storybook/addon-knobs/react";
import select from "./select-shim";
const knobs = {
- nativeKnobs,
+ builtInKnobs,
select
};
|
refactor: renamed confusingly named variable (#<I>)
|
diff --git a/django_tenants/templatetags/tenant.py b/django_tenants/templatetags/tenant.py
index <HASH>..<HASH> 100644
--- a/django_tenants/templatetags/tenant.py
+++ b/django_tenants/templatetags/tenant.py
@@ -1,3 +1,4 @@
+from django.apps import apps
from django.conf import settings
from django.template import Library
from django.template.defaulttags import URLNode
@@ -35,7 +36,9 @@ def is_tenant_app(context, app):
return True
else:
_apps = settings.TENANT_APPS
- return app['app_label'] in [tenant_app.split('.')[-1] for tenant_app in _apps]
+
+ cfg = apps.get_app_config(app['app_label'])
+ return cfg.module.__name__ in _apps
@register.simple_tag()
@@ -44,7 +47,9 @@ def is_shared_app(app):
_apps = get_tenant_types()[get_public_schema_name()]['APPS']
else:
_apps = settings.SHARED_APPS
- return app['app_label'] in [tenant_app.split('.')[-1] for tenant_app in _apps]
+
+ cfg = apps.get_app_config(app['app_label'])
+ return cfg.module.__name__ in _apps
@register.simple_tag()
|
Update admin support to handle apps with a customized label
- This changes the templatetags for the admin template to correctly
identify apps in settings.SHARED_APPS if they have customized their
label and don't follow the default pattern.
|
diff --git a/workman/src/main/java/org/duracloud/mill/bit/BitIntegrityHelper.java b/workman/src/main/java/org/duracloud/mill/bit/BitIntegrityHelper.java
index <HASH>..<HASH> 100644
--- a/workman/src/main/java/org/duracloud/mill/bit/BitIntegrityHelper.java
+++ b/workman/src/main/java/org/duracloud/mill/bit/BitIntegrityHelper.java
@@ -76,17 +76,17 @@ public class BitIntegrityHelper {
*/
public static String getHeader() {
String[] values = {
- "DATE_CHECKED",
- "ACCOUNT",
- "STORE_ID",
- "STORE_TYPE",
- "SPACE_ID",
- "CONTENT_ID",
- "RESULT",
- "CONTENT_CHECKSUM",
- "PROVIDER_CHECKSUM",
- "MANIFEST_CHECKSUM",
- "DETAILS"};
+ "date-checked",
+ "account",
+ "store-id",
+ "store-type",
+ "space-id",
+ "content-id",
+ "result",
+ "content-checksum",
+ "provider-checksum",
+ "manifest-checksum",
+ "details"};
return StringUtils.join(values, "\t")+"\n";
|
resolves issue #<I> in <URL>
|
diff --git a/Tank/stepper/instance_plan.py b/Tank/stepper/instance_plan.py
index <HASH>..<HASH> 100644
--- a/Tank/stepper/instance_plan.py
+++ b/Tank/stepper/instance_plan.py
@@ -88,6 +88,18 @@ class LoadPlanBuilder(object):
raise StepperConfigurationError(
"Error in step configuration: 'const(%s'" % params)
+ def parse_start(params):
+ template = re.compile('(\d+)\)')
+ s_res = template.search(params)
+ if s_res:
+ instances = s_res.groups()
+ self.start(int(instances))
+ else:
+ self.log.info(
+ "Start step format: 'start(<instances_count>)'")
+ raise StepperConfigurationError(
+ "Error in step configuration: 'start(%s'" % params)
+
def parse_line(params):
template = re.compile('(\d+),\s*(\d+),\s*([0-9.]+[dhms]?)+\)')
s_res = template.search(params)
@@ -136,6 +148,7 @@ class LoadPlanBuilder(object):
'step': parse_stairway,
'ramp': parse_ramp,
'wait': parse_wait,
+ 'start': parse_start,
}
step_type, params = step_config.split('(')
step_type = step_type.strip()
|
instant start step for instaces_schedule
|
diff --git a/evcache-core/src/main/java/com/netflix/evcache/event/EVCacheEvent.java b/evcache-core/src/main/java/com/netflix/evcache/event/EVCacheEvent.java
index <HASH>..<HASH> 100644
--- a/evcache-core/src/main/java/com/netflix/evcache/event/EVCacheEvent.java
+++ b/evcache-core/src/main/java/com/netflix/evcache/event/EVCacheEvent.java
@@ -18,6 +18,7 @@ public class EVCacheEvent {
private final String appName;
private final String cacheName;
private final EVCacheClientPool pool;
+ private final long startTime;
private Collection<EVCacheClient> clients = null;
private Collection<String> keys = null;
@@ -33,6 +34,7 @@ public class EVCacheEvent {
this.appName = appName;
this.cacheName = cacheName;
this.pool = pool;
+ this.startTime = System.currentTimeMillis();
}
public Call getCall() {
@@ -47,6 +49,10 @@ public class EVCacheEvent {
return cacheName;
}
+ public long getStartTimeUTC() {
+ return startTime;
+ }
+
public EVCacheClientPool getEVCacheClientPool() {
return pool;
}
|
Added start time to EVCache event
|
diff --git a/lib/fog/vcloud_director/requests/compute/get_vdc.rb b/lib/fog/vcloud_director/requests/compute/get_vdc.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/vcloud_director/requests/compute/get_vdc.rb
+++ b/lib/fog/vcloud_director/requests/compute/get_vdc.rb
@@ -110,7 +110,9 @@ module Fog
:Reserved=>"0",
:Used=>"0",
:Overhead=>"0"}},
- :ResourceEntities => {},
+ :ResourceEntities => {
+ :ResourceEntity => []
+ },
:AvailableNetworks => {},
:Capabilities=>
{:SupportedHardwareVersions=>
@@ -128,6 +130,13 @@ module Fog
:href=>make_href("#{item[:type]}/#{item[:type]}-#{id}")}
end
+ body[:ResourceEntities][:ResourceEntity] +=
+ data[:vapps].map do |id, vapp|
+ {:type => "application/vnd.vmware.vcloud.vApp+xml",
+ :name => vapp[:name],
+ :href => make_href("vApp/#{id}")}
+ end
+
body[:AvailableNetworks][:Network] =
data[:networks].map do |id, network|
{:type=>"application/vnd.vmware.vcloud.network+xml",
|
extend get_vdc mock to return contained vApps
|
diff --git a/src/Bindings/Browser/ObjectService.php b/src/Bindings/Browser/ObjectService.php
index <HASH>..<HASH> 100644
--- a/src/Bindings/Browser/ObjectService.php
+++ b/src/Bindings/Browser/ObjectService.php
@@ -1039,12 +1039,7 @@ class ObjectService extends AbstractBrowserBindingService implements ObjectServi
*/
protected function isCached(array $identifier)
{
- if (is_array($identifier)) {
- return isset($this->objectCache[$identifier[0]][$identifier[1]]);
- } elseif (isset($this->objectCache[$identifier])) {
- return $this->objectCache[$identifier];
- }
- return false;
+ return isset($this->objectCache[$identifier[0]][$identifier[1]]);
}
/**
@@ -1056,7 +1051,7 @@ class ObjectService extends AbstractBrowserBindingService implements ObjectServi
protected function getCached(array $identifier)
{
if ($this->isCached($identifier)) {
- return $this->objectCache[$identifier];
+ return $this->objectCache[$identifier[0]][$identifier[1]];
}
return null;
}
|
Follow-up for internal object cache
Addresses an issue with unreachable code and warnings about illegal offsets. Previous pull request had been based on an outdated local copy.
|
diff --git a/telemetry/telemetry/core/memory_cache_http_server.py b/telemetry/telemetry/core/memory_cache_http_server.py
index <HASH>..<HASH> 100644
--- a/telemetry/telemetry/core/memory_cache_http_server.py
+++ b/telemetry/telemetry/core/memory_cache_http_server.py
@@ -70,7 +70,8 @@ class MemoryCacheHTTPServer(SocketServer.ThreadingMixIn,
fs = os.fstat(fd.fileno())
content_type = mimetypes.guess_type(file_path)[0]
zipped = False
- if content_type and content_type.startswith('text/'):
+ if content_type in ['text/html', 'text/css',
+ 'application/javascript']:
zipped = True
response = zlib.compress(response, 9)
self.resource_map[file_path] = {
|
[Telemetry] Compress JavaScript in addition to HTML/CSS.
This saves about another 3MB of server memory usage on the intl1 page cycler.
BUG=<I>
TEST=intl1 page cycler on mac
NOTRY=True
TBR=<EMAIL>
Review URL: <URL>
|
diff --git a/_config.php b/_config.php
index <HASH>..<HASH> 100644
--- a/_config.php
+++ b/_config.php
@@ -6,5 +6,5 @@ define('SHOP_PATH',BASE_PATH.DIRECTORY_SEPARATOR.SHOP_DIR);
Object::useCustomClass('Currency','ShopCurrency', true);
if($checkoutsteps = CheckoutPage::config()->steps){
- SteppedCheckout::setupSteps($checkoutsteps, CheckoutPage::config()->first_step);
+ SteppedCheckout::setupSteps($checkoutsteps);
}
|
Update _config.php
Additional unnecessary argument. The function setupSteps, within class SteppedCheckout, only requires $steps.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -4,15 +4,20 @@ uModbus is a pure Python implementation of the Modbus protocol with support
for Python 2.7, 3.3, 3.4, 3.5 and Pypy. uModbus has no runtime depedencies.
"""
+import os
from setuptools import setup
+cwd = os.path.dirname(os.path.abspath(__name__))
+
+long_description = open(os.path.join(cwd, 'README.rst'), 'r').read()
+
setup(name='uModbus',
version='0.2.0',
author='Auke Willem Oosterhoff',
author_email='oosterhoff@baopt.nl',
description='Implementation of the Modbus protocol in pure Python.',
url='https://github.com/AdvancedClimateSystems/umodbus/',
- long_description=__doc__,
+ long_description=long_description,
license='MPL',
packages=[
'umodbus',
|
Fix long_description of setup.py.
|
diff --git a/components/query-assist/query-assist.js b/components/query-assist/query-assist.js
index <HASH>..<HASH> 100644
--- a/components/query-assist/query-assist.js
+++ b/components/query-assist/query-assist.js
@@ -248,9 +248,11 @@ export default class QueryAssist extends RingComponentWithShortcuts {
this.setupRequestHandler(this.props);
this.setShortcutsEnabled(this.props.focus);
- const request = this.props.autoOpen ? this.requestData() : this.requestStyleRanges();
+ const request = this.props.autoOpen
+ ? this.boundRequestHandler().then(::this.setFocus)
+ : this.requestStyleRanges().catch(::this.setFocus);
+
request.
- catch(::this.setFocus).
/* For some reason one more tick before attachMutationEvents is required */
then(() => new Promise(resolve => setTimeout(resolve, 0))).
then(::this.attachMutationEvents);
|
RG-<I> QueryAssist: parameter that open assist suggest immediately when it's shown
Former-commit-id: f<I>b<I>b<I>b9d<I>f<I>bed<I>fa<I>b
|
diff --git a/packages/ember-metal-views/lib/renderer.js b/packages/ember-metal-views/lib/renderer.js
index <HASH>..<HASH> 100755
--- a/packages/ember-metal-views/lib/renderer.js
+++ b/packages/ember-metal-views/lib/renderer.js
@@ -6,7 +6,7 @@ import {
subscribers
} from "ember-metal/instrumentation";
import buildComponentTemplate from "ember-views/system/build-component-template";
-import { indexOf } from "ember-metal/array";
+import { indexOf } from "ember-metal/enumerable_utils";
//import { deprecation } from "ember-views/compat/attrs-proxy";
function Renderer(_helper) {
|
Use `indexOf` from EnumerableUtils.
It properly defers to the object or polyfil as needed.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -22,13 +22,19 @@ function renameDeep(obj, cb) {
throw new Error('deep-rename-keys expects an object');
}
- obj = rename(obj, cb);
- var res = {};
+ var res;
+ if(typeOf(obj) === 'array')
+ res = [];
+ else
+ {
+ obj = rename(obj, cb);
+ res = {};
+ }
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
var val = obj[key];
- if (typeOf(val) === 'object') {
+ if (typeOf(val) === 'object' || typeOf(val) === 'array') {
res[key] = renameDeep(val, cb);
} else {
res[key] = val;
|
Objects nested in Arrays are processed
|
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/textStylerOptions.js b/bundles/org.eclipse.orion.client.editor/web/examples/textview/textStylerOptions.js
index <HASH>..<HASH> 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/textview/textStylerOptions.js
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/textview/textStylerOptions.js
@@ -131,10 +131,8 @@ define("examples/textview/textStylerOptions", ['orion/bootstrap', 'orion/textvie
if (className) {
var color = elements[settingName];
- var weight = elements['fontWeight'];
result.push("." + theme + " ." + className + " {");
result.push("\tcolor: " + color + ";");
- result.push("\tfont-weight: " + weight + ";");
result.push("}");
}
}
|
Bug <I> - retaining default font weight for keywords after theming
|
diff --git a/src/org/parosproxy/paros/control/Control.java b/src/org/parosproxy/paros/control/Control.java
index <HASH>..<HASH> 100644
--- a/src/org/parosproxy/paros/control/Control.java
+++ b/src/org/parosproxy/paros/control/Control.java
@@ -40,11 +40,9 @@ import org.zaproxy.zap.extension.brk.ExtensionBreak;
import org.zaproxy.zap.extension.compare.ExtensionCompare;
import org.zaproxy.zap.extension.encoder2.ExtensionEncoder2;
import org.zaproxy.zap.extension.help.ExtensionHelp;
-import org.zaproxy.zap.extension.params.ExtensionParams;
import org.zaproxy.zap.extension.portscan.ExtensionPortScan;
import org.zaproxy.zap.extension.pscan.ExtensionPassiveScan;
import org.zaproxy.zap.extension.search.ExtensionSearch;
-import org.zaproxy.zap.extension.test.ExtensionTest;
/**
|
Corrected imports to fix issue 8, reported by duartejcsilva.
|
diff --git a/src/server/pachyderm_test.go b/src/server/pachyderm_test.go
index <HASH>..<HASH> 100644
--- a/src/server/pachyderm_test.go
+++ b/src/server/pachyderm_test.go
@@ -3796,6 +3796,12 @@ func TestLazyPipeline(t *testing.T) {
require.NoError(t, err)
_, err = c.PutFile(dataRepo, "master", "file", strings.NewReader("foo\n"))
require.NoError(t, err)
+ // We put 2 files, 1 of which will never be touched by the pipeline code.
+ // This is an important part of the correctness of this test because the
+ // job-shim sets up a goro for each pipe, pipes that are never opened will
+ // leak but that shouldn't prevent the job from completing.
+ _, err = c.PutFile(dataRepo, "master", "file2", strings.NewReader("foo\n"))
+ require.NoError(t, err)
require.NoError(t, c.FinishCommit(dataRepo, "master"))
commitInfos, err := c.FlushCommit([]*pfsclient.Commit{commit}, nil)
require.NoError(t, err)
|
Makes TestLazyPipeline slightly harder.
|
diff --git a/lib/dump_rake.rb b/lib/dump_rake.rb
index <HASH>..<HASH> 100644
--- a/lib/dump_rake.rb
+++ b/lib/dump_rake.rb
@@ -63,6 +63,10 @@ class DumpRake
end
def self.cleanup(options = {})
+ unless options[:leave].nil? || /^\d+$/ === options[:leave] || options[:leave].downcase == 'none'
+ raise 'LEAVE should be number or "none"'
+ end
+
to_delete = []
all_dumps = Dump.list(options.merge(:all => true))
|
complain if LEAVE is not none and is not a number
|
diff --git a/test/custom_sharding.py b/test/custom_sharding.py
index <HASH>..<HASH> 100755
--- a/test/custom_sharding.py
+++ b/test/custom_sharding.py
@@ -123,6 +123,10 @@ primary key (id)
utils.run_vtctl(['ApplySchema', '-sql=' + sql, 'test_keyspace'],
auto_log=True)
+ # reload schema everywhere so the QueryService knows about the tables
+ for t in [shard_0_master, shard_0_rdonly]:
+ utils.run_vtctl(['ReloadSchema', t.tablet_alias], auto_log=True)
+
# insert data on shard 0
self._insert_data('0', 100, 10)
|
Removing one source of flakiness in this test.
|
diff --git a/owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/model/EntityType.java b/owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/model/EntityType.java
index <HASH>..<HASH> 100644
--- a/owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/model/EntityType.java
+++ b/owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/model/EntityType.java
@@ -61,8 +61,6 @@ import static org.semanticweb.owlapi.vocab.OWLRDFVocabulary.RDFS_DATATYPE;
@SuppressWarnings("javadoc")
public final class EntityType<E extends OWLEntity> implements Serializable {
- private static final long serialVersionUID = 30402L;
-
/**
* class entity
*/
|
Removed serialVersionUID which is not needed here
|
diff --git a/agent.go b/agent.go
index <HASH>..<HASH> 100644
--- a/agent.go
+++ b/agent.go
@@ -411,21 +411,18 @@ func (s *sandbox) unsetAndRemoveSandboxStorage(path string) error {
span.SetTag("path", path)
defer span.Finish()
- if _, ok := s.storages[path]; ok {
- removeSbs, err := s.unSetSandboxStorage(path)
- if err != nil {
- return err
- }
+ removeSbs, err := s.unSetSandboxStorage(path)
+ if err != nil {
+ return err
+ }
- if removeSbs {
- if err := s.removeSandboxStorage(path); err != nil {
- return err
- }
+ if removeSbs {
+ if err := s.removeSandboxStorage(path); err != nil {
+ return err
}
-
- return nil
}
- return grpcStatus.Errorf(codes.NotFound, "Sandbox storage with path %s not found", path)
+
+ return nil
}
func (s *sandbox) getContainer(id string) (*container, error) {
|
sandbox: Remove redundant check
Remove the check in `unsetAndRemoveSandboxStorage()`; that exact check
is performed by the called function `unSetSandboxStorage()`.
|
diff --git a/lib/arjdbc/jdbc/adapter.rb b/lib/arjdbc/jdbc/adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/arjdbc/jdbc/adapter.rb
+++ b/lib/arjdbc/jdbc/adapter.rb
@@ -271,6 +271,12 @@ module ActiveRecord
def select(*args)
execute(*args)
end
+
+ def translate_exception(e, message)
+ puts e.backtrace if $DEBUG || ENV['DEBUG']
+ super
+ end
+ protected :translate_exception
end
end
end
diff --git a/test/jdbc_common.rb b/test/jdbc_common.rb
index <HASH>..<HASH> 100644
--- a/test/jdbc_common.rb
+++ b/test/jdbc_common.rb
@@ -20,6 +20,6 @@ require 'helper'
require 'test/unit'
# Comment/uncomment to enable logging to be loaded for any of the database adapters
-# require 'db/logger'
+require 'db/logger' if $DEBUG || ENV['DEBUG']
|
Dump more info (logging, exception backtraces) when $DEBUG or ENV['DEBUG'] set
|
diff --git a/test/main.js b/test/main.js
index <HASH>..<HASH> 100644
--- a/test/main.js
+++ b/test/main.js
@@ -126,6 +126,7 @@ describe('gulp-browserify', function() {
B.once('data', function(fakeFile) {
should.exist(fakeFile);
should.exist(fakeFile.contents);
+ done();
}).on('postbundle', function(data) {
String(data).should.equal(fs.readFileSync('test/expected/normal.js', 'utf8'));
});
|
this should fix the multiple callbacks
|
diff --git a/db_upgrade.py b/db_upgrade.py
index <HASH>..<HASH> 100644
--- a/db_upgrade.py
+++ b/db_upgrade.py
@@ -59,7 +59,7 @@ def doPostgreSQLUpgrade(db_conn, nonce_table_name='oid_nonces'):
"""%nonce_table_name
cur.execute(sql)
cur.close()
- conn.commit()
+ db_conn.commit()
|
[project @ conn -> db_conn again]
|
diff --git a/templates/element/customThemeStyleSheet.php b/templates/element/customThemeStyleSheet.php
index <HASH>..<HASH> 100644
--- a/templates/element/customThemeStyleSheet.php
+++ b/templates/element/customThemeStyleSheet.php
@@ -20,12 +20,16 @@ use Cake\Core\Configure;
<style>
::selection {
- background: <?php echo Configure::read('app.customThemeMainColor'); ?>; /* WebKit/Blink Browsers */
+ background: <?php echo Configure::read('app.customThemeMainColor'); ?>;
color: #fff;
}
- ::-moz-selection {
- background: <?php echo Configure::read('app.customThemeMainColor'); ?>; /* Gecko Browsers */
- color: #fff;
+
+ h2.info::selection,
+ h2.info b::selection,
+ #flashMessage.success::selection,
+ #flashMessage.success b::selection {
+ background-color: #fff;
+ color: #000;
}
.box h3,
|
css selection was not visible if background is same color as selection
|
diff --git a/src/Symfony/Components/DependencyInjection/Builder.php b/src/Symfony/Components/DependencyInjection/Builder.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Components/DependencyInjection/Builder.php
+++ b/src/Symfony/Components/DependencyInjection/Builder.php
@@ -440,11 +440,11 @@ class Builder extends Container
}
else
{
- $replaceParameter = function ($match) use ($parameters)
+ $replaceParameter = function ($match) use ($parameters, $value)
{
if (!array_key_exists($name = strtolower($match[2]), $parameters))
{
- throw new \RuntimeException(sprintf('The parameter "%s" must be defined.', $name));
+ throw new \RuntimeException(sprintf('The parameter "%s" must be defined (used in the following expression: "%s").', $name, $value));
}
return $parameters[$name];
|
[DependencyInjection] tweaked an error message to ease debugging
|
diff --git a/ginga/web/pgw/ipg.py b/ginga/web/pgw/ipg.py
index <HASH>..<HASH> 100644
--- a/ginga/web/pgw/ipg.py
+++ b/ginga/web/pgw/ipg.py
@@ -397,9 +397,12 @@ class WebServer(object):
self.http_server = None
self.server = None
- def get_viewer(self, v_id):
+ def get_viewer(self, v_id, viewer_class=None, width=512, height=512,
+ force_new=False):
from IPython.display import display, HTML
- v = self.factory.get_viewer(v_id)
+ v = self.factory.get_viewer(v_id, viewer_class=viewer_class,
+ width=width, height=height,
+ force_new=force_new)
url = v.top.url
viewer = v.fitsimage
viewer.url = url
|
Added force_new kwarg to get_viewer() method
- API allows user to force a viewer to be recreated instead of using
a cached one
|
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index <HASH>..<HASH> 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -131,6 +131,10 @@ class AssertResponseWithUnexpectedErrorController < ActionController::Base
def index
raise 'FAIL'
end
+
+ def show
+ render :text => "Boom", :status => 500
+ end
end
module Admin
@@ -483,6 +487,16 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase
rescue Test::Unit::AssertionFailedError => e
assert e.message.include?('FAIL')
end
+
+ def test_assert_response_failure_response_with_no_exception
+ @controller = AssertResponseWithUnexpectedErrorController.new
+ get :show
+ assert_response :success
+ flunk 'Expected non-success response'
+ rescue Test::Unit::AssertionFailedError
+ rescue
+ flunk "assert_response failed to handle failure response with missing, but optional, exception."
+ end
end
class ActionPackHeaderTest < Test::Unit::TestCase
|
Test for assert_response for failure response without an exception. [#<I> state:resolved]
|
diff --git a/script-base.js b/script-base.js
index <HASH>..<HASH> 100644
--- a/script-base.js
+++ b/script-base.js
@@ -19,6 +19,7 @@ var Generator = module.exports = function Generator() {
this.scriptAppName = this._.camelize(this._.capitalize(this.appname)) + generalUtils.appName(this);
this.classedFileName = this._.capitalizeFile(this.name);
this.classedName = this._.capitalizeClass(this.name);
+ this.stylesLanguage = this.config.get('styles-language');
if (typeof this.options.appPath === 'undefined') {
this.options.appPath = this.options.appPath || 'src/scripts';
@@ -38,7 +39,7 @@ var Generator = module.exports = function Generator() {
this.stylesSuffix = '.css';
- switch(this.config.get('styles-language')) {
+ switch(this.stylesLanguage) {
case 'sass':
this.stylesSuffix = '.sass';
break;
|
Proxy stylesLanguage to component subgenerator
|
diff --git a/gcsproxy/listing_proxy_test.go b/gcsproxy/listing_proxy_test.go
index <HASH>..<HASH> 100644
--- a/gcsproxy/listing_proxy_test.go
+++ b/gcsproxy/listing_proxy_test.go
@@ -801,7 +801,26 @@ func (t *ListingProxyTest) NoteRemoval_ListingRequired_NoConflict() {
}
func (t *ListingProxyTest) NoteRemoval_ListingRequired_Conflict() {
- AssertTrue(false, "TODO")
+ var err error
+ name := t.dirName + "foo/"
+
+ // Note a removal.
+ err = t.lp.NoteRemoval(name)
+ AssertEq(nil, err)
+
+ // Simulate a successful listing from GCS containing the name.
+ listing := &storage.Objects{
+ Prefixes: []string{name},
+ }
+
+ ExpectCall(t.bucket, "ListObjects")(Any(), Any()).
+ WillOnce(oglemock.Return(listing, nil))
+
+ _, subdirs, err := t.lp.List()
+ AssertEq(nil, err)
+
+ // There should be no results.
+ ExpectThat(subdirs, ElementsAre())
}
func (t *ListingProxyTest) NoteRemoval_PrevListingConflicts() {
|
ListingProxyTest.NoteRemoval_ListingRequired_Conflict
|
diff --git a/deliver/lib/deliver/detect_values.rb b/deliver/lib/deliver/detect_values.rb
index <HASH>..<HASH> 100644
--- a/deliver/lib/deliver/detect_values.rb
+++ b/deliver/lib/deliver/detect_values.rb
@@ -62,7 +62,7 @@ module Deliver
if options[:ipa]
options[:platform] ||= FastlaneCore::IpaFileAnalyser.fetch_app_platform(options[:ipa])
elsif options[:pkg]
- options[:platform] = 'mac'
+ options[:platform] = 'osx'
end
end
end
|
platform bug (#<I>)
|
diff --git a/hazelcast/src/main/java/com/hazelcast/map/tx/TxnSetOperation.java b/hazelcast/src/main/java/com/hazelcast/map/tx/TxnSetOperation.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/map/tx/TxnSetOperation.java
+++ b/hazelcast/src/main/java/com/hazelcast/map/tx/TxnSetOperation.java
@@ -64,8 +64,8 @@ public class TxnSetOperation extends BasePutOperation implements MapTxnOperation
if (record == null || version == record.getVersion()){
recordStore.set(dataKey, dataValue, ttl);
shouldBackup = true;
+ eventType = (record == null ? EntryEventType.ADDED : EntryEventType.UPDATED);
}
- eventType = (record == null ? EntryEventType.ADDED : EntryEventType.UPDATED);
}
public long getVersion() {
|
fire update event after updates in txn. fix
|
diff --git a/src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java b/src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java
+++ b/src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java
@@ -139,6 +139,8 @@ public class RedisJobStore implements JobStore {
.addMixIn(HolidayCalendar.class, HolidayCalendarMixin.class)
.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+ mapper.setTypeFactory(mapper.getTypeFactory().withClassLoader(loadHelper.getClassLoader()));
+
if (redisCluster && jedisCluster == null) {
Set<HostAndPort> nodes = buildNodesSetFromHost();
JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
|
Use classloader specified by the ClassLoadHelper
Tell the ObjectMapper to use the ClassLoad specified in the
ClassLoadHelper. This allows jobs to be written in Clojure for example
by telling Quartz to use a custom ClassLoadHelper and to use Clojure's
DynamicClassLoader.
|
diff --git a/src/Assetic/Filter/ScssphpFilter.php b/src/Assetic/Filter/ScssphpFilter.php
index <HASH>..<HASH> 100644
--- a/src/Assetic/Filter/ScssphpFilter.php
+++ b/src/Assetic/Filter/ScssphpFilter.php
@@ -14,6 +14,7 @@ namespace Assetic\Filter;
use Assetic\Asset\AssetInterface;
use Assetic\Factory\AssetFactory;
use Assetic\Util\CssUtils;
+use Leafo\ScssPhp\Compiler;
/**
* Loads SCSS files using the PHP implementation of scss, scssphp.
@@ -46,7 +47,7 @@ class ScssphpFilter implements DependencyExtractorInterface
public function filterLoad(AssetInterface $asset)
{
- $sc = new \scssc();
+ $sc = new Compiler();
if ($this->compass) {
new \scss_compass($sc);
}
@@ -95,7 +96,7 @@ class ScssphpFilter implements DependencyExtractorInterface
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
{
- $sc = new \scssc();
+ $sc = new Compiler();
$sc->addImportPath($loadPath);
foreach($this->importPaths as $path) {
$sc->addImportPath($path);
|
Update ScssPhpFilter.php
Class replacement for new ScssPhp structure
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -50,7 +50,7 @@ var outputFileMin = join(buildDir,outputFile + ".min.js");
var packageConfig = require('./package.json');
// a failing test breaks the whole build chain
-gulp.task('build', ['build-browser', 'build-browser-gzip']);
+gulp.task('build', ['babel', 'build-browser', 'build-browser-gzip']);
gulp.task('default', ['lint','test', 'build']);
|
Add babel task to gulp build
|
diff --git a/src/GitElephant/Objects/Diff/DiffChunkLineAdded.php b/src/GitElephant/Objects/Diff/DiffChunkLineAdded.php
index <HASH>..<HASH> 100644
--- a/src/GitElephant/Objects/Diff/DiffChunkLineAdded.php
+++ b/src/GitElephant/Objects/Diff/DiffChunkLineAdded.php
@@ -36,4 +36,14 @@ class DiffChunkLineAdded extends DiffChunkLineChanged
$this->setContent($content);
$this->setType(self::ADDED);
}
+
+ /**
+ * Get destination line number
+ *
+ * @return int
+ */
+ public function getOriginNumber()
+ {
+ return '';
+ }
}
|
getOriginNumber of an added line is always empty
|
diff --git a/keanu-project/src/main/java/io/improbable/keanu/distributions/hyperparam/Diffs.java b/keanu-project/src/main/java/io/improbable/keanu/distributions/hyperparam/Diffs.java
index <HASH>..<HASH> 100644
--- a/keanu-project/src/main/java/io/improbable/keanu/distributions/hyperparam/Diffs.java
+++ b/keanu-project/src/main/java/io/improbable/keanu/distributions/hyperparam/Diffs.java
@@ -20,8 +20,6 @@ public class Diffs {
public static final ParameterName SIGMA = new ParameterName("SIGMA");
public static final ParameterName THETA = new ParameterName("THETA");
public static final ParameterName LAMBDA = new ParameterName("LAMBDA");
- public static final ParameterName LEFT = new ParameterName("LEFT");
- public static final ParameterName RIGHT = new ParameterName("RIGHT");
private final TreeSet<Diff> diffs = Sets.newTreeSet();
|
Remove unnecessary params from diffs
|
diff --git a/lib/config-to-webpack.js b/lib/config-to-webpack.js
index <HASH>..<HASH> 100644
--- a/lib/config-to-webpack.js
+++ b/lib/config-to-webpack.js
@@ -9,13 +9,19 @@ module.exports = function(config) {
var vendorChunk = 'vendors';
var context = path.resolve(config.client.app.path);
if (_.isString(config.client.app.buildPattern)) {
- config.client.app.buildPattern = [{
- pattern: config.client.app.buildPattern,
- splitVendor: true
- }];
+ config.client.app.buildPattern = [
+ config.client.app.buildPattern
+ ];
}
var entries = _.reduce(config.client.app.buildPattern, function(memo, ruleSet) {
+ if (_.isString(ruleSet)) {
+ ruleSet = {
+ pattern: ruleSet,
+ splitVendor: true
+ };
+ }
+
_.forEach(glob.sync(ruleSet.pattern), function(file) {
var filename = path.parse(file).name;
|
feat(webpack): buildPattern can also be a list of strings
|
diff --git a/lib/components/user/notification-prefs-pane.js b/lib/components/user/notification-prefs-pane.js
index <HASH>..<HASH> 100644
--- a/lib/components/user/notification-prefs-pane.js
+++ b/lib/components/user/notification-prefs-pane.js
@@ -368,6 +368,7 @@ class PhoneNumberEditor extends Component {
<p>
Please check the SMS messaging app on your mobile phone
for a text message with a verification code, and enter the code below.
+ The verification code expires after 10 minutes.
</p>
<ControlLabel>Verification code:</ControlLabel>
<ControlStrip>
|
refactor(PhoneNumberEditor): Mention code expiration in SMS instructions.
|
diff --git a/pandas/tests/indexes/multi/test_reindex.py b/pandas/tests/indexes/multi/test_reindex.py
index <HASH>..<HASH> 100644
--- a/pandas/tests/indexes/multi/test_reindex.py
+++ b/pandas/tests/indexes/multi/test_reindex.py
@@ -133,3 +133,31 @@ def test_reindex_not_all_tuples():
tm.assert_index_equal(res, idx)
expected = np.array([0, 1, 2, -1], dtype=np.intp)
tm.assert_numpy_array_equal(indexer, expected)
+
+
+def test_reindex_limit_arg_with_multiindex():
+ # GH21247
+
+ idx = MultiIndex.from_tuples([(3, "A"), (4, "A"), (4, "B")])
+
+ df = pd.Series([0.02, 0.01, 0.012], index=idx)
+
+ new_idx = MultiIndex.from_tuples(
+ [
+ (3, "A"),
+ (3, "B"),
+ (4, "A"),
+ (4, "B"),
+ (4, "C"),
+ (5, "B"),
+ (5, "C"),
+ (6, "B"),
+ (6, "C"),
+ ]
+ )
+
+ with pytest.raises(
+ ValueError,
+ match="limit argument only valid if doing pad, backfill or nearest reindexing",
+ ):
+ df.reindex(new_idx, fill_value=0, limit=1)
|
TST: Test reindex w/ multiindex df (GH<I>) (#<I>)
|
diff --git a/lib/codemirror.js b/lib/codemirror.js
index <HASH>..<HASH> 100644
--- a/lib/codemirror.js
+++ b/lib/codemirror.js
@@ -2613,7 +2613,7 @@
e_preventDefault(e);
var ourRange, ourIndex, startSel = doc.sel;
- if (addNew) {
+ if (addNew && !e.shiftKey) {
ourIndex = doc.sel.contains(start);
if (ourIndex > -1)
ourRange = doc.sel.ranges[ourIndex];
|
Make shift-ctrl-click extend the primary selection
Issue #<I>
|
diff --git a/core/src/main/java/hudson/ClassicPluginStrategy.java b/core/src/main/java/hudson/ClassicPluginStrategy.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/ClassicPluginStrategy.java
+++ b/core/src/main/java/hudson/ClassicPluginStrategy.java
@@ -70,6 +70,7 @@ import java.util.jar.JarFile;
import java.util.jar.Manifest;
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.jenkinsci.bytecode.Transformer;
public class ClassicPluginStrategy implements PluginStrategy {
@@ -696,8 +697,7 @@ public class ClassicPluginStrategy implements PluginStrategy {
}
/**
- * {@link AntClassLoader} with a few methods exposed and {@link Closeable} support.
- * Deprecated as of Java 7, retained only for Java 6.
+ * {@link AntClassLoader} with a few methods exposed, {@link Closeable} support, and {@link Transformer} support.
*/
private final class AntClassLoader2 extends AntClassLoader implements Closeable {
private final Vector pathComponents;
|
Updated Javadoc of AntClassLoader2.
|
diff --git a/hererocks.py b/hererocks.py
index <HASH>..<HASH> 100755
--- a/hererocks.py
+++ b/hererocks.py
@@ -1437,7 +1437,7 @@ class RioLua(Lua):
# from a git repo that does not have them, like the default one.
if len(built_luac_objs) > 0:
if using_cl():
- run("link", "/nologo", "/out:luac.exe", built_luac_objs, [lib_obj for lib_obj in lib_objs if lib_obj != "lopcodes.obj"])
+ run("link", "/nologo", "/out:luac.exe", built_luac_objs, lib_objs)
if os.path.exists("luac.exe.manifest"):
run("mt", "/nologo", "-manifest", "luac.exe.manifest", "-outputresource:luac.exe")
|
Revert incorrect fix for the Lua <I>-work2 VS problem
|
diff --git a/mkdocs_macros/plugin.py b/mkdocs_macros/plugin.py
index <HASH>..<HASH> 100644
--- a/mkdocs_macros/plugin.py
+++ b/mkdocs_macros/plugin.py
@@ -296,7 +296,7 @@ class MacrosPlugin(BasePlugin):
The python module must contain the following hook:
- declare_env(env):
+ define_env(env):
"Declare environment for jinja2 templates for markdown"
env.variables['a'] = 5
@@ -588,4 +588,4 @@ class MacrosPlugin(BasePlugin):
"""
# exeute the functions in the various modules
for func in self.post_build_functions:
- func(self)
\ No newline at end of file
+ func(self)
|
Fixed docstring. Function actually expects define_env, not declare_env.
|
diff --git a/packages/docs/build/markdown-it.js b/packages/docs/build/markdown-it.js
index <HASH>..<HASH> 100644
--- a/packages/docs/build/markdown-it.js
+++ b/packages/docs/build/markdown-it.js
@@ -11,12 +11,16 @@ const md = require('markdown-it')({
permalinkSymbol: '',
permalinkClass: '',
slugify: str => {
- const slug = String(str)
+ let slug = String(str)
.trim()
.toLowerCase()
- .replace(/[^a-z0-9 -]/g, '')
+ .replace(/[^a-z0-9 -]/g, c => c.charCodeAt(0).toString(16))
.replace(/\s+/g, '-')
+ if (slug.charAt(0).match(/[^a-z]/g)) {
+ slug = 'section-' + slug
+ }
+
return encodeURIComponent(slug)
},
})
|
fix(docs): fix anchors in non-latin translations (#<I>)
|
diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php
index <HASH>..<HASH> 100644
--- a/src/Controller/AppController.php
+++ b/src/Controller/AppController.php
@@ -5,6 +5,7 @@ namespace App\Controller;
use Cake\Controller\Controller;
use Cake\Core\Configure;
use Cake\Event\EventInterface;
+use Cake\Http\Cookie\Cookie;
use Cake\ORM\TableRegistry;
/**
@@ -78,8 +79,6 @@ class AppController extends Controller
{
parent::beforeRender($event);
$this->set('appAuth', $this->AppAuth);
- $loggedUser = $this->AppAuth->user();
- $this->set('loggedUser', $loggedUser['firstname'] . ' ' . $loggedUser['lastname']);
}
/**
@@ -99,6 +98,7 @@ class AppController extends Controller
if (empty($query->first())) {
$this->Flash->error(__('You_have_been_signed_out.'));
$this->AppAuth->logout();
+ $this->response = $this->response->withCookie((new Cookie('remember_me')));
$this->redirect(Configure::read('app.slugHelper')->getHome());
}
}
|
remove cookie if user is not validated
|
diff --git a/src/Google/IO/Curl.php b/src/Google/IO/Curl.php
index <HASH>..<HASH> 100644
--- a/src/Google/IO/Curl.php
+++ b/src/Google/IO/Curl.php
@@ -73,8 +73,11 @@ class Google_IO_Curl extends Google_IO_Abstract
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
- // 1 is CURL_SSLVERSION_TLSv1, which is not always defined in PHP.
- curl_setopt($curl, CURLOPT_SSLVERSION, 1);
+
+ // The SSL version will be determined by the underlying library
+ // @see https://github.com/google/google-api-php-client/pull/644
+ //curl_setopt($curl, CURLOPT_SSLVERSION, 1);
+
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
|
* Leave the unrelying curl library decide what SSL version to use. As discussed in case #<I>.
|
diff --git a/tests/scripts/config/karma.browserstack.conf.js b/tests/scripts/config/karma.browserstack.conf.js
index <HASH>..<HASH> 100644
--- a/tests/scripts/config/karma.browserstack.conf.js
+++ b/tests/scripts/config/karma.browserstack.conf.js
@@ -21,6 +21,12 @@ module.exports = function(config) {
os: 'OS X',
os_version: 'Sierra'
},
+ chrome_windows: {
+ base: 'BrowserStack',
+ browser: 'chrome',
+ os: 'Windows',
+ os_version: '10'
+ },
edge_windows: {
base: 'BrowserStack',
browser: 'Edge',
@@ -29,6 +35,6 @@ module.exports = function(config) {
}
},
- browsers: ['safari_mac', 'firefox_mac', 'chrome_mac', 'edge_windows']
+ browsers: ['safari_mac', 'firefox_mac', 'chrome_mac', 'chrome_windows', 'edge_windows']
}));
};
|
Add chrome for windows to browser test list
|
diff --git a/horizon/workflows/base.py b/horizon/workflows/base.py
index <HASH>..<HASH> 100644
--- a/horizon/workflows/base.py
+++ b/horizon/workflows/base.py
@@ -438,11 +438,7 @@ class Step(object):
def has_required_fields(self):
"""Returns True if action contains any required fields."""
- for key in self.contributes:
- field = self.action.fields.get(key, None)
- if (field and field.required):
- return True
- return False
+ return any(field.required for field in self.action.fields.values())
class WorkflowMetaclass(type):
|
Bad workflow-steps check: has_required_fields
Many of the tabs on the Instance Creation screen don't show a "*"
despite having require fields. This is due to faulty logic in determining
whether the workflow-step has require fields. (Previously, only keys from
the contributes list were checked.)
Change-Id: Id<I>da<I>c<I>f8d<I>d7fd<I>ead0c3bb<I>
Closes-Bug: <I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ setup(
long_description=__doc__,
install_requires=reqs,
packages=['parker'],
- scripts=['bin/parker-clean', 'bin/parker-crawl']
+ scripts=['bin/parker-clean', 'bin/parker-crawl'],
data_files=[
('/etc/parker', [
'etc/parker/client.json',
|
Minor syntax error in setup. Add that comma.
|
diff --git a/src/render.js b/src/render.js
index <HASH>..<HASH> 100644
--- a/src/render.js
+++ b/src/render.js
@@ -43,14 +43,21 @@ function render(element, screen) {
const id = ReactInstanceHandles.createReactRootID();
// Mounting the app
- const transaction = ReactUpdates.ReactReconcileTransaction.getPooled(),
- component = instantiateReactComponent(element);
+ const component = instantiateReactComponent(element);
// Injecting the screen
ReactBlessedIDOperations.setScreen(screen);
- transaction.perform(() => {
- component.mountComponent(id, transaction, {});
+ // The initial render is synchronous but any updates that happen during
+ // rendering, in componentWillMount or componentDidMount, will be batched
+ // according to the current batching strategy.
+ ReactUpdates.batchedUpdates(() => {
+ // Batched mount component
+ const transaction = ReactUpdates.ReactReconcileTransaction.getPooled();
+ transaction.perform(() => {
+ component.mountComponent(id, transaction, {});
+ });
+ ReactUpdates.ReactReconcileTransaction.release(transaction);
});
// Returning the screen so the user can attach listeners etc.
|
Fixed a nasty bug with initial render not being batched
|
diff --git a/compaction_filter.go b/compaction_filter.go
index <HASH>..<HASH> 100644
--- a/compaction_filter.go
+++ b/compaction_filter.go
@@ -26,8 +26,8 @@ type CompactionFilter interface {
}
// NewNativeCompactionFilter creates a CompactionFilter object.
-func NewNativeCompactionFilter(c *C.rocksdb_comparator_t) Comparator {
- return nativeComparator{c}
+func NewNativeCompactionFilter(c *C.rocksdb_compactionfilter_t) CompactionFilter {
+ return nativeCompactionFilter{c}
}
type nativeCompactionFilter struct {
|
return a CompactionFilter instead of a Comparator in NewNativeCompactionFilter
Fixes #<I>
|
diff --git a/lib/minimalist/test_helper.rb b/lib/minimalist/test_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/minimalist/test_helper.rb
+++ b/lib/minimalist/test_helper.rb
@@ -4,5 +4,9 @@ module Minimalist
def login_as(user)
@request.session[:user_id] = user ? users(user).id : nil
end
+
+ def current_user
+ @current_user ||= User.find(@request.session[:user_id])
+ end
end
end
\ No newline at end of file
|
add current_user method to test helper for helper tests
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ setup(
packages=['internetarchive'],
entry_points = dict(
console_scripts = [
- 'internetarchive = bin.archive:main',
+ 'internetarchive = bin.internetarchive_cli:main',
]
),
url='https://github.com/jjjake/ia-wrapper',
|
Renamed bin/archive.py to bin/internetarchive_cli.py, reflect these changes in setup.py
|
diff --git a/papermill/execute.py b/papermill/execute.py
index <HASH>..<HASH> 100644
--- a/papermill/execute.py
+++ b/papermill/execute.py
@@ -180,6 +180,7 @@ def parameterize_notebook(nb, parameters, report_mode=False):
after = nb.cells[param_cell_index + 1 :]
else:
# Inject to the top of the notebook
+ logger.warning("Input notebook does not contain a cell with tag 'parameters'")
before = []
after = nb.cells
|
Log a warning if the input notebook doesn't have
a parameters cell
|
diff --git a/ghost/admin/assets/lib/uploader.js b/ghost/admin/assets/lib/uploader.js
index <HASH>..<HASH> 100644
--- a/ghost/admin/assets/lib/uploader.js
+++ b/ghost/admin/assets/lib/uploader.js
@@ -80,7 +80,7 @@
data.submit();
});
},
- dropZone: $dropzone,
+ dropZone: settings.fileStorage ? $dropzone : null,
progressall: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
if (!settings.editor) {$progress.find('div.js-progress').css({"position": "absolute", "top": "40px"}); }
|
Fix for dropzone
no issue
- dropzone is disabled when fileStorage = false
|
diff --git a/js/directives/form.js b/js/directives/form.js
index <HASH>..<HASH> 100644
--- a/js/directives/form.js
+++ b/js/directives/form.js
@@ -597,6 +597,7 @@ formsAngular
unwatch();
var elementHtml = '';
var theRecord = scope[attrs.model || 'record']; // By default data comes from scope.record
+ theRecord = theRecord || {};
if ((attrs.subschema || attrs.model) && !attrs.forceform) {
elementHtml = '';
} else {
|
Cope with case where scope doesn't create record
|
diff --git a/lang/fr/hotpot.php b/lang/fr/hotpot.php
index <HASH>..<HASH> 100755
--- a/lang/fr/hotpot.php
+++ b/lang/fr/hotpot.php
@@ -36,7 +36,11 @@ $string['showxmlsource'] = 'Afficher la source XML';
$string['showxmltree'] = 'Afficher l\'arbre XML';
$string['showhtmlsource'] = 'Afficher la source HTML';
$string['enterafilename'] = 'Veuillez saisir un nom de fichier';
-
+
+ // show.php (javascript messages, so must be double escaped. i.e. "it's" ==> 'it\\\'s' OR "it\\'s")
+$string['copytoclipboard'] = 'Copier dans le presse-papier';
+$string['copiedtoclipboard'] = 'Le contenu de cette page a �t� copi� dans le presse-papier';
+
// lib.php
$string['noactivity'] = 'Aucune activit�';
$string['inprogress'] = 'En cours';
|
Javascript messages for Copy to Clipboard in show.php
|
diff --git a/go/libkb/skb.go b/go/libkb/skb.go
index <HASH>..<HASH> 100644
--- a/go/libkb/skb.go
+++ b/go/libkb/skb.go
@@ -263,9 +263,6 @@ func (s *SKB) unverifiedPassphraseStream(lctx LoginContext, passphrase string) (
}
func (s *SKB) UnlockSecretKey(lctx LoginContext, passphrase string, tsec Triplesec, pps *PassphraseStream, secretStorer SecretStorer) (key GenericKey, err error) {
- if key = s.decryptedSecret; key != nil {
- return
- }
var unlocked []byte
switch s.Priv.Encryption {
@@ -306,6 +303,12 @@ func (s *SKB) UnlockSecretKey(lctx LoginContext, passphrase string, tsec Triples
default:
err = BadKeyError{fmt.Sprintf("Can't unlock secret with protection type %d", int(s.Priv.Encryption))}
}
+
+ if key = s.decryptedSecret; key != nil {
+ // Key is already unlocked and unpacked, do not parse again.
+ return
+ }
+
if err == nil {
key, err = s.parseUnlocked(unlocked)
}
|
UnlockSecretKey: try to decrypt even if already unlocked
UnlockSecretKey had a side effect that it would accept wrong passphrase
(or equivalent Triplesec or PassphraseStream), return cached unlocked
key, and not signal in any way that passphrase was incorrect.
|
diff --git a/build/webpack.prod.js b/build/webpack.prod.js
index <HASH>..<HASH> 100644
--- a/build/webpack.prod.js
+++ b/build/webpack.prod.js
@@ -3,7 +3,6 @@ const webpack = require('webpack');
const VERSION = JSON.stringify(require('../package.json').version);
const root = require('./helpers').root;
-const CopyWebpackPlugin = require('copy-webpack-plugin');
const BANNER =
`ReDoc - OpenAPI/Swagger-generated API Reference Documentation
-------------------------------------------------------------
|
remove unused import from webpack config
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ setup(
name="monolithe",
packages=find_packages(exclude=["*tests*"]),
include_package_data=True,
- version="1.4.0",
+ version="1.4.1",
description="Monolithe is a sdk generator",
author="Nuage Networks",
author_email="opensource@nuagnetworks.net",
|
Updating version for latest csharp support for nuget
|
diff --git a/raiden/api/v1/encoding.py b/raiden/api/v1/encoding.py
index <HASH>..<HASH> 100644
--- a/raiden/api/v1/encoding.py
+++ b/raiden/api/v1/encoding.py
@@ -271,7 +271,7 @@ class ChannelStateSchema(BaseSchema):
@staticmethod
def get_balance(channel_state: NettingChannelState) -> int:
- return channel.get_distributable(channel_state.our_state, channel_state.partner_state)
+ return channel.get_balance(channel_state.our_state, channel_state.partner_state)
@staticmethod
def get_state(channel_state: NettingChannelState) -> str:
|
Fix calculation if balance field of ChannelStateSchema
|
diff --git a/system/Entity.php b/system/Entity.php
index <HASH>..<HASH> 100644
--- a/system/Entity.php
+++ b/system/Entity.php
@@ -588,7 +588,8 @@ class Entity
$tmp = ! is_null($value) ? ($asArray ? [] : new \stdClass) : null;
if (function_exists('json_decode'))
{
- if ((is_string($value) && (strpos($value, '[') === 0 || strpos($value, '{') === 0 || (strpos($value, '"') === 0 && strrpos($value, '"') === 0 ))) || is_numeric($value))
+ $strlen = is_strimg($value) ? strlen($value) : 0;
+ if (($strlen > 1 && is_string($value) && ((strpos($value, '[') === 0 && strrpos($value, ']') === $strlen - 1) || (strpos($value, '{') === 0 && strrpos($value, '}') === $strlen - 1) || (strpos($value, '"') === 0 && strrpos($value, '"') === $strlen - 1))) || is_numeric($value))
{
$tmp = json_decode($value, $asArray);
|
JSON format checking improved
#<I>
(...) And I thought the correct code was (strpos($value, '"') === 0 && strrpos($value, '"') === strlen($value) - 1 ) (...)
|
diff --git a/ceph_deploy/osd.py b/ceph_deploy/osd.py
index <HASH>..<HASH> 100644
--- a/ceph_deploy/osd.py
+++ b/ceph_deploy/osd.py
@@ -2,6 +2,7 @@ import argparse
import logging
import os
import sys
+from textwrap import dedent
from cStringIO import StringIO
@@ -410,6 +411,21 @@ def make(parser):
"""
Prepare a data disk on remote host.
"""
+ sub_command_help = dedent("""
+ Manage OSDs by preparing a data disk on remote host.
+
+ For paths, first prepare and then activate:
+
+ ceph-deploy osd prepare {osd-node-name}:/path/to/osd
+ ceph-deploy osd activate {osd-node-name}:/path/to/osd
+
+ For disks or journals the `create` command will do prepare and activate
+ for you.
+ """
+ )
+ parser.formatter_class = argparse.RawDescriptionHelpFormatter
+ parser.description = sub_command_help
+
parser.add_argument(
'subcommand',
metavar='SUBCOMMAND',
@@ -471,7 +487,7 @@ def make_disk(parser):
nargs='+',
metavar='HOST:DISK',
type=colon_separated,
- help='host and disk to zap',
+ help='host and disk (or path)',
)
parser.add_argument(
'--zap-disk',
|
improve osd help by adding example of activation by paths
|
diff --git a/js/typed.js b/js/typed.js
index <HASH>..<HASH> 100644
--- a/js/typed.js
+++ b/js/typed.js
@@ -324,7 +324,9 @@
var id = this.el.attr('id');
this.el.after('<span id="' + id + '"/>')
this.el.remove();
- this.cursor.remove();
+ if (typeof this.cursor !== 'undefined') {
+ this.cursor.remove();
+ }
// Send the callback
self.options.resetCallback();
}
|
Patch: if no cursor were present, the reset function would throw an error.
|
diff --git a/photos/photos.py b/photos/photos.py
index <HASH>..<HASH> 100644
--- a/photos/photos.py
+++ b/photos/photos.py
@@ -12,6 +12,7 @@ logger = logging.getLogger(__name__)
queue_resize = dict()
hrefs = None
+created_galleries = {}
def initialized(pelican):
p = os.path.expanduser('~/Pictures')
@@ -140,6 +141,10 @@ def process_gallery_photo(generator, article, gallery):
# strip whitespaces
gallery = gallery.strip()
+ if gallery in created_galleries:
+ article.photo_gallery.append((gallery, created_galleries[gallery]))
+ continue
+
dir_gallery = os.path.join(
os.path.expanduser(generator.settings['PHOTO_LIBRARY']),
gallery)
@@ -175,6 +180,7 @@ def process_gallery_photo(generator, article, gallery):
generator.settings['PHOTO_THUMB'])
article.photo_gallery.append((gallery, articleGallery))
+ created_galleries[gallery] = articleGallery
else:
logger.error('photos: Gallery does not exist: %s at %s', gallery, dir_gallery)
|
galleries should only be created once per language, and also be available only once in the output
|
diff --git a/retrofit/src/main/java/retrofit/RequestBuilder.java b/retrofit/src/main/java/retrofit/RequestBuilder.java
index <HASH>..<HASH> 100644
--- a/retrofit/src/main/java/retrofit/RequestBuilder.java
+++ b/retrofit/src/main/java/retrofit/RequestBuilder.java
@@ -35,6 +35,7 @@ final class RequestBuilder implements RequestInterceptor.RequestFacade {
private final RestMethodInfo.ParamUsage[] paramUsages;
private final String requestMethod;
private final boolean isSynchronous;
+ private final boolean isObservable;
private final FormUrlEncodedTypedOutput formBody;
private final MultipartTypedOutput multipartBody;
@@ -50,6 +51,7 @@ final class RequestBuilder implements RequestInterceptor.RequestFacade {
paramUsages = methodInfo.requestParamUsage;
requestMethod = methodInfo.requestMethod;
isSynchronous = methodInfo.isSynchronous;
+ isObservable = methodInfo.isObservable;
headers = new ArrayList<Header>();
if (methodInfo.headers != null) {
@@ -163,7 +165,7 @@ final class RequestBuilder implements RequestInterceptor.RequestFacade {
return;
}
int count = args.length;
- if (!isSynchronous) {
+ if (!isSynchronous && !isObservable) {
count -= 1;
}
for (int i = 0; i < count; i++) {
|
Last argument should be handled for observable methods
|
diff --git a/client/state/plugins/installed/status/actions.js b/client/state/plugins/installed/status/actions.js
index <HASH>..<HASH> 100644
--- a/client/state/plugins/installed/status/actions.js
+++ b/client/state/plugins/installed/status/actions.js
@@ -3,6 +3,8 @@
*/
import { PLUGIN_NOTICES_REMOVE } from 'calypso/state/action-types';
+import 'calypso/state/plugins/init';
+
export function removePluginStatuses( ...statuses ) {
return {
type: PLUGIN_NOTICES_REMOVE,
|
Plugins: Add missing state init in status actions (#<I>)
|
diff --git a/spec/controllers/socializer/activities/likes_controller_spec.rb b/spec/controllers/socializer/activities/likes_controller_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controllers/socializer/activities/likes_controller_spec.rb
+++ b/spec/controllers/socializer/activities/likes_controller_spec.rb
@@ -71,7 +71,7 @@ module Socializer
# Create a like
before { post :create, id: note_activity.guid, format: :js }
# Destroy the like
- before { post :destroy, id: note_activity.guid, format: :js }
+ before { delete :destroy, id: note_activity.guid, format: :js }
it 'does not like the note anymore' do
expect(user.likes?(note_activity.activity_object)).to be_falsey
|
change verb from post to delete for the destroy action
|
diff --git a/src/styles/auto-prefix.js b/src/styles/auto-prefix.js
index <HASH>..<HASH> 100644
--- a/src/styles/auto-prefix.js
+++ b/src/styles/auto-prefix.js
@@ -28,7 +28,7 @@ export default {
userAgent: userAgent,
});
- return prefixer.prefix;
+ return (style) => prefixer.prefix(style);
}
},
|
Fix this reference of prefix function
This was a critical regression caused by returning
the function without binding it to the prefixer
object. By capturing the prefixer inside a closure
we can safely call the prefix function.
This regression effectively disabled the prefixer
entirely.
|
diff --git a/lib/Editor.js b/lib/Editor.js
index <HASH>..<HASH> 100644
--- a/lib/Editor.js
+++ b/lib/Editor.js
@@ -118,7 +118,7 @@ Editor.getOpenParams = Promise.method(function (givenPath) {
}, Promise.resolve());
});
-Editor.parseCoordinate = function (n) { return parseInt(n, 10) - 1; };
+Editor.parseCoordinate = function (n) { return (parseInt(n, 10) - 1) || 0; };
Editor.exists = Promise.method(function (givenPath) {
return fs.openAsync(givenPath, 'r')
.then(function (fd) { return fs.closeAsync(fd); })
|
fix(open): bugfix for opening paths without coordinates
|
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
@@ -86,6 +86,13 @@ def shell(args):
env["PGPASSWORD"] = url.password or ""
env['PGDATABASE'] = url.database
execute_interactive(["psql"], env=env)
+ elif url.get_backend_name() == 'mssql':
+ env = os.environ.copy()
+ env['MSSQL_CLI_SERVER'] = url.host
+ env['MSSQL_CLI_DATABASE'] = url.database
+ env['MSSQL_CLI_USER'] = url.username
+ env['MSSQL_CLI_PASSWORD'] = url.password
+ execute_interactive(["mssql-cli"], env=env)
else:
raise AirflowException(f"Unknown driver: {url.drivername}")
|
Support mssql in airflow db shell (#<I>)
We currently do not support mssql shell in the DB. This would ease troubleshooting for mssql
|
diff --git a/classes/Boom/Finder.php b/classes/Boom/Finder.php
index <HASH>..<HASH> 100644
--- a/classes/Boom/Finder.php
+++ b/classes/Boom/Finder.php
@@ -43,6 +43,10 @@ abstract class Finder
public function find()
{
+ if ( ! $this->_filtersApplied) {
+ $this->_query = $this->_applyFilters($this->_query);
+ }
+
return $this->_query->find_all();
}
|
Bugfix: Finder::find() not applying filters
|
diff --git a/neuropythy/hcp/core.py b/neuropythy/hcp/core.py
index <HASH>..<HASH> 100644
--- a/neuropythy/hcp/core.py
+++ b/neuropythy/hcp/core.py
@@ -221,6 +221,9 @@ def subject(path, name=Ellipsis, meta_data=None, check_path=True, filter=None,
# in this case, because the hcp dataset actually calls down through here (with a pseudo-path),
# we don't need to run any of the filters that are run below (they have already been run)
if pimms.is_int(path):
+ if default_alignment != 'MSMAll':
+ warnings.warn('%s alignment requested, but MSMAll used for HCP release subject'
+ % (default_alignment,))
try: return data['hcp'].subjects[path]
except Exception: pass
# convert the path to a pseudo-dir; this may fail if the user is requesting a subject by name...
|
added warning is default_alignment gets quashed
|
diff --git a/src/element.js b/src/element.js
index <HASH>..<HASH> 100644
--- a/src/element.js
+++ b/src/element.js
@@ -1,4 +1,5 @@
-var $Node = require("./node");
+var _ = require("./utils"),
+ $Node = require("./node");
/**
* Used to represent a DOM element or collection
@@ -14,9 +15,7 @@ function $Element(element, /*INTERNAL*/collection) {
if (!(this instanceof $Element)) return new $Element(element, collection);
if (element && collection === true) {
- for (var i = 0, n = this.length = element.length; i < n; ++i) {
- this[i] = this[i - n] = $Element(element[i]);
- }
+ Array.prototype.push.apply(this, _.map(element, $Element));
} else {
$Node.call(this, element);
}
|
remove negative index support (performance is pure)
|
diff --git a/aiocache/serializers.py b/aiocache/serializers.py
index <HASH>..<HASH> 100644
--- a/aiocache/serializers.py
+++ b/aiocache/serializers.py
@@ -6,7 +6,7 @@ logger = logging.getLogger(__file__)
try:
import ujson as json
except ImportError:
- logger.warning("ujson module not found, usin json")
+ logger.warning("ujson module not found, using json")
import json
|
Fixed spelling error in serializers.py (#<I>)
|
diff --git a/multiqc/modules/cutadapt/cutadapt.py b/multiqc/modules/cutadapt/cutadapt.py
index <HASH>..<HASH> 100755
--- a/multiqc/modules/cutadapt/cutadapt.py
+++ b/multiqc/modules/cutadapt/cutadapt.py
@@ -101,7 +101,11 @@ class MultiqcModule(BaseMultiqcModule):
# Get sample name from end of command line params
if l.startswith('Command line parameters'):
s_name = l.split()[-1]
- s_name = self.clean_s_name(s_name, f['root'])
+ # Manage case where sample name is '-' (reading from stdin)
+ if s_name == '-':
+ s_name = f['s_name']
+ else:
+ s_name = self.clean_s_name(s_name, f['root'])
if s_name in self.cutadapt_data:
log.debug("Duplicate sample name found! Overwriting: {}".format(s_name))
self.cutadapt_data[s_name] = dict()
|
Fix cutadapt sample name handing when reading from stdin (fixes ewels/MultiQC#<I>)
|
diff --git a/packages/webpack/lib/utils/errors.js b/packages/webpack/lib/utils/errors.js
index <HASH>..<HASH> 100644
--- a/packages/webpack/lib/utils/errors.js
+++ b/packages/webpack/lib/utils/errors.js
@@ -2,10 +2,11 @@
const { EOL } = require('os');
-class BuildError {
+class BuildError extends Error {
constructor(stack) {
+ super();
this.name = this.constructor.name;
- this.stack = `${this.name} in ${stack.replace(/\033?\[[0-9]{1,2}m/g, '')}`;
+ this.stack = `${this.name}: ${stack.replace(/\033?\[[0-9]{1,2}m/g, '')}`;
this.message = this.stack.slice(0, this.stack.indexOf(EOL));
}
}
|
refactor(webpack): set up proper inheritance
|
diff --git a/edalize/edatool.py b/edalize/edatool.py
index <HASH>..<HASH> 100644
--- a/edalize/edatool.py
+++ b/edalize/edatool.py
@@ -305,7 +305,11 @@ class Edatool(object):
_s = "'{}' exited with an error code"
raise RuntimeError(_s.format(cmd))
- def _write_fileset_to_f_file(self, output_file, include_vlogparams = True):
+ def _filter_verilog_files(src_file):
+ ft = src_file.file_type
+ return ft.startswith("verilogSource") or ft.startswith("systemVerilogSource")
+
+ def _write_fileset_to_f_file(self, output_file, include_vlogparams = True, filter_func = _filter_verilog_files):
""" Write a file list (*.f) file
Returns a list of all files which were not added to the *.f file
@@ -328,7 +332,7 @@ class Edatool(object):
f.write("+incdir+" + id + '\n')
for src_file in src_files:
- if (src_file.file_type.startswith("verilogSource") or src_file.file_type.startswith("systemVerilogSource")):
+ if (filter_func is None or filter_func(src_file)):
f.write(src_file.name + '\n')
else:
unused_files.append(src_file)
|
Specify files in a filelist through a filter func
Add a feature to the _write_fileset_to_f_file() function: a filter_func
argument can be specified with a callback to include only some files in
the final file list.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.