diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/presto-orc/src/main/java/com/facebook/presto/orc/reader/TimestampSelectiveStreamReader.java b/presto-orc/src/main/java/com/facebook/presto/orc/reader/TimestampSelectiveStreamReader.java
index <HASH>..<HASH> 100644
--- a/presto-orc/src/main/java/com/facebook/presto/orc/reader/TimestampSelectiveStreamReader.java
+++ b/presto-orc/src/main/java/com/facebook/presto/orc/reader/TimestampSelectiveStreamReader.java
@@ -442,6 +442,17 @@ public class TimestampSelectiveStreamReader
@Override
public void close()
{
+ values = null;
+ outputPositions = null;
+ nulls = null;
+
+ presentStream = null;
+ presentStreamSource = null;
+ secondsStream = null;
+ secondsStreamSource = null;
+ nanosStream = null;
+ nanosStreamSource = null;
+
systemMemoryContext.close();
}
|
Speed up GC of TimestampSelectiveReader by clearing member variables in close()
|
diff --git a/green/loader.py b/green/loader.py
index <HASH>..<HASH> 100644
--- a/green/loader.py
+++ b/green/loader.py
@@ -88,18 +88,4 @@ def getTests(target):
logging.debug("Load method: FILE - {}".format(candidate))
return tests
-
- # INSTALLED MODULE - (Unlike the installed package, we don't discover
- # inaccessible tests in this case -- we stick to tests accessible from the
- # module)
- if target and (target[0] != '.'): # We don't handle relative installed modules
- tests = None
- try:
- module = importlib.import_module(target)
- tests = loader.loadTestsFromModule(module)
- except ImportError:
- pass
- if tests and tests.countTestCases():
- return tests
-
return None
|
Through extensive testing, I found that we never hit the loadTestsFromModule section, because loadTestsFromName handles the case of a built-in module and a module relative to the current path.
|
diff --git a/system/Router/Router.php b/system/Router/Router.php
index <HASH>..<HASH> 100644
--- a/system/Router/Router.php
+++ b/system/Router/Router.php
@@ -125,6 +125,8 @@ class Router implements RouterInterface
$this->method = $this->collection->getDefaultMethod();
$this->collection->setHTTPVerb($request->getMethod() ?? strtolower($_SERVER['REQUEST_METHOD']));
+
+ $this->translateURIDashes = $this->collection->shouldTranslateURIDashes();
}
/**
@@ -135,8 +137,6 @@ class Router implements RouterInterface
*/
public function handle(?string $uri = null)
{
- $this->translateURIDashes = $this->collection->shouldTranslateURIDashes();
-
// If we cannot find a URI to match against, then
// everything runs off of its default settings.
if ($uri === null || $uri === '') {
|
refactor: move property initialization to constructor
|
diff --git a/DependencyInjection/Source/JWKSetSource/JKU.php b/DependencyInjection/Source/JWKSetSource/JKU.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/Source/JWKSetSource/JKU.php
+++ b/DependencyInjection/Source/JWKSetSource/JKU.php
@@ -30,7 +30,7 @@ final class JKU extends DownloadedJWKSet
$definition->setArguments([
$config['url'],
$config['is_secured'],
- $config['cache'],
+ new Reference($config['cache']),
$config['cache_ttl'],
$config['is_https'],
]);
|
Bug fixed when a JKU source is created from the configuration file
|
diff --git a/lib/ponder/delegate.rb b/lib/ponder/delegate.rb
index <HASH>..<HASH> 100644
--- a/lib/ponder/delegate.rb
+++ b/lib/ponder/delegate.rb
@@ -1,6 +1,6 @@
module Ponder
module Delegate
- def delegate!
+ def delegate
thaum = self
(IRC.instance_methods + [:configure, :on, :connect, :reload!, :reloading?]).each do |method| # methods.each do |method|
diff --git a/lib/ponder/thaum.rb b/lib/ponder/thaum.rb
index <HASH>..<HASH> 100644
--- a/lib/ponder/thaum.rb
+++ b/lib/ponder/thaum.rb
@@ -1,13 +1,15 @@
require 'ponder/callback'
require 'ponder/connection'
require 'ponder/irc'
-require 'ponder/delegate'
require 'ostruct'
module Ponder
class Thaum
include IRC
- include Delegate
+ if RUBY_VERSION >= '1.9'
+ require 'ponder/delegate'
+ include Delegate
+ end
attr_reader :config
attr_accessor :connected, :traffic_logger, :error_logger, :console_logger
|
delegate functionality restricted for Ruby >= <I>
|
diff --git a/lib/socket.js b/lib/socket.js
index <HASH>..<HASH> 100644
--- a/lib/socket.js
+++ b/lib/socket.js
@@ -112,6 +112,11 @@ Socket.prototype.open = function () {
Socket.prototype.setTransport = function (transport) {
var self = this;
+ if (this.transport) {
+ // debug: clearing existing transport
+ this.transport.removeAllListeners();
+ }
+
// set up transport
this.transport = transport;
|
Sanity check: clear all events from previous transport in setTransport.
|
diff --git a/test/tests/clone.js b/test/tests/clone.js
index <HASH>..<HASH> 100644
--- a/test/tests/clone.js
+++ b/test/tests/clone.js
@@ -103,4 +103,18 @@ describe("Clone", function() {
return prepTestAndClean(url, file);
});
+
+ it("will not segfault when accessing a url without username", function() {
+ var url = "https://github.com/nodegit/private";
+
+ return Clone.clone(url, git, {
+ certificateCheck: function() { return 1; },
+ remoteCallbacks: {
+ credentials: function() {
+ return NodeGit.Cred.userpassPlaintextNew("fake-token",
+ "x-oauth-basic");
+ }
+ }
+ }).catch();
+ });
});
|
Unit test showing segfault via #<I>
If you attempt to clone a private repository without passing along a
username, `NULL` will make `NanNew` very upset.
|
diff --git a/mod/data/lib.php b/mod/data/lib.php
index <HASH>..<HASH> 100755
--- a/mod/data/lib.php
+++ b/mod/data/lib.php
@@ -1192,9 +1192,9 @@ function data_print_preference_form($data, $perpage, $search, $sort='', $order='
$fn = !empty($search_array[DATA_FIRSTNAME]->data) ? $search_array[DATA_FIRSTNAME]->data : '';
$ln = !empty($search_array[DATA_LASTNAME]->data) ? $search_array[DATA_LASTNAME]->data : '';
$patterns[] = '/##firstname##/';
- $replacement[] = '<input type="text" size="16" name="u_fn" value="'.$fn.'">';
+ $replacement[] = '<input type="text" size="16" name="u_fn" value="'.$fn.'" />';
$patterns[] = '/##lastname##/';
- $replacement[] = '<input type="text" size="16" name="u_ln" value="'.$ln.'">';
+ $replacement[] = '<input type="text" size="16" name="u_ln" value="'.$ln.'" />';
///actual replacement of the tags
$newtext = preg_replace($patterns, $replacement, $data->asearchtemplate);
|
MDL-<I> xhtml strict; merged from MOODLE_<I>_STABLE
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -73,7 +73,7 @@ function vimeo(str) {
var id;
var arr;
- const vimeoPipe = [
+ var vimeoPipe = [
'https?:\/\/vimeo\.com\/[0-9]+$',
'https?:\/\/player\.vimeo\.com\/video\/[0-9]+$',
'https?:\/\/vimeo\.com\/channels',
@@ -81,7 +81,7 @@ function vimeo(str) {
'album'
].join('|');
- const vimeoRegex = new RegExp(vimeoPipe, 'gim');
+ var vimeoRegex = new RegExp(vimeoPipe, 'gim');
if (vimeoRegex.test(str)) {
arr = str.split('/');
|
Replace `const` with `var` in vimeo code. (#<I>)
Since `get-video-id` doesn't have a build process involving transpilation, and since node dependencies typically don't get transpiled, these `const` declarations were making their way into ES5 code. Replacing them with `var` should do the trick.
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -37,6 +37,7 @@ import {DoughnutChartDemo} from './showcase/chart/DoughnutChartDemo';
import {RadarChartDemo} from './showcase/chart/RadarChartDemo';
import {PolarAreaChartDemo} from './showcase/chart/PolarAreaChartDemo';
import {PaginatorDemo} from './showcase/paginator/PaginatorDemo';
+import {DataListDemo} from './showcase/datalist/DataListDemo';
import {Router, Route,browserHistory} from 'react-router';
ReactDOM.render(
@@ -78,6 +79,7 @@ ReactDOM.render(
<Route path="/polarareachart" component={PolarAreaChartDemo} />
<Route path="/radarchart" component={RadarChartDemo} />
<Route path="/paginator" component={PaginatorDemo} />
+ <Route path="/datalist" component={DataListDemo} />
</Route>
</Router>,
document.getElementById('root')
|
Added DataListDemo into index.js
|
diff --git a/lib/chat.js b/lib/chat.js
index <HASH>..<HASH> 100644
--- a/lib/chat.js
+++ b/lib/chat.js
@@ -1,5 +1,4 @@
-var jQuery = require('jQuery'),
- builder = require('node-xmpp'),
+var builder = require('node-xmpp'),
Base = require('./base')
var Chat = function() {}
@@ -20,14 +19,13 @@ Chat.prototype.handles = function(stanza) {
Chat.prototype.handle = function(stanza) {
chat = {
from: this._getJid(stanza.attrs.from),
- content: jQuery(stanza.toString()).find('body').text()
+ content: stanza.getChild('body').getText()
}
this.socket.emit('xmpp.chat.message', chat)
return true
}
Chat.prototype.sendMessage = function(data) {
- console.log("I am " + this.manager.jid)
this.client.send(new builder.Element(
'message',
{ to: data.to, type: 'chat'}
|
Removing use of jQuery, issue #<I>
|
diff --git a/lib/mock-promises.js b/lib/mock-promises.js
index <HASH>..<HASH> 100644
--- a/lib/mock-promises.js
+++ b/lib/mock-promises.js
@@ -28,12 +28,14 @@
};
var fakeThen = function() {
+ var promise = this;
contractsTracker.add({
- promise: this,
+ promise: promise,
fulfilledHandler: arguments[0],
errorHandler: arguments[1],
progressHandler: arguments[2]
});
+ return promise;
};
this.executeForPromise = function(promise){contractsTracker.executeForPromise(promise)};
diff --git a/spec/javascripts/mock-promises_spec.js b/spec/javascripts/mock-promises_spec.js
index <HASH>..<HASH> 100644
--- a/spec/javascripts/mock-promises_spec.js
+++ b/spec/javascripts/mock-promises_spec.js
@@ -39,6 +39,12 @@ describe("mock promises", function() {
}, 1);
});
+ it("maintains that then is chainable", function() {
+ var promise = PromiseWrapper("chainThings");
+ var chainedReturn = promise.then(function () { }).then(function () {});
+ expect(chainedReturn).toBe(promise);
+ });
+
describe("contracts", function() {
var fulfilledHandler1, fulfilledHandler2, errorHandler, progressHandler, promise1, promise2;
beforeEach(function() {
|
Fake then returns the promise making it chainable (and inline with Q and other libraries)
|
diff --git a/spyderlib/widgets/helperwidgets.py b/spyderlib/widgets/helperwidgets.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/helperwidgets.py
+++ b/spyderlib/widgets/helperwidgets.py
@@ -137,7 +137,6 @@ class HTMLDelegate(QStyledItemDelegate):
doc = QTextDocument()
doc.setHtml(options.text)
- doc.setTextWidth(options.rect.width())
return QSize(doc.idealWidth(), doc.size().height())
|
File switcher: Remove option that was making it to not highlight correctly some entries
|
diff --git a/mod/hotpot/index.php b/mod/hotpot/index.php
index <HASH>..<HASH> 100644
--- a/mod/hotpot/index.php
+++ b/mod/hotpot/index.php
@@ -356,7 +356,9 @@
// get best score
if (is_numeric($totals[$hotpot->id]->maxscore)) {
- $bestscore = $totals[$hotpot->id]->maxscore." / $hotpot->grade";
+ $weighting = $hotpot->grade / 100;
+ $precision = hotpot_get_precision($hotpot);
+ $bestscore = round($totals[$hotpot->id]->maxscore * $weighting, $precision)." / $hotpot->grade";
} else {
$bestscore = " ";
}
|
adjust "best grade" to range 0 to hotpot->maxgrade
|
diff --git a/lib/withings/error.rb b/lib/withings/error.rb
index <HASH>..<HASH> 100644
--- a/lib/withings/error.rb
+++ b/lib/withings/error.rb
@@ -6,5 +6,13 @@ module Withings
# Raised when client is misconfigured
ClientConfigurationError = Class.new(self)
+
+ # Withings returns 200 for everything, making it difficult to figure out
+ # exactly what went wrong. They also appear to send back fairly arbitrary
+ # codes, for example a response with an HTTP Status Code 200 can contain
+ # a body {"status":503,"error":"Invalid Params"} if OAuth credentials are
+ # incorrect (503 normally indicates that a downstream service is unavailable).
+ # Because of this we just wrap most errors in this class.
+ InvalidResponseError = Class.new(self)
end
end
diff --git a/lib/withings/http/request.rb b/lib/withings/http/request.rb
index <HASH>..<HASH> 100644
--- a/lib/withings/http/request.rb
+++ b/lib/withings/http/request.rb
@@ -19,7 +19,7 @@ module Withings
when Net::HTTPOK
body = JSON.parse(response.body)
if body['status'].to_i != 0
- # TODO
+ raise Withings::Error::InvalidResponseError, "#{body['status']} - #{body['error']}"
end
body['body']
else
|
Raise exception when receiving a non-successful response
|
diff --git a/core/src/main/java/org/infinispan/statetransfer/StateProviderImpl.java b/core/src/main/java/org/infinispan/statetransfer/StateProviderImpl.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/infinispan/statetransfer/StateProviderImpl.java
+++ b/core/src/main/java/org/infinispan/statetransfer/StateProviderImpl.java
@@ -112,7 +112,7 @@ public class StateProviderImpl implements StateProvider {
synchronized (transfersByDestination) {
for (Iterator<Address> it = transfersByDestination.keySet().iterator(); it.hasNext(); ) {
Address destination = it.next();
- if (!stateTransferInProgress || !members.contains(destination)) {
+ if (!members.contains(destination)) {
List<OutboundTransferTask> transfers = transfersByDestination.get(destination);
it.remove();
for (OutboundTransferTask outboundTransfer : transfers) {
|
ISPN-<I> fix caused unnecessary InterruptedExceptions
When state transfer is over, the response to the last StateResponseCommand
could reach the provider node after the CH_UPDATE from the coordinator.
If that happens, no data is lost, but the OutboundTransferTask thread is
interrupted and it logs the InterruptedException stack trace.
|
diff --git a/lib/rbbt/rest/common/render.rb b/lib/rbbt/rest/common/render.rb
index <HASH>..<HASH> 100644
--- a/lib/rbbt/rest/common/render.rb
+++ b/lib/rbbt/rest/common/render.rb
@@ -147,6 +147,11 @@ module RbbtRESTHelpers
pid = @step.child{
begin
+ class << @step
+ def status=(message)
+ nil
+ end
+ end
Log.low("Fragment started: #{ fragment_file } - #{Process.pid}")
res = capture_haml fragment_code, &block
Log.low("Fragment writing: #{ fragment_file } - #{Process.pid}")
|
Don't allow fragments in forks to change step status, it might make it out of sync and be aborted
|
diff --git a/lib/ransack/constants.rb b/lib/ransack/constants.rb
index <HASH>..<HASH> 100644
--- a/lib/ransack/constants.rb
+++ b/lib/ransack/constants.rb
@@ -1,8 +1,5 @@
module Ransack
module Constants
- ASC_ARROW = '▲'.freeze
- DESC_ARROW = '▼'.freeze
-
OR = 'or'.freeze
AND = 'and'.freeze
diff --git a/lib/ransack/helpers/form_helper.rb b/lib/ransack/helpers/form_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/ransack/helpers/form_helper.rb
+++ b/lib/ransack/helpers/form_helper.rb
@@ -198,8 +198,11 @@ module Ransack
end
def direction_arrow
- return Constants::DESC_ARROW if @current_dir == 'desc'.freeze
- Constants::ASC_ARROW
+ if @current_dir == 'desc'.freeze
+ '▼'.freeze
+ else
+ '▲'.freeze
+ end
end
def direction_text(dir)
|
Replace arrow constants with frozen strings
These constants are only used once in the code base and constant lookup
is slower than frozen strings in MRI Ruby <I>+.
|
diff --git a/update.php b/update.php
index <HASH>..<HASH> 100644
--- a/update.php
+++ b/update.php
@@ -90,6 +90,9 @@
## Build is no longer used
unset($settings['symphony']['build']);
+
+ ## Remove the old Maintenance Mode setting
+ unset($settings['public']['maintenance_mode']);
## Set the default language
if(!isset($settings['symphony']['lang'])){
|
Updater will remove the old public:maintenance_mode setting. [Closes Issue #<I>]
|
diff --git a/spec/acceptance/excerpts_spec.rb b/spec/acceptance/excerpts_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/acceptance/excerpts_spec.rb
+++ b/spec/acceptance/excerpts_spec.rb
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
require 'acceptance/spec_helper'
describe 'Accessing excerpts for methods on a search result', :live => true do
diff --git a/spec/acceptance/facets_spec.rb b/spec/acceptance/facets_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/acceptance/facets_spec.rb
+++ b/spec/acceptance/facets_spec.rb
@@ -1,3 +1,5 @@
+# encoding: utf-8
+
require 'acceptance/spec_helper'
describe 'Faceted searching', :live => true do
|
Encoding comments for MRI <I>
|
diff --git a/class.phpmailer.php b/class.phpmailer.php
index <HASH>..<HASH> 100644
--- a/class.phpmailer.php
+++ b/class.phpmailer.php
@@ -2194,6 +2194,7 @@ class PHPMailer {
if (empty($this->AltBody)) {
$this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n";
}
+ return $message;
}
/**
|
Return $message as API requires
Issue: #<I>
|
diff --git a/lib/jasmine_rails/save_fixture.rb b/lib/jasmine_rails/save_fixture.rb
index <HASH>..<HASH> 100644
--- a/lib/jasmine_rails/save_fixture.rb
+++ b/lib/jasmine_rails/save_fixture.rb
@@ -1,5 +1,7 @@
require 'fileutils'
+# DEPRECATED - This feature will be removed as soon as it causes another issue
+#
# Adds a save_fixture method takes the rendered content
# and stores it in a fixture file to be used with jasmine.
#
|
Note that save_fixture is deprecated
|
diff --git a/lib/init.js b/lib/init.js
index <HASH>..<HASH> 100644
--- a/lib/init.js
+++ b/lib/init.js
@@ -81,14 +81,14 @@ module.exports = function (apiKey, chain) {
topic2_3_opr,
topic3) {
- const module = 'log';
+ const module = 'logs';
const action = 'getLogs';
var params = {
module, action, apiKey, address
};
- if (toBlock) {
- params.tolock = toBlock;
+ if (address) {
+ params.address = address;
}
if (fromBlock) {
@@ -96,7 +96,7 @@ module.exports = function (apiKey, chain) {
}
if (toBlock) {
- params.tolock = toBlock;
+ params.toBlock = toBlock;
}
if (topic0) {
|
getLogs fixed
typo in "tolock" - should be "toBlock"
no "address" field set
module should be = 'logs', not 'log'
|
diff --git a/lib/ProofSet.js b/lib/ProofSet.js
index <HASH>..<HASH> 100644
--- a/lib/ProofSet.js
+++ b/lib/ProofSet.js
@@ -320,7 +320,10 @@ async function _matchProofSet({
continue;
}
- // next, find the suite that can verify the proof
+ // next, find the suite that can verify the proof; if found, `matched`
+ // will be set to `true` and the proof will be added to `purposeToProofs`
+ // and `proofToSuite` to be processed -- otherwise it will not be; if
+ // no proofs are added for a given purpose, an exception will be thrown
let matched = false;
for(const s of suites) {
// `matchingProofs` is a map of promises that resolve to whether a
|
Add comment about `matched` var.
|
diff --git a/tests/test_decorators.py b/tests/test_decorators.py
index <HASH>..<HASH> 100644
--- a/tests/test_decorators.py
+++ b/tests/test_decorators.py
@@ -25,6 +25,26 @@ class TestOperation(object):
assert target.url_path is NoPath
assert target.methods == (Method.GET,)
+ def test_str(self):
+ @decorators.Operation(url_path="test/{id}/start")
+ def target(request):
+ """
+ Test target
+ """
+
+ assert "tests.test_decorators.target - GET test/{id:integer}/start" == str(target)
+
+ def test_repr(self):
+ @decorators.Operation(url_path="test/{id}/start")
+ def target(request):
+ """
+ Test target
+ """
+
+ assert "Operation('tests.test_decorators.target', " \
+ "UrlPath('test', PathParam(name='id', type=<Type.Integer: 'integer'>, type_args=None), 'start'), " \
+ "(<Method.GET: 'GET'>,))" == repr(target)
+
def test_unbound(self):
@decorators.Operation(tags=('eek', 'bar'))
def target(request):
|
Tests for Operation str and repr
|
diff --git a/djsupervisor/templatetags/djsupervisor_tags.py b/djsupervisor/templatetags/djsupervisor_tags.py
index <HASH>..<HASH> 100644
--- a/djsupervisor/templatetags/djsupervisor_tags.py
+++ b/djsupervisor/templatetags/djsupervisor_tags.py
@@ -14,12 +14,11 @@ import shutil
from django import template
register = template.Library()
-import djsupervisor.config
-
current_context = None
@register.filter
def templated(template_path):
+ import djsupervisor.config
# Interpret paths relative to the project directory.
project_dir = current_context["PROJECT_DIR"]
full_path = os.path.join(project_dir, template_path)
|
Fixed cyclic import with Django <I>
|
diff --git a/ast_/ast.py b/ast_/ast.py
index <HASH>..<HASH> 100644
--- a/ast_/ast.py
+++ b/ast_/ast.py
@@ -54,8 +54,12 @@ class NodeVisitor:
def generic_visit(node: Ast):
raise RuntimeError("No {}() method defined".format('visit_' + node.token))
- def filter_inorder(self, node, filter_func: Callable[[Any], bool]):
- """ Visit the tree inorder, but only those that return true for filter
+ def filter_inorder(self,
+ node,
+ filter_func: Callable[[Any], bool],
+ child_selector: Callable[[Ast], bool] = lambda x: True):
+ """ Visit the tree inorder, but only those that return true for filter_func and visiting children which
+ return true for child_selector.
"""
visited = set()
stack = [node]
@@ -66,5 +70,5 @@ class NodeVisitor:
visited.add(node)
if filter_func(node):
yield self.visit(node)
- elif isinstance(node, Ast):
+ if isinstance(node, Ast) and child_selector(node):
stack.extend(node.children[::-1])
|
Add filter children selector to filter_inorder
Now children are also traversed on selected nodes.
Also children can be filtered out (to allow cut ! predicates)
|
diff --git a/src/instrumentation/transaction.js b/src/instrumentation/transaction.js
index <HASH>..<HASH> 100644
--- a/src/instrumentation/transaction.js
+++ b/src/instrumentation/transaction.js
@@ -89,7 +89,9 @@ Transaction.prototype._adjustDurationToLongestTrace = function () {
Transaction.prototype.startTrace = function (signature, type) {
var trace = new Trace(this, signature, type, this._options)
- trace.setParent(this._rootTrace)
+ if (this._rootTrace) {
+ trace.setParent(this._rootTrace)
+ }
this._activeTraces[trace.getFingerprint()] = trace
|
Add check if rootTrace is present
|
diff --git a/lib/jasmine_rails/runner.rb b/lib/jasmine_rails/runner.rb
index <HASH>..<HASH> 100644
--- a/lib/jasmine_rails/runner.rb
+++ b/lib/jasmine_rails/runner.rb
@@ -13,7 +13,7 @@ module JasmineRails
File.open(runner_path, 'w') {|f| f << html.gsub('/assets', './assets')}
phantomjs_runner_path = File.join(File.dirname(__FILE__), '..', 'assets', 'javascripts', 'jasmine-runner.js')
- run_cmd %{phantomjs "#{phantomjs_runner_path}" "file://#{runner_path.to_s}?spec=#{spec_filter}"}
+ run_cmd %{phantomjs "#{phantomjs_runner_path}" "#{runner_path.to_s}?spec=#{spec_filter}"}
end
end
|
removed file:// from command run, windows does not recognise this prefix.
|
diff --git a/src/Validation.php b/src/Validation.php
index <HASH>..<HASH> 100644
--- a/src/Validation.php
+++ b/src/Validation.php
@@ -9,6 +9,7 @@ namespace Nutrition;
*/
use Base;
+use Cursor;
use DB\SQL\Mapper as SQLMapperOri;
use DB\Jig\Mapper as JigMapperOri;
use DB\Mongo\Mapper as MongoMapperOri;
@@ -41,7 +42,7 @@ class Validation
*/
protected $cursor;
- public function __construct(MapperInterface $map = null)
+ public function __construct(Cursor $map = null)
{
$this->map = $map;
$this->messages = Base::instance()->get('validation_messages');
|
Bugfix: wrong type hinting on Validation
|
diff --git a/lib/arjdbc/db2/adapter.rb b/lib/arjdbc/db2/adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/arjdbc/db2/adapter.rb
+++ b/lib/arjdbc/db2/adapter.rb
@@ -48,6 +48,19 @@ module ArJdbc
# TODO: Explain this!
end
+ def prefetch_primary_key?(table_name = nil)
+ # TRUE if the table has no identity column
+ names = table_name.upcase.split(".")
+ sql = "SELECT 1 FROM SYSCAT.COLUMNS WHERE IDENTITY = 'Y' "
+ sql += "AND TABSCHEMA = '#{names.first}' " if names.size == 2
+ sql += "AND TABNAME = '#{names.last}'"
+ select_one(sql).nil?
+ end
+
+ def next_sequence_value(sequence_name)
+ select_value("select next value for #{sequence_name} from sysibm.sysdummy1")
+ end
+
module Column
def type_cast(value)
return nil if value.nil? || value =~ /^\s*null\s*$/i
|
Fetch a sequence value manually for tables with no identity columns
This is to support legacy tables for which the sequence needs to be
manually specified in ActiveRecord
|
diff --git a/public/js/chrome/navigation.js b/public/js/chrome/navigation.js
index <HASH>..<HASH> 100644
--- a/public/js/chrome/navigation.js
+++ b/public/js/chrome/navigation.js
@@ -49,7 +49,7 @@ function opendropdown(el) {
var menu;
if (!dropdownOpen) {
menu = $(el).closest('.menu').addClass('open').trigger('open');
- var input = menu.find('input:first').focus()[0];
+ var input = menu.find('input:visible:first').focus()[0];
if (input) setTimeout(function () {
input.select();
}, 0);
|
correctly select/set focus on the first _visible_ input element on form based menus (like login)
|
diff --git a/ORM/PaginatedRepository.php b/ORM/PaginatedRepository.php
index <HASH>..<HASH> 100644
--- a/ORM/PaginatedRepository.php
+++ b/ORM/PaginatedRepository.php
@@ -40,9 +40,7 @@ class PaginatedRepository extends EntityRepository
{
$qb = $this->createPaginatedQueryBuilder($criteria);
$qb->addSelect($this->getEntityAlias());
- if (is_array($orderBy)) {
- $qb->addOrder($orderBy, $this->getEntityAlias());
- }
+ $this->processOrderBy($qb, $orderBy);
$qb->addPagination($page, $rpp);
$results = $qb->getQuery()->getResult();
@@ -100,6 +98,17 @@ class PaginatedRepository extends EntityRepository
}
/**
+ * @param PaginatedQueryBuilder $qb
+ * @param array|null $orderBy
+ */
+ protected function processOrderBy(PaginatedQueryBuilder $qb, array $orderBy = null)
+ {
+ if (is_array($orderBy)) {
+ $qb->addOrder($orderBy, $this->getEntityAlias());
+ }
+ }
+
+ /**
* @return string
*/
protected function getEntityAlias()
|
PaginatedRepository move order logic to protected method
|
diff --git a/lib/serf/client.js b/lib/serf/client.js
index <HASH>..<HASH> 100644
--- a/lib/serf/client.js
+++ b/lib/serf/client.js
@@ -84,7 +84,7 @@ Client.prototype = {
var name = member.Name;
if (members.some(function(member) {
- return member.Tags["have-unprocessed-messages-for-" + name] == "true";
+ return member.Tags["buffered-for-" + name] == "true";
}))
return false;
|
Follow to change of droonga-engine
|
diff --git a/lib/browser.js b/lib/browser.js
index <HASH>..<HASH> 100644
--- a/lib/browser.js
+++ b/lib/browser.js
@@ -18,3 +18,4 @@ require('./http/xhr');
if (typeof window !== 'undefined') window.AWS = AWS;
if (typeof module !== 'undefined') module.exports = AWS;
+if (typeof self !== 'undefined') self.AWS = AWS;
|
adding AWS namespace to self to support running in webworkers
|
diff --git a/java/server/src/org/openqa/selenium/remote/server/handler/GetSessionCapabilities.java b/java/server/src/org/openqa/selenium/remote/server/handler/GetSessionCapabilities.java
index <HASH>..<HASH> 100644
--- a/java/server/src/org/openqa/selenium/remote/server/handler/GetSessionCapabilities.java
+++ b/java/server/src/org/openqa/selenium/remote/server/handler/GetSessionCapabilities.java
@@ -30,12 +30,7 @@ public class GetSessionCapabilities extends ResponseAwareWebDriverHandler {
public ResultType call() {
Session session = getSession();
-
Map<String, Object> capabilities = (Map<String, Object>) session.getCapabilities().asMap();
- // To facilitate the server-side selenium emulation, put the session ID
- // into the capabilities.
- capabilities.put("webdriver.remote.sessionid", session.getSessionId().toString());
-
response.setValue(describeSession(capabilities));
return ResultType.SUCCESS;
|
DanielWagnerHall: Reverting revision <I> because it breaks the remote server - the Capabilities map is immutable. Make a copy if you want to change it.
r<I>
|
diff --git a/closure/goog/ui/drilldownrow.js b/closure/goog/ui/drilldownrow.js
index <HASH>..<HASH> 100644
--- a/closure/goog/ui/drilldownrow.js
+++ b/closure/goog/ui/drilldownrow.js
@@ -217,14 +217,6 @@ goog.ui.DrilldownRow.prototype.removeChild = function(child) {
};
-/** @override */
-goog.ui.DrilldownRow.prototype.disposeInternal = function() {
- delete this.html_;
- this.children_ = null;
- goog.ui.DrilldownRow.superClass_.disposeInternal.call(this);
-};
-
-
/**
* Rendering of DrilldownRow's is on need, do not call this directly
* from application code.
|
No access to private member.
-------------
Created by MOE: <URL>
|
diff --git a/molvs/normalize.py b/molvs/normalize.py
index <HASH>..<HASH> 100644
--- a/molvs/normalize.py
+++ b/molvs/normalize.py
@@ -39,7 +39,7 @@ class Normalization(object):
@memoized_property
def transform(self):
log.debug('Loading Normalization transform: %s', self.name)
- return AllChem.ReactionFromSmarts(str(self.transform_str.encode('utf8')))
+ return AllChem.ReactionFromSmarts(str(self.transform_str))
def __repr__(self):
return 'Normalization({!r}, {!r})'.format(self.name, self.transform_str)
|
Fix ReactionFromSmarts for both python 2 and 3
|
diff --git a/components/dialog-ng/dialog-ng.js b/components/dialog-ng/dialog-ng.js
index <HASH>..<HASH> 100644
--- a/components/dialog-ng/dialog-ng.js
+++ b/components/dialog-ng/dialog-ng.js
@@ -187,7 +187,7 @@ class DialogController {
Reflect.deleteProperty(this, 'DIALOG_NAMESPACE');
- if (shortcuts.getScope().pop() === this.dialogService.DIALOG_NAMESPACE) {
+ if (shortcuts.getScope().indexOf(this.dialogService.DIALOG_NAMESPACE) > -1) {
shortcuts.setScope(this.currentShortcutsScope);
}
}
|
RG-<I> re-implement
Former-commit-id: fc<I>f<I>a<I>a<I>bfc8ada0b4ce<I>f7e<I>e
|
diff --git a/src/inode.js b/src/inode.js
index <HASH>..<HASH> 100644
--- a/src/inode.js
+++ b/src/inode.js
@@ -264,6 +264,7 @@ export function makeInodeHeaderBlob( datastore_id, inode_type, owner_id, inode_u
'type': inode_type,
'owner': owner_id,
'uuid': inode_uuid,
+ 'readers': [], // unused for now
'data_hash': data_hash,
'version': version,
'proto_version': BLOCKSTACK_STORAGE_PROTO_VERSION,
|
empty list of readers in each inode, for now
|
diff --git a/lib/svtplay_dl/fetcher/dash.py b/lib/svtplay_dl/fetcher/dash.py
index <HASH>..<HASH> 100644
--- a/lib/svtplay_dl/fetcher/dash.py
+++ b/lib/svtplay_dl/fetcher/dash.py
@@ -94,5 +94,6 @@ class DASH(VideoRetriever):
if self.options.output != "-":
file_d.close()
+ progressbar(bytes_so_far, total_size, "ETA: complete")
progress_stream.write('\n')
self.finished = True
|
dash: complete the progress bar after file is downloaded
The progress bar wasn't updated after the downloaded completed,
so the final progress bar would look something like this:
[<I>/<I>][===============================.] ETA: 0:<I>:<I>
This can be interpreted as the file didn't download completely.
Reported-by: rooth
|
diff --git a/libraries/joomla/cache/storage/file.php b/libraries/joomla/cache/storage/file.php
index <HASH>..<HASH> 100644
--- a/libraries/joomla/cache/storage/file.php
+++ b/libraries/joomla/cache/storage/file.php
@@ -9,8 +9,6 @@
defined('JPATH_PLATFORM') or die;
-jimport('joomla.filesystem.file');
-
/**
* File cache storage handler
*
@@ -202,12 +200,8 @@ class JCacheStorageFile extends JCacheStorage
{
$result = true;
// files older than lifeTime get deleted from cache
- $files = $this->_filesInFolder($this->_root, '', true, true);
+ $files = $this->_filesInFolder($this->_root, '', true, true, array('.svn', 'CVS','.DS_Store','__MACOSX', 'index.html'));
foreach($files As $file) {
- if('index.html' == JFile::getName($file)) {
- // Don't delete index.html files
- continue;
- }
$time = @filemtime($file);
if (($time + $this->_lifetime) < $this->_now || empty($time)) {
$result |= @unlink($file);
|
[#<I>] JCacheFIle should not use JFile calls at all
|
diff --git a/src/console/controllers/Migrate.php b/src/console/controllers/Migrate.php
index <HASH>..<HASH> 100644
--- a/src/console/controllers/Migrate.php
+++ b/src/console/controllers/Migrate.php
@@ -89,7 +89,7 @@ class Migrate extends Controller
$custom_name = false;
- if (count($argv)) {
+ if ($argv && count($argv)) {
$custom_name = mb_strtolower($argv[0], 'utf-8');
}
diff --git a/src/web/Form.php b/src/web/Form.php
index <HASH>..<HASH> 100755
--- a/src/web/Form.php
+++ b/src/web/Form.php
@@ -46,7 +46,7 @@ class Form
$data = $data->to_array();
}
- if (count($data)) {
+ if (is_array($data)) {
foreach (array_intersect_key($data, $this->_fields) as $key => $value) {
$this->set($key, $value);
}
|
Fix count (php<I>)
|
diff --git a/pymc3/distributions/mixture.py b/pymc3/distributions/mixture.py
index <HASH>..<HASH> 100644
--- a/pymc3/distributions/mixture.py
+++ b/pymc3/distributions/mixture.py
@@ -397,6 +397,19 @@ class Mixture(Distribution):
return comp_dist_shapes, broadcast_shape
def logp(self, value):
+ """
+ Calculate log-probability of defined Mixture distribution at specified value.
+
+ Parameters
+ ----------
+ value : numeric
+ Value(s) for which log-probability is calculated. If the log probabilities for multiple
+ values are desired the values must be provided in a numpy array or theano tensor
+
+ Returns
+ -------
+ TensorVariable
+ """
w = self.w
return bound(logsumexp(tt.log(w) + self._comp_logp(value), axis=-1),
@@ -404,6 +417,22 @@ class Mixture(Distribution):
broadcast_conditions=False)
def random(self, point=None, size=None):
+ """
+ Draw random values from defined Mixture distribution.
+
+ Parameters
+ ----------
+ point : dict, optional
+ Dict of variable values on which random values are to be
+ conditioned (uses default point if not specified).
+ size : int, optional
+ Desired size of random sample (returns one sample if not
+ specified).
+
+ Returns
+ -------
+ array
+ """
# Convert size to tuple
size = to_tuple(size)
# Draw mixture weights and infer the comp_dists shapes
|
Add doc strings for random and logp class methods for mixture distribution
|
diff --git a/system/Config/DotEnv.php b/system/Config/DotEnv.php
index <HASH>..<HASH> 100644
--- a/system/Config/DotEnv.php
+++ b/system/Config/DotEnv.php
@@ -183,7 +183,7 @@ class DotEnv
$value = $this->resolveNestedVariables($value);
// Handle hex2bin prefix
- if ($name === 'encryption.key' && substr($value, 0, 8) === 'hex2bin:')
+ if ($name === 'encryption.key' && strpos($value, 'hex2bin:') === 0)
{
$value = hex2bin(substr($value, 8));
}
|
Update system/Config/DotEnv.php
|
diff --git a/salt/modules/file.py b/salt/modules/file.py
index <HASH>..<HASH> 100644
--- a/salt/modules/file.py
+++ b/salt/modules/file.py
@@ -686,7 +686,7 @@ def find(path, *args, **kwargs):
except ValueError as ex:
return 'error: {0}'.format(ex)
- ret = [item for i in [finder.find(os.path.expanduser(p)) for p in glob.glob(path)] for item in i]
+ ret = [item for i in [finder.find(p) for p in glob.glob(os.path.expanduser(path))] for item in i]
ret.sort()
return ret
|
Preserve previous behaviour when doing glob expansion in file.find
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,9 +1,3 @@
-# temporary
-puts "Running rubocop..."
-output = `rubocop`
-puts output
-raise "Rubocop failed" unless output.include? "no offenses detected"
-
require 'coveralls'
Coveralls.wear! unless ENV["FASTLANE_SKIP_UPDATE_CHECK"]
|
Rubocop is now being run by fastlane and not spaceship
|
diff --git a/core/src/main/java/org/infinispan/persistence/manager/PersistenceManagerImpl.java b/core/src/main/java/org/infinispan/persistence/manager/PersistenceManagerImpl.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/infinispan/persistence/manager/PersistenceManagerImpl.java
+++ b/core/src/main/java/org/infinispan/persistence/manager/PersistenceManagerImpl.java
@@ -377,6 +377,7 @@ public class PersistenceManagerImpl implements PersistenceManager {
final AdvancedCache<Object, Object> flaggedCache = getCacheForStateInsertion();
return Flowable.fromPublisher(preloadCl.entryPublisher(null, true, true))
.take(maxEntries)
+ .observeOn(cpuScheduler)
.doOnNext(me -> preloadKey(flaggedCache, me.getKey(), me.getValue(), me.getMetadata()))
.count()
.subscribeOn(persistenceScheduler)
|
ISPN-<I> Preload write is performed on persistence thread
* Make sure to observe on the CPU thread
|
diff --git a/src/get-region-from-meta.js b/src/get-region-from-meta.js
index <HASH>..<HASH> 100644
--- a/src/get-region-from-meta.js
+++ b/src/get-region-from-meta.js
@@ -33,12 +33,7 @@ function getRegionFromMeta({ v, /*c, */r25th, r40th, r50th, r75th, r90th } = {},
regionMean.right = regionMean.left + regionMean.width - 1;
regionMean.bottom = regionMean.top + regionMean.height - 1;
-/*
- if (regionMean.right >= imageWidth) {
- regionMean.left -= (regionMean.right - imageWidth);
- regionMean.right = regionMean.left + regionMean.width - 1;
- }
-*/
+
return regionMean;
}
|
should be no need for redundant boundary detection
|
diff --git a/views/boom/editor/footer.php b/views/boom/editor/footer.php
index <HASH>..<HASH> 100644
--- a/views/boom/editor/footer.php
+++ b/views/boom/editor/footer.php
@@ -22,4 +22,4 @@
//]]>
</script>
</body>
-</html>
+</html>
\ No newline at end of file
|
Removed blank link at EOF
|
diff --git a/testing/test_session.py b/testing/test_session.py
index <HASH>..<HASH> 100644
--- a/testing/test_session.py
+++ b/testing/test_session.py
@@ -126,14 +126,14 @@ class SessionTests(object):
)
reprec = testdir.inline_run(p)
passed, skipped, failed = reprec.listoutcomes()
- assert len(failed) == 1
+ assert (len(passed), len(skipped), len(failed)) == (1, 0, 1)
out = failed[0].longrepr.reprcrash.message
assert (
out.find(
"""[Exception("Ha Ha fooled you, I'm a broken repr().") raised in repr()]"""
)
!= -1
- ) # '
+ )
def test_skip_file_by_conftest(self, testdir):
testdir.makepyfile(
|
test_implicit_bad_repr1: harden/cleanup
|
diff --git a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
+++ b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
@@ -102,10 +102,6 @@ module ActiveRecord
ActiveRecord::Base.pluralize_table_names ? table_name.to_s.pluralize : table_name
end
- def interpolate_sql(sql)
- instance_eval("%@#{sql.gsub('@', '\@')}@", __FILE__, __LINE__)
- end
-
private
def allocate_aliases
@@ -120,7 +116,7 @@ module ActiveRecord
end
def process_conditions(conditions, table_name)
- Arel.sql(interpolate_sql(sanitize_sql(conditions, table_name)))
+ Arel.sql(sanitize_sql(conditions, table_name))
end
def sanitize_sql(condition, table_name)
|
removing interpolate_sql from join associations
|
diff --git a/config/config.php b/config/config.php
index <HASH>..<HASH> 100644
--- a/config/config.php
+++ b/config/config.php
@@ -8,6 +8,7 @@ return [
'productionEnvironments' => [
'prod',
'production',
+ 'live',
],
/*
|
add 'live' as default production env
|
diff --git a/message.php b/message.php
index <HASH>..<HASH> 100644
--- a/message.php
+++ b/message.php
@@ -161,7 +161,7 @@ if ($action=='send' && $good_to_send) {
echo WT_I18N::translate('Message was not sent'), '<br />';
AddToLog('Unable to send message. FROM:'.$from.' TO:'.$to.' (recipient does not exist)', 'error');
} else if (addMessage($message)) {
- echo WT_I18N::translate('Message successfully sent to %s', '<b>'.getUserFullName($to_user_id).'</b>');
+ echo WT_I18N::translate('Message successfully sent to %s', '<b>'.$to.'</b>');
} else {
echo WT_I18N::translate('Message was not sent'), '<br />';
AddToLog('Unable to send message. FROM:'.$from.' TO:'.$to.' (failed to send)', 'error');
|
message.php - undefined variable (error from previous change)
|
diff --git a/game.rb b/game.rb
index <HASH>..<HASH> 100644
--- a/game.rb
+++ b/game.rb
@@ -47,16 +47,16 @@ class Grid
cells << @storage[index - 1] unless beginning_of_row?(index)
cells << @storage[index + 1] unless end_of_row?(index)
- unless index < size
+ unless first_row?(index)
cells << @storage[above(index - 1)] unless beginning_of_row?(index)
- cells << @storage[above(index)]
cells << @storage[above(index + 1)] unless end_of_row?(index)
+ cells << @storage[above(index)]
end
unless last_row?(index)
cells << @storage[below(index) - 1] unless beginning_of_row?(index)
- cells << @storage[below(index)]
cells << @storage[below(index) + 1] unless end_of_row?(index)
+ cells << @storage[below(index)]
end
cells
@@ -94,6 +94,10 @@ class Grid
(index + 1) % size == 0
end
+ def first_row?(index)
+ index < size
+ end
+
def last_row?(index)
index >= (size * size - size)
end
|
Minor changes for consistency
- And reordering to highlight duplication
|
diff --git a/state.go b/state.go
index <HASH>..<HASH> 100644
--- a/state.go
+++ b/state.go
@@ -814,6 +814,14 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) {
case *GuildDelete:
err = s.GuildRemove(t.Guild)
case *GuildMemberAdd:
+ // Updates the MemberCount of the guild.
+ guild, err := s.Guild(t.Member.GuildID)
+ if err != nil {
+ return err
+ }
+ guild.MemberCount++
+
+ // Caches member if tracking is enabled.
if s.TrackMembers {
err = s.MemberAdd(t.Member)
}
@@ -822,6 +830,14 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) {
err = s.MemberAdd(t.Member)
}
case *GuildMemberRemove:
+ // Updates the MemberCount of the guild.
+ guild, err := s.Guild(t.Member.GuildID)
+ if err != nil {
+ return err
+ }
+ guild.MemberCount--
+
+ // Removes member from the cache if tracking is enabled.
if s.TrackMembers {
err = s.MemberRemove(t.Member)
}
|
track membercount on memberAdd and leave (#<I>)
* track membercount on memberAdd and leave
* requested changes
|
diff --git a/src/file.js b/src/file.js
index <HASH>..<HASH> 100644
--- a/src/file.js
+++ b/src/file.js
@@ -167,7 +167,7 @@ exports = module.exports = {
* @return {Boolean}
*/
isDirectory: function (path) {
- return fs.lstatSync(path).isDirectory();
+ return fs.statSync(path).isDirectory();
},
/**
|
Use `stat` instead of `lstat` to support symlinks
|
diff --git a/media/player/html5video/tests/player_test.php b/media/player/html5video/tests/player_test.php
index <HASH>..<HASH> 100644
--- a/media/player/html5video/tests/player_test.php
+++ b/media/player/html5video/tests/player_test.php
@@ -60,7 +60,7 @@ class media_html5video_testcase extends advanced_testcase {
/**
* Test method get_supported_extensions()
*/
- public function test_supported_extensions() {
+ public function test_get_supported_extensions() {
$nativeextensions = file_get_typegroup('extension', 'html_video');
// Make sure that the list of extensions from the setting is exactly the same as html_video group.
@@ -70,6 +70,25 @@ class media_html5video_testcase extends advanced_testcase {
}
/**
+ * Test method list_supported_urls()
+ */
+ public function test_list_supported_urls() {
+ global $CFG;
+ require_once($CFG->libdir . '/filelib.php');
+
+ $nativeextensions = file_get_typegroup('extension', 'html_video');
+
+ // Create list of URLs for each extension.
+ $urls = array_map(function($ext){
+ return new moodle_url('http://example.org/video.' . $ext);
+ }, $nativeextensions);
+
+ // Make sure that the list of supported URLs is not filtering permitted extensions.
+ $player = new media_html5video_plugin();
+ $this->assertCount(count($urls), $player->list_supported_urls($urls));
+ }
+
+ /**
* Test embedding without media filter (for example for displaying file resorce).
*/
public function test_embed_url() {
|
MDL-<I> media_html5video: Add test for native extensions support.
This is to verify that all files of html_video mime type extensions are
passing list_supported_urls method correctly.
|
diff --git a/src/test/java/org/attribyte/wp/db/DBTest.java b/src/test/java/org/attribyte/wp/db/DBTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/attribyte/wp/db/DBTest.java
+++ b/src/test/java/org/attribyte/wp/db/DBTest.java
@@ -78,16 +78,18 @@ public class DBTest {
user = db().selectUser(createdUser.id);
assertNotNull(user);
assertEquals(createdUser.username, user.username);
+ assertEquals(createdUser.username.toLowerCase(), user.slug);
}
@Test
public void userByUsername() throws Exception {
String username = StringUtil.randomString(8);
- User user = new User(0L, username, username.toUpperCase(), username + "@testy.com", System.currentTimeMillis(), ImmutableList.of());
+ User user = new User(0L, username, username.toUpperCase(), username + "test-slug", username + "@testy.com", System.currentTimeMillis(), ImmutableList.of());
User createdUser = db().createUser(user, "XXXX");
user = db().selectUser(createdUser.username);
assertNotNull(user);
assertEquals(createdUser.id, user.id);
+ assertEquals(username + "test-slug", user.slug);
}
@Test
|
Make sure "slug" is set when specified during construction & generated automatically.
|
diff --git a/chill-java/src/main/java/com/twitter/chill/SerDeState.java b/chill-java/src/main/java/com/twitter/chill/SerDeState.java
index <HASH>..<HASH> 100644
--- a/chill-java/src/main/java/com/twitter/chill/SerDeState.java
+++ b/chill-java/src/main/java/com/twitter/chill/SerDeState.java
@@ -50,8 +50,8 @@ public class SerDeState {
public void setInput(byte[] in, int offset, int count) { input.setBuffer(in, offset, count); }
public void setInput(InputStream in) { input.setInputStream(in); }
- public int numOfWrittenBytes() { return output.total(); }
- public int numOfReadBytes() { return input.total(); }
+ public long numOfWrittenBytes() { return output.total(); }
+ public long numOfReadBytes() { return input.total(); }
// Common operations:
public <T> T readObject(Class<T> cls) {
|
Changed numOfWrittenBytes to long to match Kryo
|
diff --git a/version.php b/version.php
index <HASH>..<HASH> 100644
--- a/version.php
+++ b/version.php
@@ -29,9 +29,9 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2020061500.00; // YYYYMMDD = weekly release date of this DEV branch.
+$version = 2020061500.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
-$release = '4.0dev (Build: 20200615)'; // Human-friendly version name
+$release = '4.0dev (Build: 20200618)'; // Human-friendly version name
$branch = '40'; // This version's branch.
$maturity = MATURITY_ALPHA; // This version's maturity level.
|
weekly on-sync release <I>dev
|
diff --git a/spec/unit/restclient_spec.rb b/spec/unit/restclient_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/restclient_spec.rb
+++ b/spec/unit/restclient_spec.rb
@@ -71,9 +71,9 @@ describe RestClient do
end
describe 'version' do
- it 'has a version ~> 1.7.0.alpha' do
+ it 'has a version ~> 2.0.0.alpha' do
ver = Gem::Version.new(RestClient.version)
- Gem::Requirement.new('~> 1.7.0.alpha').should be_satisfied_by(ver)
+ Gem::Requirement.new('~> 2.0.0.alpha').should be_satisfied_by(ver)
end
end
end
|
Fix version spec tests for <I>
|
diff --git a/tests/child_processes_test.py b/tests/child_processes_test.py
index <HASH>..<HASH> 100644
--- a/tests/child_processes_test.py
+++ b/tests/child_processes_test.py
@@ -80,7 +80,7 @@ def spawn_process_which_dies_with_children():
# we need to sleep before the shell exits, or dumb-init might send
# TERM to print_signals before it has had time to register custom
# signal handlers
- '{python} -m testing.print_signals & sleep 0.1'.format(
+ '{python} -m testing.print_signals & sleep 1'.format(
python=sys.executable,
),
),
|
Fix test on slow machines, increasing the sleep time
The original sleep time is too short, the tests failed on
architectures like mips*, armhf. I think it's because the
python interpreter can't start in <I>s.
After increasing the sleep time, it passed on most architectures
which Debian supports.
The result can be found at:
<URL>
|
diff --git a/lib/models/graph-object.js b/lib/models/graph-object.js
index <HASH>..<HASH> 100644
--- a/lib/models/graph-object.js
+++ b/lib/models/graph-object.js
@@ -21,6 +21,7 @@ function GraphModelFactory (Model) {
instanceId: {
type: 'string',
required: true,
+ unique: true,
uuidv4: true
},
context: {
|
adding unique constraint to graph object instance id
|
diff --git a/lib/polygon/helpers.rb b/lib/polygon/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/polygon/helpers.rb
+++ b/lib/polygon/helpers.rb
@@ -13,8 +13,12 @@ module Polygon
settings.templates
end
+ def database
+ settings.database
+ end
+
def lispy(&bl)
- @lispy ||= Alf.lispy(settings.database)
+ @lispy ||= Alf.lispy(database)
bl ? @lispy.evaluate(&bl) : @lispy
end
|
Let database be known in App instance.
|
diff --git a/lib/moonshine/manifest/rails.rb b/lib/moonshine/manifest/rails.rb
index <HASH>..<HASH> 100644
--- a/lib/moonshine/manifest/rails.rb
+++ b/lib/moonshine/manifest/rails.rb
@@ -8,17 +8,18 @@ class Moonshine::Manifest::Rails < Moonshine::Manifest
group "rails",
:ensure => "present",
- :gid => 1001,
:allowdupe => false
- user "rails",
+ user "create-rails-user",
+ :name => "user"
:ensure => "present",
- :uid => 1001,
- :gid => 1001,
+ :notify => reference(:exec, "passwd-rails")
+
+ user "rails",
:home => "/srv/rails",
:shell => "/bin/bash",
+ :groups => "admin"
:allowdupe => false,
- :notify => reference(:exec, "passwd-rails")
file "/srv/rails",
:ensure => "directory",
|
create rails user and change password in two steps
|
diff --git a/test/test_datasets_utils.py b/test/test_datasets_utils.py
index <HASH>..<HASH> 100644
--- a/test/test_datasets_utils.py
+++ b/test/test_datasets_utils.py
@@ -7,6 +7,7 @@ import zipfile
import tarfile
import gzip
import warnings
+from torch._six import PY2
from torch._utils_internal import get_file_path_2
from common_utils import get_tmp_dir
@@ -40,6 +41,7 @@ class Tester(unittest.TestCase):
self.assertTrue(utils.check_integrity(existing_fpath))
self.assertFalse(utils.check_integrity(nonexisting_fpath))
+ @unittest.skipIf(PY2, "https://github.com/pytorch/vision/issues/1268")
def test_download_url(self):
with get_tmp_dir() as temp_dir:
url = "http://github.com/pytorch/vision/archive/master.zip"
@@ -51,6 +53,7 @@ class Tester(unittest.TestCase):
warnings.warn(msg, RuntimeWarning)
raise unittest.SkipTest(msg)
+ @unittest.skipIf(PY2, "https://github.com/pytorch/vision/issues/1268")
def test_download_url_retry_http(self):
with get_tmp_dir() as temp_dir:
url = "https://github.com/pytorch/vision/archive/master.zip"
|
Disable download tests for Python2 (#<I>)
|
diff --git a/src/Executor/Result.php b/src/Executor/Result.php
index <HASH>..<HASH> 100644
--- a/src/Executor/Result.php
+++ b/src/Executor/Result.php
@@ -17,11 +17,13 @@ class Result {
// Datetime weirdness. Apparently this is caused by theming issues on the
// remote theme. Why it is being called when executed via CLI is another
// story.
- if (strpos($output[0], 'date_timezone_set() expects parameter') === 0) {
- array_shift($output);
- }
- if (strpos($output[0], 'date_format() expects parameter') === 0) {
- array_shift($output);
+ if (isset($output[0])) {
+ if (strpos($output[0], 'date_timezone_set() expects parameter') === 0) {
+ array_shift($output);
+ }
+ if (strpos($output[0], 'date_format() expects parameter') === 0) {
+ array_shift($output);
+ }
}
$this->command = $command;
|
Fix PHP warning, when output was not an array.
|
diff --git a/data/account.pb.go b/data/account.pb.go
index <HASH>..<HASH> 100644
--- a/data/account.pb.go
+++ b/data/account.pb.go
@@ -8,7 +8,7 @@ Package data is a generated protocol buffer package.
It is generated from these files:
account.proto
karma.proto
- user_agent.proto
+ useragent.proto
It has these top-level messages:
Account
|
Updates protobuffer autogen annotation.
I really hate that these have to be in vcs at all.
|
diff --git a/tentacoli.js b/tentacoli.js
index <HASH>..<HASH> 100644
--- a/tentacoli.js
+++ b/tentacoli.js
@@ -106,6 +106,12 @@ function Tentacoli (opts) {
this._main.on('error', this.emit.bind(this, 'error'))
this._parser.on('error', this.emit.bind(this, 'error'))
+ this.on('finish', function () {
+ Object.keys(this._requests).forEach(function (reqId) {
+ this._requests[reqId].callback(new Error('connection closed'))
+ }, this)
+ })
+
var self = this
function Reply () {
this.response = null
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -303,3 +303,19 @@ test('errors if piping something errors', function (t) {
t.fail('it never happens')
})
})
+
+test('errors if the connection fails', function (t) {
+ t.plan(2)
+
+ var s = setup()
+ var msg = 'the answer to life, the universe and everything'
+
+ s.sender.request(msg, function (err) {
+ t.ok(err, 'should error')
+ })
+
+ s.receiver.on('request', function (req, reply) {
+ t.deepEqual(req, msg, 'request matches')
+ s.receiver.end()
+ })
+})
|
Calls callbacks with errors if the connection closes.
|
diff --git a/travis/tests/test_encrypt.py b/travis/tests/test_encrypt.py
index <HASH>..<HASH> 100644
--- a/travis/tests/test_encrypt.py
+++ b/travis/tests/test_encrypt.py
@@ -24,7 +24,7 @@ def test_encrypt_key(repository):
public_key = retrieve_public_key(repository)
password = 'SUPER_SECURE_PASSWORD'
encrypted_password = encrypt_key(public_key, password.encode())
- assert isinstance(encrypted_password, bytes)
+ assert isinstance(encrypted_password, str)
def test_password_output():
|
Changed test of bytes to str
|
diff --git a/zk_coordinator.go b/zk_coordinator.go
index <HASH>..<HASH> 100644
--- a/zk_coordinator.go
+++ b/zk_coordinator.go
@@ -673,6 +673,8 @@ func (this *ZookeeperCoordinator) waitForMembersToJoin(barrierPath string, expec
}
// Haven't seen all expected consumers on this barrier path. Watch for changes to the path...
select {
+ case <-stopChan:
+ return
case <-zkMemberJoinedWatcher:
continue
}
|
Added case for stopChan on inner select to break out.
|
diff --git a/anytree/resolver.py b/anytree/resolver.py
index <HASH>..<HASH> 100644
--- a/anytree/resolver.py
+++ b/anytree/resolver.py
@@ -219,7 +219,7 @@ class Resolver(object):
re_pat += "."
else:
re_pat += re.escape(char)
- return re_pat + r'\Z(?ms)'
+ return r'(?ms)' + re_pat + r'\Z'
class ResolverError(RuntimeError):
|
Update resolver.py
Avoid to throw /my/path/resolver.py:<I>: DeprecationWarning: Flags not at the start of the expression 'expr\\Z(?ms)' in python <I>
|
diff --git a/test/spec/index.js b/test/spec/index.js
index <HASH>..<HASH> 100644
--- a/test/spec/index.js
+++ b/test/spec/index.js
@@ -2,6 +2,8 @@ import { expect } from "chai";
import pakit from "../../src/pakit";
describe("pakit test suite", function() {
+ this.timeout(10000);
+
describe("when bundling a module with no dependencies", function() {
var result;
before(function () {
|
bumped test timeout to <I> seconds
|
diff --git a/lib/with_advisory_lock/concern.rb b/lib/with_advisory_lock/concern.rb
index <HASH>..<HASH> 100644
--- a/lib/with_advisory_lock/concern.rb
+++ b/lib/with_advisory_lock/concern.rb
@@ -16,6 +16,10 @@ module WithAdvisoryLock
self.class.with_advisory_lock(lock_name, timeout_seconds, &block)
end
+ def advisory_lock_exists?(lock_name)
+ self.class.advisory_lock_exists?(lock_name)
+ end
+
module ClassMethods
def with_advisory_lock(lock_name, timeout_seconds=nil, &block)
impl = impl_class.new(connection, lock_name, timeout_seconds)
@@ -28,7 +32,7 @@ module WithAdvisoryLock
end
private
-
+
def impl_class
das = WithAdvisoryLock::DatabaseAdapterSupport.new(connection)
impl_class = if das.postgresql?
diff --git a/test/concern_test.rb b/test/concern_test.rb
index <HASH>..<HASH> 100644
--- a/test/concern_test.rb
+++ b/test/concern_test.rb
@@ -12,4 +12,9 @@ describe "with_advisory_lock.concern" do
it "adds advisory_lock_exists? to ActiveRecord classes" do
assert Tag.respond_to?(:advisory_lock_exists?)
end
+
+ it "adds advisory_lock_exists? to ActiveRecord classes" do
+ assert Label.new.respond_to?(:advisory_lock_exists?)
+ end
+
end
|
add advisory_lock_exists? to ActiveRecord instances
|
diff --git a/src/hamster/widgets/activityentry.py b/src/hamster/widgets/activityentry.py
index <HASH>..<HASH> 100644
--- a/src/hamster/widgets/activityentry.py
+++ b/src/hamster/widgets/activityentry.py
@@ -531,7 +531,6 @@ class ActivityEntry():
for category in runtime.storage.get_categories():
category_name = category['name']
category_id = category['id']
- c_iter = self.model.append(["", category_name, "@{}".format(category_name)])
for activity in runtime.storage.get_category_activities(category_id):
activity_name = activity["name"]
text = "{}@{}".format(activity_name, category_name)
|
remove @category lines
They were more disturbing than helpful.
There is already a specific category entry.
|
diff --git a/test/scraped_test.rb b/test/scraped_test.rb
index <HASH>..<HASH> 100644
--- a/test/scraped_test.rb
+++ b/test/scraped_test.rb
@@ -36,6 +36,11 @@ describe Scraped do
decorator FindReplaceDecorator, find: 'Hello', replace: 'Hi!'
end
+ class PageWithMultipleDecorators < PageNoDecorators
+ decorator FindReplaceDecorator, find: 'Hello', replace: 'Hi!'
+ decorator UpcaseDecorator
+ end
+
it 'does not change the response with no decorators' do
PageNoDecorators.new(response: response).body.must_equal 'Hello'
end
@@ -49,5 +54,11 @@ describe Scraped do
response: response
).body.must_equal 'Hi!'
end
+
+ it 'works with multiple decorators' do
+ PageWithMultipleDecorators.new(
+ response: response
+ ).body.must_equal 'HI!'
+ end
end
end
|
Add a test for a page with multiple decorators
|
diff --git a/addon/fold/foldgutter.js b/addon/fold/foldgutter.js
index <HASH>..<HASH> 100644
--- a/addon/fold/foldgutter.js
+++ b/addon/fold/foldgutter.js
@@ -52,7 +52,7 @@
function isFolded(cm, line) {
var marks = cm.findMarksAt(Pos(line));
for (var i = 0; i < marks.length; ++i)
- if (marks[i].__isFold && marks[i].find().from.line == line) return true;
+ if (marks[i].__isFold && marks[i].find().from.line == line) return marks[i];
}
function marker(spec) {
@@ -98,7 +98,9 @@
if (!state) return;
var opts = state.options;
if (gutter != opts.gutter) return;
- cm.foldCode(Pos(line, 0), opts.rangeFinder);
+ var folded = isFolded(cm, line);
+ if (folded) folded.clear();
+ else cm.foldCode(Pos(line, 0), opts.rangeFinder);
}
function onChange(cm) {
|
[foldgutter addon] Make sure unfolding markers work, even when fold range is broken
Closes #<I>
|
diff --git a/sdl/error.go b/sdl/error.go
index <HASH>..<HASH> 100644
--- a/sdl/error.go
+++ b/sdl/error.go
@@ -23,7 +23,11 @@ func (ec ErrorCode) c() C.SDL_errorcode {
// GetError (https://wiki.libsdl.org/SDL_GetError)
func GetError() error {
if err := C.SDL_GetError(); err != nil {
- return errors.New(C.GoString(err))
+ gostr := C.GoString(err)
+ // SDL_GetError returns "an empty string if there hasn't been an error message"
+ if len(gostr) > 0 {
+ return errors.New(gostr)
+ }
}
return nil
}
|
SDL_GetError returns an empty string, not nil, when there are no errors. (#<I>)
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -69,7 +69,6 @@ process.on('exit', function () {
if (cur) {
cur.error(new Error('bench was never ended'))
console.log('\n# fail\n')
- process.exit(1)
return
}
console.log('\n# total ~' + prettyHrtime(total) + ' ' + rawTime(total) + '\n\n# ok\n')
|
do not process exit - messes up logs
|
diff --git a/flatfs.go b/flatfs.go
index <HASH>..<HASH> 100644
--- a/flatfs.go
+++ b/flatfs.go
@@ -40,6 +40,8 @@ var _ datastore.Datastore = (*Datastore)(nil)
type ShardFunc func(string) string
+var IPFS_DEF_SHARD = "v1/next-to-last/2"
+
func New(path string, fun0 string, sync bool) (*Datastore, error) {
fun0 = NormalizeShardFunc(fun0)
|
Add constant for default shard func used by IPFS.
|
diff --git a/models/classes/runner/time/TimerAdjustmentMapInterface.php b/models/classes/runner/time/TimerAdjustmentMapInterface.php
index <HASH>..<HASH> 100644
--- a/models/classes/runner/time/TimerAdjustmentMapInterface.php
+++ b/models/classes/runner/time/TimerAdjustmentMapInterface.php
@@ -50,7 +50,7 @@ interface TimerAdjustmentMapInterface
public function decrease(string $sourceId, string $type, int $seconds): TimerAdjustmentMapInterface;
/**
- * Gets the calculated adjustment in seconds
+ * Gets the calculated total adjustments of all types stored for provided source ID in seconds.
* @param string $sourceId
* @return int
*/
|
Updated method phpdoc description.
|
diff --git a/lib/accounting/booking.rb b/lib/accounting/booking.rb
index <HASH>..<HASH> 100644
--- a/lib/accounting/booking.rb
+++ b/lib/accounting/booking.rb
@@ -1,6 +1,6 @@
module Accounting
class Booking < ActiveRecord::Base
- validates_presence_of :debit_account, :credit_account, :amount, :value_date
+ validates_presence_of :debit_account, :credit_account, :title, :amount, :value_date
belongs_to :debit_account, :foreign_key => 'debit_account_id', :class_name => "Account"
belongs_to :credit_account, :foreign_key => 'credit_account_id', :class_name => "Account"
|
Validate precense of title for bookings.
|
diff --git a/tests/Generators/FileSystemTreeGeneratorTest.php b/tests/Generators/FileSystemTreeGeneratorTest.php
index <HASH>..<HASH> 100644
--- a/tests/Generators/FileSystemTreeGeneratorTest.php
+++ b/tests/Generators/FileSystemTreeGeneratorTest.php
@@ -14,7 +14,6 @@ class FileSystemTreeGeneratorTest extends \PHPUnit_Framework_TestCase
private function getGenerator()
{
- $fileSystem = $this->getMock('Illuminate\Filesystem\Filesystem');
$generator = new FileSystemTreeGenerator($fileSystem);
return $generator;
|
Updated test to reflect Filesystem contract
|
diff --git a/kubernetes/src/main/java/io/kubernetes/client/custom/IntOrString.java b/kubernetes/src/main/java/io/kubernetes/client/custom/IntOrString.java
index <HASH>..<HASH> 100644
--- a/kubernetes/src/main/java/io/kubernetes/client/custom/IntOrString.java
+++ b/kubernetes/src/main/java/io/kubernetes/client/custom/IntOrString.java
@@ -44,6 +44,11 @@ public class IntOrString {
return intValue;
}
+ @Override
+ public String toString() {
+ return (isInt ? String.valueOf(intValue) : strValue);
+ }
+
public static class IntOrStringAdapter extends TypeAdapter<IntOrString> {
@Override
public void write(JsonWriter jsonWriter, IntOrString intOrString) throws IOException {
|
adding toString method to IntOrString
|
diff --git a/lib/Models/GeoJsonCatalogItem.js b/lib/Models/GeoJsonCatalogItem.js
index <HASH>..<HASH> 100644
--- a/lib/Models/GeoJsonCatalogItem.js
+++ b/lib/Models/GeoJsonCatalogItem.js
@@ -805,6 +805,7 @@ function filterArray(pts, func) {
function updateOpacity(item) {
const entities = item.dataSource.entities.values;
+ item.dataSource.entities.suspendEvents();
for (var i = 0; i < entities.length; i++) {
const entity = entities[i];
@@ -838,6 +839,7 @@ function updateOpacity(item) {
.withAlpha(item.opacity);
}
}
+ item.dataSource.entities.resumeEvents();
item.terria.currentViewer.notifyRepaintRequired();
}
|
suspend and resume events on setting geojson opacity
|
diff --git a/spec/seahorse/client/plugin_spec.rb b/spec/seahorse/client/plugin_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/seahorse/client/plugin_spec.rb
+++ b/spec/seahorse/client/plugin_spec.rb
@@ -18,7 +18,9 @@ module Seahorse
describe Plugin do
let(:handlers) { HandlerList.new }
- let(:config) { Configuration.new}
+
+ let(:config) { Configuration.new }
+
let(:plugin_class) { Class.new(Plugin) }
describe '#add_options' do
|
Updated a few specs helpers to use let.
|
diff --git a/test/unit/index.js b/test/unit/index.js
index <HASH>..<HASH> 100644
--- a/test/unit/index.js
+++ b/test/unit/index.js
@@ -1,3 +1,17 @@
+// mock passive event listener support and upsupport
+(() => {
+ const originAddListener = window.addEventListener;
+ let flag;
+
+ window.addEventListener = (...args) => {
+ // try to read passive property and only read once time if it is accessible
+ if (!flag && args[2] && args[2].passive) {
+ flag = false;
+ }
+ originAddListener.apply(window, args);
+ };
+})();
+
const testsContext = require.context('./specs', true, /\.spec$/);
testsContext.keys().forEach(testsContext);
|
Improve unit tests for passive event support logic
|
diff --git a/spec/unit/resource/api1600/c7000/volume_attachment_spec.rb b/spec/unit/resource/api1600/c7000/volume_attachment_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/resource/api1600/c7000/volume_attachment_spec.rb
+++ b/spec/unit/resource/api1600/c7000/volume_attachment_spec.rb
@@ -1,3 +1,14 @@
+# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# You may not use this file except in compliance with the License.
+# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed
+# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+# CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+
require 'spec_helper'
RSpec.describe OneviewSDK::API1600::C7000::VolumeAttachment do
|
Update volume_attachment_spec.rb
|
diff --git a/js/jquery.mapael.js b/js/jquery.mapael.js
index <HASH>..<HASH> 100644
--- a/js/jquery.mapael.js
+++ b/js/jquery.mapael.js
@@ -490,6 +490,16 @@
if (typeof opt.mapOptions === "object") {
if (opt.replaceOptions === true) options = $.extend(true, {}, defaultOptions, opt.mapOptions);
else $.extend(true, options, opt.mapOptions);
+
+ // IF we update areas, plots or legend, then reset all legend state to "show"
+ if (typeof opt.mapOptions.areas != "undefined" || typeof opt.mapOptions.plots != "undefined" || typeof opt.mapOptions.legend != "undefined") {
+ $("[data-type='elem']", $container).each(function (id, elem) {
+ if ($(elem).attr('data-hidden') === "1") {
+ // Toggle state of element by clicking
+ $(elem).trigger('click', [false, animDuration]);
+ }
+ });
+ }
}
// Delete plots by name if deletePlotKeys is array
|
Update event: reset legend state if areas, plots or legend is updated
|
diff --git a/formBinder.go b/formBinder.go
index <HASH>..<HASH> 100644
--- a/formBinder.go
+++ b/formBinder.go
@@ -458,7 +458,15 @@ func (dec *Decoder) decode() error {
case reflect.Struct:
switch dec.curr.Interface().(type) {
case time.Time:
- t, err := time.Parse("2006-01-02", dec.values[0])
+ d := dec.values[0]
+ var t time.Time
+ var err error
+ // Parsing RFC3339 is ~3 times more expensive than "2006-01-02", check first if it complies, then attempt best route
+ if len(d) > 10 && d[10] == 'T' {
+ t, err = time.Parse(time.RFC3339, d)
+ } else {
+ t, err = time.Parse("2006-01-02", d)
+ }
if err != nil {
return newError(fmt.Errorf("the value of field \"%v\" in path \"%v\" is not a valid datetime", dec.field, dec.path))
}
|
Added ability to parse ISO <I> date format on formBind.
|
diff --git a/packages/desktop/src/main/cli.js b/packages/desktop/src/main/cli.js
index <HASH>..<HASH> 100644
--- a/packages/desktop/src/main/cli.js
+++ b/packages/desktop/src/main/cli.js
@@ -1,5 +1,5 @@
-import { Observable } from "rxjs/Observable";
-import { merge, catchError, mergeMap } from "rxjs/operators";
+import { catchError, mergeMap } from "rxjs/operators";
+import { merge } from "rxjs/observable/merge";
import { join } from "path";
import { dialog } from "electron";
@@ -34,12 +34,10 @@ const setWinPathObservable = (exe, rootDir, binDir) => {
.filter((item, index, array) => array.indexOf(item) === index);
env.push(binDir);
const envPath = env.join(";");
- return Observable.pipe(
- merge(
- spawn("SETX", ["PATH", `${envPath}`]),
- spawn("SETX", ["NTERACT_EXE", exe]),
- spawn("SETX", ["NTERACT_DIR", rootDir])
- )
+ return merge(
+ spawn("SETX", ["PATH", `${envPath}`]),
+ spawn("SETX", ["NTERACT_EXE", exe]),
+ spawn("SETX", ["NTERACT_DIR", rootDir])
);
};
|
Fix windows CLI (#<I>)
|
diff --git a/Views/backend/plentymarkets/view/log/grid.js b/Views/backend/plentymarkets/view/log/grid.js
index <HASH>..<HASH> 100644
--- a/Views/backend/plentymarkets/view/log/grid.js
+++ b/Views/backend/plentymarkets/view/log/grid.js
@@ -87,7 +87,17 @@ Ext.define('Shopware.apps.Plentymarkets.view.log.Grid', {
}, {
header: 'Meldung',
dataIndex: 'message',
- flex: 7
+ flex: 7,
+ listeners: {
+ click: function(a, b, c, d, e, record, g)
+ {
+ Ext.Msg.show({
+ title: '#' + record.get('id') + ' – ' + record.get('identifier'),
+ msg: Ext.util.Format.nl2br(record.get('message')),
+ buttons: Ext.Msg.OK,
+ });
+ }
+ }
}];
me.callParent(arguments);
|
UPDATE Log (message overlay)
|
diff --git a/lib/Resque/Resque.php b/lib/Resque/Resque.php
index <HASH>..<HASH> 100644
--- a/lib/Resque/Resque.php
+++ b/lib/Resque/Resque.php
@@ -136,7 +136,8 @@ abstract class Resque
));
if ($trackStatus) {
- Status::create($id);
+ $status = new Status($id, $this);
+ $status->create();
}
return $id;
|
Main resque class support for status tracking fixed
|
diff --git a/lib/abort_if.rb b/lib/abort_if.rb
index <HASH>..<HASH> 100644
--- a/lib/abort_if.rb
+++ b/lib/abort_if.rb
@@ -51,10 +51,13 @@ module AbortIf
#
# @note The abort_if style methods don't interpolate arguments to
# msg as the Assert module methods do
+ #
+ # @note When rescuing AbortIf::Exit, the msg will be passed if you
+ # want to display it in the rescue block
def abort_if test, msg="Fatal error"
if test
logger.fatal msg
- raise Exit
+ raise Exit, msg
end
end
diff --git a/spec/abort_if_spec.rb b/spec/abort_if_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/abort_if_spec.rb
+++ b/spec/abort_if_spec.rb
@@ -69,9 +69,11 @@ describe AbortIf do
expect(klass.abort_if false_test).to be nil
end
- it "raises AbortIf::Exit if truthy" do
+ it "raises AbortIf::Exit with msg if truthy" do
test = hash.has_key? :a
- expect { klass.abort_if true_test }.to raise_error AbortIf::Exit
+ msg = "Teehee"
+ expect { klass.abort_if true_test, msg }.
+ to raise_error AbortIf::Exit, msg
end
include_examples "for logging a fatal error", :abort_if, true
|
raise AbortIf::Exit with message for rescuing
|
diff --git a/src/Collection/CollectionTrait.php b/src/Collection/CollectionTrait.php
index <HASH>..<HASH> 100644
--- a/src/Collection/CollectionTrait.php
+++ b/src/Collection/CollectionTrait.php
@@ -49,7 +49,7 @@ trait CollectionTrait
* type of returned collection interface
*
* @param mixed $args,.. Constructor arguments.
- * @return CollectionInterface
+ * @return \Cake\Collection\CollectionInterface
*/
protected function newCollection(...$args)
{
|
Collection trait: provide a FQCN in docblock
|
diff --git a/src/core.js b/src/core.js
index <HASH>..<HASH> 100644
--- a/src/core.js
+++ b/src/core.js
@@ -289,6 +289,7 @@
for( var j = index; j < elements.length; j++ ){
var jid = elements[j]._private.data.id;
id2index[ jid ]--;
+ elements[j]._private.index--;
}
}
}
|
Issue with edge hit detection when removing/adding edges with mappers (ele index out of sync) #<I>
|
diff --git a/zinnia/__init__.py b/zinnia/__init__.py
index <HASH>..<HASH> 100644
--- a/zinnia/__init__.py
+++ b/zinnia/__init__.py
@@ -1,5 +1,5 @@
"""Zinnia"""
-__version__ = '0.14.1'
+__version__ = '0.15.dev'
__license__ = 'BSD License'
__author__ = 'Fantomas42'
|
Bumping to version <I>.dev
|
diff --git a/lib/congress/version.rb b/lib/congress/version.rb
index <HASH>..<HASH> 100644
--- a/lib/congress/version.rb
+++ b/lib/congress/version.rb
@@ -1,3 +1,3 @@
module Congress
- VERSION = "0.0.3"
+ VERSION = "0.0.4"
end
|
Bump gem version to <I>
|
diff --git a/wrapper/wrapper.go b/wrapper/wrapper.go
index <HASH>..<HASH> 100644
--- a/wrapper/wrapper.go
+++ b/wrapper/wrapper.go
@@ -229,6 +229,10 @@ OUTER:
}
close(pkgChan)
wg.Wait()
+ select {
+ case err = <-errChan:
+ default:
+ }
return err
}
|
wrapper: try to notice the last error
After executing all commands, make one last check on the error
channel, to see whether the last command errored.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.