diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ except ImportError: # Python version and OS. REQUIRED_PACKAGES = [ 'httplib2>=0.8', - 'oauth2client>=1.2', + 'oauth2client>=1.4.8', 'protorpc>=0.9.1', 'six>=1.8.0', ]
Set a minimum required oauth2client version. This ensures we pick up recent fixes for better `body` handling on <I> when `body` is a stream.
diff --git a/ET_Client.php b/ET_Client.php index <HASH>..<HASH> 100644 --- a/ET_Client.php +++ b/ET_Client.php @@ -58,7 +58,7 @@ class ET_Client extends SoapClient { $url = "https://www.exacttargetapis.com/platform/v1/endpoints/soap?access_token=".$this->getAuthToken($this->tenantKey); $endpointResponse = restGet($url); $endpointObject = json_decode($endpointResponse->body); - if ($endpointResponse && property_exists($endpointObject,"url")){ + if ($endpointObject && property_exists($endpointObject,"url")){ $this->endpoint = $endpointObject->url; } else { throw new Exception('Unable to determine stack using /platform/v1/endpoints/:'.$endpointResponse->body);
Fix ET_Client::__construct incorrectly checking the response object instead of the response body for an endpoint
diff --git a/components/html/html.php b/components/html/html.php index <HASH>..<HASH> 100644 --- a/components/html/html.php +++ b/components/html/html.php @@ -67,7 +67,7 @@ class Component_html extends Component { } $args['pagenum'] = any($analytics->pandora_result['page_num'], 1); - $args['version'] = $webapp->getAppVersion(); + $args['version'] = (!empty($webapp) ? $webapp->getAppVersion() : "unknown"); $args['filters'] = $analytics->qpmreq->filter['brand'] ? '1' : '0'; $args['filters'] .= $analytics->qpmreq->filter['color'] ? '1' : '0'; $args['filters'] .= $analytics->qpmreq->filter['storeswithdeals'] ? '1' : '0'; //(coupons)
- Fix error in html component when called from command line
diff --git a/test/genomeintervaltree_test.py b/test/genomeintervaltree_test.py index <HASH>..<HASH> 100644 --- a/test/genomeintervaltree_test.py +++ b/test/genomeintervaltree_test.py @@ -39,14 +39,12 @@ def test_knownGene(): def test_ensGene(): # Smoke-test we can at least read ensGene. ensGene_url = 'http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/ensGene.txt.gz' - ensGene_url = 'http://kt.era.ee/distribute/pyintervaltree/ensGene.txt.gz' ensGene = GenomeIntervalTree.from_table(url=ensGene_url, mode='cds', parser=UCSCTable.ENS_GENE) assert len(ensGene) == 204940 def test_refGene(): # Smoke-test for refGene refGene_url = 'http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/refGene.txt.gz' - refGene_url = 'http://kt.era.ee/distribute/pyintervaltree/refGene.txt.gz' refGene = GenomeIntervalTree.from_table(url=refGene_url, mode='tx', parser=UCSCTable.REF_GENE) assert len(refGene) == 52289 # NB: Some time ago it was 50919, hence it seems the table data changes on UCSC and eventually the mirror and UCSC won't be the same.
removed other broken urls from genome test
diff --git a/src/Graviton/RestBundle/Routing/Loader/BasicLoader.php b/src/Graviton/RestBundle/Routing/Loader/BasicLoader.php index <HASH>..<HASH> 100644 --- a/src/Graviton/RestBundle/Routing/Loader/BasicLoader.php +++ b/src/Graviton/RestBundle/Routing/Loader/BasicLoader.php @@ -5,7 +5,7 @@ namespace Graviton\RestBundle\Routing\Loader; -use Symfony\Component\Config\Loader\Loader; +use Graviton\CoreBundle\Routing\RouteLoaderAbstract; use Symfony\Component\Routing\RouteCollection; /** @@ -15,7 +15,7 @@ use Symfony\Component\Routing\RouteCollection; * @license https://opensource.org/licenses/MIT MIT License * @link http://swisscom.ch */ -class BasicLoader extends Loader +class BasicLoader extends RouteLoaderAbstract { /** * @var boolean @@ -68,6 +68,16 @@ class BasicLoader extends Loader } /** + * returns the name of the resource to load + * + * @return string resource name + */ + public function getResourceName() + { + return 'rest'; + } + + /** * load routes for a single service * * @param string $service service name
change our loader to our new abstract
diff --git a/framework/db/QueryInterface.php b/framework/db/QueryInterface.php index <HASH>..<HASH> 100644 --- a/framework/db/QueryInterface.php +++ b/framework/db/QueryInterface.php @@ -100,7 +100,7 @@ interface QueryInterface * The method will *not* do any quoting or escaping. * * - **or**: similar to the `and` operator except that the operands are concatenated using `OR`. For example, - * `['or', ['type' => [7, 8, 9]], ['id' => [1, 2, 3]]` will generate `(type IN (7, 8, 9) OR (id IN (1, 2, 3)))`. + * `['or', ['type' => [7, 8, 9]], ['id' => [1, 2, 3]]]` will generate `(type IN (7, 8, 9) OR (id IN (1, 2, 3)))`. * * - **not**: this will take only one operand and build the negation of it by prefixing the query string with `NOT`. * For example `['not', ['attribute' => null]]` will result in the condition `NOT (attribute IS NULL)`.
Update QueryInterface.php Missing closing bracket in OR condition example
diff --git a/lib/api/manipulation.js b/lib/api/manipulation.js index <HASH>..<HASH> 100644 --- a/lib/api/manipulation.js +++ b/lib/api/manipulation.js @@ -15,21 +15,9 @@ var removeChild = function(parent, elem) { parsing strings if necessary */ var makeCheerioArray = function(elems) { - var dom = [], - len = elems.length, - elem; - - for (var i = 0; i < len; i++) { - elem = elems[i]; - // If a cheerio object - if (elem.cheerio) { - dom = dom.concat(elem.toArray()); - } else { - dom = dom.concat($.parse.eval(elem)); - } - } - - return dom; + return _.reduce(elems, function(dom, elem) { + return dom.concat(elem.cheerio ? elem.toArray() : $.parse.eval(elem)); + }, []); }; var append = exports.append = function() {
manipulation: refactor `makeCheerioArray`
diff --git a/ores/__init__.py b/ores/__init__.py index <HASH>..<HASH> 100644 --- a/ores/__init__.py +++ b/ores/__init__.py @@ -1 +1 @@ -__version__ = "0.7.1" +__version__ = "0.7.2" diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def requirements(fname): setup( name="ores", - version="0.7.1", # Update in ores/__init__.py too. + version="0.7.2", # Update in ores/__init__.py too. author="Aaron Halfaker", author_email="ahalfaker@wikimedia.org", description=("A webserver for hosting scorer models."),
Increments version to <I>
diff --git a/src/views/rrd/_search.php b/src/views/rrd/_search.php index <HASH>..<HASH> 100644 --- a/src/views/rrd/_search.php +++ b/src/views/rrd/_search.php @@ -39,3 +39,13 @@ use yii\helpers\Html; <div class="col-md-2"> <?= $search->field('shift') ?> </div> + +<?php +$widgetId = $search->getDivId(); + +$this->registerJs(<<<JS + $('#form-$widgetId').on('change', 'input[type="radio"]', function (event) { + $(this).submit(); + }); +JS +);
RRD view - autosubmit on radio filters change
diff --git a/src/Illuminate/Hashing/BcryptHasher.php b/src/Illuminate/Hashing/BcryptHasher.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Hashing/BcryptHasher.php +++ b/src/Illuminate/Hashing/BcryptHasher.php @@ -63,7 +63,7 @@ class BcryptHasher implements HasherContract public function needsRehash($hashedValue, array $options = []) { return password_needs_rehash($hashedValue, PASSWORD_BCRYPT, [ - 'cost' => isset($options['rounds']) ? $options['rounds'] : $this->rounds + 'cost' => isset($options['rounds']) ? $options['rounds'] : $this->rounds, ]); }
Apply fixes from StyleCI (#<I>)
diff --git a/test/lib/rubycritic/generators/console_report_test.rb b/test/lib/rubycritic/generators/console_report_test.rb index <HASH>..<HASH> 100644 --- a/test/lib/rubycritic/generators/console_report_test.rb +++ b/test/lib/rubycritic/generators/console_report_test.rb @@ -28,15 +28,15 @@ describe RubyCritic::Generator::ConsoleReport do assert output_contains?('Rating', @mock_analysed_module.rating) end - it "includes the module's rating in the report" do + it "includes the module's churn metric in the report" do assert output_contains?('Churn', @mock_analysed_module.churn) end - it "includes the module's rating in the report" do + it "includes the module's complexity in the report" do assert output_contains?('Complexity', @mock_analysed_module.complexity) end - it "includes the module's rating in the report" do + it "includes the module's duplication metric in the report" do assert output_contains?('Duplication', @mock_analysed_module.duplication) end
Spec: Fix copy-pasted titles of "it" cases
diff --git a/lib/MountFs.js b/lib/MountFs.js index <HASH>..<HASH> 100644 --- a/lib/MountFs.js +++ b/lib/MountFs.js @@ -52,7 +52,7 @@ var MountFs = module.exports = function MountFs(options) { } var args = [].slice.call(arguments); args[0] = path; - if (/Sync$/.test(fsMethodName)) { + if (/(Sync|Stream)$/.test(fsMethodName)) { try { return mountedFs[fsMethodName].apply(this, args); } catch (err) {
handle createReadStream et.al. like Sync methods ie methods not taking a callback. fixes unexpected-fs, express, send, express-jsxtransform
diff --git a/packages/ember-metal/lib/computed.js b/packages/ember-metal/lib/computed.js index <HASH>..<HASH> 100644 --- a/packages/ember-metal/lib/computed.js +++ b/packages/ember-metal/lib/computed.js @@ -359,6 +359,39 @@ ComputedPropertyPrototype.get = function(obj, keyName) { Generally speaking if you intend for your computed property to be set your backing function should accept either two or three arguments. + ```javascript + var Person = Ember.Object.extend({ + // these will be supplied by `create` + firstName: null, + lastName: null, + + fullName: function(key, value, oldValue) { + // getter + if (arguments.length === 1) { + var firstName = this.get('firstName'); + var lastName = this.get('lastName'); + + return firstName + ' ' + lastName; + + // setter + } else { + var name = value.split(' '); + + this.set('firstName', name[0]); + this.set('lastName', name[1]); + + return value; + } + }.property('firstName', 'lastName') + }); + + var person = Person.create(); + + person.set('fullName', 'Peter Wagenet'); + person.get('firstName'); // 'Peter' + person.get('lastName'); // 'Wagenet' + ``` + @method set @param {String} keyName The key being accessed. @param {Object} newValue The new value being assigned.
[DOC] add example to computed properties set in API
diff --git a/src/main/java/org/craftercms/engine/util/spring/cors/SiteAwareCorsConfigurationSource.java b/src/main/java/org/craftercms/engine/util/spring/cors/SiteAwareCorsConfigurationSource.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/craftercms/engine/util/spring/cors/SiteAwareCorsConfigurationSource.java +++ b/src/main/java/org/craftercms/engine/util/spring/cors/SiteAwareCorsConfigurationSource.java @@ -22,9 +22,10 @@ import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfigurationSource; import javax.servlet.http.HttpServletRequest; +import java.util.Arrays; import java.util.List; -import static java.util.Arrays.asList; +import static java.util.stream.Collectors.toList; /** * Implementation of {@link CorsConfigurationSource} that uses the current site configuration @@ -89,7 +90,7 @@ public class SiteAwareCorsConfigurationSource implements CorsConfigurationSource } protected List<String> getValues(HierarchicalConfiguration<?> config, String key, String defaultValue) { - return asList(config.getString(key, defaultValue).split(",")); + return Arrays.stream(config.getString(key, defaultValue).split(",")).map(String::trim).collect(toList()); } }
Fix issue with empty spaces in CORS config
diff --git a/Generator/Plugin.php b/Generator/Plugin.php index <HASH>..<HASH> 100644 --- a/Generator/Plugin.php +++ b/Generator/Plugin.php @@ -142,6 +142,20 @@ class Plugin extends PHPClassFileWithInjection { 'parent_plugin_id' => [ 'label' => 'Parent class plugin ID', 'description' => "Use another plugin's class as the parent class for this plugin.", + 'validation' => function($property_name, $property_info, $component_data) { + if (!empty($component_data['parent_plugin_id'])) { + // TODO: go via the environment for testing! + try { + $plugin_definition = \Drupal::service('plugin.manager.' . $component_data['plugin_type'])->getDefinition($component_data['parent_plugin_id']); + } + catch (\Drupal\Component\Plugin\Exception\PluginNotFoundException $plugin_exception) { + return ["There is no plugin '@plugin-id' of type '@plugin-type'.", [ + '@plugin-id' => $component_data['parent_plugin_id'], + '@plugin-type' => $component_data['plugin_type'] + ]]; + } + } + }, ], 'replace_parent_plugin' => [ 'label' => 'Replace parent plugin',
Added validation of annotation plugin generator's parent plugin ID property.
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -250,8 +250,14 @@ module ActionDispatch if controller.is_a? Regexp hash[:controller] = controller else - check_controller! controller - hash[:controller] = controller.to_s if controller + if controller + hash[:controller] = check_controller!(controller).to_s + else + unless segment_keys.include?(:controller) + message = "Missing :controller key on routes definition, please check your routes." + raise ArgumentError, message + end + end end if action.is_a? Regexp @@ -292,13 +298,7 @@ module ActionDispatch end def check_controller!(controller) - unless controller || segment_keys.include?(:controller) - message = "Missing :controller key on routes definition, please check your routes." - raise ArgumentError, message - end - - return unless controller - return if controller =~ /\A[a-z_0-9][a-z_0-9\/]*\z/ + return controller if controller =~ /\A[a-z_0-9][a-z_0-9\/]*\z/ if controller =~ %r{\A/} message = "controller name should not start with a slash"
only do one nil check against the controller
diff --git a/spyderlib/widgets/calltip.py b/spyderlib/widgets/calltip.py index <HASH>..<HASH> 100644 --- a/spyderlib/widgets/calltip.py +++ b/spyderlib/widgets/calltip.py @@ -273,7 +273,7 @@ class CallTipWidget(QLabel): """ Hides the tooltip after some time has passed (assuming the cursor is not over the tooltip). """ - if (not self._hide_timer.isActive() and + if (self.hide_timer_on and not self._hide_timer.isActive() and # If Enter events always came after Leave events, we wouldn't need # this check. But on Mac OS, it sometimes happens the other way # around when the tooltip is created.
Calltip: Don't hide it if the cursor leaves the tooltip and there's no timer
diff --git a/devices.js b/devices.js index <HASH>..<HASH> 100755 --- a/devices.js +++ b/devices.js @@ -13405,6 +13405,18 @@ const devices = [ { fingerprint: [ {type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [ + {ID: 1, profileID: 260, deviceID: 258, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096], outputClusters: [6, 25]}, + {ID: 3, profileID: 49152, deviceID: 258, inputClusters: [65360, 65361], outputClusters: [65360, 65361]}, + ]}, + ], + model: '33943', + vendor: 'AwoX', + description: 'LED RGB & brightness', + extend: preset.light_onoff_brightness_colortemp_color(), + }, + { + fingerprint: [ + {type: 'Router', manufacturerName: 'AwoX', modelID: 'TLSR82xx', endpoints: [ {ID: 1, profileID: 260, deviceID: 269, inputClusters: [0, 3, 4, 5, 6, 8, 768, 4096, 64599], outputClusters: [6]}, {ID: 3, profileID: 4751, deviceID: 269, inputClusters: [65360, 65361], outputClusters: [65360, 65361]}, ]},
Adding awox <I> (#<I>) * Added support for AwoX <I> * Removed unsupported feature * Added fingerprint * Added space after ',' * Removed trailing spaces. * Updating fingerprint * Update devices.js * Review fixes
diff --git a/lib/nerve/reporter/zookeeper.rb b/lib/nerve/reporter/zookeeper.rb index <HASH>..<HASH> 100644 --- a/lib/nerve/reporter/zookeeper.rb +++ b/lib/nerve/reporter/zookeeper.rb @@ -70,7 +70,7 @@ class Nerve::Reporter end def ping? - return @zk.ping? + return @zk.connected? && @zk.exists?(@full_key || '/') end private diff --git a/lib/nerve/service_watcher.rb b/lib/nerve/service_watcher.rb index <HASH>..<HASH> 100644 --- a/lib/nerve/service_watcher.rb +++ b/lib/nerve/service_watcher.rb @@ -87,7 +87,11 @@ module Nerve end def check_and_report - @reporter.ping? + if !@reporter.ping? + # If the reporter can't ping, then we do not know the status + # and must force a new report. + @was_up = nil + end # what is the status of the service? is_up = check?
Fix bug in session disconnects with pooling If we get a session disconnect we need to ensure that nerve recreates the ephemeral nodes when it reconnects.
diff --git a/cmd/geth/main.go b/cmd/geth/main.go index <HASH>..<HASH> 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -48,9 +48,9 @@ import ( const ( ClientIdentifier = "Geth" - Version = "1.2.0-dev" + Version = "1.3.0-dev" VersionMajor = 1 - VersionMinor = 2 + VersionMinor = 3 VersionPatch = 0 )
cmd/geth: dev version number
diff --git a/geoplot/geoplot.py b/geoplot/geoplot.py index <HASH>..<HASH> 100644 --- a/geoplot/geoplot.py +++ b/geoplot/geoplot.py @@ -1317,14 +1317,14 @@ def kdeplot( if self.projection: sns.kdeplot( - pd.Series([p.x for p in self.df.geometry]), - pd.Series([p.y for p in self.df.geometry]), + x=pd.Series([p.x for p in self.df.geometry]), + y=pd.Series([p.y for p in self.df.geometry]), transform=ccrs.PlateCarree(), ax=ax, cmap=self.cmap, **self.kwargs ) else: sns.kdeplot( - pd.Series([p.x for p in self.df.geometry]), - pd.Series([p.y for p in self.df.geometry]), + x=pd.Series([p.x for p in self.df.geometry]), + y=pd.Series([p.y for p in self.df.geometry]), ax=ax, cmap=self.cmap, **self.kwargs ) return ax
Set explicit x/y params in KDEPlot (#<I>)
diff --git a/server/sonar-server/src/test/java/org/sonar/server/tester/ServerTester.java b/server/sonar-server/src/test/java/org/sonar/server/tester/ServerTester.java index <HASH>..<HASH> 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/tester/ServerTester.java +++ b/server/sonar-server/src/test/java/org/sonar/server/tester/ServerTester.java @@ -98,16 +98,6 @@ public class ServerTester extends ExternalResource { Properties properties = new Properties(); properties.putAll(initialProps); - try { - searchServer.start(); - System.out.println("searchServer = " + searchServer.isReady()); - while (!searchServer.isReady()) { - Thread.sleep(100); - } - } catch (Exception e) { - e.printStackTrace(); - } - properties.setProperty(IndexProperties.CLUSTER_NAME, clusterName); properties.setProperty(IndexProperties.NODE_PORT, clusterPort.toString()); properties.setProperty(MonitoredProcess.NAME_PROPERTY, "ES"); @@ -121,6 +111,7 @@ public class ServerTester extends ExternalResource { } } + searchServer.start(); platform.init(properties); platform.addComponents(components); platform.doStart();
No need to wait for ES in non-blocking mode (start returns when node is started)
diff --git a/src/kit/app/SchemaDrivenCommandManager.js b/src/kit/app/SchemaDrivenCommandManager.js index <HASH>..<HASH> 100644 --- a/src/kit/app/SchemaDrivenCommandManager.js +++ b/src/kit/app/SchemaDrivenCommandManager.js @@ -65,7 +65,6 @@ export default class SchemaDrivenCommandManager extends CommandManager { // to a non existing node // If really needed we should document why, and in which case. if (!node) { - // FIXME: explain when this happens.' throw new Error('FIXME: explain when this happens') } @@ -99,10 +98,12 @@ export default class SchemaDrivenCommandManager extends CommandManager { } function _getNodeProp (node, path) { - let propName = last(path) - let prop = node.getSchema().getProperty(propName) - if (!prop) console.error('Could not find property for path', path, node) - return prop + if (path.length === 2) { + let propName = last(path) + let prop = node.getSchema().getProperty(propName) + if (!prop) console.error('Could not find property for path', path, node) + return prop + } } function _disabled (commands) {
Let SchemaDrivenCommandManager treat NodeSelections correctly.
diff --git a/sos/report/plugins/networking.py b/sos/report/plugins/networking.py index <HASH>..<HASH> 100644 --- a/sos/report/plugins/networking.py +++ b/sos/report/plugins/networking.py @@ -156,7 +156,8 @@ class Networking(Plugin): "ethtool --phy-statistics " + eth, "ethtool --show-priv-flags " + eth, "ethtool --show-eee " + eth, - "tc -s filter show dev " + eth + "tc -s filter show dev " + eth, + "tc -s filter show dev " + eth + " ingress", ], tags=eth) # skip EEPROM collection by default, as it might hang or
[networking] collect also tc filter show ingress Both "tc -s filter show dev %eth [|ingress]" commands required as they provide different output. Resolves: #<I>
diff --git a/lib/ansible/vault.rb b/lib/ansible/vault.rb index <HASH>..<HASH> 100644 --- a/lib/ansible/vault.rb +++ b/lib/ansible/vault.rb @@ -10,5 +10,9 @@ module Ansible @path = path @password = password end + + def inspect + %Q{#<Ansible::Vault:#{"0x00%x" % (object_id << 1)} @path="#{@path}", @password="#{@password[0,4]}...">} + end end end diff --git a/spec/ansible/vault_spec.rb b/spec/ansible/vault_spec.rb index <HASH>..<HASH> 100644 --- a/spec/ansible/vault_spec.rb +++ b/spec/ansible/vault_spec.rb @@ -13,5 +13,15 @@ module Ansible end end + describe '#inspect' do + let(:vault) { + Vault.new(path: fixture_path('blank.yml'), password: 'this-is-the-password') + } + + it 'must include only the first 4 characters of the password followed by elipses' do + expect(vault.inspect).to_not include 'this-is-the-password' + expect(vault.inspect).to include 'this...' + end + end end end
Ensure we're not leaking passwords to error logs and the like
diff --git a/RTEditor/src/main/java/com/onegravity/rteditor/fonts/AssetIndex.java b/RTEditor/src/main/java/com/onegravity/rteditor/fonts/AssetIndex.java index <HASH>..<HASH> 100644 --- a/RTEditor/src/main/java/com/onegravity/rteditor/fonts/AssetIndex.java +++ b/RTEditor/src/main/java/com/onegravity/rteditor/fonts/AssetIndex.java @@ -49,7 +49,7 @@ abstract class AssetIndex { mAssetIndex.add(line); } } catch (final IOException e) { - Log.e(AssetIndex.class.getSimpleName(), e.getMessage(), e); + Log.w(AssetIndex.class.getSimpleName(), "The assets.index file could not be read. If you want to use your own fonts, please copy the fonts to the assets folder and the build code to generate the assets.index file into your build.gradle (for more details consult the readme, chapter fonts)", e); } finally { IOUtils.closeQuietly(in); IOUtils.closeQuietly(reader);
more meaningful log output message if the assets.index file is missing
diff --git a/spec/wings/active_fedora_converter_spec.rb b/spec/wings/active_fedora_converter_spec.rb index <HASH>..<HASH> 100644 --- a/spec/wings/active_fedora_converter_spec.rb +++ b/spec/wings/active_fedora_converter_spec.rb @@ -21,6 +21,22 @@ RSpec.describe Wings::ActiveFedoraConverter, :clean_repo do expect(converter.convert).to eq work end + context 'fedora objState' do + let(:resource) { build(:hyrax_work) } + + it 'is active by default' do + expect(converter.convert) + .to have_attributes state: Hyrax::ResourceStatus::ACTIVE + end + + it 'converts non-active states' do + resource.state = Hyrax::ResourceStatus::INACTIVE + + expect(converter.convert) + .to have_attributes state: Hyrax::ResourceStatus::INACTIVE + end + end + context 'when given a valkyrie native model' do let(:resource) { klass.new }
[wings] Test state conversion with ActiveFedoraConverter
diff --git a/genericm2m/models.py b/genericm2m/models.py index <HASH>..<HASH> 100644 --- a/genericm2m/models.py +++ b/genericm2m/models.py @@ -127,12 +127,12 @@ class RelatedObjectsDescriptor(object): uses_gfk = self.is_gfk(rel_field) class RelatedManager(superclass): - def get_query_set(self): + def get_queryset(self): if uses_gfk: qs = GFKOptimizedQuerySet(self.model, gfk_field=rel_field) return qs.filter(**(core_filters)) else: - return superclass.get_query_set(self).filter(**(core_filters)) + return superclass.get_queryset(self).filter(**(core_filters)) def add(self, *objs): for obj in objs: @@ -183,7 +183,7 @@ class RelatedObjectsDescriptor(object): ) def symmetrical(self): - return superclass.get_query_set(self).filter( + return superclass.get_queryset(self).filter( Q(**rel_obj.get_query_from(instance)) | Q(**rel_obj.get_query_to(instance)) ).distinct()
Rename to `get_queryset` > RemovedInDjango<I>Warning: `BaseManager.get_query_set` is deprecated, use `get_queryset` instead. and > RemovedInDjango<I>Warning: `RelatedManager.get_query_set` method should be renamed `get_queryset`.
diff --git a/config/routes.rb b/config/routes.rb index <HASH>..<HASH> 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -435,7 +435,7 @@ Src::Application.routes.draw do end end - resources :system_groups do + resources :system_groups, :except => [:new, :edit] do member do post :lock post :unlock
system group - Adds support for locking and unlocking a system group in the CLI
diff --git a/pyemma/coordinates/data/util/traj_info_backends.py b/pyemma/coordinates/data/util/traj_info_backends.py index <HASH>..<HASH> 100644 --- a/pyemma/coordinates/data/util/traj_info_backends.py +++ b/pyemma/coordinates/data/util/traj_info_backends.py @@ -206,7 +206,7 @@ class SqliteDB(AbstractDB): with self._database as c: c.execute(*statement) except sqlite3.IntegrityError as ie: - logger.exception("insert failed: %s " % ie) + logger.debug("insert failed: %s ", ie, exc_info=True) return self._update_time_stamp(hash_value=traj_info.hash_value)
[trajinfo] turned a verbose exception into debug.
diff --git a/ctypeslib/codegen/clangparser.py b/ctypeslib/codegen/clangparser.py index <HASH>..<HASH> 100644 --- a/ctypeslib/codegen/clangparser.py +++ b/ctypeslib/codegen/clangparser.py @@ -177,8 +177,9 @@ class Clang_Parser(object): if name in self.all: log.debug('register: %s already existed: %s', name, obj.name) # code.interact(local=locals()) - raise DuplicateDefinitionException( - 'register: %s already existed: %s' % (name, obj.name)) + #raise DuplicateDefinitionException( + # 'register: %s already existed: %s' % (name, obj.name)) + return self.all[name] log.debug('register: %s ', name) self.all[name] = obj return obj
On duplicate definition, return definition instead of raising exception
diff --git a/spec/travis/github/services/fetch_config_spec.rb b/spec/travis/github/services/fetch_config_spec.rb index <HASH>..<HASH> 100644 --- a/spec/travis/github/services/fetch_config_spec.rb +++ b/spec/travis/github/services/fetch_config_spec.rb @@ -38,7 +38,7 @@ describe Travis::Github::Services::FetchConfig do end it "returns { '.result' => 'parse_error' } if the .travis.yml is invalid" do - GH.stubs(:[]).returns("\tfoo: Foo") + GH.stubs(:[]).returns({ "content" => ["\tfoo: Foo"].pack("m") }) result['.result'].should == 'parse_error' end
fetch_config: Fix parse_error spec The error raised wasn't a parse error, so the spec wasn't testing what it was claiming to test.
diff --git a/src/util.js b/src/util.js index <HASH>..<HASH> 100644 --- a/src/util.js +++ b/src/util.js @@ -135,8 +135,11 @@ exports = module.exports = { }; function addModuleProperty(module, symbol, modulePath, opt_obj) { + var val = null; Object.defineProperty(opt_obj || module.exports, symbol, { - get : function() { return module.require(modulePath); }}); + get : function() { return val = val || module.require(modulePath); }, + set : function(v) { val = v; } + }); } addModuleProperty(module, 'config_parser', './config_parser');
Fix broken tests due to lazy requiring change.
diff --git a/sos/report/plugins/sapnw.py b/sos/report/plugins/sapnw.py index <HASH>..<HASH> 100644 --- a/sos/report/plugins/sapnw.py +++ b/sos/report/plugins/sapnw.py @@ -129,6 +129,12 @@ class sapnw(Plugin, RedHatPlugin): self.collect_list_dbs() # run sapconf in check mode - self.add_cmd_output("sapconf -n", suggest_filename="sapconf_checkmode") + # + # since the command creates a limits.d file on its own, + # we must predicate it by presence of the file + if os.path.exists('/etc/security/limits.d/99-sap-limits.conf') \ + or self.get_option('allow_system_changes'): + self.add_cmd_output("sapconf -n", + suggest_filename="sapconf_checkmode") # vim: et ts=4 sw=4
[sapnw] call sapconf only when a limits.d file exists sapconf command creates /etc/security/limits.d/<I>-sap-limits.conf on its own when missing, so calling the command must be gated by a predicate testing the file presence. Resolves: #<I>
diff --git a/src/main/java/org/opensky/libadsb/msgs/SurfaceOperationalStatusV1Msg.java b/src/main/java/org/opensky/libadsb/msgs/SurfaceOperationalStatusV1Msg.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/opensky/libadsb/msgs/SurfaceOperationalStatusV1Msg.java +++ b/src/main/java/org/opensky/libadsb/msgs/SurfaceOperationalStatusV1Msg.java @@ -183,8 +183,8 @@ public class SurfaceOperationalStatusV1Msg extends ExtendedSquitter implements S } /** - * FIXME check compatibility when decoding V2 - * @return the airplane's length in meters; -1 for unkown + * According to DO-260B Table 2-74. Compatible with ADS-B version 1 and 2 + * @return the airplane's length in meters; -1 for unknown */ public int getAirplaneLength() { switch (airplane_len_width) { @@ -217,7 +217,7 @@ public class SurfaceOperationalStatusV1Msg extends ExtendedSquitter implements S } /** - * FIXME check compatibility when decoding V2 + * According to DO-260B Table 2-74. Compatible with ADS-B version 1 and 2. * @return the airplane's width in meters */ public double getAirplaneWidth() {
Checked airplane width/length fields compatibility
diff --git a/modules/jooby-hibernate/src/main/java/io/jooby/hibernate/SessionRequest.java b/modules/jooby-hibernate/src/main/java/io/jooby/hibernate/SessionRequest.java index <HASH>..<HASH> 100644 --- a/modules/jooby-hibernate/src/main/java/io/jooby/hibernate/SessionRequest.java +++ b/modules/jooby-hibernate/src/main/java/io/jooby/hibernate/SessionRequest.java @@ -94,7 +94,7 @@ public class SessionRequest implements Route.Decorator { } finally { Session session = ManagedSessionContext.unbind(sessionFactory); if (session != null) { - sessionFactory.close(); + session.close(); } } };
[hibernate]: EntityManagerFactory is closed fix #<I>
diff --git a/src/search/FindInFiles.js b/src/search/FindInFiles.js index <HASH>..<HASH> 100644 --- a/src/search/FindInFiles.js +++ b/src/search/FindInFiles.js @@ -773,6 +773,18 @@ define(function (require, exports, module) { _resolve(err ? null : contents); }); } + /* TODO: FileSystem Figure out why this code is significantly slower + DocumentManager.getDocumentForPath(file.fullPath) + .done(function (doc) { + _addSearchMatches(file.fullPath, doc.getText(), currentQueryExpr); + result.resolve(); + }) + .fail(function (error) { + // Always resolve. If there is an error, this file + // is skipped and we move on to the next file. + result.resolve(); + }); + */ } return result.promise(); })
Use DocumentManager.getDocumentForPath() for find in files. Commented out for now since it is 3x slower.
diff --git a/views/widget/header-logo.blade.php b/views/widget/header-logo.blade.php index <HASH>..<HASH> 100644 --- a/views/widget/header-logo.blade.php +++ b/views/widget/header-logo.blade.php @@ -1,11 +1,12 @@ @extends('widget.header-widget') @section('widget') + <style scoped> + .c-header__logo.t-municipio a img, + .c-header__logo.t-municipio a svg { + width: {{ $maxWidth }}px; + } + </style> <div class="c-header__logo {{$themeClass}}" data-tooltip="{{ $language['logoLabel'] }}"> - <style scoped><!-- Logotype settings --> - a { - max-width: {{ $maxWidth }}px; - } - </style> <a href="{{$home}}" title="{{ $language['logoLabel'] }}"> {!! $logotype !!} </a>
Fixes rendering issue with logotype width settings
diff --git a/TheCannon/apogee.py b/TheCannon/apogee.py index <HASH>..<HASH> 100644 --- a/TheCannon/apogee.py +++ b/TheCannon/apogee.py @@ -32,7 +32,7 @@ class ApogeeDataset(Dataset): self.ranges = [[371,3192], [3697,5997], [6461,8255]] def _get_pixmask(self, fluxes, flux_errs): - """ Return a mask array of bad pixels + """ Return a mask array of bad pixels for one object's spectrum Bad pixels are defined as follows: fluxes or errors are not finite, or reported errors are negative, or the standard deviation of the fluxes @@ -52,7 +52,7 @@ class ApogeeDataset(Dataset): mask: ndarray, dtype=bool array giving bad pixels as True values """ - bad_flux = (~np.isfinite(fluxes)) | (np.std(fluxes, axis=0) == 0) + bad_flux = (~np.isfinite(fluxes)) | (fluxes == 0) bad_err = (~np.isfinite(flux_errs)) | (flux_errs <= 0) bad_pix = bad_err | bad_flux
get_pixmask is only for one object
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -282,3 +282,28 @@ function syncNetwork (a, b, cb) { }) }) } + +test('channel membership', function (t) { + var cabal = Cabal(ram) + + cabal.ready(function () { + cabal.getLocalKey((err, lkey) => { + cabal.memberships.getMemberships(lkey, (err, channels) => { + t.same(channels.length, 0, "haven't joined any channels yet") + cabal.publish({ + type: 'channel/join', + content: { + channel: 'new-channel' + } + }, function published () { + cabal.getLocalKey((err, lkey) => { + cabal.memberships.getMemberships(lkey, (err, channels) => { + t.same(channels.length, 1, "we've joined 'new-channel'") + t.same(channels[0], "new-channel", "we've joined 'new-channel'") + }) + }) + }) + }) + }) + }) +})
wip: add test for simple membership
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb index <HASH>..<HASH> 100644 --- a/actionpack/test/controller/resources_test.rb +++ b/actionpack/test/controller/resources_test.rb @@ -532,7 +532,7 @@ class ResourcesTest < ActionController::TestCase routes.each do |route| routes.each do |r| next if route === r # skip the comparison instance - assert distinct_routes?(route, r), "Duplicate Route: #{route}" + assert_not_equal route.conditions, r.conditions end end end @@ -1351,8 +1351,4 @@ class ResourcesTest < ActionController::TestCase assert_recognizes(expected_options, path) end end - - def distinct_routes? (r1, r2) - assert_not_equal r1.conditions, r2.conditions - end end
Pull up a method we only use once.
diff --git a/lib/views/consult-edit-view.js b/lib/views/consult-edit-view.js index <HASH>..<HASH> 100755 --- a/lib/views/consult-edit-view.js +++ b/lib/views/consult-edit-view.js @@ -192,7 +192,9 @@ this.getModelSvc(idValue) .then(function success(jsonModel) { view.opts.isReadyModelData = true; - view.model.set(jsonModel); + view.model.set(jsonModel,{silent:true}); + //manually trigger the change event in the case of empty object returned. + view.model.trigger('change',view.model); //view.model.savePrevious(); }).then(null, function error(errorResponse) { ErrorHelper.manageResponseErrors(errorResponse, {
issue #<I> manual change event consult edit view
diff --git a/code/libraries/koowa/libraries/model/behavior/paginatable.php b/code/libraries/koowa/libraries/model/behavior/paginatable.php index <HASH>..<HASH> 100644 --- a/code/libraries/koowa/libraries/model/behavior/paginatable.php +++ b/code/libraries/koowa/libraries/model/behavior/paginatable.php @@ -65,14 +65,19 @@ class KModelBehaviorPaginatable extends KModelBehaviorAbstract $offset = $state->offset; $total = $this->count(); - // Recalculate the offset if it is higher than the total or set to the middle of a page. if ($offset !== 0 && $total !== 0) { - if (($offset >= $total) || ($offset % $limit !== 0)) - { + // Recalculate the offset if it is set to the middle of a page. + if ($offset % $limit !== 0) { + $offset -= ($offset % $limit); + } + + // Recalculate the offset if it is higher than the total + if ($offset >= $total) { $offset = floor(($total - 1) / $limit) * $limit; - $state->offset = $offset; } + + $state->offset = $offset; } $context->query->limit($limit, $offset);
re #<I>: Recalculate the offset if it's set to the middle of a page.
diff --git a/src/Collections/RouteCollection.php b/src/Collections/RouteCollection.php index <HASH>..<HASH> 100644 --- a/src/Collections/RouteCollection.php +++ b/src/Collections/RouteCollection.php @@ -50,7 +50,7 @@ class RouteCollection extends RouteProperties $options = []; } - $child = new self($options); + $child = $this->createRouteCollection($options); $child->setParent($this); $this->children[] = $child; @@ -150,7 +150,7 @@ class RouteCollection extends RouteProperties */ public function action($method, $path, $action, array $options = []) { - $route = new Route($this, $method, $path, $action, $options); + $route = $this->createRoute($method, $path, $action, $options); $this->routes[] = $route; return $route; @@ -378,4 +378,25 @@ class RouteCollection extends RouteProperties return $out; } + + /** + * @param $method + * @param $path + * @param $action + * @param $options + * @return Route + */ + protected function createRoute($method, $path, $action, $options) + { + return new Route($this, $method, $path, $action, $options); + } + + /** + * @param $options + * @return $this + */ + protected function createRouteCollection($options) + { + return new static($options); + } }
Make it possible to extend the RouteCollection.php
diff --git a/rapidoid-u/src/main/java/org/rapidoid/util/U.java b/rapidoid-u/src/main/java/org/rapidoid/util/U.java index <HASH>..<HASH> 100644 --- a/rapidoid-u/src/main/java/org/rapidoid/util/U.java +++ b/rapidoid-u/src/main/java/org/rapidoid/util/U.java @@ -819,6 +819,37 @@ public class U { }); } + public static <K1, K2, V> Map<K1, Map<K2, V>> mapOfMaps() { + return autoExpandingMap(new Mapper<K1, Map<K2, V>>() { + + @Override + public Map<K2, V> map(K1 src) throws Exception { + return synchronizedMap(); + } + + }); + } + + public static <K, V> Map<K, List<V>> mapOfLists() { + return autoExpandingMap(new Mapper<K, List<V>>() { + + @Override + public List<V> map(K src) throws Exception { + return Collections.synchronizedList(U.<V> list()); + } + + }); + } + + public static <K, V> Map<K, Set<V>> mapOfSets() { + return autoExpandingMap(new Mapper<K, Set<V>>() { + + @Override + public Set<V> map(K src) throws Exception { + return Collections.synchronizedSet(U.<V> set()); + } + + }); } }
Added more auto-expanding map factory utils.
diff --git a/release.js b/release.js index <HASH>..<HASH> 100644 --- a/release.js +++ b/release.js @@ -19,11 +19,19 @@ exports.register = function(commander){ return function (path) { if(safePathReg.test(path)){ var file = fis.file.wrap(path); + var exclude = fis.config.get('project.watch.exclude'); if (type == 'add' || type == 'change') { if (!opt.srcCache[file.subpath]) { var file = fis.file(path); - if (file.release) - opt.srcCache[file.subpath] = file; + if (file.release) { + if (exclude) { + if (!fis.util.filter(path, exclude)) { + opt.srcCache[file.subpath] = file; + } + } else { + opt.srcCache[file.subpath] = file; + } + } } } else if (type == 'unlink') { if (opt.srcCache[file.subpath]) {
bugfix fex-team/fis#<I>
diff --git a/cache.go b/cache.go index <HASH>..<HASH> 100644 --- a/cache.go +++ b/cache.go @@ -876,12 +876,11 @@ func (c *cache) Save(w io.Writer) (err error) { } }() c.RLock() - items := c.items - for _, v := range items { + defer c.RUnlock() + for _, v := range c.items { gob.Register(v.Object) } - c.RUnlock() - err = enc.Encode(&items) + err = enc.Encode(&c.items) return }
Revert <I>bff for now
diff --git a/comments-bundle/contao/models/CommentsModel.php b/comments-bundle/contao/models/CommentsModel.php index <HASH>..<HASH> 100644 --- a/comments-bundle/contao/models/CommentsModel.php +++ b/comments-bundle/contao/models/CommentsModel.php @@ -20,7 +20,7 @@ namespace Contao; /** * Reads and writes comments * - * @package Comments + * @package Models * @author Leo Feyer <https://github.com/leofeyer> * @copyright Leo Feyer 2011-2012 */ diff --git a/comments-bundle/contao/models/CommentsNotifyModel.php b/comments-bundle/contao/models/CommentsNotifyModel.php index <HASH>..<HASH> 100644 --- a/comments-bundle/contao/models/CommentsNotifyModel.php +++ b/comments-bundle/contao/models/CommentsNotifyModel.php @@ -20,7 +20,7 @@ namespace Contao; /** * Reads and writes comments subscriptions * - * @package Comments + * @package Models * @author Leo Feyer <https://github.com/leofeyer> * @copyright Leo Feyer 2011-2012 */
[Comments] Corrected the phpDoc package of the comments models
diff --git a/raven/base.py b/raven/base.py index <HASH>..<HASH> 100644 --- a/raven/base.py +++ b/raven/base.py @@ -287,8 +287,13 @@ class Client(object): if not data.get('level'): data['level'] = kwargs.get('level') or logging.ERROR - data['modules'] = get_versions(self.include_paths) - data['server_name'] = self.name + + if not data.get('server_name'): + data['server_name'] = self.name + + if not data.get('modules'): + data['modules'] = get_versions(self.include_paths) + data['tags'] = tags data.setdefault('extra', {}) data.setdefault('level', logging.ERROR)
Client can now take explicit server_name and modules
diff --git a/ui/js/controllers/logviewer.js b/ui/js/controllers/logviewer.js index <HASH>..<HASH> 100644 --- a/ui/js/controllers/logviewer.js +++ b/ui/js/controllers/logviewer.js @@ -160,7 +160,7 @@ logViewer.controller('LogviewerCtrl', [ var revision = $scope.artifact.header.revision.substr(0,12); $scope.logRevisionFilterUrl = $scope.urlBasePath - + "index.html#/jobs?repo=" + + "#/jobs?repo=" + $scope.repoName + "&revision=" + revision; // Store the artifact epoch date string in a real date object for use
Bug <I> - Treeherder log view's link to pushlog is broken
diff --git a/lib/bullet/detector/n_plus_one_query.rb b/lib/bullet/detector/n_plus_one_query.rb index <HASH>..<HASH> 100644 --- a/lib/bullet/detector/n_plus_one_query.rb +++ b/lib/bullet/detector/n_plus_one_query.rb @@ -10,6 +10,7 @@ module Bullet # if it is, keeps this unpreload associations and caller. def call_association(object, associations) return unless Bullet.start? + return unless Bullet.n_plus_one_query_enable? return unless object.primary_key_value return if inversed_objects.include?(object.bullet_key, associations) add_call_object_associations(object, associations)
Fix NPlusOneQuery call even if disabled
diff --git a/src/main/java/org/jmxtrans/embedded/spring/EmbeddedJmxTransFactory.java b/src/main/java/org/jmxtrans/embedded/spring/EmbeddedJmxTransFactory.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jmxtrans/embedded/spring/EmbeddedJmxTransFactory.java +++ b/src/main/java/org/jmxtrans/embedded/spring/EmbeddedJmxTransFactory.java @@ -107,7 +107,7 @@ public class EmbeddedJmxTransFactory implements FactoryBean<EmbeddedJmxTrans>, D } embeddedJmxTrans = newJmxTrans; logger.info("Created EmbeddedJmxTrans with configuration {})", configurationUrls); - // embeddedJmxTrans.start(); + embeddedJmxTrans.start(); } return embeddedJmxTrans; } @@ -143,9 +143,9 @@ public class EmbeddedJmxTransFactory implements FactoryBean<EmbeddedJmxTrans>, D @Override public void destroy() throws Exception { logger.info("EmbeddedJmxFactory.destroy"); - // if (embeddedJmxTrans != null) { - // embeddedJmxTrans.stop(); - //} + if (embeddedJmxTrans != null) { + embeddedJmxTrans.stop(); + } } public void setIgnoreConfigurationNotFound(boolean ignoreConfigurationNotFound) {
Keep lifecycle in BeanFactory
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/site/selfHostingRules.js b/bundles/org.eclipse.orion.client.ui/web/plugins/site/selfHostingRules.js index <HASH>..<HASH> 100644 --- a/bundles/org.eclipse.orion.client.ui/web/plugins/site/selfHostingRules.js +++ b/bundles/org.eclipse.orion.client.ui/web/plugins/site/selfHostingRules.js @@ -1,3 +1,4 @@ + /******************************************************************************* * @license * Copyright (c) 2013 IBM Corporation and others. @@ -46,7 +47,8 @@ define([], function() { { type: API, source: "/logout", targetPattern: "${0}logout" }, { type: API, source: "/task", targetPattern: "${0}task" }, { type: API, source: "/cfapi", targetPattern: "${0}cfapi" }, - { type: API, source: "/docker", targetPattern: "${0}docker" } + { type: API, source: "/docker", targetPattern: "${0}docker" }, + { type: API, source: "/metrics", targetPattern: "${0}metrics" }, ]; return {
Add /metrics to self hosting config
diff --git a/node_modules_build/kwf-webpack/config/webpack.kwf.config.js b/node_modules_build/kwf-webpack/config/webpack.kwf.config.js index <HASH>..<HASH> 100644 --- a/node_modules_build/kwf-webpack/config/webpack.kwf.config.js +++ b/node_modules_build/kwf-webpack/config/webpack.kwf.config.js @@ -137,7 +137,7 @@ module.exports = { }, resolve: { modules: ["node_modules", "vendor/bower_components"], - descriptionFiles: ['bower.json', 'package.json'], + descriptionFiles: ['package.json', 'bower.json'], mainFields: ['browser', 'module', 'main'], plugins: [new BowerResolvePlugin()], alias: lookupAliasPaths(),
resolve package.json before bower.json on webpack build because mostly npm is used for packages
diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -174,13 +174,13 @@ class Process $this->status = proc_get_status($process); } - $exitCode = proc_close($process); + $exitcode = proc_close($process); if ($this->status['signaled']) { throw new \RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->status['stopsig'])); } - - return $this->exitcode = ($this->status["running"] ? $exitCode : $this->status["exitcode"]); + + return $this->exitcode = $this->status['running'] ? $exitcode : $this->status['exitcode']; } /**
[Process] fixed CS
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -123,7 +123,12 @@ PostHTML.prototype.process = function (tree, options) { // async mode var i = 0 + Api.context = tree + var next = function (result, cb) { + // (re)extend the object + Api.call(result) + // all plugins called if (this.plugins.length <= i) { cb(null, result) @@ -135,11 +140,6 @@ PostHTML.prototype.process = function (tree, options) { return next(res || result, cb) } - // (re)extend the object - if (result.extendApi === undefined) { - Api.call(result) - } - // call next var plugin = this.plugins[i++]
perf(index): set the previous tree as the context value for api
diff --git a/cloudwatchmon/cli/put_instance_stats.py b/cloudwatchmon/cli/put_instance_stats.py index <HASH>..<HASH> 100755 --- a/cloudwatchmon/cli/put_instance_stats.py +++ b/cloudwatchmon/cli/put_instance_stats.py @@ -365,7 +365,7 @@ def add_loadavg_metrics(args, metrics): def get_disk_info(paths): df_out = [s.split() for s in - os.popen('/bin/df -k -l -P ' + + os.popen('/bin/df -k -P ' + ' '.join(paths)).read().splitlines()] disks = [] for line in df_out[1:]:
Removed unnecessary df -l switch - closes #<I>
diff --git a/dial_sync.go b/dial_sync.go index <HASH>..<HASH> 100644 --- a/dial_sync.go +++ b/dial_sync.go @@ -97,13 +97,14 @@ func (ds *DialSync) getActiveDial(p peer.ID) (*activeDial, error) { reqch: make(chan DialRequest), ds: ds, } - ds.dials[p] = actd err := ds.dialWorker(adctx, p, actd.reqch) if err != nil { cancel() return nil, err } + + ds.dials[p] = actd } // increase ref count before dropping dialsLk
don't store the active dial if it errors while starting the worker
diff --git a/amibaker/provisioner.py b/amibaker/provisioner.py index <HASH>..<HASH> 100644 --- a/amibaker/provisioner.py +++ b/amibaker/provisioner.py @@ -49,7 +49,7 @@ class Provisioner: self.__run(script) def __run(self, script): - run(script) + run(script, warn_only=True) def __copy(self, copy): for f in copy:
Script runs won't fail on non-zero exit codes
diff --git a/lib/renderer/init.js b/lib/renderer/init.js index <HASH>..<HASH> 100644 --- a/lib/renderer/init.js +++ b/lib/renderer/init.js @@ -84,7 +84,7 @@ if (location.protocol === 'chrome-devtools:') { } } -if (nodeIntegration === 'true' || nodeIntegration === 'all' || nodeIntegration === 'except-iframe' || nodeIntegration === 'manual-enable-iframe') { +if (nodeIntegration === 'true') { // Export node bindings to global. global.require = require; global.module = module;
Only check for nodeIntegration being true
diff --git a/usb1.py b/usb1.py index <HASH>..<HASH> 100644 --- a/usb1.py +++ b/usb1.py @@ -1205,9 +1205,15 @@ class LibUSBContext(object): instances. """ device_p_p = libusb1.libusb_device_p_p() + libusb_device_p = libusb1.libusb_device_p device_list_len = libusb1.libusb_get_device_list(self.__context_p, byref(device_p_p)) - result = [USBDevice(self, x) for x in device_p_p[:device_list_len]] + # Instanciate our own libusb_device_p object so we can free + # libusb-provided device list. Is this a bug in ctypes that it doesn't + # copy pointer value (=pointed memory address) ? At least, it's not so + # convenient and forces using such weird code. + result = [USBDevice(self, libusb_device_p(x.contents)) + for x in device_p_p[:device_list_len]] libusb1.libusb_free_device_list(device_p_p, 0) return result
Copy libusb-provided pointers. Otherwise, they might change between the time libusb_free_device_list is called and pointer is used again (ex: opening device).
diff --git a/lib/githubstats.rb b/lib/githubstats.rb index <HASH>..<HASH> 100644 --- a/lib/githubstats.rb +++ b/lib/githubstats.rb @@ -2,7 +2,7 @@ require 'json' require 'nokogiri' -require 'net/http' +require 'httparty' require 'date' require 'basiccache' @@ -142,7 +142,7 @@ module GithubStats def download(to_date = nil) url = to_date ? @url + "?to=#{to_date.strftime('%Y-%m-%d')}" : @url - res = Net::HTTP.get_response(url, '/') + res = HTTParty.get(url) code = res.code raise("Failed loading data from GitHub: #{url} #{code}") if code != 200 html = Nokogiri::HTML(res.body)
Switched library The other one was having TCP socket issues with HTTPS, so I'm hoping this lib has built-in SSL support. If not I'll just try another one.
diff --git a/app/models/spree/adyen/presenters/communication.rb b/app/models/spree/adyen/presenters/communication.rb index <HASH>..<HASH> 100644 --- a/app/models/spree/adyen/presenters/communication.rb +++ b/app/models/spree/adyen/presenters/communication.rb @@ -1,5 +1,3 @@ -require_relative "./communications" - module Spree module Adyen module Presenters @@ -7,9 +5,9 @@ module Spree # source. class Communication < SimpleDelegator PRESENTERS = [ - Communications::AdyenNotification, - Communications::HppSource, - Communications::LogEntry + ::Spree::Adyen::Presenters::Communications::AdyenNotification, + ::Spree::Adyen::Presenters::Communications::HppSource, + ::Spree::Adyen::Presenters::Communications::LogEntry ].freeze def self.from_source source
Fix issue with autoloading commmunications This was breaking on changes in developement. Fully qualifying the names fixes it.
diff --git a/guava-tests/test/com/google/common/hash/HashingTest.java b/guava-tests/test/com/google/common/hash/HashingTest.java index <HASH>..<HASH> 100644 --- a/guava-tests/test/com/google/common/hash/HashingTest.java +++ b/guava-tests/test/com/google/common/hash/HashingTest.java @@ -441,7 +441,7 @@ public class HashingTest extends TestCase { public void testNullPointers() { NullPointerTester tester = new NullPointerTester() - .setDefault(HashCode.class, HashCode.fromInt(0)); + .setDefault(HashCode.class, HashCode.fromLong(0)); tester.testAllPublicStaticMethods(Hashing.class); }
Shuffling from internal-only changes. ------------- Created by MOE: <URL>
diff --git a/lib/Http1Driver.php b/lib/Http1Driver.php index <HASH>..<HASH> 100644 --- a/lib/Http1Driver.php +++ b/lib/Http1Driver.php @@ -342,6 +342,7 @@ class Http1Driver implements HttpDriver { // Handle HTTP/2 upgrade request. if ($protocol === "1.1" && isset($headers["upgrade"][0], $headers["http2-settings"][0], $headers["connection"][0]) + && !$this->client->isEncrypted() && $this->options->isHttp2Enabled() && false !== stripos($headers["connection"][0], "upgrade") && strtolower($headers["upgrade"][0]) === "h2c" @@ -651,9 +652,15 @@ class Http1Driver implements HttpDriver { } public function pendingRequestCount(): int { - return $this->http2 - ? $this->http2->pendingRequestCount() - : ($this->bodyEmitter !== null ? 1 : 0); + if ($this->bodyEmitter) { + return 1; + } + + if ($this->http2) { + return $this->http2->pendingRequestCount(); + } + + return 0; } /**
Fix pending request count for upgraded connections Also check that a client is not encrypted for upgrade connections.
diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Database/Eloquent/Model.php +++ b/src/Illuminate/Database/Eloquent/Model.php @@ -798,7 +798,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab // If the type value is null it is probably safe to assume we're eager loading // the relationship. When that is the case we will pass in a dummy query as // there are multiple types in the morph and we can't use single queries. - if (is_null($class = $this->$type)) { + if (empty($class = $this->$type)) { return new MorphTo( $this->newQuery(), $this, $id, null, $type, $name );
Fix Issue #<I> (#<I>)
diff --git a/src/Caouecs/Sirtrevorjs/Converter/SocialConverter.php b/src/Caouecs/Sirtrevorjs/Converter/SocialConverter.php index <HASH>..<HASH> 100644 --- a/src/Caouecs/Sirtrevorjs/Converter/SocialConverter.php +++ b/src/Caouecs/Sirtrevorjs/Converter/SocialConverter.php @@ -38,6 +38,7 @@ class SocialConverter extends BaseConverter implements ConverterInterface .'d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.' .'facebook.net/en_GB/all.js#xfbml=1";fjs.parentNode.insertBefore(js, fjs);}(document,' .'\'script\',\'facebook-jssdk\'));</script>', + 'tweet' => '<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>', ], 'amp' => [ 'tweet' => '<script async custom-element="amp-twitter" src="https://cdn.ampproject.org/v0/'
fix: tweet - html - include js
diff --git a/src/Contracts/Connections/ProviderInterface.php b/src/Contracts/Connections/ProviderInterface.php index <HASH>..<HASH> 100644 --- a/src/Contracts/Connections/ProviderInterface.php +++ b/src/Contracts/Connections/ProviderInterface.php @@ -93,6 +93,8 @@ interface ProviderInterface /** * Returns the root DSE entry on the currently connected server. * + * @deprecated since v6.0.9 + * * @return \Adldap\Models\Entry|bool */ public function getRootDse();
Depreciate getRootDse method in provider interface
diff --git a/clients/customer_report.py b/clients/customer_report.py index <HASH>..<HASH> 100644 --- a/clients/customer_report.py +++ b/clients/customer_report.py @@ -8,7 +8,7 @@ def main(): c.connect("tcp://127.0.0.1:4242") results = c.batch_work_request('view_customer', {}) - pprint.pprint(results) + pprint.pprint(list(results)) def test(): ''' customer_report test '''
fix customer report client Former-commit-id: <I>dc4ad<I>ae<I>ad<I>ccfcd9e
diff --git a/assets/relations/relations.js b/assets/relations/relations.js index <HASH>..<HASH> 100644 --- a/assets/relations/relations.js +++ b/assets/relations/relations.js @@ -59,7 +59,8 @@ container = _settings.modalId + ' .modal-body', options = { 'push': false, - 'replace': false + 'replace': false, + 'scrollTo': false }, target, title, relation, url; if (clicked.is('a')) {
fix scrolling to top after saving relation
diff --git a/code/Control/UserDefinedFormController.php b/code/Control/UserDefinedFormController.php index <HASH>..<HASH> 100644 --- a/code/Control/UserDefinedFormController.php +++ b/code/Control/UserDefinedFormController.php @@ -104,12 +104,12 @@ class UserDefinedFormController extends PageController * where the form should be rendered into. If it does not exist * then default back to $Form. * - * @return array + * @return array|Object */ public function index(HTTPRequest $request = null) { if ($this->config()->disable_form_content_interpolation) { - return []; + return $this; } if ($this->Content && $form = $this->Form()) { $hasLocation = stristr($this->Content, '$UserDefinedForm');
Fix(UserDefinedFormController) change return type of index() when not using shortcode
diff --git a/mktmain/client_cli.py b/mktmain/client_cli.py index <HASH>..<HASH> 100644 --- a/mktmain/client_cli.py +++ b/mktmain/client_cli.py @@ -1302,8 +1302,8 @@ def parse_script_file(filename): def verify_key(creator, key): - keyAddr = pybitcointools.pubtoaddr(pybitcointools.privtopub(key)) - if keyAddr != creator['address']: + key_addr = pybitcointools.pubtoaddr(pybitcointools.privtopub(key)) + if key_addr != creator['address']: print "Participant signing key mismatch." print "The key loaded does not match the key the participant was " \ "created with." @@ -1374,8 +1374,11 @@ def local_main(config): script = config.get("ScriptFile", []) if script: + echo = config["Echo"] cmdlines = parse_script_file(script) for cmdline in cmdlines: + if echo: + print cmdline if controller.onecmd(cmdline): return
enable echo cmd line option to echo script commands.
diff --git a/angr/analyses/cfg_arch_options.py b/angr/analyses/cfg_arch_options.py index <HASH>..<HASH> 100644 --- a/angr/analyses/cfg_arch_options.py +++ b/angr/analyses/cfg_arch_options.py @@ -43,7 +43,7 @@ class CFGArchOptions(object): for k, (_, value) in self.OPTIONS[self.arch.name].iteritems(): self._options[k] = value - for k, v in options: + for k, v in options.iteritems(): self.__setattr__(k, v) def __getattr__(self, option_name):
CFGArchOptions: missing "iteritems".
diff --git a/tests/test_regex.py b/tests/test_regex.py index <HASH>..<HASH> 100644 --- a/tests/test_regex.py +++ b/tests/test_regex.py @@ -136,6 +136,12 @@ def test_incompatible_uris(): assert not err.failed() assert not any(err.compat_summary.values()) + err = _do_test_raw(""" + var foo = { data: "LOL NOT THE CASE" }; + """, versions=fx6) + assert not err.failed() + assert not any(err.compat_summary.values()) + def test_chrome_usage(): err = _do_test_raw("""var foo = require("bar");""") diff --git a/validator/testcases/regex.py b/validator/testcases/regex.py index <HASH>..<HASH> 100644 --- a/validator/testcases/regex.py +++ b/validator/testcases/regex.py @@ -207,7 +207,7 @@ def run_regex_tests(document, err, filename, context=None, is_js=False): if is_js: # javascript/data: URI usage in the address bar _compat_test( - re.compile(r"\b(javascript|data):"), + re.compile(r"['\"](javascript|data):"), "javascript:/data: URIs may be incompatible with Firefox " "6.", ("Loading 'javascript:' and 'data:' URIs through the "
Bug <I>: Only flag data:/javascript: URLs in strings to reduce noise. Would that they could disappear entirely.
diff --git a/activejob/test/support/integration/adapters/sidekiq.rb b/activejob/test/support/integration/adapters/sidekiq.rb index <HASH>..<HASH> 100644 --- a/activejob/test/support/integration/adapters/sidekiq.rb +++ b/activejob/test/support/integration/adapters/sidekiq.rb @@ -53,11 +53,20 @@ module SidekiqJobsManager require "sidekiq/cli" require "sidekiq/launcher" - config = Sidekiq - config[:queues] = ["integration_tests"] - config[:environment] = "test" - config[:concurrency] = 1 - config[:timeout] = 1 + if Sidekiq.respond_to?(:[]=) + config = Sidekiq + config[:queues] = ["integration_tests"] + config[:environment] = "test" + config[:concurrency] = 1 + config[:timeout] = 1 + else + config = { + queues: ["integration_tests"], + environment: "test", + concurrency: 1, + timeout: 1 + } + end sidekiq = Sidekiq::Launcher.new(config) Sidekiq.average_scheduled_poll_interval = 0.5 Sidekiq.options[:poll_interval_average] = 1
Work around Sidekiq <I> and <I> API difference
diff --git a/pkg/policy/rule.go b/pkg/policy/rule.go index <HASH>..<HASH> 100644 --- a/pkg/policy/rule.go +++ b/pkg/policy/rule.go @@ -94,8 +94,10 @@ func (policy *L4Filter) addFromEndpoints(fromEndpoints []api.EndpointSelector) b } if len(policy.FromEndpoints) > 0 && len(fromEndpoints) == 0 { - // new policy is more permissive than the existing policy - // use a more permissive one + log.WithFields(logrus.Fields{ + logfields.EndpointSelector: fromEndpoints, + "policy": policy, + }).Debug("new L4 filter applies to all endpoints, making the policy more permissive.") policy.FromEndpoints = nil }
policy: Convert comment to debug message This comment could be just as well served as a debug message, which would allow devs to notice this occurring at runtime. Switch it over.
diff --git a/internal/handles.go b/internal/handles.go index <HASH>..<HASH> 100644 --- a/internal/handles.go +++ b/internal/handles.go @@ -695,7 +695,9 @@ func (fh *FileHandle) readAhead(fs *Goofys, offset uint64, needAtLeast int) (err func (fh *FileHandle) ReadFile(fs *Goofys, offset int64, buf []byte) (bytesRead int, err error) { fh.inode.logFuse("ReadFile", offset, len(buf)) - defer fh.inode.logFuse("< ReadFile", bytesRead, err) + defer func() { + fh.inode.logFuse("< ReadFile", bytesRead, err) + }() fh.mu.Lock() defer fh.mu.Unlock()
late bind bytesRead and err and they are correctly logged
diff --git a/src/ORM/Query.php b/src/ORM/Query.php index <HASH>..<HASH> 100644 --- a/src/ORM/Query.php +++ b/src/ORM/Query.php @@ -737,7 +737,6 @@ class Query extends DatabaseQuery implements JsonSerializable, QueryInterface if (!$complex && $this->_valueBinder !== null) { $order = $this->clause('order'); $complex = $order === null ? false : $order->hasNestedExpression(); - var_dump($order); } $count = ['count' => $query->func()->count('*')]; diff --git a/tests/TestCase/Controller/Component/PaginatorComponentTest.php b/tests/TestCase/Controller/Component/PaginatorComponentTest.php index <HASH>..<HASH> 100644 --- a/tests/TestCase/Controller/Component/PaginatorComponentTest.php +++ b/tests/TestCase/Controller/Component/PaginatorComponentTest.php @@ -964,6 +964,8 @@ class PaginatorComponentTest extends TestCase */ public function testPaginateQueryWithBindValue() { + $config = ConnectionManager::config('test'); + $this->skipIf(strpos($config['driver'], 'Sqlserver') !== false, 'Test temporarily broken in SQLServer'); $this->loadFixtures('Posts'); $table = TableRegistry::get('PaginatorPosts'); $query = $table->find()
Skipping test in SQLServer while we find an appropriate fix This test is at least an obscure feature of the ORM, and fixing it properly requires a fair bit of changes. Skipping for now
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index <HASH>..<HASH> 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -218,4 +218,5 @@ def get_engines_stats(): def initialize_engines(engine_list): for engine_data in engine_list: engine = load_engine(engine_data) - engines[engine.name] = engine + if engine is not None: + engines[engine.name] = engine
[mod] searx doesn't crash at startup when an engine can't be loaded (see #<I>)
diff --git a/app.py b/app.py index <HASH>..<HASH> 100644 --- a/app.py +++ b/app.py @@ -33,13 +33,13 @@ def bind_sensor(sensors, index): if gpio_loaded: - GPIO.Setmode(GPIO.BOARD) - GPIO.Setup(11, GPIO.OUTPUT) + GPIO.setmode(GPIO.BOARD) + GPIO.setup(11, GPIO.OUTPUT) def led_control(value=None): - GPIO.Output(11, value) - return GPIO.Input(11) + GPIO.output(11, value) + return GPIO.input(11) # Put required variable declaration here
GPIO method calls to lower case
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -116,8 +116,6 @@ module ActionController class Metal < AbstractController::Base abstract! - attr_internal_writer :env - def env @_request.env end
the request object manages `env` remove the setter. The request object manages the env hash, so any mutations need to go through it
diff --git a/src/App/App.php b/src/App/App.php index <HASH>..<HASH> 100644 --- a/src/App/App.php +++ b/src/App/App.php @@ -65,7 +65,21 @@ class App */ public function httpResponse($code = '200') { - // Nothing to do + $jaxon = jaxon(); + // Only if the response is not yet sent + if(!$jaxon->getOption('core.response.send')) + { + // Set the HTTP response code + http_response_code(intval($code)); + + // Send the response + $jaxon->di()->getResponseManager()->sendOutput(); + + if(($jaxon->getOption('core.process.exit'))) + { + exit(); + } + } } /** diff --git a/src/Request/Handler.php b/src/Request/Handler.php index <HASH>..<HASH> 100644 --- a/src/Request/Handler.php +++ b/src/Request/Handler.php @@ -317,11 +317,11 @@ class Handler if(($this->getOption('core.response.send'))) { $this->xResponseManager->sendOutput(); - } - if(($this->getOption('core.process.exit'))) - { - exit(); + if(($this->getOption('core.process.exit'))) + { + exit(); + } } } }
Implemented the httpResponse() method in class App.
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -30,11 +30,13 @@ Dir[root.join('shared/*.rb').to_s].each do |f| require f end -DB_URI = if defined? JRUBY_VERSION - 'jdbc:postgresql://localhost/rom_factory' - else - 'postgres://localhost/rom_factory' - end +DB_URI = ENV.fetch('DATABASE_URL') do + if defined? JRUBY_VERSION + 'jdbc:postgresql://localhost/rom_factory' + else + 'postgres://localhost/rom_factory' + end +end warning_api_available = RUBY_VERSION >= '2.4.0'
Allow DATABASE_URL from env
diff --git a/pymatgen/io/vasp/inputs.py b/pymatgen/io/vasp/inputs.py index <HASH>..<HASH> 100644 --- a/pymatgen/io/vasp/inputs.py +++ b/pymatgen/io/vasp/inputs.py @@ -1183,7 +1183,13 @@ class Kpoints(MSONable): gap_distance (float): auto-detection threshold for non-periodicity (in slabs, nanowires, etc.) remove_symmetry (string): optional flag to control - symmetry options. + symmetry options, can be none, structural, + time_reversal, or all + include_gamma (string or bool): whether to include + gamma point + header (string): "verbose" or "simple", denotes + the verbosity of the header + incar (Incar): incar object to upload """ config = locals() config.pop("structure", "incar")
more docs for JHU kpoint server
diff --git a/test/specs/route.js b/test/specs/route.js index <HASH>..<HASH> 100644 --- a/test/specs/route.js +++ b/test/specs/route.js @@ -43,7 +43,8 @@ describe("Routing", function () { expect(Route.options).toEqual({ trigger: true, history: false, - shim: false + shim: false, + replace: false }); }); @@ -174,6 +175,7 @@ describe("Routing", function () { trigger: true, history: false, shim: true, + replace: false, match: ["/users/1/2", "1", "2"], id: "1", id2: "2" }])); }); @@ -188,6 +190,7 @@ describe("Routing", function () { trigger: true, history: false, shim: true, + replace: false, match: ["/page/gah", "gah"], stuff: "gah" }])); });
fixing tests expect statements that broke with new replace option for history
diff --git a/Query/Builder.php b/Query/Builder.php index <HASH>..<HASH> 100755 --- a/Query/Builder.php +++ b/Query/Builder.php @@ -2310,7 +2310,13 @@ class Builder */ protected function stripTableForPluck($column) { - return is_null($column) ? $column : last(preg_split('~\.| ~', $column)); + if (is_null($column)) { + return $column; + } + + $seperator = strpos(strtolower($column), ' as ') !== false ? ' as ' : '\.'; + + return last(preg_split('~'.$seperator.'~i', $column)); } /**
[6.x] Fix plucking column name containing a space (#<I>) * [6.x] Fix plucking column name containing a space * [6.x] Make the splitting on the "as" keyword case insensitive
diff --git a/util/db/repository_legacy.go b/util/db/repository_legacy.go index <HASH>..<HASH> 100644 --- a/util/db/repository_legacy.go +++ b/util/db/repository_legacy.go @@ -332,8 +332,7 @@ func (l *legacyRepositoryBackend) upsertSecret(name string, data map[string][]by } } if len(secret.Data) == 0 { - isManagedByArgo := (secret.Annotations != nil && secret.Annotations[common.AnnotationKeyManagedBy] == common.AnnotationValueManagedByArgoCD) || - (secret.Labels != nil && secret.Labels[common.LabelKeySecretType] == "repository") + isManagedByArgo := secret.Annotations != nil && secret.Annotations[common.AnnotationKeyManagedBy] == common.AnnotationValueManagedByArgoCD if isManagedByArgo { return l.db.kubeclientset.CoreV1().Secrets(l.db.ns).Delete(context.Background(), name, metav1.DeleteOptions{}) }
chore: Remove unneeded secret type check (#<I>)
diff --git a/config/bootstrap.php b/config/bootstrap.php index <HASH>..<HASH> 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -15,7 +15,10 @@ use Cake\Routing\Router; -define('TIME_START', microtime(true)); +/** + * @var float + */ +define('TIME_START', (float)microtime(true)); require CAKE . 'basics.php';
Added float type annotation to TIME_START define
diff --git a/lib/synapse.rb b/lib/synapse.rb index <HASH>..<HASH> 100644 --- a/lib/synapse.rb +++ b/lib/synapse.rb @@ -68,10 +68,16 @@ module Synapse if @config_updated @config_updated = false - statsd_increment('synapse.config.update') @config_generators.each do |config_generator| log.info "synapse: configuring #{config_generator.name}" - config_generator.update_config(@service_watchers) + begin + config_generator.update_config(@service_watchers) + rescue StandardError => e + statsd_increment("synapse.config.update", ['result:fail', "config_name:#{config_generator.name}"]) + log.error "synapse: update config failed for config #{config_generator.name} with exception #{e}" + raise e + end + statsd_increment("synapse.config.update", ['result:success', "config_name:#{config_generator.name}"]) end end
Add success & failure counters for updating config
diff --git a/astroid/__pkginfo__.py b/astroid/__pkginfo__.py index <HASH>..<HASH> 100644 --- a/astroid/__pkginfo__.py +++ b/astroid/__pkginfo__.py @@ -20,7 +20,7 @@ distname = 'astroid' modname = 'astroid' -numversion = (1, 2, 1) +numversion = (1, 3, 0) version = '.'.join([str(num) for num in numversion]) install_requires = ['logilab-common >= 0.60.0', 'six'] @@ -28,11 +28,11 @@ install_requires = ['logilab-common >= 0.60.0', 'six'] license = 'LGPL' author = 'Logilab' -author_email = 'python-projects@lists.logilab.org' +author_email = 'pylint-dev@lists.logilab.org' mailinglist = "mailto://%s" % author_email web = 'http://bitbucket.org/logilab/astroid' -description = "rebuild a new abstract syntax tree from Python's ast" +description = "A abstract syntax tree for Python with inference support." classifiers = ["Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Quality Assurance",
Update information in pkginfo, including the version information.
diff --git a/ipyrad/assemble/rawedit.py b/ipyrad/assemble/rawedit.py index <HASH>..<HASH> 100644 --- a/ipyrad/assemble/rawedit.py +++ b/ipyrad/assemble/rawedit.py @@ -197,6 +197,8 @@ def cutadaptit_single(data, sample): fullcomp(data.paramsdict["restriction_overhang"][1])[::-1] \ + data._hackersonly["p3_adapter"]) else: + LOGGER.warning("No barcode information present, and is therefore not "+\ + "being used for adapter trimming of SE gbs data.") ## else no search for barcodes on 3' adapter = \ fullcomp(data.paramsdict["restriction_overhang"][1])[::-1] \
bugfix; error was raised in no barcodes during step2 filtering for gbs data. Now just a warning is printed
diff --git a/src/java/voldemort/store/socket/clientrequest/ClientRequestExecutorFactory.java b/src/java/voldemort/store/socket/clientrequest/ClientRequestExecutorFactory.java index <HASH>..<HASH> 100644 --- a/src/java/voldemort/store/socket/clientrequest/ClientRequestExecutorFactory.java +++ b/src/java/voldemort/store/socket/clientrequest/ClientRequestExecutorFactory.java @@ -109,8 +109,8 @@ public class ClientRequestExecutorFactory implements // Since we're non-blocking and it takes a non-zero amount of time to // connect, invoke finishConnect and loop. while(!socketChannel.finishConnect()) { - if(logger.isEnabledFor(Level.WARN)) - logger.warn("Still connecting to " + dest); + if(logger.isTraceEnabled()) + logger.trace("Still connecting to " + dest); } int numCreated = created.incrementAndGet();
Reduced verbosity in ClientRequestExecutorFactory
diff --git a/timeago.js b/timeago.js index <HASH>..<HASH> 100644 --- a/timeago.js +++ b/timeago.js @@ -1,7 +1,7 @@ 'use strict' var React = require('react') -Object.assign = require('react/lib/Object.assign') +var assign = require('react/lib/Object.assign') module.exports = React.createClass( { displayName: 'Time-Ago' @@ -83,7 +83,7 @@ module.exports = React.createClass( unit = 'year' } - var props = Object.assign({}, this.props) + var props = assign({}, this.props) delete props.date delete props.formatter
Don't overwrite native Object.assign
diff --git a/molecule/utilities.py b/molecule/utilities.py index <HASH>..<HASH> 100644 --- a/molecule/utilities.py +++ b/molecule/utilities.py @@ -40,7 +40,8 @@ class LogFilter(object): class TrailingNewlineFormatter(logging.Formatter): def format(self, record): - record.msg = record.msg.rstrip() + if record.msg: + record.msg = record.msg.rstrip() return super(TrailingNewlineFormatter, self).format(record)
defend against "AttributeError: NoneType object has no attribute rstrip"
diff --git a/borax/__init__.py b/borax/__init__.py index <HASH>..<HASH> 100644 --- a/borax/__init__.py +++ b/borax/__init__.py @@ -1,4 +1,4 @@ # coding=utf8 -__version__ = '3.3.1' +__version__ = '3.3.2' __author__ = 'kinegratii'
:bookmark: release <I>
diff --git a/lib/prime_number_generator.rb b/lib/prime_number_generator.rb index <HASH>..<HASH> 100644 --- a/lib/prime_number_generator.rb +++ b/lib/prime_number_generator.rb @@ -1,3 +1,5 @@ class PrimeNumberGenerator - + def generate + + end end \ No newline at end of file
added generate method to PrimeNumberGenerator
diff --git a/db/db.go b/db/db.go index <HASH>..<HASH> 100644 --- a/db/db.go +++ b/db/db.go @@ -291,6 +291,8 @@ func (db *DB) Dump(dest string) error { if err != nil { return err } + _ = destFile.Close() + _ = src.Close() tdlog.Noticef("Dump: copied file %s, size is %d", destPath, written) } return nil
Close relative files during db.Dump
diff --git a/actors/lib/instance_setup.rb b/actors/lib/instance_setup.rb index <HASH>..<HASH> 100644 --- a/actors/lib/instance_setup.rb +++ b/actors/lib/instance_setup.rb @@ -119,7 +119,7 @@ class InstanceSetup def configure_repositories(repositories) repositories.each do |repo| begin - klass = constantize(repo.name) + klass = repo.name.to_const unless klass.nil? fz = nil if repo.frozen_date
Fixed a lingering call to the no-longer-present method constantize()
diff --git a/hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java b/hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java index <HASH>..<HASH> 100644 --- a/hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java +++ b/hellocharts-library/src/lecho/lib/hellocharts/model/Axis.java @@ -3,6 +3,7 @@ package lecho.lib.hellocharts.model; import java.util.ArrayList; import java.util.List; +import android.graphics.Color; import android.graphics.Typeface; import lecho.lib.hellocharts.util.Utils; @@ -24,8 +25,8 @@ public class Axis { private String name; private boolean isAutoGenerated = true; private boolean hasLines = false; - private int textColor = Utils.DEFAULT_DARKEN_COLOR; - private int lineColor = Utils.DEFAULT_COLOR; + private int textColor = Color.LTGRAY; + private int lineColor = Utils.DEFAULT_DARKEN_COLOR; private int textSize = DEFAULT_TEXT_SIZE_SP; private int maxLabelChars = DEFAULT_MAX_AXIS_LABEL_CHARS; private Typeface typeface;
Hanged default Axis text color to make it more visible
diff --git a/classes/QueryMonitor.php b/classes/QueryMonitor.php index <HASH>..<HASH> 100644 --- a/classes/QueryMonitor.php +++ b/classes/QueryMonitor.php @@ -26,7 +26,7 @@ class QueryMonitor extends QM_Plugin { parent::__construct( $file ); # Load and register built-in collectors: - foreach ( glob( $this->plugin_path( 'collectors/*.php' ) ) as $file ) { + foreach ( apply_filters( 'qm/built-in-collectors', glob( $this->plugin_path( 'collectors/*.php' ) ) ) as $file ) { include $file; }
Add filter on built-in collectors files before including them