diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/zzk/service2/hoststate_test.go b/zzk/service2/hoststate_test.go index <HASH>..<HASH> 100644 --- a/zzk/service2/hoststate_test.go +++ b/zzk/service2/hoststate_test.go @@ -344,7 +344,7 @@ func (t *ZZKTest) TestHostStateListener_Spawn_AttachRun(c *C) { select { case e := <-ev: c.Assert(e.Type, Equals, client.EventNodeDeleted) - case <-time.After(time.Second): + case <-time.After(5 * time.Second): c.Fatalf("state not deleted") } handler.AssertExpectations(c)
bumped hoststate timeout for test
diff --git a/djongo/models/fields.py b/djongo/models/fields.py index <HASH>..<HASH> 100644 --- a/djongo/models/fields.py +++ b/djongo/models/fields.py @@ -49,8 +49,7 @@ def make_mdl(model, model_dict): def useful_field(field): - return field.concrete and not (field.is_relation - or isinstance(field, (AutoField, BigAutoField))) + return field.concrete and not isinstance(field, (AutoField, BigAutoField)) class ModelSubterfuge:
Fixed embedded relations (#<I>)
diff --git a/charmhelpers/contrib/openstack/amulet/deployment.py b/charmhelpers/contrib/openstack/amulet/deployment.py index <HASH>..<HASH> 100644 --- a/charmhelpers/contrib/openstack/amulet/deployment.py +++ b/charmhelpers/contrib/openstack/amulet/deployment.py @@ -121,7 +121,7 @@ class OpenStackAmuletDeployment(AmuletDeployment): # Charms which should use the source config option use_source = ['mysql', 'mongodb', 'rabbitmq-server', 'ceph', - 'ceph-osd', 'ceph-radosgw'] + 'ceph-osd', 'ceph-radosgw', 'ceph-mon'] # Charms which can not use openstack-origin, ie. many subordinates no_origin = ['cinder-ceph', 'hacluster', 'neutron-openvswitch', 'nrpe',
[trivial] Add ceph-mon to the list of charms that use the source configuration option
diff --git a/restapi/configure_mr_fusion.go b/restapi/configure_mr_fusion.go index <HASH>..<HASH> 100644 --- a/restapi/configure_mr_fusion.go +++ b/restapi/configure_mr_fusion.go @@ -236,6 +236,8 @@ func setupGlobalMiddleware(handler http.Handler) http.Handler { if strings.Contains(r.URL.Path, "/chronograf/v1") { handler.ServeHTTP(w, r) return + } else if r.URL.Path == "//" { + http.Redirect(w, r, "/index.html", http.StatusFound) } else { assets().Handler().ServeHTTP(w, r) return
Hotfix for double slash redirect
diff --git a/main.go b/main.go index <HASH>..<HASH> 100644 --- a/main.go +++ b/main.go @@ -39,7 +39,7 @@ var ( var usage = `Usage: boom [options...] <url> Options: - -n Number of requests to run. + -n Number of requests to run. Can not be -c Number of requests to run concurrently. Total number of requests cannot be smaller than the concurency level. @@ -63,6 +63,10 @@ func main() { n := *flagN c := *flagC + if n <= 0 || c <= 0 { + usageAndExit() + } + // If total number is smaller than concurrency level, // make the total number c. if c > n {
Sanity checks for n and c.
diff --git a/lib/ztk/background.rb b/lib/ztk/background.rb index <HASH>..<HASH> 100644 --- a/lib/ztk/background.rb +++ b/lib/ztk/background.rb @@ -95,6 +95,10 @@ module ZTK @parent_writer.close @parent_reader.close + STDOUT.reopen("/dev/null", "a") + STDERR.reopen("/dev/null", "a") + STDIN.reopen("/dev/null") + if !(data = block.call).nil? config.logger.debug { "write(#{data.inspect})" } @child_writer.write(Base64.encode64(Marshal.dump(data)))
reopen std out, err and in
diff --git a/lib/puppet/provider/package/dnf.rb b/lib/puppet/provider/package/dnf.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/provider/package/dnf.rb +++ b/lib/puppet/provider/package/dnf.rb @@ -28,7 +28,7 @@ Puppet::Type.type(:package).provide :dnf, :parent => :yum do end end - defaultfor :operatingsystem => :fedora, :operatingsystemmajrelease => ['22', '23', '24', '25'] + defaultfor :operatingsystem => :fedora, :operatingsystemmajrelease => (22..30).to_a def self.update_command # In DNF, update is deprecated for upgrade
(PUP-<I>) Update dnf provider to support future Fedora releases The dnf provider is hard coded to work with Fedora <I>-<I>. This update converts the release list into a range which will work Fedora through version <I>.
diff --git a/server.go b/server.go index <HASH>..<HASH> 100644 --- a/server.go +++ b/server.go @@ -118,12 +118,22 @@ func randomUint16Number(max uint16) uint16 { // AddRebroadcastInventory adds 'iv' to the list of inventories to be // rebroadcasted at random intervals until they show up in a block. func (s *server) AddRebroadcastInventory(iv *btcwire.InvVect) { + // Ignore if shutting down. + if atomic.LoadInt32(&s.shutdown) != 0 { + return + } + s.modifyRebroadcastInv <- broadcastInventoryAdd(iv) } // RemoveRebroadcastInventory removes 'iv' from the list of items to be // rebroadcasted if present. func (s *server) RemoveRebroadcastInventory(iv *btcwire.InvVect) { + // Ignore if shutting down. + if atomic.LoadInt32(&s.shutdown) != 0 { + return + } + s.modifyRebroadcastInv <- broadcastInventoryDel(iv) } @@ -802,6 +812,16 @@ out: timer.Stop() + // Drain channels before exiting so nothing is left waiting around + // to send. +cleanup: + for { + select { + case <-s.modifyRebroadcastInv: + default: + break cleanup + } + } s.wg.Done() }
Fix case where block mgr could hang on shutdown. This commit resolves an issue where it was possible the block manager could hang on shutdown due to inventory rebroadcasting. In particular, it adds checks to prevent modification of the of rebroadcast inventory during shutdown and adds a drain on the channel to ensure any outstanding messages are discarded. Found by @dajohi who also provided some of the code.
diff --git a/lxd/storage/storage.go b/lxd/storage/storage.go index <HASH>..<HASH> 100644 --- a/lxd/storage/storage.go +++ b/lxd/storage/storage.go @@ -184,7 +184,12 @@ func UsedBy(ctx context.Context, s *state.State, pool Pool, firstOnly bool, memb } // Get all buckets using the storage pool. - buckets, err := tx.GetStoragePoolBuckets(pool.ID(), memberSpecific) + poolID := pool.ID() + filters := []db.StorageBucketFilter{{ + PoolID: &poolID, + }} + + buckets, err := tx.GetStoragePoolBuckets(memberSpecific, filters...) if err != nil { return fmt.Errorf("Failed loading storage buckets: %w", err) }
lxd/storage/storage: tx.GetStoragePoolBuckets usage
diff --git a/salt/pillar/varstack_pillar.py b/salt/pillar/varstack_pillar.py index <HASH>..<HASH> 100644 --- a/salt/pillar/varstack_pillar.py +++ b/salt/pillar/varstack_pillar.py @@ -22,8 +22,6 @@ __virtualname__ = 'varstack' def __virtual__(): if not HAS_VARSTACK: - log.error('Varstack ext_pillar is enabled in configuration but ' - 'could not be loaded because Varstack is not installed.') return False return __virtualname__
Don't log in __virtual__
diff --git a/src/parsers/ini.js b/src/parsers/ini.js index <HASH>..<HASH> 100644 --- a/src/parsers/ini.js +++ b/src/parsers/ini.js @@ -157,7 +157,7 @@ module.exports = (function() { * @private */ function _isComment(line) { - return !line || regex.comment.test(line); + return regex.comment.test(line || ''); } /** @@ -165,11 +165,11 @@ module.exports = (function() { * * @method _getNewSection * @param [line] {String} The line to check. - * @returns {Boolean} + * @returns {String} The section name, if found. * @private */ function _getNewSection(line) { - var result = new RegExp(regex.section).exec(line); + var result = new RegExp(regex.section).exec(line || ''); return result && result[1]; } @@ -182,8 +182,8 @@ module.exports = (function() { * @private */ function _isNotValidIni(line) { - var check = line.match(regex.bad); - return check && check.length > 1; + var check = (line || '').match(regex.bad); + return !!(check && check.length > 1); } return Parser;
Correct documentation for private function and make all private functions safer to use
diff --git a/spikeextractors/extractors/yassextractors/yassextractors.py b/spikeextractors/extractors/yassextractors/yassextractors.py index <HASH>..<HASH> 100644 --- a/spikeextractors/extractors/yassextractors/yassextractors.py +++ b/spikeextractors/extractors/yassextractors/yassextractors.py @@ -19,7 +19,7 @@ class YassSortingExtractor(SortingExtractor): has_default_locations = False is_writable = False - installation_mesg = "YASS NOT INSTALLED" # error message when not installed + installation_mesg = "To use the Yass extractor, install pyyaml: \n\n pip install pyyaml\n\n" # error message when not installed def __init__(self, folder_path):
Update spikeextractors/extractors/yassextractors/yassextractors.py
diff --git a/test/test_pkcs11_crypt.rb b/test/test_pkcs11_crypt.rb index <HASH>..<HASH> 100644 --- a/test/test_pkcs11_crypt.rb +++ b/test/test_pkcs11_crypt.rb @@ -3,7 +3,7 @@ require "pkcs11" require "test/helper" require "openssl" -class TestPkcs11Session < Test::Unit::TestCase +class TestPkcs11Crypt < Test::Unit::TestCase attr_reader :slots attr_reader :slot attr_reader :session
bugfix: cypto-test class name doesn't match file name
diff --git a/javascript/node/selenium-webdriver/lib/webdriver.js b/javascript/node/selenium-webdriver/lib/webdriver.js index <HASH>..<HASH> 100644 --- a/javascript/node/selenium-webdriver/lib/webdriver.js +++ b/javascript/node/selenium-webdriver/lib/webdriver.js @@ -989,7 +989,7 @@ class WebDriver { * @private */ findElementInternal_(locatorFn, context) { - return this.call(() => locatorFn(context)).then(function(result) { + return Promise.resolve(locatorFn(context)).then(function(result) { if (Array.isArray(result)) { result = result[0]; } @@ -1029,7 +1029,7 @@ class WebDriver { * @private */ findElementsInternal_(locatorFn, context) { - return this.call(() => locatorFn(context)).then(function(result) { + return Promise.resolve(locatorFn(context)).then(function(result) { if (result instanceof WebElement) { return [result]; }
[js] cleanup from bad rebase
diff --git a/glances/plugins/glances_raid.py b/glances/plugins/glances_raid.py index <HASH>..<HASH> 100644 --- a/glances/plugins/glances_raid.py +++ b/glances/plugins/glances_raid.py @@ -61,8 +61,7 @@ class Plugin(GlancesPlugin): if self.get_input() == 'local': # Update stats using the PyMDstat lib (https://github.com/nicolargo/pymdstat) try: - # !!! Path ONLY for dev - mds = MdStat('/home/nicolargo/dev/pymdstat/tests/mdstat.04') + mds = MdStat() self.stats = mds.get_stats()['arrays'] except Exception as e: logger.debug("Can not grab RAID stats (%s)" % e)
RAID plugin ok for beta testing
diff --git a/molgenis-core-ui/src/main/resources/js/component/Questionnaire.js b/molgenis-core-ui/src/main/resources/js/component/Questionnaire.js index <HASH>..<HASH> 100644 --- a/molgenis-core-ui/src/main/resources/js/component/Questionnaire.js +++ b/molgenis-core-ui/src/main/resources/js/component/Questionnaire.js @@ -39,6 +39,7 @@ modal: false, enableOptionalFilter: false, saveOnBlur: true, + enableFormIndex: true, beforeSubmit: this._handleBeforeSubmit, onValueChange: this._handleValueChange }, SubmitButton);
Show index by default for Questionnaires
diff --git a/mod/assign/feedback/comments/locallib.php b/mod/assign/feedback/comments/locallib.php index <HASH>..<HASH> 100644 --- a/mod/assign/feedback/comments/locallib.php +++ b/mod/assign/feedback/comments/locallib.php @@ -204,7 +204,7 @@ class assign_feedback_comments extends assign_feedback_plugin { * @return void */ public function get_settings(MoodleQuickForm $mform) { - $default = get_config('assignfeedback_comments', 'inline'); + $default = $this->get_config('commentinline'); $mform->addElement('selectyesno', 'assignfeedback_comments_commentinline', get_string('commentinline', 'assignfeedback_comments'));
MDL-<I> Assign: Set up the commentinline form element properly.
diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index <HASH>..<HASH> 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -195,7 +195,7 @@ const defaultNotes = `1. Get the application URL by running these commands: {{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT/login + echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}'
fix(create): incorrect URL in default NOTES.txt
diff --git a/backtrader/resamplerfilter.py b/backtrader/resamplerfilter.py index <HASH>..<HASH> 100644 --- a/backtrader/resamplerfilter.py +++ b/backtrader/resamplerfilter.py @@ -162,8 +162,8 @@ class _BaseResampler(with_metaclass(metabase.MetaParams, object)): return point def _barover_subdays(self, data): - # Put session end in context of current datetime - sessend = data.datetime.tm2dtime(data.sessionend) + # Put session end in context of last bar datetime + sessend = int(self.bar.datetime) + data.sessionend if data.datetime[0] > sessend: # Next session is on (defaults to next day)
Fixes #<I> by correctly calculating when the current session ends for the last bar (when next session data is already in)
diff --git a/src/DI/ServiceManager.php b/src/DI/ServiceManager.php index <HASH>..<HASH> 100644 --- a/src/DI/ServiceManager.php +++ b/src/DI/ServiceManager.php @@ -27,11 +27,24 @@ class ServiceManager implements \Phalcon\DI\InjectionAwareInterface { use InjectionAwareTrait; + /** + * Alias for getService. + * + * @param $name + * @return object + */ public function get($name) { return $this->getService($name); } + /** + * Try to register and return service. + * + * @param $name + * @return object + * @throws Service\Exception + */ public function getService($name) { try { @@ -43,7 +56,34 @@ class ServiceManager implements \Phalcon\DI\InjectionAwareInterface throw new Exception($ex->getMessage().', using: '.$name); } } - + + /** + * Alias for hasService. + * + * @param $name + * @return bool + */ + public function has($name) + { + return $this->hasService($name); + } + + /** + * Try to register service and return information about service existence. + * + * @param $name + * @return bool + */ + public function hasService($name) + { + try { + $service = $this->getService($name); + return !empty($service); + } catch (\Phalcon\DI\Exception $ex) { + return false; + } + } + private function isRegisteredService($name) { if ($this->di->has($name)) {
added has & hasService method to serviceManager
diff --git a/keyring/backends/SecretService.py b/keyring/backends/SecretService.py index <HASH>..<HASH> 100644 --- a/keyring/backends/SecretService.py +++ b/keyring/backends/SecretService.py @@ -53,12 +53,23 @@ class Keyring(KeyringBackend): {"username": username, "service": service}) _, session = secret_service.OpenSession("plain", "") no_longer_locked, prompt = secret_service.Unlock(locked) - assert prompt == "/" + self._check_prompt(prompt) secrets = secret_service.GetSecrets(unlocked + locked, session, byte_arrays=True) for item_path, secret in secrets.iteritems(): return unicode(secret[2]) + def _check_prompt(self, prompt): + """ + Ensure we support the supplied prompt value. + + from http://standards.freedesktop.org/secret-service/re01.html: + Prompt is a prompt object which can be used to unlock the remaining + objects, or the special value '/' when no prompt is necessary. + """ + if not prompt == '/': + raise ValueError("Keyring does not support prompts") + @property def collection(self): import dbus
Documented the unsupported prompt values.
diff --git a/args4j/src/org/kohsuke/args4j/spi/ArrayFieldSetter.java b/args4j/src/org/kohsuke/args4j/spi/ArrayFieldSetter.java index <HASH>..<HASH> 100644 --- a/args4j/src/org/kohsuke/args4j/spi/ArrayFieldSetter.java +++ b/args4j/src/org/kohsuke/args4j/spi/ArrayFieldSetter.java @@ -101,7 +101,7 @@ final class ArrayFieldSetter implements Getter, Setter { f.set(bean, ary); } - public Object getValue() throws CmdLineException { + public Object getValue() { f.setAccessible(true); try { return f.get(bean);
Unnecessary exception declaration
diff --git a/config/auth.php b/config/auth.php index <HASH>..<HASH> 100644 --- a/config/auth.php +++ b/config/auth.php @@ -126,8 +126,11 @@ return [ |-------------------------------------------------------------------------- | | The login form is created independently of the admin template. It's just something - | on its own. The default view folder is "views/admin/login/admin_login_view_folder/". The default - | assets folder is "public/admin/login/admin_login_view_folder/" + | on its own. The default "root" view folder is: + | public/packages/usermanagement/admin/logout/ + | + | FYI: The default "root" admin view folder is: + | public/packages/lasallecmsadmin/ | */ //'admin_login_view_folder' => 'default',
Correct error in config file's comments. #<I>
diff --git a/tests/example/BundleRoutingTest.php b/tests/example/BundleRoutingTest.php index <HASH>..<HASH> 100644 --- a/tests/example/BundleRoutingTest.php +++ b/tests/example/BundleRoutingTest.php @@ -12,7 +12,6 @@ namespace Sensio\Bundle\GeneratorBundle\Manipulator; use Gnugat\Redaktilo\EditorFactory; -use Symfony\Component\Filesystem\Exception\IOException; use Symfony\Component\Filesystem\Filesystem as SymfonyFilesystem; class RoutingManipulator extends \PHPUnit_Framework_TestCase @@ -30,10 +29,8 @@ class RoutingManipulator extends \PHPUnit_Framework_TestCase $copyFilename = sprintf(self::CONFIG, $rootPath, 'copies'); $expectationFilename = sprintf(self::CONFIG, $rootPath, 'expectations'); - $symfonyFilesystem = new SymfonyFilesystem(); - if ($symfonyFilesystem->exists($copyFilename)) { - $symfonyFilesystem->remove($copyFilename); - } + $fileCopier = new SymfonyFilesystem(); + $fileCopier->copy($sourceFilename, $copyFilename, true); $this->configPath = $copyFilename; $this->expectedConfigPath = $expectationFilename;
Made use case BundleRoutingTest similar to others tests
diff --git a/core/commands/pubsub.go b/core/commands/pubsub.go index <HASH>..<HASH> 100644 --- a/core/commands/pubsub.go +++ b/core/commands/pubsub.go @@ -52,6 +52,18 @@ to be used in a production environment. To use, the daemon must be run with '--enable-pubsub-experiment'. `, + LongDescription: ` +ipfs pubsub sub subscribes to messages on a given topic. + +This is an experimental feature. It is not intended in its current state +to be used in a production environment. + +To use, the daemon must be run with '--enable-pubsub-experiment'. + +This command outputs data in the following encodings: + * "json" +(Specified by the "--encoding" or "--enc" flag) +`, }, Arguments: []cmds.Argument{ cmds.StringArg("topic", true, false, "String name of topic to subscribe to."),
Turns out, the Message will Marshal properly. License: MIT
diff --git a/capture/noworkflow/now/persistence/models/trial_dot.py b/capture/noworkflow/now/persistence/models/trial_dot.py index <HASH>..<HASH> 100644 --- a/capture/noworkflow/now/persistence/models/trial_dot.py +++ b/capture/noworkflow/now/persistence/models/trial_dot.py @@ -74,7 +74,7 @@ class TrialDot(Model): self.synonyms = {} self.departing_arrows = {} self.arriving_arrows = {} - self.variables = {v.id: v for v in self.trial.variables} + self.variables = {} def _add_variable(self, variable, depth, config): """Create variable for graph @@ -415,6 +415,7 @@ class TrialDot(Model): self.synonyms = {} self.departing_arrows = defaultdict(dict) self.arriving_arrows = defaultdict(dict) + self.variables = {v.id: v for v in self.trial.variables} def export_text(self): """Export facts from trial as text"""
Fix performance issues with now list and now history
diff --git a/src/Engine/SocketIO/Version1X.php b/src/Engine/SocketIO/Version1X.php index <HASH>..<HASH> 100644 --- a/src/Engine/SocketIO/Version1X.php +++ b/src/Engine/SocketIO/Version1X.php @@ -136,9 +136,12 @@ class Version1X extends AbstractSocketIO if (isset($this->url['query'])) { $query = array_replace($query, $this->url['query']); } + + $context = $this->options['context']; + $context['http'] = ['timeout' => (float) $this->options['timeout']]; $url = sprintf('%s://%s:%d/%s/?%s', $this->url['scheme'], $this->url['host'], $this->url['port'], trim($this->url['path'], '/'), http_build_query($query)); - $result = @file_get_contents($url, false, stream_context_create(['http' => ['timeout' => (float) $this->options['timeout']]])); + $result = @file_get_contents($url, false, stream_context_create($context)); if (false === $result) { throw new ServerConnectionFailureException;
Fix SSL handshake to allow self-signed certificates
diff --git a/lib/nodefs-handler.js b/lib/nodefs-handler.js index <HASH>..<HASH> 100644 --- a/lib/nodefs-handler.js +++ b/lib/nodefs-handler.js @@ -357,7 +357,7 @@ _handleFile(file, stats, initialAdd) { // kick off the watcher const closer = this._watchWithNodeFs(file, async (path, newStats) => { if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return; - if (!newStats || newStats && newStats.mtimeMs === 0) { + if (!newStats || newStats.mtimeMs === 0) { try { const newStats = await stat(file); if (this.fsw.closed) return;
nodefs-handler.js: fix variable always evaluating to true.
diff --git a/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php b/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php index <HASH>..<HASH> 100644 --- a/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php +++ b/tests/Symfony/Tests/Component/Locale/Stub/StubIntlDateFormatterTest.php @@ -304,13 +304,13 @@ class StubIntlDateFormatterTest extends \PHPUnit_Framework_TestCase */ public function testGetCalendar() { - $formatter = new StubIntlDateFormatter('en'); + $formatter = new StubIntlDateFormatter('en', StubIntlDateFormatter::FULL, StubIntlDateFormatter::NONE); $formatter->setCalendar(StubIntlDateFormatter::GREGORIAN); } public function testSetCalendar() { - $formatter = new StubIntlDateFormatter('en'); + $formatter = new StubIntlDateFormatter('en', StubIntlDateFormatter::FULL, StubIntlDateFormatter::NONE); $this->assertEquals(StubIntlDateFormatter::GREGORIAN, $formatter->getCalendar()); } }
[Locale] Fixed two tests
diff --git a/pkg/fileutil/purge_test.go b/pkg/fileutil/purge_test.go index <HASH>..<HASH> 100644 --- a/pkg/fileutil/purge_test.go +++ b/pkg/fileutil/purge_test.go @@ -86,7 +86,7 @@ func TestPurgeFileHoldingLock(t *testing.T) { stop := make(chan struct{}) errch := PurgeFile(dir, "test", 3, time.Millisecond, stop) - time.Sleep(5 * time.Millisecond) + time.Sleep(20 * time.Millisecond) fnames, err := ReadDir(dir) if err != nil { @@ -112,7 +112,7 @@ func TestPurgeFileHoldingLock(t *testing.T) { t.Fatal(err) } - time.Sleep(5 * time.Millisecond) + time.Sleep(20 * time.Millisecond) fnames, err = ReadDir(dir) if err != nil {
pkg/fileutil: wait longer before checking purge results multiple cpu running may be slower than single cpu running, so it may take longer time to remove files. Increase from 5ms to <I>ms to give it enough time.
diff --git a/raiden_contracts/tests/test_channel_settle.py b/raiden_contracts/tests/test_channel_settle.py index <HASH>..<HASH> 100644 --- a/raiden_contracts/tests/test_channel_settle.py +++ b/raiden_contracts/tests/test_channel_settle.py @@ -439,6 +439,14 @@ def test_settle_wrong_state_fail( # Channel is settled call_settle(token_network, channel_identifier, A, vals_A, B, vals_B) + (settle_block_number, state) = token_network.functions.getChannelInfo( + channel_identifier, + A, + B, + ).call() + assert state == ChannelState.REMOVED + assert settle_block_number == 0 + def test_settle_wrong_balance_hash( web3,
Add post settle check (PR review) As mentioned <URL>
diff --git a/lxd/instance/drivers/driver_qemu_templates.go b/lxd/instance/drivers/driver_qemu_templates.go index <HASH>..<HASH> 100644 --- a/lxd/instance/drivers/driver_qemu_templates.go +++ b/lxd/instance/drivers/driver_qemu_templates.go @@ -279,9 +279,10 @@ mem-path = "{{$hugepages}}" prealloc = "on" discard-data = "on" {{- else}} -qom-type = "memory-backend-ram" +qom-type = "memory-backend-memfd" {{- end }} size = "{{$memory}}M" +share = "on" [numa] type = "node"
lxd/instance/drivers: Change memory backend This changes the memory backend to memory-backend-memfd. Also, this turns on `share`. Both are required for virtio-fs.
diff --git a/lib/rack/passbook_rack.rb b/lib/rack/passbook_rack.rb index <HASH>..<HASH> 100644 --- a/lib/rack/passbook_rack.rb +++ b/lib/rack/passbook_rack.rb @@ -7,11 +7,7 @@ module Rack end def call(env) - if env['HTTP_AUTHORIZATION'] - parameters_duplicate = env['HTTP_AUTHORIZATION'].dup - parameters_duplicate.gsub!(/ApplePass /,'') - @parameters['authToken'] = parameters_duplicate - end + @parameters['authToken'] = env['HTTP_AUTHORIZATION'].gsub(/ApplePass /,'') if env['HTTP_AUTHORIZATION'] @parameters.merge!(Rack::Utils.parse_nested_query(env['QUERY_STRING'])) method_and_params = find_method env['PATH_INFO'] if method_and_params
more effective code to get AuthToken
diff --git a/helpers/blog_helper.php b/helpers/blog_helper.php index <HASH>..<HASH> 100644 --- a/helpers/blog_helper.php +++ b/helpers/blog_helper.php @@ -24,5 +24,33 @@ if ( ! function_exists( 'blog_setting' ) ) } } + +// -------------------------------------------------------------------------- + + +/** + * Get latest blog posts + * + * @access public + * @param none + * @return void + */ +if ( ! function_exists( 'blog_latest_posts' ) ) +{ + function blog_latest_posts( $limit = 9 ) + { + // Load the model if it's not already loaded + if ( ! get_instance()->load->model_is_loaded( 'post' ) ) : + + get_instance()->load->model( 'blog/blog_post_model', 'post' ); + + endif; + + // -------------------------------------------------------------------------- + + return get_instance()->post->get_latest( $limit ); + } +} + /* End of file blog_helper.php */ /* Location: ./modules/blog/helpers/blog_helper.php */ \ No newline at end of file
added blog_get_latest() helper.
diff --git a/plugins/UserCountry/VisitorGeolocator.php b/plugins/UserCountry/VisitorGeolocator.php index <HASH>..<HASH> 100644 --- a/plugins/UserCountry/VisitorGeolocator.php +++ b/plugins/UserCountry/VisitorGeolocator.php @@ -189,7 +189,7 @@ class VisitorGeolocator $this->logger->debug('Updating visit with idvisit = {idVisit} (IP = {ip}). Changes: {changes}', array( 'idVisit' => $idVisit, 'ip' => $ip, - 'changes' => $valuesToUpdate + 'changes' => json_encode($valuesToUpdate) )); $this->dao->updateVisits($valuesToUpdate, $idVisit); @@ -309,4 +309,4 @@ class VisitorGeolocator } return self::$defaultLocationCache; } -} \ No newline at end of file +}
GeoIP re-attribution: debug output now shows changes to visits geo-location (#<I>) Re-create <URL>
diff --git a/lib/client.js b/lib/client.js index <HASH>..<HASH> 100644 --- a/lib/client.js +++ b/lib/client.js @@ -182,7 +182,7 @@ extend(Raven.prototype, { var shouldSend = true; if (!this._enabled) shouldSend = false; - if (this.shouldSendCallback && !this.shouldSendCallback()) shouldSend = false; + if (this.shouldSendCallback && !this.shouldSendCallback(kwargs)) shouldSend = false; if (shouldSend) { this.send(kwargs, cb);
sending kwargs into shouldSendCallback() (#<I>)
diff --git a/simuvex/s_procedure.py b/simuvex/s_procedure.py index <HASH>..<HASH> 100644 --- a/simuvex/s_procedure.py +++ b/simuvex/s_procedure.py @@ -77,19 +77,22 @@ class SimProcedure(SimRun): raise SimProcedureError("Unsupported calling convention %s for arguments", self.convention) + def get_arg_value(self, index): + return self.state.expr_value(self.get_arg_expr(index)) + # Sets an expression as the return value. Also updates state. def set_return_expr(self, expr): if self.state.arch.name == "AMD64": self.state.store_reg(16, expr) - else: - raise SimProcedureError("Unsupported calling convention %s for returns", self.convention) + else: + raise SimProcedureError("Unsupported calling convention %s for returns", self.convention) # Does a return (pop, etc) and returns an bitvector expression representing the return value. Also updates state. def do_return(self): if self.state.arch.name == "AMD64": return self.state.stack_pop() - else: - raise SimProcedureError("Unsupported platform %s for return emulation.", self.state.arch.name) + else: + raise SimProcedureError("Unsupported platform %s for return emulation.", self.state.arch.name) # Adds an exit representing the function returning. Modifies the state. def exit_return(self, expr=None):
fixed spacing, added get_arg_value
diff --git a/generators/gae/index.js b/generators/gae/index.js index <HASH>..<HASH> 100644 --- a/generators/gae/index.js +++ b/generators/gae/index.js @@ -23,6 +23,7 @@ const execSync = require('child_process').execSync; const chalk = require('chalk'); const _ = require('lodash'); const BaseGenerator = require('../generator-base'); +const statistics = require('../statistics'); const constants = require('../generator-constants'); @@ -497,8 +498,7 @@ module.exports = class extends BaseGenerator { get configuring() { return { insight() { - const insight = this.insight(); - insight.trackWithEvent('generator', 'gae'); + statistics.sendSubGenEvent('generator', 'gae'); }, configureProject() {
Use the new statistics mechanism for GAE
diff --git a/salt/renderers/json_mako.py b/salt/renderers/json_mako.py index <HASH>..<HASH> 100644 --- a/salt/renderers/json_mako.py +++ b/salt/renderers/json_mako.py @@ -36,7 +36,7 @@ def render(template_file, env='', sls=''): # Ensure that we're not passing lines with a shebang in the JSON. to_return = [] for line in tmp_data['data'].split('\n'): - if line and line[0] != '#!': + if line and "#!" not in line: to_return.append(line) to_return = '\n'.join(to_return)
improved the shebang removal for JSON
diff --git a/docker/models/images.py b/docker/models/images.py index <HASH>..<HASH> 100644 --- a/docker/models/images.py +++ b/docker/models/images.py @@ -84,9 +84,9 @@ class Image(Model): Example: - >>> image = cli.get_image("busybox:latest") + >>> image = cli.images.get("busybox:latest") >>> f = open('/tmp/busybox-latest.tar', 'wb') - >>> for chunk in image: + >>> for chunk in image.save(): >>> f.write(chunk) >>> f.close() """
[DOCS] Update the Image.save documentation with a working example. Issue #<I>
diff --git a/src/main/java/de/cinovo/cloudconductor/api/IRestPath.java b/src/main/java/de/cinovo/cloudconductor/api/IRestPath.java index <HASH>..<HASH> 100644 --- a/src/main/java/de/cinovo/cloudconductor/api/IRestPath.java +++ b/src/main/java/de/cinovo/cloudconductor/api/IRestPath.java @@ -188,7 +188,7 @@ public interface IRestPath { /** * approve the started state of a service */ - public static final String SERVICE_APPROVE_STARTED = "/{" + IRestPath.VAR_SERVICE + "}/approvestarted/{" + IRestPath.VAR_PKG + "}"; + public static final String SERVICE_APPROVE_STARTED = "/{" + IRestPath.VAR_SERVICE + "}/approvestarted/{" + IRestPath.VAR_HOST + "}"; // ------------------------------------------------------- // SSH KEY
fixes the path for approveServiceStarted in service interface
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -export { Alert } from './alert' +export { Alert, InlineAlert } from './alert' export { Autocomplete, AutocompleteItem } from './autocomplete' export { Avatar } from './avatar' export { BadgeAppearances, Badge, Pill } from './badges'
Fix the InlineAlert export
diff --git a/netty/src/main/java/io/grpc/transport/netty/NettyServer.java b/netty/src/main/java/io/grpc/transport/netty/NettyServer.java index <HASH>..<HASH> 100644 --- a/netty/src/main/java/io/grpc/transport/netty/NettyServer.java +++ b/netty/src/main/java/io/grpc/transport/netty/NettyServer.java @@ -121,7 +121,7 @@ public class NettyServer implements Server { @Override public void shutdown() { - if (channel == null || channel.isOpen()) { + if (channel == null || !channel.isOpen()) { return; } channel.close().addListener(new ChannelFutureListener() {
Fix netty closure check During Service removal a condition was inverted but incompletely, which caused the Netty server to never shutdown.
diff --git a/subprojects/groovy-xml/src/main/java/groovy/xml/dom/DOMCategory.java b/subprojects/groovy-xml/src/main/java/groovy/xml/dom/DOMCategory.java index <HASH>..<HASH> 100644 --- a/subprojects/groovy-xml/src/main/java/groovy/xml/dom/DOMCategory.java +++ b/subprojects/groovy-xml/src/main/java/groovy/xml/dom/DOMCategory.java @@ -37,7 +37,6 @@ import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; @@ -585,4 +584,4 @@ public class DOMCategory { return nodes.get(index); } } -} \ No newline at end of file +}
Remove unused imports from DOMCategory. Testing the waters for committer access.
diff --git a/xclim/ensembles/_robustness.py b/xclim/ensembles/_robustness.py index <HASH>..<HASH> 100644 --- a/xclim/ensembles/_robustness.py +++ b/xclim/ensembles/_robustness.py @@ -6,7 +6,7 @@ Ensemble Robustness metrics. Robustness metrics are used to estimate the confidence of the climate change signal of an ensemble. This submodule is inspired by and tries to follow the guidelines of the IPCC, more specifically the 12th chapter of the Working Group 1's contribution to -the AR5 (:footcite:p:`collins_long-term_2013`, see box 12.1). +the AR5 :cite:p:`collins_long-term_2013` (see box 12.1). """ from __future__ import annotations diff --git a/xclim/indices/_agro.py b/xclim/indices/_agro.py index <HASH>..<HASH> 100644 --- a/xclim/indices/_agro.py +++ b/xclim/indices/_agro.py @@ -465,7 +465,7 @@ def cool_night_index( References ---------- - :footcite:cts:`tonietto_multicriteria_2004` + :cite:cts:`tonietto_multicriteria_2004` """ tasmin = convert_units_to(tasmin, "degC")
Fix artefact `footcite` directives that were causing failures on LaTeX builds
diff --git a/user-switching.php b/user-switching.php index <HASH>..<HASH> 100644 --- a/user-switching.php +++ b/user-switching.php @@ -182,7 +182,7 @@ class user_switching { } else { wp_safe_redirect( add_query_arg( $args, admin_url() ) ); } - die(); + exit; } else { wp_die( esc_html__( 'Could not switch users.', 'user-switching' ) ); @@ -224,7 +224,7 @@ class user_switching { } else { wp_safe_redirect( add_query_arg( $args, admin_url( 'users.php' ) ) ); } - die(); + exit; } else { wp_die( esc_html__( 'Could not switch users.', 'user-switching' ) ); } @@ -252,7 +252,7 @@ class user_switching { } else { wp_safe_redirect( add_query_arg( $args, home_url() ) ); } - die(); + exit; } else { /* Translators: "switch off" means to temporarily log out */ wp_die( esc_html__( 'Could not switch off.', 'user-switching' ) );
Standardise on `exit` instead of `die()`.
diff --git a/xapian_backend.py b/xapian_backend.py index <HASH>..<HASH> 100755 --- a/xapian_backend.py +++ b/xapian_backend.py @@ -17,7 +17,7 @@ from django.core.exceptions import ImproperlyConfigured from django.utils.encoding import smart_unicode, force_unicode from haystack.backends import BaseSearchBackend, BaseSearchQuery, SearchNode, log_query -from haystack.exceptions import HaystackError, MissingDependency +from haystack.exceptions import HaystackError, MissingDependency, MoreLikeThisError from haystack.fields import DateField, DateTimeField, IntegerField, FloatField, BooleanField, MultiValueField from haystack.models import SearchResult from haystack.utils import get_identifier
Import MoreLikeThisError. This resolves issue <I>
diff --git a/src/views/Flat.js b/src/views/Flat.js index <HASH>..<HASH> 100644 --- a/src/views/Flat.js +++ b/src/views/Flat.js @@ -51,11 +51,9 @@ var planeCmp = [ ]; // A zoom of exactly 0 breaks some computations, so we force a minimum positive -// value. We use 9 decimal places for the epsilon value since this is the -// maximum number of significant digits for a 32-bit floating-point number. -// Note that after a certain zoom level, rendering quality will be affected -// by the loss of precision in floating-point computations. -var zoomLimitEpsilon = 0.000000001; +// value. We use 6 decimal places for the epsilon value to avoid broken +// rendering due to loss of precision in floating point computations. +var zoomLimitEpsilon = 0.000001; /**
Use a more conservative value for the min/max zoom epsilon. We had already done this for RectilinearView, but not for FlatView.
diff --git a/src/com/google/javascript/jscomp/parsing/ParserRunner.java b/src/com/google/javascript/jscomp/parsing/ParserRunner.java index <HASH>..<HASH> 100644 --- a/src/com/google/javascript/jscomp/parsing/ParserRunner.java +++ b/src/com/google/javascript/jscomp/parsing/ParserRunner.java @@ -101,7 +101,7 @@ public final class ParserRunner { Node root = null; List<Comment> comments = ImmutableList.of(); FeatureSet features = p.getFeatures(); - if (tree != null && (!es6ErrorReporter.hadError() || config.preserveDetailedSourceInfo)) { + if (tree != null && (!es6ErrorReporter.hadError() || config.keepGoing)) { IRFactory factory = IRFactory.transformTree(tree, sourceFile, sourceString, config, errorReporter); root = factory.getResultNode();
Fix one more spot where we were reading the wrong IDE mode flag. ------------- Created by MOE: <URL>
diff --git a/svg/charts/line.py b/svg/charts/line.py index <HASH>..<HASH> 100644 --- a/svg/charts/line.py +++ b/svg/charts/line.py @@ -28,6 +28,10 @@ class Line(Graph): stylesheet_names = Graph.stylesheet_names + ['plot.css'] + def __init__(self, fields, *args, **kargs): + self.fields = fields + super(Line, self).__init__(*args, **kargs) + def max_value(self): data = map(itemgetter('data'), self.data) if self.stacked: @@ -72,10 +76,11 @@ class Line(Graph): scale_division = self.scale_divisions or (scale_range / 10.0) if self.scale_integers: - scale_division = min(1, round(scale_division)) - - if max_value % scale_division == 0: + scale_division = max(1, round(scale_division)) + + if max_value % scale_division != 0: max_value += scale_division + labels = tuple(float_range(min_value, max_value, scale_division)) return labels
Thanks to Emmanuel Blot for patch: * Adds dedicated initializer to line.py consistent with bar.py to define the fields. * Corrected buggy logic in y-axis label rendering.
diff --git a/Nf/Front/Response/Http.php b/Nf/Front/Response/Http.php index <HASH>..<HASH> 100644 --- a/Nf/Front/Response/Http.php +++ b/Nf/Front/Response/Http.php @@ -236,9 +236,16 @@ class Http extends AbstractResponse // sends header to allow the browser to cache the response a given time public function setCacheable($minutes) { - $this->setHeader('Expires', gmdate('D, d M Y H:i:s', time() + $minutes * 60) . ' GMT', true); - $this->setHeader('Cache-Control', 'max-age=' . $minutes * 60, true); - $this->setHeader('Pragma', 'public', true); + if($minutes <= 0) { + $this->setHeader('Cache-Control', 'private, no-cache, no-store, must-revalidate'); + $this->setHeader('Expires', '-1'); + $this->setHeader('Pragma', 'no-cache'); + } + else { + $this->setHeader('Expires', gmdate('D, d M Y H:i:s', time() + $minutes * 60) . ' GMT', true); + $this->setHeader('Cache-Control', 'max-age=' . $minutes * 60, true); + $this->setHeader('Pragma', 'public', true); + } } public function getContentType()
setCacheable 0 for no-cache
diff --git a/lib/rabl/version.rb b/lib/rabl/version.rb index <HASH>..<HASH> 100644 --- a/lib/rabl/version.rb +++ b/lib/rabl/version.rb @@ -1,3 +1,3 @@ module Rabl - VERSION = "0.1.0" + VERSION = "0.1.1" end
Bumped to version <I>
diff --git a/dp_tornado/helper/web/url/__init__.py b/dp_tornado/helper/web/url/__init__.py index <HASH>..<HASH> 100644 --- a/dp_tornado/helper/web/url/__init__.py +++ b/dp_tornado/helper/web/url/__init__.py @@ -133,7 +133,13 @@ class UrlHelper(dpHelper): return self.unquote(*args, **kwargs) def quote(self, e, safe='', **kwargs): - return requests.utils.quote(e, safe=safe, **kwargs) + if self.helper.misc.system.py_version <= 2: + return requests.utils.quote(e, safe=safe) + else: + return requests.utils.quote(e, safe=safe, **kwargs) def unquote(self, e, **kwargs): - return requests.utils.unquote(e, **kwargs) + if self.helper.misc.system.py_version <= 2: + return requests.utils.unquote(e) + else: + return requests.utils.unquote(e, **kwargs)
python 2 and 3 compatibility.
diff --git a/spec/provider/gae_spec.rb b/spec/provider/gae_spec.rb index <HASH>..<HASH> 100644 --- a/spec/provider/gae_spec.rb +++ b/spec/provider/gae_spec.rb @@ -8,7 +8,7 @@ describe DPL::Provider::GAE do describe '#push_app' do example 'with defaults' do - allow(provider.context).to receive(:shell).with("#{DPL::Provider::GAE::GCLOUD} --quiet --verbosity \"warning\" --project \"test\" app deploy \"app.yaml\" --version \"\" --promote").and_return(true) + allow(provider.context).to receive(:shell).with("#{DPL::Provider::GAE::GCLOUD} --quiet --verbosity \"warning\" --project \"test\" app deploy \"app.yaml\" --promote").and_return(true) provider.push_app end end
Modify the test case of gae for #<I> If user didn't speicify the version, we should use empty string instead of `--version=""`
diff --git a/spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/repository/support/SimpleSimpleDbRepository.java b/spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/repository/support/SimpleSimpleDbRepository.java index <HASH>..<HASH> 100644 --- a/spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/repository/support/SimpleSimpleDbRepository.java +++ b/spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/repository/support/SimpleSimpleDbRepository.java @@ -57,6 +57,8 @@ public class SimpleSimpleDbRepository<T, ID extends Serializable> implements Sim * @param simpledbOperations */ public SimpleSimpleDbRepository(SimpleDbEntityInformation<T, ?> entityInformation, SimpleDbOperations<T, ?> simpledbOperations) { + Assert.notNull(simpledbOperations); + this.operations = simpledbOperations; Assert.notNull(entityInformation);
not null assert on simple db operations
diff --git a/src/oidcservice/oauth2/service.py b/src/oidcservice/oauth2/service.py index <HASH>..<HASH> 100644 --- a/src/oidcservice/oauth2/service.py +++ b/src/oidcservice/oauth2/service.py @@ -279,11 +279,17 @@ class ProviderInfoDiscovery(Service): self.service_context.issuer = _pcr_issuer self.service_context.provider_info = resp - for key, val in resp.items(): - if key.endswith("_endpoint"): - for _srv in self.service_context.service.values(): - if _srv.endpoint_name == key: - _srv.endpoint = val + try: + _srvs = self.service_context.service + except AttributeError: + pass + else: + if self.service_context.service: + for key, val in resp.items(): + if key.endswith("_endpoint"): + for _srv in self.service_context.service.values(): + if _srv.endpoint_name == key: + _srv.endpoint = val try: kj = self.service_context.keyjar
If services are not stored in the service_context don't try to access them.
diff --git a/abydos/_compat.py b/abydos/_compat.py index <HASH>..<HASH> 100644 --- a/abydos/_compat.py +++ b/abydos/_compat.py @@ -37,11 +37,11 @@ if sys.version_info[0] == 3: # pragma: no cover _range = range _unicode = str _unichr = chr - numeric_type = (int, float, complex) _long = int + numeric_type = (int, float, complex) else: # pragma: no cover _range = xrange _unicode = unicode _unichr = unichr - numeric_type = (int, long, float, complex) _long = long + numeric_type = (int, long, float, complex)
re-ordered definition in order to match description
diff --git a/Service/GearmanClient.php b/Service/GearmanClient.php index <HASH>..<HASH> 100644 --- a/Service/GearmanClient.php +++ b/Service/GearmanClient.php @@ -281,7 +281,7 @@ class GearmanClient extends AbstractGearmanService public function callJob($name, $params = '', $unique = null) { $worker = $this->getJob($name); - $methodCallable = $worker['job']['defaultMethod'] . 'Job'; + $methodCallable = $worker['job']['defaultMethod']; return $this->enqueue($name, $params, $methodCallable, $unique); }
Fixed #<I>. Removed obsolete ‘Job’ concatenation in callJob
diff --git a/packages/pageflow/src/editor/views/EditorView.js b/packages/pageflow/src/editor/views/EditorView.js index <HASH>..<HASH> 100644 --- a/packages/pageflow/src/editor/views/EditorView.js +++ b/packages/pageflow/src/editor/views/EditorView.js @@ -54,6 +54,7 @@ export const EditorView = Backbone.View.extend({ resizerTip: I18n.t('pageflow.editor.views.editor_views.resize_editor'), enableCursorHotkey: false, fxName: 'none', + maskIframesOnResize: true, onresize: function() { app.trigger('resize'); @@ -74,4 +75,4 @@ export const EditorView = Backbone.View.extend({ event.stopPropagation(); } } -}); \ No newline at end of file +});
Ensure resizing editor sidebar works over iframes The option prevents iframes from capturing mouse events, which can cause the dragged resizer to get stuck. This used to be a problem already with rich text editors, which are iframes. Now that the preview uses an iframe the problem got worse. REDMINE-<I>
diff --git a/tests/testmagics.py b/tests/testmagics.py index <HASH>..<HASH> 100644 --- a/tests/testmagics.py +++ b/tests/testmagics.py @@ -16,6 +16,7 @@ class ExtensionTestCase(IPTestCase): self.ip.run_line_magic("load_ext", "holoviews.ipython") def tearDown(self): + Store._custom_options = {k:{} for k in Store._custom_options.keys()} self.ip.run_line_magic("unload_ext", "holoviews.ipython") del self.ip super(ExtensionTestCase, self).tearDown()
Added custom tree teardown to testmagics.py
diff --git a/src/deckgrid.js b/src/deckgrid.js index <HASH>..<HASH> 100644 --- a/src/deckgrid.js +++ b/src/deckgrid.js @@ -47,7 +47,8 @@ angular.module('akoenig.deckgrid').factory('Deckgrid', [ // // Register model change. // - watcher = this.$$scope.$watch('model', this.$$onModelChange.bind(this), true); + watcher = this.$$scope.$watchCollection('model', this.$$onModelChange.bind(this)); + this.$$watchers.push(watcher); //
Switched from $watch to $watchCollection in order to gain a bit more performance.
diff --git a/core-bundle/src/Resources/contao/library/Contao/Model.php b/core-bundle/src/Resources/contao/library/Contao/Model.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/Resources/contao/library/Contao/Model.php +++ b/core-bundle/src/Resources/contao/library/Contao/Model.php @@ -287,7 +287,7 @@ abstract class Model // Update the model data from the DB record (might be modified by default values or triggers) $res = \Database::getInstance()->prepare("SELECT * FROM " . static::$strTable . " WHERE " . static::$strPk . "=?") - ->execute($this->{static::$strPk}); + ->executeUncached($this->{static::$strPk}); $this->setRow($res->row()); return $this;
[Core] Use `executeUncached()` when refreshing the model data
diff --git a/collectors/languages.php b/collectors/languages.php index <HASH>..<HASH> 100644 --- a/collectors/languages.php +++ b/collectors/languages.php @@ -105,7 +105,7 @@ class QM_Collector_Languages extends QM_Collector { $this->data['languages'][ $domain ][] = array( 'caller' => $caller, - 'domain' => $domain . ' / ' . $handle, + 'domain' => $domain, 'file' => $file, 'found' => ( $file && file_exists( $file ) ) ? filesize( $file ) : false, 'handle' => $handle,
Don't unnecessarily expose the script handle as part of the script translation textdomain.
diff --git a/src/Config.php b/src/Config.php index <HASH>..<HASH> 100644 --- a/src/Config.php +++ b/src/Config.php @@ -73,7 +73,9 @@ class Config const E_CUSTOMER_A_EMAIL = 'email'; const E_CUSTOMER_A_ENTITY_ID = self::E_COMMON_A_ENTITY_ID; const E_CUSTOMER_A_FIRSTNAME = 'firstname'; + const E_CUSTOMER_A_GROUP_ID = 'group_id'; const E_CUSTOMER_A_LASTNAME = 'lastname'; + const E_CUSTOMER_A_PASS_HASH = 'password_hash'; const E_CUSTOMER_A_WEBSITE_ID = 'website_id'; const E_PRODUCT_A_ATTR_SET_ID = 'attribute_set_id'; const E_PRODUCT_A_CRETED_AT = 'created_at';
MOBI-<I> - CLI commands for bonus cfg
diff --git a/test/dsl_test.go b/test/dsl_test.go index <HASH>..<HASH> 100644 --- a/test/dsl_test.go +++ b/test/dsl_test.go @@ -287,6 +287,12 @@ func initRoot() fileOp { }, IsInit} } +func custom(f func(func(fileOp) error) error) fileOp { + return fileOp{func(c *ctx) error { + return f(func(fop fileOp) error { return fop.operation(c) }) + }, Defaults} +} + func mkdir(name string) fileOp { return fileOp{func(c *ctx) error { _, _, err := c.getNode(name, createDir, resolveAllSyms) @@ -299,12 +305,16 @@ func write(name string, contents string) fileOp { } func writeBS(name string, contents []byte) fileOp { + return pwriteBS(name, contents, 0) +} + +func pwriteBS(name string, contents []byte, off int64) fileOp { return fileOp{func(c *ctx) error { f, _, err := c.getNode(name, createFile, resolveAllSyms) if err != nil { return err } - return c.engine.WriteFile(c.user, f, contents, 0, true) + return c.engine.WriteFile(c.user, f, contents, off, true) }, Defaults} }
test: Add operations custom and pwriteBS
diff --git a/source/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java b/source/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java index <HASH>..<HASH> 100644 --- a/source/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java +++ b/source/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java @@ -55,7 +55,7 @@ public class OutgoingFileTransfer extends FileTransfer { * @param responseTimeout * The timeout time in milliseconds. */ - public void setResponseTimeout(int responseTimeout) { + public static void setResponseTimeout(int responseTimeout) { RESPONSE_TIMEOUT = responseTimeout; } @@ -262,7 +262,6 @@ public class OutgoingFileTransfer extends FileTransfer { } } setException(e); - return; } /**
Setter for response timeout was not static. git-svn-id: <URL>
diff --git a/moto/ec2/models.py b/moto/ec2/models.py index <HASH>..<HASH> 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -7,6 +7,7 @@ from boto.ec2.spotinstancerequest import SpotInstanceRequest as BotoSpotRequest from boto.ec2.launchspecification import LaunchSpecification from moto.core import BaseBackend +from moto.core.models import Model from .exceptions import ( InvalidIdError, DependencyViolationError, @@ -933,6 +934,8 @@ class SpotInstanceRequest(BotoSpotRequest): class SpotRequestBackend(object): + __metaclass__ = Model + def __init__(self): self.spot_instance_requests = {} super(SpotRequestBackend, self).__init__() @@ -955,6 +958,7 @@ class SpotRequestBackend(object): requests.append(request) return requests + @Model.prop('SpotInstanceRequest') def describe_spot_instance_requests(self): return self.spot_instance_requests.values()
provide SpotRequestBackend with model accessor
diff --git a/examples/helloworld/Client.java b/examples/helloworld/Client.java index <HASH>..<HASH> 100644 --- a/examples/helloworld/Client.java +++ b/examples/helloworld/Client.java @@ -32,7 +32,7 @@ public class Client { */ org.voltdb.client.Client myApp; myApp = ClientFactory.createClient(); - myApp.createConnection("localhost", "program", "password"); + myApp.createConnection("localhost"); /* * Load the database.
Update the Hello World client to match the new connection syntax.
diff --git a/templates/add-ons.php b/templates/add-ons.php index <HASH>..<HASH> 100755 --- a/templates/add-ons.php +++ b/templates/add-ons.php @@ -198,7 +198,7 @@ $is_allowed_to_install = ( $fs->is_allowed_to_install() || - ( $fs->is_org_repo_compliant() && $is_free_only_wp_org_compliant ) + $is_free_only_wp_org_compliant ); $show_premium_activation_or_installation_action = true;
[add-ons] Any plugin can install free wp.org add-ons, regardless if it is on wp.org or not.
diff --git a/escodegen.js b/escodegen.js index <HASH>..<HASH> 100644 --- a/escodegen.js +++ b/escodegen.js @@ -269,7 +269,7 @@ case Syntax.AssignmentExpression: result = parenthesize( - generateExpression(expr.left) + ' ' + expr.operator + ' ' + + generateExpression(expr.left, Precedence.Call) + ' ' + expr.operator + ' ' + generateExpression(expr.right, Precedence.Assignment), Precedence.Assignment, precedence @@ -705,7 +705,7 @@ } else { previousBase = base; base += indent; - result += generateExpression(stmt.left); + result += generateExpression(stmt.left, Precedence.Call); base = previousBase; }
handle LHS in for-in and assignment correctly
diff --git a/cli/helpers.go b/cli/helpers.go index <HASH>..<HASH> 100644 --- a/cli/helpers.go +++ b/cli/helpers.go @@ -283,7 +283,7 @@ func queryService(c *cli.Context) { request = map[string]interface{}{ "service": service, "method": method, - "request": []byte(strings.Join(c.Args()[2:], " ")), + "request": strings.Join(c.Args()[2:], " "), } b, err := json.Marshal(request)
Why the heck I was turning that into bytes...
diff --git a/src/Charcoal/Admin/Widget/AttachmentWidget.php b/src/Charcoal/Admin/Widget/AttachmentWidget.php index <HASH>..<HASH> 100644 --- a/src/Charcoal/Admin/Widget/AttachmentWidget.php +++ b/src/Charcoal/Admin/Widget/AttachmentWidget.php @@ -278,10 +278,10 @@ class AttachmentWidget extends AdminWidget implements /** * Set the widget's data. * - * @param array|Traversable $data The widget data. + * @param array $data The widget data. * @return self */ - public function setData($data) + public function setData(array $data) { /** * @todo Kinda hacky, but works with the concept of form.
Upgrade to latest charcoal-config's requirement, regarding `setData()`
diff --git a/aaf2/metadict.py b/aaf2/metadict.py index <HASH>..<HASH> 100644 --- a/aaf2/metadict.py +++ b/aaf2/metadict.py @@ -409,14 +409,17 @@ class MetaDictionary(core.AAFObject): return c def lookup_class(self, class_id): - if class_id in AAFClaseID_dict: - return AAFClaseID_dict[class_id] + aaf_class = AAFClaseID_dict.get(class_id, None) + if aaf_class: + return aaf_class - if class_id in AAFClassName_dict: - return AAFClassName_dict[class_id] + aaf_class = AAFClassName_dict.get(class_id, None) + if aaf_class: + return aaf_class - if class_id in self.typedefs_classes: - return self.typedefs_classes[class_id] + aaf_class = self.typedefs_classes.get(class_id, None) + if aaf_class: + return aaf_class return core.AAFObject
don't lookup dict twice
diff --git a/lib/airbrake-ruby.rb b/lib/airbrake-ruby.rb index <HASH>..<HASH> 100644 --- a/lib/airbrake-ruby.rb +++ b/lib/airbrake-ruby.rb @@ -287,7 +287,7 @@ module Airbrake # Airbrake.notify('fruitception') # end # - # def load_veggies + # def load_veggies(veggies) # Airbrake.merge_context(veggies: veggies) # end #
airbrake-ruby: fix error in #merge_context docs
diff --git a/lib/event_source/controls/category.rb b/lib/event_source/controls/category.rb index <HASH>..<HASH> 100644 --- a/lib/event_source/controls/category.rb +++ b/lib/event_source/controls/category.rb @@ -13,7 +13,7 @@ module EventSource category ||= 'Test' if randomize_category - category = "#{category}#{Identifier::UUID.random.gsub('-', '')}" + category = "#{category}#{SecureRandom.hex}" end category
SecureRandom hex achieves the same as UUID with dashes removed for the purposes of this control
diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profiler.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profiler.php @@ -231,7 +231,6 @@ class Profiler return; } - $response = $response; $response->headers->set('X-Debug-Token', $this->getToken()); foreach ($this->collectors as $collector) {
[HttpKernel] removed a stupid line of code
diff --git a/lib/bud/provenance.rb b/lib/bud/provenance.rb index <HASH>..<HASH> 100644 --- a/lib/bud/provenance.rb +++ b/lib/bud/provenance.rb @@ -19,6 +19,7 @@ class Bud end def final(state) "agg[#{@budtime}](" + state.join(";") + ")" + end end @@ -26,17 +27,11 @@ class Bud [ProvConcatenate.new, x] end - # the scalar UDF for this particular provenance implementation def prov_cat(rule, *args) return "r#{rule}[#{@budtime}](" + args.join(": ") + ")" - args.each do |sg| - d.append(sg) - end - return d end - # pretty printing stuff def tabs(cnt) str = "" @@ -76,8 +71,9 @@ class Bud end def whence(datum) - print "WHENCE(#{datum.inspect}) ?\n\n" - prov = datum[datum.length - 1] + copy = datum.clone + prov = copy.pop + print "WHENCE(#{copy.inspect}) ?\n\n" whence_p(prov, 0) end
oops, a little cleanup
diff --git a/core/src/main/java/com/datastax/oss/driver/api/core/config/DriverConfigLoader.java b/core/src/main/java/com/datastax/oss/driver/api/core/config/DriverConfigLoader.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/datastax/oss/driver/api/core/config/DriverConfigLoader.java +++ b/core/src/main/java/com/datastax/oss/driver/api/core/config/DriverConfigLoader.java @@ -376,7 +376,7 @@ public interface DriverConfigLoader extends AutoCloseable { boolean supportsReloading(); /** - * Called when the cluster closes. This is a good time to release any external resource, for + * Called when the session closes. This is a good time to release any external resource, for * example cancel a scheduled reloading task. */ @Override
Replace mention of "cluster" by "session" in DriverConfigLoader.close()
diff --git a/src/main/java/com/googlecode/lanterna/gui/component/Panel.java b/src/main/java/com/googlecode/lanterna/gui/component/Panel.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/googlecode/lanterna/gui/component/Panel.java +++ b/src/main/java/com/googlecode/lanterna/gui/component/Panel.java @@ -136,7 +136,10 @@ public class Panel extends AbstractContainer @Override public TerminalSize getPreferredSize() { - return border.surroundAreaSize(layoutManager.getPreferredSize()); + TerminalSize preferredSize = border.surroundAreaSize(layoutManager.getPreferredSize()); + if(title.length() + 4 > preferredSize.getColumns()) + preferredSize.setColumns(title.length() + 4); + return preferredSize; } @Override
Make the window larger if the title doesn't fit
diff --git a/test/test_committer.rb b/test/test_committer.rb index <HASH>..<HASH> 100644 --- a/test/test_committer.rb +++ b/test/test_committer.rb @@ -1,3 +1,4 @@ +# ~*~ encoding: utf-8 ~*~ require File.expand_path(File.join(File.dirname(__FILE__), "helper")) context "Wiki" do @@ -47,4 +48,4 @@ context "Wiki" do FileUtils.rm_rf(@path) end end -end \ No newline at end of file +end
i think ruby <I> needs this. can't live without it.
diff --git a/src/main/java/org/cryptomator/frontend/webdav/mount/VfsMountingStrategy.java b/src/main/java/org/cryptomator/frontend/webdav/mount/VfsMountingStrategy.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/cryptomator/frontend/webdav/mount/VfsMountingStrategy.java +++ b/src/main/java/org/cryptomator/frontend/webdav/mount/VfsMountingStrategy.java @@ -4,7 +4,7 @@ import java.util.concurrent.TimeUnit; abstract class VfsMountingStrategy implements MounterStrategy { - abstract class MountImpl implements Mount { + protected abstract class MountImpl implements Mount { ProcessBuilder revealCmd; ProcessBuilder isMountedCmd;
Make MountImpl protected to separate it from the other occurrences in the same package
diff --git a/spec/error_reporters_spec.rb b/spec/error_reporters_spec.rb index <HASH>..<HASH> 100644 --- a/spec/error_reporters_spec.rb +++ b/spec/error_reporters_spec.rb @@ -20,6 +20,10 @@ describe Pliny::ErrorReporters do allow(reporter_double).to receive(:notify) end + after do + Pliny::ErrorReporters.error_reporters = [] + end + it "notifies rollbar" do notify_reporter diff --git a/spec/metrics_spec.rb b/spec/metrics_spec.rb index <HASH>..<HASH> 100644 --- a/spec/metrics_spec.rb +++ b/spec/metrics_spec.rb @@ -6,12 +6,17 @@ describe Pliny::Metrics do subject(:metrics) { Pliny::Metrics } before do + @stdout = Pliny.stdout Pliny.stdout = io allow(io).to receive(:print) allow(Config).to receive(:app_name).and_return('pliny') end + after do + Pliny.stdout = @stdout + end + context "#count" do it "counts a single key with a default value" do metrics.count(:foo)
Fix doubles leaking through globals
diff --git a/js/wee.dom.js b/js/wee.dom.js index <HASH>..<HASH> 100644 --- a/js/wee.dom.js +++ b/js/wee.dom.js @@ -979,15 +979,21 @@ * @param {($|HTMLElement|string)} [context=document] */ $remove: function(target, context) { + var arr = []; + W.$each(target, function(el) { var par = el.parentNode; + arr.push(el); + par.removeChild(el); W.$setRef(par); }, { context: context }); + + return arr; }, /**
Return removed items in $remove method
diff --git a/src/PSCWS4.php b/src/PSCWS4.php index <HASH>..<HASH> 100644 --- a/src/PSCWS4.php +++ b/src/PSCWS4.php @@ -314,7 +314,12 @@ class PSCWS4 { // restore the offset $this->_off = $off; // sort it & return - $cmp_func = create_function('$a,$b', 'return ($b[\'weight\'] > $a[\'weight\'] ? 1 : -1);'); + if ( (float)substr(PHP_VERSION, 0, 3) >= 5.3 ) { + $cmp_func = function($a, $b) {return ($b['weight'] > $a['weight'] ? 1 : -1);}; + } else { + $cmp_func = create_function('$a,$b', 'return ($b[\'weight\'] > $a[\'weight\'] ? 1 : -1);'); + } + usort($list, $cmp_func); if (count($list) > $limit) $list = array_slice($list, 0, $limit); return $list;
add support for php<I> issue: create_function() method has been DEPRECATED after php<I>. solution: When PHP_VERSION over <I>, using anonymous function instead of it.
diff --git a/searx/webapp.py b/searx/webapp.py index <HASH>..<HASH> 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -916,7 +916,7 @@ def page_not_found(e): def run(): - logger.debug('starting webserver on %s:%s', settings['server']['port'], settings['server']['bind_address']) + logger.debug('starting webserver on %s:%s', settings['server']['bind_address'], settings['server']['port']) app.run( debug=searx_debug, use_debugger=searx_debug,
[fix] fix the debug message "starting webserver on ip:port" was "port:ip"
diff --git a/test/test-50-fs-runtime-layer/main.js b/test/test-50-fs-runtime-layer/main.js index <HASH>..<HASH> 100644 --- a/test/test-50-fs-runtime-layer/main.js +++ b/test/test-50-fs-runtime-layer/main.js @@ -39,7 +39,12 @@ right = right.split('\n'); // right may have less lines, premature exit, // less trusted, so using left.length here for (let i = 0; i < left.length; i += 1) { - assert.equal(left[i], right[i]); + if (left[i] !== right[i]) { + console.log('line', i); + console.log('<<left<<\n' + left); + console.log('>>right>>\n' + right); + throw new Error('Assertion'); + } } utils.vacuum.sync(path.dirname(output));
trying to figure out appveyor <I> build failure
diff --git a/spec/unit/provider/package/pip_spec.rb b/spec/unit/provider/package/pip_spec.rb index <HASH>..<HASH> 100755 --- a/spec/unit/provider/package/pip_spec.rb +++ b/spec/unit/provider/package/pip_spec.rb @@ -30,6 +30,20 @@ describe provider_class do end + describe "cmd" do + + it "should return pip-python on RedHat systems" do + Facter.stubs(:value).with(:osfamily).returns("RedHat") + provider_class.cmd.should == 'pip-python' + end + + it "should return pip by default" do + Facter.stubs(:value).with(:osfamily).returns("Not RedHat") + provider_class.cmd.should == 'pip' + end + + end + describe "instances" do it "should return an array when pip is present" do
(#<I>) Tests to confirm functionality of the cmd function
diff --git a/src/Propel/Generator/Builder/Om/ExtensionQueryBuilder.php b/src/Propel/Generator/Builder/Om/ExtensionQueryBuilder.php index <HASH>..<HASH> 100644 --- a/src/Propel/Generator/Builder/Om/ExtensionQueryBuilder.php +++ b/src/Propel/Generator/Builder/Om/ExtensionQueryBuilder.php @@ -86,7 +86,7 @@ class ".$this->getUnqualifiedClassName()." extends $baseClassName protected function addClassClose(&$script) { $script .= " -} // " . $this->getUnqualifiedClassName() . " +} "; $this->applyBehaviorModifier('extensionQueryFilter', $script, ""); }
Removed comment at the closing brace of Extension Query Classes to conform psr-1/psr-2
diff --git a/__tests__/servers/socket.js b/__tests__/servers/socket.js index <HASH>..<HASH> 100644 --- a/__tests__/servers/socket.js +++ b/__tests__/servers/socket.js @@ -256,10 +256,10 @@ describe('Server: Socket', () => { describe('custom data delimiter', () => { afterEach(() => { api.config.servers.socket.delimiter = '\n' }) - test('will parse /newline data delimiter', async () => { - api.config.servers.socket.delimiter = '\n' + test('will parse custom newline data delimiter', async () => { + api.config.servers.socket.delimiter = 'xXxXxX' await api.utils.sleep(10) - let response = await makeSocketRequest(client, JSON.stringify({ action: 'status' }), '\n') + let response = await makeSocketRequest(client, JSON.stringify({ action: 'status' }), 'xXxXxX') expect(response.context).toEqual('response') })
newline socket test should make more sense
diff --git a/fakeyagnats/fake_yagnats.go b/fakeyagnats/fake_yagnats.go index <HASH>..<HASH> 100644 --- a/fakeyagnats/fake_yagnats.go +++ b/fakeyagnats/fake_yagnats.go @@ -206,6 +206,13 @@ func (f *FakeYagnats) Subscriptions(subject string) []yagnats.Subscription { return f.subscriptions[subject] } +func (f *FakeYagnats) SubscriptionCount() int { + f.RLock() + defer f.RUnlock() + + return len(f.subscriptions) +} + func (f *FakeYagnats) WhenPublishing(subject string, callback func(*yagnats.Message) error) { f.Lock() defer f.Unlock() @@ -219,3 +226,17 @@ func (f *FakeYagnats) PublishedMessages(subject string) []yagnats.Message { return f.publishedMessages[subject] } + +func (f *FakeYagnats) PublishedMessageCount() int { + f.RLock() + defer f.RUnlock() + + return len(f.publishedMessages) +} + +func (f* FakeYagnats) ConnectedConnectionProvider() yagnats.ConnectionProvider { + f.RLock() + defer f.RUnlock() + + return f.connectedConnectionProvider +}
Exposed fake client methods for usage testing - Added SubscriptionCount, PublishedMessageCount & ConnectedConnectionProvider
diff --git a/src/Console/Commands/Various/AllCommand.php b/src/Console/Commands/Various/AllCommand.php index <HASH>..<HASH> 100644 --- a/src/Console/Commands/Various/AllCommand.php +++ b/src/Console/Commands/Various/AllCommand.php @@ -21,7 +21,7 @@ class AllCommand extends Command { $this ->setName('all') - ->setDescription('All Fiesta commands'); + ->setDescription('All Pikia commands'); } @@ -57,7 +57,7 @@ class AllCommand extends Command $process = "\n"; // $process .=Console::setMessage(" info............Get info about the framework\n" , Console::nn ); - $process .=Console::setMessage(" all.............All Fiesta commands\n" , Console::nn ); + $process .=Console::setMessage(" all.............All Pikia commands\n" , Console::nn ); $process .=Console::setMessage("schema\n" , Console::lst ); $process .=Console::setMessage(" :new............make new schema file...............|".Console::setCyan(" <name>\n") , Console::nn ); $process .=Console::setMessage(" :exec...........Execute the last schema created\n" , Console::nn );
update all command put Pikia instead of Fiesta
diff --git a/telemetry/telemetry/core/chrome/cros_util.py b/telemetry/telemetry/core/chrome/cros_util.py index <HASH>..<HASH> 100644 --- a/telemetry/telemetry/core/chrome/cros_util.py +++ b/telemetry/telemetry/core/chrome/cros_util.py @@ -90,7 +90,7 @@ def NavigateLogin(browser_backend, cri): """Navigates through oobe login screen""" # Dismiss the user image selection screen. try: - util.WaitFor(lambda: _IsLoggedIn(browser_backend, cri), 15) + util.WaitFor(lambda: _IsLoggedIn(browser_backend, cri), 30) except util.TimeoutException: raise exceptions.LoginException( 'Timed out going through oobe screen. Make sure the custom auth '
Increase time out for NavigateLogin. This timeout is cutting it too close, in rare situations, login can take a little longer. I'm seeing some flakes on this. BUG=NONE TEST=manual NOTRY=True Review URL: <URL>
diff --git a/pnc_cli/cli_types.py b/pnc_cli/cli_types.py index <HASH>..<HASH> 100644 --- a/pnc_cli/cli_types.py +++ b/pnc_cli/cli_types.py @@ -278,10 +278,13 @@ def valid_url(urlInput): raise argparse.ArgumentTypeError("invalid url") return urlInput + +# validation is different depnding on the PNC url. def valid_internal_url(urlInput): - if not urlInput.startswith("git+ssh://pnc-gerrit-stage@code-stage.eng.nay.redhat.com:29418"): - raise argparse.ArgumentTypeError("An internal SCM repository URL must start with: git+ssh://pnc-gerrit-stage@code-stage.eng.nay.redhat.com:29418") - if urlInput == "git+ssh://pnc-gerrit-stage@code-stage.eng.nay.redhat.com:29418": + repo_start = utils.get_internal_repo_start(uc.user.pnc_config.url) + if not urlInput.startswith(repo_start): + raise argparse.ArgumentTypeError("An internal SCM repository URL must start with: " + repo_start) + if urlInput == repo_start: raise argparse.ArgumentTypeError("No specific internal repository specified.") valid_url(urlInput) - return urlInput \ No newline at end of file + return urlInput
update cli_types internal SCM urls must be aware of what the PNC instance being used is; the required starting portion of the URL is different vs different instances
diff --git a/saltcloud/clouds/ec2.py b/saltcloud/clouds/ec2.py index <HASH>..<HASH> 100644 --- a/saltcloud/clouds/ec2.py +++ b/saltcloud/clouds/ec2.py @@ -1177,7 +1177,8 @@ def create(vm_=None, call=None): if saltcloud.utils.wait_for_passwd( host=ip_address, username=user, - ssh_timeout=60, + ssh_timeout=config.get_config_value( + 'wait_for_passwd_timeout', vm_, __opts__, default=1) * 60, key_filename=key_filename, display_ssh_output=display_ssh_output ):
Configurable wait for `passwd` implemented for EC2
diff --git a/java/client/test/org/openqa/selenium/io/TemporaryFilesystemTest.java b/java/client/test/org/openqa/selenium/io/TemporaryFilesystemTest.java index <HASH>..<HASH> 100644 --- a/java/client/test/org/openqa/selenium/io/TemporaryFilesystemTest.java +++ b/java/client/test/org/openqa/selenium/io/TemporaryFilesystemTest.java @@ -1,9 +1,9 @@ package org.openqa.selenium.io; -import org.openqa.selenium.WebDriverException; - import junit.framework.TestCase; + import org.junit.Test; +import org.openqa.selenium.WebDriverException; import java.io.File; import java.io.IOException; @@ -99,6 +99,15 @@ public class TemporaryFilesystemTest extends TestCase { } @Test + public void testShouldDeleteTempDir() { + final File tempDir = tmpFs.createTempDir("foo", "bar"); + assertTrue(tempDir.exists()); + tmpFs.deleteTemporaryFiles(); + tmpFs.deleteBaseDir(); + assertFalse(tempDir.exists()); + } + + @Test public void testShouldBeAbleToModifyDefaultInstance() throws IOException { // Create a temp file *outside* of the directory owned by the current // TemporaryFilesystem instance.
KristianRosenvold: Added unit test for method added in r<I> r<I>
diff --git a/symphony/content/content.systempreferences.php b/symphony/content/content.systempreferences.php index <HASH>..<HASH> 100755 --- a/symphony/content/content.systempreferences.php +++ b/symphony/content/content.systempreferences.php @@ -210,7 +210,7 @@ } Symphony::Configuration()->write(); - if(function_exists('opcache_invalidate')) opcache_invalidate(CONFIG); + if(function_exists('opcache_invalidate')) opcache_invalidate(CONFIG, true); redirect(SYMPHONY_URL . '/system/preferences/success/'); }
Force invalidation of config.php regardless of last modified value Some filesystems may be set not to record last modified dates if I remember correctly. Even if not, forcing shouldn’t be a problem and seems safest.
diff --git a/src/main/java/com/bernardomg/tabletop/dice/visitor/RollTransformer.java b/src/main/java/com/bernardomg/tabletop/dice/visitor/RollTransformer.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/bernardomg/tabletop/dice/visitor/RollTransformer.java +++ b/src/main/java/com/bernardomg/tabletop/dice/visitor/RollTransformer.java @@ -3,6 +3,7 @@ package com.bernardomg.tabletop.dice.visitor; import com.bernardomg.tabletop.dice.history.RollResult; +@FunctionalInterface public interface RollTransformer { public RollResult transform(final RollResult result, final Integer index);
Added annotation to ensure it always can be mapped to a lambda
diff --git a/lib/thinking_sphinx/search.rb b/lib/thinking_sphinx/search.rb index <HASH>..<HASH> 100644 --- a/lib/thinking_sphinx/search.rb +++ b/lib/thinking_sphinx/search.rb @@ -2,7 +2,7 @@ class ThinkingSphinx::Search < Array CORE_METHODS = %w( == class class_eval extend frozen? id instance_eval - instance_of? instance_values instance_variable_defined? + instance_exec instance_of? instance_values instance_variable_defined? instance_variable_get instance_variable_set instance_variables is_a? kind_of? member? method methods nil? object_id respond_to? respond_to_missing? send should should_not type )
Include instance_exec in ThinkingSphinx::Search::CORE_METHODS I ran into this when trying to instrument `ThinkingSphinx::Search#populate` with NewRelic 8, where `add_method_tracer :populate` relies on `instance_exec`. This would fail because ThinkingSphinx::Search undefs all instance methods not included in a safe-list.
diff --git a/lib/mail/body.rb b/lib/mail/body.rb index <HASH>..<HASH> 100644 --- a/lib/mail/body.rb +++ b/lib/mail/body.rb @@ -35,7 +35,7 @@ module Mail if string.blank? @raw_source = '' else - @raw_source = string + @raw_source = string.to_s end @encoding = nil set_charset diff --git a/spec/mail/body_spec.rb b/spec/mail/body_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mail/body_spec.rb +++ b/spec/mail/body_spec.rb @@ -39,6 +39,15 @@ describe Mail::Body do body.to_s.should == '' end + it "should accept an array as the body and join it" do + doing { Mail::Body.new(["line one\n", "line two\n"]) }.should_not raise_error + end + + it "should accept an array as the body and join it" do + body = Mail::Body.new(["line one\n", "line two\n"]) + body.encoded.should == "line one\r\nline two\r\n" + end + end describe "encoding" do
Body should call to_s on given input... incase someone gave it an IO.readlines result (Array)
diff --git a/test/commands-test.js b/test/commands-test.js index <HASH>..<HASH> 100644 --- a/test/commands-test.js +++ b/test/commands-test.js @@ -29,6 +29,20 @@ describe('window commands', function () { }) }) + describe('waitUntilTextExists', function () { + it('resolves if the element contains the given text', function () { + return app.client.waitUntilTextExists('html', 'Hello').should.be.fulfilled + }) + + it('rejects if the element is missing', function () { + return app.client.waitUntilTextExists('#not-in-page', 'Hello', 50).should.be.rejectedWith(Error, 'waitUntilTextExists Promise was rejected') + }) + + it('rejects if the element never contains the text', function () { + return app.client.waitUntilTextExists('html', 'not on page', 50).should.be.rejectedWith(Error, 'waitUntilTextExists Promise was rejected') + }) + }) + describe('browserWindow.getBounds()', function () { it('gets the window bounds', function () { return app.browserWindow.getBounds().should.eventually.deep.equal({
Add specs for waitUntilTextExists