diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
---|---|
diff --git a/test/unit/sandbox-libraries/pm.test.js b/test/unit/sandbox-libraries/pm.test.js
index <HASH>..<HASH> 100644
--- a/test/unit/sandbox-libraries/pm.test.js
+++ b/test/unit/sandbox-libraries/pm.test.js
@@ -497,7 +497,6 @@ describe('sandbox library - pm api', function () {
context.execute(`
var assert = require('assert');
assert.strictEqual(typeof pm.cookies.jar, 'function');
- assert.strictEqual(pm.cookies.jar().constructor.name, 'PostmanCookieJar');
`, {
context: { cookies: [] }
}, done);
|
Test: do not assert for private class name
|
diff --git a/lib/taps/data_stream.rb b/lib/taps/data_stream.rb
index <HASH>..<HASH> 100644
--- a/lib/taps/data_stream.rb
+++ b/lib/taps/data_stream.rb
@@ -167,7 +167,7 @@ class DataStream
log.debug "DataStream#fetch_from_resource state -> #{state.inspect}"
state[:chunksize] = Taps::Utils.calculate_chunksize(state[:chunksize]) do |c|
state[:chunksize] = c.to_i
- res = resource.post({:state => OkJson.encode(self)}, headers)
+ res = resource.post({:state => OkJson.encode(self.to_hash)}, headers)
end
begin
|
need to encode self.to_hash specifically
|
diff --git a/upload/admin/model/marketing/marketing.php b/upload/admin/model/marketing/marketing.php
index <HASH>..<HASH> 100644
--- a/upload/admin/model/marketing/marketing.php
+++ b/upload/admin/model/marketing/marketing.php
@@ -43,7 +43,7 @@ class ModelMarketingMarketing extends Model {
$implode[] = "o.order_status_id = '" . (int)$order_status_id . "'";
}
- $sql = "SELECT *, (SELECT COUNT(*) FROM `" . DB_PREFIX . "order` o WHERE o.order_status_id = '" . (int)$this->config->get('config_complete_status_id') . "' AND o.marketing_id = m.marketing_id) AS orders FROM " . DB_PREFIX . "marketing m";
+ $sql = "SELECT *, (SELECT COUNT(*) FROM `" . DB_PREFIX . "order` o WHERE (" . implode(" OR ", $implode) . ") AND o.marketing_id = m.marketing_id) AS orders FROM " . DB_PREFIX . "marketing m";
$implode = array();
@@ -123,4 +123,4 @@ class ModelMarketingMarketing extends Model {
return $query->row['total'];
}
-}
\ No newline at end of file
+}
|
Marketing Tracking doesn't count orders
|
diff --git a/lib/buckaruby/version.rb b/lib/buckaruby/version.rb
index <HASH>..<HASH> 100644
--- a/lib/buckaruby/version.rb
+++ b/lib/buckaruby/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Buckaruby
- VERSION = "1.2.0beta"
+ VERSION = "1.2.0"
end
|
Update version to <I>.
|
diff --git a/main/app/Routing/ApiLoader.php b/main/app/Routing/ApiLoader.php
index <HASH>..<HASH> 100644
--- a/main/app/Routing/ApiLoader.php
+++ b/main/app/Routing/ApiLoader.php
@@ -228,11 +228,13 @@ class ApiLoader extends Loader
}
}
+ $mapping = array_merge($defaults, self::DEFAULT_MAP);
+
foreach ($ignore as $ignored) {
- unset($defaults[$ignored]);
+ unset($mapping[$ignored]);
}
- return array_merge($defaults, self::DEFAULT_MAP);
+ return $mapping;
}
//@see http://stackoverflow.com/questions/1589468/convert-camelcase-to-under-score-case-in-php-autoload
|
Update ApiLoader.php (#<I>)
better in that order
|
diff --git a/comparer/comparer_test.go b/comparer/comparer_test.go
index <HASH>..<HASH> 100644
--- a/comparer/comparer_test.go
+++ b/comparer/comparer_test.go
@@ -181,3 +181,37 @@ func TestDetectsModifiedContent(t *testing.T) {
3,
)
}
+
+func TestDetectsPartialBlockAtEnd(t *testing.T) {
+ const BLOCK_SIZE = 4
+ var err error
+ const A = "abcdefghijklmnopqrstuvwxyz"
+ const ORIGINAL_STRING = A
+ const MODIFIED_STRING = A
+
+ originalFileContent := bytes.NewBufferString(ORIGINAL_STRING)
+ generator := filechecksum.NewFileChecksumGenerator(BLOCK_SIZE)
+ _, reference, err := indexbuilder.BuildChecksumIndex(generator, originalFileContent)
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ modifiedContent := bytes.NewBufferString(MODIFIED_STRING)
+
+ results := FindMatchingBlocks(
+ modifiedContent,
+ 0,
+ generator,
+ reference,
+ )
+
+ CheckResults(
+ t,
+ ORIGINAL_STRING,
+ MODIFIED_STRING,
+ results,
+ BLOCK_SIZE,
+ 7, // [abcd efgh ijkl mnop qrst uvwx yz]
+ )
+}
|
Adding test for partial trailing blocks in the comparer
Expected failure for now
|
diff --git a/vertica_python/vertica/connection.py b/vertica_python/vertica/connection.py
index <HASH>..<HASH> 100644
--- a/vertica_python/vertica/connection.py
+++ b/vertica_python/vertica/connection.py
@@ -31,7 +31,7 @@ class Connection(object):
self._cursor = Cursor(self, None)
self.options.setdefault('port', 5433)
self.options.setdefault('read_timeout', 600)
- self.boot_connection()
+ self.startup_connection()
def __enter__(self):
return self
@@ -166,11 +166,7 @@ class Connection(object):
def reset_connection(self):
self.close()
- self.boot_connection()
-
- def boot_connection(self):
self.startup_connection()
- self.initialize_connection()
def read_message(self):
try:
@@ -266,12 +262,3 @@ class Connection(object):
if isinstance(message, messages.ReadyForQuery):
break
-
- def initialize_connection(self):
- if self.options.get('search_path') is not None:
- self.query("SET SEARCH_PATH TO {0}".format(self.options['search_path']))
- if self.options.get('role') is not None:
- self.query("SET ROLE {0}".format(self.options['role']))
-
-# if self.options.get('interruptable'):
-# self.session_id = self.query("SELECT session_id FROM v_monitor.current_session").the_value()
|
Remove calls to unused `query` function in `Connection` class
There were some calls to a nonexistent function `query` in the
`initialize_connection` function of the `Connection` class. These
appear to be artifacts from when porting the Ruby codebase.
The queries being made were related to setting a role for the current
session, as well as setting schema search path.
|
diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordResource.java b/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordResource.java
index <HASH>..<HASH> 100644
--- a/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordResource.java
+++ b/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordResource.java
@@ -648,7 +648,7 @@ public class OverlordResource
task.getDataSource(),
null,
null,
- DateTimes.EPOCH,
+ task.getCreatedTime(),
DateTimes.EPOCH,
TaskLocation.unknown()
));
|
Add the correct createdTime to waiting tasks (#<I>)
|
diff --git a/system/Filters/CSRF.php b/system/Filters/CSRF.php
index <HASH>..<HASH> 100644
--- a/system/Filters/CSRF.php
+++ b/system/Filters/CSRF.php
@@ -72,7 +72,7 @@ class CSRF implements FilterInterface
* @param array|null $arguments
*
* @return mixed
- * @throws \Exception
+ * @throws \CodeIgniter\Security\Exceptions\SecurityException
*/
public function before(RequestInterface $request, $arguments = null)
{
|
Phpstorm keeps change the @throws doc
|
diff --git a/lib/tjbot.js b/lib/tjbot.js
index <HASH>..<HASH> 100644
--- a/lib/tjbot.js
+++ b/lib/tjbot.js
@@ -142,7 +142,7 @@ TJBot.prototype.services = ['conversation', 'language_translator', 'speech_to_te
TJBot.prototype.defaultConfiguration = {
verboseLogging: false,
robot: {
- gender: 'male' // see TJBot.prototype.genders
+ gender: 'male', // see TJBot.prototype.genders
name: 'TJ'
},
listen: {
|
again with the comma!
|
diff --git a/build/rollup.config.min.js b/build/rollup.config.min.js
index <HASH>..<HASH> 100644
--- a/build/rollup.config.min.js
+++ b/build/rollup.config.min.js
@@ -1,8 +1,12 @@
import base from './rollup.config.base';
import uglify from 'rollup-plugin-uglify';
+import replace from 'rollup-plugin-replace';
const {name} = require('../package.json');
import {camelize} from 'toxic-utils';
const config = base('min');
+config.plugins.unshift(replace({
+ 'process.env.NODE_ENV': '"production"'
+}));
config.plugins.push(uglify());
export default Object.assign(config, {
format: 'umd',
|
[updare] update build for min
what:
why:
how:
|
diff --git a/better_apidoc.py b/better_apidoc.py
index <HASH>..<HASH> 100644
--- a/better_apidoc.py
+++ b/better_apidoc.py
@@ -263,7 +263,7 @@ def _get_mod_ns(name, fullname, includeprivate):
'name': name, 'fullname': fullname, 'members': [], 'functions': [],
'classes': [], 'exceptions': [], 'subpackages': [], 'submodules': [],
'all_refs': [], 'members_imports': [], 'members_imports_refs': [],
- 'data': []}
+ 'data': [], 'doc':None}
p = 0
if includeprivate:
p = 1
@@ -276,6 +276,7 @@ def _get_mod_ns(name, fullname, includeprivate):
ns['members_imports'] = _get_members(mod, include_imported=True)[p]
ns['members_imports_refs'] = _get_members(mod, include_imported=True, as_refs=True)[p]
ns['data'] = _get_members(mod, typ='data')[p]
+ ns['doc'] = mod.__doc__
return ns
|
Added documentation to package and module as 'doc'
|
diff --git a/test/tests.es6.js b/test/tests.es6.js
index <HASH>..<HASH> 100644
--- a/test/tests.es6.js
+++ b/test/tests.es6.js
@@ -105,3 +105,23 @@ describe("collatz generator", function() {
check(gen(82), eightyTwo, 110);
});
});
+
+describe("try-catch generator", function() {
+ function *gen(x) {
+ yield 0;
+ try {
+ yield 1;
+ if (x % 2 === 0)
+ throw 2;
+ yield x;
+ } catch (x) {
+ yield x;
+ }
+ yield 3;
+ }
+
+ it("should catch exceptions properly", function() {
+ check(gen(4), [0, 1, 2, 3]);
+ check(gen(5), [0, 1, 5, 3]);
+ });
+});
|
Add a test of try-catch statements.
|
diff --git a/zarr/core.py b/zarr/core.py
index <HASH>..<HASH> 100644
--- a/zarr/core.py
+++ b/zarr/core.py
@@ -1840,6 +1840,19 @@ class Array(object):
def hexdigest(self, hashname="sha1"):
"""
Compute a checksum for the data. Default uses sha1 for speed.
+
+ Examples
+ --------
+ >>> import zarr
+ >>> z = zarr.empty(shape=(10000, 10000), chunks=(1000, 1000))
+ >>> z.hexdigest()
+ '041f90bc7a571452af4f850a8ca2c6cddfa8a1ac'
+ >>> z = zarr.zeros(shape=(10000, 10000), chunks=(1000, 1000))
+ >>> z.hexdigest()
+ '7162d416d26a68063b66ed1f30e0a866e4abed60'
+ >>> z = zarr.zeros(shape=(10000, 10000), dtype="u1", chunks=(1000, 1000))
+ >>> z.hexdigest()
+ 'cb387af37410ae5a3222e893cf3373e4e4f22816'
"""
h = hashlib.new(hashname)
|
Provide a couple examples of hexdigest
|
diff --git a/lib/__init__.php b/lib/__init__.php
index <HASH>..<HASH> 100755
--- a/lib/__init__.php
+++ b/lib/__init__.php
@@ -73,7 +73,7 @@ require_once('support/events/EventFiringWebElement.php');
// touch
require_once('interactions/WebDriverTouchScreen.php');
-require_once('remote/RemoteTouch.php');
+require_once('remote/RemoteTouchScreen.php');
require_once('interactions/WebDriverTouchActions.php');
require_once('interactions/touch/WebDriverTouchAction.php');
require_once('interactions/touch/WebDriverDoubleTapAction.php');
@@ -85,4 +85,4 @@ require_once('interactions/touch/WebDriverMoveAction.php');
require_once('interactions/touch/WebDriverScrollAction.php');
require_once('interactions/touch/WebDriverScrollFromElementAction.php');
require_once('interactions/touch/WebDriverTapAction.php');
-require_once('interactions/touch/WebDriverUpAction.php');
\ No newline at end of file
+require_once('interactions/touch/WebDriverUpAction.php');
|
Fixed incorrect RemoteTouchScreen.php filename in __init__.php on line <I>
|
diff --git a/src/Authenticator.php b/src/Authenticator.php
index <HASH>..<HASH> 100644
--- a/src/Authenticator.php
+++ b/src/Authenticator.php
@@ -12,7 +12,7 @@ use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
use Symfony\Component\HttpFoundation\Response;
-use Symfony\Component\Security\Core\User\UserChecker;
+use Symfony\Component\Security\Core\User\UserCheckerInterface;
class Authenticator implements SimplePreAuthenticatorInterface, AuthenticationFailureHandlerInterface
{
@@ -20,10 +20,10 @@ class Authenticator implements SimplePreAuthenticatorInterface, AuthenticationFa
private $coder;
/**
- * @param UserChecker $userChecker
- * @param Coder $coder
+ * @param UserCheckerInterface $userChecker
+ * @param Coder $coder
*/
- public function __construct(UserChecker $userChecker, Coder $coder)
+ public function __construct(UserCheckerInterface $userChecker, Coder $coder)
{
$this->userChecker = $userChecker;
$this->coder = $coder;
|
Typehint the interface rather than the implemenation
|
diff --git a/lib/heroics/client_generator.rb b/lib/heroics/client_generator.rb
index <HASH>..<HASH> 100644
--- a/lib/heroics/client_generator.rb
+++ b/lib/heroics/client_generator.rb
@@ -43,7 +43,7 @@ module Heroics
default_headers: options.fetch(:default_headers, {}),
cache: options.fetch(:cache, {}),
description: schema.description,
- schema: MultiJson.dump(schema.schema),
+ schema: MultiJson.dump(schema.schema, pretty:true),
resources: resources
}
end
|
generate client with pretty-printed schema, mostly for saner diffs
|
diff --git a/components/icon/icon.test.js b/components/icon/icon.test.js
index <HASH>..<HASH> 100644
--- a/components/icon/icon.test.js
+++ b/components/icon/icon.test.js
@@ -1,12 +1,11 @@
describe('Icon', function () {
var $ = require('jquery');
- var React = require('react');
var TestUtils = require('react-addons-test-utils');
var Icon = require('./icon');
var expandIcon = require('icon/source/expand.svg');
beforeEach(function () {
- this.icon = TestUtils.renderIntoDocument(new Icon({
+ this.icon = TestUtils.renderIntoDocument(Icon.factory({
glyph: expandIcon
}));
});
|
Fix icons test examples after merge
Former-commit-id: <I>b<I>e<I>ad<I>c<I>fbcce<I>dc<I>b
|
diff --git a/src/Wrep/Notificare/Apns/Certificate.php b/src/Wrep/Notificare/Apns/Certificate.php
index <HASH>..<HASH> 100644
--- a/src/Wrep/Notificare/Apns/Certificate.php
+++ b/src/Wrep/Notificare/Apns/Certificate.php
@@ -38,7 +38,7 @@ class Certificate
{
// Check if the given PEM file does exists and expand the path
$absolutePemFilePath = realpath($pemFile);
- if (false === $absolutePemFilePath) {
+ if (!is_file($absolutePemFilePath)) {
throw new \InvalidArgumentException('Could not find the given PEM file "' . $pemFile . '".');
}
|
Whoops, broke the build with a wonky certificate check.
|
diff --git a/api/server/version.go b/api/server/version.go
index <HASH>..<HASH> 100644
--- a/api/server/version.go
+++ b/api/server/version.go
@@ -7,7 +7,7 @@ import (
)
// Version of IronFunctions
-var Version = "0.1.49"
+var Version = "0.1.50"
func handleVersion(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"version": Version})
|
functions: <I> release [skip ci]
|
diff --git a/fermipy/diffuse/defaults.py b/fermipy/diffuse/defaults.py
index <HASH>..<HASH> 100644
--- a/fermipy/diffuse/defaults.py
+++ b/fermipy/diffuse/defaults.py
@@ -16,7 +16,7 @@ diffuse = {
'hpx_order_ccube': (9, 'Maximum HEALPIX order for binning counts data.', int),
'hpx_order_expcube': (6, 'Maximum HEALPIX order for exposure cubes.', int),
'hpx_order_fitting': (7, 'Maximum HEALPIX order for model fitting.', int),
- 'mktimefilter': ('nosm', 'Key for gtmktime selection', str),
+ 'mktimefilter': (None, 'Key for gtmktime selection', str),
'do_ltsum': (False, 'Run gtltsum on inputs', bool),
'make_xml': (True, 'Make XML files.', bool),
'dry_run': (False, 'Print commands but do not run them', bool),
|
Changed default for mktimefilter to None
|
diff --git a/src/test/java/org/springframework/retry/support/RetryTemplateBuilderTest.java b/src/test/java/org/springframework/retry/support/RetryTemplateBuilderTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/springframework/retry/support/RetryTemplateBuilderTest.java
+++ b/src/test/java/org/springframework/retry/support/RetryTemplateBuilderTest.java
@@ -163,9 +163,8 @@ public class RetryTemplateBuilderTest {
@Test(expected = IllegalArgumentException.class)
public void testFailOnNotationsMix() {
- RetryTemplate.builder()
- .retryOn(Collections.<Class<? extends Throwable>>singletonList(IOException.class))
- .notRetryOn(Collections.<Class<? extends Throwable>>singletonList(OutOfMemoryError.class));
+ RetryTemplate.builder().retryOn(Collections.<Class<? extends Throwable>>singletonList(IOException.class))
+ .notRetryOn(Collections.<Class<? extends Throwable>>singletonList(OutOfMemoryError.class));
}
/* ---------------- BackOff -------------- */
|
Fix indents in the RetryTemplateBuilderTest
|
diff --git a/pyjoin/__init__.py b/pyjoin/__init__.py
index <HASH>..<HASH> 100644
--- a/pyjoin/__init__.py
+++ b/pyjoin/__init__.py
@@ -148,3 +148,10 @@ def send_sms(api_key, sms_number, sms_text, device_id=None, device_ids=None, dev
if device_names: req_url += "&deviceNames=" + device_names
requests.get(req_url)
+def set_mediavolume(api_key, mediavolume, device_id=None, device_ids=None, device_names=None):
+ if device_id is None and device_ids is None and device_names is None: return False
+ req_url = SEND_URL + api_key + "&mediaVolume=" + mediavolume
+ if device_id: req_url += "&deviceId=" + device_id
+ if device_ids: req_url += "&deviceIds=" + device_ids
+ if device_names: req_url += "&deviceNames=" + device_names
+ requests.get(req_url)
|
Update __init__.py
Added a set_mediavolume() call to be able to set the volume of a device before sending it a TTS notification. Volume on my GSM is normally 0, so I want to be able to set it to 5 or <I>, then send a TTS notification and eventually set it back to 0.
|
diff --git a/datalad_service/handlers/draft.py b/datalad_service/handlers/draft.py
index <HASH>..<HASH> 100644
--- a/datalad_service/handlers/draft.py
+++ b/datalad_service/handlers/draft.py
@@ -31,6 +31,8 @@ class DraftResource(object):
'files': None, 'name': name, 'email': email})
commit.wait()
if not commit.failed():
+ # Attach the commit hash to response
+ media_dict['ref'] = commit.get()
resp.media = media_dict
resp.status = falcon.HTTP_OK
else:
|
Add missing ref to commit_files reponse.
|
diff --git a/packages/react/src/components/DatePicker/DatePicker.js b/packages/react/src/components/DatePicker/DatePicker.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/DatePicker/DatePicker.js
+++ b/packages/react/src/components/DatePicker/DatePicker.js
@@ -329,6 +329,7 @@ export default class DatePicker extends Component {
onValueUpdate: onHook,
});
this.addKeyboardEvents(this.cal);
+ this.addRoleAttributeToDialog();
}
}
}
@@ -386,6 +387,22 @@ export default class DatePicker extends Component {
}
};
+ /**
+ * Flatpickr's calendar dialog is not rendered in a landmark causing an
+ * error with IBM Equal Access Accessibility Checker so we add an aria
+ * role to the container div.
+ */
+ addRoleAttributeToDialog = () => {
+ if (this.inputField) {
+ this.cal.calendarContainer.setAttribute('role', 'region');
+ // IBM EAAC requires an aria-label on a role='region'
+ this.cal.calendarContainer.setAttribute(
+ 'aria-label',
+ 'calendar-container'
+ );
+ }
+ };
+
addKeyboardEvents = (cal) => {
if (this.inputField) {
this.inputField.addEventListener('keydown', (e) => {
|
fix(Datepicker): add aria role to Flatpickr dialog (#<I>)
|
diff --git a/gridData/tests/test_ccp4.py b/gridData/tests/test_ccp4.py
index <HASH>..<HASH> 100644
--- a/gridData/tests/test_ccp4.py
+++ b/gridData/tests/test_ccp4.py
@@ -60,7 +60,7 @@ def ccp4data():
('nlabl', 1),
('label', ' Map from fft '),
])
-def test_ccp4_integer_reading(ccp4data, name, value):
+def test_ccp4_read_header(ccp4data, name, value):
if type(value) is float:
assert_almost_equal(ccp4data.header[name], value, decimal=6)
else:
|
better name for testing reading of CCP4 header
|
diff --git a/spec/support/http_library_adapters.rb b/spec/support/http_library_adapters.rb
index <HASH>..<HASH> 100644
--- a/spec/support/http_library_adapters.rb
+++ b/spec/support/http_library_adapters.rb
@@ -86,11 +86,11 @@ HTTP_LIBRARY_ADAPTERS['curb'] = Module.new do
def make_http_request(method, url, body = nil, headers = {})
Curl::Easy.new(url) do |c|
c.headers = headers
- case method
- when :get then c.http_get
- when :post then c.http_post(body)
- when :put then c.http_put(body)
- when :delete then c.http_delete
+
+ if [:post, :put].include?(method)
+ c.send("http_#{method}", body)
+ else
+ c.send("http_#{method}")
end
end
end
|
Fixed curb http adapter module so it supports all HTTP methods.
|
diff --git a/zipline/testing/predicates.py b/zipline/testing/predicates.py
index <HASH>..<HASH> 100644
--- a/zipline/testing/predicates.py
+++ b/zipline/testing/predicates.py
@@ -100,6 +100,8 @@ def keywords(func):
"""
if isinstance(func, type):
return keywords(func.__init__)
+ elif isinstance(func, partial):
+ return keywords(func.func)
return inspect.getargspec(func).args
|
BUG: Allow partials in assert_equal.
|
diff --git a/lib/synapse/service_watcher/docker.rb b/lib/synapse/service_watcher/docker.rb
index <HASH>..<HASH> 100644
--- a/lib/synapse/service_watcher/docker.rb
+++ b/lib/synapse/service_watcher/docker.rb
@@ -35,7 +35,7 @@ module Synapse
sleep_until_next_check(start)
rescue => e
- log.warn "Error in watcher thread: #{e.inspect}"
+ log.warn "synapse: error in watcher thread: #{e.inspect}"
log.warn e.backtrace
end
end
@@ -54,7 +54,7 @@ module Synapse
begin
cnts = Docker::Util.parse_json(Docker.connection.get('/containers/json', {}))
rescue => e
- log.warn "Error polling docker host #{Docker.url}: #{e.inspect}"
+ log.warn "synapse: error polling docker host #{Docker.url}: #{e.inspect}"
next []
end
# "Ports" comes through (as of 0.6.5) as a string like "0.0.0.0:49153->6379/tcp, 0.0.0.0:49153->6379/tcp"
@@ -81,7 +81,7 @@ module Synapse
end
backends.flatten
rescue => e
- log.warn "Error while polling for containers: #{e.inspect}"
+ log.warn "synapse: error while polling for containers: #{e.inspect}"
[]
end
|
docker watcher: follow log convention
|
diff --git a/QuickBooks/Encryption/Aes.php b/QuickBooks/Encryption/Aes.php
index <HASH>..<HASH> 100755
--- a/QuickBooks/Encryption/Aes.php
+++ b/QuickBooks/Encryption/Aes.php
@@ -20,7 +20,7 @@ QuickBooks_Loader::load('/QuickBooks/Encryption.php');
/**
*
*/
-class QuickBooks_Encryption_AES extends QuickBooks_Encryption
+class QuickBooks_Encryption_Aes extends QuickBooks_Encryption
{
static function encrypt($key, $plain, $salt = null)
{
@@ -84,4 +84,4 @@ class QuickBooks_Encryption_AES extends QuickBooks_Encryption
return $decrypted;
}
-}
\ No newline at end of file
+}
|
QuickBooks_Encryption_Aes instead of QuickBooks_Encryption_AES. Remainder of PR <URL>
|
diff --git a/code/macroeco/ssad.py b/code/macroeco/ssad.py
index <HASH>..<HASH> 100644
--- a/code/macroeco/ssad.py
+++ b/code/macroeco/ssad.py
@@ -118,8 +118,13 @@ def nbd(n, N, a, k, summary = False):
p = float(1) / (mu / float(k) + 1) # See Bolker book Chapt 4
pmf = scipy.stats.nbinom.pmf(n, k, p)
- if summary: return -sum(np.log(pmf))
- else: return pmf
+ if summary:
+ if (pmf == 0).any():
+ return np.nan
+ else:
+ return -sum(np.log(pmf))
+ else:
+ return pmf
def fnbd(n, N, a, k, summary = False):
@@ -164,8 +169,13 @@ def fnbd(n, N, a, k, summary = False):
for i in xrange(0,np.size(n)):
pmf[i] = ln_L(n[i], N, a, k)
- if summary: return -sum(pmf)
- else: return np.exp(pmf)
+ if summary:
+ if (pmf == 0).any():
+ return np.nan
+ else:
+ return -sum(np.log(pmf))
+ else:
+ return pmf
def cnbd(n, N, a, k, summary = False):
|
Add catch to return nan if pmf has a zero in it
|
diff --git a/src/Layers/TiledMapLayer.js b/src/Layers/TiledMapLayer.js
index <HASH>..<HASH> 100644
--- a/src/Layers/TiledMapLayer.js
+++ b/src/Layers/TiledMapLayer.js
@@ -42,7 +42,7 @@ export var TiledMapLayer = TileLayer.extend({
// set the urls
options = getUrlParams(options);
- this.tileUrl = options.url + 'tile/{z}/{y}/{x}' + (options.requestParams && Object.keys(options.requestParams).length > 0 ? Util.getParamString(options.requestParams) : '');
+ this.tileUrl = (options.proxy ? options.proxy + '?' : '') + options.url + 'tile/{z}/{y}/{x}' + (options.requestParams && Object.keys(options.requestParams).length > 0 ? Util.getParamString(options.requestParams) : '');
// Remove subdomain in url
// https://github.com/Esri/esri-leaflet/issues/991
if (options.url.indexOf('{s}') !== -1 && options.subdomains) {
|
Tiledmaplayer proxy support (#<I>)
* allow override of 'isModern'
Add an option to let users decide to not use geoJSON, even if the
underlying service supports it. Occasionally handy when ArcGIS Server
has geoJSON geometry problems.
* Add proxy support to tileUrl
Make sure that tile requests use the proxy URL if defined in options.
* Undo change to 'isModern'
Can't assume that all feature layers support geojson.
|
diff --git a/Helper/Product.php b/Helper/Product.php
index <HASH>..<HASH> 100644
--- a/Helper/Product.php
+++ b/Helper/Product.php
@@ -665,7 +665,7 @@ class Product extends AbstractHelper
);
if (!$webShopPrice) {
$webShopPrice = $price;
- }elseif ($price > 0) {
+ } elseif ($price > 0) {
if ($webShopPrice > $price) {
$webShopPrice = $price;
} else {
@@ -689,7 +689,7 @@ class Product extends AbstractHelper
);
if (!$originalWebShopPrice) {
$originalWebShopPrice = $originalPrice;
- }elseif ($originalPrice > 0) {
+ } elseif ($originalPrice > 0) {
if ($originalWebShopPrice > $originalPrice) {
$originalWebShopPrice = $originalPrice;
} else {
|
fix(code-style): missing spaces CDP-<I>
|
diff --git a/tests/Go/Instrument/Transformer/MagicConstantTransformerTest.php b/tests/Go/Instrument/Transformer/MagicConstantTransformerTest.php
index <HASH>..<HASH> 100644
--- a/tests/Go/Instrument/Transformer/MagicConstantTransformerTest.php
+++ b/tests/Go/Instrument/Transformer/MagicConstantTransformerTest.php
@@ -56,6 +56,14 @@ class MagicConstantTransformerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expected, $this->metadata->source);
}
+ public function testTransformerDoesNotReplaceStringWithConst()
+ {
+ $expected = '<?php echo "__FILE__"; ?>';
+ $this->metadata->source = $expected;
+ $this->transformer->transform($this->metadata);
+ $this->assertEquals($expected, $this->metadata->source);
+ }
+
public function testTransformerWrapsReflectionFileName()
{
$this->metadata->source = '<?php $class = new ReflectionClass("stdClass"); echo $class->getFileName(); ?>';
|
Added failing test for replacing magic strings in another strings
|
diff --git a/psycopg2_pgevents/event.py b/psycopg2_pgevents/event.py
index <HASH>..<HASH> 100644
--- a/psycopg2_pgevents/event.py
+++ b/psycopg2_pgevents/event.py
@@ -11,7 +11,20 @@ from psycopg2.extensions import connection
class Event:
- """Represent a psycopg2-pgevents event."""
+ """Represent a psycopg2-pgevents event.
+
+ Attributes
+ ----------
+ type: str
+ PostGreSQL event type, one of 'INSERT', 'UPDATE', or 'DELETE'.
+ schema_name: str
+ Schema in which the event occurred.
+ table_name: str
+ Table in which event occurred.
+ row_id: str
+ Row ID of event. This attribute is a string so that it can
+ represent both regular id's and things like UUID's.
+ """
type: str
schema_name: str
table_name: str
@@ -25,9 +38,9 @@ class Event:
type_: str
PostGreSQL event type, one of 'INSERT', 'UPDATE', or 'DELETE'.
schema_name: str
- Schema where the event occurred.
+ Schema in which the event occurred.
table_name: str
- Table where event occurred.
+ Table in which event occurred.
row_id: str
Row ID of event. This attribute is a string so that it can
represent both regular id's and things like UUID's.
|
adds docstring to Event class
|
diff --git a/pushbullet_cli/app.py b/pushbullet_cli/app.py
index <HASH>..<HASH> 100755
--- a/pushbullet_cli/app.py
+++ b/pushbullet_cli/app.py
@@ -1,16 +1,26 @@
#!/usr/bin/env python
import argparse
+import os
import os.path
import requests
import re
import sys
+from contextlib import contextmanager
PUSH_URL = "https://api.pushbullet.com/api/pushes"
DEVICE_URL = "https://api.pushbullet.com/api/devices"
KEY_PATH = os.path.expanduser("~/.pushbulletkey")
URL_RE = re.compile(r"^[a-zA-Z]+://.+$")
+@contextmanager
+def private_files():
+ oldmask = os.umask(077)
+ try:
+ yield
+ finally:
+ os.umask(oldmask)
+
class PushbulletException(Exception):
pass
@@ -48,7 +58,7 @@ def _get_api_key():
print("What's your API key?")
print("Find it at <https://www.pushbullet.com/account>.")
api_key = raw_input("> ").strip()
- with open(KEY_PATH, "w") as api_file:
+ with private_files(), open(KEY_PATH, "w") as api_file:
api_file.write(api_key)
return api_key
|
Key file should be created with private permissions
|
diff --git a/error.js b/error.js
index <HASH>..<HASH> 100644
--- a/error.js
+++ b/error.js
@@ -42,6 +42,10 @@ class MongoError extends Error {
static create(options) {
return new MongoError(options);
}
+
+ hasErrorLabel(label) {
+ return this.errorLabels && this.errorLabels.indexOf(label) !== -1;
+ }
}
/**
|
feat(error): all `hasErrorLabel` method to MongoError
This improves readability in the transactions code when branching
on error labels for certain retry scenarios.
|
diff --git a/scripts/generate_modules_docs.py b/scripts/generate_modules_docs.py
index <HASH>..<HASH> 100644
--- a/scripts/generate_modules_docs.py
+++ b/scripts/generate_modules_docs.py
@@ -44,6 +44,7 @@ def build_facts():
and value.__module__ == module.__name__
and getattr(value, '_pyinfra_op', False)
and not value.__name__.startswith('_')
+ and not key.startswith('_')
)
]
|
Ignore modules starting with '_'.
|
diff --git a/src/Parser.php b/src/Parser.php
index <HASH>..<HASH> 100644
--- a/src/Parser.php
+++ b/src/Parser.php
@@ -142,10 +142,6 @@ class Parser implements ParserInterface
protected function parseValue($value, $key = null)
{
$value = trim($value);
- if ('' === $value) { // implicit boolean
-
- return true;
- }
$type = '\Minime\\Annotations\\Types\\Dynamic';
if (preg_match($this->typesPattern, $value, $found)) { // strong typed
$type = $found[1];
diff --git a/src/Types/Dynamic.php b/src/Types/Dynamic.php
index <HASH>..<HASH> 100644
--- a/src/Types/Dynamic.php
+++ b/src/Types/Dynamic.php
@@ -16,6 +16,7 @@ class Dynamic implements TypeInterface
*/
public function parse($value, $annotation = null)
{
+ if ('' === $value) return true; // implicit boolean
$json = Json::jsonDecode($value);
if (JSON_ERROR_NONE === json_last_error()) {
return $json;
|
move implicit boolean resolution from Parser to Dynamic type
|
diff --git a/raiden/network/transport/matrix/client.py b/raiden/network/transport/matrix/client.py
index <HASH>..<HASH> 100644
--- a/raiden/network/transport/matrix/client.py
+++ b/raiden/network/transport/matrix/client.py
@@ -596,7 +596,8 @@ class GMatrixClient(MatrixClient):
for event in sync_room["account_data"]["events"]:
room.account_data[event["type"]] = event["content"]
- self.handle_messages_callback(all_messages)
+ if len(all_messages) > 0:
+ self.handle_messages_callback(all_messages)
if first_sync:
# Only update the local account data on first sync to avoid races.
diff --git a/raiden/network/transport/matrix/transport.py b/raiden/network/transport/matrix/transport.py
index <HASH>..<HASH> 100644
--- a/raiden/network/transport/matrix/transport.py
+++ b/raiden/network/transport/matrix/transport.py
@@ -903,7 +903,7 @@ class MatrixTransport(Runnable):
self._raiden_service.on_messages(all_messages)
- return bool(all_messages)
+ return len(all_messages) > 0
def _get_retrier(self, receiver: Address) -> _RetryQueue:
""" Construct and return a _RetryQueue for receiver """
|
Don't call callback when there are no messages
|
diff --git a/src/GameQ/Protocols/Quake3.php b/src/GameQ/Protocols/Quake3.php
index <HASH>..<HASH> 100644
--- a/src/GameQ/Protocols/Quake3.php
+++ b/src/GameQ/Protocols/Quake3.php
@@ -165,6 +165,9 @@ class Quake3 extends Protocol
*/
protected function processPlayers(Buffer $buffer)
{
+ // Some games do not have a number of current players
+ $playerCount = 0;
+
// Set the result to a new result instance
$result = new Result();
@@ -183,10 +186,15 @@ class Quake3 extends Protocol
// Add player name, encoded
$result->addPlayer('name', utf8_encode(trim(($playerInfo->readString('"')))));
+ // Increment
+ $playerCount++;
+
// Clear
unset($playerInfo);
}
+ $result->add('clients', $playerCount);
+
// Clear
unset($buffer);
|
Added clients count for Quake 3 protocol. Some games may not show current client count.
|
diff --git a/inquirer/questions.py b/inquirer/questions.py
index <HASH>..<HASH> 100644
--- a/inquirer/questions.py
+++ b/inquirer/questions.py
@@ -254,6 +254,8 @@ class Path(Text):
if current is None:
raise errors.ValidationError(current)
+ current = self.normalize_value(current)
+
if not is_pathname_valid(current):
raise errors.ValidationError(current)
|
Fixing validating Path's normalized value
|
diff --git a/src/utils/parse.js b/src/utils/parse.js
index <HASH>..<HASH> 100644
--- a/src/utils/parse.js
+++ b/src/utils/parse.js
@@ -59,7 +59,6 @@ function sanitizeFunction(functionString) {
}
const func = Function(...params, match.groups.body || '');
- func.name = match.groups.name;
func.displayName = match.groups.name;
return func;
}
|
Don't set function.name because it's read-only.
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -156,6 +156,10 @@ function consoleTestReport(results, allFailures) {
msg = '✔ passed';
passedCnt += 1;
}
+ } else if (test.result === 'ignore') {
+ formatter = f.yellow;
+ msg = '⚑ deferred';
+ deferredCnt += 1;
} else {
formatter = f.red;
msg = '✖ FAILED';
|
Added showing ignored tests with deferred styling. Otherwise ignored tests (set with _should.ignore in TestCase definition) were marked as errors.
|
diff --git a/p2p/net/swarm/swarm_test.go b/p2p/net/swarm/swarm_test.go
index <HASH>..<HASH> 100644
--- a/p2p/net/swarm/swarm_test.go
+++ b/p2p/net/swarm/swarm_test.go
@@ -102,12 +102,10 @@ func connectSwarms(t *testing.T, ctx context.Context, swarms []*Swarm) {
}
log.Info("Connecting swarms simultaneously.")
- for _, s1 := range swarms {
- for _, s2 := range swarms {
- if s2.local != s1.local { // don't connect to self.
- wg.Add(1)
- connect(s1, s2.LocalPeer(), s2.ListenAddresses()[0]) // try the first.
- }
+ for i, s1 := range swarms {
+ for _, s2 := range swarms[i+1:] {
+ wg.Add(1)
+ connect(s1, s2.LocalPeer(), s2.ListenAddresses()[0]) // try the first.
}
}
wg.Wait()
|
test: connect each peer precisely once.
Otherwise, some tests will get confused by duplicate (temporary, we close
duplicates quickly) connections.
fixes libp2p/go-libp2p#<I>
|
diff --git a/Facades/Route.php b/Facades/Route.php
index <HASH>..<HASH> 100755
--- a/Facades/Route.php
+++ b/Facades/Route.php
@@ -29,7 +29,7 @@ namespace Illuminate\Support\Facades;
* @method static \Illuminate\Routing\Router|\Illuminate\Routing\RouteRegistrar group(\Closure|string|array $attributes, \Closure|string $routes)
* @method static \Illuminate\Routing\Route redirect(string $uri, string $destination, int $status = 302)
* @method static \Illuminate\Routing\Route permanentRedirect(string $uri, string $destination)
- * @method static \Illuminate\Routing\Route view(string $uri, string $view, array $data = [])
+ * @method static \Illuminate\Routing\Route view(string $uri, string $view, array $data = [], int $status = 200, array $headers = [])
* @method static void bind(string $key, string|callable $binder)
* @method static void model(string $key, string $class, \Closure|null $callback = null)
* @method static \Illuminate\Routing\Route current()
|
Allow Route::view() helper to set status and headers (#<I>)
|
diff --git a/core/src/main/java/net/kuujo/vertigo/util/serialization/SerializerFactory.java b/core/src/main/java/net/kuujo/vertigo/util/serialization/SerializerFactory.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/net/kuujo/vertigo/util/serialization/SerializerFactory.java
+++ b/core/src/main/java/net/kuujo/vertigo/util/serialization/SerializerFactory.java
@@ -119,7 +119,7 @@ public abstract class SerializerFactory {
while (type != null && type != Object.class) {
for (Class<?> iface : type.getInterfaces()) {
if (iface == JsonSerializable.class) {
- return iface;
+ return type;
}
Class<?> serializable = findSerializableType(iface);
if (serializable != null) {
|
Use parent as serializable type.
|
diff --git a/lib/support/cli.js b/lib/support/cli.js
index <HASH>..<HASH> 100644
--- a/lib/support/cli.js
+++ b/lib/support/cli.js
@@ -226,8 +226,8 @@ module.exports.parseCommandLine = function parseCommandLine() {
})
.option('cpu', {
type: 'boolean',
- describe: 'Easy way to enable both chrome.timeline and CPU long tasks.',
- group: 'chrome'
+ describe:
+ 'Easy way to enable both chrome.timeline and CPU long tasks for Chrome and geckoProfile for Firefox'
})
.option('chrome.CPUThrottlingRate', {
type: 'number',
@@ -854,8 +854,12 @@ module.exports.parseCommandLine = function parseCommandLine() {
// Simplest way to just to get CPU metrics
if (argv.cpu) {
- set(argv, 'chrome.collectLongTasks', true);
- set(argv, 'chrome.timeline', true);
+ if (argv.browser === 'chrome') {
+ set(argv, 'chrome.collectLongTasks', true);
+ set(argv, 'chrome.timeline', true);
+ } else if (argv.browser === 'firefox') {
+ set(argv, 'firefox.geckoProfiler', true);
+ }
}
if (argv.docker) {
|
Collect gecko profiler with --cpu (#<I>)
|
diff --git a/src/lib/KevinGH/Box/Command/Build.php b/src/lib/KevinGH/Box/Command/Build.php
index <HASH>..<HASH> 100644
--- a/src/lib/KevinGH/Box/Command/Build.php
+++ b/src/lib/KevinGH/Box/Command/Build.php
@@ -429,6 +429,7 @@ HELP
$this->putln('?', "Output path: $path");
$this->box = Box::create($path);
+ $this->box->getPhar()->startBuffering();
// set replacement values, if any
if (array() !== ($values = $this->config->getProcessedReplacements())) {
|
Speed-p build process
Call the startBuffering method when building archive to speedup the phar building
|
diff --git a/sirmordred/_version.py b/sirmordred/_version.py
index <HASH>..<HASH> 100644
--- a/sirmordred/_version.py
+++ b/sirmordred/_version.py
@@ -1,2 +1,2 @@
# Versions compliant with PEP 440 https://www.python.org/dev/peps/pep-0440
-__version__ = "0.1.30"
+__version__ = "0.1.31"
|
[release] Update version number to <I>
|
diff --git a/src/Message/PxPostCreateCardRequest.php b/src/Message/PxPostCreateCardRequest.php
index <HASH>..<HASH> 100644
--- a/src/Message/PxPostCreateCardRequest.php
+++ b/src/Message/PxPostCreateCardRequest.php
@@ -13,6 +13,7 @@ class PxPostCreateCardRequest extends PxPostAuthorizeRequest
$this->getCard()->validate();
$data = $this->getBaseData();
+ $data->InputCurrency = $this->getCurrency();
$data->Amount = '1.00';
$data->EnableAddBillCard = 1;
$data->CardNumber = $this->getCard()->getNumber();
|
Add required currency for creating a credit card token
Omitting the currency from the credit card token request fails if the currency defaults to the incorrect currency. In my case was defaulting to NZD and should be AUD. Specifying it clears up the issue.
|
diff --git a/plex/__init__.py b/plex/__init__.py
index <HASH>..<HASH> 100644
--- a/plex/__init__.py
+++ b/plex/__init__.py
@@ -2,7 +2,7 @@ from plex.client import PlexClient
from plex.lib.six import add_metaclass
from plex.helpers import has_attribute
-__version__ = '0.6.1'
+__version__ = '0.6.2'
class PlexMeta(type):
|
Bumped version to <I>
|
diff --git a/lib/jade/index.js b/lib/jade/index.js
index <HASH>..<HASH> 100644
--- a/lib/jade/index.js
+++ b/lib/jade/index.js
@@ -53,6 +53,14 @@ exports.doctypes = require('./doctypes');
exports.filters = require('./filters');
/**
+ * Utilities.
+ *
+ * @type Object
+ */
+
+exports.utils = require('./utils');
+
+/**
* Render the given attributes object.
*
* @param {Object} obj
|
Exporting utils for those who wish to write compilers
|
diff --git a/packages/neos-ui/src/Containers/RightSideBar/Inspector/TabPanel/index.js b/packages/neos-ui/src/Containers/RightSideBar/Inspector/TabPanel/index.js
index <HASH>..<HASH> 100644
--- a/packages/neos-ui/src/Containers/RightSideBar/Inspector/TabPanel/index.js
+++ b/packages/neos-ui/src/Containers/RightSideBar/Inspector/TabPanel/index.js
@@ -34,7 +34,7 @@ export default class TabPanel extends PureComponent {
<Tabs.Panel theme={{panel: style.inspectorTabPanel}}>
<SelectedElement/>
{
- groups.filter(g => ($get('properties', g) && $get('properties', g).filter(this.isPropertyEnabled).count()) || $get('views', g)).map(group => (
+ groups.filter(g => ($get('properties', g) && $get('properties', g).filter(this.isPropertyEnabled).count()) || ($get('views', g) && $get('views', g).count())).map(group => (
<PropertyGroup
key={$get('id', group)}
label={$get('label', group)}
|
BUGFIX: Hide empty groups in inspector
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -21,9 +21,9 @@
throw Error('f and g must be functions. f:' + f + ' g:' + g)
}
- return setProp('name', dot(f, g), function () {
+ return setProp('length', g.length, setProp('name', dot(f, g), function () {
return f(g.apply(null, arguments))
- })
+ }))
}
function dot (a, b) {
|
[PATCH][FIX] set length of resulting function
|
diff --git a/annoying/decorators.py b/annoying/decorators.py
index <HASH>..<HASH> 100644
--- a/annoying/decorators.py
+++ b/annoying/decorators.py
@@ -188,7 +188,7 @@ def ajax_request(func):
else:
format_type = 'application/json'
response = func(request, *args, **kwargs)
- if isinstance(response, dict) or isinstance(response, list):
+ if not isinstance(response, HttpResponse):
data = FORMAT_TYPES[format_type](response)
response = HttpResponse(data, content_type=format_type)
response['content-length'] = len(data)
|
Why limit it to serialise lists/dicts? Try everything but HttpResponse subclasses
|
diff --git a/django_extensions/management/commands/reset_db.py b/django_extensions/management/commands/reset_db.py
index <HASH>..<HASH> 100644
--- a/django_extensions/management/commands/reset_db.py
+++ b/django_extensions/management/commands/reset_db.py
@@ -92,7 +92,7 @@ Type 'yes' to continue, or 'no' to cancel: """ % (settings.DATABASE_NAME,))
if password is None:
password = settings.DATABASE_PASSWORD
- if engine == 'sqlite3':
+ if engine in ('sqlite3', 'spatialite'):
import os
try:
logging.info("Unlinking sqlite3 database")
|
reset_db made to work with spatialite (backend from geodjango)
|
diff --git a/src/atoms/Icon/constants.js b/src/atoms/Icon/constants.js
index <HASH>..<HASH> 100644
--- a/src/atoms/Icon/constants.js
+++ b/src/atoms/Icon/constants.js
@@ -90,6 +90,7 @@ module.exports = {
'fastTrack',
'family',
'fastClock',
+ 'finalExpense',
'fineArt',
'fireExtinguisher',
'firearm',
@@ -138,9 +139,11 @@ module.exports = {
'invite',
'jewelry',
'largeHome',
+ 'legacy',
'lifeAgentsOff',
'lifeAgentsOn',
'life',
+ 'lifestyle',
'lifeColor3X',
'lightbulb',
'linkedin',
@@ -166,6 +169,7 @@ module.exports = {
'norton',
'nortonSecured',
'nortonW',
+ 'notesSimple',
'openBook',
'overflow',
'pawprint',
|
Add new icons for Coverage Needs (#<I>)
|
diff --git a/src/browser/extension/background/index.js b/src/browser/extension/background/index.js
index <HASH>..<HASH> 100644
--- a/src/browser/extension/background/index.js
+++ b/src/browser/extension/background/index.js
@@ -10,7 +10,5 @@ window.store = store;
window.store.liftedStore.instances = {};
chrome.commands.onCommand.addListener(shortcut => {
- if (store.liftedStore.isSet()) {
- openDevToolsWindow(shortcut);
- }
+ openDevToolsWindow(shortcut);
});
|
Keyboard shortcuts are now enabled even when store isn't initialized
|
diff --git a/pandas/tests/test_base.py b/pandas/tests/test_base.py
index <HASH>..<HASH> 100644
--- a/pandas/tests/test_base.py
+++ b/pandas/tests/test_base.py
@@ -949,6 +949,21 @@ class TestIndexOps(Ops):
s.drop_duplicates(inplace=True)
tm.assert_series_equal(s, original)
+ def test_drop_duplicates_series_vs_dataframe(self):
+ # GH 14192
+ df = pd.DataFrame({'a': [1, 1, 1, 'one', 'one'],
+ 'b': [2, 2, np.nan, np.nan, np.nan],
+ 'c': [3, 3, np.nan, np.nan, 'three'],
+ 'd': [1, 2, 3, 4, 4],
+ 'e': [datetime(2015, 1, 1), datetime(2015, 1, 1),
+ datetime(2015, 2, 1), pd.NaT, pd.NaT]
+ })
+ for column in df.columns:
+ for keep in ['first', 'last', False]:
+ dropped_frame = df[[column]].drop_duplicates(keep=keep)
+ dropped_series = df[column].drop_duplicates(keep=keep)
+ tm.assert_frame_equal(dropped_frame, dropped_series.to_frame())
+
def test_fillna(self):
# # GH 11343
# though Index.fillna and Series.fillna has separate impl,
|
TST: Same return values in drop_duplicates for Series and DataFrames(#<I>) (#<I>)
|
diff --git a/src/Intervention/Image/Image.php b/src/Intervention/Image/Image.php
index <HASH>..<HASH> 100644
--- a/src/Intervention/Image/Image.php
+++ b/src/Intervention/Image/Image.php
@@ -1723,7 +1723,7 @@ class Image
$saved = @file_put_contents($path, $this->encode(pathinfo($path, PATHINFO_EXTENSION), $quality));
if ($saved === false) {
- throw new Exception\ImageNotWritableException;
+ throw new Exception\ImageNotWritableException("Can't write image data to path [{$path}]");
}
return $this;
|
added text to ImageNotWritableException
|
diff --git a/Joyst_Model.php b/Joyst_Model.php
index <HASH>..<HASH> 100644
--- a/Joyst_Model.php
+++ b/Joyst_Model.php
@@ -291,8 +291,8 @@ class Joyst_Model extends CI_Model {
if ( // Is read-only during a 'set'
$operation == 'set' &&
- isset($this->schema[$key]['allowget']) &&
- !$this->schema[$key]['allowget']
+ isset($this->schema[$key]['allowset']) &&
+ !$this->schema[$key]['allowset']
)
continue;
|
BUGFIX: Pretty major issue where allowget/allowset would get mixed up during a set operation
|
diff --git a/modules/social_features/social_core/src/Plugin/Block/SocialPageTitleBlock.php b/modules/social_features/social_core/src/Plugin/Block/SocialPageTitleBlock.php
index <HASH>..<HASH> 100644
--- a/modules/social_features/social_core/src/Plugin/Block/SocialPageTitleBlock.php
+++ b/modules/social_features/social_core/src/Plugin/Block/SocialPageTitleBlock.php
@@ -54,7 +54,7 @@ class SocialPageTitleBlock extends PageTitleBlock {
if ($group && $request->attributes->get('_route') == 'entity.group_content.create_form') {
return [
'#type' => 'page_title',
- '#title' => t('@title blaat @group', [
+ '#title' => t('@title in @group', [
'@title' => $title,
'@group' => $group->label(),
], ['context' => 'social_page_title']),
|
DS-<I> by bramtenhove: Fix testing typo
|
diff --git a/django_extensions/management/commands/sqldiff.py b/django_extensions/management/commands/sqldiff.py
index <HASH>..<HASH> 100644
--- a/django_extensions/management/commands/sqldiff.py
+++ b/django_extensions/management/commands/sqldiff.py
@@ -49,15 +49,16 @@ def flatten(l, ltypes=(list, tuple)):
def all_local_fields(meta):
all_fields = []
- if not meta.managed or meta.proxy:
- for parent in meta.parents:
- all_fields.extend(all_local_fields(parent._meta))
- else:
- for f in meta.local_fields:
- col_type = f.db_type(connection=connection)
- if col_type is None:
- continue
- all_fields.append(f)
+ if meta.managed:
+ if meta.proxy:
+ for parent in meta.parents:
+ all_fields.extend(all_local_fields(parent._meta))
+ else:
+ for f in meta.local_fields:
+ col_type = f.db_type(connection=connection)
+ if col_type is None:
+ continue
+ all_fields.append(f)
return all_fields
|
Not managed models should not return fields
Fixes previous commit where non-managed models were returning fields.
|
diff --git a/src/Grid/Filter/AbstractFilter.php b/src/Grid/Filter/AbstractFilter.php
index <HASH>..<HASH> 100644
--- a/src/Grid/Filter/AbstractFilter.php
+++ b/src/Grid/Filter/AbstractFilter.php
@@ -248,7 +248,7 @@ abstract class AbstractFilter
}
/**
- * @param array $options
+ * @param array|\Illuminate\Support\Collection $options
*
* @return MultipleSelect
*/
@@ -258,7 +258,7 @@ abstract class AbstractFilter
}
/**
- * @param array $options
+ * @param array|\Illuminate\Support\Collection $options
*
* @return Radio
*/
@@ -268,7 +268,7 @@ abstract class AbstractFilter
}
/**
- * @param array $options
+ * @param array|\Illuminate\Support\Collection $options
*
* @return Checkbox
*/
@@ -280,7 +280,7 @@ abstract class AbstractFilter
/**
* Datetime filter.
*
- * @param array $options
+ * @param array|\Illuminate\Support\Collection $options
*
* @return DateTime
*/
|
multipleSeletct/... methods support collection
|
diff --git a/src/main/java/com/bladecoder/ink/runtime/Story.java b/src/main/java/com/bladecoder/ink/runtime/Story.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/bladecoder/ink/runtime/Story.java
+++ b/src/main/java/com/bladecoder/ink/runtime/Story.java
@@ -1202,6 +1202,9 @@ public class Story extends RTObject implements VariablesState.VariableChanged {
// In normal flow - allow safe exit without warning
else {
state.setDidSafeExit(true);
+
+ // Stop flow in current thread
+ state.setCurrentContentObject(null);
}
break;
|
Ref. C#: -> DONE should stop flow in the current thread.
|
diff --git a/routing/router_test.go b/routing/router_test.go
index <HASH>..<HASH> 100644
--- a/routing/router_test.go
+++ b/routing/router_test.go
@@ -421,9 +421,10 @@ func TestChannelUpdateValidation(t *testing.T) {
},
}
- route := &Route{
- Hops: hops,
- }
+ route := NewRouteFromHops(
+ lnwire.MilliSatoshi(10000), 100,
+ NewVertex(ctx.aliases["a"]), hops,
+ )
// Set up a channel update message with an invalid signature to be
// returned to the sender.
|
routing: use complete route in test
Previously not all route fields were properly populated. Example: prev
and next hop maps.
|
diff --git a/bcbio/variation/vardict.py b/bcbio/variation/vardict.py
index <HASH>..<HASH> 100644
--- a/bcbio/variation/vardict.py
+++ b/bcbio/variation/vardict.py
@@ -47,6 +47,9 @@ def _vardict_options_from_config(items, config, out_file, target=None):
((vardict_cl == "vardict-java" and LooseVersion(version) >= LooseVersion("1.5.5")) or
(vardict_cl == "vardict" and LooseVersion(version) >= LooseVersion("2018.07.25")))):
opts += ["--nosv"]
+ if (vardict_cl and version and
+ (vardict_cl == "vardict-java" and LooseVersion(version) >= LooseVersion("1.5.6"))):
+ opts += ["--deldupvar"]
# remove low mapping quality reads
opts += ["-Q", "10"]
# Remove QCfail reads, avoiding high depth repetitive regions
|
VarDictJava: exclude SVs starting before start region
This avoids duplicate SVs present at the end of one region and before the
start of the next
|
diff --git a/pandas/tests/test_frame.py b/pandas/tests/test_frame.py
index <HASH>..<HASH> 100644
--- a/pandas/tests/test_frame.py
+++ b/pandas/tests/test_frame.py
@@ -7678,7 +7678,7 @@ class TestDataFrame(unittest.TestCase, CheckIndexing,
def test_mask_edge_case_1xN_frame(self):
# GH4071
df = DataFrame([[1, 2]])
- res = df.mask(np.array([[True, False]]))
+ res = df.mask(DataFrame([[True, False]]))
expec = DataFrame([[nan, 2]])
assert_frame_equal(res, expec)
|
TST: use DataFrame in the test
|
diff --git a/openquake/risklib/asset.py b/openquake/risklib/asset.py
index <HASH>..<HASH> 100644
--- a/openquake/risklib/asset.py
+++ b/openquake/risklib/asset.py
@@ -253,7 +253,7 @@ aids_dt = numpy.dtype([('aids', hdf5.vuint32)])
class AssetCollection(object):
- # the information about the assets is store in a numpy array and in a
+ # the information about the assets is stored in a numpy array and in a
# variable-length dataset aids_by_tags; we could store everything in a
# single array and it would be easier, but then we would need to transfer
# unneeded strings; also we would have to use fixed-length string, since
|
Updated a comment [skip CI]
|
diff --git a/test/traverse_spec.js b/test/traverse_spec.js
index <HASH>..<HASH> 100644
--- a/test/traverse_spec.js
+++ b/test/traverse_spec.js
@@ -4,8 +4,19 @@ const expect = require('chai').expect;
describe('findAll', () => {
it('retrieves a collection of kernel specs', () => {
- return findAll().then(dirs => {
- expect(dirs).to.have.any.keys('python3', 'python2');
+ return findAll().then(kernelspecs => {
+ expect(kernelspecs).to.have.any.keys('python3', 'python2');
+
+ const defaultKernel = kernelspecs.python2 || kernelspecs.python3;
+
+ expect(defaultKernel).to.have.property('spec');
+ expect(defaultKernel).to.have.property('resources_dir');
+
+ const spec = defaultKernel.spec;
+
+ expect(spec).to.have.property('display_name');
+ expect(spec).to.have.property('argv');
+
});
});
});
|
Problem: findAll's test wasn't very robust
Solution: Check more properties
|
diff --git a/test/test_motor_client.py b/test/test_motor_client.py
index <HASH>..<HASH> 100644
--- a/test/test_motor_client.py
+++ b/test/test_motor_client.py
@@ -170,6 +170,7 @@ class MotorClientTest(MotorTest):
collection = cx.motor_test.test_collection
insert_collection = cx.motor_test.insert_collection
+ yield insert_collection.remove()
ndocs = [0]
insert_future = Future()
|
More reliable test_high_concurrency.
|
diff --git a/robobrowser/browser.py b/robobrowser/browser.py
index <HASH>..<HASH> 100644
--- a/robobrowser/browser.py
+++ b/robobrowser/browser.py
@@ -337,7 +337,7 @@ class RoboBrowser(object):
# Send request
url = self._build_url(form.action) or self.url
form_data = form.serialize()
- response = self.session.request(method, url, **form_data.to_requests())
+ response = self.session.request(method, url, **form_data.to_requests(method))
# Update history
self._update_state(response)
|
fix issue with building bad POST requests
|
diff --git a/tools/functional-tester/etcd-tester/lease_stresser.go b/tools/functional-tester/etcd-tester/lease_stresser.go
index <HASH>..<HASH> 100644
--- a/tools/functional-tester/etcd-tester/lease_stresser.go
+++ b/tools/functional-tester/etcd-tester/lease_stresser.go
@@ -114,7 +114,7 @@ func (ls *leaseStresser) setupOnce() error {
panic("expect keysPerLease to be set")
}
- conn, err := grpc.Dial(ls.endpoint, grpc.WithInsecure())
+ conn, err := grpc.Dial(ls.endpoint, grpc.WithInsecure(), grpc.WithBackoffMaxDelay(1*time.Second))
if err != nil {
return fmt.Errorf("%v (%s)", err, ls.endpoint)
}
|
etcd-tester:limit max retry backoff delay
grpc uses expoential retry if a connection is lost. grpc will sleep base on exponential delay.
if delay is too large, it slows down tester.
|
diff --git a/l/cli.py b/l/cli.py
index <HASH>..<HASH> 100644
--- a/l/cli.py
+++ b/l/cli.py
@@ -120,7 +120,6 @@ I_hate_everything = [
click.option(
"--no-group-directories-first", "sort_by",
flag_value=lambda thing : thing,
- default=True,
help="Show content in alphabetical order regardless of type",
),
click.argument(
|
Remove the default to allow run to decide what to use.
|
diff --git a/superset/views/core.py b/superset/views/core.py
index <HASH>..<HASH> 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -33,7 +33,7 @@ from flask_appbuilder.security.decorators import has_access, has_access_api
from flask_appbuilder.security.sqla import models as ab_models
from flask_babel import gettext as __, lazy_gettext as _
from jinja2.exceptions import TemplateError
-from sqlalchemy import and_, or_, select
+from sqlalchemy import and_, or_
from sqlalchemy.engine.url import make_url
from sqlalchemy.exc import (
ArgumentError,
@@ -1129,8 +1129,8 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
username = g.user.username if g.user is not None else None
engine = database.get_sqla_engine(user_name=username)
- with closing(engine.connect()) as conn:
- conn.scalar(select([1]))
+ with closing(engine.raw_connection()) as conn:
+ engine.dialect.do_ping(conn)
return json_success('"OK"')
except CertificateException as ex:
logger.info("Certificate exception")
|
chore: Leverage SQLALchemy ping rather than explicit SELECT 1 for testconn (#<I>)
|
diff --git a/HashCacheClient.js b/HashCacheClient.js
index <HASH>..<HASH> 100644
--- a/HashCacheClient.js
+++ b/HashCacheClient.js
@@ -54,6 +54,7 @@ class HashCacheClient {
request
.delete(this.host + '/channel/' + hash)
.set('Authorization', this.credentials)
+ .send({ password: password })
.end((err, res) => { this._resolveRequest(err, res, resolve, reject) });
})
}
|
Fix missing password for channel deletion in HashCacheClient
|
diff --git a/src/Model.php b/src/Model.php
index <HASH>..<HASH> 100644
--- a/src/Model.php
+++ b/src/Model.php
@@ -467,7 +467,7 @@ abstract class Model extends PhalconModel
$params['order'] = $orderBy;
}
if ($columns) {
- $params['columns'] = is_array($columns) ? explode(',', $columns) : $columns;
+ $params['columns'] = is_array($columns) ? implode(',', $columns) : $columns;
}
if (is_int($limit)) {
$params['limit'] = $limit;
|
fix(Model): implode an array.
|
diff --git a/src/MageTest/PhpSpec/MagentoExtension/Autoloader/MageLoader.php b/src/MageTest/PhpSpec/MagentoExtension/Autoloader/MageLoader.php
index <HASH>..<HASH> 100644
--- a/src/MageTest/PhpSpec/MagentoExtension/Autoloader/MageLoader.php
+++ b/src/MageTest/PhpSpec/MagentoExtension/Autoloader/MageLoader.php
@@ -189,6 +189,9 @@ class MageLoader
array_splice($controller, 2, 0 , 'controllers');
$pathToController = implode(DS, $controller);
$classFile = $local . $pathToController . '.php';
+ if (!file_exists($classFile)) {
+ return false;
+ }
return include_once $classFile;
}
}
|
Add file exists test to prevent warning
Add a test for the file existing ahead of the include_one. Without
the tests the warning thrown would prevent the user from being prompted
to create the file and the spec functionality is blocked.
|
diff --git a/telethon/events/inlinequery.py b/telethon/events/inlinequery.py
index <HASH>..<HASH> 100644
--- a/telethon/events/inlinequery.py
+++ b/telethon/events/inlinequery.py
@@ -178,11 +178,17 @@ class InlineQuery(EventBuilder):
return
if results:
- results = [self._as_awaitable(x, self._client.loop)
+ futures = [self._as_future(x, self._client.loop)
for x in results]
- done, _ = await asyncio.wait(results, loop=self._client.loop)
- results = [x.result() for x in done]
+ await asyncio.wait(futures, loop=self._client.loop)
+
+ # All futures will be in the `done` *set* that `wait` returns.
+ #
+ # Precisely because it's a `set` and not a `list`, it
+ # will not preserve the order, but since all futures
+ # completed we can use our original, ordered `list`.
+ results = [x.result() for x in futures]
else:
results = []
@@ -202,9 +208,9 @@ class InlineQuery(EventBuilder):
)
@staticmethod
- def _as_awaitable(obj, loop):
+ def _as_future(obj, loop):
if inspect.isawaitable(obj):
- return obj
+ return asyncio.ensure_future(obj, loop=loop)
f = loop.create_future()
f.set_result(obj)
|
Fix order of inline results not being preserved
|
diff --git a/test/unittests/test_record.py b/test/unittests/test_record.py
index <HASH>..<HASH> 100644
--- a/test/unittests/test_record.py
+++ b/test/unittests/test_record.py
@@ -21,6 +21,7 @@ EXPECTED_RECORD_ATTRIBUTES = {
'values'
}
+
@given(attributes)
def test_empty_constructor_has_no_attributes(attr):
assume(attr not in EXPECTED_RECORD_ATTRIBUTES)
|
Fixed pep8 blip.
|
diff --git a/bosh_aws_bootstrap/lib/bosh/cli/commands/aws.rb b/bosh_aws_bootstrap/lib/bosh/cli/commands/aws.rb
index <HASH>..<HASH> 100644
--- a/bosh_aws_bootstrap/lib/bosh/cli/commands/aws.rb
+++ b/bosh_aws_bootstrap/lib/bosh/cli/commands/aws.rb
@@ -90,8 +90,13 @@ module Bosh::Cli::Command
usage "aws create"
desc "create everything in config file"
+ option "--trace", "print all HTTP traffic"
def create(config_file = nil)
config_file ||= default_config_file
+ if !!options[:trace]
+ require 'logger'
+ ::AWS.config(:logger => Logger.new($stdout), :http_wire_trace => true)
+ end
create_vpc(config_file)
create_rds_dbs(config_file)
create_s3(config_file)
|
AWS create --trace option to print all HTTP traffic with AWS
|
diff --git a/src/Table.php b/src/Table.php
index <HASH>..<HASH> 100644
--- a/src/Table.php
+++ b/src/Table.php
@@ -232,7 +232,7 @@ class Table implements TableInterface
*/
public function get(string $key, $field = null)
{
- return $this->table->get($key, $field);
+ return $field ? $this->table->get($key, $field) : $this->table->get($key);
}
/**
|
Update Table.php
Fix bug when pass null value as $filed will return false
|
diff --git a/lnwallet/reservation.go b/lnwallet/reservation.go
index <HASH>..<HASH> 100644
--- a/lnwallet/reservation.go
+++ b/lnwallet/reservation.go
@@ -276,16 +276,6 @@ func (r *ChannelReservation) SetNumConfsRequired(numConfs uint16) {
r.partialState.NumConfsRequired = numConfs
}
-// RegisterMinHTLC registers our desired amount for the smallest acceptable
-// HTLC we'll accept within this channel. Any HTLC's that are extended which
-// are below this value will SHOULD be rejected.
-func (r *ChannelReservation) RegisterMinHTLC(minHTLC lnwire.MilliSatoshi) {
- r.Lock()
- defer r.Unlock()
-
- r.ourContribution.MinHTLC = minHTLC
-}
-
// CommitConstraints takes the constraints that the remote party specifies for
// the type of commitments that we can generate for them. These constraints
// include several parameters that serve as flow control restricting the amount
|
lnwallet/reservation: remove RegisterMinHTLC
We remove this method, as our minHtlc value is set using the
CommitConstraints method.
|
diff --git a/lib/access-granted/controller_methods.rb b/lib/access-granted/controller_methods.rb
index <HASH>..<HASH> 100644
--- a/lib/access-granted/controller_methods.rb
+++ b/lib/access-granted/controller_methods.rb
@@ -5,7 +5,7 @@ module AccessGranted
end
def self.included(base)
- base.helper_method :can?, :cannot?, :current_ability
+ base.helper_method :can?, :cannot?, :current_policy
end
def can?(*args)
diff --git a/spec/controller_methods_spec.rb b/spec/controller_methods_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controller_methods_spec.rb
+++ b/spec/controller_methods_spec.rb
@@ -5,7 +5,7 @@ describe AccessGranted::ControllerMethods do
@current_user = double("User")
@controller_class = Class.new
@controller = @controller_class.new
- @controller_class.stub(:helper_method).with(:can?, :cannot?, :current_ability)
+ @controller_class.stub(:helper_method).with(:can?, :cannot?, :current_policy)
@controller_class.send(:include, AccessGranted::ControllerMethods)
@controller.stub(:current_user).and_return(@current_user)
end
|
Rename incorrect current_ability to current_policy.
|
diff --git a/wp-cli.php b/wp-cli.php
index <HASH>..<HASH> 100755
--- a/wp-cli.php
+++ b/wp-cli.php
@@ -50,6 +50,14 @@ foreach (glob(WP_CLI_ROOT.'/commands/community/*.php') as $filename) {
include $filename;
}
+// Check if there are commands installed
+if(empty(WP_CLI::$commands)) {
+ WP_CLI::error('No commands installed');
+ WP_CLI::line();
+ WP_CLI::line('Visit the wp-cli page on github on more information on how to install commands.');
+ exit();
+}
+
// Get the cli arguments
$arguments = $GLOBALS['argv'];
@@ -59,18 +67,11 @@ array_shift($arguments);
// Get the command
$command = array_shift($arguments);
-// Check if there are commands installed
-if(empty(WP_CLI::$commands)) {
- WP_CLI::error('No commands installed');
- WP_CLI::line();
- WP_CLI::line('Visit the wp-cli page on github on more information on how to install commands.');
- exit();
-}
// Try to load the class, otherwise it's an Unknown command
-elseif(isset(WP_CLI::$commands[$command])) {
+if(isset(WP_CLI::$commands[$command])) {
new WP_CLI::$commands[$command]($arguments);
}
// Show the general help for wp-cli
else {
WP_CLI::generalHelp();
-}
\ No newline at end of file
+}
|
check if there are any commands before doing anything with the args
|
diff --git a/src/ModelSearch.php b/src/ModelSearch.php
index <HASH>..<HASH> 100755
--- a/src/ModelSearch.php
+++ b/src/ModelSearch.php
@@ -520,6 +520,8 @@ class ModelSearch
// Review each request.
foreach ($this->request as $name => $filters) {
+ $name = str_replace('-', '.', $name);
+
// This name is not present in available attributes.
if (! Arr::has($this->attributes, $name)) {
continue;
|
Convert parameter names into dot-notation (. in url converts to underscore which is harder to detect)
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -9,7 +9,7 @@ function addModifier(baseClass, modifier) {
function getClassArray(block, element, modifiers = []) {
const baseClass = getBaseClass(block, element);
const modifierFn = addModifier.bind(null, baseClass);
- return [baseClass].concat(modifiers.map(modifierFn));
+ return [baseClass].concat(modifiers.map(modifierFn)).filter(c => c);
}
function getClassesAsString(block, element, modifiers) {
|
fix(modifiers): disallow empty modifiers
Ignore values such as `null` and empty strings when generating modifier classes.
|
diff --git a/grimoire/elk/gerrit.py b/grimoire/elk/gerrit.py
index <HASH>..<HASH> 100644
--- a/grimoire/elk/gerrit.py
+++ b/grimoire/elk/gerrit.py
@@ -221,7 +221,7 @@ class GerritEnrich(Enrich):
eitem = {} # Item enriched
# Fields that are the same in item and eitem
- copy_fields = ["status", "branch", "url","__metadata__updated_on"]
+ copy_fields = ["status", "branch", "url","__metadata__updated_on","number"]
for f in copy_fields:
eitem[f] = review[f]
# Fields which names are translated
|
[gerrit enrich] Include the number of gerrit review.
|
diff --git a/src/main/java/com/couchbase/cblite/replicator/CBLReplicator.java b/src/main/java/com/couchbase/cblite/replicator/CBLReplicator.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/couchbase/cblite/replicator/CBLReplicator.java
+++ b/src/main/java/com/couchbase/cblite/replicator/CBLReplicator.java
@@ -395,7 +395,17 @@ public abstract class CBLReplicator extends Observable {
}
String buildRelativeURLString(String relativePath) {
- return remote.toExternalForm() + relativePath;
+
+ // the following code is a band-aid for a system problem in the codebase
+ // where it is appending "relative paths" that start with a slash, eg:
+ // http://dotcom/db/ + /relpart == http://dotcom/db/relpart
+ // which is not compatible with the way the java url concatonation works.
+
+ String remoteUrlString = remote.toExternalForm();
+ if (remoteUrlString.endsWith("/") && relativePath.startsWith("/")) {
+ remoteUrlString = remoteUrlString.substring(0, remoteUrlString.length() - 1);
+ }
+ return remoteUrlString + relativePath;
}
public void sendAsyncRequest(String method, URL url, Object body, CBLRemoteRequestCompletionBlock onCompletion) {
|
Re-do another fix for issue #<I> since the first one caused major issues.
|
diff --git a/tinman/handlers/rabbitmq.py b/tinman/handlers/rabbitmq.py
index <HASH>..<HASH> 100644
--- a/tinman/handlers/rabbitmq.py
+++ b/tinman/handlers/rabbitmq.py
@@ -11,6 +11,7 @@ Example configuration:
password: tornado
"""
+from tornado import gen
import logging
import pika
from pika.adapters import tornado_connection
@@ -235,6 +236,7 @@ class RabbitMQRequestHandler(web.RequestHandler):
self._set_rabbitmq_channel(channel)
self._publish_deferred_messages()
+ @gen.coroutine
def prepare(self):
"""Prepare the handler, ensuring RabbitMQ is connected or start a new
connection attempt.
|
Make sure prepare is async
|
diff --git a/thjs.js b/thjs.js
index <HASH>..<HASH> 100644
--- a/thjs.js
+++ b/thjs.js
@@ -520,8 +520,13 @@ function receive(msg, path)
var from = self.whois(local.der2hn(open.rsa));
if (!from) return warn("invalid hashname", local.der2hn(open.rsa), open.rsa);
- // make sure this open is newer (if any others)
+ // make sure this open is legit
if (typeof open.js.at != "number") return warn("invalid at", open.js.at);
+ if(from.openAt)
+ {
+ if(open.js.at <= from.openAt) return; // ignore dups
+ from.sentOpen = 0; // make sure we send a new open
+ }
// open is legit!
debug("inOpen verified", from.hashname);
@@ -674,8 +679,8 @@ function whois(hashname)
// always default to minimum 0 here
if(typeof path.priority != "number") path.priority = 0;
- // when multiple networks detected, trigger a sync
- if(hn.paths.length > 1) hn.sync();
+ // when multiple networks detected, trigger a sync (delayed so caller can continue/respond first)
+ if(hn.paths.length > 1) setTimeout(hn.sync,1);
// update public ipv4 address
if(path.type == "ipv4" && !isLocalIP(path.ip)) hn.address = [hn.hashname,path.ip,path.port].join(",");
|
fix a timing issue after open, and improve open logic
|
diff --git a/wandb/integration/tensorboard/log.py b/wandb/integration/tensorboard/log.py
index <HASH>..<HASH> 100644
--- a/wandb/integration/tensorboard/log.py
+++ b/wandb/integration/tensorboard/log.py
@@ -83,7 +83,14 @@ def tf_summary_to_dict(tf_summary_str_or_pb, namespace=""): # noqa: C901
return None
def encode_images(img_strs, value):
- from PIL import Image
+ try:
+ from PIL import Image
+ except ImportError:
+ wandb.termwarn(
+ 'Install pillow if you are logging images with Tensorboard. To install, run "pip install pillow".',
+ repeat=False,
+ )
+ return
if len(img_strs) == 0:
return
|
[WB-<I>] Check if pillow is installed before importing (#<I>)
* Check if pillow is installed before importing
* Skip the image encoding if pillow isn't installed instead of exiting out of the whole run.
|
diff --git a/src/nwmatcher.js b/src/nwmatcher.js
index <HASH>..<HASH> 100644
--- a/src/nwmatcher.js
+++ b/src/nwmatcher.js
@@ -180,18 +180,15 @@ NW.Dom = (function(global) {
// tests are based on the jQuery selector test suite
BUGGY_GEBCN = NATIVE_GEBCN ?
(function() {
- var isBuggy,
- div = context.createElement('div'),
- method = 'getElementsByClassName',
- test = /\u53f0\u5317/;
+ var isBuggy, div = context.createElement('div'), test = '\u53f0\u5317';
// Opera tests
div.innerHTML = '<span class="' + test + 'abc ' + test + '"></span><span class="x"></span>';
- isBuggy = !div[method](test)[0];
+ isBuggy = !div.getElementsByClassName(test)[0];
// Safari test
div.lastChild.className = test;
- if (!isBuggy) isBuggy = div[method](test).length !== 2;
+ if (!isBuggy) isBuggy = div.getElementsByClassName(test).length !== 2;
div.innerHTML = '';
div = null;
|
fixed GEBCN feature test to use a string instead of a regular expression, formatting changes
|
diff --git a/lib/puavo/client/hash_mixin/device_base.rb b/lib/puavo/client/hash_mixin/device_base.rb
index <HASH>..<HASH> 100644
--- a/lib/puavo/client/hash_mixin/device_base.rb
+++ b/lib/puavo/client/hash_mixin/device_base.rb
@@ -4,6 +4,11 @@ module Puavo
module DeviceBase
include Base
+ def booleanize(value)
+ v = Array(value).first
+ (v && v != 'FALSE') ? true : false
+ end
+
def prettify_attributes
# Note: value of attribute may be raw ldap value eg. { puavoHostname => ["thinclient-01"] }
[
@@ -87,7 +92,7 @@ module Puavo
:value_block => lambda{ |value| Array(value) } },
{ :original_attribute_name => "puavoDeviceXrandrDisable",
:new_attribute_name => "xrandr_disable",
- :value_block => lambda{ |value| Array(value).first } },
+ :value_block => lambda{ |value| booleanize(value) } },
{ :original_attribute_name => "puavoDeviceType",
:new_attribute_name => "device_type",
:value_block => lambda{ |value| Array(value).first } },
|
Fix boolean handling for xrandr_disable.
|
diff --git a/test/unexpectedAssetGraph.js b/test/unexpectedAssetGraph.js
index <HASH>..<HASH> 100644
--- a/test/unexpectedAssetGraph.js
+++ b/test/unexpectedAssetGraph.js
@@ -73,7 +73,13 @@ module.exports = {
} else if (typeof number === 'undefined') {
number = 1;
}
- expect(subject.findAssets(value), 'to have length', number);
+ const foundAssets = subject.findAssets(value);
+ expect(foundAssets, 'to have length', number);
+ if (number === 1) {
+ return foundAssets[0];
+ } else {
+ return foundAssets;
+ }
});
expect.addAssertion('<AssetGraph> to contain (url|urls) <string|array?>', function (expect, subject, urls) {
@@ -103,7 +109,13 @@ module.exports = {
number = 1;
}
this.errorMode = 'nested';
- expect(subject.findRelations(queryObj), 'to have length', number);
+ const foundRelations = subject.findRelations(queryObj);
+ expect(foundRelations, 'to have length', number);
+ if (number === 1) {
+ return foundRelations[0];
+ } else {
+ return foundRelations;
+ }
});
expect.addAssertion('<AssetGraph> to contain [no] (relation|relations) [including unresolved] <string|object|number> <number?>', function (expect, subject, queryObj, number) {
|
Test, to contain {asset,relation}(s): Provide the found asset(s) as the fulfillment value of the assertion
|
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
@@ -61,9 +61,9 @@ module SpecHelpers
"#{RUN_ID}-topic-#{SecureRandom.uuid}"
end
- def create_random_topic(*args)
+ def create_random_topic(**args)
topic = generate_topic_name
- create_topic(topic, *args)
+ create_topic(topic, **args)
topic
end
diff --git a/spec/transaction_manager_spec.rb b/spec/transaction_manager_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/transaction_manager_spec.rb
+++ b/spec/transaction_manager_spec.rb
@@ -591,10 +591,10 @@ describe ::Kafka::TransactionManager do
)
)
allow(group_coordinator).to receive(:txn_offset_commit).and_return(
- txn_offset_commit_response(
+ txn_offset_commit_response({
'hello' => [1],
'world' => [2]
- )
+ })
)
end
|
Resolve "Passing the keyword argument as ..." deprecation warning
|
diff --git a/src/Provider/AssetServiceProvider.php b/src/Provider/AssetServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Provider/AssetServiceProvider.php
+++ b/src/Provider/AssetServiceProvider.php
@@ -34,11 +34,12 @@ class AssetServiceProvider implements ServiceProviderInterface
$app['asset.file.hash'] = $app->protect(function ($fileName) use ($app) {
$fullPath = $app['resources']->getPath('root') . '/' . $fileName;
+
if (is_readable($fullPath)) {
- return substr(md5($app['asset.salt'] . filemtime($fullPath)), 0, 10);
+ return substr(md5($app['asset.salt'] . (string) filemtime($fullPath, 0, 10)));
+ } elseif (is_readable($fileName)) {
+ return substr(md5($app['asset.salt'] . (string) filemtime($fileName)), 0, 10);
}
-
- return substr(md5($app['asset.salt'] . $fileName), 0, 10);
});
$app['asset.injector'] = $app->share(
|
Only return a hash if the file can be found
|
diff --git a/container.php b/container.php
index <HASH>..<HASH> 100644
--- a/container.php
+++ b/container.php
@@ -159,7 +159,7 @@ class Metrodi_Container {
$loaded = FALSE;
foreach ($this->searchDirs as $_dir) {
if(file_exists($_dir.$filesep.$file)) {
- if(include_once($file)) {
+ if(include_once($_dir.$filesep.$file)) {
$loaded = TRUE;
break;
}
|
Fix loading file bug.
Missing directory path, but still passed unit tests.
|
diff --git a/lib/src/controller.php b/lib/src/controller.php
index <HASH>..<HASH> 100644
--- a/lib/src/controller.php
+++ b/lib/src/controller.php
@@ -400,7 +400,7 @@ class Trails_Controller {
* @return object a response object
*/
function rescue($exception) {
- return ($this->response = $this->dispatcher->trails_error($exception));
+ return $this->dispatcher->trails_error($exception);
}
}
|
Controller#rescue does not have to set response
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.