diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/internal/service/ds/shared_directory.go b/internal/service/ds/shared_directory.go index <HASH>..<HASH> 100644 --- a/internal/service/ds/shared_directory.go +++ b/internal/service/ds/shared_directory.go @@ -153,7 +153,6 @@ func resourceSharedDirectoryDelete(ctx context.Context, d *schema.ResourceData, UnshareTarget: expandUnshareTarget(d.Get("target").([]interface{})[0].(map[string]interface{})), } - // TODO: this takes forever and is not correctly waiting for unshare log.Printf("[DEBUG] Unsharing Directory Service Directory: %s", input) output, err := conn.UnshareDirectoryWithContext(ctx, &input)
ds/shared_directory: Remove comment
diff --git a/spec/lib/guard/rspec/command_spec.rb b/spec/lib/guard/rspec/command_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/guard/rspec/command_spec.rb +++ b/spec/lib/guard/rspec/command_spec.rb @@ -52,7 +52,7 @@ describe Guard::RSpec::Command do end context "with cmd_additional_args" do - let(:options) { { cmd: 'rspec', cmd_additional_args: '-f progress' } } + let(:options) { { cmd: "rspec", cmd_additional_args: "-f progress" } } it "uses them" do expect(command).to match %r{-f progress}
Change quotes to appease Hound.
diff --git a/lib/i18n/locale/fallbacks.rb b/lib/i18n/locale/fallbacks.rb index <HASH>..<HASH> 100644 --- a/lib/i18n/locale/fallbacks.rb +++ b/lib/i18n/locale/fallbacks.rb @@ -66,6 +66,7 @@ module I18n def [](locale) raise InvalidLocale.new(locale) if locale.nil? + raise Disabled.new('fallback#[]') if locale == false locale = locale.to_sym super || store(locale, compute(locale)) end diff --git a/test/locale/fallbacks_test.rb b/test/locale/fallbacks_test.rb index <HASH>..<HASH> 100644 --- a/test/locale/fallbacks_test.rb +++ b/test/locale/fallbacks_test.rb @@ -130,4 +130,12 @@ class I18nFallbacksComputationTest < I18n::TestCase @fallbacks.map(:no => :nb, :nb => :no) assert_equal [:nb, :no, :"en-US", :en], @fallbacks[:nb] end + + # Test I18n::Disabled is raised correctly when locale is false during fallback + + test "with locale equals false" do + assert_raise I18n::Disabled do + @fallbacks[false] + end + end end
Raise disabled during boot inside fallback
diff --git a/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/ThreadLeakControl.java b/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/ThreadLeakControl.java index <HASH>..<HASH> 100644 --- a/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/ThreadLeakControl.java +++ b/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/ThreadLeakControl.java @@ -284,6 +284,11 @@ class ThreadLeakControl { if (t.getName().equals("JFR request timer")) { return true; } + + // Explicit check for MacOSX AWT-AppKit + if (t.getName().equals("AWT-AppKit")) { + return true; + } final List<StackTraceElement> stack = new ArrayList<StackTraceElement>(Arrays.asList(t.getStackTrace())); Collections.reverse(stack);
Added macosx system thread.
diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-atomikos/src/main/java/smoketest/atomikos/SampleAtomikosApplication.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-atomikos/src/main/java/smoketest/atomikos/SampleAtomikosApplication.java index <HASH>..<HASH> 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-atomikos/src/main/java/smoketest/atomikos/SampleAtomikosApplication.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-atomikos/src/main/java/smoketest/atomikos/SampleAtomikosApplication.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
Update copyright year of changed file See gh-<I>
diff --git a/examples/manage-shorty.py b/examples/manage-shorty.py index <HASH>..<HASH> 100755 --- a/examples/manage-shorty.py +++ b/examples/manage-shorty.py @@ -1,9 +1,12 @@ #!/usr/bin/env python +import os +import tempfile from werkzeug import script def make_app(): from shorty.application import Shorty - return Shorty('sqlite:////tmp/shorty.db') + filename = os.path.join(tempfile.gettempdir(), "shorty.db") + return Shorty('sqlite:///{0}'.format(filename)) def make_shell(): from shorty import models, utils
Fixed DB path so that shorty runs on Windows
diff --git a/tests/AesCtrTest.php b/tests/AesCtrTest.php index <HASH>..<HASH> 100644 --- a/tests/AesCtrTest.php +++ b/tests/AesCtrTest.php @@ -1,7 +1,7 @@ <?php use Dcrypt\Aes; use Dcrypt\Mcrypt; -class AesTest extends PHPUnit_Framework_TestCase +class AesCtrTest extends PHPUnit_Framework_TestCase { public function testPbkdf()
Update AesCtrTest.php
diff --git a/s3backup/sync.py b/s3backup/sync.py index <HASH>..<HASH> 100644 --- a/s3backup/sync.py +++ b/s3backup/sync.py @@ -209,7 +209,7 @@ def get_actions(client_1, client_2): client_1_actions = client_1.get_actions(all_keys) client_2_actions = client_2.get_actions(all_keys) - for key in all_keys: + for key in sorted(all_keys): yield key, client_1_actions[key], client_2_actions[key]
Order keys before they are called for easier debugging
diff --git a/src/GitHub_Updater/Base.php b/src/GitHub_Updater/Base.php index <HASH>..<HASH> 100644 --- a/src/GitHub_Updater/Base.php +++ b/src/GitHub_Updater/Base.php @@ -674,15 +674,17 @@ class Base { ? array_slice( $rollback, 0, 1 ) : array_splice( $rollback, 0, $num_rollbacks, true ); - /** - * Filter release asset rollbacks. - * Must return an array. - * - * @since 9.9.2 - */ - $release_asset_rollback = apply_filters( 'github_updater_release_asset_rollback', $rollback, $file ); - if ( ! empty( $release_asset_rollback ) && is_array( $release_asset_rollback ) ) { - $rollback = $release_asset_rollback; + if ( $data['release_asset'] ) { + /** + * Filter release asset rollbacks. + * Must return an array. + * + * @since 9.9.2 + */ + $release_asset_rollback = apply_filters( 'github_updater_release_asset_rollback', $rollback, $file ); + if ( ! empty( $release_asset_rollback ) && is_array( $release_asset_rollback ) ) { + $rollback = $release_asset_rollback; + } } foreach ( $rollback as $tag ) {
only run if a release asset needed
diff --git a/src/geshi/vbnet.php b/src/geshi/vbnet.php index <HASH>..<HASH> 100644 --- a/src/geshi/vbnet.php +++ b/src/geshi/vbnet.php @@ -167,7 +167,7 @@ 0 => 'color: #FF0000;' ), 'METHODS' => array( - 0 => 'color: #0000FF;' + 1 => 'color: #0000FF;' ), 'SYMBOLS' => array( 0 => 'color: #008000;'
Fixed my stupid oops with vbnet.
diff --git a/latools/helpers/plot.py b/latools/helpers/plot.py index <HASH>..<HASH> 100644 --- a/latools/helpers/plot.py +++ b/latools/helpers/plot.py @@ -509,16 +509,15 @@ def autorange_plot(t, sig, gwin=7, swin=None, win=30, ------- fig, axes """ - if swin is None: - swin = gwin // 2 - - sigs = fastsmooth(sig, swin) + if swin is not None: + sigs = fastsmooth(sig, swin) + else: + sigs = sig # perform autorange calculations # bins = 50 - bins = sig.size // nbin - kde_x = np.linspace(sig.min(), sig.max(), bins) + kde_x = np.linspace(sig.min(), sig.max(), nbin) kde = gaussian_kde(sigs) yd = kde.pdf(kde_x)
bring autorange_plot in line with autorange
diff --git a/lib/mwlib/src/MW/Mail/Zend.php b/lib/mwlib/src/MW/Mail/Zend.php index <HASH>..<HASH> 100644 --- a/lib/mwlib/src/MW/Mail/Zend.php +++ b/lib/mwlib/src/MW/Mail/Zend.php @@ -62,6 +62,6 @@ class MW_Mail_Zend implements MW_Mail_Interface public function __clone() { $this->_object = clone $this->_object; - $this->_transport = clone $this->_transport; + $this->_transport = ( isset( $this->_transport ) ? clone $this->_transport : null ); } }
Tests for Zend transport object before trying to clone
diff --git a/src/main/org/openscience/cdk/smiles/SmilesGenerator.java b/src/main/org/openscience/cdk/smiles/SmilesGenerator.java index <HASH>..<HASH> 100644 --- a/src/main/org/openscience/cdk/smiles/SmilesGenerator.java +++ b/src/main/org/openscience/cdk/smiles/SmilesGenerator.java @@ -71,7 +71,8 @@ public final class SmilesGenerator { private final CDKToBeam converter; /** - * Create the SMILES generator. + * Create the generic SMILES generator. + * @see #generic() */ public SmilesGenerator() { this(false, false, false); @@ -109,13 +110,14 @@ public final class SmilesGenerator { } /** - * Create a generator for arbitrary SMILES. Arbitrary SMILES are + * Create a generator for generic SMILES. Generic SMILES are * non-canonical and useful for storing information when it is not used - * as an index (i.e. unique keys). + * as an index (i.e. unique keys). The generated SMILES is dependant on + * the input order of the atoms. * * @return a new arbitrary SMILES generator */ - public static SmilesGenerator arbitary() { + public static SmilesGenerator generic() { return new SmilesGenerator(false, false, false); }
Rename arbitrary to generic - correct description.
diff --git a/src/js/select2/dropdown/closeOnSelect.js b/src/js/select2/dropdown/closeOnSelect.js index <HASH>..<HASH> 100644 --- a/src/js/select2/dropdown/closeOnSelect.js +++ b/src/js/select2/dropdown/closeOnSelect.js @@ -21,7 +21,7 @@ define([ var originalEvent = evt.originalEvent; // Don't close if the control key is being held - if (originalEvent && originalEvent.ctrlKey) { + if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) { return; }
Do not close on select if Ctrl or Meta (Cmd) keys are being held as described in #<I> (#<I>) Fixes #<I>
diff --git a/src/Listener/CoroutineCompleteListener.php b/src/Listener/CoroutineCompleteListener.php index <HASH>..<HASH> 100644 --- a/src/Listener/CoroutineCompleteListener.php +++ b/src/Listener/CoroutineCompleteListener.php @@ -32,7 +32,7 @@ class CoroutineCompleteListener implements EventHandlerInterface public function handle(EventInterface $event): void { if (!Context::getWaitGroup()->isWait()) { - $this->coroutineComplelete(); + $this->coroutineComplete(); return; }
up: remove throw container exception doc from server
diff --git a/knxip/core.py b/knxip/core.py index <HASH>..<HASH> 100644 --- a/knxip/core.py +++ b/knxip/core.py @@ -91,7 +91,8 @@ class KNXException(Exception): E_TUNNELING_LAYER: "tunneling layer error", } - return super().__str__() + msg.get(self.errorcode, "unknown error code") + return super().__str__() + " "+msg.get(self.errorcode, + "unknown error code") class KNXMessage(object):
- Formating of the KNXException text
diff --git a/Kwf/Util/ClearCache.php b/Kwf/Util/ClearCache.php index <HASH>..<HASH> 100644 --- a/Kwf/Util/ClearCache.php +++ b/Kwf/Util/ClearCache.php @@ -59,7 +59,7 @@ class Kwf_Util_ClearCache } $tables = Zend_Registry::get('db')->fetchCol('SHOW TABLES'); foreach ($tables as $table) { - if (substr($table, 0, 6) == 'cache_' && $table != 'cache_component') { + if (substr($table, 0, 6) == 'cache_') { $ret[] = $table; } } @@ -306,6 +306,13 @@ class Kwf_Util_ClearCache if (in_array($t, $types) || (in_array('component', $types) && substr($t, 0, 15) == 'cache_component') ) { + if ($t == 'cache_component') { + $cnt = Zend_Registry::get('db')->query("SELECT COUNT(*) FROM $t")->fetchColumn(); + if ($cnt > 1000) { + if ($output) echo "skipped: $t (won't delete $cnt entries, use clear-view-cache to clear)\n"; + continue; + } + } Zend_Registry::get('db')->query("TRUNCATE TABLE $t"); if ($output) echo "cleared db: $t\n"; }
clear view cache if less than <I> entries exist for easier development
diff --git a/gossipsub.go b/gossipsub.go index <HASH>..<HASH> 100644 --- a/gossipsub.go +++ b/gossipsub.go @@ -248,10 +248,11 @@ func (gs *GossipSubRouter) Leave(topic string) { return } + delete(gs.mesh, topic) + for p := range gmap { gs.sendPrune(p, topic) } - delete(gs.mesh, topic) } func (gs *GossipSubRouter) sendGraft(p peer.ID, topic string) { @@ -417,7 +418,7 @@ func (gs *GossipSubRouter) heartbeat() { } } - // do we need more peers + // do we need more peers? if len(peers) < GossipSubD { ineed := GossipSubD - len(peers) plst := gs.getPeers(topic, func(p peer.ID) bool {
delete mesh before sending prunes on leave
diff --git a/lib/parser.js b/lib/parser.js index <HASH>..<HASH> 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -54,6 +54,7 @@ var headings = { 'prts?': 'partNumber', 'manuf#': 'partNumber', 'ma?n?fr part.*': 'partNumber', + 'manu\\.? p/?n': 'partNumber', mfpn: 'partNumber', 'mfg.?part.*': 'partNumber', 'retail\\.? part no\\.?': 'retailerPart', diff --git a/src/parser.js b/src/parser.js index <HASH>..<HASH> 100644 --- a/src/parser.js +++ b/src/parser.js @@ -51,6 +51,7 @@ const headings = { 'prts?': 'partNumber', 'manuf#': 'partNumber', 'ma?n?fr part.*': 'partNumber', + 'manu\\.? p/?n': 'partNumber', mfpn: 'partNumber', 'mfg.?part.*': 'partNumber', 'retail\\.? part no\\.?': 'retailerPart',
Add an alias for "manuf. p/n"
diff --git a/examples/vdom-bench/main.js b/examples/vdom-bench/main.js index <HASH>..<HASH> 100644 --- a/examples/vdom-bench/main.js +++ b/examples/vdom-bench/main.js @@ -14,11 +14,6 @@ }, tag: 'div', isComponent: false, - hasAttrs: false, - hasHooks: false, - hasEvents: false, - hasClassName: false, - hasStyle: false, isSVG: false, lazy: false, eventKeys: null, @@ -39,11 +34,6 @@ className: null, style: null, isComponent: false, - hasAttrs: false, - hasHooks: false, - hasEvents: false, - hasStyle: false, - hasClassName: false, isSVG: false, eventKeys: null, attrKeys: null,
removed some bp related code from vdom bench
diff --git a/angr/exploration_techniques/crash_monitor.py b/angr/exploration_techniques/crash_monitor.py index <HASH>..<HASH> 100644 --- a/angr/exploration_techniques/crash_monitor.py +++ b/angr/exploration_techniques/crash_monitor.py @@ -112,16 +112,23 @@ class CrashMonitor(ExplorationTechnique): state.add_constraints(var == concrete_vals[0]) # then we step again up to the crashing instruction - p_block = state.block() + inst_addrs = state.block().instruction_addrs + inst_cnt = len(inst_addrs) + + if inst_cnt == 0: + insts = 0 + elif self._crash_addr in inst_addrs: + insts = inst_addrs.index(self._crash_addr) + else: + insts = inst_cnt - 1 - inst_cnt = len(p_block.instruction_addrs) - insts = 0 if inst_cnt == 0 else inst_cnt - 1 succs = state.step(num_inst=insts).flat_successors if len(succs) > 0: if len(succs) > 1: succs = [s for s in succs if s.se.satisfiable()] state = succs[0] + self._last_state = state # remove the preconstraints l.debug("removing preconstraints")
Fix instruction count in crashing block step
diff --git a/src/js/base/module/Buttons.js b/src/js/base/module/Buttons.js index <HASH>..<HASH> 100644 --- a/src/js/base/module/Buttons.js +++ b/src/js/base/module/Buttons.js @@ -561,7 +561,7 @@ export default class Buttons { $catcher.css({ width: this.options.insertTableMaxSize.col + 'em', height: this.options.insertTableMaxSize.row + 'em', - }).mousedown(this.context.createInvokeHandler('editor.insertTable')) + }).mouseup(this.context.createInvokeHandler('editor.insertTable')) .on('mousemove', this.tableMoveHandler.bind(this)); }, }).render(); diff --git a/src/js/lite/ui.js b/src/js/lite/ui.js index <HASH>..<HASH> 100644 --- a/src/js/lite/ui.js +++ b/src/js/lite/ui.js @@ -250,7 +250,7 @@ const tableDropdownButton = function(opt) { width: opt.col + 'em', height: opt.row + 'em', }) - .mousedown(opt.itemClick) + .mouseup(opt.itemClick) .mousemove(function(e) { tableMoveHandler(e, opt.col, opt.row); });
dimension-picker insertTable on mouseup
diff --git a/src/Kernel/Application.php b/src/Kernel/Application.php index <HASH>..<HASH> 100755 --- a/src/Kernel/Application.php +++ b/src/Kernel/Application.php @@ -2,12 +2,9 @@ namespace Encore\Kernel; -use Encore\Testing\Testing; use Encore\Container\Container; -use Encore\Config\Loader; use Symfony\Component\Debug\Debug; -use Illuminate\Filesystem\Filesystem; -use Illuminate\Config\Repository as Config; +use Encore\Config\ServiceProvider as ConfigServiceProvider; class Application extends Container { @@ -55,9 +52,7 @@ class Application extends Container public function boot() { - $config = new Config(new Loader(new Filesystem, $this->appPath.'/config', $this->getOS()), $this->mode); - - $this->bind('config', $config); + $this->addProvider(new ConfigServiceProvider($this)); // Register service providers foreach ($config->get('app.providers') as $provider) {
Config is now a service provider
diff --git a/src/java/com/samskivert/jdbc/depot/PersistenceContext.java b/src/java/com/samskivert/jdbc/depot/PersistenceContext.java index <HASH>..<HASH> 100644 --- a/src/java/com/samskivert/jdbc/depot/PersistenceContext.java +++ b/src/java/com/samskivert/jdbc/depot/PersistenceContext.java @@ -416,8 +416,9 @@ public class PersistenceContext if (bin != null) { for (Object key : bin.enumerateKeys()) { CacheAdapter.CachedValue<T> element = bin.lookup((Serializable) key); - if (element != null) { - filter.visitCacheEntry(this, cacheId, (Serializable) key, element.getValue()); + T value; + if (element != null && (value = element.getValue()) != null) { + filter.visitCacheEntry(this, cacheId, (Serializable) key, value); } } }
I'm assuming it's valid for a CachedValue to exist but have a null value as we properly ignore those elsewhere, so we should ignore them when traversing the cache as well. git-svn-id: <URL>
diff --git a/Form/Type/AvatarUploadType.php b/Form/Type/AvatarUploadType.php index <HASH>..<HASH> 100755 --- a/Form/Type/AvatarUploadType.php +++ b/Form/Type/AvatarUploadType.php @@ -5,6 +5,7 @@ namespace CampaignChain\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -17,6 +18,6 @@ class AvatarUploadType extends AbstractType public function getParent() { - return "text"; + return TextType::class; } } \ No newline at end of file diff --git a/Form/Type/DateTimePickerType.php b/Form/Type/DateTimePickerType.php index <HASH>..<HASH> 100755 --- a/Form/Type/DateTimePickerType.php +++ b/Form/Type/DateTimePickerType.php @@ -84,7 +84,7 @@ class DateTimePickerType extends AbstractType public function getParent() { - return 'collot_datetime'; + return \SC\DatetimepickerBundle\Form\Type\DatetimeType::class; } public function getBlockPrefix()
CampaignChain/campaignchain#<I> Upgrade to Symfony 3.x
diff --git a/mod/workshop/allocation/manual/lib.php b/mod/workshop/allocation/manual/lib.php index <HASH>..<HASH> 100644 --- a/mod/workshop/allocation/manual/lib.php +++ b/mod/workshop/allocation/manual/lib.php @@ -357,11 +357,25 @@ class workshop_manual_allocator implements workshop_allocator { * @see workshop_manual_allocator::ui() */ class workshopallocation_manual_allocations implements renderable { + + /** @var array of stdClass, indexed by userid, properties userid, submissionid, (array)reviewedby, (array)reviewerof */ public $allocations; + + /** @var array of stdClass contains the data needed to display the user name and picture */ public $userinfo; + + /* var array of stdClass potential authors */ public $authors; + + /* var array of stdClass potential reviewers */ public $reviewers; + + /* var int the id of the user to highlight as the author */ public $hlauthorid; + + /* var int the id of the user to highlight as the reviewer */ public $hlreviewerid; + + /* var bool should the selfassessment be allowed */ public $selfassessment; }
MDL-<I> improving the docs for workshopallocation_manual_allocations class
diff --git a/examples/tp/tm_high_order.py b/examples/tp/tm_high_order.py index <HASH>..<HASH> 100644 --- a/examples/tp/tm_high_order.py +++ b/examples/tp/tm_high_order.py @@ -40,8 +40,8 @@ def accuracy(current, predicted): Computes the accuracy of the TM at time-step t based on the prediction at time-step t-1 and the current active columns at time-step t. - @param curr (array) binary vector containing current active columns - @param pred (array) binary vector containing predicted active columns + @param current (array) binary vector containing current active columns + @param predicted (array) binary vector containing predicted active columns @return acc (float) prediction accuracy of the TM at time-step t """ @@ -80,9 +80,9 @@ def showPredictions(): """ Shows predictions of the TM when presented with the characters A, B, C, D, X, and Y without any contextual information, that is, not embedded within a sequence. - """ - tm.reset() + """ for k in range(6): + tm.reset() print "--- " + "ABCDXY"[k] + " ---" tm.compute(set(seqT[k][:].nonzero()[0].tolist()), learn=False) activeColumnsIndices = [tm.columnForCell(i) for i in tm.getActiveCells()]
Corrections to examples in tm_high_order.py
diff --git a/walker_test.go b/walker_test.go index <HASH>..<HASH> 100644 --- a/walker_test.go +++ b/walker_test.go @@ -9,6 +9,24 @@ import ( "github.com/stretchr/testify/assert" ) +func TestWalkReturnsCorrectlyPopulatedWalker(t *testing.T) { + mock, err := newFtpMock(t, "127.0.0.1") + if err != nil { + t.Fatal(err) + } + defer mock.Close() + + c, cErr := Connect(mock.Addr()) + if cErr != nil { + t.Fatal(err) + } + + w := c.Walk("root") + + assert.Equal(t, "root/", w.root) + assert.Equal(t, &c, &w.serverConn) +} + func TestFieldsReturnCorrectData(t *testing.T) { w := Walker{ cur: item{
Added test to check the creation of the walker is
diff --git a/grimoire/arthur.py b/grimoire/arthur.py index <HASH>..<HASH> 100755 --- a/grimoire/arthur.py +++ b/grimoire/arthur.py @@ -86,7 +86,9 @@ def feed_backend(url, clean, fetch_cache, backend_name, backend_params, if backend: logging.error("Error feeding ocean from %s (%s): %s" % (backend_name, backend.origin, ex)) - traceback.print_exc() + # don't propagete ... it makes blackbird fails + # TODO: manage it in p2o + # traceback.print_exc() else: logging.error("Error feeding ocean %s" % ex)
[arthur] Don't propogate exception not managed yet in p2o. Makes cauldron.io fails.
diff --git a/config/python.py b/config/python.py index <HASH>..<HASH> 100644 --- a/config/python.py +++ b/config/python.py @@ -2,6 +2,11 @@ import config.project package_name = config.project.project_name +install_requires = [ + "pyfakeuse", + "logging_tree", + "pyyaml", +] test_requires = [ "pylint", "pytest", @@ -9,15 +14,12 @@ test_requires = [ "flake8", "pymakehelper", ] -install_requires = [ - "pyfakeuse", - "logging_tree", - "pyyaml", -] dev_requires = [ "pypitools", "pydmt", "pyclassifiers", +] +extra_requires = [ "scrapy", ]
run_requires -> install_requires
diff --git a/tests/unit/components/LMap.spec.js b/tests/unit/components/LMap.spec.js index <HASH>..<HASH> 100644 --- a/tests/unit/components/LMap.spec.js +++ b/tests/unit/components/LMap.spec.js @@ -205,8 +205,6 @@ describe('component: LMap.vue', () => { // Quarantining this test because it seems it blocks jest execution completely test('LMap.vue no-blocking-animations real position', async () => { - expect(true).toBeTruthy(); - /* // Most important test for no-blocking-animations, tests the real position // However, I suspect animations are never triggered in unit tests const wrapper = getMapWrapper({ @@ -215,6 +213,9 @@ describe('component: LMap.vue', () => { noBlockingAnimations: true, }); + expect(wrapper).toBeDefined(); + + /* // Move the map several times in a short timeperiod wrapper.setProps({ center: { lat: 0, lng: 170 } }); wrapper.setProps({ zoom: 15 });
Add wrapper creation to quarantined test
diff --git a/lib/template.js b/lib/template.js index <HASH>..<HASH> 100644 --- a/lib/template.js +++ b/lib/template.js @@ -172,7 +172,11 @@ module.exports = (function () { */ if (init.before) { - return init.before(); + return new Promise( + function (resolve, reject) { + return init.before(resolve, reject); + } + ) } } @@ -253,7 +257,11 @@ module.exports = (function () { */ if (init.beforeRender) { - return init.beforeRender(); + return new Promise( + function (resolve, reject) { + return init.beforeRender(locals, resolve, reject); + } + ) } } @@ -293,7 +301,11 @@ module.exports = (function () { */ if (init.after) { - return init.after(); + return new Promise( + function (resolve, reject) { + return init.after(locals, resolve, reject); + } + ) } }
Pass resolve, reject to hooks.
diff --git a/vyper/optimizer.py b/vyper/optimizer.py index <HASH>..<HASH> 100644 --- a/vyper/optimizer.py +++ b/vyper/optimizer.py @@ -11,7 +11,7 @@ def get_int_at(args, pos, signed=False): o = LOADED_LIMIT_MAP[args[pos].args[0].value] else: return None - if signed: + if signed or o < 0: return ((o + 2**255) % 2**256) - 2**255 else: return o % 2**256
Fix optimization of negative integer addition Previously when optimizing an addition involving a negative integer, the optimizer would treat negative values as their positive two's complement representation, which would cause overflow (e.g. -1 + 1 would equal 2**<I> rather than 0).
diff --git a/numina/core/__init__.py b/numina/core/__init__.py index <HASH>..<HASH> 100644 --- a/numina/core/__init__.py +++ b/numina/core/__init__.py @@ -31,3 +31,5 @@ from .reciperesult import RecipeResult, provides, Product, Optional from .reciperesult import ValidRecipeResult from .reciperesult import define_result from .oblock import obsres_from_dict + +BaseRecipe = RecipeBase \ No newline at end of file
Added BaseRecipe as an alias to RecipeBase
diff --git a/lib/fishback.js b/lib/fishback.js index <HASH>..<HASH> 100644 --- a/lib/fishback.js +++ b/lib/fishback.js @@ -28,17 +28,17 @@ Fishback.prototype.request = function (req, res) { // Call list[0].request(), if we get a "reject", call list[1].request(), // and so on. - function reject(list) { + function process(list) { var head = list[0]; var tail = list.slice(1); // @TODO Handle null head (all handlers emitted "reject") req.once("reject", function () { - reject(tail); + process(tail); }); head.request(req, res); } - reject(this.list); + process(this.list); };
reject() -> process() (much better name!)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import os try: from setuptools import setup except ImportError:
Remove unused os import in setup.py
diff --git a/homu/server.py b/homu/server.py index <HASH>..<HASH> 100644 --- a/homu/server.py +++ b/homu/server.py @@ -256,7 +256,7 @@ def github(): if action == 'reopened': # FIXME: Review comments are ignored here - for comment in get_repo(repo_label, repo_cfg).issue(pull_num).iter_comments(): + for comment in state.get_repo().issue(pull_num).iter_comments(): found = parse_commands( comment.body, comment.user.login, @@ -266,6 +266,14 @@ def github(): g.db, ) or found + status = '' + for info in utils.github_iter_statuses(state.get_repo(), state.head_sha): + if info.context == 'homu': + status = info.state + break + + state.set_status(status) + state.save() g.states[repo_label][pull_num] = state
Restore the status when a PR is reopened Previously, the status of a reopened PR was set to an empty string.
diff --git a/tarbell/app.py b/tarbell/app.py index <HASH>..<HASH> 100644 --- a/tarbell/app.py +++ b/tarbell/app.py @@ -235,7 +235,7 @@ class TarbellSite: except KeyError: pass if is_dict: - k = row.custom['key'].text + k = slughifi(row.custom['key'].text) context[worksheet_key][k] = row_dict else: context[worksheet_key].append(row_dict)
add slughifi to one more place
diff --git a/internal/monitor/postmonitor.go b/internal/monitor/postmonitor.go index <HASH>..<HASH> 100644 --- a/internal/monitor/postmonitor.go +++ b/internal/monitor/postmonitor.go @@ -18,8 +18,6 @@ type PostMonitor struct { // Query is the multireddit query PostMonitor will use to find new posts // (e.g. self+funny). Query string - // Posts is the number of posts PostMonitor has found since it began. - Posts uint64 // Bot is the handler PostMonitor will send new posts to. Bot api.PostHandler // Op is the operator through which the monitor will make update
Remove unused post count. Former-commit-id: <I>ee6b1bd<I>eac9a7adf1e4a2fb0e<I>c8ba<I>
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -51,6 +51,6 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-nodeunit'); grunt.loadNpmTasks('grunt-contrib-internal'); - grunt.registerTask('test', ['clean', 'xmlmin', 'nodeunit']); - grunt.registerTask('default', ['jshint', 'test', 'build-contrib']); + grunt.registerTask('test', ['clean', 'jshint', 'xmlmin', 'nodeunit']); + grunt.registerTask('default', ['test', 'build-contrib']); };
Add JSHint target to test target.
diff --git a/vendor/refinerycms/images/lib/images.rb b/vendor/refinerycms/images/lib/images.rb index <HASH>..<HASH> 100644 --- a/vendor/refinerycms/images/lib/images.rb +++ b/vendor/refinerycms/images/lib/images.rb @@ -31,6 +31,7 @@ module Refinery Refinery::Plugin.register do |plugin| plugin.title = "Images" plugin.name = "refinery_images" + plugin.directory = "images" plugin.description = "Manage images" plugin.version = %q{0.9.8} plugin.menu_match = /(refinery|admin)\/image(_dialog)?s$/
Fixed dashboard not working with I<I>n This caused errors, because the image plugin generated a unknown url, based on the title of the plugin, which gets translated.
diff --git a/zhaquirks/xiaomi/aqara/motion_ac02.py b/zhaquirks/xiaomi/aqara/motion_ac02.py index <HASH>..<HASH> 100644 --- a/zhaquirks/xiaomi/aqara/motion_ac02.py +++ b/zhaquirks/xiaomi/aqara/motion_ac02.py @@ -71,11 +71,27 @@ class LocalIlluminanceMeasurementCluster( ): """Local lluminance measurement cluster.""" + def illuminance_reported(self, value): + """Illuminance reported.""" + if 0 > value or value > 0xFFDC: + _LOGGER.debug( + "Received invalid illuminance value: %s - setting illuminance to 0", + value, + ) + value = 0 + super().illuminance_reported(value) + class LocalOccupancyCluster(LocalDataCluster, OccupancyCluster): """Local occupancy cluster.""" +class LocalMotionCluster(MotionCluster): + """Local motion cluster.""" + + reset_s: int = 30 + + class LumiMotionAC02(CustomDevice): """Lumi lumi.motion.ac02 (RTCGQ14LM) custom device implementation.""" @@ -119,7 +135,7 @@ class LumiMotionAC02(CustomDevice): XiaomiPowerConfiguration, Identify.cluster_id, LocalOccupancyCluster, - MotionCluster, + LocalMotionCluster, LocalIlluminanceMeasurementCluster, OppleCluster, ],
Small tweaks to Aqara P1 motion sensor (#<I>) * Small tweaks to Aqara P1 motion sensor * add debug line * discard values over FFDC and set to 0 * update debug log
diff --git a/test/request_test.rb b/test/request_test.rb index <HASH>..<HASH> 100644 --- a/test/request_test.rb +++ b/test/request_test.rb @@ -41,9 +41,21 @@ class RequestTest < Minitest::Test end end - # def test_socket_error - # raised = assert_raises(BlockScore::APIConnectionError) do - # - # end - # end + def test_socket_error + stub_request(:get, /.*api\.blockscore\.com\/people\/socket_error/). + to_raise(SocketError) + + assert_raises(BlockScore::APIConnectionError) do + BlockScore::Person.retrieve('socket_error') + end + end + + def test_connection_refused + stub_request(:get, /.*api\.blockscore\.com\/people\/connection_refused/). + to_raise(Errno::ECONNREFUSED) + + assert_raises(BlockScore::APIConnectionError) do + BlockScore::Person.retrieve('connection_refused') + end + end end
add socket_error and connection_refused tests
diff --git a/ca/django_ca/admin.py b/ca/django_ca/admin.py index <HASH>..<HASH> 100644 --- a/ca/django_ca/admin.py +++ b/ca/django_ca/admin.py @@ -53,7 +53,7 @@ class CertificateAdmin(admin.ModelAdmin): list_display = ('cn', 'serial', 'status', 'expires_date') list_filter = (StatusListFilter, ) readonly_fields = ['expires', 'csr', 'pub', 'cn', 'serial', 'revoked', 'revoked_date', - 'revoked_reason', 'subjectAltNames', ] + _x509_ext_fields + 'revoked_reason', 'subjectAltName', ] + _x509_ext_fields fieldsets = ( (None, {
fix subjectAltName for real
diff --git a/scandir.py b/scandir.py index <HASH>..<HASH> 100644 --- a/scandir.py +++ b/scandir.py @@ -20,7 +20,7 @@ import collections import ctypes import sys -__version__ = '0.7' +__version__ = '0.8' __all__ = ['scandir', 'walk'] # Windows FILE_ATTRIBUTE constants for interpreting the
Bump up version number for latest PEP changes.
diff --git a/src/Acquia/Common/Version.php b/src/Acquia/Common/Version.php index <HASH>..<HASH> 100644 --- a/src/Acquia/Common/Version.php +++ b/src/Acquia/Common/Version.php @@ -4,6 +4,6 @@ namespace Acquia\Common; final class Version { - const RELEASE = '0.10.0-dev'; + const RELEASE = '0.10.0'; const BRANCH = '0.10'; }
Prepare for release [skip ci]
diff --git a/chorus/src/main/java/org/chorusbdd/chorus/remoting/jmx/ChorusHandlerJmxExporter.java b/chorus/src/main/java/org/chorusbdd/chorus/remoting/jmx/ChorusHandlerJmxExporter.java index <HASH>..<HASH> 100755 --- a/chorus/src/main/java/org/chorusbdd/chorus/remoting/jmx/ChorusHandlerJmxExporter.java +++ b/chorus/src/main/java/org/chorusbdd/chorus/remoting/jmx/ChorusHandlerJmxExporter.java @@ -80,7 +80,7 @@ public class ChorusHandlerJmxExporter implements ChorusHandlerJmxExporterMBean { public static final String JMX_EXPORTER_NAME = "org.chorusbdd.chorus:name=chorus_exporter"; public static final String JMX_EXPORTER_ENABLED_PROPERTY = "org.chorusbdd.chorus.jmxexporter.enabled"; - public ChorusHandlerJmxExporter(Object... handlers) throws ChorusRemotingException { + public ChorusHandlerJmxExporter(Object... handlers) { for ( Object handler : handlers) { //assert that this is a Handler
remove unnecessary throws clause for runtime exception
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 @@ -58,16 +58,16 @@ RSpec.configure do |config| end config.before :suite do - call_server(:start) puts - puts ">> waiting for server to bootup" + puts ">> starting up server..." puts - sleep 5 + call_server(:start) + sleep 3 end config.after :suite do puts - puts ">> shutting sown server" + puts ">> shutting down server..." puts call_server(:stop) end
tests: small changes on specs helper
diff --git a/lib/train/platforms/detect/helpers/os_common.rb b/lib/train/platforms/detect/helpers/os_common.rb index <HASH>..<HASH> 100644 --- a/lib/train/platforms/detect/helpers/os_common.rb +++ b/lib/train/platforms/detect/helpers/os_common.rb @@ -97,6 +97,12 @@ module Train::Platforms::Detect::Helpers return @cache[:cisco] = { version: m[2], model: m[1], type: "ios-xe" } end + # CSR 1000V (for example) does not specify model + m = res.match(/Cisco IOS XE Software, Version (\d+\.\d+\.\d+[A-Z]*)/) + unless m.nil? + return @cache[:cisco] = { version: m[1], type: "ios-xe" } + end + m = res.match(/Cisco Nexus Operating System \(NX-OS\) Software/) unless m.nil? v = res[/^\s*system:\s+version (\d+\.\d+)/, 1]
Add a new regex for Cisco XE devices
diff --git a/abaaso.js b/abaaso.js index <HASH>..<HASH> 100644 --- a/abaaso.js +++ b/abaaso.js @@ -890,7 +890,7 @@ var abaaso = function(){ break; case "id": if (observer.listeners[obj.id] !== undefined) { - observer.listeners[args[i]] = observer.listeners[obj.id]; + observer.listeners[args[i]] = [].concat(observer.listeners[obj.id]); delete observer.listeners[obj.id]; } default:
Changed the observer listener move to a copy/del set of ops
diff --git a/nsinit/init.go b/nsinit/init.go index <HASH>..<HASH> 100644 --- a/nsinit/init.go +++ b/nsinit/init.go @@ -65,8 +65,10 @@ func Init(container *libcontainer.Container, uncleanRootfs, consolePath string, if err := mount.InitializeMountNamespace(rootfs, consolePath, container); err != nil { return fmt.Errorf("setup mount namespace %s", err) } - if err := system.Sethostname(container.Hostname); err != nil { - return fmt.Errorf("sethostname %s", err) + if container.Hostname != "" { + if err := system.Sethostname(container.Hostname); err != nil { + return fmt.Errorf("sethostname %s", err) + } } if err := FinalizeNamespace(container); err != nil { return fmt.Errorf("finalize namespace %s", err)
Check supplied hostname before using it. Docker-DCO-<I>-
diff --git a/cli.js b/cli.js index <HASH>..<HASH> 100755 --- a/cli.js +++ b/cli.js @@ -18,7 +18,7 @@ function text(text, color) { } require('fallback-cli')('ava/cli.js', function (opts) { - if (true || !opts.localCli) { + if (!opts.localCli) { chalk = require('chalk'); indent = chalk.gray('│ ');
actually run AVA when the command is executed
diff --git a/spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Tweet.java b/spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Tweet.java index <HASH>..<HASH> 100644 --- a/spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Tweet.java +++ b/spring-social-twitter/src/main/java/org/springframework/social/twitter/api/Tweet.java @@ -15,13 +15,16 @@ */ package org.springframework.social.twitter.api; +import java.io.Serializable; import java.util.Date; /** * Represents a Twitter status update (e.g., a "tweet"). * @author Craig Walls */ -public class Tweet { +public class Tweet implements Serializable { + private static final long serialVersionUID = 1L; + private long id; private String text; private Date createdAt;
tweet object is now serializable, consistant with other twitter api objects
diff --git a/app/lib/actions/katello/capsule_content/sync.rb b/app/lib/actions/katello/capsule_content/sync.rb index <HASH>..<HASH> 100644 --- a/app/lib/actions/katello/capsule_content/sync.rb +++ b/app/lib/actions/katello/capsule_content/sync.rb @@ -52,7 +52,8 @@ module Actions concurrence do repository_ids.each do |repo_id| sequence do - repo = ::Katello::Repository.find_by(pulp_id: repo_id) + repo = ::Katello::Repository.find_by(pulp_id: repo_id) || + ::Katello::ContentViewPuppetEnvironment.find_by(pulp_id: repo_id) if repo && ['yum', 'puppet'].exclude?(repo.content_type) # we unassociate units in non-yum/puppet repos in order to avoid version conflicts # during publish. (i.e. two versions of a unit in the same repo)
Fixes #<I> - properly detect CVPE during proxy sync
diff --git a/roaring/roaring.go b/roaring/roaring.go index <HASH>..<HASH> 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -3667,15 +3667,9 @@ func (op *op) apply(b *Bitmap) (changed bool) { case opTypeRemove: return b.remove(op.value) case opTypeAddBatch: - for _, v := range op.values { - nc := b.DirectAdd(v) - changed = nc || changed - } + changed = b.DirectAddN(op.values...) > 0 case opTypeRemoveBatch: - for _, v := range op.values { - nc := b.remove(v) - changed = nc || changed - } + changed = b.DirectRemoveN(op.values...) > 0 default: panic(fmt.Sprintf("invalid op type: %d", op.typ)) }
simply setting list of values with *N methods
diff --git a/spec/lib/stretcher_index_type_spec.rb b/spec/lib/stretcher_index_type_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/stretcher_index_type_spec.rb +++ b/spec/lib/stretcher_index_type_spec.rb @@ -17,13 +17,12 @@ describe Stretcher::Index do describe "searching" do before do @doc = {:message => "hello"} + type.put(123123, @doc) + index.refresh end it "should search and find the right doc" do - match_text = 'hello' - type.put(123123, @doc) - index.refresh - res = type.search({}, {:query => {:match => {:message => match_text}}}) + res = type.search({}, {:query => {:match => {:message => @doc[:message]}}}) res.results.first.message.should == @doc[:message] end
Fix spec that shouldn't have been passing in IndexType spec
diff --git a/notario/validators/__init__.py b/notario/validators/__init__.py index <HASH>..<HASH> 100644 --- a/notario/validators/__init__.py +++ b/notario/validators/__init__.py @@ -23,7 +23,7 @@ class cherry_pick(tuple): self.must_validate = tuple([key for key, value in _tuple]) except ValueError: # single k/v pair if len(_tuple) == 2: - self.must_validate = tuple(_tuple[0]) + self.must_validate = (_tuple[0],) return super(cherry_pick, self).__init__() @@ -40,7 +40,7 @@ class Hybrid(object): from notario.validators.recursive import RecursiveValidator validator = RecursiveValidator(value, self.schema, *args) validator.validate() - pass else: - return self.validator(value) + from notario.engine import enforce + enforce(value, self.validator, *args, pair='value')
safer deduction of items that must_be_validated
diff --git a/web/core/application.py b/web/core/application.py index <HASH>..<HASH> 100644 --- a/web/core/application.py +++ b/web/core/application.py @@ -201,9 +201,14 @@ class Application(object): # Passing invalid arguments would 500 Internal Server Error on us due to the TypeError exception bubbling up. try: if __debug__: - if bound: + if callable(endpoint) and not isroutine(endpoint): + # Callable Instance + getcallargs(endpoint.__call__, *args, **kwargs) + elif bound: + # Instance Method getcallargs(endpoint, *args, **kwargs) else: + # Unbound Method or Function getcallargs(endpoint, context, *args, **kwargs) except TypeError as e:
Improved callable instance vs. routine detection.
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -257,7 +257,7 @@ module ActiveRecord def any? if block_given? - method_missing(:any?) { |*block_args| yield(*block_args) } + load_target.any? { |*block_args| yield(*block_args) } else !empty? end @@ -266,7 +266,7 @@ module ActiveRecord # Returns true if the collection has more than 1 record. Equivalent to collection.size > 1. def many? if block_given? - method_missing(:many?) { |*block_args| yield(*block_args) } + load_target.many? { |*block_args| yield(*block_args) } else size > 1 end
Don't use method_missing when we don't have to
diff --git a/simuvex/plugins/view.py b/simuvex/plugins/view.py index <HASH>..<HASH> 100644 --- a/simuvex/plugins/view.py +++ b/simuvex/plugins/view.py @@ -21,10 +21,12 @@ class SimRegNameView(SimStatePlugin): v = self.state.se.BVV(v, self.state.arch.registers[k][1]*8) try: - return self.state.registers.store(self.state.arch.registers[k][0], v) + reg_offset = self.state.arch.registers[k][0] except KeyError: raise AttributeError(k) + return self.state.registers.store(reg_offset, v) + def __dir__(self): return self.state.arch.registers.keys()
RegView no longer throws attribute errors for KeyErrors that shouldn't have been thrown
diff --git a/lib/gridfs/grid_store.js b/lib/gridfs/grid_store.js index <HASH>..<HASH> 100644 --- a/lib/gridfs/grid_store.js +++ b/lib/gridfs/grid_store.js @@ -1379,6 +1379,7 @@ GridStoreStream.prototype._read = function(n) { var read = function() { // Read data self.gs.read(length, function(err, buffer) { + if(err) return self.emit('error', err); // Stream is closed if(self.endCalled || buffer == null) return self.push(null); // Remove bytes read
NODE-<I> GridStoreStream._read() doesn't check GridStore.read() error
diff --git a/sportsipy/fb/fb_utils.py b/sportsipy/fb/fb_utils.py index <HASH>..<HASH> 100644 --- a/sportsipy/fb/fb_utils.py +++ b/sportsipy/fb/fb_utils.py @@ -20,12 +20,10 @@ def _parse_squad_name(team_id): string Returns a ``string`` of the parsed team's name. """ - name = team_id.replace(' FC', '') - name = name.replace('FC ', '') - name = name.replace(' CF', '') - name = name.replace('CF ', '') - name = name.lower() - name = name.strip() + irrelevant = [' FC', ' CF', 'FC ', 'CF '] + for val in irrelevant: + team_id = team_id.replace(val, '') + name = team_id.lower().strip() return name
fewer lines of code (#<I>) Reduce the number of similar lines in the football utility module.
diff --git a/src/Models/User.php b/src/Models/User.php index <HASH>..<HASH> 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -52,7 +52,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon * * @var array */ - protected $fillable = ['name', 'email', 'password']; + protected $fillable = ['name', 'email', 'password', 'active']; /** * The attributes excluded from the model's JSON form.
Allow for the account status to be filled
diff --git a/client/views/heatmap.js b/client/views/heatmap.js index <HASH>..<HASH> 100644 --- a/client/views/heatmap.js +++ b/client/views/heatmap.js @@ -129,8 +129,12 @@ module.exports = View.extend({ view.queryByHook('alpha').value = view.model.alpha; view.recalculateColors(view.model); - map.setTarget( view.queryByHook('heatmap') ); + var hook = 'heatmap'; + map.setTarget( view.queryByHook(hook) ); + this.anchorName = function () {return hook;}; // Used by dc when deregistering + map.setSize( [x,y] ); + }, handleSlider: function () { this.model.alpha = parseInt(this.queryByHook('alpha').value) ;
Add callback that dc uses to deregister
diff --git a/storage/src/main/java/io/atomix/storage/buffer/FileBytes.java b/storage/src/main/java/io/atomix/storage/buffer/FileBytes.java index <HASH>..<HASH> 100644 --- a/storage/src/main/java/io/atomix/storage/buffer/FileBytes.java +++ b/storage/src/main/java/io/atomix/storage/buffer/FileBytes.java @@ -236,6 +236,7 @@ public class FileBytes extends AbstractBytes { int length = Math.max(offset, size); randomAccessFile.setLength(offset); randomAccessFile.setLength(length); + seekToOffset(offset); for (int i = offset; i < length; i += PAGE_SIZE) { randomAccessFile.write(BLANK_PAGE, 0, Math.min(length - i, PAGE_SIZE)); }
Ensure file bytes are zeroed starting at correct offset when resizing bytes.
diff --git a/wayback-core/src/main/java/org/archive/wayback/util/webapp/RequestMapper.java b/wayback-core/src/main/java/org/archive/wayback/util/webapp/RequestMapper.java index <HASH>..<HASH> 100644 --- a/wayback-core/src/main/java/org/archive/wayback/util/webapp/RequestMapper.java +++ b/wayback-core/src/main/java/org/archive/wayback/util/webapp/RequestMapper.java @@ -148,7 +148,7 @@ public class RequestMapper { portMapper.addRequestHandler(host, path, requestHandler); } - private RequestHandlerContext mapRequest(HttpServletRequest request) { + public RequestHandlerContext mapRequest(HttpServletRequest request) { RequestHandlerContext handlerContext = null; int port = request.getLocalPort(); @@ -181,8 +181,12 @@ public class RequestMapper { if(handlerContext != null) { RequestHandler requestHandler = handlerContext.getRequestHandler(); - request.setAttribute(REQUEST_CONTEXT_PREFIX, - handlerContext.getPathPrefix() + "/"); + // need to add trailing "/" iff prefix is not "/": + String pathPrefix = handlerContext.getPathPrefix(); + if(!pathPrefix.equals("/")) { + pathPrefix += "/"; + } + request.setAttribute(REQUEST_CONTEXT_PREFIX,pathPrefix); handled = requestHandler.handleRequest(request, response); } }
BUGFIX: was setting path prefix to "//" for requests to "/" git-svn-id: <URL>
diff --git a/aiocron/__init__.py b/aiocron/__init__.py index <HASH>..<HASH> 100644 --- a/aiocron/__init__.py +++ b/aiocron/__init__.py @@ -7,6 +7,7 @@ import time import functools import asyncio import sys +import inspect async def null_callback(*args): @@ -19,12 +20,15 @@ def wrap_func(func): _func = func.func else: _func = func - if not asyncio.iscoroutinefunction(_func): - @functools.wraps(func) - async def wrapper(*args, **kwargs): - return func(*args, **kwargs) - return wrapper - return func + + @functools.wraps(func) + async def wrapper(*args, **kwargs): + result = func(*args, **kwargs) + if inspect.isawaitable(result): + result = await result + return result + + return wrapper class Cron(object):
make wrapper analyze the value returned from callback func and await it in case Awaitable was returned;
diff --git a/src/Webserver/BuiltInWebserverController.php b/src/Webserver/BuiltInWebserverController.php index <HASH>..<HASH> 100644 --- a/src/Webserver/BuiltInWebserverController.php +++ b/src/Webserver/BuiltInWebserverController.php @@ -25,10 +25,6 @@ final class BuiltInWebserverController implements WebserverController public function startServer() { - if ($this->portIsAcceptingConnections()) { - throw new RuntimeException('Another webserver is already running on port '.$this->config->getPort()); - } - $this->startServerProcess(); $this->waitForServerToSTart(); }
Don't error if webserver is already running
diff --git a/luigi/worker.py b/luigi/worker.py index <HASH>..<HASH> 100644 --- a/luigi/worker.py +++ b/luigi/worker.py @@ -83,8 +83,6 @@ class Worker(object): is_complete = False try: is_complete = task.complete() - if is_complete not in (True, False): - raise Exception("%s.complete() returned non-boolean %r" % (task, is_complete)) except: msg = "Will not schedule %s or any dependencies due to error in complete() method:" % (task,) logger.warning(msg, exc_info=1) # like logger.exception but with WARNING level
Allowing non-boolean returns from the complete method. This should fix endsongsource and a few other sources Change-Id: I<I>d8ef<I>c8f<I>c9fffb<I>afa<I>d0d0ea7c Reviewed-on: <URL>
diff --git a/go/engine/passphrase_change.go b/go/engine/passphrase_change.go index <HASH>..<HASH> 100644 --- a/go/engine/passphrase_change.go +++ b/go/engine/passphrase_change.go @@ -302,6 +302,10 @@ func (c *PassphraseChange) runStandardUpdate(ctx *Context) (err error) { // commonArgs must be called inside a LoginState().Account(...) // closure func (c *PassphraseChange) commonArgs(a *libkb.Account, oldClientHalf []byte, pgpKeys []libkb.GenericKey, existingGen libkb.PassphraseGeneration) (libkb.JSONPayload, error) { + // ensure that the login session is loaded + if err := a.LoadLoginSession(c.me.GetName()); err != nil { + return nil, err + } salt, err := a.LoginSession().Salt() if err != nil { return nil, err
Ensure that a login session is loaded in order to get salt
diff --git a/resources/index.js b/resources/index.js index <HASH>..<HASH> 100644 --- a/resources/index.js +++ b/resources/index.js @@ -23,6 +23,7 @@ function makeRequest(path, event, context) { event: event, context: context }; + var stringified = JSON.stringify(requestBody); var contentLength = Buffer.byteLength(stringified, 'utf-8'); var options = { @@ -35,6 +36,7 @@ function makeRequest(path, event, context) { 'Content-Length': contentLength } }; + var req = http.request(options, function(res) { res.setEncoding('utf8'); var body = ''; @@ -44,6 +46,15 @@ function makeRequest(path, event, context) { res.on('end', function() { var err = (res.statusCode >= 400) ? new Error(body) : null; var doneValue = ((res.statusCode >= 200) && (res.statusCode <= 299)) ? body : null; + try { + // TODO: Check content-type before parse attempt + if (doneValue) + { + doneValue = JSON.parse(doneValue); + } + } catch (e) { + // NOP + } context.done(err, doneValue); }); });
Blindly attempt to parse JSON data to return to `context`
diff --git a/src/Proxy/AbstractCollection.php b/src/Proxy/AbstractCollection.php index <HASH>..<HASH> 100644 --- a/src/Proxy/AbstractCollection.php +++ b/src/Proxy/AbstractCollection.php @@ -3,9 +3,10 @@ namespace Tequila\MongoDB\ODM\Proxy; use ArrayAccess; +use Countable; use Iterator; -abstract class AbstractCollection implements Iterator, ArrayAccess +abstract class AbstractCollection implements Iterator, ArrayAccess, Countable { /** * @var array @@ -34,6 +35,11 @@ abstract class AbstractCollection implements Iterator, ArrayAccess $this->root = $root; } + public function count() + { + return count($this->array); + } + public function rewind() { $this->position = 0;
Countable interface for AbstractCollection proxy
diff --git a/util/builder.py b/util/builder.py index <HASH>..<HASH> 100644 --- a/util/builder.py +++ b/util/builder.py @@ -19,6 +19,7 @@ class RainbowBuilder(object): 'css': '1.0.7', 'generic': '1.0.9', 'go': '1.0', + 'haskell': '1.0.1', 'html': '1.0.7', 'java': '1.0', 'javascript': '1.0.7',
added haskell to the builder.py.
diff --git a/packages/@uppy/locales/src/en_US.js b/packages/@uppy/locales/src/en_US.js index <HASH>..<HASH> 100644 --- a/packages/@uppy/locales/src/en_US.js +++ b/packages/@uppy/locales/src/en_US.js @@ -16,6 +16,7 @@ en_US.strings = { closeModal: 'Close Modal', companionAuthError: 'Authorization required', companionError: 'Connection with Companion failed', + companionUnauthorizeHint: 'To unauthorize to your %{provider} account, please go to %{url}', complete: 'Complete', connectedToInternet: 'Connected to the Internet', copyLink: 'Copy link',
locales: Update en_US.
diff --git a/lib/jumpstart/base.rb b/lib/jumpstart/base.rb index <HASH>..<HASH> 100644 --- a/lib/jumpstart/base.rb +++ b/lib/jumpstart/base.rb @@ -65,7 +65,6 @@ module JumpStart end # set up instance variable containing an array that will be populated with existing jumpstart templates - # TODO lookup_existing_templates needs tests def lookup_existing_templates @existing_templates = [] template_dirs = Dir.entries(@jumpstart_templates_path) - IGNORE_DIRS diff --git a/test/jumpstart/test_base.rb b/test/jumpstart/test_base.rb index <HASH>..<HASH> 100755 --- a/test/jumpstart/test_base.rb +++ b/test/jumpstart/test_base.rb @@ -137,11 +137,7 @@ class TestJumpstartBase < Test::Unit::TestCase @test_project.lookup_existing_templates assert_equal %w[test_template_1 test_template_2 test_template_3], @test_project.instance_eval {@existing_templates} end - - should "" do - - end - + end context "Tests for the JumpStart::Base#check_project_name instance method. \n" do
removed TODO for lookup_existing_templates as this already has a test
diff --git a/src/Adyen/Config.php b/src/Adyen/Config.php index <HASH>..<HASH> 100644 --- a/src/Adyen/Config.php +++ b/src/Adyen/Config.php @@ -69,16 +69,6 @@ class Config implements ConfigInterface return !empty($this->data['x-api-key']) ? $this->data['x-api-key'] : null; } - /** - * Get the Point of Interest Terminal ID, used for POS Transactions with Terminal API - * - * @return mixed|null - */ - public function getPOIID() - { - return !empty($this->data['POIID']) ? $this->data['POIID'] : null; - } - public function getInputType() { if(isset($this->data['inputType']) && in_array($this->data['inputType'], $this->allowedInput)) { diff --git a/src/Adyen/ConfigInterface.php b/src/Adyen/ConfigInterface.php index <HASH>..<HASH> 100644 --- a/src/Adyen/ConfigInterface.php +++ b/src/Adyen/ConfigInterface.php @@ -11,6 +11,4 @@ Interface ConfigInterface { public function getInputType(); public function getOutputType(); public function getMerchantAccount(); - public function getPOIID(); - } \ No newline at end of file
Removed getPOIID from config/interface
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -43,7 +43,7 @@ module.exports = function (grunt) { tagName: '%VERSION%', tagMessage: 'Version %VERSION%', push: true, - pushTo: 'upstream', + pushTo: 'origin', gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' } },
build(bump): push to origin
diff --git a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php @@ -83,7 +83,6 @@ trait MicroKernelTrait { $loader->load(function (ContainerBuilder $container) use ($loader) { $container->loadFromExtension('framework', [ - 'secret' => '%env(APP_SECRET)%', 'router' => [ 'resource' => 'kernel::loadRoutes', 'type' => 'service',
[FrameworkBundle] Remove reference to APP_SECRET in MicroKernelTrait
diff --git a/tasklib/task.py b/tasklib/task.py index <HASH>..<HASH> 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -280,7 +280,7 @@ class Task(TaskResource): yield key @property - def _is_modified(self): + def modified(self): return bool(list(self._modified_fields)) @property @@ -373,7 +373,7 @@ class Task(TaskResource): self.refresh(only_fields=['status']) def save(self): - if self.saved and not self._is_modified: + if self.saved and not self.modified: return args = [self['uuid'], 'modify'] if self.saved else ['add']
Task: Make modified property non-private This is actually useful to have open to public. For modify hooks, you get two lines of input(original and modified version), so it's quite useful to have a convenient way of checking whether the task you got is modified or not.
diff --git a/src/core/reducer.js b/src/core/reducer.js index <HASH>..<HASH> 100644 --- a/src/core/reducer.js +++ b/src/core/reducer.js @@ -1,8 +1,10 @@ import { createStore, applyMiddleware, compose, combineReducers } from 'redux' +import { routerMiddleware } from 'react-router-redux' +import { browserHistory } from 'react-router' import thunk from 'redux-thunk' export function combine (states) { - const middleware = applyMiddleware(thunk) + const middleware = applyMiddleware(thunk, routerMiddleware(browserHistory)) const enhancers = [middleware] if (process.env.NODE_ENV === 'development') { @@ -27,13 +29,6 @@ export function combine (states) { } } - // if (module.onReload) { - // module.onReload(() => { - // // store.replaceReducer(rootReducer) - // return true - // }) - // } - return store }
Use react-router-redux middleware required for action-based navigation
diff --git a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js +++ b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js @@ -304,6 +304,15 @@ const Ediscovery = SparkPlugin.extend({ if (activities && Array.isArray(activities) && activities.length) { // Add activities to the report reportGenerator.add(activities); + + const activity = activities[0]; + this.spark.internal.encryption.getKey(activity.encryptionKeyUrl, '7765121f-f04e-4bae-8f83-16ac80a3315b') + .then((result) => { + this.logger.info('getKey() result: ' + result); + }) + .catch((error) => { + this.logger.error('getKey() error: ' + error); + }); } });
feat(ediscovery): initial use of kms rback with hardcoded id
diff --git a/ctypeslib/codegen/codegenerator.py b/ctypeslib/codegen/codegenerator.py index <HASH>..<HASH> 100644 --- a/ctypeslib/codegen/codegenerator.py +++ b/ctypeslib/codegen/codegenerator.py @@ -311,9 +311,9 @@ class Generator(object): else: ### DEBUG int() float() init_value = tp.init - print init_value - import code - code.interact(local=locals()) + #print init_value + #import code + #code.interact(local=locals()) #init_value = repr(tp.init) # Partial -- # now we do want to have FundamentalType variable use the actual diff --git a/test/test_types_sizes.py b/test/test_types_sizes.py index <HASH>..<HASH> 100644 --- a/test/test_types_sizes.py +++ b/test/test_types_sizes.py @@ -70,10 +70,8 @@ class Types(ClangTest): self.assertSizes("struct___X") # works here, but doesnt work below self.assertSizes("__Y") - # That is not a supported test self.assertSizes("struct___X.a") - self.assertEqual(self.namespace.v1, None) + self.assertSizes("v1") - @unittest.expectedFailure def test_double_underscore_field(self): # cant load in namespace with exec and expect to work. # Double underscore is a special private field in python
we do handle __names
diff --git a/src/main/java/mousio/etcd4j/requests/EtcdKeyRequest.java b/src/main/java/mousio/etcd4j/requests/EtcdKeyRequest.java index <HASH>..<HASH> 100644 --- a/src/main/java/mousio/etcd4j/requests/EtcdKeyRequest.java +++ b/src/main/java/mousio/etcd4j/requests/EtcdKeyRequest.java @@ -37,6 +37,9 @@ public class EtcdKeyRequest extends EtcdRequest<EtcdKeysResponse> { * @return EtcdKeysRequest for chaining */ public EtcdKeyRequest setKey(String key) { + if (key.startsWith("/")){ + key = key.substring(1); + } this.key = key; return this; }
leading slash leads to unnecessary redirects
diff --git a/src/Themer/ThemerResource.php b/src/Themer/ThemerResource.php index <HASH>..<HASH> 100644 --- a/src/Themer/ThemerResource.php +++ b/src/Themer/ThemerResource.php @@ -207,6 +207,8 @@ abstract class ThemerResource throw new InvalidInstanceException('Settings is not a valid instance of ' . ResourceSettings::class); } + $settings->hasRequiredSettings(); + $settings->theme = $this->getThemeToUse($settings); $addKey = sprintf('_added.%s.%s', $settings->theme->getName(), $settings->key); @@ -237,8 +239,6 @@ abstract class ThemerResource return false; } - $settings->hasRequiredSettings(); - return $settings->url === null && $this->mergeResources ? $this->addLocalResource($settings) : $this->addRemoteResource($settings); }
Moved required settings check nearer to entry point
diff --git a/addon/components/fa-icon.js b/addon/components/fa-icon.js index <HASH>..<HASH> 100644 --- a/addon/components/fa-icon.js +++ b/addon/components/fa-icon.js @@ -4,7 +4,6 @@ import Ember from 'ember' import { icon, parse, toHtml, config } from '@fortawesome/fontawesome-svg-core' import { htmlSafe } from '@ember/string' import { computed } from '@ember/object' -import { deprecate } from '@ember/application/deprecations'; function objectWithKey (key, value) { return ((Array.isArray(value) && value.length > 0) || (!Array.isArray(value) && value)) ? {[key]: value} : {} @@ -36,14 +35,6 @@ function normalizeIconArgs (prefix, icon) { } if (typeof icon === 'object' && icon.prefix && icon.iconName) { - deprecate( - `Passing an icon object is no longer supported, use the icon name as a string instead ({{fa-icon '${icon.iconName}'}}). `, - false, - { - id: 'ember-fontawesome-no-object', - until: '0.2.0' - } - ); return icon }
Remove deprecation on importing icons directly (#<I>)
diff --git a/lib/coach/handler.rb b/lib/coach/handler.rb index <HASH>..<HASH> 100644 --- a/lib/coach/handler.rb +++ b/lib/coach/handler.rb @@ -1,4 +1,5 @@ require "coach/errors" +require "active_support/core_ext/object/try" module Coach class Handler
Add 'require' for 'try' method
diff --git a/src/shims/form-shim-extend.js b/src/shims/form-shim-extend.js index <HASH>..<HASH> 100644 --- a/src/shims/form-shim-extend.js +++ b/src/shims/form-shim-extend.js @@ -910,7 +910,7 @@ if(!Modernizr.formattribute || !Modernizr.fieldsetdisabled){ var stopPropagation = function(e){ e.stopPropagation(); }; - $(window).delegate('form[id]', 'submit', function(e){ + $(document).delegate('form[id]', 'submit', function(e){ if(!e.isDefaultPrevented()){ var form = this; var id = form.id; @@ -935,7 +935,7 @@ if(!Modernizr.formattribute || !Modernizr.fieldsetdisabled){ } }); - $(window).delegate('input[type="submit"][form], button[form], input[type="button"][form], input[type="image"][form], input[type="reset"][form]', 'click', function(e){ + $(document).delegate('input[type="submit"][form], button[form], input[type="button"][form], input[type="image"][form], input[type="reset"][form]', 'click', function(e){ if(!e.isDefaultPrevented()){ var trueForm = $.prop(this, 'form'); var formIn = this.form;
fix click/submit does not always bubble to the window object
diff --git a/tests/settings.py b/tests/settings.py index <HASH>..<HASH> 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -30,7 +30,6 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', )
SessionAuthenticationMiddleware not available in Django<I> and <I>. We don't really need it to run tests.
diff --git a/lib/proxy.js b/lib/proxy.js index <HASH>..<HASH> 100644 --- a/lib/proxy.js +++ b/lib/proxy.js @@ -35,7 +35,8 @@ function ReverseProxy(opts){ // Create a proxy server with custom application logic // var proxy = this.proxy = httpProxy.createProxyServer({ - xfwd: true + xfwd: true, + prependPath: false }); proxy.on('proxyReq', function(p, req, res, options) {
Opting out of http-proxy's prepend path
diff --git a/presto-main/src/main/java/com/facebook/presto/cost/PlanNodeStatsEstimateMath.java b/presto-main/src/main/java/com/facebook/presto/cost/PlanNodeStatsEstimateMath.java index <HASH>..<HASH> 100644 --- a/presto-main/src/main/java/com/facebook/presto/cost/PlanNodeStatsEstimateMath.java +++ b/presto-main/src/main/java/com/facebook/presto/cost/PlanNodeStatsEstimateMath.java @@ -110,6 +110,7 @@ public class PlanNodeStatsEstimateMath double newRowCount = left.getOutputRowCount() + right.getOutputRowCount(); Stream.concat(left.getSymbolsWithKnownStatistics().stream(), right.getSymbolsWithKnownStatistics().stream()) + .distinct() .forEach(symbol -> { statsBuilder.addSymbolStatistics(symbol, addColumnStats(
Do not process same symbol twice when adding stats
diff --git a/test/e2e/apps/rc.go b/test/e2e/apps/rc.go index <HASH>..<HASH> 100644 --- a/test/e2e/apps/rc.go +++ b/test/e2e/apps/rc.go @@ -256,9 +256,7 @@ var _ = SIGDescribe("ReplicationController", func() { ginkgo.By("waiting for ReplicationController is have a DeletionTimestamp") for event := range rcWatchChan { - rc, ok := event.Object.(*v1.ReplicationController) - framework.ExpectEqual(ok, true, "Unable to convert type of ReplicationController watch event") - if rc.ObjectMeta.DeletionTimestamp != nil { + if event.Type == "DELETED" { break } }
Update ReplicationController event watch check
diff --git a/src/photini/__init__.py b/src/photini/__init__.py index <HASH>..<HASH> 100644 --- a/src/photini/__init__.py +++ b/src/photini/__init__.py @@ -1,4 +1,4 @@ from __future__ import unicode_literals -__version__ = '2016.07.0' -build = '679 (d044cc6)' +__version__ = '2016.08.0' +build = '680 (eb4fc37)' diff --git a/src/photini/metadata.py b/src/photini/metadata.py index <HASH>..<HASH> 100644 --- a/src/photini/metadata.py +++ b/src/photini/metadata.py @@ -543,7 +543,14 @@ class String(MetadataValue): def __init__(self, value): if isinstance(value, list): value = value[0] - super(String, self).__init__(six.text_type(value).strip()) + super(String, self).__init__(value) + + @classmethod + def from_exif(cls, file_value): + value = six.text_type(file_value).strip() + if not value: + return None + return cls(value) def contains(self, other): return (not other) or (other.value in self.value)
Ensure EXIF empty strings are interpreted as None
diff --git a/test/src/Swiper.test.js b/test/src/Swiper.test.js index <HASH>..<HASH> 100644 --- a/test/src/Swiper.test.js +++ b/test/src/Swiper.test.js @@ -33,7 +33,7 @@ describe('<Swiper/>', function() { }) it('only renders <Slide/> children in wrapper', () => { - const wrapper = shallow( + const wrapper = mount( <Swiper> <Slide testProp="foo"/> <Slide testProp="foo"/>
shallow mounting does not work for testing that only <Slide /> components are mounted, use full mount
diff --git a/server/server_test.go b/server/server_test.go index <HASH>..<HASH> 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -35,6 +35,7 @@ func TestModPolicyAssign(t *testing.T) { Config: config.GlobalConfig{ As: 1, RouterId: "1.1.1.1", + Port: -1, }, }) assert.Nil(err)
server_test: stop listening Listening on well-known port require the root privileges. This patch stop listening to avoid that because this test doesn't need to accept a peer.
diff --git a/Model/Controls/MapTypeControl.php b/Model/Controls/MapTypeControl.php index <HASH>..<HASH> 100644 --- a/Model/Controls/MapTypeControl.php +++ b/Model/Controls/MapTypeControl.php @@ -71,7 +71,10 @@ class MapTypeControl public function addMapTypeId($mapTypeId) { if(in_array($mapTypeId, MapTypeId::getMapTypeIds())) - $this->mapTypeIds[] = $mapTypeId; + { + if(!in_array($mapTypeId, $this->mapTypeIds)) + $this->mapTypeIds[] = $mapTypeId; + } else throw new \InvalidArgumentException(sprintf('The map type id of a map type control can only be : %s.', implode(', ', MapTypeId::getMapTypeIds()))); }
Don't add map type id to a map type control if it already exists
diff --git a/tests/unit/test_zypp_plugins.py b/tests/unit/test_zypp_plugins.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_zypp_plugins.py +++ b/tests/unit/test_zypp_plugins.py @@ -13,8 +13,14 @@ import sys from tests.support.mock import MagicMock, patch # Import Salt Testing Libs -from tests.support.unit import TestCase -from zypp_plugin import BogusIO +from tests.support.unit import TestCase, skipIf + +try: + from zypp_plugin import BogusIO + + HAS_ZYPP_PLUGIN = True +except ImportError: + HAS_ZYPP_PLUGIN = False if sys.version_info >= (3,): BUILTINS_OPEN = "builtins.open" @@ -27,6 +33,7 @@ ZYPPNOTIFY_FILE = os.path.sep.join( ) +@skipIf(not HAS_ZYPP_PLUGIN, "zypp_plugin is missing.") class ZyppPluginsTestCase(TestCase): """ Test shipped libzypp plugins.
test_zypp_plugins: Protect import zypp_plugin by try/except pylint complains: tests/unit/test_zypp_plugins.py:<I>: [W<I>(3rd-party-module-not-gated), ] 3rd-party module import is not gated in a try/except: 'zypp_plugin'
diff --git a/javascript/cable_ready.js b/javascript/cable_ready.js index <HASH>..<HASH> 100644 --- a/javascript/cable_ready.js +++ b/javascript/cable_ready.js @@ -371,12 +371,16 @@ const perform = ( if (detail.element || options.emitMissingElementWarnings) DOMOperations[name](detail) } catch (e) { - if (detail.element) - console.log(`CableReady detected an error in ${name}! ${e.message}`) - else + if (detail.element) { + console.error( + `CableReady detected an error in ${name}! ${e.message}. If you need to support older browsers make sure you've included the corresponding polyfills. https://docs.stimulusreflex.com/setup#polyfills-for-ie11.` + ) + console.error(e) + } else { console.log( `CableReady ${name} failed due to missing DOM element for selector: '${detail.selector}'` ) + } } } }
Add more detail to the CableReady error message (#<I>) * add more detail to the CableReady error message * Currently it just states 'CableReady detected an error in morph! Object doesn't support this action' which makes it pretty hard to debug * run prettier-standard:format * add polyfills hint to error message * Update error message
diff --git a/src/InputFilter.php b/src/InputFilter.php index <HASH>..<HASH> 100644 --- a/src/InputFilter.php +++ b/src/InputFilter.php @@ -864,7 +864,7 @@ class InputFilter } // Remove all symbols - $attrSubSet[0] = preg_replace('/[^\p{L}\p{N}\s]/u', '', $attrSubSet[0]); + $attrSubSet[0] = preg_replace('/[^\p{L}\p{N}\-\s]/u', '', $attrSubSet[0]); // Remove all "non-regular" attribute names // AND blacklisted attributes
Update to allow for - character in attribute name
diff --git a/src/main/resources/META-INF/resources/primefaces-extensions/tooltip/1-tooltip.js b/src/main/resources/META-INF/resources/primefaces-extensions/tooltip/1-tooltip.js index <HASH>..<HASH> 100644 --- a/src/main/resources/META-INF/resources/primefaces-extensions/tooltip/1-tooltip.js +++ b/src/main/resources/META-INF/resources/primefaces-extensions/tooltip/1-tooltip.js @@ -115,7 +115,7 @@ PrimeFaces.widget.ExtTooltip = PrimeFaces.widget.BaseWidget.extend({ }, /** - * Convertes expressions into an array of Jquery Selectors. + * Converts expressions into an array of Jquery Selectors. * * e.g. @(div.mystyle :input) @(.ui-inputtext) to 'div.mystyle :input, .ui-inputtext' */
Fixed spelling mistake in doclet.
diff --git a/ospec/ospec.js b/ospec/ospec.js index <HASH>..<HASH> 100644 --- a/ospec/ospec.js +++ b/ospec/ospec.js @@ -32,12 +32,11 @@ else window.o = m() ctx = parent } o.only = function(subject, predicate, silent) { - if (!silent) { - console.log(highlight("/!\\ WARNING /!\\ o.only() mode")) - try {throw new Error} catch (e) { - console.log(o.cleanStackTrace(e) + "\n") - } - } + if (!silent) console.log( + highlight("/!\\ WARNING /!\\ o.only() mode") + "\n" + o.cleanStackTrace(ensureStackTrace(new Error)) + "\n", + cStyle("red"), "" + ) + o(subject, only = predicate) } o.spy = function(fn) {
[ospec] cleanup o.only