diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/locallib.php
+++ b/mod/quiz/locallib.php
@@ -736,9 +736,7 @@ function quiz_question_action_icons($quiz, $cmid, $question, $returnurl){
$strview = get_string('view');
}
$html ='';
- if (($question->qtype != 'random')){
- $html .= quiz_question_preview_button($quiz, $question);
- }
+ $html .= quiz_question_preview_button($quiz, $question);
$questionparams = array('returnurl' => $returnurl, 'cmid'=>$cmid, 'id' => $question->id);
$questionurl = new moodle_url("$CFG->wwwroot/question/question.php", $questionparams);
if (question_has_capability_on($question, 'edit', $question->category) || question_has_capability_on($question, 'move', $question->category)) {
|
quiz editing: MDL-<I> added another random question preview link
|
diff --git a/includes/class-kirki-field.php b/includes/class-kirki-field.php
index <HASH>..<HASH> 100644
--- a/includes/class-kirki-field.php
+++ b/includes/class-kirki-field.php
@@ -569,10 +569,10 @@ class Kirki_Field {
$sanitize_callback = array( 'Kirki_Sanitize', 'checkbox' );
break;
case 'color' :
- $sanitize_callback = 'sanitize_hex_color';
+ $sanitize_callback = array( 'Kirki_Color', 'sanitize_hex' );
break;
case 'color-alpha' :
- $sanitize_callback = array( 'Kirki_Sanitize', 'rgba' );
+ $sanitize_callback = array( 'Kirki_Sanitize', 'color' );
break;
case 'image' :
$sanitize_callback = 'esc_url_raw';
|
tweak sanitization callbacks for color controls
|
diff --git a/lib/github_cli/api.rb b/lib/github_cli/api.rb
index <HASH>..<HASH> 100644
--- a/lib/github_cli/api.rb
+++ b/lib/github_cli/api.rb
@@ -10,7 +10,7 @@ module GithubCLI
# Access or initialize Github API client
#
# @api public
- def github_api(options)
+ def github_api(options={})
@github_api ||= begin
@github_api = configure(options)
end
@@ -19,7 +19,7 @@ module GithubCLI
# this could become a command such as configure that gets class options
#
# @api public
- def configure(options)
+ def configure(options={})
api = Github.new
config = GithubCLI.config.data
@@ -49,13 +49,13 @@ module GithubCLI
end
# Procoess response and output to shell
- #
+ # TODO: change to take options
# @api public
- def output(format=:table, &block)
+ def output(format=:table, quiet=false, &block)
GithubCLI.on_error do
response = block.call
if response.respond_to?(:body)
- formatter = Formatter.new response, :format => format
+ formatter = Formatter.new response, :format => format, :quiet => quiet
formatter.render_output
else
response
|
Pass through quiet option to api output.
|
diff --git a/lib/rules/link-req-noopener.js b/lib/rules/link-req-noopener.js
index <HASH>..<HASH> 100644
--- a/lib/rules/link-req-noopener.js
+++ b/lib/rules/link-req-noopener.js
@@ -14,7 +14,7 @@ module.exports = {
module.exports.lint = function (element, opts) {
function getVal(a, value) {
- return a && a.value && a.value;
+ return a && a.value;
}
var noopen = /(^| )(noopener|noreferrer)( |$)/;
|
Remove redundant condition from link-req-noopener.js
|
diff --git a/vendor/joomla/libraries/joomla/environment/uri.php b/vendor/joomla/libraries/joomla/environment/uri.php
index <HASH>..<HASH> 100644
--- a/vendor/joomla/libraries/joomla/environment/uri.php
+++ b/vendor/joomla/libraries/joomla/environment/uri.php
@@ -233,7 +233,7 @@ class JURI extends JObject
$uri =& JURI::getInstance($live_site);
$base['prefix'] = $uri->toString( array('scheme', 'host', 'port'));
$base['path'] = rtrim($uri->toString( array('path')), '/\\');
- if(JPATH_BASE == JPATH_ADMINISTRATOR) {
+ if(str_replace('\\', '/', JPATH_BASE) == str_replace('\\', '/', JPATH_ADMINISTRATOR)) {
$base['path'] .= '/administrator';
}
} else {
|
fix: make path comparison separator independent
|
diff --git a/src/playbacks/no_op/no_op.js b/src/playbacks/no_op/no_op.js
index <HASH>..<HASH> 100644
--- a/src/playbacks/no_op/no_op.js
+++ b/src/playbacks/no_op/no_op.js
@@ -28,6 +28,7 @@ export default class NoOp extends Playback {
constructor(options) {
super(options)
this.options = options
+ this._noiseFrameNum = -1
}
render() {
@@ -40,6 +41,12 @@ export default class NoOp extends Playback {
}
noise() {
+ this._noiseFrameNum = (this._noiseFrameNum+1)%5
+ if (this._noiseFrameNum) {
+ // only update noise every 5 frames to save cpu
+ return
+ }
+
var idata = this.context.createImageData(this.context.canvas.width, this.context.canvas.height)
try {
@@ -56,7 +63,6 @@ export default class NoOp extends Playback {
var run = 0
var color = 0
var m = Math.random() * 6 + 4
-
for (var i = 0; i < len;) {
if (run < 0) {
run = m * Math.random();
|
Reduce the frame rate of noop noise
To reduce the cpu load.
|
diff --git a/arcana/dataset/__init__.py b/arcana/dataset/__init__.py
index <HASH>..<HASH> 100644
--- a/arcana/dataset/__init__.py
+++ b/arcana/dataset/__init__.py
@@ -3,3 +3,4 @@ from .collection import DatasetCollection, FieldCollection
from .spec import DatasetSpec, FieldSpec, BaseSpec
from .base import BaseField, BaseDataset, BaseDatasetOrField
from .match import DatasetMatch, FieldMatch, BaseMatch
+from .file_format import FileFormat, Converter, IdentityConverter
diff --git a/arcana/dataset/base.py b/arcana/dataset/base.py
index <HASH>..<HASH> 100644
--- a/arcana/dataset/base.py
+++ b/arcana/dataset/base.py
@@ -1,7 +1,7 @@
from past.builtins import basestring
from builtins import object
from abc import ABCMeta
-from arcana.dataset.file_format import FileFormat
+from .file_format import FileFormat
from copy import copy
from logging import getLogger
from arcana.exception import ArcanaError
|
added relative import for new FileFormat location
|
diff --git a/lib/cli/list.js b/lib/cli/list.js
index <HASH>..<HASH> 100644
--- a/lib/cli/list.js
+++ b/lib/cli/list.js
@@ -32,7 +32,8 @@ module.exports = function (host, options) {
function each(host, handler) {
var rgx = /^\s*\/\*\*\s*@desc\s+(.*)\s*\*\//gm
Object.keys(host).forEach(function (taskname) {
- var desc = rgx.exec(host[taskname])
- handler(taskname, desc ? desc.pop() : '')
+ var arr = rgx.exec(host[taskname].toString())
+ var desc = arr ? arr.pop().replace(/\*\//, '') : ''
+ handler(taskname, desc)
})
}
|
ensure all task descriptions are read. closes #<I>
|
diff --git a/src/rules/index.js b/src/rules/index.js
index <HASH>..<HASH> 100644
--- a/src/rules/index.js
+++ b/src/rules/index.js
@@ -3,5 +3,6 @@ export default {
"block-opening-brace-before": require("./block-opening-brace-before"),
"declaration-block-trailing-semicolon": require("./declaration-block-trailing-semicolon"),
"declaration-no-important": require("./declaration-no-important"),
+ "number-leading-zero": require("./number-leading-zero"),
"rule-set-no-single-line": require("./rule-set-no-single-line"),
}
|
Add number-leading-zero to rule index
|
diff --git a/test/profilers/list_profsize.rb b/test/profilers/list_profsize.rb
index <HASH>..<HASH> 100644
--- a/test/profilers/list_profsize.rb
+++ b/test/profilers/list_profsize.rb
@@ -8,4 +8,3 @@ PublicSuffix::List.default
prof = ObjectBinsize.new
prof.report(PublicSuffix::List.default, label: "PublicSuffix::List size")
prof.report(PublicSuffix::List.default.instance_variable_get(:@rules), label: "Size of rules")
-prof.report(PublicSuffix::List.default.instance_variable_get(:@indexes), label: "Size of indexes")
|
The Hash implementation has no longer indexes
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,9 @@
from distutils.core import setup, Extension
+import numpy
module1 = Extension("pymuvr",
- sources = ["pymuvr/Van_Rossum_Multiunit.cpp", "pymuvr/pymuvr.cpp"])
+ sources = ["pymuvr/Van_Rossum_Multiunit.cpp", "pymuvr/pymuvr.cpp"],
+ include_dirs = [numpy.get_include()])
setup (name = "pymuvr",
version = "1.0",
|
Fix importing numpy headers from nonstandard locations.
|
diff --git a/test/index_test.js b/test/index_test.js
index <HASH>..<HASH> 100644
--- a/test/index_test.js
+++ b/test/index_test.js
@@ -18,6 +18,8 @@ describe('cleanDeep()', () => {
bar: undefined,
baz: true,
biz: false,
+ buz: null,
+ net: '',
qux: 100
}
};
|
Add missing tests to get full code coverage
|
diff --git a/thrift/thrift-gen/names.go b/thrift/thrift-gen/names.go
index <HASH>..<HASH> 100644
--- a/thrift/thrift-gen/names.go
+++ b/thrift/thrift-gen/names.go
@@ -113,7 +113,7 @@ func goPublicFieldName(name string) string {
}
var thriftToGo = map[string]string{
- "bool": "bool",
+ "bool": "bool",
"byte": "int8",
"i16": "int16",
"i32": "int32",
|
Run gofmt on all go files.
|
diff --git a/library/CM/Clockwork/Manager.php b/library/CM/Clockwork/Manager.php
index <HASH>..<HASH> 100644
--- a/library/CM/Clockwork/Manager.php
+++ b/library/CM/Clockwork/Manager.php
@@ -94,9 +94,6 @@ class CM_Clockwork_Manager {
$this->_checkEventExists($eventName);
$this->_storage->fetchData();
$status = $this->_storage->getStatus($event);
- if ($status->isRunning()) {
- throw new CM_Exception_Invalid('Event is already running', null, ['eventName' => $eventName]);
- }
$status->setRunning(true)->setLastStartTime($startTime);
$this->_storage->setStatus($event, $status);
}
@@ -110,9 +107,6 @@ class CM_Clockwork_Manager {
$this->_checkEventExists($eventName);
$this->_storage->fetchData();
$status = $this->_storage->getStatus($event);
- if (!$status->isRunning()) {
- throw new CM_Exception_Invalid('Cannot stop event. Event is not running.', null, ['eventName' => $event->getName()]);
- }
$status->setRunning(false);
$this->_storage->setStatus($event, $status);
}
|
Do not throw exception on duplicate event stops/starts
|
diff --git a/lib/compile.js b/lib/compile.js
index <HASH>..<HASH> 100644
--- a/lib/compile.js
+++ b/lib/compile.js
@@ -62,6 +62,7 @@ function compile(path, options, cb, cacheUpdated) {
insertGlobals: options.insertGlobals,
detectGlobals: options.detectGlobals,
ignoreMissing: options.ignoreMissing,
+ basedir: options.basedir,
debug: options.debug,
standalone: options.standalone || false,
cache: cache ? cache.getCache() : undefined
diff --git a/lib/settings.js b/lib/settings.js
index <HASH>..<HASH> 100644
--- a/lib/settings.js
+++ b/lib/settings.js
@@ -42,7 +42,7 @@ exports.detectGlobals = true;
exports.standalone = false;
exports.noParse = [];
exports.extensions = [];
-exports.basedir = false;
+exports.basedir = undefined;
exports.grep = /\.js$/;
//set some safe defaults for
|
improve: add basedir option to be passed on
|
diff --git a/examples/server/settings.py b/examples/server/settings.py
index <HASH>..<HASH> 100644
--- a/examples/server/settings.py
+++ b/examples/server/settings.py
@@ -118,5 +118,9 @@ try:
# Set the number of seconds each message shall persited
WS4REDIS_EXPIRE = 3600
+ WS4REDIS_HEARTBEAT = '--heartbeat--'
+
+ WS4REDIS_PREFIX = 'djangular'
+
except ImportError:
pass
|
added heartbeat and prefix for redis
|
diff --git a/tools/c7n_azure/tests_azure/tests_resources/test_search.py b/tools/c7n_azure/tests_azure/tests_resources/test_search.py
index <HASH>..<HASH> 100644
--- a/tools/c7n_azure/tests_azure/tests_resources/test_search.py
+++ b/tools/c7n_azure/tests_azure/tests_resources/test_search.py
@@ -1,11 +1,13 @@
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
+import pytest
from ..azure_common import BaseTest, arm_template
class SearchTest(BaseTest):
@arm_template('search.json')
+ @pytest.mark.skiplive
def test_find_by_name(self):
p = self.load_policy({
'name': 'test-azure-search',
|
ci - azure - disable flakey functional test (#<I>)
|
diff --git a/api/router.js b/api/router.js
index <HASH>..<HASH> 100644
--- a/api/router.js
+++ b/api/router.js
@@ -25,7 +25,7 @@ module.exports = function($window, redrawService) {
if (waiting != null) update(payload, component, params, path)
else {
waiting = Promise.resolve(payload.onmatch(params, path))
- .then(function() {update(payload, component, params, path)})
+ .then(function(comp) {update(payload, comp != null ? comp : component, params, path)})
}
}
else update(payload, "div", params, path)
|
Handle resolving with a component
|
diff --git a/anyconfig/backend/xml.py b/anyconfig/backend/xml.py
index <HASH>..<HASH> 100644
--- a/anyconfig/backend/xml.py
+++ b/anyconfig/backend/xml.py
@@ -35,11 +35,6 @@ from __future__ import absolute_import
from io import BytesIO
import sys
-
-import anyconfig.backend.base
-import anyconfig.compat
-import anyconfig.mdicts
-
try:
# First, try lxml which is compatible with elementtree and looks faster a
# lot. See also: http://getpython3.com/diveintopython3/xml.html
@@ -50,6 +45,10 @@ except ImportError:
except ImportError:
import elementtree.ElementTree as ET
+import anyconfig.backend.base
+import anyconfig.compat
+import anyconfig.mdicts
+
_PARAM_PREFIX = "@"
|
refactor: re-order imports to import standard lib/3rd party ones before app-specific ones
|
diff --git a/math/src/main/java/smile/math/random/UniversalGenerator.java b/math/src/main/java/smile/math/random/UniversalGenerator.java
index <HASH>..<HASH> 100644
--- a/math/src/main/java/smile/math/random/UniversalGenerator.java
+++ b/math/src/main/java/smile/math/random/UniversalGenerator.java
@@ -190,18 +190,7 @@ public class UniversalGenerator implements RandomNumberGenerator {
throw new IllegalArgumentException("n must be positive");
}
- // n is a power of 2
- if ((n & -n) == n) {
- return (int) ((n * (long) next(31)) >> 31);
- }
-
- int bits, val;
- do {
- bits = next(31);
- val = bits % n;
- } while (bits - val + (n - 1) < 0);
-
- return val;
+ return (int) (nextDouble() * n);
}
@Override
|
fix nextInt. UniversalGenerator generates uniformly distribute double values directly. The way of nextInt of MersenneTwister is improper here.
|
diff --git a/src/helpers.php b/src/helpers.php
index <HASH>..<HASH> 100755
--- a/src/helpers.php
+++ b/src/helpers.php
@@ -2,7 +2,6 @@
use Illuminate\Support\Str;
use InfyOm\Generator\Common\FileSystem;
-use InfyOm\Generator\Common\GeneratorField;
if (!function_exists('g_filesystem')) {
/**
|
refactor: unused import removed
|
diff --git a/spec/mangopay/shared_resources.rb b/spec/mangopay/shared_resources.rb
index <HASH>..<HASH> 100644
--- a/spec/mangopay/shared_resources.rb
+++ b/spec/mangopay/shared_resources.rb
@@ -210,6 +210,7 @@ shared_context 'payins' do
DebitedFunds: {Currency: 'EUR', Amount: 1000},
Fees: {Currency: 'EUR', Amount: 0},
ReturnURL: MangoPay.configuration.root_url,
+ Culture: "FR",
Tag: 'Test PayIn/PayPal/Web'
)
end
|
add culture property to paypal payin
|
diff --git a/peerset.go b/peerset.go
index <HASH>..<HASH> 100644
--- a/peerset.go
+++ b/peerset.go
@@ -1,7 +1,7 @@
package peerset
import (
- peer "gx/ipfs/QmZwZjMVGss5rqYsJVGy18gNbkTJffFyq2x1uJ4e4p3ZAt/go-libp2p-peer"
+ peer "gx/ipfs/QmZpD74pUj6vuxTp1o6LhA3JavC2Bvh9fsWPPVvHnD9sE7/go-libp2p-peer"
"sync"
)
|
update libp2p with go-multiaddr and go-stream-muxer updates
License: MIT
|
diff --git a/lib/odf/cell.rb b/lib/odf/cell.rb
index <HASH>..<HASH> 100644
--- a/lib/odf/cell.rb
+++ b/lib/odf/cell.rb
@@ -28,9 +28,9 @@ module ODF
@type = opts[:type] || :string
unless value.instance_of?(Hash)
if [Date, DateTime, Time].include? value.class
- @value = value
+ @value = value.strftime("%Y-%m-%d")
else
- @value = value.to_s.strip
+ @value = value.to_s.strip
end
end
@@ -65,7 +65,7 @@ module ODF
def make_element_attributes(type, value, opts)
attrs = {'office:value-type' => type}
- attrs['office:date-value'] = value.strftime("%Y-%m-%d") if :date == type
+ attrs['office:date-value'] = value if :date == type
attrs['office:value'] = value if :float == type
attrs['table:formula'] = opts[:formula] unless opts[:formula].nil?
attrs['table:style-name'] = opts[:style] unless opts[:style].nil?
|
(refactoring) Move the format conversion
|
diff --git a/src/server/pps/server/master.go b/src/server/pps/server/master.go
index <HASH>..<HASH> 100644
--- a/src/server/pps/server/master.go
+++ b/src/server/pps/server/master.go
@@ -475,7 +475,7 @@ func (a *apiServer) makeCronCommits(pachClient *client.APIClient, in *pps.Input)
return err
} else if commitInfo != nil && commitInfo.Finished == nil {
// and if there is, delete it
- if err = pachClient.DeleteCommit(in.Cron.Repo, "master"); err != nil {
+ if err = pachClient.DeleteCommit(in.Cron.Repo, commitInfo.Commit.ID); err != nil {
return err
}
}
|
Potentially avoid race in makeCronCommits
|
diff --git a/src/crypto/SecretStorage.js b/src/crypto/SecretStorage.js
index <HASH>..<HASH> 100644
--- a/src/crypto/SecretStorage.js
+++ b/src/crypto/SecretStorage.js
@@ -53,7 +53,7 @@ export class SecretStorage extends EventEmitter {
}
setDefaultKeyId(keyId) {
- return new Promise((resolve) => {
+ return new Promise(async (resolve, reject) => {
const listener = (ev) => {
if (
ev.getType() === 'm.secret_storage.default_key' &&
@@ -65,10 +65,15 @@ export class SecretStorage extends EventEmitter {
};
this._baseApis.on('accountData', listener);
- this._baseApis.setAccountData(
- 'm.secret_storage.default_key',
- { key: keyId },
- );
+ try {
+ await this._baseApis.setAccountData(
+ 'm.secret_storage.default_key',
+ { key: keyId },
+ );
+ } catch (e) {
+ this._baseApis.removeListener('accountData', listener);
+ reject(e);
+ }
});
}
|
Fix setDefaultKeyId to fail if the request fails
It returned only when the echo came down the sync stream, but we
forgot to make it fail if the reuqest failed and it would just
never return in this case.
Fixes <URL>
|
diff --git a/tests/phpunit/WordPressCoreInstallerTest.php b/tests/phpunit/WordPressCoreInstallerTest.php
index <HASH>..<HASH> 100644
--- a/tests/phpunit/WordPressCoreInstallerTest.php
+++ b/tests/phpunit/WordPressCoreInstallerTest.php
@@ -175,8 +175,15 @@ class WordPressCoreInstallerTest extends TestCase {
private function jpbExpectException( $class, $message = '', $isRegExp = false ) {
$this->expectException($class);
if ( $message ) {
- $isRegExp || $this->expectExceptionMessage( $message );
- $isRegExp && $this->expectExceptionMessageRegExp( $message );
+ if ( $isRegExp ) {
+ if ( method_exists( $this, 'expectExceptionMessageRegExp' ) ) {
+ $this->expectExceptionMessageRegExp( $message );
+ } else {
+ $this->expectExceptionMessageMatches( $message );
+ }
+ } else {
+ $this->expectExceptionMessage( $message );
+ }
}
}
|
Update test helpers to get regex matching working on latest version of phpunit
|
diff --git a/src/frontend/org/voltdb/AbstractTopology.java b/src/frontend/org/voltdb/AbstractTopology.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/AbstractTopology.java
+++ b/src/frontend/org/voltdb/AbstractTopology.java
@@ -1368,6 +1368,24 @@ public class AbstractTopology {
}
/**
+ * get all the hostIds in the partition group
+ * contain the host(s) that have highest partition id
+ * @return all the hostIds in the partition group
+ */
+ public Set<Integer> getPartitionGroupPeersContainHighestPid() {
+ // find highest partition
+ int hPid = getPartitionCount() -1;
+
+ // find the host that contains the highest partition
+ Collection<Integer> hHostIds = getHostIdList(hPid);
+ if (hHostIds == null || hHostIds.isEmpty()) {
+ return Collections.emptySet();
+ }
+ int hHostId = hHostIds.iterator().next();
+ return getPartitionGroupPeers(hHostId);
+ }
+
+ /**
* get all the hostIds in the partition group where the host with the given host id belongs
* @param hostId the given hostId
* @return all the hostIds in the partition group
|
ENG-<I>: always rely on current topo for figuring out highest parti… (#<I>)
* ENG-<I>: always rely on current topo for figuring out highest partiton group
* address the review
|
diff --git a/src/PrintSSH.php b/src/PrintSSH.php
index <HASH>..<HASH> 100644
--- a/src/PrintSSH.php
+++ b/src/PrintSSH.php
@@ -135,7 +135,7 @@ class PrintSSH
$remoteFile = $this->uploadFile($localFile);
- $printCommand = "lp -d $printerName -n $copies";
+ $printCommand = "lpr -P $printerName -# $copies";
$optionString = '';
foreach ($options as $optionsName => $value) {
|
Moved from lp to lpr
|
diff --git a/cilium/cmd/cleanup.go b/cilium/cmd/cleanup.go
index <HASH>..<HASH> 100644
--- a/cilium/cmd/cleanup.go
+++ b/cilium/cmd/cleanup.go
@@ -76,7 +76,7 @@ func runCleanup() {
// errors seen, but continue. So that one remove function does not
// prevent the remaining from running.
type cleanupFunc func() error
- checks := []cleanupFunc{removeAllMaps, unmountFS, removeDirs, removeCNI}
+ checks := []cleanupFunc{removeAllMaps, removeDirs, removeCNI}
for _, clean := range checks {
if err := clean(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %s\n", err)
@@ -145,13 +145,6 @@ func removeDirs() error {
return nil
}
-func unmountFS() error {
- if !bpf.IsBpffs(bpf.GetMapRoot()) {
- return nil
- }
- return bpf.UnMountFS()
-}
-
func removeAllMaps() error {
mapDir := bpf.MapPrefixPath()
maps, err := ioutil.ReadDir(mapDir)
|
cilium: Do not unmount BPF filesystem on cleanup
It does not seem wise to unmount the BPF filesystem on manual cleanup, it may
be in use by other components.
|
diff --git a/sqlalchemy_postgres_autocommit/databases.py b/sqlalchemy_postgres_autocommit/databases.py
index <HASH>..<HASH> 100644
--- a/sqlalchemy_postgres_autocommit/databases.py
+++ b/sqlalchemy_postgres_autocommit/databases.py
@@ -14,12 +14,12 @@ class Database:
event.listen(self.Session, 'after_begin', self.handle_after_transaction_begin)
event.listen(self.Session, 'after_transaction_end', self.handle_after_transaction_end)
- def connect(self, database_url):
- self.engine = engine.create_engine(database_url, isolation_level="AUTOCOMMIT")
+ def connect(self, database_url, **kwargs):
+ self.engine = engine.create_engine(database_url, isolation_level="AUTOCOMMIT", **kwargs)
self.Session.configure(bind=self.engine)
- def connect_with_connection(self, database_url):
- self.engine = engine.create_engine(database_url, isolation_level="AUTOCOMMIT")
+ def connect_with_connection(self, database_url, **kwargs):
+ self.engine = engine.create_engine(database_url, isolation_level="AUTOCOMMIT", **kwargs)
connection = self.engine.connect()
self.Session.configure(bind=connection)
return connection
|
Add kwargs to create engine.
We decided to add pre_ping=True . Without it we were running into bug: <URL>
|
diff --git a/lib/composer.js b/lib/composer.js
index <HASH>..<HASH> 100644
--- a/lib/composer.js
+++ b/lib/composer.js
@@ -19,8 +19,8 @@
var opts = targetOptions || {};
var renderTarget = new THREE.WebGLRenderTarget(
- (opts.width || renderer.domElement.width),
- (opts.height || renderer.domElement.height),
+ (opts.width * (opts.density || 1) || renderer.domElement.width),
+ (opts.height * (opts.density || 1) || renderer.domElement.height),
_.extend({
minFilter: THREE.LinearFilter,
magFilter: THREE.LinearFilter,
|
Fixing a spawned canvas density issue.
|
diff --git a/classes/Enum.php b/classes/Enum.php
index <HASH>..<HASH> 100755
--- a/classes/Enum.php
+++ b/classes/Enum.php
@@ -12,7 +12,7 @@
abstract class Enum {
- private function __construct(){}
+ final private function __construct(){}
protected static function __constants(){
static $_consts = null;
|
Enum::__constructor now is final
|
diff --git a/devices.js b/devices.js
index <HASH>..<HASH> 100644
--- a/devices.js
+++ b/devices.js
@@ -9628,6 +9628,28 @@ const devices = [
description: 'RGBW LED bulb with dimmer',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
+
+ // Viessmann
+ {
+ zigbeeModel: ['7637434'],
+ model: 'ZK03840',
+ vendor: 'Viessmann',
+ description: 'ViCare radiator thermostat valve',
+ supports: 'thermostat',
+ fromZigbee: [fz.thermostat_att_report, fz.battery],
+ toZigbee: [tz.thermostat_occupied_heating_setpoint, tz.thermostat_local_temperature_calibration],
+ meta: {configureKey: 1},
+ configure: async (device, coordinatorEndpoint) => {
+ const endpoint = device.getEndpoint(1);
+ await bind(endpoint, coordinatorEndpoint, [
+ 'genBasic', 'genPowerCfg', 'genIdentify', 'genTime', 'genPollCtrl', 'hvacThermostat',
+ 'hvacUserInterfaceCfg',
+ ]);
+ await configureReporting.thermostatTemperature(endpoint);
+ await configureReporting.thermostatOccupiedHeatingSetpoint(endpoint);
+ await configureReporting.thermostatPIHeatingDemand(endpoint);
+ },
+ },
];
module.exports = devices.map((device) =>
|
add Viessmann thermostat (#<I>)
* add Viessmann thermostat
* Update devices.js
typo failure
* Update devices.js
okay sorry for the trouble :-)
* Update devices.js
* Update devices.js
|
diff --git a/estnltk/tests/test_layer/test_ambiguous_span.py b/estnltk/tests/test_layer/test_ambiguous_span.py
index <HASH>..<HASH> 100644
--- a/estnltk/tests/test_layer/test_ambiguous_span.py
+++ b/estnltk/tests/test_layer/test_ambiguous_span.py
@@ -62,8 +62,8 @@ def test_getitem():
with pytest.raises(KeyError):
span_1['bla']
- with pytest.raises(IndexError):
- span_1[2]
+ with pytest.raises(KeyError):
+ span_1[0]
def test_base_spans():
|
removed subscripting with integers from Span and AmbiguousSpan
|
diff --git a/lib/apruve/resources/order.rb b/lib/apruve/resources/order.rb
index <HASH>..<HASH> 100644
--- a/lib/apruve/resources/order.rb
+++ b/lib/apruve/resources/order.rb
@@ -25,7 +25,7 @@ module Apruve
response = Apruve.get("orders?secure_hash=#{hash}")
logger.debug response.body
orders = response.body.map { |order| Order.new(order) }
- orders.max_by { |order| order[:created_at] }
+ orders.max_by { |order| order.created_at }
end
def self.finalize!(id)
|
AP-<I>: attr method instead of hash lookup
|
diff --git a/lib/word-to-markdown.rb b/lib/word-to-markdown.rb
index <HASH>..<HASH> 100644
--- a/lib/word-to-markdown.rb
+++ b/lib/word-to-markdown.rb
@@ -72,9 +72,7 @@ class WordToMarkdown
when :windows
'C:\Program Files (x86)\LibreOffice 4\program\soffice.exe'
else
- soffice_path ||= which("soffice")
- soffice_path ||= which("soffice.bin")
- soffice_path ||= "soffice"
+ "soffice"
end
end
|
just call soffice, not abs path
|
diff --git a/code/media/koowa/com_koowa/js/koowa.js b/code/media/koowa/com_koowa/js/koowa.js
index <HASH>..<HASH> 100644
--- a/code/media/koowa/com_koowa/js/koowa.js
+++ b/code/media/koowa/com_koowa/js/koowa.js
@@ -506,7 +506,8 @@ Koowa.Controller.Grid = Koowa.Controller.extend({
// Trigger checkbox when the user clicks anywhere in the row
tr.on('click', function(event){
- if($(event.target).is('[type=checkbox]')) {
+ var target = $(event.target);
+ if(target.is('[type=checkbox]') || target.is('[type=radio]')) {
return;
}
@@ -518,6 +519,10 @@ Koowa.Controller.Grid = Koowa.Controller.extend({
var selected,
parent = tr.parent();
+ if ($(this).is('[type=radio]')) {
+ parent.find('.selected').removeClass('selected');
+ }
+
$(this).prop('checked') ? tr.addClass('selected') : tr.removeClass('selected');
selected = tr.hasClass('selected') + tr.siblings('.selected').length;
|
re #<I>: Add support for radio buttons to koowa.js
|
diff --git a/lib/dm-core/collection.rb b/lib/dm-core/collection.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-core/collection.rb
+++ b/lib/dm-core/collection.rb
@@ -17,10 +17,6 @@ module DataMapper
# A Collection is typically returned by the Model#all
# method.
class Collection < LazyArray
- extend Deprecate
-
- deprecate :add, :<<
- deprecate :build, :new
# Returns the Query the Collection is scoped with
#
|
Remove deprecated methods from Collection
|
diff --git a/master/buildbot/test/fake/fakedb.py b/master/buildbot/test/fake/fakedb.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/fake/fakedb.py
+++ b/master/buildbot/test/fake/fakedb.py
@@ -106,7 +106,8 @@ class Row(object):
return '%s(**%r)' % (self.__class__.__name__, self.values)
def nextId(self):
- id, Row._next_id = Row._next_id, (Row._next_id or 1) + 1
+ id = Row._next_id if Row._next_id is not None else 1
+ Row._next_id = id + 1
return id
def hashColumns(self, *args):
|
treat Row._next_id=None case as if next id should be 1
Otherwise first call to Row.nextId() returns None, which leads to failures of
some tests if they are being run first (before other tests initialized next id
to non-None value).
|
diff --git a/src/Illuminate/Support/Facades/Schema.php b/src/Illuminate/Support/Facades/Schema.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Support/Facades/Schema.php
+++ b/src/Illuminate/Support/Facades/Schema.php
@@ -23,7 +23,7 @@ class Schema extends Facade
/**
* Get a schema builder instance for a connection.
*
- * @param string $name
+ * @param string|null $name
* @return \Illuminate\Database\Schema\Builder
*/
public static function connection($name)
|
Add missing null typehint to Schema facade connection method
|
diff --git a/lib/mongo_mapper/plugins/associations/in_array_proxy.rb b/lib/mongo_mapper/plugins/associations/in_array_proxy.rb
index <HASH>..<HASH> 100644
--- a/lib/mongo_mapper/plugins/associations/in_array_proxy.rb
+++ b/lib/mongo_mapper/plugins/associations/in_array_proxy.rb
@@ -27,7 +27,7 @@ module MongoMapper
return nil if ids.blank?
if ordered?
- ids = find_ids(options)
+ ids = find_ordered_ids(options)
find!(ids.first) if ids.any?
else
query(options).first
@@ -38,7 +38,7 @@ module MongoMapper
return nil if ids.blank?
if ordered?
- ids = find_ids(options)
+ ids = find_ordered_ids(options)
find!(ids.last) if ids.any?
else
query(options).last
@@ -132,7 +132,9 @@ module MongoMapper
valid.empty? ? nil : valid
end
- def find_ids(options={})
+ def find_ordered_ids(options={})
+ return ids if options.empty?
+
matched_ids = klass.collection.distinct(:_id, query(options).criteria.to_hash)
matched_ids.sort_by! { |matched_id| ids.index(matched_id) }
end
|
* rename find_ids => find_ordered_ids
* optimization: don't do extra query with in_array_proxy ordered: true
when no query options are given
|
diff --git a/dwave/cloud/cli.py b/dwave/cloud/cli.py
index <HASH>..<HASH> 100644
--- a/dwave/cloud/cli.py
+++ b/dwave/cloud/cli.py
@@ -252,7 +252,9 @@ def ping(config_file, profile, json_output):
type=click.Path(exists=True, dir_okay=False), help='Configuration file path')
@click.option('--profile', '-p', default=None, help='Connection profile name')
@click.option('--id', default=None, help='Solver ID/name')
-def solvers(config_file, profile, id):
+@click.option('--list', 'list_solvers', default=False, is_flag=True,
+ help='List available solvers, one per line')
+def solvers(config_file, profile, id, list_solvers):
"""Get solver details.
Unless solver name/id specified, fetch and display details for
@@ -268,6 +270,11 @@ def solvers(config_file, profile, id):
click.echo("Solver {} not found.".format(id))
return 1
+ if list_solvers:
+ for solver in solvers:
+ click.echo(solver.id)
+ return
+
# ~YAML output
for solver in solvers:
click.echo("Solver: {}".format(solver.id))
|
CLI: add --list option to 'dwave solvers'
|
diff --git a/web/concrete/models/permission/categories/block.php b/web/concrete/models/permission/categories/block.php
index <HASH>..<HASH> 100644
--- a/web/concrete/models/permission/categories/block.php
+++ b/web/concrete/models/permission/categories/block.php
@@ -134,7 +134,7 @@ class BlockPermissionKey extends PermissionKey {
'peID' => $pae->getAccessEntityID(),
'pdID' => $pdID,
'accessType' => $accessType
- ), array('cID', 'cvID', 'peID', 'pkID'), true);
+ ), array('cID', 'cvID', 'bID', 'peID', 'pkID'), true);
}
public function removeAssignment(PermissionAccessEntity $pe) {
|
fixing bug in block assignment
Former-commit-id: <I>cf9f<I>b9f2a<I>d<I>ffcfccbc4c<I>f<I>
|
diff --git a/test/AbstractContextTest.php b/test/AbstractContextTest.php
index <HASH>..<HASH> 100644
--- a/test/AbstractContextTest.php
+++ b/test/AbstractContextTest.php
@@ -2,6 +2,7 @@
namespace Amp\Parallel\Test;
+use Amp\Delayed;
use Amp\Loop;
use Amp\Parallel\Sync\Internal\ExitSuccess;
use Amp\PHPUnit\TestCase;
@@ -280,7 +281,8 @@ abstract class AbstractContextTest extends TestCase {
$context->start();
- while (!yield $context->send(0));
+ yield new Delayed(1000);
+ yield $context->send(0);
});
}
}
|
Use delay instead of checking the resolution value for sending to exited context
|
diff --git a/tests/test_generate_hooks.py b/tests/test_generate_hooks.py
index <HASH>..<HASH> 100644
--- a/tests/test_generate_hooks.py
+++ b/tests/test_generate_hooks.py
@@ -144,7 +144,8 @@ def test_run_failing_hook_removes_output_directory():
repo_dir='tests/test-hooks/',
overwrite_if_exists=True
)
- assert 'Hook script failed' in str(excinfo.value)
+
+ assert 'Hook script failed' in str(excinfo.value)
assert not os.path.exists('inputhooks')
@@ -174,7 +175,8 @@ def test_run_failing_hook_preserves_existing_output_directory():
repo_dir='tests/test-hooks/',
overwrite_if_exists=True
)
- assert 'Hook script failed' in str(excinfo.value)
+
+ assert 'Hook script failed' in str(excinfo.value)
assert os.path.exists('inputhooks')
|
Move assert statements out of context managers in tests
|
diff --git a/packages/okam-core/src/swan/helper/triggerEvent.js b/packages/okam-core/src/swan/helper/triggerEvent.js
index <HASH>..<HASH> 100644
--- a/packages/okam-core/src/swan/helper/triggerEvent.js
+++ b/packages/okam-core/src/swan/helper/triggerEvent.js
@@ -40,7 +40,7 @@ export function normalizeEventArgs(component, args) {
dataset,
id: component.id
},
- detail: eventData
+ detail: args[1]
};
args[1] = eventObj;
|
fix(okam-core): fix $emit event with empty string event detail without keeping the original event detail
|
diff --git a/tests/integration/MediaUploaderTest.php b/tests/integration/MediaUploaderTest.php
index <HASH>..<HASH> 100644
--- a/tests/integration/MediaUploaderTest.php
+++ b/tests/integration/MediaUploaderTest.php
@@ -469,6 +469,21 @@ class MediaUploaderTest extends TestCase
$this->assertEquals('3ef5e70366086147c2695325d79a25cc', $media->filename);
}
+ public function test_it_can_revert_to_original_filename()
+ {
+ $this->useFilesystem('tmp');
+ $this->useDatabase();
+
+ $media = Facade::fromSource(__DIR__ . '/../_data/plank.png')
+ ->toDestination('tmp', 'foo')
+ ->useHashForFilename()
+ ->useOriginalFilename()
+ ->upload();
+
+ $this->assertEquals('plank', $media->filename);
+
+ }
+
protected function mockUploader($filesystem = null, $factory = null)
{
return new MediaUploader(
|
added test for useOriginalFilename()
|
diff --git a/trunk/JLanguageTool/src/java/org/languagetool/tools/StringTools.java b/trunk/JLanguageTool/src/java/org/languagetool/tools/StringTools.java
index <HASH>..<HASH> 100644
--- a/trunk/JLanguageTool/src/java/org/languagetool/tools/StringTools.java
+++ b/trunk/JLanguageTool/src/java/org/languagetool/tools/StringTools.java
@@ -105,8 +105,7 @@ public final class StringTools {
* <code>\n</code>
* @throws IOException
*/
- public static String readFile(final InputStream file, final String encoding)
- throws IOException {
+ public static String readFile(final InputStream file, final String encoding) throws IOException {
InputStreamReader isr = null;
BufferedReader br = null;
final StringBuilder sb = new StringBuilder();
@@ -238,6 +237,9 @@ public final class StringTools {
return sb.toString();
}
+ /**
+ * @deprecated use {@link #streamToString(java.io.InputStream, String)} instead (deprecated since 1.8)
+ */
public static String streamToString(final InputStream is) throws IOException {
final InputStreamReader isr = new InputStreamReader(is);
try {
@@ -264,7 +266,7 @@ public final class StringTools {
}
/**
- * Escapes these characters: less than, bigger than, quote, ampersand.
+ * Escapes these characters: less than, greater than, quote, ampersand.
*/
public static String escapeHTML(final String s) {
// this version is much faster than using s.replaceAll
|
deprecate streamToString(InputStream), which is not used anyway (but it's public so we deprecate it instead of just deleting it)
|
diff --git a/raft/raft.go b/raft/raft.go
index <HASH>..<HASH> 100644
--- a/raft/raft.go
+++ b/raft/raft.go
@@ -1093,6 +1093,9 @@ func stepLeader(r *raft, m pb.Message) error {
case pr.State == tracker.StateProbe:
pr.BecomeReplicate()
case pr.State == tracker.StateSnapshot && pr.Match >= pr.PendingSnapshot:
+ // TODO(tbg): we should also enter this branch if a snapshot is
+ // received that is below pr.PendingSnapshot but which makes it
+ // possible to use the log again.
r.logger.Debugf("%x recovered from needing snapshot, resumed sending replication messages to %x [%s]", r.id, m.From, pr)
// Transition back to replicating state via probing state
// (which takes the snapshot into account). If we didn't
|
raft: leave TODO about leaving StateSnapshot
The condition is overly strict, which has popped up in CockroachDB
recently.
|
diff --git a/src/Command/User/UserListCommand.php b/src/Command/User/UserListCommand.php
index <HASH>..<HASH> 100644
--- a/src/Command/User/UserListCommand.php
+++ b/src/Command/User/UserListCommand.php
@@ -44,6 +44,13 @@ class UserListCommand extends CommandBase
ksort($rows);
+ if (!$table->formatIsMachineReadable()) {
+ $this->stdErr->writeln(sprintf(
+ 'Users on the project %s:',
+ $this->api()->getProjectLabel($project)
+ ));
+ }
+
$table->render(array_values($rows), ['email' => 'Email address', 'Name', 'role' => 'Project role', 'ID']);
if (!$table->formatIsMachineReadable()) {
|
[user:list] Display project name/ID
|
diff --git a/lib/formtastic/builder/base.rb b/lib/formtastic/builder/base.rb
index <HASH>..<HASH> 100644
--- a/lib/formtastic/builder/base.rb
+++ b/lib/formtastic/builder/base.rb
@@ -57,12 +57,6 @@ module Formtastic
model_name.constantize.content_columns.collect { |c| c.name.to_sym }.compact rescue []
end
- # Returns nil, or a symbol like :belongs_to or :has_many
- def association_macro_for_method(method) #:nodoc:
- reflection = reflection_for(method)
- reflection.macro if reflection
- end
-
def association_primary_key(method)
reflection = reflection_for(method)
reflection.options[:foreign_key] if reflection && !reflection.options[:foreign_key].blank?
diff --git a/lib/formtastic/builder/errors_helper.rb b/lib/formtastic/builder/errors_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/formtastic/builder/errors_helper.rb
+++ b/lib/formtastic/builder/errors_helper.rb
@@ -96,6 +96,11 @@ module Formtastic
@object && @object.respond_to?(:errors) && Formtastic::Builder::Base::INLINE_ERROR_TYPES.include?(inline_errors)
end
+ def association_macro_for_method(method) #:nodoc:
+ reflection = reflection_for(method)
+ reflection.macro if reflection
+ end
+
end
end
end
\ No newline at end of file
|
moved association_macro_for_method to ErrorsHelper
|
diff --git a/src/org/jgroups/Version.java b/src/org/jgroups/Version.java
index <HASH>..<HASH> 100644
--- a/src/org/jgroups/Version.java
+++ b/src/org/jgroups/Version.java
@@ -20,7 +20,7 @@ import org.jgroups.annotations.Immutable;
@Immutable
public class Version {
public static final short major = 3;
- public static final short minor = 2;
+ public static final short minor = 3;
public static final short micro = 0;
public static final String description="3.3.0.Alpha1";
|
Changed version to <I>.Alpha1
|
diff --git a/bundle/Installer/_templates/legacy_siteaccess/site.ini.append.php b/bundle/Installer/_templates/legacy_siteaccess/site.ini.append.php
index <HASH>..<HASH> 100644
--- a/bundle/Installer/_templates/legacy_siteaccess/site.ini.append.php
+++ b/bundle/Installer/_templates/legacy_siteaccess/site.ini.append.php
@@ -33,6 +33,7 @@ TextTranslation=disabled
[ContentSettings]
CachedViewPreferences[full]=admin_navigation_content=1;admin_children_viewmode=list;admin_list_limit=1
TranslationList={{ translationList }}
+RedirectAfterPublish=node
[TemplateSettings]
Debug=disabled
|
Redirect to the current node after publish instead of parent (#<I>)
|
diff --git a/lib/redhillonrails_core/version.rb b/lib/redhillonrails_core/version.rb
index <HASH>..<HASH> 100644
--- a/lib/redhillonrails_core/version.rb
+++ b/lib/redhillonrails_core/version.rb
@@ -1,3 +1,3 @@
module RedhillonrailsCore
- VERSION = "1.1.3"
+ VERSION = "1.2.0"
end
|
bumped version to <I>
|
diff --git a/src/pyop/provider.py b/src/pyop/provider.py
index <HASH>..<HASH> 100644
--- a/src/pyop/provider.py
+++ b/src/pyop/provider.py
@@ -361,6 +361,13 @@ class Provider(object):
:param authentication_request: the code_verfier to check against the code challenge.
:returns: whether the code_verifier is what was expected given the cc_cm
"""
+ if not 'code_verifier' in token_request:
+ return False
+
+ if not 'code_challenge_method' in authentication_request:
+ raise InvalidTokenRequest("A code_challenge and code_verifier have been supplied"
+ "but missing code_challenge_method in authentication_request", token_request)
+
code_challenge_method = authentication_request['code_challenge_method']
if code_challenge_method == 'plain':
return authentication_request['code_challenge'] == token_request['code_verifier']
|
verify that required request parameters have been supplied
|
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index <HASH>..<HASH> 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -130,8 +130,8 @@ module ActiveResource
connection.delete(self.class.element_path(id, prefix_options))
end
- def to_xml
- attributes.to_xml(:root => self.class.element_name)
+ def to_xml(options={})
+ attributes.to_xml({:root => self.class.element_name}.merge(options))
end
# Reloads the attributes of this object from the remote web service.
|
to_xml needs to accept an options hash to conform with the expectations of Hash#to_xml
git-svn-id: <URL>
|
diff --git a/u2flib_host/hid_transport.py b/u2flib_host/hid_transport.py
index <HASH>..<HASH> 100644
--- a/u2flib_host/hid_transport.py
+++ b/u2flib_host/hid_transport.py
@@ -50,6 +50,8 @@ DEVICES = [
(0x1050, 0x0406), # YubiKey 4 U2F+CCID
(0x1050, 0x0407), # YubiKey 4 OTP+U2F+CCID
(0x2581, 0xf1d0), # Plug-Up U2F Security Key
+ (0x096e, 0x0858), # FT U2F
+ (0x096e, 0x085b), # FS ePass FIDO
]
HID_RPT_SIZE = 64
|
add Google Titan (Feitian) devices
|
diff --git a/raft/src/main/java/net/kuujo/copycat/raft/state/LeaderState.java b/raft/src/main/java/net/kuujo/copycat/raft/state/LeaderState.java
index <HASH>..<HASH> 100644
--- a/raft/src/main/java/net/kuujo/copycat/raft/state/LeaderState.java
+++ b/raft/src/main/java/net/kuujo/copycat/raft/state/LeaderState.java
@@ -956,11 +956,7 @@ class LeaderState extends ActiveState {
* Resets the match index when a response fails.
*/
private void resetMatchIndex(AppendResponse response) {
- if (state.getMatchIndex() == 0) {
- state.setMatchIndex(response.logIndex());
- } else if (response.logIndex() != 0) {
- state.setMatchIndex(Math.max(state.getMatchIndex(), response.logIndex()));
- }
+ state.setMatchIndex(response.logIndex());
LOGGER.debug("{} - Reset match index for {} to {}", context.getCluster().member().id(), member, state.getMatchIndex());
}
|
Always set follower's matchIndex according to AppendEntries response logIndex.
|
diff --git a/lib/Cake/Model/BehaviorCollection.php b/lib/Cake/Model/BehaviorCollection.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Model/BehaviorCollection.php
+++ b/lib/Cake/Model/BehaviorCollection.php
@@ -148,7 +148,7 @@ class BehaviorCollection extends ObjectCollection {
$parentMethods = array_flip(get_class_methods('ModelBehavior'));
$callbacks = array(
'setup', 'cleanup', 'beforeFind', 'afterFind', 'beforeSave', 'afterSave',
- 'beforeDelete', 'afterDelete', 'afterError'
+ 'beforeDelete', 'afterDelete', 'onError'
);
foreach ($methods as $m) {
|
Fix for wrong callback in $callbacks array: renamed afterError to onError
|
diff --git a/app/controllers/koudoku/subscriptions_controller.rb b/app/controllers/koudoku/subscriptions_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/koudoku/subscriptions_controller.rb
+++ b/app/controllers/koudoku/subscriptions_controller.rb
@@ -117,12 +117,13 @@ module Koudoku
@subscription.subscription_owner = @owner
if @subscription.save
- flash[:notice] = ::ApplicationController.respond_to?(:new_subscription_notice_message) ?
- ::ApplicationController.try(:new_subscription_notice_message) :
+ controller = ::ApplicationController.new
+ flash[:notice] = controller.respond_to?(:new_subscription_notice_message) ?
+ controller.try(:new_subscription_notice_message) :
"You've been successfully upgraded."
redirect_to(
- (::ApplicationController.respond_to?(:after_new_subscription_path) ?
- ::ApplicationController.try(:after_new_subscription_path, @owner, @subscription) :
+ (controller.respond_to?(:after_new_subscription_path) ?
+ controller.try(:after_new_subscription_path, @owner, @subscription) :
owner_subscription_path(@owner, @subscription)
)
) # EO redirect_to
|
-bugfix: fixed bug in subscription_controller#create where I was using reflection on the class instead of an object of that class
|
diff --git a/pysrt/srtfile.py b/pysrt/srtfile.py
index <HASH>..<HASH> 100644
--- a/pysrt/srtfile.py
+++ b/pysrt/srtfile.py
@@ -188,17 +188,17 @@ class SubRipFile(UserList, object):
Use init eol if no other provided.
"""
path = path or self.path
-
- save_file = open(path, 'w+')
- self.write_into(save_file, encoding=encoding, eol=eol)
+ encoding = encoding or self.encoding
+
+ save_file = codecs.open(path, 'w+', encoding=encoding)
+ self.write_into(save_file, eol=eol)
save_file.close()
- def write_into(self, io, encoding=None, eol=None):
- encoding = encoding or self.encoding
+ def write_into(self, io, eol=None):
output_eol = eol or self.eol
for item in self:
string_repr = unicode(item)
if output_eol != '\n':
string_repr = string_repr.replace('\n', output_eol)
- io.write(string_repr.encode(encoding))
+ io.write(string_repr)
|
refactor: get rid of encoding mess in SubRipFile.write_into
|
diff --git a/tests/remotes/s3.py b/tests/remotes/s3.py
index <HASH>..<HASH> 100644
--- a/tests/remotes/s3.py
+++ b/tests/remotes/s3.py
@@ -30,7 +30,13 @@ class S3(Base, CloudURLInfo):
@staticmethod
def _get_storagepath():
- return TEST_AWS_REPO_BUCKET + "/" + str(uuid.uuid4())
+ return (
+ TEST_AWS_REPO_BUCKET
+ + "/"
+ + "dvc_test_caches"
+ + "/"
+ + str(uuid.uuid4())
+ )
@staticmethod
def get_url():
|
tests: real_s3 fixture: use specific path (#<I>)
|
diff --git a/core/src/main/java/org/infinispan/CacheImpl.java b/core/src/main/java/org/infinispan/CacheImpl.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/infinispan/CacheImpl.java
+++ b/core/src/main/java/org/infinispan/CacheImpl.java
@@ -1009,7 +1009,6 @@ public class CacheImpl<K, V> extends CacheSupport<K, V> implements AdvancedCache
transactionManager.commit();
} catch (Throwable e) {
log.couldNotCompleteInjectedTransaction(e);
- tryRollback();
throw new CacheException("Could not commit implicit transaction", e);
}
}
|
ISPN-<I> For failing injected transactions, the rollback is incorrectly invoked
|
diff --git a/holoviews/core/element.py b/holoviews/core/element.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/element.py
+++ b/holoviews/core/element.py
@@ -113,11 +113,6 @@ class Element(ViewableElement, Composable, Overlayable):
return pandas.DataFrame(dim_vals, columns=column_names)
- def __repr__(self):
- params = ', '.join('%s=%r' % (k,v) for (k,v) in self.get_param_values())
- return "%s(%r, %s)" % (self.__class__.__name__, self.data, params)
-
-
class Element2D(Element):
|
Removed the old __repr__ implementation from Element
|
diff --git a/utp.go b/utp.go
index <HASH>..<HASH> 100644
--- a/utp.go
+++ b/utp.go
@@ -72,7 +72,7 @@ const (
// Experimentation on localhost on OSX gives me this value. It appears to
// be the largest approximate datagram size before remote libutp starts
// selectively acking.
- minMTU = 1500
+ minMTU = 576
recvWindow = 0x8000
// Does not take into account possible extensions, since currently we
// don't ever send any.
|
Possible packet truncation occuring with excessively long packets leading to corrupted stream
Need to investigate if DF Don't Fragment will prevent or report this to us
|
diff --git a/src/Pdf.php b/src/Pdf.php
index <HASH>..<HASH> 100644
--- a/src/Pdf.php
+++ b/src/Pdf.php
@@ -17,6 +17,9 @@ class Pdf
// Regular expression to detect HTML strings
const REGEX_HTML = '/<html/i';
+ // Regular expression to detect XML strings
+ const REGEX_XML = '/<\??xml/i';
+
// prefix for tmp files
const TMP_PREFIX = 'tmp_wkhtmlto_pdf_';
@@ -262,6 +265,8 @@ class Pdf
{
if (preg_match(self::REGEX_HTML, $input)) {
return $this->_tmpFiles[] = new File($input, '.html', self::TMP_PREFIX, $this->tmpDir);
+ } elseif (preg_match(self::REGEX_XML, $input)) {
+ return $this->_tmpFiles[] = new File($input, '.xml', self::TMP_PREFIX, $this->tmpDir);
} else {
return $input;
}
|
Added expression for XML (svg) detection
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ from setuptools import find_packages
import time
-_version = "0.1.dev%s" % int(time.time())
+_version = "0.1"
_packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"])
_short_description = "pylint-common is a Pylint plugin to improve Pylint error analysis of the" \
@@ -18,7 +18,7 @@ setup( name='pylint-common',
description=_short_description,
version=_version,
packages=_packages,
- install_requires=['pylint', 'astroid', 'pylint-plugin-utils'],
+ install_requires=['pylint>=1.0', 'astroid>=1.0', 'pylint-plugin-utils>=0.1'],
license='GPLv2',
keywords='pylint stdlib plugin'
)
|
Setting versions for requirements and setting version to <I> for release
|
diff --git a/lib/vestal_versions/creation.rb b/lib/vestal_versions/creation.rb
index <HASH>..<HASH> 100644
--- a/lib/vestal_versions/creation.rb
+++ b/lib/vestal_versions/creation.rb
@@ -39,8 +39,8 @@ module VestalVersions
end
# Creates a new version upon updating the parent record.
- def create_version
- versions.create(version_attributes)
+ def create_version(attributes = nil)
+ versions.create(attributes || version_attributes)
reset_version_changes
reset_version
end
diff --git a/lib/vestal_versions/deletion.rb b/lib/vestal_versions/deletion.rb
index <HASH>..<HASH> 100644
--- a/lib/vestal_versions/deletion.rb
+++ b/lib/vestal_versions/deletion.rb
@@ -38,7 +38,7 @@ module VestalVersions
end
def create_destroyed_version
- versions.create({:modifications => attributes, :number => last_version + 1, :tag => 'deleted'})
+ create_version({:modifications => attributes, :number => last_version + 1, :tag => 'deleted'})
end
end
|
making the delete creation path follow the same flow as normal version creation
|
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/SimpleMMcifConsumer.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/SimpleMMcifConsumer.java
index <HASH>..<HASH> 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/SimpleMMcifConsumer.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/SimpleMMcifConsumer.java
@@ -610,6 +610,7 @@ public class SimpleMMcifConsumer implements MMcifConsumer {
// drop atoms from cloned group...
// https://redmine.open-bio.org/issues/3307
altLocG.setAtoms(new ArrayList<Atom>());
+ altLocG.getAltLocs().clear();
current_group.addAltLoc(altLocG);
return altLocG;
}
|
Fix altLocs bug in MMCiff
It was fixed for PDB files parsing but not for MMCiff
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
setup(
name='centerline',
- version='0.4',
+ version='0.4.1',
description='Calculate the centerline of a polygon',
long_description=long_description,
classifiers=[
|
Bump package to <I>
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -25,8 +25,18 @@ class Watcher extends EventEmitter {
startchild() {
if (this.child) return;
+
+ let filteredArgs = process.execArgv.filter(
+ v => !/^--(debug|inspect)/.test(v)
+ );
- this.child = fork(path.join(__dirname, 'child'));
+ let options = {
+ execArgv: filteredArgs,
+ env: process.env,
+ cwd: process.cwd()
+ };
+
+ this.child = fork(path.join(__dirname, 'child'), process.argv, options);
if (this.watchedPaths.size > 0) {
this.sendCommand('add', [Array.from(this.watchedPaths)]);
@@ -130,4 +140,4 @@ class Watcher extends EventEmitter {
}
}
-module.exports = Watcher;
\ No newline at end of file
+module.exports = Watcher;
|
Fixed inspect bug
This package breaks inspect usage in parcel, please add this code, it is the same as in parcel itself:
<URL>.
|
diff --git a/src/PHPushbullet.php b/src/PHPushbullet.php
index <HASH>..<HASH> 100644
--- a/src/PHPushbullet.php
+++ b/src/PHPushbullet.php
@@ -126,7 +126,9 @@ class PHPushbullet
public function all()
{
foreach ($this->devices() as $device) {
- $this->devices[] = $device->iden;
+ if($device->pushable == true) {
+ $this->devices[] = $device->iden;
+ }
}
return $this;
|
Fix "Bad Request" error for unpushable devices
|
diff --git a/src/Icon.js b/src/Icon.js
index <HASH>..<HASH> 100644
--- a/src/Icon.js
+++ b/src/Icon.js
@@ -8,7 +8,21 @@ import icons from '../icons.json'
const aliases = {
scrollLeft: icons.chevronLeft,
chevronLight: icons.chevronDown,
- chevronThick: icons.chevronDownThick
+ chevronThick: icons.chevronDownThick,
+ // aliases for breaking changes from #153
+ // should add propType warnings similar to the color name deprecation getters
+ box: icons.boxEmpty,
+ car: icons.cars,
+ cruise: icons.cruises,
+ description: icons.document,
+ hotel: icons.hotels,
+ allInclusive: icons.inclusive,
+ radioFilled: icons.radioChecked,
+ radio: icons.radioEmpty,
+ add: icons.radioPlus,
+ minus: icons.radioMinus,
+ businessSeat: icons.seatBusiness,
+ economySeat: icons.seatEconomy
}
const getPath = ({ name, legacy }) => {
|
Add aliases for renamed icons in #<I>
|
diff --git a/enforcer/datapath.go b/enforcer/datapath.go
index <HASH>..<HASH> 100644
--- a/enforcer/datapath.go
+++ b/enforcer/datapath.go
@@ -293,11 +293,10 @@ func (d *Datapath) doCreatePU(contextID string, puInfo *policy.PUInfo) error {
}
pu := &PUContext{
- ID: contextID,
- ManagementID: puInfo.Policy.ManagementID(),
- PUType: puInfo.Runtime.PUType(),
- IP: ip,
- externalIPCache: cache.NewCacheWithExpiration(time.Second * 900),
+ ID: contextID,
+ ManagementID: puInfo.Policy.ManagementID(),
+ PUType: puInfo.Runtime.PUType(),
+ IP: ip,
}
// Cache PUs for retrieval based on packet information
@@ -334,6 +333,8 @@ func (d *Datapath) doUpdatePU(puContext *PUContext, containerInfo *policy.PUInfo
puContext.Annotations = containerInfo.Policy.Annotations()
+ puContext.externalIPCache = cache.NewCache()
+
puContext.ApplicationACLs = acls.NewACLCache()
if err := puContext.ApplicationACLs.AddRuleList(containerInfo.Policy.ApplicationACLs()); err != nil {
return err
|
Fix ACL cache retention after policy updates (#<I>)
|
diff --git a/eqcorrscan/core/match_filter.py b/eqcorrscan/core/match_filter.py
index <HASH>..<HASH> 100644
--- a/eqcorrscan/core/match_filter.py
+++ b/eqcorrscan/core/match_filter.py
@@ -172,12 +172,12 @@ def _template_loop(template, chan, station, channel, debug=0, i=0):
:returns: tuple of (i, ccc) with ccc as an ndarray
.. rubric:: Note
- ..This function currently assumes only one template-channel per\
- data-channel, while this is normal for a standard matched-filter routine,\
- if we wanted to impliment a subspace detector, this would be the function\
- to change, I think. E.g. where I currently take only the first matching\
- channel, we could loop through all the matching channels and then sum the\
- correlation sums - however I don't really understand how you detect based\
+ ..This function currently assumes only one template-channel per
+ data-channel, while this is normal for a standard matched-filter routine,
+ if we wanted to impliment a subspace detector, this would be the function
+ to change, I think. E.g. where I currently take only the first matching
+ channel, we could loop through all the matching channels and then sum the
+ correlation sums - however I don't really understand how you detect based
on that. More reading of the Harris document required.
"""
from eqcorrscan.utils.timer import Timer
|
Minor docstring change to create paragraph
Former-commit-id: 3cf<I>aeafa<I>ec<I>e4eb<I>b<I>b4bdab<I>
|
diff --git a/src/Kunstmaan/MediaBundle/Helper/File/FileHelper.php b/src/Kunstmaan/MediaBundle/Helper/File/FileHelper.php
index <HASH>..<HASH> 100644
--- a/src/Kunstmaan/MediaBundle/Helper/File/FileHelper.php
+++ b/src/Kunstmaan/MediaBundle/Helper/File/FileHelper.php
@@ -127,11 +127,13 @@ class FileHelper
public function setFile(File $file)
{
$this->file = $file;
- $this->media->setContent($file);
- $this->media->setContentType($file->getMimeType());
- $this->media->setUrl(
- '/uploads/media/' . $this->media->getUuid() . '.' . $this->media->getContent()->getExtension()
- );
+ if (strlen($file->getPathname()) > 0) {
+ $this->media->setContent($file);
+ $this->media->setContentType($file->getMimeType());
+ $this->media->setUrl(
+ '/uploads/media/' . $this->media->getUuid() . '.' . $this->media->getContent()->getExtension()
+ );
+ }
}
/**
|
additional check for a case when file does not exist (did not upload correctly)
|
diff --git a/Task/Collect.php b/Task/Collect.php
index <HASH>..<HASH> 100644
--- a/Task/Collect.php
+++ b/Task/Collect.php
@@ -118,7 +118,7 @@ class Collect extends Base {
foreach ($grouped_jobs as $collector_class_name => $jobs) {
$collector_helper = $this->getHelper($collector_class_name);
- $jobs_data = $collector_helper->collect($jobs);
+ $incremental_data[$collector_class_name] = $collector_helper->collect($jobs);
$last_job = end($jobs);
if (!empty($last_job['last'])) {
|
Fixed analysis data not being saved - bug introduced in <I>cd<I>ab5b<I>f<I>b<I>fcda7a<I>.
|
diff --git a/pkg/apis/storage/fuzzer/fuzzer.go b/pkg/apis/storage/fuzzer/fuzzer.go
index <HASH>..<HASH> 100644
--- a/pkg/apis/storage/fuzzer/fuzzer.go
+++ b/pkg/apis/storage/fuzzer/fuzzer.go
@@ -18,6 +18,7 @@ package fuzzer
import (
"fmt"
+
fuzz "github.com/google/gofuzz"
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
@@ -82,6 +83,10 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
obj.Spec.StorageCapacity = new(bool)
*(obj.Spec.StorageCapacity) = false
}
+ if obj.Spec.FSGroupPolicy == nil {
+ obj.Spec.FSGroupPolicy = new(storage.FSGroupPolicy)
+ *obj.Spec.FSGroupPolicy = storage.ReadWriteOnceWithFSTypeFSGroupPolicy
+ }
if len(obj.Spec.VolumeLifecycleModes) == 0 {
obj.Spec.VolumeLifecycleModes = []storage.VolumeLifecycleMode{
storage.VolumeLifecyclePersistent,
|
Updated fuzzer to get RoundTripTest passing
|
diff --git a/backbone.localStorage.js b/backbone.localStorage.js
index <HASH>..<HASH> 100644
--- a/backbone.localStorage.js
+++ b/backbone.localStorage.js
@@ -70,13 +70,13 @@ _.extend(Backbone.LocalStorage.prototype, {
// Retrieve a model from `this.data` by id.
find: function(model) {
- return JSON.parse(this.localStorage().getItem(this.name+"-"+model.id));
+ return this.jsonData(this.localStorage().getItem(this.name+"-"+model.id));
},
// Return the array of all models currently in storage.
findAll: function() {
return _(this.records).chain()
- .map(function(id){return JSON.parse(this.localStorage().getItem(this.name+"-"+id));}, this)
+ .map(function(id){return this.jsonData(this.localStorage().getItem(this.name+"-"+id));}, this)
.compact()
.value();
},
@@ -91,6 +91,11 @@ _.extend(Backbone.LocalStorage.prototype, {
localStorage: function() {
return localStorage;
+ },
+
+ // fix for "illegal access" error on Android when JSON.parse is passed null
+ jsonData: function (data) {
+ return data && JSON.parse(data);
}
});
|
fix for "illegal access" error on Android when JSON.parse is passed null
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ GRPC_EXTRAS = ['grpcio >= 0.13.0']
setup(
name='gcloud',
- version='0.10.1',
+ version='0.11.0',
description='API Client library for Google Cloud',
author='Google Cloud Platform',
author_email='jjg+gcloud-python@google.com',
|
Upgrading version to <I>
|
diff --git a/src/Lemonblast/Cbor4Php/Tests/CborTest.php b/src/Lemonblast/Cbor4Php/Tests/CborTest.php
index <HASH>..<HASH> 100644
--- a/src/Lemonblast/Cbor4Php/Tests/CborTest.php
+++ b/src/Lemonblast/Cbor4Php/Tests/CborTest.php
@@ -42,6 +42,13 @@ class CborTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(pack('C', 25) . pack('n', 65535), $encoded);
}
+ function testDecodeUINT16()
+ {
+ $decoded = Cbor::decode(pack('C', 25) . pack('n', 65535));
+
+ $this->assertEquals(65535, $decoded);
+ }
+
function testEncodeUINT32()
{
$encoded = Cbor::encode(4294967295);
|
Added decode UINT <I> test
|
diff --git a/spec/support/crud/read.rb b/spec/support/crud/read.rb
index <HASH>..<HASH> 100644
--- a/spec/support/crud/read.rb
+++ b/spec/support/crud/read.rb
@@ -73,7 +73,7 @@ module Mongo
send(Utils.camel_to_snake(name), collection)
end
- # Whether the operation is expected to have restuls.
+ # Whether the operation is expected to have results.
#
# @example Whether the operation is expected to have results.
# operation.has_results?
diff --git a/spec/support/crud/write.rb b/spec/support/crud/write.rb
index <HASH>..<HASH> 100644
--- a/spec/support/crud/write.rb
+++ b/spec/support/crud/write.rb
@@ -69,7 +69,7 @@ module Mongo
@name = spec['name']
end
- # Whether the operation is expected to have restuls.
+ # Whether the operation is expected to have results.
#
# @example Whether the operation is expected to have results.
# operation.has_results?
|
Fix typos in crud spec runner
|
diff --git a/models/executor_action.go b/models/executor_action.go
index <HASH>..<HASH> 100644
--- a/models/executor_action.go
+++ b/models/executor_action.go
@@ -92,6 +92,7 @@ func (a UploadAction) Validate() error {
type RunAction struct {
Path string `json:"path"`
Args []string `json:"args"`
+ Dir string `json:"dir,omitempty"`
Env []EnvironmentVariable `json:"env"`
ResourceLimits ResourceLimits `json:"resource_limits"`
Privileged bool `json:"privileged,omitempty"`
diff --git a/models/executor_action_test.go b/models/executor_action_test.go
index <HASH>..<HASH> 100644
--- a/models/executor_action_test.go
+++ b/models/executor_action_test.go
@@ -154,6 +154,7 @@ var _ = Describe("Actions", func() {
`{
"path": "rm",
"args": ["-rf", "/"],
+ "dir": "./some-dir",
"env": [
{"name":"FOO", "value":"1"},
{"name":"BAR", "value":"2"}
@@ -163,6 +164,7 @@ var _ = Describe("Actions", func() {
}`,
&RunAction{
Path: "rm",
+ Dir: "./some-dir",
Args: []string{"-rf", "/"},
Env: []EnvironmentVariable{
{"FOO", "1"},
|
add Dir to RunAction for working directory
[#<I>]
|
diff --git a/src/neevo/Neevo.php b/src/neevo/Neevo.php
index <HASH>..<HASH> 100644
--- a/src/neevo/Neevo.php
+++ b/src/neevo/Neevo.php
@@ -32,7 +32,7 @@ class Neevo implements INeevoObservable, INeevoObserver {
// Neevo revision
- const REVISION = 447;
+ const REVISION = 448;
// Data types
const BOOL = 'b',
diff --git a/tests/NeevoResultTest.php b/tests/NeevoResultTest.php
index <HASH>..<HASH> 100644
--- a/tests/NeevoResultTest.php
+++ b/tests/NeevoResultTest.php
@@ -377,7 +377,6 @@ class NeevoResultTest extends PHPUnit_Framework_TestCase {
* @expectedException RuntimeException
*/
public function testHasCircularReferences(){
- $this->markTestIncomplete();
$this->result->leftJoin($this->result, 'foo')->dump(true);
}
@@ -386,7 +385,6 @@ class NeevoResultTest extends PHPUnit_Framework_TestCase {
* @expectedException RuntimeException
*/
public function testHasCircularReferencesDeeper(){
- $this->markTestIncomplete();
$subquery = new NeevoResult($this->connection, $this->result);
$this->result->leftJoin($subquery, 'foo')->dump(true);
}
|
Remove mark as incomplete on circular references detection tests
|
diff --git a/pem.py b/pem.py
index <HASH>..<HASH> 100644
--- a/pem.py
+++ b/pem.py
@@ -61,16 +61,8 @@ def parse_file(file_name):
return parse(f.read())
-def certificateOptionsFromFiles(*pemFiles, **kw):
- """
- Read all *pemFiles*, find one key, use the first certificate as server
- certificate and the rest as chain.
- """
+def certificateOptionsFromPEMs(pems, **kw):
from twisted.internet import ssl
-
- pems = []
- for pemFile in pemFiles:
- pems += parse_file(pemFile)
keys = [key for key in pems if isinstance(key, Key)]
if not len(keys):
raise ValueError('Supplied PEM file(s) do *not* contain a key.')
@@ -99,6 +91,17 @@ def certificateOptionsFromFiles(*pemFiles, **kw):
return ctxFactory
+def certificateOptionsFromFiles(*pemFiles, **kw):
+ """
+ Read all *pemFiles*, find one key, use the first certificate as server
+ certificate and the rest as chain.
+ """
+ pems = []
+ for pemFile in pemFiles:
+ pems += parse_file(pemFile)
+ return certificateOptionsFromPEMs(pems, **kw)
+
+
class _DHParamContextFactory(object):
"""
A wrapping context factory that gets a context from a different
|
Refactor to allow working with pem objects directly, file I/O is a separate concern.
|
diff --git a/lyricfetch/__init__.py b/lyricfetch/__init__.py
index <HASH>..<HASH> 100644
--- a/lyricfetch/__init__.py
+++ b/lyricfetch/__init__.py
@@ -5,8 +5,9 @@ from pathlib import Path
def _load_config():
here = Path(os.path.realpath(__file__))
config_name = here.parent / 'config.json'
- with open(config_name) as config_file:
- CONFIG.update(json.load(config_file))
+ if config_name.is_file():
+ with open(config_name) as config_file:
+ CONFIG.update(json.load(config_file))
for key in CONFIG:
environ_key = 'LFETCH_' + key.upper()
|
Don't load the config file if it doesn't exist
|
diff --git a/datacats/cli/shell.py b/datacats/cli/shell.py
index <HASH>..<HASH> 100644
--- a/datacats/cli/shell.py
+++ b/datacats/cli/shell.py
@@ -32,7 +32,7 @@ def paster(opts):
"""Run a paster command from the current directory
Usage:
- datacats paster [-d] [-s NAME] [COMMAND...]
+ datacats paster [-d] [-s NAME] COMMAND...
Options:
-s --site=NAME Specify a site to run this paster command on [default: primary]
|
Need a command at the end for datacats paster command to make sense, make it non-optional.
|
diff --git a/jquery.simple.timer.js b/jquery.simple.timer.js
index <HASH>..<HASH> 100644
--- a/jquery.simple.timer.js
+++ b/jquery.simple.timer.js
@@ -29,6 +29,11 @@
}
}(function($, window, document, undefined) {
+ // Polyfill new JS features for older browser
+ Number.isFinite = Number.isFinite || function(value) {
+ return typeof value === 'number' && isFinite(value);
+ }
+
var timer;
var Timer = function(targetElement){
|
Polyfill Number.isFinite
Resolves issue #<I>
|
diff --git a/Schema/Blueprint.php b/Schema/Blueprint.php
index <HASH>..<HASH> 100644
--- a/Schema/Blueprint.php
+++ b/Schema/Blueprint.php
@@ -505,6 +505,16 @@ class Blueprint {
}
/**
+ * Add a "deleted at" timestamp for the table.
+ *
+ * @return void
+ */
+ public function softDeletes()
+ {
+ $this->timestamp('deleted_at')->nullable();
+ }
+
+ /**
* Create a new binary column on the table.
*
* @param string $column
diff --git a/Schema/Grammars/MySqlGrammar.php b/Schema/Grammars/MySqlGrammar.php
index <HASH>..<HASH> 100644
--- a/Schema/Grammars/MySqlGrammar.php
+++ b/Schema/Grammars/MySqlGrammar.php
@@ -387,7 +387,7 @@ class MySqlGrammar extends Grammar {
*/
protected function typeTimestamp(Fluent $column)
{
- return 'timestamp default 0';
+ return 'timestamp';
}
/**
|
Added softDeletes helper to Blueprint.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
setup(name='instana',
- version='0.3.0',
+ version='0.4.0',
download_url='https://github.com/instana/python-sensor',
url='https://www.instana.com/',
license='MIT',
@@ -11,11 +11,13 @@ setup(name='instana',
packages=find_packages(exclude=['tests', 'examples']),
long_description="The instana package provides Python metrics and traces for Instana.",
zip_safe=False,
- setup_requires=['nose>=1.0',
- 'fysom>=2.1.2',
- 'opentracing>=1.2.1,<1.3',
- 'basictracer>=2.2.0',
- 'psutil>=5.1.3'],
+ setup_requires=['nose>=1.0'],
+ install_requires=['autowrapt>=1.0',
+ 'fysom>=2.1.2',
+ 'opentracing>=1.2.1,<1.3',
+ 'basictracer>=2.2.0',
+ 'psutil>=5.1.3'],
+ entry_points={'instana.django': ['django.core.handlers.base = instana.django:hook']},
test_suite='nose.collector',
keywords=['performance', 'opentracing', 'metrics', 'monitoring'],
classifiers=[
|
Post import hooks support
- Add autowrapt dependency
- Add django entry point hook
- Bump package version to <I>
|
diff --git a/frank_static_resources.bundle/symbiote.js b/frank_static_resources.bundle/symbiote.js
index <HASH>..<HASH> 100644
--- a/frank_static_resources.bundle/symbiote.js
+++ b/frank_static_resources.bundle/symbiote.js
@@ -61,7 +61,7 @@ $(document).ready(function() {
data: '["DUMMY"]', // a bug in cocoahttpserver means it can't handle POSTs without a body
url: G.base_url + "/dump",
success: function(data) {
- $('div#dom_dump').append( JsonTools.convert_json_to_dom( data ) );
+ $('div#dom_dump').html( JsonTools.convert_json_to_dom( data ) );
$("#dom_dump").treeview({
collapsed: false
});
|
Don't append each DOM dump to the last one. This makes the browser get really slow really fast.
|
diff --git a/tests/Doctrine/ODM/MongoDB/Tests/Types/TypeTest.php b/tests/Doctrine/ODM/MongoDB/Tests/Types/TypeTest.php
index <HASH>..<HASH> 100644
--- a/tests/Doctrine/ODM/MongoDB/Tests/Types/TypeTest.php
+++ b/tests/Doctrine/ODM/MongoDB/Tests/Types/TypeTest.php
@@ -79,7 +79,7 @@ class TypeTest extends \Doctrine\ODM\MongoDB\Tests\BaseTest
$expectedDate = clone $date;
$cleanMicroseconds = (int) floor(((int) $date->format('u')) / 1000) * 1000;
- $expectedDate->modify($date->format('H:i:s') . '.' . $cleanMicroseconds);
+ $expectedDate->modify($date->format('H:i:s') . '.' . str_pad($cleanMicroseconds, 6, '0', STR_PAD_LEFT));
$type = Type::getType(Type::DATE);
$this->assertEquals($expectedDate, $type->convertToPHPValue($type->convertToDatabaseValue($date)));
|
Correctly format microseconds in test
|
diff --git a/chirptext/__version__.py b/chirptext/__version__.py
index <HASH>..<HASH> 100644
--- a/chirptext/__version__.py
+++ b/chirptext/__version__.py
@@ -10,6 +10,6 @@ __description__ = "ChirpText is a collection of text processing tools for Python
__url__ = "https://letuananh.github.io/chirptext/"
__maintainer__ = "Le Tuan Anh"
__version_major__ = "0.1"
-__version__ = "{}a20".format(__version_major__)
+__version__ = "{}a21".format(__version_major__)
__version_long__ = "{} - Alpha".format(__version_major__)
__status__ = "Prototype"
|
pump version to <I>a<I>
|
diff --git a/pulse.go b/pulse.go
index <HASH>..<HASH> 100644
--- a/pulse.go
+++ b/pulse.go
@@ -372,8 +372,8 @@ func action(ctx *cli.Context) {
"keyringFile": keyringFile,
}).Fatal("can't open keyring path")
os.Exit(1)
- defer file.Close()
}
+ file.Close()
log.Info("setting keyring file to: ", keyringFile)
c.SetKeyringFile(keyringFile)
}
|
Fix: Close keyring file passed in as we just set the path to file and not pass in the open file
|
diff --git a/pkg/cmd/util/docker/docker.go b/pkg/cmd/util/docker/docker.go
index <HASH>..<HASH> 100644
--- a/pkg/cmd/util/docker/docker.go
+++ b/pkg/cmd/util/docker/docker.go
@@ -2,6 +2,7 @@ package docker
import (
"os"
+ "time"
"k8s.io/kubernetes/pkg/kubelet/dockertools"
@@ -39,15 +40,14 @@ func (_ *Helper) GetClient() (client *docker.Client, endpoint string, err error)
}
// GetKubeClient returns the Kubernetes Docker client.
-func (_ *Helper) GetKubeClient() (*KubeDocker, string, error) {
+func (_ *Helper) GetKubeClient(requestTimeout, imagePullProgressDeadline time.Duration) (*KubeDocker, string, error) {
var endpoint string
if len(os.Getenv("DOCKER_HOST")) > 0 {
endpoint = os.Getenv("DOCKER_HOST")
} else {
endpoint = "unix:///var/run/docker.sock"
}
- // TODO: set a timeout here
- client := dockertools.ConnectToDockerOrDie(endpoint, 0)
+ client := dockertools.ConnectToDockerOrDie(endpoint, requestTimeout, imagePullProgressDeadline)
originClient := &KubeDocker{client}
return originClient, endpoint, nil
}
|
adapt: request timeout and image pull progress deadline for docker.GetKubeClient
|
diff --git a/sqlg-core/src/main/java/org/umlg/sqlg/structure/SqlgElement.java b/sqlg-core/src/main/java/org/umlg/sqlg/structure/SqlgElement.java
index <HASH>..<HASH> 100644
--- a/sqlg-core/src/main/java/org/umlg/sqlg/structure/SqlgElement.java
+++ b/sqlg-core/src/main/java/org/umlg/sqlg/structure/SqlgElement.java
@@ -14,6 +14,7 @@ import org.umlg.sqlg.util.SqlgUtil;
import java.lang.reflect.Array;
import java.sql.*;
import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Stream;
/**
@@ -28,7 +29,8 @@ public abstract class SqlgElement implements Element {
protected String table;
protected RecordId recordId;
protected final SqlgGraph sqlgGraph;
- protected Map<String, Object> properties = new HashMap<>();
+ //Multiple threads can access the same element
+ protected Map<String, Object> properties = new ConcurrentHashMap<>();
private SqlgElementElementPropertyRollback elementPropertyRollback;
protected boolean removed = false;
|
make SqlgElement.properties a ConcurrentHashMap as occasionally multiple threads access the same element
|
diff --git a/did/plugins/jira.py b/did/plugins/jira.py
index <HASH>..<HASH> 100644
--- a/did/plugins/jira.py
+++ b/did/plugins/jira.py
@@ -110,7 +110,7 @@ class Issue(object):
for comment in self.comments:
created = dateutil.parser.parse(comment["created"]).date()
try:
- if (comment["author"]["name"] == user.login and
+ if (comment["author"]["emailAddress"] == user.email and
created >= options.since.date and
created < options.until.date):
return True
@@ -131,7 +131,7 @@ class JiraCreated(Stats):
query = (
"project = '{0}' AND creator = '{1}' AND "
"created >= {2} AND created <= {3}".format(
- self.parent.project, self.user.login,
+ self.parent.project, self.user.email,
self.options.since, self.options.until))
self.stats = Issue.search(query, stats=self)
@@ -160,7 +160,7 @@ class JiraResolved(Stats):
query = (
"project = '{0}' AND assignee = '{1}' AND "
"resolved >= {2} AND resolved <= {3}".format(
- self.parent.project, self.user.login,
+ self.parent.project, self.user.email,
self.options.since, self.options.until))
self.stats = Issue.search(query, stats=self)
|
Use email for searching Jira issues [fix #<I>]
|
diff --git a/public/js/data-table.js b/public/js/data-table.js
index <HASH>..<HASH> 100644
--- a/public/js/data-table.js
+++ b/public/js/data-table.js
@@ -1,6 +1,6 @@
define([
'plugins/admin/libs/jquery.dataTables/jquery.dataTables',
- 'template'
+ 'plugins/app/libs/artTemplate/template.min'
], function () {
//http://datatables.net/plug-ins/pagination#bootstrap
// Start Bootstrap
diff --git a/public/js/form.js b/public/js/form.js
index <HASH>..<HASH> 100644
--- a/public/js/form.js
+++ b/public/js/form.js
@@ -1,4 +1,9 @@
-define(['jquery-form', 'comps/jquery.loadJSON/index', 'plugins/admin/js/form-update'], function () {
+define([
+ 'plugins/app/libs/jquery-form/jquery.form',
+ 'comps/jquery.loadJSON/index',
+ 'plugins/admin/js/form-update',
+ 'plugins/app/libs/jquery-unparam/jquery-unparam.min'
+], function () {
// require jquery-unparam
$.fn.loadParams = function () {
return this.loadJSON($.unparam(location.search.substring(1)));
|
refactoring: form直接加载unparam
|
diff --git a/plexapi/video.py b/plexapi/video.py
index <HASH>..<HASH> 100644
--- a/plexapi/video.py
+++ b/plexapi/video.py
@@ -454,10 +454,7 @@ class Show(Video):
key = '%s/prefs?' % self.key
preferences = {pref.id: list(pref.enumValues.keys()) for pref in self.preferences()}
for settingID, value in kwargs.items():
- try:
- enumValues = [int(x) for x in preferences.get(settingID)]
- except ValueError:
- enumValues = [x.decode() for x in preferences.get(settingID)]
+ enumValues = preferences.get(settingID)
if value in enumValues:
data[settingID] = value
else:
|
update editAdvanced method to work with py2 drop
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.