diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/pygccxml/utils/utils.py b/pygccxml/utils/utils.py
index <HASH>..<HASH> 100644
--- a/pygccxml/utils/utils.py
+++ b/pygccxml/utils/utils.py
@@ -155,7 +155,7 @@ def remove_file_no_raise(file_name, config):
try:
if os.path.exists(file_name):
os.remove(file_name)
- except Exception as error:
+ except IOError as error:
loggers.root.error(
"Error occurred while removing temporary created file('%s'): %s",
file_name, str(error))
|
Catch IOError instead of all Exceptions
|
diff --git a/src/FormComponents/index.js b/src/FormComponents/index.js
index <HASH>..<HASH> 100644
--- a/src/FormComponents/index.js
+++ b/src/FormComponents/index.js
@@ -220,7 +220,11 @@ export const renderBlueprintCheckbox = props => {
label={label}
onChange={function(e, val) {
input.onChange(e, val);
- onFieldSubmit(e.target ? e.target.value : val);
+ let valToUse = val;
+ if (e.target) {
+ valToUse = e.target.value !== "false";
+ }
+ onFieldSubmit(valToUse);
}}
/>
);
|
fixing CheckboxField's onFieldSubmit
|
diff --git a/hotdoc/core/extension.py b/hotdoc/core/extension.py
index <HASH>..<HASH> 100644
--- a/hotdoc/core/extension.py
+++ b/hotdoc/core/extension.py
@@ -392,6 +392,8 @@ class Extension(Configurable):
for source_file, symbols in list(self._created_symbols.items()):
gen_symbols = symbols - user_symbols
+ if not gen_symbols:
+ continue
self.__add_subpage(tree, index, source_file, gen_symbols)
tree.stale_symbol_pages(symbols)
|
extension: no need to generate a page with no symbols
|
diff --git a/ghproxy/ghcache/ghcache.go b/ghproxy/ghcache/ghcache.go
index <HASH>..<HASH> 100644
--- a/ghproxy/ghcache/ghcache.go
+++ b/ghproxy/ghcache/ghcache.go
@@ -192,6 +192,7 @@ func (u upstreamTransport) RoundTrip(req *http.Request) (*http.Response, error)
apiVersion := "v3"
if strings.HasPrefix(req.URL.Path, "graphql") || strings.HasPrefix(req.URL.Path, "/graphql") {
+ resp.Header.Set("Cache-Control", "no-store")
apiVersion = "v4"
}
|
Ensure ghproxy not to use cache for github v4 api
github api v4 [1] has different limit from v3 and the mechanism used
in our caching for v3 does not apply any more.
More specifically, headers like `If-None-Match`, or `If-Modified-Since` [2]
are not mentioned in the v4 doc [1].
[1]. <URL>
|
diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py
index <HASH>..<HASH> 100644
--- a/netmiko/base_connection.py
+++ b/netmiko/base_connection.py
@@ -209,7 +209,11 @@ class BaseConnection(object):
self.remote_conn.write(write_bytes(out_data))
else:
raise ValueError("Invalid protocol specified")
- log.debug("write_channel: {}".format(write_bytes(out_data)))
+ try:
+ log.debug("write_channel: {}".format(write_bytes(out_data)))
+ except UnicodeDecodeError:
+ # Don't log non-ASCII characters; this is null characters and telnet IAC
+ pass
def write_channel(self, out_data):
"""Generic handler that will write to both SSH and telnet channel."""
|
Fix netmiko logging issue with non-ASCII characters
|
diff --git a/lib/action_subscriber/middleware/error_handler.rb b/lib/action_subscriber/middleware/error_handler.rb
index <HASH>..<HASH> 100644
--- a/lib/action_subscriber/middleware/error_handler.rb
+++ b/lib/action_subscriber/middleware/error_handler.rb
@@ -8,26 +8,10 @@ module ActionSubscriber
end
def call(env)
- job_mutex = ::Mutex.new
- job_complete = ::ConditionVariable.new
-
- job_mutex.synchronize do
- ::Thread.new do
- job_mutex.synchronize do
- begin
- @app.call(env)
- rescue => error
- logger.error "FAILED #{env.message_id}"
- ::ActionSubscriber.configuration.error_handler.call(error, env.to_h)
- ensure
- job_complete.signal
- end
- end
- end
-
- # TODO we might want to pass a timeout to this wait so we can handle jobs that get frozen
- job_complete.wait(job_mutex)
- end
+ @app.call(env)
+ rescue => error
+ logger.error "FAILED #{env.message_id}"
+ ::ActionSubscriber.configuration.error_handler.call(error, env.to_h)
end
end
end
|
Remove extra thread in error handler - already in a threadpool
|
diff --git a/src/Storage/Field/Type/TaxonomyType.php b/src/Storage/Field/Type/TaxonomyType.php
index <HASH>..<HASH> 100644
--- a/src/Storage/Field/Type/TaxonomyType.php
+++ b/src/Storage/Field/Type/TaxonomyType.php
@@ -185,11 +185,11 @@ class TaxonomyType extends JoinTypeBase
switch ($platform) {
case 'mysql':
- return "GROUP_CONCAT($column ORDER BY $order ASC) as $alias";
+ return "GROUP_CONCAT($column ORDER BY $order ASC SEPARATOR '|') as $alias";
case 'sqlite':
- return "GROUP_CONCAT($column) as $alias";
+ return "GROUP_CONCAT($column, '|') as $alias";
case 'postgresql':
- return "string_agg($column" . "::character varying, ',' ORDER BY $order) as $alias";
+ return "string_agg($column" . "::character varying, '|' ORDER BY $order) as $alias";
}
throw new StorageException(sprintf('Unsupported platform: %s', $platform));
|
change separator character on taxonomy queries
|
diff --git a/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/OrientationListnerService.java b/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/OrientationListnerService.java
index <HASH>..<HASH> 100644
--- a/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/OrientationListnerService.java
+++ b/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/OrientationListnerService.java
@@ -14,6 +14,7 @@ public class OrientationListnerService extends Service{
mOrientationListener = new OrientationEventListener(this) {
@Override
public void onOrientationChanged(int rotation) {
+ if(rotation != -1){
if(rotation >=315 && rotation < 45){
mRotation = 0;
}else if(rotation >=45 && rotation < 135){
@@ -26,6 +27,7 @@ public class OrientationListnerService extends Service{
mRotation = 0;
}
}
+ }
};
}
@Override
|
Samsung device preview Rotation issue fix
Samsung device preview Rotation issue fix
|
diff --git a/components/place-under-ng/place-under-ng.js b/components/place-under-ng/place-under-ng.js
index <HASH>..<HASH> 100644
--- a/components/place-under-ng/place-under-ng.js
+++ b/components/place-under-ng/place-under-ng.js
@@ -1,5 +1,5 @@
/**
- * @name Auth
+ * @name Place Under Ng
* @fileoverview This directive is a helper. Element with rg-place-under=".some-selector"
* attribute will be manually positioned under the provided element. Target element
* position should be 'absolute'
|
RG-<I> fix wrong named place-under-ng
Former-commit-id: <I>a<I>bdd4ed1f<I>a8b<I>b<I>ed<I>dbd6
|
diff --git a/core/AssetManager.php b/core/AssetManager.php
index <HASH>..<HASH> 100644
--- a/core/AssetManager.php
+++ b/core/AssetManager.php
@@ -125,6 +125,7 @@ class Piwik_AssetManager
}
$mergedContent = cssmin::minify($mergedContent);
+ $mergedContent = str_replace("\n", "\r\n", $mergedContent);
// Remove the previous file
self::removeMergedAsset(self::MERGED_CSS_FILE);
@@ -233,6 +234,7 @@ class Piwik_AssetManager
$mergedContent = $mergedContent . PHP_EOL . $content;
}
+ $mergedContent = str_replace("\n", "\r\n", $mergedContent);
// Remove the previous file
self::removeMergedAsset(self::MERGED_JS_FILE);
diff --git a/core/Http.php b/core/Http.php
index <HASH>..<HASH> 100644
--- a/core/Http.php
+++ b/core/Http.php
@@ -294,6 +294,7 @@ class Piwik_Http
CURLOPT_USERAGENT => 'Piwik/'.Piwik_Version::VERSION.($userAgent ? " $userAgent" : ''),
CURLOPT_HEADER => false,
CURLOPT_CONNECTTIMEOUT => $timeout,
+// CURLOPT_CAINFO => PIWIK_INCLUDE_PATH . '/core/DataFiles/cacert.pem',
);
@curl_setopt_array($ch, $curl_options);
|
convert EOL on merged assets to make it more readable on Windows (when debugging)
git-svn-id: <URL>
|
diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -14,6 +14,10 @@ var url = require("url");
module.exports = function() {
// A server object.
var self = new events.EventEmitter();
+ // A repository of sockets consisting of opened socket and closed socket
+ // only. A socket has id but it doesn't need to be public now so that array
+ // is used to hide it. TODO
+ self.sockets = [];
// Options to configure server and client.
var options = {
// A heartbeat interval in milliseconds.
@@ -32,9 +36,17 @@ module.exports = function() {
// A link between Cettia protocol and Cettia transport protocol. `transport` is
// expected to be passed from Cettia transport server.
self.handle = function(transport) {
- // Builds a socket on top of a transport and fires `socket` event to
- // server.
- self.emit("socket", createSocket(transport, options));
+ // Builds a socket on top of a transport
+ var socket = createSocket(transport, options);
+ // TODO
+ self.sockets.push(socket);
+ socket.on("close", function() {
+ // It equals to `self.sockets.remove(socket)`.
+ self.sockets.splice(self.sockets.indexOf(socket), 1);
+ });
+ // Fires `socket` event to server. This is the beginning of the socket
+ // life cycle.
+ self.emit("socket", socket);
};
return self;
};
|
Add a repository for sockets to server #1
|
diff --git a/test/acceptance/index-test.js b/test/acceptance/index-test.js
index <HASH>..<HASH> 100644
--- a/test/acceptance/index-test.js
+++ b/test/acceptance/index-test.js
@@ -353,7 +353,7 @@ describe('Acceptance', function() {
before(function() {
this.timeout(10 * 60 * 1000);
- init(true, false);
+ init(false, false);
copyFixtures(getFastbootFixtureName, getClientFixtureName);
|
don't earlyReturn on CI, too many issues
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -277,6 +277,7 @@ AwsHelper.Logger = function (tags) {
return log;
};
+/* istanbul ignore next */
process.on('uncaughtException', function (err) {
var log = AwsHelper.log;
if (Object.keys(AwsHelper.log).length === 0) {
|
Ignore difficult to test code block
|
diff --git a/drf_haystack/filters.py b/drf_haystack/filters.py
index <HASH>..<HASH> 100644
--- a/drf_haystack/filters.py
+++ b/drf_haystack/filters.py
@@ -10,7 +10,6 @@ from django.core.exceptions import ImproperlyConfigured
from django.utils import six
from haystack.utils.geo import D, Point
-from haystack.backends.elasticsearch_backend import ElasticsearchSearchBackend
from rest_framework.filters import BaseFilterBackend
@@ -149,7 +148,7 @@ class HaystackGEOSpatialFilter(HaystackFilter):
latitude, longitude = map(float, filters["from"].split(","))
point = Point(longitude, latitude, srid=getattr(settings, "GEO_SRID", 4326))
if point and distance:
- if isinstance(queryset.query.backend, ElasticsearchSearchBackend):
+ if queryset.query.backend.__class__.__name__ == "ElasticsearchSearchBackend":
# TODO: Make sure this is only applied if using a malfunction elasticsearch backend!
# NOTE: https://github.com/toastdriven/django-haystack/issues/957
# FIXME: Remove when upstream haystack bug is resolved
|
Avoid `MissingDependency` when using another search backend than Elasticsearch.
Fixed #3
|
diff --git a/src/txkube/test/test_authentication.py b/src/txkube/test/test_authentication.py
index <HASH>..<HASH> 100644
--- a/src/txkube/test/test_authentication.py
+++ b/src/txkube/test/test_authentication.py
@@ -351,11 +351,11 @@ class ChainTests(TestCase):
BasicConstraints(True, None),
critical=True,
)
- return builder.public_key(a_key.public_key(),
+ return builder.public_key(pubkey,
).serial_number(1,
).not_valid_before(datetime.utcnow(),
).not_valid_after(datetime.utcnow() + timedelta(seconds=1),
- ).sign(a_key, SHA256(), default_backend(),
+ ).sign(privkey, SHA256(), default_backend(),
)
a_cert = cert(u"a.invalid", u"a.invalid", a_key.public_key(), a_key, True)
|
Ensure generated certificates use provided key arguments.
The cert function takes as parameters a public key to include in the
cert, and a private key to sign the cert. Currently, both are always the
root key, which deviates from the arguments supplied to cert later in
the test.
Discussed on twisted-web:
<URL>
|
diff --git a/src/authorize.js b/src/authorize.js
index <HASH>..<HASH> 100644
--- a/src/authorize.js
+++ b/src/authorize.js
@@ -40,7 +40,6 @@
if(params) {
document.location.hash = '';
}
- console.log("found Params : ", params);
remoteStorage.on('features-loaded', function() {
if(params) {
if(params.access_token) {
|
removed logging from RemoteStorage.Authorize
|
diff --git a/spec/support/bosh_runner.rb b/spec/support/bosh_runner.rb
index <HASH>..<HASH> 100644
--- a/spec/support/bosh_runner.rb
+++ b/spec/support/bosh_runner.rb
@@ -36,10 +36,8 @@ module Bosh::Spec
exit_code = 0
time = Benchmark.realtime do
- Open3.popen2(env, command, {:err => [:child, :out]}) do |_, stdout, wait_thr|
- output = stdout.read
- exit_code = wait_thr.value
- end
+ output, _, process_status = Open3.capture3(env, command, {:err => [:child, :out]})
+ exit_code = process_status.exitstatus
end
@logger.info "Exit code is #{exit_code}"
|
Properly save exit status in integration tests
|
diff --git a/server/plugins/clusterauth/jwtauth.routes.js b/server/plugins/clusterauth/jwtauth.routes.js
index <HASH>..<HASH> 100644
--- a/server/plugins/clusterauth/jwtauth.routes.js
+++ b/server/plugins/clusterauth/jwtauth.routes.js
@@ -4,7 +4,7 @@ module.exports = function (server, conf) {
var handlers = require('./jwtauth.handlers')(server, conf);
var Joi = require('joi');
- var clustermodel = require('../clustermodel');
+ var clustermodel = require('clustermodel');
server.auth.strategy('token', 'jwt', {
key: conf.privateKey,
diff --git a/server/plugins/clusterprovider/dataprovider.routes.js b/server/plugins/clusterprovider/dataprovider.routes.js
index <HASH>..<HASH> 100644
--- a/server/plugins/clusterprovider/dataprovider.routes.js
+++ b/server/plugins/clusterprovider/dataprovider.routes.js
@@ -4,7 +4,7 @@ module.exports = function (server, conf) {
var handlers = require('./dataprovider.handlers')(server, conf);
var Joi = require('joi');
- var clustermodel = require('../clustermodel');
+ var clustermodel = require('clustermodel');
server.route({
path: '/dataprovider',
|
STYLE: Use the package clustermodel instead of the relative path
|
diff --git a/shared/actions/wallets.js b/shared/actions/wallets.js
index <HASH>..<HASH> 100644
--- a/shared/actions/wallets.js
+++ b/shared/actions/wallets.js
@@ -266,7 +266,11 @@ const createPaymentsReceived = (accountID, payments, pending) =>
const loadPayments = (state, action) =>
!actionHasError(action) &&
- (action.type === WalletsGen.selectAccount ||
+ (!!(
+ action.type === WalletsGen.selectAccount &&
+ action.payload.accountID &&
+ action.payload.accountID !== Types.noAccountID
+ ) ||
Constants.getAccount(state, action.payload.accountID).accountID !== Types.noAccountID) &&
Promise.all([
RPCStellarTypes.localGetPendingPaymentsLocalRpcPromise({accountID: action.payload.accountID}),
|
check accountID when selecting account before loading payments (#<I>)
|
diff --git a/lib/puppet/version.rb b/lib/puppet/version.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/version.rb
+++ b/lib/puppet/version.rb
@@ -6,7 +6,7 @@
# Raketasks and such to set the version based on the output of `git describe`
module Puppet
- PUPPETVERSION = '4.10.12'
+ PUPPETVERSION = '4.10.13'
##
# version is a public API method intended to always provide a fast and
|
(packaging) Bump to version '<I>' [no-promote]
|
diff --git a/php/utils.php b/php/utils.php
index <HASH>..<HASH> 100644
--- a/php/utils.php
+++ b/php/utils.php
@@ -8,8 +8,8 @@ use \WP_CLI\Dispatcher;
function load_dependencies() {
$vendor_paths = array(
- WP_CLI_ROOT . '../../../../vendor', // part of a larger project
WP_CLI_ROOT . '../vendor', // top-level project
+ WP_CLI_ROOT . '../../../../vendor', // part of a larger project
);
$has_autoload = false;
@@ -18,7 +18,6 @@ function load_dependencies() {
if ( file_exists( $vendor_path . '/autoload.php' ) ) {
require $vendor_path . '/autoload.php';
$has_autoload = true;
- break;
}
}
|
autoload from local vendor dir, then from global
This allows running `composer update` on the spot and without switching the wp-cli repo
back to the master branch.
This also allows using suggested packages from a super-project (most
common being ~/.composer).
|
diff --git a/tagflag.go b/tagflag.go
index <HASH>..<HASH> 100644
--- a/tagflag.go
+++ b/tagflag.go
@@ -344,7 +344,7 @@ func (p *parser) addAny(cmd *command, fv reflect.Value, sf reflect.StructField)
case "pos":
p.addArg(cmd, fv, sf)
default:
- if fv.Kind() == reflect.Struct {
+ if fv.Kind() == reflect.Struct && unsettableType(fv.Type()) != nil {
name := sf.Tag.Get("name")
if name == "" {
name = sf.Name
|
Fix handling of non-pointer custom types
|
diff --git a/doc/index.php b/doc/index.php
index <HASH>..<HASH> 100644
--- a/doc/index.php
+++ b/doc/index.php
@@ -36,15 +36,19 @@
}
?>
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php print_string("documentation")?></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=<?php print_string("thischarset") ?>" />
</head>
<frameset rows="70,*">
- <frame name="top" src="top.php">
+ <frame name="top" src="top.php" />
<frameset cols="200,*">
- <frame name="contents" src="contents.php">
- <frame name="main" src="index.php?file=<?php echo "$file$sub"; ?>">
+ <frame name="contents" src="contents.php" />
+ <frame name="main" src="index.php?file=<?php echo "$file$sub"; ?>" />
</frameset>
</frameset>
+</html>
|
Some changes added (see bug <I>).
- Added correct encoding.
- Make page XHTML <I> Frameset compliant
Credits go to sunner_sun.
(<URL>)
Merged from MOODLE_<I>_STABLE
|
diff --git a/js/jquery.fileupload.js b/js/jquery.fileupload.js
index <HASH>..<HASH> 100644
--- a/js/jquery.fileupload.js
+++ b/js/jquery.fileupload.js
@@ -434,6 +434,13 @@
}
},
+ _deinitProgressListener: function (options) {
+ var xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
+ if (xhr.upload) {
+ $(xhr.upload).unbind('progress');
+ }
+ },
+
_isInstanceOf: function (type, obj) {
// Cross-frame instanceof check
return Object.prototype.toString.call(obj) === '[object ' + type + ']';
@@ -812,6 +819,9 @@
o.context,
[jqXHR, textStatus, errorThrown]
);
+ })
+ .always(function () {
+ that._deinitProgressListener(o);
});
};
this._enhancePromise(promise);
@@ -913,6 +923,7 @@
}).fail(function (jqXHR, textStatus, errorThrown) {
that._onFail(jqXHR, textStatus, errorThrown, options);
}).always(function (jqXHRorResult, textStatus, jqXHRorError) {
+ that._deinitProgressListener(options);
that._onAlways(
jqXHRorResult,
textStatus,
|
Explicit deinitialization of progress listeners.
This addresses a memory leak with Microsoft Edge.
Thanks @butonic for the report, investigation and fix.
Closes #<I>
|
diff --git a/src/conversions.php b/src/conversions.php
index <HASH>..<HASH> 100644
--- a/src/conversions.php
+++ b/src/conversions.php
@@ -62,6 +62,32 @@ function toFloat ($val)
return floatval ($val);
}
+/**
+ * Always rounds up (unlike {@see round}).
+ *
+ * @param float|string $number
+ * @param int $precision
+ * @return float|int
+ */
+function round_up ($number, $precision = 0)
+{
+ $fig = (int)str_pad ('1', $precision + 1, '0');
+ return (ceil ((float)$number * $fig) / $fig);
+}
+
+/**
+ * Always rounds down (unlike {@see round}).
+ *
+ * @param float|string $number
+ * @param int $precision
+ * @return float|int
+ */
+function round_down ($number, $precision = 0)
+{
+ $fig = (int)str_pad ('1', $precision + 1, '0');
+ return (floor ((float)$number * $fig) / $fig);
+}
+
function friendlySize ($size, $precision = 0)
{
$units = ['bytes', 'Kb', 'Mb', 'Gb', 'Tb'];
|
round_up() and round_down()
|
diff --git a/tests/test_tokenize.py b/tests/test_tokenize.py
index <HASH>..<HASH> 100644
--- a/tests/test_tokenize.py
+++ b/tests/test_tokenize.py
@@ -452,7 +452,7 @@ class TestTokenizePackage(unittest.TestCase):
tltk.syllable_tokenize(
"ฉันรักภาษาไทยเพราะฉันเป็นคนไทย"
),
- ['ฉัน', 'รัก', 'ภาษาไทย', 'เพราะ', 'ฉัน', 'เป็น', 'คน', 'ไทย'],
+ ['ฉัน', 'รัก', 'ภา', 'ษา', 'ไทย', 'เพราะ', 'ฉัน', 'เป็น', 'คน', 'ไทย'],
)
self.assertEqual(tltk.syllable_tokenize(None), [])
self.assertEqual(tltk.syllable_tokenize(""), [])
|
Update test_tokenize.py
|
diff --git a/core/src/test/java/org/bitcoinj/wallet/WalletTest.java b/core/src/test/java/org/bitcoinj/wallet/WalletTest.java
index <HASH>..<HASH> 100644
--- a/core/src/test/java/org/bitcoinj/wallet/WalletTest.java
+++ b/core/src/test/java/org/bitcoinj/wallet/WalletTest.java
@@ -3699,4 +3699,16 @@ public class WalletTest extends TestWithWallet {
assertNull(wallet.findKeyFromAddress(LegacyAddress.fromKey(UNITTEST, p2wpkhKey)));
assertEquals(p2wpkhKey, wallet.findKeyFromAddress(SegwitAddress.fromKey(UNITTEST, p2wpkhKey)));
}
+
+ @Test
+ public void roundtripViaMnemonicCode() {
+ Wallet wallet = Wallet.createDeterministic(UNITTEST, Script.ScriptType.P2WPKH);
+ List<String> mnemonicCode = wallet.getKeyChainSeed().getMnemonicCode();
+ final DeterministicSeed clonedSeed = new DeterministicSeed(mnemonicCode, null, "",
+ wallet.getEarliestKeyCreationTime());
+ Wallet clone = Wallet.fromSeed(UNITTEST, clonedSeed, Script.ScriptType.P2WPKH);
+ assertEquals(wallet.currentReceiveKey(), clone.currentReceiveKey());
+ assertEquals(wallet.freshReceiveAddress(Script.ScriptType.P2PKH),
+ clone.freshReceiveAddress(Script.ScriptType.P2PKH));
+ }
}
|
WalletTest: Add test for roundtripping a wallet via its mnemonic code.
|
diff --git a/SortableGridBehavior.php b/SortableGridBehavior.php
index <HASH>..<HASH> 100644
--- a/SortableGridBehavior.php
+++ b/SortableGridBehavior.php
@@ -53,6 +53,9 @@ class SortableGridBehavior extends Behavior
$i = 0;
foreach ($items as $item) {
/** @var \yii\db\ActiveRecord $row */
+ $item = json_decode($item);
+ if(is_object($item))
+ $item = get_object_vars($item);
$row = $model::findOne($item);
if ($row->{$this->sortableAttribute} != $i) {
$row->updateAttributes([$this->sortableAttribute => $i]);
|
added json_decode for item
|
diff --git a/tests/CfdiUtilsTests/Utils/Internal/ShellExecTest.php b/tests/CfdiUtilsTests/Utils/Internal/ShellExecTest.php
index <HASH>..<HASH> 100644
--- a/tests/CfdiUtilsTests/Utils/Internal/ShellExecTest.php
+++ b/tests/CfdiUtilsTests/Utils/Internal/ShellExecTest.php
@@ -2,7 +2,7 @@
namespace CfdiUtilsTests\Utils\Internal;
use CfdiUtils\Utils\Internal\ShellExec;
-use PHPUnit\Framework\TestCase;
+use CfdiUtilsTests\TestCase;
class ShellExecTest extends TestCase
{
@@ -113,6 +113,11 @@ class ShellExecTest extends TestCase
public function testStdinDoesNotLockProcess()
{
+ $currentVersion = sprintf('%s.%s', PHP_MAJOR_VERSION, PHP_MINOR_VERSION);
+ if ($this->isRunningOnWindows() && '7.0' === $currentVersion) {
+ $this->markTestSkipped('This test fail on MS Windows with PHP 7.0');
+ }
+
$printer = implode(PHP_EOL, [
'fgets(STDIN);',
'file_put_contents("php://stdout", "BYE", FILE_APPEND);',
|
Avoid test where execution result on open stdin on WIN and PHP <I>
|
diff --git a/src/com/google/bitcoin/core/Block.java b/src/com/google/bitcoin/core/Block.java
index <HASH>..<HASH> 100644
--- a/src/com/google/bitcoin/core/Block.java
+++ b/src/com/google/bitcoin/core/Block.java
@@ -33,7 +33,7 @@ import static com.google.bitcoin.core.Utils.*;
* you grab it from a downloaded {@link BlockChain}.
*/
public class Block extends Message {
- private static final long serialVersionUID = -2834162413473103042L;
+ private static final long serialVersionUID = 2738848929966035281L;
static final long ALLOWED_TIME_DRIFT = 2 * 60 * 60; // Same value as official client.
/** A value for difficultyTarget (nBits) that allows half of all possible hash solutions. Used in unit testing. */
|
Change serialVer on Block. Patch from Andreas.
|
diff --git a/pyp2rpm/logger.py b/pyp2rpm/logger.py
index <HASH>..<HASH> 100644
--- a/pyp2rpm/logger.py
+++ b/pyp2rpm/logger.py
@@ -16,11 +16,11 @@ class LoggerWriter(object):
self.errors = None
def write(self, message):
- if message != '\n':
- self.level(message)
+ if message not in ('\n', ''):
+ self.level(message.rstrip('\n'))
def flush(self):
- self.level(sys.stderr)
+ pass
class LevelFilter(logging.Filter):
diff --git a/pyp2rpm/metadata_extractors.py b/pyp2rpm/metadata_extractors.py
index <HASH>..<HASH> 100644
--- a/pyp2rpm/metadata_extractors.py
+++ b/pyp2rpm/metadata_extractors.py
@@ -388,7 +388,7 @@ class DistMetadataExtractor(SetupPyMetadataExtractor):
raise SystemExit(3)
with utils.ChangeDir(os.path.dirname(setup_py)):
- with utils.RedirectStdStreams(stdout=os.devnull,
+ with utils.RedirectStdStreams(stdout=LoggerWriter(logger.debug),
stderr=LoggerWriter(logger.warning)):
extract_distribution.run_setup(setup_py, 'bdist_rpm')
|
Fix aborting redirection of streams to logger
- redirect stdout to logging debug level
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,21 @@ setup(
scripts=['bypy.py', 'bypygui.pyw'],
keywords = ['bypy', 'bypy.py', 'baidu pcs', 'baidu yun', 'baidu pan', 'baidu netdisk',
'baidu cloud storage', 'baidu personal cloud storage',
- '百度云', '百度云盘', '百度网盘', '百度个人云存储']
+ '百度云', '百度云盘', '百度网盘', '百度个人云存储'],
+ classifiers = [
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Console',
+ 'Intended Audience :: End Users/Desktop',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: System Administrators',
+ 'License :: OSI Approved :: MIT License',
+ 'Natural Language :: English',
+ 'Operating System :: MacOS :: MacOS X',
+ 'Operating System :: Microsoft :: Windows',
+ 'Operating System :: POSIX',
+ 'Programming Language :: Python',
+ 'Topic :: Utilities',
+ 'Topic :: Internet :: WWW/HTTP']
)
# vim: set fileencoding=utf-8
|
Add in classifiers in setup.py
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ SETUP_REQ = [
]
TESTS_REQ = [
- 'hypothesis==3.38.0',
+ 'hypothesis==3.38.3',
'hypothesis-pytest==0.19.0',
'py==1.5.2',
'pytest==3.2.5',
|
update to latest hypothesis (<I>)
|
diff --git a/lib/mongoid/relations/referenced/many_to_many.rb b/lib/mongoid/relations/referenced/many_to_many.rb
index <HASH>..<HASH> 100644
--- a/lib/mongoid/relations/referenced/many_to_many.rb
+++ b/lib/mongoid/relations/referenced/many_to_many.rb
@@ -173,8 +173,16 @@ module Mongoid # :nodoc:
# @return [ Many ] The relation.
#
# @since 2.0.0.rc.1
- def substitute(target, options = {})
- tap { target ? (@target = target.to_a; bind(options)) : (@target = unbind(options)) }
+ def substitute(new_target, options = {})
+ tap do |relation|
+ if new_target
+ binding.unbind(options)
+ relation.target = new_target.to_a
+ bind(options)
+ else
+ relation.target = unbind(options)
+ end
+ end
end
# Unbinds the base object to the inverse of the relation. This occurs
|
Fixing replacement of an existing many-to-many relation. Fixes #<I>.
|
diff --git a/src/main/java/eu/hansolo/tilesfx/skins/TimelineTileSkin.java b/src/main/java/eu/hansolo/tilesfx/skins/TimelineTileSkin.java
index <HASH>..<HASH> 100644
--- a/src/main/java/eu/hansolo/tilesfx/skins/TimelineTileSkin.java
+++ b/src/main/java/eu/hansolo/tilesfx/skins/TimelineTileSkin.java
@@ -664,16 +664,6 @@ public class TimelineTileSkin extends TileSkin {
}
stdDeviation = Statistics.getChartDataStdDev(reducedDataList);
- if (DATA.getValue() <= tile.getLowerThreshold()) {
- tile.showNotifyRegion(true);
- tile.setTooltipText("Value below lower threshold");
- } else if (DATA.getValue() >= tile.getThreshold()) {
- tile.showNotifyRegion(true);
- tile.setTooltipText("Value above upper threshold");
- } else {
- tile.showNotifyRegion(false);
- tile.setTooltipText("");
- }
analyse(reducedDataList);
|
Removed automatic handling of notify region in TimelineTileSkin
|
diff --git a/dispatch/modules/auth/actions.py b/dispatch/modules/auth/actions.py
index <HASH>..<HASH> 100644
--- a/dispatch/modules/auth/actions.py
+++ b/dispatch/modules/auth/actions.py
@@ -40,12 +40,13 @@ def list_actions(count=25):
if action.object_type == 'article':
try:
article = Article.objects.get(parent_id=action.object_id, head=True)
- meta = {}
- meta['author'] = action.person.full_name
- meta['headline'] = article.headline
- meta['article_url'] = article.get_absolute_url()
- meta['count'] = count
- meta['action'] = SINGULAR[action.action] if count == 1 else PLURAL[action.action]
+ meta = {
+ 'author': action.person.full_name,
+ 'headline': article.headline,
+ 'article_url': article.get_absolute_url(),
+ 'count': count,
+ 'action': SINGULAR[action.action] if count == 1 else PLURAL[action.action],
+ }
except:
continue
|
changed how fields in the meta obj is defined
|
diff --git a/codenerix/static/codenerix/js/codenerix.js b/codenerix/static/codenerix/js/codenerix.js
index <HASH>..<HASH> 100644
--- a/codenerix/static/codenerix/js/codenerix.js
+++ b/codenerix/static/codenerix/js/codenerix.js
@@ -1348,7 +1348,6 @@ if (typeof(get_static)=="undefined") {
} else {
var result = "/static/"+path;
}
- console.log("get_static("+path+"): "+result);
return result;
};
}
diff --git a/codenerix/views.py b/codenerix/views.py
index <HASH>..<HASH> 100644
--- a/codenerix/views.py
+++ b/codenerix/views.py
@@ -529,7 +529,7 @@ class GenBase(object):
# Constants
BASE_URL = getattr(settings, 'BASE_URL', '')
- DEFAULT_STATIC_PARTIAL_ROWS = 'codenerix/partials/rows.html'
+ DEFAULT_STATIC_PARTIAL_ROWS = os.path.join(settings.STATIC_URL, 'codenerix/partials/rows.html')
def dispatch(self, *args, **kwargs):
# Save arguments in the environment
|
DEFAULT_STATIC_PARTIAL_ROWS now address to the right path
|
diff --git a/scripts/config/travis.js b/scripts/config/travis.js
index <HASH>..<HASH> 100644
--- a/scripts/config/travis.js
+++ b/scripts/config/travis.js
@@ -2,7 +2,8 @@
module.exports = {
expUsername: process.env.EXP_USERNAME,
expPassword: process.env.EXP_PASSWORD,
- expReleaseChannel: process.env.EXP_CHANNEL || process.env.TRAVIS_PULL_REQUEST_BRANCH,
+ expReleaseChannel:
+ process.env.EXP_CHANNEL || process.env.TRAVIS_PULL_REQUEST_BRANCH || process.env.TRAVIS_BRANCH,
githubUsername: process.env.GITHUB_USERNAME,
githubToken: process.env.GITHUB_TOKEN,
githubOrg: (process.env.TRAVIS_REPO_SLUG || '').split('/')[0],
|
Fix non-pr release branches for Travis
|
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
@@ -14,3 +14,7 @@ ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../spec/dummy/db
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
SchemaComments.setup
+
+Dir.chdir(File.expand_path("../../spec/dummy", __FILE__)) do
+ system('RAILS_ENV=test bin/rake db:create')
+end
|
Call rake db:create to create database for test
|
diff --git a/public/absync.js b/public/absync.js
index <HASH>..<HASH> 100644
--- a/public/absync.js
+++ b/public/absync.js
@@ -168,7 +168,7 @@
// If we have no configured socket.io connection yet, remember to register it later.
if( !_absyncProvider.__ioSocket ) {
- if( _absyncProvider.__registerLater.length > 9999 ) {
+ if( _absyncProvider.__registerLater.length > 8192 ) {
// Be defensive, something is probably not right here.
return null;
}
|
[TASK] Use base2 upper limit in in range check
|
diff --git a/src/pp.js b/src/pp.js
index <HASH>..<HASH> 100644
--- a/src/pp.js
+++ b/src/pp.js
@@ -131,16 +131,6 @@ function hasHardLine(doc) {
});
}
-function _makeIndent(n) {
- var s = "";
-
- for (var i = 0; i < n; i++) {
- s += " ";
- }
-
- return s;
-}
-
const MODE_BREAK = 1;
const MODE_FLAT = 2;
@@ -347,7 +337,7 @@ function print(w, doc) {
pos = 0;
} else {
- out.push("\n" + _makeIndent(ind));
+ out.push("\n" + " ".repeat(ind));
pos = ind;
}
|
Use js native String.repeat() (#<I>)
|
diff --git a/croppie.js b/croppie.js
index <HASH>..<HASH> 100755
--- a/croppie.js
+++ b/croppie.js
@@ -599,6 +599,7 @@
zoomer.step = '0.0001';
zoomer.value = 1;
zoomer.style.display = self.options.showZoomer ? '' : 'none';
+ zoomer.setAttribute('aria-label', 'zoom');
self.element.appendChild(wrap);
wrap.appendChild(zoomer);
|
Accessibility Label (Again)
- Adds label to input
|
diff --git a/lib/generate_models.rb b/lib/generate_models.rb
index <HASH>..<HASH> 100644
--- a/lib/generate_models.rb
+++ b/lib/generate_models.rb
@@ -181,7 +181,7 @@ unless IS_TEST
index_file = File.open('app/assets/javascripts/index.js', 'w')
index_file.puts "module.exports.Result = require('./Result.js').Result;"
index_file.puts "module.exports.ResultSchema = require('./Result.js').ResultSchema;"
- datatypes.each do |datatype|
+ datatypes.each do |datatype, _|
index_file.puts "module.exports.#{datatype} = require('./#{datatype}.js').#{datatype};"
index_file.puts "module.exports.#{datatype}Schema = require('./#{datatype}.js').#{datatype}Schema;"
end
|
Adjusting generator script JS require loop
|
diff --git a/imgaug/imgaug.py b/imgaug/imgaug.py
index <HASH>..<HASH> 100644
--- a/imgaug/imgaug.py
+++ b/imgaug/imgaug.py
@@ -1523,6 +1523,9 @@ class BoundingBox(object):
y2=self.y2 if y2 is None else y2
)
+ def deepcopy(self, x1=None, y1=None, x2=None, y2=None):
+ return self.copy(x1=x1, y1=y1, x2=x2, y2=y2)
+
def __repr__(self):
return self.__str__()
@@ -1675,7 +1678,7 @@ class BoundingBoxesOnImage(object):
"""
# Manual copy is far faster than deepcopy for KeypointsOnImage,
# so use manual copy here too
- bbs = [BoundingBox(x1=bb.x1, y1=bb.y1, x2=bb.x2, y2=bb.y2) for bb in self.bounding_boxes]
+ bbs = [bb.deepcopy() for bb in self.bounding_boxes]
return BoundingBoxesOnImage(bbs, tuple(self.shape))
def __repr__(self):
|
Add deepcopy() to BoundingBox
|
diff --git a/gin.go b/gin.go
index <HASH>..<HASH> 100644
--- a/gin.go
+++ b/gin.go
@@ -318,6 +318,7 @@ func (engine *Engine) RunUnix(file string) (err error) {
return
}
defer listener.Close()
+ os.Chmod(file, 0777)
err = http.Serve(listener, engine)
return
}
|
Set socket to recieve writes (#<I>)
* Set socket to recieve writes
* Update gin.go
|
diff --git a/wishlib/si.py b/wishlib/si.py
index <HASH>..<HASH> 100644
--- a/wishlib/si.py
+++ b/wishlib/si.py
@@ -44,7 +44,7 @@ def inside_softimage():
return False
-def show_qt(qt_class):
+def show_qt(qt_class, modal=False):
"""
Shows and raise a pyqt window inside softimage ensuring it's not duplicated
(if it's duplicated then raise the old one).
@@ -53,13 +53,19 @@ def show_qt(qt_class):
"""
dialog = None
anchor = sianchor()
+ # look for a previous instance
for i in anchor.children():
if type(i).__name__ == qt_class.__name__:
dialog = i
+ # if there's no previous instance then create a new one
if not dialog:
dialog = qt_class(anchor)
- dialog.show()
- dialog.raise_() # ensures dialog window is on top
+ # show dialog
+ if modal:
+ dialog.exec_()
+ else:
+ dialog.show()
+ dialog.raise_() # ensures dialog window is on top
# DECORATORS
|
show_qt() now supports modal mode
|
diff --git a/util.go b/util.go
index <HASH>..<HASH> 100644
--- a/util.go
+++ b/util.go
@@ -12,26 +12,14 @@ func (w WriterFunc) Close() error {
return nil
}
-type chunkWriter struct {
- io.Writer
- chunk int
-}
-
-func ChunkWriter(w io.Writer, chunk int) io.Writer {
- return &chunkWriter{
- Writer: w,
- chunk: chunk,
- }
-}
-
-func (w *chunkWriter) Write(p []byte) (n int, err error) {
+func WriteInChunks(w io.Writer, p []byte, chunk int) (n int, err error) {
var m int
for len(p[n:]) > 0 {
- if n+w.chunk <= len(p) {
- m, err = w.Writer.Write(p[n : n+w.chunk])
+ if chunk <= len(p[n:]) {
+ m, err = w.Write(p[n : n+chunk])
} else {
- m, err = w.Writer.Write(p[n:])
+ m, err = w.Write(p[n:])
}
n += m
|
ChunkWriter replaced with single function WriteInChunks
|
diff --git a/src/main/java/io/dropwizard/flyway/cli/DbCommand.java b/src/main/java/io/dropwizard/flyway/cli/DbCommand.java
index <HASH>..<HASH> 100644
--- a/src/main/java/io/dropwizard/flyway/cli/DbCommand.java
+++ b/src/main/java/io/dropwizard/flyway/cli/DbCommand.java
@@ -34,7 +34,6 @@ public class DbCommand<T extends Configuration> extends AbstractFlywayCommand<T>
@Override
public void configure(final Subparser subparser) {
- super.configure(subparser);
for (AbstractFlywayCommand<T> subCommand : subCommands.values()) {
final Subparser cmdParser = subparser.addSubparsers()
.addParser(subCommand.getName())
|
Prevent duplicate initialization of subparser in Flyway commands
Fixes #3
|
diff --git a/vncdotool/rfb.py b/vncdotool/rfb.py
index <HASH>..<HASH> 100644
--- a/vncdotool/rfb.py
+++ b/vncdotool/rfb.py
@@ -141,7 +141,7 @@ class RFBClient(Protocol):
log.msg("Using protocol version %.3f" % version)
parts = str(version).split('.')
self.transport.write(
- b"RFB %03d.%03d\n" % (int(parts[0]), int(parts[1])))
+ bytes("RFB %03d.%03d\n" % (int(parts[0]), int(parts[1])), 'ascii'))
self._packet[:] = [buffer]
self._packet_len = len(buffer)
self._handler = self._handleExpected
@@ -631,8 +631,8 @@ class RFBDes(pyDes.des):
for i in range(8):
if bsrc & (1 << i):
btgt = btgt | (1 << 7-i)
- newkey.append(chr(btgt))
- super(RFBDes, self).setKey(newkey)
+ newkey.append(btgt)
+ super(RFBDes, self).setKey(bytes(newkey))
# --- test code only, see vncviewer.py
|
RFB Python3 fix: tuple issue addressed, key issue addressed
|
diff --git a/src/render.js b/src/render.js
index <HASH>..<HASH> 100644
--- a/src/render.js
+++ b/src/render.js
@@ -65,14 +65,13 @@ module.exports = function render() {
var changed = [];
this.featureIds.forEach((id) => {
- let featureInternal = this.features[id].internal(mode);
+ let feature = this.features[id];
+ let featureInternal = feature.internal(mode);
var coords = JSON.stringify(featureInternal.geometry.coordinates);
- if (this.ctx.store.needsUpdate(featureInternal)) {
+ if (feature.isValid() && this.ctx.store.needsUpdate(feature.toGeoJSON())) {
this.featureHistory[id] = coords;
- if (this.features[id].isValid()) {
- changed.push(this.features[id].toGeoJSON());
- }
+ changed.push(feature.toGeoJSON());
}
if (featureInternal.geometry.type !== 'Point' && this.features[id].isValid()) {
|
Fix issue where the draw.changed event payload returned all features instead of just the changed features.
|
diff --git a/packages/video/video.showcase.js b/packages/video/video.showcase.js
index <HASH>..<HASH> 100644
--- a/packages/video/video.showcase.js
+++ b/packages/video/video.showcase.js
@@ -108,6 +108,23 @@ export default {
/>
</View>
)
+ },
+ {
+ type: "story",
+ name: "no poster image",
+ component: () => (
+ <View>
+ <Text style={{ marginTop: 10, marginBottom: 10 }}>Mobile size:</Text>
+ <Video {...defaultVideoProps} poster={null} />
+ <Text style={{ marginTop: 20, marginBottom: 10 }}>Desktop size:</Text>
+ <Video
+ {...defaultVideoProps}
+ height={374}
+ poster={null}
+ width={664}
+ />
+ </View>
+ )
}
]
};
|
chore: add storybook story for videos without poster images (#<I>)
|
diff --git a/core/error.rb b/core/error.rb
index <HASH>..<HASH> 100644
--- a/core/error.rb
+++ b/core/error.rb
@@ -3,7 +3,9 @@ class Exception < `Error`
def self.new(message = '')
%x{
- return new Error(message);
+ var err = new Error(message);
+ err._klass = #{self};
+ return err;
}
end
|
Ensure instances of Exception get the right klass set on them
|
diff --git a/tests/classical_psha_based_unittest.py b/tests/classical_psha_based_unittest.py
index <HASH>..<HASH> 100644
--- a/tests/classical_psha_based_unittest.py
+++ b/tests/classical_psha_based_unittest.py
@@ -27,7 +27,7 @@ HAZARD_CURVE = shapes.FastCurve(
LOSS_RATIO_EXCEEDANCE_MATRIX = [[0.695, 0.858, 0.990, 1.000], \
[0.266, 0.510, 0.841, 0.999]]
-class ClassicalPshaBasedTestCase(unittest.TestCase):
+class ClassicalPSHABasedTestCase(unittest.TestCase):
# loss curve tests
def setUp(self):
|
Renamed probabilistic_scenario in classical_psha_based
|
diff --git a/findimports.py b/findimports.py
index <HASH>..<HASH> 100755
--- a/findimports.py
+++ b/findimports.py
@@ -85,7 +85,6 @@ import doctest
import linecache
import optparse
import os
-import sys
import pickle
import re
import sys
|
removed re-import of sys lib
|
diff --git a/etrago/cluster/disaggregation.py b/etrago/cluster/disaggregation.py
index <HASH>..<HASH> 100644
--- a/etrago/cluster/disaggregation.py
+++ b/etrago/cluster/disaggregation.py
@@ -488,20 +488,7 @@ class UniformDisaggregation(Disaggregation):
ws = weight.sum(axis=len(loc))
for bus_id in filtered.index:
values = clt * weight.loc[loc + (bus_id,)] / ws
- # Ok. The stuff below looks complicated, but there's a
- # reason for it and it is weird.
- # Use git blame and see the accompanying commit message
- # for an explanation.
- for size in count(3):
- column = ''.join(
- random.choice(string.ascii_uppercase)
- for _ in range(size))
- if column not in pn_t[s].columns:
- break
- pn_t[s].loc[:, column] = values
- pn_t[s].rename(
- columns={column: bus_id},
- inplace=True)
+ pn_t[s].insert(len(pn_t[s].columns), bus_id, values)
def transfer_results(self, *args, **kwargs):
|
Replace overly complicated solution with `insert`
Thankfully `DataFrame.insert` doesn't suffer from the same deficiency as
`DataFrame.loc[:, column] =` which makes it a suitable replacement for
the ad hoc workaround.
|
diff --git a/zeno/test/testing_utils.py b/zeno/test/testing_utils.py
index <HASH>..<HASH> 100644
--- a/zeno/test/testing_utils.py
+++ b/zeno/test/testing_utils.py
@@ -3,6 +3,8 @@ import os
import sys
import fcntl
+import tempfile
+
from ioflo.base.consoling import getConsole
from zeno.common.stacked import HA
@@ -85,9 +87,10 @@ class PortDispenser:
port numbers. It leverages the filesystem lock mechanism to ensure there
are no overlaps.
"""
- def __init__(self, ip: str):
+ def __init__(self, ip: str, filename: str=None):
self.ip = ip
- self.FILE = "portmutex3.{}.txt".format(ip)
+ self.FILE = filename or os.path.join(tempfile.gettempdir(),
+ 'zeno-portmutex.{}.txt'.format(ip))
self.minPort = 6000
self.maxPort = 9999
self.initFile()
|
PortDispensor now uses a system-supplied temporary directory and an intelligent filename when one is not provided to it.
|
diff --git a/src/js/services/twitter.js b/src/js/services/twitter.js
index <HASH>..<HASH> 100644
--- a/src/js/services/twitter.js
+++ b/src/js/services/twitter.js
@@ -33,9 +33,12 @@ module.exports = function(shariff) {
return {
popup: true,
shareText: {
- 'cs': 'sdílet',
'en': 'tweet',
- 'zh': '分享'
+ 'ja': 'のつぶやき',
+ 'ko': '짹짹',
+ 'ru': 'твит',
+ 'sr': 'твеет',
+ 'zh': '鸣叫'
},
name: 'twitter',
faName: 'fa-twitter',
|
twitter - correct and add translations
Correct zh translation from "share" to "tweet" (translated), remove cs translation, add ja, ko, ru, sr so all languages show "tweet" (translated).
|
diff --git a/src/edit/handler/Edit.Poly.js b/src/edit/handler/Edit.Poly.js
index <HASH>..<HASH> 100644
--- a/src/edit/handler/Edit.Poly.js
+++ b/src/edit/handler/Edit.Poly.js
@@ -218,7 +218,6 @@ L.Edit.Poly = L.Handler.extend({
marker1._middleRight = marker2._middleLeft = marker;
onDragStart = function () {
-
var i = marker2._index;
marker._index = i;
@@ -245,6 +244,7 @@ L.Edit.Poly = L.Handler.extend({
onDragEnd = function () {
marker.off('dragstart', onDragStart, this);
marker.off('dragend', onDragEnd, this);
+ marker.off('touchmove', onDragStart, this);
this._createMiddleMarker(marker1, marker);
this._createMiddleMarker(marker, marker2);
@@ -259,7 +259,8 @@ L.Edit.Poly = L.Handler.extend({
marker
.on('click', onClick, this)
.on('dragstart', onDragStart, this)
- .on('dragend', onDragEnd, this);
+ .on('dragend', onDragEnd, this)
+ .on('touchmove', onDragStart, this);
this._markerGroup.addLayer(marker);
},
|
Allow touch devices to drag ghost markers in polylines and polygons.
|
diff --git a/modules/orbitsoftBidAdapter.js b/modules/orbitsoftBidAdapter.js
index <HASH>..<HASH> 100644
--- a/modules/orbitsoftBidAdapter.js
+++ b/modules/orbitsoftBidAdapter.js
@@ -25,7 +25,7 @@ let styleParamsMap = {
};
export const spec = {
code: BIDDER_CODE,
- aliases: ['oas', '152media'], // short code and customer aliases
+ aliases: ['oas', 'mediafuseLift'], // short code and customer aliases
isBidRequestValid: function (bid) {
switch (true) {
case !('params' in bid):
|
Added MediaFuse Lift alias to Orbitsoft adapter (#<I>)
|
diff --git a/framework/gii/CCodeModel.php b/framework/gii/CCodeModel.php
index <HASH>..<HASH> 100644
--- a/framework/gii/CCodeModel.php
+++ b/framework/gii/CCodeModel.php
@@ -351,4 +351,17 @@ abstract class CCodeModel extends CFormModel
$result=trim(strtolower(str_replace('_',' ',preg_replace('/(?<![A-Z])[A-Z]/', ' \0', $name))));
return $ucwords ? ucwords($result) : $result;
}
+
+ /**
+ * Converts a class name into a variable name with the first letter in lower case.
+ * This method is provided because lcfirst() PHP function is only available for PHP 5.3+.
+ * @param string the class name
+ * @return string the variable name converted from the class name
+ * @since 1.1.4
+ */
+ public function class2var($name)
+ {
+ $name[0]=strtolower($name[0]);
+ return $name;
+ }
}
\ No newline at end of file
|
(Fixes issue <I>)
|
diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go
index <HASH>..<HASH> 100644
--- a/cmd/ipfs/daemon.go
+++ b/cmd/ipfs/daemon.go
@@ -45,7 +45,20 @@ For example, to change the 'Gateway' port:
ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8082
-Make sure to restart the daemon after.`,
+The API address can be changed the same way:
+
+ ipfs config Addresses.API /ip4/127.0.0.1/tcp/5002
+
+Make sure to restart the daemon after changing addresses.
+
+By default, the gateway is only accessible locally. To expose it to other computers
+in the network, use 0.0.0.0 as the ip address:
+
+ ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080
+
+Be careful if you expose the API. It is a security risk, as anyone could use control
+your node remotely. If you need to control the node remotely, make sure to protect
+the port as you would other services or database (firewall, authenticated proxy, etc).`,
},
Options: []cmds.Option{
|
expand the ports documentation
i took @jbenet's suggestion, but reorganised it a bit to *not* suggest what is actually warned against later. :)
|
diff --git a/tests/Geometries/LineStringTest.php b/tests/Geometries/LineStringTest.php
index <HASH>..<HASH> 100644
--- a/tests/Geometries/LineStringTest.php
+++ b/tests/Geometries/LineStringTest.php
@@ -21,7 +21,7 @@ class LineStringTest extends BaseTestCase
public function testFromWKT()
{
- $linestring = LineString::fromWKT('LINESTRING(0 0, 1 1, 2 2)');
+ $linestring = LineString::fromWkt('LINESTRING(0 0, 1 1, 2 2)');
$this->assertInstanceOf(LineString::class, $linestring);
$this->assertEquals(3, $linestring->count());
diff --git a/tests/Geometries/MultiPointTest.php b/tests/Geometries/MultiPointTest.php
index <HASH>..<HASH> 100644
--- a/tests/Geometries/MultiPointTest.php
+++ b/tests/Geometries/MultiPointTest.php
@@ -7,7 +7,7 @@ class MultiPointTest extends BaseTestCase
{
public function testFromWKT()
{
- $multipoint = MultiPoint::fromWKT('MULTIPOINT((0 0),(1 0),(1 1))');
+ $multipoint = MultiPoint::fromWkt('MULTIPOINT((0 0),(1 0),(1 1))');
$this->assertInstanceOf(MultiPoint::class, $multipoint);
$this->assertEquals(3, $multipoint->count());
|
Fix test cases for MultiPointTest::testFromWKT() and LineStringTest::testFromWKT()
|
diff --git a/tests/Library/test_config.inc.php b/tests/Library/test_config.inc.php
index <HASH>..<HASH> 100644
--- a/tests/Library/test_config.inc.php
+++ b/tests/Library/test_config.inc.php
@@ -58,7 +58,7 @@ require_once OX_BASE_PATH . 'core/oxfunctions.php';
// As in new bootstrap to get db instance.
$oConfigFile = new OxConfigFile(OX_BASE_PATH . "config.inc.php");
OxRegistry::set("OxConfigFile", $oConfigFile);
-if ($testType == 'acceptance') {
+if ($sTestType == 'acceptance') {
oxRegistry::set("oxConfig", oxNew('oxConfig'));
} else {
oxRegistry::set("oxConfig", new oxConfig());
|
ESDEV-<I> Change test_config
Change testype variable name
(cherry picked from commit 9b<I>c4d)
|
diff --git a/test/test_jsonschema_draft4.rb b/test/test_jsonschema_draft4.rb
index <HASH>..<HASH> 100644
--- a/test/test_jsonschema_draft4.rb
+++ b/test/test_jsonschema_draft4.rb
@@ -867,24 +867,6 @@ class JSONSchemaDraft4Test < Test::Unit::TestCase
assert(!JSON::Validator.validate(schema,data,:list => true))
end
- def test_list_option_reusing_schemas
- schema_hash = {
- "$schema" => "http://json-schema.org/draft-04/schema#",
- "type" => "object",
- "properties" => { "a" => { "type" => "integer" } }
- }
-
- uri = URI.parse('http://example.com/item')
- schema = JSON::Schema.new(schema_hash, uri)
- JSON::Validator.add_schema(schema)
-
- data = {"a" => 1}
- assert(JSON::Validator.validate(uri.to_s, data))
-
- data = [{"a" => 1}]
- assert(JSON::Validator.validate(uri.to_s, data, :list => true))
- end
-
def test_self_reference
schema = {
|
Moving list option reuse to new test file
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -88,7 +88,20 @@ def main():
description='Python bindings for Nylas, the next-generation email platform.',
license="MIT",
keywords="inbox app appserver email nylas",
- url='https://github.com/nylas/nylas-python'
+ url='https://github.com/nylas/nylas-python',
+ long_description_content_type='text/markdown',
+ long_description='''
+# Nylas REST API Python bindings
+[](https://travis-ci.org/nylas/nylas-python)
+[](https://codecov.io/gh/nylas/nylas-python)
+
+Python bindings for the Nylas REST API. https://www.nylas.com/docs
+
+The Nylas APIs power applications with email, calendar, and contacts CRUD and bi-directional sync from any inbox in the world.
+
+Nylas is compatible with 100% of email service providers, so you only have to integrate once.
+No more headaches building unique integrations against archaic and outdated IMAP and SMTP protocols.''',
+
)
|
Set package description for pypi
|
diff --git a/ipyrad/assemble/jointestimate.py b/ipyrad/assemble/jointestimate.py
index <HASH>..<HASH> 100644
--- a/ipyrad/assemble/jointestimate.py
+++ b/ipyrad/assemble/jointestimate.py
@@ -311,6 +311,9 @@ def stackarray(data, sample):
pairdealer = izip(*[iter(clusters)] * 2)
# we subsample, else ... (could e.g., use first 10000 loci).
+ # limit maxlen b/c some ref clusters can create huge contigs
+ hidepth = min(10000, hidepth)
+ maxlen = min(150, maxlen)
dims = (hidepth, maxlen, 4)
stacked = np.zeros(dims, dtype=np.uint64)
@@ -363,6 +366,9 @@ def stackarray(data, sample):
stacked[nclust, :catg.shape[0], :] = catg
nclust += 1
+ # bail out when nclusts have been done
+ if nclust == hidepth:
+ done = True
## drop the empty rows in case there are fewer loci than the size of array
newstack = stacked[stacked.sum(axis=2) > 0]
|
limit nclusts and maxlen in step4 for faster processing
|
diff --git a/source/Core/UtilsObject.php b/source/Core/UtilsObject.php
index <HASH>..<HASH> 100644
--- a/source/Core/UtilsObject.php
+++ b/source/Core/UtilsObject.php
@@ -27,7 +27,6 @@ use OxidEsales\Eshop\Core\Edition\EditionSelector;
use OxidEsales\Eshop\Core\Exception\SystemComponentException;
use OxidEsales\Eshop\Core\Module\ModuleChainsGenerator;
use OxidEsales\Eshop\Core\Module\ModuleVariablesLocator;
-use OxidEsales\Eshop\Core\Exception\SystemComponentException;
use ReflectionClass;
use ReflectionException;
|
ESDEV-<I> Fix UtilsObject during rebase
|
diff --git a/lib/resource/Account.js b/lib/resource/Account.js
index <HASH>..<HASH> 100644
--- a/lib/resource/Account.js
+++ b/lib/resource/Account.js
@@ -94,7 +94,20 @@ Account.prototype.getApiKeys = function getApiKeys(options,callback) {
Account.prototype.save = function saveAccount(){
var self = this;
- var args = arguments;
+
+ var args = Array.prototype.slice.call(arguments);
+
+ // If customData, then inject our own callback and invalidate the
+ // customData resource cache when the account finishes saving.
+ if (self.customData) {
+ var originalCallback = args.length > 0 && typeof args[args.length - 1] === 'function' ?
+ args.pop() : function nop() {};
+
+ args.push(function newCallback() {
+ self.dataStore._evict(self.customData.href, originalCallback);
+ });
+ }
+
self._applyCustomDataUpdatesIfNecessary(function(){
Account.super_.prototype.save.apply(self, args);
});
|
fix cache eviction of customData when calling account.save()
|
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/commands.js b/bundles/org.eclipse.orion.client.core/web/orion/commands.js
index <HASH>..<HASH> 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/commands.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/commands.js
@@ -169,7 +169,12 @@ define(['i18n!orion/nls/messages', 'require', 'dojo', 'dijit', 'orion/uiUtils',
var CommandPopupMenuItem = dojo.declare(dijit.PopupMenuItem, {
// Override setter for 'label' attribute to prevent the use of innerHTML
_setLabelAttr: function(content) {
- this.containerNode.textContent = content;
+ if (typeof content === "string") {
+ this.containerNode.textContent = content;
+ } else {
+ dojo.empty(this.containerNode);
+ this.containerNode.appendChild(content);
+ }
}
});
|
Bug <I> - Make CommandPopupMenuItem consistent with other dijit wrappers
-Support a DomNode for its 'label' attribute
|
diff --git a/lib/parinfer.js b/lib/parinfer.js
index <HASH>..<HASH> 100644
--- a/lib/parinfer.js
+++ b/lib/parinfer.js
@@ -1006,6 +1006,10 @@ function updateRememberedParenTrail(result) {
}
else {
trail.endX = result.parenTrail.endX;
+ if (result.returnParens) {
+ var opener = result.parenTrail.openers[result.parenTrail.openers.length-1];
+ opener.closer.trail = trail;
+ }
}
}
diff --git a/lib/sandbox.js b/lib/sandbox.js
index <HASH>..<HASH> 100644
--- a/lib/sandbox.js
+++ b/lib/sandbox.js
@@ -9,8 +9,9 @@ const parinferTest = require('./test');
const parinfer = require('./parinfer');
const code = `
-(foo
- |)
+(bar
+ |(foo)
+ )
`;
console.log(parinferTest.smartMode(code, {printParensOnly: true}));
|
mark leading close-parens as paren trails in the paren tree
|
diff --git a/jaraco/stream/test_gzip.py b/jaraco/stream/test_gzip.py
index <HASH>..<HASH> 100644
--- a/jaraco/stream/test_gzip.py
+++ b/jaraco/stream/test_gzip.py
@@ -5,7 +5,7 @@ from six.moves import urllib, map, BaseHTTPServer
import pkg_resources
import pytest
-from more_itertools.recipes import flatten
+from more_itertools.recipes import flatten, consume
from jaraco.stream import gzip
@@ -60,3 +60,14 @@ def test_lines_from_stream(gzip_stream):
result = json.loads(second_line.rstrip('\n,'))
assert isinstance(result, dict)
assert 'id' in result
+
+
+def test_lines_completes(gzip_stream):
+ """
+ When reading lines from a gzip stream, the operation should complete
+ when the stream is exhausted.
+ """
+ chunks = gzip.read_chunks(gzip_stream)
+ streams = gzip.load_streams(chunks)
+ lines = flatten(map(gzip.lines_from_stream, streams))
+ consume(lines)
|
Add test capturing failure to complete. Ref #2.
|
diff --git a/lib/flipper-active_record.rb b/lib/flipper-active_record.rb
index <HASH>..<HASH> 100644
--- a/lib/flipper-active_record.rb
+++ b/lib/flipper-active_record.rb
@@ -1,4 +1,4 @@
-require 'activesupport/lazy_load_hooks'
+require 'active_support/lazy_load_hooks'
ActiveSupport.on_load(:active_record) do
require 'flipper/adapters/active_record'
|
Fix typo in lib/flipper-active_record.rb
|
diff --git a/bqplot/traits.py b/bqplot/traits.py
index <HASH>..<HASH> 100644
--- a/bqplot/traits.py
+++ b/bqplot/traits.py
@@ -264,6 +264,8 @@ class PandasDataFrame(Instance):
# Hence, we should set the following as the args
if len(args) == 0:
new_args = (None, (default_value,))
+ else:
+ new_args = args
super(PandasDataFrame, self).__init__(*new_args, **kwargs)
self.tag(to_json=self._to_json, from_json=self._from_json)
@@ -337,6 +339,8 @@ class PandasSeries(Instance):
# Hence, we should set the following as the args.
if len(args) == 0:
new_args = (None, (default_value,))
+ else:
+ new_args = args
super(PandasSeries, self).__init__(*new_args, **kwargs)
self.tag(to_json=self._to_json, from_json=self._from_json)
|
fixing issue when only args are passed
|
diff --git a/jquery-meteor-blaze.js b/jquery-meteor-blaze.js
index <HASH>..<HASH> 100644
--- a/jquery-meteor-blaze.js
+++ b/jquery-meteor-blaze.js
@@ -142,6 +142,21 @@ module.exports = function(jQuery, underscore) {
//Return the reactive values as array
return reactive.values();
};
+ else if (reactive.values)
+ //Set hepler
+ helper[key] = function() {
+ //Return the reactive values as array
+ return reactive.values();
+ };
+ else if (reactive.get)
+ //Set hepler
+ helper[key] = function() {
+ //Return the reactive var
+ return reactive.get();
+ };
+ else
+ //Error
+ throw new Error("Unknown reactive type, neither jQuery.Meteor.ReactiveVar nor jQuery.Meteor.ReactiveObjectMap, and doesn't have values() nor get());
//Add helper
obj.instance.helpers(helper);
});
|
Support unknown types by get/values methods
|
diff --git a/tests/TalRepeatTest.php b/tests/TalRepeatTest.php
index <HASH>..<HASH> 100644
--- a/tests/TalRepeatTest.php
+++ b/tests/TalRepeatTest.php
@@ -144,7 +144,7 @@ class TalRepeatTest extends PHPTAL_TestCase
$tpl = $this->newPHPTAL();
$tpl->setSource('<tal:block tal:repeat="node nodes"><tal:block tal:condition="php:repeat.node.index==4">(len=${nodes/length})</tal:block>${repeat/node/key}${node/tagName}</tal:block>');
- $tpl->nodes = $a = $doc->getElementsByTagName('*');
+ $tpl->nodes = $doc->getElementsByTagName('*');
$this->assertEquals('0a1b2c3d(len=7)4e5f6g', $tpl->execute());
|
Removed a leftover from debug
|
diff --git a/src/sap.ui.core/src/sap/ui/test/opaQunit.js b/src/sap.ui.core/src/sap/ui/test/opaQunit.js
index <HASH>..<HASH> 100644
--- a/src/sap.ui.core/src/sap/ui/test/opaQunit.js
+++ b/src/sap.ui.core/src/sap/ui/test/opaQunit.js
@@ -291,12 +291,17 @@ sap.ui.define([
// assertion is async, push results when ready
var oAssertionPromise = fnAssertion.apply(oParams.appWindow, arguments)
.always(function (oResult) {
- qunitThis.push(
- oResult.result,
- oResult.actual,
- oResult.expected,
- oResult.message
- );
+ if ( typeof qunitThis.pushResult === "function" ) {
+ qunitThis.pushResult(oResult);
+ } else {
+ // fallback for QUnit < 1.22.0
+ qunitThis.push(
+ oResult.result,
+ oResult.actual,
+ oResult.expected,
+ oResult.message
+ );
+ }
});
// schedule async assertion promise on waitFor flow so test waits till assertion is ready
|
[INTERNAL] opaQUnit: avoid deprecation warning when reporting assertions
The method QUnit.push has been deprecated and should be replaced
with QUnit.assert.pushResult where available. As our version <I> does
not yet contain pushResult, a check is needed before using either
method.
Change-Id: If6d<I>db9a8a<I>f<I>fa1e3ec<I>
|
diff --git a/mysql/MySQLdb.py b/mysql/MySQLdb.py
index <HASH>..<HASH> 100644
--- a/mysql/MySQLdb.py
+++ b/mysql/MySQLdb.py
@@ -110,7 +110,9 @@ insert_values = re.compile(r'values\s(\(.+\))', re.IGNORECASE)
def escape_dict(d):
d2 = {}
- for k,v in d.items(): d2[k] = "'%s'" % escape_string(str(v))
+ for k,v in d.items():
+ if v is None: d2[k] = "NULL"
+ else: d2[k] = "'%s'" % escape_string(str(v))
return d2
|
User-contributed fix: Convert None to NULL correctly when passing a
dictionary as the parameters to execute.
|
diff --git a/api/server.go b/api/server.go
index <HASH>..<HASH> 100644
--- a/api/server.go
+++ b/api/server.go
@@ -27,7 +27,7 @@ import (
"gopkg.in/tylerb/graceful.v1"
)
-const Version = "0.12.3-rc5"
+const Version = "0.12.3"
func getProvisioner() (string, error) {
provisioner, err := config.GetString("provisioner")
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,7 +51,7 @@ copyright = u'2015, Globo.com'
version = '0.12'
# The full version, including alpha/beta/rc tags.
-release = '0.12.3-rc1'
+release = '0.12.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
|
api/server: bump to <I>
|
diff --git a/galpy/potential_src/TwoPowerSphericalPotential.py b/galpy/potential_src/TwoPowerSphericalPotential.py
index <HASH>..<HASH> 100644
--- a/galpy/potential_src/TwoPowerSphericalPotential.py
+++ b/galpy/potential_src/TwoPowerSphericalPotential.py
@@ -147,7 +147,7 @@ class TwoPowerSphericalPotential(Potential):
2010-08-08 - Written - Bovy (NYU)
"""
r= m.sqrt(R**2.+z**2.)
- return (self.a/r)**self.alpha/(1.+r/self.a)**(self.beta-self.alpha)
+ return (self.a/r)**self.alpha/(1.+r/self.a)**(self.beta-self.alpha)/4./m.pi/self.a**3.
def _potIntegrandTransform(t,alpha,beta):
"""Internal function that transforms the integrand such that the integral becomes finite-ranged"""
|
consistent normalization of density wrt force in TwoPower
|
diff --git a/lib/keyring_liberator.rb b/lib/keyring_liberator.rb
index <HASH>..<HASH> 100644
--- a/lib/keyring_liberator.rb
+++ b/lib/keyring_liberator.rb
@@ -36,7 +36,8 @@ module CocoaPodsKeys
def self.save_keyring(keyring)
keys_dir.mkpath
- if get_keyring_named(keyring)
+ existing = get_keyring_named(keyring.name)
+ if existing && yaml_path_for_path(existing.path) != yaml_path_for_path(keyring.path)
ui = Pod::UserInterface
ui.puts "About to create a duplicate keyring file for project #{keyring.name.green}"
ui.puts "\nPress enter to continue, or `ctrl + c` to cancel"
|
need to check the keyring path, because this was returning 'true' when there was only ONE keyring
|
diff --git a/netpyne/utils.py b/netpyne/utils.py
index <HASH>..<HASH> 100644
--- a/netpyne/utils.py
+++ b/netpyne/utils.py
@@ -145,7 +145,7 @@ def _delete_module(modname):
except:
pass
-def importCell (fileName, cellName, cellArgs = None, s = False):
+def importCell (fileName, cellName, cellArgs = None, cellInstance = False):
h.initnrn()
varList = mechVarList() # list of properties for all density mechanisms and point processes
origGlob = getGlobals(varList['mechs'].keys()+varList['pointps'].keys())
@@ -155,7 +155,7 @@ def importCell (fileName, cellName, cellArgs = None, s = False):
''' Import cell from HOC template or python file into framework format (dict of sections, with geom, topol, mechs, syns)'''
if fileName.endswith('.hoc') or fileName.endswith('.tem'):
h.load_file(fileName)
- if not s:
+ if not cellInstance:
if isinstance(cellArgs, dict):
cell = getattr(h, cellName)(**cellArgs) # create cell using template, passing dict with args
else:
|
in utils.py renamed s with cellInstance
|
diff --git a/README.md b/README.md
index <HASH>..<HASH> 100644
--- a/README.md
+++ b/README.md
@@ -45,10 +45,5 @@ If you've defined a finalize coffesript function you can also use it with:
Band.caffeine_map_reduce('playing_stats').caffeine_finalize('playing_stats').out(inline: 1)
```
-
-## ToDo
-At the moment, only [mongoid](http://mongoid.org/) ODM gem is supported.
-Hopefully [mongomapper](http://mongomapper.com/) is supported soon too.
-
## License
This project uses [*MIT-LICENSE*](http://en.wikipedia.org/wiki/MIT_License).
diff --git a/lib/mongo_coffee.rb b/lib/mongo_coffee.rb
index <HASH>..<HASH> 100644
--- a/lib/mongo_coffee.rb
+++ b/lib/mongo_coffee.rb
@@ -15,7 +15,3 @@ if defined? Mongoid
include MongoCoffee::Mongoid::MapReduce
end
end
-
-# TODO: Add finders and MapReduce support for Mongomapper
-if defined? Mongomapper
-end
diff --git a/lib/mongo_coffee/version.rb b/lib/mongo_coffee/version.rb
index <HASH>..<HASH> 100644
--- a/lib/mongo_coffee/version.rb
+++ b/lib/mongo_coffee/version.rb
@@ -1,3 +1,3 @@
module MongoCoffee
- VERSION = "0.3.3"
+ VERSION = "1.0.0"
end
|
No 'mongomapper' support for a long time
|
diff --git a/acceptance/setup/aio/pre-suite/020_AIO_Workarounds.rb b/acceptance/setup/aio/pre-suite/020_AIO_Workarounds.rb
index <HASH>..<HASH> 100644
--- a/acceptance/setup/aio/pre-suite/020_AIO_Workarounds.rb
+++ b/acceptance/setup/aio/pre-suite/020_AIO_Workarounds.rb
@@ -21,14 +21,3 @@ test_name '(PUP-3997) Puppet User and Group on agents only' do
end
end
end
-
-# The codedir setting should be passed into the puppetserver
-# initialization method, like is done for other required settings
-# confdir & vardir. For some reason, puppetserver gets confused
-# if this is not done, and tries to manage a directory:
-# /opt/puppetlabs/agent/cache/.puppet/code, which is a combination
-# of the default master-var-dir in puppetserver, and the user
-# based codedir.
-step "(SERVER-347) Set required codedir setting on puppetserver"
-on master, puppet("config set codedir /etc/puppetlabs/code --section master")
-
|
(maint) Remove codedir workaround
The workaround for pointing the master's codedir to
/etc/puppetlabs/code is no longer required now that commit f<I>efe<I>
in puppet-server[1] has been promoted.
[1] <URL>
|
diff --git a/core/server/master/src/main/java/alluxio/master/block/DefaultBlockMaster.java b/core/server/master/src/main/java/alluxio/master/block/DefaultBlockMaster.java
index <HASH>..<HASH> 100644
--- a/core/server/master/src/main/java/alluxio/master/block/DefaultBlockMaster.java
+++ b/core/server/master/src/main/java/alluxio/master/block/DefaultBlockMaster.java
@@ -1079,8 +1079,10 @@ public class DefaultBlockMaster extends CoreMaster implements BlockMaster {
}
}
}
- LOG.warn("{} invalid blocks found on worker {} in total", invalidBlockCount,
- workerInfo.getWorkerAddress().getHost());
+ if (invalidBlockCount > 0) {
+ LOG.warn("{} invalid blocks found on worker {} in total", invalidBlockCount,
+ workerInfo.getWorkerAddress().getHost());
+ }
}
/**
@@ -1103,8 +1105,10 @@ public class DefaultBlockMaster extends CoreMaster implements BlockMaster {
workerInfo.updateToRemovedBlock(true, block);
}
}
- LOG.warn("{} blocks marked as orphaned from worker {}", orphanedBlockCount,
- workerInfo.getWorkerAddress().getHost());
+ if (orphanedBlockCount > 0) {
+ LOG.warn("{} blocks marked as orphaned from worker {}", orphanedBlockCount,
+ workerInfo.getWorkerAddress().getHost());
+ }
}
@Override
|
Log warning on orphaned blocks
Log a warning on unrecognized/orphaned blocks from worker only when the
counts are >0
This is a follow-up for <URL>
|
diff --git a/api/client.go b/api/client.go
index <HASH>..<HASH> 100644
--- a/api/client.go
+++ b/api/client.go
@@ -8,12 +8,15 @@ import (
"os"
"strings"
"sync"
+ "time"
)
var (
errRedirect = errors.New("redirect")
defaultHTTPClientSetup sync.Once
- defaultHTTPClient = &http.Client{}
+ defaultHTTPClient = &http.Client{
+ Timeout: time.Second * 5,
+ }
)
// Config is used to configure the creation of the client.
|
added a sensible default timeout for the vault client
|
diff --git a/bokeh/models/widgets/layouts.py b/bokeh/models/widgets/layouts.py
index <HASH>..<HASH> 100644
--- a/bokeh/models/widgets/layouts.py
+++ b/bokeh/models/widgets/layouts.py
@@ -184,7 +184,8 @@ class SimpleApp(Widget):
def args_for_func(self, func):
args = {}
for k,v in self.widget_dict.items():
- args[k] = v.value
+ if hasattr(v, 'value'):
+ args[k] = v.value
args['app'] = self
args = arg_filter(func, args)
return args
|
avoid layout breaking when simpleapp is managing a widget that does not have a value attribute, like a Button
|
diff --git a/languagetool-language-modules/en/src/main/java/org/languagetool/language/English.java b/languagetool-language-modules/en/src/main/java/org/languagetool/language/English.java
index <HASH>..<HASH> 100644
--- a/languagetool-language-modules/en/src/main/java/org/languagetool/language/English.java
+++ b/languagetool-language-modules/en/src/main/java/org/languagetool/language/English.java
@@ -374,6 +374,16 @@ public class English extends Language implements AutoCloseable {
theInsertionID, "the_ins_rule_description", theInsertionMessages);
rules.add(theInsertionRule);
}
+ String missingTheID = "MISSING_THE";
+ RemoteRuleConfig missingTheConfig = RemoteRuleConfig.getRelevantConfig(missingTheID, configs);
+ if (missingTheConfig != null) {
+ Map<String, String> missingTheMessages = new HashMap<>();
+ missingTheMessages.put("MISSING_THE", "the_ins_rule_ins_the");
+ Rule missingTheRule = GRPCRule.create(messageBundle,
+ missingTheConfig,
+ missingTheID, "the_ins_rule_description", missingTheMessages);
+ rules.add(missingTheRule);
+ }
return rules;
}
}
|
activated another GRPCRule (MISSING_THE)
|
diff --git a/lib/it.rb b/lib/it.rb
index <HASH>..<HASH> 100644
--- a/lib/it.rb
+++ b/lib/it.rb
@@ -14,7 +14,7 @@ module It
# It outside of your views. See documentation at Helper#it
def self.it(identifier, options = {})
options.stringify_keys!
- Parser.new(I18n.t(identifier, :locale => options["locale"]), options).process
+ Parser.new(I18n.t(identifier, :locale => (options["locale"] || I18n.locale)), options).process
end
# Creates a new link to be used in +it+.
diff --git a/lib/it/helper.rb b/lib/it/helper.rb
index <HASH>..<HASH> 100644
--- a/lib/it/helper.rb
+++ b/lib/it/helper.rb
@@ -40,7 +40,7 @@ module It
#
def it(identifier, options = {})
options.stringify_keys!
- It::Parser.new(t(identifier, :locale => options["locale"]), options).process
+ It::Parser.new(t(identifier, :locale => (options["locale"] || I18n.locale)), options).process
end
end
end
|
Set locale explicitly if not given
Apparently i<I>n-active_record has a different behaviour.
|
diff --git a/phonenumberutil.go b/phonenumberutil.go
index <HASH>..<HASH> 100644
--- a/phonenumberutil.go
+++ b/phonenumberutil.go
@@ -3063,6 +3063,8 @@ func buildNationalNumberForParsing(
func isNumberMatchWithNumbers(firstNumberIn, secondNumberIn *PhoneNumber) MatchType {
// Make copies of the phone number so that the numbers passed in are not edited.
var firstNumber, secondNumber *PhoneNumber
+ firstNumber = &PhoneNumber{}
+ secondNumber = &PhoneNumber{}
proto.Merge(firstNumber, firstNumberIn)
proto.Merge(secondNumber, secondNumberIn)
// First clear raw_input, country_code_source and
|
Nil object cannot be proto merged (#<I>)
|
diff --git a/push_notifications/fields.py b/push_notifications/fields.py
index <HASH>..<HASH> 100644
--- a/push_notifications/fields.py
+++ b/push_notifications/fields.py
@@ -6,9 +6,9 @@ from django.db import models, connection
from django.utils.translation import ugettext_lazy as _
try:
- from django.utils.six import with_metaclass
+ from django.utils import six
except ImportError:
- from six import with_metaclass
+ import six
__all__ = ["HexadecimalField", "HexIntegerField"]
@@ -29,7 +29,7 @@ class HexadecimalField(forms.CharField):
super(HexadecimalField, self).__init__(*args, **kwargs)
-class HexIntegerField(with_metaclass(models.SubfieldBase, models.BigIntegerField)):
+class HexIntegerField(six.with_metaclass(models.SubfieldBase, models.BigIntegerField)):
"""
This field stores a hexadecimal *string* of up to 64 bits as an unsigned integer
on *all* backends including postgres.
@@ -60,7 +60,7 @@ class HexIntegerField(with_metaclass(models.SubfieldBase, models.BigIntegerField
return value
def to_python(self, value):
- if isinstance(value, str):
+ if isinstance(value, six.string_types):
return value
if value is None:
return ""
|
HexIntegerField: Fix a deserialization issue on Python 2
Thanks @Microserf for noticing
|
diff --git a/lib/octokit/client/issues.rb b/lib/octokit/client/issues.rb
index <HASH>..<HASH> 100644
--- a/lib/octokit/client/issues.rb
+++ b/lib/octokit/client/issues.rb
@@ -28,7 +28,8 @@ module Octokit
# @client = Octokit::Client.new(:login => 'foo', :password => 'bar')
# @client.list_issues
def list_issues(repository = nil, options = {})
- paginate "#{Repository.new(repository).path}/issues", options
+ path = repository ? "#{Repository.new(repository).path}/issues" : "issues"
+ paginate path, options
end
alias :issues :list_issues
|
Correctly generate issues path
Previously `Repository.new(nil)` would return `nil` so our path would
be `/issues`. It now correctly raises an error so if a repository
isn't specified then we want the issues for the user so the path
should be `issues`.
|
diff --git a/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java b/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java
index <HASH>..<HASH> 100644
--- a/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java
+++ b/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java
@@ -4,6 +4,8 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
+import java.sql.Date;
+import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;
|
EMBPD<I> - added missing imports
added missing imports
|
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -44,7 +44,7 @@ module ActionController
def assign_parameters(routes, controller_path, action, parameters = {})
parameters = parameters.symbolize_keys
- extra_keys = routes.extra_keys(parameters.merge(:controller => controller_path, :action => action))
+ generated_path, extra_keys = routes.generate_extras(parameters.merge(:controller => controller_path, :action => action))
non_path_parameters = {}
path_parameters = {}
@@ -97,6 +97,7 @@ module ActionController
@env['rack.input'] = StringIO.new(data)
end
+ @env["PATH_INFO"] ||= generated_path
path_parameters[:controller] = controller_path
path_parameters[:action] = action
|
default `PATH_INFO` to the generated path
we were already generating a path in the previous code (it was just not
returned), so lets just use the already computed path to popluate the
PATH_INFO header
|
diff --git a/hamster/db.py b/hamster/db.py
index <HASH>..<HASH> 100644
--- a/hamster/db.py
+++ b/hamster/db.py
@@ -78,16 +78,9 @@ class Storage(storage.Storage):
self.__setup.im_func.complete = True
self.run_fixtures()
- self.config = GconfStore()
-
- runtime.dispatcher.add_handler('gconf_on_day_start_changed', self.__on_day_start_changed)
- self.day_start = self.config.get_day_start()
__setup.complete = False
-
- def __on_day_start_changed(self, event, new_minutes):
- self.day_start = self.config.get_day_start()
def __get_category_list(self):
return self.fetchall("SELECT * FROM categories ORDER BY category_order")
@@ -474,8 +467,10 @@ class Storage(storage.Storage):
query += " ORDER BY a.start_time"
end_date = end_date or date
- #FIXME: add preference to set that
- split_time = self.day_start
+ from configuration import GconfStore
+ day_start = GconfStore().get_day_start()
+
+ split_time = day_start
datetime_from = dt.datetime.combine(date, split_time)
datetime_to = dt.datetime.combine(end_date, split_time) + dt.timedelta(days = 1)
|
don't need the whole config machinery just to get day start
|
diff --git a/src/main/java/com/opentable/db/postgres/embedded/EmbeddedPostgreSQL.java b/src/main/java/com/opentable/db/postgres/embedded/EmbeddedPostgreSQL.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/opentable/db/postgres/embedded/EmbeddedPostgreSQL.java
+++ b/src/main/java/com/opentable/db/postgres/embedded/EmbeddedPostgreSQL.java
@@ -414,7 +414,9 @@ public class EmbeddedPostgreSQL implements Closeable
private static List<String> system(String... command)
{
try {
- final Process process = new ProcessBuilder(command).start();
+ final ProcessBuilder builder = new ProcessBuilder(command);
+ builder.redirectError(ProcessBuilder.Redirect.INHERIT);
+ final Process process = builder.start();
Preconditions.checkState(0 == process.waitFor(), "Process %s failed\n%s", Arrays.asList(command), IOUtils.toString(process.getErrorStream()));
try (InputStream stream = process.getInputStream()) {
return IOUtils.readLines(stream);
|
Fix bug seen in teamcity builds: bind stderr to the parent process's stderr
|
diff --git a/providers/json-rpc-provider.js b/providers/json-rpc-provider.js
index <HASH>..<HASH> 100644
--- a/providers/json-rpc-provider.js
+++ b/providers/json-rpc-provider.js
@@ -2,15 +2,13 @@
// See: https://github.com/ethereum/wiki/wiki/JSON-RPC
-var inherits = require('inherits');
-
var Provider = require('./provider.js');
var utils = (function() {
return {
- defineProperty: require('ethers-utils/properties.js').defineProperty,
+ defineProperty: require('ethers-utils/properties').defineProperty,
- hexlify: require('ethers-utils/convert.js').hexlify,
+ hexlify: require('ethers-utils/convert').hexlify,
}
})();
|
Using Provider.inherits.
|
diff --git a/structr-ui/src/main/resources/structr/js/model.js b/structr-ui/src/main/resources/structr/js/model.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/model.js
+++ b/structr-ui/src/main/resources/structr/js/model.js
@@ -18,7 +18,7 @@
*/
var StructrModel = {
objects: {},
- callbacks: [],
+ callbacks: {},
obj: function(id) {
return StructrModel.objects[id];
},
@@ -223,15 +223,15 @@ var StructrModel = {
}
if (engine) {
-
+
if (engine.graph.nodes(id)) {
try { engine.graph.dropNode(id); } catch (e) {}
}
-
+
if (engine.graph.edges(id)) {
try { engine.graph.dropEdge(id); } catch (e) {}
}
-
+
engine.refresh();
}
|
changed callbacks variable initialization to `{}` as otherwise accessing it via console is tedious
|
diff --git a/packages/ui-scripts/lib/publish-latest.js b/packages/ui-scripts/lib/publish-latest.js
index <HASH>..<HASH> 100644
--- a/packages/ui-scripts/lib/publish-latest.js
+++ b/packages/ui-scripts/lib/publish-latest.js
@@ -41,7 +41,7 @@ const { createNPMRCFile } = require('./utils/npm')
try {
const pkgJSON = getPackageJSON()
// Arguments
- // 1: version to publish. If current version, use 'current' otherwise e.g.: 8.1.3
+ // 1: version to publish. If current version, use 'current' or don't bass anything. Otherwise e.g.: 8.1.3
// 2: publish type. defaults to current. If set to 'maintenance', it will publish with vx_maintenance tag
// e.g.: ui-scripts --publish-latest 5.12.2 maintenance
const releaseVersion =
|
chore(ui-scripts): fix comments
|
diff --git a/library/src/main/java/com/alexvasilkov/gestures/transition/internal/FromRecyclerViewListener.java b/library/src/main/java/com/alexvasilkov/gestures/transition/internal/FromRecyclerViewListener.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/alexvasilkov/gestures/transition/internal/FromRecyclerViewListener.java
+++ b/library/src/main/java/com/alexvasilkov/gestures/transition/internal/FromRecyclerViewListener.java
@@ -70,7 +70,7 @@ public class FromRecyclerViewListener<ID> implements ViewsCoordinator.OnRequestV
int position = mRecyclerView.getChildAdapterPosition(view);
if (mId != null && mId.equals(mTracker.getIdForPosition(position))) {
View from = mTracker.getViewForPosition(position);
- if (from != null) mAnimator.setFromView(mId, view);
+ if (from != null) mAnimator.setFromView(mId, from);
}
}
|
Fixed FromRecyclerViewListener logic, one more time
|
diff --git a/lib/polipus.rb b/lib/polipus.rb
index <HASH>..<HASH> 100644
--- a/lib/polipus.rb
+++ b/lib/polipus.rb
@@ -121,7 +121,7 @@ module Polipus
@storage.include_query_string_in_uuid = @options[:include_query_string_in_saved_page]
- @urls = [urls].flatten.map{ |url| url.is_a?(URI) ? url : URI(url) }
+ @urls = [urls].flatten.map{ |url| URI(url) }
@urls.each{ |url| url.path = '/' if url.path.empty? }
execute_plugin 'on_initialize'
|
Remove unnecessary check if it is an URI
Kernel.URI is doing this by itself
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.