diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/core/chain_manager.go b/core/chain_manager.go
index <HASH>..<HASH> 100644
--- a/core/chain_manager.go
+++ b/core/chain_manager.go
@@ -168,7 +168,7 @@ func (bc *ChainManager) NewBlock(coinbase []byte) *types.Block {
var root []byte
parentHash := ZeroHash256
- if bc.CurrentBlock != nil {
+ if bc.currentBlock != nil {
root = bc.currentBlock.Header().Root
parentHash = bc.lastBlockHash
}
|
Reference pointer to block instead of pointer to function
|
diff --git a/lavalink/PlayerManager.py b/lavalink/PlayerManager.py
index <HASH>..<HASH> 100644
--- a/lavalink/PlayerManager.py
+++ b/lavalink/PlayerManager.py
@@ -14,7 +14,6 @@ class BasePlayer(ABC):
async def handle_event(self, event):
raise NotImplementedError
- @abstractmethod
async def cleanup(self):
pass
|
Doesn't need to be abstract
|
diff --git a/citrination_client/views/tests/test_model_template_builder.py b/citrination_client/views/tests/test_model_template_builder.py
index <HASH>..<HASH> 100644
--- a/citrination_client/views/tests/test_model_template_builder.py
+++ b/citrination_client/views/tests/test_model_template_builder.py
@@ -96,7 +96,7 @@ def test_workflow():
def test():
- site = "https://stage.citrination.com"
+ site = "https://citrination.com"
search_template_client = SearchTemplateClient(os.environ["CITRINATION_API_KEY"], site)
data_views_client = DataViewsClient(os.environ["CITRINATION_API_KEY"], site)
|
Change site to public, tests will still fail until FE public updated
|
diff --git a/spec/api_connect_client/product_spec.rb b/spec/api_connect_client/product_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/api_connect_client/product_spec.rb
+++ b/spec/api_connect_client/product_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-RSpec.describe Product do
+RSpec.describe ApiConnectClient::Product do
let(:product) { described_class.new }
describe '#all', vcr: { cassette_name: 'products' } do
diff --git a/spec/api_connect_client/user_spec.rb b/spec/api_connect_client/user_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/api_connect_client/user_spec.rb
+++ b/spec/api_connect_client/user_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
-RSpec.describe User do
- let(:user) { User.new(ENV['ADMIN_USERNAME'], ENV['ADMIN_PASSWORD']) }
+RSpec.describe ApiConnectClient::User do
+ let(:user) { ApiConnectClient::User.new(ENV['ADMIN_USERNAME'], ENV['ADMIN_PASSWORD']) }
describe '#create', vcr: { cassette_name: 'user-new' } do
it "returns the info of the newly created user" do
|
fix(specs): Fix bug introduced in merge
|
diff --git a/test/indexeddb_mock.js b/test/indexeddb_mock.js
index <HASH>..<HASH> 100644
--- a/test/indexeddb_mock.js
+++ b/test/indexeddb_mock.js
@@ -148,7 +148,11 @@ export class IDBObjectStore {
data,
request
};
- request.result = new IDBCursorWithValue(this, cursorInternal);
+ if (keys.length === 0) {
+ request.result = null;
+ } else {
+ request.result = new IDBCursorWithValue(this, cursorInternal);
+ }
return request;
}
}
@@ -216,6 +220,7 @@ export class IDBTransaction {
abort() {
}
+
objectStore(name) {
if (!this._flags.active) {
throw new DOMException('InvalidStateError');
|
Return null for the cursor if we have no data
|
diff --git a/lib/zuul.js b/lib/zuul.js
index <HASH>..<HASH> 100644
--- a/lib/zuul.js
+++ b/lib/zuul.js
@@ -28,6 +28,8 @@ function Zuul(config) {
// list of browsers to test
self._browsers = [];
+
+ self._concurrency = config.concurrency || 3;
};
Zuul.prototype.__proto__ = EventEmitter.prototype;
@@ -92,8 +94,7 @@ Zuul.prototype.run = function(done) {
}
var batch = new Batch();
- // TODO(shtylman) option
- batch.concurrency(3);
+ batch.concurrency(self._concurrency);
var passed = true;
|
add concurrency option to specify how many browsers to run at once
|
diff --git a/assemblerflow/generator/recipe.py b/assemblerflow/generator/recipe.py
index <HASH>..<HASH> 100644
--- a/assemblerflow/generator/recipe.py
+++ b/assemblerflow/generator/recipe.py
@@ -424,12 +424,20 @@ class Recipe:
if pipeline_string[-1] == "|":
pipeline_string = pipeline_string[:-1]
+ # Check if there are any forks. Replace depends on the number of forks
+ if isinstance(final_forks, str):
+ to_search = "{} "
+ to_replace = "{}={{'pid':'{}'}} "
+ else:
+ to_search = " {} "
+ to_replace = " {}={{'pid':'{}'}} "
+
# Replace only names by names + process ids
for key, val in self.process_to_id.items():
# Case only one process in the pipeline
pipeline_string = pipeline_string\
- .replace("{} ".format(key),
- "{}={{'pid':'{}'}} ".format(key, val))
+ .replace(to_search.format(key),
+ to_replace.format(key, val))
return pipeline_string
|
change replace in case there are no forks
|
diff --git a/plugin/chaos/chaos.go b/plugin/chaos/chaos.go
index <HASH>..<HASH> 100644
--- a/plugin/chaos/chaos.go
+++ b/plugin/chaos/chaos.go
@@ -3,7 +3,9 @@ package chaos
import (
"context"
+ "math/rand"
"os"
+ "time"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
@@ -34,8 +36,10 @@ func (c Chaos) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (
default:
return plugin.NextOrFailure(c.Name(), c.Next, ctx, w, r)
case "authors.bind.":
- for _, a := range c.Authors {
- m.Answer = append(m.Answer, &dns.TXT{Hdr: hdr, Txt: []string{a}})
+ rnd := rand.New(rand.NewSource(time.Now().Unix()))
+
+ for _, i := range rnd.Perm(len(c.Authors)) {
+ m.Answer = append(m.Answer, &dns.TXT{Hdr: hdr, Txt: []string{c.Authors[i]}})
}
case "version.bind.", "version.server.":
m.Answer = []dns.RR{&dns.TXT{Hdr: hdr, Txt: []string{c.Version}}}
|
plugin/chaos: randomize author list (#<I>)
Randomize the author list on request; keep the zowners.go file stable so
a 'go generate' remain stable.
chaos.Owners could potentially be a map and be randomized by ranging
over it, but this seems simpler and fewer lines of code.
Bit of Easter hacking; seems more fair to randomize this list.
|
diff --git a/fermipy/diffuse/gt_assemble_model.py b/fermipy/diffuse/gt_assemble_model.py
index <HASH>..<HASH> 100644
--- a/fermipy/diffuse/gt_assemble_model.py
+++ b/fermipy/diffuse/gt_assemble_model.py
@@ -209,7 +209,7 @@ class GtAssembleModel(Link):
manifest = yaml.safe_load(open(args.input))
compname = args.compname
- value = manifest[key]
+ value = manifest[compname]
GtAssembleModel.assemble_component(compname, value, args.hpx_order)
@@ -259,7 +259,7 @@ class ConfigMaker_AssembleModel(ConfigMaker):
irf_ver=NAME_FACTORY.irf_ver())
logfile = make_nfs_path(outfile.replace('.fits', '.log'))
job_configs[fullkey] = dict(input=manifest,
- comp=key,
+ compname=key,
logfile=logfile)
return job_configs
|
Fix to gt_assemble_model to set correct component name
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -404,7 +404,7 @@ exports['Multiple Sets'] = function(test) {
[47.5500, -52.6667, "St. John's"]
];
- places = proximity.addSet('places');
+ places = proximity.addSet();
people = proximity.addSet('people');
people.addLocations(peopleLocations, function(err, reply) {
|
Removing explicity set name.
|
diff --git a/packages/cli/src/commands/start.js b/packages/cli/src/commands/start.js
index <HASH>..<HASH> 100644
--- a/packages/cli/src/commands/start.js
+++ b/packages/cli/src/commands/start.js
@@ -40,8 +40,9 @@ export const builder = yargs => {
description: 'A path pointing to an existing Aragon client installation',
default: null,
})
- .option('openInBrowser', {
+ .option('auto-open', {
description: 'Wether to automatically open the client in the browser',
+ boolean: true,
default: true,
})
}
@@ -51,7 +52,7 @@ export const task = async function({
clientVersion,
clientPort,
clientPath,
- openInBrowser,
+ autoOpen,
}) {
const tasks = new TaskList([
{
@@ -95,7 +96,7 @@ export const task = async function({
{
title: 'Opening client',
task: async (ctx, task) => {
- if (openInBrowser) {
+ if (autoOpen === true) {
task.output = 'Opening client'
await openClient(ctx, clientPort)
}
@@ -111,12 +112,14 @@ export const handler = async ({
clientVersion,
clientPort,
clientPath,
+ autoOpen,
}) => {
const tasks = await task({
clientRepo,
clientVersion,
clientPort,
clientPath,
+ autoOpen,
})
await tasks.run()
|
Fixes a bug where start command wouldnt open in browser (#<I>)
|
diff --git a/py3status/modules/deadbeef.py b/py3status/modules/deadbeef.py
index <HASH>..<HASH> 100644
--- a/py3status/modules/deadbeef.py
+++ b/py3status/modules/deadbeef.py
@@ -20,7 +20,7 @@ Format placeholders:
{year} year in four digits
For more placeholders, see title formatting 2.0 in 'deadbeef --help'
- or http://github.com/Alexey-Yakovenko/deadbeef/wiki/Title-formatting-2.0
+ or https://github.com/DeaDBeeF-Player/deadbeef/wiki/Title-formatting-2.0
Not all of Foobar2000 remapped metadata fields will work with deadbeef and
a quick reminder about using {placeholders} here instead of %placeholder%.
|
deadbeef: replace http with secure https
|
diff --git a/pyes/queryset.py b/pyes/queryset.py
index <HASH>..<HASH> 100644
--- a/pyes/queryset.py
+++ b/pyes/queryset.py
@@ -151,6 +151,8 @@ class QuerySet(object):
if self._facets:
for facet in self._facets:
query.facet.add(facet)
+ if self._start is not None:
+ query.start = self._start
if self._size is not None:
query.size = self._size
return query
|
Update pyes/queryset.py
Include "start" offset in search.
|
diff --git a/tests/Unit/ContainerTest.php b/tests/Unit/ContainerTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/ContainerTest.php
+++ b/tests/Unit/ContainerTest.php
@@ -324,9 +324,7 @@ final class ContainerTest extends TestCase
'class' => VariadicConstructor::class,
'__construct()' => [
'first' => 1,
- 'parameters' => 42,
- 'second' => 43,
- 'third' => 44,
+ 'parameters' => [42, 43, 44],
],
],
'integerIndexed' => [
|
Fix tests (#<I>)
|
diff --git a/lib/worker.js b/lib/worker.js
index <HASH>..<HASH> 100644
--- a/lib/worker.js
+++ b/lib/worker.js
@@ -375,6 +375,8 @@ worker.prototype.track = function(callback){
worker.prototype.untrack = function(name, queues, callback){
var self = this;
+ var jobs = [];
+
if(self.connection && self.connection.redis){
self.connection.redis.srem(self.connection.key('workers'), (name + ':' + queues), function(error){
if(error){
@@ -383,12 +385,16 @@ worker.prototype.untrack = function(name, queues, callback){
return;
}
- self.connection.redis.del([
+ [
self.connection.key('worker', name, self.stringQueues()),
self.connection.key('worker', name, self.stringQueues(), 'started'),
self.connection.key('stat', 'failed', name),
self.connection.key('stat', 'processed', name)
- ], function(error){
+ ].forEach(function(key){
+ jobs.push(function(done){ self.connection.redis.del(key, done); });
+ });
+
+ async.series(jobs, function(error){
if(error){ self.emit('error', null, null, error); }
if(typeof callback === 'function'){ callback(error); }
});
|
update worker untrack commands to work across cluster (no multi)
|
diff --git a/pandas/core/strings.py b/pandas/core/strings.py
index <HASH>..<HASH> 100644
--- a/pandas/core/strings.py
+++ b/pandas/core/strings.py
@@ -293,6 +293,8 @@ def str_contains(arr, pat, case=True, flags=0, na=np.nan, regex=True):
See Also
--------
match : analogous, but stricter, relying on re.match instead of re.search
+ Series.str.startswith : Test if the start of each string element matches a pattern.
+ Series.str.endswith : Same as startswith, but tests the end of string.
Examples
--------
|
DOC: updated Series.str.contains see also section (#<I>)
|
diff --git a/internal/input/input_js.go b/internal/input/input_js.go
index <HASH>..<HASH> 100644
--- a/internal/input/input_js.go
+++ b/internal/input/input_js.go
@@ -249,8 +249,8 @@ func OnMouseMove(e js.Value) {
func OnWheel(e js.Value) {
// TODO: What if e.deltaMode is not DOM_DELTA_PIXEL?
- theInput.wheelX = e.Get("deltaX").Float()
- theInput.wheelY = e.Get("deltaY").Float()
+ theInput.wheelX = -e.Get("deltaX").Float()
+ theInput.wheelY = -e.Get("deltaY").Float()
}
func OnTouchStart(e js.Value) {
|
input: Bug fix: wheel direction is opposite on browsers
|
diff --git a/lxd/storage/drivers/utils.go b/lxd/storage/drivers/utils.go
index <HASH>..<HASH> 100644
--- a/lxd/storage/drivers/utils.go
+++ b/lxd/storage/drivers/utils.go
@@ -690,6 +690,16 @@ func copyDevice(inputPath string, outputPath string) error {
return fmt.Errorf("Error copying file %q to %q: %w", inputPath, outputPath, err)
}
+ err = from.Close()
+ if err != nil {
+ return fmt.Errorf("Failed to close file %q: %w", inputPath, err)
+ }
+
+ err = to.Close()
+ if err != nil {
+ return fmt.Errorf("Failed to close file %q: %w", outputPath, err)
+ }
+
return nil
}
|
lxd/storage/drivers/utils: Catch file close errors in copyDevice
|
diff --git a/spec/unit/mixin/shell_out_spec.rb b/spec/unit/mixin/shell_out_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/mixin/shell_out_spec.rb
+++ b/spec/unit/mixin/shell_out_spec.rb
@@ -37,7 +37,7 @@ describe Ohai::Mixin::ShellOut, "shell_out" do
"LANG" => "en_US.UTF-8",
"LANGUAGE" => "en_US.UTF-8",
"LC_ALL" => "en_US.UTF-8",
- "PATH" => "/Users/lamont/.asdf/installs/ruby/2.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+ "PATH" => "#{RbConfig::CONFIG["bindir"]}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
},
}
end
|
remove hardcoded path from my machine
|
diff --git a/lib/hll.js b/lib/hll.js
index <HASH>..<HASH> 100644
--- a/lib/hll.js
+++ b/lib/hll.js
@@ -122,8 +122,11 @@ class HLLOperation extends Operation {
* overwritten. If the bin does not exist, the operation will be denied.
* @property {number} NO_FAIL - Do not raise error if operation is denied.
* @property {number} ALLOW_FOLD - Allow the resulting set to be the minimum of
- * provided index bits. Also, allow the usage of less precise HLL algorithms
- * when min hash bits of all participatings sets do not match.
+ * provided index bits. For {@link
+ * module:aerospike/hll.getIntersectCount|getIntersectCount} and {@link
+ * module:aerospike/hll.getSimilarity|getSimilarity}, allow the usage of less
+ * precise HLL algorithms when min hash bits of all participating sets do not
+ * match.
*
* @see {@link HLLPolicy}
*/
|
Clarify docs for HLL ALLOW_FOLD policy (#<I>)
|
diff --git a/tests/test_filters.py b/tests/test_filters.py
index <HASH>..<HASH> 100644
--- a/tests/test_filters.py
+++ b/tests/test_filters.py
@@ -72,7 +72,7 @@ class HaystackFilterTestCase(TestCase):
def tearDown(self):
MockPersonIndex().clear()
- def test_filters_no_filters(self):
+ def test_filter_no_query_parameters(self):
request = factory.get(path="/", data="", content_type="application/json")
response = self.view1.as_view(actions={"get": "list"})(request)
self.assertEqual(response.status_code, status.HTTP_200_OK)
@@ -152,6 +152,12 @@ class HaystackFilterTestCase(TestCase):
self.view3.as_view(actions={"get": "list"}), request
)
+ def test_filter_unicode_characters(self):
+ request = factory.get(path="/", data={"firstname": "åsmund", "lastname": "sørensen"},
+ content_type="application/json")
+ response = self.view1.as_view(actions={"get": "list"})(request)
+ self.assertEqual(len(response.data), 1)
+
class HaystackAutocompleteFilterTestCase(TestCase):
|
added test for querying entries with unicode characters
|
diff --git a/src/client/js/Panels/MetaEditor/MetaEditorControl.DiagramDesignerWidgetEventHandlers.js b/src/client/js/Panels/MetaEditor/MetaEditorControl.DiagramDesignerWidgetEventHandlers.js
index <HASH>..<HASH> 100644
--- a/src/client/js/Panels/MetaEditor/MetaEditorControl.DiagramDesignerWidgetEventHandlers.js
+++ b/src/client/js/Panels/MetaEditor/MetaEditorControl.DiagramDesignerWidgetEventHandlers.js
@@ -195,8 +195,7 @@ define(['js/logger',
//return true if there is at least one item among the dragged ones that is not on the sheet yet
if (gmeIDList.length > 0 && gmeIDList.indexOf(CONSTANTS.PROJECT_ROOT_ID) === -1) {
for (i = 0; i < gmeIDList.length; i += 1) {
- if (this._metaAspectMembersPerSheet[this._selectedMetaAspectSet]
- .indexOf(gmeIDList[i]) === -1) {
+ if (this._metaAspectMembersPerSheet[this._selectedMetaAspectSet].indexOf(gmeIDList[i]) === -1) {
accept = true;
break;
}
|
#<I> cosmetic fix - allow long line as break makes it hard to read
Former-commit-id: <I>e<I>bea<I>adcd<I>cac<I>c<I>b5ef<I>f<I>
|
diff --git a/docs/generate.py b/docs/generate.py
index <HASH>..<HASH> 100755
--- a/docs/generate.py
+++ b/docs/generate.py
@@ -199,14 +199,27 @@ def generate_index(folder, original_paths):
def get_description(arg):
"""Generates a proper description for the given argument"""
desc = []
+ otherwise = False
if arg.can_be_inferred:
- desc.append('If left to None, it will be inferred automatically.')
+ desc.append('If left unspecified, it will be inferred automatically.')
+ otherwise = True
+ elif arg.is_flag:
+ desc.append('This argument can be omitted.')
+ otherwise = True
+
if arg.is_vector:
- desc.append('A list must be supplied for this argument.')
- if arg.is_generic:
+ if arg.is_generic:
+ desc.append('A list of other Requests must be supplied.')
+ else:
+ desc.append('A list must be supplied.')
+ elif arg.is_generic:
desc.append('A different Request must be supplied for this argument.')
- if arg.is_flag:
- desc.append('This argument can be omitted.')
+ else:
+ otherwise = False # Always reset to false if no other text is added
+
+ if otherwise:
+ desc.insert(1, 'Otherwise,')
+ desc[-1] = desc[-1][:1].lower() + desc[-1][1:]
return ' '.join(desc)
|
Make generated description on the docs more friendly
|
diff --git a/lib/slack_logger/slack_io.rb b/lib/slack_logger/slack_io.rb
index <HASH>..<HASH> 100644
--- a/lib/slack_logger/slack_io.rb
+++ b/lib/slack_logger/slack_io.rb
@@ -8,7 +8,7 @@ module SlackLogger
def self.write(message)
client = SlackLogger.client
client.auth_test
- client.chat_postMessage({channel: SlackLogger.channel, text: message, as_user: true})
+ client.chat_postMessage({channel: SlackLogger.channel, text: message.to_s, as_user: true})
end
end
|
Adding in to_s for message write
|
diff --git a/src/Middleware/RoleMiddleware.php b/src/Middleware/RoleMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/Middleware/RoleMiddleware.php
+++ b/src/Middleware/RoleMiddleware.php
@@ -56,15 +56,23 @@ class RoleMiddleware
*/
public function handle(Request $request, Closure $next, $role)
{
- if (!$user = $this->authRepositoryInterface->getActiveUser()) {
+ if ($request->ajax()) {
+ return response('Unauthorized', 401);
+ }
+ if (!$user = $this->authRepositoryInterface->getActiveUser()) {
Flash::error('Access Denied');
return redirect()->route('auth.login');
}
- if (!($role = $this->roleRepositoryInterface->getBySlug($role)) || !$user->inRole($role)) {
+ if (!$role = $this->roleRepositoryInterface->getBySlug($role)) {
+ Flash::error('Access Denied');
+
+ return redirect()->route('auth.unauthorized');
+ }
+ if (!$user->inRole($role)) {
Flash::error('Access Denied');
return redirect()->route('auth.unauthorized');
|
Reverted RoleMiddleware back to what it was before things started breaking.
|
diff --git a/src/Composer/Repository/VcsRepository.php b/src/Composer/Repository/VcsRepository.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Repository/VcsRepository.php
+++ b/src/Composer/Repository/VcsRepository.php
@@ -66,7 +66,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
private $versionCache;
/** @var string[] */
private $emptyReferences = array();
- /** @var array<'tags'|'branches', array<string, \Throwable>> */
+ /** @var array<'tags'|'branches', array<string, TransportException>> */
private $versionTransportExceptions = array();
/**
@@ -180,7 +180,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
}
/**
- * @return array<'tags'|'branches', array<string, \Throwable>>
+ * @return array<'tags'|'branches', array<string, TransportException>>
*/
public function getVersionTransportExceptions()
{
|
VcsRepository: limit type of versionTransportExceptions (#<I>)
|
diff --git a/salt/cloud/__init__.py b/salt/cloud/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/cloud/__init__.py
+++ b/salt/cloud/__init__.py
@@ -1666,7 +1666,7 @@ def run_parallel_map_providers_query(data):
'''
try:
import Crypto.Random
- Crypto.Random.atfork()
+ Crypto.Random.atfork() # pylint: disable=E0611
except ImportError:
# PyCrypto version < 2.1
pass
|
Re-add the pylint disable comment
|
diff --git a/doapi/cli/_util.py b/doapi/cli/_util.py
index <HASH>..<HASH> 100644
--- a/doapi/cli/_util.py
+++ b/doapi/cli/_util.py
@@ -153,7 +153,8 @@ class Cache(object):
self.cache_droplets()
elif key == "image":
self.cache_images()
- if name in self.caches[key]["name"]:
+ if name in self.caches[key]["name"] or \
+ (key == "image" and name in self.caches[key]["slug"]):
msg = 'There is already another %s named %r' % (key, name)
if fatal:
die(msg)
|
Warn/error when the user tries to name an image with the name of a slug
|
diff --git a/openquake/baselib/hdf5.py b/openquake/baselib/hdf5.py
index <HASH>..<HASH> 100644
--- a/openquake/baselib/hdf5.py
+++ b/openquake/baselib/hdf5.py
@@ -173,13 +173,17 @@ class PickleableSequence(collections.Sequence):
return repr(self._objects)
def __toh5__(self):
- dic = {
- '%06d' % i: numpy.array(pickle.dumps(obj, pickle.HIGHEST_PROTOCOL))
- for i, obj in enumerate(self._objects)}
- return dic, {}
+ dic = {}
+ nbytes = 0
+ for i, obj in enumerate(self._objects):
+ pik = pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
+ dic['%06d' % i] = numpy.array(pik)
+ nbytes += len(pik)
+ return dic, dict(nbytes=nbytes)
def __fromh5__(self, dic, attrs):
self._objects = tuple(pickle.loads(dic[k].value) for k in sorted(dic))
+ vars(self).update(attrs)
class File(h5py.File):
|
Stored the number of bytes used
|
diff --git a/app/models/concerns/worthwhile/solr_document_behavior.rb b/app/models/concerns/worthwhile/solr_document_behavior.rb
index <HASH>..<HASH> 100644
--- a/app/models/concerns/worthwhile/solr_document_behavior.rb
+++ b/app/models/concerns/worthwhile/solr_document_behavior.rb
@@ -14,7 +14,7 @@ module Worthwhile
end
def to_param
- noid
+ noid || id
end
##
|
SolrDocument to_parm should work with noid or pid
|
diff --git a/indra/explanation/model_checker/pybel.py b/indra/explanation/model_checker/pybel.py
index <HASH>..<HASH> 100644
--- a/indra/explanation/model_checker/pybel.py
+++ b/indra/explanation/model_checker/pybel.py
@@ -40,8 +40,10 @@ class PybelModelChecker(ModelChecker):
include_variants=include_variants,
symmetric_variant_links=symmetric_variant_links,
include_components=include_components,
- symmetric_component_links=symmetric_component_links)
- self.graph = signed_edges_to_signed_nodes(signed_edges)
+ symmetric_component_links=symmetric_component_links,
+ propagate_annotations=True)
+ self.graph = signed_edges_to_signed_nodes(
+ signed_edges, copy_edge_data={'belief'})
return self.graph
def process_statement(self, stmt):
|
Update pybel graph in modelchecker
|
diff --git a/propagation.go b/propagation.go
index <HASH>..<HASH> 100644
--- a/propagation.go
+++ b/propagation.go
@@ -178,7 +178,13 @@ func extractTraceContext(opaqueCarrier interface{}) (SpanContext, error) {
return spanContext, ot.ErrSpanContextNotFound
}
- if !spanContext.Suppressed && (spanContext.SpanID == 0 != (spanContext.TraceIDHi == 0 && spanContext.TraceID == 0)) {
+ // when the context is not suppressed
+ // and instana headers either can not be parsed or present partially
+ // and w3 context is not there
+ if !spanContext.Suppressed &&
+ (spanContext.SpanID == 0 != (spanContext.TraceIDHi == 0 && spanContext.TraceID == 0)) &&
+ spanContext.W3CContext.IsZero() {
+
return spanContext, ot.ErrSpanContextCorrupted
}
|
return from tracerS.Extract spanContext, when Instana headers were corrupted but w3 context was found
|
diff --git a/rachiopy/__init__.py b/rachiopy/__init__.py
index <HASH>..<HASH> 100644
--- a/rachiopy/__init__.py
+++ b/rachiopy/__init__.py
@@ -33,11 +33,8 @@ class Rachio(object):
(resp, content) = _HTTP.request(url, method,
headers=self._headers, body=body)
- status = resp.get('status')
content_type = resp.get('content-type')
- if status != '200':
- content = None
- elif content_type == 'application/json':
+ if content_type and content_type.startswith('application/json'):
content = json.loads(content.decode('UTF-8'))
return (resp, content)
|
Better handling of request responses.
Better detection of JSON data encoding in the response.
|
diff --git a/be/cli.py b/be/cli.py
index <HASH>..<HASH> 100644
--- a/be/cli.py
+++ b/be/cli.py
@@ -128,10 +128,10 @@ def in_(ctx, context, yes):
"BE_PROJECTROOT": os.path.join(
_extern.cwd(), project).replace("\\", "/"),
"BE_PROJECTSROOT": _extern.cwd(),
- "BE_ACTIVE": "true",
+ "BE_ACTIVE": "True",
}
- for map_source, map_dest in settings.get("environment_map", {}).items():
+ for map_source, map_dest in settings.get("redirect", {}).items():
env[map_dest] = env[map_source]
if "BE_TESTING" in os.environ:
@@ -378,7 +378,7 @@ def dump():
project = os.environ["BE_PROJECT"]
root = os.environ["BE_PROJECTSROOT"]
settings = _extern.load(project, "be", optional=True, root=root)
- environ = settings.get("environment_map", {}).items()
+ environ = settings.get("redirect", {}).items()
for map_source, map_dest in sorted(environ):
lib.echo("%s=%s" % (map_dest, os.environ.get(map_dest)))
|
Refactored environment_map to redirect
|
diff --git a/lib/chrome/launch.js b/lib/chrome/launch.js
index <HASH>..<HASH> 100644
--- a/lib/chrome/launch.js
+++ b/lib/chrome/launch.js
@@ -31,7 +31,7 @@ module.exports = function() {
if (config.fps)
args.push('--show-fps-counter')
- const child = cp.spawn(path, args, { detached: process.platform !== 'win32' })
+ const child = cp.spawn(path, args)
child.on('error', err => {
if (err.code === 'ENOENT')
|
Don't detach chrome (close on wright exit)
|
diff --git a/src/Object3D.js b/src/Object3D.js
index <HASH>..<HASH> 100644
--- a/src/Object3D.js
+++ b/src/Object3D.js
@@ -29,6 +29,8 @@ export default class Object3D {
return this;
}
+ raycast() {}
+
render(gl, scene, camera) {
this.childs.forEach(object => object.render(gl, scene, camera));
}
diff --git a/src/Renderer.js b/src/Renderer.js
index <HASH>..<HASH> 100644
--- a/src/Renderer.js
+++ b/src/Renderer.js
@@ -1,6 +1,8 @@
export default class Renderer {
constructor(options) {
- this._container = document.getElementById(options.container);
+ this._container = typeof options.container === 'string' ?
+ document.getElementById(options.container) : options.container;
+
this._pixelRatio = options.pixelRatio || 1;
this._antialias = options.antialias !== undefined ? options.antialias : true;
this.autoClear = options.autoClear !== undefined ? options.autoClear : true;
|
add empty raycast method to object3d
|
diff --git a/acrachilisync-tools/src/main/java/fr/dudie/acrachilisync/tools/MigrateDescriptions.java b/acrachilisync-tools/src/main/java/fr/dudie/acrachilisync/tools/MigrateDescriptions.java
index <HASH>..<HASH> 100644
--- a/acrachilisync-tools/src/main/java/fr/dudie/acrachilisync/tools/MigrateDescriptions.java
+++ b/acrachilisync-tools/src/main/java/fr/dudie/acrachilisync/tools/MigrateDescriptions.java
@@ -170,7 +170,8 @@ public class MigrateDescriptions {
msg.append(pIssue.getDescription());
LOGGER.trace(msg.toString());
}
- // redmine.updateIssue(pIssue);
+ LOGGER.info("update Issue #{}", pIssue.getId());
+ redmine.updateIssue(pIssue);
} catch (final Exception e) {
throw new DescriptionUpgradeException(pIssue, e);
}
|
uncomment call to redmine.updateIssue()
|
diff --git a/src/Adapter/AbstractCriterion.php b/src/Adapter/AbstractCriterion.php
index <HASH>..<HASH> 100644
--- a/src/Adapter/AbstractCriterion.php
+++ b/src/Adapter/AbstractCriterion.php
@@ -81,7 +81,7 @@ abstract class AbstractCriterion implements IteratorAggregate
* @return static The found criterion
* @throws CriterionNotFoundException if the criterion is not found
*/
- protected function getCriterion($name)
+ public function getCriterion($name)
{
if ($name instanceof self) {
$name = $name->getName();
|
The getter from the AbstractCriterion is now public
|
diff --git a/src/ExternalModule.php b/src/ExternalModule.php
index <HASH>..<HASH> 100644
--- a/src/ExternalModule.php
+++ b/src/ExternalModule.php
@@ -75,7 +75,6 @@ class ExternalModule extends Module implements iExternalModule
return $o;
}
-
/** Обработчик сериализации объекта */
public function __sleep()
{
@@ -83,15 +82,6 @@ class ExternalModule extends Module implements iExternalModule
return array_diff( array_keys( get_object_vars( $this )), array( 'view_path', 'view_html', 'view_data' ));
}
- /** Deserialization logic */
- public function __wakeup()
- {
- parent::__wakeup();
-
- // Subscribe to an config ready core event
- Event::subscribe('core.started', array($this, 'init'));
- }
-
/** @see Module::duplicate() */
public function & duplicate( $id, $class_name = null )
{
|
Removed Event::subscribe from ExternalModule from __wakeup
|
diff --git a/lib/pake/pakeGit.class.php b/lib/pake/pakeGit.class.php
index <HASH>..<HASH> 100644
--- a/lib/pake/pakeGit.class.php
+++ b/lib/pake/pakeGit.class.php
@@ -20,6 +20,11 @@ class pakeGit
$this->repository_path = $repository_path;
}
+ public function getPath()
+ {
+ return $this->repository_path;
+ }
+
public function add($files = null)
{
if (null === $files) {
|
as repository-path is guessed sometimes, code might need to get real path at some point
|
diff --git a/src/usertiming.js b/src/usertiming.js
index <HASH>..<HASH> 100644
--- a/src/usertiming.js
+++ b/src/usertiming.js
@@ -453,8 +453,8 @@
window.performance.measure = function (measureName, startMark, endMark) {
var now = window.performance.now();
- if (!measureName) {
- throw new Error('Measure must be specified');
+ if (typeof(measureName) === 'undefined') {
+ throw new SyntaxError('Measure must be specified');
}
// if there isn't a startMark, we measure from navigationStart to now
|
measure() without a measureName should do a typeof check instead of truthy, and throw a SyntaxError
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -43,6 +43,6 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-contrib-watch');
- grunt.registerTask('phpwatch', ['php:test', 'watch']);
+ grunt.registerTask('phpwatch', ['php:test200', 'watch']);
grunt.registerTask('default', ['php:test200', 'php:test301', 'simplemocha:test']);
};
|
Fix target in `phpwatch` task to point to a valid target.
|
diff --git a/test.py b/test.py
index <HASH>..<HASH> 100644
--- a/test.py
+++ b/test.py
@@ -1,6 +1,7 @@
import contextlib
import datetime
+import time
import unittest2
import pyoo
@@ -633,12 +634,14 @@ class ChartsTestCase(BaseTestCase):
with self.create_chart() as chart:
series = chart.diagram.series[0]
series.line_color = 0xFF0000
+ time.sleep(0.1) # OpenOffice needs some time to apply the change
self.assertEqual(0xFF0000, series.line_color)
def test_series_fill_color(self):
with self.create_chart() as chart:
series = chart.diagram.series[0]
series.fill_color = 0xFF0000
+ time.sleep(0.1) # OpenOffice needs some time to apply the change
self.assertEqual(0xFF0000, series.fill_color)
|
Fix failing tests because of delay before changes are applied by OpenOffice.
|
diff --git a/devices/orvibo.js b/devices/orvibo.js
index <HASH>..<HASH> 100644
--- a/devices/orvibo.js
+++ b/devices/orvibo.js
@@ -75,6 +75,26 @@ module.exports = [
},
},
{
+ zigbeeModel: ['396483ce8b3f4e0d8e9d79079a35a420'],
+ model: 'CM10ZW',
+ vendor: 'ORVIBO',
+ description: 'Multi-functional 3 gang relay',
+ extend: extend.switch(),
+ exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3')],
+ endpoint: (device) => {
+ return {l1: 1, l2: 2, l3: 3};
+ },
+ meta: {multiEndpoint: true},
+ configure: async (device, coordinatorEndpoint, logger) => {
+ const endpoint1 = device.getEndpoint(1);
+ await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
+ const endpoint2 = device.getEndpoint(2);
+ await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
+ const endpoint3 = device.getEndpoint(3);
+ await reporting.bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
+ },
+ },
+ {
zigbeeModel: ['b467083cfc864f5e826459e5d8ea6079'],
model: 'ST20',
vendor: 'ORVIBO',
|
Add CM<I>ZW (#<I>)
The new CM<I>ZW model is a multi-functional 3 gang relay to replace the RL<I>QZB model.
It's the same device, with a different ID.
Issue : <URL>
|
diff --git a/lib/couchdb/database.rb b/lib/couchdb/database.rb
index <HASH>..<HASH> 100644
--- a/lib/couchdb/database.rb
+++ b/lib/couchdb/database.rb
@@ -285,6 +285,15 @@ module Couchdb
Response.new(http.request(uri, req))
end
+ def head(doc_id, credentials = nil)
+ uri = doc_uri(doc_id)
+ req = Net::HTTP::Head.new(uri.to_s)
+
+ set_credentials(req, credentials)
+
+ Response.new(http.request(uri, req))
+ end
+
def get_attachment(loc, credentials = nil, &block)
uri = doc_uri(loc)
req = Net::HTTP::Get.new(uri.to_s)
|
Couchdb::Database#head. #<I>.
Useful for detecting the presence of a document, which in turn is useful
for attaching objects to documents. (In order to attach objects to
documents, a rev must be provided. The easiest way to get that rev, if
it isn't already present, is to do a HEAD on the document ID.)
|
diff --git a/lib/Unexpected.js b/lib/Unexpected.js
index <HASH>..<HASH> 100644
--- a/lib/Unexpected.js
+++ b/lib/Unexpected.js
@@ -258,7 +258,14 @@ Unexpected.prototype.addType = function (type) {
return inspect.apply(this, arguments);
}
};
- this.types.unshift(extendedType);
+ if (extendedType.identify === false) {
+ extendedType.identify = function () {
+ return false;
+ };
+ this.types.push(extendedType);
+ } else {
+ this.types.unshift(extendedType);
+ }
return this.expect;
};
diff --git a/lib/types.js b/lib/types.js
index <HASH>..<HASH> 100644
--- a/lib/types.js
+++ b/lib/types.js
@@ -572,9 +572,7 @@ module.exports = function (expect) {
base: 'array',
digitWidth: 2,
hexDumpWidth: 16,
- identify: function () {
- return false;
- },
+ identify: false,
equal: function (a, b) {
if (a === b) {
return true;
|
Add support for "abstract" types (identify: false).
|
diff --git a/src/de/mrapp/android/preference/activity/PreferenceFragment.java b/src/de/mrapp/android/preference/activity/PreferenceFragment.java
index <HASH>..<HASH> 100644
--- a/src/de/mrapp/android/preference/activity/PreferenceFragment.java
+++ b/src/de/mrapp/android/preference/activity/PreferenceFragment.java
@@ -255,7 +255,7 @@ public abstract class PreferenceFragment extends
final Object oldValue, final Object newValue) {
for (RestoreDefaultsListener listener : restoreDefaultsListeners) {
listener.onRestoredDefaultValue(this, preference, oldValue,
- newValue);
+ newValue != null ? newValue : oldValue);
}
}
|
Bugfix #3: The new value, which is passed to a listener, is not null anymore, when restoring the default value has not changed the value.
|
diff --git a/examples/opf/bin/OpfRunExperiment.py b/examples/opf/bin/OpfRunExperiment.py
index <HASH>..<HASH> 100755
--- a/examples/opf/bin/OpfRunExperiment.py
+++ b/examples/opf/bin/OpfRunExperiment.py
@@ -20,7 +20,7 @@
# ----------------------------------------------------------------------
"""This script is a command-line client of Online Prediction Framework (OPF).
-It executes a single expiriment.
+It executes a single experiment.
"""
@@ -39,7 +39,10 @@ def main():
# in the 'conf' subdirectory of the NuPic install location.
nupic.support.initLogging(verbose=True)
- # Initialize PRNGs
+ # Initialize pseudo-random number generators (PRNGs)
+ #
+ # This will fix the seed that is used by numpy when generating 'random'
+ # numbers. This allows for repeatability across experiments.
initExperimentPrng()
# Run it!
|
Fix typos, expand non-obvious acronyms.
|
diff --git a/marshmallow_jsonapi/fields.py b/marshmallow_jsonapi/fields.py
index <HASH>..<HASH> 100644
--- a/marshmallow_jsonapi/fields.py
+++ b/marshmallow_jsonapi/fields.py
@@ -7,6 +7,7 @@ from marshmallow.fields import * # noqa
from .utils import resolve_params, get_value_or_raise
+
class BaseRelationship(Field):
"""Base relationship field. This is used by `marshmallow_jsonapi.Schema` to determine
which fields should be formatted as relationship objects.
@@ -98,6 +99,25 @@ class Relationship(BaseRelationship):
}
return included_data
+ def validate_type(self, relationship):
+ if 'type' not in relationship:
+ raise ValueError('Must have a `type` field')
+ if relationship['type'] != self.type_:
+ raise ValueError('Invalid `type` specified')
+
+ def _deserialize(self, value, attr, obj):
+ if self.many:
+ data = value.get('data', [])
+ for item in data:
+ self.validate_type(item)
+ else:
+ data = value.get('data', {})
+ self.validate_type(data)
+
+ if self.many:
+ return [item.get('id') for item in data]
+ return data.get('id')
+
def _serialize(self, value, attr, obj):
dict_class = self.parent.dict_class if self.parent else dict
ret = dict_class()
|
Overloaded _deserialize method and added type validation
|
diff --git a/src/AddMany.php b/src/AddMany.php
index <HASH>..<HASH> 100644
--- a/src/AddMany.php
+++ b/src/AddMany.php
@@ -106,7 +106,7 @@ class AddMany {
return false;
}
$subpost = new \SubPost;
- $subpost->set('post_title', 'subpost');
+ $subpost->set('post_title', 'AddMany subpost '.md5(mt_rand()));
$subpost->set('post_parent', $post_data['parent_id']);
$subpost->set(
'field_assigned_to',
|
Make title and slug of subpost unique
|
diff --git a/src/locale/lang/ua.js b/src/locale/lang/ua.js
index <HASH>..<HASH> 100644
--- a/src/locale/lang/ua.js
+++ b/src/locale/lang/ua.js
@@ -1,7 +1,7 @@
export default {
el: {
colorpicker: {
- confirm: 'OK',
+ confirm: 'Обрати',
clear: 'Очистити'
},
datepicker: {
@@ -107,14 +107,14 @@ export default {
hasCheckedFormat: '{checked}/{total} вибрано'
},
image: {
- error: 'FAILED' // to be translated
+ error: 'ПОМИЛКА'
},
pageHeader: {
- title: 'Back' // to be translated
+ title: 'Назад'
},
popconfirm: {
- confirmButtonText: 'Yes', // to be translated
- cancelButtonText: 'No' // to be translated
+ confirmButtonText: 'Так',
+ cancelButtonText: 'Ні'
}
}
};
|
fix: Update ua locale (#<I>)
|
diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/model_schema.rb
+++ b/activerecord/lib/active_record/model_schema.rb
@@ -115,7 +115,7 @@ module ActiveRecord
# the documentation for ActiveRecord::Base#table_name.
def table_name=(value)
@original_table_name = @table_name if defined?(@table_name)
- @table_name = value
+ @table_name = value && value.to_s
@quoted_table_name = nil
@arel_table = nil
@relation = Relation.new(self, arel_table)
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index <HASH>..<HASH> 100644
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -1446,6 +1446,11 @@ class BasicsTest < ActiveRecord::TestCase
end
end
+ def test_set_table_name_symbol_converted_to_string
+ Joke.table_name = :cold_jokes
+ assert_equal 'cold_jokes', Joke.table_name
+ end
+
def test_quoted_table_name_after_set_table_name
klass = Class.new(ActiveRecord::Base)
|
call to_s on value passed to table_name=
|
diff --git a/lib/config/cli.js b/lib/config/cli.js
index <HASH>..<HASH> 100644
--- a/lib/config/cli.js
+++ b/lib/config/cli.js
@@ -22,7 +22,8 @@ function getConfig(argv) {
const coersions = {
boolean: val => val === 'true',
- list: val => val.split(',').map(el => el.trim()),
+ list: val =>
+ val === '[]' || val === '' ? [] : val.split(',').map(el => el.trim()),
string: val => val,
integer: parseInt,
};
|
refactor: massage [] or empty string for cli lists
|
diff --git a/lib/puppet/face/facts.rb b/lib/puppet/face/facts.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/face/facts.rb
+++ b/lib/puppet/face/facts.rb
@@ -11,7 +11,7 @@ EXCLUDE_LIST = %w[ facterversion
memory\.swap\.available memory\.swap\.capacity memory\.swap\.used
memory\.system\.available_bytes memory\.system\.used_bytes
memory\.system\.available memory\.system\.capacity memory\.system\.used
- mountpoints\..*\.available* mountpoints\..*\.capacity mountpoints\..*\.used*
+ mountpoints\..*\.available.* mountpoints\..*\.capacity mountpoints\..*\.used.*
sp_uptime system_profiler\.uptime
uptime uptime_days uptime_hours uptime_seconds
system_uptime\.uptime system_uptime\.days system_uptime\.hours system_uptime\.seconds
|
(maint) Fix exclude_list for `puppet facts diff`
This commit adds missing characters from the `EXCLUDE_LIST` array of
regular expressions used for filtering the `puppet facts diff` output of
volatile facts.
|
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
@@ -23,6 +23,7 @@ require 'vcr'
VCR.configure do |c|
c.cassette_library_dir = 'spec/fixtures/coal_cassettes'
c.hook_into :webmock
+ config.ignore_hosts 'codeclimate.com'
end
require_relative 'support/api_settings'
|
VCR should ignore codeclimate.com
|
diff --git a/src/main/java/io/redlink/sdk/util/ApiHelper.java b/src/main/java/io/redlink/sdk/util/ApiHelper.java
index <HASH>..<HASH> 100644
--- a/src/main/java/io/redlink/sdk/util/ApiHelper.java
+++ b/src/main/java/io/redlink/sdk/util/ApiHelper.java
@@ -12,7 +12,7 @@ import java.util.regex.Pattern;
*/
public class ApiHelper {
- public static final Pattern VERSION_PATTERN= Pattern.compile("(\\d)+\\.(\\d)+(\\.\\d+)?\\-([A-Z]+)(\\-SNAPSHOT)?");
+ public static final Pattern VERSION_PATTERN = Pattern.compile("(\\d)+\\.(\\d)+(\\.\\d+)?\\-([A-Z]+)(\\-SNAPSHOT)?");
/**
* Build a proper api version from the artifact version
@@ -21,7 +21,8 @@ public class ApiHelper {
* @see <a href="http://dev.redlink.io/sdk#introduction">api/sdk versioning</a>
*/
public static String getApiVersion() {
- return getApiVersion(ApiHelper.class.getPackage().getImplementationVersion());
+ String version = getApiVersion(ApiHelper.class.getPackage().getImplementationVersion());
+ return (version != null ? version : "1.0-ALPHA"); //FIXME
}
/**
|
quick fix for getting the version when sdk is used as library (TODO: solve this)
|
diff --git a/lib/data_mapper/support/inflection.rb b/lib/data_mapper/support/inflection.rb
index <HASH>..<HASH> 100644
--- a/lib/data_mapper/support/inflection.rb
+++ b/lib/data_mapper/support/inflection.rb
@@ -2,7 +2,9 @@
# part of the Ruby On Rails web-framework (http://rubyonrails.org)
#
# Methods have been modified or removed. English inflection is now provided via
-# the english gem (http://english.rubyforge.org)
+# the english gem (http://english.rubyforge.org)
+#
+# sudo gem install english
#
require 'english/inflect'
module DataMapper
|
You must have english gem installed now.
sudo gem install english
|
diff --git a/pyrax/fakes.py b/pyrax/fakes.py
index <HASH>..<HASH> 100644
--- a/pyrax/fakes.py
+++ b/pyrax/fakes.py
@@ -619,7 +619,7 @@ class FakeIdentity(BaseIdentity):
self._default_region = random.choice(("DFW", "ORD"))
self.services = {"fake": FakeIdentityService(self)}
- def authenticate(self):
+ def authenticate(self, connect=False):
if ((self.username == self._good_username) and
(self.password == self._good_password)):
self._parse_response(self.fake_response())
|
Add backwards compatibility param to fake method
|
diff --git a/lint-staged.config.js b/lint-staged.config.js
index <HASH>..<HASH> 100644
--- a/lint-staged.config.js
+++ b/lint-staged.config.js
@@ -1,6 +1,6 @@
'use strict';
module.exports = {
- '*.js': ['prettier --write', 'eslint --fix', 'git add'],
- '*.{json,md,yml,css}': ['prettier --write', 'git add'],
+ '*.js': ['prettier --write', 'eslint --fix'],
+ '*.{json,md,yml,css}': ['prettier --write'],
};
|
chore: update lint-staged config (#<I>)
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -49,6 +49,7 @@ setup(name='palladium',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
],
packages=find_packages(),
include_package_data=True,
|
Added Python <I> support info to setup.py
|
diff --git a/underfs/swift/src/main/java/tachyon/underfs/swift/SwiftUnderFileSystemUtils.java b/underfs/swift/src/main/java/tachyon/underfs/swift/SwiftUnderFileSystemUtils.java
index <HASH>..<HASH> 100644
--- a/underfs/swift/src/main/java/tachyon/underfs/swift/SwiftUnderFileSystemUtils.java
+++ b/underfs/swift/src/main/java/tachyon/underfs/swift/SwiftUnderFileSystemUtils.java
@@ -22,9 +22,11 @@ import tachyon.conf.TachyonConf;
public class SwiftUnderFileSystemUtils {
/**
- * Replace default key with user provided key
- * @param conf
- * @param key
+ * Replaces default key with user provided key.
+ *
+ * @param conf the Hadoop configuration
+ * @param tachyonConf the Tachyon configuration
+ * @param key the key to add
*/
public static void addKey(Configuration conf, TachyonConf tachyonConf, String key) {
if (System.getProperty(key) != null && conf.get(key) == null) {
|
Fixing "mvn site" warnings and cleaning up JavaDoc style in tachyon.underfs.swift.
|
diff --git a/samples/send.js b/samples/send.js
index <HASH>..<HASH> 100644
--- a/samples/send.js
+++ b/samples/send.js
@@ -29,6 +29,7 @@ var fs = require('fs');
var types = {
service: String,
topic: String,
+ id: String,
'message-ttl': Number,
delay: Number,
file: String
|
Add id to known types for send.js
|
diff --git a/packages/perspective-common/common.config.js b/packages/perspective-common/common.config.js
index <HASH>..<HASH> 100644
--- a/packages/perspective-common/common.config.js
+++ b/packages/perspective-common/common.config.js
@@ -1,17 +1,21 @@
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
+const plugins = []
+
+if (!process.env.PSP_FASTCOMP) {
+ plugins.push(new UglifyJSPlugin({
+ sourceMap: true,
+ uglifyOptions: {
+ sourceMap: true,
+ ecma: 5
+ }
+ }));
+}
+
module.exports = function() {
return {
- plugins: [
- new UglifyJSPlugin({
- sourceMap: true,
- uglifyOptions: {
- sourceMap: true,
- ecma: 5
- }
- })
- ],
+ plugins: plugins,
devtool: 'source-map',
node: {
fs: "empty"
|
Added flag to disable minification for faster development builds.
|
diff --git a/src/Monolog/Handler/BufferHandler.php b/src/Monolog/Handler/BufferHandler.php
index <HASH>..<HASH> 100644
--- a/src/Monolog/Handler/BufferHandler.php
+++ b/src/Monolog/Handler/BufferHandler.php
@@ -126,4 +126,22 @@ class BufferHandler extends AbstractHandler
$this->handler->reset();
}
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setFormatter(FormatterInterface $formatter)
+ {
+ $this->handler->setFormatter($formatter);
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getFormatter()
+ {
+ return $this->handler->getFormatter();
+ }
}
|
Add formatter forwarding to BufferHandler as well
|
diff --git a/test/Utils/ProjectTest.php b/test/Utils/ProjectTest.php
index <HASH>..<HASH> 100644
--- a/test/Utils/ProjectTest.php
+++ b/test/Utils/ProjectTest.php
@@ -52,10 +52,10 @@ class ProjectTest extends \PHPUnit_Framework_TestCase
public function testDownloadArchive()
{
$project = new Project(sys_get_temp_dir() . '/project' . rand());
- $archiveUrl = 'https://github.com/GoogleCloudPlatform/google-cloud-php/archive/master.zip';
+ $archiveUrl = 'https://github.com/GoogleCloudPlatform/google-cloud-php/archive/main.zip';
$project->downloadArchive('Google Cloud client libraries', $archiveUrl);
$this->assertTrue(file_exists(
- $project->getDir() . '/google-cloud-php-master/composer.json'));
+ $project->getDir() . '/google-cloud-php-main/composer.json'));
}
public function testCopyFiles()
|
chore: fix master main (#<I>)
|
diff --git a/apiclient/discovery.py b/apiclient/discovery.py
index <HASH>..<HASH> 100644
--- a/apiclient/discovery.py
+++ b/apiclient/discovery.py
@@ -64,6 +64,11 @@ class JsonModel(object):
def request(self, headers, path_params, query_params, body_value):
query = self.build_query(query_params)
headers['accept'] = 'application/json'
+ if 'user-agent' in headers:
+ headers['user-agent'] += ' '
+ else:
+ headers['user-agent'] = ''
+ headers['user-agent'] += 'google-api-client-python/1.0'
if body_value is None:
return (headers, path_params, query, None)
else:
|
Added user-agent for the library
|
diff --git a/neurondm/neurondm/models/apinat_npo.py b/neurondm/neurondm/models/apinat_npo.py
index <HASH>..<HASH> 100644
--- a/neurondm/neurondm/models/apinat_npo.py
+++ b/neurondm/neurondm/models/apinat_npo.py
@@ -81,10 +81,20 @@ def main():
log.error(f'bad data for {c} {s} {p} {o}')
raise e
+ problems = ('8a', '8v', 'sstom-6', 'keast-2', 'sdcol-k', 'sdcol-l')
+ def eff(n):
+ return bool([x for x in problems
+ if x in n.id_ and '20' not in n.id_])
+
config = Config('apinat-simple-sheet')
+ sigh = []
nrns = []
for id, phenos in dd.items():
n = NeuronApinatSimple(*phenos, id_=id)
+ if eff(n):
+ n._sigh() # XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX FIXME figure out why this is not getting called internally
+ sigh.append(n)
+
nrns.append(n)
config.write()
|
apinat npo hardcode fix for _sigh failures
amusingly I named the variable sigh before I knew that _sigh not being
called was the issue
|
diff --git a/luigi/parameter.py b/luigi/parameter.py
index <HASH>..<HASH> 100644
--- a/luigi/parameter.py
+++ b/luigi/parameter.py
@@ -94,9 +94,9 @@ class Parameter(object):
* Any value provided on the command line:
- - With qualified task name (eg. ``--TaskA-param xyz``)
+ - To the root task (eg. ``--param xyz``)
- - Without (eg. ``--param xyz``)
+ - Then to the class, using the qualified task name syntax (eg. ``--TaskA-param xyz``).
* With ``[TASK_NAME]>PARAM_NAME: <serialized value>`` syntax. See :ref:`ParamConfigIngestion`
|
docs: Correct order of parameter resolution
There were some changes in #<I> and #<I> in which I forgot to update
the docs.
|
diff --git a/salt/_compat.py b/salt/_compat.py
index <HASH>..<HASH> 100644
--- a/salt/_compat.py
+++ b/salt/_compat.py
@@ -144,6 +144,12 @@ class IPv6AddressScoped(ipaddress.IPv6Address):
:param address:
'''
+ # pylint: disable-all
+ if not hasattr(self, '_is_packed_binary'):
+ # This method (below) won't be around for some Python 3 versions
+ # and we need check this differently anyway
+ self._is_packed_binary = lambda p: isinstance(p, bytes)
+ # pylint: enable-all
if isinstance(address, string_types) and '%' in address:
buff = address.split('%')
if len(buff) != 2:
|
Roll back some changes to _compat.py
|
diff --git a/openquake/commonlib/readinput.py b/openquake/commonlib/readinput.py
index <HASH>..<HASH> 100644
--- a/openquake/commonlib/readinput.py
+++ b/openquake/commonlib/readinput.py
@@ -380,9 +380,9 @@ def get_site_collection(oqparam):
an :class:`openquake.commonlib.oqvalidation.OqParam` instance
"""
mesh = get_mesh(oqparam)
+ req_site_params = get_gsim_lt(oqparam).req_site_params
if oqparam.inputs.get('site_model'):
sm = get_site_model(oqparam)
- req_site_params = set(sm.dtype.names) - {'lon', 'lat'}
try:
# in the future we could have elevation in the site model
depth = sm['depth']
@@ -420,7 +420,6 @@ def get_site_collection(oqparam):
# a None sitecol is okay when computing the ruptures only
return
else: # use the default site params
- req_site_params = get_gsim_lt(oqparam).req_site_params
sitecol = site.SiteCollection.from_points(
mesh.lons, mesh.lats, mesh.depths, oqparam, req_site_params)
ss = os.environ.get('OQ_SAMPLE_SITES')
|
Restored req_site_params as it was [skip CI]
|
diff --git a/views/js/qtiCreator/editor/ckEditor/htmlEditor.js b/views/js/qtiCreator/editor/ckEditor/htmlEditor.js
index <HASH>..<HASH> 100755
--- a/views/js/qtiCreator/editor/ckEditor/htmlEditor.js
+++ b/views/js/qtiCreator/editor/ckEditor/htmlEditor.js
@@ -172,17 +172,8 @@ define([
}
- /*
- dirty trick: shows and hides combo boxes (styles for instance)
- in the CKE toolbar and acts as a pre-loader for the iframes in these boxes
- */
- $('#cke_' + e.editor.name).find('.cke_combo_button').each(function(){
- var btn = this;
- btn.click();
- setTimeout(function(){
- btn.click();
- }, 500);
- });
+ //fix ck editor combo box display issue
+ $('#cke_' + e.editor.name + ' .cke_combopanel').hide();
//store it in editable elt data attr
$editable.data('editor', editor);
@@ -235,6 +226,7 @@ define([
},
blur : function(e){
+ return false;
if(options.hideTriggerOnBlur){
$trigger.hide();
}
|
replace old dirty hack with a better fix for ck combobox visibility issue
|
diff --git a/ospd/ospd.py b/ospd/ospd.py
index <HASH>..<HASH> 100644
--- a/ospd/ospd.py
+++ b/ospd/ospd.py
@@ -504,11 +504,6 @@ class OSPDaemon:
stream.close()
- def calculate_progress(self, scan_id: str) -> float:
- """ Calculate the total scan progress. """
-
- return self.scan_collection.calculate_target_progress(scan_id)
-
def process_finished_hosts(self, scan_id: str, finished_hosts: str) -> None:
""" Process the finished hosts before launching the scans."""
@@ -606,7 +601,7 @@ class OSPDaemon:
):
self.scan_collection.set_host_progress(scan_id, host_progress)
- scan_progress = self.calculate_progress(scan_id)
+ scan_progress = self.scan_collection.calculate_target_progress(scan_id)
self.scan_collection.set_progress(scan_id, scan_progress)
def set_scan_host_progress(
|
Remove wrapper and access scan_collection method directly
|
diff --git a/Model/Api/ShippingMethods.php b/Model/Api/ShippingMethods.php
index <HASH>..<HASH> 100644
--- a/Model/Api/ShippingMethods.php
+++ b/Model/Api/ShippingMethods.php
@@ -795,7 +795,7 @@ class ShippingMethods implements ShippingMethodsInterface
$ignoredShippingAddressCoupons = $this->configHelper->getIgnoredShippingAddressCoupons($quote->getStoreId());
return $parentQuoteCoupon &&
- !$quote->getCouponCode() &&
- in_array($parentQuoteCoupon, $ignoredShippingAddressCoupons);
+ in_array($parentQuoteCoupon, $ignoredShippingAddressCoupons) &&
+ !$quote->setTotalsCollectedFlag(false)->collectTotals()->getCouponCode();
}
}
|
Collect immutable quote totals when checking if the coupon is invalid for the shipping address (#<I>)
|
diff --git a/acceptance-tests/src/test/java/me/atam/atam4jsampleapp/PassingTestAcceptanceTest.java b/acceptance-tests/src/test/java/me/atam/atam4jsampleapp/PassingTestAcceptanceTest.java
index <HASH>..<HASH> 100644
--- a/acceptance-tests/src/test/java/me/atam/atam4jsampleapp/PassingTestAcceptanceTest.java
+++ b/acceptance-tests/src/test/java/me/atam/atam4jsampleapp/PassingTestAcceptanceTest.java
@@ -14,11 +14,12 @@ public class PassingTestAcceptanceTest extends AcceptanceTest {
public static final int MAX_ATTEMPTS = 2000;
public static final int RETRY_POLL_INTERVAL = 1;
+ public static final int TEN_SECONDS_IN_MILLIS = 10000;
@Test
public void givenSampleApplicationStartedWithPassingTest_whenHealthCheckCalledBeforeTestRun_thenTooEarlyMessageReceived(){
- applicationConfigurationDropwizardTestSupport = Atam4jApplicationStarter.startApplicationWith(PassingTest.class, 1000);
+ applicationConfigurationDropwizardTestSupport = Atam4jApplicationStarter.startApplicationWith(PassingTest.class, TEN_SECONDS_IN_MILLIS);
checkResponseIsOKAndWithMessage(AcceptanceTestsHealthCheck.TOO_EARLY_MESSAGE, getResponseFromHealthCheck());
}
|
Increased intital delay to ten seconds as sometimes tests were completing quicker than expected and making the actual test fail.
|
diff --git a/lib/carbon_date/version.rb b/lib/carbon_date/version.rb
index <HASH>..<HASH> 100644
--- a/lib/carbon_date/version.rb
+++ b/lib/carbon_date/version.rb
@@ -1,3 +1,3 @@
module CarbonDate
- VERSION = "0.0.4"
+ VERSION = "0.0.5"
end
|
Bumped version to <I>
|
diff --git a/lib/phobos/deep_struct.rb b/lib/phobos/deep_struct.rb
index <HASH>..<HASH> 100644
--- a/lib/phobos/deep_struct.rb
+++ b/lib/phobos/deep_struct.rb
@@ -16,9 +16,10 @@ module Phobos
end
def to_deep_struct(v)
- if v.is_a?(Hash)
+ case v
+ when Hash
self.class.new(v)
- elsif v.is_a?(Array)
+ when Enumerable
v.map { |el| to_deep_struct(el) }
else
v
|
Moved from if-elseif to case
|
diff --git a/cmd/fe/main.go b/cmd/fe/main.go
index <HASH>..<HASH> 100644
--- a/cmd/fe/main.go
+++ b/cmd/fe/main.go
@@ -105,7 +105,11 @@ Options:
var assets string
if s, ok := utils.Argument(d, "--assets-dir"); ok {
- assets = s
+ abspath, err := filepath.Abs(s)
+ if err != nil {
+ log.PanicErrorf(err, "get absolute path of %s failed", s)
+ }
+ assets = abspath
} else {
binpath, err := filepath.Abs(filepath.Dir(os.Args[0]))
if err != nil {
@@ -115,12 +119,9 @@ Options:
}
log.Warnf("set assets = %s", assets)
- fi, err := os.Stat(assets)
- if err != nil {
- log.PanicErrorf(err, "get stat of %s failed", assets)
- }
- if !fi.IsDir() {
- log.Panicf("%s is not a directory", assets)
+ indexFile := filepath.Join(assets, "index.html")
+ if _, err := os.Stat(indexFile); err != nil {
+ log.PanicErrorf(err, "get stat of %s failed", indexFile)
}
var loader ConfigLoader
|
fe: panic if index.html doesn't exist
|
diff --git a/piprot/piprot.py b/piprot/piprot.py
index <HASH>..<HASH> 100755
--- a/piprot/piprot.py
+++ b/piprot/piprot.py
@@ -90,7 +90,7 @@ def get_version_and_release_date(requirement, version=None, verbose=False, relea
print ('{} isn\'t even on PyPi. Check that the project still exists!'.format(
requirement))
return None, None
- except:
+ except ValueError:
if verbose:
print ('Decoding the JSON response for {} ({}) failed'.format(requirement, version))
return None, None
|
Remove that hideous except: and replace it with ValueError
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -13,22 +13,23 @@
import os
from setuptools import setup
-def read(fname):
- return open(os.path.join(os.path.dirname(__file__), fname)).read()
+LONG_DESC = open('pypi_readme.rst').read()
+LICENSE = open('LICENSE').read()
setup(
name="mbed-cli",
- packages=["mbed"],
version="0.8.6",
+ description="ARM mbed command line tool for repositories version control, publishing and updating code from remotely hosted repositories (GitHub, GitLab and mbed.org), and invoking mbed OS own build system and export functions, among other operations",
+ long_description=LONG_DESC,
url='http://github.com/ARMmbed/mbed-cli',
author='ARM mbed',
author_email='support@mbed.org',
- license='Apache-2.0',
+ license=LICENSE,
+ packages=["mbed"],
entry_points={
'console_scripts': [
'mbed=mbed.mbed:main',
'mbed-cli=mbed.mbed:main',
]
},
- long_description=read('pypi_readme.rst'),
)
|
Improve package information (e.g. description and license
|
diff --git a/app/javascripts/FormInput.js b/app/javascripts/FormInput.js
index <HASH>..<HASH> 100644
--- a/app/javascripts/FormInput.js
+++ b/app/javascripts/FormInput.js
@@ -86,16 +86,16 @@ class FormInput extends React.Component {
}
if(this.state.accounts.length > 0){
- console.log('detail', this.state.detail.ended, this.state.detail)
+ var availableSpots = this.state.detail.limitOfParticipants - this.state.detail.registered;
if(this.state.detail.ended){
registerButton = <span>This even is over </span>
- }else if (this.state.detail.limitOfParticipants > this.state.detail.registered){
+ }else if (availableSpots <= 0){
+ registerButton = <span>No more spots left</span>
+ }else{
registerButton = <RaisedButton secondary={this.showRegister()} disabled={!this.showRegister()}
label="Register" style={styles}
onClick={this.handleAction.bind(this, 'register')}
/>
- }else{
- registerButton = <span>No more spots left</span>
}
}else{
registerButton = <span>No account is set</span>
|
Fix bug showing No more spots left when there are more spots available.
|
diff --git a/src/factories/Resource.js b/src/factories/Resource.js
index <HASH>..<HASH> 100644
--- a/src/factories/Resource.js
+++ b/src/factories/Resource.js
@@ -46,6 +46,13 @@ export default ['$resource', '$rootScope', ($resource, $rootScope) => {
};
/**
+ * Manually mark this model as "clean" (i.e. not "dirty").
+ */
+ res.prototype.$markClean = function () {
+ wm.set(this, {initial: this, deleted: false});
+ };
+
+ /**
* Checks if this model is "dirty".
*
* @return boolean True if dirty, false if pristine.
|
add method to manually mark models as "clean"
|
diff --git a/sos/jupyter/kernel.py b/sos/jupyter/kernel.py
index <HASH>..<HASH> 100644
--- a/sos/jupyter/kernel.py
+++ b/sos/jupyter/kernel.py
@@ -1025,8 +1025,11 @@ class SoS_Kernel(Kernel):
return self._do_execute(remaining_code, silent, store_history, user_expressions, allow_stdin)
elif self.MAGIC_MATPLOTLIB.match(code):
options, remaining_code = self.get_magic_and_code(code, False)
- self.shell.enable_gui = lambda gui: None
- gui, backend = self.shell.enable_matplotlib(options)
+ try:
+ self.shell.enable_gui = lambda gui: None
+ gui, backend = self.shell.enable_matplotlib(options)
+ except Exception as e:
+ self.warn('Failed to set matplotlib backnd {}: {}'.format(options, e))
return self._do_execute(remaining_code, silent, store_history, user_expressions, allow_stdin)
elif self.MAGIC_SET.match(code):
options, remaining_code = self.get_magic_and_code(code, False)
|
Display error message of enable_matplotlib, this magic still does not work though.
|
diff --git a/steam/tf2.py b/steam/tf2.py
index <HASH>..<HASH> 100644
--- a/steam/tf2.py
+++ b/steam/tf2.py
@@ -188,6 +188,13 @@ class backpack:
pass
return ilist
+ def get_item_by_id(self, id):
+ """ Takes an id (serial number) and returns the item if one is found """
+ for item in self.get_items():
+ if self.get_item_id(item) == id:
+ return item
+
+
def format_attribute_description(self, attr):
""" Returns a formatted description_string (%s* tokens replaced) """
val = self.get_attribute_value(attr)
|
Add get_item_by_id to steamodd
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -79,7 +79,7 @@ function scopedName(name, filename, css) {
return loaderUtils.interpolateName(
{ resourcePath: filename },
localModuleNameFormat.replace(/\[localName\]/g, name),
- { content: css }
+ { content: css.substring(css.indexOf('.' + name)) }
);
}
|
fix all classes from same file having same hashes/emojis
|
diff --git a/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php b/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php
index <HASH>..<HASH> 100644
--- a/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php
+++ b/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php
@@ -29,8 +29,8 @@ class StubIntlDateFormatterTest extends LocaleTestCase
public function testConstructor()
{
- $formatter = new StubIntlDateFormatter('en', StubIntlDateFormatter::MEDIUM, StubIntlDateFormatter::SHORT, 'UTC', StubIntlDateFormatter::GREGORIAN, 'Y-M-d');
- $this->assertEquals('Y-M-d', $formatter->getPattern());
+ $formatter = new StubIntlDateFormatter('en', StubIntlDateFormatter::MEDIUM, StubIntlDateFormatter::SHORT, 'UTC', StubIntlDateFormatter::GREGORIAN, 'y-M-d');
+ $this->assertEquals('y-M-d', $formatter->getPattern());
}
/**
|
[Locale] do not use unimplemented chars in examples
|
diff --git a/pyprophet/levels_contexts.py b/pyprophet/levels_contexts.py
index <HASH>..<HASH> 100644
--- a/pyprophet/levels_contexts.py
+++ b/pyprophet/levels_contexts.py
@@ -288,9 +288,11 @@ def subsample_osw(infile, outfile, subsample_ratio, test):
ms2_present = check_sqlite_table(conn, "FEATURE_MS2")
transition_present = check_sqlite_table(conn, "FEATURE_TRANSITION")
## Check if infile contains multiple entries for run table, if only 1 entry, then infile is a single run, else infile is multiples run
- multiple_runs = True if conn.cursor().execute("SELECT COUNT(*) AS NUMBER_OF_RUNS FROM RUN").fetchall()[0][0] > 1 else False
+ n_runs = conn.cursor().execute("SELECT COUNT(*) AS NUMBER_OF_RUNS FROM RUN").fetchall()[0][0]
+ multiple_runs = True if n_runs > 1 else False
+ click.echo("Warn: There are %s runs in %s" %(n_runs, multiple_runs)
conn.close()
-
+
conn = sqlite3.connect(outfile)
c = conn.cursor()
|
[FEATURE Subsample Merged File] Debugging
|
diff --git a/src/Validator.php b/src/Validator.php
index <HASH>..<HASH> 100644
--- a/src/Validator.php
+++ b/src/Validator.php
@@ -25,7 +25,7 @@ use stdClass;
class Validator implements IValidator
{
- private const BELL = "\x07";
+ const BELL = "\x07";
/** @var IValidatorHelper */
protected $helper = null;
|
Removed access modifier to maintain php 7 compatibility
|
diff --git a/js/coinfloor.js b/js/coinfloor.js
index <HASH>..<HASH> 100644
--- a/js/coinfloor.js
+++ b/js/coinfloor.js
@@ -59,7 +59,6 @@ module.exports = class coinfloor extends Exchange {
'markets': {
'BTC/GBP': { 'id': 'XBT/GBP', 'symbol': 'BTC/GBP', 'base': 'BTC', 'quote': 'GBP', 'baseId': 'XBT', 'quoteId': 'GBP' },
'BTC/EUR': { 'id': 'XBT/EUR', 'symbol': 'BTC/EUR', 'base': 'BTC', 'quote': 'EUR', 'baseId': 'XBT', 'quoteId': 'EUR' },
- 'BCH/GBP': { 'id': 'BCH/GBP', 'symbol': 'BCH/GBP', 'base': 'BCH', 'quote': 'GBP', 'baseId': 'BCH', 'quoteId': 'GBP' },
'ETH/GBP': { 'id': 'ETH/GBP', 'symbol': 'ETH/GBP', 'base': 'ETH', 'quote': 'GBP', 'baseId': 'ETH', 'quoteId': 'GBP' },
},
});
|
[coinfloor] removed bugus BCH/GBP market
|
diff --git a/salt/states/tomcat.py b/salt/states/tomcat.py
index <HASH>..<HASH> 100644
--- a/salt/states/tomcat.py
+++ b/salt/states/tomcat.py
@@ -104,6 +104,7 @@ def war_deployed(name, war, url='http://localhost:8080/manager', __env__='base',
# Test
if __opts__['test']:
+ ret['result'] = None
return ret
# make sure the webapp is up if deployed
|
fixing prereq tomcat.war_deployed function
|
diff --git a/lib/active_record/connection_adapters/sqlserver_adapter.rb b/lib/active_record/connection_adapters/sqlserver_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/active_record/connection_adapters/sqlserver_adapter.rb
+++ b/lib/active_record/connection_adapters/sqlserver_adapter.rb
@@ -87,6 +87,8 @@ module ActiveRecord
def type_cast(value)
if value && type == :string && is_utf8?
self.class.string_to_utf8_encoding(value)
+ elsif value && type == :timestamp
+ "0x#{value}"
else
super
end
|
Add binary timestamp datatype handling.
|
diff --git a/src/chippyash/Type/TypeFactory.php b/src/chippyash/Type/TypeFactory.php
index <HASH>..<HASH> 100644
--- a/src/chippyash/Type/TypeFactory.php
+++ b/src/chippyash/Type/TypeFactory.php
@@ -253,7 +253,7 @@ abstract class TypeFactory
if (!in_array($requiredType, self::$validTypes)) {
throw new \InvalidArgumentException("{$requiredType} is not a supported number type");
}
- if ($requiredType == self::TYPE_GMP && !function_exists('gmp_init')) {
+ if ($requiredType == self::TYPE_GMP && !extension_loaded('gmp')) {
throw new \InvalidArgumentException('GMP not supported');
}
self::$supportType = $requiredType;
|
change function_exists to extension_loaded
|
diff --git a/neutronclient/neutron/v2_0/rbac.py b/neutronclient/neutron/v2_0/rbac.py
index <HASH>..<HASH> 100644
--- a/neutronclient/neutron/v2_0/rbac.py
+++ b/neutronclient/neutron/v2_0/rbac.py
@@ -32,12 +32,14 @@ class ListRBACPolicy(neutronV20.ListCommand):
list_columns = ['id', 'object_id']
pagination_support = True
sorting_support = True
+ allow_names = False
class ShowRBACPolicy(neutronV20.ShowCommand):
"""Show information of a given RBAC policy."""
resource = 'rbac_policy'
+ allow_names = False
class CreateRBACPolicy(neutronV20.CreateCommand):
@@ -81,6 +83,7 @@ class UpdateRBACPolicy(neutronV20.UpdateCommand):
"""Update RBAC policy for given tenant."""
resource = 'rbac_policy'
+ allow_names = False
def add_known_arguments(self, parser):
parser.add_argument(
@@ -97,3 +100,4 @@ class DeleteRBACPolicy(neutronV20.DeleteCommand):
"""Delete a RBAC policy."""
resource = 'rbac_policy'
+ allow_names = False
|
Do not allow name lookups on RBAC policies
RBAC policies have no name field so the name query to
the server was always returning all entries since the
name filter was ignored.
This corrects the behavior by disabling the name lookup
for RBAC policies.
Change-Id: I6c5afa<I>cefb<I>e<I>a1aaf<I>c<I>dc<I>c
Closes-Bug: #<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,5 +11,6 @@ setup(name='Flask-PAM',
install_requires=[
'simplepam>=0.1.5',
'Flask>=0.10.1',
+ 'python-jose>=0.6.1',
],
)
|
jwt: add python-jose dependency to setup.py
|
diff --git a/SoftLayer/managers/firewall.py b/SoftLayer/managers/firewall.py
index <HASH>..<HASH> 100644
--- a/SoftLayer/managers/firewall.py
+++ b/SoftLayer/managers/firewall.py
@@ -10,7 +10,7 @@ from SoftLayer import utils
RULE_MASK = ('mask[orderValue,action,destinationIpAddress,'
'destinationIpSubnetMask,protocol,destinationPortRangeStart,'
'destinationPortRangeEnd,sourceIpAddress,sourceIpSubnetMask,'
- 'version]')
+ 'version,notes]')
def has_firewall(vlan):
|
Add notes to RULE_MASK in firewall manager (#<I>)
|
diff --git a/app/Module/TopSurnamesModule.php b/app/Module/TopSurnamesModule.php
index <HASH>..<HASH> 100644
--- a/app/Module/TopSurnamesModule.php
+++ b/app/Module/TopSurnamesModule.php
@@ -111,6 +111,10 @@ class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface
->groupBy(['surname'])
->select([new Expression('n_surname /*! COLLATE utf8_bin */ AS surname'), new Expression('count(*) AS total')])
->pluck('total', 'surname')
+ ->map(static function ($n): int {
+ // Some database drivers return numeric columns strings.
+ return (int) $n;
+ })
->all();
$all_surnames[$top_surname] = $variants;
|
Fix: #<I> - some database drivers return numeric columns as strings
|
diff --git a/ripe/atlas/sagan/__init__.py b/ripe/atlas/sagan/__init__.py
index <HASH>..<HASH> 100644
--- a/ripe/atlas/sagan/__init__.py
+++ b/ripe/atlas/sagan/__init__.py
@@ -1,6 +1,6 @@
from __future__ import absolute_import
-from .base import ResultParseError
+from .base import Result, ResultParseError
from .dns import DnsResult
from .http import HttpResult
from .ping import PingResult
|
Added Result to __init__
|
diff --git a/tests/settings.py b/tests/settings.py
index <HASH>..<HASH> 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -117,3 +117,5 @@ DJSTRIPE_WEBHOOK_VALIDATION = "verify_signature"
DJSTRIPE_WEBHOOK_SECRET = os.environ.get("DJSTRIPE_TEST_WEBHOOK_SECRET", "whsec_XXXXX")
STATIC_URL = "/static/"
+
+DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
Set DEFAULT_AUTO_FIELD in tests
|
diff --git a/src/Http/Controllers/Cms/ShowPostController.php b/src/Http/Controllers/Cms/ShowPostController.php
index <HASH>..<HASH> 100644
--- a/src/Http/Controllers/Cms/ShowPostController.php
+++ b/src/Http/Controllers/Cms/ShowPostController.php
@@ -154,6 +154,9 @@ class ShowPostController extends CmsController
// Lets check if there are any manipulators active
$collection = $this->showMutator($postTypeModel, $collection);
+ // Cleaning up the output
+ unset($collection['postmeta']);
+
// Returning the full collection
return response()->json($collection);
}
@@ -410,6 +413,7 @@ class ShowPostController extends CmsController
}
}
+ // When output is disabled, we need to remove the fields from the arrays
if(array_key_exists('output', $customField) && !$customField['output']){
unset($view[$templateKey]['customFields'][$customFieldKey]);
}
|
Cleaned up the output of the showcontroller by removing the postmeta from it.
|
diff --git a/backbone.js b/backbone.js
index <HASH>..<HASH> 100644
--- a/backbone.js
+++ b/backbone.js
@@ -711,6 +711,7 @@
// Do not add multiple models with the same `id`.
model = existing || model;
+ if (!model) continue;
if (order && (model.isNew() || !modelMap[model.id])) order.push(model);
modelMap[model.id] = true;
}
diff --git a/test/collection.js b/test/collection.js
index <HASH>..<HASH> 100644
--- a/test/collection.js
+++ b/test/collection.js
@@ -1333,6 +1333,8 @@
c.set([{id: 1}, {id: 1}]);
equal(c.length, 1);
equal(c.models.length, 1);
- });
+ // Does not run check when model is not added
+ c.set([{id: 1}], {add: false});
+ });
})();
|
Check that model exists before trying to verify uniqueness
When calling fetch with {add: false} and model does not exist in
collection, model uniqueness check tries to access id of undefined. This
verifies that model is set before checking for existing models.
|
diff --git a/lib/processMultipart.js b/lib/processMultipart.js
index <HASH>..<HASH> 100644
--- a/lib/processMultipart.js
+++ b/lib/processMultipart.js
@@ -58,14 +58,12 @@ module.exports = (options, req, res, next) => {
? tempFileHandler(options, field, filename) // Upload into temporary file.
: memHandler(options, field, filename); // Upload into RAM.
- const writePromise = getWritePromise();
- if (options.useTempFiles) {
- writePromise.catch(err => {
+ const writePromise = options.useTempFiles
+ ? getWritePromise().catch(err => {
uploadTimer.clear();
cleanup();
next(err);
- });
- }
+ }) : getWritePromise();
// Define upload timer.
const uploadTimer = new UploadTimer(options.uploadTimeout, () => {
@@ -152,10 +150,6 @@ module.exports = (options, req, res, next) => {
.then(() => {
delete req[waitFlushProperty];
next();
- }).catch(err => {
- delete req[waitFlushProperty];
- debugLog(options, `Error while waiting files flush: ${err}`);
- next(err);
});
});
|
Fixes richardgirges/express-fileupload#<I>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.