diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/lib/api.js b/src/lib/api.js
index <HASH>..<HASH> 100644
--- a/src/lib/api.js
+++ b/src/lib/api.js
@@ -10,7 +10,7 @@ function api (opbeat, queuedCommands) {
if (queuedCommands) {
for (var i = 0; i < queuedCommands.length; i++) {
var cmd = queuedCommands[i]
- this.push(cmd)
+ this.push.apply(this, cmd)
}
}
}
|
Fix 'Cannot read property 'apply' of undefined' introduced in daaae<I>
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,5 @@
var defaultBase = 1
-var defaultRatio = 'goldenSection'
+var defaultRatio = 1.618
var ratioNames = {
minorSecond: 1.067,
majorSecond: 1.125,
@@ -36,6 +36,9 @@ module.exports = function modularscale (options) {
ratio = ratioNames[ratio]
? ratioNames[ratio]
: parseFloat(ratio, 10)
+ if (Number.isNaN(ratio)) {
+ ratio = defaultRatio
+ }
}
return function ms (value) {
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -65,7 +65,7 @@ test('should not bomb on empty bases and ratios', t => {
test('should not bomb when pased completely wrong values', t => {
var ms = modularScale({
- ratio: 0,
+ ratio: 'yolo',
base: 'nope'
})
t.equals(ms(1), 1.618)
|
Patch guards against passing bad ratio string.
|
diff --git a/lib/ib/project.rb b/lib/ib/project.rb
index <HASH>..<HASH> 100644
--- a/lib/ib/project.rb
+++ b/lib/ib/project.rb
@@ -103,7 +103,7 @@ class IB::Project
# Add all other resources, ignoring files in existing asset catalogs
Dir.glob(File.join(dir, "**/*.{#{RESOURCE_EXTENSIONS.join(",")}}"))
.reject {|f| f[%r{.*\.xcassets/.*}] }.each do |file|
- group.new_reference(File.basename(file))
+ group.new_reference(file.sub(dir + '/', ''))
end
end
end
|
Fixes issue with subfolders in resources folder not being recognized in the resulting xcode project
Closes #<I>
|
diff --git a/MQ2/mq2.py b/MQ2/mq2.py
index <HASH>..<HASH> 100644
--- a/MQ2/mq2.py
+++ b/MQ2/mq2.py
@@ -234,7 +234,7 @@ def _append_count_to_matrix(qtl_matrixfile, lod_threshold):
while cnt < len(matrix):
row = list(matrix[cnt])
nr_qtl = 0
- for cel in row[4:]:
+ for cel in row[3:]:
if cel and float(cel) > float(lod_threshold):
nr_qtl = nr_qtl + 1
row.append(str(nr_qtl))
|
Fix adding the QTL count at the end of the matrix file
|
diff --git a/ryu/controller/ofp_handler.py b/ryu/controller/ofp_handler.py
index <HASH>..<HASH> 100644
--- a/ryu/controller/ofp_handler.py
+++ b/ryu/controller/ofp_handler.py
@@ -280,7 +280,10 @@ class OFPHandler(ryu.base.app_manager.RyuApp):
hex(msg.type), hex(msg.code), utils.binary_str(msg.data),
ofp.ofp_error_type_to_str(msg.type),
ofp.ofp_error_code_to_str(msg.type, msg.code))
- if len(msg.data) >= ofp.OFP_HEADER_SIZE:
+ if msg.type == ofp.OFPET_HELLO_FAILED:
+ self.logger.debug(
+ " `-- data: %s", msg.data.decode('ascii'))
+ elif len(msg.data) >= ofp.OFP_HEADER_SIZE:
(version, msg_type, msg_len, xid) = ofproto_parser.header(msg.data)
self.logger.debug(
" `-- data: version=%s, msg_type=%s, msg_len=%s, xid=%s\n"
|
Log OFPErrorMsg.data as ascii when type is OFPET_HELLO_FAILED
OFPErrorMsg.data usually contains the offending OpenFlow message,
but is an ASCII text string if its type is OFPET_HELLO_FAILED.
|
diff --git a/yabt/builders/proto.py b/yabt/builders/proto.py
index <HASH>..<HASH> 100644
--- a/yabt/builders/proto.py
+++ b/yabt/builders/proto.py
@@ -143,6 +143,8 @@ def proto_builder(build_context, target):
process_generated(src_base + '.pb.h', AT.gen_h)
if target.props.gen_go or target.props.gen_go_grpc:
process_generated(src_base + '.pb.go', AT.gen_go)
+ if target.props.gen_go_grpc:
+ process_generated(src_base + '_grpc.pb.go', AT.gen_go)
if target.props.gen_python_rpcz:
process_generated(src_base + '_rpcz.py', AT.gen_py)
if target.props.gen_cpp_rpcz:
|
Generate grpc go artifacts (#<I>)
|
diff --git a/tests.py b/tests.py
index <HASH>..<HASH> 100644
--- a/tests.py
+++ b/tests.py
@@ -26,11 +26,13 @@ from jsonschema import (
def make_case(schema, data, valid):
if valid:
def test_case(self):
- validate(data, schema, cls=self.validator_class)
+ kwargs = getattr(self, "validator_kwargs", {})
+ validate(data, schema, cls=self.validator_class, **kwargs)
else:
def test_case(self):
+ kwargs = getattr(self, "validator_kwargs", {})
with self.assertRaises(ValidationError):
- validate(data, schema, cls=self.validator_class)
+ validate(data, schema, cls=self.validator_class, **kwargs)
return test_case
@@ -97,7 +99,11 @@ class BigNumMixin(object):
pass
+@load_json_cases("json/tests/draft3/optional/format.json")
class FormatMixin(object):
+
+ validator_kwargs = {"format_checker" : FormatChecker()}
+
def test_it_does_not_validate_formats_by_default(self):
validator = self.validator_class({})
self.assertIsNone(validator.format_checker)
|
OK this works. Non-ideal, but works.
|
diff --git a/src/Menu/Provider/GroupMenuProvider.php b/src/Menu/Provider/GroupMenuProvider.php
index <HASH>..<HASH> 100644
--- a/src/Menu/Provider/GroupMenuProvider.php
+++ b/src/Menu/Provider/GroupMenuProvider.php
@@ -179,7 +179,7 @@ class GroupMenuProvider implements MenuProviderInterface
'admin' => $admin,
];
- return $this->menuFactory->createItem($admin->getLabel(), $options);
+ return $this->menuFactory->createItem($admin->getLabel() ?? '', $options);
}
return $this->menuFactory->createItem($item['label'], [
|
Prevent passing a null label to createItem
This method requires a string
|
diff --git a/src/Auth/TinyAuthorize.php b/src/Auth/TinyAuthorize.php
index <HASH>..<HASH> 100644
--- a/src/Auth/TinyAuthorize.php
+++ b/src/Auth/TinyAuthorize.php
@@ -63,6 +63,7 @@ class TinyAuthorize extends BaseAuthorize {
'cache' => AUTH_CACHE,
'cacheKey' => 'tiny_auth_acl',
'autoClearCache' => false, // usually done by Cache automatically in debug mode,
+ 'aclPath' => null, // possible to locate acl.ini at given path e.g. Plugin::configPath('Admin')
];
/**
@@ -157,7 +158,7 @@ class TinyAuthorize extends BaseAuthorize {
}
if ($this->_acl === null) {
- $this->_acl = $this->_getAcl();
+ $this->_acl = $this->_getAcl($this->_config['aclPath']);
}
// Allow access if user has a role with wildcard access to the resource
|
aclPath configuration to be possible to use acl.ini from different path
|
diff --git a/tests/db_routers_unittest.py b/tests/db_routers_unittest.py
index <HASH>..<HASH> 100644
--- a/tests/db_routers_unittest.py
+++ b/tests/db_routers_unittest.py
@@ -113,7 +113,7 @@ class OQRouterTestCase(unittest.TestCase):
For each model in the 'uiapi' schema, test for proper db routing
for read operations.
'''
- classes = [Upload, Input, OqJob, OqParams, Output, ErrorMsg]
+ classes = [Upload, Input, InputSet, OqJob, OqParams, Output, ErrorMsg]
expected_db = 'reslt_writer'
self._db_for_read_helper(classes, expected_db)
@@ -123,7 +123,7 @@ class OQRouterTestCase(unittest.TestCase):
For each model in the 'uiapi' schema, test for proper db routing
for write operations.
'''
- classes = [Upload, Input, OqJob, OqParams, ErrorMsg]
+ classes = [Upload, Input, InputSet, OqJob, OqParams, ErrorMsg]
expected_db = 'job_init'
self._db_for_write_helper(classes, expected_db)
|
Added test to verify InputSet is routed as expected.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ setup(
description = 'parser combinator.',
long_description = 'A univeral Python parser combinator library inspirted by Parsec library of Haskell.',
author = 'He Tao',
- author_email = 'sighingnow@gmail',
+ author_email = 'sighingnow@gmail.com',
url = 'https://github.com/sighignow/parsec.py',
license = 'MIT',
classifiers=[
|
Fix a error about the author_email in setup.py.
|
diff --git a/src/Serverfireteam/Blog/BlogServiceProvider.php b/src/Serverfireteam/Blog/BlogServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Serverfireteam/Blog/BlogServiceProvider.php
+++ b/src/Serverfireteam/Blog/BlogServiceProvider.php
@@ -15,7 +15,7 @@ class BlogServiceProvider extends ServiceProvider
$this->app->register('Serverfireteam\Panel\PanelServiceProvider');
- include __DIR__."/Commands/Command.php";
+ include_once __DIR__."/Commands/Command.php";
$this->app['blog::install'] = $this->app->share(function()
{
return new \Serverfireteam\Blog\Commands\BlogCommand();
|
Fixing include -> include_once
|
diff --git a/salt/utils/timed_subprocess.py b/salt/utils/timed_subprocess.py
index <HASH>..<HASH> 100644
--- a/salt/utils/timed_subprocess.py
+++ b/salt/utils/timed_subprocess.py
@@ -27,7 +27,7 @@ class TimedProc(object):
elif self.stdin is not None:
# Translate a newline submitted as '\n' on the CLI to an actual
# newline character.
- self.stdin = self.stdin.replace('\\n', '\n')
+ self.stdin = self.stdin.replace('\\n', '\n').encode(__salt_system_encoding__)
kwargs['stdin'] = subprocess.PIPE
if not self.with_communicate:
|
Encode stdin to subproc calls for Py3 compat
We need a bytes-like object for stdin for a subprocess in python3
|
diff --git a/spec/poole_spec.rb b/spec/poole_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/poole_spec.rb
+++ b/spec/poole_spec.rb
@@ -10,11 +10,13 @@ module MrPoole
context 'no jekyll directory' do
before :all do
# make a directory to work in
+ @olddir = Dir.pwd()
@dir = Dir.mktmpdir('nojekyll')
Dir.chdir(@dir)
end
after :all do
+ Dir.chdir(@olddir)
FileUtils.rm_rf(@dir)
end
@@ -30,20 +32,22 @@ module MrPoole
before :each do
# make a directory to work in
@olddir = Dir.pwd()
- #puts "---#{@olddir}"
@dir = Dir.mktmpdir('jekyll')
- #posts = File.join(@dir, '_posts')
- #Dir.mkdir(posts)
- #Dir.chdir(@dir)
+ posts = File.join(@dir, '_posts')
+ Dir.mkdir(posts)
+ Dir.chdir(@dir)
end
after :each do
- #Dir.chdir(@olddir) # change out of dir before removing it
- Dir.chdir()
+ Dir.chdir(@olddir)
FileUtils.rm_rf(@dir)
end
it "should not exit with _posts directory" do
+ argv = []
+ lambda {
+ cli = CLI.new(argv)
+ }.should_not raise_error
end
end # end context 'in jekyll'
|
Fix to stupid bug in spec.
I wasn't changing out of the directory in the old context before I
removed it, so pwd was failing in the new context.
|
diff --git a/html.py b/html.py
index <HASH>..<HASH> 100644
--- a/html.py
+++ b/html.py
@@ -447,7 +447,7 @@ ckeditor_available = LocalProxy(is_html_text_editor_installed)
def get_html_text_editor(name, id=None, content='', textual_content=None, width='300px', height='200px',
enabled=True, file_upload_url=None, toolbar_set="Basic",
- custom_configurations_path='/ckeditor/invenio-ckeditor-config.js',
+ custom_configurations_path='/js/ckeditor/invenio-ckeditor-config.js',
ln=None):
"""
Returns a wysiwyg editor (CKEditor) to embed in html pages.
|
global: fixes for javascript and translations
|
diff --git a/fireplace/card.py b/fireplace/card.py
index <HASH>..<HASH> 100644
--- a/fireplace/card.py
+++ b/fireplace/card.py
@@ -33,7 +33,6 @@ class BaseCard(Entity):
has_deathrattle = boolean_property("has_deathrattle")
atk = int_property("atk")
max_health = int_property("max_health")
- cost = int_property("cost")
def __init__(self, data):
self.data = data
@@ -130,6 +129,18 @@ class PlayableCard(BaseCard, TargetableByAuras):
return self.base_events + self._events
@property
+ def cost(self):
+ ret = self._getattr("cost", 0)
+ mod = getattr(self.data.scripts, "cost_mod", None)
+ if mod is not None:
+ ret += mod.evaluate(self)
+ return max(0, ret)
+
+ @cost.setter
+ def cost(self, value):
+ self._cost = value
+
+ @property
def deathrattles(self):
ret = []
if not self.has_deathrattle:
@@ -664,6 +675,8 @@ class Secret(Spell):
class Enchantment(BaseCard):
+ cost = int_property("cost")
+
def __init__(self, data):
self.one_turn_effect = False
super().__init__(data)
|
Implement `cost_mod` script for card definitions
|
diff --git a/spec/support/setup.rb b/spec/support/setup.rb
index <HASH>..<HASH> 100644
--- a/spec/support/setup.rb
+++ b/spec/support/setup.rb
@@ -1,5 +1,6 @@
RSpec.configure do |config|
config.before :suite do
`docker build --tag nibtest:latest .`
+ `cd spec/dummy && docker-compose build`
end
end
|
Build dummy docker images before spec run
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='appdaemontestframework',
- version='2.6.0',
+ version='2.6.1',
description='Clean, human-readable tests for Appdaemon',
long_description='See: https://floriankempenich.github.io/Appdaemon-Test-Framework/',
keywords='appdaemon homeassistant test tdd clean-code home-automation',
|
Release <I>: Add support for kwargs in 'turned_off' (by snjoetw) + Fix bug when turning on/off via service
|
diff --git a/source/application/transforms/react/index.js b/source/application/transforms/react/index.js
index <HASH>..<HASH> 100644
--- a/source/application/transforms/react/index.js
+++ b/source/application/transforms/react/index.js
@@ -10,12 +10,16 @@ export default function createReactCodeFactory(application) {
return async function createReactCode(file, demo) {
let result = convertCode(file, config.opts);
+ let requireBlock = createRequireBlock(getDependencies(file), config.opts);
+ result = requireBlock + result;
if (demo) {
demo.dependencies = {
pattern: file
};
merge(demo.dependencies, file.dependencies);
let demoResult = convertCode(demo, config.opts);
+ let requireBlock = createRequireBlock(getDependencies(demo), config.opts);
+ demoResult = requireBlock + demoResult;
file.demoSource = demo.source;
file.demoBuffer = new Buffer(demoResult, 'utf-8');
}
@@ -34,8 +38,7 @@ function convertCode(file, opts) {
source = createWrappedRenderFunction(file, source);
}
let result = transform(source, opts).code;
- let requireBlock = createRequireBlock(getDependencies(file), opts);
- return requireBlock + result;
+ return result;
}
function createWrappedRenderFunction(file, source) {
|
Big speed improvement of dependencies
Only prepare and compile each dependency once per pattern.
|
diff --git a/lib/agent.js b/lib/agent.js
index <HASH>..<HASH> 100644
--- a/lib/agent.js
+++ b/lib/agent.js
@@ -75,7 +75,7 @@ module.exports = function(uaString) {
}
// Patch ua.family with the normalised name
- ua.family = agentlist[ua.family.toLowerCase()] || ua.family;
+ ua.family = agentlist[ua.family.toLowerCase()] || ua.family.toLowerCase();
return ua;
}
|
UA family must always be lowercase
|
diff --git a/mixins/observe.js b/mixins/observe.js
index <HASH>..<HASH> 100644
--- a/mixins/observe.js
+++ b/mixins/observe.js
@@ -36,6 +36,11 @@ function makeGetter(fnc, key) {
var value = fnc(el);
+ /* do not set value if we are extracting and no value has been set in DOM
+ * element
+ */
+ if(!value && data && data.extract) return;
+
// TODO... should probably unset here
if(!value && !_.isBoolean(value) && value !== 0) value = null;
@@ -168,7 +173,7 @@ module.exports = {
var self = this;
this._bindings.forEach(function(binding) {
- binding.getter && self.$(binding.selector).trigger(binding.getter.events[0]);
+ binding.getter && self.$(binding.selector).trigger(binding.getter.events[0], { extract: true });
//binding.getter && binding.setter.call(self, null, self.model.get(binding.key));
});
},
|
Do not set value on model if we are 'extracting' and no value is gotten from DOM.
|
diff --git a/tests/lax_scipy_test.py b/tests/lax_scipy_test.py
index <HASH>..<HASH> 100644
--- a/tests/lax_scipy_test.py
+++ b/tests/lax_scipy_test.py
@@ -137,8 +137,9 @@ class LaxBackedScipyTests(jtu.JaxTestCase):
if test_autodiff:
jtu.check_grads(lax_op, args, order=1,
- atol=jtu.if_device_under_test("tpu", 2e-3, 1e-3),
- rtol=2e-2, eps=1e-3)
+ atol=jtu.if_device_under_test("tpu", .02, 1e-3),
+ rtol=jtu.if_device_under_test("tpu", .01, .02),
+ eps=1e-3)
@parameterized.named_parameters(jtu.cases_from_list(
{"testcase_name": "_inshape={}_d={}".format(
|
Adjust test tolerances for TPU. (#<I>)
Ideally this is temporary, as the tolerances are getting high.
|
diff --git a/Guard.php b/Guard.php
index <HASH>..<HASH> 100755
--- a/Guard.php
+++ b/Guard.php
@@ -17,6 +17,13 @@ class Guard {
protected $user;
/**
+ * Indicates if the user was authenticated via a recaller cookie.
+ *
+ * @var bool
+ */
+ protected $viaRemember = false;
+
+ /**
* The user provider implementation.
*
* @var \Illuminate\Auth\UserProviderInterface
@@ -131,6 +138,8 @@ class Guard {
if (is_null($user) and ! is_null($recaller))
{
$user = $this->provider->retrieveByID($recaller);
+
+ $this->viaRemember = ! is_null($user);
}
return $this->user = $user;
@@ -578,4 +587,14 @@ class Guard {
return 'remember_'.md5(get_class($this));
}
+ /**
+ * Determine if the user was authenticated via "remember me" cookie.
+ *
+ * @return bool
+ */
+ public function viaRemember()
+ {
+ return $this->viaRemember;
+ }
+
}
|
Added new 'Auth::viaRemember method to determine if user was authed via 'remember me' cookie.
|
diff --git a/bibliopixel/animation/animation.py b/bibliopixel/animation/animation.py
index <HASH>..<HASH> 100644
--- a/bibliopixel/animation/animation.py
+++ b/bibliopixel/animation/animation.py
@@ -52,7 +52,7 @@ class Animation(object):
@color_list.setter
def color_list(self, cl):
- self.layout.color_list[:] = cl
+ self.layout.color_list = cl
@property
def completed(self):
|
Fix animation to use the layout's color_list property
* Otherwise we don't get the cool conversions from the
Layout.color_list setter.
|
diff --git a/views/js/qtiCommonRenderer/renderers/ModalFeedback.js b/views/js/qtiCommonRenderer/renderers/ModalFeedback.js
index <HASH>..<HASH> 100755
--- a/views/js/qtiCommonRenderer/renderers/ModalFeedback.js
+++ b/views/js/qtiCommonRenderer/renderers/ModalFeedback.js
@@ -12,6 +12,7 @@ define([
qtiClass : 'modalFeedback',
template : tpl,
getContainer : Helper.getContainer,
+ minHeight : 200,
minWidth : 400,
maxWidth : 800,
render : function(modalFeedback, data){
@@ -21,8 +22,10 @@ define([
var $modal = $('#' + modalFeedback.getSerial());
sizeFinder.measure($modal, function(size){
+
$modal.modal({
- startClosed : false,
+ startClosed : false,
+ minHeight : Math.max(size.height , modalFeedbackRenderer.minHeight),
width : Math.max( Math.min(size.width, modalFeedbackRenderer.maxWidth), modalFeedbackRenderer.minWidth)
});
@@ -36,4 +39,4 @@ define([
};
return modalFeedbackRenderer;
-});
+});
\ No newline at end of file
|
fixed modal min height issue on delivery
|
diff --git a/app/assets/javascripts/peoplefinder.js b/app/assets/javascripts/peoplefinder.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/peoplefinder.js
+++ b/app/assets/javascripts/peoplefinder.js
@@ -26,4 +26,4 @@ $(function() {
$(this).closest('.role-summary').hide();
$(this).closest('.membership').children('.editable-fields').show();
});
-})
+});
|
Add trailing semicolon to js file
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from setuptools import setup
setup(name='python_cowbull_game',
- version='2.0.1',
+ version='2.0.2',
description='Python cowbull game object',
url='https://github.com/dsandersAzure/python_cowbull_game',
author='David Sanders',
|
Refactor guesses_allowed; rename to guesses.
|
diff --git a/src/BaseRepositoryEloquent.php b/src/BaseRepositoryEloquent.php
index <HASH>..<HASH> 100644
--- a/src/BaseRepositoryEloquent.php
+++ b/src/BaseRepositoryEloquent.php
@@ -85,6 +85,22 @@ abstract class BaseRepositoryEloquent implements RepositoryInterface
{
$query = $this->query ?: $this->model;
+ if (is_array($this->eagerLoadRelations)) {
+ $eagerLoads = [];
+
+ foreach ($this->eagerLoadRelations as $relation => $rules) {
+ if (array_key_exists('attributes', $rules)) {
+ $eagerLoads[$relation] = function ($q) use ($rules) {
+ $q->select($rules['attributes']);
+ };
+ } else {
+ $eagerLoads[] = $relation;
+ }
+ }
+
+ $query->with($eagerLoads);
+ }
+
return $query->with($this->eagerLoadRelations);
}
|
Add feature of selective attributes in eagerloading
|
diff --git a/languagetool-dev/src/main/java/org/languagetool/dev/diff/LightRuleMatchParser.java b/languagetool-dev/src/main/java/org/languagetool/dev/diff/LightRuleMatchParser.java
index <HASH>..<HASH> 100644
--- a/languagetool-dev/src/main/java/org/languagetool/dev/diff/LightRuleMatchParser.java
+++ b/languagetool-dev/src/main/java/org/languagetool/dev/diff/LightRuleMatchParser.java
@@ -180,7 +180,7 @@ class LightRuleMatchParser {
private String getContextWithSpan(String context, int startMarkerPos, int maxEnd) {
context = context.substring(0, startMarkerPos) +
"<span class='marker'>" +
- context.substring(startMarkerPos, maxEnd) +
+ context.substring(startMarkerPos, maxEnd).replace(" ", " ") +
"</span>" +
context.substring(maxEnd);
return context;
|
avoid collapsing consecutive spaces
|
diff --git a/src/Storage/Field/Type/RepeaterType.php b/src/Storage/Field/Type/RepeaterType.php
index <HASH>..<HASH> 100644
--- a/src/Storage/Field/Type/RepeaterType.php
+++ b/src/Storage/Field/Type/RepeaterType.php
@@ -83,7 +83,7 @@ class RepeaterType extends FieldTypeBase
{
$key = $this->mapping['fieldname'];
if ($this->isJson($data[$key])) {
- $originalMapping[$key]['fields'] = $this->mapping['fields'];
+ $originalMapping[$key]['fields'] = $this->mapping['data']['fields'];
$originalMapping[$key]['type'] = 'repeater';
$mapping = $this->em->getMapper()->getRepeaterMapping($originalMapping);
|
Fix for Notice and subsequent warning related to repeater fields
Notice: Undefined index: fields in C:\MAMP\htdocs\nuffieldtrust.org.uk\vendor\bolt\bolt\src\Storage\Field\Type\RepeaterType.php on line <I>
|
diff --git a/src/playbacks/hls/hls.js b/src/playbacks/hls/hls.js
index <HASH>..<HASH> 100644
--- a/src/playbacks/hls/hls.js
+++ b/src/playbacks/hls/hls.js
@@ -30,9 +30,9 @@ class HLS extends UIPlugin {
this.setupVisibility()
this.highDefinition = false
this.autoPlay = options.autoPlay
- this.settings = {
- left: ["playstop", "volume"],
- default: ["position", "seekbar", "duration"],
+ this.defaultSettings = {
+ left: ["playstop"],
+ default: [],
right: ["fullscreen", "volume", "hd"]
}
this.settings = _.extend({}, this.defaultSettings)
|
hls playback: fix default settings on initialization
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -38,7 +38,7 @@ function tunnelProxy(server, proxy) {
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
server.on('connect', function(req, reqSocket, head) {//ws, wss, https proxy
- var tunnelUrl = req.fullUrl = util.setProtocol(/^[^:\/]+:\d+$/ ? req.url : req.headers.host, true);
+ var tunnelUrl = req.fullUrl = util.setProtocol(/^[^:\/]+:\d+$/.test(req.url) ? req.url : req.headers.host, true);
var options = parseUrl();
var tunnelUrl = req.fullUrl = 'tunnel://' + options.host;
var resSocket, proxySocket, responsed;
|
refactor: Priority handling req.url
|
diff --git a/src/axelitus/Base/String.php b/src/axelitus/Base/String.php
index <HASH>..<HASH> 100644
--- a/src/axelitus/Base/String.php
+++ b/src/axelitus/Base/String.php
@@ -779,7 +779,7 @@ class String extends PrimitiveString
$string = '';
for ($i = 0; $i < $length; $i++) {
- $string .= $chars[mt_rand(0, static::length($chars) - 1)];
+ $string .= $chars[Int::random(0, static::length($chars) - 1)];
}
return $string;
@@ -802,14 +802,11 @@ class String extends PrimitiveString
public static function trandom($type = 'alnum', $length = 16, $shuffle = false)
{
switch ($type) {
- case 'basic':
- return mt_rand();
- break;
case 'unique':
- return md5(uniqid(mt_rand()));
+ return md5(uniqid(Int::random()));
break;
case 'sha1':
- return sha1(uniqid(mt_rand(), true));
+ return sha1(uniqid(Int::random(), true));
break;
case 'alpha':
$pool = self::ALPHA;
|
Changed the calls to mt_rand to the random functions of the primitives.
|
diff --git a/Source/garnish.js b/Source/garnish.js
index <HASH>..<HASH> 100644
--- a/Source/garnish.js
+++ b/Source/garnish.js
@@ -278,8 +278,21 @@ Garnish = $.extend(Garnish, {
*/
scrollContainerToElement: function(container, elem)
{
- var $container = $(container),
- $elem = $(elem);
+ if (typeof elem === typeof undefined)
+ {
+ var $elem = $(container);
+ $container = $elem.scrollParent();
+ }
+ else
+ {
+ var $container = $(container),
+ $elem = $(elem);
+ }
+
+ if ($container.prop('nodeName') === 'HTML')
+ {
+ $container = Garnish.$win;
+ }
var scrollTop = $container.scrollTop(),
elemOffset = $elem.offset().top;
|
Make it possible to just pass the element into scrollContainerToElement()
|
diff --git a/web/vhost.go b/web/vhost.go
index <HASH>..<HASH> 100644
--- a/web/vhost.go
+++ b/web/vhost.go
@@ -154,7 +154,7 @@ func (h *VHostHandler) Handle(useTLS bool, w http.ResponseWriter, r *http.Reques
// Set up the X-Forwarded-Proto header so that downstream servers know
// the request originated as HTTPS.
if _, found := r.Header["X-Forwarded-Proto"]; !found {
- r.Header.Set("X-Forwarded-Proto", "tcp")
+ r.Header.Set("X-Forwarded-Proto", "https")
}
rp.ServeHTTP(w, r)
|
set X-Forwarded-Proto https Header in vhost.go
|
diff --git a/examples/index.php b/examples/index.php
index <HASH>..<HASH> 100644
--- a/examples/index.php
+++ b/examples/index.php
@@ -160,17 +160,21 @@ if($_SERVER['REQUEST_METHOD'] === 'POST') {
<script>
var reg = localStorage.getItem('u2fregistration');
+var auth = document.getElementById('startAuthenticate');
if(reg == null) {
- var auth = document.getElementById('startAuthenticate');
auth.disabled = true;
} else {
var regs = document.getElementById('registrations');
- regs.value = reg;
- console.log("set the registrations to : ", reg);
-
- var regged = document.getElementById('registered');
decoded = JSON.parse(reg);
- regged.innerHTML = decoded.length;
+ if(!Array.isArray(decoded)) {
+ auth.disabled = true;
+ } else {
+ regs.value = reg;
+ console.log("set the registrations to : ", reg);
+
+ var regged = document.getElementById('registered');
+ regged.innerHTML = decoded.length;
+ }
}
</script>
</body>
|
try to cleanup from broken keyhandles in storage
|
diff --git a/ocrd_models/ocrd_models/ocrd_page.py b/ocrd_models/ocrd_models/ocrd_page.py
index <HASH>..<HASH> 100644
--- a/ocrd_models/ocrd_models/ocrd_page.py
+++ b/ocrd_models/ocrd_models/ocrd_page.py
@@ -5,6 +5,7 @@ from io import StringIO
__all__ = [
'parse',
+ 'parseEtree',
'parseString',
"AdvertRegionType",
@@ -67,6 +68,7 @@ __all__ = [
from .ocrd_page_generateds import (
parse,
+ parseEtree,
parseString,
AdvertRegionType,
|
ocrd_page: export parseEtree as well
|
diff --git a/core/src/main/java/io/undertow/server/DirectByteBufferDeallocator.java b/core/src/main/java/io/undertow/server/DirectByteBufferDeallocator.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/io/undertow/server/DirectByteBufferDeallocator.java
+++ b/core/src/main/java/io/undertow/server/DirectByteBufferDeallocator.java
@@ -20,7 +20,11 @@ public final class DirectByteBufferDeallocator {
static {
- int version = Integer.getInteger("java.specification.version");
+ String versionString = System.getProperty("java.specification.version");
+ if(versionString.startsWith("1.")) {
+ versionString = versionString.substring(2);
+ }
+ int version = Integer.parseInt(versionString);
Method tmpCleaner = null;
Method tmpCleanerClean = null;
|
Fix issue with byte buffer dealocator
|
diff --git a/state/machine.go b/state/machine.go
index <HASH>..<HASH> 100644
--- a/state/machine.go
+++ b/state/machine.go
@@ -906,7 +906,7 @@ func (original *Machine) advanceLifecycle(life Life, force, dyingAllowContainers
}
if canDie && !dyingAllowContainers {
- if err := m.evaulateContainersAdvanceLifecycle(); !IsHasContainersError(err) {
+ if err := m.evaulateContainersAdvanceLifecycle(); err != nil && !IsHasContainersError(err) {
return nil, err
} else if IsHasContainersError(err) {
canDie = false
|
Don't return if err is nil, causes destroy container to fail.
|
diff --git a/lib/yap/shell/execution/shell_command_execution.rb b/lib/yap/shell/execution/shell_command_execution.rb
index <HASH>..<HASH> 100644
--- a/lib/yap/shell/execution/shell_command_execution.rb
+++ b/lib/yap/shell/execution/shell_command_execution.rb
@@ -20,14 +20,11 @@ module Yap::Shell::Execution
end
Treefell['shell'].puts "shell command executing with params: #{params.inspect} $stdout=#{$stdout.inspect} $stderr=#{$stderr.inspect}"
- pid = fork { func.call(**params) }
-
- if wait
- pid, status = Process.wait2(pid, Process::WUNTRACED)
- end
+ func.call(**params)
@stdout.close if @stdout != $stdout && !@stdout.closed?
@stderr.close if @stderr != $stderr && !@stderr.closed?
+ @stdin.close if @stdin != $stdin && !@stdin.closed?
end
end
end
|
Revert forking for shell functions, but keep closing non-standard stdin/out/err.
E.g. the following work where upcase is a shell function:
ls | upcase | sort
|
diff --git a/generate.go b/generate.go
index <HASH>..<HASH> 100644
--- a/generate.go
+++ b/generate.go
@@ -19,6 +19,7 @@
//go:generate glow generate -out=./v4.5-compatibility/gl/ -api=gl -version=4.5 -profile=compatibility -xml=../glow/xml/ -tmpl=../glow/tmpl/
//go:generate glow generate -out=./v4.6-compatibility/gl/ -api=gl -version=4.6 -profile=compatibility -xml=../glow/xml/ -tmpl=../glow/tmpl/
//go:generate glow generate -out=./v3.1/gles2/ -api=gles2 -version=3.1 -xml=../glow/xml/ -tmpl=../glow/tmpl/
+//go:generate glow generate -out=./v3.0/gles2/ -api=gles2 -version=3.0 -xml=../glow/xml/ -tmpl=../glow/tmpl/
// This is an empty pseudo-package with the sole purpose of containing go generate directives
// that generate all gl binding packages inside this repository.
|
generate gles <I> (#<I>)
iOS devices only support gles <I>
|
diff --git a/tests/risk/writers_test.py b/tests/risk/writers_test.py
index <HASH>..<HASH> 100644
--- a/tests/risk/writers_test.py
+++ b/tests/risk/writers_test.py
@@ -36,8 +36,7 @@ class Point(object):
@property
def wkt(self):
- # dummy implementation, just for testing.
- return str(self.x) + str(self.y)
+ return "POINT(%s %s)" % (self.x, self.y)
class LossCurveXMLWriterTestCase(unittest.TestCase):
|
Updated .wkt test implementation
|
diff --git a/invenio_records_rest/query.py b/invenio_records_rest/query.py
index <HASH>..<HASH> 100644
--- a/invenio_records_rest/query.py
+++ b/invenio_records_rest/query.py
@@ -44,7 +44,7 @@ def default_search_factory(self, search, query_parser=None):
exc_info=True)
raise InvalidQueryRESTError()
- search_index = search._index[0]
+ search_index = getattr(search, '_original_index', search._index)[0]
search, urlkwargs = default_facets_factory(search, search_index)
search, sortkwargs = default_sorter_factory(search, search_index)
for key, value in sortkwargs.items():
|
query: fix facets and sort for prefixed indices
|
diff --git a/scope.js b/scope.js
index <HASH>..<HASH> 100644
--- a/scope.js
+++ b/scope.js
@@ -91,7 +91,8 @@ function authorize(action, restrictions, user) {
Scope.prototype.headers = function(res, list) {
if (list == null) list = [];
- else if (!Array.isArray(list)) list = [list];
+ else if (typeof list == "string") list = [list];
+ else if (typeof list == "object" && !Array.isArray(list)) list = Object.keys(list);
var cur = res.get(Scope.headerScope);
if (cur) cur = cur.split(',').map(function(str) {
return str.trim();
|
scope.headers allows an object to get the list of keys
|
diff --git a/dom-selection.js b/dom-selection.js
index <HASH>..<HASH> 100644
--- a/dom-selection.js
+++ b/dom-selection.js
@@ -241,6 +241,28 @@
return range.collapsed;
}
+ /**
+ * Force the Selection to include entire/expanded Words.
+ * @see http://stackoverflow.com/questions/7380190/select-whole-word-with-getselection
+ * @param {Selection} sel
+ */
+ function forceInclude(sel) {
+ sel = sel || win.getSelection();
+ if (isCollapsed(sel)) return;
+
+ var dir = ['forward', 'backward'];
+ isBackwards(sel) && dir.reverse();
+
+ // modify() works on the focus of the selection
+ sel.collapse(sel.anchorNode, sel.anchorOffset);
+
+ sel.modify('move', dir[0], 'character');
+ sel.modify('move', dir[1], 'word');
+ sel.extend(sel.focusNode, sel.focusOffset);
+ sel.modify('extend', dir[1], 'character');
+ sel.modify('extend', dir[0], 'word');
+ }
+
return {
getRange: getRange,
setRange: setRange,
@@ -253,9 +275,9 @@
collapseEnd: collapseEnd,
isWithin: isWithin,
forceWithin: forceWithin,
- // snapToWord: snapToWord,
expandToWord: expandToWord,
getCaretWord: getCaretWord,
+ forceInclude: forceInclude,
version: ver,
};
}));
|
add forceInclude func: snaps to entire word
|
diff --git a/reporter/kafka/kafka.go b/reporter/kafka/kafka.go
index <HASH>..<HASH> 100644
--- a/reporter/kafka/kafka.go
+++ b/reporter/kafka/kafka.go
@@ -51,7 +51,9 @@ func Logger(logger *log.Logger) ReporterOption {
}
}
-// Producer sets the producer used to produce to Kafka.
+// Producer sets the producer used to produce to Kafka. For tweaking
+// the reporting settings (e.g. reporting timeout or authentication)
+// check the sarama.Config struct.
func Producer(p sarama.AsyncProducer) ReporterOption {
return func(c *kafkaReporter) {
c.producer = p
|
docs(reporter/kafka): adds more information about tweaking the producer. (#<I>)
|
diff --git a/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java b/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java
index <HASH>..<HASH> 100644
--- a/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java
+++ b/engine-rest/engine-rest/src/test/java/org/camunda/bpm/engine/rest/ProcessDefinitionRestServiceInteractionTest.java
@@ -2810,6 +2810,16 @@ public class ProcessDefinitionRestServiceInteractionTest extends AbstractRestSer
}
@Test
+ public void testSimpleProcessInstantiationWithoutBody_ByKey() {
+ given().pathParam("key", MockProvider.EXAMPLE_PROCESS_DEFINITION_KEY)
+ .contentType(POST_JSON_CONTENT_TYPE)
+ .then().expect()
+ .statusCode(Status.OK.getStatusCode())
+ .body("id", equalTo(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID))
+ .when().post(START_PROCESS_INSTANCE_BY_KEY_URL);
+ }
+
+ @Test
public void testProcessInstantiationWithParameters_ByKey() throws IOException {
Map<String, Object> parameters = VariablesBuilder.create()
.variable("aBoolean", Boolean.TRUE)
|
test(engine-rest): start a process instance on post with an empty body
related to #CAM-<I>
|
diff --git a/lib/renderer/web-view/web-view.js b/lib/renderer/web-view/web-view.js
index <HASH>..<HASH> 100644
--- a/lib/renderer/web-view/web-view.js
+++ b/lib/renderer/web-view/web-view.js
@@ -131,7 +131,7 @@ class WebViewImpl {
}
onElementResize () {
- const resizeEvent = new Event('resize', { bubbles: true })
+ const resizeEvent = new Event('resize')
resizeEvent.newWidth = this.webviewNode.clientWidth
resizeEvent.newHeight = this.webviewNode.clientHeight
this.dispatchEvent(resizeEvent)
|
fix: do not bubble up resize event from webview (#<I>)
|
diff --git a/influxql/ast.go b/influxql/ast.go
index <HASH>..<HASH> 100644
--- a/influxql/ast.go
+++ b/influxql/ast.go
@@ -4117,6 +4117,8 @@ func EvalType(expr Expr, sources Sources, typmap TypeMapper) DataType {
return Float
case *IntegerLiteral:
return Integer
+ case *UnsignedLiteral:
+ return Unsigned
case *StringLiteral:
return String
case *BooleanLiteral:
@@ -4124,13 +4126,7 @@ func EvalType(expr Expr, sources Sources, typmap TypeMapper) DataType {
case *BinaryExpr:
lhs := EvalType(expr.LHS, sources, typmap)
rhs := EvalType(expr.RHS, sources, typmap)
- if lhs != Unknown && rhs != Unknown {
- if lhs < rhs {
- return lhs
- } else {
- return rhs
- }
- } else if lhs != Unknown {
+ if rhs.LessThan(lhs) {
return lhs
} else {
return rhs
|
Update eval type for unsigned
|
diff --git a/src/lib/async-command.js b/src/lib/async-command.js
index <HASH>..<HASH> 100644
--- a/src/lib/async-command.js
+++ b/src/lib/async-command.js
@@ -1,5 +1,6 @@
-/* eslint-disable unicorn/no-process-exit */
+/* eslint-disable unicorn/no-process-exit */
+/* eslint-disable promise/prefer-await-to-then */
const done = (err, result) => {
return err ?
diff --git a/src/lib/which.js b/src/lib/which.js
index <HASH>..<HASH> 100644
--- a/src/lib/which.js
+++ b/src/lib/which.js
@@ -3,4 +3,7 @@ import which from 'which';
const pWhich = promisify(which);
-export default program => pWhich(program).then(res => Boolean(res));
+export default async program => {
+ const res = await pWhich(program);
+ return Boolean(res);
+};
|
chore: fix async await missing
|
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -652,7 +652,7 @@ module Rails
root = File.exist?("#{root_path}/#{flag}") ? root_path : default
raise "Could not find root path for #{self}" unless root
- File.realpath root
+ Pathname.new File.realpath root
end
def default_middleware_stack
|
I guess we have to return a pathname object. o_O
|
diff --git a/huawei_lte_api/api/User.py b/huawei_lte_api/api/User.py
index <HASH>..<HASH> 100644
--- a/huawei_lte_api/api/User.py
+++ b/huawei_lte_api/api/User.py
@@ -10,7 +10,8 @@ from huawei_lte_api.exceptions import ResponseErrorException, \
LoginErrorUsernamePasswordOverrunException, \
LoginErrorUsernamePasswordWrongException, \
LoginErrorUsernameWrongException, \
- LoginErrorPasswordWrongException
+ LoginErrorPasswordWrongException, \
+ ResponseErrorNotSupportedException
class User(ApiGroup):
@@ -71,7 +72,11 @@ class User(ApiGroup):
return result == ResponseEnum.OK.value
def login(self, force_new_login: bool=False) -> bool:
- state_login = self.state_login()
+ try:
+ state_login = self.state_login()
+ except ResponseErrorNotSupportedException:
+ return True
+
if LoginStateEnum(int(state_login['State'])) == LoginStateEnum.LOGGED_IN and not force_new_login:
return True
|
Add support for modems, without user login
|
diff --git a/cursor.js b/cursor.js
index <HASH>..<HASH> 100644
--- a/cursor.js
+++ b/cursor.js
@@ -575,6 +575,12 @@ var nextFunction = function(self, callback) {
// Topology was destroyed, so don't try to wait for it to reconnect
return callback(new MongoError('Topology was destroyed'));
}
+
+ if (!self.s.topologyOptions.reconnect) {
+ // Reconnect is disabled, so we'll never reconnect
+ return callback(new MongoError('no connection available'));
+ }
+
return self.disconnectHandler.addObjectAndMethod(
'cursor',
self,
|
fix(cursor): avoid waiting for reconnect if reconnect disabled
|
diff --git a/src/components/treemenu/treemenu.js b/src/components/treemenu/treemenu.js
index <HASH>..<HASH> 100644
--- a/src/components/treemenu/treemenu.js
+++ b/src/components/treemenu/treemenu.js
@@ -1109,6 +1109,8 @@ var TreeMenu = Component.extend({
if(!useDataFiltered) {
var pointer = "_default";
if(allowedIDs.indexOf(this.model.marker[markerID].which) > -1) pointer = this.model.marker[markerID].which;
+ if(!indicatorsDB[pointer]) utils.error("Concept properties of " + pointer + " are missing from the set, or the set is empty. Put a breakpoint here and check what you have in indicatorsDB");
+
if(!indicatorsDB[pointer].scales) {
this.element.select('.' + css.scaletypes).classed(css.hidden, true);
return true;
|
Add diagnostic message for the common case, this should help #<I>
|
diff --git a/get-supported-locale.js b/get-supported-locale.js
index <HASH>..<HASH> 100644
--- a/get-supported-locale.js
+++ b/get-supported-locale.js
@@ -1,14 +1,14 @@
-const supportedLocales = ['en', 'de'];
+const supportedLanguages = ['en', 'de'];
// This function is reponsible of passing the fallback language "en"
// in case the given language is not supported by the application yet
-export function getSupportedLocale(locale) {
- return supportedLocales.includes(locale) ? locale : 'en';
+export function getSupportedLanguage(language) {
+ return supportedLanguages.includes(language) ? language : 'en';
}
-/* This function is needed in order to parse the locale + region that we allow in the user
-* settings. Because we only have messages for `en` and `de`, we need to always get just the
-* first part of the locale (`en-GB` would be `en`) so the app does not break.
+/* This function is needed in order to parse the locale (<language-code>-<country-code>) that we allow in the user
+* we allow in the user settings. Because we only have messages for `en` and `de`, we need to always get just the
+* first part of the locale, the language, (`en-GB` would be `en`) so the app does not break.
*/
export function extractLanguageFromLocale(locale) {
return locale.includes('-') ? locale.split('-')[0] : locale;
|
refactor(locale): rename variables and functions to be consistent with the difference between language vs locale
|
diff --git a/library/CM/RenderAdapter/Layout.php b/library/CM/RenderAdapter/Layout.php
index <HASH>..<HASH> 100644
--- a/library/CM/RenderAdapter/Layout.php
+++ b/library/CM/RenderAdapter/Layout.php
@@ -15,10 +15,10 @@ class CM_RenderAdapter_Layout extends CM_RenderAdapter_Abstract {
}
/**
- * @param CM_Site_Abstract $site
* @return string
*/
- public function fetch(CM_Site_Abstract $site) {
+ public function fetch() {
+ $site = $this->getRender()->getSite();
$page = $this->_getPage();
$layout = $page->getLayout($site);
diff --git a/library/CM/Response/Page.php b/library/CM/Response/Page.php
index <HASH>..<HASH> 100644
--- a/library/CM/Response/Page.php
+++ b/library/CM/Response/Page.php
@@ -84,7 +84,7 @@ class CM_Response_Page extends CM_Response_Abstract {
*/
protected function _renderPage(CM_Page_Abstract $page) {
$renderAdapterLayout = new CM_RenderAdapter_Layout($this->getRender(), $page);
- return $renderAdapterLayout->fetch($this->getSite());
+ return $renderAdapterLayout->fetch();
}
protected function _process() {
|
Do not pass site to layout->fetch, but use render's one
|
diff --git a/commands/request.go b/commands/request.go
index <HASH>..<HASH> 100644
--- a/commands/request.go
+++ b/commands/request.go
@@ -62,7 +62,9 @@ type Request interface {
Options() optMap
SetOption(name string, val interface{})
Arguments() []interface{}
+ SetArguments([]interface{})
Files() File
+ SetFiles(File)
Context() *Context
SetContext(Context)
Command() *Command
@@ -147,10 +149,18 @@ func (r *request) Arguments() []interface{} {
return r.arguments
}
+func (r *request) SetArguments(args []interface{}) {
+ r.arguments = args
+}
+
func (r *request) Files() File {
return r.files
}
+func (r *request) SetFiles(f File) {
+ r.files = f
+}
+
func (r *request) Context() *Context {
return &r.ctx
}
|
commands: Added SetArguments/SetFiles to Request
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -161,8 +161,7 @@ class Test::Unit::TestCase
update = options.delete(:update) || false
ruby_version = options.delete(:ruby_version) || (JRUBY_JARS_VERSION.to_s[0..0] == '9' ? 2.1 : 1.9)
multi_dex = options.has_key?(:multi_dex) ? options.delete(:multi_dex) :
- (standalone && !example && JRUBY_JARS_VERSION >= Gem::Version.new('9000.dev') &&
- ANDROID_TARGET >= 16)
+ (standalone && !example && ANDROID_TARGET >= 16)
raise "Unknown options: #{options.inspect}" unless options.empty?
raise 'Inclusion/exclusion of libs requires standalone mode.' if (included_stdlibs || excluded_stdlibs) && !standalone
|
* Turn on multi-dex for older JRuby versions also.
|
diff --git a/result.go b/result.go
index <HASH>..<HASH> 100644
--- a/result.go
+++ b/result.go
@@ -48,6 +48,7 @@ type (
Value() interface{}
SetDetails(ErrorDetails)
Details() ErrorDetails
+ String() string
}
// ResultErrorFields holds the fields for each ResultError implementation.
|
Add String() to ResultError interface
|
diff --git a/lib/unidom/visitor/version.rb b/lib/unidom/visitor/version.rb
index <HASH>..<HASH> 100644
--- a/lib/unidom/visitor/version.rb
+++ b/lib/unidom/visitor/version.rb
@@ -1,5 +1,5 @@
module Unidom
module Visitor
- VERSION = '1.9'.freeze
+ VERSION = '1.10'.freeze
end
end
|
1, Migrate the version from <I> to <I>.
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -16,6 +16,7 @@ export type DotModel = {
uvCoordinates: number[],
normalCoordinates: number[],
numVerticesPerFace: number,
+ numCoordinatesPerVertex: number,
};
function parseIndices(streamReader: StreamReader): number[] {
|
Fix the exported `dotModel` flow type
|
diff --git a/core/src/main/java/com/digitalpebble/storm/crawler/persistence/StdOutStatusUpdater.java b/core/src/main/java/com/digitalpebble/storm/crawler/persistence/StdOutStatusUpdater.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/digitalpebble/storm/crawler/persistence/StdOutStatusUpdater.java
+++ b/core/src/main/java/com/digitalpebble/storm/crawler/persistence/StdOutStatusUpdater.java
@@ -18,13 +18,9 @@
package com.digitalpebble.storm.crawler.persistence;
import java.util.Date;
-import java.util.Map;
import com.digitalpebble.storm.crawler.Metadata;
-import backtype.storm.task.OutputCollector;
-import backtype.storm.task.TopologyContext;
-
/**
* Dummy status updater which dumps the content of the incoming tuples to the
* standard output. Useful for debugging and as an illustration of what
@@ -32,15 +28,6 @@ import backtype.storm.task.TopologyContext;
*/
@SuppressWarnings("serial")
public class StdOutStatusUpdater extends AbstractStatusUpdaterBolt {
- OutputCollector _collector;
-
- @SuppressWarnings("rawtypes")
- @Override
- public void prepare(Map conf, TopologyContext context,
- OutputCollector collector) {
- super.prepare(conf, context, collector);
- _collector = collector;
- }
@Override
public void store(String url, Status status, Metadata metadata,
|
StdOutStatusUpdater does not need collector
|
diff --git a/src/Module.php b/src/Module.php
index <HASH>..<HASH> 100644
--- a/src/Module.php
+++ b/src/Module.php
@@ -447,9 +447,12 @@ class Module {
} else {
- if (!$deleteAll && $object === $slug . '.php') {
+ if (!$deleteAll) {
- continue;
+ if ($object == $slug.'.php' || $object == $slug.'.png') {
+
+ continue;
+ }
}
unlink($modulePath . App::DS . $object);
@@ -462,7 +465,7 @@ class Module {
$folder = array_pop($path);
- if ($folder === $slug) {
+ if ($folder === $slug || $folder === 'images') {
return true;
}
|
The module path was added to the getModulesInfo method
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,7 @@
from distutils.core import setup
+version = '1.0.2'
+
# If sphinx is installed, enable the command
try:
from sphinx.setup_command import BuildDoc
@@ -14,8 +16,6 @@ except ImportError:
cmdclass = {}
command_options = {}
-version = '1.0.2'
-
setup(name='simplemediawiki',
version=version,
description='Extremely low-level wrapper to the MediaWiki API',
|
Make sphinx building actually work
|
diff --git a/charmhelpers/core/host_factory/ubuntu.py b/charmhelpers/core/host_factory/ubuntu.py
index <HASH>..<HASH> 100644
--- a/charmhelpers/core/host_factory/ubuntu.py
+++ b/charmhelpers/core/host_factory/ubuntu.py
@@ -28,6 +28,7 @@ UBUNTU_RELEASES = (
'focal',
'groovy',
'hirsute',
+ 'impish',
)
|
Add impish to the list of Ubuntu releases.
|
diff --git a/lib/ronin/engine/class_methods.rb b/lib/ronin/engine/class_methods.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/engine/class_methods.rb
+++ b/lib/ronin/engine/class_methods.rb
@@ -45,7 +45,7 @@ module Ronin
# @since 0.4.0
#
def load_all(options={})
- return custom_query(options).all(options).each do |resource|
+ return custom_query(options).each do |resource|
resource.load_original!
end
end
@@ -74,7 +74,7 @@ module Ronin
# @since 0.4.0
#
def load_first(options={})
- if (resource = custom_query(options).first(options))
+ if (resource = custom_query(options).first)
resource.load_original!
end
@@ -125,7 +125,7 @@ module Ronin
query = query.licensed_under(options.delete(:license))
end
- return query
+ return query.all(options)
end
end
end
|
Add any extra options into the query returned by Engine::ClassMethods#custom_query.
|
diff --git a/src/tinymce.js b/src/tinymce.js
index <HASH>..<HASH> 100644
--- a/src/tinymce.js
+++ b/src/tinymce.js
@@ -7,8 +7,8 @@ angular.module('ui.tinymce', [])
uiTinymceConfig = uiTinymceConfig || {};
var generatedIds = 0;
return {
+ priority: 10,
require: 'ngModel',
- priority: 1,
link: function (scope, elm, attrs, ngModel) {
var expression, options, tinyInstance,
updateView = function () {
|
adding priority for ngmodel re-rendering's sake
Remove old priority to give users more control over priority order
|
diff --git a/lib/io.js b/lib/io.js
index <HASH>..<HASH> 100644
--- a/lib/io.js
+++ b/lib/io.js
@@ -52,6 +52,7 @@ function RajaServer(opts) {
io.to('*').to(msg.url).emit('message', msg);
});
socket.on('join', function(msg) {
+ if (msg.mtime) socket.joinArgs = msg.mtime;
socket.join(msg.room, function(err) {
if (err) console.error(err)
});
|
Will pass some option mtime to backlog adapter
|
diff --git a/controllers/components/uploader.php b/controllers/components/uploader.php
index <HASH>..<HASH> 100644
--- a/controllers/components/uploader.php
+++ b/controllers/components/uploader.php
@@ -964,16 +964,14 @@ class UploaderComponent extends Object {
foreach ($mimes as $mimeExt => $mimeType) {
if (($currType == $mimeType) || (is_array($mimeType) && in_array($currType, $mimeType))) {
$validMime = true;
- break;
+ break 2;
}
}
-
- if ($validExt === true && $validMime === true) {
- $this->__data[$this->__current]['group'] = $grouping;
- }
}
-
- if (($validExt === false) || ($validMime === false)) {
+
+ if ($validExt === true && $validMime === true) {
+ $this->__data[$this->__current]['group'] = $grouping;
+ } else {
return false;
}
|
Uploaded file associated with incorrect mimetype group.
|
diff --git a/Classes/TypoScript/Condition/CoreVersionCondition.php b/Classes/TypoScript/Condition/CoreVersionCondition.php
index <HASH>..<HASH> 100644
--- a/Classes/TypoScript/Condition/CoreVersionCondition.php
+++ b/Classes/TypoScript/Condition/CoreVersionCondition.php
@@ -62,7 +62,8 @@ class CoreVersionCondition extends AbstractCondition
protected function compareNumber($test, $leftValue)
{
if (preg_match('/^(!?=+|<=?|>=?)\\s*([^\\s]*)\\s*$/', $test, $matches)) {
- list($operator, $rightValue) = $matches;
+ $operator = $matches[1];
+ $rightValue = $matches[2];
switch ($operator) {
case '>=':
return $leftValue >= VersionNumberUtility::convertVersionNumberToInteger($rightValue);
|
[BUGFIX] Ensure condition matching assigns correct matches
|
diff --git a/giddy/directional.py b/giddy/directional.py
index <HASH>..<HASH> 100644
--- a/giddy/directional.py
+++ b/giddy/directional.py
@@ -387,6 +387,7 @@ class Rose(object):
except ImportError:
warnings.warn('This method relies on importing `splot` in future',
DeprecationWarning)
+ use_splot = False
if use_splot:
fig, ax = splot.giddy.dynamic_lisa_rose(self, attribute=attribute,
@@ -420,7 +421,7 @@ class Rose(object):
plt.xlim(xlim)
plt.ylim(ylim)
- def plot_vectors(self, arrows=True): # TODO add attribute option to color vectors
+ def plot_vectors(self, arrows=True):
"""
Plot vectors of positional transition of LISA values
witin quadrant in scatterplot in a polar plot.
@@ -485,6 +486,7 @@ class Rose(object):
except ImportError:
warnings.warn('This method relies on importing `splot` in future',
DeprecationWarning)
+ use_splot = False
if use_splot:
fig, ax = splot.giddy.dynamic_lisa_vectors(self, arrows=arrows)
|
add `use_splot = False` to run old `.plot()` method
|
diff --git a/src/Http/Controllers/AdminController.php b/src/Http/Controllers/AdminController.php
index <HASH>..<HASH> 100644
--- a/src/Http/Controllers/AdminController.php
+++ b/src/Http/Controllers/AdminController.php
@@ -83,6 +83,7 @@ class AdminController extends BaseAdminController
$data['parent_id'] = $data['parent_id'] ?: null;
$this->repository->update($page->id, $data);
event('page.resetChildrenUri', [$page]);
+ Menulinks::forgetCache();
return $this->redirect($request, $page);
}
|
Menulinks::forgetCache
|
diff --git a/tests/guinea-pigs/pytest/xfail_test.py b/tests/guinea-pigs/pytest/xfail_test.py
index <HASH>..<HASH> 100644
--- a/tests/guinea-pigs/pytest/xfail_test.py
+++ b/tests/guinea-pigs/pytest/xfail_test.py
@@ -1,7 +1,7 @@
import pytest
-@pytest.mark.xfail("True", reason="xfail reason")
+@pytest.mark.xfail("True", reason="xfail reason", strict=True)
def test_unexpectedly_passing():
pass
|
fix xfail in tests
|
diff --git a/src/Base/AbstractController.php b/src/Base/AbstractController.php
index <HASH>..<HASH> 100644
--- a/src/Base/AbstractController.php
+++ b/src/Base/AbstractController.php
@@ -155,13 +155,25 @@ abstract class AbstractController implements ControllerInterface
}
$this->myActionName = $action;
+ $result = $this->myInvokeActionMethod($actionMethod, $parameters);
+ return true;
+ }
+
+ /**
+ * Invoke action method.
+ *
+ * @param \ReflectionMethod $actionMethod The action method.
+ * @param array $parameters The parameters.
+ *
+ * @return mixed|null The result.
+ */
+ private function myInvokeActionMethod(\ReflectionMethod $actionMethod, array $parameters)
+ {
// Handle pre-action event.
$preActionResult = $this->onPreActionEvent();
if ($preActionResult !== null) {
- $result = $preActionResult;
-
- return true;
+ return $preActionResult;
}
// Handle action method.
@@ -170,12 +182,10 @@ abstract class AbstractController implements ControllerInterface
// Handle post-action event.
$postActionResult = $this->onPostActionEvent();
if ($postActionResult !== null) {
- $result = $postActionResult;
-
- return true;
+ return $postActionResult;
}
- return true;
+ return $result;
}
/**
|
Refactor action method invocation in AbstractController class
|
diff --git a/src/Symfony/Framework/DoctrineBundle/Command/GenerateEntitiesDoctrineCommand.php b/src/Symfony/Framework/DoctrineBundle/Command/GenerateEntitiesDoctrineCommand.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Framework/DoctrineBundle/Command/GenerateEntitiesDoctrineCommand.php
+++ b/src/Symfony/Framework/DoctrineBundle/Command/GenerateEntitiesDoctrineCommand.php
@@ -45,11 +45,11 @@ The above would generate entity classes for all bundles.
You can also optionally limit generation to entities within an individual bundle:
- <info>./symfony doctrine:generate:entities --bundle="Bundle\MyCustomBundle"</info>
+ <info>./symfony doctrine:generate:entities --bundle="Bundle/MyCustomBundle"</info>
Alternatively, you can limit generation to a single entity within a bundle:
- <info>./symfony doctrine:generate:entities --bundle="Bundle\MyCustomBundle" --entity="User"</info>
+ <info>./symfony doctrine:generate:entities --bundle="Bundle/MyCustomBundle" --entity="User"</info>
EOT
);
}
|
Fixed bad examples in doctrine:generate:entities help output.
|
diff --git a/src/org/parboiled/MatcherContext.java b/src/org/parboiled/MatcherContext.java
index <HASH>..<HASH> 100644
--- a/src/org/parboiled/MatcherContext.java
+++ b/src/org/parboiled/MatcherContext.java
@@ -21,11 +21,10 @@ import org.parboiled.common.ImmutableList;
import org.parboiled.common.Preconditions;
import org.parboiled.matchers.*;
import org.parboiled.support.*;
-import static org.parboiled.support.ParseTreeUtils.findNodeByPath;
import static org.parboiled.support.ParseTreeUtils.findNode;
+import static org.parboiled.support.ParseTreeUtils.findNodeByPath;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
/**
@@ -120,7 +119,7 @@ public class MatcherContext<V> implements Context<V> {
@NotNull
public List<ParseError> getParseErrors() {
- return Collections.unmodifiableList(invariables.parseErrors);
+ return invariables.parseErrors;
}
@NotNull
|
Enabled writing access to list of parse error returned by Context.getParseErrors()
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100755
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -45,7 +45,7 @@ module.exports = function(grunt) {
tasks: ['jshint:theme', 'concat:js', 'uglify:js', 'assets_version']
},
less: {
- files: 'less/*.less',
+ files: 'less/**/*.less',
tasks: ['less', 'assets_version']
},
},
|
WATCH ALL THE LESS FILES!
|
diff --git a/lib/avocado/example.rb b/lib/avocado/example.rb
index <HASH>..<HASH> 100644
--- a/lib/avocado/example.rb
+++ b/lib/avocado/example.rb
@@ -16,8 +16,9 @@ module Avocado
protected
def resource_name_from_url(path, method)
- Rails.application.routes.recognize_path(path, method: method)[:controller].
- partition('/').last.titleize.split('/').last
+ controller = Rails.application.routes.recognize_path(path, method: method)[:controller]
+ name = controller.partition('/').reject(&:blank?).last
+ name.titleize.split('/').last
rescue ActionController::RoutingError
nil
end
diff --git a/lib/avocado/rspec.rb b/lib/avocado/rspec.rb
index <HASH>..<HASH> 100644
--- a/lib/avocado/rspec.rb
+++ b/lib/avocado/rspec.rb
@@ -2,8 +2,15 @@ require 'avocado'
require 'avocado/rspec/spec'
require 'rack/test'
+module AvocadoHelper
+ def app
+ Rails.application
+ end
+end
+
RSpec.configure do |config|
+ config.include AvocadoHelper
config.include Rack::Test::Methods
config.after(:each) do
|
RSpec will be able to parse the name even if the controller name doesn't have a slash (for non-namespaced APIs)
|
diff --git a/Demo_Img_Viewer.py b/Demo_Img_Viewer.py
index <HASH>..<HASH> 100644
--- a/Demo_Img_Viewer.py
+++ b/Demo_Img_Viewer.py
@@ -71,7 +71,7 @@ file_num_display_elem = sg.Text('File 1 of {}'.format(num_files), size=(15,1))
col = [[filename_display_elem],
[image_elem]]
-col_files = [[sg.Listbox(values = fnames, select_submits=True, size=(60,30), key='listbox')],
+col_files = [[sg.Listbox(values = fnames, change_submits=True, size=(60, 30), key='listbox')],
[sg.ReadFormButton('Next', size=(8,2)), sg.ReadFormButton('Prev',
size=(8,2)), file_num_display_elem]]
@@ -111,3 +111,5 @@ while True:
filename_display_elem.Update(filename)
# update page display
file_num_display_elem.Update('File {} of {}'.format(i+1, num_files))
+
+
|
changed select_submits to change_submits
|
diff --git a/scripts/get-latest-platform-tests.js b/scripts/get-latest-platform-tests.js
index <HASH>..<HASH> 100644
--- a/scripts/get-latest-platform-tests.js
+++ b/scripts/get-latest-platform-tests.js
@@ -14,7 +14,7 @@ const request = require("request");
// 1. Go to https://github.com/w3c/web-platform-tests/tree/master/url
// 2. Press "y" on your keyboard to get a permalink
// 3. Copy the commit hash
-const commitHash = "e8aa61d80e3971489ace4355ee970d30c09b615e";
+const commitHash = "5de931eafc9ca8d6de6a138015311812943755ac";
const sourceURL = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/url/urltestdata.json`;
const setterSourceURL = `https://raw.githubusercontent.com/w3c/web-platform-tests/${commitHash}/url/setters_tests.json`;
|
Update to include the latest web platform tests
Includes <URL>
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -93,7 +93,7 @@ module Minitest
def assert_tick(actual_duration, clock)
first = clock.tick
second = clock.tick
- assert_equal second, first + actual_duration
+ assert_equal second.change(usec: 0), (first + actual_duration).change(usec: 0)
end
end
end
|
Ensure clock tick spec matcher zeros out microseconds
|
diff --git a/config/sub/TwigViewsConfig.php b/config/sub/TwigViewsConfig.php
index <HASH>..<HASH> 100644
--- a/config/sub/TwigViewsConfig.php
+++ b/config/sub/TwigViewsConfig.php
@@ -3,14 +3,14 @@
namespace config\sub;
use Valkyrja\Config\Sub\TwigViewsConfig as ValkyrjaTwigViewsConfig;
-use Valkyrja\Application;
+use Valkyrja\Contracts\Application;
class TwigViewsConfig extends ValkyrjaTwigViewsConfig
{
/**
* TwigViewsConfig constructor.
*
- * @param \Valkyrja\Application $app
+ * @param \Valkyrja\Contracts\Application $app
*/
public function __construct(Application $app)
{
diff --git a/config/sub/ViewsConfig.php b/config/sub/ViewsConfig.php
index <HASH>..<HASH> 100644
--- a/config/sub/ViewsConfig.php
+++ b/config/sub/ViewsConfig.php
@@ -15,5 +15,7 @@ class ViewsConfig extends ValkyrjaViewsConfig
public function __construct(Application $app)
{
parent::__construct($app);
+
+ $this->twig = new TwigViewsConfig($app);
}
}
|
Fixing twig override in views config.
|
diff --git a/caravel/views.py b/caravel/views.py
index <HASH>..<HASH> 100755
--- a/caravel/views.py
+++ b/caravel/views.py
@@ -27,6 +27,7 @@ from flask_appbuilder.models.sqla.filters import BaseFilter
from sqlalchemy import create_engine
from werkzeug.routing import BaseConverter
+from werkzeug.datastructures import ImmutableMultiDict
from wtforms.validators import ValidationError
import caravel
|
add ImmutableMultiDict back to views.py (#<I>)
|
diff --git a/user.go b/user.go
index <HASH>..<HASH> 100644
--- a/user.go
+++ b/user.go
@@ -1,7 +1,5 @@
package discordgo
-import "fmt"
-
// A User stores all data for an individual Discord user.
type User struct {
ID string `json:"id"`
@@ -17,10 +15,10 @@ type User struct {
// String returns a unique identifier of the form username#discriminator
func (u *User) String() string {
- return fmt.Sprintf("%s#%s", u.Username, u.Discriminator)
+ return u.Username + "#" + u.Discriminator
}
// Mention return a string which mentions the user
func (u *User) Mention() string {
- return fmt.Sprintf("<@%s>", u.ID)
+ return "<@" + u.ID + ">"
}
|
STOP USING PRINTF PLS
|
diff --git a/pygubu/builder.py b/pygubu/builder.py
index <HASH>..<HASH> 100644
--- a/pygubu/builder.py
+++ b/pygubu/builder.py
@@ -61,7 +61,7 @@ class BuilderObject:
def __init__(self, builder, wdescr):
self.builder = builder
- self.objetid = wdescr['id']
+ self.objectid = wdescr['id']
self.descr = wdescr
self.properties = wdescr.get('properties', {})
self.layout_properties = wdescr.get('layout', {})
|
Fix typo causing bug on menuitems.
|
diff --git a/src/main/java/org/jfrog/hudson/pipeline/common/executors/GradleExecutor.java b/src/main/java/org/jfrog/hudson/pipeline/common/executors/GradleExecutor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jfrog/hudson/pipeline/common/executors/GradleExecutor.java
+++ b/src/main/java/org/jfrog/hudson/pipeline/common/executors/GradleExecutor.java
@@ -74,7 +74,7 @@ public class GradleExecutor implements Executor {
org.jfrog.build.api.Build generatedBuild = Utils.getGeneratedBuildInfo(build, listener, launcher, generatedBuildPath);
// Add action only if artifacts were actually deployed and the build info was generated.
// The build info gets generated only after running the "artifactoryPublish" task.
- if (deployer.isDeployArtifacts() && CollectionUtils.isNotEmpty(generatedBuild.getModules())) {
+ if (deployer.isDeployArtifacts() && !deployer.isEmpty() && CollectionUtils.isNotEmpty(generatedBuild.getModules())) {
addDeployedArtifactsActionFromModules(this.build, deployer.getArtifactoryServer().getArtifactoryUrl(), generatedBuild.getModules(), DeployDetails.PackageType.GRADLE);
}
buildInfo.append(generatedBuild);
|
Bugfix - NPE in Gradle jobs when deployer is empty (#<I>)
|
diff --git a/server/src/main/java/org/jboss/as/server/operations/DumpServicesHandler.java b/server/src/main/java/org/jboss/as/server/operations/DumpServicesHandler.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/org/jboss/as/server/operations/DumpServicesHandler.java
+++ b/server/src/main/java/org/jboss/as/server/operations/DumpServicesHandler.java
@@ -54,7 +54,7 @@ public class DumpServicesHandler implements OperationStepHandler, DescriptionPro
context.addStep(new OperationStepHandler() {
@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
- ServiceController<?> service = context.getServiceRegistry(true).getRequiredService(Services.JBOSS_AS);
+ ServiceController<?> service = context.getServiceRegistry(false).getRequiredService(Services.JBOSS_AS);
ByteArrayOutputStream out = new ByteArrayOutputStream();
PrintStream print = new PrintStream(out);
service.getServiceContainer().dumpServices(print);
|
DumpServicesHandler doesn't need the controller lock
was: 4f4b<I>f7cd<I>e<I>af<I>b6f<I>a<I>bd
|
diff --git a/test/associated-model.js b/test/associated-model.js
index <HASH>..<HASH> 100644
--- a/test/associated-model.js
+++ b/test/associated-model.js
@@ -1150,7 +1150,9 @@ $(document).ready(function () {
{
type:Backbone.One,
key:'type',
- relatedModel:FieldInputType,
+ relatedModel:function () {
+ return FieldInputType;
+ },
map:function (id) {
return store.findWhere({type:id});
}
|
Update a test case to use both map and function for `relatedModel`
|
diff --git a/Connection.php b/Connection.php
index <HASH>..<HASH> 100755
--- a/Connection.php
+++ b/Connection.php
@@ -504,7 +504,7 @@ class Connection implements ConnectionInterface
}
$this->recordsHaveBeenModified(
- $change = ($this->getPdo()->exec($query) === false ? false : true)
+ $change = $this->getPdo()->exec($query) !== false
);
return $change;
|
[<I>] Unnecessary ternary expression (#<I>)
|
diff --git a/lib/util/data-server.js b/lib/util/data-server.js
index <HASH>..<HASH> 100644
--- a/lib/util/data-server.js
+++ b/lib/util/data-server.js
@@ -154,30 +154,16 @@ function getFrames(curReqId, lastFrameId) {
}
var result = [];
var count = 16;
- var len = frames.length;
- var i, frame;
- if (!lastFrameId) {
- for (i = 0; i < len; i++) {
- frame = frames[i];
- if (frame.reqId === curReqId) {
- result.push(decodeData(frame));
- if (--count <= 0) {
- return result;
- }
- }
- }
- return result;
- }
- for (i = len - 1; i >= 0; i--) {
- frame = frames[i];
- if (frame.reqId === curReqId && frame.frameId > lastFrameId) {
+ for (var i = 0, len = frames.length; i < len; i++) {
+ var frame = frames[i];
+ if (frame.reqId === curReqId && (lastFrameId ? frame.frameId > lastFrameId : count > 0)) {
result.push(decodeData(frame));
if (--count <= 0) {
break;
}
}
}
- return result.reverse();
+ return result;
}
function getLastFrameId(curReqId) {
|
fix: loss frames when open for first time
|
diff --git a/djsupervisor/config.py b/djsupervisor/config.py
index <HASH>..<HASH> 100644
--- a/djsupervisor/config.py
+++ b/djsupervisor/config.py
@@ -274,6 +274,7 @@ def rerender_options(options):
"""
args = []
for name,value in options.iteritems():
+ name = name.replace("_","-")
if value is None:
pass
elif isinstance(value,bool):
|
Fix rerender_options to turn "project_dir" into "--project-dir"
|
diff --git a/framework/core/js/admin/Gulpfile.js b/framework/core/js/admin/Gulpfile.js
index <HASH>..<HASH> 100644
--- a/framework/core/js/admin/Gulpfile.js
+++ b/framework/core/js/admin/Gulpfile.js
@@ -29,6 +29,5 @@ gulp({
'../lib/**/*.js'
]
},
- externalHelpers: true,
outputFile: 'dist/app.js'
});
diff --git a/framework/core/js/forum/Gulpfile.js b/framework/core/js/forum/Gulpfile.js
index <HASH>..<HASH> 100644
--- a/framework/core/js/forum/Gulpfile.js
+++ b/framework/core/js/forum/Gulpfile.js
@@ -33,6 +33,5 @@ gulp({
'../lib/**/*.js'
]
},
- externalHelpers: true,
outputFile: 'dist/app.js'
});
|
External helpers are included by default now
|
diff --git a/lib/fitgem/body_measurements.rb b/lib/fitgem/body_measurements.rb
index <HASH>..<HASH> 100644
--- a/lib/fitgem/body_measurements.rb
+++ b/lib/fitgem/body_measurements.rb
@@ -1,7 +1,7 @@
module Fitgem
class Client
# ==========================================
- # Body Measurements Update Methods
+ # Body Measurements Methods
# ==========================================
# Get the body measurements logged on a specified date
|
These aren't actually update methods, they're retrieval methods.
|
diff --git a/mri_meta_extract/dicom_import.py b/mri_meta_extract/dicom_import.py
index <HASH>..<HASH> 100644
--- a/mri_meta_extract/dicom_import.py
+++ b/mri_meta_extract/dicom_import.py
@@ -29,7 +29,7 @@ conn = None
# FUNCTIONS - DICOM
##########################################################################
-def dicom2db(folder, files_pattern='/**/MR.*', db_url=None):
+def dicom2db(folder, files_pattern='**/MR.*', db_url=None):
"""
Extract some meta-data from DICOM files and store them into a DB
:param folder: root folder
@@ -72,7 +72,7 @@ def dicom2db(folder, files_pattern='/**/MR.*', db_url=None):
conn.close()
-def visit_info(folder, files_pattern='/**/MR.*', db_url=None):
+def visit_info(folder, files_pattern='**/MR.*', db_url=None):
"""
Get visit meta-data from DICOM files (participant ID and scan date)
:param folder: root folder
|
fix files_pattern for dicom (same fix was previously done for nifti)
|
diff --git a/lib/browser/index.js b/lib/browser/index.js
index <HASH>..<HASH> 100644
--- a/lib/browser/index.js
+++ b/lib/browser/index.js
@@ -105,6 +105,7 @@ exports.browserAugmentation = function(dom) {
for (var i in element.style) {
if (!styleIgnore[i]) {
var use = true;
+ //sys.puts('Style: ' + i + ' :: ' + element.style[i] );
if (i === 'position' && element.style[i] === 'static') {
use = false;
}
@@ -112,7 +113,6 @@ exports.browserAugmentation = function(dom) {
use = false;
}
if (use) {
- //sys.puts('Style: ' + i + ' :: ' + element.style[i] );
styleAttrs.push(i + ': ' + element.style[i]);
}
}
|
Removed a sys call
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -257,7 +257,7 @@ module.exports = function(Sequelize) {
var tableName = defineOptions.freezeTableName ? modelName : (Utils.pluralize(modelName1) + Utils.pluralize(defineOptions.camelThrough ? Utils.uppercaseFirst(modelName2) : modelName2));
var throughOptions = {tableName: tableName, labels: false};
- _.defaultNoUndef(throughOptions, 'skipFields', options.skipFields, defineOptions.skipFieldsOnThrough);
+ utils.defaultNoUndef(throughOptions, 'skipFields', options.skipFields, defineOptions.skipFieldsOnThrough);
options.through = defineOne(modelName, {fields: fields, options: throughOptions});
}
|
Bug fix - refactor skipFields option code
|
diff --git a/loompy/loompy.py b/loompy/loompy.py
index <HASH>..<HASH> 100644
--- a/loompy/loompy.py
+++ b/loompy/loompy.py
@@ -417,7 +417,7 @@ class LoomConnection:
# Add the columns layerwise
for key in self.layer.keys():
self.layer[key].resize(n_cols, axis=1)
- self.layer[key][:, self.shape[1]:n_cols] = submatrix[key].astype(self.layer[key].dtype)
+ self.layer[key][:, self.shape[1]:n_cols] = submatrix_dict[key].astype(self.layer[key].dtype)
self._file.flush()
def add_loom(self, other_file: str, key: str = None, fill_values: Dict[str, np.ndarray] = None) -> None:
|
bug in layer-handling during add_columns
|
diff --git a/materializecssform/templatetags/materializecss.py b/materializecssform/templatetags/materializecss.py
index <HASH>..<HASH> 100644
--- a/materializecssform/templatetags/materializecss.py
+++ b/materializecssform/templatetags/materializecss.py
@@ -34,7 +34,7 @@ def render(element, markup_classes):
if element_type == 'boundfield':
add_input_classes(element)
template = get_template("materializecssform/field.html")
- context = Context({'field': element, 'classes': markup_classes})
+ context = {'field': element, 'classes': markup_classes}
else:
has_management = getattr(element, 'management_form', None)
if has_management:
@@ -43,13 +43,13 @@ def render(element, markup_classes):
add_input_classes(field)
template = get_template("materializecssform/formset.html")
- context = Context({'formset': element, 'classes': markup_classes})
+ context = {'formset': element, 'classes': markup_classes}
else:
for field in element.visible_fields():
add_input_classes(field)
template = get_template("materializecssform/form.html")
- context = Context({'form': element, 'classes': markup_classes})
+ context = {'form': element, 'classes': markup_classes}
return template.render(context)
|
Replace Context to dict for Django <I> compatibility
|
diff --git a/slack-api-client/src/test/java/util/sample_json_generation/JsonDataRecorder.java b/slack-api-client/src/test/java/util/sample_json_generation/JsonDataRecorder.java
index <HASH>..<HASH> 100644
--- a/slack-api-client/src/test/java/util/sample_json_generation/JsonDataRecorder.java
+++ b/slack-api-client/src/test/java/util/sample_json_generation/JsonDataRecorder.java
@@ -117,8 +117,11 @@ public class JsonDataRecorder {
existingSampleJson = Files.readAllLines(jsonFilePath, UTF_8).stream().collect(Collectors.joining());
} catch (NoSuchFileException e) {
}
+ if (existingSampleJson == null) {
+ existingSampleJson = "{}";
+ }
JsonObject mergedJsonObj = rawJsonObj;
- if (existingSampleJson != null || existingSampleJson.trim().isEmpty()) {
+ if (existingSampleJson.trim().isEmpty()) {
JsonElement existingSampleJsonElem = JsonParser.parseString(existingSampleJson);
JsonObject sampleJsonObj = existingSampleJsonElem.isJsonObject() ? existingSampleJsonElem.getAsJsonObject() : null;
if (sampleJsonObj != null && sampleJsonObj.isJsonObject()) {
|
Fix a bug in the sample JSON generator
|
diff --git a/src/js/TextFields/TextField.js b/src/js/TextFields/TextField.js
index <HASH>..<HASH> 100644
--- a/src/js/TextFields/TextField.js
+++ b/src/js/TextFields/TextField.js
@@ -53,7 +53,6 @@ export default class TextField extends Component {
static defaultProps = {
type: 'text',
- defaultValue: '',
floatingLabel: true,
lineDirection: 'left',
};
|
Removed defaultValue from text field for react-<I> happiness
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.