diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/claripy/ast/base.py b/claripy/ast/base.py index <HASH>..<HASH> 100644 --- a/claripy/ast/base.py +++ b/claripy/ast/base.py @@ -285,11 +285,11 @@ class Base: return b'\x2e' elif type(arg) is int: if arg < 0: - if arg >= -0xffff: + if arg >= -0x7fff: return b'-' + struct.pack("<h", arg) - elif arg >= -0xffff_ffff: + elif arg >= -0x7fff_ffff: return b'-' + struct.pack("<i", arg) - elif arg >= -0xffff_ffff_ffff_ffff: + elif arg >= -0x7fff_ffff_ffff_ffff: return b'-' + struct.pack("<q", arg) return None else:
_arg_serialize(): Don't serialize negative numbers beyond their respective ranges.
diff --git a/classes/PodsComponents.php b/classes/PodsComponents.php index <HASH>..<HASH> 100644 --- a/classes/PodsComponents.php +++ b/classes/PodsComponents.php @@ -90,7 +90,7 @@ class PodsComponents { if ( empty( $component_data[ 'MenuPage' ] ) && ( !isset( $component_data[ 'object' ] ) || !method_exists( $component_data[ 'object' ], 'admin' ) ) ) continue; - $component_data[ 'File' ] = realpath( PODS_DIR . str_replace( array( PODS_DIR, ABSPATH ), '', $component_data[ 'File' ] ) ); + $component_data[ 'File' ] = realpath( PODS_DIR . $component_data[ 'File' ] ); if ( !file_exists( $component_data[ 'File' ] ) ) continue; @@ -159,7 +159,7 @@ class PodsComponents { $component_data = $this->components[ $component ]; - $component_data[ 'File' ] = realpath( PODS_DIR . str_replace( array( PODS_DIR, ABSPATH ), '', $component_data[ 'File' ] ) ); + $component_data[ 'File' ] = realpath( PODS_DIR . $component_data[ 'File' ] ); if ( !file_exists( $component_data[ 'File' ] ) ) continue;
More tweaks to handling now that components transient is cleared
diff --git a/src/main/java/org/dasein/cloud/google/compute/server/ServerSupport.java b/src/main/java/org/dasein/cloud/google/compute/server/ServerSupport.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/dasein/cloud/google/compute/server/ServerSupport.java +++ b/src/main/java/org/dasein/cloud/google/compute/server/ServerSupport.java @@ -440,7 +440,8 @@ public class ServerSupport extends AbstractVMSupport { VirtualMachine vm = new VirtualMachine(); vm.setProviderVirtualMachineId(instance.getName()); vm.setName(instance.getName()); - vm.setDescription(instance.getDescription()); + if(instance.getDescription() != null)vm.setDescription(instance.getDescription()); + else vm.setDescription(instance.getName()); vm.setProviderOwnerId(provider.getContext().getAccountNumber()); VmState vmState = null;
Fix possible NPE listing VMs with no description
diff --git a/src/Image/Service.php b/src/Image/Service.php index <HASH>..<HASH> 100644 --- a/src/Image/Service.php +++ b/src/Image/Service.php @@ -31,10 +31,10 @@ class Service */ public function upload($image, $path = null, $makeDiffSizes = true) { - $this->directory(public_path($path)); + $this->directory(storage_path('app/public/' . $path)); $name = $image->getClientOriginalName(); - $image->move(public_path($path), $name); - $relativePath = public_path($path . DIRECTORY_SEPARATOR . $name); + $image->move(storage_path('app/public/' . $path), $name); + $relativePath = storage_path('app/public/' . $path . DIRECTORY_SEPARATOR . $name); if (true === $makeDiffSizes) { $sizes = config('avored-framework.image.sizes'); @@ -42,7 +42,7 @@ class Service list($width, $height) = $widthHeight; $this->make($relativePath); $this->resizeImage($width, $height, 'crop'); - $imagePath = public_path($path) . DIRECTORY_SEPARATOR . $sizeName . '-' . $name; + $imagePath = storage_path('app/public/' . $path) . DIRECTORY_SEPARATOR . $sizeName . '-' . $name; $this->saveImage($imagePath, 100); } }
updated to use storage path now for images
diff --git a/src/JsonStreamingParser/Listener.php b/src/JsonStreamingParser/Listener.php index <HASH>..<HASH> 100644 --- a/src/JsonStreamingParser/Listener.php +++ b/src/JsonStreamingParser/Listener.php @@ -15,8 +15,8 @@ interface JsonStreamingParser_Listener { // Key will always be a string public function key($key); - // Note that value may be a string, integer, boolean, array, etc. + // Note that value may be a string, integer, boolean, etc. public function value($value); public function whitespace($whitespace); -} \ No newline at end of file +}
update misleading comment as arrays are never passed into Listener
diff --git a/performance/cache_runner.rb b/performance/cache_runner.rb index <HASH>..<HASH> 100644 --- a/performance/cache_runner.rb +++ b/performance/cache_runner.rb @@ -4,7 +4,6 @@ require 'active_support/core_ext' require 'active_support/cache' require 'identity_cache' require 'memcache' -require 'debugger' if ENV['BOXEN_HOME'].present? $memcached_port = 21211 diff --git a/performance/externals.rb b/performance/externals.rb index <HASH>..<HASH> 100644 --- a/performance/externals.rb +++ b/performance/externals.rb @@ -24,8 +24,6 @@ end def count_externals(results) count = {} - EXTERNALS.each do - end results.split(/\n/).each do |line| fields = line.split if ext = EXTERNALS.detect { |e| e[1].any? { |method| method == fields[-1] } } @@ -40,7 +38,6 @@ end create_database(RUNS) - run(FindRunner.new(RUNS)) run(FetchHitRunner.new(RUNS))
Remove some unneeded code post-review
diff --git a/src/geo/ui/widgets/histogram/content-view.js b/src/geo/ui/widgets/histogram/content-view.js index <HASH>..<HASH> 100644 --- a/src/geo/ui/widgets/histogram/content-view.js +++ b/src/geo/ui/widgets/histogram/content-view.js @@ -224,11 +224,14 @@ module.exports = WidgetContent.extend({ this.histogramChartView.removeSelection(); var data = this.originalData; - this.filter.setRange( - data[loBarIndex].start, - data[hiBarIndex - 1].end - ); - this._updateStats(); + + if (loBarIndex > 0 && loBarIndex < data.length && (hiBarIndex - 1) > 0 && (hiBarIndex - 1) < data.length) { + this.filter.setRange( + data[loBarIndex].start, + data[hiBarIndex - 1].end + ); + this._updateStats(); + } }, _onBrushEnd: function(loBarIndex, hiBarIndex) {
Prevents from accessing the limits of an array
diff --git a/packages/idyll-cli/bin/idyll.js b/packages/idyll-cli/bin/idyll.js index <HASH>..<HASH> 100755 --- a/packages/idyll-cli/bin/idyll.js +++ b/packages/idyll-cli/bin/idyll.js @@ -12,7 +12,13 @@ var cmd if (!idyll) { cmd = p.join(__dirname, './cli.js'); } else { - cmd = p.join(idyll, '..', '..', 'bin', 'cli.js'); + var idyllBin = p.join(idyll, '..', '..', 'bin') + cmd = p.join(idyllBin, 'cli.js'); + try { + p.statSync(cmd) + } catch (err) { + cmd = p.join(idyllBin, 'idyll.js') + } } spawnSync(cmd, process.argv.slice(2), { stdio: 'inherit'
Fix for backwards-compat issue
diff --git a/chef/lib/chef/knife/data_bag_from_file.rb b/chef/lib/chef/knife/data_bag_from_file.rb index <HASH>..<HASH> 100644 --- a/chef/lib/chef/knife/data_bag_from_file.rb +++ b/chef/lib/chef/knife/data_bag_from_file.rb @@ -46,7 +46,7 @@ class Chef option :all, :short => "-a", :long => "--all", - :description => "Upload all data bags" + :description => "Upload all data bags or all items for specified data bags" def read_secret if config[:secret]
Add a note about a secret knife data bag from file feature knife data bag from file -a ; loads all data bags and items knife data bag from file users -a ; loads all data bag items for data bag users
diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index <HASH>..<HASH> 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -69,7 +69,7 @@ def install_debian(codename, version_kind, version): key = 'autobuild' subprocess.check_call( - args='wget -q -O- https://raw.github.com/ceph/ceph/master/keys/{key}.asc | apt-key add -'.format(key=key), + args='wget -q -O- \'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/{key}.asc\' | apt-key add -'.format(key=key), shell=True, )
install: use new build key URL on ceph.com The new URL is on ceph.com and uses https.
diff --git a/concrete/blocks/express_entry_list/controller.php b/concrete/blocks/express_entry_list/controller.php index <HASH>..<HASH> 100644 --- a/concrete/blocks/express_entry_list/controller.php +++ b/concrete/blocks/express_entry_list/controller.php @@ -158,6 +158,7 @@ class Controller extends BlockController if ($pagination->haveToPaginate()) { $pagination = $pagination->renderDefaultView(); $this->set('pagination', $pagination); + $this->requireAsset('css', 'core/frontend/pagination'); } $this->set('list', $list);
Require pagination asset from express entry list block
diff --git a/lib/active_resource/base_ext.rb b/lib/active_resource/base_ext.rb index <HASH>..<HASH> 100644 --- a/lib/active_resource/base_ext.rb +++ b/lib/active_resource/base_ext.rb @@ -17,10 +17,5 @@ module ActiveResource connection.delete(element_path(id, options), headers) end end - - def self.build(attributes = {}) - attrs = self.format.decode(connection.get("#{new_element_path}", headers).body).merge(attributes) - self.new(attrs) - end end end
don't bother overriding ActiveResource::Base.build
diff --git a/spec/bin_spec.rb b/spec/bin_spec.rb index <HASH>..<HASH> 100644 --- a/spec/bin_spec.rb +++ b/spec/bin_spec.rb @@ -61,11 +61,14 @@ describe "the sortah executable" do end it "should print to STDOUT the location it intends to write the file" do - run_with('--dry-run', @email.to_s)[:result].should =~ %r|writing email to: /tmp/\.mail/foo/| + run_with('--dry-run', @email.to_s)[:result]. + should =~ %r|writing email to: /tmp/\.mail/foo/| end it "should write to the destination specified by #error_dest when an exception is raised during sorting" do - run_with('--dry-run', @failing_email.to_s)[:result].should =~ %r|writing email to: /tmp/\.mail/errors/| + run_with('--dry-run', @failing_email.to_s)[:result]. + should =~ %r|writing email to: /tmp/\.mail/errors/| + end end end end
clean up the lines on bin_spec so they aren't so long.
diff --git a/pmxbot/util.py b/pmxbot/util.py index <HASH>..<HASH> 100644 --- a/pmxbot/util.py +++ b/pmxbot/util.py @@ -69,19 +69,12 @@ def splitem(query): >>> splitem('stuff: a, b, c') ['a', 'b', 'c'] """ - s = query.rstrip('?.!') - if ':' in s: - question, choices = s.rsplit(':', 1) - else: - choices = s + prompt, sep, query = query.rstrip('?.!').rpartition(':') - c = choices.split(',') - if ' or ' in c[-1]: - c = c[:-1] + c[-1].split(' or ') + choices = query.split(',') + choices[-1:] = choices[-1].split(' or ') - c = [x.strip() for x in c] - c = list(filter(None, c)) - return c + return [choice.strip() for choice in choices if choice.strip()] def open_url(url): headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) '
Simplify the implementation to just a few lines.
diff --git a/lib/logan/client.rb b/lib/logan/client.rb index <HASH>..<HASH> 100644 --- a/lib/logan/client.rb +++ b/lib/logan/client.rb @@ -91,6 +91,13 @@ module Logan handle_response(response, Proc.new {|h| Logan::Person.new(h) }) end + def person(id) + response = self.class.get "/people/#{id}.json" + person = Logan::Person.new response + person.json_raw = response.body + person + end + private def all_projects response = self.class.get '/projects.json'
Add person (singular) to the client class.
diff --git a/eliot/_util.py b/eliot/_util.py index <HASH>..<HASH> 100644 --- a/eliot/_util.py +++ b/eliot/_util.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals from types import ModuleType -from six import exec_, text_type as unicode +from six import exec_, text_type as unicode, PY3 def safeunicode(o): @@ -52,9 +52,15 @@ def load_module(name, original_module): @return: A new, distinct module. """ module = ModuleType(name) - path = original_module.__file__ - if path.endswith(".pyc") or path.endswith(".pyo"): - path = path[:-1] - with open(path) as f: - exec_(f.read(), module.__dict__, module.__dict__) + if PY3: + import importlib.util + spec = importlib.util.find_spec(original_module.__name__) + source = spec.loader.get_code(original_module.__name__) + else: + path = original_module.__file__ + if path.endswith(".pyc") or path.endswith(".pyo"): + path = path[:-1] + with open(path) as f: + source = f.read() + exec_(source, module.__dict__, module.__dict__) return module
Support PyInstaller on Python 3.
diff --git a/lib/aws/shared_credentials.rb b/lib/aws/shared_credentials.rb index <HASH>..<HASH> 100644 --- a/lib/aws/shared_credentials.rb +++ b/lib/aws/shared_credentials.rb @@ -44,8 +44,8 @@ module Aws end # @return [Boolean] Returns `true` if a credential file - # exists and has appropriate read permissions at {path}. - # @note This method does not indicate if the file found at {path} + # exists and has appropriate read permissions at {#path}. + # @note This method does not indicate if the file found at {#path} # will be parsable, only if it can be read. def loadable? !path.nil? && File.exists?(path) && File.readable?(path) diff --git a/lib/aws/signers/v4.rb b/lib/aws/signers/v4.rb index <HASH>..<HASH> 100644 --- a/lib/aws/signers/v4.rb +++ b/lib/aws/signers/v4.rb @@ -25,7 +25,7 @@ module Aws @region = region end - # @param [Seahorse::Client::Http::Request] request + # @param [Seahorse::Client::Http::Request] req # @return [Seahorse::Client::Http::Request] the signed request. def sign(req) datetime = Time.now.utc.strftime("%Y%m%dT%H%M%SZ")
Fixed a few yard warnings.
diff --git a/src/Provider/AbstractProvider.php b/src/Provider/AbstractProvider.php index <HASH>..<HASH> 100644 --- a/src/Provider/AbstractProvider.php +++ b/src/Provider/AbstractProvider.php @@ -641,7 +641,13 @@ abstract class AbstractProvider return $parsed; } - return $content; + // Attempt to parse the string as JSON anyway, + // since some providers use non-standard content types. + try { + return $this->parseJson($content); + } catch (UnexpectedValueException $e) { + return $content; + } } /**
Always attempt to parse as JSON and fallback on failure
diff --git a/WrightTools/collection/_collection.py b/WrightTools/collection/_collection.py index <HASH>..<HASH> 100644 --- a/WrightTools/collection/_collection.py +++ b/WrightTools/collection/_collection.py @@ -37,7 +37,7 @@ class Collection(Group): def __next__(self): if self.__n < len(self): - out = self[self.__n] + out = self.item_names[self.__n] self.__n += 1 else: raise StopIteration
Collections next return key, rather than value (Closes #<I>) (#<I>)
diff --git a/src/Application.php b/src/Application.php index <HASH>..<HASH> 100644 --- a/src/Application.php +++ b/src/Application.php @@ -48,6 +48,7 @@ class Application extends Silex\Application $this['resources']->setApp($this); $this->initConfig(); + $this->initSession(); $this['resources']->initialize(); $this['debug'] = $this['config']->get('general/debug', false); @@ -61,12 +62,13 @@ class Application extends Silex\Application $this['jsdata'] = array(); } - /** - * Initialize the config and session providers. - */ protected function initConfig() { $this->register(new Provider\ConfigServiceProvider()); + } + + protected function initSession() + { $this->register( new Silex\Provider\SessionServiceProvider(), array(
Move config initialization to it's own method.
diff --git a/lib/ui/Modal.js b/lib/ui/Modal.js index <HASH>..<HASH> 100644 --- a/lib/ui/Modal.js +++ b/lib/ui/Modal.js @@ -1,6 +1,7 @@ -var React = require('react/addons'), - classnames = require('classnames'), - Tappable = require('react-tappable'); +var classnames = require('classnames'); + +var React = require('react/addons'); +var Tappable = require('react-tappable'); module.exports = React.createClass({ displayName: 'Modal', @@ -24,7 +25,7 @@ module.exports = React.createClass({ showModal: false }; }, - + getInitialState: function() { return { showModal: this.props.showModal @@ -34,7 +35,10 @@ module.exports = React.createClass({ // TODO: use ReactTransitionGroup to handle fade in/out componentDidMount: function() { var self = this; + setTimeout(function() { + if (!self.isMounted()) return + self.setState({ showModal: true }); }, 1); },
Modal: enforce modal is mounted for setState
diff --git a/lib/tcp.js b/lib/tcp.js index <HASH>..<HASH> 100644 --- a/lib/tcp.js +++ b/lib/tcp.js @@ -10,19 +10,19 @@ function TCP(options) { // Start socket var sock; var successCallback = function () { + if(!sock.authorized) { + sock.end(); + return; + } + sock.setNoDelay(true); sock.on('data', sock.onchunk); sock.on('close', sock.onclose); sock.onopen(); }; - var certPath = path.join(__dirname, '..', 'include', 'flotype.crt'); - var certFile = fs.readFileSync(certPath); - var sslOptions = { - 'cert': certFile, - 'ca': certFile - }; + var sslOptions = {}; if(options.secure) { var connect = require('tls').connect;
remove references to old self-signed SSL cert from tcp.js
diff --git a/src/CommandPool.php b/src/CommandPool.php index <HASH>..<HASH> 100644 --- a/src/CommandPool.php +++ b/src/CommandPool.php @@ -82,7 +82,7 @@ class CommandPool implements PromisorInterface return (new self($client, $commands, $config)) ->promise() - ->then(function () use (&$results) { + ->then(static function () use (&$results) { ksort($results); return $results; }) @@ -96,7 +96,7 @@ class CommandPool implements PromisorInterface { $before = $this->getBefore($config); - return function ($command) use ($client, $before) { + return static function ($command) use ($client, $before) { if (!($command instanceof CommandInterface)) { throw new \InvalidArgumentException('Each value yielded by the ' . 'iterator must be an Aws\CommandInterface.'); @@ -104,6 +104,10 @@ class CommandPool implements PromisorInterface if ($before) { $before($command); } + // Add a delay to ensure execution on the next tick. + if (empty($command['@http']['delay'])) { + $command['@http']['delay'] = 0.0001; + } return $client->executeAsync($command); }; }
Using a delay in CommandPool to ensure future tick
diff --git a/src/CapabilityTrait.php b/src/CapabilityTrait.php index <HASH>..<HASH> 100644 --- a/src/CapabilityTrait.php +++ b/src/CapabilityTrait.php @@ -41,6 +41,7 @@ trait CapabilityTrait public static function getCapabilities($controllerName = null, array $actions = []) { $capabilitiesAccess = new CapabilitiesAccess(); + return $capabilitiesAccess->getCapabilities($controllerName, $actions); }
Fixed codestyle as per phpcs report
diff --git a/Str.php b/Str.php index <HASH>..<HASH> 100644 --- a/Str.php +++ b/Str.php @@ -403,7 +403,7 @@ class Str public static function startsWith($haystack, $needles) { foreach ((array) $needles as $needle) { - if ($needle != '' && strpos((string) $haystack, (string) $needle) === 0) { + if ($needle != '' && substr($haystack, 0, strlen($needle)) === (string) $needle) { return true; } }
Revert changes to startsWith() (#<I>)
diff --git a/lib/artsy-eventservice/artsy/event_service/rabbitmq_connection.rb b/lib/artsy-eventservice/artsy/event_service/rabbitmq_connection.rb index <HASH>..<HASH> 100644 --- a/lib/artsy-eventservice/artsy/event_service/rabbitmq_connection.rb +++ b/lib/artsy-eventservice/artsy/event_service/rabbitmq_connection.rb @@ -18,6 +18,7 @@ module Artsy def self.get_connection @mutex.synchronize do @connection ||= self.build_connection + @connection = self.build_connection if @connection.closed? end end
renegotiate connection if connection exists but is closed
diff --git a/app/models/agent.rb b/app/models/agent.rb index <HASH>..<HASH> 100644 --- a/app/models/agent.rb +++ b/app/models/agent.rb @@ -384,7 +384,7 @@ class Agent < ActiveRecord::Base agent.last_receive_at = Time.now agent.save! rescue => e - agent.error "Exception during receive: #{e.message} -- #{e.backtrace}" + agent.error "Exception during receive. #{e.message}: #{e.backtrace.join("\n")}" raise end end @@ -422,7 +422,7 @@ class Agent < ActiveRecord::Base agent.last_check_at = Time.now agent.save! rescue => e - agent.error "Exception during check: #{e.message} -- #{e.backtrace}" + agent.error "Exception during check. #{e.message}: #{e.backtrace.join("\n")}" raise end end
seperate error logs with new lines
diff --git a/lib/ood_core/job/adapters/linux_host/launcher.rb b/lib/ood_core/job/adapters/linux_host/launcher.rb index <HASH>..<HASH> 100644 --- a/lib/ood_core/job/adapters/linux_host/launcher.rb +++ b/lib/ood_core/job/adapters/linux_host/launcher.rb @@ -75,7 +75,7 @@ class OodCore::Job::Adapters::LinuxHost::Launcher # find the sinit process for the tmux PID # kill the sinit process kill_cmd = <<~SCRIPT - kill $(pstree -p $(tmux list-panes -aF '#\{session_name} \#{pane_pid}' | grep '#{session_name}' | cut -f 2 -d ' ') | grep -Po 'sinit\\(\\d+' | grep -Po '[0-9]+') + kill $(pstree -p $(tmux list-panes -aF '#\{session_name} \#{pane_pid}' | grep '#{session_name}' | cut -f 2 -d ' ') | grep -o 'sinit([[:digit:]]*' | grep -o '[[:digit:]]*') SCRIPT call(*cmd, stdin: kill_cmd)
Remove requirement that grep dependency support -P flag
diff --git a/packages/neos-ui-editors/src/Reference/index.js b/packages/neos-ui-editors/src/Reference/index.js index <HASH>..<HASH> 100644 --- a/packages/neos-ui-editors/src/Reference/index.js +++ b/packages/neos-ui-editors/src/Reference/index.js @@ -18,7 +18,7 @@ export default class ReferenceEditor extends PureComponent { value: PropTypes.string, commit: PropTypes.func.isRequired, options: PropTypes.shape({ - nodeTypes: PropTypes.arrayOf(PropTypes.string), + nodeTypes: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), placeholder: PropTypes.string, threshold: PropTypes.number }),
TASK: Adjust proptype validation for ReferenceEditor The nodetpye option in ReferenceEditor props can be a strig with a single nodetype as well as an array
diff --git a/nunaliit2-js/src/main/js/nunaliit2/n2.couchModule.js b/nunaliit2-js/src/main/js/nunaliit2/n2.couchModule.js index <HASH>..<HASH> 100644 --- a/nunaliit2-js/src/main/js/nunaliit2/n2.couchModule.js +++ b/nunaliit2-js/src/main/js/nunaliit2/n2.couchModule.js @@ -461,6 +461,9 @@ var ModuleDisplay = $n2.Class({ d.register(DH,'editClosed',function(m){ _this._hideSlidingSidePanel(); }); + d.register(DH,'searchInitiate',function(m){ + _this._showSlidingSidePanel(); + }); d.register(DH,'moduleGetCurrent',function(m){ m.moduleId = _this.getCurrentModuleId();
Open sliding panel when search initiated (#<I>)
diff --git a/src/Parser/State.php b/src/Parser/State.php index <HASH>..<HASH> 100644 --- a/src/Parser/State.php +++ b/src/Parser/State.php @@ -69,6 +69,8 @@ class State */ protected $new_statement_character_found = false; + protected $valid_placeholder_characters = []; + /** * * Constructor @@ -90,6 +92,12 @@ class State if (array_key_exists(0, $this->values)) { array_unshift($this->values, null); } + $this->valid_placeholder_characters = array_merge( + range('a', 'z'), + range ('A', 'Z'), + range (0, 9), + ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '_'] + ); } /** @@ -314,7 +322,20 @@ class State */ public function getIdentifier() { - return $this->capture('\\w+\\b'); + $identifier = ''; + $length = 0; + while (! $this->done()) + { + $character = mb_substr($this->statement, $this->current_index + $length, 1, $this->charset); + if (! in_array($character, $this->valid_placeholder_characters, true)) + { + return $identifier; + } + $identifier .= $character; + $length++; + + } + return $identifier; } /**
Removed the call to State->capture from State->getIdentifier
diff --git a/model/connect/DBSchemaManager.php b/model/connect/DBSchemaManager.php index <HASH>..<HASH> 100644 --- a/model/connect/DBSchemaManager.php +++ b/model/connect/DBSchemaManager.php @@ -591,7 +591,7 @@ abstract class DBSchemaManager { if (!isset($this->tableList[strtolower($table)])) $newTable = true; if (is_array($spec)) { - $specValue = $this->$spec_orig['type']($spec_orig['parts']); + $specValue = $this->{$spec_orig['type']}($spec_orig['parts']); } else { $specValue = $spec; }
Bugfix: Complex (curly) syntax
diff --git a/pyoos/utils/asatime.py b/pyoos/utils/asatime.py index <HASH>..<HASH> 100644 --- a/pyoos/utils/asatime.py +++ b/pyoos/utils/asatime.py @@ -59,4 +59,4 @@ class AsaTime(object): date = dateparser.parse(date_string, tzinfos=cls.tzd) return date except: - raise + raise ValueError("Could not parse date string!")
Raise a short stack when we can't parse a date
diff --git a/index.php b/index.php index <HASH>..<HASH> 100644 --- a/index.php +++ b/index.php @@ -17,6 +17,11 @@ ? 'administration' : 'frontend'); + header('Expires: Mon, 12 Dec 1982 06:14:00 GMT'); + header('Last-Modified: ' . gmdate('r')); + header('Cache-Control: no-cache, must-revalidate, max-age=0'); + header('Pragma: no-cache'); + $output = renderer($renderer)->display(getCurrentPage()); header(sprintf('Content-Length: %d', strlen($output))); diff --git a/symphony/lib/boot/bundle.php b/symphony/lib/boot/bundle.php index <HASH>..<HASH> 100755 --- a/symphony/lib/boot/bundle.php +++ b/symphony/lib/boot/bundle.php @@ -13,11 +13,6 @@ } set_magic_quotes_runtime(0); - - header('Expires: Mon, 12 Dec 1982 06:14:00 GMT'); - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - header('Cache-Control: no-cache, must-revalidate, max-age=0'); - header('Pragma: no-cache'); require_once(DOCROOT . '/symphony/lib/boot/func.utilities.php'); require_once(DOCROOT . '/symphony/lib/boot/defines.php');
Moved cache preventing headers from bundle.php to index.php. Allows scripts to include the Symphony engine without getting unwanted headers set.
diff --git a/app/models/specialist_document_edition.rb b/app/models/specialist_document_edition.rb index <HASH>..<HASH> 100644 --- a/app/models/specialist_document_edition.rb +++ b/app/models/specialist_document_edition.rb @@ -22,7 +22,7 @@ class SpecialistDocumentEdition field :state, type: String - embeds_many :attachments + embeds_many :attachments, cascade_callbacks: true state_machine initial: :draft do event :publish do
Ensure attachment callbacks fire on edition save
diff --git a/app/services/never_logged_in_notifier.rb b/app/services/never_logged_in_notifier.rb index <HASH>..<HASH> 100644 --- a/app/services/never_logged_in_notifier.rb +++ b/app/services/never_logged_in_notifier.rb @@ -3,7 +3,7 @@ module NeverLoggedInNotifier def self.send_reminders return unless Rails.configuration.send_reminder_emails - Person.never_logged_in(25).each do |person| + Person.never_logged_in(25).find_each do |person| person.with_lock do # use db lock to allow cronjob to run on more than one instance send_reminder person end diff --git a/app/services/team_description_notifier.rb b/app/services/team_description_notifier.rb index <HASH>..<HASH> 100644 --- a/app/services/team_description_notifier.rb +++ b/app/services/team_description_notifier.rb @@ -3,7 +3,7 @@ module TeamDescriptionNotifier def self.send_reminders return unless Rails.configuration.send_reminder_emails - Group.without_description.each do |group| + Group.without_description.find_each do |group| group.with_lock do # use db lock to allow cronjob to run on more than one instance send_reminder group end
Replace each with find_each in existing notifiers
diff --git a/plugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sreinstall/StandardSREPage.java b/plugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sreinstall/StandardSREPage.java index <HASH>..<HASH> 100644 --- a/plugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sreinstall/StandardSREPage.java +++ b/plugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/sreinstall/StandardSREPage.java @@ -169,7 +169,9 @@ public class StandardSREPage extends AbstractSREInstallPage { SARLEclipsePlugin.logDebugMessage("Associated Eclipse Path (Path): " + path); //$NON-NLS-1$ IWorkspace workspace = ResourcesPlugin.getWorkspace(); IPath workspaceLocation = workspace.getRoot().getLocation(); + SARLEclipsePlugin.logDebugMessage("Workspace (Path): " + workspaceLocation); //$NON-NLS-1$ if (workspaceLocation.isPrefixOf(path)) { + SARLEclipsePlugin.logDebugMessage("Make relative path"); //$NON-NLS-1$ path = workspaceLocation.makeRelativeTo(workspaceLocation); } SARLEclipsePlugin.logDebugMessage("Resolved Path (Path): " + path); //$NON-NLS-1$
[eclipse] Add logging messages for debugging SRE file selection. see #<I>
diff --git a/lib/airrecord/table.rb b/lib/airrecord/table.rb index <HASH>..<HASH> 100644 --- a/lib/airrecord/table.rb +++ b/lib/airrecord/table.rb @@ -180,7 +180,7 @@ module Airrecord end def save - raise Error, "Unable to save a new record" if new_record? + return create if new_record? return true if @updated_keys.empty? diff --git a/test/table_test.rb b/test/table_test.rb index <HASH>..<HASH> 100644 --- a/test/table_test.rb +++ b/test/table_test.rb @@ -181,12 +181,12 @@ class TableTest < Minitest::Test assert record.save end - def test_update_raises_if_new_record + def test_update_creates_if_new_record record = @table.new("Name" => "omg") - assert_raises Airrecord::Error do - record.save - end + stub_post_request(record) + + assert record.save end def test_existing_record_is_not_new
Create new records instead of raising in #save
diff --git a/src/runner.js b/src/runner.js index <HASH>..<HASH> 100644 --- a/src/runner.js +++ b/src/runner.js @@ -3,6 +3,7 @@ var Runner = require('screener-runner'); var cloneDeep = require('lodash/cloneDeep'); var omit = require('lodash/omit'); var url = require('url'); +var pkg = require('../package.json'); // transform storybook object into screener states var transformToStates = function(storybook, baseUrl) { @@ -34,6 +35,10 @@ exports.run = function(config, options) { config = cloneDeep(config); return validate.storybookConfig(config) .then(function() { + // add package version + config.meta = { + 'screener-storybook': pkg.version + }; var host = 'localhost:' + config.storybookPort; var localUrl = 'http://' + host; // add tunnel details
add screener-storybook version to meta
diff --git a/lib/simple_form/components/labels.rb b/lib/simple_form/components/labels.rb index <HASH>..<HASH> 100644 --- a/lib/simple_form/components/labels.rb +++ b/lib/simple_form/components/labels.rb @@ -28,7 +28,7 @@ module SimpleForm end def label_text - SimpleForm.label_text.call(raw_label_text, required_label_text) + SimpleForm.label_text.call(raw_label_text, required_label_text).html_safe end def label_target diff --git a/lib/simple_form/inputs/base.rb b/lib/simple_form/inputs/base.rb index <HASH>..<HASH> 100644 --- a/lib/simple_form/inputs/base.rb +++ b/lib/simple_form/inputs/base.rb @@ -39,7 +39,7 @@ module SimpleForm send(component) end content.compact! - wrap(content.join).html_safe + wrap(content.join.html_safe) end protected
fix a couple of escaping issues in edge rails
diff --git a/aioice/exceptions.py b/aioice/exceptions.py index <HASH>..<HASH> 100644 --- a/aioice/exceptions.py +++ b/aioice/exceptions.py @@ -1,7 +1,3 @@ -class ConnectionError(Exception): - pass - - class TransactionError(Exception): response = None
[exceptions] don't define custom ConnectionError, it's not used
diff --git a/livestyle-client.js b/livestyle-client.js index <HASH>..<HASH> 100644 --- a/livestyle-client.js +++ b/livestyle-client.js @@ -191,7 +191,7 @@ toWatch = [], url, i; - cssIncludes.unshift({ href: location.pathname }); + //cssIncludes.unshift({ href: location.pathname }); // See https://github.com/One-com/livestyle/issues/11 for (i = 0; i < cssIncludes.length; i += 1) { url = removeCacheBuster(cssIncludes[i].href); @@ -277,7 +277,7 @@ setTimeout(startPolling, pollTimeout); } }; - cssIncludes.unshift({ href: location.pathname }); + //cssIncludes.unshift({ href: location.pathname }); // See https://github.com/One-com/livestyle/issues/11 proceed(); };
Disabled the client subscribing to the current page url, which introduced a lot of errors. See Issue #<I> to reimplement it.
diff --git a/lib/metadata/MIQExtract/MIQExtract.rb b/lib/metadata/MIQExtract/MIQExtract.rb index <HASH>..<HASH> 100644 --- a/lib/metadata/MIQExtract/MIQExtract.rb +++ b/lib/metadata/MIQExtract/MIQExtract.rb @@ -26,7 +26,7 @@ class MIQExtract def initialize(filename, ost = nil) # TODO: Always pass in MiqVm ost ||= OpenStruct.new @ost = ost - @dataDir = ost.config ? ost.config.dataDir : nil + @dataDir = ost.config.try(:dataDir) ost.scanData = {} if ost.scanData.nil? @xml_class = ost.xml_class.nil? ? XmlHash::Document : ost.xml_class
Refactor " : nil" used in ternary operators Add removed whitespace Revert refactor Revert refactor Revert refactor (transferred from ManageIQ/manageiq-gems-pending@7a<I>b<I>de<I>c7bc3e<I>cef<I>dbbea9ce<I>a<I>d)
diff --git a/src/SuffixExtractor.php b/src/SuffixExtractor.php index <HASH>..<HASH> 100644 --- a/src/SuffixExtractor.php +++ b/src/SuffixExtractor.php @@ -113,7 +113,7 @@ class SuffixExtractor } } - return [$host, '']; + return [$host, null]; }
Fix to result: null on incorrect TLD now
diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index <HASH>..<HASH> 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -705,8 +705,18 @@ EOT )); } + // Check for similar names/typos $similar = $this->findSimilar($name); if ($similar) { + // Check whether the minimum stability was the problem but the package exists + if ($requiredVersion === null && in_array($name, $similar, true)) { + throw new \InvalidArgumentException(sprintf( + 'Could not find a version of package %s matching your minimum-stability (%s). Require it with an explicit version constraint allowing its desired stability.', + $name, + $this->getMinimumStability($input) + )); + } + throw new \InvalidArgumentException(sprintf( "Could not find package %s.\n\nDid you mean " . (count($similar) > 1 ? 'one of these' : 'this') . "?\n %s", $name,
Fix warning for packages not existing while they exist but not at the required stability, fixes #<I>
diff --git a/lib/knapsack/adapters/minitest_adapter.rb b/lib/knapsack/adapters/minitest_adapter.rb index <HASH>..<HASH> 100644 --- a/lib/knapsack/adapters/minitest_adapter.rb +++ b/lib/knapsack/adapters/minitest_adapter.rb @@ -52,7 +52,11 @@ module Knapsack def self.test_path(obj) # Pick the first public method in the class itself, that starts with "test_" test_method_name = obj.public_methods(false).select{|m| m =~ /^test_/ }.first - method_object = obj.method(test_method_name) + if test_method_name.nil? + method_object = obj.method(obj.location.sub(/.*?test_/, 'test_')) + else + method_object = obj.method(test_method_name) + end full_test_path = method_object.source_location.first parent_of_test_dir_regexp = Regexp.new("^#{@@parent_of_test_dir}") test_path = full_test_path.gsub(parent_of_test_dir_regexp, '.')
Add support got Minitest::SharedExamples
diff --git a/lib/vagrant/action/vm/nfs.rb b/lib/vagrant/action/vm/nfs.rb index <HASH>..<HASH> 100644 --- a/lib/vagrant/action/vm/nfs.rb +++ b/lib/vagrant/action/vm/nfs.rb @@ -110,7 +110,6 @@ module Vagrant # up to the host class to define the specific behavior. def export_folders @env[:ui].info I18n.t("vagrant.actions.vm.nfs.exporting") - @env[:host].nfs_export(@env[:vm].uuid, guest_ip, folders) end @@ -119,9 +118,14 @@ module Vagrant @env[:ui].info I18n.t("vagrant.actions.vm.nfs.mounting") # Only mount the folders which have a guest path specified - am_folders = folders.select { |name, folder| folder[:guestpath] } - am_folders = Hash[*am_folders.flatten] if am_folders.is_a?(Array) - @env[:vm].guest.mount_nfs(host_ip, Hash[am_folders]) + mount_folders = {} + folders.each do |name, opts| + if opts[:guestpath] + mount_folders[name] = opts.dup + end + end + + @env[:vm].guest.mount_nfs(host_ip, mount_folders) end # Returns the IP address of the first host only network adapter
A much cleaner way to find NFS folders to mount
diff --git a/src/edeposit/amqp/ftp/__init__.py b/src/edeposit/amqp/ftp/__init__.py index <HASH>..<HASH> 100644 --- a/src/edeposit/amqp/ftp/__init__.py +++ b/src/edeposit/amqp/ftp/__init__.py @@ -5,9 +5,7 @@ # Interpreter version: python 2.7 # #= Imports ==================================================================== -import os -import sys - +from collections import namedtuple import sh @@ -19,3 +17,11 @@ from settings import * #= Functions & objects ======================================================== def reload_configuration(): sh.killall("-HUP", "proftpd") + + +class CreateUser(namedtuple("CreateUser", ["username"])): + pass + + +class RemoveUser(namedtuple("RemoveUser", ["username"])): + pass
Added CreateUser and RemoveUser messages.
diff --git a/salt/modules/hipchat.py b/salt/modules/hipchat.py index <HASH>..<HASH> 100644 --- a/salt/modules/hipchat.py +++ b/salt/modules/hipchat.py @@ -20,7 +20,7 @@ import requests import logging from urlparse import urljoin as _urljoin from requests.exceptions import ConnectionError -from six.moves import range +from salt.utils.six.moves import range log = logging.getLogger(__name__) __virtualname__ = 'hipchat'
Replaced module six in file /salt/modules/hipchat.py
diff --git a/salt/states/network.py b/salt/states/network.py index <HASH>..<HASH> 100644 --- a/salt/states/network.py +++ b/salt/states/network.py @@ -164,7 +164,7 @@ all interfaces are ignored unless specified. - max_bonds: 1 - updelay: 0 - use_carrier: on - - xmit_hash_policy: layer2 + - hashing-algorithm: layer2 - mtu: 9000 - autoneg: on - speed: 1000
Update network states doc Previously it was xmit_hash_policy, but that's not what the code is actually looking for.
diff --git a/modules/__tests__/Router-test.js b/modules/__tests__/Router-test.js index <HASH>..<HASH> 100644 --- a/modules/__tests__/Router-test.js +++ b/modules/__tests__/Router-test.js @@ -158,6 +158,27 @@ describe('Router', function () { }); }); + it('does not double escape when nested', function(done) { + // https://github.com/rackt/react-router/issues/1574 + let MyWrapperComponent = React.createClass({ + render () { return this.props.children; } + }); + let MyComponent = React.createClass({ + render () { return <div>{this.props.params.some_token}</div> } + }); + + React.render(( + <Router history={createHistory('/point/aaa%2Bbbb')}> + <Route component={MyWrapperComponent}> + <Route path="point/:some_token" component={MyComponent} /> + </Route> + </Router> + ), node, function () { + expect(node.textContent.trim()).toEqual('aaa+bbb'); + done(); + }); + }); + it('is happy to have colons in parameter values', function(done) { // https://github.com/rackt/react-router/issues/1759 let MyComponent = React.createClass({
added a test for nested routes
diff --git a/pkg/services/ngalert/schedule/schedule.go b/pkg/services/ngalert/schedule/schedule.go index <HASH>..<HASH> 100644 --- a/pkg/services/ngalert/schedule/schedule.go +++ b/pkg/services/ngalert/schedule/schedule.go @@ -700,26 +700,11 @@ func (r *alertRuleRegistry) del(key models.AlertRuleKey) (*alertRuleInfo, bool) return info, ok } -func (r *alertRuleRegistry) iter() <-chan models.AlertRuleKey { - c := make(chan models.AlertRuleKey) - - f := func() { - r.mu.Lock() - defer r.mu.Unlock() - - for k := range r.alertRuleInfo { - c <- k - } - close(c) - } - go f() - - return c -} - func (r *alertRuleRegistry) keyMap() map[models.AlertRuleKey]struct{} { - definitionsIDs := make(map[models.AlertRuleKey]struct{}) - for k := range r.iter() { + r.mu.Lock() + defer r.mu.Unlock() + definitionsIDs := make(map[models.AlertRuleKey]struct{}, len(r.alertRuleInfo)) + for k := range r.alertRuleInfo { definitionsIDs[k] = struct{}{} } return definitionsIDs
simplify getting a slice of keys (#<I>)
diff --git a/lib/parameters/instance_param.rb b/lib/parameters/instance_param.rb index <HASH>..<HASH> 100644 --- a/lib/parameters/instance_param.rb +++ b/lib/parameters/instance_param.rb @@ -31,7 +31,7 @@ module Parameters # The value of the instance param. # def value - @object.instance_variable_get("@#{@name}".to_sym) + @object.instance_variable_get(:"@#{@name}") end # @@ -44,7 +44,7 @@ module Parameters # The new value of the instance param. # def value=(value) - @object.instance_variable_set("@#{@name}".to_sym,coerce(value)) + @object.instance_variable_set(:"@#{@name}",coerce(value)) end #
Reduce usage of to_sym.
diff --git a/test/test_commands.py b/test/test_commands.py index <HASH>..<HASH> 100644 --- a/test/test_commands.py +++ b/test/test_commands.py @@ -194,15 +194,8 @@ invocation. subprocess.check_output( ['git', 'remote', 'set-url', 'origin', 'http://foo.com/bar.git'], stderr=subprocess.STDOUT, cwd=cwd_without_version) - try: - run_command( - 'import', ['--skip-existing', '--input', REPOS_FILE, '.']) - # The run_command function should raise an exception when the - # process returns a non-zero return code, so the next line should - # never get executed. - assert False - except BaseException: - pass + run_command( + 'import', ['--skip-existing', '--input', REPOS_FILE, '.']) output = run_command( 'import', ['--force', '--input', REPOS_FILE, '.']) @@ -225,12 +218,6 @@ invocation. try: run_command( 'import', ['--skip-existing', '--input', REPOS_FILE, '.']) - # The run_command function should raise an exception when the - # process returns a non-zero return code, so the next line should - # never get executed. - assert False - except BaseException: - pass finally: subprocess.check_output( ['git', 'remote', 'rm', 'foo'],
fix logic in test since the commands are expected to have a return code of zero (#<I>)
diff --git a/src/astral.py b/src/astral.py index <HASH>..<HASH> 100644 --- a/src/astral.py +++ b/src/astral.py @@ -668,6 +668,7 @@ class Location(object): return locals() tz = property(**tz()) + tzinfo = tz def solar_depression(): doc = """The number of degrees the sun must be below the horizon for the
Added `tzinfo` as an alias for `tz`
diff --git a/test/unit/utils-tests.js b/test/unit/utils-tests.js index <HASH>..<HASH> 100644 --- a/test/unit/utils-tests.js +++ b/test/unit/utils-tests.js @@ -143,4 +143,17 @@ test('libpq connection string building', function() { })) }) + test('password contains < and/or > characters', function () { + var sourceConfig = { + user:'brian', + password: 'hello<ther>e', + port: 5432, + host: 'localhost', + database: 'postgres' + } + var connectionString = 'pg://' + sourceConfig.user + ':' + sourceConfig.password + '@' + sourceConfig.host + ':' + sourceConfig.port + '/' + sourceConfig.database; + var config = utils.parseConnectionString(connectionString); + assert.same(config, sourceConfig); + }); + })
test case for password containing a < or > sign
diff --git a/lib/request.js b/lib/request.js index <HASH>..<HASH> 100644 --- a/lib/request.js +++ b/lib/request.js @@ -205,10 +205,9 @@ class Request extends AsyncResource { } if ( - this.streaming && this.body && - !this.body.destroyed && - typeof this.body.destroy === 'function' + typeof this.body.destroy === 'function' && + !this.body.destroyed ) { this.body.destroy(err) }
refactor: simplify req body destroy
diff --git a/Examples/Calculator/features/roles/calculating_individual.rb b/Examples/Calculator/features/roles/calculating_individual.rb index <HASH>..<HASH> 100644 --- a/Examples/Calculator/features/roles/calculating_individual.rb +++ b/Examples/Calculator/features/roles/calculating_individual.rb @@ -18,10 +18,6 @@ class CalculatingIndividual @calculator.get_ready_to @operate_with[next_operator] end - def equals - @calculator.equals - end - def can_see @calculator.display end
Refactoring: Apparently noone needs the Calculating Individual to respond to 'equals'
diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index <HASH>..<HASH> 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -45,7 +45,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $temp->add(new admin_setting_configtext('calendar_lookahead',get_string('configlookahead','admin'),get_string('helpupcominglookahead', 'admin'),21,PARAM_INT)); $temp->add(new admin_setting_configtext('calendar_maxevents',get_string('configmaxevents','admin'),get_string('helpupcomingmaxevents', 'admin'),10,PARAM_INT)); $temp->add(new admin_setting_configcheckbox('enablecalendarexport', get_string('enablecalendarexport', 'admin'), get_string('configenablecalendarexport','admin'), 1)); - $temp->add(new admin_setting_configtext('calendar_exportsalt', get_string('calendarexportsalt','admin'), get_string('configcalendarexportsalt', 'admin'), random_string(40))); + $temp->add(new admin_setting_configtext('calendar_exportsalt', get_string('calendarexportsalt','admin'), get_string('configcalendarexportsalt', 'admin'), random_string(60))); $ADMIN->add('appearance', $temp); // "htmleditor" settingpage
MDL-<I> longer default salt; merged from MOODLE_<I>_STABLE
diff --git a/lib/puppet/rails/param_name.rb b/lib/puppet/rails/param_name.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/rails/param_name.rb +++ b/lib/puppet/rails/param_name.rb @@ -9,7 +9,7 @@ class Puppet::Rails::ParamName < ActiveRecord::Base hash = {} hash[:name] = self.name.to_sym hash[:source] = source - hash[:value] = resource.param_values.find(:all, :conditions => [ "param_name_id = ?", self]).collect { |v| v.value } + hash[:value] = resource.param_values.find(:all, :conditions => [ "param_name_id = ?", self.id]).collect { |v| v.value } if hash[:value].length == 1 hash[:value] = hash[:value].shift elsif hash[:value].empty?
Fixed #<I> by applying patch by vvidic.
diff --git a/src/Schema/Extensions/GraphQLExtension.php b/src/Schema/Extensions/GraphQLExtension.php index <HASH>..<HASH> 100644 --- a/src/Schema/Extensions/GraphQLExtension.php +++ b/src/Schema/Extensions/GraphQLExtension.php @@ -14,7 +14,7 @@ abstract class GraphQLExtension implements \JsonSerializable * * @return DocumentAST */ - public function manipulateSchema(DocumentAST $current, DocumentAST $original): DocumentAST + public function manipulateSchema(DocumentAST $current, DocumentAST $original) { return $current; }
Remove return type to match Laravel style
diff --git a/Branch-SDK/src/io/branch/referral/ServerRequestActionCompleted.java b/Branch-SDK/src/io/branch/referral/ServerRequestActionCompleted.java index <HASH>..<HASH> 100644 --- a/Branch-SDK/src/io/branch/referral/ServerRequestActionCompleted.java +++ b/Branch-SDK/src/io/branch/referral/ServerRequestActionCompleted.java @@ -48,6 +48,10 @@ class ServerRequestActionCompleted extends ServerRequest { ex.printStackTrace(); constructError_ = true; } + + if (action != null && action.equals("purchase")) { + Log.e("BranchSDK", "Warning: You are sending a purchase event with our non-dedicated purchase function. Please see function sendCommerceEvent"); + } } public ServerRequestActionCompleted(String requestPath, JSONObject post, Context context) {
log warning for non purchase event sent to usercompletedaction
diff --git a/src/main/java/com/flipkart/zjsonpatch/PathUtils.java b/src/main/java/com/flipkart/zjsonpatch/PathUtils.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/flipkart/zjsonpatch/PathUtils.java +++ b/src/main/java/com/flipkart/zjsonpatch/PathUtils.java @@ -21,8 +21,8 @@ class PathUtils { private static String decodePath(Object object) { String path = object.toString(); // see http://tools.ietf.org/html/rfc6901#section-4 - path = DECODED_TILDA_PATTERN.matcher(path).replaceAll("~"); - return DECODED_SLASH_PATTERN.matcher(path).replaceAll("/"); + path = DECODED_SLASH_PATTERN.matcher(path).replaceAll("/"); + return DECODED_TILDA_PATTERN.matcher(path).replaceAll("~"); } static <T> String getPathRepresentation(List<T> path) {
Switched `tilda (~)` and `slash(/)` decode order.
diff --git a/instana/__init__.py b/instana/__init__.py index <HASH>..<HASH> 100644 --- a/instana/__init__.py +++ b/instana/__init__.py @@ -24,7 +24,7 @@ __author__ = 'Instana Inc.' __copyright__ = 'Copyright 2017 Instana Inc.' __credits__ = ['Pavlo Baron', 'Peter Giacomo Lombardo'] __license__ = 'MIT' -__version__ = '0.7.10' +__version__ = '0.7.11' __maintainer__ = 'Peter Giacomo Lombardo' __email__ = '[email protected]' diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name='instana', - version='0.7.10', + version='0.7.11', download_url='https://github.com/instana/python-sensor', url='https://www.instana.com/', license='MIT',
Bump package version to <I>
diff --git a/cmsplugin_zinnia/__init__.py b/cmsplugin_zinnia/__init__.py index <HASH>..<HASH> 100644 --- a/cmsplugin_zinnia/__init__.py +++ b/cmsplugin_zinnia/__init__.py @@ -1,5 +1,5 @@ """cmsplugin_zinnia""" -__version__ = '0.4' +__version__ = '0.4.1' __license__ = 'BSD License' __author__ = 'Fantomas42'
Bump to version <I>
diff --git a/DependencyInjection/EasyAdminExtension.php b/DependencyInjection/EasyAdminExtension.php index <HASH>..<HASH> 100644 --- a/DependencyInjection/EasyAdminExtension.php +++ b/DependencyInjection/EasyAdminExtension.php @@ -62,6 +62,11 @@ class EasyAdminExtension extends Extension $parts = explode('\\', $entityClass); $entityName = array_pop($parts); + // to avoid entity name collision, make sure that its name is unique + while (array_key_exists($entityName, $entities)) { + $entityName .= '_'; + } + $entities[$entityName] = array( 'label' => !is_numeric($key) ? $key : $entityName, 'name' => $entityName, @@ -79,6 +84,11 @@ class EasyAdminExtension extends Extension $parts = explode('\\', $entityConfiguration['class']); $realEntityName = array_pop($parts); + // to avoid entity name collision, make sure that its name is unique + while (array_key_exists($realEntityName, $entities)) { + $realEntityName .= '_'; + } + // copy the original entity to not loose any of its configuration $entities[$realEntityName] = $config[$customEntityName];
Allow to have different entities with the same exact name This is very rare, except for entities like "Category" which can be defined in different bundles for different purposes. The proposed solution is very simple, but it should do the trick.
diff --git a/ui/app/mixins/searchable.js b/ui/app/mixins/searchable.js index <HASH>..<HASH> 100644 --- a/ui/app/mixins/searchable.js +++ b/ui/app/mixins/searchable.js @@ -48,7 +48,7 @@ export default Mixin.create({ }), listSearched: computed('searchTerm', 'listToSearch.[]', 'searchProps.[]', function() { - const searchTerm = this.get('searchTerm'); + const searchTerm = this.get('searchTerm').trim(); if (searchTerm && searchTerm.length) { const results = []; if (this.get('exactMatchEnabled')) {
Trim whitespace on the search term Trailing whitespace messes with tokenization
diff --git a/communicator/winrm/communicator.go b/communicator/winrm/communicator.go index <HASH>..<HASH> 100644 --- a/communicator/winrm/communicator.go +++ b/communicator/winrm/communicator.go @@ -217,7 +217,7 @@ func (c *Communicator) newCopyClient() (*winrmcp.Winrmcp, error) { OperationTimeout: c.Timeout(), MaxOperationsPerShell: 15, // lowest common denominator } - + if c.connInfo.NTLM == true { config.TransportDecorator = func() winrm.Transporter { return &winrm.ClientNTLM{} } }
code reformatted with gofmt
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,6 @@ const stylelint = require('stylelint'); const debug = require('debug')('prettier-stylelint:main'); // const explorer = cosmiconfig('stylelint'); -const linterAPI = stylelint.createLinter({ fix: true }); /** * Resolve Config for the given file @@ -19,6 +18,7 @@ const linterAPI = stylelint.createLinter({ fix: true }); */ function resolveConfig(file, options = {}) { const resolve = resolveConfig.resolve; + const linterAPI = stylelint.createLinter({ fix: true }); if (options.stylelintConfig) { return Promise.resolve(resolve(options.stylelintConfig)); @@ -68,6 +68,8 @@ resolveConfig.resolve = (stylelintConfig) => { }; function stylelinter(code, filePath) { + const linterAPI = stylelint.createLinter({ fix: true }); + return linterAPI ._lintSource({ code,
fix: dont re use the same linter instance because we can't invalidate the config cache
diff --git a/pypiper/pypiper.py b/pypiper/pypiper.py index <HASH>..<HASH> 100755 --- a/pypiper/pypiper.py +++ b/pypiper/pypiper.py @@ -888,15 +888,24 @@ class PipelineManager(object): if not annotation: annotation = self.pipeline_name + annotation = str(annotation) + # In case the value is passed with trailing whitespace filename = str(filename).strip() - annotation = str(annotation) + + # better to use a relative path in this file + # convert any absoluate pathsinto relative paths + if os.path.isabs(filename): + relative_filename = os.path.relpath(filename, + self.pipeline_outfolder) + else: + relative_filename = filename message_raw = "{key}\t{filename}\t{annotation}".format( - key=key, filename=filename, annotation=annotation) + key=key, filename=relative_filename, annotation=annotation) - message_markdown = "> `{key}`\t{filename}\t{annotation}\t_RES_".format( - key=key, filename=filename, annotation=annotation) + message_markdown = "> `{key}`\t{filename}\t{annotation}\t_FIG_".format( + key=key, filename=relative_filename, annotation=annotation) print(message_markdown)
Finalize report_figure to relative paths
diff --git a/src/main/java/org/asteriskjava/manager/internal/ManagerReaderImpl.java b/src/main/java/org/asteriskjava/manager/internal/ManagerReaderImpl.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/asteriskjava/manager/internal/ManagerReaderImpl.java +++ b/src/main/java/org/asteriskjava/manager/internal/ManagerReaderImpl.java @@ -343,11 +343,7 @@ public class ManagerReaderImpl implements ManagerReader final String internalActionId = ManagerUtil.getInternalActionId(actionId); if (internalActionId != null) { - responseClass = expectedResponseClasses.get(internalActionId); - if (responseClass != null) - { - expectedResponseClasses.remove(internalActionId); - } + responseClass = expectedResponseClasses.remove(internalActionId); } final ManagerResponse response = responseBuilder.buildResponse(responseClass, buffer);
Remove a check-then-act in ManagerReaderImpl
diff --git a/src/Client/Middleware/MiddlewareClient.php b/src/Client/Middleware/MiddlewareClient.php index <HASH>..<HASH> 100644 --- a/src/Client/Middleware/MiddlewareClient.php +++ b/src/Client/Middleware/MiddlewareClient.php @@ -22,7 +22,7 @@ trait MiddlewareClient /** * @var IOAuthClient */ - private $client; + protected $client; /** * Set the OAuth Client.
fix(Middleware): Change middleware client accessibility
diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_zones.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_zones.go index <HASH>..<HASH> 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gce_zones.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gce_zones.go @@ -20,6 +20,7 @@ package gce import ( "context" + "fmt" "strings" compute "google.golang.org/api/compute/v1" @@ -79,7 +80,9 @@ func (g *Cloud) ListZonesInRegion(region string) ([]*compute.Zone, error) { defer cancel() mc := newZonesMetricContext("list", region) - list, err := g.c.Zones().List(ctx, filter.Regexp("region", g.getRegionLink(region))) + // Use regex match instead of an exact regional link constructed from getRegionalLink below. + // See comments in issue kubernetes/kubernetes#87905 + list, err := g.c.Zones().List(ctx, filter.Regexp("region", fmt.Sprintf(".*/regions/%s", region))) if err != nil { return nil, mc.Observe(err) }
Fix ListZonesInRegion() after client BasePath change This path fixes region Regex for listing zones. Compute client BasePath changed to compute.googleapis.com, but resource URI were left as www.googleapis.com
diff --git a/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialSideNav.java b/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialSideNav.java index <HASH>..<HASH> 100644 --- a/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialSideNav.java +++ b/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialSideNav.java @@ -31,6 +31,7 @@ import com.google.gwt.user.client.ui.Widget; import com.google.web.bindery.event.shared.HandlerRegistration; import gwt.material.design.client.base.*; import gwt.material.design.client.base.helper.DOMHelper; +import gwt.material.design.client.base.mixin.ActiveMixin; import gwt.material.design.client.base.mixin.StyleMixin; import gwt.material.design.client.constants.*; import gwt.material.design.client.events.*; @@ -328,6 +329,11 @@ public class MaterialSideNav extends MaterialWidget implements HasSelectables, H ClearActiveEvent.fire(this); } + public void setActive(int index) { + clearActive(); + getWidget(index).addStyleName(CssName.ACTIVE); + } + @Override protected void build() { applyFixedType();
Added method setActive(int index) to automatically select sidenav items.
diff --git a/client/extensions/woocommerce/app/dashboard/pre-setup-view.js b/client/extensions/woocommerce/app/dashboard/pre-setup-view.js index <HASH>..<HASH> 100644 --- a/client/extensions/woocommerce/app/dashboard/pre-setup-view.js +++ b/client/extensions/woocommerce/app/dashboard/pre-setup-view.js @@ -8,7 +8,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -import { every, includes, isEmpty, keys, pick, trim } from 'lodash'; +import { every, find, includes, isEmpty, keys, pick, trim } from 'lodash'; import { localize } from 'i18n-calypso'; /**
Store: Fix store address setup for CA addresses by using the correct `find`
diff --git a/testsuite.py b/testsuite.py index <HASH>..<HASH> 100644 --- a/testsuite.py +++ b/testsuite.py @@ -40,6 +40,7 @@ from __future__ import print_function +import errno import kconfiglib import os import platform @@ -2433,8 +2434,16 @@ def equal_confs(): with open(".config") as menu_conf: l1 = menu_conf.readlines() - with open("._config") as my_conf: - l2 = my_conf.readlines() + try: + my_conf = open("._config") + except IOError as e: + if e.errno != errno.ENOENT: + raise + print("._config not found. Did you forget to apply the Makefile patch?") + return False + else: + with my_conf: + l2 = my_conf.readlines() # Skip the header generated by 'conf' unset_re = r"# CONFIG_(\w+) is not set"
Warn if the Makefile patch hasn't been applied The old error from the test suite was cryptic.
diff --git a/session/bootstrap.go b/session/bootstrap.go index <HASH>..<HASH> 100644 --- a/session/bootstrap.go +++ b/session/bootstrap.go @@ -1421,7 +1421,7 @@ func doDMLWorks(s Session) { } func mustExecute(s Session, sql string) { - _, err := s.Execute(context.Background(), sql) + _, err := s.ExecuteInternal(context.Background(), sql) if err != nil { debug.PrintStack() logutil.BgLogger().Fatal("mustExecute error", zap.Error(err))
session: use ExecuteInternal to execute the bootstrap SQLs (#<I>)
diff --git a/test/suite/Integration/Counterpart/CounterpartMatcherDriverTest.php b/test/suite/Integration/Counterpart/CounterpartMatcherDriverTest.php index <HASH>..<HASH> 100644 --- a/test/suite/Integration/Counterpart/CounterpartMatcherDriverTest.php +++ b/test/suite/Integration/Counterpart/CounterpartMatcherDriverTest.php @@ -16,6 +16,9 @@ use Eloquent\Phony\Matcher\WrappedMatcher; use PHPUnit_Framework_TestCase; use ReflectionClass; +/** + * @requires PHP 5.4.0-dev + */ class CounterpartMatcherDriverTest extends PHPUnit_Framework_TestCase { protected function setUp()
Add Counterpart matcher driver test requirement for easy version switching.
diff --git a/hazelcast/src/main/java/com/hazelcast/instance/Node.java b/hazelcast/src/main/java/com/hazelcast/instance/Node.java index <HASH>..<HASH> 100644 --- a/hazelcast/src/main/java/com/hazelcast/instance/Node.java +++ b/hazelcast/src/main/java/com/hazelcast/instance/Node.java @@ -166,7 +166,6 @@ public class Node { clusterService = new ClusterServiceImpl(this); textCommandService = new TextCommandServiceImpl(this); nodeExtension.printNodeInfo(this); - versionCheck.check(this, getBuildInfo().getVersion(), buildInfo.isEnterprise()); this.multicastService = createMulticastService(addressPicker); initializeListeners(config); joiner = nodeContext.createJoiner(this); @@ -358,6 +357,7 @@ public class Node { logger.warning("ManagementCenterService could not be constructed!", e); } nodeExtension.afterStart(this); + versionCheck.check(this, getBuildInfo().getVersion(), buildInfo.isEnterprise()); } public void shutdown(final boolean terminate) {
Moved version check after node starts.
diff --git a/test/test_helper.rb b/test/test_helper.rb index <HASH>..<HASH> 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -62,3 +62,7 @@ end require "active_storage/attached" ActiveRecord::Base.send :extend, ActiveStorage::Attached::Macros + +require "global_id" +GlobalID.app = "ActiveStorageExampleApp" +ActiveRecord::Base.send :include, GlobalID::Identification
Still need GlobalID for PurgeJob serialization
diff --git a/lib/unix_daemon.rb b/lib/unix_daemon.rb index <HASH>..<HASH> 100644 --- a/lib/unix_daemon.rb +++ b/lib/unix_daemon.rb @@ -76,7 +76,9 @@ module ActsAsFerret # checked on ubuntu and OSX only def process_exists(pid) ps = IO.popen("ps -fp #{pid}", "r") - ps.to_a[1] =~ /ferret_server/ + process = ps.to_a[1] + ps.close + process =~ /ferret_server/ end end
close pipe so defunct ps process is not left hanging around
diff --git a/webapps/client/scripts/filter/modals/cam-tasklist-filter-modal.js b/webapps/client/scripts/filter/modals/cam-tasklist-filter-modal.js index <HASH>..<HASH> 100644 --- a/webapps/client/scripts/filter/modals/cam-tasklist-filter-modal.js +++ b/webapps/client/scripts/filter/modals/cam-tasklist-filter-modal.js @@ -31,12 +31,12 @@ define([ function unfixLike(key, value) { if (likeExp.test(key)) { - if (val[0] === '%') { - val = val.slice(1, val.length); + if (value[0] === '%') { + value = value.slice(1, value.length); } - if (val.slice(-1) === '%') { - val = val.slice(0, -1); + if (value.slice(-1) === '%') { + value = value.slice(0, -1); } } return value;
fix(filter): fix typo in filter dialog related to CAM-<I>
diff --git a/lib/findJsModulesFor.js b/lib/findJsModulesFor.js index <HASH>..<HASH> 100644 --- a/lib/findJsModulesFor.js +++ b/lib/findJsModulesFor.js @@ -116,6 +116,14 @@ function findJsModulesFor(config, pathToCurrentFile, variableName) { }); }); + config.environmentCoreModules().forEach((dep) => { + if (dep.toLowerCase() !== variableName.toLowerCase()) { + return; + } + + matchedModules.push(new JsModule({ importPath: dep })); + }); + // Find imports from package.json const ignorePrefixes = config.get('ignore_package_prefixes').map( (prefix) => escapeRegExp(prefix)); @@ -139,14 +147,6 @@ function findJsModulesFor(config, pathToCurrentFile, variableName) { } }); - config.environmentCoreModules().forEach((dep) => { - if (dep.toLowerCase() !== variableName.toLowerCase()) { - return; - } - - matchedModules.push(new JsModule({ importPath: dep })); - }); - // If you have overlapping lookup paths, you might end up seeing the same // module to import twice. In order to dedupe these, we remove the module // with the longest path
Move finding environmentCoreModules above dependencies Conceptually these should be considered first, since they are part of the environment. Furthermore, this is how we group things so it is nice to have the symmetry here.
diff --git a/packages/hw-transport-webhid/src/TransportWebHID.js b/packages/hw-transport-webhid/src/TransportWebHID.js index <HASH>..<HASH> 100644 --- a/packages/hw-transport-webhid/src/TransportWebHID.js +++ b/packages/hw-transport-webhid/src/TransportWebHID.js @@ -115,10 +115,10 @@ export default class TransportWebHID extends Transport<HIDDevice> { getFirstLedgerDevice().then( (device) => { if (!device) { - throw new Error('Access denied to use Ledger device') - } - - if (!unsubscribed) { + observer.error( + new TransportOpenUserCancelled("Access denied to use Ledger device") + ); + } else if (!unsubscribed) { const deviceModel = identifyUSBProductId(device.productId); observer.next({ type: "add", descriptor: device, deviceModel }); observer.complete();
call observer.error instead of throwing an error
diff --git a/common/src/test/java/io/netty/util/concurrent/DefaultPromiseTest.java b/common/src/test/java/io/netty/util/concurrent/DefaultPromiseTest.java index <HASH>..<HASH> 100644 --- a/common/src/test/java/io/netty/util/concurrent/DefaultPromiseTest.java +++ b/common/src/test/java/io/netty/util/concurrent/DefaultPromiseTest.java @@ -179,22 +179,12 @@ public class DefaultPromiseTest { @Test(timeout = 2000) public void testLateListenerIsOrderedCorrectlySuccess() throws InterruptedException { - final EventExecutor executor = new TestEventExecutor(); - try { - testLateListenerIsOrderedCorrectly(null); - } finally { - executor.shutdownGracefully(0, 0, TimeUnit.SECONDS).sync(); - } + testLateListenerIsOrderedCorrectly(null); } @Test(timeout = 2000) public void testLateListenerIsOrderedCorrectlyFailure() throws InterruptedException { - final EventExecutor executor = new TestEventExecutor(); - try { - testLateListenerIsOrderedCorrectly(fakeException()); - } finally { - executor.shutdownGracefully(0, 0, TimeUnit.SECONDS).sync(); - } + testLateListenerIsOrderedCorrectly(fakeException()); } /**
DefaultPromiseTest dead code removal Motivation: DefaultPromiseTest has dead code which was left over from a code restructure. Shared code between 2 tests was moved into a common method, but some code which was not cleaned up in each of these methods after the code was moved. Modifications: - Delete dead code in DefaultPromiseTest Result: Less dead code
diff --git a/code/plugins/system/koowa.php b/code/plugins/system/koowa.php index <HASH>..<HASH> 100644 --- a/code/plugins/system/koowa.php +++ b/code/plugins/system/koowa.php @@ -37,9 +37,10 @@ class plgSystemKoowa extends JPlugin JLoader::import('libraries.koowa.koowa', JPATH_ROOT); JLoader::import('libraries.koowa.loader.loader', JPATH_ROOT); - //Initialise the factory + //Instanciate the singletons KLoader::instantiate(); KFactory::instantiate(); + KRequest::instantiate(); //Add loader adapters KLoader::addAdapter(new KLoaderAdapterJoomla());
re #<I> : KRequest is now a singleton. Added instanciate call.
diff --git a/src/Application.php b/src/Application.php index <HASH>..<HASH> 100644 --- a/src/Application.php +++ b/src/Application.php @@ -262,7 +262,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn $this->loadedProviders[$providerName] = true; $provider->register(); - $provider->boot(); + $this->call([$provider, 'boot']); } /**
Call providers boot method via IoC.
diff --git a/api/backups/restore.go b/api/backups/restore.go index <HASH>..<HASH> 100644 --- a/api/backups/restore.go +++ b/api/backups/restore.go @@ -126,9 +126,6 @@ func (c *Client) restore(backupId string, newClient ClientConnection) error { return errors.Annotatef(err, "cannot perform restore: %v", remoteError) } } - if err == nil { - return errors.Errorf("An unreported error occured in the server.") - } if err != rpc.ErrShutdown { return errors.Annotatef(err, "cannot perform restore: %v", remoteError) }
Removed erroneous check
diff --git a/src/Conductors/Concerns/ConductsAbilities.php b/src/Conductors/Concerns/ConductsAbilities.php index <HASH>..<HASH> 100644 --- a/src/Conductors/Concerns/ConductsAbilities.php +++ b/src/Conductors/Concerns/ConductsAbilities.php @@ -86,10 +86,8 @@ trait ConductsAbilities // In an ideal world, we'd be using $collection->every('is_string'). // Since we also support older versions of Laravel, we'll need to - // use "contains" with a double negative. Such is legacy life. - return ! (new Collection($abilities))->contains(function ($ability) { - return ! is_string($ability); - }); + // use "array_filter" with a double count. Such is legacy life. + return count(array_filter($abilities, 'is_string')) == count($abilities); } /**
Use "array_filter" instead of "contains" The order of the arguments passed to the "contains" callback has changed between versions of Laravel making it impossible to use in Bouncer.......
diff --git a/findbugs/src/java/edu/umd/cs/findbugs/BugInstance.java b/findbugs/src/java/edu/umd/cs/findbugs/BugInstance.java index <HASH>..<HASH> 100644 --- a/findbugs/src/java/edu/umd/cs/findbugs/BugInstance.java +++ b/findbugs/src/java/edu/umd/cs/findbugs/BugInstance.java @@ -169,6 +169,9 @@ public class BugInstance implements Comparable<BugInstance>, XMLWriteable, Seria return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.ENGLISH); } + private boolean isFakeBugType(String type) { + return "MISSING".equals(type) || "FOUND".equals(type); + } /** * Constructor. * @@ -185,7 +188,7 @@ public class BugInstance implements Comparable<BugInstance>, XMLWriteable, Seria BugPattern p = DetectorFactoryCollection.instance().lookupBugPattern(type); if (p == null) { - if (!"MISSING".equals(type) && missingBugTypes.add(type)) { + if (!isFakeBugType(type) && missingBugTypes.add(type)) { String msg = "Can't find definition of bug type " + type; AnalysisContext.logError(msg, new IllegalArgumentException(msg)); }
OK, web cloud tests use both MISSING and FOUND as bug types... sigh.... Accomodate both git-svn-id: <URL>
diff --git a/lib/instance/executable_sequence_proxy.rb b/lib/instance/executable_sequence_proxy.rb index <HASH>..<HASH> 100644 --- a/lib/instance/executable_sequence_proxy.rb +++ b/lib/instance/executable_sequence_proxy.rb @@ -68,7 +68,7 @@ module RightScale AuditCookStub.instance.setup_audit_forwarding(@thread_name, context.audit) AuditCookStub.instance.on_close(@thread_name) { @audit_closed = true; check_done } end - + # FIX: thread_name should never be nil from the core in future, but # temporarily we must supply the default thread_name before if nil. in # future we should fail execution when thread_name is reliably present and @@ -80,7 +80,7 @@ module RightScale # # === Return # result(String):: Thread name of this context - def get_thread_name_from_context(context) + def get_thread_name_from_context(context) thread_name = nil thread_name = context.thread_name if context.respond_to?(:thread_name) Log.warn("Encountered a nil thread name unexpectedly, defaulting to '#{RightScale::AgentConfig.default_thread_name}'") unless thread_name @@ -99,6 +99,10 @@ module RightScale # true:: Always return true def run @succeeded = true + if context.payload.executables.empty? + succeed + return + end @context.audit.create_new_section('Querying tags')
acu<I> do not run boot bundle if it is empty This prevent server without any RightScript or recipe from stranding when repose is down
diff --git a/src/main/java/uk/ac/bolton/spaws/model/impl/Ratings.java b/src/main/java/uk/ac/bolton/spaws/model/impl/Ratings.java index <HASH>..<HASH> 100644 --- a/src/main/java/uk/ac/bolton/spaws/model/impl/Ratings.java +++ b/src/main/java/uk/ac/bolton/spaws/model/impl/Ratings.java @@ -24,7 +24,7 @@ public class Ratings implements IRatings { private double average = 0.0; private int min = 0; private int max = 5; - private int sample = 1; + private int sample = 0; public String getVerb() { return VERB;
Set initial sample size for a set of ratings to 0
diff --git a/salt/modules/useradd.py b/salt/modules/useradd.py index <HASH>..<HASH> 100644 --- a/salt/modules/useradd.py +++ b/salt/modules/useradd.py @@ -391,9 +391,6 @@ def _format_info(data): ''' # Put GECOS info into a list gecos_field = data.pw_gecos.split(',', 3) - # Assign empty strings for any unspecified GECOS fields - while len(gecos_field) < 4: - gecos_field.append('') return {'gid': data.pw_gid, 'groups': list_groups(data.pw_name,), @@ -402,10 +399,10 @@ def _format_info(data): 'passwd': data.pw_passwd, 'shell': data.pw_shell, 'uid': data.pw_uid, - 'fullname': gecos_field[0], - 'roomnumber': gecos_field[1], - 'workphone': gecos_field[2], - 'homephone': gecos_field[3]} + 'fullname': gecos_field.get(0, ''), + 'roomnumber': gecos_field.get(1, ''), + 'workphone': gecos_field.get(2, ''), + 'homephone': gecos_field.get(3, '')} def list_groups(name):
Making the gecos stuff easier to read
diff --git a/indra/assemblers/pybel/assembler.py b/indra/assemblers/pybel/assembler.py index <HASH>..<HASH> 100644 --- a/indra/assemblers/pybel/assembler.py +++ b/indra/assemblers/pybel/assembler.py @@ -400,7 +400,7 @@ def belgraph_to_signed_graph( rel = edge_data.get('relation') pos_edge = \ (u, v, ('sign', 0)) + \ - tuple((k, (tuple(v) if isinstance(v, list) else v)) + tuple((k, tuple(v)) for k, v in edge_data.get('annotations', {}).items()) \ if propagate_annotations else (u, v, ('sign', 0)) # Unpack tuple pairs at indices >1 or they'll be in nested tuples
Fix creation of annotation propogated pybeledge Since this v will always be an instance of a dictionary where the keys are the annotations, just directly tuple(v) to get the tuple of all values for that annotation
diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index <HASH>..<HASH> 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -879,6 +879,7 @@ OpenLayers.Util.createUniqueID = function(prefix) { /** * Constant: INCHES_PER_UNIT * {Object} Constant inches per unit -- borrowed from MapServer mapscale.c + * derivation of nautical miles from http://en.wikipedia.org/wiki/Nautical_mile */ OpenLayers.INCHES_PER_UNIT = { 'inches': 1.0, @@ -886,10 +887,12 @@ OpenLayers.INCHES_PER_UNIT = { 'mi': 63360.0, 'm': 39.3701, 'km': 39370.1, - 'dd': 4374754 + 'dd': 4374754, + 'yd': 36 }; OpenLayers.INCHES_PER_UNIT["in"]= OpenLayers.INCHES_PER_UNIT.inches; OpenLayers.INCHES_PER_UNIT["degrees"] = OpenLayers.INCHES_PER_UNIT.dd; +OpenLayers.INCHES_PER_UNIT["nmi"] = 1852 * OpenLayers.INCHES_PER_UNIT.m; /** * Constant: DOTS_PER_INCH
add yards and nautical miles to OpenLayers units. (Closes #<I>) git-svn-id: <URL>
diff --git a/src/modules/getAnimationPromises.js b/src/modules/getAnimationPromises.js index <HASH>..<HASH> 100644 --- a/src/modules/getAnimationPromises.js +++ b/src/modules/getAnimationPromises.js @@ -3,7 +3,7 @@ import { transitionEnd } from '../helpers'; const getAnimationPromises = function() { const promises = []; - let animatedElements = queryAll(this.options.animationSelector); + const animatedElements = queryAll(this.options.animationSelector, document.body); animatedElements.forEach((element) => { const promise = new Promise((resolve) => { element.addEventListener(transitionEnd(), (event) => {
Scope animated elements selector to body
diff --git a/linebot/event.go b/linebot/event.go index <HASH>..<HASH> 100644 --- a/linebot/event.go +++ b/linebot/event.go @@ -230,9 +230,10 @@ func (e *Event) UnmarshalJSON(body []byte) (err error) { case EventTypePostback: e.Postback = rawEvent.Postback case EventTypeBeacon: - deviceMessage, err := hex.DecodeString(rawEvent.Beacon.DM) + var deviceMessage []byte + deviceMessage, err = hex.DecodeString(rawEvent.Beacon.DM) if err != nil { - return err + return } e.Beacon = &Beacon{ Hwid: rawEvent.Beacon.Hwid,
Update return statement of EventTypeBeacon
diff --git a/lib/db/services.php b/lib/db/services.php index <HASH>..<HASH> 100644 --- a/lib/db/services.php +++ b/lib/db/services.php @@ -946,7 +946,6 @@ $services = array( 'core_webservice_get_site_info', 'core_notes_create_notes', 'core_user_get_course_user_profiles', - 'core_enrol_get_enrolled_users', 'core_message_send_instant_messages', 'mod_assign_get_grades', 'mod_assign_get_assignments',
MDL-<I> webservices: Deleted duplicated function in mobile service
diff --git a/lib/specinfra/command/base/service.rb b/lib/specinfra/command/base/service.rb index <HASH>..<HASH> 100644 --- a/lib/specinfra/command/base/service.rb +++ b/lib/specinfra/command/base/service.rb @@ -12,6 +12,10 @@ class Specinfra::Command::Base::Service < Specinfra::Command::Base "initctl status #{escape(service)} | grep running" end + def check_is_running_under_daemontools(service) + "svstat /service/#{escape(service)} | grep -E 'up \\(pid [0-9]+\\)'" + end + def check_is_monitored_by_monit(service) "monit status" end
Support daemontools Support daemontools (djb-ware) for checking service.
diff --git a/src/HasTags.php b/src/HasTags.php index <HASH>..<HASH> 100644 --- a/src/HasTags.php +++ b/src/HasTags.php @@ -100,11 +100,11 @@ trait HasTags $tags = $className::findOrCreate($tags); - collect($tags)->each(function (Tag $tag) { - if (! $this->tags()->get()->contains('id', $tag->id)) { - $this->tags()->attach($tag); - } - }); + if (! $tags instanceof \Illuminate\Support\Collection) { + $tags = collect($tags); + } + + $this->tags()->syncWithoutDetaching($tags->pluck('id')->toArray()); return $this; }
Use syncWithoutDetaching instead of conditionally attaching tags