diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/index.es6.js b/index.es6.js
index <HASH>..<HASH> 100644
--- a/index.es6.js
+++ b/index.es6.js
@@ -2,8 +2,8 @@
import algoliasearchHelper from 'algoliasearch-helper';
import toFactory from 'to-factory';
-import InstantSearch from './dist-es6-module/lib/InstantSearch.js';
-import version from './dist-es6-module/lib/version.js';
+import InstantSearch from './lib/InstantSearch.js';
+import version from './lib/version.js';
// import instantsearch from 'instantsearch.js';
// -> provides instantsearch object without connectors and widgets | fix(es): wrong path to files (#<I>) |
diff --git a/clientv3/lease.go b/clientv3/lease.go
index <HASH>..<HASH> 100644
--- a/clientv3/lease.go
+++ b/clientv3/lease.go
@@ -351,6 +351,8 @@ func (l *lessor) sendKeepAliveLoop(stream pb.Lease_LeaseKeepAliveClient) {
for {
select {
case <-time.After(500 * time.Millisecond):
+ case <-stream.Context().Done():
+ return
case <-l.donec:
return
case <-l.stopCtx.Done(): | clientv3: check stream context in lease keep alive send loop
If no leases are being kept alive, a connection reset would leak
the send routine since it would only test the stream when sending
keep alives.
Fixes #<I> |
diff --git a/lib/nexpose/global_settings.rb b/lib/nexpose/global_settings.rb
index <HASH>..<HASH> 100644
--- a/lib/nexpose/global_settings.rb
+++ b/lib/nexpose/global_settings.rb
@@ -123,7 +123,7 @@ module Nexpose
# Internal method for parsing XML for whether asset linking in enabled.
def parse_asset_linking_from_xml(xml)
- enabled = false
+ enabled = true
if elem = REXML::XPath.first(xml, '//AssetCorrelation[@enabled]')
enabled = elem.attribute('enabled').value.to_i == 1
end | Update #parse_asset_linking_from_xml's default return value
By default Nexpose customers have this value enabled. Customers who have
set it false will have the element in their global settings and
therefore have it correctly mutated to false in the lines that follow
this default value. |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -16,14 +16,16 @@ module.exports = function(points, z, resolution, breaks, done){
var gridResult = grid(squareBBox, resolution);
var data = [];
- gridResult.features.forEach(function(pt){
- tinResult.features.forEach(function(triangle){
+ for (var i = 0; i < gridResult.features.length; i++) {
+ var pt = gridResult.features[i];
+ for (var j = 0; j < tinResult.features.length; j++) {
+ var triangle = tinResult.features[j];
if (inside(pt, triangle)) {
pt.properties = {};
pt.properties[z] = planepoint(pt, triangle);
}
- });
- });
+ }
+ }
var depth = Math.sqrt(gridResult.features.length);
for (var x=0; x<depth; x++){ | Optimize, this yields about <I>% boost |
diff --git a/core/server/mail.js b/core/server/mail.js
index <HASH>..<HASH> 100644
--- a/core/server/mail.js
+++ b/core/server/mail.js
@@ -16,7 +16,7 @@ function GhostMailer(opts) {
// *This promise should always resolve to avoid halting Ghost::init*.
GhostMailer.prototype.init = function () {
var self = this;
- if (config().mail && config().mail.transport && config().mail.options) {
+ if (config().mail && config().mail.transport) {
this.createTransport();
return when.resolve();
}
@@ -53,7 +53,7 @@ GhostMailer.prototype.detectSendmail = function () {
};
GhostMailer.prototype.createTransport = function () {
- this.transport = nodemailer.createTransport(config().mail.transport, _.clone(config().mail.options));
+ this.transport = nodemailer.createTransport(config().mail.transport, _.clone(config().mail.options) || {});
};
GhostMailer.prototype.usingSendmail = function () { | Don't require mail.options to be set |
diff --git a/plugins/hudson/reporter.rb b/plugins/hudson/reporter.rb
index <HASH>..<HASH> 100644
--- a/plugins/hudson/reporter.rb
+++ b/plugins/hudson/reporter.rb
@@ -36,7 +36,7 @@ class Hudson
end
def common
- @base.failures & @other.failures
+ prefix(' ', @base.failures & @other.failures)
end
def prefix(str, array) | prefix common failed tests with ' ', so all have prefix |
diff --git a/src/utils/pageToGenerator.js b/src/utils/pageToGenerator.js
index <HASH>..<HASH> 100644
--- a/src/utils/pageToGenerator.js
+++ b/src/utils/pageToGenerator.js
@@ -7,18 +7,21 @@ function* pageToGenerator(pageFn) {
let bank = [];
let fetchPromise = Promise.resolve();
while (bank.length > 0 || nextPageExists) {
- if (bank.length > 0) {
- yield Promise.resolve(bank.shift());
- } else {
- fetchPromise = fetchPromise.then(pageFn).then(function(response) {
- nextPageExists = !!response.pages.next;
- bank = response.data;
- return bank.shift();
- });
+ fetchPromise = fetchPromise.then(function() {
+ if (bank.length === 0) {
+ return pageFn().then(function(response) {
+ nextPageExists = !!response.pages.next;
+ bank = response.data;
- yield fetchPromise;
- }
+ return bank.shift();
+ });
+ }
+
+ return bank.shift();
+ });
+
+ yield fetchPromise;
}
} | page-to-generator funciton fixes
Simplify and fix issue where promises weren't chaining correctly |
diff --git a/src/Hodor/MessageQueue/Adapter/ConfigInterface.php b/src/Hodor/MessageQueue/Adapter/ConfigInterface.php
index <HASH>..<HASH> 100644
--- a/src/Hodor/MessageQueue/Adapter/ConfigInterface.php
+++ b/src/Hodor/MessageQueue/Adapter/ConfigInterface.php
@@ -5,7 +5,7 @@ namespace Hodor\MessageQueue\Adapter;
interface ConfigInterface
{
/**
- * @return string
+ * @return array
*/
public function getAdapterFactoryConfig(); | Fix PHPdoc that was causing PhpStorm warnings in AdapterFactory |
diff --git a/tests/test_ro_functional.py b/tests/test_ro_functional.py
index <HASH>..<HASH> 100644
--- a/tests/test_ro_functional.py
+++ b/tests/test_ro_functional.py
@@ -211,7 +211,7 @@ class RHTest(BaseTest):
url = (tests.CLICONFIG.REDHAT_URL or
"https://bugzilla.redhat.com/xmlrpc.cgi")
bzclass = RHBugzilla
- bzversion = (4, 4)
+ bzversion = (5, 0)
test0 = BaseTest._testBZVersion
test01 = lambda s: BaseTest._testInfoProducts(s, 125, | tests: bugzilla.redhat.com is now bugzilla5 |
diff --git a/lib/helpscout/client.rb b/lib/helpscout/client.rb
index <HASH>..<HASH> 100644
--- a/lib/helpscout/client.rb
+++ b/lib/helpscout/client.rb
@@ -891,6 +891,8 @@ module HelpScout
url = "/customers.json"
begin
+ # We need to set reload flag to true to receive created object back
+ customer[:reload] = true
item = Client.create_item(@auth, url, customer.to_json)
Customer.new(item)
rescue StandardError => e | create_customer(customer) method expected that API will return JSON for newly created customer.
But this worked only if we passed 'reload' parameter explicitely. If we didn't Customer object with all empty fields was created and this has no sense.
Now create_customer method will always add 'reload' flag to request. |
diff --git a/servers/servertcp_handler.js b/servers/servertcp_handler.js
index <HASH>..<HASH> 100644
--- a/servers/servertcp_handler.js
+++ b/servers/servertcp_handler.js
@@ -123,8 +123,8 @@ function _handleReadCoilsOrInputDiscretes(requestBuffer, vector, unitID, callbac
msg: "Invalid length"
});
- var cb = buildCb(i);
var i = 0;
+ var cb = buildCb(i);
var promiseOrValue = null;
if (isGetCoil && vector.getCoil.length === 3) { | Fix var beeing used before assignment (#<I>) |
diff --git a/lib/lock_and_cache.rb b/lib/lock_and_cache.rb
index <HASH>..<HASH> 100644
--- a/lib/lock_and_cache.rb
+++ b/lib/lock_and_cache.rb
@@ -177,7 +177,6 @@ module LockAndCache
end
ensure
done = true
- lock_extender.exit if lock_extender.alive?
lock_extender.join if lock_extender.status.nil?
end
end | don't be too eager to kill the lock extender thread |
diff --git a/config/src/main/java/org/springframework/security/config/authentication/AuthenticationProviderBeanDefinitionParser.java b/config/src/main/java/org/springframework/security/config/authentication/AuthenticationProviderBeanDefinitionParser.java
index <HASH>..<HASH> 100644
--- a/config/src/main/java/org/springframework/security/config/authentication/AuthenticationProviderBeanDefinitionParser.java
+++ b/config/src/main/java/org/springframework/security/config/authentication/AuthenticationProviderBeanDefinitionParser.java
@@ -31,7 +31,6 @@ public class AuthenticationProviderBeanDefinitionParser implements BeanDefinitio
public BeanDefinition parse(Element element, ParserContext parserContext) {
RootBeanDefinition authProvider = new RootBeanDefinition(DaoAuthenticationProvider.class);
- authProvider.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
authProvider.setSource(parserContext.extractSource(element));
Element passwordEncoderElt = DomUtils.getChildElementByTagName(element, Elements.PASSWORD_ENCODER); | Remove "infrastructure" type from authentication provider bean. |
diff --git a/IRI.php b/IRI.php
index <HASH>..<HASH> 100644
--- a/IRI.php
+++ b/IRI.php
@@ -497,7 +497,7 @@ class IRI
// http://tools.ietf.org/html/rfc3986#appendix-B
$regex = '|^((?P<scheme>[^:/?#]+):)?' .
'((?P<doubleslash>//)(?P<authority>[^/?#]*))?(?P<path>[^?#]*)' .
- '((?<querydef>\?)(?P<query>[^#]*))?(#(?P<fragment>.*))?|';
+ '((?P<querydef>\?)(?P<query>[^#]*))?(#(?P<fragment>.*))?|';
preg_match($regex, $iri, $match);
// Extract scheme | Use only Python-style subpatterns to be compatible with older PCRE versions
This closes #4 and fixes lanthaler/JsonLD#<I> |
diff --git a/tests/Api/StatsTest.php b/tests/Api/StatsTest.php
index <HASH>..<HASH> 100644
--- a/tests/Api/StatsTest.php
+++ b/tests/Api/StatsTest.php
@@ -49,15 +49,27 @@ class StatsTest extends MauticApiTestCase
'asset_downloads',
'audit_log',
'campaign_lead_event_log',
+ 'campaign_leads',
'channel_url_trackables',
+ 'companies_leads',
+ 'dynamic_content_lead_data',
+ 'dynamic_content_stats',
'email_stats',
'email_stats_devices',
'focus_stats',
'form_submissions',
+ 'ip_addresses',
+ 'lead_categories',
'lead_companies_change_log',
+ 'lead_devices',
+ 'lead_donotcontact',
+ 'lead_frequencyrules',
+ 'lead_lists',
'lead_points_change_log',
'lead_stages_change_log',
+ 'lead_utmtags',
'page_hits',
+ 'page_redirects',
'point_lead_action_log',
'point_lead_event_log',
'push_notification_stats', | New stats tables added to the test |
diff --git a/publish.js b/publish.js
index <HASH>..<HASH> 100644
--- a/publish.js
+++ b/publish.js
@@ -129,21 +129,7 @@ const tasks = new Listr([{
enabled,
}, {
title: 'Publishing to npm',
- // task: (ctx) => exec('./node_modules/.bin/np', [ctx.version]),
- task: (ctx) => exec('./node_modules/.bin/np', ['0.3.0']),
- enabled,
-}, {
- title: 'Sync with GitHub',
- task: () => {
- return new Promise((resolve, reject) => {
- repo.remote_push((err) => {
- if (err) {
- return reject(err);
- }
- return resolve();
- });
- });
- },
+ task: (ctx) => exec('./node_modules/.bin/np', [ctx.version])
enabled,
}]); | Update publish script (sync unnecessary, version should be automated). |
diff --git a/lib/specjour/printer.rb b/lib/specjour/printer.rb
index <HASH>..<HASH> 100644
--- a/lib/specjour/printer.rb
+++ b/lib/specjour/printer.rb
@@ -127,8 +127,10 @@ module Specjour
def stopping
summarize_reports
- record_performance unless Specjour.interrupted?
- print_missing_tests if tests_to_run.any?
+ unless Specjour.interrupted?
+ record_performance
+ print_missing_tests if tests_to_run.any?
+ end
end
def summarize_reports | Don't print queued tests when process interrupts |
diff --git a/HydraServer/python/HydraServer/lib/data.py b/HydraServer/python/HydraServer/lib/data.py
index <HASH>..<HASH> 100644
--- a/HydraServer/python/HydraServer/lib/data.py
+++ b/HydraServer/python/HydraServer/lib/data.py
@@ -696,6 +696,8 @@ def _process_incoming_data(data, user_id=None, source=None):
if d.metadata is not None:
metadata_dict = json.loads(d.metadata)
+ else:
+ metadata_dict={}
metadata_keys = [k.lower() for k in metadata_dict]
if user_id is not None and 'user_id' not in metadata_keys: | Upload the latest versions of Excel App and GAMS build to Apps folder
Fix issue of metadata_dict being null when updating the scenario |
diff --git a/internal/pkg/platform/platform_matcher.go b/internal/pkg/platform/platform_matcher.go
index <HASH>..<HASH> 100644
--- a/internal/pkg/platform/platform_matcher.go
+++ b/internal/pkg/platform/platform_matcher.go
@@ -128,16 +128,16 @@ func WantedPlatforms(ctx *types.SystemContext) ([]imgspecv1.Platform, error) {
if ctx != nil && ctx.ArchitectureChoice != "" {
wantedArch = ctx.ArchitectureChoice
}
- wantedOS := runtime.GOOS
- if ctx != nil && ctx.OSChoice != "" {
- wantedOS = ctx.OSChoice
- }
-
wantedVariant := getCPUVariant(runtime.GOOS, runtime.GOARCH)
if ctx != nil && ctx.VariantChoice != "" {
wantedVariant = ctx.VariantChoice
}
+ wantedOS := runtime.GOOS
+ if ctx != nil && ctx.OSChoice != "" {
+ wantedOS = ctx.OSChoice
+ }
+
var wantedPlatforms []imgspecv1.Platform
if wantedVariant != "" && compatibility[wantedArch] != nil {
wantedPlatforms = make([]imgspecv1.Platform, 0, len(compatibility[wantedArch])) | Move architecture+variant logic together, separate from wantedOS
The architecture+variant choices interact, and are orthogonal from OS.
Should not change behavior. |
diff --git a/test/end2end_test.go b/test/end2end_test.go
index <HASH>..<HASH> 100644
--- a/test/end2end_test.go
+++ b/test/end2end_test.go
@@ -134,7 +134,7 @@ func (s *testServer) UnaryCall(ctx context.Context, in *testpb.SimpleRequest) (*
return nil, grpc.Errorf(codes.DataLoss, "expected an :authority metadata: %v", md)
}
if err := grpc.SendHeader(ctx, md); err != nil {
- return nil, fmt.Errorf("grpc.SendHeader(%v, %v) = %v, want %v", ctx, md, err, nil)
+ return nil, fmt.Errorf("grpc.SendHeader(_, %v) = %v, want %v", md, err, nil)
}
grpc.SetTrailer(ctx, testTrailerMetadata)
} | Remove printing context from end2end_test UnaryCall() |
diff --git a/filters/github.py b/filters/github.py
index <HASH>..<HASH> 100644
--- a/filters/github.py
+++ b/filters/github.py
@@ -1,7 +1,8 @@
import re
ISSUE = '^.*?`(.*)`.*?$'
-FULL_ISSUE = '`#{3} <https://github.com/{0}/{1}/{2}/{3}>`_'
+SAME_PROJ_FULL_ISSUE = '`#{3} <https://github.com/{0}/{1}/{2}/{3}>`_'
+DIFF_PROJ_FULL_ISSUE = '`{1}#{3} <https://github.com/{0}/{1}/{2}/{3}>`_'
def github_expand(line, name, organisation):
@@ -22,9 +23,14 @@ def github_expand(line, name, organisation):
elif len(tokens) == 2:
if tokens[0] == 'PR':
tokens = [organisation, name, 'pull'] + tokens[1:]
+ elif tokens[0] != '':
+ tokens = [organisation, tokens[0], 'issues'] + tokens[1:]
else:
tokens = [organisation, name, 'issues'] + tokens[1:]
- reference = FULL_ISSUE.format(*tokens)
+ if tokens[1] != name:
+ reference = DIFF_PROJ_FULL_ISSUE.format(*tokens)
+ else:
+ reference = SAME_PROJ_FULL_ISSUE.format(*tokens)
return re.sub('`(.*)`', reference, line)
else:
return result | :sparkles: shorter syntax for referencing different project's issue |
diff --git a/blockchain/reactor.go b/blockchain/reactor.go
index <HASH>..<HASH> 100644
--- a/blockchain/reactor.go
+++ b/blockchain/reactor.go
@@ -197,7 +197,13 @@ FOR_LOOP:
// not thread safe access for peerless and numPending but should be fine
log.Debug("Consensus ticker", "peerless", bcR.pool.peerless, "pending", bcR.pool.numPending, "total", bcR.pool.numTotal)
// NOTE: this condition is very strict right now. may need to weaken
- if bcR.pool.numPending == maxPendingRequests && bcR.pool.peerless == bcR.pool.numPending {
+ // if the max amount of requests are pending and peerless
+ // and we have some peers (say > 5), then we're caught up
+ maxPending := bcR.pool.numPending == maxPendingRequests
+ maxPeerless := bcR.pool.peerless == bcR.pool.numPending
+ o, i, _ := bcR.sw.NumPeers()
+ enoughPeers := o+i > 5
+ if maxPending && maxPeerless && enoughPeers {
log.Warn("Time to switch to consensus reactor!", "height", bcR.pool.height)
bcR.pool.Stop()
stateDB := dbm.GetDB("state") | dont switch off fast sync unless we have enough peers to know |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
from setuptools import setup
version = "0.1.0" | Added utf-8 unicoding |
diff --git a/master/buildbot/test/unit/test_db_steps.py b/master/buildbot/test/unit/test_db_steps.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/unit/test_db_steps.py
+++ b/master/buildbot/test/unit/test_db_steps.py
@@ -285,7 +285,7 @@ class Tests(interfaces.InterfaceTests):
return url['name']
# order is not guaranteed though
- self.assertEqual([stepdict['urls']],
+ self.assertEqual(stepdict['urls'],
[{'name': u'foo', 'url': u'bar'}])
@defer.inlineCallbacks | stepdict['urls'] is already a list |
diff --git a/safe/gui/widgets/dock.py b/safe/gui/widgets/dock.py
index <HASH>..<HASH> 100644
--- a/safe/gui/widgets/dock.py
+++ b/safe/gui/widgets/dock.py
@@ -1322,10 +1322,7 @@ class Dock(QtGui.QDockWidget, FORM_CLASS):
return analysis
- def add_above_layer(
- self,
- existing_layer,
- new_layer):
+ def add_above_layer(self, existing_layer, new_layer):
"""Add a layer (e.g. impact layer) above another layer in the legend.
.. versionadded:: 3.2 | Use single line for method signature in add_above_layer as per @ismailsunni's PR review for #<I> |
diff --git a/spec/methods_spec.rb b/spec/methods_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/methods_spec.rb
+++ b/spec/methods_spec.rb
@@ -116,9 +116,9 @@ describe EnvExt::Methods do
end
end
- describe "#terminal" do
- it "should determine the current Terminal" do
- expect(subject.terminal).to eq(term)
+ describe "#term" do
+ it "should determine the current TERM" do
+ expect(subject.term).to eq(term)
end
context "when COLORTERM and TERM are set" do
@@ -130,11 +130,17 @@ describe EnvExt::Methods do
end
it "should check COLORTERM before the TERM variable" do
- expect(subject.terminal).to eq('gnome-terminal')
+ expect(subject.term).to eq('gnome-terminal')
end
end
end
+ describe "#terminal" do
+ it "should be an alias to #term" do
+ expect(subject.terminal).to be == subject.term
+ end
+ end
+
describe "#debug" do
it "should check if DEBUG was set" do
expect(subject).to be_debug | Added specs for Methods#term. |
diff --git a/lib/plugins/aws/provider/awsProvider.js b/lib/plugins/aws/provider/awsProvider.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/aws/provider/awsProvider.js
+++ b/lib/plugins/aws/provider/awsProvider.js
@@ -260,6 +260,11 @@ class AwsProvider {
].join('');
message = errorMessage;
userStats.track('user_awsCredentialsNotFound');
+ // We do not want to trigger the retry mechanism for credential errors
+ return BbPromise.reject(Object.assign(
+ new this.serverless.classes.Error(message, err.statusCode),
+ { providerError: _.assign({}, err, { retryable: false }) }
+ ));
}
return BbPromise.reject(Object.assign(
new this.serverless.classes.Error(message, err.statusCode), | Do not retry credential errors |
diff --git a/integration-cli/docker_api_swarm_test.go b/integration-cli/docker_api_swarm_test.go
index <HASH>..<HASH> 100644
--- a/integration-cli/docker_api_swarm_test.go
+++ b/integration-cli/docker_api_swarm_test.go
@@ -503,7 +503,8 @@ func (s *DockerSwarmSuite) TestAPISwarmManagerRestore(c *check.C) {
d3.RestartNode(c)
d3.GetService(c, id)
- d3.Kill()
+ err := d3.Kill()
+ assert.NilError(c, err)
time.Sleep(1 * time.Second) // time to handle signal
d3.StartNode(c)
d3.GetService(c, id) | Add missing error-check in TestAPISwarmManagerRestore |
diff --git a/src/main/org/codehaus/groovy/transform/AbstractASTTransformation.java b/src/main/org/codehaus/groovy/transform/AbstractASTTransformation.java
index <HASH>..<HASH> 100644
--- a/src/main/org/codehaus/groovy/transform/AbstractASTTransformation.java
+++ b/src/main/org/codehaus/groovy/transform/AbstractASTTransformation.java
@@ -140,7 +140,7 @@ public abstract class AbstractASTTransformation implements Opcodes, ASTTransform
}
public static boolean shouldSkip(String name, List<String> excludes, List<String> includes) {
- return excludes.contains(name) || deemedInternalName(name) || (!includes.isEmpty() && !includes.contains(name));
+ return (excludes != null && excludes.contains(name)) || deemedInternalName(name) || (includes != null && !includes.isEmpty() && !includes.contains(name));
}
public static boolean shouldSkipOnDescriptor(Map genericsSpec, String descriptor, List<ClassNode> excludeTypes, List<ClassNode> includeTypes) { | GROOVY-<I>: @Delegate should support including/excluding which methods are delegated to using an interface spec (handle super interfaces) |
diff --git a/src/Utils.php b/src/Utils.php
index <HASH>..<HASH> 100644
--- a/src/Utils.php
+++ b/src/Utils.php
@@ -680,9 +680,10 @@ class Utils
'Arg absolutePath contains . or .. directory part[' . $existing . '].'
);
}
- if (!mkdir($existing, $mode)) {
+ if (!file_exists($existing) && !mkdir($existing, $mode)) {
+ // @todo: We shouldn't need to ask file_exists() here.
throw new \RuntimeException(
- 'Failed to create dir[' . $existing . '] with mode[' . decoct($mode) . '.'
+ 'Failed to create dir[' . $existing . '] with mode[' . decoct($mode) . '].'
);
}
if ($group_write && !chmod($existing, $mode)) { | ensurePath() fixed, however not pretty. |
diff --git a/autograd/container_types.py b/autograd/container_types.py
index <HASH>..<HASH> 100644
--- a/autograd/container_types.py
+++ b/autograd/container_types.py
@@ -110,6 +110,15 @@ def dict_untake(x, idx, template):
dict_untake.defvjp(lambda g, ans, vs, gvs, x, idx, template : dict_take(g, idx))
dict_untake.defvjp_is_zero(argnums=(1, 2))
+def make_dict(pairs):
+ keys, vals = zip(*pairs)
+ return _make_dict(make_list(*keys), make_list(*vals))
+@primitive
+def _make_dict(keys, vals):
+ return dict(zip(keys, vals))
+_make_dict.defvjp(lambda g, ans, vs, gvs, keys, vals: [g[key] for key in keys],
+ argnum=1)
+
class DictVSpace(VSpace):
def __init__(self, value):
self.shape = {k : vspace(v) for k, v in iteritems(value)} | add container_types.make_dict, c.f. #<I>
no tests (since there are no tests for make_list or make_tuple either, though
we probably should add some) |
diff --git a/PromiseFileReader.js b/PromiseFileReader.js
index <HASH>..<HASH> 100644
--- a/PromiseFileReader.js
+++ b/PromiseFileReader.js
@@ -5,7 +5,7 @@ function readAs (file, as) {
return new Promise(function(resolve, reject) {
const reader = new FileReader()
reader.onload = function(e) { resolve(e.target.result) }
- reader.onerror = function(e) { reject('Error reading' + file.name + ': ' + e.target.result) }
+ reader.onerror = function(e) { reject(new Error('Error reading' + file.name + ': ' + e.target.result)) }
reader['readAs' + as](file)
})
} | Reject with Error instance (#7) |
diff --git a/src/BackgroundProcess.php b/src/BackgroundProcess.php
index <HASH>..<HASH> 100644
--- a/src/BackgroundProcess.php
+++ b/src/BackgroundProcess.php
@@ -64,7 +64,7 @@ class BackgroundProcess
if(count(preg_split("/\n/", $result)) > 2) {
return true;
}
- } catch(Exception $e) {}
+ } catch(\Exception $e) {}
return false;
}
@@ -81,7 +81,7 @@ class BackgroundProcess
if (!preg_match('/No such process/', $result)) {
return true;
}
- } catch (Exception $e) {}
+ } catch (\Exception $e) {}
return false;
} | Fix for calling Exception from within a namespace
Calling the Exception class from within a namespace has php assuming Exception is a class belonging to the namespace, can be fixed by prepending the class name with "\". |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -70,17 +70,22 @@ function telekit_cmd(telekit) {
let command = parse(context.update);
if (command) {
- if (command.entities[0].type == 'bot_command') {
- context.isCommand = true;
- context.command = command;
+ command.name = command.entities[0].name;
+ command.mention = command.entities[0].mention;
- telekit.emit('command', context);
- telekit.emit(`/${context.command.entities[0].name}`, context);
- if (telekit.command) telekit.command(context);
- telekit.middleware.transmit('command', context);
+ context.isCommand = true;
+ context.command = command;
- return;
+ telekit.emit('command', context);
+ telekit.emit(`/${context.command.entities[0].name}`, context);
+
+ if (telekit.command) {
+ telekit.command(context);
}
+
+ telekit.middleware.transmit('command', context);
+
+ return;
}
context.isCommand = false; | Changed: now `command` has access to first entity into `command.name` and `command.mention` |
diff --git a/lib/seory/runtime.rb b/lib/seory/runtime.rb
index <HASH>..<HASH> 100644
--- a/lib/seory/runtime.rb
+++ b/lib/seory/runtime.rb
@@ -1,5 +1,6 @@
# TODO move somewhere
require 'active_support/all'
+require 'seory'
module Seory
class Runtime
@@ -12,6 +13,10 @@ module Seory
@controller = controller
end
+ def assigns(name)
+ @controller.view_assigns[name.to_s]
+ end
+
Seory::CONTENTS.each do |name|
define_method(name) { calculate_content_for(name) }
end
diff --git a/spec/seory/runtime_spec.rb b/spec/seory/runtime_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/seory/runtime_spec.rb
+++ b/spec/seory/runtime_spec.rb
@@ -36,4 +36,14 @@ describe Seory::Runtime do
specify { expect(seory.title).to eq 'EDIT | My Site' }
end
end
+
+ context 'Access controller assigns(instance variables)' do
+ before do
+ allow(controller).to receive(:view_assigns).and_return('products' => [:products] * 42)
+
+ page_contents.define(:title) { "Good Shop with #{assigns(:products).size} products!" }
+ end
+
+ specify { expect(seory.title).to eq 'Good Shop with 42 products!' }
+ end
end | Add Runtime#assigns() to access controller ivar |
diff --git a/lib/GoCardless/Bill.php b/lib/GoCardless/Bill.php
index <HASH>..<HASH> 100644
--- a/lib/GoCardless/Bill.php
+++ b/lib/GoCardless/Bill.php
@@ -75,22 +75,4 @@ class GoCardless_Bill {
}
- /**
- * Create a bill under an existing pre-auth
- *
- * @param array $params Parameters to use to create the bill
- *
- * @return object The result of the cancel query
- */
- public function create($params) {
-
- $endpoint = self::$endpoint;
-
- $params['http_authorization'] = true;
-
- return new self($this->client, $this->client->request('post', $endpoint,
- $params));
-
- }
-
} | Remove unnecessary create function from Bill class
Bills must be created under a preauth so use the create_bill method of
the PreAuthorization class |
diff --git a/src/share/classes/com/sun/tools/javac/file/Locations.java b/src/share/classes/com/sun/tools/javac/file/Locations.java
index <HASH>..<HASH> 100644
--- a/src/share/classes/com/sun/tools/javac/file/Locations.java
+++ b/src/share/classes/com/sun/tools/javac/file/Locations.java
@@ -327,7 +327,9 @@ public class Locations {
*/
protected LocationHandler(Location location, OptionName... options) {
this.location = location;
- this.options = EnumSet.copyOf(Arrays.asList(options));
+ this.options = options.length == 0 ?
+ EnumSet.noneOf(OptionName.class):
+ EnumSet.copyOf(Arrays.asList(options));
}
// TODO: TEMPORARY, while Options still used for command line options | <I>: Java SE build fails on call to CreateSymbols
Reviewed-by: jjg |
diff --git a/test/ExerciseRunner/CgiRunnerTest.php b/test/ExerciseRunner/CgiRunnerTest.php
index <HASH>..<HASH> 100644
--- a/test/ExerciseRunner/CgiRunnerTest.php
+++ b/test/ExerciseRunner/CgiRunnerTest.php
@@ -351,7 +351,7 @@ class CgiRunnerTest extends PHPUnit_Framework_TestCase
$this->expectOutputString($exp);
$success = $this->runner->run(
- new Input('app', ['program' => '']),
+ new Input('app', ['program' => 'not-existing-file.php']),
$output
);
$this->assertFalse($success); | Some PHP versions are printing warnings if empty filename passed to cgi |
diff --git a/src/compiler/codegen/events.js b/src/compiler/codegen/events.js
index <HASH>..<HASH> 100644
--- a/src/compiler/codegen/events.js
+++ b/src/compiler/codegen/events.js
@@ -36,10 +36,10 @@ const modifierCode: { [key: string]: string } = {
export function genHandlers (
events: ASTElementHandlers,
- native: boolean,
+ isNative: boolean,
warn: Function
): string {
- let res = native ? 'nativeOn:{' : 'on:{'
+ let res = isNative ? 'nativeOn:{' : 'on:{'
for (const name in events) {
const handler = events[name]
// #5330: warn click.right, since right clicks do not actually fire click events. | avoid using native as identifier (close #<I>) |
diff --git a/autofit/optimize/non_linear/non_linear.py b/autofit/optimize/non_linear/non_linear.py
index <HASH>..<HASH> 100644
--- a/autofit/optimize/non_linear/non_linear.py
+++ b/autofit/optimize/non_linear/non_linear.py
@@ -61,11 +61,6 @@ class NonLinearOptimizer(object):
conf.instance.general.get('output', 'log_level', str).replace(" ", "").upper()]
try:
- os.makedirs(self.image_path)
- except FileExistsError:
- pass
-
- try:
os.makedirs(self.pdf_path)
except FileExistsError:
pass | don't make image_path dirs in nonlinear |
diff --git a/libraries/mako/Arr.php b/libraries/mako/Arr.php
index <HASH>..<HASH> 100644
--- a/libraries/mako/Arr.php
+++ b/libraries/mako/Arr.php
@@ -147,6 +147,23 @@ class Arr
{
return (bool) count(array_filter(array_keys($array), 'is_string'));
}
+
+ /**
+ * Returns an array of values from an array.
+ *
+ * @access public
+ * @param array $array Array to pluck from
+ * @param string $key Array key
+ * @return array
+ */
+
+ public static function pluck(array $array, $key)
+ {
+ return array_map(function($value) use ($key)
+ {
+ return is_object($value) ? $value->$key : $value[$key];
+ }, $array);
+ }
}
/** -------------------- End of file --------------------**/
\ No newline at end of file | Added Arr::pluck |
diff --git a/src/AccessControl/Authentication.php b/src/AccessControl/Authentication.php
index <HASH>..<HASH> 100644
--- a/src/AccessControl/Authentication.php
+++ b/src/AccessControl/Authentication.php
@@ -482,6 +482,27 @@ class Authentication
}
/**
+ * Hash or unset a password value from the user entity.
+ *
+ * @param Entity\Users $userEntity
+ *
+ * @return Entity\Users
+ */
+ public function hashUserPassword(Entity\Users $userEntity)
+ {
+ if ($userEntity->getPassword() && $userEntity->getPassword() !== '**dontchange**') {
+ // Hashstrength has a default of '10', don't allow less than '8'.
+ $hashStrength = max($this->app['config']->get('general/hash_strength'), 8);
+ $hasher = new PasswordHash($hashStrength, true);
+ $userEntity->setPassword($hasher->HashPassword($userEntity->getPassword()));
+ } else {
+ unset($userEntity->password);
+ }
+
+ return $userEntity;
+ }
+
+ /**
* Log out the currently logged in user.
*
* @return boolean | Make a public hashUserPassword() function available in
app['authentication'] |
diff --git a/master/buildbot/db/connector.py b/master/buildbot/db/connector.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/db/connector.py
+++ b/master/buildbot/db/connector.py
@@ -318,19 +318,6 @@ class DBConnector(service.MultiService):
# BuildRequest-manipulation methods
- def get_buildername_for_brid(self, brid):
- assert isinstance(brid, (int, long))
- return self.runInteractionNow(self._txn_get_buildername_for_brid, brid)
- def _txn_get_buildername_for_brid(self, t, brid):
- assert isinstance(brid, (int, long))
- t.execute(self.quoteq("SELECT buildername FROM buildrequests"
- " WHERE id=?"),
- (brid,))
- r = t.fetchall()
- if not r:
- return None
- return r[0][0]
-
# used by BuildRequestStatus.getBuilds
def get_buildnums_for_brid(self, brid):
return self.runInteractionNow(self._txn_get_buildnums_for_brid, brid) | remove now-unused get_buildername_for_brid |
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,10 +1,7 @@
require "simplecov"
require "codeclimate-test-reporter"
-unless ENV["SKIP_CODE_CLIMATE_TEST_REPORTER"] == "true"
- CodeClimate::TestReporter.start
-end
-
+CodeClimate::TestReporter.start
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter
] | Removing unnecessary test from spec_helper |
diff --git a/packages/spark-core/test/integration/spec/plugins/credentials.js b/packages/spark-core/test/integration/spec/plugins/credentials.js
index <HASH>..<HASH> 100644
--- a/packages/spark-core/test/integration/spec/plugins/credentials.js
+++ b/packages/spark-core/test/integration/spec/plugins/credentials.js
@@ -197,6 +197,29 @@ describe(`spark-core`, function() {
});
+ describe(`when the api responds with a 401`, () => {
+ it(`refreshes the access token`, () => {
+ const spark = new Spark({
+ credentials: {
+ authorization: user.token
+ }
+ });
+ const initialToken = user.token;
+ // eslint-disable-next-line camelcase
+ spark.credentials.authorization.access_token = `invalid`;
+ spark.request({
+ service: `conversation`,
+ method: `GET`,
+ resource: `build_info`
+ })
+ .then((res) => {
+ assert.equal(res.statusCode, 200);
+ assert.notEqual(spark.credentials.authorization.apiToken.access_token, initialToken);
+ });
+
+ });
+ });
+
});
});
}); | test(spark-core): prove that token refresh works |
diff --git a/pkglib/pkglib/setuptools/command/depgraph.py b/pkglib/pkglib/setuptools/command/depgraph.py
index <HASH>..<HASH> 100644
--- a/pkglib/pkglib/setuptools/command/depgraph.py
+++ b/pkglib/pkglib/setuptools/command/depgraph.py
@@ -142,7 +142,7 @@ class depgraph(Command, CommandMixin):
else:
import networkx
g = networkx.DiGraph()
- dependency.get_requirements_from_ws(working_set, g)
+ dependency.get_graph_from_ws(working_set, g)
if self.what_requires is not None:
g = self._filter_nodes_leading_to(g, self.what_requires) | Fixing incorrect name due to using old AHL name. |
diff --git a/lib/jsduck/render/subproperties.rb b/lib/jsduck/render/subproperties.rb
index <HASH>..<HASH> 100644
--- a/lib/jsduck/render/subproperties.rb
+++ b/lib/jsduck/render/subproperties.rb
@@ -55,6 +55,7 @@ module JsDuck
"<span class='pre'>#{p[:name]}</span> : ",
p[:html_type],
p[:optional] ? " (optional)" : "",
+ p[:new] ? render_new : "",
"<div class='sub-desc'>",
p[:doc],
p[:default] ? "<p>Defaults to: <code>#{Util::HTML.escape(p[:default])}</code></p>" : "",
@@ -65,6 +66,17 @@ module JsDuck
]
end
+ def render_new
+ signature = TagRegistry.get_by_name(:new).signature
+ return [
+ "<span class='signature'>",
+ "<span class='new' title='#{signature[:tooltip]}'>",
+ signature[:long],
+ "</span>",
+ "</span>",
+ ]
+ end
+
def render_since(param)
TagRegistry.get_by_name(:since).to_html(param)
end | Display @new star next to new parameters. |
diff --git a/test/src/test/java/hudson/tasks/junit/JUnitResultArchiverTest.java b/test/src/test/java/hudson/tasks/junit/JUnitResultArchiverTest.java
index <HASH>..<HASH> 100644
--- a/test/src/test/java/hudson/tasks/junit/JUnitResultArchiverTest.java
+++ b/test/src/test/java/hudson/tasks/junit/JUnitResultArchiverTest.java
@@ -37,6 +37,7 @@ import org.jvnet.hudson.test.recipes.LocalData;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import static org.junit.Assert.*;
+import org.junit.Assume;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -76,6 +77,7 @@ public class JUnitResultArchiverTest {
@LocalData
@Test public void slave() throws Exception {
+ Assume.assumeFalse("TimeoutException from basic", "https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/".equals(System.getenv("JOB_URL")));
DumbSlave s = j.createOnlineSlave();
project.setAssignedLabel(s.getSelfLabel()); | Skipping slave test on PR builder since it often fails. |
diff --git a/includes/extras/functions.en.php b/includes/extras/functions.en.php
index <HASH>..<HASH> 100644
--- a/includes/extras/functions.en.php
+++ b/includes/extras/functions.en.php
@@ -44,8 +44,3 @@ function ordinal_suffix_en($n) {
return 'rd';
return 'th';
}
-
-function century_localisation_en($n) {
- return $n.ordinal_suffix_en($n);
-}
-?>
diff --git a/includes/extras/functions.pl.php b/includes/extras/functions.pl.php
index <HASH>..<HASH> 100644
--- a/includes/extras/functions.pl.php
+++ b/includes/extras/functions.pl.php
@@ -194,18 +194,3 @@ function getFirstRelationsName_pl($pid) {
if (!empty($pname)) return trim($pname);
else return $fname;
}
-
-function century_localisation_pl($n, $show=true) {
- $arab = array(1, 4, 5, 9, 10);
- $roman = array("I", "IV", "V", "IX", "X");
- $roman_century = "";
- for ($i=4; $i>=0; $i--) {
- while ($n>=$arab[$i]) {
- $n-=$arab[$i];
- $roman_century .= $roman[$i];
- }
- }
- if ($show) return $roman_century." w.";
- else return $roman_century;
-}
-?> | Remove old century_localisation_XX functions. This is now translated using gettext() |
diff --git a/src/elements/db/SuperTableBlockQuery.php b/src/elements/db/SuperTableBlockQuery.php
index <HASH>..<HASH> 100644
--- a/src/elements/db/SuperTableBlockQuery.php
+++ b/src/elements/db/SuperTableBlockQuery.php
@@ -10,6 +10,7 @@ use Craft;
use craft\base\Element;
use craft\base\ElementInterface;
use craft\base\Field;
+use craft\db\Table;
use craft\db\Query;
use craft\elements\db\ElementQuery;
use craft\helpers\Db;
@@ -272,6 +273,17 @@ class SuperTableBlockQuery extends ElementQuery
$this->subQuery->andWhere(Db::parseParam('supertableblocks.typeId', $this->typeId));
}
+ // Ignore revision/draft blocks by default
+ if (!$this->id && !$this->ownerId) {
+ // todo: we will need to expand on this when Super Table blocks can be nested.
+ $this->subQuery
+ ->innerJoin(Table::ELEMENTS . ' owners', '[[owners.id]] = [[supertableblocks.ownerId]]')
+ ->andWhere([
+ 'owners.draftId' => null,
+ 'owners.revisionId' => null,
+ ]);
+ }
+
return parent::beforePrepare();
} | Block queries no longer include blocks owned by drafts or revisions by default. |
diff --git a/ipyxact/ipxact_yaml.py b/ipyxact/ipxact_yaml.py
index <HASH>..<HASH> 100644
--- a/ipyxact/ipxact_yaml.py
+++ b/ipyxact/ipxact_yaml.py
@@ -66,6 +66,12 @@ enumeratedValue:
enumeratedValues:
CHILDREN:
- enumeratedValue
+reset:
+ MEMBERS:
+ value: IpxactInt
+resets:
+ CHILD:
+ - reset
field:
MEMBERS:
name: str
@@ -73,9 +79,12 @@ field:
bitOffset: IpxactInt
bitWidth: IpxactInt
modifiedWriteValue: str
+ readAction: str
testable: str
volatile: IpxactBool
access: str
+ CHILD:
+ - resets
CHILDREN:
- enumeratedValues
file: | Additional fields in YAML was added |
diff --git a/identify/identify.py b/identify/identify.py
index <HASH>..<HASH> 100644
--- a/identify/identify.py
+++ b/identify/identify.py
@@ -136,7 +136,7 @@ def parse_shebang(bytesio):
return ()
first_line = bytesio.readline()
try:
- first_line = first_line.decode('US-ASCII')
+ first_line = first_line.decode('UTF-8')
except UnicodeDecodeError:
return () | Use UTF-8 to decode the shebang line |
diff --git a/packages/origin.js/src/ipfs-service.js b/packages/origin.js/src/ipfs-service.js
index <HASH>..<HASH> 100644
--- a/packages/origin.js/src/ipfs-service.js
+++ b/packages/origin.js/src/ipfs-service.js
@@ -87,8 +87,15 @@ class IpfsService {
reject('Got ipfs cat stream err:' + err)
})
stream.on('end', () => {
- this.mapCache.set(ipfsHashStr, res)
- resolve(res)
+ let parsedResponse;
+ try {
+ parsedResponse = JSON.parse(res)
+ } catch (error) {
+ reject(`Failed to parse response JSON: ${error}`)
+ return;
+ }
+ this.mapCache.set(ipfsHashStr, parsedResponse)
+ resolve(parsedResponse)
})
})
}) | Parse JSON after retrieving from IPFS |
diff --git a/src/test/java/org/jbake/template/ModelExtractorsTest.java b/src/test/java/org/jbake/template/ModelExtractorsTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/jbake/template/ModelExtractorsTest.java
+++ b/src/test/java/org/jbake/template/ModelExtractorsTest.java
@@ -91,13 +91,13 @@ public class ModelExtractorsTest {
ModelExtractors.getInstance().registerExtractorsForCustomTypes(newDocumentType);
//expect:
- assertThat(ModelExtractors.getInstance().keySet().size()).isEqualTo(16);
+ assertThat(ModelExtractors.getInstance().keySet().size()).isEqualTo(17);
//when:
ModelExtractors.getInstance().reset();
//then:
- assertThat(ModelExtractors.getInstance().keySet().size()).isEqualTo(14);
+ assertThat(ModelExtractors.getInstance().keySet().size()).isEqualTo(15);
}
} | Updated ModelExtractorsTest to reflect the new model extractor being
that has been added. |
diff --git a/spec/unit/api_spec.rb b/spec/unit/api_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/api_spec.rb
+++ b/spec/unit/api_spec.rb
@@ -43,7 +43,7 @@ describe WebMock::API do
end
end
- context "when args are an emtpy hash" do
+ context "when args are an empty hash" do
subject {klass.new.hash_including({})}
it "creates 'HashIncludingMatcher' with an empty hash" do
@@ -72,4 +72,4 @@ describe WebMock::API do
end
end
-end
\ No newline at end of file
+end | Tweaked a spelling mistake in a test context |
diff --git a/src/RestResources/Users/MeResource.php b/src/RestResources/Users/MeResource.php
index <HASH>..<HASH> 100644
--- a/src/RestResources/Users/MeResource.php
+++ b/src/RestResources/Users/MeResource.php
@@ -22,18 +22,16 @@ use Rhubarb\Scaffolds\Saas\Landlord\LoginProviders\SaasLoginProvider;
class MeResource extends UserResource
{
- private $user;
-
- public function __construct($resourceIdentifier = null, $parentResource = null)
+ public function __construct($parentResource = null)
{
- parent::__construct($resourceIdentifier, $parentResource);
+ parent::__construct($parentResource);
// If the user is authenticated we can simply get the logged in model. Otherwise this
// will throw an exception.
$login = new SaasLoginProvider();
- $this->user = $login->getModel();
+ $this->model = $login->getModel();
- $this->_id = $this->user->UniqueIdentifier;
+ $this->_id = $this->model->UniqueIdentifier;
}
protected function getColumns()
@@ -43,9 +41,4 @@ class MeResource extends UserResource
return $columns;
}
-
- public function getModel()
- {
- return $this->user;
- }
}
\ No newline at end of file | fix for me resource returnign a collection? |
diff --git a/scan/lib/scan/version.rb b/scan/lib/scan/version.rb
index <HASH>..<HASH> 100644
--- a/scan/lib/scan/version.rb
+++ b/scan/lib/scan/version.rb
@@ -1,4 +1,4 @@
module Scan
- VERSION = "0.10.1"
+ VERSION = "0.11.0"
DESCRIPTION = "The easiest way to run tests of your iOS and Mac app"
end | [scan] Version bump (#<I>)
* [scan] Version bump
* [scan] Add automatic detection of derived data path (#<I>)
* [scan] Skip showing GitHub issues for build errors (#<I>)
* [scan] Version bump |
diff --git a/packages/@vue/cli-service/generator/index.js b/packages/@vue/cli-service/generator/index.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service/generator/index.js
+++ b/packages/@vue/cli-service/generator/index.js
@@ -66,4 +66,9 @@ module.exports = (api, options) => {
devDependencies: deps[options.cssPreprocessor]
})
}
+
+ // additional tooling configurations
+ if (options.configs) {
+ api.extendPackage(options.configs)
+ }
}
diff --git a/packages/@vue/cli/lib/options.js b/packages/@vue/cli/lib/options.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli/lib/options.js
+++ b/packages/@vue/cli/lib/options.js
@@ -15,7 +15,8 @@ const presetSchema = createSchema(joi => joi.object().keys({
router: joi.boolean(),
vuex: joi.boolean(),
cssPreprocessor: joi.string().only(['sass', 'less', 'stylus']),
- plugins: joi.object().required()
+ plugins: joi.object().required(),
+ configs: joi.object()
}))
const schema = createSchema(joi => joi.object().keys({ | feat: allow specifying additional configs in preset |
diff --git a/docs/build/search.js b/docs/build/search.js
index <HASH>..<HASH> 100644
--- a/docs/build/search.js
+++ b/docs/build/search.js
@@ -25,7 +25,7 @@ const createFolder = (folder) => {
}
const createIndex = (data) => {
- const requiredFields = [ levelName + '0', levelName + '1', 'url' ]
+ const requiredFields = [ levelName + '0', 'url' ]
const missingFields = requiredFields.filter(
(requiredField) => !data[ requiredField ]
)
@@ -275,8 +275,7 @@ const processChildren = (parent, entry, entries, level) => {
const processMenuItem = (menuItem, entries, level = 0) => {
const entryItem = {
- [ levelName + '0' ]: 'Documentation',
- [ levelName + '1' ]: menuItem.name,
+ [ levelName + level ]: menuItem.name,
content: '',
anchor: '',
url: '/' + menuItem.path | feat(docs): additional change to search |
diff --git a/constructs/digraph.py b/constructs/digraph.py
index <HASH>..<HASH> 100644
--- a/constructs/digraph.py
+++ b/constructs/digraph.py
@@ -55,18 +55,24 @@ class DirectedGraph(object):
else:
yield (u, v)
- def successors_iter(self, node):
+ def successors_iter(self, node, include_data=False):
if not self.has_node(node):
raise ValueError("Node %r not found" % (node))
- for succ in six.iterkeys(self._adj[node]):
- yield succ
+ for (succ, data) in six.iteritems(self._adj[node]):
+ if include_data:
+ yield (succ, data)
+ else:
+ yield succ
- def predecessors_iter(self, node):
+ def predecessors_iter(self, node, include_data=False):
if not self.has_node(node):
raise ValueError("Node %r not found" % (node))
for (pred, connected_to) in six.iteritems(self._adj):
if node in connected_to:
- yield pred
+ if include_data:
+ yield (pred, connected_to[node])
+ else:
+ yield pred
def remove_node(self, node):
if not self.has_node(node): | Allow pred/succ to return data |
diff --git a/docs/source/conf.py b/docs/source/conf.py
index <HASH>..<HASH> 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -14,6 +14,8 @@
import os
+import haas._version
+
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -57,9 +59,9 @@ copyright = u'2013-2014, Simon Jagoe'
# built documents.
#
# The short X.Y version.
-version = '0.5'
+version = haas._version.version
# The full version, including alpha/beta/rc tags.
-release = '0.5.0.dev'
+release = haas._version.full_version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. | use generated version in docs config |
diff --git a/src/Core/Router.php b/src/Core/Router.php
index <HASH>..<HASH> 100644
--- a/src/Core/Router.php
+++ b/src/Core/Router.php
@@ -218,6 +218,7 @@ class Router
case HttpMethods::PATCH:
$data = $this->cypher->decode(file_get_contents('php://input'));
parse_str($data, $patchData);
+ $patchData = array_merge($_GET, $patchData);
return $patchData ?: [];
break; | add get params in post request |
diff --git a/c7n/resources/asg.py b/c7n/resources/asg.py
index <HASH>..<HASH> 100644
--- a/c7n/resources/asg.py
+++ b/c7n/resources/asg.py
@@ -31,7 +31,7 @@ from c7n.filters import (
from c7n.manager import resources
from c7n.query import QueryResourceManager
-from c7n.offhours import Time, OffHour, OnHour
+from c7n.offhours import OffHour, OnHour
from c7n.tags import TagActionFilter, DEFAULT_TAG, TagCountFilter, TagTrim
from c7n.utils import (
local_session, query_instances, type_schema, chunks, get_retry)
@@ -41,8 +41,6 @@ log = logging.getLogger('custodian.asg')
filters = FilterRegistry('asg.filters')
actions = ActionRegistry('asg.actions')
-
-filters.register('time', Time)
filters.register('offhour', OffHour)
filters.register('onhour', OnHour)
filters.register('tag-count', TagCountFilter) | get rid of time filter, it wasnt usable directly and was causing overly lax schema validation (#<I>) |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -322,7 +322,7 @@ slackAPI.prototype.getSlackData = function() {
};
slackAPI.prototype.sendTyping = function(channel) {
- sendSock({'type': 'typing', channel: channel});
+ this.sendSock({'type': 'typing', channel: channel});
return this;
}; | Fixed issue with sendTyping prototype method |
diff --git a/lib/softlayer/NetworkStorage.rb b/lib/softlayer/NetworkStorage.rb
index <HASH>..<HASH> 100644
--- a/lib/softlayer/NetworkStorage.rb
+++ b/lib/softlayer/NetworkStorage.rb
@@ -260,24 +260,13 @@ module SoftLayer
end
if options_hash[:network_storage_server_type]
- [ :datacenter, :domain, :hostname ].each do |option|
+ [ :datacenter, :domain, :hostname, :tags ].each do |option|
if options_hash[option]
network_storage_object_filter.modify do |filter|
filter.accept(option_to_filter_path[option].call(network_storage_type, options_hash[:network_storage_server_type])).when_it is(options_hash[option])
end
end
end
-
- if options_hash[:tags]
- network_storage_object_filter.set_criteria_for_key_path(option_to_filter_path[:tags].call(network_storage_type, options_hash[:network_storage_server_type]),
- {
- 'operation' => 'in',
- 'options' => [{
- 'name' => 'data',
- 'value' => options_hash[:tags].collect{ |tag_value| tag_value.to_s }
- }]
- })
- end
end
account_service = softlayer_client[:Account] | Update ObjectFilter usage in NetworkStorage to accommodate the new object filters that was missed in the last round of cleanup |
diff --git a/examples/fluidsim/fluidsim.py b/examples/fluidsim/fluidsim.py
index <HASH>..<HASH> 100644
--- a/examples/fluidsim/fluidsim.py
+++ b/examples/fluidsim/fluidsim.py
@@ -79,11 +79,12 @@ def plot_matrix(ax, mat, t, render=False):
if __name__ == '__main__':
simulation_timesteps = 100
+ basepath = os.path.dirname(__file__)
print("Loading initial and target states...")
- init_smoke = imread('init_smoke.png')[:,:,0]
+ init_smoke = imread(os.path.join(basepath, 'init_smoke.png'))[:,:,0]
#target = imread('peace.png')[::2,::2,3]
- target = imread('skull.png')[::2,::2]
+ target = imread(os.path.join(basepath, 'skull.png'))[::2,::2]
rows, cols = target.shape
init_dx_and_dy = np.zeros((2, rows, cols)).ravel() | make examples/fluidsim/fluidsim.py work by fixing data file path generation |
diff --git a/lib/connections/service.go b/lib/connections/service.go
index <HASH>..<HASH> 100644
--- a/lib/connections/service.go
+++ b/lib/connections/service.go
@@ -713,7 +713,7 @@ func (s *service) ConnectionStatus() map[string]ConnectionStatusEntry {
}
func (s *service) setConnectionStatus(address string, err error) {
- if errors.Cause(err) != context.Canceled {
+ if errors.Cause(err) == context.Canceled {
return
} | lib/connections: Actually record connection errors (#<I>) |
diff --git a/src/Illuminate/Support/ClassLoader.php b/src/Illuminate/Support/ClassLoader.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Support/ClassLoader.php
+++ b/src/Illuminate/Support/ClassLoader.php
@@ -28,7 +28,7 @@ class ClassLoader {
foreach (static::$directories as $directory)
{
- if (file_exists($path = $directory.'/'.$class))
+ if (file_exists($path = $directory.DIRECTORY_SEPARATOR.$class))
{
require_once $path; | Using the directory separator consistently through the autoloader. |
diff --git a/index.php b/index.php
index <HASH>..<HASH> 100644
--- a/index.php
+++ b/index.php
@@ -985,14 +985,6 @@ if ( $show_page_layout )
$tpl->setVariable( "site", $site );
- if ( isset( $tpl_vars ) and is_array( $tpl_vars ) )
- {
- foreach( $tpl_vars as $tpl_var_name => $tpl_var_value )
- {
- $tpl->setVariable( $tpl_var_name, $tpl_var_value );
- }
- }
-
if ( $ini->variable( 'DebugSettings', 'DisplayDebugWarnings' ) == 'enabled' )
{
// Make sure any errors or warnings are reported | Removed: unused code since late <I>
Variable $tpl_vars is not defined anymore since 9a<I>b<I>dfa<I>eb<I>f<I>ab9ed<I>c<I>d0fd |
diff --git a/src/main/java/hex/gbm/DTree.java b/src/main/java/hex/gbm/DTree.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hex/gbm/DTree.java
+++ b/src/main/java/hex/gbm/DTree.java
@@ -720,7 +720,7 @@ public class DTree extends Iced {
if( cm != null && domain != null ) {
// Top row of CM
assert cm._arr.length==domain.length;
- DocGen.HTML.section(sb,"Confusion Matrix");
+ DocGen.HTML.title(sb,"Scoring");
if( testKey == null ) {
if (_have_cv_results)
sb.append("<div class=\"alert\">Reported on ").append(num_folds).append("-fold cross-validated training data</div>");
@@ -734,8 +734,11 @@ public class DTree extends Iced {
rs.replace("key", testKey);
DocGen.HTML.paragraph(sb,rs.toString());
}
- // generate HTML for CM
- cm.toHTML(sb, domain);
+ if (validAUC == null) { //AUC shows the CM already
+ // generate HTML for CM
+ DocGen.HTML.section(sb, "Confusion Matrix");
+ cm.toHTML(sb, domain);
+ }
}
if( errs != null ) { | Avoid displaying the CM twice for binary classifiers. |
diff --git a/structr-ui/src/main/resources/structr/js/flow-editor/src/js/editor/FlowSockets.js b/structr-ui/src/main/resources/structr/js/flow-editor/src/js/editor/FlowSockets.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/flow-editor/src/js/editor/FlowSockets.js
+++ b/structr-ui/src/main/resources/structr/js/flow-editor/src/js/editor/FlowSockets.js
@@ -13,7 +13,7 @@ export class FlowSockets {
let dataSource = new D3NE.Socket('dataSource', 'Data Source Node', 'The connected node will provide data for this node.');
let dataSources = new D3NE.Socket('dataSources', 'Data Source Nodes', 'The connected nodes will provide data for this node.');
- let dataTarget = new D3NE.Socket('dataTarget', 'Data Target Node', 'Connect to a node\'s prev port.');
+ let dataTarget = new D3NE.Socket('dataTarget', 'Data Target Node', 'Connect to a node\'s DataSource port.');
dataTarget.combineWith(dataSource);
dataTarget.combineWith(dataSources);
this._sockets['dataSource'] = dataSource; | Fixes error in socket description of flow node. |
diff --git a/tests/JoliTypo/Tests/FrenchTest.php b/tests/JoliTypo/Tests/FrenchTest.php
index <HASH>..<HASH> 100644
--- a/tests/JoliTypo/Tests/FrenchTest.php
+++ b/tests/JoliTypo/Tests/FrenchTest.php
@@ -8,7 +8,7 @@ class FrenchTest extends \PHPUnit_Framework_TestCase
const TOFIX = <<<TOFIX
<p>Ceci est à remplacer par une fâble :p</p>
-<pre>Oh, du "code"!</pre>
+<pre>Oh, du "code" encodé, mais pas double encodé: &!</pre>
<p>Le mec a fini sa course en 2'33" contre 2'44" pour le second !</p>
@@ -26,7 +26,7 @@ TOFIX;
const FIXED = <<<FIXED
<p>Ceci est à remplacer par une fâble :p</p>
-<pre>Oh, du "code"!</pre>
+<pre>Oh, du "code" encodé, mais pas double encodé: &!</pre>
<p>Le mec a fini sa course en 2'33" contre 2'44" pour le second !</p> | Add a little test on double encoding [\DOMDocument is stressing me] |
diff --git a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/ExecuteCommand.php b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/ExecuteCommand.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/ExecuteCommand.php
+++ b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/ExecuteCommand.php
@@ -92,7 +92,7 @@ EOT
}
if ($execute) {
- $version->execute($direction, (boolean) $input->getOption('dry-run'));
+ $version->execute($direction, (boolean) $input->getOption('dry-run'), $timeAllqueries);
} else {
$output->writeln('<error>Migration cancelled!</error>');
} | fix for bug
It was not possible to call the time all queries option with the
execute command because the option was not passed to the Version
Class. |
diff --git a/lib/strong_migrations.rb b/lib/strong_migrations.rb
index <HASH>..<HASH> 100644
--- a/lib/strong_migrations.rb
+++ b/lib/strong_migrations.rb
@@ -143,7 +143,7 @@ Otherwise, remove the force option.",
execute call, so cannot help you here. Please make really sure that what
you're doing is safe before proceeding, then wrap it in a safety_assured { ... } block.",
- change_column_null:
+ change_column_null:
"Passing a default value to change_column_null runs a single UPDATE query,
which can cause downtime. Instead, backfill the existing rows in the
Rails console or a separate migration with disable_ddl_transaction!.
@@ -156,7 +156,7 @@ class Backfill%{migration_name} < ActiveRecord::Migration%{migration_suffix}
end
end",
- add_foreign_key:
+ add_foreign_key:
"New foreign keys are validated by default. This acquires an AccessExclusiveLock,
which is expensive on large tables. Instead, validate it in a separate migration
with a more agreeable RowShareLock. | Fixed indentation [skip ci] |
diff --git a/test/test_ssl.py b/test/test_ssl.py
index <HASH>..<HASH> 100644
--- a/test/test_ssl.py
+++ b/test/test_ssl.py
@@ -6,7 +6,7 @@ Unit tests for L{OpenSSL.SSL}.
from sys import platform
from socket import socket
-from os import makedirs, symlink
+from os import makedirs
from os.path import join
from unittest import main
@@ -223,15 +223,13 @@ class ContextTests(TestCase):
"""
capath = self.mktemp()
makedirs(capath)
- cafile = join(capath, 'cert.pem')
+ # Hash value computed manually with c_rehash to avoid depending on
+ # c_rehash in the test suite.
+ cafile = join(capath, 'c7adac82.0')
fObj = file(cafile, 'w')
fObj.write(cleartextCertificatePEM)
fObj.close()
- # Hash value computed manually with c_rehash to avoid depending on
- # c_rehash in the test suite.
- symlink('cert.pem', join(capath, 'c7adac82.0'))
-
self._load_verify_locations_test(None, capath) | Avoid using symlink, since we cannot use it on windows |
diff --git a/src/generateDoc.js b/src/generateDoc.js
index <HASH>..<HASH> 100644
--- a/src/generateDoc.js
+++ b/src/generateDoc.js
@@ -79,11 +79,15 @@ module.exports = async function generateDoc(pushToGithub) {
builtDocs = true;
}
}
+ }
- if (pushToGithub && builtDocs) {
+ if (builtDocs) {
+ console.log('Successfully built docs');
+ if (pushToGithub) {
await execa('git', ['add', 'docs']);
await execa('git', ['commit', '-m', 'doc: rebuild docs [ci skip]']);
await execa('git', ['push', 'origin', 'master']);
+ console.log('Committed and pushed to GitHub');
}
}
}; | fix: also publish custom-built docs |
diff --git a/porunga/tests/test_main.py b/porunga/tests/test_main.py
index <HASH>..<HASH> 100644
--- a/porunga/tests/test_main.py
+++ b/porunga/tests/test_main.py
@@ -9,7 +9,7 @@ class TestManager(unittest.TestCase):
manager = get_manager()
commands = manager.get_commands()
- self.assertIn('test', commands)
+ self.assertTrue('test' in commands)
test_command = commands['test']
- self.assertIsInstance(test_command, PorungaTestCommand)
+ self.assertTrue(isinstance(test_command, PorungaTestCommand)) | Test updated to work with Python <I> |
diff --git a/lib/pkgcloud/core/compute/bootstrapper.js b/lib/pkgcloud/core/compute/bootstrapper.js
index <HASH>..<HASH> 100644
--- a/lib/pkgcloud/core/compute/bootstrapper.js
+++ b/lib/pkgcloud/core/compute/bootstrapper.js
@@ -178,6 +178,11 @@ Bootstrapper.prototype.createServer = function (options) {
createOptions.flavor = options.flavorId;
}
+ // XXX(mmalecki): DigitalOcean-specific
+ if (options.keyIds) {
+ createOptions.keyIds = options.keyIds;
+ }
+
//
// Remark: If there are any parameters specific to this
// compute provider then set them appropriately before
diff --git a/lib/pkgcloud/digitalocean/compute/client/servers.js b/lib/pkgcloud/digitalocean/compute/client/servers.js
index <HASH>..<HASH> 100644
--- a/lib/pkgcloud/digitalocean/compute/client/servers.js
+++ b/lib/pkgcloud/digitalocean/compute/client/servers.js
@@ -115,6 +115,11 @@ exports.createServer = function createServer(options, callback) {
? options.image.id
: options.image;
+ // XXX(mmalecki) Integrate with existing keys API
+ if (options.keyIds) {
+ createOptions.qs.ssh_key_ids = options.keyIds.join(',');
+ }
+
return this.request(createOptions, function (err, body, res) {
return err
? callback(err) | [api] Pass `ssh_key_ids` to DigitalOcean |
diff --git a/provider.go b/provider.go
index <HASH>..<HASH> 100644
--- a/provider.go
+++ b/provider.go
@@ -124,6 +124,15 @@ func Provide(c *gin.Context) {
return
}
if task, err := getMesosTask(reqParams.TaskId); err == nil {
+ if len(task.Statuses) == 0 {
+ atomic.AddInt32(&state.Stats.Denied, 1)
+ c.JSON(403, struct {
+ Status string `json:"status"`
+ Ok bool `json:"ok"`
+ Error string `json:"error"`
+ }{string(state.Status), false, errTaskNotFresh.Error()})
+ return
+ }
startTime := time.Unix(0, int64(task.Statuses[len(task.Statuses)-1].Timestamp*1000000000))
if time.Now().Sub(startTime) > config.MaxTaskLife {
atomic.AddInt32(&state.Stats.Denied, 1) | If task has no status, deny the request. |
diff --git a/features/lib/step_definitions/profile_steps.rb b/features/lib/step_definitions/profile_steps.rb
index <HASH>..<HASH> 100644
--- a/features/lib/step_definitions/profile_steps.rb
+++ b/features/lib/step_definitions/profile_steps.rb
@@ -1,5 +1,5 @@
Given /^the following profiles? (?:are|is) defined:$/ do |profiles|
- step 'a file named "cucumber.yml" with:', profiles
+ write_file 'cucumber.yml', profiles
end
Then /^the (.*) profile should be used$/ do |profile| | Use the Aruba API instead of a step in a step def |
diff --git a/dashboard/app/lib/javascripts/dashboard/routers/apps.js b/dashboard/app/lib/javascripts/dashboard/routers/apps.js
index <HASH>..<HASH> 100644
--- a/dashboard/app/lib/javascripts/dashboard/routers/apps.js
+++ b/dashboard/app/lib/javascripts/dashboard/routers/apps.js
@@ -32,8 +32,9 @@ Dashboard.routers.Apps = Marbles.Router.createClass({
// and allow them to expire when navigating away
var view = Dashboard.primaryView;
if (view && view.isMounted() && view.constructor.displayName === "Views.App") {
- if (view.state.app) {
- var appMeta = view.state.app.meta;
+ var app = view.state.app;
+ var appMeta = app ? app.meta : null;
+ if (app && appMeta) {
if (event.nextHandler.router === this) {
if (view.props.selectedTab !== event.nextParams[0].shtab) {
if (view.props.selectedTab === "pulls") { | dashboard: Fix apps router: not all apps have meta |
diff --git a/src/Robo/Tasks/DrushTask.php b/src/Robo/Tasks/DrushTask.php
index <HASH>..<HASH> 100644
--- a/src/Robo/Tasks/DrushTask.php
+++ b/src/Robo/Tasks/DrushTask.php
@@ -249,6 +249,9 @@ class DrushTask extends CommandStack {
$this->options[$correspondingCommand] = $this->arguments;
$this->arguments = '';
}
+ elseif (isset($this->arguments) && !empty($this->arguments)) {
+ throw new TaskException($this, "A drush command must be added to the stack before setting arguments: {$this->arguments}");
+ }
}
/**
@@ -281,7 +284,7 @@ class DrushTask extends CommandStack {
* Overriding CommandArguments::option to default option separator to '='.
*/
public function option($option, $value = NULL, $separator = '=') {
- $this->traitOption($option, $value, $separator);
+ return $this->traitOption($option, $value, $separator);
}
/** | Halt task execution when options set before drush command. (#<I>)
* Return $this in override of option method in drush task.
* Halt task execution when options set before drush command. |
diff --git a/webpack.prod.config.js b/webpack.prod.config.js
index <HASH>..<HASH> 100644
--- a/webpack.prod.config.js
+++ b/webpack.prod.config.js
@@ -42,7 +42,7 @@ module.exports = {
entry: {
'polyfills': './src/polyfills.ts',
'vendor': './src/vendor.ts',
- 'main': './src/main.ts'
+ 'app': './src/main.ts'
},
// Config for our build files | chore(webpack.prod): correct app designation |
diff --git a/Configuration/TCA/Overrides/tt_address.php b/Configuration/TCA/Overrides/tt_address.php
index <HASH>..<HASH> 100644
--- a/Configuration/TCA/Overrides/tt_address.php
+++ b/Configuration/TCA/Overrides/tt_address.php
@@ -1,5 +1,14 @@
<?php
defined('TYPO3_MODE') or die();
-// Enable language synchronisation for the category field
-$GLOBALS['TCA']['tt_address']['columns']['categories']['config']['behaviour']['allowLanguageSynchronization'] = true;
+call_user_func(static function () {
+ // Enable language synchronisation for the category field
+ $GLOBALS['TCA']['tt_address']['columns']['categories']['config']['behaviour']['allowLanguageSynchronization'] = true;
+
+ $versionInformation = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class);
+ if ($versionInformation->getMajorVersion() === 11) {
+ $GLOBALS['TCA']['tt_address']['columns']['sys_language_uid']['config'] = [
+ 'type' => 'language'
+ ];
+ }
+}); | [TASK] Use TCA type language in TYPO3 <I> |
diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php
index <HASH>..<HASH> 100644
--- a/system/Database/BaseBuilder.php
+++ b/system/Database/BaseBuilder.php
@@ -214,6 +214,14 @@ class BaseBuilder
protected $binds = [];
/**
+ * Collects the key count for named parameters
+ * in the Query object.
+ *
+ * @var array
+ */
+ protected $bindsKeyCount = [];
+
+ /**
* Some databases, like SQLite, do not by default
* allow limiting of delete clauses.
*
@@ -3402,12 +3410,11 @@ class BaseBuilder
return $key;
}
- $count = 0;
-
- while (array_key_exists($key . $count, $this->binds))
+ if (!array_key_exists($key, $this->bindsKeyCount))
{
- ++$count;
+ $this->bindsKeyCount[$key] = 0;
}
+ $count = $this->bindsKeyCount[$key]++;
$this->binds[$key . $count] = [
$value, | Fix insert key binding performance issue in BaseBuilder::setBinding function |
diff --git a/cmd/cmd.go b/cmd/cmd.go
index <HASH>..<HASH> 100644
--- a/cmd/cmd.go
+++ b/cmd/cmd.go
@@ -281,7 +281,7 @@ Options:
}
dir, _ := client.ExpandUser(args["--path"].(string))
// create the target dir if necessary
- if err := os.MkdirAll(dir, 0700); err != nil {
+ if err := os.MkdirAll(dir, 0755); err != nil {
return err
}
// download and save the unit files to the specified path
@@ -312,7 +312,7 @@ Options:
if err != nil {
return err
}
- if err = ioutil.WriteFile(dest, data, 0600); err != nil {
+ if err = ioutil.WriteFile(dest, data, 0644); err != nil {
return err
}
fmt.Printf("Refreshed %s from %s\n", unit, branch) | fix(cmd): create unit files as readable to all users |
diff --git a/scripts/build-min.js b/scripts/build-min.js
index <HASH>..<HASH> 100644
--- a/scripts/build-min.js
+++ b/scripts/build-min.js
@@ -54,7 +54,7 @@ async function build() {
});
const esUnminResult = minify({
- [srcName]: esModule.code
+ [esUnminName]: esModule.code
}, {
warnings: 'verbose',
ecma: 5,
@@ -71,7 +71,7 @@ async function build() {
});
const esMinResult = minify({
- [srcName]: esUnminResult.code
+ [esUnminName]: esUnminResult.code
}, {
warnings: 'verbose',
ecma: 5,
@@ -96,7 +96,7 @@ async function build() {
});
const umdUnminResult = minify({
- [srcName]: umdModule.code
+ [umdUnminName]: umdModule.code
}, {
warnings: 'verbose',
ecma: 5,
@@ -113,7 +113,7 @@ async function build() {
});
const umdMinResult = minify({
- [srcName]: umdUnminResult.code
+ [umdUnminName]: umdUnminResult.code
}, {
warnings: 'verbose',
ecma: 5, | Fix source mapping for es version |
diff --git a/lib/hocon/version.rb b/lib/hocon/version.rb
index <HASH>..<HASH> 100644
--- a/lib/hocon/version.rb
+++ b/lib/hocon/version.rb
@@ -1,5 +1,5 @@
module Hocon
module Version
- STRING = '1.2.2.SNAPSHOT'
+ STRING = '1.2.2'
end
end | (GEM) update hocon version to <I> |
diff --git a/housekeeper/server/app.py b/housekeeper/server/app.py
index <HASH>..<HASH> 100644
--- a/housekeeper/server/app.py
+++ b/housekeeper/server/app.py
@@ -90,8 +90,9 @@ def cases():
'per_page': 30,
'missing': missing_category,
}
- cases_q = api.cases(query_str=qargs['query_str'],
- missing=qargs['missing'])
+ version = 'v4' if qargs['missing'] == 'delivered' else None
+ cases_q = api.cases(query_str=qargs['query_str'], missing=qargs['missing'],
+ version=version)
cases_page = cases_q.paginate(page, per_page=qargs['per_page'])
return render_template('cases.html', cases=cases_page, qargs=qargs) | only show v4 runs to be delivered |
diff --git a/lib/jsonapi/resource.rb b/lib/jsonapi/resource.rb
index <HASH>..<HASH> 100644
--- a/lib/jsonapi/resource.rb
+++ b/lib/jsonapi/resource.rb
@@ -398,7 +398,7 @@ module JSONAPI
def model_name(model, options = {})
@_model_name = model.to_sym
- model_hint(model: @_model_name, resource: self) unless options[:model_hint] == false
+ model_hint(model: @_model_name, resource: self) unless options[:add_model_hint] == false
end
def model_hint(model: _model_name, resource: _type)
diff --git a/test/fixtures/active_record.rb b/test/fixtures/active_record.rb
index <HASH>..<HASH> 100644
--- a/test/fixtures/active_record.rb
+++ b/test/fixtures/active_record.rb
@@ -1434,7 +1434,7 @@ module Legacy
end
class FlatPostResource < JSONAPI::Resource
- model_name "Legacy::FlatPost", model_hint: false
+ model_name "Legacy::FlatPost", add_model_hint: false
model_hint model: "Legacy::FlatPost", resource: FlatPostResource | Rename option to skip model_hints for model_name method |
diff --git a/go/service/rekey_test.go b/go/service/rekey_test.go
index <HASH>..<HASH> 100644
--- a/go/service/rekey_test.go
+++ b/go/service/rekey_test.go
@@ -160,7 +160,7 @@ func TestRekeyNeededUserClose(t *testing.T) {
select {
case <-rekeyHandler.notifyComplete:
- case <-time.After(2 * time.Second):
+ case <-time.After(20 * time.Second):
t.Fatal("timeout waiting for rekeyHandler.notifyComplete")
} | Increase test timeout to <I>s |
diff --git a/lib/cortex/version.rb b/lib/cortex/version.rb
index <HASH>..<HASH> 100644
--- a/lib/cortex/version.rb
+++ b/lib/cortex/version.rb
@@ -1,3 +1,3 @@
module Cortex
- VERSION = '0.5.0'
+ VERSION = '0.6.0'
end | Bumping the version number to <I> |
diff --git a/spec/unit/interface/action_spec.rb b/spec/unit/interface/action_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/interface/action_spec.rb
+++ b/spec/unit/interface/action_spec.rb
@@ -350,7 +350,7 @@ describe Puppet::Interface::Action do
option("-q", "--action-quux") { after_action { |_,_,_| report :action_quux } }
option("-a") { after_action { |_,_,_| report :a } }
option("--action-baz") { after_action { |_,_,_| report :action_baz } }
- when_invoked { |options| warn options.inspect }
+ when_invoked { }
end
option("-u", "--face-quux") { after_action { |_,_,_| report :face_quux } }
option("-f") { after_action { |_,_,_| report :f } } | (Maint.) Fix accidental debug output in tests.
Reviewed-By: Daniel Pittman |
diff --git a/lib/linters/property_units.js b/lib/linters/property_units.js
index <HASH>..<HASH> 100644
--- a/lib/linters/property_units.js
+++ b/lib/linters/property_units.js
@@ -47,9 +47,13 @@ module.exports = {
}
}
+ const position = node.positionBy({
+ word: node.value
+ });
+
results.push({
- column: node.source.start.column + node.raws.between.length + property.length + value.source.start.column - 1,
- line: node.source.start.line + value.source.start.line - 1,
+ column: position.column,
+ line: position.line,
message: util.format(this.message.unit, unit, property)
});
}); | Refactor propertyUnits position reporting (#<I>) |
diff --git a/virtualchain/lib/blockchain/transactions.py b/virtualchain/lib/blockchain/transactions.py
index <HASH>..<HASH> 100644
--- a/virtualchain/lib/blockchain/transactions.py
+++ b/virtualchain/lib/blockchain/transactions.py
@@ -501,6 +501,7 @@ def get_nulldata_txs_in_blocks( workpool, bitcoind_opts, blocks_ids ):
block_slice = blocks_ids[ (slice_count * slice_len) : min((slice_count+1) * slice_len, len(blocks_ids)) ]
if len(block_slice) == 0:
+ log.debug("Zero-length block slice")
break
start_slice_time = time.time() | Warn when we have a zero-length slice to process |
diff --git a/webimageloader/src/com/webimageloader/util/Android.java b/webimageloader/src/com/webimageloader/util/Android.java
index <HASH>..<HASH> 100644
--- a/webimageloader/src/com/webimageloader/util/Android.java
+++ b/webimageloader/src/com/webimageloader/util/Android.java
@@ -2,7 +2,7 @@ package com.webimageloader.util;
import android.os.Build;
-public class Android {
+public class Android extends Build.VERSION_CODES {
/**
* Check the api level of the device we're running on
* @param level API level | Let version helper class have version codes |
diff --git a/andes/core/documenter.py b/andes/core/documenter.py
index <HASH>..<HASH> 100644
--- a/andes/core/documenter.py
+++ b/andes/core/documenter.py
@@ -2,6 +2,7 @@
Documenter class for ANDES models.
"""
+import inspect
from collections import OrderedDict
from andes.utils.tab import make_doc_table, math_wrap
@@ -391,10 +392,9 @@ class Documenter:
else:
out += model_header + f'Model <{self.class_name}> in Group <{self.parent.group}>\n' + model_header
- if self.__doc__ is not None:
- if self.parent.__doc__ is not None:
- out += self.parent.__doc__
- out += '\n' # this fixes the indentation for the next line
+ if self.parent.__doc__ is not None:
+ out += inspect.cleandoc(self.parent.__doc__)
+ out += '\n\n' # this fixes the indentation for the next line
# add tables
out += self._param_doc(max_width=max_width, export=export) | Fix style of docstring in modelref. |
diff --git a/src/Report.php b/src/Report.php
index <HASH>..<HASH> 100644
--- a/src/Report.php
+++ b/src/Report.php
@@ -382,6 +382,8 @@ class Report extends Element {
}
} elseif (is_array($val)) {
return $val;
+ } elseif ($val === false) {
+ return str_ireplace('$F{' . $field . '}', '0', $text);
} else {
return str_ireplace(array('$F{' . $field . '}'), array(($val)), $text);
} | replace "false" by "0" (fix bugs on "print when expression") |
diff --git a/packages/appframe/src/react/__specs__/storyshots.spec.js b/packages/appframe/src/react/__specs__/storyshots.spec.js
index <HASH>..<HASH> 100644
--- a/packages/appframe/src/react/__specs__/storyshots.spec.js
+++ b/packages/appframe/src/react/__specs__/storyshots.spec.js
@@ -3,9 +3,7 @@ import initStoryshots, {
snapshotWithOptions
} from '@storybook/addon-storyshots'
-jest.mock('@pluralsight/ps-design-system-storybook-addon-theme')
-
-const createNodeMock = el => document.createElement('div')
+const createNodeMock = () => document.createElement('div')
initStoryshots({
configPath: path.resolve(__dirname, '../../../.storybook'), | test(appframe): update snapshot |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -9,15 +9,6 @@ var human = require('pretty-hrtime')
, util = require('util');
/**
- * All the different name spaces that are currently using this module.
- *
- * @type {Array}
- * @private
- */
-var namespaces = []
- , max;
-
-/**
* Check if the terminal we're using allows the use of colors.
*
* @type {Boolean}
@@ -81,15 +72,6 @@ function factory(name, options) {
if (!Array.isArray(options.stream)) options.stream = [options.stream];
//
- // Add the namespace an re-calculate the max-length of the namespace so we can
- // have a consistent indentation.
- //
- namespaces.push(name);
- max = Math.max.apply(Math, namespaces.map(function map(namespace) {
- return namespace.toString().length;
- }));
-
- //
// The actual debug function which does the logging magic.
//
return function debug(line) {
@@ -102,11 +84,6 @@ function factory(name, options) {
line = [
//
- // Add extra padding so all log messages start at the same line.
- //
- (new Array(max + 1 - name.length)).join(' '),
-
- //
// Add the colorized namespace.
//
options.ansi, | [minor] Don't pad the output, it get's anoying to read if you have long namespaces |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.