diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/perform_later/args_parser.rb b/lib/perform_later/args_parser.rb
index <HASH>..<HASH> 100644
--- a/lib/perform_later/args_parser.rb
+++ b/lib/perform_later/args_parser.rb
@@ -18,10 +18,14 @@ module PerformLater
if o
o = args_from_resque(o) if o.is_a?(Array)
case o
- when CLASS_STRING_FORMAT then $1.constantize
- when AR_STRING_FORMAT then $1.constantize.find_by_id($2)
- when YAML_STRING_FORMAT then YAML.load(o)
- else o
+ when CLASS_STRING_FORMAT
+ $1.constantize
+ when AR_STRING_FORMAT
+ $1.constantize.find_by_id($2)
+ when YAML_STRING_FORMAT
+ YAML.load(o)
+ else
+ o
end
end
} if args
|
Formatting of the args_finder
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -97,7 +97,7 @@ class ExtensionBuilder(distutils.command.build_ext.build_ext, build_ext_options)
if processor == 'x86_64':
return 'x86_64' # Best guess?
else:
- return 'reference'
+ return 'x86_64'
def get_compiler_name(self):
if 'BLIS_COMPILER' in os.environ:
|
Force build for x<I>_<I>
|
diff --git a/test/tools/javac/T6725036.java b/test/tools/javac/T6725036.java
index <HASH>..<HASH> 100644
--- a/test/tools/javac/T6725036.java
+++ b/test/tools/javac/T6725036.java
@@ -23,8 +23,7 @@
/*
* @test
- * @bug 6725036
- * @ignore 8016760: failure of regression test langtools/tools/javac/T6725036.java
+ * @bug 6725036 8016760
* @summary javac returns incorrect value for lastModifiedTime() when
* source is a zip file archive
*/
|
<I>: Remove @ignore from tools/javac/T<I>.java
Reviewed-by: jjg
|
diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/relation/delegation.rb
+++ b/activerecord/lib/active_record/relation/delegation.rb
@@ -38,7 +38,7 @@ module ActiveRecord
delegate :to_xml, :encode_with, :length, :collect, :map, :each, :all?, :include?, :to_ary, :join,
:[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of,
- :shuffle, :split, to: :records
+ :shuffle, :split, :index, to: :records
delegate :table_name, :quoted_table_name, :primary_key, :quoted_primary_key,
:connection, :columns_hash, :to => :klass
|
add index to array methods so we can call it on relations
|
diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py
index <HASH>..<HASH> 100755
--- a/tools/run_tests/run_interop_tests.py
+++ b/tools/run_tests/run_interop_tests.py
@@ -111,8 +111,7 @@ class CSharpLanguage:
return {}
def unimplemented_test_cases(self):
- # TODO: status_code_and_message doesn't work against node_server
- return _SKIP_COMPRESSION + ['status_code_and_message']
+ return _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return _SKIP_COMPRESSION
|
run all implemented C# interop tests
|
diff --git a/packages/cozy-scripts/config/webpack.config.pictures.js b/packages/cozy-scripts/config/webpack.config.pictures.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-scripts/config/webpack.config.pictures.js
+++ b/packages/cozy-scripts/config/webpack.config.pictures.js
@@ -2,7 +2,7 @@
const { environment, target } = require('./webpack.vars')
const SpriteLoaderPlugin = require('svg-sprite-loader/plugin')
-const isMobileApp = target === 'mobile' ? true : false
+const isMobileApp = target === 'mobile'
module.exports = {
module: {
rules: [
|
Update packages/cozy-scripts/config/webpack.config.pictures.js
|
diff --git a/code/libraries/koowa/components/com_activities/model/entity/activity.php b/code/libraries/koowa/components/com_activities/model/entity/activity.php
index <HASH>..<HASH> 100644
--- a/code/libraries/koowa/components/com_activities/model/entity/activity.php
+++ b/code/libraries/koowa/components/com_activities/model/entity/activity.php
@@ -442,13 +442,13 @@ class ComActivitiesModelEntityActivity extends KModelEntityRow implements ComAct
if ($value = $object->{ 'object' . ucfirst($property)})
{
- $config = array('objectName' => $value, 'internal' => true);
+ $config = $this->_getConfig($parts[0].ucfirst($parts[1]));
+
+ $config->append(array('objectName' => $value, 'internal' => true));
// If display property is set use it and disable properties translations.
- if ($value = $object->{'display' . ucfirst($property)})
- {
- $config['displayName'] = $value;
- $config['translate'] = false;
+ if ($value = $object->{'display' . ucfirst($property)}) {
+ $config->append(array('displayName' => $value, 'translate' => false));
}
// Create a new basic and minimal format token object.
|
Allow dot notation internal objects to be configurable.
This allows for dot notation tokens to be fully configurable, i.e. making them linkable, etc.
|
diff --git a/classes/Boom/Page/Creator.php b/classes/Boom/Page/Creator.php
index <HASH>..<HASH> 100644
--- a/classes/Boom/Page/Creator.php
+++ b/classes/Boom/Page/Creator.php
@@ -2,6 +2,8 @@
namespace Boom\Page;
+use \Boom\Page as Page;
+
class Creator
{
/**
@@ -19,7 +21,7 @@ class Creator
protected $_templateId;
protected $_title = 'Untitled';
- public function __construct(\Model_Page $parent, \Model_Person $creator)
+ public function __construct(Page $parent, \Model_Person $creator)
{
$this->_parent = $parent;
$this->_creator = $creator;
|
Fixed bug in page creator by updating type hints
|
diff --git a/test/extended/authorization/authorization.go b/test/extended/authorization/authorization.go
index <HASH>..<HASH> 100644
--- a/test/extended/authorization/authorization.go
+++ b/test/extended/authorization/authorization.go
@@ -335,6 +335,10 @@ func (test localResourceAccessReviewTest) run() {
if strings.HasPrefix(curr, "system:serviceaccount:openshift-") {
continue
}
+ // skip the ci provisioner to pass gcp: ci-provisioner@openshift-gce-devel-ci.iam.gserviceaccount.com
+ if strings.HasPrefix(curr, "ci-provisioner@") {
+ continue
+ }
actualUsersToCheck.Insert(curr)
}
if !reflect.DeepEqual(actualUsersToCheck, sets.NewString(test.response.UsersSlice...)) {
|
relax RAR check to pass GCP
|
diff --git a/src/replace.js b/src/replace.js
index <HASH>..<HASH> 100644
--- a/src/replace.js
+++ b/src/replace.js
@@ -18,8 +18,7 @@ export class Slice {
// Create a slice. When specifying a non-zero open depth, you must
// make sure that there are nodes of at least that depth at the
// appropriate side of the fragment—i.e. if the fragment is an empty
- // paragraph node, `openStart` and `openEnd` can't be greater than
- // 1.
+ // paragraph node, `openStart` and `openEnd` can't be greater than 1.
//
// It is not necessary for the content of open nodes to conform to
// the schema's content constraints, though it should be a valid
|
Slice markdown: do not start line with 1.
|
diff --git a/workshift/tests.py b/workshift/tests.py
index <HASH>..<HASH> 100644
--- a/workshift/tests.py
+++ b/workshift/tests.py
@@ -1323,10 +1323,22 @@ class TestInteractForms(TestCase):
self.assertEqual(["Not signed into workshift."], form.errors["pk"])
def test_missing_shift(self):
- pass
+ self.assertTrue(self.client.login(username="u", password="pwd"))
+
+ form = SignOutForm({"pk": -1}, profile=self.up)
+ self.assertFalse(form.is_valid())
+
+ form = SignOutForm({"pk": 100}, profile=self.up)
+ self.assertFalse(form.is_valid())
+
+ form = SignOutForm({"pk": "a"}, profile=self.up)
+ self.assertFalse(form.is_valid())
def test_closed_shift(self):
- pass
+ self.once.closed = True
+ self.once.save()
+ form = SignOutForm({"pk": self.once.pk}, profile=self.up)
+ self.assertFalse(form.is_valid())
class TestPermissions(TestCase):
"""
|
Filled in test_closed_shift and test_missing_shift
|
diff --git a/spec/authority_spec.rb b/spec/authority_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/authority_spec.rb
+++ b/spec/authority_spec.rb
@@ -14,7 +14,7 @@ describe Authority do
end
it "has a convenience accessor for the ability verbs" do
- expect(Authority.verbs.sort).to eq([:create, :delete, :read, :update])
+ expect(Authority.verbs.map(&:to_s).sort).to eq(%w[create delete read update])
end
it "has a convenience accessor for the ability adjectives" do
|
Fix this test for <I>
|
diff --git a/bootstrap.js b/bootstrap.js
index <HASH>..<HASH> 100644
--- a/bootstrap.js
+++ b/bootstrap.js
@@ -59,6 +59,8 @@ module.exports = function(grunt) {
tasksDefault.push('scaffold');
if (grunt.file.exists('./composer.lock') && grunt.config.get(['composer', 'install'])) {
+ // Manually run `composer drupal-scaffold` since this is only automatically run on update.
+ tasksDefault.unshift('composer:drupal-scaffold');
// Run `composer install` if there is already a lock file. Updates should be explicit once this file exists.
tasksDefault.unshift('composer:install');
}
diff --git a/tasks/composer.js b/tasks/composer.js
index <HASH>..<HASH> 100644
--- a/tasks/composer.js
+++ b/tasks/composer.js
@@ -29,6 +29,7 @@ module.exports = function(grunt) {
],
}
});
+ grunt.config(['composer', 'drupal-scaffold'], {});
Help.add({
task: 'composer',
|
Run `composer drupal-scaffold` after `composer install`
|
diff --git a/lib/magic_pipe/metrics.rb b/lib/magic_pipe/metrics.rb
index <HASH>..<HASH> 100644
--- a/lib/magic_pipe/metrics.rb
+++ b/lib/magic_pipe/metrics.rb
@@ -2,7 +2,7 @@ module MagicPipe
module Metrics
class << self
def client
- Config.instance.metrics_client
+ MagicPipe.config.metrics_client
end
def method_missing(name, *args, &block)
|
don't reference the Config module directly
|
diff --git a/salt/states/file.py b/salt/states/file.py
index <HASH>..<HASH> 100644
--- a/salt/states/file.py
+++ b/salt/states/file.py
@@ -39,7 +39,7 @@ string will be the contents of the managed file. For example:
def run():
lines = ('foo', 'bar', 'baz')
- return '\n\n'.join(lines)
+ return '\\n\\n'.join(lines)
.. note::
|
Fixing the doc and escaping newline char
|
diff --git a/tests/test_mock_submission.py b/tests/test_mock_submission.py
index <HASH>..<HASH> 100644
--- a/tests/test_mock_submission.py
+++ b/tests/test_mock_submission.py
@@ -339,8 +339,8 @@ class MockSubmission(_QueryTest):
future = solver.sample_qubo({})
future.result()
- # after third poll, back-off interval should be 4
- self.assertEqual(future._poll_backoff, 4)
+ # after third poll, back-off interval should be 4 x initial back-off
+ self.assertEqual(future._poll_backoff, Client._POLL_BACKOFF_MIN * 2**2)
@mock.patch.object(Client, "_POLL_THREAD_COUNT", 1)
@mock.patch.object(Client, "_SUBMISSION_THREAD_COUNT", 1)
|
Generalize exp back-test to account for initial back-off
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -202,7 +202,9 @@ VMRun.vmrunWithOptions = function (command, args, options) {
child_process.exec('vmrun' + ' ' + runArgs.join(' '), {}, function (err, stdout, stderr) {
if (err) {
- err.stderr = stderr;
+ if (/^Error: /.test(stderr || stdout)) {
+ err.message = ((stderr || stdout).substr(7)).trim() + '\n cmd: ' + err.cmd;
+ }
return reject(err);
}
|
Improved error formatting from vmrun output
|
diff --git a/bcbio/distributed/manage.py b/bcbio/distributed/manage.py
index <HASH>..<HASH> 100644
--- a/bcbio/distributed/manage.py
+++ b/bcbio/distributed/manage.py
@@ -61,8 +61,9 @@ def start_analysis_manager(cluster, args, config):
program_cl = [config["analysis"]["process_program"]] + args
job_id = cluster.submit_job(cluster_args, program_cl)
# wait for job to start
- while not(cluster.are_running([job_id])):
- time.sleep(5)
+ # Avoid this for systems where everything queues as batches
+ #while not(cluster.are_running([job_id])):
+ # time.sleep(5)
return job_id
def monitor_analysis(cluster, job_id):
|
Queue manager and work nodes concurrently; fixes issue <I> reported by @vals
|
diff --git a/code/extensions/BlocksSiteTreeExtension.php b/code/extensions/BlocksSiteTreeExtension.php
index <HASH>..<HASH> 100644
--- a/code/extensions/BlocksSiteTreeExtension.php
+++ b/code/extensions/BlocksSiteTreeExtension.php
@@ -31,8 +31,11 @@ class BlocksSiteTreeExtension extends SiteTreeExtension{
* Block manager for Pages
**/
public function updateCMSFields(FieldList $fields) {
+ $fields->addFieldToTab('Root.Blocks', LiteralField::create('PreviewLink', "<p><a href='" . $this->blockPreviewLink() . "' target='_blank'>Preview Block Areas for this page</a></p>"));
if(count($this->blockManager->getAreasForPageType($this->owner->ClassName))){
-
+
+
+
// Blocks related directly to this Page
$gridConfig = GridFieldConfig_BlockManager::create()
->addExisting($this->owner->class)
@@ -342,4 +345,9 @@ class BlocksSiteTreeExtension extends SiteTreeExtension{
return $blocks;
}
+
+
+ public function blockPreviewLink(){
+ return Controller::join_links($this->owner->Link(), '?block_preview=1');
+ }
}
\ No newline at end of file
|
ADDED link to preview blocks in cms
|
diff --git a/lhc/binf/loci/tools/query.py b/lhc/binf/loci/tools/query.py
index <HASH>..<HASH> 100644
--- a/lhc/binf/loci/tools/query.py
+++ b/lhc/binf/loci/tools/query.py
@@ -7,9 +7,13 @@ from lhc.io.loci import open_loci_file
def query(query_loci: Iterable[GenomicInterval], loci: pysam.TabixFile, *, direction: str = 'left', tolerance=0) -> Iterator[GenomicInterval]:
+ missing_chromosomes = set()
for locus in query_loci:
query_locus = GenomicInterval(max(locus.start - tolerance, 0), locus.stop + tolerance, chromosome=locus.chromosome)
- found_loci = loci.fetch(query_locus)
+ try:
+ found_loci = loci.fetch(query_locus)
+ except ValueError:
+ missing_chromosomes.add(str(locus.chromosome))
if direction == 'left':
if next(found_loci, None) is not None:
yield locus
|
improve track missing chromosome in loci query
|
diff --git a/arch/zx48k/translator.py b/arch/zx48k/translator.py
index <HASH>..<HASH> 100644
--- a/arch/zx48k/translator.py
+++ b/arch/zx48k/translator.py
@@ -473,18 +473,18 @@ class Translator(TranslatorVisitor):
continue_loop = backend.tmp_label()
if node.token == 'WHILE_DO':
- self.emit('jump', continue_loop)
+ self.ic_jump(continue_loop)
- self.emit('label', loop_label)
+ self.ic_label(loop_label)
self.LOOPS.append(('DO', end_loop, continue_loop)) # Saves which labels to jump upon EXIT or CONTINUE
if len(node.children) > 1:
yield node.children[1]
- self.emit('label', continue_loop)
+ self.ic_label(continue_loop)
yield node.children[0]
- self.emit('jnzero' + self.TSUFFIX(node.children[0].type_), node.children[0].t, loop_label)
- self.emit('label', end_loop)
+ self.ic_jnzero(node.children[0].type_, node.children[0].t, loop_label)
+ self.ic_label(end_loop)
self.LOOPS.pop()
# del loop_label, end_loop, continue_loop
|
Refactorize DO WHILE visit
|
diff --git a/features/step_definitions/cucumber_rails_steps.rb b/features/step_definitions/cucumber_rails_steps.rb
index <HASH>..<HASH> 100644
--- a/features/step_definitions/cucumber_rails_steps.rb
+++ b/features/step_definitions/cucumber_rails_steps.rb
@@ -37,7 +37,7 @@ module CucumberRailsHelper
end
World(CucumberRailsHelper)
-Given /^I have created a new Rails 3 app and installed cucumber\-rails, accidentally outside of the test group in my Gemfile$/ do
+Given /^I have created a new Rails app and installed cucumber\-rails, accidentally outside of the test group in my Gemfile$/ do
rails_new
install_cucumber_rails :not_in_test_group
create_web_steps
@@ -58,7 +58,7 @@ Given /^I have created a new Rails app and installed cucumber\-rails$/ do
prepare_aruba_report
end
-Given /^I have created a new Rails 3 app with no database and installed cucumber-rails$/ do
+Given /^I have created a new Rails app with no database and installed cucumber-rails$/ do
rails_new :args => '--skip-active-record'
install_cucumber_rails :no_database_cleaner, :no_factory_girl
overwrite_file('features/support/env.rb', "require 'cucumber/rails'\n")
@@ -72,4 +72,4 @@ end
When /^I run the cukes$/ do
run_simple('bundle exec cucumber')
-end
+end
\ No newline at end of file
|
Changed references to Rails 3 app to Rails app
|
diff --git a/src/Analyse/Callback/Iterate/ThroughGetter.php b/src/Analyse/Callback/Iterate/ThroughGetter.php
index <HASH>..<HASH> 100644
--- a/src/Analyse/Callback/Iterate/ThroughGetter.php
+++ b/src/Analyse/Callback/Iterate/ThroughGetter.php
@@ -374,6 +374,11 @@ class ThroughGetter extends AbstractCallback
*/
protected function getReflectionPropertyDeep(ReflectionClass $classReflection, ReflectionMethod $reflectionMethod)
{
+ if ($reflectionMethod->isInternal() === true) {
+ // Early return for internal stuff.
+ return null;
+ }
+
// Read the sourcecode into a string.
$sourcecode = $this->pool->fileService->readFile(
$reflectionMethod->getFileName(),
|
Added an early return to the getter iteration, in case of a predefined internal class.
|
diff --git a/lib/te3270/emulators/quick3270.rb b/lib/te3270/emulators/quick3270.rb
index <HASH>..<HASH> 100644
--- a/lib/te3270/emulators/quick3270.rb
+++ b/lib/te3270/emulators/quick3270.rb
@@ -11,10 +11,14 @@ module TE3270
def connect
start_quick_system
yield self if block_given?
-
establish_session
end
+ def disconnect
+ session.Disconnect
+ system.Application.Quit
+ end
+
private
def visible
diff --git a/spec/lib/te3270/emulators/quick3270_spec.rb b/spec/lib/te3270/emulators/quick3270_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/te3270/emulators/quick3270_spec.rb
+++ b/spec/lib/te3270/emulators/quick3270_spec.rb
@@ -46,5 +46,14 @@ describe TE3270::Emulators::Quick3270 do
quick_session.should_receive(:Connect)
quick.connect
end
+
+ it 'should disconnect from a session' do
+ application = double('application')
+ quick_session.should_receive(:Disconnect)
+ quick_system.should_receive(:Application).and_return(application)
+ application.should_receive(:Quit)
+ quick.connect
+ quick.disconnect
+ end
end
end
\ No newline at end of file
|
added disconnect method to quick<I>
|
diff --git a/lib/debug.js b/lib/debug.js
index <HASH>..<HASH> 100644
--- a/lib/debug.js
+++ b/lib/debug.js
@@ -36,6 +36,14 @@ var colors = [6, 2, 3, 4, 5, 1];
var prevColor = 0;
/**
+ * Is stderr a TTY? Colored output is disabled when `true`.
+ */
+
+var isTTY = 'isTTY' in process.stderr
+ ? process.stderr.isTTY
+ : process.binding('stdio').isatty(process.stderr.fd || 2)
+
+/**
* Select a color.
*
* @return {Number}
@@ -57,8 +65,13 @@ function color() {
function debug(name) {
if (!~names.indexOf(name)) return function(){};
var c = color();
- return function(fmt){
+ return isTTY ?
+ function(fmt){
fmt = ' \033[3' + c + 'm' + name + '\033[90m ' + fmt + '\033[0m';
console.error.apply(this, arguments);
+ } :
+ function(fmt){
+ fmt = ' ' + name + ' ' + fmt;
+ console.error.apply(this, arguments);
}
-}
\ No newline at end of file
+}
|
Don't output colors when stderr is *not* a TTY.
|
diff --git a/lib/tumblr.rb b/lib/tumblr.rb
index <HASH>..<HASH> 100644
--- a/lib/tumblr.rb
+++ b/lib/tumblr.rb
@@ -42,6 +42,14 @@ class Tumblr
Authenticator.new(@credentials[:email],@credentials[:password]).authenticate(params)
end
+ def pages(username)
+ reader.pages(username)
+ end
+
+ def all_pages(username)
+ reader.all_pages(username)
+ end
+
def reader
if @credentials.blank?
Reader.new
|
Tumblr convenience methods for Reader#pages and all_pages
|
diff --git a/compliance_checker/cf/cf_1_6.py b/compliance_checker/cf/cf_1_6.py
index <HASH>..<HASH> 100644
--- a/compliance_checker/cf/cf_1_6.py
+++ b/compliance_checker/cf/cf_1_6.py
@@ -146,7 +146,8 @@ class CF1_6Check(CFNCCheck):
att.dtype == variable.dtype
) or ( # will short-circuit or if first condition is true
isinstance(att, (np.float, np.double, float))
- and variable.dtype in (np.byte, np.short, np.int, int))
+ and variable.dtype in (np.byte, np.short, np.int16, np.int,
+ int))
if not val:
msgs.append(error_msg)
|
Add int<I> in addition to short for scale_factor/add_offset comparison
|
diff --git a/src/Exceptions.php b/src/Exceptions.php
index <HASH>..<HASH> 100644
--- a/src/Exceptions.php
+++ b/src/Exceptions.php
@@ -93,7 +93,7 @@ class Exceptions
{
if (self::$depth === null) {
self::$depth = 0;
- self::$fatalErrorHandlers = array();
+ self::$fatalErrorHandlers = [];
register_shutdown_function(__CLASS__ . '::fatalErrorHandler');
}
}
|
Adopted the PHP <I> short array syntax
|
diff --git a/Tone/source/OscillatorNode.js b/Tone/source/OscillatorNode.js
index <HASH>..<HASH> 100644
--- a/Tone/source/OscillatorNode.js
+++ b/Tone/source/OscillatorNode.js
@@ -3,7 +3,8 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G
/**
* @class Wrapper around the native fire-and-forget OscillatorNode. Adds the
- * ability to reschedule the stop method.
+ * ability to reschedule the stop method. ***[Tone.Oscillator](Oscillator) is better
+ * for most use-cases***
* @extends {Tone.AudioNode}
* @param {AudioBuffer|Tone.Buffer} buffer The buffer to play
* @param {Function} onload The callback to invoke when the
|
noting that Oscillator is better for most cases
|
diff --git a/src/Karma/Hydrator.php b/src/Karma/Hydrator.php
index <HASH>..<HASH> 100644
--- a/src/Karma/Hydrator.php
+++ b/src/Karma/Hydrator.php
@@ -102,20 +102,20 @@ class Hydrator implements ConfigurableProcessor
public function hydrate($environment)
{
- $distFiles = $this->collectDistFiles();
+ $files = $this->collectFiles();
- foreach($distFiles as $file)
+ foreach($files as $file)
{
$this->hydrateFile($file, $environment);
}
$this->info(sprintf(
'%d files generated',
- count($distFiles)
+ count($files)
));
}
- private function collectDistFiles()
+ private function collectFiles()
{
$pattern = sprintf('.*\%s$', $this->suffix);
if($this->nonDistFilesOverwriteAllowed === true)
@@ -390,9 +390,9 @@ class Hydrator implements ConfigurableProcessor
public function rollback()
{
- $distFiles = $this->collectDistFiles();
+ $files = $this->collectFiles();
- foreach($distFiles as $file)
+ foreach($files as $file)
{
$this->rollbackFile($file);
}
|
refactor: change name of collection file method (not only dist are loaded)
|
diff --git a/admin/tool/uploaduser/locallib.php b/admin/tool/uploaduser/locallib.php
index <HASH>..<HASH> 100644
--- a/admin/tool/uploaduser/locallib.php
+++ b/admin/tool/uploaduser/locallib.php
@@ -360,6 +360,7 @@ function uu_allowed_roles() {
*/
function uu_allowed_roles_cache() {
$allowedroles = get_assignable_roles(context_course::instance(SITEID), ROLENAME_SHORT);
+ $rolecache = [];
foreach ($allowedroles as $rid=>$rname) {
$rolecache[$rid] = new stdClass();
$rolecache[$rid]->id = $rid;
@@ -379,6 +380,7 @@ function uu_allowed_roles_cache() {
*/
function uu_allowed_sysroles_cache() {
$allowedroles = get_assignable_roles(context_system::instance(), ROLENAME_SHORT);
+ $rolecache = [];
foreach ($allowedroles as $rid => $rname) {
$rolecache[$rid] = new stdClass();
$rolecache[$rid]->id = $rid;
|
MDL-<I> tool_uploaduser: Fix undefined variable warning
|
diff --git a/src/main/java/io/vlingo/actors/Stage.java b/src/main/java/io/vlingo/actors/Stage.java
index <HASH>..<HASH> 100644
--- a/src/main/java/io/vlingo/actors/Stage.java
+++ b/src/main/java/io/vlingo/actors/Stage.java
@@ -51,15 +51,23 @@ public class Stage implements Stoppable {
definition.parameters(),
TestMailbox.Name,
definition.actorName());
- return actorFor(
- redefinition,
- protocol,
- definition.parentOr(world.defaultParent()),
- null,
- null,
- definition.supervisor(),
- definition.loggerOr(world.defaultLogger())
- ).toTestActor();
+
+ try {
+ return actorFor(
+ redefinition,
+ protocol,
+ definition.parentOr(world.defaultParent()),
+ null,
+ null,
+ definition.supervisor(),
+ definition.loggerOr(world.defaultLogger())
+ ).toTestActor();
+
+ } catch (Exception e) {
+ world.defaultLogger().log("vlingo/actors: FAILED: " + e.getMessage(), e);
+ e.printStackTrace();
+ return null;
+ }
}
public final Protocols testActorFor(final Definition definition, final Class<?>[] protocols) {
|
Added more logging for test actor creations, which often goes wrong during early development.
|
diff --git a/ghost/members-api/static/auth/components/FormInput.js b/ghost/members-api/static/auth/components/FormInput.js
index <HASH>..<HASH> 100644
--- a/ghost/members-api/static/auth/components/FormInput.js
+++ b/ghost/members-api/static/auth/components/FormInput.js
@@ -1,4 +1,4 @@
-export default ({type, name, placeholder, value = '', error, onInput, required, className, children, icon}) => (
+export default ({type, name, placeholder, value = '', error, onInput, required, disabled, className, children, icon}) => (
<div className="gm-form-element">
<div className={[
(className ? className : ""),
@@ -12,6 +12,7 @@ export default ({type, name, placeholder, value = '', error, onInput, required,
value={ value }
onInput={ (e) => onInput(e, name) }
required={ required }
+ disabled={ disabled }
className={[
(value ? "gm-input-filled" : ""),
(error ? "gm-error" : "")
|
Added support for disabled form elements
no-issue
This can be used for a coupon input in future
|
diff --git a/package-command.php b/package-command.php
index <HASH>..<HASH> 100644
--- a/package-command.php
+++ b/package-command.php
@@ -5,7 +5,7 @@ if ( ! class_exists( 'WP_CLI' ) ) {
}
$autoload = dirname( __FILE__ ) . '/vendor/autoload.php';
-if ( file_exists( $autoload ) ) {
+if ( file_exists( $autoload ) && ! class_exists( 'Package_Command' ) ) {
require_once $autoload;
}
WP_CLI::add_command( 'package', 'Package_Command' );
|
If `Package_Command` already exists, don't need the autoloader
|
diff --git a/src/Illuminate/Queue/Worker.php b/src/Illuminate/Queue/Worker.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Queue/Worker.php
+++ b/src/Illuminate/Queue/Worker.php
@@ -598,7 +598,11 @@ class Worker
*/
public function sleep($seconds)
{
- usleep($seconds * 1000000);
+ if ($seconds < 1) {
+ usleep($seconds * 1000000);
+ } else {
+ sleep($seconds);
+ }
}
/**
|
Use `usleep` in case when sleep time less than 1 second (#<I>)
|
diff --git a/src/views/shared/list/_full_header.haml.php b/src/views/shared/list/_full_header.haml.php
index <HASH>..<HASH> 100644
--- a/src/views/shared/list/_full_header.haml.php
+++ b/src/views/shared/list/_full_header.haml.php
@@ -13,9 +13,6 @@
%span.stat
Total
%span.badge=$count
- %span.stat
- Showing
- %span.badge=count($listing)
-# Potentially contain other buttons
.pull-right.btn-toolbar
|
Removing the "showing" stat
|
diff --git a/gosu-lab/src/main/java/editor/search/UsageTarget.java b/gosu-lab/src/main/java/editor/search/UsageTarget.java
index <HASH>..<HASH> 100644
--- a/gosu-lab/src/main/java/editor/search/UsageTarget.java
+++ b/gosu-lab/src/main/java/editor/search/UsageTarget.java
@@ -293,15 +293,16 @@ public class UsageTarget
private static SearchElement findTarget( IFeatureInfo fi, IParsedElement ref )
{
- if( !(fi.getOwnersType() instanceof IFileRepositoryBasedType) )
+ IType type = fi.getOwnersType();
+ type = type instanceof IMetaType ? ((IMetaType)type).getType() : type;
+ if( !(type instanceof IFileRepositoryBasedType) )
{
return null;
}
- IFileRepositoryBasedType declaringType = (IFileRepositoryBasedType)fi.getOwnersType();
+ IFileRepositoryBasedType declaringType = (IFileRepositoryBasedType)type;
if( fi instanceof ITypeInfo )
{
- IType type = fi.getOwnersType();
if( type instanceof IGosuClass )
{
return new SearchElement( ((IGosuClass)type).getClassStatement().getClassDeclaration() );
|
Gosu Lab
- fix navigation to member through meta type
|
diff --git a/openstack/resource_openstack_networking_port_v2.go b/openstack/resource_openstack_networking_port_v2.go
index <HASH>..<HASH> 100644
--- a/openstack/resource_openstack_networking_port_v2.go
+++ b/openstack/resource_openstack_networking_port_v2.go
@@ -10,7 +10,6 @@ import (
"github.com/gophercloud/gophercloud/openstack/networking/v2/ports"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
- "github.com/hashicorp/terraform/helper/validation"
)
func resourceNetworkingPortV2() *schema.Resource {
@@ -114,9 +113,8 @@ func resourceNetworkingPortV2() *schema.Resource {
Required: true,
},
"ip_address": {
- Type: schema.TypeString,
- Optional: true,
- ValidateFunc: validation.SingleIP(),
+ Type: schema.TypeString,
+ Optional: true,
},
},
},
|
Networking v2: Revert validation of fixed_ip ip_address (#<I>)
|
diff --git a/troposphere/autoscaling.py b/troposphere/autoscaling.py
index <HASH>..<HASH> 100644
--- a/troposphere/autoscaling.py
+++ b/troposphere/autoscaling.py
@@ -32,7 +32,7 @@ class AutoScalingGroup(AWSObject):
'MaxSize': (basestring, True),
'MinSize': (basestring, True),
'NotificationConfiguration': (basestring, False),
- 'Tags': (list, True),
+ 'Tags': (list, False), # Although docs say these are required
'VPCZoneIdentifier': (list, False),
}
|
Don't make Tags a required AutoScalingGroup property
Despite the documentation saying this is required, none of the examples
have Tags in them. So we'll make this an optional property for now..
|
diff --git a/kernel/setup/steps/ezstep_create_sites.php b/kernel/setup/steps/ezstep_create_sites.php
index <HASH>..<HASH> 100644
--- a/kernel/setup/steps/ezstep_create_sites.php
+++ b/kernel/setup/steps/ezstep_create_sites.php
@@ -492,10 +492,14 @@ class eZStepCreateSites extends eZStepInstaller
if ( $db->databaseName() == 'mysql' )
{
- // We try to use InnoDB table type if it is available, else we use the default type.
- $innoDBAvail = $db->arrayQuery( "SHOW VARIABLES LIKE 'have_innodb';" );
- if ( $innoDBAvail[0]['Value'] == 'YES' )
- $params['table_type'] = 'innodb';
+ $engines = $db->arrayQuery( 'SHOW ENGINES' );
+ foreach( $engines as $engine ) {
+ if ( $engine['Engine'] == 'InnoDB' && in_array( $engine['Support'], array( 'YES', 'DEFAULT' ) ) )
+ {
+ $params['table_type'] = 'innodb';
+ break;
+ }
+ }
}
if ( !$dbSchema->insertSchema( $params ) )
|
Replace deprecated check for innodb support
Since MySQL <I>, the server variable `have_innodb` has been removed. The command `SHOW ENGINES` instead is supported since MySQL <I>.
See <URL>
|
diff --git a/CHANGES.rst b/CHANGES.rst
index <HASH>..<HASH> 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -25,6 +25,8 @@ Removed
Fixed
-----
+- :kbd:`^c` not able to terminate initialization process due to the handler
+ registered.
Known issue
-----------
diff --git a/ehforwarderbot/__main__.py b/ehforwarderbot/__main__.py
index <HASH>..<HASH> 100644
--- a/ehforwarderbot/__main__.py
+++ b/ehforwarderbot/__main__.py
@@ -332,11 +332,14 @@ def main():
setup_logging(args, conf)
setup_telemetry(conf['telemetry'])
+ init(conf)
+
+ # Only register graceful stop signals when we are ready to start
+ # polling threads.
atexit.register(stop_gracefully)
signal.signal(signal.SIGTERM, stop_gracefully)
signal.signal(signal.SIGINT, stop_gracefully)
- init(conf)
poll()
diff --git a/ehforwarderbot/__version__.py b/ehforwarderbot/__version__.py
index <HASH>..<HASH> 100644
--- a/ehforwarderbot/__version__.py
+++ b/ehforwarderbot/__version__.py
@@ -1,3 +1,3 @@
# coding=utf-8
-__version__ = "2.1.0"
+__version__ = "2.1.1.dev1"
|
fix: ^c not able to stop the init process (#<I>)
|
diff --git a/src/grid/GroupedByServerChargesGridView.php b/src/grid/GroupedByServerChargesGridView.php
index <HASH>..<HASH> 100644
--- a/src/grid/GroupedByServerChargesGridView.php
+++ b/src/grid/GroupedByServerChargesGridView.php
@@ -77,7 +77,7 @@ class GroupedByServerChargesGridView extends BillGridView
],
'columns' => array_filter([
Yii::$app->user->can('bill.update') ? 'checkbox' : null,
- 'type_label', 'label',
+ 'type_label', 'name',
'quantity', 'sum', 'sum_with_children', 'time',
]),
]);
|
fixed parts Description displaying in bill view (#<I>)
|
diff --git a/src/util.js b/src/util.js
index <HASH>..<HASH> 100644
--- a/src/util.js
+++ b/src/util.js
@@ -30,7 +30,9 @@ var deparam = function(qs) {
for(var i=0; i<parts.length; i++) {
var pair = parts[i].split("=");
- var key = decodeURIComponent(pair[0]), value = decodeURIComponent(pair[1]);
+ // split the key to handle multi arguments
+ var key = decodeURIComponent(pair[0]).split("[]")[0],
+ value = decodeURIComponent(pair[1]);
var curValue = deparamed[key];
var curType = typeof(curValue);
|
added depram support for multi arguments
|
diff --git a/src/Console/Commands/ExportMessages.php b/src/Console/Commands/ExportMessages.php
index <HASH>..<HASH> 100644
--- a/src/Console/Commands/ExportMessages.php
+++ b/src/Console/Commands/ExportMessages.php
@@ -48,9 +48,17 @@ class ExportMessages extends Command
$adapter = new Local( $filepath );
$filesystem = new Filesystem( $adapter );
- $contents = 'let messages = ' . json_encode( $messages );
+ $contents = 'export default ' . json_encode( $messages );
- $filesystem->write( $filename, $contents );
+ if ( $filesystem->has( $filename ) ) {
+
+ $filesystem->delete( $filename );
+ $filesystem->write( $filename, $contents );
+
+ } else {
+
+ $filesystem->write( $filename, $contents );
+ }
$this->info( 'Messages exported to JavaScript file, you can find them at ' . $filepath . DIRECTORY_SEPARATOR
. $filename );
|
Check if messages file already exists and replace it with the new file
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
from distutils.core import setup
setup(name='registration',
- version='0.3p2',
+ version='0.3p3',
description='User-registration application for Django',
author='James Bennett',
author_email='james@b-list.org',
|
And push a version bump to setup.py just becaue
|
diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php
index <HASH>..<HASH> 100644
--- a/blocks/moodleblock.class.php
+++ b/blocks/moodleblock.class.php
@@ -646,7 +646,7 @@ class block_base {
* @return boolean
* @todo finish documenting this function
*/
- function user_can_addto(&$page) {
+ function user_can_addto($page) {
return true;
}
|
blocks editing ui: MDL-<I> Remove stupid pass by reference.
Was causing errors when this method was called via block_method_result
|
diff --git a/astromodels/functions/template_model.py b/astromodels/functions/template_model.py
index <HASH>..<HASH> 100644
--- a/astromodels/functions/template_model.py
+++ b/astromodels/functions/template_model.py
@@ -410,7 +410,7 @@ class TemplateModel(Function1D):
# Figure out the shape of the data matrices
data_shape = map(lambda x: x.shape[0], self._parameters_grids.values())
-
+
self._interpolators = []
for energy in self._energies:
@@ -487,7 +487,7 @@ class TemplateModel(Function1D):
# Gather all interpolations for these parameters' values at all defined energies
# (these are the logarithm of the values)
- log_interpolations = np.array(map(lambda i:self._interpolators[i](parameters_values),
+ log_interpolations = np.array(map(lambda i:self._interpolators[i](np.atleast_1d(parameters_values)),
range(self._energies.shape[0])))
# Now interpolate the interpolations to get the flux at the requested energies
@@ -523,4 +523,4 @@ class TemplateModel(Function1D):
#
# data['extra_setup'] = {'data_file': self._data_file}
- return data
\ No newline at end of file
+ return data
|
1D templates were failing. added np.atleast_1d to fix
|
diff --git a/beetle/base.py b/beetle/base.py
index <HASH>..<HASH> 100644
--- a/beetle/base.py
+++ b/beetle/base.py
@@ -73,10 +73,13 @@ class Writer(object):
def write(self):
for destination, content in self.files():
- destination_folder = os.path.dirname(destination)
+ self.write_file(destination, content)
- if not os.path.exists(destination_folder):
- os.makedirs(destination_folder)
+ def write_file(self, destination, content):
+ destination_folder = os.path.dirname(destination)
- with open(destination, 'wb') as fo:
- fo.write(content)
+ if not os.path.exists(destination_folder):
+ os.makedirs(destination_folder)
+
+ with open(destination, 'wb') as fo:
+ fo.write(content)
|
Splitted actual writing to a new function.
|
diff --git a/tornado/wsgi.py b/tornado/wsgi.py
index <HASH>..<HASH> 100644
--- a/tornado/wsgi.py
+++ b/tornado/wsgi.py
@@ -43,7 +43,7 @@ import urllib
from tornado import escape
from tornado import httputil
from tornado import web
-from tornado.escape import native_str, utf8
+from tornado.escape import native_str, utf8, parse_qs_bytes
from tornado.util import b
try:
@@ -146,7 +146,7 @@ class HTTPRequest(object):
self.files = {}
content_type = self.headers.get("Content-Type", "")
if content_type.startswith("application/x-www-form-urlencoded"):
- for name, values in cgi.parse_qs(self.body).iteritems():
+ for name, values in parse_qs_bytes(native_str(self.body)).iteritems():
self.arguments.setdefault(name, []).extend(values)
elif content_type.startswith("multipart/form-data"):
if 'boundary=' in content_type:
|
Fix keys in wsgi request arguments being bytes in python3 when content-type is application/x-www-form-urlencoded.
|
diff --git a/lib/epub/publication/package/guide.rb b/lib/epub/publication/package/guide.rb
index <HASH>..<HASH> 100644
--- a/lib/epub/publication/package/guide.rb
+++ b/lib/epub/publication/package/guide.rb
@@ -30,10 +30,6 @@ module EPUB
attr_accessor :guide,
:type, :title, :href,
:iri
-
- def to_s
- iri.to_s
- end
end
end
end
diff --git a/lib/epub/publication/package/manifest.rb b/lib/epub/publication/package/manifest.rb
index <HASH>..<HASH> 100644
--- a/lib/epub/publication/package/manifest.rb
+++ b/lib/epub/publication/package/manifest.rb
@@ -36,10 +36,6 @@ module EPUB
attr_accessor :manifest,
:id, :href, :media_type, :fallback, :properties, :media_overlay,
:iri
-
- def to_s
- iri.to_s
- end
end
end
end
|
Remove #to_s from Publication::Package::Manifest and Guide to help debugging
|
diff --git a/src/Persistence/Db/Criteria/LoadCriteriaMapper.php b/src/Persistence/Db/Criteria/LoadCriteriaMapper.php
index <HASH>..<HASH> 100644
--- a/src/Persistence/Db/Criteria/LoadCriteriaMapper.php
+++ b/src/Persistence/Db/Criteria/LoadCriteriaMapper.php
@@ -66,7 +66,17 @@ class LoadCriteriaMapper
$relationsToLoad[$alias] = $memberRelation;
foreach ($memberRelation->getParentColumnsToLoad() as $column) {
- $select->addColumn($column, Expr::tableColumn($select->getTable(), $column));
+ if ($select->getTable()->hasColumn($column)) {
+ $select->addColumn($column, Expr::tableColumn($select->getTable(), $column));
+ continue;
+ } else {
+ foreach ($select->getJoins() as $join) {
+ if ($join->getTable()->hasColumn($column)) {
+ $select->addColumn($column, Expr::column($join->getTableName(), $join->getTable()->getColumn($column)));
+ continue;
+ }
+ }
+ }
}
if (!($mapping instanceof ToOneEmbeddedObjectMapping)) {
|
Fix issue with joined members and and parent columns
|
diff --git a/h2o-algos/src/test/java/hex/deeplearning/DeepLearningReproducibilityTest.java b/h2o-algos/src/test/java/hex/deeplearning/DeepLearningReproducibilityTest.java
index <HASH>..<HASH> 100644
--- a/h2o-algos/src/test/java/hex/deeplearning/DeepLearningReproducibilityTest.java
+++ b/h2o-algos/src/test/java/hex/deeplearning/DeepLearningReproducibilityTest.java
@@ -59,9 +59,8 @@ public class DeepLearningReproducibilityTest extends TestUtil {
p._input_dropout_ratio = 0.2;
p._train_samples_per_iteration = 3;
p._hidden_dropout_ratios = new double[]{0.4, 0.1};
- p._epochs = 3.32;
+ p._epochs = 0.32;
p._quiet_mode = true;
- p._single_node_mode = true;
p._force_load_balance = false;
p._reproducible = repro;
DeepLearning dl = new DeepLearning(p);
|
Speed up DL Repro test.
|
diff --git a/plex/__init__.py b/plex/__init__.py
index <HASH>..<HASH> 100644
--- a/plex/__init__.py
+++ b/plex/__init__.py
@@ -2,7 +2,7 @@ import logging
log = logging.getLogger(__name__)
-__version__ = '0.6.2'
+__version__ = '0.6.3'
try:
|
Bumped version to <I>
|
diff --git a/src/Service/PullRequest.php b/src/Service/PullRequest.php
index <HASH>..<HASH> 100644
--- a/src/Service/PullRequest.php
+++ b/src/Service/PullRequest.php
@@ -48,50 +48,6 @@ class PullRequest
}
/**
- * @param string $user
- * @return self
- */
- public function userName($user)
- {
- $this->userName = $user;
-
- return $this;
- }
-
- /**
- * @param string $repository
- * @return self
- */
- public function repository($repository)
- {
- $this->repository = $repository;
-
- return $this;
- }
-
- /**
- * @param string $startSha
- * @return self
- */
- public function startSha($startSha)
- {
- $this->startSha = $startSha;
-
- return $this;
- }
-
- /**
- * @param string $endSha
- * @return self
- */
- public function endSha($endSha)
- {
- $this->endSha = $endSha;
-
- return $this;
- }
-
- /**
* @param string $userName
* @param string $repository
* @param string $startSha
|
Fix: Remove code not covered by tests
|
diff --git a/examples/webgl-points-layer.js b/examples/webgl-points-layer.js
index <HASH>..<HASH> 100644
--- a/examples/webgl-points-layer.js
+++ b/examples/webgl-points-layer.js
@@ -81,13 +81,12 @@ function setStyleStatus(valid) {
const editor = document.getElementById('style-editor');
editor.addEventListener('input', function() {
const textStyle = editor.value;
- if (JSON.stringify(JSON.parse(textStyle)) === JSON.stringify(literalStyle)) {
- return;
- }
-
try {
- literalStyle = JSON.parse(textStyle);
- refreshLayer();
+ const newLiteralStyle = JSON.parse(textStyle);
+ if (JSON.stringify(newLiteralStyle) !== JSON.stringify(literalStyle)) {
+ literalStyle = newLiteralStyle;
+ refreshLayer();
+ }
setStyleStatus(true);
} catch (e) {
setStyleStatus(false);
|
Guard against JSON.parse errors.
Also show successful style parse status after a style error was corrected
but it is the same style as previously.
|
diff --git a/server/monitor_test.go b/server/monitor_test.go
index <HASH>..<HASH> 100644
--- a/server/monitor_test.go
+++ b/server/monitor_test.go
@@ -389,11 +389,9 @@ func TestConnzLastActivity(t *testing.T) {
t.Fatalf("Expected LastActivity to be valid\n")
}
- // On Windows, looks like the precision is too low, and if we
- // don't wait, first and last would be equal.
- if runtime.GOOS == "windows" {
- time.Sleep(100 * time.Millisecond)
- }
+ // Just wait a bit to make sure that there is a difference
+ // between first and last.
+ time.Sleep(100 * time.Millisecond)
// Sub should trigger update.
nc.Subscribe("hello.world", func(m *nats.Msg) {})
|
Fix flapping test
Introduce sleep when checking activity updates. I had fixed it
originally for Windows and then made it for all platform recently
but only for the publish case. I missed the subscribe test.
|
diff --git a/django_extensions/management/commands/sync_media_s3.py b/django_extensions/management/commands/sync_media_s3.py
index <HASH>..<HASH> 100644
--- a/django_extensions/management/commands/sync_media_s3.py
+++ b/django_extensions/management/commands/sync_media_s3.py
@@ -111,7 +111,7 @@ class Command(BaseCommand):
raise CommandError('MEDIA_ROOT must be set in your settings.')
self.DIRECTORY = settings.MEDIA_ROOT
- self.verbosity = int(options.get('verbose', 1))
+ self.verbosity = int(options.get('verbosity'))
self.prefix = options.get('prefix')
self.do_gzip = options.get('gzip')
self.do_expires = options.get('expires')
@@ -230,7 +230,7 @@ class Command(BaseCommand):
# Backwards compatibility for Django r9110
if not [opt for opt in Command.option_list if opt.dest=='verbosity']:
Command.option_list += (
- optparse.make_option('-v', '--verbose',
- dest='verbose', default=1, action='count',
+ optparse.make_option('-v', '--verbosity',
+ dest='verbosity', default=1, action='count',
help="Verbose mode. Multiple -v options increase the verbosity."),
)
|
Updating the verbosity option to actually work.
|
diff --git a/napalm/base/helpers.py b/napalm/base/helpers.py
index <HASH>..<HASH> 100644
--- a/napalm/base/helpers.py
+++ b/napalm/base/helpers.py
@@ -248,7 +248,7 @@ def textfsm_extractor(cls, template_name, raw_text):
def find_txt(xml_tree, path, default="", namespaces=None):
"""
Extracts the text value from an XML tree, using XPath.
- In case of error, will return a default value.
+ In case of error or text element unavailability, will return a default value.
:param xml_tree: the XML Tree object. Assumed is <type 'lxml.etree._Element'>.
:param path: XPath to be applied, in order to extract the desired data.
@@ -265,7 +265,10 @@ def find_txt(xml_tree, path, default="", namespaces=None):
if xpath_length and xpath_applied[0] is not None:
xpath_result = xpath_applied[0]
if isinstance(xpath_result, type(xml_tree)):
- value = xpath_result.text.strip()
+ if xpath_result.text:
+ value = xpath_result.text.strip()
+ else:
+ value = default
else:
value = xpath_result
else:
|
added lxml text retrieval not to fail if no text avail (#<I>)
|
diff --git a/test/perfplot_test.py b/test/perfplot_test.py
index <HASH>..<HASH> 100644
--- a/test/perfplot_test.py
+++ b/test/perfplot_test.py
@@ -58,7 +58,7 @@ def test_no_labels():
def test_automatic_scale():
- from perfplot.main import PerfplotData, si_time
+ from perfplot.main import PerfplotData
# (expected_prefix, time in nanoseconds, expected_timing) format
test_cases = [
@@ -81,7 +81,7 @@ def test_automatic_scale():
logy=False,
automatic_order=True,
# True except for last test-case
- automatic_scale=(True if i != len(test_cases)-1 else False)
+ automatic_scale=(True if i != len(test_cases) - 1 else False)
)
# Has the correct prefix been applied?
assert data.timings_unit == exp_prefix
|
Fix flake8 formatting errors in tests
- Unused import flake8(F<I>)
- Missing whitespace around operator flake8(E<I>)
|
diff --git a/node-tests/lint-test.js b/node-tests/lint-test.js
index <HASH>..<HASH> 100644
--- a/node-tests/lint-test.js
+++ b/node-tests/lint-test.js
@@ -8,4 +8,7 @@ var paths = [
'index.js',
];
-lint(paths);
+lint(paths, {
+ timeout: 10000,
+ slow: 2000,
+});
|
tests/lint: Increase timeouts
|
diff --git a/bitshares/amount.py b/bitshares/amount.py
index <HASH>..<HASH> 100644
--- a/bitshares/amount.py
+++ b/bitshares/amount.py
@@ -79,11 +79,16 @@ class Amount(dict):
self["asset"] = Asset(args[1], bitshares_instance=self.bitshares)
self["symbol"] = self["asset"]["symbol"]
- elif amount and asset:
+ elif amount and asset and isinstance(asset, Asset):
self["amount"] = amount
self["asset"] = asset
self["symbol"] = self["asset"]["symbol"]
+ elif amount and asset and isinstance(asset, str):
+ self["amount"] = amount
+ self["asset"] = Asset(asset)
+ self["symbol"] = asset
+
else:
raise ValueError
|
[amount] make sure that quote/base can be dealt with as strings
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -58,6 +58,10 @@ function createlib (Map, q) {
}
};
+ DeferMap.prototype.exists = function (name) {
+ return !!this._map.get(name);
+ };
+
return DeferMap;
}
|
just take look if name exists in DeferMap
|
diff --git a/src/test/java/org/sonar/plugins/buildbreaker/BuildBreakerPluginTest.java b/src/test/java/org/sonar/plugins/buildbreaker/BuildBreakerPluginTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/sonar/plugins/buildbreaker/BuildBreakerPluginTest.java
+++ b/src/test/java/org/sonar/plugins/buildbreaker/BuildBreakerPluginTest.java
@@ -19,9 +19,11 @@
*/
package org.sonar.plugins.buildbreaker;
-import org.junit.Test;
-import static org.junit.Assert.assertThat;
import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.core.IsNot.not;
+import static org.junit.Assert.assertThat;
+import org.junit.Test;
public class BuildBreakerPluginTest {
@@ -29,4 +31,11 @@ public class BuildBreakerPluginTest {
public void oneExtensionIsRegistered() {
assertThat(new BuildBreakerPlugin().getExtensions().size(), is(1));
}
+
+ @Test
+ public void justToIncreaseCoverage() {
+ assertThat(new BuildBreakerPlugin().getName(), not(nullValue()));
+ assertThat(new BuildBreakerPlugin().getKey(), is("build-breaker"));
+ assertThat(new BuildBreakerPlugin().getDescription(), not(nullValue()));
+ }
}
|
build-breaker plugin : add a test just to increase coverage ;o)
|
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/relation/predicate_builder.rb
+++ b/activerecord/lib/active_record/relation/predicate_builder.rb
@@ -26,7 +26,7 @@ module ActiveRecord
when Range, Arel::Relation
attribute.in(value)
when ActiveRecord::Base
- attribute.eq(Arel.sql(value.quoted_id))
+ attribute.eq(value.id)
when Class
# FIXME: I think we need to deprecate this behavior
attribute.eq(value.name)
|
arel can escape the id, so avoid using the database connection
|
diff --git a/lib/expression/node/OperatorNode.js b/lib/expression/node/OperatorNode.js
index <HASH>..<HASH> 100644
--- a/lib/expression/node/OperatorNode.js
+++ b/lib/expression/node/OperatorNode.js
@@ -280,13 +280,6 @@ OperatorNode.prototype._toTex = function(callbacks) {
case 'OperatorNode:divide':
//op contains '\\frac' at this point
return op + lhsTex + rhsTex;
-
- case 'OperatorNode:to':
- rhsTex = '{' + latex.toUnit(rhs.toTex(callbacks)) + '}';
- if (parens[1]) {
- rhsTex = '\\left(' + rhsTex + '\\right)';
- }
- break;
}
return lhsTex + ' ' + op + ' ' + rhsTex;
diff --git a/lib/util/latex.js b/lib/util/latex.js
index <HASH>..<HASH> 100644
--- a/lib/util/latex.js
+++ b/lib/util/latex.js
@@ -498,11 +498,3 @@ exports.toFunction = function (node, callbacks, name) {
//fallback
return defaultToTex(node, callbacks, name);
}
-
-exports.toUnit = (function() {
- var _toUnit = latexToFn(units);
-
- return function(value, notSpaced) {
- return _toUnit(value);
- };
-}());
|
util/latex: Get rid of toUnit ( hasn't been working anyway )
|
diff --git a/sirmordred/task_projects.py b/sirmordred/task_projects.py
index <HASH>..<HASH> 100644
--- a/sirmordred/task_projects.py
+++ b/sirmordred/task_projects.py
@@ -31,7 +31,6 @@ import requests
from copy import deepcopy
-from sirmordred.config import Config
from sirmordred.task import Task
from sirmordred.eclipse_projects_lib import compose_title, compose_projects_json
@@ -69,7 +68,7 @@ class TaskProjects(Task):
return cls.projects_last_diff
@classmethod
- def get_repos_by_backend_section(cls, backend_section):
+ def get_repos_by_backend_section(cls, global_data_sources, backend_section):
""" return list with the repositories for a backend_section """
repos = []
projects = TaskProjects.get_projects()
@@ -77,7 +76,7 @@ class TaskProjects(Task):
for pro in projects:
if backend_section in projects[pro]:
backend = Task.get_backend(backend_section)
- if backend in Config.get_global_data_sources() and cls.GLOBAL_PROJECT in projects \
+ if backend in global_data_sources and cls.GLOBAL_PROJECT in projects \
and pro != cls.GLOBAL_PROJECT:
logger.debug("Skip global data source %s for project %s",
backend, pro)
|
[task_projects] Allow to accept list of global source
This code changes the method `get_repos_by_backend_section` to accept a list
of global data sources defined in the cfg, instead of relying on hard-coded ones.
|
diff --git a/salt/minion.py b/salt/minion.py
index <HASH>..<HASH> 100644
--- a/salt/minion.py
+++ b/salt/minion.py
@@ -165,6 +165,13 @@ class Minion(object):
'''
return bool(tgt.count(self.opts['hostname']))
+ def _facter_match(self, tgt):
+ '''
+ Reads in the facter regular expresion match
+ '''
+ comps = tgt.split()
+ return bool(re.match(comps[1], self.opts['facter'][comps[0]])
+
def _return_pub(self, ret):
'''
Return the data from the executed command to the master server
|
Add facter matching to salt minion lookups
|
diff --git a/src/test/java/org/takes/facets/auth/social/PsGithubTest.java b/src/test/java/org/takes/facets/auth/social/PsGithubTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/takes/facets/auth/social/PsGithubTest.java
+++ b/src/test/java/org/takes/facets/auth/social/PsGithubTest.java
@@ -159,12 +159,12 @@ public final class PsGithubTest {
Matchers.equalTo("urn:github:1")
);
MatcherAssert.assertThat(
- identity.properties().get(LOGIN),
- Matchers.equalTo(OCTOCAT)
+ identity.properties().get(PsGithubTest.LOGIN),
+ Matchers.equalTo(PsGithubTest.OCTOCAT)
);
MatcherAssert.assertThat(
identity.properties().get("avatar"),
- Matchers.equalTo(OCTOCAT_GIF_URL)
+ Matchers.equalTo(PsGithubTest.OCTOCAT_GIF_URL)
);
}
}
@@ -210,11 +210,11 @@ public final class PsGithubTest {
);
return new RsJSON(
Json.createObjectBuilder()
- .add(LOGIN, OCTOCAT)
+ .add(PsGithubTest.LOGIN, PsGithubTest.OCTOCAT)
.add("id", 1)
.add(
"avatar_url",
- OCTOCAT_GIF_URL
+ PsGithubTest.OCTOCAT_GIF_URL
)
.build()
);
|
Static fields should be accessed in a static way
|
diff --git a/spec/narray_spec.rb b/spec/narray_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/narray_spec.rb
+++ b/spec/narray_spec.rb
@@ -56,6 +56,10 @@ types.each do |dtype|
it{expect(@a).to eq [1,2,3,5,7,11]}
it{expect(@a.to_a).to eq [1,2,3,5,7,11]}
it{expect(@a.to_a).to be_kind_of Array}
+ it{expect(@a.dup).to eq @a}
+ it{expect(@a.clone).to eq @a}
+ it{expect(@a.dup.object_id).not_to eq @a.object_id}
+ it{expect(@a.clone.object_id).not_to eq @a.object_id}
it{expect(@a.eq([1,1,3,3,7,7])).to eq [1,0,1,0,1,0]}
it{expect(@a[3..4]).to eq [5,7]}
|
test for clone, dup
|
diff --git a/salt/utils/minion.py b/salt/utils/minion.py
index <HASH>..<HASH> 100644
--- a/salt/utils/minion.py
+++ b/salt/utils/minion.py
@@ -2,10 +2,11 @@
'''
Utility functions for minions
'''
+# Import python libs
from __future__ import absolute_import
import os
import threading
-
+# Import salt libs
import salt.utils
import salt.payload
@@ -81,4 +82,30 @@ def _read_proc_file(path, opts):
pass
return None
+ if not _check_cmdline(data):
+ try:
+ os.remove(path)
+ except IOError:
+ pass
+ return None
return data
+
+
+def _check_cmdline(data):
+ '''
+ Check the proc filesystem cmdline to see if this process is a salt process
+ '''
+ if salt.utils.is_windows():
+ return True
+ pid = data.get('pid')
+ if not pid:
+ return False
+ path = os.path.join('/proc/{0}/cmdline'.format(pid))
+ if not os.path.isfile(path):
+ return False
+ try:
+ with salt.utils.fopen(path, 'rb') as fp_:
+ if 'salt' in fp_.read():
+ return True
+ except (OSError, IOError):
+ return False
|
Add a check that the cmdline of the found proc matches (#<I>)
|
diff --git a/test/markdown.spec.js b/test/markdown.spec.js
index <HASH>..<HASH> 100644
--- a/test/markdown.spec.js
+++ b/test/markdown.spec.js
@@ -48,6 +48,8 @@ describe( 'markdown', function() {
[ '<span>a</span>', '<span>a</span>' ],
[ '<span>a</span>', '<span>a</span>' ],
[ '<span style="color:red;">red</span>', '<span style="color:red;">red</span>' ],
+ [ '<span>bad\nunaffected <span style="color: purple">el</span>.', '<p><span>bad</p>unaffected <span style="color: purple">el</span>.' ],
+ [ '<span style=\'color:red;\'>red</span>', '<span style=\'color:red;\'>red</span>' ],
[ '><', '><' ],
// sanitized html
[ '<span style="color:red;" onclick="alert(\"gotcha!\")">click me</span>', '<span style="color:red;">click me</span>' ],
|
added: more markdown-to-html tests
|
diff --git a/spec/chai-helpers/backbone-el.js b/spec/chai-helpers/backbone-el.js
index <HASH>..<HASH> 100644
--- a/spec/chai-helpers/backbone-el.js
+++ b/spec/chai-helpers/backbone-el.js
@@ -49,7 +49,7 @@
new Assertion( Backbone ).to.be.an( 'object', "Global variable 'Backbone' not available" );
// Verify that the subject has an el property, and that the el is initialized
- new Assertion( subject.el ).to.be.an( 'object', "The 'el' property of the view appears to be missing" );
+ new Assertion( subject.el ).to.be.an.instanceof( HTMLElement, "The 'el' property of the view appears to be missing" );
// Examine el
if ( elProperties.tagName ) {
|
Fixed Chai test helper for updated environment
|
diff --git a/src/decorate.js b/src/decorate.js
index <HASH>..<HASH> 100644
--- a/src/decorate.js
+++ b/src/decorate.js
@@ -40,7 +40,7 @@ export function makeDecoratorComponent(configs, BaseComponent) {
return reduce(
'defaultProps',
configs,
- getDefaultProps ? getDefaultProps() : {}
+ typeof getDefaultProps === 'function' ? getDefaultProps() : {}
)
},
|
be more careful about getDefaultProps
|
diff --git a/lib/ext/property.js b/lib/ext/property.js
index <HASH>..<HASH> 100644
--- a/lib/ext/property.js
+++ b/lib/ext/property.js
@@ -277,13 +277,13 @@ module.exports = function(should, Assertion) {
}, true);
/**
- * Asserts given object has exact keys.
+ * Asserts given object has exact keys. Compared to `properties`, `keys` does not accept Object as a argument.
*
* @name keys
* @alias Assertion#key
* @memberOf Assertion
* @category assertion property
- * @param {Array|...string|Object} [keys] Keys to check
+ * @param {Array|...string} [keys] Keys to check
* @example
*
* ({ a: 10}).should.have.keys('a');
|
correct jsdoc for Assertion#keys
Assertion#keys does not accept Object as a argument.
The jsdoc comment describes that it can accept Object.
|
diff --git a/spyderlib/widgets/qscieditor.py b/spyderlib/widgets/qscieditor.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/qscieditor.py
+++ b/spyderlib/widgets/qscieditor.py
@@ -805,10 +805,10 @@ class QsciEditor(TextEditBaseWidget):
if margin == 0:
self.__show_code_analysis_results(line)
- def mouseMoveEvent(self, event):
- line = self.get_line_number_at(event.pos())
- self.__show_code_analysis_results(line)
- QsciScintilla.mouseMoveEvent(self, event)
+# def mouseMoveEvent(self, event):
+# line = self.get_line_number_at(event.pos())
+# self.__show_code_analysis_results(line)
+# QsciScintilla.mouseMoveEvent(self, event)
def add_prefix(self, prefix):
"""Add prefix to current line or selected line(s)"""
|
Editor/code analysis results: tooltips are no longer shown automatically on mouse hover
|
diff --git a/sam/auxtags.go b/sam/auxtags.go
index <HASH>..<HASH> 100644
--- a/sam/auxtags.go
+++ b/sam/auxtags.go
@@ -72,7 +72,7 @@ func NewAux(t Tag, typ byte, value interface{}) (Aux, error) {
a = Aux{t[0], t[1], 'I', 0, 0, 0, 0, 0}
binary.LittleEndian.PutUint32(a[4:8], uint32(i))
default:
- return nil, fmt.Errorf("sam: unsigned integer value out of range %d > %d", i, math.MaxUint32)
+ return nil, fmt.Errorf("sam: unsigned integer value out of range %d > %d", i, uint(math.MaxUint32))
}
return a, nil
case int8:
@@ -147,7 +147,7 @@ func NewAux(t Tag, typ byte, value interface{}) (Aux, error) {
return nil, fmt.Errorf("sam: wrong dynamic type %T for 'B' tag", value)
}
l := rv.Len()
- if l > math.MaxUint32 {
+ if uint(l) > math.MaxUint32 {
return nil, fmt.Errorf("sam: array too long for 'B' tag")
}
a := Aux{t[0], t[1], 'B', 0, 0, 0, 0, 0}
|
sam: fix bounds checks for <I>-bit int archs
Previously untyped math.MaxUint<I> overflowed int on <I> bit archs.
Don't use uint<I> in check to avoid truncating overflowed arrays on
<I> bit archs.
|
diff --git a/slumber/__init__.py b/slumber/__init__.py
index <HASH>..<HASH> 100644
--- a/slumber/__init__.py
+++ b/slumber/__init__.py
@@ -27,8 +27,8 @@ class Resource(object):
obj = copy.deepcopy(self)
obj.object_id = id
return obj
-
- def get(self, **kwargs):
+
+ def _request(self, method, **kwargs):
url = urlparse.urljoin(self.domain, self.endpoint)
if hasattr(self, "object_id"):
@@ -36,10 +36,14 @@ class Resource(object):
if kwargs:
url = "?".join([url, urllib.urlencode(kwargs)])
-
- resp, content = self.http_client.get(url)
+
+ resp, content = self.http_client.request(url, method)
return json.loads(content)
+
+ def get(self, **kwargs):
+ return self._request("GET", **kwargs)
+
class APIMeta(object):
|
refactor get into a wrapper around a generic _request method
|
diff --git a/python-package/lightgbm/dask.py b/python-package/lightgbm/dask.py
index <HASH>..<HASH> 100644
--- a/python-package/lightgbm/dask.py
+++ b/python-package/lightgbm/dask.py
@@ -383,7 +383,7 @@ def _train(
#
# This code treates ``_train_part()`` calls as not "pure" because:
# 1. there is randomness in the training process unless parameters ``seed``
- # and ``is_deterministic`` are set
+ # and ``deterministic`` are set
# 2. even with those parameters set, the output of one ``_train_part()`` call
# relies on global state (it and all the other LightGBM training processes
# coordinate with each other)
|
[docs] fix param name typo in comments (#<I>)
|
diff --git a/cluster/manager.go b/cluster/manager.go
index <HASH>..<HASH> 100644
--- a/cluster/manager.go
+++ b/cluster/manager.go
@@ -168,8 +168,9 @@ func (c *ClusterManager) initNode(db *Database) (*api.Node, bool) {
db.NodeEntries[c.config.NodeId] = NodeEntry{Id: c.selfNode.Id,
Ip: c.selfNode.Ip, GenNumber: c.selfNode.GenNumber}
- logrus.Infof("Node %s joining cluster... \n\tCluster ID: %s\n\tIP: %s",
- c.config.NodeId, c.config.ClusterId, c.selfNode.Ip)
+ logrus.Infof("Node %s joining cluster...", c.config.NodeId)
+ logrus.Infof("Cluster ID: %s", c.config.ClusterId)
+ logrus.Infof("Node IP: %s", c.selfNode.Ip)
return &c.selfNode, exists
}
|
Print cluster informatio in multi line format
|
diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb
index <HASH>..<HASH> 100644
--- a/config/initializers/carrierwave.rb
+++ b/config/initializers/carrierwave.rb
@@ -8,6 +8,7 @@ CarrierWave.configure do |config|
region: ENV['S3_REGION']
}
config.fog_directory = ENV['S3_BUCKET_NAME']
+ config.fog_public = false
elsif Rails.env.test?
config.storage = :file
config.enable_processing = false
|
set acl on newly created objects to private
This sets the Access Control List for newly created/uploader
images to be the canned-ACL called `private`. This grants
full control to owners with no access to anyone else.
see [acl overview](<URL>)
Since we are using presigned-urls objects being privates makes no
difference.
|
diff --git a/base.php b/base.php
index <HASH>..<HASH> 100644
--- a/base.php
+++ b/base.php
@@ -937,9 +937,11 @@ final class Base {
**/
function route($pattern,$handler,$ttl=0,$kbps=0) {
$types=array('sync','ajax');
- if (is_array($pattern))
+ if (is_array($pattern)) {
foreach ($pattern as $item)
$this->route($item,$handler,$ttl,$kbps);
+ return;
+ }
preg_match('/([\|\w]+)\h+([^\h]+)'.
'(?:\h+\[('.implode('|',$types).')\])?/',$pattern,$parts);
if (empty($parts[2]))
@@ -974,12 +976,18 @@ final class Base {
/**
* Provide ReST interface by mapping HTTP verb to class method
+ * @return NULL
* @param $url string
* @param $class string
* @param $ttl int
* @param $kbps int
**/
function map($url,$class,$ttl=0,$kbps=0) {
+ if (is_array($url)) {
+ foreach ($url as $item)
+ $this->map($item,$class,$ttl,$kbps);
+ return;
+ }
$fluid=preg_match('/@\w+/',$url);
foreach (explode('|',self::VERBS) as $method)
if ($fluid ||
|
Support array as first argument of map()
|
diff --git a/telethon/client/messages.py b/telethon/client/messages.py
index <HASH>..<HASH> 100644
--- a/telethon/client/messages.py
+++ b/telethon/client/messages.py
@@ -221,18 +221,18 @@ class _IDsIter(RequestIter):
async def _init(self, entity, ids):
# TODO We never actually split IDs in chunks, but maybe we should
if not utils.is_list_like(ids):
- self.ids = [ids]
+ ids = [ids]
elif not ids:
raise StopAsyncIteration
elif self.reverse:
- self.ids = list(reversed(ids))
+ ids = list(reversed(ids))
else:
- self.ids = ids
+ ids = ids
if entity:
entity = await self.client.get_input_entity(entity)
- self.total = len(self.ids)
+ self.total = len(ids)
from_id = None # By default, no need to validate from_id
if isinstance(entity, (types.InputChannel, types.InputPeerChannel)):
diff --git a/telethon/version.py b/telethon/version.py
index <HASH>..<HASH> 100644
--- a/telethon/version.py
+++ b/telethon/version.py
@@ -1,3 +1,3 @@
# Versions should comply with PEP440.
# This line is parsed in setup.py:
-__version__ = '1.6'
+__version__ = '1.6.1'
|
Actually fix ids= not being a list, bump <I>
|
diff --git a/pkg/build/controller/controller.go b/pkg/build/controller/controller.go
index <HASH>..<HASH> 100644
--- a/pkg/build/controller/controller.go
+++ b/pkg/build/controller/controller.go
@@ -371,8 +371,9 @@ func (bc *BuildPodController) HandlePod(pod *kapi.Pod) error {
}
glog.V(4).Infof("Build %s/%s status was updated %s -> %s", build.Namespace, build.Name, build.Status.Phase, nextStatus)
- handleBuildCompletion(build, bc.RunPolicies)
-
+ if buildutil.IsBuildComplete(build) {
+ handleBuildCompletion(build, bc.RunPolicies)
+ }
}
return nil
}
|
only run handleBuildCompletion on completed builds
|
diff --git a/timber/src/test/java/timber/log/TimberTest.java b/timber/src/test/java/timber/log/TimberTest.java
index <HASH>..<HASH> 100644
--- a/timber/src/test/java/timber/log/TimberTest.java
+++ b/timber/src/test/java/timber/log/TimberTest.java
@@ -224,7 +224,6 @@ public class TimberTest {
.hasNoMoreMessages();
}
- @Ignore("Currently failing because wasn't actually asserting before")
@Test public void debugTreeGeneratedTagIsLoggable() {
Timber.plant(new Timber.DebugTree() {
private static final int MAX_TAG_LENGTH = 23;
@@ -243,12 +242,12 @@ public class TimberTest {
});
class ClassNameThatIsReallyReallyReallyLong {
{
- Timber.d("Hello, world!");
+ Timber.i("Hello, world!");
}
}
new ClassNameThatIsReallyReallyReallyLong();
assertLog()
- .hasDebugMessage("TimberTest$1ClassNameTh", "Hello, world!")
+ .hasInfoMessage("TimberTest$1ClassNameTh", "Hello, world!")
.hasNoMoreMessages();
}
|
Fix ignored test by using INFO log instead of DEBUG log
|
diff --git a/src/basis/utils/base64.js b/src/basis/utils/base64.js
index <HASH>..<HASH> 100644
--- a/src/basis/utils/base64.js
+++ b/src/basis/utils/base64.js
@@ -52,7 +52,7 @@
}
function decode(input, useUTF8){
- input = input.replace(/[^a-z0-9\+\/]/ig, '');
+ input = input.replace(/[^a-zA-Z0-9\+\/]/g, '');
var output = [];
var chr1, chr2, chr3;
@@ -91,6 +91,6 @@
//
module.exports = {
- encode: typeof btoa == 'function' ? btoa.bind(global) : encode,
- decode: typeof atob == 'function' ? atob.bind(global) : decode
+ encode: encode,
+ decode: decode
};
|
don't use btoa/atob as replacement for bas<I> encoding/decoding because out if support for non-latin symbols
|
diff --git a/host/cli/collect-debug-info.go b/host/cli/collect-debug-info.go
index <HASH>..<HASH> 100644
--- a/host/cli/collect-debug-info.go
+++ b/host/cli/collect-debug-info.go
@@ -29,6 +29,7 @@ var debugCmds = [][]string{
{os.Args[0], "version"},
{"virsh", "-c", "lxc:///", "list"},
{"virsh", "-c", "lxc:///", "net-list"},
+ {"route", "-n"},
{"iptables", "-L", "-v", "-n", "--line-numbers"},
}
|
host: Collect `route -n` output in collect-debug-info
This is useful when inverstigating network routing issues.
|
diff --git a/spring-boot-samples/spring-boot-sample-web-ui/src/main/java/sample/ui/SampleWebUiApplication.java b/spring-boot-samples/spring-boot-sample-web-ui/src/main/java/sample/ui/SampleWebUiApplication.java
index <HASH>..<HASH> 100644
--- a/spring-boot-samples/spring-boot-sample-web-ui/src/main/java/sample/ui/SampleWebUiApplication.java
+++ b/spring-boot-samples/spring-boot-sample-web-ui/src/main/java/sample/ui/SampleWebUiApplication.java
@@ -30,7 +30,7 @@ public class SampleWebUiApplication {
@Bean
public MessageRepository messageRepository() {
- return new InMemoryMessageRespository();
+ return new InMemoryMessageRepository();
}
@Bean
|
Fix the rest of the typo InMemoryRepository's name
|
diff --git a/src/angularJwt/services/jwt.js b/src/angularJwt/services/jwt.js
index <HASH>..<HASH> 100644
--- a/src/angularJwt/services/jwt.js
+++ b/src/angularJwt/services/jwt.js
@@ -11,7 +11,7 @@
throw 'Illegal base64url string!';
}
}
- return window.atob(output); //polifyll https://github.com/davidchambers/Base64.js
+ return decodeURIComponent(escape(window.atob(output))); //polifyll https://github.com/davidchambers/Base64.js
}
|
Little trick for utf-8 encoding support
Hello !
I had an encoding error with the claims data (I put a name like "Ézéchiel" for example, and the "é" was bad format). This patch fix encoding problem using basic solution from :
<URL>
|
diff --git a/rejected/mcp.py b/rejected/mcp.py
index <HASH>..<HASH> 100644
--- a/rejected/mcp.py
+++ b/rejected/mcp.py
@@ -230,7 +230,7 @@ class MasterControlProgram(object):
# Iterate through all of the consumers
for consumer_ in self._all_consumers:
self._logger.debug('Polling %s', consumer_.name)
- if consumer_.state == consumer.Consumer.STOPPED:
+ if consumer_.state == consumer.RejectedConsumer.STOPPED:
self._logger.warn('Found stopped consumer %s', consumer_.name)
non_active_consumers.append(consumer_.name)
else:
@@ -342,10 +342,10 @@ class MasterControlProgram(object):
for name in data:
# Create a dict for our calculations
- stats[name] = {consumer.Consumer.TIME_SPENT: 0,
- consumer.Consumer.PROCESSED: 0,
- consumer.Consumer.ERROR: 0,
- consumer.Consumer.REDELIVERED: 0}
+ stats[name] = {consumer.RejectedConsumer.TIME_SPENT: 0,
+ consumer.RejectedConsumer.PROCESSED: 0,
+ consumer.RejectedConsumer.ERROR: 0,
+ consumer.RejectedConsumer.REDELIVERED: 0}
# Iterate through all of the data points
for consumer_ in data[name]:
|
Consumer -> RejectedConsumer
|
diff --git a/bika/lims/browser/__init__.py b/bika/lims/browser/__init__.py
index <HASH>..<HASH> 100644
--- a/bika/lims/browser/__init__.py
+++ b/bika/lims/browser/__init__.py
@@ -20,8 +20,9 @@ class BrowserView(BrowserView):
security.declarePublic('ulocalized_time')
def ulocalized_time(self, time, long_format=None, time_only=None):
- return ulocalized_time(time, long_format, time_only, self.context,
- 'bika', self.request)
+ if time:
+ return ulocalized_time(time, long_format, time_only, self.context,
+ 'bika', self.request)
@lazy_property
def portal(self):
|
Fix #<I>: prevent ulocalized_time from defaulting to today's date
|
diff --git a/src/Entity/Base.php b/src/Entity/Base.php
index <HASH>..<HASH> 100644
--- a/src/Entity/Base.php
+++ b/src/Entity/Base.php
@@ -6,10 +6,13 @@ use GameScan\WoW\WowApiRequest;
class Base
{
- protected $apiRequest;
+ protected $apiRequest = null;
- public function __construct(WowApiRequest $apiRequest = null)
+ protected function getApiRequest()
{
- $this->apiRequest = $apiRequest !== null ? $apiRequest : new WowApiRequest(new ApiConfiguration());
+ if($this->apiRequest === null){
+ $this->apiRequest = new WowApiRequest(new ApiConfiguration());
+ }
+ return $this->apiRequest;
}
}
|
api request is not anymore set in constructor. So we could instantiate class with functional information
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -25,7 +25,16 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode']
+extensions = [
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.intersphinx',
+ 'sphinx.ext.todo',
+ 'sphinx.ext.coverage',
+ 'sphinx.ext.pngmath',
+ 'sphinx.ext.ifconfig',
+ 'sphinx.ext.viewcode',
+ 'sphinx.ext.graphviz'
+]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
|
added graphviz sphinx extension
|
diff --git a/mod/assign/lib.php b/mod/assign/lib.php
index <HASH>..<HASH> 100644
--- a/mod/assign/lib.php
+++ b/mod/assign/lib.php
@@ -1130,11 +1130,11 @@ function assign_user_outline($course, $user, $coursemodule, $assignment) {
$gradingitem = $gradinginfo->items[0];
$gradebookgrade = $gradingitem->grades[$user->id];
- if (!$gradebookgrade) {
+ if (empty($gradebookgrade->str_long_grade)) {
return null;
}
$result = new stdClass();
- $result->info = get_string('outlinegrade', 'assign', $gradebookgrade->grade);
+ $result->info = get_string('outlinegrade', 'assign', $gradebookgrade->str_long_grade);
$result->time = $gradebookgrade->dategraded;
return $result;
|
MDL-<I> Assign: User outline report grade display
Use str_long_grade for user outline report because it handles scales and
no grade.
Thanks to Jean-Daniel Descoteaux for suggesting this fix.
|
diff --git a/core/roboconf-core/src/main/java/net/roboconf/core/commands/BulkCommandInstructions.java b/core/roboconf-core/src/main/java/net/roboconf/core/commands/BulkCommandInstructions.java
index <HASH>..<HASH> 100644
--- a/core/roboconf-core/src/main/java/net/roboconf/core/commands/BulkCommandInstructions.java
+++ b/core/roboconf-core/src/main/java/net/roboconf/core/commands/BulkCommandInstructions.java
@@ -227,7 +227,7 @@ public class BulkCommandInstructions extends AbstractCommandInstruction {
}
// "Delete all" => "delete"
- if(( elt.toString() + " all" ).equals( s )) {
+ if(( elt.toString() + " all" ).equalsIgnoreCase( s )) {
result = elt;
break;
}
|
[ci skip] Replace equals by equalsIgnoreCase
|
diff --git a/src/Utility/DatabaseUtility.php b/src/Utility/DatabaseUtility.php
index <HASH>..<HASH> 100644
--- a/src/Utility/DatabaseUtility.php
+++ b/src/Utility/DatabaseUtility.php
@@ -15,7 +15,7 @@ class DatabaseUtility
*/
public function getTables($dbConf)
{
- $link = mysqli_connect($dbConf['host'], $dbConf['user'], $dbConf['password'], $dbConf['dbname']);
+ $link = mysqli_connect($dbConf['host'], $dbConf['user'], $dbConf['password'], $dbConf['dbname'], $dbConf['port']);
$result = $link->query('SHOW TABLES');
$allTables = [];
while ($row = $result->fetch_row()) {
|
[TASK] Use port-parameter in mysqli_connect
DB-port is configurable through arguments and should be used for the connection as well
|
diff --git a/modules/decorators.js b/modules/decorators.js
index <HASH>..<HASH> 100755
--- a/modules/decorators.js
+++ b/modules/decorators.js
@@ -13,7 +13,7 @@ const routeMethods = {
get: 'get',
post: 'post',
put: 'put',
- delete: 'delete',
+ del: 'delete',
patch: 'patch',
all: '*'
};
|
change delete decorator -> del
|
diff --git a/tests/test_utils.py b/tests/test_utils.py
index <HASH>..<HASH> 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -91,11 +91,10 @@ async def main():
await server.wait_closed()
if __name__ == '__main__':
- asyncio.run(main())
+ asyncio.get_event_loop().run_until_complete(main())
"""
-@pytest.mark.skipif(sys.version_info < (3, 7, 0), reason='Python < 3.7.0')
@pytest.mark.parametrize('sig_num', [signal.SIGINT, signal.SIGTERM])
def test_graceful_exit_normal_server(sig_num):
cmd = [sys.executable, '-u', '-c', NORMAL_SERVER]
@@ -125,11 +124,10 @@ async def main():
await asyncio.sleep(10)
if __name__ == '__main__':
- asyncio.run(main())
+ asyncio.get_event_loop().run_until_complete(main())
"""
-@pytest.mark.skipif(sys.version_info < (3, 7, 0), reason='Python < 3.7.0')
@pytest.mark.parametrize('sig1, sig2', [
(signal.SIGINT, signal.SIGINT),
(signal.SIGTERM, signal.SIGTERM),
|
Fixed graceful_exit tests to run in all Python versions
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -101,7 +101,8 @@ module.exports = function(grunt) {
filename: 'esp-js.min.js'
},
plugins: [
- new webpack.optimize.UglifyJsPlugin({minimize: true})
+ new webpack.optimize.UglifyJsPlugin({minimize: true}),
+ new webpack.optimize.OccurenceOrderPlugin(true)
]
}
},
|
Consistent ordering of modules, should make PR merges much less noisy
|
diff --git a/arty-charty/arty-charty.js b/arty-charty/arty-charty.js
index <HASH>..<HASH> 100644
--- a/arty-charty/arty-charty.js
+++ b/arty-charty/arty-charty.js
@@ -318,7 +318,7 @@ makeMarkers(markerCords, chartIdx) {
makeMarker(cx, cy, chartIdx, pointIdx) {
return (
- <AmimatedCirclesMarker key={pointIdx} cx={cx} cy={cy} baseColor={this.props.data[chartIdx].lineColor}
+ <AmimatedCirclesMarker key={pointIdx} cx={cx} cy={cy} baseColor={this.props.data[chartIdx].lineColor || 'rgba(0,0,0,.5)'}
active={this.state.activeMarker.chartIdx === chartIdx && this.state.activeMarker.pointIdx === pointIdx} />
);
}
|
Added default marker colour if lineColor is not set
|
diff --git a/lib/exception_handling_mailer.rb b/lib/exception_handling_mailer.rb
index <HASH>..<HASH> 100644
--- a/lib/exception_handling_mailer.rb
+++ b/lib/exception_handling_mailer.rb
@@ -1,7 +1,7 @@
class ExceptionHandling::Mailer < ActionMailer::Base
default :content_type => "text/html"
- self.append_view_path "views"
+ self.append_view_path "#{File.dirname(__FILE__)}/../views"
[:email_environment, :server_name, :sender_address, :exception_recipients, :escalation_recipients].each do |method|
define_method method do
|
Use relative path in append_view_path
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.