diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/cgutils/cgroup.py b/cgutils/cgroup.py
index <HASH>..<HASH> 100644
--- a/cgutils/cgroup.py
+++ b/cgutils/cgroup.py
@@ -24,7 +24,7 @@ import errno
from cgutils import host
from cgutils import process
-from . import fileops
+from cgutils import fileops
if sys.version_info.major == 3: | cgroup: tweak for doctest |
diff --git a/pymacaron/test.py b/pymacaron/test.py
index <HASH>..<HASH> 100644
--- a/pymacaron/test.py
+++ b/pymacaron/test.py
@@ -38,6 +38,8 @@ class PyMacaronTestCase(testcase.PyMacaronTestCase):
super().setUp()
self.maxDiff = None
self.host, self.port, self.token = load_port_host_token()
+ proto = 'https' if self.port == 443 else 'http'
+ self.base_url = '%s://%s:%s' % (proto, self.host, self.port)
def assertIsVersion(self, j):
self.assertTrue(type(j['version']) is str) | Add base_url as attribute to PyMacaronTestCase instance |
diff --git a/src/Str.php b/src/Str.php
index <HASH>..<HASH> 100644
--- a/src/Str.php
+++ b/src/Str.php
@@ -568,6 +568,8 @@ final class Str implements \Countable {
*
* This operation is case-sensitive
*
+ * The empty string (as a search string) is not considered to be a part of any other string
+ *
* If the given search string is not found anywhere, an empty string is returned
*
* @param string $search the search string that should delimit the end
diff --git a/tests/index.php b/tests/index.php
index <HASH>..<HASH> 100644
--- a/tests/index.php
+++ b/tests/index.php
@@ -225,6 +225,7 @@ assert((string) $testStrObj->beforeFirst('d w☺rl') === 'Hello Hello w☺rl');
assert((string) $testStrObj->beforeFirst('w☺rld') === 'Hello Hello ');
assert((string) $testStrObj->beforeFirst('W☺rld') === '');
assert((string) $testStrObj->beforeFirst('x') === '');
+assert((string) $testStrObj->beforeFirst('') === '');
assert((string) $testStrObj->beforeLast('Hello') === 'Hello ');
assert((string) $testStrObj->beforeLast('o H') === 'Hell');
assert((string) $testStrObj->beforeLast('d w☺rl') === 'Hello Hello w☺rl'); | Clarify existing behavior of 'beforeFirst' with empty needle |
diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/client/ssh/__init__.py
+++ b/salt/client/ssh/__init__.py
@@ -34,6 +34,7 @@ import salt.utils.event
import salt.utils.atomicfile
import salt.utils.thin
import salt.utils.verify
+import salt.utils.validate.ssh
from salt._compat import string_types
from salt.utils import is_windows
@@ -176,6 +177,7 @@ class SSH(object):
else:
self.event = None
self.opts = opts
+ self.opts['_ssh_version'] = salt.utils.validate.ssh.version()
self.tgt_type = self.opts['selected_target_option'] \
if self.opts['selected_target_option'] else 'glob'
self.roster = salt.roster.Roster(opts, opts.get('roster')) | Add the ssh version to the opts |
diff --git a/packages/node_modules/@webex/plugin-meetings/test/unit/spec/meeting/index.js b/packages/node_modules/@webex/plugin-meetings/test/unit/spec/meeting/index.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/plugin-meetings/test/unit/spec/meeting/index.js
+++ b/packages/node_modules/@webex/plugin-meetings/test/unit/spec/meeting/index.js
@@ -716,10 +716,12 @@ describe('plugin-meetings', () => {
describe('#parseMeetingInfo', () => {
it('should parse meeting info, set values, and return null', () => {
meeting.parseMeetingInfo({
- convoId: uuid1,
- locusUrl: url1,
- sipMeetingUri: test1,
- owner: test2
+ body: {
+ convoId: uuid1,
+ locusUrl: url1,
+ sipMeetingUri: test1,
+ owner: test2
+ }
});
assert.equal(meeting.convoId, uuid1);
assert.equal(meeting.locusUrl, url1); | fix(meeting): fix uts |
diff --git a/cumulusci/tasks/robotframework/lint.py b/cumulusci/tasks/robotframework/lint.py
index <HASH>..<HASH> 100644
--- a/cumulusci/tasks/robotframework/lint.py
+++ b/cumulusci/tasks/robotframework/lint.py
@@ -46,9 +46,9 @@ class RobotLint(BaseTask):
W: 2, 0: No suite documentation (RequireSuiteDocumentation)
E: 30, 0: No testcase documentation (RequireTestDocumentation)
- To see a list of all configured options, set the 'list' option to True:
+ To see a list of all configured rules, set the 'list' option to True:
- cci task run robot_list -o list True
+ cci task run robot_lint -o list True
""" | Fixed a typo in a docstring |
diff --git a/Swat/SwatTableViewColumn.php b/Swat/SwatTableViewColumn.php
index <HASH>..<HASH> 100644
--- a/Swat/SwatTableViewColumn.php
+++ b/Swat/SwatTableViewColumn.php
@@ -609,6 +609,9 @@ class SwatTableViewColumn extends SwatCellRendererContainer
$first = true;
foreach ($this->renderers as $renderer) {
+ if (!$renderer->visible)
+ continue;
+
if ($first)
$first = false;
else | Fix problem where invisible cell-renderers were still outputting an empty
wrapper div (this would only occur for columns with more than one renderer,
one or more of which was invisible)
svn commit r<I> |
diff --git a/skflow/io/dask_io.py b/skflow/io/dask_io.py
index <HASH>..<HASH> 100644
--- a/skflow/io/dask_io.py
+++ b/skflow/io/dask_io.py
@@ -38,6 +38,14 @@ def _get_divisions(df):
divisions.insert(0, 0)
return divisions
+def _construct_dask_df_with_divisions(df):
+ divisions = _get_divisions(df)
+ name = 'csv-index' + df._name
+ dsk = {(name, i): (_add_to_index, (df._name, i), divisions[i]) for i in range(df.npartitions)}
+ columns = df.columns
+ from toolz import merge
+ return dd.DataFrame(merge(dsk, df.dask), name, columns, divisions)
+
def extract_dask_data(data):
"""Extract data from dask.Series for predictors"""
if isinstance(data, dd.Series): | + _construct_dask_df_with_divisions for dask_io |
diff --git a/state/vm_app_state.go b/state/vm_app_state.go
index <HASH>..<HASH> 100644
--- a/state/vm_app_state.go
+++ b/state/vm_app_state.go
@@ -229,8 +229,13 @@ func (vas *VMAppState) Sync() {
if deleted {
continue
}
- storageRoot := currentAccount.StorageRoot
- storage.Load(storageRoot.Bytes())
+ var storageRoot []byte
+ if currentAccount.StorageRoot.IsZero() {
+ storageRoot = nil
+ } else {
+ storageRoot = currentAccount.StorageRoot.Bytes()
+ }
+ storage.Load(storageRoot)
}
if value.IsZero() {
_, removed := storage.Remove(key) | Check StorageRoot for Zero before state.Load() again. Closes #<I> |
diff --git a/app-web/BitTorrentTracker.php b/app-web/BitTorrentTracker.php
index <HASH>..<HASH> 100644
--- a/app-web/BitTorrentTracker.php
+++ b/app-web/BitTorrentTracker.php
@@ -917,7 +917,6 @@ class BitTorrentTracker_Request extends Request
}
class BitTorrentTracker_TorrentImporter extends Request
{
- public $inited = FALSE;
public $concurrencyLimit = 5;
public $dir;
public $handle;
@@ -958,7 +957,6 @@ class BitTorrentTracker_TorrentImporter extends Request
class BitTorrentTracker_RatingUpdate extends Request
{
- public $inited = FALSE;
public $processing = 0;
public $concurrencyLimit = 1;
public function run()
diff --git a/app-web/Chat.php b/app-web/Chat.php
index <HASH>..<HASH> 100644
--- a/app-web/Chat.php
+++ b/app-web/Chat.php
@@ -625,7 +625,6 @@ class ChatSession
}
class Chat_MsgQueueRequest extends Request
{
- public $inited = FALSE;
public function run()
{
foreach ($this->appInstance->tags as $tag) {$tag->touch();} | Little cleanup (removed some unused properties). |
diff --git a/src/Resque/Worker.php b/src/Resque/Worker.php
index <HASH>..<HASH> 100644
--- a/src/Resque/Worker.php
+++ b/src/Resque/Worker.php
@@ -257,7 +257,7 @@ class Worker {
$this->queueDelayed();
if ($this->blocking) {
- $this->log('Pop blocking with timeout of '.$this->interval_string(), Logger::INFO);
+ $this->log('Pop blocking with timeout of '.$this->interval_string(), Logger::DEBUG);
$this->updateProcLine('Worker: waiting for job on '.implode(',', $this->queues).' with blocking timeout '.$this->interval_string());
} else {
$this->updateProcLine('Worker: waiting for job on '.implode(',', $this->queues).' with interval '.$this->interval_string());
@@ -267,7 +267,7 @@ class Worker {
if (!$job instanceof Job) {
if (!$this->blocking) {
- $this->log('Sleeping for '.$this->interval_string(), Logger::INFO);
+ $this->log('Sleeping for '.$this->interval_string(), Logger::DEBUG);
sleep($this->interval);
} | Change worker wait log level to DEBUG from INFO
This is a bit subjective, but having "Pop blocking ..." or "Sleeping ..." flooding the logs is undesirable in production environments, but I do want INFO level logs for things such as job success. Bumping it down to DEBUG just reduces the rate at which the logs grow significantly. |
diff --git a/calendar/lib.php b/calendar/lib.php
index <HASH>..<HASH> 100644
--- a/calendar/lib.php
+++ b/calendar/lib.php
@@ -1252,8 +1252,6 @@ function calendar_get_default_courses($ignoreref = false) {
else {
$courses = get_my_courses($USER->id, 'visible DESC', null, false);
}
- // Make sure global events are included
- $courses[0] = true;
return $courses;
} | MDL-<I>: Fixed bug in previous commits.
- warnings being displayed in developer mode.
- caused by patch from patch series not being applied. |
diff --git a/src/String/StringTools.php b/src/String/StringTools.php
index <HASH>..<HASH> 100644
--- a/src/String/StringTools.php
+++ b/src/String/StringTools.php
@@ -107,6 +107,7 @@ class StringTools
public static function makePlural($singular)
{
$singulars = [
+ 'ey' => 'eys',
'day' => 'days',
"ch" => "ches",
"s" => "ses", | Updating the string replacement to support for "ey" |
diff --git a/pages/Favorites/components/FavoritesList/style.js b/pages/Favorites/components/FavoritesList/style.js
index <HASH>..<HASH> 100644
--- a/pages/Favorites/components/FavoritesList/style.js
+++ b/pages/Favorites/components/FavoritesList/style.js
@@ -13,6 +13,7 @@ import variables from 'Styles/variables';
const container = css({
background: colors.background,
flexGrow: 1,
+ paddingTop: variables.gap.xsmall,
}).toString();
const image = css({
diff --git a/styles/variables.js b/styles/variables.js
index <HASH>..<HASH> 100644
--- a/styles/variables.js
+++ b/styles/variables.js
@@ -10,6 +10,7 @@ const materialShadow = 'rgba(0, 0, 0, .117647) 0 1px 6px, rgba(0, 0, 0, .117647)
export default {
materialShadow,
gap: {
+ xsmall: 4,
small: 8,
big: 16,
bigger: 20, | CON-<I> - additional gap on top of favorites page |
diff --git a/core/eolearn/tests/test_eodata.py b/core/eolearn/tests/test_eodata.py
index <HASH>..<HASH> 100644
--- a/core/eolearn/tests/test_eodata.py
+++ b/core/eolearn/tests/test_eodata.py
@@ -294,7 +294,7 @@ class TestSavingLoading(unittest.TestCase):
eopatch.save(tmpdirname, file_format='npy')
# load original patch
- eopatch_before = EOPatch.load(tmpdirname)
+ eopatch_before = EOPatch.load(tmpdirname, mmap=False)
# force exception during saving (case sensitivity), backup is reloaded
eopatch.data_timeless['Mask'] = mask
@@ -314,12 +314,12 @@ class TestSavingLoading(unittest.TestCase):
eopatch.save(tmpdirname, file_format='npy')
# load original patch
- eopatch_before = EOPatch.load(tmpdirname)
+ eopatch_before = EOPatch.load(tmpdirname, mmap=False)
# update original patch
eopatch.data_timeless['mask2'] = mask
eopatch.save(tmpdirname, file_format='npy', overwrite=True)
- eopatch_after = EOPatch.load(tmpdirname)
+ eopatch_after = EOPatch.load(tmpdirname, mmap=False)
# should be different
self.assertNotEqual(eopatch_before, eopatch_after) | Disable mmap in tests, otherwise a temporary directory cannot be deleted on Windows |
diff --git a/extensions/jupyter_shoebot/shoebot_kernel/kernel.py b/extensions/jupyter_shoebot/shoebot_kernel/kernel.py
index <HASH>..<HASH> 100644
--- a/extensions/jupyter_shoebot/shoebot_kernel/kernel.py
+++ b/extensions/jupyter_shoebot/shoebot_kernel/kernel.py
@@ -34,12 +34,12 @@ class ShoebotKernel(Kernel):
exc = None
try:
bot.run(code, break_on_error=True)
+ png_data = open('_temp.png', 'r').read()
+ # quote and encode PNG data for passing JSON response to Jupyter
+ png_string = urllib.quote_plus(base64.b64encode(png_data))
except Exception as e:
import traceback
exc = traceback.format_exc(e)
- png_data = open('_temp.png', 'r').read()
- # quote and encode PNG data for passing JSON response to Jupyter
- png_string = urllib.quote_plus(base64.b64encode(png_data))
if not silent:
if exc: | Errors are now properly caught |
diff --git a/tools/phantomjs/render.js b/tools/phantomjs/render.js
index <HASH>..<HASH> 100644
--- a/tools/phantomjs/render.js
+++ b/tools/phantomjs/render.js
@@ -57,7 +57,7 @@
var rootScope = body.injector().get('$rootScope');
if (!rootScope) {return false;}
- var panels = angular.element('div.panel:visible').length;
+ var panels = angular.element('plugin-component').length;
return rootScope.panelsRendered >= panels;
}); | Phantom render.js is incorrectly retrieving number of active panels (#<I>)
Fixes #<I> |
diff --git a/activerecord/lib/active_record/associations/belongs_to_association.rb b/activerecord/lib/active_record/associations/belongs_to_association.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/associations/belongs_to_association.rb
+++ b/activerecord/lib/active_record/associations/belongs_to_association.rb
@@ -12,7 +12,7 @@ module ActiveRecord
target.destroy
raise ActiveRecord::Rollback unless target.destroyed?
when :destroy_async
- id = owner.send(reflection.foreign_key.to_sym)
+ id = owner.public_send(reflection.foreign_key.to_sym)
primary_key_column = reflection.active_record_primary_key.to_sym
enqueue_destroy_association( | Every foreign_key column is supposed to be a public method |
diff --git a/spec/lib/finders/finder/enumerator_spec.rb b/spec/lib/finders/finder/enumerator_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/finders/finder/enumerator_spec.rb
+++ b/spec/lib/finders/finder/enumerator_spec.rb
@@ -172,7 +172,7 @@ describe CMSScanner::Finders::Finder::Enumerator do
stub_request(:get, target_urls.key(2)).to_return(status: 200, body: 'rspec')
end
- it 'yield the expected items' do
+ it 'yield the expected item' do
expect { |b| finder.enumerate(target_urls, opts, &b) }.to yield_with_args(Typhoeus::Response, 2)
end
end
@@ -207,6 +207,18 @@ describe CMSScanner::Finders::Finder::Enumerator do
)
end
end
+
+ context 'when one header matches but the other not, using negative look-arounds' do
+ let(:opts) { super().merge(exclude_content: /\A((?!x\-cacheable)[\s\S])*\z/i) }
+
+ before do
+ stub_request(:head, target_urls.keys.last).and_return(status: 200, headers: { 'x-cacheable' => 'YES' })
+ end
+
+ it 'yield the expected item' do
+ expect { |b| finder.enumerate(target_urls, opts, &b) }.to yield_with_args(Typhoeus::Response, 2)
+ end
+ end
end
context 'when check_full_response' do | Adds specs to ensure --exclude-content-based works with negative patterns |
diff --git a/lib/accessly.rb b/lib/accessly.rb
index <HASH>..<HASH> 100644
--- a/lib/accessly.rb
+++ b/lib/accessly.rb
@@ -1,5 +1,6 @@
require "accessly/version"
require "accessly/query"
+require "accessly/policy/base"
require "accessly/permission/grant"
require "accessly/permission/revoke"
require "accessly/models/permitted_action" | we need to export our base policy on the gem |
diff --git a/Gulpfile.js b/Gulpfile.js
index <HASH>..<HASH> 100644
--- a/Gulpfile.js
+++ b/Gulpfile.js
@@ -12,7 +12,7 @@ var PACKAGE_SEARCH_PATH = (process.env.NODE_PATH ? process.env.NODE_PATH + path.
gulp.task('clean', function () {
- return del(['lib', '.screenshots']);
+ return del('lib');
});
gulp.task('lint', function () {
diff --git a/test/testcafe/screenshot-test.js b/test/testcafe/screenshot-test.js
index <HASH>..<HASH> 100644
--- a/test/testcafe/screenshot-test.js
+++ b/test/testcafe/screenshot-test.js
@@ -1,11 +1,14 @@
import path from 'path';
+import del from 'del';
import { expect } from 'chai';
import { statSync } from 'fs';
import { tmpNameSync as getTempFileName } from 'tmp';
fixture `Screenshot`
- .page('https://google.com');
+ .page('https://google.com')
+ .beforeEach(() => del('.screenshots/*'))
+ .afterEach(() => del('.screenshots/*'));
test('Take screenshot', async t => {
var screenshotName = getTempFileName({ template: 'screenshot-XXXXXX.png' }); | Refactor tests (closes #3) (#4) |
diff --git a/cmd/swarm/swarm-snapshot/create_test.go b/cmd/swarm/swarm-snapshot/create_test.go
index <HASH>..<HASH> 100644
--- a/cmd/swarm/swarm-snapshot/create_test.go
+++ b/cmd/swarm/swarm-snapshot/create_test.go
@@ -21,6 +21,7 @@ import (
"fmt"
"io/ioutil"
"os"
+ "runtime"
"sort"
"strconv"
"strings"
@@ -33,6 +34,10 @@ import (
// It runs a few "create" commands with different flag values and loads generated
// snapshot files to validate their content.
func TestSnapshotCreate(t *testing.T) {
+ if runtime.GOOS == "windows" {
+ t.Skip()
+ }
+
for _, v := range []struct {
name string
nodes int | cmd/swarm/swarm-snapshot: disable tests on windows (#<I>) |
diff --git a/cbamf/opt/optimize.py b/cbamf/opt/optimize.py
index <HASH>..<HASH> 100644
--- a/cbamf/opt/optimize.py
+++ b/cbamf/opt/optimize.py
@@ -147,9 +147,9 @@ def update_state_global(s, block, data, keep_time=True, **kwargs):
#pos:
bpos = s.create_block('pos')
if (bpos & block).sum() > 0:
- raise NotImplementedError("updating the particle positions is hard")
- #Mostly because I don't know wtf ns is in s.obj.update()
- #ns = "n's" = numbers. Do s.obj.rad.size to get n, then update rad, type
+ new_pos_params = new_state[bpos].copy().reshape(-1,3)
+ s.obj.pos = new_pos_params
+ s.obj.initialize(s.zscale)
#rad:
brad = s.create_block('rad')
if (brad & block).sum() > 0: | adding positional support for lm optimization in update state globals |
diff --git a/transport/grpc/doc.go b/transport/grpc/doc.go
index <HASH>..<HASH> 100644
--- a/transport/grpc/doc.go
+++ b/transport/grpc/doc.go
@@ -85,7 +85,7 @@
// myTransportCredentials := credentials.NewTLS(myTLSConfig)
// myChooser := peer.NewSingle(
// hostport.Identify("127.0.0.1:4443"),
-// t.NewDialer(DialerCredentials(myTransportCredentials)),
+// grpcTransport.NewDialer(DialerCredentials(myTransportCredentials)),
// )
// myserviceOutbound := grpcTransport.NewOutbound(myChooser)
// dispatcher := yarpc.NewDispatcher(yarpc.Config{ | copypasta error in transport/grpc/doc.go (#<I>)
The example was unclear and resulted in a question from a user. This clarifies it. |
diff --git a/python/ray/rllib/models/catalog.py b/python/ray/rllib/models/catalog.py
index <HASH>..<HASH> 100644
--- a/python/ray/rllib/models/catalog.py
+++ b/python/ray/rllib/models/catalog.py
@@ -132,7 +132,8 @@ class ModelCatalog(object):
print("Observation shape is {}".format(obs_shape))
if env_name in cls._registered_preprocessor:
- return cls._registered_preprocessor[env_name](options)
+ return cls._registered_preprocessor[env_name](
+ env.observation_space, options)
if obs_shape == ():
print("Using one-hot preprocessor for discrete envs.")
diff --git a/python/ray/rllib/test/test_catalog.py b/python/ray/rllib/test/test_catalog.py
index <HASH>..<HASH> 100644
--- a/python/ray/rllib/test/test_catalog.py
+++ b/python/ray/rllib/test/test_catalog.py
@@ -3,7 +3,7 @@ from ray.rllib.models.preprocessors import Preprocessor
class FakePreprocessor(Preprocessor):
- def __init__(self, options):
+ def _init(self):
pass | [rllib] Small fix for supporting custom preprocessors (#<I>)
* Small fix for supporting custom preprocessors
* PEP8
* fix test |
diff --git a/core/src/main/java/org/primefaces/extensions/component/localized/LocalizedRenderer.java b/core/src/main/java/org/primefaces/extensions/component/localized/LocalizedRenderer.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/primefaces/extensions/component/localized/LocalizedRenderer.java
+++ b/core/src/main/java/org/primefaces/extensions/component/localized/LocalizedRenderer.java
@@ -24,6 +24,7 @@ package org.primefaces.extensions.component.localized;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.nio.file.Paths;
import java.util.Locale;
import javax.el.ExpressionFactory;
@@ -133,7 +134,7 @@ public class LocalizedRenderer extends CoreRenderer {
}
protected Path existingPath(final String first, final String... more) {
- final Path path = Path.of(first, more);
+ final Path path = Paths.get(first, more);
return path.toFile().exists() ? path : null;
} | #<I> Localized Java 8 support (#<I>) |
diff --git a/docs/src/components/Button/index.js b/docs/src/components/Button/index.js
index <HASH>..<HASH> 100644
--- a/docs/src/components/Button/index.js
+++ b/docs/src/components/Button/index.js
@@ -3,21 +3,24 @@ import cx from "classnames"
import styles from "./index.css"
-const Button = (props) => (
- <span
- role="button"
- { ...props }
- className={ cx({
- [props.className]: true,
- [styles.button]: true,
- [styles.light]: props.light,
- [styles.vivid]: props.vivid,
- [styles.huge]: props.huge,
- }) }
- >
- { props.children }
- </span>
-)
+const Button = (props) => {
+ const { className, light, vivid, huge, ...otherProps } = props
+ return (
+ <span
+ role="button"
+ { ...otherProps }
+ className={ cx({
+ [className]: true,
+ [styles.button]: true,
+ [styles.light]: light,
+ [styles.vivid]: vivid,
+ [styles.huge]: huge,
+ }) }
+ >
+ { props.children }
+ </span>
+ )
+}
Button.propTypes = {
children: PropTypes.node, | Docs: avoid new React <I> warnings for Button component |
diff --git a/tethne/readers/base.py b/tethne/readers/base.py
index <HASH>..<HASH> 100644
--- a/tethne/readers/base.py
+++ b/tethne/readers/base.py
@@ -175,8 +175,6 @@ class FTParser(IterParser):
msg = f.read()
result = chardet.detect(msg)
- #self.buffer = open(self.path, 'r').read()
-
self.buffer = codecs.open(self.path, "r", result['encoding'].encode("utf-8"))
self.at_eof = False | removed open file line which is not used anymore |
diff --git a/salt/modules/moosefs.py b/salt/modules/moosefs.py
index <HASH>..<HASH> 100644
--- a/salt/modules/moosefs.py
+++ b/salt/modules/moosefs.py
@@ -144,7 +144,7 @@ def getgoal(path, opts=None):
out = __salt__['cmd.run_all'](cmd)
output = out['stdout'].splitlines()
- if not 'r' in opts:
+ if 'r' not in opts:
goal = output[0].split(': ')
ret = {
'goal': goal[1], | Fix PEP8 E<I> - test for membership should be "not in" |
diff --git a/lib/Thelia/Controller/Admin/FileController.php b/lib/Thelia/Controller/Admin/FileController.php
index <HASH>..<HASH> 100644
--- a/lib/Thelia/Controller/Admin/FileController.php
+++ b/lib/Thelia/Controller/Admin/FileController.php
@@ -190,16 +190,10 @@ class FileController extends BaseAdminController
throw new ProcessFileException('', 404);
}
- $defaultTitle = $parentModel->getTitle();
-
- if (empty($defaultTitle)) {
- $defaultTitle = $fileBeingUploaded->getClientOriginalName();
- }
-
$fileModel
->setParentId($parentId)
->setLocale(Lang::getDefaultLanguage()->getLocale())
- ->setTitle($defaultTitle)
+ ->setTitle($parentModel->getTitle())
;
$fileCreateOrUpdateEvent = new FileCreateOrUpdateEvent($parentId); | The image file name is no longer the default image title |
diff --git a/src/OAuth2ServerServiceProvider.php b/src/OAuth2ServerServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/OAuth2ServerServiceProvider.php
+++ b/src/OAuth2ServerServiceProvider.php
@@ -81,7 +81,7 @@ class OAuth2ServerServiceProvider extends ServiceProvider
$grant->setVerifyCredentialsCallback($grantParams['callback']);
}
if (array_key_exists('auth_code_ttl', $grantParams)) {
- $grant->setAuthCodeTTL($grantParams['auth_code_ttl']);
+ $grant->setAuthTokenTTL($grantParams['auth_code_ttl']);
}
if (array_key_exists('refresh_token_ttl', $grantParams)) {
$grant->setRefreshTokenTTL($grantParams['refresh_token_ttl']); | change setAuthCodeTTL to setAuthTokenTTL so it matches the library |
diff --git a/src/Psalm/Internal/Stubs/CoreGenericFunctions.php b/src/Psalm/Internal/Stubs/CoreGenericFunctions.php
index <HASH>..<HASH> 100644
--- a/src/Psalm/Internal/Stubs/CoreGenericFunctions.php
+++ b/src/Psalm/Internal/Stubs/CoreGenericFunctions.php
@@ -126,7 +126,6 @@ function array_search($needle, array $haystack, bool $strict = false) {}
* @param array<mixed,T> $arr
* @param callable(T,T):int $callback
* @param-out array<int,T> $arr
- * @return bool
*/
function usort(array &$arr, callable $callback): bool {} | "usort": revert small change in the phpdoc |
diff --git a/app/components/marty/data_import_view.rb b/app/components/marty/data_import_view.rb
index <HASH>..<HASH> 100644
--- a/app/components/marty/data_import_view.rb
+++ b/app/components/marty/data_import_view.rb
@@ -27,6 +27,7 @@ class Marty::DataImportView < Marty::CmFormPanel
comboname.on('select', function(combo, record) {
textname.setValue("");
+ me.netzkeGetComponent('result').updateBodyHtml('');
});
}
JS
diff --git a/lib/marty/version.rb b/lib/marty/version.rb
index <HASH>..<HASH> 100644
--- a/lib/marty/version.rb
+++ b/lib/marty/version.rb
@@ -1,3 +1,3 @@
module Marty
- VERSION = "0.0.22"
+ VERSION = "0.0.23"
end | clear import view result message when new import is selected. |
diff --git a/ontrack-extension-git/src/main/java/net/nemerosa/ontrack/extension/git/service/GitServiceImpl.java b/ontrack-extension-git/src/main/java/net/nemerosa/ontrack/extension/git/service/GitServiceImpl.java
index <HASH>..<HASH> 100644
--- a/ontrack-extension-git/src/main/java/net/nemerosa/ontrack/extension/git/service/GitServiceImpl.java
+++ b/ontrack-extension-git/src/main/java/net/nemerosa/ontrack/extension/git/service/GitServiceImpl.java
@@ -320,8 +320,11 @@ public class GitServiceImpl extends AbstractSCMChangeLogService implements GitSe
info.post("Getting list of tags");
Collection<GitTag> tags = gitClient.getTags();
// Pattern for the tags
- // TODO Make the pattern configurable at branch level using a property
- final Pattern tagPattern = Pattern.compile("(.*)");
+ String tagExpression = "(.*)";
+ if (StringUtils.isNotBlank(configuration.getTagPattern())) {
+ tagExpression = configuration.getTagPattern().replace("*", "(.*)");
+ }
+ final Pattern tagPattern = Pattern.compile(tagExpression);
// Creates the builds
info.post("Creating builds from tags");
for (GitTag tag : tags) { | Git: tag pattern for the build/tag sync |
diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py
index <HASH>..<HASH> 100644
--- a/salt/modules/yumpkg.py
+++ b/salt/modules/yumpkg.py
@@ -287,7 +287,7 @@ def _get_yum_config():
# fall back to parsing the config ourselves
# Look for the config the same order yum does
fn = None
- paths = ('/etc/yum/yum.conf', '/etc/yum.conf')
+ paths = ('/etc/yum/yum.conf', '/etc/yum.conf', '/etc/dnf/dnf.conf')
for path in paths:
if os.path.exists(path):
fn = path | fixes pkgrepo for fedora><I> saltstack/salt#<I>
This makes modules.yumpkg complete independend from yum. yum is not
installed in fedora><I>, so this will actually fix pkgrepo in fedora. |
diff --git a/resources/lang/en/laravel-share-fa4.php b/resources/lang/en/laravel-share-fa4.php
index <HASH>..<HASH> 100644
--- a/resources/lang/en/laravel-share-fa4.php
+++ b/resources/lang/en/laravel-share-fa4.php
@@ -5,6 +5,6 @@ return [
'twitter' => '<li><a href=":url" class="social-button :class" id=":id"><span class="fa fa-twitter"></span></a></li>',
'gplus' => '<li><a href=":url" class="social-button :class" id=":id"><span class="fa fa-google-plus"></span></a></li>',
'linkedin' => '<li><a href=":url" class="social-button :class" id=":id"><span class="fa fa-linkedin"></span></a></li>',
- 'whatsapp' => '<li><a target="_blank" href=":url" class=":class" id=":id"><span class="fa fa-whatsapp"></span></a></li>',
+ 'whatsapp' => '<li><a target="_blank" href=":url" class="social-button :class" id=":id"><span class="fa fa-whatsapp"></span></a></li>',
]; | Update laravel-share-fa4.php |
diff --git a/notario/exceptions.py b/notario/exceptions.py
index <HASH>..<HASH> 100644
--- a/notario/exceptions.py
+++ b/notario/exceptions.py
@@ -12,10 +12,6 @@ class Invalid(Exception):
self.schema_item = schema_item
self.path = path
self._reason = reason
-
- # FIXME: How the hell are we supposed to persist attributed from our
- # class to the Exception one? Neither of the above persist which is
- # utterly annoying
Exception.__init__(self, self.__str__())
def __str__(self): | remove FIXME as it is already fixed |
diff --git a/src/common/models/User.php b/src/common/models/User.php
index <HASH>..<HASH> 100644
--- a/src/common/models/User.php
+++ b/src/common/models/User.php
@@ -35,6 +35,7 @@ use yii\web\IdentityInterface;
class User extends Model implements IdentityInterface
{
public $id;
+ public $name;
public $email;
public $username;
public $type; | + `user` field to User model |
diff --git a/Resources/public/js/controllers/commentController.js b/Resources/public/js/controllers/commentController.js
index <HASH>..<HASH> 100644
--- a/Resources/public/js/controllers/commentController.js
+++ b/Resources/public/js/controllers/commentController.js
@@ -15,8 +15,10 @@ portfolioApp
};
$scope.updateCountViewComments = function () {
- portfolioManager.portfolio.commentsViewAt = new Date();
- portfolioManager.save(portfolioManager.portfolio);
+ if (0 < portfolioManager.portfolio.unreadComments) {
+ portfolioManager.portfolio.commentsViewAt = new Date();
+ portfolioManager.save(portfolioManager.portfolio);
+ }
$scope.displayComment= !$scope.displayComment;
}
}]);
\ No newline at end of file | [PortfolioBundle] Don't update comment view date on portfolio if no new comments |
diff --git a/sharepoint/lists/__init__.py b/sharepoint/lists/__init__.py
index <HASH>..<HASH> 100644
--- a/sharepoint/lists/__init__.py
+++ b/sharepoint/lists/__init__.py
@@ -205,12 +205,28 @@ class SharePointList(object):
response = self.opener.post_soap(LIST_WEBSERVICE, xml,
soapaction='http://schemas.microsoft.com/sharepoint/soap/UpdateListItems')
+ for result in response.xpath('.//sp:Result', namespaces=namespaces):
+ batch_id, batch_result = result.attrib['ID'].split(',')
+ row = rows_by_batch_id[int(batch_id)]
+ if batch_result in ('Update', 'New'):
+ row._update(result.xpath('z:row', namespaces=namespaces)[0],
+ clear=True)
+ else:
+ self._deleted_rows.remove(row)
+
+ assert not self._deleted_rows
+ assert [(not row._changed) for row in self.rows]
+
class SharePointListRow(object):
# fields, list and opener are added as class attributes in SharePointList.row_class
def __init__(self, row={}):
- self._data = {}
- self._changed = set()
+ self._update(row, clear=True)
+
+ def _update(self, row, clear=False):
+ if clear:
+ self._data = {}
+ self._changed = set()
for field in self.fields:
value = field.parse(row)
if value is not None: | SharePointList.save() now pays attention to responses. |
diff --git a/tests/Phive/Tests/Queue/Db/Pdo/AbstractPdoQueueTest.php b/tests/Phive/Tests/Queue/Db/Pdo/AbstractPdoQueueTest.php
index <HASH>..<HASH> 100644
--- a/tests/Phive/Tests/Queue/Db/Pdo/AbstractPdoQueueTest.php
+++ b/tests/Phive/Tests/Queue/Db/Pdo/AbstractPdoQueueTest.php
@@ -7,7 +7,7 @@ use Phive\Tests\Queue\HandlerAwareQueueTest;
abstract class AbstractPdoQueueTest extends HandlerAwareQueueTest
{
- public function testPdoThrowsExceptionOnError()
+ public function testRuntimeExceptionThrowing()
{
$options = static::$handler->getOptions();
$options['table_name'] = uniqid('non_existing_table_name_');
@@ -34,7 +34,7 @@ abstract class AbstractPdoQueueTest extends HandlerAwareQueueTest
continue;
}
- $this->fail('PDO throws \Phive\RuntimeException on error.');
+ $this->fail(get_class($queue).":$method() throws \\Phive\\RuntimeException on error.");
}
} | Replace deprecated Mongo with MongoClient (since mongo extension <I>) |
diff --git a/tests/runtests.php b/tests/runtests.php
index <HASH>..<HASH> 100755
--- a/tests/runtests.php
+++ b/tests/runtests.php
@@ -64,8 +64,16 @@ PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNI
//require_once 'bootstrap.php';
-$runner = ezpTestRunner::instance();
-$runner->run($_SERVER['argv']);
+try
+{
+ $runner = ezpTestRunner::instance();
+ $runner->run($_SERVER['argv']);
+}
+catch ( Exception $e )
+{
+ $cli->error( $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine() );
+ $cli->error( $e->getTraceAsString() );
+}
$script->shutdown(); | Added a try/catch block in test runner script in order to increase verbosity in case of an error |
diff --git a/FrontBundle/Controller/NodeController.php b/FrontBundle/Controller/NodeController.php
index <HASH>..<HASH> 100644
--- a/FrontBundle/Controller/NodeController.php
+++ b/FrontBundle/Controller/NodeController.php
@@ -27,8 +27,7 @@ class NodeController extends Controller
*/
public function showAction($nodeId)
{
- $nodes = $this->get('php_orchestra_model.repository.node')->findWithPublishedAndLastVersion($nodeId);
- $node = $nodes->toArray();
+ $node = $this->get('php_orchestra_model.repository.node')->findWithPublishedAndLastVersion($nodeId);
if (is_null($node)) {
throw new NonExistingDocumentException();
@@ -37,7 +36,7 @@ class NodeController extends Controller
$response = $this->render(
'PHPOrchestraFrontBundle:Node:show.html.twig',
array(
- 'node' => array_shift($node),
+ 'node' => $node,
'datetime' => time()
)
); | get a single result, remove toArray and array_shift |
diff --git a/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java b/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java
index <HASH>..<HASH> 100755
--- a/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java
+++ b/src/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java
@@ -216,6 +216,12 @@ public class BloatedAssignmentScope extends BytecodeScanningDetector {
if (catchHandlers.get(pc)) {
ignoreRegs.set(reg);
+ ScopeBlock catchSB = findScopeBlock(rootScopeBlock, pc+1);
+ if ((catchSB != null) && (catchSB.getStart() < pc)) {
+ ScopeBlock sb = new ScopeBlock(pc, catchSB.getFinish());
+ catchSB.setFinish(getPC() - 1);
+ rootScopeBlock.addChild(sb);
+ }
} else if (monitorSyncPCs.size() > 0) {
ignoreRegs.set(reg);
} else if (sawNull) { | remove some BAS FPs when variable is used in multiple stacked catches |
diff --git a/src/main/java/com/j256/ormlite/jdbc/JdbcCompiledStatement.java b/src/main/java/com/j256/ormlite/jdbc/JdbcCompiledStatement.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/j256/ormlite/jdbc/JdbcCompiledStatement.java
+++ b/src/main/java/com/j256/ormlite/jdbc/JdbcCompiledStatement.java
@@ -54,11 +54,12 @@ public class JdbcCompiledStatement implements CompiledStatement {
return new JdbcDatabaseResults(preparedStatement, preparedStatement.executeQuery());
}
- public boolean runExecute() throws SQLException {
- if (type != StatementType.SELECT) {
+ public int runExecute() throws SQLException {
+ if (type != StatementType.EXECUTE) {
throw new IllegalArgumentException("Cannot call execute on a " + type + " statement");
}
- return preparedStatement.execute();
+ preparedStatement.execute();
+ return preparedStatement.getUpdateCount();
}
public DatabaseResults getGeneratedKeys() throws SQLException { | Make runExecute return int again after reading the docs more. |
diff --git a/examples/Maps/package.js b/examples/Maps/package.js
index <HASH>..<HASH> 100644
--- a/examples/Maps/package.js
+++ b/examples/Maps/package.js
@@ -1,6 +1,6 @@
enyo.depends(
"$lib/onyx",
- "$lib/layout/fittable",
+ "$lib/layout",
"$lib/extra/jsonp",
"maps",
"source/mockdata.js",
diff --git a/examples/Maps/source/Pullout.js b/examples/Maps/source/Pullout.js
index <HASH>..<HASH> 100644
--- a/examples/Maps/source/Pullout.js
+++ b/examples/Maps/source/Pullout.js
@@ -1,6 +1,6 @@
enyo.kind({
name: "Pullout",
- kind: "onyx.Slideable",
+ kind: "enyo.Slideable",
events: {
onDropPin: "",
onShowTraffic: "", | maps app: onyx.Slideable -> enyo.Slideable |
diff --git a/pyontutils/scigraph_codegen.py b/pyontutils/scigraph_codegen.py
index <HASH>..<HASH> 100755
--- a/pyontutils/scigraph_codegen.py
+++ b/pyontutils/scigraph_codegen.py
@@ -887,8 +887,16 @@ class State2(State):
return None, ''
-def moduleDirect(api_url, basepath, module_name):
+def moduleDirect(basepath, module_name, *, version=2):
""" Avoid the need for dynamics altogether """
+ if version < 2:
+ state = State
+ docs_path = 'api-docs'
+ else:
+ state = State2
+ docs_path = 'swagger.json'
+
+ api_url = f'{basepath}/{docs_path}'
s = state(api_url, basepath)
code = s.code()
return importDirect(code, module_name) | scigraph codegen fix bugs in moduleDirect
now only need to provide basepath, api_uri is generated from that |
diff --git a/abydos/distance/_token_distance.py b/abydos/distance/_token_distance.py
index <HASH>..<HASH> 100644
--- a/abydos/distance/_token_distance.py
+++ b/abydos/distance/_token_distance.py
@@ -806,9 +806,14 @@ member function, such as Levenshtein."
# A marks array to indicate stars, primes, & covers
# bit 1 = starred
+ MUNKRES_STARRED = 1
# bit 2 = primed
+ MUNKRES_PRIMED = 2
# bit 4 = covered row
+ MUNKRES_ROW_COVERED = 4
# bit 8 = covered col
+ MUNKRES_COL_COVERED = 8
+ MUNKRES_COVERED = MUNKRES_COL_COVERED | MUNKRES_ROW_COVERED
marks = np_zeros((n, n), dtype=np.int8)
for col in range(len(src_only)):
@@ -840,9 +845,9 @@ member function, such as Levenshtein."
for col in range(n):
for row in range(n):
if arr[row, col] == 0:
- if sum(marks[row, :] & 1) == 0 and sum(marks[:, col] & 1) == 0:
- marks[row, col] |= 1
- marks[:, col] |= 8
+ if sum(marks[row, :] & MUNKRES_STARRED) == 0 and sum(marks[:, col] & MUNKRES_STARRED) == 0:
+ marks[row, col] |= MUNKRES_STARRED
+ marks[:, col] |= MUNKRES_COL_COVERED
return intersection | switched from integers to flag value constants |
diff --git a/pyresttest/resttest.py b/pyresttest/resttest.py
index <HASH>..<HASH> 100644
--- a/pyresttest/resttest.py
+++ b/pyresttest/resttest.py
@@ -290,7 +290,7 @@ def run_test(mytest, test_config = TestConfig(), context = None):
#print str(test_config.print_bodies) + ',' + str(not result.passed) + ' , ' + str(test_config.print_bodies or not result.passed)
#Print response body if override is set to print all *OR* if test failed (to capture maybe a stack trace)
- if test_config.print_bodies:
+ if test_config.print_bodies or not result.passed:
if test_config.interactive:
print "RESPONSE:"
print result.body
@@ -598,7 +598,7 @@ def main(args):
# Override configs from command line if config set
for t in tests:
- if 'print_bodies' in args and args['print_bodies'] is not None and not bool(args['print_bodies']):
+ if 'print_bodies' in args and args['print_bodies'] is not None and bool(args['print_bodies']):
t.config.print_bodies = safe_to_bool(args['print_bodies'])
if 'interactive' in args and args['interactive'] is not None: | Fix print-bodies command line argument, and print body on failure |
diff --git a/lib/fit4ruby/version.rb b/lib/fit4ruby/version.rb
index <HASH>..<HASH> 100644
--- a/lib/fit4ruby/version.rb
+++ b/lib/fit4ruby/version.rb
@@ -1,4 +1,4 @@
module Fit4Ruby
# The version number of the library.
- VERSION = '1.6.0'
+ VERSION = '1.6.1'
end | Bumping version to <I> |
diff --git a/graphics/widgets.py b/graphics/widgets.py
index <HASH>..<HASH> 100644
--- a/graphics/widgets.py
+++ b/graphics/widgets.py
@@ -42,9 +42,8 @@ class wButton(ptg.Button):
self.status = 0
ptg.Button.__init__(self, *args, **kargs)
-
-def __call__(self, *args, **kargs):
- return self.func(*args, **kargs)
+ def __call__(self, *args, **kargs):
+ return self.func(*args, **kargs)
# Widget to allow toggling between True and False to be collected | Fixed an indent error on the call for the wButton |
diff --git a/ui/plugins/pinboard.js b/ui/plugins/pinboard.js
index <HASH>..<HASH> 100644
--- a/ui/plugins/pinboard.js
+++ b/ui/plugins/pinboard.js
@@ -126,6 +126,11 @@ treeherder.controller('PinboardCtrl', [
};
$scope.canSaveClassifications = function() {
+ if ($scope.enteringBugNumber) {
+ // we should save this for the user, as they likely
+ // just forgot to hit enter.
+ $scope.saveEnteredBugNumber();
+ }
var thisClass = $scope.classification;
return $scope.hasPinnedJobs() && (thPinboard.hasRelatedBugs() && $scope.user.loggedin ||
thisClass.failure_classification_id !== 4 || | Bug <I> - Save whatever's typed into the bug field before seeing if we can save the classification (#<I>) r=camd |
diff --git a/lib/mxit_rails/mxit_api/api_client.rb b/lib/mxit_rails/mxit_api/api_client.rb
index <HASH>..<HASH> 100644
--- a/lib/mxit_rails/mxit_api/api_client.rb
+++ b/lib/mxit_rails/mxit_api/api_client.rb
@@ -224,10 +224,6 @@ module MxitRails::MxitApi
use_ssl = uri.scheme == 'https'
response = Net::HTTP.start(uri.host, uri.port, :use_ssl => use_ssl) do |http|
- if use_ssl
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
- end
-
yield(http, uri.path)
end
end | Re-enabled SSL verification. OpenSSL::SSL::VERIFY_PEER is the default. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ install_requires = [
setup(
name='Flask-Table',
packages=['flask_table'],
- version='0.2.8',
+ version='0.2.9',
author='Andrew Plummer',
author_email='plummer574@gmail.com',
url='https://github.com/plumdog/flask_table', | Bump to version <I> |
diff --git a/spec/mongoid/finders_spec.rb b/spec/mongoid/finders_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/mongoid/finders_spec.rb
+++ b/spec/mongoid/finders_spec.rb
@@ -407,7 +407,9 @@ describe Mongoid::Finders do
end
describe ".find_by" do
+
context "when the document is found" do
+
let!(:person) do
Person.create(:ssn => "333-22-1111")
end
@@ -418,13 +420,13 @@ describe Mongoid::Finders do
end
context "when the document is not found" do
+
it "raises an error" do
expect {
Person.find_by(:ssn => "333-22-1111")
}.to raise_error(Mongoid::Errors::DocumentNotFound)
end
end
-
end
describe ".only" do | Fix formatting to match spec refactor |
diff --git a/packages/core/resolve-command/src/index.js b/packages/core/resolve-command/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/core/resolve-command/src/index.js
+++ b/packages/core/resolve-command/src/index.js
@@ -352,6 +352,13 @@ const executeCommand = async (pool, { jwtToken, ...command }) => {
throw generateCommandError(`Command type "${type}" does not exist`)
}
+ const encrypt = pool.encryptionAdapter
+ ? await pool.encryptionAdapter.getEncrypter(aggregateId)
+ : () =>
+ throw Error(
+ `data encryption is disabled: no encryption adapter provided`
+ )
+
const commandHandler = async (...args) => {
const segment = pool.performanceTracer
? pool.performanceTracer.getSegment()
@@ -383,7 +390,8 @@ const executeCommand = async (pool, { jwtToken, ...command }) => {
aggregateState,
command,
jwtToken,
- aggregateVersion
+ aggregateVersion,
+ encrypt
)
if (!checkOptionShape(event.type, [String])) {
@@ -469,14 +477,16 @@ const createCommand = ({
eventStore,
aggregates,
snapshotAdapter,
- performanceTracer
+ performanceTracer,
+ encryptionAdapter
}) => {
const pool = {
eventStore,
aggregates,
snapshotAdapter,
isDisposed: false,
- performanceTracer
+ performanceTracer,
+ encryptionAdapter
}
const api = { | Add encrypter to command handler |
diff --git a/lib/tower_cli/resources/job.py b/lib/tower_cli/resources/job.py
index <HASH>..<HASH> 100644
--- a/lib/tower_cli/resources/job.py
+++ b/lib/tower_cli/resources/job.py
@@ -52,7 +52,7 @@ class Resource(models.MonitorableResource):
help='Suppress any requests for input.')
@click.option('--extra-vars', type=types.File('r'), required=False)
@click.option('--tags', required=False)
- def launch(self, job_template, tags, monitor=False, timeout=None,
+ def launch(self, job_template, tags=None, monitor=False, timeout=None,
no_input=True, extra_vars=None):
"""Launch a new job based on a job template. | Resolve unittests failures by provided a default value for tags |
diff --git a/lib/graphql/batch/loader.rb b/lib/graphql/batch/loader.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql/batch/loader.rb
+++ b/lib/graphql/batch/loader.rb
@@ -44,8 +44,8 @@ module GraphQL::Batch
end
def resolve #:nodoc:
+ return if resolved?
load_keys = queue
- return if load_keys.empty?
@queue = nil
perform(load_keys)
check_for_broken_promises(load_keys)
@@ -58,13 +58,16 @@ module GraphQL::Batch
# For Promise#sync
def wait #:nodoc:
if executor
- executor.loaders.delete(loader_key)
executor.resolve(self)
else
resolve
end
end
+ def resolved?
+ @queue.nil? || @queue.empty?
+ end
+
protected
# Fulfill the key with provided value, for use in #perform
diff --git a/test/graphql_test.rb b/test/graphql_test.rb
index <HASH>..<HASH> 100644
--- a/test/graphql_test.rb
+++ b/test/graphql_test.rb
@@ -342,6 +342,6 @@ class GraphQL::GraphQLTest < Minitest::Test
}
}
assert_equal expected, result
- assert_equal ["Product/1,2", "Product/2,3"], queries
+ assert_equal ["Product/1,2", "Product/3"], queries
end
end | Improve loader reuse (#<I>) |
diff --git a/core/src/main/java/com/orientechnologies/orient/core/id/ORecordId.java b/core/src/main/java/com/orientechnologies/orient/core/id/ORecordId.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/orientechnologies/orient/core/id/ORecordId.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/id/ORecordId.java
@@ -280,7 +280,7 @@ public class ORecordId implements ORID {
final ODatabaseRecord db = ODatabaseRecordThreadLocal.INSTANCE.get();
if (db == null)
throw new ODatabaseException(
- "No database found in current thread local space. If you manually control database over threads assure to set the current database before to use it by calling: ODatabaseRecordThreadLocal.INSTANCE.set(db);");
+ "No database found in current thread local space. If you manually control databases over threads assure to set the current database before to use it by calling: ODatabaseRecordThreadLocal.INSTANCE.set(db);");
return db.load(this);
} | Thrown ODatabaseException in case ORecordId.getRecord() has no database set in thread local |
diff --git a/lxd/node/raft_test.go b/lxd/node/raft_test.go
index <HASH>..<HASH> 100644
--- a/lxd/node/raft_test.go
+++ b/lxd/node/raft_test.go
@@ -26,7 +26,7 @@ func TestDetermineRaftNode(t *testing.T) {
&db.RaftNode{ID: 1},
},
{
- `cluster.https_address set and and no raft_nodes rows`,
+ `cluster.https_address set and no raft_nodes rows`,
"1.2.3.4:8443",
[]string{},
&db.RaftNode{ID: 1}, | lxd/node/raft/test: Corrects typo |
diff --git a/dbkit.py b/dbkit.py
index <HASH>..<HASH> 100644
--- a/dbkit.py
+++ b/dbkit.py
@@ -477,7 +477,7 @@ def transaction():
import sqlite3
import sys
- from dbkit import connect, transaction, query_value, execute, context
+ from dbkit import connect, transaction, query_value, execute
# ...do some stuff...
@@ -514,7 +514,7 @@ def transactional(wrapped):
import sqlite3
import sys
- from dbkit import connect, transactional, query_value, execute, context
+ from dbkit import connect, transactional, query_value, execute
# ...do some stuff... | context() isn't needed in these examples. |
diff --git a/lib/core/connection/msg.js b/lib/core/connection/msg.js
index <HASH>..<HASH> 100644
--- a/lib/core/connection/msg.js
+++ b/lib/core/connection/msg.js
@@ -130,7 +130,8 @@ class Msg {
}
Msg.getRequestId = function() {
- return ++_requestId;
+ _requestId = (_requestId + 1) & 0x7fffffff;
+ return _requestId;
};
class BinMsg { | fix(OpMsg): cap requestIds at 0x7fffffff
Since OpMsg uses buffer write methods, these methods can throw if the buffer
attempts to write a number to large for the space. We now cap the requestId
at 0x7fffffff and loop back around to 0
Fixes NODE-<I> |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -27,6 +27,7 @@ setup(
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
),
) | added python <I> to trove categories |
diff --git a/ores/scoring_contexts/tests/test_scoring_context.py b/ores/scoring_contexts/tests/test_scoring_context.py
index <HASH>..<HASH> 100644
--- a/ores/scoring_contexts/tests/test_scoring_context.py
+++ b/ores/scoring_contexts/tests/test_scoring_context.py
@@ -23,8 +23,8 @@ def test_scoring_context():
FakeExtractor = namedtuple("Extractor", ['extract', 'solve', 'language'])
- def fake_extract(rev_ids, dependents, caches=None):
- caches = caches or defaultdict(dict)
+ def fake_extract(rev_ids, dependents, cache=None):
+ caches = cache or defaultdict(dict)
for rev_id in rev_ids:
cache = caches[rev_id]
if rev_id % 5 != 0: | Fixes a scoring context test that was failing. |
diff --git a/lib/nodes/bundle.js b/lib/nodes/bundle.js
index <HASH>..<HASH> 100644
--- a/lib/nodes/bundle.js
+++ b/lib/nodes/bundle.js
@@ -51,9 +51,10 @@ registry.decl(BundleNodeName, BlockNode, /** @lends BundleNode.prototype */ {
}
// generate targets for page files
+ var optTechs = this.getOptimizerTechs();
this.getTechs().map(function(tech) {
var techNode = this.createTechNode(tech, bundleNode, this);
- if (techNode) {
+ if (techNode && ~optTechs.indexOf(tech)) {
this.createOptimizerNode(tech, techNode, bundleNode);
}
}, this);
@@ -106,6 +107,10 @@ registry.decl(BundleNodeName, BlockNode, /** @lends BundleNode.prototype */ {
];
},
+ getOptimizerTechs: function() {
+ return this.getTechs();
+ },
+
cleanup: function() {
var arch = this.ctx.arch;
if (!arch.hasNode(this.path)) return; | bem make: Ability to configure list of techs to optimize
Close #<I> |
diff --git a/lib/tack/forked_sandbox.rb b/lib/tack/forked_sandbox.rb
index <HASH>..<HASH> 100644
--- a/lib/tack/forked_sandbox.rb
+++ b/lib/tack/forked_sandbox.rb
@@ -24,14 +24,10 @@ module Tack
@reader.close
result = block.call
- Marshal.dump([:ok, result], @writer)
+
+ @writer.write(Base64.encode64(Marshal.dump([:ok, result])))
rescue Object => error
- Marshal.dump([
- :error,
- #[error.class, error.message, error.backtrace]
- Base64.encode64(error)
- ],
- @writer)
+ @writer.write(Base64.encode64(Marshal.dump([:error, error])))
ensure
@writer.close
exit! error ? 1 : 0
@@ -49,15 +45,12 @@ module Tack
while !(chunk=@reader.read).empty?
data << chunk
end
- status, result = Marshal.load(data)
+ status, result = Marshal.load(Base64.decode64(data))
case status
when :ok
return result
when :error
- #error_class, error_message, backtrace = result
- #error = error_class.new(error_message)
- #error.set_backtrace(backtrace)
- error = Base64.decode64(result)
+ error = result
raise error
else
raise "Unknown status #{status}" | Fix bug with how errors are passed through ForkedSandbox |
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -126,28 +126,4 @@ describe('#Requests', function() {
});
});
- it('should timeout', function(done) {
- var api = new WooCommerce({
- url: 'https://test.dev',
- consumerKey: 'ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
- consumerSecret: 'cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
- timeout: 1
- });
-
- nock('https://test.dev/wc-api/v3')
- .get('/orders')
- .reply(function(uri, requestBody, cb) {
- setTimeout(function() {
- return cb(null, {
- orders: []
- });
- }, 2);
- });
-
- api.get('orders', function(err) {
- chai.expect(err).to.be.a('error');
- chai.expect(err.message).to.equal('ETIMEDOUT');
- return done();
- });
- });
}); | No need to test timeout since is a "request" feature |
diff --git a/lib/woodhouse/scheduler.rb b/lib/woodhouse/scheduler.rb
index <HASH>..<HASH> 100644
--- a/lib/woodhouse/scheduler.rb
+++ b/lib/woodhouse/scheduler.rb
@@ -53,7 +53,12 @@ class Woodhouse::Scheduler
def start_worker(worker)
@config.logger.debug "Starting worker #{worker.describe}"
- @worker_sets[worker] = WorkerSet.new_link(Celluloid.current_actor, worker, @config) unless @worker_sets.has_key?(worker)
+ unless @worker_sets.has_key?(worker)
+ @worker_sets[worker] = WorkerSet.new_link(Celluloid.current_actor, worker, @config)
+ true
+ else
+ false
+ end
end
def stop_worker(worker, wait = false)
diff --git a/spec/scheduler_spec.rb b/spec/scheduler_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/scheduler_spec.rb
+++ b/spec/scheduler_spec.rb
@@ -20,9 +20,8 @@ describe Woodhouse::Scheduler do
end
it "should not create a new worker set when an existing worker is sent to #start_worker" do
- pending "figure out how to test this without mocha, which works badly with Celluloid"
- subject.start_worker worker
- subject.start_worker worker
+ subject.start_worker(worker).should be_true
+ subject.start_worker(worker).should be_false
end
it "should spin down and remove a worker set when a worker is sent to #stop_worker" do | Keep Scheduler#start_worker from leaking references to internals |
diff --git a/src/test/java/io/nats/streaming/PublishTests.java b/src/test/java/io/nats/streaming/PublishTests.java
index <HASH>..<HASH> 100644
--- a/src/test/java/io/nats/streaming/PublishTests.java
+++ b/src/test/java/io/nats/streaming/PublishTests.java
@@ -95,11 +95,12 @@ public class PublishTests {
@Test
public void testMaxPubAcksInFlight() throws Exception {
+ int timeoutInSeconds = 5;
try (NatsStreamingTestServer srv = new NatsStreamingTestServer(clusterName, false)) {
try (Connection nc = Nats.connect(srv.getURI())) {
Options opts = new Options.Builder()
.maxPubAcksInFlight(1)
- .pubAckWait(Duration.ofSeconds(2))
+ .pubAckWait(Duration.ofSeconds(timeoutInSeconds))
.natsConn(nc)
.build();
@@ -125,7 +126,7 @@ public class PublishTests {
}
Instant end = Instant.now().plusMillis(100);
// So if the loop ended before the PubAckWait timeout, then it's a failure.
- if (Duration.between(start, end).compareTo(Duration.ofSeconds(1)) < 0) {
+ if (Duration.between(start, end).compareTo(Duration.ofSeconds(timeoutInSeconds)) < 0) {
fail("Should have blocked after 1 message sent");
}
} | working on flaky tests, timing for ack timeout |
diff --git a/heyui/plugins/notify/index.js b/heyui/plugins/notify/index.js
index <HASH>..<HASH> 100644
--- a/heyui/plugins/notify/index.js
+++ b/heyui/plugins/notify/index.js
@@ -23,6 +23,7 @@ const notifyContainerCls = 'h-notify-container';
const notifyBodyCls = 'h-notify-body';
const notifyCloseCls = 'h-notify-close';
const notifyMaskCls = 'h-notify-mask';
+const notifyHasMaskCls = 'h-notify-has-mask';
const notifyShowCls = 'h-notify-show';
const closeIcon = 'h-icon-close';
@@ -72,6 +73,9 @@ class Notify {
html += '</div>';
let $body = document.createElement(`div`);
utils.addClass($body, notifyCls);
+ if (param.hasMask) {
+ utils.addClass($body, notifyHasMaskCls);
+ }
if (param.class) {
utils.addClass($body, param.class);
} | fix: modal plugin add notify-has-class on $body |
diff --git a/compliance_checker/cf/cf.py b/compliance_checker/cf/cf.py
index <HASH>..<HASH> 100644
--- a/compliance_checker/cf/cf.py
+++ b/compliance_checker/cf/cf.py
@@ -854,11 +854,9 @@ class CFBaseCheck(BaseCheck):
ok_count = 0
same_type = flag_masks.dtype == v.dtype
- type_ok = v.dtype in [np.character,
- np.dtype('b'),
- np.dtype('i4'),
- np.int32]
-
+ type_ok = (np.issubdtype(v.dtype, int) or
+ np.issubdtype(v.dtype, 'S') or
+ np.issubdtype(v.dtype, 'b'))
if same_type:
ok_count += 1
else: | Allow flag_masks to have any bitwise operator as a value. Fixes #<I> |
diff --git a/lib/LibCharacteristic.js b/lib/LibCharacteristic.js
index <HASH>..<HASH> 100644
--- a/lib/LibCharacteristic.js
+++ b/lib/LibCharacteristic.js
@@ -14,7 +14,7 @@ module.exports = class LibCharacteristic extends LibObject {
// ===== Constructor =========================================================
constructor (parent, params) {
- super(parent._platform, params.name)
+ super(parent._platform, parent.name)
this._parent = parent
this._context = parent._context
this._key = params.key
@@ -99,8 +99,10 @@ module.exports = class LibCharacteristic extends LibObject {
'set %s to %s%s', this._characteristic.displayName,
value, this._unit
)
+ } else if (this._characteristic.eventOnlyCharacteristic) {
+ this.log('%s %s', this._characteristic.displayName, value)
} else {
- if (!this._characteristic.eventOnlyCharacteristic && value === this._value) {
+ if (value === this._value) {
return
}
this.log( | Enhancements
- Different message for event-only characteristic
- Set name to parent's name [TODO: doesn't yet work for _Name_ characteristic]. |
diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -1,6 +1,7 @@
-var Emitter = require('../');
var test = require('tape');
+var Emitter = require('../');
+
test('init', function(is) {
is.plan(1); | refactor requires in test js |
diff --git a/lib/utilities.js b/lib/utilities.js
index <HASH>..<HASH> 100755
--- a/lib/utilities.js
+++ b/lib/utilities.js
@@ -1 +1,21 @@
var git = require('../');
+
+/**
+ * Check if error is null, if it is not, convert it to a GitError and call
+ * the callback.
+ *
+ * @param {Object} error
+ * @param {Function} callback
+ * @return {Boolean} True if the error was null, false otherwise.
+ */
+exports.success = function(error, callback) {
+ if (error) {
+ if (error instanceof git.error) {
+ callback(error);
+ } else {
+ callback(git.error(error));
+ }
+ return false;
+ }
+ return true;
+}; | Added success to utilities.js to handle if (error) then wrap it and call callback |
diff --git a/test/stripe/stripe_object_test.rb b/test/stripe/stripe_object_test.rb
index <HASH>..<HASH> 100644
--- a/test/stripe/stripe_object_test.rb
+++ b/test/stripe/stripe_object_test.rb
@@ -258,5 +258,19 @@ module Stripe
serialized = Stripe::StripeObject.serialize_params(obj, :force => true)
assert_equal({ :id => 'id', :metadata => { :foo => 'bar' } }, serialized)
end
+
+ should "#dirty! forces an object and its subobjects to be saved" do
+ obj = Stripe::StripeObject.construct_from({
+ :id => 'id',
+ :metadata => Stripe::StripeObject.construct_from({ :foo => 'bar' })
+ })
+
+ # note that `force` and `dirty!` are for different things, but are
+ # functionally equivalent
+ obj.dirty!
+
+ serialized = Stripe::StripeObject.serialize_params(obj)
+ assert_equal({ :id => 'id', :metadata => { :foo => 'bar' } }, serialized)
+ end
end
end | Add spec for `#dirty!` |
diff --git a/quilt/revert.py b/quilt/revert.py
index <HASH>..<HASH> 100644
--- a/quilt/revert.py
+++ b/quilt/revert.py
@@ -59,7 +59,7 @@ class Revert(Command):
raise QuiltError("File %s is modified by patch %s" % \
(filename, patch.get_name()))
- def _apply_patch_tempoary(self, tmpdir, file, patch):
+ def _apply_patch_temporary(self, tmpdir, file, patch):
backup = Backup()
backup_file = backup.backup_file(file, tmpdir)
patch_file = self.quilt_patches + File(patch.get_name()) | Fix typo in method name
Rename _apply_patch_tempoary to _apply_patch_temporary |
diff --git a/src/Sylius/Bundle/ResourceBundle/Resources/public/js/form-collection.js b/src/Sylius/Bundle/ResourceBundle/Resources/public/js/form-collection.js
index <HASH>..<HASH> 100644
--- a/src/Sylius/Bundle/ResourceBundle/Resources/public/js/form-collection.js
+++ b/src/Sylius/Bundle/ResourceBundle/Resources/public/js/form-collection.js
@@ -168,5 +168,7 @@
$(document).trigger('dom-node-inserted', [$(addedElement)]);
});
- $('[data-form-type="collection"]').CollectionForm();
-}(jQuery);
\ No newline at end of file
+ $(document).ready(function () {
+ $('[data-form-type="collection"]').CollectionForm();
+ });
+}(jQuery); | [ResourceBundle] Initialize form collection when DOM is ready |
diff --git a/test/connection_test.js b/test/connection_test.js
index <HASH>..<HASH> 100644
--- a/test/connection_test.js
+++ b/test/connection_test.js
@@ -12,6 +12,7 @@ var testCase = require('nodeunit').testCase,
Script = require('vm'),
Collection = mongodb.Collection,
Server = mongodb.Server,
+ ReadPreference = mongodb.ReadPreference,
ServerManager = require('../test/tools/server_manager').ServerManager;
// Test db
@@ -227,6 +228,17 @@ exports.testConnectUsingSocketOptions = function(test) {
})
}
+exports.testConnectUsingSocketOptionsAndReadPreferenceAsObject = function(test) {
+ var db = new Db(MONGODB, new Server("127.0.0.1", mongodb.Connection.DEFAULT_PORT
+ , {readPreference: new ReadPreference("secondary"), auto_reconnect: true, poolSize: 4, socketOptions:{keepAlive:100}, ssl:useSSL}),{w:0, native_parser: (process.env['TEST_NATIVE'] != null)});
+ db.open(function(err, db) {
+ test.equal(null, err);
+ test.equal(100, db.serverConfig.checkoutWriter().socketOptions.keepAlive)
+ test.done();
+ db.close();
+ })
+}
+
/**
* Retrieve the server information for the current
* instance of the db client | Added connection test when readPreference passed to server is a ReadPreference object |
diff --git a/saharaclient/api/client.py b/saharaclient/api/client.py
index <HASH>..<HASH> 100644
--- a/saharaclient/api/client.py
+++ b/saharaclient/api/client.py
@@ -54,17 +54,18 @@ class Client(object):
service_name=service_name,
region_name=region_name)
input_auth_token = keystone.session.get_token(auth)
- try:
- sahara_catalog_url = keystone.session.get_endpoint(
- auth, interface=endpoint_type,
- service_type=service_type)
- except kex.EndpointNotFound:
- # This is support of 'data_processing' service spelling
- # which was used for releases before Kilo
- service_type = service_type.replace('-', '_')
- sahara_catalog_url = keystone.session.get_endpoint(
- auth, interface=endpoint_type,
- service_type=service_type)
+ if not sahara_catalog_url:
+ try:
+ sahara_catalog_url = keystone.session.get_endpoint(
+ auth, interface=endpoint_type,
+ service_type=service_type)
+ except kex.EndpointNotFound:
+ # This is support of 'data_processing' service spelling
+ # which was used for releases before Kilo
+ service_type = service_type.replace('-', '_')
+ sahara_catalog_url = keystone.session.get_endpoint(
+ auth, interface=endpoint_type,
+ service_type=service_type)
else:
keystone = self.get_keystone_client(
username=username, | Added --bypass-url support for keystone 3
Keystone 3 section of code should respect --bypass-url too.
Change-Id: I<I>e7c9bef<I>bcc<I>f<I>d4fcac3
Closes-Bug: #<I> |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -25,12 +25,14 @@ module.exports = function responseTime(){
return function(req, res, next){
next = next || noop;
if (res._responseTime) return next();
- var start = Date.now();
res._responseTime = true;
+ var startAt = process.hrtime()
+
onHeaders(res, function () {
- var duration = Date.now() - start
- this.setHeader('X-Response-Time', duration + 'ms')
+ var diff = process.hrtime(startAt)
+ var ms = diff[0] * 1e3 + diff[1] * 1e-6
+ this.setHeader('X-Response-Time', ms.toFixed(3) + 'ms')
})
next(); | make timer immune to clock drift and more precise |
diff --git a/test/AlexaSmartHome/Request/RequestTest.php b/test/AlexaSmartHome/Request/RequestTest.php
index <HASH>..<HASH> 100644
--- a/test/AlexaSmartHome/Request/RequestTest.php
+++ b/test/AlexaSmartHome/Request/RequestTest.php
@@ -3,6 +3,7 @@
namespace Tests\AlexaSmartHome\Request;
use \InternetOfVoice\LibVoice\AlexaSmartHome\Request\Request;
+use \InvalidArgumentException;
use \PHPUnit\Framework\TestCase;
/**
@@ -13,8 +14,6 @@ use \PHPUnit\Framework\TestCase;
*/
class RequestTest extends TestCase {
/**
- * testRequest
- *
* @group smarthome
*/
public function testRequest() {
@@ -29,4 +28,12 @@ class RequestTest extends TestCase {
$this->assertEquals('BearerToken', $request->getDirective()->getPayload()->getScope()->getType());
$this->assertEquals('access-token-send-by-skill', $request->getDirective()->getPayload()->getScope()->getToken());
}
+
+ /**
+ * @group smarthome
+ */
+ public function testMissingDirective() {
+ $this->expectException(InvalidArgumentException::class);
+ new Request([]);
+ }
} | Smart home: Extend RequestTest |
diff --git a/bcbio/install.py b/bcbio/install.py
index <HASH>..<HASH> 100644
--- a/bcbio/install.py
+++ b/bcbio/install.py
@@ -146,7 +146,8 @@ def upgrade_bcbio_data(args, remotes):
remotes["genome_resources"])
_upgrade_snpeff_data(s["fabricrc_overrides"]["galaxy_home"], args, remotes)
if 'data' in args.toolplus:
- subprocess.check_call(["gemini", "update", "--dataonly"])
+ gemini = os.path.join(os.path.dirname(sys.executable), "gemini")
+ subprocess.check_call([gemini, "update", "--dataonly"])
def _upgrade_genome_resources(galaxy_dir, base_url):
"""Retrieve latest version of genome resource YAML configuration files. | Do not require gemini to be on PATH for data updates. Thanks to Nishanth Dandapanthu |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -5,6 +5,10 @@ var _ = require('lodash');
function changed(Model, options) {
'use strict';
+ if(typeof Model[options.callback] !== 'function') {
+ console.warn('Callback %s is not a model function', options.callback);
+ }
+
debug('Changed mixin for Model %s', Model.modelName);
var loopback = require('loopback');
@@ -68,6 +72,7 @@ function changed(Model, options) {
Model.getIdName()
]
}).then(function(items) {
+ if(typeof Model[options.callback] !== 'function') return false;
return Model[options.callback](Model.extractChangedItemIds(items));
})
.then(function(res) { | Add warning and skip execution if callback function is not defined |
diff --git a/src/test/java/com/github/dockerjava/core/command/StatsCmdImplTest.java b/src/test/java/com/github/dockerjava/core/command/StatsCmdImplTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/github/dockerjava/core/command/StatsCmdImplTest.java
+++ b/src/test/java/com/github/dockerjava/core/command/StatsCmdImplTest.java
@@ -51,7 +51,7 @@ public class StatsCmdImplTest extends AbstractDockerClientTest {
super.afterMethod(result);
}
- @Test
+ @Test(groups = "ignoreInCircleCi")
public void testStatsStreaming() throws InterruptedException, IOException {
TimeUnit.SECONDS.sleep(1); | Ignore with CirecleCI |
diff --git a/src/RdnUpload/File/File.php b/src/RdnUpload/File/File.php
index <HASH>..<HASH> 100755
--- a/src/RdnUpload/File/File.php
+++ b/src/RdnUpload/File/File.php
@@ -25,11 +25,6 @@ class File implements FileInterface
*/
public function __construct($basename, $path)
{
- if (!file_exists($path))
- {
- throw new \RuntimeException("File does not exist ($path)");
- }
-
$this->basename = $basename;
$this->path = $path;
} | don't throw exceptions if path does not exist
could be a temporary file output pointer in which case the file will
exist after the download operation is completed |
diff --git a/src/BuiltinServerFactory.php b/src/BuiltinServerFactory.php
index <HASH>..<HASH> 100644
--- a/src/BuiltinServerFactory.php
+++ b/src/BuiltinServerFactory.php
@@ -43,6 +43,11 @@ class BuiltinServerFactory
$timer = new Deferred;
$this->loop->addTimer(0.05, function () use ($timer, $process) {
+ if (DIRECTORY_SEPARATOR === '\\') {
+ // Pipes opened by proc_open() can break stream_select() loop in Windows.
+ // This fix might do the trick...
+ $process->stderr->close();
+ }
$timer->resolve($process);
}); | Improve[?] stream_select() behavior on Windows |
diff --git a/lib/CaptureClicks.js b/lib/CaptureClicks.js
index <HASH>..<HASH> 100644
--- a/lib/CaptureClicks.js
+++ b/lib/CaptureClicks.js
@@ -99,7 +99,7 @@ var CaptureClicks = React.createClass({
}.bind(this);
this.props.environment.navigate(
- url.pathname,
+ url.pathname + (url.hash.length > 1 ? url.hash : ''),
{onBeforeNavigation: onBeforeNavigation},
function(err, info) {
if (err) { | Allow intra-page hash routing. |
diff --git a/lib/drivers/docker/container.js b/lib/drivers/docker/container.js
index <HASH>..<HASH> 100644
--- a/lib/drivers/docker/container.js
+++ b/lib/drivers/docker/container.js
@@ -214,7 +214,9 @@ Container.prototype.dockerEnv = function() {
};
Container.prototype.startArgs = function() {
- var args = ['--cluster=0'];
+ var args = [
+ '--cluster=' + this.startOpts.size,
+ ];
if (this.startOpts.trace) {
args.push('--trace');
} | docker: start cluster at full size |
diff --git a/rest_framework_gis/fields.py b/rest_framework_gis/fields.py
index <HASH>..<HASH> 100644
--- a/rest_framework_gis/fields.py
+++ b/rest_framework_gis/fields.py
@@ -7,6 +7,11 @@ from django.utils.translation import ugettext_lazy as _
from rest_framework.fields import Field
+class JSONDict(dict):
+ def __str__(self):
+ return json.dumps(self)
+
+
class GeometryField(Field):
"""
A field to handle GeoDjango Geometry fields
@@ -20,6 +25,7 @@ class GeometryField(Field):
def to_representation(self, value):
if isinstance(value, dict) or value is None:
return value
+ return JSONDict(json.loads(GEOSGeometry(value).geojson))
# Get GeoDjango geojson serialization and then convert it _back_ to
# a Python object
return json.loads(GEOSGeometry(value).geojson) | Ensure GeoJSON is rendered correctly in browsable API
Valid for python 2 only.
Avoid representations like {u'type': u'Point', u'coordinates':
[<I>, <I>]}
For more information see #<I> |
diff --git a/lib/dashboard/public/elements/ncg-dialog.js b/lib/dashboard/public/elements/ncg-dialog.js
index <HASH>..<HASH> 100644
--- a/lib/dashboard/public/elements/ncg-dialog.js
+++ b/lib/dashboard/public/elements/ncg-dialog.js
@@ -19,6 +19,7 @@
listeners: {
'neon-animation-finish': '_onNeonAnimationFinish',
+ 'iron-overlay-opened': '_onIronOverlayOpened',
'iron-overlay-closed': '_onIronOverlayClosed'
},
@@ -51,6 +52,11 @@
}
},
+ _onIronOverlayOpened: function () {
+ var iframeDocument = this.querySelector('iframe').contentDocument;
+ iframeDocument.dispatchEvent(new CustomEvent('dialog-opened'));
+ },
+
_onIronOverlayClosed: function (e) {
var iframeDocument = this.querySelector('iframe').contentDocument;
if (e.detail.confirmed) { | feat(dashboard): emit `dialog-opened` event in a dialog's `document` when it opens |
diff --git a/packages/wpcom-proxy-request/index.js b/packages/wpcom-proxy-request/index.js
index <HASH>..<HASH> 100644
--- a/packages/wpcom-proxy-request/index.js
+++ b/packages/wpcom-proxy-request/index.js
@@ -195,24 +195,24 @@ function onmessage (e) {
var params = requests[id];
delete requests[id];
- var res = data[0];
+ var body = data[0];
var statusCode = data[1];
var headers = data[2];
debug('got %s status code for URL: %s', statusCode, params.path);
- if (res && headers) {
- res._headers = headers;
+ if (body && headers) {
+ body._headers = headers;
}
if (null == statusCode || 2 === Math.floor(statusCode / 100)) {
// 2xx status code, success
- params.resolve(res);
+ params.resolve(body);
} else {
// any other status code is a failure
var err = new Error();
err.statusCode = statusCode;
- for (var i in res) err[i] = res[i];
- if (res.error) err.name = toTitle(res.error) + 'Error';
+ for (var i in body) err[i] = body[i];
+ if (body.error) err.name = toTitle(body.error) + 'Error';
params.reject(err);
} | index: rename `res` variable to `body`
Matches the `wpcom-xhr-request` logic is the only reason :p |
diff --git a/openquake/calculators/risk/scenario_damage/core.py b/openquake/calculators/risk/scenario_damage/core.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/risk/scenario_damage/core.py
+++ b/openquake/calculators/risk/scenario_damage/core.py
@@ -139,13 +139,15 @@ class ScenarioDamageRiskCalculator(general.BaseRiskCalculator):
# sum per taxonomy
if not fractions:
- self.ddt_fractions[taxonomy] = bfractions[taxonomy]
+ self.ddt_fractions[taxonomy] = numpy.array(
+ bfractions[taxonomy])
else:
self.ddt_fractions[taxonomy] += bfractions[taxonomy]
# global sum
if self.total_fractions is None:
- self.total_fractions = bfractions[taxonomy]
+ self.total_fractions = numpy.array(
+ bfractions[taxonomy])
else:
self.total_fractions += bfractions[taxonomy] | Fixed bug when computing the total damage distribution |
diff --git a/test/youtube-dl_test.rb b/test/youtube-dl_test.rb
index <HASH>..<HASH> 100644
--- a/test/youtube-dl_test.rb
+++ b/test/youtube-dl_test.rb
@@ -43,7 +43,7 @@ describe YoutubeDL do
@extractors = YoutubeDL.extractors
end
- it 'should return a Hash' do
+ it 'should return an Array' do
assert_instance_of Array, @extractors
end | .extractors Returns an array, not a Hash [ci skip] |
diff --git a/test/client/cluster_test.rb b/test/client/cluster_test.rb
index <HASH>..<HASH> 100644
--- a/test/client/cluster_test.rb
+++ b/test/client/cluster_test.rb
@@ -27,11 +27,11 @@ describe Elastomer::Client::Cluster do
it 'updates the cluster settings' do
@cluster.update_settings :transient => { 'cluster.blocks.read_only' => true }
- h = @cluster.settings
+ h = @cluster.settings :flat_settings => true
assert_equal 'true', h['transient']['cluster.blocks.read_only']
@cluster.update_settings :transient => { 'cluster.blocks.read_only' => false }
- h = @cluster.settings
+ h = @cluster.settings :flat_settings => true
assert_equal 'false', h['transient']['cluster.blocks.read_only']
end | couldn't resist making this test work with ES <I> |
diff --git a/app/models/shipit/commit_deployment.rb b/app/models/shipit/commit_deployment.rb
index <HASH>..<HASH> 100644
--- a/app/models/shipit/commit_deployment.rb
+++ b/app/models/shipit/commit_deployment.rb
@@ -2,7 +2,7 @@ module Shipit
class CommitDeployment < ActiveRecord::Base
belongs_to :commit
belongs_to :task
- has_many :statuses, class_name: 'CommitDeploymentStatus'
+ has_many :statuses, dependent: :destroy, class_name: 'CommitDeploymentStatus'
after_commit :schedule_create_on_github, on: :create
diff --git a/app/models/shipit/deploy.rb b/app/models/shipit/deploy.rb
index <HASH>..<HASH> 100644
--- a/app/models/shipit/deploy.rb
+++ b/app/models/shipit/deploy.rb
@@ -11,7 +11,7 @@ module Shipit
after_transition any => any, do: :update_commit_deployments
end
- has_many :commit_deployments, inverse_of: :task, foreign_key: :task_id do
+ has_many :commit_deployments, dependent: :destroy, inverse_of: :task, foreign_key: :task_id do
GITHUB_STATUSES = {
'pending' => 'pending',
'failed' => 'failure', | Add missing dependent: :destroy for CommitDeployment |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ except ImportError:
MAJOR = 5
MINOR = 0
MICRO = 0
-ISRELEASED = False
+ISRELEASED = True
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) | * Set is_released flag in setup.py |
diff --git a/src/Controller/ScriptController.php b/src/Controller/ScriptController.php
index <HASH>..<HASH> 100644
--- a/src/Controller/ScriptController.php
+++ b/src/Controller/ScriptController.php
@@ -40,9 +40,8 @@ class ScriptController
$appNamespace = key($autoload["psr-4"]);
$appSourceDir .= current($autoload["psr-4"]);
}
- $output->write("Compiling {$appNamespace}PuzzleConfig to $appSourceDir/PuzzleConfig.php");
+ $output->write("<info>PuzzleDI: Compiling</info> <comment>{$appNamespace}PuzzleConfig</comment> <info>to</info> <comment>$appSourceDir/PuzzleConfig.php</comment>");
$compiler->compile($data, $appNamespace, $appSourceDir);
- $output->write("PuzzleConfig compiled");
}
}
\ No newline at end of file | Added styling to console output
removed unnecessary output line |
diff --git a/lib/webhooks/webhooks.js b/lib/webhooks/webhooks.js
index <HASH>..<HASH> 100644
--- a/lib/webhooks/webhooks.js
+++ b/lib/webhooks/webhooks.js
@@ -28,7 +28,7 @@ function validateRequest(authToken, twilioHeader, url, params) {
@param {object} request - An expressjs request object (http://expressjs.com/api.html#req.params)
@param {string} authToken - The auth token, as seen in the Twilio portal
@param {object} opts - options for request validation:
- - webhookUrl: The full URL (with query string) you used to configure the webhook with Twilio - overrides host/protocol options
+ - url: The full URL (with query string) you used to configure the webhook with Twilio - overrides host/protocol options
- host: manually specify the host name used by Twilio in a number's webhook config
- protocol: manually specify the protocol used by Twilio in a number's webhook config
*/ | Correcting the hint for webhook URL option (#<I>)
The option for the webhook URL is actually called `url` not `webhookUrl`, as seen here:
```
if (options.url) {
// Let the user specify the full URL
webhookUrl = options.url;
}
``` |
diff --git a/drivers/gpio/motor_driver_test.go b/drivers/gpio/motor_driver_test.go
index <HASH>..<HASH> 100644
--- a/drivers/gpio/motor_driver_test.go
+++ b/drivers/gpio/motor_driver_test.go
@@ -113,18 +113,16 @@ func TestMotorDriverDirection(t *testing.T) {
d.Direction("backward")
}
-func TestMotorDriverDigitalForwardBackward(t *testing.T) {
+func TestMotorDriverDigital(t *testing.T) {
d := initTestMotorDriver()
d.CurrentMode = "digital"
d.ForwardPin = "2"
+ d.BackwardPin = "3"
- d.Forward(100)
- gobottest.Assert(t, d.CurrentSpeed, uint8(100))
- gobottest.Assert(t, d.CurrentDirection, "forward")
-
- d.Backward(100)
- gobottest.Assert(t, d.CurrentSpeed, uint8(100))
- gobottest.Assert(t, d.CurrentDirection, "backward")
+ d.On()
+ gobottest.Assert(t, d.CurrentState, uint8(1))
+ d.Off()
+ gobottest.Assert(t, d.CurrentState, uint8(0))
}
func TestMotorDriverDefaultName(t *testing.T) { | gpio: increase test coverage for motor driver |
diff --git a/connection_test.go b/connection_test.go
index <HASH>..<HASH> 100644
--- a/connection_test.go
+++ b/connection_test.go
@@ -505,6 +505,7 @@ func TestReadTimeout(t *testing.T) {
opts := testutils.NewOpts().
AddLogFilter("Couldn't send outbound error frame", 1).
AddLogFilter("Connection error", 1, "site", "read frames").
+ AddLogFilter("Connection error", 1, "site", "write frames").
AddLogFilter("simpleHandler OnError", 1,
"error", "failed to send error frame, connection state connectionClosed")
WithVerifiedServer(t, opts, func(ch *Channel, hostPort string) { | TestReadTimeout should ignore errors in writeFrames |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.