diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/packages/embark/src/cmd/cmd_controller.js b/packages/embark/src/cmd/cmd_controller.js
index <HASH>..<HASH> 100644
--- a/packages/embark/src/cmd/cmd_controller.js
+++ b/packages/embark/src/cmd/cmd_controller.js
@@ -303,7 +303,6 @@ class EmbarkController {
if (!options.onlyCompile) {
engine.registerModulePackage('embark-ganache');
- engine.registerModuleGroup("pipeline");
engine.registerModuleGroup("namesystem");
engine.registerModulePackage('embark-deploy-tracker', { plugins: engine.plugins });
}
|
fix(@embark/cmd_controller): don't try to load pipeline module group in build cmd
We've made the `basic-pipeline` optional in <URL>
|
diff --git a/d1_common_python/src/d1_common/util.py b/d1_common_python/src/d1_common/util.py
index <HASH>..<HASH> 100644
--- a/d1_common_python/src/d1_common/util.py
+++ b/d1_common_python/src/d1_common/util.py
@@ -20,9 +20,35 @@
# limitations under the License.
import email.message
+from urllib import quote
+import const
def get_content_type(content_type):
m = email.message.Message()
m['Content-Type'] = content_type
return m.get_content_type()
+
+
+def encodePathElement(element):
+ '''Encodes a URL path element according to RFC3986.
+
+ :param element: The path element to encode for transmission in a URL.
+ :type element: Unicode
+ :return: URL encoded path element
+ :return type: UTF-8 encoded string.
+ '''
+ return quote(element.encode('utf-8'), \
+ safe=const.URL_PATHELEMENT_SAFE_CHARS)
+
+
+def encodeQueryElement(element):
+ '''Encodes a URL query element according to RFC3986.
+
+ :param element: The query element to encode for transmission in a URL.
+ :type element: Unicode
+ :return: URL encoded query element
+ :return type: UTF-8 encoded string.
+ '''
+ return quote(element.encode('utf-8'), \
+ safe=const.URL_QUERYELEMENT_SAFE_CHARS)
|
added encodePathElement and encodeQueryElement to d1_common.utils as these should be widely used for all encoding operations in the DataONE python code.
|
diff --git a/lib/sawyer/relation.rb b/lib/sawyer/relation.rb
index <HASH>..<HASH> 100644
--- a/lib/sawyer/relation.rb
+++ b/lib/sawyer/relation.rb
@@ -82,7 +82,12 @@ module Sawyer
#
# Returns a Relation.
def self.from_link(agent, name, options)
- new agent, name, options[:href], options[:method]
+ case options
+ when Hash
+ new agent, name, options[:href], options[:method]
+ when String
+ new agent, name, options
+ end
end
# A Relation represents an available next action for a resource.
diff --git a/test/relation_test.rb b/test/relation_test.rb
index <HASH>..<HASH> 100644
--- a/test/relation_test.rb
+++ b/test/relation_test.rb
@@ -28,6 +28,23 @@ module Sawyer
assert_kind_of URITemplate, rel.href_template
end
+ def test_builds_rels_from_hash
+ index = {
+ 'self' => '/users/1'
+ }
+
+ rels = Sawyer::Relation.from_links(nil, index)
+
+ assert_equal 1, rels.size
+ assert_equal [:self], rels.keys
+ assert rel = rels[:self]
+ assert_equal :self, rel.name
+ assert_equal '/users/1', rel.href
+ assert_equal :get, rel.method
+ assert_equal [:get], rel.available_methods.to_a
+ assert_kind_of URITemplate, rel.href_template
+ end
+
def test_builds_rels_from_hash_index
index = {
'self' => {:href => '/users/1'}
|
Handle simplified HAL link hashes
|
diff --git a/ginga/canvas/types/astro.py b/ginga/canvas/types/astro.py
index <HASH>..<HASH> 100644
--- a/ginga/canvas/types/astro.py
+++ b/ginga/canvas/types/astro.py
@@ -500,10 +500,18 @@ class Crosshair(OnePointMixin, CanvasObjectBase):
# NOTE: x, y are assumed to be in data coordinates
info = image.info_xy(self.x, self.y, viewer.get_settings())
if self.format == 'coords':
- text = "%s:%s, %s:%s" % (info.ra_lbl, info.ra_txt,
- info.dec_lbl, info.dec_txt)
+ if not 'ra_lbl' in info:
+ text = 'No WCS'
+ else:
+ text = "%s:%s, %s:%s" % (info.ra_lbl, info.ra_txt,
+ info.dec_lbl, info.dec_txt)
else:
- text = "V: %f" % (info.value)
+ if len(info.value) > 1:
+ values = ', '.join(["%d" % info.value[i]
+ for i in range(len(info.value))])
+ text = "V: [%s]" % (str(values))
+ else:
+ text = "V: %f" % (info.value)
else:
text = self.text
|
Fix for Crosshair canvas type for images with bad WCS
|
diff --git a/simulator/src/test/java/com/hazelcast/simulator/coordinator/CoordinatorCliTest.java b/simulator/src/test/java/com/hazelcast/simulator/coordinator/CoordinatorCliTest.java
index <HASH>..<HASH> 100644
--- a/simulator/src/test/java/com/hazelcast/simulator/coordinator/CoordinatorCliTest.java
+++ b/simulator/src/test/java/com/hazelcast/simulator/coordinator/CoordinatorCliTest.java
@@ -52,7 +52,7 @@ public class CoordinatorCliTest {
private static File propertiesFile;
private final List<String> args = new ArrayList<String>();
- private String testSuiteId;
+ private String sessionId;
@BeforeClass
public static void beforeClass() throws Exception {
@@ -68,8 +68,8 @@ public class CoordinatorCliTest {
@Before
public void before(){
args.add("--sessionId");
- testSuiteId = "CoordinatorCliTest-" + System.currentTimeMillis();
- args.add(testSuiteId);
+ sessionId = "CoordinatorCliTest-" + System.currentTimeMillis();
+ args.add(sessionId);
}
@AfterClass
@@ -83,7 +83,7 @@ public class CoordinatorCliTest {
@After
public void after() {
- deleteQuiet(new File(testSuiteId).getAbsoluteFile());
+ deleteQuiet(new File(sessionId).getAbsoluteFile());
}
@Test
|
Fixed forgotten renaming in CoordinatorCliTest.
|
diff --git a/lib/ddplugin/registry.rb b/lib/ddplugin/registry.rb
index <HASH>..<HASH> 100644
--- a/lib/ddplugin/registry.rb
+++ b/lib/ddplugin/registry.rb
@@ -64,7 +64,7 @@ module DDPlugin
# @return [Enumerable<Class>] A collection of registered classes
def find_all(root_class)
@identifiers_to_classes[root_class] ||= {}
- @identifiers_to_classes[root_class].values
+ @identifiers_to_classes[root_class].values.uniq
end
end
end
diff --git a/test/test_plugin.rb b/test/test_plugin.rb
index <HASH>..<HASH> 100644
--- a/test/test_plugin.rb
+++ b/test/test_plugin.rb
@@ -73,4 +73,17 @@ class DDPlugin::PluginTest < Minitest::Test
assert_equal [klass1, klass2], AllSample.all
end
+
+ def test_all_with_multiple_identifiers
+ parent_class = Class.new { extend DDPlugin::Plugin }
+
+ klass1 = Class.new(parent_class)
+ klass1.identifier :one_a
+ klass1.identifier :one_b
+
+ klass2 = Class.new(parent_class)
+ klass2.identifier :two
+
+ assert_equal [klass1, klass2], parent_class.all
+ end
end
|
Prevent #find_all from returning duplicates
|
diff --git a/go/libkb/api.go b/go/libkb/api.go
index <HASH>..<HASH> 100644
--- a/go/libkb/api.go
+++ b/go/libkb/api.go
@@ -13,6 +13,7 @@ import (
"net/http"
"net/url"
"runtime"
+ "runtime/debug"
"strings"
"sync"
"time"
@@ -231,6 +232,7 @@ func doRequestShared(api Requester, arg APIArg, req *http.Request, wantJSONRes b
}
ctx = WithLogTag(ctx, "API")
api.G().Log.CDebugf(ctx, "+ API %s %s", req.Method, req.URL)
+ debug.PrintStack()
var jsonBytes int
var status string
|
WIP print stack on api calls
|
diff --git a/py/selenium/webdriver/remote/webdriver.py b/py/selenium/webdriver/remote/webdriver.py
index <HASH>..<HASH> 100755
--- a/py/selenium/webdriver/remote/webdriver.py
+++ b/py/selenium/webdriver/remote/webdriver.py
@@ -455,7 +455,7 @@ class WebDriver(object):
:Usage:
driver.page_source
"""
- return self.execute(Command.GET_PAGE_SOURCE)['value']
+ return self.execute_script("return document.documentElement.outerHTML;")
def close(self):
"""
|
Switch getPageSource to use executeScript as discussed on W3C WebDriver mailing list
|
diff --git a/lib/god/simple_logger.rb b/lib/god/simple_logger.rb
index <HASH>..<HASH> 100644
--- a/lib/god/simple_logger.rb
+++ b/lib/god/simple_logger.rb
@@ -26,7 +26,7 @@ module God
time = Time.now.strftime(self.datetime_format)
label = SEV_LABEL[level]
- @io.print("#{label[0..0]} [#{time}] #{label.rjust(5)}: #{msg}\n")
+ @io.print(label[0..0], ' [', time, '] ', label.rjust(5), ': ', msg, "\n")
end
def fatal(msg)
@@ -50,4 +50,4 @@ module God
end
end
-end
\ No newline at end of file
+end
|
Changing the @io.print call in SimpleLogger to not concatenate
the formatted results before printing.
|
diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js
index <HASH>..<HASH> 100644
--- a/src/utils/Sorter.js
+++ b/src/utils/Sorter.js
@@ -905,7 +905,7 @@ module.exports = Backbone.View.extend({
* */
endMove(e) {
var created;
- const moved = [];
+ const moved = [null];
const docs = this.getDocuments();
const container = this.getContainerEl();
const onEndMove = this.onEndMove;
|
Make sure to always execute onEndMove in Sorter
|
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -452,7 +452,7 @@ module Puppet
a file (such as manifests or templates) has changed on disk. #{AS_DURATION}",
},
:environment_timeout => {
- :default => "3m",
+ :default => "0",
:type => :ttl,
:desc => "The time to live for a cached environment.
#{AS_DURATION}
|
(PUP-<I>) Set the default environment timeout to 0
This sets the default environment timeout to 0 as per decision
made in PUP-<I>.
|
diff --git a/chef/lib/chef/file_access_control.rb b/chef/lib/chef/file_access_control.rb
index <HASH>..<HASH> 100644
--- a/chef/lib/chef/file_access_control.rb
+++ b/chef/lib/chef/file_access_control.rb
@@ -25,7 +25,7 @@ class Chef
# the values specified by a value object, usually a Chef::Resource.
class FileAccessControl
UINT = (1 << 32)
- UID_MAX = (1 << 30)
+ UID_MAX = (1 << 31)
attr_reader :resource
|
Only UIDs above 2^<I> are considered negative, not those over 2^<I>
|
diff --git a/erizo_controller/erizoClient/src/webrtc-stacks/BaseStack.js b/erizo_controller/erizoClient/src/webrtc-stacks/BaseStack.js
index <HASH>..<HASH> 100644
--- a/erizo_controller/erizoClient/src/webrtc-stacks/BaseStack.js
+++ b/erizo_controller/erizoClient/src/webrtc-stacks/BaseStack.js
@@ -255,7 +255,7 @@ const BaseStack = (specInput) => {
return sdpInput;
};
- that.setSimulcastLayerBitrate = () => {
+ that.setSimulcastLayersBitrate = () => {
Logger.error('Simulcast not implemented');
};
|
Minor typo issue (#<I>)
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -73,7 +73,7 @@ setup(
"ukpostcodeparser>=1.1.1",
"mock",
"pytest>=3.8.0,<3.9",
- "more-itertools<6.0.0",
+ "more-itertools<6.0.0 ; python_version < '3.0'",
"random2==1.0.1",
"freezegun==0.3.11",
],
|
Pin more-itertools only for python < <I> (#<I>)
|
diff --git a/test/tools/javadoc/api/basic/APITest.java b/test/tools/javadoc/api/basic/APITest.java
index <HASH>..<HASH> 100644
--- a/test/tools/javadoc/api/basic/APITest.java
+++ b/test/tools/javadoc/api/basic/APITest.java
@@ -202,6 +202,12 @@ class APITest {
"pkg/package-frame.html",
"pkg/package-summary.html",
"pkg/package-tree.html",
+ "resources/background.gif",
+ "resources/tab.gif",
+ "resources/activetitlebar_end.gif",
+ "resources/activetitlebar.gif",
+ "resources/titlebar_end.gif",
+ "resources/titlebar.gif",
"script.js",
"stylesheet.css"
));
|
Sync with jdk9/dev: adapt expected javadoc files.
|
diff --git a/hyperv/neutron/security_groups_driver.py b/hyperv/neutron/security_groups_driver.py
index <HASH>..<HASH> 100644
--- a/hyperv/neutron/security_groups_driver.py
+++ b/hyperv/neutron/security_groups_driver.py
@@ -135,6 +135,10 @@ class HyperVSecurityGroupsDriverMixin(object):
self._security_ports.pop(port['device'], None)
self._sec_group_rules.pop(port['id'], None)
+ def security_group_updated(self, action_type, sec_group_ids,
+ device_id=None):
+ pass
+
@property
def ports(self):
return self._security_ports
|
Adds security_group_updated method in HyperVSecurityGroupDriver
With the changes introduced in securitygroups_rpc with the
below commit hyperv code breaks.
<URL>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -88,6 +88,7 @@ entry_points = {
"jenkins=fedmsg_meta_fedora_infrastructure.jenkins:JenkinsProcessor",
"github=fedmsg_meta_fedora_infrastructure.github:GithubProcessor",
"bugzilla=fedmsg_meta_fedora_infrastructure.bz:BugzillaProcessor",
+ "elections=fedmsg_meta_fedora_infrastructure.bz:ElectionsProcessor",
]
}
|
Adjust the setup.py file to include the elections processor
|
diff --git a/src/CornerstoneViewport/CornerstoneViewport.js b/src/CornerstoneViewport/CornerstoneViewport.js
index <HASH>..<HASH> 100644
--- a/src/CornerstoneViewport/CornerstoneViewport.js
+++ b/src/CornerstoneViewport/CornerstoneViewport.js
@@ -232,9 +232,9 @@ class CornerstoneViewport extends Component {
// Handle the case where the imageId isn't loaded correctly and the
// imagePromise returns undefined
// To test, uncomment the next line
- let imageId = 'AfileThatDoesntWork'; // For testing only!
+ //let imageId = 'AfileThatDoesntWork'; // For testing only!
- //const { imageId } = this.state;
+ const { imageId } = this.state;
let imagePromise;
try {
imagePromise = cornerstone.loadAndCacheImage(imageId);
|
fix(error-handling): Fix code commented while testing
|
diff --git a/lib/support/cli.js b/lib/support/cli.js
index <HASH>..<HASH> 100644
--- a/lib/support/cli.js
+++ b/lib/support/cli.js
@@ -11,7 +11,7 @@ const hasbin = require('hasbin');
const videoDefaults = require('../video/defaults');
const screenshotDefaults = require('../screenshot/defaults');
-const configPath = findUp.sync(['.myapprc', '.browsertime.json']);
+const configPath = findUp.sync(['.browsertime.json']);
const config = configPath ? JSON.parse(fs.readFileSync(configPath)) : {};
function validateInput(argv) {
|
removed faulty/copy/paste rc name
|
diff --git a/superset/migrations/versions/301362411006_add_execution_id_to_report_execution_.py b/superset/migrations/versions/301362411006_add_execution_id_to_report_execution_.py
index <HASH>..<HASH> 100644
--- a/superset/migrations/versions/301362411006_add_execution_id_to_report_execution_.py
+++ b/superset/migrations/versions/301362411006_add_execution_id_to_report_execution_.py
@@ -36,4 +36,4 @@ def upgrade():
def downgrade():
- op.drop_column("report_execution_log", "execution_id")
+ op.drop_column("report_execution_log", "uuid")
|
fix: migration downgrade references wrong column (#<I>)
|
diff --git a/api/src/opentrons/protocol_api/instrument_context.py b/api/src/opentrons/protocol_api/instrument_context.py
index <HASH>..<HASH> 100644
--- a/api/src/opentrons/protocol_api/instrument_context.py
+++ b/api/src/opentrons/protocol_api/instrument_context.py
@@ -234,8 +234,8 @@ class InstrumentContext(CommandPublisher):
aspirated into the pipette will be dispensed (this volume is accessible
through :py:attr:`current_volume`).
- :param volume: The volume of liquid to dispense, in microliters. If not
- specified, defaults to :py:attr:`current_volume`.
+ :param volume: The volume of liquid to dispense, in microliters. If 0
+ or unspecified, defaults to :py:attr:`current_volume`.
:type volume: int or float
:param location: Where to dispense into. If `location` is a
|
docs(api): Explain dispense(volume=0) dispenses the entire current volume (#<I>)
|
diff --git a/src/Maker/Migrator.php b/src/Maker/Migrator.php
index <HASH>..<HASH> 100644
--- a/src/Maker/Migrator.php
+++ b/src/Maker/Migrator.php
@@ -272,8 +272,12 @@ final class Migrator
$methodArguments[] = $fieldLabel;
}
+ // needed to turn 'foo' into '$foo' and 'foo.bar.baz' into '$fooBarBaz'
+ $fieldVariableName = u($fieldName)->replace('.', ' ')->camel()->collapseWhitespace()->toString();
+ $renamedFieldNames[$fieldName] = $fieldVariableName;
+
$code = $code->_use($fieldFqcn);
- $code = $code->_variableName($fieldName)->equals()->_staticCall($fieldClassName, 'new', $methodArguments);
+ $code = $code->_variableName($fieldVariableName)->equals()->_staticCall($fieldClassName, 'new', $methodArguments);
if ($this->isCustomTemplate($fieldConfig['template'])) {
$code = $code->_methodCall('setTemplatePath', [$fieldConfig['template']]);
|
Improved the migration command when using field names with dots
|
diff --git a/allennlp/common/util.py b/allennlp/common/util.py
index <HASH>..<HASH> 100644
--- a/allennlp/common/util.py
+++ b/allennlp/common/util.py
@@ -305,6 +305,11 @@ def import_submodules(package_name: str) -> None:
"""
importlib.invalidate_caches()
+ # For some reason, python doesn't always add this by default to your path, but you pretty much
+ # always want it when using `--include-package`. And if it's already there, adding it again at
+ # the end won't hurt anything.
+ sys.path.append('.')
+
# Import at top level
module = importlib.import_module(package_name)
path = getattr(module, '__path__', [])
|
Fix path issue for certain cases when using --include-package (#<I>)
|
diff --git a/src/Link.js b/src/Link.js
index <HASH>..<HASH> 100644
--- a/src/Link.js
+++ b/src/Link.js
@@ -2,7 +2,7 @@ import styled from 'styled-components'
const Link = styled.a`
text-decoration: none;
- ${props => props.theme ? `color: ${props.theme.colors.blue};` : null}
+ color: ${props => props.theme.colors.blue};
&:hover {
text-decoration: underline;
}
|
Refactor the default color of Link component
|
diff --git a/views/fcrtCurrencyRate/_search.php b/views/fcrtCurrencyRate/_search.php
index <HASH>..<HASH> 100644
--- a/views/fcrtCurrencyRate/_search.php
+++ b/views/fcrtCurrencyRate/_search.php
@@ -21,7 +21,7 @@
array(
'model'=>$model,
'attribute'=>'fcrt_date',
- 'language'=> substr(Yii::app()->language,0,strpos(Yii::app()->language,'_')),
+ 'language' => strstr(Yii::app()->language . '_', '_', true),
'htmlOptions'=>array('size'=>10),
'options'=>array(
'showButtonPanel'=>true,
|
Fixed bug in usage of datepicker
|
diff --git a/src/log/Target.php b/src/log/Target.php
index <HASH>..<HASH> 100644
--- a/src/log/Target.php
+++ b/src/log/Target.php
@@ -53,7 +53,7 @@ abstract class Target extends Object implements HandlerInterface
public function isHandling(array $message)
{
- return $this->getUnderlyingHandler()->isHandling($message);
+ return $this->enabled && $this->getUnderlyingHandler()->isHandling($message);
}
public function handle(array $message)
|
Fixed \blink\log\Target::$enabled is not working
|
diff --git a/lib/engines/icomoon-phantomjs.js b/lib/engines/icomoon-phantomjs.js
index <HASH>..<HASH> 100644
--- a/lib/engines/icomoon-phantomjs.js
+++ b/lib/engines/icomoon-phantomjs.js
@@ -28,6 +28,11 @@ IcoMoonPhantomJsEngine.prototype = {
namespace,
retObj = {};
+ // If there are no files, exit early
+ if (files.length === 0) {
+ return callback(new Error('No files were provided to `fontsmith`. Exiting early.'));
+ }
+
// In series
async.waterfall([
// Write paths to file
@@ -138,4 +143,4 @@ function createPalette(options, cb) {
module.exports = {
create: createPalette,
IcoMoonPhantomJsEngine: IcoMoonPhantomJsEngine
-};
\ No newline at end of file
+};
diff --git a/test/fontsmith_test_content.js b/test/fontsmith_test_content.js
index <HASH>..<HASH> 100644
--- a/test/fontsmith_test_content.js
+++ b/test/fontsmith_test_content.js
@@ -66,5 +66,8 @@ module.exports = {
assert(map.building_block >= 57344);
assert(map.moon >= 57344);
assert(map.eye >= 57344);
+ },
+ "notifies the user that there we no fonts found": function () {
+ assert(this.err.message.match('No files were provided'));
}
};
|
Added check for empty files and fixed up assertion
|
diff --git a/csv_ical/convert.py b/csv_ical/convert.py
index <HASH>..<HASH> 100644
--- a/csv_ical/convert.py
+++ b/csv_ical/convert.py
@@ -6,7 +6,7 @@ There are a bunch of configurable variables
import csv
import datetime
from platform import uname
-from typing import Dict, List # NOQA
+from typing import Dict, List
from uuid import uuid4
from icalendar import Calendar, Event
|
Remove NOQA lint ignore from type imports
|
diff --git a/datasette/utils/__init__.py b/datasette/utils/__init__.py
index <HASH>..<HASH> 100644
--- a/datasette/utils/__init__.py
+++ b/datasette/utils/__init__.py
@@ -911,6 +911,8 @@ def resolve_env_secrets(config, environ):
if isinstance(config, dict):
if list(config.keys()) == ["$env"]:
return environ.get(list(config.values())[0])
+ elif list(config.keys()) == ["$file"]:
+ return open(list(config.values())[0]).read()
else:
return {
key: resolve_env_secrets(value, environ)
|
Get "$file": "../path" mechanism working again, closes #<I>
|
diff --git a/internal/service/appflow/flow.go b/internal/service/appflow/flow.go
index <HASH>..<HASH> 100644
--- a/internal/service/appflow/flow.go
+++ b/internal/service/appflow/flow.go
@@ -667,6 +667,7 @@ func ResourceFlow() *schema.Resource {
"kms_arn": {
Type: schema.TypeString,
Optional: true,
+ Computed: true,
ValidateFunc: validation.StringMatch(regexp.MustCompile(`arn:aws:kms:.*:[0-9]+:.*`), "must be a valid ARN of a Key Management Services (KMS) key"),
},
"source_flow_config": {
@@ -1092,9 +1093,12 @@ func ResourceFlow() *schema.Resource {
ValidateFunc: validation.StringLenBetween(0, 256),
},
"source_fields": {
- Type: schema.TypeString,
- Optional: true,
- ValidateFunc: validation.StringLenBetween(0, 2048),
+ Type: schema.TypeList,
+ Required: true,
+ Elem: &schema.Schema{
+ Type: schema.TypeString,
+ ValidateFunc: validation.StringLenBetween(0, 2048),
+ },
},
"task_properties": {
Type: schema.TypeMap,
|
appflow: amend flow source_fields attribute
|
diff --git a/js/mexc.js b/js/mexc.js
index <HASH>..<HASH> 100644
--- a/js/mexc.js
+++ b/js/mexc.js
@@ -2203,7 +2203,7 @@ module.exports = class mexc extends Exchange {
const amount = this.safeString2 (order, 'quantity', 'vol');
const remaining = this.safeString (order, 'remain_quantity');
const filled = this.safeString2 (order, 'deal_quantity', 'dealVol');
- const cost = this.safeString2 (order, 'deal_amount', 'dealAvgPrice');
+ const cost = this.safeString2 (order, 'deal_amount');
const marketId = this.safeString (order, 'symbol');
const symbol = this.safeSymbol (marketId, market, '_');
const sideCheck = this.safeInteger (order, 'side');
@@ -2275,7 +2275,7 @@ module.exports = class mexc extends Exchange {
'side': side,
'price': price,
'stopPrice': this.safeString (order, 'triggerPrice'),
- 'average': undefined,
+ 'average': this.safeString (order, 'dealAvgPrice'),
'amount': amount,
'cost': cost,
'filled': filled,
|
mexc fetchOrder parser - dealAvgPrice used for average and no longer used for cost - fixes:#<I>
|
diff --git a/src/Zizaco/MongolidLaravel/MongolidServiceProvider.php b/src/Zizaco/MongolidLaravel/MongolidServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Zizaco/MongolidLaravel/MongolidServiceProvider.php
+++ b/src/Zizaco/MongolidLaravel/MongolidServiceProvider.php
@@ -2,7 +2,7 @@
namespace Zizaco\MongolidLaravel;
use Illuminate\Support\ServiceProvider;
-use Zizaco\Mongolid\MongoDbConnector;
+use Zizaco\Mongolid\Sequence;
use Zizaco\Mongolid\Model;
class MongolidServiceProvider extends ServiceProvider
@@ -54,7 +54,7 @@ class MongolidServiceProvider extends ServiceProvider
}
);
- $this->app['Sequence'] = $this->app->share(
+ $this->app['Zizaco\Mongolid\Sequence'] = $this->app->share(
function ($app) use ($connection) {
$database = $app['config']->get('database.mongodb.default.database', null);
return new Sequence($connection, $database);
|
Update Sequence Service container bind to FQN
|
diff --git a/src/org/zaproxy/zap/extension/ascan/ScriptsActiveScanner.java b/src/org/zaproxy/zap/extension/ascan/ScriptsActiveScanner.java
index <HASH>..<HASH> 100644
--- a/src/org/zaproxy/zap/extension/ascan/ScriptsActiveScanner.java
+++ b/src/org/zaproxy/zap/extension/ascan/ScriptsActiveScanner.java
@@ -64,7 +64,7 @@ public class ScriptsActiveScanner extends AbstractAppParamPlugin {
@Override
public int getCategory() {
- return Category.INJECTION;
+ return Category.MISC;
}
@Override
|
Issue <I> - Scripts Active Scanner should be category Misc not Injection
|
diff --git a/src/js/mediaelementplayer-simple.js b/src/js/mediaelementplayer-simple.js
index <HASH>..<HASH> 100644
--- a/src/js/mediaelementplayer-simple.js
+++ b/src/js/mediaelementplayer-simple.js
@@ -165,8 +165,8 @@ function MediaElementPlayerSimple(idOrObj, options) {
// Container
container.id = id + '_container';
- container.className = mejs.MediaElementPlayerSimpleDefaults.classPrefix + 'simple-container ' +
- mejs.MediaElementPlayerSimpleDefaults.classPrefix + 'simple-' + original.tagName.toLowerCase();
+ container.className = t.options.classPrefix + 'simple-container ' +
+ t.options.classPrefix + 'simple-' + original.tagName.toLowerCase();
container.style.width = originalWidth + 'px';
container.style.height = originalHeight + 'px';
@@ -224,7 +224,7 @@ MediaElementPlayerSimple.prototype = {
;
// CONTROLS
- controls.className = mejs.MediaElementPlayerSimpleDefaults.classPrefix + 'simple-controls';
+ controls.className = t.options.classPrefix + 'simple-controls';
controls.id = id + '_controls';
container.appendChild(controls);
|
Fixed issue with simple player when calling class prefix
|
diff --git a/lib/cc/analyzer/engine_output_filter.rb b/lib/cc/analyzer/engine_output_filter.rb
index <HASH>..<HASH> 100644
--- a/lib/cc/analyzer/engine_output_filter.rb
+++ b/lib/cc/analyzer/engine_output_filter.rb
@@ -8,6 +8,8 @@ module CC
end
def filter?(output)
+ return true unless output.present?
+
if (json = parse_as_json(output))
issue?(json) && ignore_issue?(json)
else
diff --git a/spec/cc/analyzer/engine_output_filter_spec.rb b/spec/cc/analyzer/engine_output_filter_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/cc/analyzer/engine_output_filter_spec.rb
+++ b/spec/cc/analyzer/engine_output_filter_spec.rb
@@ -2,6 +2,14 @@ require "spec_helper"
module CC::Analyzer
describe EngineOutputFilter do
+ it "filters empty output" do
+ filter = EngineOutputFilter.new
+
+ filter.filter?("").must_equal true
+ filter.filter?(" ").must_equal true
+ filter.filter?("\n").must_equal true
+ end
+
it "does not filter arbitrary output" do
filter = EngineOutputFilter.new
|
Add empty output to engine output filter rules
This prevents processing errors when the engine output is parsed into
another structure by adding empty output to the `EngineOutputFilter`
filter rules.
|
diff --git a/rqalpha/mod/rqalpha_mod_sys_simulation/simulation_event_source.py b/rqalpha/mod/rqalpha_mod_sys_simulation/simulation_event_source.py
index <HASH>..<HASH> 100644
--- a/rqalpha/mod/rqalpha_mod_sys_simulation/simulation_event_source.py
+++ b/rqalpha/mod/rqalpha_mod_sys_simulation/simulation_event_source.py
@@ -183,18 +183,20 @@ class SimulationEventSource(AbstractEventSource):
if last_tick is None:
last_tick = tick
+
yield Event(
EVENT.BEFORE_TRADING,
calendar_dt=calendar_dt - datetime.timedelta(minutes=30),
trading_dt=trading_dt - datetime.timedelta(minutes=30)
)
- yield Event(EVENT.TICK, calendar_dt=calendar_dt, trading_dt=trading_dt, tick=tick)
-
if self._universe_changed:
self._universe_changed = False
- last_dt = calendar_dt
break
+
+ last_dt = calendar_dt
+ yield Event(EVENT.TICK, calendar_dt=calendar_dt, trading_dt=trading_dt, tick=tick)
+
else:
break
|
fix bug occurs when universe changed in before_trading
|
diff --git a/examples/__tests__/SlickGoTo.test.js b/examples/__tests__/SlickGoTo.test.js
index <HASH>..<HASH> 100644
--- a/examples/__tests__/SlickGoTo.test.js
+++ b/examples/__tests__/SlickGoTo.test.js
@@ -18,7 +18,7 @@ describe('SlickGoTo', () => {
wrapper.find('input').simulate('change', { target: { value: 0 } })
expect(wrapper.find('.slick-slide.slick-active img').props().src).toEqual("/img/react-slick/abstract01.jpg");
});
- it('should go to 1st slide from another 3rd slide', () => {
+ it.skip('should go to 1st slide from another 3rd slide', () => { // skipped because two simultaneous clicks dont' work with css and speed>0
const wrapper = mount(<SlickGoTo waitForAnimate={false} />)
wrapper.find('input').simulate('change', { target: { value: 3 } })
wrapper.find('input').simulate('change', { target: { value: 0 } })
|
skipped failing test for SlickGoTo example due to changes in the example
|
diff --git a/lib/restify/adapter/typhoeus.rb b/lib/restify/adapter/typhoeus.rb
index <HASH>..<HASH> 100644
--- a/lib/restify/adapter/typhoeus.rb
+++ b/lib/restify/adapter/typhoeus.rb
@@ -27,6 +27,7 @@ module Restify
def call_native(request, writer)
@mutex.synchronize do
@hydra.queue convert(request, writer)
+ @hydra.dequeue_many
end
sync? ? @hydra.run : start
|
Push requests to running hydra if possible
This commit adds a @hydra.dequeue_many method call after queuing
a new requests. This directly pushes the newly queued request
to an existing curl multi handle if the max concurrency setting
allows. Previously the first queued requests immediately issues a
hydra run and subsequent queued requests were only added after the
first request finished.
|
diff --git a/lib/acts_as_graph_object/base.rb b/lib/acts_as_graph_object/base.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_graph_object/base.rb
+++ b/lib/acts_as_graph_object/base.rb
@@ -15,7 +15,7 @@ module ActsAsGraphObject
# requires routes.default_url_options[:host] to be set!
# TODO: add warning message if method is called?
def url
- url_helpers.send("#{self.class}_url".downcase, self)
+ url_helpers.send("#{self.class}_url".downcase, self) rescue nil
end
def type
|
Made @model.url method silently fail.
|
diff --git a/src/main/java/org/tenidwa/collections/utils/ContentMap.java b/src/main/java/org/tenidwa/collections/utils/ContentMap.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/tenidwa/collections/utils/ContentMap.java
+++ b/src/main/java/org/tenidwa/collections/utils/ContentMap.java
@@ -112,6 +112,7 @@ public final class ContentMap<K, C, V> implements Map<K, V> {
);
}
+ @Deprecated
@Override
public void putAll(Map<? extends K, ? extends V> map) {
throw new UnsupportedOperationException(
@@ -127,6 +128,7 @@ public final class ContentMap<K, C, V> implements Map<K, V> {
);
}
+ @Deprecated
@Override
public Set<K> keySet() {
throw new UnsupportedOperationException(
@@ -139,6 +141,7 @@ public final class ContentMap<K, C, V> implements Map<K, V> {
return this.map.values();
}
+ @Deprecated
@Override
public Set<Entry<K, V>> entrySet() {
throw new UnsupportedOperationException(
|
#<I> Add missing Deprecated annotations
|
diff --git a/src/Dashboard/Http/Controllers/SendMessage.php b/src/Dashboard/Http/Controllers/SendMessage.php
index <HASH>..<HASH> 100644
--- a/src/Dashboard/Http/Controllers/SendMessage.php
+++ b/src/Dashboard/Http/Controllers/SendMessage.php
@@ -45,6 +45,9 @@ class SendMessage
$request->appId
);
} else {
+ // Add 'appId' to the payload.
+ $payload['appId'] = $request->appId;
+
$channelManager->broadcastAcrossServers(
$request->appId, $request->channel, (object) $payload
);
|
Append appId to the request payload
|
diff --git a/toml/decoder.py b/toml/decoder.py
index <HASH>..<HASH> 100644
--- a/toml/decoder.py
+++ b/toml/decoder.py
@@ -144,7 +144,7 @@ def load(f, _dict=dict, decoder=None):
if decoder is None:
decoder = TomlDecoder(_dict)
d = decoder.get_empty_table()
- for l in f:
+ for l in f: # noqa: E741
if op.exists(l):
d.update(load(l, _dict, decoder))
else:
|
Ignored flake8 E<I> on line <I> of toml/decoder.py
|
diff --git a/src/test/java/com/turn/ttorrent/client/network/HandshakeReceiverTest.java b/src/test/java/com/turn/ttorrent/client/network/HandshakeReceiverTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/turn/ttorrent/client/network/HandshakeReceiverTest.java
+++ b/src/test/java/com/turn/ttorrent/client/network/HandshakeReceiverTest.java
@@ -30,7 +30,7 @@ public class HandshakeReceiverTest {
if (Logger.getRootLogger().getAllAppenders().hasMoreElements())
return;
BasicConfigurator.configure(new ConsoleAppender(new PatternLayout("[%d{MMdd HH:mm:ss,SSS} %t] %6p - %20.20c - %m %n")));
- Logger.getRootLogger().setLevel(Level.ALL);
+ Logger.getRootLogger().setLevel(Level.INFO);
}
@BeforeMethod
|
fixed print all logs in handshakereceiver test
|
diff --git a/windpowerlib/wind_farm.py b/windpowerlib/wind_farm.py
index <HASH>..<HASH> 100644
--- a/windpowerlib/wind_farm.py
+++ b/windpowerlib/wind_farm.py
@@ -178,6 +178,15 @@ class WindFarm(object):
self
"""
+ # Check if all wind turbines have a power curve as attribute
+ for item in self.wind_turbine_fleet:
+ if item['wind_turbine'].power_curve is None:
+ raise ValueError("For an aggregated wind farm power curve " +
+ "each wind turbine needs a power curve " +
+ "but `power_curve` of wind turbine " +
+ "{} is {}.".format(
+ item['wind_turbine'].object_name,
+ item['wind_turbine'].power_curve))
# Initialize data frame for power curve values
df = pd.DataFrame()
for turbine_type_dict in self.wind_turbine_fleet:
|
Check if all wind turbines of wind farm have a power curve as attribute
|
diff --git a/presto-main/src/main/java/com/facebook/presto/execution/TaskInfo.java b/presto-main/src/main/java/com/facebook/presto/execution/TaskInfo.java
index <HASH>..<HASH> 100644
--- a/presto-main/src/main/java/com/facebook/presto/execution/TaskInfo.java
+++ b/presto-main/src/main/java/com/facebook/presto/execution/TaskInfo.java
@@ -22,6 +22,8 @@ import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
import org.joda.time.DateTime;
import javax.annotation.concurrent.Immutable;
@@ -92,7 +94,14 @@ public class TaskInfo
this.failures = ImmutableList.of();
}
- this.outputs = ImmutableMap.copyOf(checkNotNull(outputs, "outputs is null"));
+ checkNotNull(outputs, "outputs is null");
+ this.outputs = ImmutableMap.copyOf(Maps.transformValues(outputs, new Function<Set<?>, Set<?>>() {
+ @Override
+ public Set<?> apply(Set<?> input)
+ {
+ return ImmutableSet.copyOf(input);
+ }
+ }));
}
@JsonProperty
|
Deep copy TaskInfo outputs in constructor to avoid ConcurrentModificationException
|
diff --git a/lib/active_admin/table_builder.rb b/lib/active_admin/table_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin/table_builder.rb
+++ b/lib/active_admin/table_builder.rb
@@ -43,7 +43,7 @@ module ActiveAdmin
links += " | "
links += link_to "Edit", edit_resource_path(resource)
links += " | "
- links += link_to "Delete", resource_path(resource), :method => :destroy, :confirm => "Are you sure you want to delete this?"
+ links += link_to "Delete", resource_path(resource), :method => :delete, :confirm => "Are you sure you want to delete this?"
links
end
end
|
Fixed delete link to method type :delete
|
diff --git a/core/client/app/components/gh-content-view-container.js b/core/client/app/components/gh-content-view-container.js
index <HASH>..<HASH> 100644
--- a/core/client/app/components/gh-content-view-container.js
+++ b/core/client/app/components/gh-content-view-container.js
@@ -8,6 +8,8 @@ export default Ember.Component.extend({
resizeService: Ember.inject.service(),
+ _resizeListener: null,
+
calculatePreviewIsHidden: function () {
if (this.$('.content-preview').length) {
this.set('previewIsHidden', !this.$('.content-preview').is(':visible'));
@@ -16,8 +18,12 @@ export default Ember.Component.extend({
didInsertElement: function () {
this._super(...arguments);
+ this._resizeListener = Ember.run.bind(this, this.calculatePreviewIsHidden);
+ this.get('resizeService').on('debouncedDidResize', this._resizeListener);
this.calculatePreviewIsHidden();
- this.get('resizeService').on('debouncedDidResize',
- Ember.run.bind(this, this.calculatePreviewIsHidden));
+ },
+
+ willDestroy: function () {
+ this.get('resizeService').off('debouncedDidResize', this._resizeListener);
}
});
|
Fix teardown of resize handler in content management screen
refs #<I> ([comment](<URL>))
- cleans up resize handler on willDestroy hook of gh-content-view-container
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -182,7 +182,7 @@ module.exports = function( grunt ) {
grunt.registerTask( "test", [ "test_fast", "promises_aplus_tests" ] );
// Short list as a high frequency watch task
- grunt.registerTask( "dev", [ "build:*:*", "uglify", "remove_map_comment", "dist:*" ] );
+ grunt.registerTask( "dev", [ "build:*:*", "lint", "uglify", "remove_map_comment", "dist:*" ] );
grunt.registerTask( "default", [ "dev", "test_fast", "compare_size" ] );
};
diff --git a/src/data/var/acceptData.js b/src/data/var/acceptData.js
index <HASH>..<HASH> 100644
--- a/src/data/var/acceptData.js
+++ b/src/data/var/acceptData.js
@@ -4,6 +4,7 @@ define( function() {
* Determines whether an object can have data
*/
return function( owner ) {
+
// Accepts only:
// - Node
// - Node.ELEMENT_NODE
|
Build: put back "lint" command to the "dev" list
Also fix lint error in `data` module.
It seems this command was removed from the list during merge
|
diff --git a/SolrClient/transport/transportbase.py b/SolrClient/transport/transportbase.py
index <HASH>..<HASH> 100755
--- a/SolrClient/transport/transportbase.py
+++ b/SolrClient/transport/transportbase.py
@@ -28,7 +28,7 @@ class TransportBase(object):
if len(self._action_log) >= self._action_log_count:
self._action_log.pop(0)
- def _retry(self, function):
+ def _retry(function):
'''
Internal mechanism to try to send data to multiple Solr Hosts if
the query fails on the first one.
|
fixed bad commit on _retry
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -132,10 +132,11 @@ exports.compute = function(buildConfig) {
throw new Error('Must supply file to compute build from:');
}
var mockRequestedURL = 'http://localhost:8080/' + requestedPath;
+ var noop = function() {};
exports.provide(buildConfig)(
- {url: mockRequestedURL}, // req
- {end: onComputed}, // res
- function(err) { // next()
+ {url: mockRequestedURL, method: 'GET'}, // req
+ {end: onComputed, setHeader: noop}, // res
+ function(err) { // next()
console.log('ERROR computing build:', err);
}
);
|
bug-fix: Error computing build: undefined
|
diff --git a/src/main/java/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java b/src/main/java/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java
index <HASH>..<HASH> 100755
--- a/src/main/java/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java
+++ b/src/main/java/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java
@@ -177,9 +177,11 @@ public class MethodReturnsConstant extends BytecodeScanningDetector {
}
} else if ((seen == GOTO) || (seen == GOTO_W)) {
if (stack.getStackDepth() > 0) {
- // Trinaries confuse us too much, if the code has a ternary well - oh well
+ // Ternaries confuse us too much, if the code has a ternary well - oh well
throw new StopOpcodeParsingException();
}
+ } else if (seen == ATHROW) {
+ throw new StopOpcodeParsingException();
} else if (seen == INVOKEVIRTUAL) {
String clsName = getClassConstantOperand();
if (SignatureUtils.isPlainStringConvertableClass(clsName)) {
|
don't report MRC when a 1 return value and a throw exists. kind of silly, but ok.
|
diff --git a/tests/test_looter.py b/tests/test_looter.py
index <HASH>..<HASH> 100644
--- a/tests/test_looter.py
+++ b/tests/test_looter.py
@@ -52,9 +52,10 @@ class TestProfileDownload(_TempTestCase):
# We have to use GreaterEqual since multi media posts
# are counted as 1 but will download more than one
# picture / video
+ media_count = looter.metadata['edge_owner_to_timeline_media']['count']
self.assertGreaterEqual(
len(os.listdir(self.tmpdir)),
- min(cls.MEDIA_COUNT, int(looter.metadata['media']['count']))
+ min(cls.MEDIA_COUNT, media_count)
)
self.assertEqual(profile, looter.metadata['username'])
|
Fix media count not being extracted well within profile tests
|
diff --git a/slacker/__init__.py b/slacker/__init__.py
index <HASH>..<HASH> 100644
--- a/slacker/__init__.py
+++ b/slacker/__init__.py
@@ -397,6 +397,8 @@ class Files(BaseAPI):
class Stars(BaseAPI):
def add(self, file_=None, file_comment=None, channel=None, timestamp=None):
+ assert file_ or file_comment or channel
+
return self.post('stars.add',
data={
'file': file_,
@@ -410,6 +412,8 @@ class Stars(BaseAPI):
params={'user': user, 'count': count, 'page': page})
def remove(self, file_=None, file_comment=None, channel=None, timestamp=None):
+ assert file_ or file_comment or channel
+
return self.post('stars.remove',
data={
'file': file_,
|
One of file, file_comment, channel, or the combination of channel and timestamp must be specified
|
diff --git a/dist/ember_components/ember.aljs-modal.js b/dist/ember_components/ember.aljs-modal.js
index <HASH>..<HASH> 100644
--- a/dist/ember_components/ember.aljs-modal.js
+++ b/dist/ember_components/ember.aljs-modal.js
@@ -109,12 +109,18 @@ _AljsApp.AljsModalComponent = Ember.Component.extend(Ember.Evented, {
$('#' + this.get('modalId')).trigger('shown.aljs.modal');
}, 400);
},
- closeModal: function() {
- $('#' + this.get('modalId')).trigger('dismiss.aljs.modal');
+ closeModal: function(e) {
+ var self = this;
- this.set('isModalOpen', false);
+ if (e) {
+ self = e.data;
+ }
+
+ $('#' + self.get('modalId')).trigger('dismiss.aljs.modal');
+
+ self.set('isModalOpen', false);
- Ember.run.later(this, function() {
+ Ember.run.later(self, function() {
$('#' + this.get('modalId')).trigger('dismissed.aljs.modal');
}, 200);
}
|
Ember Modals - fixed triggering close modal by jQuery
|
diff --git a/sortedm2m/static/sortedm2m/widget.js b/sortedm2m/static/sortedm2m/widget.js
index <HASH>..<HASH> 100644
--- a/sortedm2m/static/sortedm2m/widget.js
+++ b/sortedm2m/static/sortedm2m/widget.js
@@ -108,6 +108,13 @@ if (typeof jQuery === 'undefined') {
return text;
}
+ function windowname_to_id(text) {
+ // django32 has removed windowname_to_id function.
+ text = text.replace(/__dot__/g, '.');
+ text = text.replace(/__dash__/g, '-');
+ return text;
+ }
+
if (window.showAddAnotherPopup) {
var django_dismissAddAnotherPopup = window[dismissPopupFnName];
window[dismissPopupFnName] = function (win, newId, newRepr) {
|
Fixing django<I> pop-up closing issue. (#<I>)
* fix: django<I> has removed `windowname_to_id` function but it is breaking sorted-m2m usage on pop-up.
|
diff --git a/lib/rest-core/promise/thread_pool.rb b/lib/rest-core/promise/thread_pool.rb
index <HASH>..<HASH> 100644
--- a/lib/rest-core/promise/thread_pool.rb
+++ b/lib/rest-core/promise/thread_pool.rb
@@ -1,4 +1,7 @@
+# reference implementation: puma
+# https://github.com/puma/puma/blob/v2.7.1/lib/puma/thread_pool.rb
+
require 'thread'
class RestCore::Promise::ThreadPool
|
puma's thread pool is the reference implementation
particularly:
<URL>
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -145,7 +145,7 @@ gulp.task( 'clean-dist', function() {
return del( ['dist/**/*', '!dist'] );
});
-gulp.task( 'revision', function(done) {
+function revision( done ) {
// by default, gulp would pick `assets/css` as the base,
// so we need to set it explicitly:
gulp.src([paths.css + '/theme.min.css', paths.js + '/theme.min.js'], {base: './'})
@@ -155,7 +155,9 @@ gulp.task( 'revision', function(done) {
.pipe(revDel({dest: './'}))
.pipe(gulp.dest('./')); // write manifest to build dir
done();
-});
+};
+
+exports.revision = revision;
// Run
// gulp dist
|
ReferenceError: revision is not defined
|
diff --git a/src/Flow/Compiler.php b/src/Flow/Compiler.php
index <HASH>..<HASH> 100644
--- a/src/Flow/Compiler.php
+++ b/src/Flow/Compiler.php
@@ -976,7 +976,7 @@ class FilterExpression extends Expression
if ($this->filters[$i] === 'raw') continue;
list($name, $arguments) = $this->filters[$i];
if ($name == $raw) continue;
- $compiler->raw('$this->helper(\'' . $name . '\',');
+ $compiler->raw('$this->helper(\'' . $name . '\', ');
$postponed[] = $arguments;
}
|
Add missing whitespace in compiled helper invocation
|
diff --git a/php/utils-wp.php b/php/utils-wp.php
index <HASH>..<HASH> 100644
--- a/php/utils-wp.php
+++ b/php/utils-wp.php
@@ -224,7 +224,14 @@ function wp_get_cache_type() {
}
/**
- * Clear all of the caches for memory management
+ * Clear WordPress internal object caches.
+ *
+ * In long-running scripts, the internal caches on `$wp_object_cache` and `$wpdb`
+ * can grow to consume gigabytes of memory. Periodically calling this utility
+ * can help with memory management.
+ *
+ * @access public
+ * @category System
*/
function wp_clear_object_cache() {
global $wpdb, $wp_object_cache;
|
Mark `WP_CLI\Utils\wp_clear_object_cache()` as public
It's a helpful utility for memory management in long-running scripts.
|
diff --git a/src/Configuration/GrumPHP.php b/src/Configuration/GrumPHP.php
index <HASH>..<HASH> 100644
--- a/src/Configuration/GrumPHP.php
+++ b/src/Configuration/GrumPHP.php
@@ -46,10 +46,7 @@ class GrumPHP
return $this->container->getParameter('hooks_preset');
}
- /**
- * @return array
- */
- public function getGitHookVariables()
+ public function getGitHookVariables(): array
{
return $this->container->getParameter('git_hook_variables');
}
|
Removed php doc block and added return type array
|
diff --git a/lib/spitball.rb b/lib/spitball.rb
index <HASH>..<HASH> 100644
--- a/lib/spitball.rb
+++ b/lib/spitball.rb
@@ -48,17 +48,18 @@ class Spitball
end
def create_bundle
- File.open(gemfile_path, 'w') {|f| f.write gemfile }
FileUtils.mkdir_p bundle_path
- if system "bundle install #{bundle_path} --gemfile=#{gemfile_path} --disable-shared-gems #{without_clause} > /dev/null"
+ File.open(gemfile_path, 'w') {|f| f.write gemfile }
+
+ if system "cd #{bundle_path} && bundle install #{bundle_path} --disable-shared-gems #{without_clause} > /dev/null"
FileUtils.rm_rf File.join(bundle_path, "cache")
system "tar czf #{tarball_path}.#{Process.pid} -C #{bundle_path} ."
system "mv #{tarball_path}.#{Process.pid} #{tarball_path}"
else
- FileUtils.rm_rf gemfile_path
+ #FileUtils.rm_rf gemfile_path
raise BundleCreationFailure, "Bundle build failure."
end
@@ -79,7 +80,7 @@ class Spitball
end
def gemfile_path
- Repo.path(digest, 'gemfile')
+ File.expand_path('Gemfile', bundle_path)
end
def tarball_path
|
jank backward compat with bundler <I>
|
diff --git a/daemon/daemon.go b/daemon/daemon.go
index <HASH>..<HASH> 100644
--- a/daemon/daemon.go
+++ b/daemon/daemon.go
@@ -376,6 +376,13 @@ func (daemon *Daemon) restore() error {
// This must be run after any containers with a restart policy so that containerized plugins
// can have a chance to be running before we try to initialize them.
for _, c := range containers {
+ // if the container has restart policy, do not
+ // prepare the mountpoints since it has been done on restarting.
+ // This is to speed up the daemon start when a restart container
+ // has a volume and the volume dirver is not available.
+ if _, ok := restartContainers[c]; ok {
+ continue
+ }
group.Add(1)
go func(c *container.Container) {
defer group.Done()
|
daemon: don't prepare mountpoint for restart container
The restart container has already prepared the mountpoint, there is
no need to do that again. This can speed up the daemon start if
the restart container has a volume and the volume driver is not
available.
|
diff --git a/plugin/com.blackberry.ui.input/src/blackberry10/index.js b/plugin/com.blackberry.ui.input/src/blackberry10/index.js
index <HASH>..<HASH> 100644
--- a/plugin/com.blackberry.ui.input/src/blackberry10/index.js
+++ b/plugin/com.blackberry.ui.input/src/blackberry10/index.js
@@ -37,8 +37,8 @@
*/
function getScreenHeight() { return screen.height; }
function getScreenWidth() { return screen.width; }
-function getKeyboardOffset() { return 72; }
-function getKeyboardHeight() { return 480; }
+function getKeyboardOffset() { return ('keyboardOffset' in wp.device && wp.device.keyboardOffset || "0") - 0; }
+function getKeyboardHeight() { return ('keyboardHeight' in wp.device && wp.device.keyboardHeight || "0") - 0; }
var _screenHeight = getScreenHeight(),
_screenWidth = getScreenWidth(),
|
Get keyboardOffset/keyboardHeight from webplatform
|
diff --git a/tests/image_manipulation_test.py b/tests/image_manipulation_test.py
index <HASH>..<HASH> 100644
--- a/tests/image_manipulation_test.py
+++ b/tests/image_manipulation_test.py
@@ -38,7 +38,9 @@ class ImageManipulationTest(unittest.TestCase):
print(data_out.shape)
# print data
# print data_out
- self.assertItemsEqual(expected_shape, data_out.shape)
+ self.assertEquals(expected_shape[0], data_out.shape[0])
+ self.assertEquals(expected_shape[1], data_out.shape[1])
+ self.assertEquals(expected_shape[2], data_out.shape[2])
if __name__ == "__main__":
unittest.main()
|
removed assertEqualsItems
|
diff --git a/src/SOAPEssence.php b/src/SOAPEssence.php
index <HASH>..<HASH> 100644
--- a/src/SOAPEssence.php
+++ b/src/SOAPEssence.php
@@ -144,6 +144,9 @@ class SOAPEssence extends XMLEssence
return parent::extract($this->lastResponse, $config, $data);
} catch (SoapFault $e) {
+ $this->lastRequest = $this->client->__getLastRequest();
+ $this->lastResponse = $this->client->__getLastResponse();
+
throw new EssenceException($e->getMessage(), $e->getCode(), $e);
}
}
|
feat(*): keep last request/response before throwing an exception
|
diff --git a/tests/packaging/release.py b/tests/packaging/release.py
index <HASH>..<HASH> 100644
--- a/tests/packaging/release.py
+++ b/tests/packaging/release.py
@@ -91,11 +91,23 @@ class release_and_issues_(Spec):
class feature:
def no_unreleased(self):
# release is None, issues is empty list
- skip()
+ release, issues = release_and_issues(
+ changelog={'1.0.1': [1], 'unreleased_1_feature': []},
+ branch='master',
+ release_type=Release.FEATURE,
+ )
+ eq_(release, None)
+ eq_(issues, [])
def has_unreleased(self):
# release is still None, issues is nonempty list
- skip()
+ release, issues = release_and_issues(
+ changelog={'1.0.1': [1], 'unreleased_1_feature': [2, 3]},
+ branch='master',
+ release_type=Release.FEATURE,
+ )
+ eq_(release, None)
+ eq_(issues, [2, 3])
def undefined_always_returns_None_and_empty_list(self):
skip()
|
Fill out some skel tests re: release_and_issues
|
diff --git a/lib/Doctrine/Export/Firebird.php b/lib/Doctrine/Export/Firebird.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/Export/Firebird.php
+++ b/lib/Doctrine/Export/Firebird.php
@@ -483,6 +483,17 @@ class Doctrine_Export_Firebird extends Doctrine_Export
return $result;
}
/**
+ * A method to return the required SQL string that fits between CREATE ... TABLE
+ * to create the table as a temporary table.
+ *
+ * @return string The string required to be placed between "CREATE" and "TABLE"
+ * to generate a temporary table, if possible.
+ */
+ public function getTemporaryTableQuery()
+ {
+ return 'GLOBAL TEMPORARY';
+ }
+ /**
* create sequence
*
* @param string $seqName name of the sequence to be created
|
ported getTemporaryTableQuery from MDB2
|
diff --git a/src/main/java/uk/co/real_logic/agrona/collections/IntObjConsumer.java b/src/main/java/uk/co/real_logic/agrona/collections/IntObjConsumer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/uk/co/real_logic/agrona/collections/IntObjConsumer.java
+++ b/src/main/java/uk/co/real_logic/agrona/collections/IntObjConsumer.java
@@ -16,11 +16,10 @@
package uk.co.real_logic.agrona.collections;
/**
- * This is an (int,Object) primitive specialisation of a BiConsumer.
+ * This is an (int, Object) primitive specialisation of a BiConsumer.
*/
@FunctionalInterface
-public interface
-IntObjConsumer<T>
+public interface IntObjConsumer<T>
{
/**
* @param i for the tuple.
|
[Java] Minor style changes.
|
diff --git a/disque/connection.go b/disque/connection.go
index <HASH>..<HASH> 100644
--- a/disque/connection.go
+++ b/disque/connection.go
@@ -111,8 +111,8 @@ func (d *Disque) Ack(jobId string) (err error) {
}
// Delete a job that was enqueued on the cluster
-func (d *Disque) Delete(jobID string) (err error) {
- _, err = d.call("DELJOB", redis.Args{}.Add(jobID))
+func (d *Disque) Delete(jobId string) (err error) {
+ _, err = d.call("DELJOB", redis.Args{}.Add(jobId))
return
}
|
Rename jobId variable for consistency
|
diff --git a/archive-commons/src/main/java/org/archive/url/WaybackURLKeyMaker.java b/archive-commons/src/main/java/org/archive/url/WaybackURLKeyMaker.java
index <HASH>..<HASH> 100644
--- a/archive-commons/src/main/java/org/archive/url/WaybackURLKeyMaker.java
+++ b/archive-commons/src/main/java/org/archive/url/WaybackURLKeyMaker.java
@@ -6,6 +6,14 @@ public class WaybackURLKeyMaker implements URLKeyMaker {
// URLCanonicalizer canonicalizer = new NonMassagingIAURLCanonicalizer();
URLCanonicalizer canonicalizer = new DefaultIAURLCanonicalizer();
+ public URLCanonicalizer getCanonicalizer() {
+ return canonicalizer;
+ }
+
+ public void setCanonicalizer(URLCanonicalizer canonicalizer) {
+ this.canonicalizer = canonicalizer;
+ }
+
private boolean surtMode = true;
public WaybackURLKeyMaker()
|
archive-commons: make canonicalizer in WaybackURLKeyMaker settable
|
diff --git a/lib/pronounce.rb b/lib/pronounce.rb
index <HASH>..<HASH> 100644
--- a/lib/pronounce.rb
+++ b/lib/pronounce.rb
@@ -7,7 +7,10 @@ module Pronounce
class << self
def how_do_i_pronounce(word)
@pronouncations ||= build_pronuciation_dictionary
- @pronouncations[word.downcase].syllables.map {|syllable| syllable.as_strings }
+ word = word.downcase
+ if @pronouncations[word]
+ @pronouncations[word].syllables.map {|syllable| syllable.as_strings }
+ end
end
def symbols
diff --git a/spec/pronounce_spec.rb b/spec/pronounce_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/pronounce_spec.rb
+++ b/spec/pronounce_spec.rb
@@ -9,6 +9,10 @@ describe Pronounce do
it 'groups the phones by syllable' do
Pronounce.how_do_i_pronounce('monkeys').should == [['M', 'AH1', 'NG'], ['K', 'IY0', 'Z']]
end
+
+ it 'returns nil for unknown words' do
+ Pronounce.how_do_i_pronounce('beeblebrox').should == nil
+ end
end
describe '#symbols' do
|
Return nil for unknown words as opposed to throwing an exception.
|
diff --git a/src/js/index.js b/src/js/index.js
index <HASH>..<HASH> 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -1,6 +1,7 @@
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
var Grommet = {
// Components
+ Animate: require('./components/Animate'),
Accordion: require('./components/Accordion'),
AccordionPanel: require('./components/AccordionPanel'),
Anchor: require('./components/Anchor'),
|
Added Animate to index.js
|
diff --git a/protocol/src/main/java/org/jboss/as/protocol/ProtocolChannelClient.java b/protocol/src/main/java/org/jboss/as/protocol/ProtocolChannelClient.java
index <HASH>..<HASH> 100644
--- a/protocol/src/main/java/org/jboss/as/protocol/ProtocolChannelClient.java
+++ b/protocol/src/main/java/org/jboss/as/protocol/ProtocolChannelClient.java
@@ -151,11 +151,11 @@ public class ProtocolChannelClient<T extends ProtocolChannel> implements Closeab
channel.writeShutdown();
} catch (IOException ignore) {
}
- try {
- channel.awaitClosed();
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- }
+// try {
+// channel.awaitClosed();
+// } catch (InterruptedException e) {
+// Thread.currentThread().interrupt();
+// }
}
channels.clear();
|
Get it working again with 'Connection reset by peer' errors by commenting out the awaitClosed() in the client
was: 2c7fa<I>c<I>eeaf<I>fd<I>e<I>a<I>e9d<I>c9
|
diff --git a/src/Core/Framework/Demodata/Generator/ProductGenerator.php b/src/Core/Framework/Demodata/Generator/ProductGenerator.php
index <HASH>..<HASH> 100644
--- a/src/Core/Framework/Demodata/Generator/ProductGenerator.php
+++ b/src/Core/Framework/Demodata/Generator/ProductGenerator.php
@@ -112,6 +112,13 @@ class ProductGenerator implements DemodataGeneratorInterface
$this->write($payload, $context);
}
+ // set inherited association fields, normally set in Indexer
+ // these are needed in Order generation
+ $this->connection->executeQuery('
+ UPDATE product
+ SET visibilities = id, prices = id;
+ ');
+
$context->getConsole()->progressFinish();
}
|
NTR - Fix order generation in demo data command
|
diff --git a/publ/queries.py b/publ/queries.py
index <HASH>..<HASH> 100644
--- a/publ/queries.py
+++ b/publ/queries.py
@@ -57,17 +57,15 @@ def where_entry_visible(query, date=None):
def where_entry_visible_future(query):
""" Generate a where clause for entries that are visible now or in the future """
- return orm.select(
- e for e in query
- if e.status in (model.PublishStatus.PUBLISHED.value,
- model.PublishStatus.SCHEDULED.value))
+ return query.filter(lambda e:
+ e.status in (model.PublishStatus.PUBLISHED.value,
+ model.PublishStatus.SCHEDULED.value))
def where_entry_deleted(query):
""" Generate a where clause for entries that have been deleted """
- return orm.select(
- e for e in query
- if e.status == model.PublishStatus.GONE.value)
+ return query.filter(lambda e:
+ e.status == model.PublishStatus.GONE.value)
def where_entry_category(query, category, recurse=False):
|
Replace some missed selects with lambda filters
|
diff --git a/connector/jira/src/main/java/org/openengsb/connector/jira/internal/misc/JiraValueConverter.java b/connector/jira/src/main/java/org/openengsb/connector/jira/internal/misc/JiraValueConverter.java
index <HASH>..<HASH> 100644
--- a/connector/jira/src/main/java/org/openengsb/connector/jira/internal/misc/JiraValueConverter.java
+++ b/connector/jira/src/main/java/org/openengsb/connector/jira/internal/misc/JiraValueConverter.java
@@ -71,16 +71,6 @@ public final class JiraValueConverter {
} catch (Exception ignore) {
//ignore
}
- try {
- return convert(Issue.Type.valueOf(type));
- } catch (Exception ignore) {
- //ignore
- }
- try {
- return convert(Issue.Field.valueOf(type));
- } catch (Exception ignore) {
- //ignore
- }
return null;
}
}
|
[OPENENGSB-<I>] removed duplicated code
|
diff --git a/src/Belt/Functions.php b/src/Belt/Functions.php
index <HASH>..<HASH> 100644
--- a/src/Belt/Functions.php
+++ b/src/Belt/Functions.php
@@ -3,39 +3,25 @@
class Functions {
/**
- * Cached closures
+ * The cached closures.
*
* @var array
*/
- protected $cached;
+ protected $cached = [];
/**
- * Called closures
+ * The called closures.
*
* @var array
*/
- protected $called;
+ protected $called = [];
/**
- * "Delayed" closures
+ * The "delayed" closures.
*
* @var array
*/
- protected $delayed;
-
- /**
- * The constructor
- *
- * @return void
- */
- public function __construct()
- {
- $this->cached = [];
-
- $this->called = [];
-
- $this->delayed = [];
- }
+ protected $delayed = [];
/**
* Execute a closure and cache its output
|
simplify instantiation process in Belt/Functions
|
diff --git a/phoebe/backend/decorators.py b/phoebe/backend/decorators.py
index <HASH>..<HASH> 100644
--- a/phoebe/backend/decorators.py
+++ b/phoebe/backend/decorators.py
@@ -230,7 +230,7 @@ def construct_mpirun_command(script='mpirun.py', mpirun_par=None, args='', scrip
cmd = ("srun {time_} {memory} {partition} "
"mpirun -np {num_proc} {hostfile} {byslot} {python} "
"{mpirun_loc} {args}").format(**locals())
- print cmd
+ print(cmd)
flag = subprocess.call(cmd, shell=True)
# MPI using the TORQUE scheduler
|
fixed bug for python 3 compatibility
|
diff --git a/src/Bridge/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaChoiceRestriction.php b/src/Bridge/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaChoiceRestriction.php
index <HASH>..<HASH> 100644
--- a/src/Bridge/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaChoiceRestriction.php
+++ b/src/Bridge/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaChoiceRestriction.php
@@ -32,8 +32,8 @@ final class PropertySchemaChoiceRestriction implements PropertySchemaRestriction
{
$choices = [];
- if (\is_callable($choices = $constraint->callback)) {
- $choices = $choices();
+ if (\is_callable($constraint->callback)) {
+ $choices = ($constraint->callback)();
} elseif (\is_array($constraint->choices)) {
$choices = $constraint->choices;
}
|
Do not overwrite variable with unknown value (#<I>)
|
diff --git a/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php b/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php
+++ b/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php
@@ -898,6 +898,7 @@ class ClassMetadata
'db',
'collection',
'rootDocumentName',
+ 'allowCustomID',
);
if ($this->inheritanceType != self::INHERITANCE_TYPE_NONE) {
@@ -932,4 +933,4 @@ class ClassMetadata
$this->reflFields[$field] = $reflField;
}
}
-}
\ No newline at end of file
+}
|
Fixed issue with allowCustomID being lost on serialization
|
diff --git a/core/src/test/java/org/infinispan/util/CoreTestBlockHoundIntegration.java b/core/src/test/java/org/infinispan/util/CoreTestBlockHoundIntegration.java
index <HASH>..<HASH> 100644
--- a/core/src/test/java/org/infinispan/util/CoreTestBlockHoundIntegration.java
+++ b/core/src/test/java/org/infinispan/util/CoreTestBlockHoundIntegration.java
@@ -83,6 +83,9 @@ public class CoreTestBlockHoundIntegration implements BlockHoundIntegration {
builder.allowBlockingCallsInside(CacheListenerVisibilityTest.EntryModifiedWithAssertListener.class.getName(), "entryCreated");
builder.allowBlockingCallsInside(CacheListenerVisibilityTest.EntryCreatedWithAssertListener.class.getName(), "entryCreated");
+
+ CommonsBlockHoundIntegration.allowPublicMethodsToBlock(builder, BlockingLocalTopologyManager.class);
+ CommonsBlockHoundIntegration.allowPublicMethodsToBlock(builder, AbstractControlledLocalTopologyManager.class);
}
private static void writeJUnitReport(String testName, Throwable throwable, String type) {
|
ISPN-<I> BlockingLocalTopologyManager is blocking - ignore in BlockHound
|
diff --git a/lib/cisco_node_utils/interface.rb b/lib/cisco_node_utils/interface.rb
index <HASH>..<HASH> 100644
--- a/lib/cisco_node_utils/interface.rb
+++ b/lib/cisco_node_utils/interface.rb
@@ -122,6 +122,7 @@ module Cisco
next if k.nil? || v.nil?
k.gsub!(/ \(.*\)/, '') # Remove any parenthetical text from key
v.strip!
+ v.gsub!(%r{half/full}, 'half,full') if k == 'Duplex'
hash[k] = v
end
end
|
Fix half/full in test_duplex
* For some 3k, need to munge 'half/full' into csv-style 'half,full' to play nice with interface_capabilities
* Tested on n<I>
|
diff --git a/tests/phpunit/includes/Shortcodes/Test_If.php b/tests/phpunit/includes/Shortcodes/Test_If.php
index <HASH>..<HASH> 100644
--- a/tests/phpunit/includes/Shortcodes/Test_If.php
+++ b/tests/phpunit/includes/Shortcodes/Test_If.php
@@ -105,7 +105,7 @@ class Test_If extends \Pods_Unit_Tests\Pods_UnitTestCase {
array(
'name' => __FUNCTION__ . '2',
'number1' => 456,
- 'number2' => 0,
+ 'number2' => null, // `0` is a valid number.
)
);
$content = base64_encode( 'ABC' );
@@ -177,7 +177,7 @@ class Test_If extends \Pods_Unit_Tests\Pods_UnitTestCase {
array(
'name' => 'my post title',
'number1' => 456,
- 'number2' => 0,
+ 'number2' => null, // `0` is a valid number.
)
);
$content = base64_encode( '{@number2}[else]{@number1}' );
|
Update tests: `0` is a valid number
|
diff --git a/src/services/GeoService.php b/src/services/GeoService.php
index <HASH>..<HASH> 100644
--- a/src/services/GeoService.php
+++ b/src/services/GeoService.php
@@ -769,7 +769,11 @@ class GeoService extends Component
$url = str_replace('.json', rawurlencode(', ' . $country) . '.json', $url);
}
- $data = (string) static::_client()->get($url)->getBody();
+ $data = (string) static::_client()->get($url, [
+ 'headers' => [
+ 'referer' => Craft::$app->urlManager->getHostInfo()
+ ]
+ ])->getBody();
$data = Json::decodeIfJson($data);
if (!is_array($data) || empty($data['features']))
|
Include referer header in Mapbox Geocoding request
Fixes Mapbox Forbidden issue #<I>.
|
diff --git a/spiketoolkit/sorters/launcher.py b/spiketoolkit/sorters/launcher.py
index <HASH>..<HASH> 100644
--- a/spiketoolkit/sorters/launcher.py
+++ b/spiketoolkit/sorters/launcher.py
@@ -34,7 +34,7 @@ def _run_one(arg_list):
def run_sorters(sorter_list, recording_dict_or_list, working_folder, grouping_property=None,
- shared_binary_copy=True, engine=None, engine_kargs={}, debug=False, write_log=True):
+ shared_binary_copy=False, engine=None, engine_kargs={}, debug=False, write_log=True):
"""
This run several sorter on several recording.
Simple implementation will nested loops.
@@ -71,7 +71,7 @@ def run_sorters(sorter_list, recording_dict_or_list, working_folder, grouping_p
grouping_property:
The property of grouping given to sorters.
- shared_binary_copy: True default
+ shared_binary_copy: False default
Before running each sorter, all recording are copied inside
the working_folder with the raw binary format (BinDatRecordingExtractor)
and new recording are done BinDatRecordingExtractor.
|
shared_binary_copy False by default.
|
diff --git a/topydo/lib/ProgressColor.py b/topydo/lib/ProgressColor.py
index <HASH>..<HASH> 100644
--- a/topydo/lib/ProgressColor.py
+++ b/topydo/lib/ProgressColor.py
@@ -33,7 +33,7 @@ def progress_color(p_todo):
1, # red
]
- # https://upload.wikimedia.org/wikipedia/en/1/15/Xterm_256color_chart.svg
+ # https://commons.wikimedia.org/wiki/File:Xterm_256color_chart.svg
# a gradient from green to yellow to red
color256_range = \
[22, 28, 34, 40, 46, 82, 118, 154, 190, 226, 220, 214, 208, 202, 196]
@@ -106,13 +106,17 @@ def progress_color(p_todo):
else:
return 0
- color_range = color256_range if config().colors() == 256 else color16_range
+ use_256_colors = config().colors() == 256
+ color_range = color256_range if use_256_colors else color16_range
progress = get_progress(p_todo)
# TODO: remove linear scale to exponential scale
if progress > 1:
# overdue, return the last color
return Color(color_range[-1])
+ elif p_todo.is_completed():
+ # return grey
+ return Color(243) if use_256_colors else Color(7)
else:
# not overdue, calculate position over color range excl. due date
# color
|
Show a grey progress color for completed items
|
diff --git a/network.go b/network.go
index <HASH>..<HASH> 100644
--- a/network.go
+++ b/network.go
@@ -104,7 +104,11 @@ func checkRouteOverlaps(dockerNetwork *net.IPNet) error {
continue
}
if _, network, err := net.ParseCIDR(strings.Split(line, " ")[0]); err != nil {
- return fmt.Errorf("Unexpected ip route output: %s (%s)", err, line)
+ // is this a mask-less IP address?
+ if ip := net.ParseIP(strings.Split(line, " ")[0]); ip == nil {
+ // fail only if it's neither a network nor a mask-less IP address
+ return fmt.Errorf("Unexpected ip route output: %s (%s)", err, line)
+ }
} else if networkOverlaps(dockerNetwork, network) {
return fmt.Errorf("Network %s is already routed: '%s'", dockerNetwork.String(), line)
}
|
Handle ip route showing mask-less IP addresses
Sometimes `ip route` will show mask-less IPs, so net.ParseCIDR will fail. If it does we check if we can net.ParseIP, and fail only if we can't.
Fixes #<I>
Fixes #<I>
|
diff --git a/Kwf/Controller/Action/Cli/Web/ComponentDeepCopyController.php b/Kwf/Controller/Action/Cli/Web/ComponentDeepCopyController.php
index <HASH>..<HASH> 100644
--- a/Kwf/Controller/Action/Cli/Web/ComponentDeepCopyController.php
+++ b/Kwf/Controller/Action/Cli/Web/ComponentDeepCopyController.php
@@ -23,6 +23,7 @@ class Kwf_Controller_Action_Cli_Web_ComponentDeepCopyController extends Kwf_Cont
public function indexAction()
{
set_time_limit(0);
+ ini_set('memory_limit', '512M');
$parentSource = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($this->_getParam('source'), array('ignoreVisible'=>true));
if (!$parentSource) throw new Kwf_Exception_Client("source not found");
|
increase memory limit to avoid problems with memory limit
|
diff --git a/packages/xod-func-tools/test/index.spec.js b/packages/xod-func-tools/test/index.spec.js
index <HASH>..<HASH> 100644
--- a/packages/xod-func-tools/test/index.spec.js
+++ b/packages/xod-func-tools/test/index.spec.js
@@ -61,7 +61,7 @@ describe('tapP', () => {
Promise.resolve(1)
.then(tapP(promiseFn));
});
- it('should return Promise.reject if inside function return Promise.reject', () => {
+ it('should return Promise.reject if inner function return Promise.reject', () => {
const promiseFn = () => Promise.reject('reject');
Promise.resolve(1)
|
chore(xod-func-tools): fix a mistake in test case label
|
diff --git a/src/QueryTemplate.php b/src/QueryTemplate.php
index <HASH>..<HASH> 100644
--- a/src/QueryTemplate.php
+++ b/src/QueryTemplate.php
@@ -33,11 +33,6 @@ class QueryTemplate implements QueryTemplateInterface
private $loader;
/**
- * @var string
- */
- private $found = null;
-
- /**
* @param \GM\Hierarchy\Finder\TemplateFinderInterface|null $finder
* @param \GM\Hierarchy\Loader\TemplateLoaderInterface $loader
*/
@@ -61,11 +56,7 @@ class QueryTemplate implements QueryTemplateInterface
*/
public function find(\WP_Query $query = null, $filters = true)
{
- if (is_string($this->found)) {
- return $this->found;
- }
-
- $leaves = (new Hierarchy($query))->get();
+ $leaves = (new Hierarchy())->getHierarchy($query);
if (! is_array($leaves) || empty($leaves)) {
return '';
@@ -79,8 +70,6 @@ class QueryTemplate implements QueryTemplateInterface
$filters and $found = $this->applyFilter("{$type}_template", $found, $query);
}
- (is_string($found) && $found) and $this->found = $found;
-
return $found;
}
|
Remove cache state from QueryTemplate
|
diff --git a/src/edeposit/amqp/aleph/aleph.py b/src/edeposit/amqp/aleph/aleph.py
index <HASH>..<HASH> 100755
--- a/src/edeposit/amqp/aleph/aleph.py
+++ b/src/edeposit/amqp/aleph/aleph.py
@@ -61,7 +61,7 @@ counting results from getters):
getISBNCount()
getAuthorsBooksCount()
- getPublishersBooksIDsCount()
+ getPublishersBooksCount()
- Other noteworthy properties ----------------------------------------------
Properties VALID_ALEPH_BASES and VALID_ALEPH_FIELDS can be specific only to
@@ -456,5 +456,5 @@ def getAuthorsBooksCount(author, base="nkc"):
return searchInAleph(base, author, False, "wau")["no_entries"]
-def getPublishersBooksIDsCount(publisher, base="nkc"):
+def getPublishersBooksCount(publisher, base="nkc"):
return searchInAleph(base, publisher, False, "wpb")["no_entries"]
|
getPublishersBooksIDsCount() renamed to getPublishersBooksCount().
|
diff --git a/build/Gruntfile.js b/build/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/build/Gruntfile.js
+++ b/build/Gruntfile.js
@@ -6,19 +6,18 @@ module.exports = function(grunt) {
jsdoc : {
src : {
src: ['../Tone/**/*.js', '../README.md'],
- //src: ['../Tone.js'],
options: {
destination: '../doc',
- //configure: './config/jsdoc.conf.json',
template : "./doc_config/template",
configure : "./doc_config/template/jsdoc.conf.json"
- //template : "readable",
}
},
dist : {
src: ['../Tone.js'],
options: {
- destination: '../doc'
+ destination: '../doc',
+ template : "./doc_config/template",
+ configure : "./doc_config/template/jsdoc.conf.json"
}
}
},
|
pointing to docblockr config for building dist
|
diff --git a/grade/report/singleview/index.php b/grade/report/singleview/index.php
index <HASH>..<HASH> 100644
--- a/grade/report/singleview/index.php
+++ b/grade/report/singleview/index.php
@@ -46,7 +46,16 @@ if (empty($itemid)) {
}
$courseparams = array('id' => $courseid);
-$PAGE->set_url(new moodle_url('/grade/report/singleview/index.php', $courseparams));
+$pageparams = array(
+ 'id' => $courseid,
+ 'group' => $groupid,
+ 'userid' => $userid,
+ 'itemid' => $itemid,
+ 'item' => $itemtype,
+ 'page' => $page,
+ 'perpage' => $perpage,
+ );
+$PAGE->set_url(new moodle_url('/grade/report/singleview/index.php', $pageparams));
$PAGE->set_pagelayout('incourse');
if (!$course = $DB->get_record('course', $courseparams)) {
|
MDL-<I> gradereport_singleview: Correct url params supplied to PAGE
|
diff --git a/src/class/method.js b/src/class/method.js
index <HASH>..<HASH> 100644
--- a/src/class/method.js
+++ b/src/class/method.js
@@ -216,15 +216,15 @@ define(
function attachInstanceMethod (constructor, options) {
var methods = constructor.prototype,
- existing = methods[options.name],
overload = true,
signature = getSignature(options),
hasSignature = type.is("string", signature),
+ existing = methods[options.name],
implementationExists = type.is("function", existing);
if (hasSignature && (!implementationExists || options.override)) {
existing = Function.Abstract(options.name);
- } else if (options.override) {
+ } else if (!hasSignature) {
overload = false;
}
|
more work on method overload/override logic
|
diff --git a/Swat/SwatTableViewColumn.php b/Swat/SwatTableViewColumn.php
index <HASH>..<HASH> 100644
--- a/Swat/SwatTableViewColumn.php
+++ b/Swat/SwatTableViewColumn.php
@@ -483,7 +483,7 @@ class SwatTableViewColumn extends SwatCellRendererContainer
// Set the properties of the renderers to the value of the data field.
foreach ($this->renderers as $renderer) {
$this->renderers->applyMappingsToRenderer($renderer, $data);
- $renderer->sensitive = $sensitive;
+ $renderer->sensitive = $renderer->sensitive && $sensitive;
}
}
|
allow sensitivity to be set dynamically on cell renderers
svn commit r<I>
|
diff --git a/src/main/groovy/util/GroovyScriptEngine.java b/src/main/groovy/util/GroovyScriptEngine.java
index <HASH>..<HASH> 100644
--- a/src/main/groovy/util/GroovyScriptEngine.java
+++ b/src/main/groovy/util/GroovyScriptEngine.java
@@ -312,7 +312,7 @@ public class GroovyScriptEngine implements ResourceConnector {
}
} catch (IOException e1) {
groovyScriptConn = null;
- String message = "Cannot open URL: " + scriptURL;
+ String message = "Cannot open URL: " + root + resourceName;
groovyScriptConn = null;
if (se == null) {
se = new ResourceException(message);
|
GROOVY-<I>: improve exception text by not using the resulting URL, but root+resourceName
|
diff --git a/test/stateSpec.js b/test/stateSpec.js
index <HASH>..<HASH> 100644
--- a/test/stateSpec.js
+++ b/test/stateSpec.js
@@ -34,10 +34,6 @@ describe('Initial state', () => {
const patchId = Object.keys(initialState.project.patches)[0];
chai.expect(initialState.project.patches[patchId]).to.have.any.keys(['nodes']);
});
- it('pins', () => {
- const patchId = Object.keys(initialState.project.patches)[0];
- chai.expect(initialState.project.patches[patchId]).to.have.any.keys(['pins']);
- });
it('links', () => {
const patchId = Object.keys(initialState.project.patches)[0];
chai.expect(initialState.project.patches[patchId]).to.have.any.keys(['links']);
|
fix(test): fix a simplest test, that checks a state shape for existing of pins inside patches
|
diff --git a/src/metpy/cbook.py b/src/metpy/cbook.py
index <HASH>..<HASH> 100644
--- a/src/metpy/cbook.py
+++ b/src/metpy/cbook.py
@@ -4,6 +4,7 @@
"""Collection of generally useful utility code from the cookbook."""
import os
+from pathlib import Path
import numpy as np
import pooch
@@ -19,13 +20,11 @@ POOCH = pooch.create(
# Check if we have the data available directly from a git checkout, either from the
# TEST_DATA_DIR variable, or looking relative to the path of this module's file. Use this
# to override Pooch's path.
-dev_data_path = os.environ.get('TEST_DATA_DIR',
- os.path.join(os.path.dirname(__file__),
- '..', '..', 'staticdata'))
-if os.path.exists(dev_data_path):
+dev_data_path = os.environ.get('TEST_DATA_DIR', Path(__file__).parents[2] / 'staticdata')
+if Path(dev_data_path).exists():
POOCH.path = dev_data_path
-POOCH.load_registry(os.path.join(os.path.dirname(__file__), 'static-data-manifest.txt'))
+POOCH.load_registry(Path(__file__).parent / 'static-data-manifest.txt')
def get_test_data(fname, as_file_obj=True, mode='rb'):
|
MNT: Use pathlib in registry setup code
|
diff --git a/trashcli/filesystem.py b/trashcli/filesystem.py
index <HASH>..<HASH> 100644
--- a/trashcli/filesystem.py
+++ b/trashcli/filesystem.py
@@ -109,7 +109,12 @@ class Path (unipath.Path) :
def mkdir(self):
os.mkdir(self.path)
- def mkdirs(self, mode=0777):
+ def mkdirs(self):
+ if self.isdir():
+ return
+ os.makedirs(self.path)
+
+ def mkdirs_using_mode(self, mode):
if self.isdir():
os.chmod(self.path, mode)
return
diff --git a/trashcli/trash.py b/trashcli/trash.py
index <HASH>..<HASH> 100644
--- a/trashcli/trash.py
+++ b/trashcli/trash.py
@@ -84,7 +84,7 @@ class TrashDirectory(object) :
trash_info.deletion_date)
if not self.files_dir.exists() :
- self.files_dir.mkdirs(0700)
+ self.files_dir.mkdirs_using_mode(0700)
try :
path.move(trashed_file.actual_path)
@@ -189,7 +189,7 @@ class TrashDirectory(object) :
def persist_trash_info(self,trash_info) :
assert(isinstance(trash_info, TrashInfo))
- self.info_dir.mkdirs(0700)
+ self.info_dir.mkdirs_using_mode(0700)
self.info_dir.chmod(0700)
# write trash info
|
Fixed #<I>: restore-trash sets all-write permissions for the destination directory
|
diff --git a/ui/src/utils/queryTransitions.js b/ui/src/utils/queryTransitions.js
index <HASH>..<HASH> 100644
--- a/ui/src/utils/queryTransitions.js
+++ b/ui/src/utils/queryTransitions.js
@@ -19,15 +19,23 @@ export function chooseMeasurement(query, measurement) {
}
export const toggleField = (query, {field, funcs}, isKapacitorRule = false) => {
- const isSelected = query.fields.find(f => f.field === field)
+ const {fields, groupBy} = query
+
+ if (!fields) {
+ return {
+ ...query,
+ fields: [{field, funcs: ['mean']}],
+ }
+ }
+
+ const isSelected = fields.find(f => f.field === field)
if (isSelected) {
- const nextFields = query.fields.filter(f => f.field !== field)
+ const nextFields = fields.filter(f => f.field !== field)
if (!nextFields.length) {
- const nextGroupBy = {...query.groupBy, time: null}
return {
...query,
fields: nextFields,
- groupBy: nextGroupBy,
+ groupBy: {...groupBy, time: null},
}
}
|
Update toggle field function to handle missing field key
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.