diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/tilelive/batch.js b/lib/tilelive/batch.js
index <HASH>..<HASH> 100644
--- a/lib/tilelive/batch.js
+++ b/lib/tilelive/batch.js
@@ -169,7 +169,7 @@ TileBatch.prototype.renderChunk = function(callback) {
that.mbtiles.insertTiles(tiles, renders, that.options.compress, this);
},
function(err) {
- if (err) return this(err);
+ if (err || !that.options.interactivity) return this(err);
if (that.options.interactivity) {
var group = this.group();
for (var i = 0; i < tiles.length; i++) {
@@ -186,7 +186,7 @@ TileBatch.prototype.renderChunk = function(callback) {
}
},
function(err, renders) {
- if (err) return this(err);
+ if (err || !that.options.interactivity) return this(err);
if (that.options.interactivity) {
that.mbtiles.insertGrids(tiles,
renders,
@@ -195,8 +195,7 @@ TileBatch.prototype.renderChunk = function(callback) {
}
},
function(err) {
- if (err) return this(err);
- callback(null, tiles);
+ callback(err, tiles);
}
);
};
|
Fix Step in renderChunk to ensure completion.
|
diff --git a/js/viewport.js b/js/viewport.js
index <HASH>..<HASH> 100644
--- a/js/viewport.js
+++ b/js/viewport.js
@@ -502,14 +502,16 @@ var igv = (function (igv) {
const yScrollDelta = $(this.contentDiv).position().top;
const viewportBBox = this.$viewport.get(0).getBoundingClientRect();
- // input.replace(/\W/g, '')
+
let str = this.trackView.track.name || this.trackView.track.id;
str = str.replace(/\W/g, '');
- // const id = (this.trackView.track.name || this.trackView.track.id).split(' ').join('_').toLowerCase();
- const id = str.toLowerCase();
- // if present, paint axis canvas
- if (typeof this.trackView.track.paintAxis === 'function') {
+ const index = this.browser.genomicStateList.indexOf(this.genomicState);
+ const id = str.toLowerCase() + '_genomic_index_' + index;
+
+ // If present, paint axis canvas. Only in first multi-locus panel
+
+ if (0 === index && typeof this.trackView.track.paintAxis === 'function') {
const w = $(this.trackView.controlCanvas).width();
const h = $(this.trackView.controlCanvas).height();
|
SVG Render. Axis Rendered only for first panel in multi-locus. Git Issue <I>. (#<I>)
|
diff --git a/test/backend/chain_test.rb b/test/backend/chain_test.rb
index <HASH>..<HASH> 100644
--- a/test/backend/chain_test.rb
+++ b/test/backend/chain_test.rb
@@ -78,7 +78,7 @@ class I18nBackendChainTest < I18n::TestCase
"Bah"], I18n.t([:formats, :plural_2, :bah], :default => 'Bah')
end
- test "store_translations options are not dropped while transfering to backend" do
+ test "store_translations options are not dropped while transferring to backend" do
@first.expects(:store_translations).with(:foo, {:bar => :baz}, {:option => 'persists'})
I18n.backend.store_translations :foo, {:bar => :baz}, {:option => 'persists'}
end
|
[TYPO] `transfering` -> `transferring`
|
diff --git a/cmd.go b/cmd.go
index <HASH>..<HASH> 100644
--- a/cmd.go
+++ b/cmd.go
@@ -691,6 +691,7 @@ func (cmd commandRetr) Execute(conn *Conn, param string) {
path := conn.buildPath(param)
defer func() {
conn.lastFilePos = 0
+ conn.appendData = false
}()
bytes, data, err := conn.driver.GetFile(path, conn.lastFilePos)
if err == nil {
|
Make sure we reset the append flag on RETR (#<I>)
Before this change "REST" followed by "RETR" would leave the append
flag set which means subsequent "STOR" commands append data when they
shouldn't.
|
diff --git a/javascript/dashboard-dialogs.js b/javascript/dashboard-dialogs.js
index <HASH>..<HASH> 100644
--- a/javascript/dashboard-dialogs.js
+++ b/javascript/dashboard-dialogs.js
@@ -67,7 +67,12 @@ window.SS = window.SS || {}
Dialog: { open: dialog, buttons: buttons }
});
- $(document).on('click', "[data-dialog]", function() {
+ $(document).on('click', "[data-dialog]", function(e) {
+
+ if (e.shiftKey) {
+ return false;
+ }
+
var link = $(this);
var dialog = SS.Dialog.open(link.attr("href"), {
|
Prevent opening of dialog if shift key is held down. Allows other functionality to hook if that's the case
|
diff --git a/src/layouts/CollectionLayout.js b/src/layouts/CollectionLayout.js
index <HASH>..<HASH> 100644
--- a/src/layouts/CollectionLayout.js
+++ b/src/layouts/CollectionLayout.js
@@ -70,6 +70,7 @@ define(function(require, exports, module) {
var getItemSize;
var lineLength;
var lineNodes = [];
+ var hasNext = false;
// Prepare item-size
if (!options.itemSize) {
@@ -122,7 +123,7 @@ define(function(require, exports, module) {
size: lineNode.size,
translate: translate,
// first renderable has scrollLength, others have 0 scrollLength
- scrollLength: (i === 0) ? (lineSize[direction] + gutter[direction] + (endReached ? gutter[direction] : 0)) : 0
+ scrollLength: (i === 0) ? (lineSize[direction] + gutter[direction] + (endReached && (next || (!next && !hasNext)) ? gutter[direction] : 0)) : 0
};
lineOffset += lineNode.size[lineDirection] + gutter[lineDirection] + (justifyOffset * 2);
}
@@ -135,6 +136,7 @@ define(function(require, exports, module) {
// Prepare for next line
lineNodes = [];
+ hasNext = hasNext || next;
return lineSize[direction] + gutter[direction];
}
|
Fixed small glitch in collection-layout
|
diff --git a/riak/tests/test_comparison.py b/riak/tests/test_comparison.py
index <HASH>..<HASH> 100644
--- a/riak/tests/test_comparison.py
+++ b/riak/tests/test_comparison.py
@@ -49,6 +49,15 @@ class RiakObjectComparisonTest(unittest.TestCase):
self.assertEqual(hash(a), hash(b), 'same object has different hashes')
self.assertNotEqual(hash(a), hash(c), 'different object has same hash')
+ def test_object_valid_key(self):
+ a = RiakObject(None, 'bucket', 'key')
+ self.assertIsInstance(a, RiakObject, 'valid key name is rejected')
+ try:
+ b = RiakObject(None, 'bucket', '')
+ except ValueError:
+ b = None
+ self.assertIsNone(b, 'empty object key not allowed')
+
class RiakClientComparisonTest(unittest.TestCase, BaseTestCase):
def test_client_eq(self):
|
Issue #<I>: Add unit tests to invalid object key issue
|
diff --git a/insights/specs/sos_archive.py b/insights/specs/sos_archive.py
index <HASH>..<HASH> 100644
--- a/insights/specs/sos_archive.py
+++ b/insights/specs/sos_archive.py
@@ -295,6 +295,7 @@ class SosSpecs(Specs):
systemctl_show_all_services = simple_file("sos_commands/systemd/systemctl_show_service_--all")
systemctl_status_all = simple_file("sos_commands/systemd/systemctl_status_--all")
systemd_system_origin_accounting = simple_file("/etc/systemd/system.conf.d/origin-accounting.conf")
+ systemd_analyze_blame = simple_file("sos_commands/systemd/systemd-analyze_blame")
teamdctl_config_dump = glob_file("sos_commands/teamd/teamdctl_*_config_dump")
teamdctl_state_dump = glob_file("sos_commands/teamd/teamdctl_*_state_dump")
testparm_s = simple_file("sos_commands/samba/testparm_s")
|
Updating sos_archive to parse file for GSS rule (#<I>)
adding systemd_analyze_blame = simple_file("insights_commands/systemd-analyze_blame") in sos_archive.py
|
diff --git a/example_formatter.py b/example_formatter.py
index <HASH>..<HASH> 100644
--- a/example_formatter.py
+++ b/example_formatter.py
@@ -37,3 +37,6 @@ if __name__ == '__main__':
log.warn('Low on fuel')
log.error('No fuel. Trying to glide.')
log.critical('Glide attempt failed. About to crash.')
+
+ d = {'extra': {'some': '1', 'extras': '2', 'here': '3'}}
+ log.info('Extra records here', extra=d)
|
Updated example_formatter.py to include the extra bits
|
diff --git a/quack.rb b/quack.rb
index <HASH>..<HASH> 100644
--- a/quack.rb
+++ b/quack.rb
@@ -3,16 +3,18 @@ require 'uri'
require 'pry-debugger'
class TinyServer
- attr_reader :server
+ attr_reader :server, :port
attr_accessor :socket, :request_line
DEFAULT_PORT = 4444
def initialize(options = {})
- @server = TCPServer.new('localhost', options[:port] || DEFAULT_PORT)
+ @port = options[:port] || DEFAULT_PORT
+ @server = TCPServer.new('localhost', @port)
end
def start
+ STDERR.puts "Starting server on port #{port}"
loop do
self.socket = server.accept
|
[UPDATE] notify user of port when starting server
|
diff --git a/psqlextra/manager/__init__.py b/psqlextra/manager/__init__.py
index <HASH>..<HASH> 100644
--- a/psqlextra/manager/__init__.py
+++ b/psqlextra/manager/__init__.py
@@ -1,8 +1,8 @@
-from .manager import QuerySet, PostgresManager
+from .manager import PostgresQuerySet, PostgresManager
from .materialized_view import PostgresMaterializedViewManager
__all__ = [
- 'QuerySet',
+ 'PostgresQuerySet',
'PostgresManager',
'PostgresMaterializedViewManager'
]
|
'QuerySet' should be 'PostgresQuerySet'
|
diff --git a/lib/string/roman.rb b/lib/string/roman.rb
index <HASH>..<HASH> 100644
--- a/lib/string/roman.rb
+++ b/lib/string/roman.rb
@@ -1,7 +1,7 @@
module BBLib
- # Converts any integer up to 1000 to a roman numeral string_a
+ # Converts any integer up to 1000 to a roman numeral
def self.to_roman num
return num.to_s if num > 1000
roman = {1000 => 'M', 900 => 'CM', 500 => 'D', 400 => 'CD', 100 => 'C', 90 => 'XC', 50 => 'L',
|
Removed weird extra word in comment.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,10 @@ setup(
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Mathematics'
- ])
+ ],
+ extras_require={
+ 'tests': ['numpy', 'scipy', 'networkx']
+ })
|
Update PyPI classifiers and test requirements
|
diff --git a/pyatv/support/http.py b/pyatv/support/http.py
index <HASH>..<HASH> 100644
--- a/pyatv/support/http.py
+++ b/pyatv/support/http.py
@@ -90,14 +90,21 @@ def parse_message(response: bytes) -> Tuple[Optional[HttpResponse], bytes]:
protocol, version, code, message = match.groups()
resp_headers = CaseInsensitiveDict(_key_value(line) for line in headers[1:] if line)
- content_length = int(resp_headers.get("Content-Length", 0))
+ # TODO: pylint on python 3.6 does not seem to find CaseInsensitiveDict.get, but
+ # other versions seems to work fine. Remove this ignore when python 3.6 is dropped.
+ content_length = int(
+ resp_headers.get("Content-Length", 0) # pylint: disable=no-member
+ )
if len(body or []) < content_length:
return None, response
response_body: Union[str, bytes] = body[0:content_length]
# Assume body is text unless content type is application/octet-stream
- if not resp_headers.get("Content-Type", "").startswith("application"):
+ # TODO: Remove pylint disable when python 3.6 is dropped
+ if not resp_headers.get("Content-Type", "").startswith( # pylint: disable=no-member
+ "application"
+ ):
# We know it's bytes here
response_body = cast(bytes, response_body).decode("utf-8")
|
http: Ignore type mypy cannot find
Relates to #<I>
|
diff --git a/salt/config.py b/salt/config.py
index <HASH>..<HASH> 100644
--- a/salt/config.py
+++ b/salt/config.py
@@ -661,7 +661,7 @@ def get_id():
try:
with salt.utils.fopen('/etc/hostname') as hfl:
name = hfl.read().strip()
- if re.search('\s', name):
+ if re.search(r'\s', name):
log.warning('Whitespace character detected in /etc/hostname. '
'This file should not contain any whitespace.')
else:
|
Use raw string in regex
This quiets pylint, as it complains when a regex contains a backslash
and the string is not a raw string.
|
diff --git a/bin/delete.js b/bin/delete.js
index <HASH>..<HASH> 100755
--- a/bin/delete.js
+++ b/bin/delete.js
@@ -18,6 +18,10 @@ var argv = optimist
demand: true,
alias: 'n'
})
+ .options('headless', {
+ describe: 'Do not prompt',
+ alias: 'l'
+ })
.argv;
if (argv.help) return optimist.showHelp();
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -311,7 +311,7 @@ config.deleteStack = function(options, callback) {
return callback(new Error([options.name, status].join(' ')));
}
- confirmAction('Ready to delete the stack ' + options.name + '?', function (confirm) {
+ confirmAction('Ready to delete the stack ' + options.name + '?', options.headless, function (confirm) {
if (!confirm) return callback();
cfn.deleteStack({
StackName: options.name
|
Apply headless option to cfn-delete.
|
diff --git a/server/src/main/java/com/networknt/server/DefaultConfigLoader.java b/server/src/main/java/com/networknt/server/DefaultConfigLoader.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/com/networknt/server/DefaultConfigLoader.java
+++ b/server/src/main/java/com/networknt/server/DefaultConfigLoader.java
@@ -221,7 +221,6 @@ public class DefaultConfigLoader implements IConfigLoader{
for (String fileName : serviceFiles.keySet()) {
filePath=Paths.get(targetConfigsDirectory+"/"+fileName);
byte[] ba = decoder.decode(serviceFiles.get(fileName).toString().getBytes());
- if(logger.isDebugEnabled()) logger.debug("filename = " + fileName + " content = " + new String(ba, StandardCharsets.UTF_8));
Files.write(filePath, ba);
}
} catch (IOException e) {
|
fixes #<I> remove a logging statement in the DefaultConfigLoader as the binary file will break the JSON logging (#<I>)
|
diff --git a/lib/rubyonacid/factories/combination.rb b/lib/rubyonacid/factories/combination.rb
index <HASH>..<HASH> 100644
--- a/lib/rubyonacid/factories/combination.rb
+++ b/lib/rubyonacid/factories/combination.rb
@@ -69,6 +69,8 @@ class CombinationFactory < Factory
end
when WRAP
return value % 1.0
+ else
+ raise "invalid constrain mode - must be CONSTRAIN or WRAP"
end
end
|
CombinationFactory now raises exception when invalid constant assigned.
|
diff --git a/dash/test.py b/dash/test.py
index <HASH>..<HASH> 100644
--- a/dash/test.py
+++ b/dash/test.py
@@ -58,8 +58,14 @@ class DashTest(TestCase):
func = getattr(self.client, method)
response = func(url, data, **extra)
+
if isinstance(response, JsonResponse):
- response.json = json.loads(response.content)
+ content = response.content
+ if isinstance(content, six.binary_type):
+ content = content.decode('utf-8')
+
+ response.json = json.loads(content)
+
return response
|
Tweak to test class to support Python 3
|
diff --git a/indra/util/aws.py b/indra/util/aws.py
index <HASH>..<HASH> 100644
--- a/indra/util/aws.py
+++ b/indra/util/aws.py
@@ -11,12 +11,13 @@ def kill_all(job_queue, reason='None given'):
# Cancel jobs
for job_id in job_ids:
batch.cancel_job(jobId=job_id, reason=reason)
- for status in ('STARTING', 'RUNNING'):
+ for status in ('STARTING', 'RUNNABLE', 'RUNNING'):
running = batch.list_jobs(jobQueue=job_queue, jobStatus=status)
job_info = running.get('jobSummaryList')
if job_info:
job_ids = [job['jobId'] for job in job_info]
for job_id in job_ids:
+ print('Killing %s' % job_id)
res = batch.terminate_job(jobId=job_id, reason=reason)
|
Kill runnable jobs in kill all
|
diff --git a/core/src/main/java/com/orientechnologies/orient/core/sql/executor/DepthFirstTraverseStep.java b/core/src/main/java/com/orientechnologies/orient/core/sql/executor/DepthFirstTraverseStep.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/orientechnologies/orient/core/sql/executor/DepthFirstTraverseStep.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/sql/executor/DepthFirstTraverseStep.java
@@ -128,7 +128,10 @@ public class DepthFirstTraverseStep extends AbstractTraverseStep {
StringBuilder result = new StringBuilder();
result.append(spaces);
result.append("+ DEPTH-FIRST TRAVERSE \n");
+ result.append(spaces);
+ result.append(" " + projections.toString());
if (whileClause != null) {
+ result.append("\n");
result.append(spaces);
result.append("WHILE " + whileClause.toString());
}
|
Fix depth first traverse step pretty print
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import os
-version = '0.3.10'
+version = '0.3.11'
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.txt')).read()
|
Increase to version <I> due to TG-dev requiring it for ming support
|
diff --git a/src/server/pfs/cmds/cmds.go b/src/server/pfs/cmds/cmds.go
index <HASH>..<HASH> 100644
--- a/src/server/pfs/cmds/cmds.go
+++ b/src/server/pfs/cmds/cmds.go
@@ -373,7 +373,7 @@ Files can be read from finished commits with get-file.`,
// try parsing the filename as a url, if it is one do a PutFileURL
if url, err := url.Parse(filePath); err == nil && url.Scheme != "" {
if len(args) < 3 {
- return client.PutFileURL(args[0], args[1], url.Path, url.String())
+ return client.PutFileURL(args[0], args[1], strings.TrimPrefix(url.Path, "/"), url.String())
}
return client.PutFileURL(args[0], args[1], args[2], url.String())
}
|
Trim the / prefix for url puts.
|
diff --git a/build.go b/build.go
index <HASH>..<HASH> 100644
--- a/build.go
+++ b/build.go
@@ -801,8 +801,9 @@ func getBranchSuffix() string {
}
branch = parts[len(parts)-1]
- if branch == "master" {
- // master builds are the default.
+ switch branch {
+ case "master", "release":
+ // these are not special
return ""
}
|
build: Builds from "release" branch are not branch builds
|
diff --git a/create.go b/create.go
index <HASH>..<HASH> 100644
--- a/create.go
+++ b/create.go
@@ -1,6 +1,7 @@
package main
import (
+ "fmt"
"os"
"github.com/urfave/cli"
@@ -56,12 +57,11 @@ command(s) that get executed on start, edit the args parameter of the spec. See
return err
}
status, err := startContainer(context, CT_ACT_CREATE, nil)
- if err != nil {
- return err
+ if err == nil {
+ // exit with the container's exit status so any external supervisor
+ // is notified of the exit with the correct exit status.
+ os.Exit(status)
}
- // exit with the container's exit status so any external supervisor is
- // notified of the exit with the correct exit status.
- os.Exit(status)
- return nil
+ return fmt.Errorf("runc create failed: %w", err)
},
}
diff --git a/run.go b/run.go
index <HASH>..<HASH> 100644
--- a/run.go
+++ b/run.go
@@ -1,6 +1,7 @@
package main
import (
+ "fmt"
"os"
"github.com/urfave/cli"
@@ -74,6 +75,6 @@ command(s) that get executed on start, edit the args parameter of the spec. See
// notified of the exit with the correct exit status.
os.Exit(status)
}
- return err
+ return fmt.Errorf("runc run failed: %w", err)
},
}
|
create, run: amend final errors
As the error may contain anything, it may not be clear to a user that
the whole (create or run) operation failed. Amend the errors.
Also, change the code flow in create to match that of run, so we don't
have to add the fake "return nil" at the end.
|
diff --git a/src/jquery.maskMoney.js b/src/jquery.maskMoney.js
index <HASH>..<HASH> 100644
--- a/src/jquery.maskMoney.js
+++ b/src/jquery.maskMoney.js
@@ -493,9 +493,15 @@
newValue = buildIntegerPart(integerPart, negative, settings);
if (settings.precision > 0) {
- decimalPart = onlyNumbers.slice(onlyNumbers.length - settings.precision);
- leadingZeros = new Array((settings.precision + 1) - decimalPart.length).join(0);
- newValue += settings.decimal + leadingZeros + decimalPart;
+ if(!isNaN(value) && value.indexOf('.') > -1){
+ decimalPart = value.substr(value.indexOf('.') + 1);
+ leadingZeros = new Array((settings.precision + 1) - decimalPart.length).join(0);
+ newValue += settings.decimal + decimalPart + leadingZeros;
+ } else {
+ decimalPart = onlyNumbers.slice(onlyNumbers.length - settings.precision);
+ leadingZeros = new Array((settings.precision + 1) - decimalPart.length).join(0);
+ newValue += settings.decimal + leadingZeros + decimalPart;
+ }
}
return setSymbol(newValue, settings);
}
|
New Bug
Bug when dealing with float.
|
diff --git a/Integration/AbstractEnhancerIntegration.php b/Integration/AbstractEnhancerIntegration.php
index <HASH>..<HASH> 100644
--- a/Integration/AbstractEnhancerIntegration.php
+++ b/Integration/AbstractEnhancerIntegration.php
@@ -317,7 +317,7 @@ abstract class AbstractEnhancerIntegration extends AbstractIntegration
$this->campaign, $this, 'enhanced', $lead
);
$this->dispatcher->dispatch(
- 'mauticplugin.contactledger.context_create',
+ 'mautic.contactledger.context_create',
$event
);
$this->leadModel->saveEntity($lead);
diff --git a/MauticEnhancerEvents.php b/MauticEnhancerEvents.php
index <HASH>..<HASH> 100644
--- a/MauticEnhancerEvents.php
+++ b/MauticEnhancerEvents.php
@@ -15,5 +15,5 @@ final class MauticEnhancerEvents
*
* @var string
*/
- const ENHANCER_COMPLETED = 'mauticplugin.mautic_enhancer.enhancer_complete';
+ const ENHANCER_COMPLETED = 'mautic.mautic_enhancer.enhancer_complete';
}
|
Corrections for Ledger events.
|
diff --git a/lib/graphql.rb b/lib/graphql.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql.rb
+++ b/lib/graphql.rb
@@ -22,7 +22,11 @@ module GraphQL
def self.parse(string, as: nil)
parser = as ? GraphQL::PARSER.send(as) : GraphQL::PARSER
tree = parser.parse(string)
- GraphQL::TRANSFORM.apply(tree)
+ document = GraphQL::TRANSFORM.apply(tree)
+ if !document.is_a?(GraphQL::Language::Nodes::Document)
+ raise("Parse failed! Sorry, somehow we failed to turn this string into a document. Please report this bug!")
+ end
+ document
rescue Parslet::ParseFailed => error
line, col = error.cause.source.line_and_column(error.cause.pos)
raise GraphQL::ParseError.new(error.message, line, col, string)
|
refactor(.parse) check for a transformation failure
|
diff --git a/src/components/line-chart/line-chart.js b/src/components/line-chart/line-chart.js
index <HASH>..<HASH> 100644
--- a/src/components/line-chart/line-chart.js
+++ b/src/components/line-chart/line-chart.js
@@ -334,7 +334,8 @@ define([
})
.attr("dy", ".35em")
.text(function(d) {
- return d.name;
+ var size = d.name.length;
+ return (size < 13) ? d.name : d.name.substring(0,10)+'...'; //only few first letters
});
this.resize();
|
Shorten name in case its too long
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -63,13 +63,6 @@ class build_ext(_build_ext):
self.discount_configure_opts = DEFAULT_DISCOUNT_CONFIGURE_OPTS
def build_extension(self, ext):
-#TODO: put all the build_extension_discount here since this is discount specific anyway
- if ext.name == '_discount':
- self.build_extension_discount(ext)
- else:
- _build_ext.build_extension(self, ext)
-
- def build_extension_discount(self, ext):
if self.discount_src_path is None:
filepath = os.path.join(
self.build_temp,
|
Updated setup.py file.
|
diff --git a/lib/Loop/UvDriver.php b/lib/Loop/UvDriver.php
index <HASH>..<HASH> 100644
--- a/lib/Loop/UvDriver.php
+++ b/lib/Loop/UvDriver.php
@@ -14,7 +14,7 @@ class UvDriver extends Driver {
/** @var resource[] */
private $events = [];
- /** @var \Amp\Loop\Watcher[]|\Amp\Loop\Watcher[][] */
+ /** @var \Amp\Loop\Watcher[][] */
private $watchers = [];
/** @var resource[] */
@@ -50,7 +50,7 @@ class UvDriver extends Driver {
}
foreach ($watchers as $watcher) {
- if (!($watcher->enabled && $watcher->type & $events)) {
+ if (!($watcher->enabled && ($watcher->type & $events || ($events | 4) === 4))) {
continue;
}
|
Invoke watcher callback if events is 0 or 4
4 is UV_DISCONNECT
|
diff --git a/salt/crypt.py b/salt/crypt.py
index <HASH>..<HASH> 100644
--- a/salt/crypt.py
+++ b/salt/crypt.py
@@ -227,7 +227,7 @@ def sign_message(privkey_path, message, passphrase=None):
return key.sign(digest)
else:
signer = PKCS1_v1_5.new(key)
- return signer.sign(SHA.new(message))
+ return signer.sign(SHA.new(salt.utils.stringutils.to_bytes(message)))
def verify_signature(pubkey_path, message, signature):
@@ -245,7 +245,7 @@ def verify_signature(pubkey_path, message, signature):
return pubkey.verify(digest, signature)
else:
verifier = PKCS1_v1_5.new(pubkey)
- return verifier.verify(SHA.new(message), signature)
+ return verifier.verify(SHA.new(salt.utils.stringutils.to_bytes(message)), signature)
def gen_signature(priv_path, pub_path, sign_path, passphrase=None):
|
salt.crypt: Ensure message is encoded before signing
Conflicts:
- salt/crypt.py
|
diff --git a/packages/core/parcel/src/cli.js b/packages/core/parcel/src/cli.js
index <HASH>..<HASH> 100755
--- a/packages/core/parcel/src/cli.js
+++ b/packages/core/parcel/src/cli.js
@@ -179,11 +179,15 @@ async function run(entries: Array<string>, command: any) {
}
let Parcel = require('@parcel/core').default;
let options = await normalizeOptions(command);
- let packageManager = new NodePackageManager(new NodeFS());
+ let fs = new NodeFS();
+ let packageManager = new NodePackageManager(fs);
let parcel = new Parcel({
entries,
packageManager,
- defaultConfig: '@parcel/config-default',
+ // $FlowFixMe - flow doesn't know about the `paths` option (added in Node v8.9.0)
+ defaultConfig: require.resolve('@parcel/config-default', {
+ paths: [fs.cwd(), __dirname],
+ }),
patchConsole: true,
...options,
});
|
fix: use require.resolve when resolving default config (#<I>)
|
diff --git a/tests/test_io.py b/tests/test_io.py
index <HASH>..<HASH> 100644
--- a/tests/test_io.py
+++ b/tests/test_io.py
@@ -12,6 +12,8 @@ from auditok.io import (
AudioIOError,
AudioParameterError,
BufferAudioSource,
+ RawAudioSource,
+ WaveAudioSource,
check_audio_data,
_guess_audio_format,
_normalize_use_channel,
@@ -269,6 +271,19 @@ class TestIO(TestCase):
from_file(filename, audio_format, **kwargs)
self.assertTrue(patch_function.called)
+ def test_from_file_large_file_raw(self, ):
+ filename = "tests/data/test_16KHZ_mono_400Hz.raw"
+ audio_source = from_file(filename, large_file=True,
+ sampling_rate=16000,
+ sample_width=2,
+ channels=1)
+ self.assertIsInstance(audio_source, RawAudioSource)
+
+ def test_from_file_large_file_wave(self, ):
+ filename = "tests/data/test_16KHZ_mono_400Hz.wav"
+ audio_source = from_file(filename, large_file=True)
+ self.assertIsInstance(audio_source, WaveAudioSource)
+
@genty_dataset(
missing_sampling_rate=("sr",),
missing_sample_width=("sw",),
|
Add tests for from_file with large_file=True
|
diff --git a/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java b/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java
index <HASH>..<HASH> 100644
--- a/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java
+++ b/src/java/com/threerings/whirled/spot/client/SpotSceneDirector.java
@@ -1,5 +1,5 @@
//
-// $Id: SpotSceneDirector.java,v 1.11 2002/04/15 16:28:03 shaper Exp $
+// $Id: SpotSceneDirector.java,v 1.12 2002/06/12 07:03:23 ray Exp $
package com.threerings.whirled.spot.client;
@@ -149,8 +149,9 @@ public class SpotSceneDirector
*/
public void changeLocation (int locationId, ChangeObserver obs)
{
- // refuse if there's a pending location change
- if (_pendingLocId != -1) {
+ // refuse if there's a pending location change or if we're already
+ // at the specified location
+ if ((locationId == _locationId) || (_pendingLocId != -1)) {
return;
}
|
Don't request to change locations if we're already there.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@<I> <I>f4-<I>e9-<I>-aa3c-eee0fc<I>fb1
|
diff --git a/resolwe/flow/executors/docker/run.py b/resolwe/flow/executors/docker/run.py
index <HASH>..<HASH> 100644
--- a/resolwe/flow/executors/docker/run.py
+++ b/resolwe/flow/executors/docker/run.py
@@ -312,7 +312,7 @@ class FlowExecutor(LocalFlowExecutor):
environment["LISTENER_IP"] = "host.docker.internal"
communication_arguments = {
- "auto_remove": False,
+ "auto_remove": True,
"volumes": self._communicator_volumes(),
"command": ["/usr/local/bin/python", "/startup.py"],
"image": communicator_image,
@@ -328,7 +328,7 @@ class FlowExecutor(LocalFlowExecutor):
"environment": environment,
}
processing_arguments = {
- "auto_remove": False,
+ "auto_remove": True,
"volumes": self._processing_volumes(),
"command": ["python3", "/start.py"],
"image": processing_image,
|
Auto-remove finished docker containers
|
diff --git a/core/src/test/java/org/kohsuke/stapler/framework/io/LargeTextTest.java b/core/src/test/java/org/kohsuke/stapler/framework/io/LargeTextTest.java
index <HASH>..<HASH> 100644
--- a/core/src/test/java/org/kohsuke/stapler/framework/io/LargeTextTest.java
+++ b/core/src/test/java/org/kohsuke/stapler/framework/io/LargeTextTest.java
@@ -48,7 +48,6 @@ public class LargeTextTest {
@Issue("JENKINS-37664")
@Test
- @Ignore
public void writeLogTo() throws Exception {
assertEquals("", tail("", 0));
assertEquals("abcde", tail("abcde", 0));
|
remove @Ignore that should not have been added
|
diff --git a/views/js/qtiItem/core/Container.js b/views/js/qtiItem/core/Container.js
index <HASH>..<HASH> 100755
--- a/views/js/qtiItem/core/Container.js
+++ b/views/js/qtiItem/core/Container.js
@@ -156,7 +156,7 @@ define(['taoQtiItem/qtiItem/core/Element', 'lodash', 'jquery', 'taoQtiItem/qtiIt
if(this.elements[serial]){
- found = {'parent' : parent || this, 'element' : this.elements[serial]};
+ found = {parent : parent || this, element : this.elements[serial], location : 'body'};
}else{
|
fixed issue : interaction removal does not remove its response
git-svn-id: <URL>
|
diff --git a/lib/anyplayer/players/itunes_mac.rb b/lib/anyplayer/players/itunes_mac.rb
index <HASH>..<HASH> 100644
--- a/lib/anyplayer/players/itunes_mac.rb
+++ b/lib/anyplayer/players/itunes_mac.rb
@@ -1,4 +1,12 @@
class Anyplayer::ItunesMac < Anyplayer::Player
+ def play
+ itunes 'play'
+ end
+
+ def pause
+ itunes 'pause'
+ end
+
def playpause
itunes 'playpause'
end
|
iTunes Mac now can play or pause independently
|
diff --git a/garlic.rb b/garlic.rb
index <HASH>..<HASH> 100644
--- a/garlic.rb
+++ b/garlic.rb
@@ -24,7 +24,7 @@ garlic do
run do
cd "vendor/plugins/response_for" do
- sh "rake spec:rcov:verify"
+ sh "rake spec"
end
end
end
|
Dropping coverage verification from garlic as it's different across the different targets (because of BC code)
|
diff --git a/epylint.py b/epylint.py
index <HASH>..<HASH> 100755
--- a/epylint.py
+++ b/epylint.py
@@ -58,7 +58,7 @@ def lint(filename):
parentPath = os.path.dirname(parentPath)
# Start pylint
- process = Popen("pylint -f parseable -r n --disable=C,R,I '%s'" %
+ process = Popen('pylint -f parseable -r n --disable=C,R,I "%s"' %
childPath, shell=True, stdout=PIPE, stderr=PIPE,
cwd=parentPath)
p = process.stdout
|
apply patch provided by vijayendra bapte on the python projects list for using epylint under windows environment
|
diff --git a/lib/any.js b/lib/any.js
index <HASH>..<HASH> 100644
--- a/lib/any.js
+++ b/lib/any.js
@@ -182,7 +182,7 @@ class Collector {
if (this.one) {
// Shouldn’t happen, safeguards performance problems.
/* c8 ignore next */
- if (this.found) throw new Error('Cannot collect multiple nodes')
+ if (this.found) return
this.found = true
}
diff --git a/test/select.js b/test/select.js
index <HASH>..<HASH> 100644
--- a/test/select.js
+++ b/test/select.js
@@ -76,6 +76,12 @@ test('select.select()', (t) => {
'nothing if not given an element'
)
+ t.deepEqual(
+ select('h1, h2', h('main', [h('h1', 'Alpha'), h('h2', 'Bravo')])),
+ h('h1', 'Alpha'),
+ 'should select one of several elements'
+ )
+
t.end()
})
|
Fix exception on selector list in `select`
|
diff --git a/src/org/opencms/ade/contenteditor/shared/CmsContentDefinition.java b/src/org/opencms/ade/contenteditor/shared/CmsContentDefinition.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/ade/contenteditor/shared/CmsContentDefinition.java
+++ b/src/org/opencms/ade/contenteditor/shared/CmsContentDefinition.java
@@ -251,7 +251,7 @@ public class CmsContentDefinition extends ContentDefinition {
List<String> values = attribute.getSimpleValues();
result = values.get(index);
}
- } else if (attribute.getValueCount() > (index + 1)) {
+ } else if (attribute.getValueCount() > (index)) {
List<I_Entity> values = attribute.getComplexValues();
result = getValueForPath(values.get(index), path);
}
|
Fixing issue where nested value could not be read by path.
|
diff --git a/structr-core/src/main/java/org/structr/core/entity/Principal.java b/structr-core/src/main/java/org/structr/core/entity/Principal.java
index <HASH>..<HASH> 100644
--- a/structr-core/src/main/java/org/structr/core/entity/Principal.java
+++ b/structr-core/src/main/java/org/structr/core/entity/Principal.java
@@ -74,7 +74,6 @@ public interface Principal extends NodeInterface, AccessControllable {
boolean valid = true;
valid &= ValidationHelper.isValidStringNotBlank(this, name, errorBuffer);
- valid &= ValidationHelper.isValidUniqueProperty(this, name, errorBuffer);
valid &= ValidationHelper.isValidUniqueProperty(this, eMail, errorBuffer);
return valid;
|
Removes uniqueness constraint on name property of class Principal.
|
diff --git a/lib/vagrant-vcloudair/driver/meta.rb b/lib/vagrant-vcloudair/driver/meta.rb
index <HASH>..<HASH> 100644
--- a/lib/vagrant-vcloudair/driver/meta.rb
+++ b/lib/vagrant-vcloudair/driver/meta.rb
@@ -124,10 +124,11 @@ module VagrantPlugins
# Instantiate the proper version driver for vCloud Air
@logger.debug("Finding driver for vCloud Air version: #{@version}")
driver_map = {
- '5.1' => Version_5_1,
- '5.5' => Version_5_1,
- '5.6' => Version_5_1,
- '5.7' => Version_5_1
+ '5.1' => Version_5_1,
+ '5.5' => Version_5_1,
+ '5.6' => Version_5_1,
+ '5.7' => Version_5_1,
+ '11.0' => Version_5_1
}
if @version.start_with?('0.9') ||
|
Add API version <I> to driver map
|
diff --git a/lib/utils/pathRegex.js b/lib/utils/pathRegex.js
index <HASH>..<HASH> 100644
--- a/lib/utils/pathRegex.js
+++ b/lib/utils/pathRegex.js
@@ -34,7 +34,12 @@ class PathRegexp {
};
let m = this.regexp.exec(path);
- if (!m) return result;
+ if (!m) {
+ if (path == "" && this.regexp.exec(" ")) /*if path == "" this.regexp.exec("") return false. We test it with this.regexp.exec(" ")*/
+ m = ["dummy", ""];
+ else
+ return result;
+ }
result.match = true;
|
Fix bug in case of empty param in url ex: /api//test for /api/:name/test :name could be empty.
|
diff --git a/plugins/snmppinfo/class.snmppinfo.inc.php b/plugins/snmppinfo/class.snmppinfo.inc.php
index <HASH>..<HASH> 100644
--- a/plugins/snmppinfo/class.snmppinfo.inc.php
+++ b/plugins/snmppinfo/class.snmppinfo.inc.php
@@ -81,7 +81,9 @@ class SNMPPInfo extends PSI_Plugin
}
foreach ($printers as $printer) {
if (! PSI_DEBUG) restore_error_handler();
- $bufferarr=snmprealwalk($printer, "public", "1.3.6.1.2.1.1.5");
+ $bufferarr=snmprealwalk($printer, "public", "1.3.6.1.2.1.1.5", 1000000, 1);
+ if($bufferarr === FALSE) return;
+
if (! PSI_DEBUG) set_error_handler('errorHandlerPsi');
if (! empty($bufferarr)) {
$buffer="";
|
reduce retry for offline printer to reduce load time and avoid timeout
|
diff --git a/openquake/commonlib/calc.py b/openquake/commonlib/calc.py
index <HASH>..<HASH> 100644
--- a/openquake/commonlib/calc.py
+++ b/openquake/commonlib/calc.py
@@ -218,10 +218,9 @@ class PmapGetter(object):
if len(self.weights) == 1: # one realization
return self.get(self.sids, 0, grp)
else: # multiple realizations, assume hcurves/mean is there
- return (self.dstore['hcurves/mean'] if grp is None
- else self.rlzs_assoc.compute_pmap_stats(
- {grp: self.dstore['poes/' + grp]},
- [stats.mean_curve]))
+ dic = ({g: self.dstore['poes/' + g] for g in self.dstore['poes']}
+ if grp is None else {grp: self.dstore['poes/' + grp]})
+ return self.rlzs_assoc.compute_pmap_stats(dic, [stats.mean_curve])
# ######################### hazard maps ################################### #
|
Fixed get_mean to dynamically recompute the mean [skip hazardlib]
|
diff --git a/nhlib/gsim/chiou_youngs_2008.py b/nhlib/gsim/chiou_youngs_2008.py
index <HASH>..<HASH> 100644
--- a/nhlib/gsim/chiou_youngs_2008.py
+++ b/nhlib/gsim/chiou_youngs_2008.py
@@ -74,7 +74,7 @@ class ChiouYoungs2008(GMPE):
stddev_types, component_type):
"""
See :meth:`superclass method
- <nhlib.gsim.base.GroundShkingIntensityModel.get_mean_and_stddevs>`
+ <nhlib.gsim.base.GroundShakingIntensityModel.get_mean_and_stddevs>`
for spec of input and result values.
"""
# extracting dictionary of coefficients specific to required
|
gsim/chiou_youngs_<I> [doc]: fixed a typo in get_mean_and_stddevs()
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ def get_readme():
setup(
name="docx2html",
- version="0.0.10",
+ version="0.1.0",
description="docx (OOXML) to html converter",
author="Jason Ward",
author_email="jason.louard.ward@gmail.com",
|
Bumped to version <I>
|
diff --git a/Controller/Widget/SimpleTextController.php b/Controller/Widget/SimpleTextController.php
index <HASH>..<HASH> 100644
--- a/Controller/Widget/SimpleTextController.php
+++ b/Controller/Widget/SimpleTextController.php
@@ -31,12 +31,15 @@ class SimpleTextController extends Controller
$form->bind($this->getRequest());
if ($form->isValid()) {
+ $formDatas = $form->get('content')->getData();
+ $content = is_null($formDatas) ? '' : $formDatas;
+
if ($simpleTextConfig) {
- $simpleTextConfig->setContent($form->get('content')->getData());
+ $simpleTextConfig->setContent($content);
} else {
$simpleTextConfig = new SimpleTextConfig();
$simpleTextConfig->setWidgetInstance($widget);
- $simpleTextConfig->setContent($form->get('content')->getData());
+ $simpleTextConfig->setContent($content);
}
} else {
return $$this->render(
|
Fixed bug when submitting empty content at the first config of SimpleText widget
|
diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb
index <HASH>..<HASH> 100644
--- a/ext/psych/extconf.rb
+++ b/ext/psych/extconf.rb
@@ -7,7 +7,7 @@ require 'fileutils'
dir_config 'libyaml'
-if enable_config("bundled-libyaml", false) || !(find_header('yaml.h') && find_library('yaml', 'yaml_get_version'))
+if enable_config("bundled-libyaml", false) || !pkg_config('yaml-0.1') && !(find_header('yaml.h') && find_library('yaml', 'yaml_get_version'))
# Embed libyaml since we could not find it.
$VPATH << "$(srcdir)/yaml"
|
Added condition for macOS homebrew
|
diff --git a/checkers/classes.py b/checkers/classes.py
index <HASH>..<HASH> 100644
--- a/checkers/classes.py
+++ b/checkers/classes.py
@@ -585,6 +585,8 @@ a metaclass class method.'}
return
slots = klass.slots()
+ if slots is None:
+ return
# If any ancestor doesn't use slots, the slots
# defined for this class are superfluous.
if any('__slots__' not in ancestor.locals and
|
Check the return value of slots, it can be None.
|
diff --git a/src/main/java/io/vlingo/actors/testkit/TestEnvironment.java b/src/main/java/io/vlingo/actors/testkit/TestEnvironment.java
index <HASH>..<HASH> 100644
--- a/src/main/java/io/vlingo/actors/testkit/TestEnvironment.java
+++ b/src/main/java/io/vlingo/actors/testkit/TestEnvironment.java
@@ -15,12 +15,12 @@ import io.vlingo.actors.plugin.mailbox.testkit.TestMailbox;
public class TestEnvironment extends Environment {
public TestEnvironment() {
super(
- TestWorld.testWorld.world().stage(),
- TestWorld.testWorld.world().addressFactory().uniqueWith("test"),
+ TestWorld.Instance.get().world().stage(),
+ TestWorld.Instance.get().world().addressFactory().uniqueWith("test"),
Definition.has(null, Definition.NoParameters),
- TestWorld.testWorld.world().defaultParent(),
+ TestWorld.Instance.get().world().defaultParent(),
new TestMailbox(),
- TestWorld.testWorld.world().defaultSupervisor(),
+ TestWorld.Instance.get().world().defaultSupervisor(),
JDKLogger.testInstance());
}
}
|
Refactored to make current TestWorld ThreadLocal to enable parallel tests.
|
diff --git a/lib/views/cpu-view.js b/lib/views/cpu-view.js
index <HASH>..<HASH> 100644
--- a/lib/views/cpu-view.js
+++ b/lib/views/cpu-view.js
@@ -43,7 +43,7 @@ class CpuView {
}
onEvent(data) {
- this.line.setLabel(` cpu utilization (${data.cpu.utilization}%) `);
+ this.line.setLabel(` cpu utilization (${data.cpu.utilization.toFixed(1)}%) `);
this.cpuHistory.push(data.cpu.utilization);
if (this.cpuHistory.length > this.historyDepth) {
this.cpuHistory.shift();
|
Round cpu percentage to nearest decimal.
|
diff --git a/src/com/google/javascript/jscomp/Compiler.java b/src/com/google/javascript/jscomp/Compiler.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/Compiler.java
+++ b/src/com/google/javascript/jscomp/Compiler.java
@@ -560,7 +560,7 @@ public class Compiler extends AbstractCompiler implements ErrorHandler, SourceFi
/**
* Do any initialization that is dependent on the compiler options.
*/
- private void initBasedOnOptions() {
+ public void initBasedOnOptions() {
inputSourceMaps.putAll(options.inputSourceMaps);
// Create the source map if necessary.
if (options.sourceMapOutputPath != null) {
@@ -2164,8 +2164,8 @@ public class Compiler extends AbstractCompiler implements ErrorHandler, SourceFi
}
}
return null;
- }
- });
+ }
+ });
}
/**
|
Make the Compiler's initBasedOnOptions() method public in order to allow non-standard Compiler flows to use the applyInputSourceMaps option.
-------------
Created by MOE: <URL>
|
diff --git a/tests/Routing/RouteTest.php b/tests/Routing/RouteTest.php
index <HASH>..<HASH> 100644
--- a/tests/Routing/RouteTest.php
+++ b/tests/Routing/RouteTest.php
@@ -419,7 +419,7 @@ class RouteTest extends TestCase
$responseProphecy = $this->prophesize(ResponseInterface::class);
$callableResolverProphecy = $this->prophesize(CallableResolverInterface::class);
- $callable = 'CallableTest:toCall';
+ $callable = 'callableWhatever';
$callableResolverProphecy
->resolve(Argument::is($callable))
|
Rename test callable to make it clear that Callable:toCall is not expected to be called
|
diff --git a/ezp/Persistence/Content/CreateStruct.php b/ezp/Persistence/Content/CreateStruct.php
index <HASH>..<HASH> 100644
--- a/ezp/Persistence/Content/CreateStruct.php
+++ b/ezp/Persistence/Content/CreateStruct.php
@@ -67,8 +67,7 @@ class CreateStruct extends ValueObject
public $remoteId;
/**
- * TODO: Document
- *
+ * Language id the content was initially created in
* @var mixed
*/
public $initialLanguageId = false;
|
PHPDoc: Sync doc from Content to CreateStruct
|
diff --git a/lib/boom/platform.rb b/lib/boom/platform.rb
index <HASH>..<HASH> 100644
--- a/lib/boom/platform.rb
+++ b/lib/boom/platform.rb
@@ -75,10 +75,12 @@ module Boom
#
# Returns the String value of the Item.
def copy(item)
+ value = item.value.gsub("\'","\\'")
unless windows?
- system("printf '#{item.value.gsub("\'","\\'")}' | #{copy_command}")
+ value = value.gsub('%','%%')
+ system("printf \"#{value}\" | #{copy_command}")
else
- system("echo #{item.value.gsub("\'","\\'")} | #{copy_command}")
+ system("echo #{value} | #{copy_command}")
end
item.value
diff --git a/test/test_platform.rb b/test/test_platform.rb
index <HASH>..<HASH> 100644
--- a/test/test_platform.rb
+++ b/test/test_platform.rb
@@ -5,6 +5,11 @@ class TestPlatform < Test::Unit::TestCase
def setup
end
+ def test_can_handle_percent_strings
+ Boom::Platform.expects("system").with('printf "val%%ue" | pbcopy')
+ Boom::Platform.copy(Boom::Item.new('name','val%ue'))
+ end if !Boom::Platform.windows?
+
def test_darwin
assert_equal Boom::Platform.darwin?, RUBY_PLATFORM.include?('darwin')
end
|
Percent signs should be escaped for `printf`
This is relevant to non-Windows environments. Closes #<I>.
|
diff --git a/pysparkling/sql/casts.py b/pysparkling/sql/casts.py
index <HASH>..<HASH> 100644
--- a/pysparkling/sql/casts.py
+++ b/pysparkling/sql/casts.py
@@ -6,7 +6,8 @@ from functools import lru_cache
import pytz
from dateutil.tz import tzlocal
-from pysparkling.sql.types import TimestampType, DateType, StringType, NumericType, BooleanType, BinaryType, StructType
+from pysparkling.sql.types import TimestampType, DateType, StringType, NumericType, BooleanType, BinaryType, StructType, \
+ ArrayType, MapType
from pysparkling.sql.utils import AnalysisException
NO_TIMESTAMP_CONVERSION = object()
@@ -55,6 +56,14 @@ def cast_to_string(value, from_type, options):
return str(value)
+def cast_nested_to_str(value, from_type, options):
+ if isinstance(from_type, (ArrayType, StructType)):
+ return cast_sequence(value, from_type, options)
+ if isinstance(from_type, MapType):
+ return cast_map(value, from_type, options)
+ raise TypeError("Unable to cast {0}".format(type(from_type)))
+
+
def cast_map(value, from_type, options):
casted_values = [
(cast_to_string(key, from_type.keyType, options),
|
Implement a cast of nested types
|
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -8,7 +8,7 @@ module ActiveRecord
include ActiveModel::AttributeMethods
included do
- @attribute_methods_generated = false
+ initialize_generated_modules
include Read
include Write
include BeforeTypeCast
diff --git a/activerecord/test/cases/attribute_methods/read_test.rb b/activerecord/test/cases/attribute_methods/read_test.rb
index <HASH>..<HASH> 100644
--- a/activerecord/test/cases/attribute_methods/read_test.rb
+++ b/activerecord/test/cases/attribute_methods/read_test.rb
@@ -15,13 +15,6 @@ module ActiveRecord
include ActiveRecord::AttributeMethods
- def self.define_attribute_methods
- # Created in the inherited/included hook for "proper" ARs
- @attribute_methods_mutex ||= Mutex.new
-
- super
- end
-
def self.column_names
%w{ one two three }
end
|
initialize generated modules on inclusion and on inheritence
|
diff --git a/lib/connection.js b/lib/connection.js
index <HASH>..<HASH> 100644
--- a/lib/connection.js
+++ b/lib/connection.js
@@ -44,7 +44,7 @@ function escapeCQL(val)
return 'NULL';
if (Buffer.isBuffer(val))
return val.toString('hex');
- if (isFinite(val))
+ if (typeof val == 'number' || typeof val == 'boolean')
return String(val);
if (Array.isArray(val))
return String(_.map(val, escapeCQL));
|
`escapeCQL`: Avoid serializing numeric strings as numbers.
|
diff --git a/render/form/Foreignkey.php b/render/form/Foreignkey.php
index <HASH>..<HASH> 100644
--- a/render/form/Foreignkey.php
+++ b/render/form/Foreignkey.php
@@ -49,7 +49,7 @@ class Foreignkey extends Text
foreach ($parts as &$part) {
$part = ucfirst($part);
}
- $class = $namespace.implode('/', $parts);
+ $class = $namespace.implode('_', $parts);
return "{$class}_Finder";
}
|
ehm, that should be an underscore, not a slash
|
diff --git a/src/test/java/com/github/chen0040/gp/treegp/program/TerminalUnitTest.java b/src/test/java/com/github/chen0040/gp/treegp/program/TerminalUnitTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/github/chen0040/gp/treegp/program/TerminalUnitTest.java
+++ b/src/test/java/com/github/chen0040/gp/treegp/program/TerminalUnitTest.java
@@ -53,4 +53,11 @@ public class TerminalUnitTest {
t.setValue(0.3);
t.read(Arrays.asList(0.1, 0.2));
}
+
+ @Test
+ public void testTerminalWithDefaultConstructor(){
+ Terminal t = new Terminal();
+ assertThat(t.getSymbol()).isEqualTo("");
+ assertThat(t.isReadOnly()).isFalse();
+ }
}
|
Increase the code coverage for the terminal class
|
diff --git a/pkg/datapath/linux/linux_defaults/linux_defaults.go b/pkg/datapath/linux/linux_defaults/linux_defaults.go
index <HASH>..<HASH> 100644
--- a/pkg/datapath/linux/linux_defaults/linux_defaults.go
+++ b/pkg/datapath/linux/linux_defaults/linux_defaults.go
@@ -23,6 +23,12 @@ const (
// RouteTableIPSec is the default table ID to use for IPSec routing rules
RouteTableIPSec = 200
+ // RouteTableInterfacesOffset is the offset for the per-ENI routing tables.
+ // Each ENI interface will have its own table starting with this offset. It
+ // is 10 because it is highly unlikely to collide with the main routing
+ // table which is between 253-255. See ip-route(8).
+ RouteTableInterfacesOffset = 10
+
// RouteMarkDecrypt is the default route mark to use to indicate datapath
// needs to decrypt a packet.
RouteMarkDecrypt = 0x0D00
|
linux_defaults: Add RouteTableInterfacesOffset
[ upstream commit e<I>b; forward-ported from <I> tree ]
This new value is the table ID for the per-ENI routing tables in the new
ENI datapath. Upcoming commits will use this value and implement the new
datapath.
See <URL>
|
diff --git a/salt/modules/boto_vpc.py b/salt/modules/boto_vpc.py
index <HASH>..<HASH> 100644
--- a/salt/modules/boto_vpc.py
+++ b/salt/modules/boto_vpc.py
@@ -1421,11 +1421,11 @@ def delete_nat_gateway(nat_gateway_id,
# wait for deleting nat gateway to finish prior to attempt to release elastic ips
if wait_for_delete:
for retry in range(wait_for_delete_retries, 0, -1):
- gwinfo = conn3.describe_nat_gateways(NatGatewayIds=[nat_gateway_id])
- if gwinfo:
- gw = gwinfo.get('NatGateways', [None])[0]
- if gw and gw['State'] not in ['deleted', 'failed']:
- time.sleep((2 ** (wait_for_delete_retries - retry)) + (random.randint(0, 1000) / 1000))
+ if gwinfo and gwinfo['State'] not in ['deleted', 'failed']:
+ time.sleep((2 ** (wait_for_delete_retries - retry)) + (random.randint(0, 1000) / 1000))
+ gwinfo = conn3.describe_nat_gateways(NatGatewayIds=[nat_gateway_id])
+ if gwinfo:
+ gwinfo = gwinfo.get('NatGateways', [None])[0]
continue
break
|
fixed a bug in retry mechanism.
|
diff --git a/.buildkite/pipeline.py b/.buildkite/pipeline.py
index <HASH>..<HASH> 100644
--- a/.buildkite/pipeline.py
+++ b/.buildkite/pipeline.py
@@ -18,7 +18,7 @@ TOX_MAP = {
}
# https://github.com/dagster-io/dagster/issues/1662
-DO_COVERAGE = True
+DO_COVERAGE = False
def wait_step():
|
Turn off coveralls
Summary: It's down
Test Plan: BK
Reviewers: alangenfeld
Reviewed By: alangenfeld
Differential Revision: <URL>
|
diff --git a/soupsieve/__meta__.py b/soupsieve/__meta__.py
index <HASH>..<HASH> 100644
--- a/soupsieve/__meta__.py
+++ b/soupsieve/__meta__.py
@@ -186,5 +186,5 @@ def parse_version(ver, pre=False):
return Version(major, minor, micro, release, pre, post, dev)
-__version_info__ = Version(1, 0, 2, "final")
+__version_info__ = Version(1, 1, 0, ".dev")
__version__ = __version_info__._get_canonical()
|
Use dev version for dev branch
|
diff --git a/server/src/main/java/org/uiautomation/ios/wkrdp/model/RemoteWebNativeBackedElement.java b/server/src/main/java/org/uiautomation/ios/wkrdp/model/RemoteWebNativeBackedElement.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/org/uiautomation/ios/wkrdp/model/RemoteWebNativeBackedElement.java
+++ b/server/src/main/java/org/uiautomation/ios/wkrdp/model/RemoteWebNativeBackedElement.java
@@ -134,8 +134,8 @@ public class RemoteWebNativeBackedElement extends RemoteWebElement {
}
case CENTER: {
Dimension size = getSize();
- script.append("var top = (" + top + " + " + size.getHeight() + " / 2) * ratioX);");
- script.append("var left = (" + left + " + " + size.getWidth() + " / 2) * ratioY);");
+ script.append("var top = (" + top + " + " + size.getHeight() + " / 2) * ratioX;");
+ script.append("var left = (" + left + " + " + size.getWidth() + " / 2) * ratioY;");
break;
}
}
|
fix script error with extra paren left in
|
diff --git a/underscore.util.operators.js b/underscore.util.operators.js
index <HASH>..<HASH> 100644
--- a/underscore.util.operators.js
+++ b/underscore.util.operators.js
@@ -29,14 +29,38 @@
mod: function(x, y) {
return x % y;
},
- inc: function(x, y) {
+ inc: function(x) {
return ++x;
},
- dec: function(x, y) {
+ dec: function(x) {
return --x;
},
- neg: function(x, y) {
+ neg: function(x) {
return -x;
+ },
+ eq: function(x, y) {
+ return x == y;
+ },
+ seq: function(x, y) {
+ return x === y;
+ },
+ neq: function(x, y) {
+ return x != y;
+ },
+ sneq: function(x, y) {
+ return x !== y;
+ },
+ gt: function(x, y) {
+ return x > y;
+ },
+ lt: function(x, y) {
+ return x < y;
+ },
+ gte: function(x, y) {
+ return x >= y;
+ },
+ lte: function(x, y) {
+ return x <= y;
}
});
})(this);
|
added equality operators, some may be redundant since underscore supports deep equality.
|
diff --git a/gntp/shim.py b/gntp/shim.py
index <HASH>..<HASH> 100644
--- a/gntp/shim.py
+++ b/gntp/shim.py
@@ -1,3 +1,10 @@
+"""
+Python2.5 and Python3.3 compatibility shim
+
+Heavily inspirted by the "six" library.
+https://pypi.python.org/pypi/six
+"""
+
import sys
PY3 = sys.version_info[0] == 3
@@ -13,9 +20,7 @@ if PY3:
return s.decode('utf8', 'replace')
return s
- import io
- StringIO = io.StringIO
- BytesIO = io.BytesIO
+ from io import StringIO
from configparser import RawConfigParser
else:
def b(s):
@@ -30,7 +35,8 @@ else:
s = str(s)
return unicode(s, "utf8", "replace")
- int2byte = chr
- import StringIO
- StringIO = BytesIO = StringIO.StringIO
+ from StringIO import StringIO
from ConfigParser import RawConfigParser
+
+b.__doc__ = "Ensure we have a byte string"
+u.__doc__ = "Ensure we have a unicode string"
|
Cleanup and docs for our shim
|
diff --git a/findbugsTestCases/src/java/npe/ErrorInFinallyClause.java b/findbugsTestCases/src/java/npe/ErrorInFinallyClause.java
index <HASH>..<HASH> 100644
--- a/findbugsTestCases/src/java/npe/ErrorInFinallyClause.java
+++ b/findbugsTestCases/src/java/npe/ErrorInFinallyClause.java
@@ -21,7 +21,7 @@ public class ErrorInFinallyClause {
}
} finally {
- in.close();
+ in.close(); // TODO: we should report a medium priority NP warning here
out.close(); // TODO: we should report a medium priority NP warning here
}
|
actually, we should report medium priority NP warnings for both of these
git-svn-id: <URL>
|
diff --git a/lib/ApiRequest.js b/lib/ApiRequest.js
index <HASH>..<HASH> 100644
--- a/lib/ApiRequest.js
+++ b/lib/ApiRequest.js
@@ -8,7 +8,7 @@ var rest = require('restling');
var nconf = require('nconf');
var Q = require('q');
-var API = 'https://api.uber.com/v1/';
+var API = 'https://sandbox-api.uber.com/v1/';
var REFRESH_SECONDS_BEFORE_EXPIRY = 10;
var access_token;
var expires_at;
@@ -90,6 +90,12 @@ function call(path, options) {
console.log('using access token', options.accessToken, options);
return rest.request(API + path, options);
}).then(function(result) {
+ try {
+ if (typeof result.data == 'string') result.data = JSON.parse(result.data);
+ }
+ catch (e) {
+ }
+
if (options.method == 'GET') {
if (result.response.statusCode == 200) {
return result.data;
@@ -112,7 +118,8 @@ module.exports = {
'post': function (path, data) {
var options = {};
options.method = 'POST';
- options.data = data;
+ options.headers = {'content-type': 'application/json'};
+ options.data = JSON.stringify(data);
return call(path, options);
},
|
Explicitly using application/json for POSTs.
|
diff --git a/lib/rspec/requestable-examples.rb b/lib/rspec/requestable-examples.rb
index <HASH>..<HASH> 100644
--- a/lib/rspec/requestable-examples.rb
+++ b/lib/rspec/requestable-examples.rb
@@ -12,6 +12,10 @@ module RSpec
end
end
+ def examples_that_can_be_requested
+ @examples_that_can_be_requested ||= []
+ end
+
def request_examples(options)
@requested_examples = RequestedExamples.new(options)
end
@@ -21,7 +25,7 @@ module RSpec
end
def requestable_example(description, options={}, &blk)
- requestable_examples << description
+ examples_that_can_be_requested << description
it description, &blk if requested_examples.run?(options[:as] || description)
end
alias_method :requestable_it, :requestable_example
@@ -36,6 +40,13 @@ module RSpec
describe description, &blk if requested_examples.run?(label)
end
alias_method :requestable_context, :requestable_describe
+
+ def verify_requested_examples!
+ missing_examples = requested_examples - examples_that_can_be_requested
+ if missing_examples.any?
+ raise %|Trying to request examples that don't exist:\n#{missing_examples.join("\n")}|
+ end
+ end
end
end
\ No newline at end of file
|
Adding #verify_requested_examples! which can be run at the end of any shared_examples block that uses requested examples. This will report any requested examples that do not exist (perhaps from typos or wording differences).
|
diff --git a/components/auth/auth.js b/components/auth/auth.js
index <HASH>..<HASH> 100644
--- a/components/auth/auth.js
+++ b/components/auth/auth.js
@@ -569,12 +569,12 @@ export default class Auth {
* if user is logged in or log her in otherwise
*/
async login() {
- await this._checkBackendsStatusesIfEnabled();
if (this.config.windowLogin && this._authDialogService !== undefined) {
this._showAuthDialog();
return;
}
+ await this._checkBackendsStatusesIfEnabled();
try {
const accessToken = await this._backgroundFlow.authorize();
const user = await this.getUser(accessToken);
|
RG-<I> RG-<I> check backend statuses only if logging in without window login enabled: otherwise it causes blocked popup
|
diff --git a/lib/terraforming/cli.rb b/lib/terraforming/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/terraforming/cli.rb
+++ b/lib/terraforming/cli.rb
@@ -43,6 +43,11 @@ module Terraforming
execute(Terraforming::Resource::IAMGroup, options)
end
+ desc "iamgm", "IAM Group Membership"
+ def iamgm
+ execute(Terraforming::Resource::IAMGroupMembership, options)
+ end
+
desc "iamgp", "IAM Group Policy"
def iamgp
execute(Terraforming::Resource::IAMGroupPolicy, options)
diff --git a/spec/lib/terraforming/cli_spec.rb b/spec/lib/terraforming/cli_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/terraforming/cli_spec.rb
+++ b/spec/lib/terraforming/cli_spec.rb
@@ -81,6 +81,13 @@ module Terraforming
it_behaves_like "CLI examples"
end
+ describe "iamgm" do
+ let(:klass) { Terraforming::Resource::IAMGroupMembership }
+ let(:command) { :iamgm }
+
+ it_behaves_like "CLI examples"
+ end
+
describe "iamgp" do
let(:klass) { Terraforming::Resource::IAMGroupPolicy }
let(:command) { :iamgp }
|
Define CLI command iamgm for IAM Group Membership
|
diff --git a/lib/active_admin/views/components/active_admin_form.rb b/lib/active_admin/views/components/active_admin_form.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin/views/components/active_admin_form.rb
+++ b/lib/active_admin/views/components/active_admin_form.rb
@@ -78,7 +78,7 @@ module ActiveAdmin
end
def add_create_another_checkbox
- if %w(new create).include?(action_name) && active_admin_config && active_admin_config.create_another
+ if %w(new create).include?(helpers.action_name) && active_admin_config && active_admin_config.create_another
current_arbre_element.add_child(create_another_checkbox)
end
end
|
Delegate to `helpers` instead of relying on `method_missing`
|
diff --git a/js/browser.js b/js/browser.js
index <HASH>..<HASH> 100755
--- a/js/browser.js
+++ b/js/browser.js
@@ -728,7 +728,7 @@ var igv = (function (igv) {
start = r[searchConfig.startField] - searchConfig.coords;
end = r[searchConfig.endField];
type = r["featureType"];
- handleSearchResult(feature, chr, start, end, chr, type);
+ handleSearchResult(feature, chr, start, end, type);
}
else {
presentSearchResults(results, searchConfig, feature);
|
bug in call to "handleSearchResult" -- affects gtex
|
diff --git a/source/test/common/test_data_ports.py b/source/test/common/test_data_ports.py
index <HASH>..<HASH> 100644
--- a/source/test/common/test_data_ports.py
+++ b/source/test/common/test_data_ports.py
@@ -87,6 +87,9 @@ def test_unique_port_names():
state.add_output_data_port("in", "int", 0)
state.add_input_data_port("out", "int", 0)
+ assert len(state.input_data_ports) == 2
+ assert len(state.output_data_ports) == 2
+
state = HierarchyState('hierarchy state')
state.add_input_data_port("in", "int", 0)
@@ -115,6 +118,10 @@ def test_unique_port_names():
state.add_input_data_port("scope", "int", 0)
state.add_output_data_port("scope", "int", 0)
+ assert len(state.input_data_ports) == 3
+ assert len(state.output_data_ports) == 3
+ assert len(state.scoped_variables) == 3
+
if __name__ == '__main__':
test_default_values_of_data_ports()
|
Extend tests to assert correct port count
|
diff --git a/torchvision/transforms.py b/torchvision/transforms.py
index <HASH>..<HASH> 100644
--- a/torchvision/transforms.py
+++ b/torchvision/transforms.py
@@ -204,7 +204,7 @@ class CenterCrop(object):
Args:
size (sequence or int): Desired output size of the crop. If size is an
- int instead of sequence like (w, h), a square crop (size, size) is
+ int instead of sequence like (h, w), a square crop (size, size) is
made.
"""
@@ -275,7 +275,7 @@ class RandomCrop(object):
Args:
size (sequence or int): Desired output size of the crop. If size is an
- int instead of sequence like (w, h), a square crop (size, size) is
+ int instead of sequence like (h, w), a square crop (size, size) is
made.
padding (int or sequence, optional): Optional padding on each border
of the image. Default is 0, i.e no padding. If a sequence of length
|
Fix docs for CenterCrop and RandomCrop (#<I>)
Wrong order of dimensions In transforms.CenterCrop and transforms.RandomCrop:
Documentation says it should be (w, h), but it actually is (h, w).
Fixing docs to match the code
|
diff --git a/test/test_string.rb b/test/test_string.rb
index <HASH>..<HASH> 100644
--- a/test/test_string.rb
+++ b/test/test_string.rb
@@ -136,4 +136,9 @@ XML
CFPropertyList::List.parsers = orig_parsers
end
+ def test_data_string_is_blob
+ assert_equal parsed_binary('string_binary_data').class, CFPropertyList::Blob
+ assert_equal parsed_xml('string_binary_data').class, CFPropertyList::Blob
+ end
+
end
|
added a test for #<I>/#<I>
|
diff --git a/src/Condition/In.php b/src/Condition/In.php
index <HASH>..<HASH> 100644
--- a/src/Condition/In.php
+++ b/src/Condition/In.php
@@ -43,7 +43,7 @@ class In extends AbstractSpecification
*
* @return string
*/
- protected function generateParameterName(QueryBuilder $queryBuilder)
+ private function generateParameterName(QueryBuilder $queryBuilder)
{
return sprintf('in_%d', count($queryBuilder->getParameters()));
}
|
method should be private because it is overriden
|
diff --git a/tests/src/main/java/com/hazelcast/simulator/tests/icache/CreateDestroyICacheTest.java b/tests/src/main/java/com/hazelcast/simulator/tests/icache/CreateDestroyICacheTest.java
index <HASH>..<HASH> 100644
--- a/tests/src/main/java/com/hazelcast/simulator/tests/icache/CreateDestroyICacheTest.java
+++ b/tests/src/main/java/com/hazelcast/simulator/tests/icache/CreateDestroyICacheTest.java
@@ -28,7 +28,6 @@ import com.hazelcast.simulator.worker.selector.OperationSelectorBuilder;
import com.hazelcast.simulator.worker.tasks.AbstractWorker;
import javax.cache.Cache;
-import javax.cache.CacheException;
import javax.cache.CacheManager;
import static com.hazelcast.simulator.tests.icache.helpers.CacheUtils.createCacheManager;
|
Removed unused import in CreateDestroyICacheTest.
|
diff --git a/types/options.go b/types/options.go
index <HASH>..<HASH> 100644
--- a/types/options.go
+++ b/types/options.go
@@ -230,7 +230,11 @@ func getRootlessStorageOpts(rootlessUID int, systemOpts StoreOptions) (StoreOpti
opts.GraphDriverName = overlayDriver
}
- if opts.GraphDriverName == overlayDriver {
+ // If the configuration file was explicitly set, then copy all the options
+ // present.
+ if defaultConfigFileSet {
+ opts.GraphDriverOptions = systemOpts.GraphDriverOptions
+ } else if opts.GraphDriverName == overlayDriver {
for _, o := range systemOpts.GraphDriverOptions {
if strings.Contains(o, "ignore_chown_errors") {
opts.GraphDriverOptions = append(opts.GraphDriverOptions, o)
|
options: copy all options on explicit config file
when the configuration file was explicitly specified, all the graph
drivers options are copied, not only the ones allowed for rootless.
Closes: <URL>
|
diff --git a/poseidon/tests/test_api.py b/poseidon/tests/test_api.py
index <HASH>..<HASH> 100644
--- a/poseidon/tests/test_api.py
+++ b/poseidon/tests/test_api.py
@@ -46,8 +46,9 @@ def test_regions(client):
assert hasattr(client, 'regions')
assert isinstance(client.regions, P.Regions)
regions = client.regions.list() # it works
- expected = set([u'New York 1', u'Amsterdam 1', u'San Francisco 1',
- u'New York 2', u'Amsterdam 2', u'Singapore 1', u'London 1'])
+ expected = set([u'New York 1', u'New York 3', u'Amsterdam 1',
+ u'San Francisco 1', u'New York 2', u'Amsterdam 2',
+ u'Singapore 1', u'London 1'])
results = set([x['name'] for x in regions])
assert expected == results
|
TST: update unit test for new region NYC3
|
diff --git a/app/Statistics/Service/CountryService.php b/app/Statistics/Service/CountryService.php
index <HASH>..<HASH> 100644
--- a/app/Statistics/Service/CountryService.php
+++ b/app/Statistics/Service/CountryService.php
@@ -555,6 +555,7 @@ class CountryService
public function iso3166(): array
{
return [
+ 'GBR' => 'GB', // Must come before ENG, NIR, SCT and WLS
'ABW' => 'AW',
'AFG' => 'AF',
'AGO' => 'AO',
@@ -632,7 +633,6 @@ class CountryService
'FRO' => 'FO',
'FSM' => 'FM',
'GAB' => 'GA',
- 'GBR' => 'GB',
'GEO' => 'GE',
'GHA' => 'GH',
'GIB' => 'GI',
|
Fix: GBR shown as England on distribution charts
|
diff --git a/bolt/org_config.go b/bolt/org_config.go
index <HASH>..<HASH> 100644
--- a/bolt/org_config.go
+++ b/bolt/org_config.go
@@ -67,15 +67,15 @@ func (s *OrganizationConfigStore) FindOrCreate(ctx context.Context, orgID string
// Update replaces the OrganizationConfig in the store
func (s *OrganizationConfigStore) Update(ctx context.Context, cfg *chronograf.OrganizationConfig) error {
- if cfg == nil {
- return fmt.Errorf("config provided was nil")
- }
return s.client.db.Update(func(tx *bolt.Tx) error {
return s.update(ctx, tx, cfg)
})
}
func (s *OrganizationConfigStore) update(ctx context.Context, tx *bolt.Tx, cfg *chronograf.OrganizationConfig) error {
+ if cfg == nil {
+ return fmt.Errorf("config provided was nil")
+ }
if v, err := internal.MarshalOrganizationConfig(cfg); err != nil {
return err
} else if err := tx.Bucket(OrganizationConfigBucket).Put([]byte(cfg.OrganizationID), v); err != nil {
|
Move nil config guard to helper update method
|
diff --git a/src/main/java/com/github/uderscore/_.java b/src/main/java/com/github/uderscore/_.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/uderscore/_.java
+++ b/src/main/java/com/github/uderscore/_.java
@@ -414,8 +414,7 @@ public final class _ {
}
public static <E> List<E> shuffle(final List<E> list) {
- final List<E> shuffled = new ArrayList<E>(list.size());
- Collections.copy(list, shuffled);
+ final List<E> shuffled = new ArrayList<E>(list);
Collections.shuffle(shuffled);
return shuffled;
}
diff --git a/src/test/java/com/github/underscore/_Test.java b/src/test/java/com/github/underscore/_Test.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/github/underscore/_Test.java
+++ b/src/test/java/com/github/underscore/_Test.java
@@ -257,6 +257,16 @@ _.min(numbers);
}
/*
+_.shuffle([1, 2, 3, 4, 5, 6]);
+=> [4, 1, 6, 3, 5, 2]
+*/
+ @Test
+ public void shuffle() {
+ final List<Integer> result = _.shuffle(asList(1, 2, 3, 4, 5, 6));
+ assertEquals(6, result.size());
+ }
+
+/*
_.sample([1, 2, 3, 4, 5, 6]);
=> 4
|
Added test for the shuffle
|
diff --git a/deprecated.go b/deprecated.go
index <HASH>..<HASH> 100644
--- a/deprecated.go
+++ b/deprecated.go
@@ -15,7 +15,7 @@ import (
func (c *Context) BindWith(obj interface{}, b binding.Binding) error {
log.Println(`BindWith(\"interface{}, binding.Binding\") error is going to
be deprecated, please check issue #662 and either use MustBindWith() if you
- want HTTP 400 to be automatically returned if any error occur, of use
+ want HTTP 400 to be automatically returned if any error occur, or use
ShouldBindWith() if you need to manage the error.`)
return c.MustBindWith(obj, b)
}
|
fix typo (#<I>)
|
diff --git a/lib/chore/cli.rb b/lib/chore/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/chore/cli.rb
+++ b/lib/chore/cli.rb
@@ -89,7 +89,7 @@ module Chore
register_option 'aws_secret_key', '--aws-secret-key KEY', 'Valid AWS Secret Key'
- register_option 'num_workers', '--concurrency NUM', 'Number of workers to run concurrently'
+ register_option 'num_workers', '--concurrency NUM', Integer, 'Number of workers to run concurrently'
register_option 'worker_strategy', '--worker-strategy CLASS_NAME', 'Name of a class to use as the worker strategy (default: ForkedWorkerStrategy' do |arg|
options[:worker_strategy] = constantize(arg)
|
Make sure we convert this to an integer, otherwise things don't work so
good.
|
diff --git a/raja.js b/raja.js
index <HASH>..<HASH> 100644
--- a/raja.js
+++ b/raja.js
@@ -27,8 +27,9 @@ Raja.prototype.updateLink = function(resource, mtime) {
link = document.createElement('link');
link.rel = "resource";
link.href = resource.url;
- document.head.appendChild(link);
- document.head.appendChild(document.createTextNode("\n"));
+ var tn = document.createTextNode("\n");
+ document.head.insertBefore(tn, document.head.firstChild);
+ document.head.insertBefore(link, tn);
}
if (mtime != null) {
resource.mtime = mtime;
|
Keep a newline after a <link>
|
diff --git a/webapps/ui/cockpit/plugins/base/app/views/processInstance/jobRetryBulkDialog.js b/webapps/ui/cockpit/plugins/base/app/views/processInstance/jobRetryBulkDialog.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/cockpit/plugins/base/app/views/processInstance/jobRetryBulkDialog.js
+++ b/webapps/ui/cockpit/plugins/base/app/views/processInstance/jobRetryBulkDialog.js
@@ -55,7 +55,8 @@ module.exports = [
JobResource.count({
processInstanceId: processInstance.id,
- withException: true
+ withException: true,
+ noRetriesLeft: true
}).$promise.then(function(data) {
jobPages.total = data.count;
|
fix(cockpit): show error message in "Increment Number of Retries" modal dialog
related to CAM-<I>
|
diff --git a/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/tools/JSONTool.java b/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/tools/JSONTool.java
index <HASH>..<HASH> 100644
--- a/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/tools/JSONTool.java
+++ b/xwiki-commons-core/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/tools/JSONTool.java
@@ -97,7 +97,7 @@ public class JSONTool
try {
return objectMapper.readValue(str, Object.class);
} catch (Exception e) {
- LOGGER.info("Failed to parse JSON [{}]: ", StringUtils.abbreviate(str, 32),
+ LOGGER.info("Failed to parse JSON [{}]: {}", StringUtils.abbreviate(str, 32),
ExceptionUtils.getRootCauseMessage(e));
return null;
|
[Misc] Fix error-reporting bug thanks to LGTM
|
diff --git a/src/Behat/Gherkin/Dumper.php b/src/Behat/Gherkin/Dumper.php
index <HASH>..<HASH> 100644
--- a/src/Behat/Gherkin/Dumper.php
+++ b/src/Behat/Gherkin/Dumper.php
@@ -13,7 +13,7 @@ use Behat\Gherkin\Exception\Exception,
/*
* This file is part of the Behat Gherkin.
- * (c) 2011 Konstantin Kudryashov <ever.zet@gmail.com>
+ * (c) 2012 Konstantin Kudryashov <ever.zet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -245,9 +245,9 @@ class Dumper
*/
public function dumpText($text, $indent = 0)
{
- return $this->dumpIndent($indent)
- . implode(PHP_EOL . $this->dumpIndent($indent)
- , explode(PHP_EOL, $text)
+ return $this->dumpIndent($indent) . implode(
+ PHP_EOL . $this->dumpIndent($indent),
+ explode(PHP_EOL, $text)
);
}
@@ -274,9 +274,7 @@ class Dumper
*/
public function dumpLanguage($language)
{
- return $this->dumpComment(
- $this->dumpKeyword('language', $language)
- );
+ return $this->dumpComment($this->dumpKeyword('language', $language));
}
}
\ No newline at end of file
|
copyrights, indent...
|
diff --git a/client/js/util.js b/client/js/util.js
index <HASH>..<HASH> 100644
--- a/client/js/util.js
+++ b/client/js/util.js
@@ -1,4 +1,4 @@
-/*globals window, navigator, document, FormData, File, HTMLInputElement, XMLHttpRequest, Blob*/
+/*globals window, navigator, document, FormData, File, HTMLInputElement, XMLHttpRequest, Blob, Storage*/
var qq = function(element) {
"use strict";
@@ -432,7 +432,7 @@ qq.each = function(iterableItem, callback) {
if (iterableItem) {
// Iterate through [`Storage`](http://www.w3.org/TR/webstorage/#the-storage-interface) items
- if (iterableItem.constructor === window.Storage) {
+ if (window.Storage && iterableItem.constructor === window.Storage) {
for (keyOrIndex = 0; keyOrIndex < iterableItem.length; keyOrIndex++) {
retVal = callback(iterableItem.key(keyOrIndex), iterableItem.getItem(iterableItem.key(keyOrIndex)));
if (retVal === false) {
|
fix(util.js): fix qq-each path detection for IE7
|
diff --git a/fusesoc/simulator/verilator.py b/fusesoc/simulator/verilator.py
index <HASH>..<HASH> 100644
--- a/fusesoc/simulator/verilator.py
+++ b/fusesoc/simulator/verilator.py
@@ -106,7 +106,7 @@ class Verilator(Simulator):
stdout = open(_s.format('out'),'w')).run()
def run(self, args):
- fusesoc_cli_parser = (self.tool_options['cli_parser'] == 'fusesoc')
+ fusesoc_cli_parser = ('cli_parser' in self.tool_options and self.tool_options['cli_parser'] == 'fusesoc')
super(Verilator, self).run(args)
|
verilator: Check for cli_parser in tool_options before using it
|
diff --git a/saucelabs.karma.conf.js b/saucelabs.karma.conf.js
index <HASH>..<HASH> 100644
--- a/saucelabs.karma.conf.js
+++ b/saucelabs.karma.conf.js
@@ -65,7 +65,7 @@ module.exports = (config) => {
'libs/png_support/zlib.js',
'tests/utils/compare.js',
{
- pattern: 'tests/**/*.spec.js',
+ pattern: 'tests/!(acroform|unicode)*/*.spec.js',
included: true
}, {
pattern: 'tests/**/reference/*.pdf',
|
Update saucelabs.karma.conf.js
|
diff --git a/src/Support/helpers.php b/src/Support/helpers.php
index <HASH>..<HASH> 100644
--- a/src/Support/helpers.php
+++ b/src/Support/helpers.php
@@ -266,12 +266,12 @@ if (!function_exists('input')) {
function input($name = null, $default = null)
{
if ($name === null)
- return Input::all();
+ return Request::all();
// Array field name, eg: field[key][key2][key3]
$name = implode('.', name_to_array($name));
- return Input::get($name, $default);
+ return Request::get($name, $default);
}
}
|
Use Request facade instead of Input facade
|
diff --git a/cgi-bin/speed.py b/cgi-bin/speed.py
index <HASH>..<HASH> 100644
--- a/cgi-bin/speed.py
+++ b/cgi-bin/speed.py
@@ -1,15 +1,17 @@
#!c:/python33/python.exe
# -*- coding: utf-8 -*-
-
+import os
import cgi
import time
print('Content-type: text/html\n\n')
-
-fs = cgi.FieldStorage()
-src = fs['src'].value
-t0 = time.perf_counter()
-exec(src)
-print('CPython: %6.2f ms' % ((time.perf_counter() - t0) * 1000.0))
\ No newline at end of file
+if os.environ['REMOTE_ADDR']!='127.0.0.1':
+ print('forbidden access')
+else:
+ fs = cgi.FieldStorage()
+ src = fs['src'].value
+ t0 = time.perf_counter()
+ exec(src)
+ print('CPython: %6.2f ms' % ((time.perf_counter() - t0) * 1000.0))
\ No newline at end of file
|
Add test on REMOTE_ADDR in speed.py
|
diff --git a/src/rejester/run.py b/src/rejester/run.py
index <HASH>..<HASH> 100644
--- a/src/rejester/run.py
+++ b/src/rejester/run.py
@@ -33,6 +33,8 @@ def getch():
capture one char from stdin for responding to Y/N prompt
'''
fd = sys.stdin.fileno()
+ if not os.isatty(fd):
+ return sys.stdin.read(1)
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(sys.stdin.fileno())
|
'rejester delete' doesn't crash if run noninteractively
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.