diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go
index <HASH>..<HASH> 100644
--- a/test/utils/image/manifest.go
+++ b/test/utils/image/manifest.go
@@ -219,7 +219,7 @@ func initImageConfigs() (map[int]Config, map[int]Config) {
configs[AuthenticatedWindowsNanoServer] = Config{gcAuthenticatedRegistry, "windows-nanoserver", "v1"}
configs[APIServer] = Config{promoterE2eRegistry, "sample-apiserver", "1.17.4"}
configs[AppArmorLoader] = Config{promoterE2eRegistry, "apparmor-loader", "1.3"}
- configs[BusyBox] = Config{promoterE2eRegistry, "busybox", "1.29"}
+ configs[BusyBox] = Config{promoterE2eRegistry, "busybox", "1.29-1"}
configs[CheckMetadataConcealment] = Config{promoterE2eRegistry, "metadata-concealment", "1.6"}
configs[CudaVectorAdd] = Config{e2eRegistry, "cuda-vector-add", "1.0"}
configs[CudaVectorAdd2] = Config{promoterE2eRegistry, "cuda-vector-add", "2.2"}
|
update busybox that includes windows nltest
|
diff --git a/dist/protractor-helpers.js b/dist/protractor-helpers.js
index <HASH>..<HASH> 100644
--- a/dist/protractor-helpers.js
+++ b/dist/protractor-helpers.js
@@ -155,7 +155,7 @@ Helpers.prototype.selectOption = function (optionElement) {
Helpers.prototype.scrollToElement = function (element) {
return element.getLocation().then(function (location) {
- return browser.executeScript('window.scrollTo(0, ' + location.y + ');');
+ return browser.executeScript('window.scrollTo(' + location.x + ', ' + location.y + ');');
});
};
diff --git a/src/helpers.js b/src/helpers.js
index <HASH>..<HASH> 100644
--- a/src/helpers.js
+++ b/src/helpers.js
@@ -117,7 +117,7 @@ Helpers.prototype.selectOption = function (optionElement) {
Helpers.prototype.scrollToElement = function (element) {
return element.getLocation().then(function (location) {
- return browser.executeScript('window.scrollTo(0, ' + location.y + ');');
+ return browser.executeScript('window.scrollTo(' + location.x + ', ' + location.y + ');');
});
};
|
feat(Helpers): add ability to scroll to an element and click it with x axis too
|
diff --git a/lib/substation/chain.rb b/lib/substation/chain.rb
index <HASH>..<HASH> 100644
--- a/lib/substation/chain.rb
+++ b/lib/substation/chain.rb
@@ -141,6 +141,10 @@ module Substation
return response unless processor.success?(response)
processor.result(response)
rescue => exception
+ if ENV['DEBUG_SUBSTATION']
+ puts exception.message
+ pp exception.backtrace
+ end
return on_exception(request, result.data, exception)
end
}
|
Support ENV['DEBUG_SUBSTATION'] for now
|
diff --git a/Kwc/Root/DomainRoot/Component.php b/Kwc/Root/DomainRoot/Component.php
index <HASH>..<HASH> 100644
--- a/Kwc/Root/DomainRoot/Component.php
+++ b/Kwc/Root/DomainRoot/Component.php
@@ -17,6 +17,9 @@ class Kwc_Root_DomainRoot_Component extends Kwc_Root_Abstract
public function formatPath($parsedUrl)
{
$host = $parsedUrl['host'];
+ if (isset($parsedUrl['port']) && $parsedUrl['port'] != 80) {
+ $host .= ':' . $parsedUrl['port'];
+ }
$setting = $this->_getSetting('generators');
$modelName = $setting['domain']['model'];
$domain = Kwf_Model_Abstract::getInstance($modelName)->getRowByHost($host);
|
if port is not <I> add it to host for domainRoot
|
diff --git a/code/MultiFormObjectDecorator.php b/code/MultiFormObjectDecorator.php
index <HASH>..<HASH> 100644
--- a/code/MultiFormObjectDecorator.php
+++ b/code/MultiFormObjectDecorator.php
@@ -14,7 +14,7 @@
*
* @package multiform
*/
-class MultiFormObjectDecorator extends DataObjectDecorator {
+class MultiFormObjectDecorator extends DataExtension {
public function updateDBFields() {
return array(
@@ -55,5 +55,3 @@ class MultiFormObjectDecorator extends DataObjectDecorator {
}
}
-
-?>
\ No newline at end of file
|
Fixing class to extend DataExtension for SS3 compatibility
|
diff --git a/src/TryCatchMiddleware.php b/src/TryCatchMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/TryCatchMiddleware.php
+++ b/src/TryCatchMiddleware.php
@@ -20,7 +20,7 @@ class TryCatchMiddleware implements IMiddleware
return $response;
} catch (Throwable $throwable) {
$response = $response->withStatus(500);
- $response->getBody()->write(sprintf('Application encountered an internal error with status code "500" and with message "%s".', $throwable->getMessage()));
+ $response->getBody()->write('Application encountered an internal error. Please try again later.');
return $response;
}
}
|
Remove error message output. It could reveal sensitive informations.
|
diff --git a/ruby/command-t/match_window.rb b/ruby/command-t/match_window.rb
index <HASH>..<HASH> 100644
--- a/ruby/command-t/match_window.rb
+++ b/ruby/command-t/match_window.rb
@@ -407,12 +407,12 @@ module CommandT
# Cursor xxx cleared -> :hi! clear Cursor
highlight = VIM::capture 'silent! 0verbose highlight Cursor'
- if highlight =~ /^Cursor\s+xxx\s+links to (\w+)/
- "link Cursor #{$~[1]}"
- elsif highlight =~ /^Cursor\s+xxx\s+cleared/
+ if highlight =~ /^Cursor\s+xxx\s+links to (\w+)/m
+ "link Cursor #{$~[1]}".gsub(/\s+/, ' ')
+ elsif highlight =~ /^Cursor\s+xxx\s+cleared/m
'clear Cursor'
- elsif highlight =~ /Cursor\s+xxx\s+(.+)/
- "Cursor #{$~[1]}"
+ elsif highlight =~ /Cursor\s+xxx\s+(.+)/m
+ "Cursor #{$~[1]}".gsub(/\s+/, ' ')
else # likely cause E411 Cursor highlight group not found
nil
end
|
Cursor saving now looks for newlines and removes them
Original pull request:
<URL>
|
diff --git a/mod/assign/gradingtable.php b/mod/assign/gradingtable.php
index <HASH>..<HASH> 100644
--- a/mod/assign/gradingtable.php
+++ b/mod/assign/gradingtable.php
@@ -485,6 +485,13 @@ class assign_grading_table extends table_sql implements renderable {
if ($this->quickgrading && !$gradingdisabled) {
$name = 'quickgrade_' . $row->id . '_workflowstate';
$o .= html_writer::select($workflowstates, $name, $workflowstate, array('' => get_string('markingworkflowstatenotmarked', 'assign')));
+ // Check if this user is a marker that can't manage allocations and doesn't have the marker column added.
+ if ($this->assignment->get_instance()->markingallocation &&
+ !has_capability('mod/assign:manageallocations', $this->assignment->get_context())) {
+
+ $name = 'quickgrade_' . $row->id . '_allocatedmarker';
+ $o .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>$name, 'value'=>$row->allocatedmarker));
+ }
} else {
$o .= $this->output->container(get_string('markingworkflowstate' . $workflowstate, 'assign'), $workflowstate);
}
|
MDL-<I>: assign - prevent loss of associated marker
certain markers don't see the marker allocation column.
|
diff --git a/pyvodb/load.py b/pyvodb/load.py
index <HASH>..<HASH> 100644
--- a/pyvodb/load.py
+++ b/pyvodb/load.py
@@ -9,6 +9,7 @@ import yaml
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.sql.expression import select
+from dateutil import rrule
from . import tables
@@ -133,9 +134,11 @@ def load_from_dict(db, data, metadata):
series = series_dir['series']
recurrence = series.get('recurrence')
- if 'recurrence' in series:
+ if recurrence:
+ rrule_str = recurrence['rrule']
+ rrule.rrulestr(rrule_str) # check rrule syntax
recurrence_attrs = {
- 'recurrence_rule': recurrence['rrule'],
+ 'recurrence_rule': rrule_str,
'recurrence_scheme': recurrence['scheme'],
'recurrence_description_cs': recurrence['description']['cs'],
'recurrence_description_en': recurrence['description']['en'],
|
Check rrule syntax when loading the data
The "tests" for pyvo-data involve loading the DB.
Make loading fail when the data includes an invalid recurrence rule
for meetups.
|
diff --git a/elasticsearch-extensions/lib/elasticsearch/extensions/test/cluster.rb b/elasticsearch-extensions/lib/elasticsearch/extensions/test/cluster.rb
index <HASH>..<HASH> 100644
--- a/elasticsearch-extensions/lib/elasticsearch/extensions/test/cluster.rb
+++ b/elasticsearch-extensions/lib/elasticsearch/extensions/test/cluster.rb
@@ -30,6 +30,7 @@ module Elasticsearch
# @see Cluster#stop Cluster.stop
#
module Cluster
+ @@number_of_nodes = 0
# Starts a cluster
#
|
[EXT] Fixed, that the `@@number_of_nodes` variable is initialized on module load
This was preventing a use case like:
time SERVER=y ruby -I lib:test test/integration/yaml_test_runner.rb
|
diff --git a/audio/vorbis/vorbis.go b/audio/vorbis/vorbis.go
index <HASH>..<HASH> 100644
--- a/audio/vorbis/vorbis.go
+++ b/audio/vorbis/vorbis.go
@@ -157,6 +157,7 @@ func (d *decoded) Close() error {
if err := d.source.Close(); err != nil {
return err
}
+ d.decoder = nil
return nil
}
|
audio/vorbis: Unretain the Ogg decoder on Close (#<I>)
|
diff --git a/lib/hcl/commands.rb b/lib/hcl/commands.rb
index <HASH>..<HASH> 100644
--- a/lib/hcl/commands.rb
+++ b/lib/hcl/commands.rb
@@ -94,7 +94,7 @@ module HCl
command ||= $PROGRAM_NAME.split('/').last
$stderr.puts \
"The hcl completion command is deprecated (and slow!), instead use something like:",
- "> complete -W `cat #{HCl::App::ALIAS_LIST}` #{command}"
+ "> complete -W "`cat #{HCl::App::ALIAS_LIST}`" #{command}"
%[complete -W "#{aliases.join ' '}" #{command}]
end
|
command#completion: fix example in deprecation warning
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -53,7 +53,8 @@ QUnit.test('basics set', function () {
prop: {
set: function(newVal) {
return "foo" + newVal;
- }
+ },
+ configurable: true
}
});
@@ -63,7 +64,11 @@ QUnit.test('basics set', function () {
QUnit.equal(def.prop, "foobar", "setter works");
- define(Defined.prototype, {
+ var DefinedCB = function(prop){
+ this.prop = prop;
+ };
+
+ define(DefinedCB.prototype, {
prop: {
set: function(newVal,setter) {
setter("foo" + newVal);
@@ -71,9 +76,9 @@ QUnit.test('basics set', function () {
}
});
- def = new Defined();
+ defCallback = new DefinedCB();
def.prop = "bar";
- QUnit.equal(def.prop, "foobar", "setter callback works");
+ QUnit.equal(defCallback.prop, "foobar", "setter callback works");
});
|
basic setter and not working test with setter callback
|
diff --git a/lib/raven/interfaces/http.rb b/lib/raven/interfaces/http.rb
index <HASH>..<HASH> 100644
--- a/lib/raven/interfaces/http.rb
+++ b/lib/raven/interfaces/http.rb
@@ -24,9 +24,16 @@ module Raven
self.url = req.scheme && req.url.split('?').first
self.method = req.request_method
self.query_string = req.query_string
+ server_protocol = env['SERVER_PROTOCOL']
env.each_pair do |key, value|
key = key.to_s #rack env can contain symbols
next unless key.upcase == key # Non-upper case stuff isn't either
+ # Rack adds in an incorrect HTTP_VERSION key, which causes downstream
+ # to think this is a Version header. Instead, this is mapped to
+ # env['SERVER_PROTOCOL']. But we don't want to ignore a valid header
+ # if the request has legitimately sent a Version header themselves.
+ # See: https://github.com/rack/rack/blob/028438f/lib/rack/handler/cgi.rb#L29
+ next if key == 'HTTP_VERSION' and value == server_protocol
if key.start_with?('HTTP_')
# Header
http_key = key[5..key.length - 1].split('_').map { |s| s.capitalize }.join('-')
|
Ignore HTTP_VERSION headers since Rack misbehaves
|
diff --git a/src/Row.php b/src/Row.php
index <HASH>..<HASH> 100644
--- a/src/Row.php
+++ b/src/Row.php
@@ -92,6 +92,12 @@ class Row extends Nette\Object
return $this->item->{$this->formatDibiRowKey($key)};
} else if ($this->item instanceof ActiveRow) {
+ if (preg_match("/^:([a-zA-Z0-9_$]*)\.([a-zA-Z0-9_$]*)$/", $key, $matches)) {
+ $relatedTable = $matches[1];
+ $relatedColumn = $matches[2];
+
+ return $this->item->related($relatedTable)->fetch()->{$relatedColumn};
+ }
return $this->item->{$key};
} else if ($this->item instanceof Nette\Database\Row) {
|
Basic support for related column names (#<I>)
Added basic support for syntax $grid->addColumnType('name', 'Title', ':related_table.column')
|
diff --git a/test/lib/redis-store-zlib-spec.js b/test/lib/redis-store-zlib-spec.js
index <HASH>..<HASH> 100644
--- a/test/lib/redis-store-zlib-spec.js
+++ b/test/lib/redis-store-zlib-spec.js
@@ -42,6 +42,12 @@ describe('Compression Tests', function () {
testJson = JSON.stringify(testObject);
});
+ beforeEach(function(done) {
+ redisCompressCache.reset(function () {
+ done();
+ });
+ });
+
describe('compress set', function () {
it('should store a value without ttl', function (done) {
redisCompressCache.set('foo', 'bar', function (err) {
|
Add beforeEach method to reset cache prior to each test.
|
diff --git a/client.go b/client.go
index <HASH>..<HASH> 100644
--- a/client.go
+++ b/client.go
@@ -1891,7 +1891,7 @@ func (c *Client) RecursivePushFile(container string, source string, target strin
appendLen--
}
- targetPath := path.Join(target, p[appendLen:])
+ targetPath := path.Join(target, filepath.ToSlash(p[appendLen:]))
if fInfo.IsDir() {
mode, uid, gid := shared.GetOwnerMode(fInfo)
return c.Mkdir(container, targetPath, mode, uid, gid)
|
Fix recursive file push on Windows
filepath.Walk() sends filenames with backslashes there
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -37,9 +37,10 @@ function proxy(callback) {
if (!socket.writable) {
return socket.destroy(err);
}
- var stack = util.getErrorStack('clientError: Bad request');
- var code = err && err.code === 'HPE_HEADER_OVERFLOW' ? 431 : 400;
- socket.end('HTTP/1.1 ' + code + ' Bad Request\r\n\r\n' + stack);
+ var errCode = err && err.code;
+ var statusCode = errCode === 'HPE_HEADER_OVERFLOW' ? 431 : 400;
+ var stack = util.getErrorStack('clientError: Bad request' + (errCode ? ' (' + errCode + ')' : ''));
+ socket.end('HTTP/1.1 ' + statusCode + ' Bad Request\r\n\r\n' + stack);
});
initSocketMgr(proxyEvents);
setupHttps(server, proxyEvents);
|
refactor: clientError
|
diff --git a/src/Themosis/User/UserFactory.php b/src/Themosis/User/UserFactory.php
index <HASH>..<HASH> 100644
--- a/src/Themosis/User/UserFactory.php
+++ b/src/Themosis/User/UserFactory.php
@@ -4,7 +4,6 @@ namespace Themosis\User;
use Illuminate\View\View;
use Themosis\Field\Wrapper;
-use Themosis\Facades\Action;
use Themosis\Field\FieldException;
use Themosis\Hook\IHook;
use Themosis\Validation\IValidate;
|
Remove unused instance from User factory.
|
diff --git a/lib/puppet/file_serving/content.rb b/lib/puppet/file_serving/content.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/file_serving/content.rb
+++ b/lib/puppet/file_serving/content.rb
@@ -41,6 +41,6 @@ class Puppet::FileServing::Content < Puppet::FileServing::Base
end
def to_raw
- File.new(full_path, "r")
+ File.new(full_path, "rb")
end
end
diff --git a/spec/unit/file_serving/content_spec.rb b/spec/unit/file_serving/content_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/file_serving/content_spec.rb
+++ b/spec/unit/file_serving/content_spec.rb
@@ -73,7 +73,7 @@ describe Puppet::FileServing::Content do
it "should return an opened File when converted to raw" do
content = Puppet::FileServing::Content.new("/path")
- File.expects(:new).with("/path","r").returns :file
+ File.expects(:new).with("/path","rb").returns :file
content.to_raw.should == :file
end
|
(#<I>) Serve file content in binary mode
Previously, Puppet::FileServing::Content opened files in text
mode. Changed to binary mode.
|
diff --git a/lib/entasis/model.rb b/lib/entasis/model.rb
index <HASH>..<HASH> 100644
--- a/lib/entasis/model.rb
+++ b/lib/entasis/model.rb
@@ -25,7 +25,7 @@ module Entasis
#
# Takes a hash and assigns keys and values to it's attributes members
#
- def initialize(hash)
+ def initialize(hash={})
self.attributes = hash
end
diff --git a/spec/entasis_spec.rb b/spec/entasis_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/entasis_spec.rb
+++ b/spec/entasis_spec.rb
@@ -15,6 +15,10 @@ describe "Entasis::Model" do
Person.new(undefined: 'value')
}.to raise_error Person::UnknownAttributeError, 'unkown attribute: undefined'
end
+
+ it "does not require attribute hash" do
+ expect { Person.new }.to_not raise_error
+ end
end
describe "#attribute_names" do
|
Do not require attribute hash at initialization
|
diff --git a/lib/active_record_shards/default_slave_patches.rb b/lib/active_record_shards/default_slave_patches.rb
index <HASH>..<HASH> 100644
--- a/lib/active_record_shards/default_slave_patches.rb
+++ b/lib/active_record_shards/default_slave_patches.rb
@@ -60,6 +60,10 @@ module ActiveRecordShards
CLASS_FORCE_SLAVE_METHODS = [
:columns,
+ :replace_bind_variable,
+ :replace_bind_variables,
+ :sanitize_sql_array,
+ :sanitize_sql_hash_for_assignment,
:table_exists?
].freeze
@@ -103,6 +107,8 @@ module ActiveRecordShards
# `where` and `having` clauses call `create_binds`, which will use the master connection
ActiveRecordShards::DefaultSlavePatches.wrap_method_in_on_slave(false, base, :create_binds, true)
end
+
+ ActiveRecordShards::DefaultSlavePatches.wrap_method_in_on_slave(false, base, :to_sql, true)
end
def on_slave_unless_tx(&block)
|
Wrap to_sql and Sanitzation with force_on_slave
|
diff --git a/resources/lang/hu-HU/notifications.php b/resources/lang/hu-HU/notifications.php
index <HASH>..<HASH> 100644
--- a/resources/lang/hu-HU/notifications.php
+++ b/resources/lang/hu-HU/notifications.php
@@ -51,7 +51,7 @@ return [
'action' => 'View',
],
'slack' => [
- 'title' => ':name Updated',
+ 'title' => 'Frissítve',
'content' => ':name was updated to :new_status',
],
'sms' => [
@@ -101,7 +101,7 @@ return [
'subject' => 'Your invitation is inside...',
'content' => 'You have been invited to join :app_name status page.',
'title' => 'You\'re invited to join :app_name status page.',
- 'action' => 'Accept',
+ 'action' => 'Elfogadás',
],
],
],
|
New translations notifications.php (Hungarian)
|
diff --git a/expr/http_endpoint.go b/expr/http_endpoint.go
index <HASH>..<HASH> 100644
--- a/expr/http_endpoint.go
+++ b/expr/http_endpoint.go
@@ -249,7 +249,7 @@ func (e *HTTPEndpointExpr) Prepare() {
// Make sure there's a default response if none define explicitly
if len(e.Responses) == 0 {
status := StatusOK
- if e.MethodExpr.Payload.Type == Empty {
+ if e.MethodExpr.Payload.Type == Empty && !e.SkipResponseBodyEncodeDecode {
status = StatusNoContent
}
e.Responses = []*HTTPResponseExpr{{StatusCode: status}}
|
Fix issue with empty body and SkipEncodeDecodeResultBody (#<I>)
|
diff --git a/lib/mongo/protocol/query.rb b/lib/mongo/protocol/query.rb
index <HASH>..<HASH> 100644
--- a/lib/mongo/protocol/query.rb
+++ b/lib/mongo/protocol/query.rb
@@ -252,7 +252,7 @@ module Mongo
#
# @since 2.1.0
def command_name
- command? && filter[:$query].nil? ? filter.keys.first : FIND
+ (filter[:$query] || !command?) ? FIND : filter.keys.first
end
private
@@ -261,9 +261,13 @@ module Mongo
collection == Database::COMMAND
end
+ def query_filter
+ filter[:$query] || filter
+ end
+
def op_command
document = BSON::Document.new
- (filter[:$query] || filter).each do |field, value|
+ query_filter.each do |field, value|
document.store(field.to_s, value)
end
document
@@ -272,7 +276,7 @@ module Mongo
def find_command
document = BSON::Document.new
document.store(FIND, collection)
- document.store(FILTER, filter[:$query] || filter)
+ document.store(FILTER, query_filter)
OPTION_MAPPINGS.each do |legacy, option|
document.store(option, options[legacy]) unless options[legacy].nil?
end
|
RUBY-<I> Helper method for query filter
|
diff --git a/opencensus/trace/ext/requests/trace.py b/opencensus/trace/ext/requests/trace.py
index <HASH>..<HASH> 100644
--- a/opencensus/trace/ext/requests/trace.py
+++ b/opencensus/trace/ext/requests/trace.py
@@ -28,7 +28,7 @@ SESSION_CLASS_NAME = 'Session'
def trace_integration():
- """Wrap the mysql connector to trace it."""
+ """Wrap the requests library to trace it."""
log.info('Integrated module: {}'.format(MODULE_NAME))
# Wrap the requests functions
|
Fix docstring for trace_integration (#<I>)
|
diff --git a/server/server_test.go b/server/server_test.go
index <HASH>..<HASH> 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -40,6 +40,7 @@ import (
"github.com/pingcap/tidb/config"
"github.com/pingcap/tidb/errno"
"github.com/pingcap/tidb/kv"
+ "github.com/pingcap/tidb/session"
"github.com/pingcap/tidb/util/logutil"
"github.com/pingcap/tidb/util/versioninfo"
"github.com/tikv/client-go/v2/tikv"
@@ -57,6 +58,10 @@ func TestT(t *testing.T) {
if !reflect.DeepEqual(defaultConfig, globalConfig) {
t.Fatalf("%#v != %#v\n", defaultConfig, globalConfig)
}
+
+ // AsyncCommit will make DDL wait 2.5s before changing to the next state.
+ // Set schema lease to avoid it from making CI slow.
+ session.SetSchemaLease(0)
CustomVerboseFlag = true
logLevel := os.Getenv("log_level")
err := logutil.InitLogger(logutil.NewLogConfig(logLevel, logutil.DefaultLogFormat, "", logutil.EmptyFileLogConfig, false))
|
server: make CI faster (#<I>)
|
diff --git a/salt/utils/cache.py b/salt/utils/cache.py
index <HASH>..<HASH> 100644
--- a/salt/utils/cache.py
+++ b/salt/utils/cache.py
@@ -142,12 +142,10 @@ class CacheDisk(CacheDict):
"""
if not salt.utils.msgpack.HAS_MSGPACK or not os.path.exists(self._path):
return
- try:
- with salt.utils.files.fopen(self._path, "rb") as fp_:
- cache = salt.utils.msgpack.load(fp_, encoding=__salt_system_encoding__)
- cache = salt.utils.data.decode(cache)
- except UnicodeDecodeError:
- pass
+ with salt.utils.files.fopen(self._path, "rb") as fp_:
+ cache = salt.utils.msgpack.load(
+ fp_, encoding=__salt_system_encoding__, raw=False
+ )
if "CacheDisk_cachetime" in cache: # new format
self._dict = cache["CacheDisk_data"]
self._key_cache_time = cache["CacheDisk_cachetime"]
@@ -172,7 +170,7 @@ class CacheDisk(CacheDict):
"CacheDisk_data": self._dict,
"CacheDisk_cachetime": self._key_cache_time,
}
- salt.utils.msgpack.dump(cache, fp_, use_bin_type=True)
+ salt.utils.msgpack.dump(cache, fp_)
class CacheCli:
|
make proper use of msgpack
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -78,6 +78,18 @@ try:
if (match and match[4]) or not match:
VERSION += ('' if match else 'a') + COMMIT_COUNT.decode('utf-8').strip() + '+g' + COMMIT_HASH.decode('utf-8').strip()
+ # Also attempt to retrieve a branch, when applicable
+ PROCESS = subprocess.Popen(
+ ['git', 'symbolic-ref', '-q', '--short', 'HEAD'],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE
+ )
+
+ COMMIT_BRANCH, ERR = PROCESS.communicate()
+
+ if COMMIT_BRANCH:
+ VERSION += "." + COMMIT_BRANCH.decode('utf-8').strip()
+
except FileNotFoundError:
pass
|
Include branches in versions for future feature testing
|
diff --git a/test/Redmine/Tests/Api/IssueTest.php b/test/Redmine/Tests/Api/IssueTest.php
index <HASH>..<HASH> 100644
--- a/test/Redmine/Tests/Api/IssueTest.php
+++ b/test/Redmine/Tests/Api/IssueTest.php
@@ -150,6 +150,39 @@ class IssueTest extends \PHPUnit_Framework_TestCase
}
/**
+ * Test show().
+ *
+ * @covers ::show
+ * @test
+ */
+ public function testShowImplodesIncludeParametersCorrectly()
+ {
+ // Test values
+ $parameters = array('include' => array('parameter1', 'parameter2'));
+ $getResponse = array('API Response');
+
+ // Create the used mock objects
+ $client = $this->getMockBuilder('Redmine\Client')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $client->expects($this->once())
+ ->method('get')
+ ->with(
+ $this->logicalAnd(
+ $this->stringStartsWith('/issues/5.json'),
+ $this->stringContains(urlencode('parameter1,parameter2'))
+ )
+ )
+ ->willReturn($getResponse);
+
+ // Create the object under test
+ $api = new Issue($client);
+
+ // Perform the tests
+ $this->assertSame($getResponse, $api->show(5, $parameters));
+ }
+
+ /**
* Test remove().
*
* @covers ::delete
|
Added Test for correct imploding of include parameters in issue::show
|
diff --git a/src/ErrorHandler/ErrorCatcher.php b/src/ErrorHandler/ErrorCatcher.php
index <HASH>..<HASH> 100644
--- a/src/ErrorHandler/ErrorCatcher.php
+++ b/src/ErrorHandler/ErrorCatcher.php
@@ -113,7 +113,7 @@ final class ErrorCatcher implements MiddlewareInterface
private function getContentType(ServerRequestInterface $request): string
{
try {
- foreach (HeaderHelper::getSortedAcceptTypes($request->getHeader('accept')) as $header) {
+ foreach (HeaderHelper::getSortedAcceptTypes($request->getHeader(Header::ACCEPT)) as $header) {
if (array_key_exists($header, $this->renderers)) {
return $header;
}
|
Use header constant in ErrorCatcher
|
diff --git a/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/PluginManifest.java b/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/PluginManifest.java
index <HASH>..<HASH> 100644
--- a/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/PluginManifest.java
+++ b/subprojects/sonar-update-center/sonar-update-center-common/src/main/java/org/sonar/updatecenter/common/PluginManifest.java
@@ -50,7 +50,7 @@ public final class PluginManifest {
public static final String DEPENDENCIES = "Plugin-Dependencies";
public static final String HOMEPAGE = "Plugin-Homepage";
public static final String TERMS_CONDITIONS_URL = "Plugin-TermsConditionsUrl";
- public static final String BUILD_DATE = "Build-Date";
+ public static final String BUILD_DATE = "Plugin-BuildDate";
public static final String ISSUE_TRACKER_URL = "Plugin-IssueTrackerUrl";
/**
|
SONAR-<I> Sonar startup crashes during use of Update Center if manifest uses wrong date format
|
diff --git a/springloaded/src/main/java/org/springsource/loaded/agent/SpringLoadedPreProcessor.java b/springloaded/src/main/java/org/springsource/loaded/agent/SpringLoadedPreProcessor.java
index <HASH>..<HASH> 100644
--- a/springloaded/src/main/java/org/springsource/loaded/agent/SpringLoadedPreProcessor.java
+++ b/springloaded/src/main/java/org/springsource/loaded/agent/SpringLoadedPreProcessor.java
@@ -525,7 +525,7 @@ public class SpringLoadedPreProcessor implements Constants {
} else {
try {
CodeSource codeSource = protectionDomain.getCodeSource();
- if (codeSource.getLocation() == null) {
+ if (codeSource == null || codeSource.getLocation() == null) {
if (GlobalConfiguration.isRuntimeLogging && log.isLoggable(Level.WARNING)) {
log.warning("null codesource for " + slashedClassName);
}
|
Check for null codeSource before attempting to access
codeSource.getLocation()
|
diff --git a/lib/rest-ftp-daemon/notification.rb b/lib/rest-ftp-daemon/notification.rb
index <HASH>..<HASH> 100644
--- a/lib/rest-ftp-daemon/notification.rb
+++ b/lib/rest-ftp-daemon/notification.rb
@@ -32,7 +32,7 @@ module RestFtpDaemon
# Params
body = {
- id: params[:id],
+ id: params[:id].to_s,
signal: params[:signal],
error: params[:error],
host: Settings['host'].to_s,
|
last minute demo fix: Job.id as a string for notifications
|
diff --git a/spacy/tests/tokens/test_tokens_api.py b/spacy/tests/tokens/test_tokens_api.py
index <HASH>..<HASH> 100644
--- a/spacy/tests/tokens/test_tokens_api.py
+++ b/spacy/tests/tokens/test_tokens_api.py
@@ -108,7 +108,7 @@ def test_set_ents(EN):
assert len(tokens.ents) == 0
tokens.ents = [(EN.vocab.strings['PRODUCT'], 2, 4)]
assert len(list(tokens.ents)) == 1
- assert [t.ent_iob for t in tokens] == [2, 2, 3, 1, 2, 2, 2, 2]
+ assert [t.ent_iob for t in tokens] == [0, 0, 3, 1, 0, 0, 0, 0]
ent = tokens.ents[0]
assert ent.label_ == 'PRODUCT'
assert ent.start == 2
|
Fix test, after IOB tweak.
|
diff --git a/lib/bibformat_engine.py b/lib/bibformat_engine.py
index <HASH>..<HASH> 100644
--- a/lib/bibformat_engine.py
+++ b/lib/bibformat_engine.py
@@ -380,7 +380,12 @@ def decide_format_template(bfo, of):
output_format = get_output_format(of)
for rule in output_format['rules']:
- value = bfo.field(rule['field']).strip()#Remove spaces
+ if rule['field'].startswith('00'):
+ # Rule uses controlfield
+ value = bfo.control_field(rule['field']).strip() #Remove spaces
+ else:
+ # Rule uses datafield
+ value = bfo.field(rule['field']).strip() #Remove spaces
pattern = rule['value'].strip() #Remove spaces
match_obj = re.match(pattern, value, re.IGNORECASE)
if match_obj is not None and \
|
BibFormat: controlfield output format rule support
* Support for output format rules that apply on controlfields.
|
diff --git a/src/Cli.php b/src/Cli.php
index <HASH>..<HASH> 100644
--- a/src/Cli.php
+++ b/src/Cli.php
@@ -146,6 +146,11 @@ class Cli
return true;
}
+ // fix for "Undefined constant STDOUT" error
+ if (!\defined('STDOUT')) {
+ return false;
+ }
+
$stream = STDOUT;
if (\DIRECTORY_SEPARATOR === '\\') {
return (\function_exists('sapi_windows_vt100_support')
|
Fixes "Undefined constant STDOUT" error
Similar fix to Symfony's code.
|
diff --git a/lib/active_scaffold/finder.rb b/lib/active_scaffold/finder.rb
index <HASH>..<HASH> 100644
--- a/lib/active_scaffold/finder.rb
+++ b/lib/active_scaffold/finder.rb
@@ -31,11 +31,11 @@ module ActiveScaffold
def condition_for_column(column, value, text_search = :full)
like_pattern = like_pattern(text_search)
return unless column and column.search_sql and not value.blank?
- search_ui = column.search_ui || column.column.type
+ search_ui = column.search_ui || column.column.try(:type)
begin
if self.respond_to?("condition_for_#{column.name}_column")
self.send("condition_for_#{column.name}_column", column, value, like_pattern)
- elsif self.respond_to?("condition_for_#{search_ui}_type")
+ elsif search_ui && self.respond_to?("condition_for_#{search_ui}_type")
self.send("condition_for_#{search_ui}_type", column, value, like_pattern)
else
case search_ui
|
Fixed Object#type deprecated warning. This happens when search_ui is not defined and column.column is nil (virtual or association column).
|
diff --git a/src/Core/Communicator.php b/src/Core/Communicator.php
index <HASH>..<HASH> 100644
--- a/src/Core/Communicator.php
+++ b/src/Core/Communicator.php
@@ -226,7 +226,7 @@ class Communicator
$response = $request->send();
if ($response->hasErrors()) {
- $this->$errorResponses[] = $response;
+ $this->errorResponses[] = $response;
}
return $response->__toString();
}
|
Resovled phpunit error 1 casued by last commit
|
diff --git a/treeherder/model/models.py b/treeherder/model/models.py
index <HASH>..<HASH> 100644
--- a/treeherder/model/models.py
+++ b/treeherder/model/models.py
@@ -1018,6 +1018,11 @@ class Group(models.Model):
class ClassifiedFailure(models.Model):
+ """
+ Classifies zero or more TextLogErrors as a failure.
+
+ Optionally linked to a bug.
+ """
id = models.BigAutoField(primary_key=True)
text_log_errors = models.ManyToManyField("TextLogError", through='TextLogErrorMatch',
related_name='classified_failures')
|
Document what ClassifiedFailures represent
|
diff --git a/salt/netapi/rest_cherrypy/app.py b/salt/netapi/rest_cherrypy/app.py
index <HASH>..<HASH> 100644
--- a/salt/netapi/rest_cherrypy/app.py
+++ b/salt/netapi/rest_cherrypy/app.py
@@ -7,7 +7,8 @@ A REST API for Salt
.. py:currentmodule:: salt.netapi.rest_cherrypy.app
-:depends: - CherryPy Python module
+:depends: - CherryPy Python module (strongly recommend 3.2.x versions due to
+ an as yet unknown SSL error).
:optdepends: - ws4py Python module for websockets support.
:configuration: All authentication is done through Salt's :ref:`external auth
<acl-eauth>` system which requires additional configuration not described
|
Added a note about recommended CherryPy versions due to SSL errors
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -24,7 +24,7 @@ var tests = [
function rollupTestTask(name, file, to) {
return rollup.rollup({
entry: file,
- external: ['assert', 'react', 'enzyme', 'enzyme-adapter-react-16', 'jsdom'],
+ external: ['assert', 'react', 'enzyme', 'enzyme-adapter-react-16', 'jsdom' , 'tslib'],
plugins: [
rollupTypescript({
typescript: typescript,
@@ -37,8 +37,7 @@ function rollupTestTask(name, file, to) {
target: 'es3',
module: 'es6',
jsx: 'react'
- }),
- nodeResolve({ jsnext: true, main: true })
+ })
]
}).then((bundle) => {
bundle.write({
|
Removed node resolve from test task
|
diff --git a/cache/queue.go b/cache/queue.go
index <HASH>..<HASH> 100644
--- a/cache/queue.go
+++ b/cache/queue.go
@@ -24,11 +24,12 @@ func (v byOrderKey) Less(i, j int) bool { return v[i].orderKey < v[j].orderKey }
func (c *Cache) makeQueue() chan *points.Points {
c.Lock()
writeStrategy := c.writeStrategy
+ prevBuild := c.queueLastBuild
c.Unlock()
- if !c.queueLastBuild.IsZero() {
+ if !prevBuild.IsZero() {
// @TODO: may be max (with atomic cas)
- atomic.StoreUint32(&c.stat.queueWriteoutTime, uint32(time.Since(c.queueLastBuild)/time.Second))
+ atomic.StoreUint32(&c.stat.queueWriteoutTime, uint32(time.Since(prevBuild)/time.Second))
}
start := time.Now()
|
get queueLastBuild inside lock
|
diff --git a/tldap/base.py b/tldap/base.py
index <HASH>..<HASH> 100644
--- a/tldap/base.py
+++ b/tldap/base.py
@@ -132,8 +132,9 @@ class LDAPmeta(type):
# an attribute in this class has replaced the field
pass
elif field.name in parent_field_names:
- if type(field) != \
- type(parent_field_names[field.name]): # NOQA
+ field_type = type(field)
+ parent_field_type = type(parent_field_names[field.name])
+ if field_type != parent_field_type:
raise tldap.exceptions.FieldError(
'In class %r field %r from parent clashes '
'with field of similar name from base class %r '
|
Trick pep8 into ignoring E<I>.
We really do need to compare types here, the types should be identical.
Change-Id: I<I>d8e<I>b1b7be<I>b<I>a<I>c<I>fecac
|
diff --git a/lib/agent.js b/lib/agent.js
index <HASH>..<HASH> 100644
--- a/lib/agent.js
+++ b/lib/agent.js
@@ -1,7 +1,9 @@
-// Packages
+// Native
const {parse} = require('url')
const http = require('http')
const https = require('https')
+
+// Packages
const fetch = require('node-fetch')
/**
|
Fix `Native` and `Packages` comment structure (#<I>)
|
diff --git a/xml-parser.class.php b/xml-parser.class.php
index <HASH>..<HASH> 100644
--- a/xml-parser.class.php
+++ b/xml-parser.class.php
@@ -44,9 +44,24 @@ class XMLParser {
return isset($xml) ? $xml : null; // isset() essentially to make editor happy.
}
+ public static function objectToArray($std) {
+ if (is_object($std)) {
+ $std = get_object_vars($std);
+ }
+ if (is_array($std)) {
+ return array_map(['self','objectToArray'], $std);
+ }
+ else {
+ return $std;
+ }
+ }
+
private static function _validateEncodeData ($data)
{
- if (is_object($data)) {
+ if(is_object($data)){ // Try conversion
+ $data = self::objectToArray($data);
+ }
+ if (is_object($data)) { // If it's still an object throw exception
throw new InvalidArgumentException(
"Invalid data type supplied for XMLParser::encode"
);
@@ -121,4 +136,4 @@ class XMLParser {
return json_decode(json_encode($xml),false);
}
-}
+}
\ No newline at end of file
|
Added stdClass / stdObject support
|
diff --git a/examples/basic/flatarrow.py b/examples/basic/flatarrow.py
index <HASH>..<HASH> 100644
--- a/examples/basic/flatarrow.py
+++ b/examples/basic/flatarrow.py
@@ -7,7 +7,7 @@ for i in range(10):
s, c = sin(i), cos(i)
l1 = [[sin(x)+c, -cos(x)+s, x] for x in arange(0,3, 0.1)]
l2 = [[sin(x)+c+0.1, -cos(x)+s + x/15, x] for x in arange(0,3, 0.1)]
-
+
FlatArrow(l1, l2, c=i, tipSize=1, tipWidth=1)
show(collection(), viewup="z", axes=1, bg="w")
|
Removed trailing spaces in examples/basic/flatarrow.py
|
diff --git a/phonopy/interface/vasp.py b/phonopy/interface/vasp.py
index <HASH>..<HASH> 100644
--- a/phonopy/interface/vasp.py
+++ b/phonopy/interface/vasp.py
@@ -564,7 +564,7 @@ class Vasprun(object):
if self._is_version528():
return self._parse_by_expat(VasprunWrapper(self._filename))
else:
- return self._parse_by_expat(self._filename)
+ return self._parse_by_expat(open(self._filename))
def _parse_by_expat(self, filename):
vasprun = VasprunxmlExpat(filename)
@@ -580,10 +580,10 @@ class Vasprun(object):
return False
class VasprunxmlExpat(object):
- def __init__(self, filename):
+ def __init__(self, file):
import xml.parsers.expat
- self._filename = filename
+ self._file = file
self._is_forces = False
self._is_stress = False
@@ -620,7 +620,7 @@ class VasprunxmlExpat(object):
def parse(self):
try:
- self._p.ParseFile(open(self._filename))
+ self._p.ParseFile(self._file)
except:
return False
else:
|
Minor update for vasp <I> and expat
|
diff --git a/spec/views/wobauth/roles/index.html.erb_spec.rb b/spec/views/wobauth/roles/index.html.erb_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/views/wobauth/roles/index.html.erb_spec.rb
+++ b/spec/views/wobauth/roles/index.html.erb_spec.rb
@@ -1,19 +1,16 @@
require 'rails_helper'
-RSpec.describe "roles/index", type: :view do
+RSpec.describe "wobauth/roles/index", type: :view do
before(:each) do
assign(:roles, [
- Role.create!(
- :name => "Name"
- ),
- Role.create!(
- :name => "Name"
- )
+ FactoryBot.create(:role, name: "XYZ"),
+ FactoryBot.create(:role, name: "ABC"),
])
end
it "renders a list of roles" do
render
- assert_select "tr>td", :text => "Name".to_s, :count => 2
+ assert_select "tr>td", :text => "XYZ".to_s, :count => 1
+ assert_select "tr>td", :text => "ABC".to_s, :count => 1
end
end
|
rewrite, but url_helper doesn't work
|
diff --git a/src/Klein/Klein.php b/src/Klein/Klein.php
index <HASH>..<HASH> 100644
--- a/src/Klein/Klein.php
+++ b/src/Klein/Klein.php
@@ -748,19 +748,24 @@ class Klein
*/
private function validateRegularExpression($regex)
{
- $handled = false;
-
- $error_handler = function ($errno, $errstr) use ($handled) {
- $handled = true;
-
- throw new RegularExpressionCompilationException($errstr, preg_last_error());
- };
+ $error_string = null;
// Set an error handler temporarily
- set_error_handler($error_handler, E_NOTICE | E_WARNING);
+ set_error_handler(
+ function ($errno, $errstr) use (&$error_string) {
+ $error_string = $errstr;
+ },
+ E_NOTICE | E_WARNING
+ );
- if (false === preg_match($regex, null) && true !== $handled) {
- $error_handler(null, null);
+ if (false === preg_match($regex, null) || !empty($error_string)) {
+ // Remove our temporary error handler
+ restore_error_handler();
+
+ throw new RegularExpressionCompilationException(
+ $error_string,
+ preg_last_error()
+ );
}
// Remove our temporary error handler
|
Making sure to restore the error handler correctly
|
diff --git a/MAVProxy/modules/lib/wxsettings.py b/MAVProxy/modules/lib/wxsettings.py
index <HASH>..<HASH> 100644
--- a/MAVProxy/modules/lib/wxsettings.py
+++ b/MAVProxy/modules/lib/wxsettings.py
@@ -59,7 +59,7 @@ if __name__ == "__main__":
print("Changing %s to %s" % (setting.name, setting.value))
# test the settings
- import mp_settings, time
+ from MAVProxy.modules.lib import mp_settings, time
from mp_settings import MPSetting
settings = mp_settings.MPSettings(
[ MPSetting('link', int, 1, tab='TabOne'),
|
lib: wxsettings conversion to py3
|
diff --git a/src/js/plugin/dendrogram.js b/src/js/plugin/dendrogram.js
index <HASH>..<HASH> 100644
--- a/src/js/plugin/dendrogram.js
+++ b/src/js/plugin/dendrogram.js
@@ -365,7 +365,10 @@
});
nodeUpdate.select("circle")
- .attr("r", this.options.nodesize);
+ .attr("r", this.options.nodesize)
+ .style("fill", function (d) {
+ return (d.collapsed ? that.options.collapsedNodeColor : that.options.nodeColor)(d);
+ });
nodeUpdate.select("text")
.text(function (d) {
|
On update, transition node colors as well.
|
diff --git a/spec/unit/pops/benchmark_spec.rb b/spec/unit/pops/benchmark_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/pops/benchmark_spec.rb
+++ b/spec/unit/pops/benchmark_spec.rb
@@ -31,7 +31,6 @@ $a = "interpolate ${foo} and stuff"
class MyJSonSerializer < RGen::Serializer::JsonSerializer
def attributeValue(value, a)
x = super
- require 'debugger'; debugger
puts "#{a.eType} value: <<#{value}>> serialize: <<#{x}>>"
x
end
@@ -93,7 +92,6 @@ $a = "interpolate ${foo} and stuff"
end
it "rgenjson", :profile => true do
- require 'debugger'; debugger
parser = Puppet::Pops::Parser::EvaluatingParser.new()
model = parser.parse_string(code).current
dumped = json_dump(model)
|
(maint) Remove calls to debugger in performance / serialization tests
|
diff --git a/Bridge/Symfony/Serializer/Normalizer/SaleNormalizer.php b/Bridge/Symfony/Serializer/Normalizer/SaleNormalizer.php
index <HASH>..<HASH> 100644
--- a/Bridge/Symfony/Serializer/Normalizer/SaleNormalizer.php
+++ b/Bridge/Symfony/Serializer/Normalizer/SaleNormalizer.php
@@ -16,22 +16,6 @@ use Ekyna\Component\Resource\Serializer\AbstractResourceNormalizer;
class SaleNormalizer extends AbstractResourceNormalizer
{
/**
- * @var Formatter
- */
- protected $formatter;
-
-
- /**
- * Constructor.
- *
- * @param Formatter $formatter
- */
- public function __construct(Formatter $formatter)
- {
- $this->formatter = $formatter;
- }
-
- /**
* @inheritdoc
*/
public function normalize($sale, $format = null, array $context = [])
|
[Commerce] Remove formatter from sale normalizer.
|
diff --git a/dns_check/check.py b/dns_check/check.py
index <HASH>..<HASH> 100644
--- a/dns_check/check.py
+++ b/dns_check/check.py
@@ -57,11 +57,11 @@ class DNSCheck(NetworkCheck):
# If a specific DNS server was defined use it, else use the system default
nameserver = instance.get('nameserver')
- nameserver_port = instance.get('port')
+ nameserver_port = instance.get('nameserver_port')
if nameserver is not None:
resolver.nameservers = [nameserver]
if nameserver_port is not None:
- resolver.port = [nameserver_port]
+ resolver.port = nameserver_port
timeout = float(instance.get('timeout', self.default_timeout))
resolver.lifetime = timeout
|
[dns] fixing broken port changes. (#<I>)
|
diff --git a/vivarium/test_util.py b/vivarium/test_util.py
index <HASH>..<HASH> 100644
--- a/vivarium/test_util.py
+++ b/vivarium/test_util.py
@@ -43,7 +43,7 @@ def pump_simulation(simulation, time_step_days=None, duration=None, iterations=N
if isinstance(duration, numbers.Number):
duration = pd.Timedelta(days=duration)
time_step = pd.Timedelta(days=config.simulation_parameters.time_step)
- iterations = int(duration / time_step)
+ iterations = int(duration / time_step) + 1
if run_from_ipython():
for _ in log_progress(range(iterations), name='Step'):
|
Fixed off by one error in pump simulation
|
diff --git a/test/integration/client/api-tests.js b/test/integration/client/api-tests.js
index <HASH>..<HASH> 100644
--- a/test/integration/client/api-tests.js
+++ b/test/integration/client/api-tests.js
@@ -6,7 +6,7 @@ var log = function() {
//console.log.apply(console, arguments);
}
-var sink = new helper.Sink(4, 10000, function() {
+var sink = new helper.Sink(5, 10000, function() {
log("ending connection pool: %s", connectionString);
pg.end(connectionString);
});
@@ -92,3 +92,19 @@ test("query errors are handled and do not bubble if callback is provded", functi
}))
}))
})
+
+test('callback is fired once and only once', function() {
+ pg.connect(connectionString, assert.calls(function(err, client) {
+ assert.isNull(err);
+ client.query("CREATE TEMP TABLE boom(name varchar(10))");
+ var callCount = 0;
+ client.query([
+ "INSERT INTO boom(name) VALUES('hai')",
+ "INSERT INTO boom(name) VALUES('boom')",
+ "INSERT INTO boom(name) VALUES('zoom')",
+ ].join(";"), function(err, callback) {
+ assert.equal(callCount++, 0, "Call count should be 0. More means this callback fired more than once.");
+ sink.add();
+ })
+ }))
+})
|
failing test for multiple calls of callback when multiple commands are executed
|
diff --git a/lib/OpenLayers/Control/Navigation.js b/lib/OpenLayers/Control/Navigation.js
index <HASH>..<HASH> 100644
--- a/lib/OpenLayers/Control/Navigation.js
+++ b/lib/OpenLayers/Control/Navigation.js
@@ -261,8 +261,11 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
* deltaZ - {Integer}
*/
wheelChange: function(evt, deltaZ) {
+ if (!this.map.fractionalZoom) {
+ deltaZ = Math.round(deltaZ);
+ }
var currentZoom = this.map.getZoom();
- var newZoom = this.map.getZoom() + Math.round(deltaZ);
+ var newZoom = this.map.getZoom() + deltaZ;
newZoom = Math.max(newZoom, 0);
newZoom = Math.min(newZoom, this.map.getNumZoomLevels());
if (newZoom === currentZoom) {
|
Don't round wheel change zoom for maps with fractional zoom
|
diff --git a/autopep8.py b/autopep8.py
index <HASH>..<HASH> 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -556,9 +556,7 @@ class FixPEP8(object):
' ' * num_indent + target.lstrip())
def fix_e125(self, result):
- """ Fix badly indented continuation lines when they don't distinguish
- from the next logical line. """
-
+ """Fix indentation undistinguish from the next logical line."""
num_indent = int(result['info'].split()[1])
line_index = result['line'] - 1
target = self.source[line_index]
@@ -572,10 +570,12 @@ class FixPEP8(object):
spaces_to_add = num_indent - len(_get_indentation(target))
indent = len(_get_indentation(target))
i = line_index
+ modified_lines = []
while len(_get_indentation(self.source[i])) >= indent:
self.source[i] = ' ' * spaces_to_add + self.source[i]
+ modified_lines.append(1 + line_index) # Line indexed at 1.
i -= 1
- return list(range(line_index, i, -1))
+ return modified_lines
def fix_e201(self, result):
"""Remove extraneous whitespace."""
|
Return modified lines correctly
Lines are indexed at 1.
|
diff --git a/code/pages/WikiPage.php b/code/pages/WikiPage.php
index <HASH>..<HASH> 100644
--- a/code/pages/WikiPage.php
+++ b/code/pages/WikiPage.php
@@ -258,12 +258,23 @@ class WikiPage extends Page
include_once SIMPLEWIKI_DIR.'/thirdparty/htmlpurifier-4.0.0-lite/library/HTMLPurifier.auto.php';
$purifier = new HTMLPurifier();
$content = $purifier->purify($content);
+ $content = preg_replace_callback('/\%5B(.*?)\%5D/', array($this, 'reformatShortcodes'), $content);
}
return $content;
}
/**
+ * Reformats shortcodes after being run through htmlpurifier
+ *
+ * @param array $matches
+ */
+ public function reformatShortcodes($matches) {
+ $val = urldecode($matches[1]);
+ return '['.$val.']';
+ }
+
+ /**
* Get the root of the wiki that this wiki page exists in
*
* @return WikiPage
|
BUGFIX: Convert purified shortcodes back to what they once were
|
diff --git a/hamster/reports.py b/hamster/reports.py
index <HASH>..<HASH> 100644
--- a/hamster/reports.py
+++ b/hamster/reports.py
@@ -18,6 +18,7 @@
# along with Project Hamster. If not, see <http://www.gnu.org/licenses/>.
from hamster import stuff
import os
+import datetime as dt
def simple(facts, start_date, end_date):
if start_date.year != end_date.year:
|
Added missing datetime's import to fix an issue with dt.date.today() on simple report
svn path=/trunk/; revision=<I>
|
diff --git a/src/components/View/View.js b/src/components/View/View.js
index <HASH>..<HASH> 100644
--- a/src/components/View/View.js
+++ b/src/components/View/View.js
@@ -99,9 +99,19 @@ export default class View extends Component {
})}
key={panel.key || panel.props.id || `panel-header-${i}`}
>
- <div className="View__header-left">{panel.props.header.left}</div>
- <div className="View__header-title">{panel.props.header.title}</div>
- <div className="View__header-right">{panel.props.header.right}</div>
+ {panel.props.header.left && (
+ <div className="View__header-left">
+ {panel.props.header.left}
+ </div>
+ )}
+ <div className="View__header-title">
+ {panel.props.header.title}
+ </div>
+ {panel.props.header.right && (
+ <div className="View__header-right">
+ {panel.props.header.right}
+ </div>
+ )}
</div>
))}
</div>
|
Don't show aside in panel header if it isn't exists
|
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -627,10 +627,7 @@ module Puppet
:factsync => [false,
"Whether facts should be synced with the central server."],
:factsignore => [".svn CVS",
- "What files to ignore when pulling down facts."]
- )
-
- setdefaults :reports,
+ "What files to ignore when pulling down facts."],
:reportdir => {:default => "$vardir/reports",
:mode => 0750,
:owner => "service",
@@ -640,6 +637,7 @@ module Puppet
subdirectory."},
:reporturl => ["http://localhost:3000/reports",
"The URL used by the http reports processor to send reports"]
+ )
setdefaults(:tagmail,
:tagmap => ["$confdir/tagmail.conf",
|
[#<I>] Do not create a reports settings block
Puts reportdir and reporturl back in the "main" block because this makes
tests break for reasons I don't understand.
|
diff --git a/lib/nydp/builtin.rb b/lib/nydp/builtin.rb
index <HASH>..<HASH> 100644
--- a/lib/nydp/builtin.rb
+++ b/lib/nydp/builtin.rb
@@ -5,8 +5,10 @@ module Nydp::Builtin
module Base
def invoke vm, args
builtin_invoke vm, args
+ rescue Nydp::Error => ne
+ raise ne
rescue Exception => e
- new_msg = "Called #{self.inspect}\nwith args #{args}\nraised\n#{Nydp.indent_text e.message}"
+ new_msg = "Called #{self.inspect}\nwith args #{args.inspect}\nraised\n#{Nydp.indent_text e.message}"
raise $!, new_msg, $!.backtrace
end
diff --git a/lib/nydp/builtin/error.rb b/lib/nydp/builtin/error.rb
index <HASH>..<HASH> 100644
--- a/lib/nydp/builtin/error.rb
+++ b/lib/nydp/builtin/error.rb
@@ -3,7 +3,7 @@ class Nydp::Builtin::Error
# override #invoke on nydp/builtin/base because
# we don't want to inherit error handling
- def invoke vm, args
+ def builtin_invoke vm, args
raise Nydp::Error.new(args.inspect)
end
end
|
builtins: special handling for Nydp::Error, no longer need to special-case builtin/error
|
diff --git a/src/Service.php b/src/Service.php
index <HASH>..<HASH> 100644
--- a/src/Service.php
+++ b/src/Service.php
@@ -58,14 +58,14 @@ final class Service
$server = $useSsl ? self::ADCOPY_API_SECURE_SERVER : self::ADCOPY_API_SERVER;
$errorpart = $error ? ';error=1' : '';
- return '<script type="text/javascript" src="' . $server . '/papi/challenge.script?k=' . $this->_pubkey . $errorpart . '"></script>
-
+ return <<<EOS
+<script type="text/javascript" src="{$server}/papi/challenge.script?k={$this->_pubkey}{$errorpart}"></script>
<noscript>
- <iframe src="' . $server . '/papi/challenge.noscript?k=' . $this->_pubkey . $errorpart
- . '" height="300" width="500" frameborder="0"></iframe><br/>
+ <iframe src="{$server}/papi/challenge.noscript?k={$this->_pubkey}{$errorpart}" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="adcopy_challenge" rows="3" cols="40"></textarea>
<input type="hidden" name="adcopy_response" value="manual_challenge"/>
-</noscript>';
+</noscript>
+EOS;
}
/**
|
Use heredoc rather than concatenated strings to simplify syntax.
|
diff --git a/src/event.js b/src/event.js
index <HASH>..<HASH> 100644
--- a/src/event.js
+++ b/src/event.js
@@ -661,7 +661,7 @@ var withinElement = function( event ) {
// Chrome does something similar, the parentNode property
// can be accessed but is null.
- if ( parent !== document && !parent.parentNode ) {
+ if ( parent && parent !== document && !parent.parentNode ) {
return;
}
// Traverse up the tree
diff --git a/test/unit/event.js b/test/unit/event.js
index <HASH>..<HASH> 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -683,6 +683,20 @@ test("hover()", function() {
equals( times, 4, "hover handlers fired" );
});
+test("mouseover triggers mouseenter", function() {
+ expect(1);
+
+ var count = 0,
+ elem = jQuery("<a />");
+ elem.mouseenter(function () {
+ count++;
+ });
+ elem.trigger('mouseover');
+ equals(count, 1, "make sure mouseover triggers a mouseenter" );
+
+ elem.remove();
+});
+
test("trigger() shortcuts", function() {
expect(6);
|
Fixes #<I>. Make sure parent is not null before crawling into its lap, so mouseenter is triggered on a mouseover event.
|
diff --git a/java/src/com/google/template/soy/jbcsrc/ExpressionCompiler.java b/java/src/com/google/template/soy/jbcsrc/ExpressionCompiler.java
index <HASH>..<HASH> 100644
--- a/java/src/com/google/template/soy/jbcsrc/ExpressionCompiler.java
+++ b/java/src/com/google/template/soy/jbcsrc/ExpressionCompiler.java
@@ -449,11 +449,11 @@ final class ExpressionCompiler {
itemVar.initializer().gen(adapter); // Object a = a_list.get(a_i);
- if (visitedFilter != null) {
- visitedFilter.gen(adapter);
- BytecodeUtils.constant(false).gen(adapter);
- adapter.ifICmp(Opcodes.IFEQ, loopContinue); // if (!filter.test(a)) continue;
- }
+ // if (visitedFilter != null) {
+ // visitedFilter.gen(adapter);
+ // BytecodeUtils.constant(false).gen(adapter);
+ // adapter.ifICmp(Opcodes.IFEQ, loopContinue); // if (!filter.test(a)) continue;
+ // }
resultVar.local().gen(adapter);
visitedMap.gen(adapter);
|
Comment-out filter expr logic in ExpressionCompiler for jbcsrc, since this is giving errors in [] for LineNumberTest. We decided to fix in a follow-up.
GITHUB_BREAKING_CHANGES=NA
-------------
Created by MOE: <URL>
|
diff --git a/middleman-core/lib/middleman-core/util.rb b/middleman-core/lib/middleman-core/util.rb
index <HASH>..<HASH> 100644
--- a/middleman-core/lib/middleman-core/util.rb
+++ b/middleman-core/lib/middleman-core/util.rb
@@ -122,7 +122,7 @@ module Middleman
Hamster::Set.new(res)
when Hamster::Vector, Hamster::Set, Hamster::SortedSet
obj.map { |element| recursively_enhance(element) }
- when ::TrueClass, ::FalseClass, ::Fixnum, ::Symbol, ::NilClass
+ when ::TrueClass, ::FalseClass, ::Fixnum, ::Symbol, ::NilClass, ::Float
obj
else
obj.dup.freeze
|
Update util.rb
line <I>, Float type is also not something that can be dup'ed, similar to Fixnum and friends
|
diff --git a/sling_test.go b/sling_test.go
index <HASH>..<HASH> 100644
--- a/sling_test.go
+++ b/sling_test.go
@@ -345,7 +345,7 @@ func TestBodySetter(t *testing.T) {
t.Errorf("expected nil, got %v", err)
}
if body != c.expected {
- t.Errorf("expected %v, got %v", c.expected, sling.Body)
+ t.Errorf("expected %v, got %v", c.expected, body)
}
}
}
|
Fix a test printf format which is an error on Go tip
|
diff --git a/pystache/template.py b/pystache/template.py
index <HASH>..<HASH> 100644
--- a/pystache/template.py
+++ b/pystache/template.py
@@ -75,20 +75,19 @@ class Template(object):
captures['whitespace'] = ''
# TODO: Process the remaining tag types.
- print captures['name']
- fetch = lambda view: unicode(view.get(captures['name']))
+ fetch = lambda view: view.get(captures['name'])
+
if captures['tag'] == '!':
pass
elif captures['tag'] == '=':
- print '"', captures['name'], '"'
self.otag, self.ctag = captures['name'].split()
self._compile_regexps()
elif captures['tag'] in ['{', '&']:
- buffer.append(fetch)
+ buffer.append(lambda view: unicode(fetch(view)))
elif captures['tag'] == '':
- buffer.append(lambda view: cgi.escape(fetch(view), True))
+ buffer.append(lambda view: cgi.escape(unicode(fetch(view)), True))
else:
- print 'Error!'
+ raise
return pos
|
Cleaning up the fetch routine a bit. Also deleting a bit
of unintended diagnostic code.
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -5,7 +5,7 @@ module.exports = {
entry: './index.js',
output: {
path: path.resolve(__dirname, 'dist'),
- filename: 'bundle.js',
+ filename: 'tenderkeys.min.js',
library: 'TenderKeys'
}
};
\ No newline at end of file
|
update webpack config - update file name
|
diff --git a/options.js b/options.js
index <HASH>..<HASH> 100644
--- a/options.js
+++ b/options.js
@@ -46,9 +46,13 @@ module.exports = function (argv, packageOpts, files, cwd, repo) {
listItemIndent: '1'
},
pluginPrefix: 'remark',
+ // "Whether to write successfully processed files"
output: argv.fix,
+ // "Whether to write the processed file to streamOut"
out: false,
+ // "Call back with an unsuccessful (1) code on warnings as well as errors"
frail: true,
+ // "Do not report successful files"
quiet: true
}
}
|
Add comments to unified-engine options
|
diff --git a/commands/server.go b/commands/server.go
index <HASH>..<HASH> 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -186,7 +186,9 @@ func server(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
- language.Set("baseURL", baseURL)
+ if isMultiHost {
+ language.Set("baseURL", baseURL)
+ }
if i == 0 {
c.Set("baseURL", baseURL)
}
|
commands: Fix baseURL server regression for multilingual sites
This was introduced in <I>f<I>e<I>d<I>a<I>a7edbaae<I>aa a couple of days ago, and demonstrates that we really need better tests for the server/commands package.
Fixes #<I>
|
diff --git a/web/mux.go b/web/mux.go
index <HASH>..<HASH> 100644
--- a/web/mux.go
+++ b/web/mux.go
@@ -220,6 +220,6 @@ func (m *Mux) NotFound(handler interface{}) {
// after all the routes have been added, and will be called automatically for
// you (at some performance cost on the first request) if you do not call it
// explicitly.
-func (rt *router) Compile() {
- rt.compile()
+func (m *Mux) Compile() {
+ m.rt.compile()
}
|
Fix public API
f<I>e<I>bb<I>a<I>c9ed<I>d<I>fd5b<I> accidentally removed
web.Mux.Compile from the public API. This restores it.
|
diff --git a/render/template.go b/render/template.go
index <HASH>..<HASH> 100644
--- a/render/template.go
+++ b/render/template.go
@@ -3,6 +3,7 @@ package render
import (
"html/template"
"io"
+ "log"
"os"
"path/filepath"
"sort"
@@ -67,7 +68,8 @@ func (s templateRenderer) exec(name string, data Data) (template.HTML, error) {
for _, ext := range s.exts(name) {
te, ok := s.TemplateEngines[ext]
if !ok {
- return "", errors.Errorf("could not find a template engine for %s", ext)
+ log.Printf("could not find a template engine for %s\n", ext)
+ continue
}
body, err = te(body, data, helpers)
if err != nil {
|
log a warning instead of returning an error for missing template engine
|
diff --git a/pandas/tests/test_multilevel.py b/pandas/tests/test_multilevel.py
index <HASH>..<HASH> 100644
--- a/pandas/tests/test_multilevel.py
+++ b/pandas/tests/test_multilevel.py
@@ -2263,6 +2263,7 @@ Thur,Lunch,Yes,51.51,17"""
def test_repeat(self):
# GH 9361
+ # fixed by # GH 7891
m_idx = pd.MultiIndex.from_tuples([(1, 2), (3, 4),
(5, 6), (7, 8)])
data = ['a', 'b', 'c', 'd']
|
update test comments to reference #<I>
|
diff --git a/structr-core/src/main/java/org/structr/common/RelType.java b/structr-core/src/main/java/org/structr/common/RelType.java
index <HASH>..<HASH> 100644
--- a/structr-core/src/main/java/org/structr/common/RelType.java
+++ b/structr-core/src/main/java/org/structr/common/RelType.java
@@ -31,6 +31,6 @@ public enum RelType implements RelationshipType {
OWNS,
IS_AT,
PROPERTY_ACCESS,
- CHILDREN
+ CONTAINS
}
diff --git a/structr-core/src/main/java/org/structr/core/entity/AbstractUser.java b/structr-core/src/main/java/org/structr/core/entity/AbstractUser.java
index <HASH>..<HASH> 100644
--- a/structr-core/src/main/java/org/structr/core/entity/AbstractUser.java
+++ b/structr-core/src/main/java/org/structr/core/entity/AbstractUser.java
@@ -95,7 +95,7 @@ public abstract class AbstractUser extends Person implements Principal {
public List<Principal> getParents() {
List<Principal> parents = new LinkedList<Principal>();
- Iterable<AbstractRelationship> parentRels = getIncomingRelationships(RelType.CHILDREN);
+ Iterable<AbstractRelationship> parentRels = getIncomingRelationships(RelType.CONTAINS);
for (AbstractRelationship rel : parentRels) {
|
fixed relationship type for groups containing users
|
diff --git a/example/idp2/idp_user.py b/example/idp2/idp_user.py
index <HASH>..<HASH> 100644
--- a/example/idp2/idp_user.py
+++ b/example/idp2/idp_user.py
@@ -68,7 +68,7 @@ USERS = {
"ou": "IT",
"initials": "P",
#"schacHomeOrganization": "example.com",
- "email": "roland@example.com",
+ "mail": "roland@example.com",
"displayName": "P. Roland Hedberg",
"labeledURL": "http://www.example.com/rohe My homepage",
"norEduPersonNIN": "SE197001012222"
|
Corrected attribute name: email -> mail.
|
diff --git a/python/thunder/rdds/series.py b/python/thunder/rdds/series.py
index <HASH>..<HASH> 100644
--- a/python/thunder/rdds/series.py
+++ b/python/thunder/rdds/series.py
@@ -191,11 +191,7 @@ class Series(Data):
perc = 20
basefunc = lambda x: percentile(x, perc)
- def func(y):
- baseline = basefunc(y)
- return (y - baseline) / (baseline + 0.1)
-
- return self.apply(func)
+ return self.apply(lambda y: (y - basefunc(y)) / (basefunc(y) + 0.1))
def center(self, axis=0):
""" Center series data by subtracting the mean
|
Simplify normalize call to avoid function def
|
diff --git a/jooby/src/main/java/io/jooby/Value.java b/jooby/src/main/java/io/jooby/Value.java
index <HASH>..<HASH> 100644
--- a/jooby/src/main/java/io/jooby/Value.java
+++ b/jooby/src/main/java/io/jooby/Value.java
@@ -237,7 +237,7 @@ public interface Value extends Iterable<Value> {
*
* @return Convert this value to String (if possible) or <code>null</code> when missing.
*/
- @Nonnull default String valueOrNull() {
+ @Nullable default String valueOrNull() {
return value((String) null);
}
|
Make valueOrNull nullable
The method Value.valueOrNull() is marked as NonNull, this fixes that and marks it as Nullable
|
diff --git a/packages/material-ui/src/PaginationItem/PaginationItem.js b/packages/material-ui/src/PaginationItem/PaginationItem.js
index <HASH>..<HASH> 100644
--- a/packages/material-ui/src/PaginationItem/PaginationItem.js
+++ b/packages/material-ui/src/PaginationItem/PaginationItem.js
@@ -253,10 +253,15 @@ const PaginationItem = React.forwardRef(function PaginationItem(props, ref) {
return type === 'start-ellipsis' || type === 'end-ellipsis' ? (
<div
ref={ref}
- className={clsx(classes.root, classes.ellipsis, {
- [classes.disabled]: disabled,
- [classes[`size${capitalize(size)}`]]: size !== 'medium',
- })}
+ className={clsx(
+ classes.root,
+ classes.ellipsis,
+ {
+ [classes.disabled]: disabled,
+ [classes[`size${capitalize(size)}`]]: size !== 'medium',
+ },
+ className,
+ )}
>
…
</div>
|
[Pagination] Fix className forwarding when type is ellipsis (#<I>)
|
diff --git a/lib/classifier-reborn/bayes.rb b/lib/classifier-reborn/bayes.rb
index <HASH>..<HASH> 100644
--- a/lib/classifier-reborn/bayes.rb
+++ b/lib/classifier-reborn/bayes.rb
@@ -12,7 +12,7 @@ module ClassifierReborn
def initialize(*args)
@categories = Hash.new
options = { language: 'en' }
- args.each { |arg|
+ args.flatten.each { |arg|
if arg.kind_of?(Hash)
options.merge!(arg)
else
|
Update bayes.rb
Added ability to handle and array of classifications to the constructor.
|
diff --git a/sharding-proxy/src/main/java/io/shardingsphere/shardingproxy/backend/jdbc/connection/BackendConnection.java b/sharding-proxy/src/main/java/io/shardingsphere/shardingproxy/backend/jdbc/connection/BackendConnection.java
index <HASH>..<HASH> 100644
--- a/sharding-proxy/src/main/java/io/shardingsphere/shardingproxy/backend/jdbc/connection/BackendConnection.java
+++ b/sharding-proxy/src/main/java/io/shardingsphere/shardingproxy/backend/jdbc/connection/BackendConnection.java
@@ -162,8 +162,10 @@ public final class BackendConnection implements AutoCloseable {
* @param autoCommit auto commit
*/
public void setAutoCommit(final boolean autoCommit) {
+ if (!autoCommit) {
+ status = ConnectionStatus.TRANSACTION;
+ }
cachedConnections.clear();
- status = ConnectionStatus.TRANSACTION;
recordMethodInvocation(Connection.class, "setAutoCommit", new Class[]{boolean.class}, new Object[]{autoCommit});
}
|
#<I> Only change status to TRANSACTION while setAutoCommit was false.
|
diff --git a/lib/topologies/replset.js b/lib/topologies/replset.js
index <HASH>..<HASH> 100644
--- a/lib/topologies/replset.js
+++ b/lib/topologies/replset.js
@@ -1022,7 +1022,6 @@ ReplSet.prototype.destroy = function(options) {
// Clear out all monitoring
for (var i = 0; i < this.intervalIds.length; i++) {
this.intervalIds[i].stop();
- this.intervalIds[i].stop();
}
// Reset list of intervalIds
|
chore(topology): removing double timeout clear
This was accidentally introduced during the following refactor:
cd<I>d<I>f<I>ad<I>c6a<I>ffcfa<I>d1e7d3a2
|
diff --git a/builtin/providers/aws/resource_aws_directory_service_directory.go b/builtin/providers/aws/resource_aws_directory_service_directory.go
index <HASH>..<HASH> 100644
--- a/builtin/providers/aws/resource_aws_directory_service_directory.go
+++ b/builtin/providers/aws/resource_aws_directory_service_directory.go
@@ -336,7 +336,7 @@ func resourceAwsDirectoryServiceDirectoryCreate(d *schema.ResourceData, meta int
d.Id(), *ds.Stage)
return ds, *ds.Stage, nil
},
- Timeout: 30 * time.Minute,
+ Timeout: 45 * time.Minute,
}
if _, err := stateConf.WaitForState(); err != nil {
return fmt.Errorf(
|
provider/aws: Bump Directory Service creation timeout to <I>m
|
diff --git a/conductor-support/src/main/java/com/bluelinelabs/conductor/support/ControllerPagerAdapter.java b/conductor-support/src/main/java/com/bluelinelabs/conductor/support/ControllerPagerAdapter.java
index <HASH>..<HASH> 100644
--- a/conductor-support/src/main/java/com/bluelinelabs/conductor/support/ControllerPagerAdapter.java
+++ b/conductor-support/src/main/java/com/bluelinelabs/conductor/support/ControllerPagerAdapter.java
@@ -53,12 +53,17 @@ public abstract class ControllerPagerAdapter extends PagerAdapter {
}
}
+ final Controller controller;
if (!router.hasRootController()) {
- Controller controller = getItem(position);
+ controller = getItem(position);
router.setRoot(RouterTransaction.with(controller).tag(name));
- visiblePageIds.put(position, controller.getInstanceId());
} else {
router.rebindIfNeeded();
+ controller = router.getControllerWithTag(name);
+ }
+
+ if (controller != null) {
+ visiblePageIds.put(position, controller.getInstanceId());
}
return router.getControllerWithTag(name);
@@ -139,4 +144,4 @@ public abstract class ControllerPagerAdapter extends PagerAdapter {
return viewId + ":" + id;
}
-}
\ No newline at end of file
+}
|
Fixes issue when retrieving an existing controller from a ControllerPagerAdapter (#<I>)
|
diff --git a/vendor/refinerycms/core/lib/refinery/crud.rb b/vendor/refinerycms/core/lib/refinery/crud.rb
index <HASH>..<HASH> 100644
--- a/vendor/refinerycms/core/lib/refinery/crud.rb
+++ b/vendor/refinerycms/core/lib/refinery/crud.rb
@@ -275,6 +275,17 @@ module Refinery
)
end
+
+ module_eval %(
+ def self.sortable?
+ #{options[:sortable].to_s}
+ end
+
+ def self.searchable?
+ #{options[:searchable].to_s}
+ end
+ )
+
end
|
add helper methods to expose some of the options in crud. This allows the admin views to dynamically hide or show the search box or reorder link depending on what options you set with crud
|
diff --git a/src/Testing/Concerns/MakesHttpRequests.php b/src/Testing/Concerns/MakesHttpRequests.php
index <HASH>..<HASH> 100644
--- a/src/Testing/Concerns/MakesHttpRequests.php
+++ b/src/Testing/Concerns/MakesHttpRequests.php
@@ -242,11 +242,13 @@ trait MakesHttpRequests
public function seeJson(array $data = null, $negate = false)
{
if (is_null($data)) {
- PHPUnit::assertArraySubset(
- null, json_decode($this->getContent(), true), false, "JSON was not returned from [{$this->currentUri}]."
- );
+ $decodedResponse = json_decode($this->response->getContent(), true);
- return $this;
+ if (is_null($decodedResponse) || $decodedResponse === false) {
+ PHPUnit::fail(
+ "JSON was not returned from [{$this->currentUri}]."
+ );
+ }
}
return $this->seeJsonContains($data, $negate);
|
This is a bit of a mistery.
1. I cannot find anything related to the original `PHPUnit\Framework\Assert::assertJson()`
2. This mainly aim to check if response is actually JSON.
|
diff --git a/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/loader/AbstractCanalAdapterWorker.java b/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/loader/AbstractCanalAdapterWorker.java
index <HASH>..<HASH> 100644
--- a/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/loader/AbstractCanalAdapterWorker.java
+++ b/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/loader/AbstractCanalAdapterWorker.java
@@ -201,7 +201,11 @@ public abstract class AbstractCanalAdapterWorker {
List<Dml> dmlsBatch = new ArrayList<>();
for (Dml dml : dmls) {
dmlsBatch.add(dml);
- len += dml.getData().size();
+ if (dml.getData() == null || dml.getData().isEmpty()) {
+ len += 1;
+ } else {
+ len += dml.getData().size();
+ }
if (len >= canalClientConfig.getSyncBatchSize()) {
adapter.sync(dmlsBatch);
dmlsBatch.clear();
|
fixed issue #<I>, NPE
|
diff --git a/marklogic-client-api/src/test/java/com/marklogic/client/test/datamovement/RowBatcherTest.java b/marklogic-client-api/src/test/java/com/marklogic/client/test/datamovement/RowBatcherTest.java
index <HASH>..<HASH> 100644
--- a/marklogic-client-api/src/test/java/com/marklogic/client/test/datamovement/RowBatcherTest.java
+++ b/marklogic-client-api/src/test/java/com/marklogic/client/test/datamovement/RowBatcherTest.java
@@ -182,6 +182,12 @@ public class RowBatcherTest {
runJsonRowsTest(jsonBatcher(1));
}
@Test
+ public void testJsonRows1ThreadForDB() throws Exception {
+ runJsonRowsTest(jsonBatcher(
+ Common.newClient("java-unittest").newDataMovementManager(),
+ 1));
+ }
+ @Test
public void testJsonRows3Threads() throws Exception {
runJsonRowsTest(jsonBatcher(3));
}
@@ -224,6 +230,9 @@ public class RowBatcherTest {
/* TODO: style tests
*/
private RowBatcher<JsonNode> jsonBatcher(int threads) {
+ return jsonBatcher(moveMgr, threads);
+ }
+ private RowBatcher<JsonNode> jsonBatcher(DataMovementManager moveMgr, int threads) {
return moveMgr.newRowBatcher(new JacksonHandle())
.withBatchSize(30)
.withThreadCount(threads);
|
Unit test to verify database-specific client with row batcher
|
diff --git a/generator/index.js b/generator/index.js
index <HASH>..<HASH> 100644
--- a/generator/index.js
+++ b/generator/index.js
@@ -50,6 +50,12 @@ module.exports = (api, options = {}) => {
'let mainWindow: any'
)
fs.writeFileSync(api.resolve('./src/background.ts'), background)
+ if (api.hasPlugin('router')) {
+ console.log('\n')
+ require('@vue/cli-shared-utils/lib/logger').warn(
+ 'It is detected that you are using Vue Router. If you are using history mode, you must push the default route when the root component is loaded. Learn more at http://shorturl.at/lsBEH.'
+ )
+ }
}
})
|
[skip ci] generator: warn about history mode if router is installed
|
diff --git a/src/Storefront/Pagelet/Checkout/AjaxCart/CheckoutAjaxCartPageletLoadedEvent.php b/src/Storefront/Pagelet/Checkout/AjaxCart/CheckoutAjaxCartPageletLoadedEvent.php
index <HASH>..<HASH> 100644
--- a/src/Storefront/Pagelet/Checkout/AjaxCart/CheckoutAjaxCartPageletLoadedEvent.php
+++ b/src/Storefront/Pagelet/Checkout/AjaxCart/CheckoutAjaxCartPageletLoadedEvent.php
@@ -9,7 +9,7 @@ use Symfony\Component\HttpFoundation\Request;
class CheckoutAjaxCartPageletLoadedEvent extends NestedEvent
{
- public const NAME = 'checkout-info.pagelet.loaded';
+ public const NAME = 'checkout-ajax-cart.pagelet.loaded';
/**
* @var CheckoutAjaxCartPagelet
|
NTR - Fix doubled event names
|
diff --git a/src/pydocstyle/cli.py b/src/pydocstyle/cli.py
index <HASH>..<HASH> 100644
--- a/src/pydocstyle/cli.py
+++ b/src/pydocstyle/cli.py
@@ -55,7 +55,7 @@ def run_pydocstyle(use_pep257=False):
count = 0
for error in errors:
- sys.stderr.write('%s\n' % error)
+ sys.stdout.write('%s\n' % error)
count += 1
if count == 0:
exit_code = ReturnCode.no_violations_found
diff --git a/src/pydocstyle/parser.py b/src/pydocstyle/parser.py
index <HASH>..<HASH> 100644
--- a/src/pydocstyle/parser.py
+++ b/src/pydocstyle/parser.py
@@ -380,8 +380,8 @@ class Parser(object):
if self.current.value not in '([':
raise AllError('Could not evaluate contents of __all__. ')
if self.current.value == '[':
- sys.stderr.write(
- "{} WARNING: __all__ is defined as a list, this means "
+ sys.stdout.write(
+ "{0} WARNING: __all__ is defined as a list, this means "
"pydocstyle cannot reliably detect contents of the __all__ "
"variable, because it can be mutated. Change __all__ to be "
"an (immutable) tuple, to remove this warning. Note, "
|
changed stderr to stdout
|
diff --git a/config/projects/chefdk.rb b/config/projects/chefdk.rb
index <HASH>..<HASH> 100644
--- a/config/projects/chefdk.rb
+++ b/config/projects/chefdk.rb
@@ -66,7 +66,7 @@ override :ruby, version: "2.1.4"
override :'ruby-windows', version: "2.0.0-p451"
######
override :rubygems, version: "2.4.4"
-override :'test-kitchen', version: "v121-dep-fix"
+override :'test-kitchen', version: "v1.3.0"
override :yajl, version: "1.2.1"
override :zlib, version: "1.2.8"
|
Bump test-kitchen to <I>
|
diff --git a/lib/devise.rb b/lib/devise.rb
index <HASH>..<HASH> 100644
--- a/lib/devise.rb
+++ b/lib/devise.rb
@@ -378,8 +378,7 @@ module Devise
# constant-time comparison algorithm to prevent timing attacks
def self.secure_compare(a, b)
- return false unless a.present? && b.present?
- return false unless a.bytesize == b.bytesize
+ return false if a.blank? || b.blank? || a.bytesize != b.bytesize
l = a.unpack "C#{a.bytesize}"
res = 0
diff --git a/test/devise_test.rb b/test/devise_test.rb
index <HASH>..<HASH> 100644
--- a/test/devise_test.rb
+++ b/test/devise_test.rb
@@ -62,4 +62,14 @@ class DeviseTest < ActiveSupport::TestCase
assert_nothing_raised(Exception) { Devise.add_module(:authenticatable_again, :model => 'devise/model/authenticatable') }
assert defined?(Devise::Models::AuthenticatableAgain)
end
+
+ test 'should complain when comparing empty or different sized passes' do
+ [nil, ""].each do |empty|
+ assert_not Devise.secure_compare(empty, "something")
+ assert_not Devise.secure_compare("something", empty)
+ assert_not Devise.secure_compare(empty, empty)
+ end
+ assert_not Devise.secure_compare("size_1", "size_four")
+ end
+
end
|
simplifying comparisons (avoind too much negatives) and adding unit test cases
|
diff --git a/spec/mangopay/client_spec.rb b/spec/mangopay/client_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/mangopay/client_spec.rb
+++ b/spec/mangopay/client_spec.rb
@@ -96,14 +96,14 @@ describe MangoPay::Client do
trns = MangoPay::Client.fetch_wallet_transactions('fees', 'EUR')
expect(trns).to be_kind_of(Array)
expect(trns).not_to be_empty
- expect((trns.map {|m| m['DebitedWalletId']}).uniq).to eq(['FEES_EUR'])
+ #expect((trns.map {|m| m['DebitedWalletId']}).uniq).to eq(['FEES_EUR'])
end
it 'fetches transactions of one of client wallets by funds type (credit) and currency' do
trns = MangoPay::Client.fetch_wallet_transactions('credit', 'EUR')
expect(trns).to be_kind_of(Array)
expect(trns).not_to be_empty
- expect((trns.map {|m| m['CreditedWalletId']}).uniq).to eq(['CREDIT_EUR'])
+ #expect((trns.map {|m| m['CreditedWalletId']}).uniq).to eq(['CREDIT_EUR'])
end
end
|
Remove non reliable tests
Because their outcome depends entirely on the having the right data in the right fields on the API side :-/
|
diff --git a/packages/tooltip/src/Tooltip.js b/packages/tooltip/src/Tooltip.js
index <HASH>..<HASH> 100644
--- a/packages/tooltip/src/Tooltip.js
+++ b/packages/tooltip/src/Tooltip.js
@@ -80,5 +80,10 @@ Tooltip.propTypes = {
/** When provided, it overrides the flyout's open state */
open: PropTypes.bool,
/** Whether flyout should open when the target is hovered over */
- openOnHover: PropTypes.bool
+ openOnHover: PropTypes.bool,
+ /**
+ * If openOnHover is true, this prop will determine the delay
+ * from when mouseEnter begins until the Tooltip visually opens
+ */
+ openOnHoverDelay: PropTypes.number
};
|
feat: Add openOnHoverDelay prop
|
diff --git a/source/decode.js b/source/decode.js
index <HASH>..<HASH> 100644
--- a/source/decode.js
+++ b/source/decode.js
@@ -129,8 +129,8 @@ var Decode = (function() {
, int
;
- str = str.slice( 0, endIdx )
- int = str.replace(/i/, '').replace(/e/, '');
+ str = str.slice( 0, endIdx );
+ int = str.match( /\d+/ );
var result = parseInt( int );
|
changed logic in getInteger for extracting desired part of the string
|
diff --git a/lib/proteus/kit.rb b/lib/proteus/kit.rb
index <HASH>..<HASH> 100644
--- a/lib/proteus/kit.rb
+++ b/lib/proteus/kit.rb
@@ -17,8 +17,12 @@ module Proteus
if system "git ls-remote #{url(kit_name)} #{repo_name} > /dev/null 2>&1"
puts "Starting a new proteus-#{kit_name} project in #{repo_name}"
system "git clone #{url(kit_name)}#{' ' + repo_name} && "\
- "rm -rf #{repo_name}/.git && "\
- "git init #{repo_name}"
+ "cd #{repo_name} && "\
+ "rm -rf .git && "\
+ "git init && "\
+ "git add . && "\
+ "git commit -am 'New proteus-#{kit_name} project' && "\
+ "cd -"
else
puts "A thoughtbot repo doesn't exist with that name"
end
|
Make a first commit for the user
|
diff --git a/lib/cli/init-deployment.js b/lib/cli/init-deployment.js
index <HASH>..<HASH> 100644
--- a/lib/cli/init-deployment.js
+++ b/lib/cli/init-deployment.js
@@ -129,7 +129,7 @@ module.exports = function (argv) {
start: 'node server.js'
},
dependencies: {
- 'anvil-connect': '0.1.0'
+ 'anvil-connect': '0.1.1'
}
}),
|
bump anvil-connect version in cli generated package.json prior to release
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.