diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/mapillary_tools/exif_read.py b/mapillary_tools/exif_read.py
index <HASH>..<HASH> 100644
--- a/mapillary_tools/exif_read.py
+++ b/mapillary_tools/exif_read.py
@@ -168,8 +168,7 @@ class ExifRead:
capture_time = format_time(capture_time)
sub_sec = self.extract_subsec()
capture_time = capture_time + \
- datetime.timedelta(seconds=float(
- sub_sec) / 10**len(str(sub_sec)))
+ datetime.timedelta(seconds=float("0." + sub_sec))
return capture_time
@@ -333,7 +332,6 @@ class ExifRead:
]
sub_sec, _ = self._extract_alternative_fields(
fields, default=0, field_type=str)
- sub_sec = int(sub_sec)
return sub_sec
def fields_exist(self, fields):
|
bugfix: extract_capture_time return a wrong microsecond value
If a jpg file contains a SubSecTimeOriginal field with a value of <I>, the extract_capture_time method returns a microsecond value of <I> instead of 5
this commit correct this bug
|
diff --git a/acorn.js b/acorn.js
index <HASH>..<HASH> 100644
--- a/acorn.js
+++ b/acorn.js
@@ -700,7 +700,7 @@
// of the type given by its first argument.
case 47: // '/'
- return readToken_slash(code);
+ return readToken_slash();
case 37: case 42: // '%*'
return readToken_mult_modulo();
|
Minor: Remove unused argument from readToken_slash
Possible dev relic.
readToken_slash currently does not have any arguments and does not appear to look at arguments. All existing tests pass after removal of extraneous argument while calling readToken_slash.
|
diff --git a/js/runner.go b/js/runner.go
index <HASH>..<HASH> 100644
--- a/js/runner.go
+++ b/js/runner.go
@@ -263,11 +263,10 @@ func (r *Runner) newVU(idLocal, idGlobal uint64, samplesOut chan<- stats.SampleC
// This is here mostly so if someone tries they get a nice message
// instead of "Value is not an object: undefined ..."
- common.BindToGlobal(vu.Runtime, map[string]interface{}{
- "open": func() {
+ _ = vu.Runtime.GlobalObject().Set("open",
+ func() {
common.Throw(vu.Runtime, errors.New(openCantBeUsedOutsideInitContextMsg))
- },
- })
+ })
return vu, nil
}
|
Remove one unneeded usage of common.BindToGlobal
|
diff --git a/lib/fluent/plugin/out_splunk_hec.rb b/lib/fluent/plugin/out_splunk_hec.rb
index <HASH>..<HASH> 100644
--- a/lib/fluent/plugin/out_splunk_hec.rb
+++ b/lib/fluent/plugin/out_splunk_hec.rb
@@ -303,12 +303,12 @@ module Fluent::Plugin
t2 = Time.now
# raise Exception to utilize Fluentd output plugin retry machanism
- raise "Server error (#{response.code}) for POST #{@hec_api}, response: #{response.body}" if response.code.start_with?('5')
+ raise "Server error (#{response.code}) for POST #{@api}, response: #{response.body}" if response.code.start_with?('5')
# For both success response (2xx) and client errors (4xx), we will consume the chunk.
# Because there probably a bug in the code if we get 4xx errors, retry won't do any good.
if not response.code.start_with?('2')
- log.error "Failed POST to #{@hec_api}, response: #{response.body}"
+ log.error "Failed POST to #{@api}, response: #{response.body}"
log.debug { "Failed request body: #{post.body}" }
end
|
fix hec_api to api (#<I>)
|
diff --git a/src/LedgerWallet.js b/src/LedgerWallet.js
index <HASH>..<HASH> 100644
--- a/src/LedgerWallet.js
+++ b/src/LedgerWallet.js
@@ -171,7 +171,6 @@ class LedgerWallet {
// This is fishy but currently ledger library always returns empty
// resolved promise when closing connection so there is no point in
// doing anything with returned Promise.
- // noinspection JSIgnoredPromiseFromCall
await this.closeLedgerConnection(eth);
}
}
@@ -246,7 +245,6 @@ class LedgerWallet {
// This is fishy but currently ledger library always returns empty
// resolved promise when closing connection so there is no point in
// doing anything with returned Promise.
- // noinspection JSIgnoredPromiseFromCall
await this.closeLedgerConnection(eth);
}
}
|
Remove InteliJ specific linting setting
|
diff --git a/src/Deploy/GitHubDeploy.php b/src/Deploy/GitHubDeploy.php
index <HASH>..<HASH> 100644
--- a/src/Deploy/GitHubDeploy.php
+++ b/src/Deploy/GitHubDeploy.php
@@ -141,8 +141,7 @@ class GitHubDeploy extends DeployBase
if ($this->gitRemoteBranchExist()) {
$stack
->exec('fetch --all')
- ->exec("reset --soft {$origin}/{$branch}")
- ->checkout($branch);
+ ->exec("reset --soft {$origin}/{$branch}");
}
} else {
$stack
|
#<I>: Remove the git checkout after the reset, as it's not truely needed.
|
diff --git a/salt/cloud/clouds/msazure.py b/salt/cloud/clouds/msazure.py
index <HASH>..<HASH> 100644
--- a/salt/cloud/clouds/msazure.py
+++ b/salt/cloud/clouds/msazure.py
@@ -528,9 +528,9 @@ def create(vm_):
conn.create_virtual_machine_deployment(**vm_kwargs)
except WindowsAzureConflictError:
log.debug("Conflict error. The deployment may already exist, trying add_role")
- # Deleting two useless keywords
- del vm_kwargs["deployment_slot"]
- del vm_kwargs["label"]
+ # Deleting two useless keywords
+ del vm_kwargs['deployment_slot']
+ del vm_kwargs['label']
conn.add_role(**vm_kwargs)
except Exception as exc:
error = 'The hosted service name is invalid.'
|
lint (and single quotes when I see them :) )
|
diff --git a/lib/https/index.js b/lib/https/index.js
index <HASH>..<HASH> 100644
--- a/lib/https/index.js
+++ b/lib/https/index.js
@@ -105,6 +105,12 @@ function handleWebsocket(socket, clientIp, callback) {
if (filter.rule) {
plugin = null;
}
+ if (!_rules.host) {
+ var _pluginRules = rulesMgr.resolveRules(fullUrl);
+ if (_pluginRules.host) {
+ _rules.host = _pluginRules.host;
+ }
+ }
Object.keys(filter).forEach(function(name) {
delete _rules[name];
});
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -51,6 +51,12 @@ function tunnelProxy(server, proxy) {
if (rulesMgr) {
extend(filter, rulesMgr.resolveFilter(tunnelUrl));
extend(disable, rulesMgr.resolveDisable(tunnelUrl));
+ if (!_rules.host) {
+ var _pluginRules = rulesMgr.resolveRules(fullUrl);
+ if (_pluginRules.host) {
+ _rules.host = _pluginRules.host;
+ }
+ }
Object.keys(filter).forEach(function(name) {
delete _rules[name];
});
|
refactor: show plugins rules in overview
|
diff --git a/blkn/src/index.js b/blkn/src/index.js
index <HASH>..<HASH> 100644
--- a/blkn/src/index.js
+++ b/blkn/src/index.js
@@ -1,5 +1,8 @@
// @flow
export { default as Button } from "./Button";
-export { default as Input } from "./Input";
+export { default as InputText } from "./InputText";
export { default as Typography } from "./Typography";
+export { default as Header } from "./Container/Header";
+export { default as Section } from "./Container/Section";
+export { default as Loader } from "./Loader";
|
BLKN: Add more exports to index.js
|
diff --git a/tensorlayer/layers/recurrent.py b/tensorlayer/layers/recurrent.py
index <HASH>..<HASH> 100644
--- a/tensorlayer/layers/recurrent.py
+++ b/tensorlayer/layers/recurrent.py
@@ -247,10 +247,8 @@ class RNN(Layer):
"but got an actual length of a sequence %d" % i
)
- '''
- Since sequence_length is not passed into computational graph when build a static model, we force sequence_length to be not None to get dynamic RNN.
- We test this code that sequence_length is not passed to the model whatever it is, which induce a lower accuracy for training and validation
- '''
+ # Since sequence_length is not passed into computational graph when build a static model, we force sequence_length to be not None to get dynamic RNN.
+ # We test this code that sequence_length is not passed to the model whatever it is, which induce a lower accuracy for training and validation
sequence_length = tl.layers.retrieve_seq_length_op3(inputs)
sequence_length = [i - 1 if i >= 1 else 0 for i in sequence_length]
|
Update recurrent.py
fix yapf
|
diff --git a/audioread/ffdec.py b/audioread/ffdec.py
index <HASH>..<HASH> 100644
--- a/audioread/ffdec.py
+++ b/audioread/ffdec.py
@@ -70,6 +70,8 @@ class QueueReaderThread(threading.Thread):
# Stream closed (EOF).
break
+# Windows error switch is global, we need a lock to ensure thread safety
+windows_error_mode_lock = threading.Lock()
class FFmpegAudioFile(object):
"""An audio file decoded by the ffmpeg command-line utility."""
@@ -79,6 +81,7 @@ class FFmpegAudioFile(object):
# disables this behavior.
windows = sys.platform.startswith("win")
if windows:
+ windows_error_mode_lock.acquire()
SEM_NOGPFAULTERRORBOX = 0x0002
import ctypes
# We call SetErrorMode in two steps to avoid overriding
@@ -103,9 +106,11 @@ class FFmpegAudioFile(object):
# back now because the flag was inherited by the subprocess;
# we don't need to keep it set in the parent process.)
if windows:
- import ctypes
- ctypes.windll.kernel32.SetErrorMode(previous_error_mode)
-
+ try:
+ import ctypes
+ ctypes.windll.kernel32.SetErrorMode(previous_error_mode)
+ finally:
+ windows_error_mode_lock.release()
# Start another thread to consume the standard output of the
# process, which contains raw audio data.
self.stdout_reader = QueueReaderThread(self.proc.stdout, block_size)
|
ensure thread safety for SetErrorMode
|
diff --git a/lib/will_paginate/view_helpers.rb b/lib/will_paginate/view_helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/will_paginate/view_helpers.rb
+++ b/lib/will_paginate/view_helpers.rb
@@ -140,7 +140,7 @@ module WillPaginate
end
def self.total_pages_for_collection(collection) #:nodoc:
- if collection.respond_to? :page_count and !collection.respond_to? :total_pages
+ if collection.respond_to?('page_count') and !collection.respond_to?('total_pages')
WillPaginate::Deprecation.warn <<-MSG
You are using a paginated collection of class #{collection.class.name}
which conforms to the old API of WillPaginate::Collection by using
|
use strings in "respond_to?" calls to work around a bug in acts_as_ferret stable (ugh)
|
diff --git a/smartmin/views.py b/smartmin/views.py
index <HASH>..<HASH> 100644
--- a/smartmin/views.py
+++ b/smartmin/views.py
@@ -46,7 +46,6 @@ class SmartView(object):
exclude = None
field_config = {}
title = None
- permission = None
refresh = 0
template_name = None
@@ -82,7 +81,7 @@ class SmartView(object):
self.args = args
self.request = request
- if not self.permission:
+ if not getattr(self, 'permission', None):
return True
else:
# first check our anonymous permissions
@@ -118,7 +117,7 @@ class SmartView(object):
if obj_getter:
obj = obj_getter()
if obj:
- return self.request.user.has_perm(self.permission, obj)
+ return self.request.user.has_perm(getattr(self, 'permission', None), obj)
def dispatch(self, request, *args, **kwargs):
"""
|
Handled the permission for actions inheritance issue
|
diff --git a/sprd/model/Product.js b/sprd/model/Product.js
index <HASH>..<HASH> 100644
--- a/sprd/model/Product.js
+++ b/sprd/model/Product.js
@@ -24,7 +24,11 @@ define(['sprd/model/ProductBase', 'js/core/List', 'sprd/data/ConfigurationTypeRe
type: Price,
generated: true
},
- creator: String
+ creator: String,
+ templateId: {
+ type: String,
+ required: false
+ }
},
defaults: {
|
DEV-<I> - Tracking to identify how many templates are sold
|
diff --git a/forms/UploadField.php b/forms/UploadField.php
index <HASH>..<HASH> 100644
--- a/forms/UploadField.php
+++ b/forms/UploadField.php
@@ -933,8 +933,8 @@ class UploadField extends FileField {
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js');
- Requirements::javascript(FRAMEWORK_DIR . '/javascript/i18n.js');
Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/javascript/ssui.core.js');
+ Requirements::add_i18n_javascript(FRAMEWORK_DIR . '/javascript/lang');
Requirements::combine_files('uploadfield.js', array(
// @todo jquery templates is a project no longer maintained and should be retired at some point.
|
Correct JS i<I>n in UploadField (fixes #<I>)
|
diff --git a/htdocs/js/console.js b/htdocs/js/console.js
index <HASH>..<HASH> 100644
--- a/htdocs/js/console.js
+++ b/htdocs/js/console.js
@@ -42,6 +42,8 @@ function getAlerts(service, filter, refresh) {
var sev_id = '#' + service;
+ val.severityCounts.normal = val.severityCounts.normal + val.severityCounts.inform;
+
$.each(val.severityCounts, function(sev, count) {
$(sev_id + "-" + sev).text(count);
|
Inform alerts now contribute to Normal count in console
|
diff --git a/registry/consul/watcher.go b/registry/consul/watcher.go
index <HASH>..<HASH> 100644
--- a/registry/consul/watcher.go
+++ b/registry/consul/watcher.go
@@ -224,9 +224,14 @@ func (cw *consulWatcher) handle(idx uint64, data interface{}) {
cw.RUnlock()
// remove unknown services from registry
+ // save the things we want to delete
+ deleted := make(map[string][]*registry.Service)
+
for service, _ := range rservices {
if _, ok := services[service]; !ok {
cw.Lock()
+ // save this before deleting
+ deleted[service] = cw.services[service]
delete(cw.services, service)
cw.Unlock()
}
@@ -237,6 +242,11 @@ func (cw *consulWatcher) handle(idx uint64, data interface{}) {
if _, ok := services[service]; !ok {
w.Stop()
delete(cw.watchers, service)
+ for _, oldService := range deleted[service] {
+ // send a delete for the service nodes that we're removing
+ cw.next <- ®istry.Result{Action: "delete", Service: oldService}
+ }
+ // sent the empty list as the last resort to indicate to delete the entire service
cw.next <- ®istry.Result{Action: "delete", Service: ®istry.Service{Name: service}}
}
}
|
Return the dead node when deleting the service
|
diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js
index <HASH>..<HASH> 100755
--- a/plugin/markdown/markdown.js
+++ b/plugin/markdown/markdown.js
@@ -171,7 +171,7 @@
// flatten the hierarchical stack, and insert <section data-markdown> tags
for( var i = 0, len = sectionStack.length; i < len; i++ ) {
// vertical
- if( sectionStack[i].propertyIsEnumerable( 'length' ) && typeof sectionStack[i].splice === 'function' ) {
+ if( sectionStack[i] instanceof Array ) {
markdownSections += '<section '+ options.attributes +'>';
sectionStack[i].forEach( function( child ) {
|
better check for arrays in markdown plugin
|
diff --git a/src/com/esotericsoftware/reflectasm/AccessClassLoader.java b/src/com/esotericsoftware/reflectasm/AccessClassLoader.java
index <HASH>..<HASH> 100644
--- a/src/com/esotericsoftware/reflectasm/AccessClassLoader.java
+++ b/src/com/esotericsoftware/reflectasm/AccessClassLoader.java
@@ -10,11 +10,15 @@ class AccessClassLoader extends ClassLoader {
static AccessClassLoader get (Class type) {
ClassLoader parent = type.getClassLoader();
- for (int i = 0, n = accessClassLoaders.size(); i < n; i++) {
- AccessClassLoader accessClassLoader = accessClassLoaders.get(i);
- if (accessClassLoader.getParent() == parent) return accessClassLoader;
+ synchronized (accessClassLoaders) {
+ for (int i = 0, n = accessClassLoaders.size(); i < n; i++) {
+ AccessClassLoader accessClassLoader = accessClassLoaders.get(i);
+ if (accessClassLoader.getParent() == parent) return accessClassLoader;
+ }
+ AccessClassLoader accessClassLoader = new AccessClassLoader(parent);
+ accessClassLoaders.add(accessClassLoader);
+ return accessClassLoader;
}
- return new AccessClassLoader(parent);
}
private AccessClassLoader (ClassLoader parent) {
|
Fixed issue 6, AccessClassLoader not tracking instances properly, not synchronized.
|
diff --git a/packages/puppeteer-extra-plugin-stealth/evasions/user-agent-override/index.test.js b/packages/puppeteer-extra-plugin-stealth/evasions/user-agent-override/index.test.js
index <HASH>..<HASH> 100644
--- a/packages/puppeteer-extra-plugin-stealth/evasions/user-agent-override/index.test.js
+++ b/packages/puppeteer-extra-plugin-stealth/evasions/user-agent-override/index.test.js
@@ -37,7 +37,7 @@ test('vanilla: navigator.platform set to host platform', async t => {
const platform = await page.evaluate(() => navigator.platform)
switch (process.platform) {
case 'linux':
- t.true(platform === 'Linux')
+ t.true(platform.includes('Linux')) // TravisCI
break
case 'darwin':
t.true(platform === 'MacIntel')
|
chore(plugin-stealth): Fix tests for TravisCI
|
diff --git a/lib/gym/detect_values.rb b/lib/gym/detect_values.rb
index <HASH>..<HASH> 100644
--- a/lib/gym/detect_values.rb
+++ b/lib/gym/detect_values.rb
@@ -24,6 +24,8 @@ module Gym
config.load_configuration_file(Gym.gymfile_name)
end
+ config[:use_legacy_build_api] = true if Xcode.pre_7?
+
detect_scheme
detect_platform # we can only do that *after* we have the scheme
detect_configuration
diff --git a/lib/gym/generators/package_command_generator.rb b/lib/gym/generators/package_command_generator.rb
index <HASH>..<HASH> 100644
--- a/lib/gym/generators/package_command_generator.rb
+++ b/lib/gym/generators/package_command_generator.rb
@@ -26,7 +26,7 @@ module Gym
# The generator we need to use for the currently used Xcode version
def generator
- if Xcode.pre_7? or Gym.config[:use_legacy_build_api]
+ if Gym.config[:use_legacy_build_api]
PackageCommandGeneratorLegacy
else
PackageCommandGeneratorXcode7
|
Automatic setting of legacy_build_api when using an old version of Xcode
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -67,7 +67,7 @@ export default function PrerenderLoader (content) {
// @note: this is only used when the entry module exports a String or function
// that resolves to a String, otherwise the whole document is serialized.
let inject = false;
- if (!this.request.match(/.(js|ts)x?$/i)) {
+ if (!this.request.match(/\.(js|ts)x?$/i)) {
const matches = content.match(PRERENDER_REG);
if (matches) {
inject = true;
|
Fix detection of if the loaded resource can be a JSDOM template
Previous regexp has an unescaped dot at the beginning (`/.(js|ts)x?$/i`) and this regexp matched against files .ejs, that are actually html.
|
diff --git a/dependencies/_operation.py b/dependencies/_operation.py
index <HASH>..<HASH> 100644
--- a/dependencies/_operation.py
+++ b/dependencies/_operation.py
@@ -6,6 +6,8 @@ from .exceptions import DependencyError
def operation(function):
"""FIXME: Write a docstring."""
+ if inspect.isclass(function):
+ raise DependencyError("'operation' decorator can not be used on classes")
__init__ = make_init(function)
return type("Operation", (object,), {"__init__": __init__, "__call__": __call__})
diff --git a/tests/test_operation.py b/tests/test_operation.py
index <HASH>..<HASH> 100644
--- a/tests/test_operation.py
+++ b/tests/test_operation.py
@@ -31,6 +31,21 @@ def test_protect_against_self():
assert str(exc_info.value) == "'operation' decorator can not be used on methods"
+def test_protect_against_classes():
+ """
+ Deny to decorate classes with operation. Classes are injectable
+ itself.
+ """
+
+ with pytest.raises(DependencyError) as exc_info:
+
+ @operation
+ class Foo(object):
+ pass
+
+ assert str(exc_info.value) == "'operation' decorator can not be used on classes"
+
+
# TODO: Raise exception if we try to decorate a class.
#
# TODO: Operation representation with the name of the function.
|
Deny operation decorator against classes.
|
diff --git a/lib/spade.js b/lib/spade.js
index <HASH>..<HASH> 100644
--- a/lib/spade.js
+++ b/lib/spade.js
@@ -218,12 +218,8 @@ exports.Spade = ( function () {
return cocker.bye();
}
me.emit( 'authorized', password, reply, address );
- if ( ~ db ) {
- // db === -1, on reconnection no SELECT.
- processCommandQueue( address );
- } else {
- sendSelect( address, db );
- }
+ // when db === -1, on reconnection send no SELECT.
+ return ~ db ? processCommandQueue( address ) : sendSelect( address, db );
}
, auth = encode( 'AUTH', password, null, onAuthReply );
// set special command shortcut
|
less code for sendAuth..
On branch master
modified: lib/spade.js
|
diff --git a/classes/Boom/Model/Page/Version.php b/classes/Boom/Model/Page/Version.php
index <HASH>..<HASH> 100644
--- a/classes/Boom/Model/Page/Version.php
+++ b/classes/Boom/Model/Page/Version.php
@@ -165,6 +165,8 @@ class Boom_Model_Page_Version extends ORM
->set('published', TRUE)
->set('embargoed_until', $time)
->save();
+
+ return $this;
}
/**
|
Bugfix: Model_Page_Version::embargo() wasn't returning itself
|
diff --git a/src/GAuth/Auth.php b/src/GAuth/Auth.php
index <HASH>..<HASH> 100644
--- a/src/GAuth/Auth.php
+++ b/src/GAuth/Auth.php
@@ -56,7 +56,7 @@ class Auth
{
$this->buildLookup();
- if ($initKey !== false) {
+ if ($initKey !== null) {
$this->setInitKey($initKey);
}
}
|
fixing check for init key inside constructor
|
diff --git a/test/unit/access-suite.js b/test/unit/access-suite.js
index <HASH>..<HASH> 100644
--- a/test/unit/access-suite.js
+++ b/test/unit/access-suite.js
@@ -5,8 +5,8 @@ define(['requirejs', 'fs'], function(requirejs, fs, undefined) {
var suites = [];
suites.push({
- name: "util.js tests",
- desc: "a collection of tests for util.js",
+ name: "access",
+ desc: "access knows all about the scope we claimed and which paths that gives us access to",
setup: function(env, test) {
requirejs(['./src/lib/access'], function(Access) {
env.Access = Access;
|
access tests: corrected name & desc
|
diff --git a/lib/scrolls/log.rb b/lib/scrolls/log.rb
index <HASH>..<HASH> 100644
--- a/lib/scrolls/log.rb
+++ b/lib/scrolls/log.rb
@@ -245,13 +245,7 @@ module Scrolls
def write(data)
if log_level_ok?(data[:level])
msg = unparse(data)
- mtx.synchronize do
- begin
- stream.puts(msg)
- rescue NoMethodError => e
- raise
- end
- end
+ stream.print(msg + "\n")
end
end
|
print is atomic instead of mutex so it works in threaded environs
|
diff --git a/malcolm/modules/excalibur/parts/femdriverpart.py b/malcolm/modules/excalibur/parts/femdriverpart.py
index <HASH>..<HASH> 100644
--- a/malcolm/modules/excalibur/parts/femdriverpart.py
+++ b/malcolm/modules/excalibur/parts/femdriverpart.py
@@ -10,4 +10,4 @@ class FemDriverPart(StatefulChildPart):
def report_configuration(self, context):
child = context.block_view(self.params.mri)
return [
- NDArrayDatasetInfo(rank=2), UniqueIdInfo(child.arrayCounterReadback.value)]
+ NDArrayDatasetInfo(rank=2), UniqueIdInfo(child.arrayCounter.value)]
|
Made excalibur fem driver use array counter rather than readback since it deals with config, not state
|
diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb
index <HASH>..<HASH> 100644
--- a/lib/jekyll/page.rb
+++ b/lib/jekyll/page.rb
@@ -64,7 +64,7 @@ module Jekyll
return @url if @url
url = if permalink
- if uses_relative_permalinks
+ if site.config['relative_permalinks']
File.join(@dir, permalink)
else
permalink
|
Use site config to determine whether permalinks should be relative.
|
diff --git a/main/core/Controller/FileController.php b/main/core/Controller/FileController.php
index <HASH>..<HASH> 100644
--- a/main/core/Controller/FileController.php
+++ b/main/core/Controller/FileController.php
@@ -274,7 +274,7 @@ class FileController extends AbstractApiController
private function stream(ResourceNode $resourceNode)
{
//temporary because otherwise injected resource must have the "open" right
- $this->checkPermission('OPEN', new ResourceCollection([$resourceNode]), [], true);
+ $this->checkPermission('OPEN', $resourceNode, [], true);
// free the session as soon as possible
// see https://github.com/claroline/CoreBundle/commit/7cee6de85bbc9448f86eb98af2abb1cb072c7b6b
|
Fixes permissions for file streaming (#<I>)
|
diff --git a/shoebot/core/nodebox.py b/shoebot/core/nodebox.py
index <HASH>..<HASH> 100644
--- a/shoebot/core/nodebox.py
+++ b/shoebot/core/nodebox.py
@@ -535,7 +535,7 @@ class NodeBot(Bot):
else:
return txt
- def textpath(self, txt, x, y, width=None, height=1000000, draw=True, **kwargs):
+ def textpath(self, txt, x, y, width=None, height=1000000, draw=False, **kwargs):
'''
Draws an outlined path of the input text
'''
|
set default in textpath() to 'draw=False'
via shoebot main branch - hv_francesco
|
diff --git a/test/unit/plugins/guests/suse/cap/change_host_name_test.rb b/test/unit/plugins/guests/suse/cap/change_host_name_test.rb
index <HASH>..<HASH> 100644
--- a/test/unit/plugins/guests/suse/cap/change_host_name_test.rb
+++ b/test/unit/plugins/guests/suse/cap/change_host_name_test.rb
@@ -22,13 +22,14 @@ describe "VagrantPlugins::GuestSUSE::Cap::ChangeHostName" do
let(:cap) { caps.get(:change_host_name) }
let(:name) { "banana-rama.example.com" }
+ let(:basename) { "banana-rama" }
it "sets the hostname" do
comm.stub_command("hostname -f | grep '^#{name}$'", exit_code: 1)
cap.change_host_name(machine, name)
- expect(comm.received_commands[1]).to match(/echo '#{name}' > \/etc\/HOSTNAME/)
- expect(comm.received_commands[1]).to match(/hostname '#{name}'/)
+ expect(comm.received_commands[1]).to match(/echo '#{basename}' > \/etc\/HOSTNAME/)
+ expect(comm.received_commands[1]).to match(/hostname '#{basename}'/)
end
it "does not change the hostname if already set" do
|
Adjusted test to work with new implementation
|
diff --git a/examples/sampleserver.py b/examples/sampleserver.py
index <HASH>..<HASH> 100644
--- a/examples/sampleserver.py
+++ b/examples/sampleserver.py
@@ -71,8 +71,12 @@ class ConcreteServer(OpenIDServer):
'openid.identity': req.identity,
'openid.trust_root': req.trust_root,
'openid.return_to': req.return_to,
- 'openid.assoc_handle': req.assoc_handle,
}
+
+ assoc_handle = req.get('assoc_handle')
+ if assoc_handle is not None:
+ args['openid.assoc_handle'] = req.assoc_handle
+
return append_args(addr + '?action=openid', args)
def get_setup_response(self, req):
|
[project @ Fix bug in sample server.]
|
diff --git a/src/test/java/io/github/bonigarcia/wdm/test/watcher/DisableCspFirefoxTest.java b/src/test/java/io/github/bonigarcia/wdm/test/watcher/DisableCspFirefoxTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/io/github/bonigarcia/wdm/test/watcher/DisableCspFirefoxTest.java
+++ b/src/test/java/io/github/bonigarcia/wdm/test/watcher/DisableCspFirefoxTest.java
@@ -36,12 +36,12 @@ class DisableCspFirefoxTest {
static final Logger log = getLogger(lookup().lookupClass());
- WebDriverManager wdm;
+ WebDriverManager wdm = WebDriverManager.firefoxdriver().watch()
+ .disableCsp();
WebDriver driver;
@BeforeEach
void setup() {
- wdm = WebDriverManager.firefoxdriver().watch().disableCsp();
driver = wdm.create();
}
|
Change logic for creating wdm in watch test
|
diff --git a/src/Extension/ProductVariationsExtension.php b/src/Extension/ProductVariationsExtension.php
index <HASH>..<HASH> 100644
--- a/src/Extension/ProductVariationsExtension.php
+++ b/src/Extension/ProductVariationsExtension.php
@@ -208,7 +208,9 @@ class ProductVariationsExtension extends DataExtension
)->innerJoin(
'SilverShop_Variation',
'"SilverShop_Variation_AttributeValues"."SilverShop_VariationID" = "SilverShop_Variation"."ID"'
- )->where("TypeID = $type AND \"SilverShop_Variation\".\"ProductID\" = " . $this->owner->ID);
+ )->where(
+ "TypeID = $type AND \"SilverShop_Variation\".\"ProductID\" = " . $this->owner->ID
+ )->sort('"SilverShop_Variation"."Sort" ASC');
if (!Product::config()->allow_zero_price) {
$list = $list->where('"SilverShop_Variation"."Price" > 0');
|
Use the sort as defined in the variation (#<I>)
|
diff --git a/hbmqtt/broker.py b/hbmqtt/broker.py
index <HASH>..<HASH> 100644
--- a/hbmqtt/broker.py
+++ b/hbmqtt/broker.py
@@ -370,7 +370,7 @@ class Broker:
if client_session.clean_session:
# Delete existing session and create a new one
- if client_session.client_id is not None:
+ if client_session.client_id is not None and client_session.client_id != "":
self.delete_session(client_session.client_id)
else:
client_session.client_id = gen_client_id()
|
correctly handle CONNECT with zero-length client_id
Zero-length client_ids in CONNECT packets show up in the payload as empty strings, not None; the broker should generate a new id for these connections.
|
diff --git a/tests/test_main.py b/tests/test_main.py
index <HASH>..<HASH> 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -40,6 +40,9 @@ class TestIdentifyVcs(unittest.TestCase):
identify_vcs(repo_url)
self.assertEqual(identify_vcs(repo_url, guess=True), "hg")
+ repo_url = "https://pydanny@bitbucket.org/pydanny/static"
+ self.assertEqual(identify_vcs(repo_url, guess=True), "hg")
+
def test_svn(self):
# easy check
repo_url = "http://svn.code.sf.net/p/docutils/code/trunk"
|
added bitbucket case to tests. Close #1
|
diff --git a/salt/states/archive.py b/salt/states/archive.py
index <HASH>..<HASH> 100644
--- a/salt/states/archive.py
+++ b/salt/states/archive.py
@@ -7,6 +7,7 @@ Archive states.
import logging
import os
import tarfile
+from contextlib import closing
log = logging.getLogger(__name__)
@@ -131,7 +132,7 @@ def extracted(name,
files = __salt__['archive.un{0}'.format(archive_format)](filename, name)
else:
if tar_options is None:
- with tarfile.open(filename, 'r') as tar:
+ with closing(tarfile.open(filename, 'r')) as tar:
files = tar.getnames()
tar.extractall(name)
else:
|
Using a closing context with the with block
|
diff --git a/lib/chronuscop_client/railtie.rb b/lib/chronuscop_client/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/chronuscop_client/railtie.rb
+++ b/lib/chronuscop_client/railtie.rb
@@ -21,6 +21,9 @@ module ChronuscopClient
# reading the YAML file (app/config/chronuscop.yml)
ChronuscopClient.configuration_object.load_yaml_configuration
+ # Setting the I18n backend for the rails application.
+ I18n.backend = I18n::Backend::KeyValue.new(Redis.new(:db => ChronuscopClient.configuration_object.redis_db_number))
+
# creating a new synchronizer object.
ChronuscopClient.synchronizer_object = ChronuscopClient::Synchronizer.new(ChronuscopClient.configuration_object.redis_db_number)
ChronuscopClient.synchronizer_object.start
|
Finished setting the I<I>n backend in the gem.
|
diff --git a/packages/xod-fs/src/utils.js b/packages/xod-fs/src/utils.js
index <HASH>..<HASH> 100644
--- a/packages/xod-fs/src/utils.js
+++ b/packages/xod-fs/src/utils.js
@@ -10,25 +10,21 @@ export const resolvePath = R.compose(
);
// :: string -> boolean
-export const isDirectoryExists = R.compose(
- R.tryCatch(
- R.compose(
- R.invoker(0, 'isDirectory'),
- fs.statSync
- ),
- R.F
+export const isDirectoryExists = R.tryCatch(
+ R.compose(
+ R.invoker(0, 'isDirectory'),
+ fs.statSync,
+ resolvePath
),
- resolvePath
+ R.F
);
// :: string -> boolean
-export const isFileExists = R.compose(
- R.tryCatch(
- R.compose(
- R.invoker(0, 'isFile'),
- fs.statSync
- ),
- R.F
+export const isFileExists = R.tryCatch(
+ R.compose(
+ R.invoker(0, 'isFile'),
+ fs.statSync,
+ resolvePath
),
- resolvePath
+ R.F
);
|
refactor(xod-fs): refactor `isFileExists` and `isDirectoryExists` functions
|
diff --git a/playground/examples/tidal.js b/playground/examples/tidal.js
index <HASH>..<HASH> 100644
--- a/playground/examples/tidal.js
+++ b/playground/examples/tidal.js
@@ -50,7 +50,7 @@ drums.tidal( '[kd ch]*2 sd [kd*2 sd] oh' )
// pattern to alternate which member is played.
drums.tidal( '< kd sd kd oh > ch*2' )
-// we can use thte {} brackets to play two
+// we can use 'curly' {} brackets to play two
// sounds at once
drums.tidal( '< kd sd kd {oh,kd} > ch*2' )
|
Replacing a misspelled word with an alternative
|
diff --git a/lib/bot.js b/lib/bot.js
index <HASH>..<HASH> 100644
--- a/lib/bot.js
+++ b/lib/bot.js
@@ -154,7 +154,7 @@ module.exports = ( function () {
const self = this,
logInCallback = function ( err, data ) {
- if (data == null) {
+ if (data === null || typeof data === 'undefined') {
self.error('Logging in failed: no data received');
callback(err || new Error(`Logging in failed: no data received`));
} else if ( !err && typeof data.lgusername !== 'undefined' ) {
|
Changed to long-form null/undefined check
|
diff --git a/bin/obfuscate_pwd.rb b/bin/obfuscate_pwd.rb
index <HASH>..<HASH> 100755
--- a/bin/obfuscate_pwd.rb
+++ b/bin/obfuscate_pwd.rb
@@ -1,9 +1,9 @@
#!/usr/bin/env ruby
-require File.join(File.dirname(__FILE__),"..","lib","birst_command")
+require "birst_command"
-begin
- puts Obfuscate.obfuscate(ARGV[0])
-rescue
+if ARGV[0]
+ puts Birst_Command::Obfuscate.obfuscate(ARGV[0])
+else
puts "USAGE: ./obfuscate_pwd <plaintxt password>"
end
diff --git a/lib/birst_command/version.rb b/lib/birst_command/version.rb
index <HASH>..<HASH> 100644
--- a/lib/birst_command/version.rb
+++ b/lib/birst_command/version.rb
@@ -1,3 +1,3 @@
module Birst_Command
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
|
BugFix: obfuscate_pwd was not working when bundled as gem
Need to require 'birst_command'
|
diff --git a/lib/ashton/version.rb b/lib/ashton/version.rb
index <HASH>..<HASH> 100644
--- a/lib/ashton/version.rb
+++ b/lib/ashton/version.rb
@@ -1,3 +1,3 @@
module Ashton
- VERSION = "0.1.1"
+ VERSION = "0.1.3"
end
|
Updated version so I could push a new copy of the gem
|
diff --git a/api/query.go b/api/query.go
index <HASH>..<HASH> 100644
--- a/api/query.go
+++ b/api/query.go
@@ -1,6 +1,7 @@
package api
import (
+ "code.google.com/p/gorest"
"github.com/matttproud/prometheus/rules"
"github.com/matttproud/prometheus/rules/ast"
"time"
@@ -13,9 +14,15 @@ func (serv MetricsService) Query(Expr string, Json string, Start string, End str
timestamp := time.Now()
- format := ast.TEXT
+ rb := serv.ResponseBuilder()
+ var format ast.OutputFormat
if Json != "" {
format = ast.JSON
+ rb.SetContentType(gorest.Application_Json)
+ } else {
+ format = ast.TEXT
+ rb.SetContentType(gorest.Text_Plain)
}
+
return ast.EvalToString(exprNode, ×tamp, format)
}
|
Set correct Content-Type header based on output format.
|
diff --git a/source/rafcon/mvc/selection.py b/source/rafcon/mvc/selection.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/mvc/selection.py
+++ b/source/rafcon/mvc/selection.py
@@ -67,6 +67,9 @@ class Selection(Observable):
def __len__(self):
return len(self.__selected)
+ def __contains__(self, item):
+ return item in self.__selected
+
def __getitem__(self, key):
return [s for s in self.__selected][key]
|
Add __contains__ method to Selection class
With this, one can write "if model in selection" instead of having to
write "if model in selection.get_all()"
|
diff --git a/client/js/Panels/DiagramDesigner/ModelEditor/ModelEditorControl.DiagramDesignerWidgetEventHandlers.js b/client/js/Panels/DiagramDesigner/ModelEditor/ModelEditorControl.DiagramDesignerWidgetEventHandlers.js
index <HASH>..<HASH> 100644
--- a/client/js/Panels/DiagramDesigner/ModelEditor/ModelEditorControl.DiagramDesignerWidgetEventHandlers.js
+++ b/client/js/Panels/DiagramDesigner/ModelEditor/ModelEditorControl.DiagramDesignerWidgetEventHandlers.js
@@ -181,6 +181,10 @@ define(['logManager',
registry[nodePropertyNames.Registry.lineStyle] = {};
_.extend(registry[nodePropertyNames.Registry.lineStyle], this._DEFAULT_LINE_STYLE);
+ if (params.visualStyle) {
+ _.extend(registry[nodePropertyNames.Registry.lineStyle], params.visualStyle);
+ }
+
var p = { "parentId": this.currentNodeInfo.id,
"sourceId": sourceId,
"targetId": targetId,
|
connections visual props are saved on creation (if any)
Former-commit-id: 0f0a7dfb<I>cfc1a6d<I>d<I>ad<I>e<I>d<I>fab
|
diff --git a/squad/core/comparison.py b/squad/core/comparison.py
index <HASH>..<HASH> 100644
--- a/squad/core/comparison.py
+++ b/squad/core/comparison.py
@@ -174,7 +174,7 @@ class TestComparison(BaseComparison):
).prefetch_related(
'build',
'environment',
- ).only('id')
+ ).only('build', 'environment')
test_runs_ids = {}
for test_run in test_runs:
|
core: comparison: fix fetching less data from testrun
This fixes dd<I>a8cb<I>d<I>e<I>b6a9f7a<I>fe0a<I>, which attempted
to prevent unnecessary data from loading. I assumed that Django would
still prefetch "build" and "environment", but it didn't. This caused
collateral unnecessary load of same build and environment.
This explicitly says that only build, environment and id are fetched from
the db
|
diff --git a/lib/discordrb/commands/command_bot.rb b/lib/discordrb/commands/command_bot.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/commands/command_bot.rb
+++ b/lib/discordrb/commands/command_bot.rb
@@ -172,6 +172,7 @@ module Discordrb::Commands
# @return [String, nil] the command's result, if there is any.
def execute_command(name, event, arguments, chained = false)
debug("Executing command #{name} with arguments #{arguments}")
+ return unless @commands
command = @commands[name]
unless command
event.respond @attributes[:command_doesnt_exist_message].gsub('%command%', name.to_s) if @attributes[:command_doesnt_exist_message]
|
Do a nil check against a CommandBot's commands in execute_command
|
diff --git a/src/Ratchet/Http/Guzzle/Http/Message/RequestFactory.php b/src/Ratchet/Http/Guzzle/Http/Message/RequestFactory.php
index <HASH>..<HASH> 100644
--- a/src/Ratchet/Http/Guzzle/Http/Message/RequestFactory.php
+++ b/src/Ratchet/Http/Guzzle/Http/Message/RequestFactory.php
@@ -4,6 +4,23 @@ use Guzzle\Http\Message\RequestFactory as GuzzleRequestFactory;
use Guzzle\Http\EntityBody;
class RequestFactory extends GuzzleRequestFactory {
+
+ protected static $ratchetInstance;
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getInstance()
+ {
+ // @codeCoverageIgnoreStart
+ if (!static::$ratchetInstance) {
+ static::$ratchetInstance = new static();
+ }
+ // @codeCoverageIgnoreEnd
+
+ return static::$ratchetInstance;
+ }
+
/**
* {@inheritdoc}
*/
|
This modification gives Ratchet its own RequestFactory instance.
This way you can use guzzle as REST Client.
|
diff --git a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java
index <HASH>..<HASH> 100644
--- a/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java
+++ b/java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java
@@ -651,7 +651,7 @@ public class WorkflowTemplateServiceClient implements BackgroundResource {
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- private final WorkflowTemplate updateWorkflowTemplate(UpdateWorkflowTemplateRequest request) {
+ public final WorkflowTemplate updateWorkflowTemplate(UpdateWorkflowTemplateRequest request) {
return updateWorkflowTemplateCallable().call(request);
}
|
Regenerate clients (#<I>)
|
diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py
index <HASH>..<HASH> 100644
--- a/src/aks-preview/setup.py
+++ b/src/aks-preview/setup.py
@@ -8,7 +8,7 @@
from codecs import open as open1
from setuptools import setup, find_packages
-VERSION = "0.4.50"
+VERSION = "0.4.51"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
|
aks-preview: version bump (#<I>)
|
diff --git a/src/scs_core/data/json.py b/src/scs_core/data/json.py
index <HASH>..<HASH> 100644
--- a/src/scs_core/data/json.py
+++ b/src/scs_core/data/json.py
@@ -123,9 +123,8 @@ class JSONReport(JSONable):
tmp_filename = '.'.join((filename, str(int(time.time()))))
try:
- f = open(tmp_filename, 'w')
- f.write(jstr + '\n')
- f.close()
+ with open(tmp_filename, 'w') as f:
+ f.write(jstr + '\n')
except FileNotFoundError: # the containing directory does not exist (yet)
return False
|
Refactored MultiPersistentJSONable
|
diff --git a/channel.go b/channel.go
index <HASH>..<HASH> 100644
--- a/channel.go
+++ b/channel.go
@@ -274,8 +274,8 @@ func (ch *Channel) sendOpen(msg message) (err error) {
func (ch *Channel) dispatch(msg message) {
switch m := msg.(type) {
case *channelClose:
- ch.connection.closeChannel(ch, newError(m.ReplyCode, m.ReplyText))
ch.send(&channelCloseOk{})
+ ch.connection.closeChannel(ch, newError(m.ReplyCode, m.ReplyText))
case *channelFlow:
ch.notifyM.RLock()
|
First send a channel.close-ok, then release local resources
This way if a channel with the same ID is opened concurrently,
the server will first see a channel.close-ok for it and release it.
This is the same idea as #<I>.
|
diff --git a/scripts/partialBuild.js b/scripts/partialBuild.js
index <HASH>..<HASH> 100644
--- a/scripts/partialBuild.js
+++ b/scripts/partialBuild.js
@@ -12,7 +12,7 @@ rollupConfig.plugins.push(partialBuildPlugin);
rollup.rollup(rollupConfig).then(function(bundle) {
return bundle.generate(rollupConfig.output);
}).then(function(result) {
- process.stdout.write(result.code);
+ result.output.forEach(x => process.stdout.write(x.code))
});
function partialBuild(options) {
|
fix: partial build (#<I>)
* fixed partial build output
* write multiple chunks
|
diff --git a/src/Core/Loader.php b/src/Core/Loader.php
index <HASH>..<HASH> 100644
--- a/src/Core/Loader.php
+++ b/src/Core/Loader.php
@@ -72,11 +72,6 @@ class Loader
$this->load_widgets();
- // Now all core files are loaded, turn on output buffer until a view is dispatched.
- if (! \ob_get_level()) {
- \ob_start();
- }
-
$this->load_theme();
}
diff --git a/src/Templating/View.php b/src/Templating/View.php
index <HASH>..<HASH> 100644
--- a/src/Templating/View.php
+++ b/src/Templating/View.php
@@ -43,12 +43,6 @@ class View
*/
public function render($slug, $data = [])
{
- /*
- * When Snap first boots up, it starts the output buffer.
- * Now we have a matched view, we can flush any partials (such as the page <head>).
- */
- \ob_end_flush();
-
if ($this->current_view !== null) {
throw new Templating_Exception('Views should not be nested');
}
|
buffering can conflict with static cache plugins
|
diff --git a/src/Lucid/QueryBuilder/methods.js b/src/Lucid/QueryBuilder/methods.js
index <HASH>..<HASH> 100644
--- a/src/Lucid/QueryBuilder/methods.js
+++ b/src/Lucid/QueryBuilder/methods.js
@@ -451,6 +451,8 @@ methods.scope = function (target) {
*/
methods.ids = function (target) {
return function () {
+ const serializer = new target.HostModel.QuerySerializer(target, this)
+ serializer._decorateQuery()
return target.modelQueryBuilder.select(target.HostModel.primaryKey).pluck(target.HostModel.primaryKey)
}
}
@@ -465,6 +467,8 @@ methods.ids = function (target) {
*/
methods.pair = function (target) {
return function (lhs, rhs) {
+ const serializer = new target.HostModel.QuerySerializer(target, this)
+ serializer._decorateQuery()
return target.modelQueryBuilder.select(lhs, rhs).reduce(function (result, row) {
result[row[lhs]] = row[rhs]
return result
|
fix(soft-deletes): pairs and ids ignore soft deleted
Closes #<I>
|
diff --git a/lib/omnibus/packagers/mac_dmg.rb b/lib/omnibus/packagers/mac_dmg.rb
index <HASH>..<HASH> 100644
--- a/lib/omnibus/packagers/mac_dmg.rb
+++ b/lib/omnibus/packagers/mac_dmg.rb
@@ -25,9 +25,9 @@ module Omnibus
end
setup do
- clean_disks
create_directory(dmg_stage)
remove_file(writable_dmg)
+ clean_disks
end
build do
|
Move clean disks after dmg_stage directory creation so that the command can execute correctly.
|
diff --git a/bundles/org.eclipse.orion.client.ui/web/embeddedEditor/builder/javascriptPlugin.build.almond-js.js b/bundles/org.eclipse.orion.client.ui/web/embeddedEditor/builder/javascriptPlugin.build.almond-js.js
index <HASH>..<HASH> 100644
--- a/bundles/org.eclipse.orion.client.ui/web/embeddedEditor/builder/javascriptPlugin.build.almond-js.js
+++ b/bundles/org.eclipse.orion.client.ui/web/embeddedEditor/builder/javascriptPlugin.build.almond-js.js
@@ -24,6 +24,11 @@
almond: 'requirejs/almond',
i18n: 'requirejs/i18n',
text: 'requirejs/text',
+ esprima: "esprima/esprima",
+ estraverse: "estraverse/estraverse",
+ escope: "escope/escope",
+ logger: "javascript/logger",
+ doctrine: 'doctrine/doctrine',
'orion/bootstrap': 'embeddedEditor/builder/buildFrom/bootstrap'
},
name: "almond",
|
Bug <I> - Stand alone editor: consume-ability improvement.-- refined the build script
|
diff --git a/salt/grains/core.py b/salt/grains/core.py
index <HASH>..<HASH> 100644
--- a/salt/grains/core.py
+++ b/salt/grains/core.py
@@ -536,7 +536,7 @@ def _virtual(osdata):
# Tested on Fedora 10 / 2.6.27.30-170.2.82 with xen
# Tested on Fedora 15 / 2.6.41.4-1 without running xen
elif isdir('/sys/bus/xen'):
- if 'xen' in __salt__['cmd.run']('dmesg').lower():
+ if 'xen:' in __salt__['cmd.run']('dmesg').lower():
grains['virtual_subtype'] = 'Xen PV DomU'
elif os.listdir('/sys/bus/xen/drivers'):
# An actual DomU will have several drivers
|
Added : to xen grep, because otherwise it would match kernel messages like: skipping TxEn test for device [<I>:<I>f] subsystem [<I>:<I>]
|
diff --git a/src/Medoo.php b/src/Medoo.php
index <HASH>..<HASH> 100644
--- a/src/Medoo.php
+++ b/src/Medoo.php
@@ -234,9 +234,7 @@ class Medoo
}
$option = $options['option'] ?? [];
- $commands = (isset($options['command']) && is_array($options['command'])) ?
- $options['command'] :
- [];
+ $commands = [];
switch ($this->type) {
@@ -469,6 +467,10 @@ class Medoo
);
}
+ if (isset($options['command']) && is_array($options['command'])) {
+ $commands = array_merge($commands, $options['command']);
+ }
+
foreach ($commands as $value) {
$this->pdo->exec($value);
}
|
[update] the default commands can be overridden by the connection command option. #<I>
|
diff --git a/packages/ember-testing/lib/helpers.js b/packages/ember-testing/lib/helpers.js
index <HASH>..<HASH> 100644
--- a/packages/ember-testing/lib/helpers.js
+++ b/packages/ember-testing/lib/helpers.js
@@ -19,6 +19,7 @@ Ember.Test.onInjectHelpers(function() {
function visit(app, url) {
Ember.run(app, app.handleURL, url);
+ app.__container__.lookup('router:main').location.setURL(url);
return wait(app);
}
|
Ember testing update url in visit helper
|
diff --git a/lib/rango/rango.rb b/lib/rango/rango.rb
index <HASH>..<HASH> 100644
--- a/lib/rango/rango.rb
+++ b/lib/rango/rango.rb
@@ -66,6 +66,7 @@ module Rango
# @since 0.0.1
def interactive
ARGV.delete("-i") # otherwise irb will read it
+ ENV["RACK_ENV"] = Rango.environment # for racksh
unless try_require("racksh/boot")
Rango.logger.info("For more goodies install racksh gem")
try_require "irb/completion" # some people can have ruby compliled without readline
@@ -77,7 +78,7 @@ module Rango
end
# clever environments support
- attribute :development_environments, ["development", "test", "spec", "cucumber"]
+ attribute :development_environments, ["development"]
attribute :testing_environments, ["test", "spec", "cucumber"]
attribute :production_environments, ["stage", "production"]
@@ -86,7 +87,7 @@ module Rango
questionable :production, lambda { self.production_environments.include?(Rango.environment) }
def environment?(environment)
- self.environment.eql?(environment.to_sym)
+ self.environment.eql?(environment.to_s)
end
end
end
|
Fixed Rango#environment?, removed test-like environments from development_environments and exported ENV[RACK_ENV] in Rango.interactive
|
diff --git a/test/lib/utils.js b/test/lib/utils.js
index <HASH>..<HASH> 100644
--- a/test/lib/utils.js
+++ b/test/lib/utils.js
@@ -44,6 +44,7 @@ exports.setupCouch = function (opts, callback) {
if (err) {
return callback(err);
}
+ process.setMaxListeners(100);
process.on('exit', function (code) {
couch.once('stop', function () {
process.exit(code);
|
remove memory leak warning for process event emitter during tests
* * *
This commit was sponsored by The Hoodie Firm.
You can hire The Hoodie Firm:
<URL>
|
diff --git a/isort/main.py b/isort/main.py
index <HASH>..<HASH> 100755
--- a/isort/main.py
+++ b/isort/main.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/env python
''' Tool for sorting imports alphabetically, and automatically separated into sections.
Copyright (C) 2013 Timothy Edmund Crosley
|
Remove unconventional space after shebang
While allowed by most tools, it is very unconventional.
|
diff --git a/marathon/models/app.py b/marathon/models/app.py
index <HASH>..<HASH> 100644
--- a/marathon/models/app.py
+++ b/marathon/models/app.py
@@ -37,7 +37,9 @@ class MarathonApp(MarathonResource):
def __init__(self, cmd=None, constraints=None, container=None, cpus=None, env=None, executor=None,
health_checks=None, id=None, instances=None, mem=None, ports=None, tasks=None, uris=None):
self.cmd = cmd
- self.constraints = constraints or []
+ self.constraints = [
+ c if isinstance(c, MarathonConstraint) else MarathonConstraint(*c)
+ for c in (constraints or [])]
self.container = container
self.cpus = cpus
self.env = env
@@ -93,4 +95,4 @@ class MarathonApp(MarathonResource):
'ports': self.ports,
'tasks': [t.json_encode() for t in self.tasks],
'uris': self.uris
- }
\ No newline at end of file
+ }
|
Bug Fix: Cannot define constraints with a tuple of strings
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -49,10 +49,12 @@ mirage.client = function client(primus) {
});
};
+ var session;
+
primus.on('outgoing::url', function url(options) {
var querystring = primus.querystring(options.query || '');
- querystring._mirage = session;
+ querystring._mirage = (session = session || primus.guid());
options.query = primus.querystringify(querystring);
});
};
|
[fix] Actually set the guid;
|
diff --git a/src/mergadoclient/HttpClient.php b/src/mergadoclient/HttpClient.php
index <HASH>..<HASH> 100644
--- a/src/mergadoclient/HttpClient.php
+++ b/src/mergadoclient/HttpClient.php
@@ -59,6 +59,26 @@ class HttpClient
}
+ public function requestAsync($url, $method = 'GET', $data = []) {
+
+ $stack = HandlerStack::create();
+ $stack->push(ApiMiddleware::auth());
+ $client = new Client(['handler' => $stack]);
+
+ $promise = $client->requestAsync($method, $url, [
+ 'headers' => [
+ 'Authorization' => 'Bearer '.$this->token
+ ],
+ 'json' => $data,
+ 'content-type' => 'application/json'
+ ]);
+
+ return $promise;
+
+ }
+
+
+
/**
* @param AccessToken $token
* @return $this
|
Added requestAsync method to HttpClient
Added async methods to ApiClient
|
diff --git a/lib/index.cjs.js b/lib/index.cjs.js
index <HASH>..<HASH> 100644
--- a/lib/index.cjs.js
+++ b/lib/index.cjs.js
@@ -1,5 +1,6 @@
import jwtDecode, { InvalidTokenError } from "./index";
const wrapper = jwtDecode;
+wrapper.default = jwtDecode;
wrapper.InvalidTokenError = InvalidTokenError;
export default wrapper;
\ No newline at end of file
|
Add cjs compatibility with default export
This allows to use the ESM default import syntax in environments where the
import resolves to the CJS build.
This allows to create type definitions that work with both ESM and CJS
environments.
|
diff --git a/idx/memory/find_cache_test.go b/idx/memory/find_cache_test.go
index <HASH>..<HASH> 100644
--- a/idx/memory/find_cache_test.go
+++ b/idx/memory/find_cache_test.go
@@ -89,3 +89,14 @@ func TestFindCache(t *testing.T) {
})
}
+
+func BenchmarkTreeFromPath(b *testing.B) {
+ numPaths := 1000
+ paths := getSeriesNames(10, numPaths, "benchmark")
+ b.ReportAllocs()
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ p := i % numPaths
+ treeFromPath(paths[p])
+ }
+}
|
add benchmark for treeFromPath
|
diff --git a/tm-monitor/main.go b/tm-monitor/main.go
index <HASH>..<HASH> 100644
--- a/tm-monitor/main.go
+++ b/tm-monitor/main.go
@@ -11,7 +11,7 @@ import (
monitor "github.com/tendermint/tools/tm-monitor/monitor"
)
-var version = "0.3.0"
+var version = "0.3.1"
var logger = log.NewNopLogger()
|
update tm-monitor version to <I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -23,6 +23,7 @@ setup(
"Topic :: Software Development :: Libraries :: Python Modules",
],
+ use_2to3 = True,
long_description = """\
Iron.io common library
----------------------
|
modified: setup.py
added distribute's 2to3 option for python 3 compatibility
|
diff --git a/lib/voom/presenters/dsl/components/actions/base.rb b/lib/voom/presenters/dsl/components/actions/base.rb
index <HASH>..<HASH> 100644
--- a/lib/voom/presenters/dsl/components/actions/base.rb
+++ b/lib/voom/presenters/dsl/components/actions/base.rb
@@ -34,13 +34,20 @@ module Voom
def extract_dynamic_params(hash)
HashExt::Traverse.traverse(hash) do |k, v|
if v.respond_to?(:to_hash) || v.respond_to?(:dynamic_parameter)
- [k, v.to_hash]
+ [k, clean_dynamic_values(v.to_hash)]
else
[nil, nil]
end
end
end
+ # This is an attempt to fix an intermittent bug where "params" would end up in the list of
+ # values when using `last_response`.
+ def clean_dynamic_values(hash)
+ hash[:value].delete(:params) if hash.has_key?(:value) && hash[:value].is_a?(Array)
+ hash
+ end
+
def extract_params(hash)
HashExt::Traverse.traverse(hash) do |k, v|
if v.respond_to?(:dynamic_parameter)
|
Attempt at fixing a very elusive bug when using `last_response` in an
action.
|
diff --git a/cleancat/base.py b/cleancat/base.py
index <HASH>..<HASH> 100644
--- a/cleancat/base.py
+++ b/cleancat/base.py
@@ -930,7 +930,7 @@ class PolymorphicField(Dict):
)
return self.type_map[field_type].clean(
- {k: v for k, v in value.items() if k != field_type}
+ {k: v for k, v in value.items() if k != self.type_field}
)
diff --git a/tests/test_base.py b/tests/test_base.py
index <HASH>..<HASH> 100644
--- a/tests/test_base.py
+++ b/tests/test_base.py
@@ -1034,6 +1034,18 @@ def test_polymorphic_field():
poly_field.clean({'type': '1', 'option-0': 'data'})
+def test_polymorphic_field_2():
+ class Option(Dict):
+ def clean(self, value):
+ value = super(Option, self).clean(value)
+ if 'option' not in value:
+ raise ValidationError('option not in data')
+ return value['option']
+
+ poly_field = PolymorphicField(type_map={'option': Option()})
+ assert poly_field.clean({'type': 'option', 'option': 1}) == 1
+
+
def test_embedded_factory():
class SumTwoInts(Schema):
a = Integer(required=True)
|
Fix field removal in PolymorphicField
|
diff --git a/lib/runtime/index.js b/lib/runtime/index.js
index <HASH>..<HASH> 100644
--- a/lib/runtime/index.js
+++ b/lib/runtime/index.js
@@ -12,10 +12,6 @@ var Entry = require("./entry.js");
// specific module objects, or for Module.prototype (where implemented),
// to make the runtime available throughout the entire module system.
exports.enable = function (mod) {
- if (typeof mod.resolve !== "function") {
- throw new Error("module.resolve not implemented");
- }
-
if (mod.link !== moduleLink) {
mod.link = moduleLink;
mod["export"] = moduleExport;
|
Don't complain about missing module.resolve until necessary.
Calling require("reify/lib/runtime").enable(Module.prototype) before
Module.prototype.resolve has been defined is fine, as long as the resolve
method is defined before module.link calls it. If it's still undefined
then, an exception will be thrown, which fulfills the same purpose as the
exception removed by this commit.
|
diff --git a/webapps/client/scripts/navigation/controllers/cam-layout-ctrl.js b/webapps/client/scripts/navigation/controllers/cam-layout-ctrl.js
index <HASH>..<HASH> 100644
--- a/webapps/client/scripts/navigation/controllers/cam-layout-ctrl.js
+++ b/webapps/client/scripts/navigation/controllers/cam-layout-ctrl.js
@@ -7,25 +7,6 @@ define([
var $ = angular.element;
var $bdy = $('body');
- function navsOpen() {
- return $bdy.hasClass('filters-column-open') ||
- $bdy.hasClass('list-column-open');
- }
-
- function isNavChild(el) {
- return $(el).parents('.task-filters, .task-list').length > 0;
- }
-
-
- $bdy.click(function(evt) {
- if (navsOpen() &&
- !isNavChild(evt.target) &&
- !evt.isDefaultPrevented()) {
- $bdy.removeClass('filters-column-open list-column-open');
- }
- });
-
-
return [
'$scope',
function(
|
impr(layout): only the toggler should trigger collapse / expand
Related to: CAM-<I>
|
diff --git a/unit_testing.py b/unit_testing.py
index <HASH>..<HASH> 100644
--- a/unit_testing.py
+++ b/unit_testing.py
@@ -13,6 +13,7 @@ class TestW2N(unittest.TestCase):
self.assertEqual(w2n.word_to_num('eleven'),11)
self.assertEqual(w2n.word_to_num('nineteen billion and nineteen'),19000000019)
self.assertEqual(w2n.word_to_num('one hundred and forty two'),142)
+ self.assertEqual(w2n.word_to_num('one hundred thirty-five'),135)
if __name__ == '__main__':
- unittest.main()
\ No newline at end of file
+ unittest.main()
diff --git a/word2number/w2n.py b/word2number/w2n.py
index <HASH>..<HASH> 100644
--- a/word2number/w2n.py
+++ b/word2number/w2n.py
@@ -63,6 +63,7 @@ indian_number_system = {
"""
def word_to_num(number_sentence):
number_sentence = number_sentence.lower()
+ number_sentence = number_sentence.replace('-', ' ')
split_words = number_sentence.split() # split sentence into words
clean_numbers = [] # removing and, & etc.
for word in split_words:
|
Added support for dash-splitted 2-digit numbers. Like thirty-five
|
diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100755
--- a/manifest.php
+++ b/manifest.php
@@ -48,7 +48,7 @@ return array(
'version' => '20.2.2',
'author' => 'Open Assessment Technologies, CRP Henri Tudor',
'requires' => array(
- 'generis' => '>=7.9.6',
+ 'generis' => '>=7.9.9',
),
'models' => array(
'http://www.tao.lu/Ontologies/TAO.rdf',
|
New version with DBAL instead of PDO requires new generis
|
diff --git a/tests/get_free_port.py b/tests/get_free_port.py
index <HASH>..<HASH> 100644
--- a/tests/get_free_port.py
+++ b/tests/get_free_port.py
@@ -2,12 +2,8 @@ import tangelo.util
def test_get_free_port():
- for _ in xrange(100):
+ for _ in xrange(1000):
free_port = tangelo.util.get_free_port()
print "Got free port: %d" % (free_port)
- yield check_port, free_port
-
-
-def check_port(port):
- assert port > 1024
+ assert free_port > 1024
|
Preventing the get_free_port() test from cluttering the output
This also strengthens the test, now that screen clutter is not an issue
|
diff --git a/peer_test.go b/peer_test.go
index <HASH>..<HASH> 100644
--- a/peer_test.go
+++ b/peer_test.go
@@ -385,11 +385,11 @@ func TestPeerSelectionPreferIncoming(t *testing.T) {
},
}
- ctx, cancel := NewContext(time.Second)
- defer cancel()
-
for _, tt := range tests {
WithVerifiedServer(t, nil, func(ch *Channel, hostPort string) {
+ ctx, cancel := NewContext(time.Second)
+ defer cancel()
+
selectedIncoming := make(map[string]int)
selectedOutgoing := make(map[string]int)
selectedUnconnected := make(map[string]int)
|
Create context inside of the test function
Avoid timeouts if a previous test failed, since the context may now
already be past the deadline and will cause future failures
|
diff --git a/app/Notifications/Component/ComponentStatusChangedNotification.php b/app/Notifications/Component/ComponentStatusChangedNotification.php
index <HASH>..<HASH> 100644
--- a/app/Notifications/Component/ComponentStatusChangedNotification.php
+++ b/app/Notifications/Component/ComponentStatusChangedNotification.php
@@ -89,8 +89,7 @@ class ComponentStatusChangedNotification extends Notification
->line($content)
->action(trans('notifications.component.status_update.mail.action'), cachet_route('status-page'))
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]))
- //TODO: Translate the text below
- ->line('Manage your subscriptions at ' . cachet_route('subscribe.manage', $notifiable->verify_code));
+ ->line(trans('cachet.subscriber.manage') . ' ' . cachet_route('subscribe.manage', $notifiable->verify_code));
}
/**
|
Uses the translation cachet.subscriber.manage.
When a component's status changes or when an incident is
created/updated, an email is sent to every people that has subscribed.
At the end of the mail a link to manage its subscription has been
introduced.
Now, it uses the translation.
|
diff --git a/coupons/models.py b/coupons/models.py
index <HASH>..<HASH> 100644
--- a/coupons/models.py
+++ b/coupons/models.py
@@ -69,6 +69,7 @@ class Coupon(models.Model):
users = models.ManyToManyField(
user_model, verbose_name=_("Users"), null=True, blank=True, through='CouponUser',
help_text=_("You may specify a list of users you want to restrict this coupon to."))
+ users_limit = models.PositiveIntegerField(_("User limit"), default=1)
created_at = models.DateTimeField(_("Created at"), auto_now_add=True)
redeemed_at = models.DateTimeField(_("Redeemed at"), blank=True, null=True)
valid_until = models.DateTimeField(
|
add a user limit field to coupon with default of 1 like before
|
diff --git a/libkbfs/block_journal.go b/libkbfs/block_journal.go
index <HASH>..<HASH> 100644
--- a/libkbfs/block_journal.go
+++ b/libkbfs/block_journal.go
@@ -268,7 +268,7 @@ func (j *blockJournal) readJournal(ctx context.Context) (
// refs won't have to upload any new bytes. (This might
// be wrong if all references to a block were deleted
// since the addref entry was appended.)
- if e.Op == blockPutOp {
+ if e.Op == blockPutOp && !e.Ignore {
b, err := j.getDataSize(id)
// Ignore ENOENT errors, since users like
// BlockServerDisk can remove block data without
|
block_journal: ignore the byes of ignored blocks on a restart
Issue: KBFS-<I>
|
diff --git a/azure-client-runtime/src/main/java/com/microsoft/azure/v2/PollStrategy.java b/azure-client-runtime/src/main/java/com/microsoft/azure/v2/PollStrategy.java
index <HASH>..<HASH> 100644
--- a/azure-client-runtime/src/main/java/com/microsoft/azure/v2/PollStrategy.java
+++ b/azure-client-runtime/src/main/java/com/microsoft/azure/v2/PollStrategy.java
@@ -234,11 +234,11 @@ abstract class PollStrategy {
}
/**
- * @erturn The data for the strategy.
+ * @return The data for the strategy.
*/
public abstract Serializable strategyData();
SwaggerMethodParser methodParser() {
return this.methodParser;
}
-}
\ No newline at end of file
+}
|
Fix spelling in PollStrategy Javadoc (#<I>)
|
diff --git a/AuthManager.php b/AuthManager.php
index <HASH>..<HASH> 100755
--- a/AuthManager.php
+++ b/AuthManager.php
@@ -4,9 +4,7 @@ namespace Illuminate\Auth;
use Closure;
use Illuminate\Contracts\Auth\Factory as FactoryContract;
-use Illuminate\Support\Str;
use InvalidArgumentException;
-use LogicException;
class AuthManager implements FactoryContract
{
|
Apply fixes from StyleCI (#<I>)
|
diff --git a/src/BouncerServiceProvider.php b/src/BouncerServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/BouncerServiceProvider.php
+++ b/src/BouncerServiceProvider.php
@@ -2,6 +2,8 @@
namespace Silber\Bouncer;
+use Silber\Bouncer\Database\Role;
+use Silber\Bouncer\Database\Ability;
use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Auth\Access\Gate;
|
Bug fix missing use statements for Ability and Role Classes in ServiceProvider.
|
diff --git a/holodeck/packagemanager.py b/holodeck/packagemanager.py
index <HASH>..<HASH> 100644
--- a/holodeck/packagemanager.py
+++ b/holodeck/packagemanager.py
@@ -79,18 +79,14 @@ def world_info(world_name, world_config=None, initial_indent="", next_indent="
print(sensor_indent, sensor)
-def install(package_name, holodeck_path="."):
+def install(package_name):
"""Installs a holodeck package.
Positional Arguments:
package_name -- the name of the package to install
"""
- # using util.get_holodeck_path() as a default value causes a compilation error if HOLODECKPATH does not exist
- # "." is used instead
- if holodeck_path == ".":
- holodeck_path = util.get_holodeck_path()
-
+ holodeck_path = util.get_holodeck_path()
binary_website = "http://pcc.byu.edu/holodeck/"
if package_name not in packages:
|
Removed code to recheck holodeck path
Recently implemented similar functionality in util.py
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -7,9 +7,20 @@ var sut = require("./index");
var lib = require("./lib");
var quick_check = function (describe_string, it_string, it_func) {
return describe(describe_string, function () {
- return _.times(500, function (n) {
+ var times = 500;
+ var counter;
+ before(function () {
+ counter = 0;
+ });
+ after(function () {
+ assert.strictEqual(counter, times);
+ });
+ return _.times(times, function (n) {
n = n + 1;
- return it(it_string + " (try #" + n + ")", function () { return it_func; });
+ return it(it_string + " (try #" + n + ")", function () {
+ it_func();
+ counter = counter + 1;
+ });
});
});
};
|
test(quick_check): add sanity check on number of tests executed
|
diff --git a/tests/test_callstack.py b/tests/test_callstack.py
index <HASH>..<HASH> 100644
--- a/tests/test_callstack.py
+++ b/tests/test_callstack.py
@@ -47,7 +47,7 @@ def test_empty_stack():
cs = cs.ret(None)
nose.tools.assert_equal(cs.current_function_address, 0)
- nose.tools.assert_equal(cs.current_stack_pointer, None)
+ nose.tools.assert_equal(cs.current_stack_pointer, 0)
if __name__ == "__main__":
test_empty_stack()
|
missed a spot on test_callstack
|
diff --git a/tests/test_protocol.py b/tests/test_protocol.py
index <HASH>..<HASH> 100644
--- a/tests/test_protocol.py
+++ b/tests/test_protocol.py
@@ -70,9 +70,6 @@ class TransportMock(unittest.mock.Mock):
self.loop.call_soon(self.close)
self._eof = True
- def is_closing(self):
- return self._closing
-
def close(self):
# Simulate how actual transports drop the connection.
if not self._closing:
|
Simplify mock.
The code that was using this no longer exists.
|
diff --git a/testRunner.js b/testRunner.js
index <HASH>..<HASH> 100755
--- a/testRunner.js
+++ b/testRunner.js
@@ -139,6 +139,7 @@ async function check(file) {
result = result.split(' - undefined').join('x');
result = result.split(' `undefined`').join('x');
result = result.split('_undefined').join('x');
+ result = result.split('undefined error').join('x');
if (ok && result.indexOf('undefined')>=0) {
message = 'Ok except for undefined references';
ok = false;
|
fix: more undefined in text fields
|
diff --git a/gcloud_requests/credentials_watcher.py b/gcloud_requests/credentials_watcher.py
index <HASH>..<HASH> 100644
--- a/gcloud_requests/credentials_watcher.py
+++ b/gcloud_requests/credentials_watcher.py
@@ -62,3 +62,8 @@ class CredentialsWatcher(Thread):
with self.watch_list_updated:
self.watch_list.append(credentials)
self.watch_list_updated.notify()
+
+ def unwatch(self, credentials):
+ with self.watch_list_updated:
+ self.watch_list.remove(credentials)
+ self.watch_list_updated.notify()
diff --git a/gcloud_requests/proxy.py b/gcloud_requests/proxy.py
index <HASH>..<HASH> 100644
--- a/gcloud_requests/proxy.py
+++ b/gcloud_requests/proxy.py
@@ -71,6 +71,9 @@ class RequestsProxy(object):
self.credentials = credentials
_credentials_watcher.watch(credentials)
+ def __del__(self):
+ _credentials_watcher.unwatch(self.credentials)
+
def request(self, uri, method="GET", body=None, headers=None, redirections=5, connection_type=None, retries=0, refresh_attempts=0): # noqa
session = self._get_session()
headers = headers.copy() if headers is not None else {}
|
unwatch credentials once proxies get gc'd
|
diff --git a/MAVProxy/modules/mavproxy_console.py b/MAVProxy/modules/mavproxy_console.py
index <HASH>..<HASH> 100644
--- a/MAVProxy/modules/mavproxy_console.py
+++ b/MAVProxy/modules/mavproxy_console.py
@@ -6,8 +6,6 @@
import os, sys, math, time
-mpstate = None
-
from MAVProxy.modules.lib import wxconsole
from MAVProxy.modules.lib import textconsole
from MAVProxy.modules.mavproxy_map import mp_elevation
@@ -66,6 +64,7 @@ def init(_mpstate):
def unload():
'''unload module'''
+ mpstate.console.close()
mpstate.console = textconsole.SimpleConsole()
def estimated_time_remaining(lat, lon, wpnum, speed):
|
console: Console window now closes when module is unloaded.
|
diff --git a/testproj/urls.py b/testproj/urls.py
index <HASH>..<HASH> 100644
--- a/testproj/urls.py
+++ b/testproj/urls.py
@@ -14,12 +14,12 @@ from testproj import views
# args, kwargs, *args, **kwargs
urlpatterns = patterns('',
- (r'^home$', 'testproj.views.home'),
- (r'^home-callable$', views.home),
+ (r'home/$', 'testproj.views.home'),
+ (r'home-callable/$', views.home),
- url('r^about/$', 'testproj.views.about'),
- url('r^about-named/$', 'testproj.views.about', name='about'),
- url('r^about-with-default-args/$', 'testproj.views.about', {'testing': True }),
+ url(r'about/$', 'testproj.views.about'),
+ url(r'about-named/$', 'testproj.views.about', name='about'),
+ url(r'about-with-default-args/$', 'testproj.views.about', {'testing': True }),
(r'protected/$', views.protected),
(r'protected-and-cached/$', views.protected_and_cached),
|
Reformatted some url patterns.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -116,6 +116,9 @@ setup(
'invenio_base.apps': [
'invenio_records = invenio_records:InvenioRecords',
],
+ 'invenio_base.api_apps': [
+ 'invenio_records = invenio_records:InvenioRecords',
+ ],
'invenio_celery.tasks': [
'invenio_records = invenio_records.tasks.api',
],
|
installation: entry point fix
* Installs extension on API application in order to support JSONRef
replacement in the API application.
|
diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb
index <HASH>..<HASH> 100644
--- a/test/test_heuristics.rb
+++ b/test/test_heuristics.rb
@@ -145,6 +145,18 @@ class TestHeuristcs < Minitest::Test
})
end
+ def test_m_by_heuristics
+ assert_heuristics({
+ "Objective-C" => all_fixtures("Objective-C", "*.m"),
+ "Mercury" => all_fixtures("Mercury", "*.m"),
+ "MUF" => all_fixtures("MUF", "*.m"),
+ "M" => all_fixtures("M", "MDB.m"),
+ "Mathematica" => all_fixtures("Mathematica", "*.m") - all_fixtures("Mathematica", "Problem12.m"),
+ "Matlab" => all_fixtures("Matlab", "create_ieee_paper_plots.m"),
+ "Limbo" => all_fixtures("Limbo", "*.m")
+ })
+ end
+
# Candidate languages = ["C++", "Objective-C"]
def test_obj_c_by_heuristics
# Only calling out '.h' filenames as these are the ones causing issues
|
Tests for .m heuristic rules
|
diff --git a/spec/gettext_i18n_rails/haml_parser_spec.rb b/spec/gettext_i18n_rails/haml_parser_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/gettext_i18n_rails/haml_parser_spec.rb
+++ b/spec/gettext_i18n_rails/haml_parser_spec.rb
@@ -23,11 +23,13 @@ describe GettextI18nRails::HamlParser do
end
end
- it "should parse the 1.9" do
- with_file '= _("xxxx", x: 1)' do |path|
- parser.parse(path, []).should == [
- ["xxxx", "#{path}:1"]
- ]
+ it "should parse the 1.9 if ruby_version is 1.9" do
+ if RUBY_VERSION =~ /^1\.9/
+ with_file '= _("xxxx", x: 1)' do |path|
+ parser.parse(path, []).should == [
+ ["xxxx", "#{path}:1"]
+ ]
+ end
end
end
|
Only run spec for <I> when ruby_version is <I>.. this fixes the travis ree testrun
|
diff --git a/app/helpers/govuk_elements_errors_helper.rb b/app/helpers/govuk_elements_errors_helper.rb
index <HASH>..<HASH> 100644
--- a/app/helpers/govuk_elements_errors_helper.rb
+++ b/app/helpers/govuk_elements_errors_helper.rb
@@ -28,7 +28,7 @@ module GovukElementsErrorsHelper
child_objects = attribute_objects object
nested_child_objects = child_objects.map { |o| attributes(o, parent_object) }
- (child_objects + nested_child_objects).flatten
+ (child_objects + nested_child_objects).flatten - [object]
end
def self.attribute_objects object
|
Remove parent object from attributes(object) when present
Assure attributes(object) does not return object in returned array.
|
diff --git a/lib/discordrb/commands/command_bot.rb b/lib/discordrb/commands/command_bot.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/commands/command_bot.rb
+++ b/lib/discordrb/commands/command_bot.rb
@@ -79,7 +79,7 @@ module Discordrb::Commands
parse_self: attributes[:parse_self],
shard_id: attributes[:shard_id],
num_shards: attributes[:num_shards],
- redact_token: attributes[:redact_token])
+ redact_token: attributes.key?(:redact_token) ? attributes[:redact_token] : true)
@prefix = attributes[:prefix]
@attributes = {
|
Set redact_token to true if none is given during CommandBot passthrough
(so the entire thing *actually works* on CommandBot)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.