diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/pifpaf/tests/test_drivers.py b/pifpaf/tests/test_drivers.py index <HASH>..<HASH> 100644 --- a/pifpaf/tests/test_drivers.py +++ b/pifpaf/tests/test_drivers.py @@ -38,6 +38,7 @@ from pifpaf.drivers import mysql from pifpaf.drivers import postgresql from pifpaf.drivers import rabbitmq from pifpaf.drivers import redis +from pifpaf.drivers import s3rver from pifpaf.drivers import zookeeper @@ -149,7 +150,7 @@ class TestDrivers(testtools.TestCase): "s3rver not found") def test_s3rver(self): port = 4569 - self.useFixture(fakes3.FakeS3Driver(port=port)) + self.useFixture(s3rver.S3rverDriver(port=port)) self.assertEqual("s3://localhost:%d" % port, os.getenv("PIFPAF_URL")) self.assertEqual("http://localhost:%d" % port,
tests: fix s3rver tests
diff --git a/test/browser-tests/methods/transition.js b/test/browser-tests/methods/transition.js index <HASH>..<HASH> 100644 --- a/test/browser-tests/methods/transition.js +++ b/test/browser-tests/methods/transition.js @@ -37,7 +37,7 @@ export default function() { }); // this test really likes to randomly fail on phantom - if ( !/phantom/.test( navigator.userAgent ) ) { + if ( !/phantom/i.test( navigator.userAgent ) ) { test( 'Use transitions from event with implicit node', t => { const done = t.async(); t.expect(2);
missed the insensitive flag on the test to skip in phantom
diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/OStorageEmbedded.java b/core/src/main/java/com/orientechnologies/orient/core/storage/OStorageEmbedded.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/orientechnologies/orient/core/storage/OStorageEmbedded.java +++ b/core/src/main/java/com/orientechnologies/orient/core/storage/OStorageEmbedded.java @@ -109,6 +109,9 @@ public abstract class OStorageEmbedded extends OStorageAbstract { : -1; ioRecord = browseCluster(iListener, ioRecord, cluster, beginClusterPosition, endClusterPosition, iLockEntireCluster); + if (ioRecord == null) + // BREAK: LIMIT REACHED + break; } } catch (IOException e) { @@ -146,9 +149,11 @@ public abstract class OStorageEmbedded extends OStorageAbstract { // GET THE CACHED RECORD recordToCheck = record; - if (!iListener.foreach(recordToCheck)) - // LISTENER HAS INTERRUPTED THE EXECUTION + if (!iListener.foreach(recordToCheck)) { + // LISTENER HAS INTERRUPTED THE EXECUTION: RETURN NULL TO TELL TO THE CALLER TO STOP ITERATION + ioRecord = null; break; + } } catch (OCommandExecutionException e) { // PASS THROUGH throw e;
Fixed bug on LIMIT keywork in SQL UPDATE statement
diff --git a/dispatcher_test.go b/dispatcher_test.go index <HASH>..<HASH> 100644 --- a/dispatcher_test.go +++ b/dispatcher_test.go @@ -8,6 +8,13 @@ import ( "unsafe" ) +func TestDispatcherAddNonFunc(t *testing.T) { + d := NewDispatcher() + testPanic(t, func() { + d.AddFunc("foobar", 123) + }) +} + func TestDispatcherEmptyFuncName(t *testing.T) { d := NewDispatcher() testPanic(t, func() {
added a test non-func passing to Dispatcher.AddFunc
diff --git a/lib/simple_enum/version.rb b/lib/simple_enum/version.rb index <HASH>..<HASH> 100644 --- a/lib/simple_enum/version.rb +++ b/lib/simple_enum/version.rb @@ -1,5 +1,5 @@ module SimpleEnum # The current `SimpleEnum` version. - VERSION = "2.0.0.rc3" + VERSION = "2.0.0" end
release <I> (finally)
diff --git a/repairbox/tool.py b/repairbox/tool.py index <HASH>..<HASH> 100644 --- a/repairbox/tool.py +++ b/repairbox/tool.py @@ -50,6 +50,14 @@ class Tool(object): return self.__build_instructions.build(force=force) + def upload(self) -> bool: + """ + Attempts to upload the image for this tool to + `DockerHub <https://hub.docker.com>`_. + """ + return self.__build_instructions.upload() + + class ToolManager(object): def __init__(self, manager: 'repairbox.manager.RepairBox') -> None: self.__manager = manager
added copypasto Tool.upload
diff --git a/tests/calculators/hazard/disagg/core_test.py b/tests/calculators/hazard/disagg/core_test.py index <HASH>..<HASH> 100644 --- a/tests/calculators/hazard/disagg/core_test.py +++ b/tests/calculators/hazard/disagg/core_test.py @@ -76,7 +76,8 @@ class TaskCompleteCallbackTest(unittest.TestCase): self.calc.progress['total'] = 6 self.calc.progress['hc_total'] = 3 - callback = self.calc.get_task_complete_callback(hc_tag, block_size=1, concurrent_tasks=2) + callback = self.calc.get_task_complete_callback( + hc_tag, block_size=1, concurrent_tasks=2) message = self.__class__.FakeMessage()
tests/calcs/hazard/disagg/core_test: Whitespace.
diff --git a/lib/zones/can_import.js b/lib/zones/can_import.js index <HASH>..<HASH> 100644 --- a/lib/zones/can_import.js +++ b/lib/zones/can_import.js @@ -9,7 +9,7 @@ module.exports = function(can){ var canImport = function(el, tagData){ var moduleName = el.getAttribute("from"); - var templateModule = tagData.options.attr("helpers.module"); + var templateModule = tagData.options.get("helpers.module"); var parentName = templateModule ? templateModule.id : undefined; var isAPage = !!tagData.subtemplate;
Replace deprecated attr call with get
diff --git a/lib/active_scaffold/helpers/controller_helpers.rb b/lib/active_scaffold/helpers/controller_helpers.rb index <HASH>..<HASH> 100644 --- a/lib/active_scaffold/helpers/controller_helpers.rb +++ b/lib/active_scaffold/helpers/controller_helpers.rb @@ -33,6 +33,8 @@ module ActiveScaffold parameters[:parent_id] = nil parameters[:action] = "index" parameters[:id] = nil + parameters[:associated_id] = nil + parameters[:utf8] = nil params_for(parameters) end end
Bugfix: reset some more parameters when going back to main
diff --git a/redis/client.py b/redis/client.py index <HASH>..<HASH> 100644 --- a/redis/client.py +++ b/redis/client.py @@ -368,6 +368,12 @@ class StrictRedis(object): self.response_callbacks = self.__class__.RESPONSE_CALLBACKS.copy() + def __repr__(self): + return "{class_name}<host={host},port={port},db={db}>".format( + class_name=type(self).__name__, + **self.connection_pool.connection_kwargs + ) + def set_response_callback(self, command, callback): "Set a custom Response Callback" self.response_callbacks[command] = callback diff --git a/tests/test_connection_pool.py b/tests/test_connection_pool.py index <HASH>..<HASH> 100644 --- a/tests/test_connection_pool.py +++ b/tests/test_connection_pool.py @@ -123,3 +123,9 @@ class TestConnection(object): pool = bad_connection.connection_pool assert len(pool._available_connections) == 1 assert not pool._available_connections[0]._sock + + def test_repr_contains_db_info(self, r): + """ + Repr should contain database connection info + """ + assert repr(redis.Redis()) == 'Redis<host=localhost,port=6379,db=0>'
Add support for showing db connection info via repr
diff --git a/chwrapper/services/base.py b/chwrapper/services/base.py index <HASH>..<HASH> 100644 --- a/chwrapper/services/base.py +++ b/chwrapper/services/base.py @@ -63,7 +63,7 @@ class Service(object): custom_messages = { 429: cust_str.format( datetime.utcfromtimestamp( - float(response.headers['X-Ratelimit-Reset'])) + float(response.headers.get('X-Ratelimit-Reset', 0))) ) }
Use .get to stop KeyErrors being raised when no headers returned by Companies House
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -95,11 +95,10 @@ class Sade { } let opts = mri(arr.slice(3), cmd.config); - let args = opts._; - // TODO: parse arguments (`_`) - // TODO: push to new `arguments` arr per known key - // TODO: append remaining `opts:options` to arr - return cmd.handler(opts); + let reqs = cmd.usage.split(/\s+/).filter(x => x.charAt(0)==='<'); + let args = opts._.splice(0, reqs.length); + args.push(opts); // flags & co are last + return cmd.handler.apply(null, args); } help(str) {
parse cmd usage for named args; pass thru handler; - only counts required params (‘<foobar>’) - any optionals will be available on `opts._` key
diff --git a/src/filter/collection/filter-by.js b/src/filter/collection/filter-by.js index <HASH>..<HASH> 100644 --- a/src/filter/collection/filter-by.js +++ b/src/filter/collection/filter-by.js @@ -13,7 +13,8 @@ angular.module('a8m.filter-by', []) var comparator; - search = (isString(search)) ? search.toLowerCase() : undefined; + search = (isString(search) || isNumber(search)) ? + String(search).toLowerCase() : undefined; collection = (isObject(collection)) ? toArray(collection) : collection; @@ -41,12 +42,12 @@ angular.module('a8m.filter-by', []) }); } - return (isString(comparator)) ? - !comparator.toLowerCase().indexOf(search) : + return (isString(comparator) || isNumber(comparator)) ? + !String(comparator).toLowerCase().indexOf(search) : false; }) }); } - }]); \ No newline at end of file + }]);
fix(filter-by): add is number conditaion + casting
diff --git a/python/docs/conf.py b/python/docs/conf.py index <HASH>..<HASH> 100644 --- a/python/docs/conf.py +++ b/python/docs/conf.py @@ -45,6 +45,7 @@ extensions = [ autosummary_generate = True add_module_names = False +autodoc_default_flags = ['members', 'inherited-members'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']
Make members, inherited-members default in autodoc
diff --git a/swipe.js b/swipe.js index <HASH>..<HASH> 100644 --- a/swipe.js +++ b/swipe.js @@ -140,6 +140,8 @@ function Swipe(container, options) { if (options.continuous) move(circle(to - direction), -(width * direction), 0); // we need to get the next in place } else { + + to = circle(to); animate(index * -width, to * -width, slideSpeed || speed); //no fallback for a circular continuous if the browser does not accept transitions }
fix continuous for no-transitions browsers
diff --git a/slacker/__init__.py b/slacker/__init__.py index <HASH>..<HASH> 100644 --- a/slacker/__init__.py +++ b/slacker/__init__.py @@ -114,13 +114,15 @@ class Groups(BaseAPI): return self.get('groups.list', params={'exclude_archived': exclude_archived}) - def history(self, channel, latest=None, oldest=None, count=None): + def history(self, channel, latest=None, oldest=None, count=None, + inclusive=None): return self.get('groups.history', params={ 'channel': channel, 'latest': latest, 'oldest': oldest, - 'count': count + 'count': count, + 'inclusive': inclusive }) def invite(self, channel, user):
"inclusive" argument for groups.history API.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,5 @@ import os import sys -# Temporary patch for issue reported here: -# https://groups.google.com/forum/#!topic/nose-users/fnJ-kAUbYHQ -import multiprocessing # TODO: Remove when Travis-CI updates 2.7 to 2.7.4+ __DIR__ = os.path.abspath(os.path.dirname(__file__)) import codecs from setuptools import setup
Remove multiprocessing import as Travis-CI has upgraded to <I>+
diff --git a/src/client.js b/src/client.js index <HASH>..<HASH> 100644 --- a/src/client.js +++ b/src/client.js @@ -648,8 +648,8 @@ exports.makeClientConstructor = function(methods, serviceName) { var deserialize = attrs.responseDeserialize; Client.prototype[name] = requester_makers[method_type]( attrs.path, serialize, deserialize); - Client.prototype[name].serialize = serialize; - Client.prototype[name].deserialize = deserialize; + // Associate all provided attributes with the method + _.assign(Client.prototype[name], attrs); }); return Client; diff --git a/src/common.js b/src/common.js index <HASH>..<HASH> 100644 --- a/src/common.js +++ b/src/common.js @@ -146,6 +146,8 @@ exports.getProtobufServiceAttrs = function getProtobufServiceAttrs(service, path: prefix + method.name, requestStream: method.requestStream, responseStream: method.responseStream, + requestType: method.resolvedRequestType, + responseType: method.resolvedResponseType, requestSerialize: serializeCls(method.resolvedRequestType.build()), requestDeserialize: deserializeCls(method.resolvedRequestType.build(), binaryAsBase64, longsAsStrings),
Add more reflection information to Node client classes
diff --git a/lib/Memcache.php b/lib/Memcache.php index <HASH>..<HASH> 100644 --- a/lib/Memcache.php +++ b/lib/Memcache.php @@ -37,7 +37,7 @@ class Memcache extends BaseCache ); /** - * MEMCACHE_COMPRESSED + * The flag that use MEMCACHE_COMPRESSED to store the item compressed (uses zlib). * * @var int */ diff --git a/tests/unit/MemcacheTest.php b/tests/unit/MemcacheTest.php index <HASH>..<HASH> 100644 --- a/tests/unit/MemcacheTest.php +++ b/tests/unit/MemcacheTest.php @@ -12,11 +12,6 @@ class MemcacheTest extends CacheTestCase parent::setUp(); - // HHVM: Unable to handle compressed values yet - if (defined('HHVM_VERSION')) { - $this->object->setOption('flag', 0); - } - if (false === @$this->object->getObject()->getStats()) { $this->markTestSkipped('The memcache is not running'); }
changed flag default to 0, false zlib is not install by default
diff --git a/ast_test.go b/ast_test.go index <HASH>..<HASH> 100644 --- a/ast_test.go +++ b/ast_test.go @@ -576,14 +576,12 @@ func removePos(v interface{}) Node { case IfStmt: removePos(&x.Cond) removePos(x.ThenStmts) - removePos(x.Elifs) + for i := range x.Elifs { + removePos(&x.Elifs[i].Cond) + removePos(x.Elifs[i].ThenStmts) + } removePos(x.ElseStmts) return x - case []Elif: - for i := range x { - removePos(&x[i].Cond) - removePos(x[i].ThenStmts) - } case WhileStmt: x.While = Position{} x.Done = Position{}
ast_test: no need for []Elif case
diff --git a/quilt/push.py b/quilt/push.py index <HASH>..<HASH> 100644 --- a/quilt/push.py +++ b/quilt/push.py @@ -25,6 +25,7 @@ from quilt.command import Command from quilt.db import Db, Series from quilt.error import NoPatchesInSeries from quilt.patch import Patch +from quilt.utils import SubprocessError, Touch class Push(Command): @@ -38,11 +39,22 @@ class Push(Command): def _apply_patch(self, patch_name): prefix = os.path.join(self.quilt_pc, patch_name) patch_file = os.path.join(self.quilt_patches, patch_name) - Patch(self.cwd, patch_file, backup=True, prefix=prefix) + refresh = prefix + "~refresh" + + if os.path.exists(refresh): + raise QuiltException("Patch %s needs to be refreshed" % \ + patch_name) + + try: + Patch(self.cwd, patch_file, backup=True, prefix=prefix) + except SubprocessError, e: + Touch(refresh) + raise QuiltError("Patch %s does not apply" % patch_name) + self.db.add_patch(patch_name) if os.path.exists(prefix): - open(os.path.join(prefix, ".timestamp"), "w").close() + Touch(os.path.join(prefix, ".timestamp")) else: os.makedirs(prefix)
Implement the refresh bahaviour of quilt If a patch could no be applied quilt creates a ~refresh file in the .pc directory. If this file is present quilt won't apply the patch until it is forced to do so.
diff --git a/src/examples/java/NodeExample.java b/src/examples/java/NodeExample.java index <HASH>..<HASH> 100644 --- a/src/examples/java/NodeExample.java +++ b/src/examples/java/NodeExample.java @@ -38,11 +38,14 @@ public class NodeExample { // String bob = "3N9gDFq8tKFhBDBTQxR3zqvtpXjw5wW3syA"; + // Create an alias + String txId = node.alias(alice, "alice", 'T', FEE); + // Issue an asset String assetId = node.issueAsset(alice, "CleanAir", "The first air-backed blockchain asset ever", 1_000_000 * TOKEN, 8, true, ISSUE_FEE); // Reissuing, making it no longer reissuable - String txId = node.reissueAsset(alice, assetId, 100 * TOKEN, true, ISSUE_FEE); + txId = node.reissueAsset(alice, assetId, 100 * TOKEN, true, ISSUE_FEE); // Burning some coins txId = node.burnAsset(alice, assetId, 20 * TOKEN, ISSUE_FEE);
Added alias creation to NodeExample.java
diff --git a/montblanc/impl/biro/v3/CompositeBiroSolver.py b/montblanc/impl/biro/v3/CompositeBiroSolver.py index <HASH>..<HASH> 100644 --- a/montblanc/impl/biro/v3/CompositeBiroSolver.py +++ b/montblanc/impl/biro/v3/CompositeBiroSolver.py @@ -163,7 +163,7 @@ class CompositeBiroSolver(BaseSolver): if ntime < self.vtime: self.vtime = ntime # Configure the number of solvers used - self.nsolvers = kwargs.get('nsolvers', 2) + self.nsolvers = kwargs.get('nsolvers', 4) self.time_begin = np.arange(self.nsolvers)*self.vtime//self.nsolvers self.time_end = np.arange(1,self.nsolvers+1)*self.vtime//self.nsolvers self.time_diff = self.time_end - self.time_begin
Change the default number of solvers (and by implication CUDA streams) from 2 to 4. This is the point at which further asynchronous overlap benefits become negligible, but our current overlap is sufficient at 2 in any case.
diff --git a/tests/kif_test.py b/tests/kif_test.py index <HASH>..<HASH> 100644 --- a/tests/kif_test.py +++ b/tests/kif_test.py @@ -413,20 +413,20 @@ TEST_KIF_81DOJO_RESULT = { } class ParserTest(unittest.TestCase): - def parse_str_test(self): + def test_parse_str(self): result = KIF.Parser.parse_str(TEST_KIF_STR) self.assertEqual(result[0], TEST_KIF_RESULT) - def parse_str_with_time_test(self): + def test_parse_str_with_time(self): result = KIF.Parser.parse_str(TEST_KIF_STR_WITH_TIME) self.assertEqual(result[0], TEST_KIF_WITH_TIME_RESULT) - def parse_str_81dojo_test(self): + def test_parse_str_81dojo(self): result = KIF.Parser.parse_str(TEST_KIF_81DOJO) print(result[0]) self.assertEqual(result[0], TEST_KIF_81DOJO_RESULT) - def parse_file_test(self): + def test_parse_file(self): try: tempdir = tempfile.mkdtemp()
fixed: set test_ at start of testing function name to work with unittest
diff --git a/build.py b/build.py index <HASH>..<HASH> 100755 --- a/build.py +++ b/build.py @@ -76,7 +76,7 @@ def report_sizes(t): t.info(' compressed: %d bytes', len(stringio.getvalue())) -virtual('all', 'build-all', 'build', 'examples') +virtual('all', 'build-all', 'build', 'examples', 'precommit') virtual('precommit', 'lint', 'build-all', 'test', 'build', 'build-examples', 'doc')
Build precommit target by default so precommit dependencies get cleaned by default
diff --git a/src/control/Checkout.php b/src/control/Checkout.php index <HASH>..<HASH> 100755 --- a/src/control/Checkout.php +++ b/src/control/Checkout.php @@ -32,6 +32,7 @@ use SilverStripe\Omnipay\Service\ServiceFactory; use SilverStripe\CMS\Controllers\ContentController; use SilverCommerce\ShoppingCart\ShoppingCartFactory; use SilverCommerce\Checkout\Forms\CustomerDetailsForm; +use SilverCommerce\ShoppingCart\Model\ShoppingCart; /** * Controller used to render the checkout process @@ -308,7 +309,6 @@ class Checkout extends Controller // If we have turned off login, or member logged in $login_form = null; $customer_form = $this->CustomerForm(); - $request = $this->getRequest(); $config = SiteConfig::current_site_config(); $member = Security::getCurrentUser(); @@ -356,7 +356,7 @@ class Checkout extends Controller $estimate = $this->getEstimate(); $cart_estimate = ShoppingCartFactory::create()->getCurrent(); - if (!$estimate || ($cart_estimate->ID != $estimate->ID)) { + if (!$estimate || (is_a($estimate, ShoppingCart::class) && ($cart_estimate->ID != $estimate->ID))) { $this->setEstimate($cart_estimate); } }
Ensure we only merge shopping carts on login (not other estimates)
diff --git a/i3pystatus/core/command.py b/i3pystatus/core/command.py index <HASH>..<HASH> 100644 --- a/i3pystatus/core/command.py +++ b/i3pystatus/core/command.py @@ -7,11 +7,21 @@ CommandResult = namedtuple("Result", ['rc', 'out', 'err']) def run_through_shell(command, enable_shell=False): """ - Retrieves output of command - Returns tuple success (boolean)/ stdout(string) / stderr (string) + Retrieve output of a command. + Returns a named tuple with three elements: - Don't use this function with programs that outputs lots of data since the output is saved - in one variable + * ``rc`` (integer) Return code of command. + * ``out`` (string) Everything that was printed to stdout. + * ``err`` (string) Everything that was printed to stderr. + + Don't use this function with programs that outputs lots of data since the + output is saved in one variable. + + :param command: A string or a list of strings containing the name and + arguments of the program. + :param enable_shell: If set ot `True` users default shell will be invoked + and given ``command`` to execute. The ``command`` should obviously be a + string since shell does all the parsing. """ if not enable_shell and not isinstance(command, list):
Docs: Updated docstring of `run_through_shell`.
diff --git a/Example/src/ScrollableViewExample.js b/Example/src/ScrollableViewExample.js index <HASH>..<HASH> 100644 --- a/Example/src/ScrollableViewExample.js +++ b/Example/src/ScrollableViewExample.js @@ -58,7 +58,9 @@ function ScrollableView({ children }) { const handler = useAnimatedGestureHandler({ onStart: (evt, ctx) => { - ctx.startY = translateY.value; + const currentY = translateY.value; + ctx.startY = currentY; + translateY.value = currentY; // for stop animation }, onActive: (evt, ctx) => {
Fix scroll animation in Example (#<I>) ## Description The list in scroll Example app is inertness, and when list is moved and someone taps on screen and doesn't move by finger it calls only onStart() event from GestureHandler, and this sets the actual position but the list is still moving. If in the next step someone moves their finger then the list jumps to this position and starts animation of scroll from this position like in issue: Fixes <URL>
diff --git a/torchtext/data.py b/torchtext/data.py index <HASH>..<HASH> 100644 --- a/torchtext/data.py +++ b/torchtext/data.py @@ -230,10 +230,9 @@ class Field(object): if self.sequential: arr = arr.contiguous() else: - with torch.cuda.device(device): - arr = arr.cuda() - if self.include_lengths: - lengths = lengths.cuda() + arr = arr.cuda(device) + if self.include_lengths: + lengths = lengths.cuda(device) if self.include_lengths: return Variable(arr, volatile=not train), lengths return Variable(arr, volatile=not train)
fix numericalize with device=None
diff --git a/internal/location/schema.go b/internal/location/schema.go index <HASH>..<HASH> 100644 --- a/internal/location/schema.go +++ b/internal/location/schema.go @@ -10,13 +10,6 @@ func Schema() *pluginsdk.Schema { return commonschema.Location() } -func HashCode(location interface{}) int { - // NOTE: this is intentionally not present upstream as the only usage is deprecated - // and so this can be removed in 3.0 - loc := location.(string) - return pluginsdk.HashString(Normalize(loc)) -} - func StateFunc(input interface{}) string { return location.StateFunc(input) } diff --git a/internal/services/containers/container_registry_resource.go b/internal/services/containers/container_registry_resource.go index <HASH>..<HASH> 100644 --- a/internal/services/containers/container_registry_resource.go +++ b/internal/services/containers/container_registry_resource.go @@ -1132,7 +1132,9 @@ func resourceContainerRegistrySchema() map[string]*pluginsdk.Schema { Type: pluginsdk.TypeString, ValidateFunc: validation.StringIsNotEmpty, }, - Set: location.HashCode, + Set: func(input interface{}) int { + return pluginsdk.HashString(location.Normalize(input.(string))) + }, } }
refactor: removing the old `HashCode` function
diff --git a/umis/umis.py b/umis/umis.py index <HASH>..<HASH> 100644 --- a/umis/umis.py +++ b/umis/umis.py @@ -151,9 +151,28 @@ def tagcount(genemap, sam, out, output_evidence_table, positional): genes.to_csv(out) +@click.command() +@click.argument('fastq', type=click.File('r')) +def cb_histogram(fastq): + ''' Counts the number of reads for each cellular barcode + + Expects formatted fastq files. + ''' + parser_re = re.compile('(.*):CELL_(?P<CB>.*):UMI_(.*)\\n(.*)\\n\\+\\n(.*)\\n') + + counter = collections.Counter() + for read in stream_fastq(fastq): + match = parser_re.search(read).groupdict() + counter[match['CB']] += 1 + + for bc, count in counter.most_common(): + sys.stdout.write('{}\t{}\n'.format(bc, count)) + + @click.group() def umis(): pass umis.add_command(fastqtransform) umis.add_command(tagcount) +umis.add_command(cb_histogram)
Added command to calculate CB histogram from formatted fastq
diff --git a/petl/test/io/test_json_unicode.py b/petl/test/io/test_json_unicode.py index <HASH>..<HASH> 100644 --- a/petl/test/io/test_json_unicode.py +++ b/petl/test/io/test_json_unicode.py @@ -27,5 +27,5 @@ def test_json_unicode(): assert a[0] == b['id'] assert a[1] == b['name'] - actual = fromjson(fn) + actual = fromjson(fn, header=['id', 'name']) ieq(tbl, actual)
fix tests for change in field ordering behaviour
diff --git a/assets/src/org/ruboto/ScriptInfo.java b/assets/src/org/ruboto/ScriptInfo.java index <HASH>..<HASH> 100644 --- a/assets/src/org/ruboto/ScriptInfo.java +++ b/assets/src/org/ruboto/ScriptInfo.java @@ -5,6 +5,19 @@ public class ScriptInfo { private String scriptName; private Object rubyInstance; + public void setFromIntent(android.context.Intent intent) { + android.os.Bundle configBundle = intent.getBundleExtra("Ruboto Config"); + + if (configBundle != null) { + if (configBundle.containsKey("ClassName")) { + setRubyClassName(configBundle.getString("ClassName")); + } + if (configBundle.containsKey("Script")) { + setScriptName(configBundle.getString("Script")); + } + } + } + public String getRubyClassName() { if (rubyClassName == null && scriptName != null) { return Script.toCamelCase(scriptName);
Added a method to configure from an intent
diff --git a/core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java b/core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java +++ b/core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java @@ -47,7 +47,7 @@ public abstract class AbstractDiskSpaceMonitor extends NodeMonitor { if(size!=null && size.size > getThresholdBytes() && c.isOffline() && c.getOfflineCause() instanceof DiskSpace) if(this.getClass().equals(((DiskSpace)c.getOfflineCause()).getTrigger())) if(getDescriptor().markOnline(c)) { - LOGGER.warning(Messages.DiskSpaceMonitor_MarkedOnline(c.getName())); + LOGGER.info(Messages.DiskSpaceMonitor_MarkedOnline(c.getName())); } return size; }
When a node is back to normal, INFO seems enough I think the other way round is acceptable as a WARNING. I think when a node becomes available again, INFO is enough (even more given Jenkins has INFO as displayed by default)
diff --git a/src/Patchwork/Controller/AdminController.php b/src/Patchwork/Controller/AdminController.php index <HASH>..<HASH> 100644 --- a/src/Patchwork/Controller/AdminController.php +++ b/src/Patchwork/Controller/AdminController.php @@ -248,6 +248,7 @@ class AdminController implements ControllerProviderInterface $image->move($dir, $file); $bean->setImage($dir, $file); + R::store($bean); } } }
added forgotten re-save directive after image upload
diff --git a/java-speech/samples/snippets/src/main/java/com/example/speech/Recognize.java b/java-speech/samples/snippets/src/main/java/com/example/speech/Recognize.java index <HASH>..<HASH> 100644 --- a/java-speech/samples/snippets/src/main/java/com/example/speech/Recognize.java +++ b/java-speech/samples/snippets/src/main/java/com/example/speech/Recognize.java @@ -735,8 +735,6 @@ public class Recognize { .setEncoding(AudioEncoding.LINEAR16) .setLanguageCode("en-US") .setSampleRateHertz(8000) - // Enhanced models are only available to projects that - // opt in for audio data collection. .setUseEnhanced(true) // A model must be specified to use enhanced model. .setModel("phone_call")
samples: Data logging opt-in is no longer required for enhanced models (#<I>)
diff --git a/src/Administration/Resources/administration/src/module/sw-media/mixin/mediagrid-listener.mixin.js b/src/Administration/Resources/administration/src/module/sw-media/mixin/mediagrid-listener.mixin.js index <HASH>..<HASH> 100644 --- a/src/Administration/Resources/administration/src/module/sw-media/mixin/mediagrid-listener.mixin.js +++ b/src/Administration/Resources/administration/src/module/sw-media/mixin/mediagrid-listener.mixin.js @@ -86,7 +86,7 @@ Mixin.register('mediagrid-listener', { }, handleMediaGridItemPlay({ item }) { - if (this.isList) { + if (this.isListSelect) { this._handleSelection(item); return; } @@ -129,7 +129,9 @@ Mixin.register('mediagrid-listener', { return; } - this.selectedItems.push(item); + if (!this.isItemSelected(item)) { + this.selectedItems.push(item); + } }, _handleShiftSelect(item) {
Don't remove selection when autoplay is clicked; don't select items twice
diff --git a/lib/unread/scopes.rb b/lib/unread/scopes.rb index <HASH>..<HASH> 100644 --- a/lib/unread/scopes.rb +++ b/lib/unread/scopes.rb @@ -15,7 +15,7 @@ module Unread where('read_marks.id IS NULL') if global_time_stamp = user.read_mark_global(self).try(:timestamp) - result = result.where("#{table_name}.#{readable_options[:on]} > '#{global_time_stamp.to_s(:db)}'") + result = result.where("#{table_name}.#{readable_options[:on]} > ?", global_time_stamp) end result
fix the time zone bug in readable unread_by scope
diff --git a/server/server.js b/server/server.js index <HASH>..<HASH> 100644 --- a/server/server.js +++ b/server/server.js @@ -19,8 +19,8 @@ function Server(expressApp, options) { this.viewEngine = this.options.viewEngine || new ViewEngine(); - this.errorHandler = this.options.errorHandler = this.options.errorHandler || - middleware.errorHandler(this.options); + this.errorHandler = this.options.errorHandler = + this.options.errorHandler || middleware.errorHandler(this.options); this.router = new Router(this.options);
Small style tweak in server.js
diff --git a/hgtools/__init__.py b/hgtools/__init__.py index <HASH>..<HASH> 100644 --- a/hgtools/__init__.py +++ b/hgtools/__init__.py @@ -418,7 +418,7 @@ def version_calc_plugin(dist, attr, value): """ Handler for parameter to setup(use_hg_version=value) """ - if not value: return + if not value or not 'hg_version' in attr: return # if the user indicates an increment, use it increment = value if 'increment' in attr else None dist.metadata.version = calculate_version(increment)
Ensure the version_calc_plugin is only activated when the hgtools setup parameters are supplied. Fixes #1
diff --git a/builder/pattern_assembler.js b/builder/pattern_assembler.js index <HASH>..<HASH> 100644 --- a/builder/pattern_assembler.js +++ b/builder/pattern_assembler.js @@ -157,7 +157,7 @@ function getpatternbykey(key, patternlab){ for(var i = 0; i < patternlab.patterns.length; i++){ - switch (key) { + switch(key) { case patternlab.patterns[i].key: case patternlab.patterns[i].subdir + '/' + patternlab.patterns[i].fileName: case patternlab.patterns[i].subdir + '/' + patternlab.patterns[i].fileName + '.mustache':
deleting space in control structure to match set standard
diff --git a/src/Router/Router.php b/src/Router/Router.php index <HASH>..<HASH> 100644 --- a/src/Router/Router.php +++ b/src/Router/Router.php @@ -38,6 +38,13 @@ class Router protected $routeProvider; /** + * Whether the routes have been configured. + * + * @var boolean + */ + protected $routesConfigured = false; + + /** * Constructor. * * @param RouterAdaptorInterface $adaptor The Router Adaptor. @@ -112,7 +119,11 @@ class Router */ protected function route(Request $request, $response = null) { - $this->adaptor->configureRoutes($this->routeProvider); + if (!$this->routesConfigured) { + $this->adaptor->configureRoutes($this->routeProvider); + $this->routesConfigured = true; + } + $routeDetails = $this->adaptor->route($request); if ($routeDetails === false) {
Allow the router to be called repeatedly without attempting to configure routes multiple times
diff --git a/tests/test_base.py b/tests/test_base.py index <HASH>..<HASH> 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -605,6 +605,9 @@ class TestURLTrafaret(unittest.TestCase): res = str(t.URL().check('http://пример.рф/resource/?param=value#anchor')) self.assertEqual(res, 'http://xn--e1afmkfd.xn--p1ai/resource/?param=value#anchor') + res = t.URL().check('http://example_underscore.net/resource/?param=value#anchor') + self.assertEqual(res, 'http://example_underscore.net/resource/?param=value#anchor') + res = str(t.URL().check('http://user@example.net/resource/?param=value#anchor')) self.assertEqual(res, 'http://user@example.net/resource/?param=value#anchor')
Allow underscore in url domain part.
diff --git a/lib/starting_blocks/watcher.rb b/lib/starting_blocks/watcher.rb index <HASH>..<HASH> 100644 --- a/lib/starting_blocks/watcher.rb +++ b/lib/starting_blocks/watcher.rb @@ -10,7 +10,7 @@ module StartingBlocks location = dir.getwd all_files = Dir['**/*'] puts "Listening to: #{location}" - Listen.to(location) do |modified, added, removed| + listener = Listen.to(location) do |modified, added, removed| if modified.count > 0 StartingBlocks::Watcher.run_it modified[0], all_files, options end @@ -21,6 +21,7 @@ module StartingBlocks StartingBlocks::Watcher.delete_it removed[0], all_files, options end end + listener.listen! end def add_it(file_that_changed, all_files, options)
Block io when the watcher is running.
diff --git a/spec/features/dot_notation_spec.rb b/spec/features/dot_notation_spec.rb index <HASH>..<HASH> 100644 --- a/spec/features/dot_notation_spec.rb +++ b/spec/features/dot_notation_spec.rb @@ -30,14 +30,14 @@ describe 'Dot-notation' do expect(config.option?('kek.pek.cheburek')).to eq(true) expect(config.option?('kek.pek')).to eq(true) expect(config.option?('kek')).to eq(true) - expect(config.option?('kek.cheburek.pek')).to eq(false) + expect(config.option?('kek.foo.bar')).to eq(true) expect(config.option?('kek.cheburek.pek')).to eq(false) expect(config.option?('kek.cheburek')).to eq(false) expect(config.setting?('kek.pek.cheburek')).to eq(true) expect(config.setting?('kek.pek')).to eq(true) expect(config.setting?('kek')).to eq(true) - expect(config.setting?('kek.cheburek.pek')).to eq(false) + expect(config.setting?('kek.foo.bar')).to eq(true) expect(config.setting?('kek.cheburek.pek')).to eq(false) expect(config.setting?('kek.cheburek')).to eq(false) end
[pretty-print-fix] typo in specs
diff --git a/cmd/config.go b/cmd/config.go index <HASH>..<HASH> 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -11,3 +11,16 @@ type GoogleSafeBrowsingConfig struct { APIKey string DataDir string } + +// SyslogConfig defines the config for syslogging. +type SyslogConfig struct { + Network string + Server string + StdoutLevel *int +} + +// StatsdConfig defines the config for Statsd. +type StatsdConfig struct { + Server string + Prefix string +} diff --git a/cmd/shell.go b/cmd/shell.go index <HASH>..<HASH> 100644 --- a/cmd/shell.go +++ b/cmd/shell.go @@ -227,19 +227,6 @@ type Config struct { SubscriberAgreementURL string } -// SyslogConfig defines the config for syslogging. -type SyslogConfig struct { - Network string - Server string - StdoutLevel *int -} - -// StatsdConfig defines the config for Statsd. -type StatsdConfig struct { - Server string - Prefix string -} - // CAConfig structs have configuration information for the certificate // authority, including database parameters as well as controls for // issued certificates.
Move config structs into config.go.
diff --git a/SpiffWorkflow/specs/Celery.py b/SpiffWorkflow/specs/Celery.py index <HASH>..<HASH> 100644 --- a/SpiffWorkflow/specs/Celery.py +++ b/SpiffWorkflow/specs/Celery.py @@ -104,6 +104,7 @@ class Celery(TaskSpec): :param result_key: The key to use to store the results of the call in task.internal_data. If None, then dicts are expanded into internal_data and values are stored in 'result'. + :type merge_results: bool :param merge_results: merge the results in instead of overwriting existing fields. :type kwargs: dict
minor API doc addition for SpiffWorkflow.specs.Celery
diff --git a/src/psd_tools/decoder/linked_layer.py b/src/psd_tools/decoder/linked_layer.py index <HASH>..<HASH> 100644 --- a/src/psd_tools/decoder/linked_layer.py +++ b/src/psd_tools/decoder/linked_layer.py @@ -10,7 +10,8 @@ from psd_tools.decoder.actions import decode_descriptor LinkedLayerCollection = pretty_namedtuple('LinkedLayerCollection', 'linked_list ') _LinkedLayer = pretty_namedtuple('LinkedLayer', - 'version unique_id filename filetype file_open_descriptor creator decoded') + 'version unique_id filename filetype file_open_descriptor ' + 'creator decoded uuid') class LinkedLayer(_LinkedLayer): @@ -66,12 +67,15 @@ def decode(data): else: file_open_descriptor = None decoded = fp.read(filelength) - layers.append( - LinkedLayer(version, unique_id, filename, filetype, file_open_descriptor, creator, decoded) - ) # Undocumented extra field if version == 5: uuid = read_unicode_string(fp) + else: + uuid = None + layers.append( + LinkedLayer(version, unique_id, filename, filetype, file_open_descriptor, + creator, decoded, uuid) + ) # Gobble up anything that we don't know how to decode expected_position = start + 8 + length # first 8 bytes contained the length if expected_position != fp.tell():
store the undocumented uuid
diff --git a/src/com/opencms/util/Encoder.java b/src/com/opencms/util/Encoder.java index <HASH>..<HASH> 100755 --- a/src/com/opencms/util/Encoder.java +++ b/src/com/opencms/util/Encoder.java @@ -1,7 +1,7 @@ /* * File : $Source: /alkacon/cvs/opencms/src/com/opencms/util/Attic/Encoder.java,v $ -* Date : $Date: 2002/09/05 12:51:52 $ -* Version: $Revision: 1.19 $ +* Date : $Date: 2002/11/02 10:33:25 $ +* Version: $Revision: 1.20 $ * * This library is part of OpenCms - * the Open Source Content Mananagement System @@ -85,6 +85,7 @@ public class Encoder { * @return The encoded source String */ public static String encode(String source, String encoding, boolean fallbackToDefaultEncoding) { + if (source == null) return null; if (encoding != null) { if (C_NEW_ENCODING_SUPPORTED) { try { @@ -121,6 +122,7 @@ public class Encoder { * @return The decoded source String */ public static String decode(String source, String encoding, boolean fallbackToDefaultDecoding) { + if (source == null) return null; if (encoding != null) { if (C_NEW_DECODING_SUPPORTED) { try {
Improved null handling on encode() and decode() methods
diff --git a/lib/beaker/hypervisor/docker.rb b/lib/beaker/hypervisor/docker.rb index <HASH>..<HASH> 100644 --- a/lib/beaker/hypervisor/docker.rb +++ b/lib/beaker/hypervisor/docker.rb @@ -279,6 +279,7 @@ module Beaker EOF when /archlinux/ dockerfile += <<-EOF + RUN pacman --noconfirm -Sy archlinux-keyring RUN pacman --noconfirm -Syu RUN pacman -S --noconfirm openssh #{Beaker::HostPrebuiltSteps::ARCHLINUX_PACKAGES.join(' ')} RUN ssh-keygen -A
update the arch keyring before other updates It is possible that the updates are signed by a gpg key that is missing in the keyring. So the keyring needs to be updated first. This is a known issue on archlinux systems that aren't updated frequently.
diff --git a/gulp/config.js b/gulp/config.js index <HASH>..<HASH> 100644 --- a/gulp/config.js +++ b/gulp/config.js @@ -52,6 +52,7 @@ class paths { get content() { return [ `${this.rootDir}/jspm_packages/**/*`, + `${this.sourceDir}/jspm.config.js`, `${this.rootDir}/**/*.jpg`, `${this.rootDir}/**/*.jpeg`, `${this.rootDir}/**/*.gif`,
Adding JSPM config as static content
diff --git a/scriptworker/log.py b/scriptworker/log.py index <HASH>..<HASH> 100644 --- a/scriptworker/log.py +++ b/scriptworker/log.py @@ -51,8 +51,6 @@ def update_logging_config(context, log_name=None, file_name='worker.log'): # Rotating log file makedirs(context.config['log_dir']) - handler.setFormatter(formatter) - top_level_logger.addHandler(handler) top_level_logger.addHandler(logging.NullHandler())
stop rotating logs in scriptworker #<I>
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java index <HASH>..<HASH> 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java @@ -199,7 +199,7 @@ public class ExecutionGraph implements AccessExecutionGraph { private final List<ExecutionJobVertex> verticesInCreationOrder; /** All intermediate results that are part of this graph. */ - private final ConcurrentHashMap<IntermediateDataSetID, IntermediateResult> intermediateResults; + private final Map<IntermediateDataSetID, IntermediateResult> intermediateResults; /** The currently executed tasks, for callbacks. */ private final ConcurrentHashMap<ExecutionAttemptID, Execution> currentExecutions; @@ -463,7 +463,7 @@ public class ExecutionGraph implements AccessExecutionGraph { this.userClassLoader = Preconditions.checkNotNull(userClassLoader, "userClassLoader"); this.tasks = new ConcurrentHashMap<>(16); - this.intermediateResults = new ConcurrentHashMap<>(16); + this.intermediateResults = new HashMap<>(16); this.verticesInCreationOrder = new ArrayList<>(16); this.currentExecutions = new ConcurrentHashMap<>(16);
[FLINK-<I>][runtime] Change Type of Field intermediateResults from ConcurrentHashMap to HashMap This closes #<I>.
diff --git a/src/select2.js b/src/select2.js index <HASH>..<HASH> 100644 --- a/src/select2.js +++ b/src/select2.js @@ -84,7 +84,7 @@ function init(Survey, $) { if (settings) { if (settings.ajax) { $el.select2(settings); - question.clearIncorrectValuesCallback = function () { }; + question.keepIncorrectValues = true; } else { settings.data = question.visibleChoices.map(function (choice) { return { @@ -140,7 +140,6 @@ function init(Survey, $) { .off("select2:select") .select2("destroy"); question.readOnlyChangedCallback = null; - question.clearIncorrectValuesCallback = null; } };
Set keepIncorrectValues flat to true value for select2
diff --git a/tests/system/Router/RouteCollectionTest.php b/tests/system/Router/RouteCollectionTest.php index <HASH>..<HASH> 100644 --- a/tests/system/Router/RouteCollectionTest.php +++ b/tests/system/Router/RouteCollectionTest.php @@ -1462,7 +1462,7 @@ final class RouteCollectionTest extends CIUnitTestCase $routes->get('i/(:any)', 'App\Controllers\Site\CDoc::item/$1', ['subdomain' => '*', 'as' => 'doc_item']); - $this->assertSame('/i/sth', $routes->reverseRoute('doc_item', 'sth')); + $this->assertFalse($routes->reverseRoute('doc_item', 'sth')); } public function testRouteToWithoutSubdomainMatch()
fix: incorrect test `example.com` does not match`'subdomain' => '*'`, so the route is not registered.
diff --git a/aws/resource_aws_ssm_maintenance_window_test.go b/aws/resource_aws_ssm_maintenance_window_test.go index <HASH>..<HASH> 100644 --- a/aws/resource_aws_ssm_maintenance_window_test.go +++ b/aws/resource_aws_ssm_maintenance_window_test.go @@ -759,7 +759,7 @@ resource "aws_ssm_maintenance_window" "test" { cutoff = 1 duration = 3 name = %q - schedule = "cron(0 16 ? * TUE *)" + schedule = "cron(0 16 ? * TUE#3 *)" schedule_offset = %d } `, rName, scheduleOffset)
tests/resource/aws_ssm_maintenance_window: Fix TestAccAWSSSMMaintenanceWindow_ScheduleOffset configuration Output from acceptance testing: ``` --- PASS: TestAccAWSSSMMaintenanceWindow_ScheduleOffset (<I>s) ```
diff --git a/ext/numo/linalg/mkmf_linalg.rb b/ext/numo/linalg/mkmf_linalg.rb index <HASH>..<HASH> 100644 --- a/ext/numo/linalg/mkmf_linalg.rb +++ b/ext/numo/linalg/mkmf_linalg.rb @@ -23,10 +23,12 @@ def create_site_conf Fiddle.dlopen "libm.so" rescue (5..7).each do |i| - Fiddle.dlopen "libm.so.#{i}" - need_version = true - break - rescue + begin + Fiddle.dlopen "libm.so.#{i}" + need_version = true + break + rescue + end end if !need_version raise "failed to check whether dynamically linked shared object needs version suffix"
rescue in block is not valid for ruby version <= <I>
diff --git a/visualization/src/main/java/br/uff/ic/sel/noworkflow/controller/SQLiteReader.java b/visualization/src/main/java/br/uff/ic/sel/noworkflow/controller/SQLiteReader.java index <HASH>..<HASH> 100644 --- a/visualization/src/main/java/br/uff/ic/sel/noworkflow/controller/SQLiteReader.java +++ b/visualization/src/main/java/br/uff/ic/sel/noworkflow/controller/SQLiteReader.java @@ -74,8 +74,8 @@ public class SQLiteReader { int id = rs.getInt("id"); Map<String, String> arguments = getArguments(id); String returnValue = rs.getString("return"); - Timestamp start = rs.getTimestamp("start"); - Timestamp finish = rs.getTimestamp("finish"); + Timestamp start = Timestamp.valueOf(rs.getString("start")); + Timestamp finish = Timestamp.valueOf(rs.getString("finish")); String key = callerId + line + name; FunctionCall functionCall = functionCalls.get(key);
Fixing the way date is read from the database.
diff --git a/db/jig/mapper.php b/db/jig/mapper.php index <HASH>..<HASH> 100644 --- a/db/jig/mapper.php +++ b/db/jig/mapper.php @@ -67,7 +67,8 @@ class Mapper extends \DB\Cursor { * @param $key string **/ function clear($key) { - unset($this->document[$key]); + if ($key!='_id') + unset($this->document[$key]); } /** @@ -152,6 +153,7 @@ class Mapper extends \DB\Cursor { $cache=\Cache::instance(); $db=$this->db; $now=microtime(TRUE); + $data=array(); if (!$fw->get('CACHE') || !$ttl || !($cached=$cache->exists( $hash=$fw->hash($this->db->dir(). $fw->stringify(array($filter,$options))).'.jig',$data)) ||
Prohibit _id clear()
diff --git a/src/FieldHandlers/Renderer/NumberRenderer.php b/src/FieldHandlers/Renderer/NumberRenderer.php index <HASH>..<HASH> 100644 --- a/src/FieldHandlers/Renderer/NumberRenderer.php +++ b/src/FieldHandlers/Renderer/NumberRenderer.php @@ -23,6 +23,11 @@ class NumberRenderer extends BaseRenderer /** * Render value * + * Supported options: + * + * * precision - integer value as to how many decimal points to render. + * Default: 2. + * * @throws \InvalidArgumentException when sanitize fails * @param mixed $value Value to render * @param array $options Rendering options @@ -38,8 +43,12 @@ class NumberRenderer extends BaseRenderer $result = (float)$result; + if (!isset($options['precision'])) { + $options['precision'] = static::PRECISION; + } + if (!empty($result) && is_numeric($result)) { - $result = number_format($result, static::PRECISION); + $result = number_format($result, $options['precision']); } else { $result = (string)$result; }
Added precision option to NumberRenderer (task #<I>)
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index <HASH>..<HASH> 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1170,7 +1170,7 @@ class BasicsTest < ActiveRecord::TestCase def test_current_scope_is_reset Object.const_set :UnloadablePost, Class.new(ActiveRecord::Base) - UnloadablePost.send(:current_scope=, UnloadablePost.all) + UnloadablePost.current_scope = UnloadablePost.all UnloadablePost.unloadable klass = UnloadablePost diff --git a/activerecord/test/cases/scoping/relation_scoping_test.rb b/activerecord/test/cases/scoping/relation_scoping_test.rb index <HASH>..<HASH> 100644 --- a/activerecord/test/cases/scoping/relation_scoping_test.rb +++ b/activerecord/test/cases/scoping/relation_scoping_test.rb @@ -274,8 +274,8 @@ class RelationScopingTest < ActiveRecord::TestCase SpecialComment.unscoped.created end - assert_nil Comment.send(:current_scope) - assert_nil SpecialComment.send(:current_scope) + assert_nil Comment.current_scope + assert_nil SpecialComment.current_scope end def test_scoping_respects_current_class
`current_scope{,=}` are public methods `send` is not necessary.
diff --git a/packages/heroku-container-registry/commands/push.js b/packages/heroku-container-registry/commands/push.js index <HASH>..<HASH> 100644 --- a/packages/heroku-container-registry/commands/push.js +++ b/packages/heroku-container-registry/commands/push.js @@ -100,6 +100,7 @@ let push = async function (context, heroku) { } await Sanbashi.pushImage(job.resource) } + cli.log(`Your images have been successfully pushed. You can now release with them with the 'container:release' command.`) } catch (err) { cli.error(`Error: docker push exited with ${err}`, 1) return
Merge pull request #<I> from heroku/after-push-warning Mention container:release after a push
diff --git a/client/ansi/filters/ansi.js b/client/ansi/filters/ansi.js index <HASH>..<HASH> 100644 --- a/client/ansi/filters/ansi.js +++ b/client/ansi/filters/ansi.js @@ -81,7 +81,7 @@ function ansiparse(str) { for (var i = 0; i < str.length; i++) { if (matchingControl !== null) { - if (matchingControl == '\033' && str[i] == '\[') { + if (matchingControl === '\\033' && str[i] === '\\[') { // // We've matched full control code. Lets start matching formating data. // diff --git a/client/utils/ng-sortable-directive.js b/client/utils/ng-sortable-directive.js index <HASH>..<HASH> 100644 --- a/client/utils/ng-sortable-directive.js +++ b/client/utils/ng-sortable-directive.js @@ -1,6 +1,7 @@ 'use strict'; var _ = require('lodash'); +var $ = require('jquery'); var Sortable = require('sortable'); module.exports= function ($parse) {
linting, tests pass! Still broken on heroku and mail notifier
diff --git a/src/Readability.php b/src/Readability.php index <HASH>..<HASH> 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -53,7 +53,8 @@ class Readability extends Element implements ReadabilityInterface */ $score = 0; - if (!in_array(get_class($node), ['DOMDocument', 'DOMComment'])) { + // Check if the getAttribute is callable, as some elements lack of it (and calling it anyway throws an exception) + if (is_callable('getAttribute', false, $node)) { $hasScore = $node->getAttribute('data-readability'); if ($hasScore !== '') { // Node was initialized previously. Restoring score and setting flag. @@ -254,8 +255,8 @@ class Readability extends Element implements ReadabilityInterface */ public function setContentScore($score) { - if (!in_array(get_class($this->node), ['DOMDocument', 'DOMComment'])) { - + // Check if the getAttribute is callable, as some elements lack of it (and calling it anyway throws an exception) + if (is_callable('getAttribute', false, $node)) { $this->contentScore = (float)$score; // Set score in an attribute of the tag to prevent losing it while creating new Readability objects.
Improved the way we catch calls to getAttribute to elements that lack of that function
diff --git a/modules/activiti-bpmn-model/src/main/java/org/activiti/bpmn/model/Lane.java b/modules/activiti-bpmn-model/src/main/java/org/activiti/bpmn/model/Lane.java index <HASH>..<HASH> 100644 --- a/modules/activiti-bpmn-model/src/main/java/org/activiti/bpmn/model/Lane.java +++ b/modules/activiti-bpmn-model/src/main/java/org/activiti/bpmn/model/Lane.java @@ -12,6 +12,8 @@ */ package org.activiti.bpmn.model; +import org.codehaus.jackson.annotate.JsonBackReference; + import java.util.ArrayList; import java.util.List; @@ -32,6 +34,7 @@ public class Lane extends BaseElement { this.name = name; } + @JsonBackReference public Process getParentProcess() { return parentProcess; }
marked process property in lane as backreference, to avoid endless recursion and heap space error when marshalling json-model
diff --git a/src/DataTable/Selectable.js b/src/DataTable/Selectable.js index <HASH>..<HASH> 100644 --- a/src/DataTable/Selectable.js +++ b/src/DataTable/Selectable.js @@ -128,6 +128,7 @@ export default Component => { // remove unwatned props // see https://github.com/Hacker0x01/react-datepicker/issues/517#issuecomment-230171426 delete otherProps.onSelectionChanged; + delete otherProps.selectedRows; const realRows = selectable ? (rows || data).map((row, idx) => {
fix: react warning: Unknown prop `selectedRows` (#<I>)
diff --git a/manuscripts/metrics/its.py b/manuscripts/metrics/its.py index <HASH>..<HASH> 100644 --- a/manuscripts/metrics/its.py +++ b/manuscripts/metrics/its.py @@ -96,6 +96,7 @@ class Closed(ITSMetrics): filters = {"state": "closed"} FIELD_COUNT = "id" FIELD_NAME = "url" + FIELD_DATE = "closed_at" class DaysToCloseMedian(ITSMetrics): @@ -162,8 +163,6 @@ class BMI(ITSMetrics): closed = self.closed_class(self.es_url, self.es_index, start=self.start, end=self.end, esfilters=esfilters_closed, interval=self.interval) - # For BMI we need when the ticket was closed - # closed.FIELD_DATE = "closed_at" opened = self.opened_class(self.es_url, self.es_index, start=self.start, end=self.end, esfilters=esfilters_opened, interval=self.interval)
[its] Use closed_at as FIELD_DATE for closed issues metrics
diff --git a/examples/js/exchange-capabilities.js b/examples/js/exchange-capabilities.js index <HASH>..<HASH> 100644 --- a/examples/js/exchange-capabilities.js +++ b/examples/js/exchange-capabilities.js @@ -121,7 +121,7 @@ const isWindows = process.platform == 'win32' // fix for windows, as it doesn't 'withdraw', ]); - allItems.forEach (methodName => { + allItems.forEach (methodName => { total += 1 @@ -169,4 +169,4 @@ const isWindows = process.platform == 'win32' // fix for windows, as it doesn't log("\nMessy? Try piping to less (e.g. node script.js | less -S -R)\n".red) -}) () \ No newline at end of file +}) ()
Update exchange-capabilities.js
diff --git a/lib/echo_uploads.rb b/lib/echo_uploads.rb index <HASH>..<HASH> 100644 --- a/lib/echo_uploads.rb +++ b/lib/echo_uploads.rb @@ -1,5 +1,7 @@ require 'echo_uploads/config' require 'echo_uploads/validation' +require 'echo_uploads/perm_file_saving' +require 'echo_uploads/temp_file_saving' require 'echo_uploads/model' require 'echo_uploads/file' require 'echo_uploads/abstract_store'
Forgot to require a couple files
diff --git a/cid.go b/cid.go index <HASH>..<HASH> 100644 --- a/cid.go +++ b/cid.go @@ -155,10 +155,6 @@ func NewCidV1(codecType uint64, mhash mh.Multihash) Cid { // Cid represents a self-describing content adressed // identifier. It is formed by a Version, a Codec (which indicates // a multicodec-packed content type) and a Multihash. -// Byte layout: [version, codec, multihash] -// - version uvarint -// - codec uvarint -// - hash mh.Multihash type Cid struct{ str string } // Nil can be used to represent a nil Cid, using Cid{} directly is
Removed description of layout of CID as it is not correct for CIDv0.
diff --git a/wffweb/src/main/java/com/webfirmframework/wffweb/server/page/BrowserPage.java b/wffweb/src/main/java/com/webfirmframework/wffweb/server/page/BrowserPage.java index <HASH>..<HASH> 100644 --- a/wffweb/src/main/java/com/webfirmframework/wffweb/server/page/BrowserPage.java +++ b/wffweb/src/main/java/com/webfirmframework/wffweb/server/page/BrowserPage.java @@ -3032,12 +3032,12 @@ public abstract class BrowserPage implements Serializable { if (Files.notExists(dirPath)) { try { Files.createDirectories(dirPath); + tempDirPath = dirPath; } catch (final IOException e) { LOGGER.severe( "The given path by useExternalDrivePath is invalid or it doesn't have read/write permission."); } } - tempDirPath = dirPath; } return tempDirPath;
Bug fix in getTempDirectory method in BrowserPage
diff --git a/lib/nats/client.rb b/lib/nats/client.rb index <HASH>..<HASH> 100644 --- a/lib/nats/client.rb +++ b/lib/nats/client.rb @@ -590,7 +590,7 @@ module NATS end def process_info(info) #:nodoc: - @server_info = JSON.parse(info, :symbolize_keys => true, :symbolize_names => true) + @server_info = JSON.parse(info, :symbolize_keys => true, :symbolize_names => true, :symbol_keys => true) if @server_info[:ssl_required] && @ssl start_tls else diff --git a/lib/nats/ext/json.rb b/lib/nats/ext/json.rb index <HASH>..<HASH> 100644 --- a/lib/nats/ext/json.rb +++ b/lib/nats/ext/json.rb @@ -2,6 +2,11 @@ begin require 'yajl' require 'yajl/json_gem' rescue LoadError - require 'rubygems' - require 'json' + begin + require 'oj' + Oj.mimic_JSON() + rescue LoadError + require 'rubygems' + require 'json' + end end
Added support for the Oj JSON parser.
diff --git a/lxd/project/project.go b/lxd/project/project.go index <HASH>..<HASH> 100644 --- a/lxd/project/project.go +++ b/lxd/project/project.go @@ -11,12 +11,13 @@ const Default = "default" // separator is used to delimit the project name from the suffix. const separator = "_" -// Prefix Add the "<project>_" prefix when the given project name is not "default". -func Prefix(project string, suffix string) string { - if project != Default { - suffix = fmt.Sprintf("%s%s%s", project, separator, suffix) +// Instance Adds the "<project>_" prefix to instance name when the given project name is not "default". +func Instance(projectName string, instanceName string) string { + if projectName != Default { + return fmt.Sprintf("%s%s%s", projectName, separator, instanceName) } - return suffix + + return instanceName } // InstanceParts takes a project prefixed Instance name string and returns the project and instance name.
lxd/project/project: Renames Prefix() to Instance() This is to indicate that this prefix function should only be used with instance names or objects that follow the same project prefix logic as instance names. This is for legacy project prefixes, where the "default" project did not have a prefix.
diff --git a/src/module.js b/src/module.js index <HASH>..<HASH> 100644 --- a/src/module.js +++ b/src/module.js @@ -1,5 +1,8 @@ /* eslint-disable import/no-extraneous-dependencies */ +import { join } from "path"; + /* covered by nuxt */ +import { move } from "fs-extra"; import _ from "lodash"; import { Utils } from "nuxt"; import chokidar from "chokidar"; @@ -166,6 +169,17 @@ export default function NetlifyCmsModule(moduleOptions) { }) }); } + + // Move cms folder from `dist/_nuxt` folder to `dist/` after nuxt generate + this.nuxt.plugin("generator", generator => { + generator.plugin("generate", async () => { + await move( + join(generator.distNuxtPath, config.adminPath).replace(/\/$/, ""), + join(generator.distPath, config.adminPath).replace(/\/$/, "") + ); + debug("Netlify CMS files copied"); + }); + }); } // REQUIRED if publishing as an NPM package
fix(module): properly move the CMS build to the `dist` folder on `nuxt generate` fixes #<I>
diff --git a/salt/states/dockerio.py b/salt/states/dockerio.py index <HASH>..<HASH> 100644 --- a/salt/states/dockerio.py +++ b/salt/states/dockerio.py @@ -10,11 +10,6 @@ wrapper. The base supported wrapper type is `cgroups <https://en.wikipedia.org/wiki/Cgroups>`_, and the `Linux Kernel <https://en.wikipedia.org/wiki/Linux_kernel>`_. -.. warning:: - - This state module is beta. The API is subject to change. No promise - as to performance or functionality is yet present. - .. note:: This state module requires
The docker state is not in beta
diff --git a/src/Kunstmaan/SeoBundle/Twig/SeoTwigExtension.php b/src/Kunstmaan/SeoBundle/Twig/SeoTwigExtension.php index <HASH>..<HASH> 100755 --- a/src/Kunstmaan/SeoBundle/Twig/SeoTwigExtension.php +++ b/src/Kunstmaan/SeoBundle/Twig/SeoTwigExtension.php @@ -94,8 +94,12 @@ class SeoTwigExtension extends Twig_Extension } - private function getSeoTitle(AbstractPage $entity) + private function getSeoTitle(AbstractPage $entity = null) { + if (is_null($entity)) { + return null; + } + $seo = $this->getSeoFor($entity); if (!is_null($seo)) { @@ -115,8 +119,12 @@ class SeoTwigExtension extends Twig_Extension * @param null $default If given we'll return this text if no SEO title was found. * @return string */ - public function getTitleForPageOrDefault(AbstractPage $entity, $default = null) + public function getTitleForPageOrDefault(AbstractPage $entity = null, $default = null) { + if (is_null($entity)) { + return $default; + } + $arr = array(); $arr[] = $this->getSeoTitle($entity);
Fix errors when called without an AbstractPage object This apparently happened when trying to access non-existant images in one of our projects.
diff --git a/src/resources/assets/js/modules/enso/plugins/__.js b/src/resources/assets/js/modules/enso/plugins/__.js index <HASH>..<HASH> 100644 --- a/src/resources/assets/js/modules/enso/plugins/__.js +++ b/src/resources/assets/js/modules/enso/plugins/__.js @@ -8,8 +8,6 @@ const addMissingKey = (key) => { axios.patch('/api/system/localisation/addKey', { langKey: key }); store.commit('locale/addKey', key); } - - return key; }; Vue.prototype.__ = (key) => {
small refactor in __.js
diff --git a/lib/logstasher.rb b/lib/logstasher.rb index <HASH>..<HASH> 100644 --- a/lib/logstasher.rb +++ b/lib/logstasher.rb @@ -49,7 +49,7 @@ module LogStasher require 'logstash-event' self.suppress_app_logs(app) LogStasher::RequestLogSubscriber.attach_to :action_controller - self.logger = app.config.logstasher.logger || Logger.new("#{Rails.root}/log/logstash_#{Rails.env}.log") + self.logger = app.config.logstasher.logger || new_logger("#{Rails.root}/log/logstash_#{Rails.env}.log") self.logger.level = app.config.logstasher.log_level || Logger::WARN self.enabled = true end @@ -89,6 +89,13 @@ module LogStasher end EOM end + + private + + def new_logger(path) + FileUtils.touch path # prevent autocreate messages in log + Logger.new path + end end require 'logstasher/railtie' if defined?(Rails)
Prevent autocreate messages in log file
diff --git a/Net/ChaChing/WebSocket/Client.php b/Net/ChaChing/WebSocket/Client.php index <HASH>..<HASH> 100644 --- a/Net/ChaChing/WebSocket/Client.php +++ b/Net/ChaChing/WebSocket/Client.php @@ -277,26 +277,6 @@ class Net_ChaChing_WebSocket_Client ); } - // set socket receive timeout - $sec = intval($this->timeout / 1000); - $usec = ($this->timeout % 1000) * 1000; - - $result = socket_set_option( - $this->socket, - SOL_SOCKET, - SO_RCVTIMEO, - array('sec' => $sec, 'usec' => $usec) - ); - - if (!$result) { - throw new Net_ChaChing_WebSocket_Client_Exception( - sprintf( - 'Unable to set socket timeout: %s', - socket_strerror(socket_last_error()) - ) - ); - } - // set socket non-blocking for connect socket_set_nonblock($this->socket); @@ -314,6 +294,10 @@ class Net_ChaChing_WebSocket_Client socket_clear_error($this->socket); if ($errno === SOCKET_EINPROGRESS) { + // get connect timeout parts + $sec = intval($this->timeout / 1000); + $usec = ($this->timeout % 1000) * 1000; + $write = array($this->socket); $result = socket_select( $read = null,
Don't set SO_RCVTIMEO on socket. We only read in select loops with explicit timeouts.
diff --git a/lib/chronic/handler.rb b/lib/chronic/handler.rb index <HASH>..<HASH> 100644 --- a/lib/chronic/handler.rb +++ b/lib/chronic/handler.rb @@ -2,11 +2,11 @@ module Chronic class Handler # @return [Array] A list of patterns - attr_accessor :pattern + attr_reader :pattern # @return [Symbol] The method which handles this list of patterns. # This method should exist inside the {Handlers} module - attr_accessor :handler_method + attr_reader :handler_method # @param [Array] pattern A list of patterns to match tokens against # @param [Symbol] handler_method The method to be invoked when patterns
pattern/handler_method only need read access
diff --git a/library/src/com/nostra13/universalimageloader/core/download/ImageDownloader.java b/library/src/com/nostra13/universalimageloader/core/download/ImageDownloader.java index <HASH>..<HASH> 100644 --- a/library/src/com/nostra13/universalimageloader/core/download/ImageDownloader.java +++ b/library/src/com/nostra13/universalimageloader/core/download/ImageDownloader.java @@ -71,7 +71,7 @@ public interface ImageDownloader { } private boolean belongsTo(String uri) { - return uri.toLowerCase(Locale.getDefault()).startsWith(uriPrefix); + return uri.toLowerCase(Locale.US).startsWith(uriPrefix); } /** Appends scheme to incoming path */
Change Locale.getDefault() to Locale.US, us for url is better.
diff --git a/postcodepy/postcodepy.py b/postcodepy/postcodepy.py index <HASH>..<HASH> 100644 --- a/postcodepy/postcodepy.py +++ b/postcodepy/postcodepy.py @@ -222,7 +222,7 @@ class PostcodeError(Exception): # ---------------------------------------------------------------------- -if __name__ == "__main__": +if __name__ == "__main__": # pragma: no cover import sys import os # First and third are OK, the 2nd is not OK and raises an Exception
coverage pragma added to skip __main__ from coverage
diff --git a/gruntfile.js b/gruntfile.js index <HASH>..<HASH> 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -90,6 +90,12 @@ module.exports = function(grunt) { src: 'package.json', dest: moduleOutDir }, + npmReadme: { + expand: true, + src: 'README.md', + cwd: 'doc', + dest: moduleOutDir + }, handCodedDefinitions: { src: '**/*.d.ts', cwd: 'src/nativescript-angular', @@ -166,6 +172,7 @@ module.exports = function(grunt) { grunt.registerTask("package", [ "clean:packageDefinitions", "copy:handCodedDefinitions", + "copy:npmReadme", "shell:package", ]);
Ship the doc/README.md as the NPM README
diff --git a/builder/vmware/step_create_vmx.go b/builder/vmware/step_create_vmx.go index <HASH>..<HASH> 100644 --- a/builder/vmware/step_create_vmx.go +++ b/builder/vmware/step_create_vmx.go @@ -88,6 +88,9 @@ func (stepCreateVMX) Run(state multistep.StateBag) multistep.StepAction { vmxData["floppy0.fileName"] = floppyPathRaw.(string) } + // Set this so that no dialogs ever appear from Packer. + vmxData["msg.autoAnswer"] = "true" + vmxPath := filepath.Join(config.OutputDir, config.VMName+".vmx") if err := WriteVMX(vmxPath, vmxData); err != nil { err := fmt.Errorf("Error creating VMX file: %s", err) @@ -137,7 +140,6 @@ ide1:0.fileName = "{{ .ISOPath }}" ide1:0.deviceType = "cdrom-image" isolation.tools.hgfs.disable = "FALSE" memsize = "512" -msg.autoAnswer = "true" nvram = "{{ .Name }}.nvram" pciBridge0.pciSlotNumber = "17" pciBridge0.present = "TRUE"
builder/vmware: always set msg.AutoAnswer
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -6,6 +6,7 @@ var express = require('express'); var mime = require('mime'); var pushover = require('pushover'); var async = require('async'); +var marked = require('marked'); var Repo = require('./lib/repo'); var extensions = require('./lib/extensions'); @@ -99,6 +100,10 @@ function blob(req, res) { repo.blob(ref, path, function(err, data) { if(err) { return fof(); } + if(path.match(/.md$/i)) { + data = marked(data.toString()); + } + res.render('blob.jade', { view: 'blob' , repo: name
Display markdown files in blob view
diff --git a/twx/botapi/botapi.py b/twx/botapi/botapi.py index <HASH>..<HASH> 100644 --- a/twx/botapi/botapi.py +++ b/twx/botapi/botapi.py @@ -330,6 +330,18 @@ class TelegramBotRPCRequest(metaclass=ABCMeta): def join(self, timeout=None): self.thread.join(timeout) + return self + + def wait(self): + """ + Wait for the request to finish and return the result or error when finished + + :returns: result or error + :type: result tyoe or Error + """ + self.thread.join() + if self.error is not None: + return self.error return self.result def _clean_params(**params):
adding wait() method in RPC object
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -19,8 +19,8 @@ setup( long_description_content_type='text/markdown', url='https://github.com/Lvl4Sword/Killer', project_urls={ - 'Gitter': 'https://gitter.im/KillerPython', - 'Discord Server': 'https://discord.gg/python', + 'Discord Server': 'https://discord.gg/bTRxxMJ', + 'IRC': 'https://webchat.freenode.net/?channels=%23killer', }, license=__license__, packages=find_packages(),
Switch Discord, Remove Gitter, Add IRC
diff --git a/doc/conf.py b/doc/conf.py index <HASH>..<HASH> 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -62,7 +62,7 @@ List of Pre-Configured Resources "resource_xsede.json"] for res in resource_list: - response = urllib2.urlopen('https://raw.githubusercontent.com/radical-cybertools/radical.pilot/feature/docs_am/src/radical/pilot/configs/%s'%res) + response = urllib2.urlopen('https://raw.githubusercontent.com/radical-cybertools/radical.pilot/devel/src/radical/pilot/configs/%s'%res) html = response.read() with open('resource_list/'+res,'w') as f: f.write(html)
docs_am to devel
diff --git a/bugwarrior/services/githubutils.py b/bugwarrior/services/githubutils.py index <HASH>..<HASH> 100644 --- a/bugwarrior/services/githubutils.py +++ b/bugwarrior/services/githubutils.py @@ -72,7 +72,8 @@ def _getter(url, auth): # And.. if we didn't get good results, just bail. if response.status_code != 200: raise IOError( - "Non-200 status code %r; %r" % (response.status_code, url)) + "Non-200 status code %r; %r; %r" % ( + response.status_code, url, response.json)) if callable(response.json): # Newer python-requests
More verbose debugging.
diff --git a/util/html-element-props.js b/util/html-element-props.js index <HASH>..<HASH> 100644 --- a/util/html-element-props.js +++ b/util/html-element-props.js @@ -41,5 +41,9 @@ HTMLElement.prototype.setProps = function (props = {}) { let propsObject = Object.assign({}, props) delete propsObject.tagName delete propsObject.constructorName + // Special cases for some properties that need to be set early so they are set when Setters get called later. + if (propsObject.hasOwnProperty('locked')) { + this.locked = propsObject.locked + } Object.assign(this, propsObject) } \ No newline at end of file
Because Object.assign sets properties in an order and not all at once, make a special case for assigning the locked property so that it is set when the open property is applied thus the logic in the Setter for open property will properly account for locked
diff --git a/provider/lxd/instance.go b/provider/lxd/instance.go index <HASH>..<HASH> 100644 --- a/provider/lxd/instance.go +++ b/provider/lxd/instance.go @@ -38,7 +38,8 @@ func (inst *environInstance) Status() string { // Addresses implements instance.Instance. func (inst *environInstance) Addresses() ([]network.Address, error) { - return nil, errors.NotImplementedf("") + // TODO(ericsnow) This may need to be more dynamic. + return inst.raw.Addresses, nil } func findInst(id instance.Id, instances []instance.Instance) instance.Instance {
Use the known IP addresses for the instance.
diff --git a/tests/compute/helper.rb b/tests/compute/helper.rb index <HASH>..<HASH> 100644 --- a/tests/compute/helper.rb +++ b/tests/compute/helper.rb @@ -15,7 +15,7 @@ def compute_providers }, :brightbox => { :server_attributes => { - :image_id => 'img-wwgbb' # Ubuntu Lucid 10.04 server (i686) + :image_id => (Brightbox::Compute::TestSupport.image_id rescue 'img-wwgbb') # Ubuntu Lucid 10.04 server (i686) }, :mocked => false },
[brightbox] Use first available image for server tests. This uses the Brightbox::Compute::TestSupport.image_id to specify the image to use as part of :server_attributes when running servers_tests.
diff --git a/tests/TyrServiceTest.php b/tests/TyrServiceTest.php index <HASH>..<HASH> 100644 --- a/tests/TyrServiceTest.php +++ b/tests/TyrServiceTest.php @@ -16,7 +16,7 @@ class TyrServiceTest extends \PHPUnit_Framework_TestCase */ public function __construct() { - $this->tyrService = new TyrService('http://tyr.dev.canaltp.fr/v0/', 2, 'sncf'); + $this->tyrService = new TyrService('http://tyr.dev.canaltp.fr/v0/', 2); } public function testCreateUserReturnsValidStatusCode()
fix tests, TyrService instanciation
diff --git a/bin/pm.js b/bin/pm.js index <HASH>..<HASH> 100755 --- a/bin/pm.js +++ b/bin/pm.js @@ -74,7 +74,8 @@ function lint() { browser: ["view", "menu", "example-setup"].indexOf(repo) > -1, ecmaVersion: 6, semicolons: false, - namedFunctions: true + namedFunctions: true, + trailingCommas: true } blint.checkDir(repo + "/src/", options) if (fs.existsSync(repo + "/test")) {
Allow trailing commas when linting
diff --git a/tasks/validate.js b/tasks/validate.js index <HASH>..<HASH> 100644 --- a/tasks/validate.js +++ b/tasks/validate.js @@ -16,7 +16,8 @@ module.exports = function(grunt) { '<%= config.srcPaths.drupal %>/**/*.inc', '<%= config.srcPaths.drupal %>/**/*.install', '<%= config.srcPaths.drupal %>/**/*.profile', - '!<%= config.srcPaths.drupal %>/**/*.features.*inc' + '!<%= config.srcPaths.drupal %>/**/*.features.*inc', + '!<%= config.srcPaths.drupal %>/sites/**' ], });
Exclude src/sites from phplint check. This is a temporary measure to avoid empty symlinks breaking the build process.
diff --git a/grails-web/src/main/groovy/org/codehaus/groovy/grails/web/binding/GrailsDataBinder.java b/grails-web/src/main/groovy/org/codehaus/groovy/grails/web/binding/GrailsDataBinder.java index <HASH>..<HASH> 100755 --- a/grails-web/src/main/groovy/org/codehaus/groovy/grails/web/binding/GrailsDataBinder.java +++ b/grails-web/src/main/groovy/org/codehaus/groovy/grails/web/binding/GrailsDataBinder.java @@ -925,8 +925,14 @@ public class GrailsDataBinder extends ServletRequestDataBinder { } } else if (GrailsDomainConfigurationUtil.isBasicType(associatedType)) { - if (isArray) { - Object[] values = (Object[])v; + Object[] values = null; + if(isArray) { + values = (Object[])v; + } else if(v instanceof String) { + values = new String[]{(String)v}; + } + + if (values != null) { List list = collection instanceof List ? (List)collection : null; for (int i = 0; i < values.length; i++) { Object value = values[i]; @@ -948,6 +954,7 @@ public class GrailsDataBinder extends ServletRequestDataBinder { // ignore } } + mpvs.removePropertyValue(pv); } } }
GRAILS-<I> - improve binding String to collection When binding a String to a collection of some non String type, the conversion was not happening. Relevant functional tests: <URL>
diff --git a/src/keycloak/authz.py b/src/keycloak/authz.py index <HASH>..<HASH> 100644 --- a/src/keycloak/authz.py +++ b/src/keycloak/authz.py @@ -64,7 +64,7 @@ class KeycloakAuthz(WellKnownMixin, object): result = json.loads(base64.b64decode(token)) return result - def get_permissions(self, token, resource_scopes_tuples=None, submit_request=False): + def get_permissions(self, token, resource_scopes_tuples=None, submit_request=False, ticket=None): """ Request permissions for user from keycloak server. @@ -90,6 +90,8 @@ class KeycloakAuthz(WellKnownMixin, object): for atuple in resource_scopes_tuples: data.append(('permission', '#'.join(atuple))) data.append(('submit_request', submit_request)) + elif ticket: + data.append(('ticket', ticket)) authz_info = {}
make possible to provide ticket for get_permisison
diff --git a/wire/AMQPWriter.php b/wire/AMQPWriter.php index <HASH>..<HASH> 100644 --- a/wire/AMQPWriter.php +++ b/wire/AMQPWriter.php @@ -27,6 +27,16 @@ class AMQPWriter } $res = array(); + + while($bytes > 0) + { + $b = bcmod($x,'256'); + $res[] = (int)$b; + $x = bcdiv($x,'256'); + $bytes--; + } + $res = array_reverse($res); + for($i=0;$i<$bytes;$i++) { $b = bcmod($x,'256');
performance improvement based on <URL>
diff --git a/xarray/test/test_dataarray.py b/xarray/test/test_dataarray.py index <HASH>..<HASH> 100644 --- a/xarray/test/test_dataarray.py +++ b/xarray/test/test_dataarray.py @@ -1231,7 +1231,7 @@ class TestDataArray(TestCase): self.assertDataArrayIdentical(array, actual) actual = array.resample('24H', dim='time') - expected = DataArray(array.to_series().resample('24H')) + expected = DataArray(array.to_series().resample('24H', how='mean')) self.assertDataArrayIdentical(expected, actual) actual = array.resample('24H', dim='time', how=np.mean)
Test suite fix for compatibility with pandas <I> We need to supply how='mean' to resample because the resample API is changing.
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -15,16 +15,16 @@ test('selector is added to all rules', t => { return run( t, '.foo, bar .baz, .buzz .bam { }', - '.parent-class .foo, .parent-class bar .baz, .parent-class .buzz .bam { }', - { selector: '.parent-class' }); + '.parent .foo, .parent bar .baz, .parent .buzz .bam { }', + { selector: '.parent' }); }); test('selector not added when rule starts with defined selector', t => { return run( t, - '.parent-class, .foo { }', - '.parent-class, .parent-class .foo { }', - { selector: '.parent-class' }); + '.parent, .foo { }', + '.parent, .parent .foo { }', + { selector: '.parent' }); }); test('does not add parent class to keyframes names', t => { @@ -32,6 +32,6 @@ test('does not add parent class to keyframes names', t => { t, '@keyframes foo { }', '@keyframes foo { }', - { selector: '.parent-class' }); + { selector: '.parent' }); });
updated the 'selector is added to all rules' to check rules with nested selectors.