diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/lib/ghtorrent/retriever.rb b/lib/ghtorrent/retriever.rb index <HASH>..<HASH> 100644 --- a/lib/ghtorrent/retriever.rb +++ b/lib/ghtorrent/retriever.rb @@ -203,7 +203,7 @@ module GHTorrent persister.store(:commit_comments, x) end } - persister.find(:commit_comments, {'commit_id' => sha}) #.map{|x| x[ext_uniq] = x['_id']; x} + persister.find(:commit_comments, {'commit_id' => sha}) end # Retrieve a single comment @@ -224,8 +224,8 @@ module GHTorrent r['user'] = user persister.store(:commit_comments, r) info "Retriever: Added commit comment #{r['commit_id']} -> #{r['id']}" - r[ext_uniq] = r['_id'] - r + persister.find(:commit_comments, {'repo' => repo, 'user' => user, + 'id' => id}).first else debug "Retriever: Commit comment #{comment['commit_id']} -> #{comment['id']} exists" comment
Ensure that a commit comment is correctly retrieved
diff --git a/lib/formslib.php b/lib/formslib.php index <HASH>..<HASH> 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -1339,7 +1339,9 @@ function validate_' . $this->_formName . '(frm) { return true; } /** - * This function also removes all previously defined rules. + * Hard freeze all elements in a form except those whose names are in $elementList or hidden elements in a form. + * + * This function also removes all previously defined rules of elements it freezes. * * @param array $elementList array or string of element(s) not to be frozen * @since 1.0
added more phpdoc comments for hardFreezeAllVisibleExcept
diff --git a/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java b/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java index <HASH>..<HASH> 100644 --- a/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java +++ b/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java @@ -525,7 +525,17 @@ public class AsynchronousRequest extends Request { gw2API.getBackStoryQuestionInfo(processIds(ids)).enqueue(callback); } - + /** + * For more info on build API go <a href="https://wiki.guildwars2.com/wiki/API:2/build">here</a><br/> + * Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions + * + * @param callback callback that is going to be used for {@link Call#enqueue(Callback)} + * @throws NullPointerException if given {@link Callback} is empty + * @see GameBuild game build info + */ + public void getCurrentGameBuild(Callback<GameBuild> callback) throws NullPointerException { + gw2API.getCurrentGameBuild().enqueue(callback); + } //Characters /**
done all game build asynchronous api
diff --git a/tests/query/netinfo/test_hostbyaddr.py b/tests/query/netinfo/test_hostbyaddr.py index <HASH>..<HASH> 100644 --- a/tests/query/netinfo/test_hostbyaddr.py +++ b/tests/query/netinfo/test_hostbyaddr.py @@ -26,7 +26,7 @@ Project link: https://github.com/funilrys/PyFunceble Project documentation: - https://pyfunceble.readthedocs.io/en/master/ + https://pyfunceble.readthedocs.io/en/dev/ Project homepage: https://pyfunceble.github.io/
fixup! Introduction of the tests of the hosts by addr query tool.
diff --git a/js/lib/mediawiki.DOMPostProcessor.js b/js/lib/mediawiki.DOMPostProcessor.js index <HASH>..<HASH> 100644 --- a/js/lib/mediawiki.DOMPostProcessor.js +++ b/js/lib/mediawiki.DOMPostProcessor.js @@ -2645,7 +2645,11 @@ function unpackDOMFragments(env, node) { } var dsr = node.data.parsoid.dsr; - // FIXME: Not sure why this would be missing + // There is currently no DSR for DOMFragments nested inside + // transclusion / extension content (extension inside template + // content etc). + // TODO: Make sure that is the only reason for not having a DSR + // here. if (dsr) { var type = firstChild.getAttribute("typeof"); if (/\bmw:(Transclusion|Extension)\b/.test(type)) { @@ -2658,9 +2662,11 @@ function unpackDOMFragments(env, node) { addDeltaToDSR(firstChild, tsrDelta); } } - } else { - console.error( 'ERROR in ' + env.page.name + ': no DOMFragment wrapper dsr on ' + node.outerHTML ); } + //else { + // console.error( 'ERROR in ' + env.page.name + + // ': no DOMFragment wrapper dsr on ' + node.outerHTML ); + //} // Move the old content nodes over from the dummyNode while (firstChild) {
Disable debug print for missing DSR From investigating a few cases from the logs it looks like the main case without a DSR is a DOMFragment inside extension or transclusion content. Document this and disable the debug print, as this case is actually pretty common. Change-Id: Ibf<I>dd<I>e<I>fba8a<I>fa<I>e<I>b8e4d7cae<I>
diff --git a/client-js/SqlpadTauChart.js b/client-js/SqlpadTauChart.js index <HASH>..<HASH> 100644 --- a/client-js/SqlpadTauChart.js +++ b/client-js/SqlpadTauChart.js @@ -212,7 +212,7 @@ var SqlpadTauChart = React.createClass({ var runResultNotification = () => { if (this.props.isRunning) { return ( - <div className='run-result-notification' style={{backgroundColor: 'rgba(250, 250, 250, 0.5)'}}> + <div className='run-result-notification' style={{backgroundColor: 'rgba(255, 255, 255, 0.5)'}}> <SpinKitCube /> </div> )
background while running to white with partial opacity
diff --git a/env/xml-config/src/main/java/org/eobjects/analyzer/job/JaxbJobReader.java b/env/xml-config/src/main/java/org/eobjects/analyzer/job/JaxbJobReader.java index <HASH>..<HASH> 100644 --- a/env/xml-config/src/main/java/org/eobjects/analyzer/job/JaxbJobReader.java +++ b/env/xml-config/src/main/java/org/eobjects/analyzer/job/JaxbJobReader.java @@ -267,9 +267,14 @@ public class JaxbJobReader implements JobReader<InputStream> { if (StringUtils.isNullOrEmpty(typeName)) { types.add(null); } else { - final org.eobjects.metamodel.schema.ColumnType type = org.eobjects.metamodel.schema.ColumnType - .valueOf(typeName); - types.add(type); + try { + final org.eobjects.metamodel.schema.ColumnType type = org.eobjects.metamodel.schema.ColumnType + .valueOf(typeName); + types.add(type); + } catch (IllegalArgumentException e) { + // type literal was not a valid ColumnType + types.add(null); + } } } } else {
Prevented crashing when column type in XML is not found in MetaModel's ColumnType enum
diff --git a/src/Sulu/Bundle/TestBundle/Testing/PhpcrTestCase.php b/src/Sulu/Bundle/TestBundle/Testing/PhpcrTestCase.php index <HASH>..<HASH> 100644 --- a/src/Sulu/Bundle/TestBundle/Testing/PhpcrTestCase.php +++ b/src/Sulu/Bundle/TestBundle/Testing/PhpcrTestCase.php @@ -167,8 +167,8 @@ class PhpcrTestCase extends \PHPUnit_Framework_TestCase $this->contentTypeManager, $this->structureManager, $this->sessionManager, - $this->localizationFinder, $this->eventDispatcher, + $this->localizationFinder, $this->language, $this->defaultTemplate, $this->languageNamespace
changed order in content mapper constructor
diff --git a/src/Contracts/Hydrator/HydratorInterface.php b/src/Contracts/Hydrator/HydratorInterface.php index <HASH>..<HASH> 100644 --- a/src/Contracts/Hydrator/HydratorInterface.php +++ b/src/Contracts/Hydrator/HydratorInterface.php @@ -63,6 +63,15 @@ interface HydratorInterface public function update(ResourceObjectInterface $resource, $record); /** + * Delete a domain record. + * + * @param $record + * @return bool + * whether the record was successfully destroyed. + */ + public function delete($record); + + /** * Update a domain record's relationship with data from the supplied relationship object. * * For a has-one relationship, this changes the relationship to match the supplied relationship diff --git a/tests/Hydrator/TestHydrator.php b/tests/Hydrator/TestHydrator.php index <HASH>..<HASH> 100644 --- a/tests/Hydrator/TestHydrator.php +++ b/tests/Hydrator/TestHydrator.php @@ -45,6 +45,15 @@ class TestHydrator extends AbstractHydrator */ public $dates; + /** + * @inheritDoc + */ + public function delete($record) + { + $record->destroyed = true; + + return true; + } /** * @inheritdoc
[Feature-WIP] Add delete method to the hydrator interface
diff --git a/Block/PageWideContent.php b/Block/PageWideContent.php index <HASH>..<HASH> 100644 --- a/Block/PageWideContent.php +++ b/Block/PageWideContent.php @@ -1,5 +1,8 @@ <?php + +/* Remark : this is now deprecated -> when using the most recent version of theme-frontend-optimus -> you can select a 1 'column wide' option on the Design tab of a cms page that does exactly the same */ + namespace StudioEmma\Optimus\Block; class PageWideContent extends \Magento\Framework\View\Element\Template
MASE2OT-<I> : added comment to old block PageWide about depecrated status
diff --git a/sqlauth/__init__.py b/sqlauth/__init__.py index <HASH>..<HASH> 100644 --- a/sqlauth/__init__.py +++ b/sqlauth/__init__.py @@ -16,4 +16,4 @@ ## ############################################################################### -__version__ = "0.1.146" +__version__ = "0.1.147" diff --git a/sqlauth/scripts/sqlauthrpc.py b/sqlauth/scripts/sqlauthrpc.py index <HASH>..<HASH> 100755 --- a/sqlauth/scripts/sqlauthrpc.py +++ b/sqlauth/scripts/sqlauthrpc.py @@ -220,7 +220,7 @@ class Component(ApplicationSession): select id from login where login = %(login)s ) returning - * + id, login_id, role_id """, """ update @@ -233,7 +233,7 @@ class Component(ApplicationSession): where login = %(login)s returning - * + id, old_login as login, password, salt """ ], qa, options=types.CallOptions(timeout=2000,discloseMe=True))
sync with pypi version: <I>
diff --git a/ospd/vts.py b/ospd/vts.py index <HASH>..<HASH> 100644 --- a/ospd/vts.py +++ b/ospd/vts.py @@ -23,7 +23,7 @@ import multiprocessing import re from copy import deepcopy -from typing import Dict, Any, Tuple, Type +from typing import Dict, Any, Tuple, Type, Iterator from ospd.errors import OspdError @@ -45,6 +45,14 @@ class Vts: def __contains__(self, key: str) -> bool: return key in self._vts + def __iter__(self) -> Iterator[str]: + if hasattr(self.vts, '__iter__'): + return self.vts.__iter__() + + # Use iter because python3.5 has no support for + # iteration over DictProxy. + return iter(self.vts.keys()) + def __init_vts(self): self._vts = self.storage()
Add support for the iterable protocol to Vts class Allow to iterate over a vts instance by implementing the iterable proctocol method (__iter__) which retuns an iterator.
diff --git a/lib/purge.js b/lib/purge.js index <HASH>..<HASH> 100644 --- a/lib/purge.js +++ b/lib/purge.js @@ -132,6 +132,21 @@ function AkamaiPurgeRequestBody(urls, options) { } function AkamaiPurgeResponse(rawBody, callback) { + var body, keys; + + Object.defineProperties(this, { + '_body': { + enumerable: false, + get: function() { return body; }, + set: function(value) { body = value; } + }, + '_keys': { + enumerable: false, + get: function() { return keys; }, + set: function(value) { keys = value; } + } + }); + this.setBody(rawBody).process(callback); }
made purge body and keys properties innumerable
diff --git a/parsl/executors/base.py b/parsl/executors/base.py index <HASH>..<HASH> 100644 --- a/parsl/executors/base.py +++ b/parsl/executors/base.py @@ -44,7 +44,7 @@ class ParslExecutor(metaclass=ABCMeta): pass @abstractmethod - def scale_in(self, count): + def scale_in(self, blocks): """Scale in method. Cause the executor to reduce the number of blocks by count. diff --git a/parsl/executors/swift_t.py b/parsl/executors/swift_t.py index <HASH>..<HASH> 100644 --- a/parsl/executors/swift_t.py +++ b/parsl/executors/swift_t.py @@ -343,7 +343,7 @@ class TurbineExecutor(ParslExecutor): def scaling_enabled(self): return self._scaling_enabled - def scale_out(self, workers=1): + def scale_out(self, blocks=1): """Scales out the number of active workers by 1. This method is not implemented for threads and will raise the error if called. @@ -354,7 +354,7 @@ class TurbineExecutor(ParslExecutor): """ raise NotImplementedError - def scale_in(self, workers): + def scale_in(self, blocks): """Scale in the number of active blocks by specified amount. This method is not implemented for turbine and will raise an error if called.
Make scale_in parameter name consistent in all executor classes (#<I>) This is needed in the now-less-obscure case of calling scale_in with named parameters - the base class previously said that scale_in could be called with (count=1) as a parameter but no subclasses accepted that. The terminology now pretty much is settled as 'blocks', so that is what this PR changes everything to.
diff --git a/locales/ka/validation.php b/locales/ka/validation.php index <HASH>..<HASH> 100644 --- a/locales/ka/validation.php +++ b/locales/ka/validation.php @@ -37,7 +37,7 @@ return [ 'date_format' => ':attribute არ ემთხვევა თარიღის ფორმატს: :format.', 'different' => ':attribute და :other არ უნდა ემთხვეოდეს ერთმანეთს.', 'digits' => ':attribute უნდა შედგებოდეს :digits ციფრისგან.', - 'digits_between' => ':attribute უნდა შედგებოდეს :min-დან :max ციფრამბდე.', + 'digits_between' => ':attribute უნდა შედგებოდეს :min-დან :max ციფრამდე.', 'dimensions' => ':attribute შეიცავს სურათის არასწორ ზომებს.', 'distinct' => ':attribute-ის ველს აქვს დუბლირებული მნიშვნელობა.', 'email' => ':attribute უნდა იყოს სწორი ელ.ფოსტა.',
Incorrect word update Updated incorrect word
diff --git a/lib/librarian/helpers/debug.rb b/lib/librarian/helpers/debug.rb index <HASH>..<HASH> 100644 --- a/lib/librarian/helpers/debug.rb +++ b/lib/librarian/helpers/debug.rb @@ -6,6 +6,8 @@ module Librarian include Support::AbstractMethod + LIBRARIAN_PATH = Pathname.new('../../../../').expand_path(__FILE__) + abstract_method :root_module private @@ -17,6 +19,9 @@ module Librarian def debug if root_module.ui loc = caller.find{|l| !(l =~ /in `debug'$/)} + if loc =~ /^(.+):(\d+):in `(.+)'$/ + loc = "#{Pathname.new($1).relative_path_from(LIBRARIAN_PATH)}:#{$2}:in `#{$3}'" + end root_module.ui.debug { "[Librarian] #{yield} [#{loc}]" } end end
Strip the location where librarian is installed from debugging output.
diff --git a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php index <HASH>..<HASH> 100644 --- a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php +++ b/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php @@ -28,7 +28,7 @@ class LaravelLogViewer } /** - * @return file + * @return string */ public static function getFileName() {
Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on <URL>
diff --git a/mlogmerge.py b/mlogmerge.py index <HASH>..<HASH> 100755 --- a/mlogmerge.py +++ b/mlogmerge.py @@ -1,6 +1,6 @@ #!/usr/bin/python -from util import extractDateTime +from mutil import extractDateTime from datetime import datetime, MINYEAR, MAXYEAR import argparse, re diff --git a/mplotqueries.py b/mplotqueries.py index <HASH>..<HASH> 100755 --- a/mplotqueries.py +++ b/mplotqueries.py @@ -5,7 +5,7 @@ from matplotlib.dates import date2num, DateFormatter import numpy as np import argparse import re -from util import extractDateTime +from mutil import extractDateTime from collections import defaultdict
adapted to new name "mutil.py".
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -222,8 +222,6 @@ Crypt.prototype.maybe_encrypt = function (arg_encrypt, { if (get_key !== undefined) { - get_key_data.unshift(data); - get_key_data.push(function (err, key) { if (err) @@ -263,8 +261,6 @@ Crypt.prototype.maybe_decrypt = function (data, f, get_key) { var get_key_data = Array.prototype.slice.call(arguments, 3); - get_key_data.unshift(data); - get_key_data.push(function (err, key) { if (err)
Pass get_key callback as last argument.
diff --git a/test/99close.js b/test/99close.js index <HASH>..<HASH> 100644 --- a/test/99close.js +++ b/test/99close.js @@ -1,6 +1,7 @@ 'use strict'; -after(function () { +after(function (done) { + done(); setTimeout(function () { process.exit(); }, 500);
Added done call to make travis happy
diff --git a/src/main/java/com/googlecode/mp4parser/boxes/apple/AppleCoverBox.java b/src/main/java/com/googlecode/mp4parser/boxes/apple/AppleCoverBox.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/googlecode/mp4parser/boxes/apple/AppleCoverBox.java +++ b/src/main/java/com/googlecode/mp4parser/boxes/apple/AppleCoverBox.java @@ -32,5 +32,8 @@ public class AppleCoverBox extends AppleDataBox { protected int getDataLength() { return data.length; } + public byte[] getCoverData() { + return data; + } }
add accessor to data as sugested by Alden Torres. Thank you, Alden! git-svn-id: <URL>
diff --git a/packages/ra-core/src/CoreAdminRouter.js b/packages/ra-core/src/CoreAdminRouter.js index <HASH>..<HASH> 100644 --- a/packages/ra-core/src/CoreAdminRouter.js +++ b/packages/ra-core/src/CoreAdminRouter.js @@ -100,7 +100,11 @@ export class CoreAdminRouter extends Component { title, } = this.props; - if (typeof children !== 'function' && !children) { + if ( + process.env.NODE_ENV !== 'production' && + typeof children !== 'function' && + !children + ) { return ( <div style={welcomeStyles}> React-admin is properly configured.<br />
Fix welcome mesage appears in production Closes #<I>
diff --git a/public/js/chrome/save.js b/public/js/chrome/save.js index <HASH>..<HASH> 100644 --- a/public/js/chrome/save.js +++ b/public/js/chrome/save.js @@ -150,7 +150,7 @@ if (!jsbin.saveDisabled) { } }, error: function () { - console && console.log('update error'); + window._console.error({message: 'Warning: Something went wrong while saving. Your most recent work is not saved.'}); } }); } @@ -250,7 +250,7 @@ function saveCode(method, ajax, ajaxCallback) { } }, error: function () { - + window._console.error({message: 'Warning: Something went wrong while saving. Your most recent work is not saved.'}); } }); } else {
Warning in console when save fails, fix #<I>
diff --git a/spec/reek/configuration/excluded_paths_spec.rb b/spec/reek/configuration/excluded_paths_spec.rb index <HASH>..<HASH> 100644 --- a/spec/reek/configuration/excluded_paths_spec.rb +++ b/spec/reek/configuration/excluded_paths_spec.rb @@ -17,7 +17,7 @@ RSpec.describe Reek::Configuration::ExcludedPaths do it 'adds the given paths as Pathname' do exclusions.add(paths) - expect(exclusions).to eq expected_exclude_paths + expect(exclusions).to match_array expected_exclude_paths end end end
Fix for #<I> to support Glob patterns in exclude_paths with match_array for rspec
diff --git a/coinop/bit/multiwallet.py b/coinop/bit/multiwallet.py index <HASH>..<HASH> 100644 --- a/coinop/bit/multiwallet.py +++ b/coinop/bit/multiwallet.py @@ -42,12 +42,11 @@ class MultiWallet(object): if entropy: secrets = {} for name in names: - (secrets[name], tree) = create_node(name) - seeds[name] = tree.wallet_key(as_private=True) + (secrets[name], seeds[name]) = create_node(name) return secrets, cls(private=seeds, network=network) for name in names: - seeds[name] = create_node(name)[1].wallet_key(as_private=True) + seeds[name] = create_node(name)[1] return cls(private=seeds, network=network) @@ -69,8 +68,7 @@ class MultiWallet(object): def treegen(value, entropy=False): if entropy: return bip32.Wallet.from_master_secret( - value, - self.network_code(network)).wallet_key(as_private=True) + value, self.network_code(network)) else: return bip32.Wallet.from_wallet_key(value)
store node objects instead of serialized wallets
diff --git a/src/reducers/form-actions-reducer.js b/src/reducers/form-actions-reducer.js index <HASH>..<HASH> 100644 --- a/src/reducers/form-actions-reducer.js +++ b/src/reducers/form-actions-reducer.js @@ -368,9 +368,11 @@ export function createFormActionsReducer(options) { // If the form is invalid (due to async validity) // but its fields are valid and the value has changed, // the form should be "valid" again. - if ((!parentForm.$form.validity - || !parentForm.$form.validity - || !Object.keys(parentForm.$form.validity).length) + const validityIsBool = typeof parentForm.$form.validity === 'boolean'; + const isInvalid = validityIsBool + ? !parentForm.$form.validity + : !Object.keys(parentForm.$form.validity).length; + if (isInvalid && !parentForm.$form.valid && isValid(parentForm, { async: false })) { return {
Preventing Object.keys from being called on a boolean
diff --git a/code/model/entity/abstract.php b/code/model/entity/abstract.php index <HASH>..<HASH> 100644 --- a/code/model/entity/abstract.php +++ b/code/model/entity/abstract.php @@ -196,7 +196,7 @@ abstract class KModelEntityAbstract extends KObjectArray implements KModelEntity public function getProperty($name) { //Handle computed properties - if(!$this->hasProperty($name) && !empty($name)) + if(!parent::offsetExists($name) && $this->hasProperty($name)) { $getter = 'getProperty'.KStringInflector::camelize($name); $methods = $this->getMethods();
re #<I> - Also check if a computed property exists.
diff --git a/pycbc/inference/sampler_base.py b/pycbc/inference/sampler_base.py index <HASH>..<HASH> 100644 --- a/pycbc/inference/sampler_base.py +++ b/pycbc/inference/sampler_base.py @@ -458,7 +458,7 @@ class BaseMCMCSampler(_BaseSampler): parameters = samples.fieldnames if samples is None: return None - samples = samples.to_array(axis=-1) + samples = samples.to_array(axis=-1).astype(numpy.float64) samples_group = fp.stats_group # write data
Ensure that write float to HDF file for likelihood_stats. (#<I>)
diff --git a/src/in/srain/cube/views/GridViewWithHeaderAndFooter.java b/src/in/srain/cube/views/GridViewWithHeaderAndFooter.java index <HASH>..<HASH> 100644 --- a/src/in/srain/cube/views/GridViewWithHeaderAndFooter.java +++ b/src/in/srain/cube/views/GridViewWithHeaderAndFooter.java @@ -261,7 +261,7 @@ public class GridViewWithHeaderAndFooter extends GridView { return super.getNumColumns(); } else { try { - Field numColumns = getClass().getSuperclass().getDeclaredField("mNumColumns"); + Field numColumns = GridView.class.getDeclaredField("mNumColumns"); numColumns.setAccessible(true); return numColumns.getInt(this); } catch (Exception e) {
issue #<I>: fetch the proper class
diff --git a/test/test_kohlschuetter.py b/test/test_kohlschuetter.py index <HASH>..<HASH> 100644 --- a/test/test_kohlschuetter.py +++ b/test/test_kohlschuetter.py @@ -48,7 +48,6 @@ class TestBlockifier(KohlschuetterUnitBase): also handles case where lxml returns None for the tree""" # this raises an error in parsing - self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '', etree.HTMLParser(recover=True)) self.assertRaises(BlockifyError, Blockifier.blockify, '') # this returns None in lxml
Remove newly failing lxml assertion
diff --git a/image_scraper/utils.py b/image_scraper/utils.py index <HASH>..<HASH> 100644 --- a/image_scraper/utils.py +++ b/image_scraper/utils.py @@ -99,7 +99,7 @@ class ImageScraper(object): startLength = self.proxyUrl.find("://") + 3 print("Using proxy: " + self.proxyUrl[:startLength] + self.proxyUrl[startLength:] + "\n") proxies = { - self.proxyUrl[:(startLength - 3)] : self.proxyUrl[startLength:] + self.proxyUrl[:(startLength - 3)] : self.proxyUrl } try: @@ -153,7 +153,7 @@ class ImageScraper(object): if self.proxyUrl: startLength = self.proxyUrl.find("://") + 3 proxies = { - self.proxyUrl[:(startLength - 3)] : self.proxyUrl[startLength:] + self.proxyUrl[:(startLength - 3)] : self.proxyUrl } img_request = requests.request('get', img_url, stream=True, proxies=proxies)
:racehorse: Added proxy support
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -from setuptools import setup +from setuptools import setup, find_packages setup( name="dev-pipeline-git", @@ -8,7 +8,7 @@ setup( package_dir={ "": "lib" }, - packages=['devpipeline_git'], + packages=find_packages("lib"), install_requires=[ 'dev-pipeline-core >= 0.2.0'
Use find_packages instead of being explicit
diff --git a/gcsproxy/listing_proxy_test.go b/gcsproxy/listing_proxy_test.go index <HASH>..<HASH> 100644 --- a/gcsproxy/listing_proxy_test.go +++ b/gcsproxy/listing_proxy_test.go @@ -166,7 +166,24 @@ func (t *ListingProxyTest) List_BucketReturnsIllegalObjectName() { } func (t *ListingProxyTest) List_BucketReturnsIllegalDirectoryName() { - AssertTrue(false, "TODO") + badListing := &storage.Objects{ + Prefixes: []string{ + path.Join(t.dirName, "foo/"), + path.Join(t.dirName, "bar"), + path.Join(t.dirName, "baz/"), + }, + } + + // Bucket.ListObjects + ExpectCall(t.bucket, "ListObjects")(Any(), Any()). + WillOnce(oglemock.Return(badListing, nil)) + + // List + _, _, err := t.lp.List() + + AssertNe(nil, err) + ExpectThat(err, Error(HasSubstr("directory name"))) + ExpectThat(err, Error(HasSubstr(badListing.Prefixes[1]))) } func (t *ListingProxyTest) List_EmptyResult() {
ListingProxyTest.List_BucketReturnsIllegalDirectoryName
diff --git a/src/transformers/integrations.py b/src/transformers/integrations.py index <HASH>..<HASH> 100644 --- a/src/transformers/integrations.py +++ b/src/transformers/integrations.py @@ -124,8 +124,7 @@ def run_hp_search_ray(trainer, n_trials: int, direction: str, **kwargs) -> BestR metrics = trainer.evaluate() trainer.objective = trainer.compute_objective(metrics) trainer._tune_save_checkpoint() - ray.tune.report(objective=trainer.objective) - return trainer.objective + ray.tune.report(objective=trainer.objective, **metrics, done=True) # The model and TensorBoard writer do not pickle so we have to remove them (if they exists) # while doing the ray hp search.
Report Tune metrics in final evaluation (#<I>)
diff --git a/lib/unexpected-sinon.js b/lib/unexpected-sinon.js index <HASH>..<HASH> 100644 --- a/lib/unexpected-sinon.js +++ b/lib/unexpected-sinon.js @@ -133,7 +133,9 @@ var onCall = spy.onCall && spy.onCall(spy.behaviors.length); return onCall; }; - for (var propertyName in spy) { + var propertyNames = Object.getOwnPropertyNames(spy); + for (var i = 0; i < propertyNames.length; i += 1) { + var propertyName = propertyNames[i]; if ( spy.hasOwnProperty(propertyName) && propertyName !== 'behaviors' &&
Don't rely on spy/stub/... properties being enumerable They aren't as of sinonjs/sinon#<I>, which landed in sinon <I> Fixes #<I>
diff --git a/lib/rubocop/node_pattern.rb b/lib/rubocop/node_pattern.rb index <HASH>..<HASH> 100644 --- a/lib/rubocop/node_pattern.rb +++ b/lib/rubocop/node_pattern.rb @@ -135,9 +135,11 @@ module RuboCop end def run(node_var) - tokens = @string.scan(TOKEN) - tokens.reject! { |token| token =~ /\A[\s,]+\Z/ } # drop whitespace + tokens = + @string.scan(TOKEN).reject { |token| token =~ /\A#{SEPARATORS}\Z/ } + @match_code = compile_expr(tokens, node_var, false) + fail_due_to('unbalanced pattern') unless tokens.empty? end diff --git a/spec/rubocop/node_pattern_spec.rb b/spec/rubocop/node_pattern_spec.rb index <HASH>..<HASH> 100644 --- a/spec/rubocop/node_pattern_spec.rb +++ b/spec/rubocop/node_pattern_spec.rb @@ -912,11 +912,10 @@ describe RuboCop::NodePattern do end describe 'commas' do - # commas are just whitespace context 'with commas randomly strewn around' do let(:pattern) { ',,(,send,, ,int,:+, int ), ' } let(:ruby) { '1 + 2' } - it_behaves_like :matching + it_behaves_like :invalid end end
Drop support for extra commas in node patterns (part 2) Work started in #<I>. However, node patterns would still allow commas, due to another hard coded instance of the regexp that is now extracted into `NodePattern::Compiler::SEPARATORS`.
diff --git a/public/app/core/services/backend_srv.js b/public/app/core/services/backend_srv.js index <HASH>..<HASH> 100644 --- a/public/app/core/services/backend_srv.js +++ b/public/app/core/services/backend_srv.js @@ -105,6 +105,13 @@ function (angular, _, coreModule, config) { }); } + //populate error obj on Internal Error + if (_.isString(err.data) && err.status === 500 && !err.data) { + err.data = { + error: err.statusText + }; + } + // for Prometheus if (!err.data.message && _.isString(err.data.error)) { err.data.message = err.data.error;
feat(backendsrv): improves error response handling datasourceRequests that could not reach the destination threw invalid errors due to missing property. This fixes gives the user a better error message. closes #<I>
diff --git a/lib/6to5/transformation/transformers/es6/classes.js b/lib/6to5/transformation/transformers/es6/classes.js index <HASH>..<HASH> 100644 --- a/lib/6to5/transformation/transformers/es6/classes.js +++ b/lib/6to5/transformation/transformers/es6/classes.js @@ -207,7 +207,7 @@ ClassTransformer.prototype.buildBody = function () { }; /** - * Push a method to it's respective mutatorMap. + * Push a method to its respective mutatorMap. * * @param {Node} node MethodDefinition */
Use the posessive form of "its", not a contraction of "it is".
diff --git a/src/test/java/com/treetank/cache/TransactionLogCacheTest.java b/src/test/java/com/treetank/cache/TransactionLogCacheTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/treetank/cache/TransactionLogCacheTest.java +++ b/src/test/java/com/treetank/cache/TransactionLogCacheTest.java @@ -3,6 +3,7 @@ package com.treetank.cache; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; +import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -45,7 +46,7 @@ public class TransactionLogCacheTest { cache.clear(); } - @Test + @After public void tearDown() { TestHelper.closeEverything(); }
fixed bug in transactionlogtest, wrong annotation was set git-svn-id: <URL>
diff --git a/lib/ansiblelint/__init__.py b/lib/ansiblelint/__init__.py index <HASH>..<HASH> 100644 --- a/lib/ansiblelint/__init__.py +++ b/lib/ansiblelint/__init__.py @@ -125,7 +125,7 @@ class RulesCollection(object): return matches for rule in self.rules: - if not tags or not set(rule.tags + [rule.id]).isdisjoint(tags): + if not tags or not set(rule.tags).union([rule.id]).isdisjoint(tags): rule_definition = set(rule.tags) rule_definition.add(rule.id) if set(rule_definition).isdisjoint(skip_list):
Fix tags set creation in certain cases In some circumstances the rule id can't be added to the list. By using union on sets, this problem is avoided
diff --git a/scenarios/kubernetes_e2e.py b/scenarios/kubernetes_e2e.py index <HASH>..<HASH> 100755 --- a/scenarios/kubernetes_e2e.py +++ b/scenarios/kubernetes_e2e.py @@ -398,7 +398,7 @@ def create_parser(): parser.add_argument( '--soak-test', action='store_true', help='If the test is a soak test job') parser.add_argument( - '--tag', default='v20170310-72232020', help='Use a specific kubekins-e2e tag if set') + '--tag', default='v20170314-bb0669b0', help='Use a specific kubekins-e2e tag if set') parser.add_argument( '--test', default='true', help='If we need to set --test in e2e.go') parser.add_argument(
Update kubetest to <I>-bb<I>b0
diff --git a/hawtio-system/src/main/java/io/hawt/system/Authenticator.java b/hawtio-system/src/main/java/io/hawt/system/Authenticator.java index <HASH>..<HASH> 100644 --- a/hawtio-system/src/main/java/io/hawt/system/Authenticator.java +++ b/hawtio-system/src/main/java/io/hawt/system/Authenticator.java @@ -194,7 +194,7 @@ public class Authenticator { } else if (callback instanceof PasswordCallback) { ((PasswordCallback) callback).setPassword(password.toCharArray()); } else { - LOG.warn("Unsupported callback class [" + callback.getClass().getName() + "]"); + LOG.debug("Unknown callback class [" + callback.getClass().getName() + "]"); } } }
This log doesn't need to be at the WARN level
diff --git a/treenode/admin.py b/treenode/admin.py index <HASH>..<HASH> 100644 --- a/treenode/admin.py +++ b/treenode/admin.py @@ -58,6 +58,11 @@ class TreeNodeModelAdmin(admin.ModelAdmin): return base_list_display + def get_queryset(self, request): + qs = super(TreeNodeModelAdmin, self).get_queryset(request) + qs = qs.select_related('tn_parent') + return qs + def _use_treenode_display_mode(self, request, obj): querystring = (request.GET.urlencode() or '') return len(querystring) <= 2
Reduced admin list display queries count.
diff --git a/folder.go b/folder.go index <HASH>..<HASH> 100644 --- a/folder.go +++ b/folder.go @@ -32,7 +32,7 @@ func (f Folder) Reference() types.ManagedObjectReference { func (f Folder) Children(c *Client) ([]Reference, error) { var mf mo.Folder - err := c.Properties(f.Reference(), []string{"childType", "childEntity"}, &mf) + err := c.Properties(f.Reference(), []string{"childEntity"}, &mf) if err != nil { return nil, err } @@ -43,9 +43,9 @@ func (f Folder) Children(c *Client) ([]Reference, error) { // A folder contains managed entities, all of which are listed below. switch e.Type { case "Folder": - rs = append(rs, Folder{e}) + rs = append(rs, Folder{ManagedObjectReference: e}) case "Datacenter": - rs = append(rs, Datacenter{e}) + rs = append(rs, Datacenter{ManagedObjectReference: e}) case "VirtualMachine": panic("TODO") case "VirtualApp":
Retrieve only childEntity property for folder
diff --git a/lib/codemirror.js b/lib/codemirror.js index <HASH>..<HASH> 100644 --- a/lib/codemirror.js +++ b/lib/codemirror.js @@ -5392,7 +5392,7 @@ for (var i = newBreaks.length - 1; i >= 0; i--) replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)) }); - option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) { + option("specialChars", /[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) { cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); if (old != CodeMirror.Init) cm.refresh(); });
Include all ASCII control codes in specialChars * \x1a-\x1f were missing though it looks like the intention was to cover all below \x<I> (space) * added \x7f which is usually considered non-printable * removed \t which was already covered in \x<I>-\x<I> as \x<I>
diff --git a/SoftLayer/managers/storage_utils.py b/SoftLayer/managers/storage_utils.py index <HASH>..<HASH> 100644 --- a/SoftLayer/managers/storage_utils.py +++ b/SoftLayer/managers/storage_utils.py @@ -660,14 +660,14 @@ def prepare_replicant_order_object(manager, snapshot_schedule, location, """ # Ensure the primary volume and snapshot space are not set for cancellation if 'billingItem' not in volume\ - or volume['billingItem']['cancellationDate'] != '': + or volume['billingItem'].get('cancellationDate'): raise exceptions.SoftLayerError( 'This volume is set for cancellation; ' 'unable to order replicant volume') for child in volume['billingItem']['activeChildren']: if child['categoryCode'] == 'storage_snapshot_space'\ - and child['cancellationDate'] != '': + and child.get('cancellationDate'): raise exceptions.SoftLayerError( 'The snapshot space for this volume is set for ' 'cancellation; unable to order replicant volume')
<I> Fix checking against literal empty string
diff --git a/lib/berkshelf/locations/hg.rb b/lib/berkshelf/locations/hg.rb index <HASH>..<HASH> 100644 --- a/lib/berkshelf/locations/hg.rb +++ b/lib/berkshelf/locations/hg.rb @@ -51,9 +51,8 @@ module Berkshelf # Download the cookbook from the remote hg repository # - # @return [CachedCookbook] + # @return void def install - if cached? # Update and checkout the correct ref Dir.chdir(cache_path) do @@ -73,7 +72,6 @@ module Berkshelf @revision ||= hg %|id -i| end - # Gab the path where we should copy from (since it might be relative to # the root). copy_path = rel ? cache_path.join(rel) : cache_path @@ -92,7 +90,6 @@ module Berkshelf # Copy whatever is in the current cache over to the store FileUtils.cp_r(copy_path, install_path) - ensure # Remove the .hg directory to save storage space @@ -138,7 +135,6 @@ module Berkshelf out end - # Determine if this revision is installed. # # @return [Boolean] @@ -146,7 +142,6 @@ module Berkshelf revision && install_path.exist? end - private # Perform a mercurial command.
Silly josh with his extraneous newlines
diff --git a/models/lobby/lobby_requirement.go b/models/lobby/lobby_requirement.go index <HASH>..<HASH> 100644 --- a/models/lobby/lobby_requirement.go +++ b/models/lobby/lobby_requirement.go @@ -70,7 +70,6 @@ func (l *Lobby) FitsRequirements(player *player.Player, slot int) (bool, error) //update player info only if the number of hours needed > the number of hours //passed since player info was last updated player.UpdatePlayerInfo() - player.Save() } if player.GameHours < req.Hours {
FitsRequirements: Don't save player on UpdatePlayerInfo
diff --git a/src/matchArray.js b/src/matchArray.js index <HASH>..<HASH> 100644 --- a/src/matchArray.js +++ b/src/matchArray.js @@ -17,7 +17,7 @@ module.exports = (currentMatch, subjectToMatch) => { .slice(0, matchArgs.length - 1) .every((arg, index) => matchOnSubArg(arg, subjectToMatch[index])) - if (deepEqual(matchArgs[matchArgs.length - 1].value, []) && matchAllSubArgs) { + if (matchAllSubArgs && deepEqual(matchArgs[matchArgs.length - 1].value, [])) { return option.Some(subjectToMatch[0]) }
Flip args on match array validation It's better to check first the value that already was evaluated.
diff --git a/src/dct.js b/src/dct.js index <HASH>..<HASH> 100644 --- a/src/dct.js +++ b/src/dct.js @@ -7,7 +7,7 @@ * tool to understand the Mel-scale and its related coefficients used in * human speech analysis. \*===========================================================================*/ -cosMap = null; +var cosMap = null; // Builds a cosine map for the given input size. This allows multiple input sizes to be memoized automagically // if you want to run the DCT over and over.
Assign cosMap as undefined variables in strict mode (and ES6) throw errors
diff --git a/src/Project.php b/src/Project.php index <HASH>..<HASH> 100644 --- a/src/Project.php +++ b/src/Project.php @@ -39,19 +39,32 @@ class Project /** * + * The Composer 'installed' data. + * + * @var array + * + */ + protected $installed; + + /** + * * Constructor. * * @param string $base The base directory. * * @param array $env A copy of $_ENV. * + * @param array $installed A decoded version of the Composer 'installed' + * data. + * */ - public function __construct($base, array $env) + public function __construct($base, array $env, $installed) { $this->base = rtrim($base, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; $this->mode = isset($env['AURA_CONFIG_MODE']) ? $env['AURA_CONFIG_MODE'] : 'default'; + $this->installed = $installed; } /** @@ -90,6 +103,18 @@ class Project /** * + * Returns the Composer 'installed' data. + * + * @return array + * + */ + public function getInstalled() + { + return $this->installed; + } + + /** + * * Gets the base path, along with an optional subdirectory path. * * @param string $sub An optional subdirectory path.
retain Composer 'installed' data in the project info
diff --git a/packages/card/index.js b/packages/card/index.js index <HASH>..<HASH> 100644 --- a/packages/card/index.js +++ b/packages/card/index.js @@ -1,3 +1,5 @@ -const React = require('./dist/react') +const css = require('./css') +const react = require('./react') +const vars = require('./vars') -module.exports = { React } +module.exports = { css, react, vars }
refactor(card): remember to update index for new css/vars imports
diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/metastore/CachingHiveMetastore.java b/presto-hive/src/main/java/com/facebook/presto/hive/metastore/CachingHiveMetastore.java index <HASH>..<HASH> 100644 --- a/presto-hive/src/main/java/com/facebook/presto/hive/metastore/CachingHiveMetastore.java +++ b/presto-hive/src/main/java/com/facebook/presto/hive/metastore/CachingHiveMetastore.java @@ -614,7 +614,7 @@ public class CachingHiveMetastore { CacheBuilder<Object, Object> cacheBuilder = CacheBuilder.newBuilder(); if (expiresAfterWriteMillis.isPresent()) { - cacheBuilder = cacheBuilder.expireAfterAccess(expiresAfterWriteMillis.getAsLong(), MILLISECONDS); + cacheBuilder = cacheBuilder.expireAfterWrite(expiresAfterWriteMillis.getAsLong(), MILLISECONDS); } if (refreshMillis.isPresent()) { cacheBuilder = cacheBuilder.refreshAfterWrite(refreshMillis.getAsLong(), MILLISECONDS);
Use expireAfterWrite in Hive metastore cache The original code was using expireAfterAccess, which was a typo and was introduced in the PR that added per-transaction cache for Hive metastore.
diff --git a/spec/module_spec.rb b/spec/module_spec.rb index <HASH>..<HASH> 100644 --- a/spec/module_spec.rb +++ b/spec/module_spec.rb @@ -223,10 +223,7 @@ describe EtOrbi do current = EtOrbi.get_tzone(:local) - class ::Time - alias _original_zone zone - def zone; "中国标准时间"; end - end + Time._zone = '中国标准时间' # expect( # EtOrbi.get_tzone(:current) @@ -252,9 +249,7 @@ describe EtOrbi do ensure - class ::Time - def zone; _original_zone; end - end + Time._zone = nil end expect( 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 @@ -78,6 +78,19 @@ class Time "dst:#{self.isdst}" ].join(' ') end + + # + # tools to "inject" a zone string at will + + alias _original_zone zone + + def zone + self.class._zone || _original_zone + end + + class << self + attr_accessor :_zone + end end class SpecActiveSupportTimeZone
Inject arbitrary zone name at spec_helper.rb level
diff --git a/lib/chef/knife/azure_base.rb b/lib/chef/knife/azure_base.rb index <HASH>..<HASH> 100755 --- a/lib/chef/knife/azure_base.rb +++ b/lib/chef/knife/azure_base.rb @@ -74,7 +74,7 @@ class Chef :azure_host_name => locate_config_value(:azure_host_name), :verify_ssl_cert => locate_config_value(:verify_ssl_cert) ) - end + end end def locate_config_value(key) @@ -94,7 +94,7 @@ class Chef keys.each do |k| pretty_key = k.to_s.gsub(/_/, ' ').gsub(/\w+/){ |w| (w =~ /(ssh)|(aws)/i) ? w.upcase : w.capitalize } if locate_config_value(k).nil? - errors << "You did not provide a valid '#{pretty_key}' value." + errors << "You did not provide a valid '#{pretty_key}' value. Please set knife[:#{k}] in your knife.rb or pass as option" end end
Better hints for the user incase of a missing param
diff --git a/TYPO3.Flow/Scripts/flow.php b/TYPO3.Flow/Scripts/flow.php index <HASH>..<HASH> 100644 --- a/TYPO3.Flow/Scripts/flow.php +++ b/TYPO3.Flow/Scripts/flow.php @@ -23,6 +23,12 @@ if (isset($argv[1]) && ($argv[1] === 'typo3.flow:core:setfilepermissions' || $ar if (DIRECTORY_SEPARATOR !== '/') { exit('The core:setfilepermissions command is only available on UNIX platforms.' . PHP_EOL); } + + $filePermissions = decoct(fileperms(__DIR__ . '/setfilepermissions.sh') & 0777); + if ($filePermissions !== '700'){ + chmod(__DIR__ . '/setfilepermissions.sh', 0700); + } + array_shift($argv); array_shift($argv); $returnValue = 0;
[TASK] Add permissions check for setfilepermissions.sh Using the setfilepermissions.sh script fails due to wrong file permissions left by the composer installation (missing executable bit). Added the checking of the file's permissions, and correcting the file's permissions if needed. Mode <I> is set as the setfilepermissions.sh script sets it's own permissions to that mode.
diff --git a/src/styles/points/points.js b/src/styles/points/points.js index <HASH>..<HASH> 100755 --- a/src/styles/points/points.js +++ b/src/styles/points/points.js @@ -192,7 +192,7 @@ Object.assign(Points, { quad: [ Utils.scaleInt16(size[0], 256), Utils.scaleInt16(size[1], 256) ], quad_scale: Utils.scaleInt16(1, 256), offset: Vector.mult(offset, Utils.device_pixel_ratio), - angle: Utils.scaleInt16(Utils.radToDeg(angle), 360), + angle: Utils.scaleInt16(angle, 360), texcoord_scale: this.texcoord_scale, texcoord_normalize: 65535 } diff --git a/src/styles/text/text.js b/src/styles/text/text.js index <HASH>..<HASH> 100644 --- a/src/styles/text/text.js +++ b/src/styles/text/text.js @@ -490,9 +490,9 @@ Object.assign(TextStyle, { let label = style.labels[i]; this.buildQuad( - [label.position], - label.size.texture_text_size, - label.angle || 0, vertex_data, + [label.position], + label.size.texture_text_size, + Utils.radToDeg(label.angle) || 0, vertex_data, vertex_template, label.options.offset ); }
point angle is degrees in scene file, radians in internal label calc
diff --git a/src/providers/discord.js b/src/providers/discord.js index <HASH>..<HASH> 100644 --- a/src/providers/discord.js +++ b/src/providers/discord.js @@ -8,7 +8,7 @@ export default (options) => { params: { grant_type: 'authorization_code' }, accessTokenUrl: 'https://discord.com/api/oauth2/token', authorizationUrl: - 'https://discord.com/api/oauth2/authorize?response_type=code&prompt=consent', + 'https://discord.com/api/oauth2/authorize?response_type=code&prompt=none', profileUrl: 'https://discord.com/api/users/@me', profile: (profile) => { return {
Set Discord to Prompt = None (#<I>) * Update discord.js * Migrating from discordapp.com to discord.com
diff --git a/validator/testcases/jetpack.py b/validator/testcases/jetpack.py index <HASH>..<HASH> 100644 --- a/validator/testcases/jetpack.py +++ b/validator/testcases/jetpack.py @@ -53,6 +53,8 @@ def inspect_jetpack(err, xpi_package, allow_old_sdk=False): err.save_resource('pretested_files', []) if is_old_jetpack(xpi_package): + if err.get_resource('is_compat_test'): + return err.error( err_id=('jetpack', 'inspect_jetpack', 'cfx'),
Ignore cfx compat test during bulk validation
diff --git a/flask_slither/resources.py b/flask_slither/resources.py index <HASH>..<HASH> 100644 --- a/flask_slither/resources.py +++ b/flask_slither/resources.py @@ -168,13 +168,13 @@ class BaseResource(MethodView): final.update(projection) return None if final == {} else final - def _get_collection(self): + def _get_collection(self, **kwargs): current_app.logger.debug("GETting collection") documents = [] try: query = {} if 'where' not in request.args else \ json_util.loads(request.args.get('where')) - query.update(self.access_limits()) + query.update(self.access_limits(**kwargs)) cursor = current_app.db[self.collection] \ .find(query, self._get_projection()) if 'sort' in request.args: @@ -284,7 +284,7 @@ class BaseResource(MethodView): else: return self._prep_response(status=409) else: - response = self._get_collection() + response = self._get_collection(**kwargs) return self._prep_response(response)
get_collection is passed **kwargs as it should
diff --git a/payment/src/main/java/org/killbill/billing/payment/core/sm/control/OperationControlCallback.java b/payment/src/main/java/org/killbill/billing/payment/core/sm/control/OperationControlCallback.java index <HASH>..<HASH> 100644 --- a/payment/src/main/java/org/killbill/billing/payment/core/sm/control/OperationControlCallback.java +++ b/payment/src/main/java/org/killbill/billing/payment/core/sm/control/OperationControlCallback.java @@ -159,7 +159,7 @@ public abstract class OperationControlCallback extends OperationCallbackBase<Pay if (e.getCause() instanceof OperationException) { return (OperationException) e.getCause(); } - logger.warn("Operation failed for accountId='{}' accountExternalKey='{}' error='{}'", paymentStateContext.getAccount().getExternalKey(), e.getMessage()); + logger.warn("Operation failed for accountId='{}' accountExternalKey='{}' error='{}'", paymentStateContext.getAccount().getId(), paymentStateContext.getAccount().getExternalKey(), e.getMessage()); return new OperationException(e, getOperationResultOnException(paymentStateContext)); }
payment: fix logging message in OperationControlCallback
diff --git a/routes/admin/not-authenticated/account-login/page.js b/routes/admin/not-authenticated/account-login/page.js index <HASH>..<HASH> 100644 --- a/routes/admin/not-authenticated/account-login/page.js +++ b/routes/admin/not-authenticated/account-login/page.js @@ -108,20 +108,6 @@ class LoginPage extends Component { )} </Button> </FormRedux> - - <p className='white center'> - <FormattedMessage - id='page--account-login.ask-register' - defaultMessage='Ainda não é cadastrado?' - /> - <br /> - <Link to={paths.createAccount()}> - <FormattedMessage - id='page--account-login.cta-signup' - defaultMessage='Clique para criar uma conta.' - /> - </Link> - </p> </div> ) }
feature(login): Remove from login page register link
diff --git a/examples/Clock/ClockDS.py b/examples/Clock/ClockDS.py index <HASH>..<HASH> 100644 --- a/examples/Clock/ClockDS.py +++ b/examples/Clock/ClockDS.py @@ -39,8 +39,7 @@ class Clock(Device): @attribute(dtype='DevEnum', enum_labels=get_enum_labels(Noon)) def noon(self): time_struct = time.gmtime(time.time()) - result = Noon.AM if time_struct.tm_hour < 12 else Noon.PM - return int(result) + return Noon.AM if time_struct.tm_hour < 12 else Noon.PM @command(dtype_in=float, dtype_out=str) def ctime(self, seconds):
Remove casting in ClockDS enum example The enum can be used directly - no need to cast it to an int before returning.
diff --git a/src/deep-security/lib/Token.js b/src/deep-security/lib/Token.js index <HASH>..<HASH> 100644 --- a/src/deep-security/lib/Token.js +++ b/src/deep-security/lib/Token.js @@ -147,13 +147,11 @@ export class Token { this._credentials = new AWS.CognitoIdentityCredentials(cognitoParams); - AWS.config.credentials = this._credentials; - if (this.identityId) { // trying to load old credentials from CognitoSync this._credsManager.loadCredentials(this.identityId, (error, credentials) => { if (!error && credentials && this.validCredentials(credentials)) { - callback(null, this._credentials = credentials); + callback(null, AWS.config.credentials = this._credentials = credentials); return; } else { this._refreshCredentials(this._credentials, callback); @@ -184,6 +182,8 @@ export class Token { return; } + AWS.config.credentials = this._credentials; + // @todo - save credentials in background not to affect page load time this._credsManager.saveCredentials(credentials, (error, record) => { if (error) {
#<I> - Fix credentials assignment to AWS.config.credentials
diff --git a/lib/i18n/backend/cache.rb b/lib/i18n/backend/cache.rb index <HASH>..<HASH> 100644 --- a/lib/i18n/backend/cache.rb +++ b/lib/i18n/backend/cache.rb @@ -68,7 +68,7 @@ module I18n # Also, in Ruby < 1.8.7 {}.hash != {}.hash # (see http://paulbarry.com/articles/2009/09/14/why-rails-3-will-require-ruby-1-8-7) # If args.inspect does not work for you for some reason, patches are very welcome :) - hash = RUBY_VERSION >= "1.8.7" ? options.hash : options.inspect + hash = RUBY_VERSION >= "1.8.7" ? options.hash : options.inspect.hash keys = ['i18n', I18n.cache_namespace, locale, key.hash, hash] keys.join('|') end
For those using < <I>, prevent the key becoming too large (for example for memcached) by tasking the hash of inspect string.
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ var lib = require('./mappersmith') var _process, defaultGateway // Prevents webpack to load the nodejs processs polyfill -try { _process = eval('typeof process === "object" ? process : null') } catch (e) {} +try { _process = eval('typeof process === "object" ? process : undefined') } catch (e) {} if (typeof XMLHttpRequest !== 'undefined') { // For browsers use XHR adapter diff --git a/src/utils.js b/src/utils.js index <HASH>..<HASH> 100644 --- a/src/utils.js +++ b/src/utils.js @@ -13,7 +13,7 @@ if (typeof window !== 'undefined' && window !== null) { } let _process, getNanoSeconds, loadTime; -try { _process = eval('typeof process === "object" ? process : null') } catch (e) {} +try { _process = eval('typeof process === "object" ? process : undefined') } catch (e) {} const hasProcessHrtime = () => { return (typeof _process !== 'undefined' && _process !== null) && _process.hrtime
Switch null with undefined on process evaluation
diff --git a/externs/html5.js b/externs/html5.js index <HASH>..<HASH> 100644 --- a/externs/html5.js +++ b/externs/html5.js @@ -1192,6 +1192,7 @@ HTMLInputElement.prototype.stepUp = function(opt_n) {}; /** * @constructor * @extends {HTMLElement} + * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement */ function HTMLMediaElement() {} @@ -1261,13 +1262,22 @@ HTMLMediaElement.prototype.readyState; /** @type {boolean} */ HTMLMediaElement.prototype.seeking; -/** @type {number} */ +/** + * The current time, in seconds. + * @type {number} + */ HTMLMediaElement.prototype.currentTime; -/** @type {number} */ +/** + * The start time, in seconds. + * @type {number} + */ HTMLMediaElement.prototype.startTime; -/** @type {number} */ +/** + * The length of the media in seconds. + * @type {number} + */ HTMLMediaElement.prototype.duration; /** @type {boolean} */ @@ -1307,7 +1317,10 @@ HTMLMediaElement.prototype.pause = function() {}; /** @type {boolean} */ HTMLMediaElement.prototype.controls; -/** @type {number} */ +/** + * The audio volume, from 0.0 (silent) to 1.0 (loudest). + * @type {number} + */ HTMLMediaElement.prototype.volume; /** @type {boolean} */
Add some documentation for properties in HTMLMediaElement. In particular, clarify that times are in seconds, not milliseconds. ------------- Created by MOE: <URL>
diff --git a/ue4cli/UnrealManagerBase.py b/ue4cli/UnrealManagerBase.py index <HASH>..<HASH> 100644 --- a/ue4cli/UnrealManagerBase.py +++ b/ue4cli/UnrealManagerBase.py @@ -150,7 +150,7 @@ class UnrealManagerBase(object): try: return self.getPluginDescriptor(dir) except: - raise UnrealManagerException('could not detect an Unreal project or plugin in the current directory') + raise UnrealManagerException('could not detect an Unreal project or plugin in the directory "{}"'.format(dir)) def isProject(self, descriptor): """
Report directory path when descriptor detection fails
diff --git a/gshell-io/src/main/java/org/sonatype/gshell/io/InputPipe.java b/gshell-io/src/main/java/org/sonatype/gshell/io/InputPipe.java index <HASH>..<HASH> 100644 --- a/gshell-io/src/main/java/org/sonatype/gshell/io/InputPipe.java +++ b/gshell-io/src/main/java/org/sonatype/gshell/io/InputPipe.java @@ -100,27 +100,36 @@ public class InputPipe startSignal.countDown(); while (running) { - int c = read(); + try { + int c = read(); + + switch (c) { + case -1: + queue.put(c); + return; - switch (c) { - case -1: - queue.put(c); - return; + case 3: + interrupt = interruptHandler.interrupt(); + break; - case 3: - interrupt = interruptHandler.interrupt(); - break; + case 4: + running = interruptHandler.stop(); + break; + } - case 4: - running = interruptHandler.stop(); - break; + queue.put(c); } + catch (IOException e) { + log.warn("Pipe read error", e); - queue.put(c); + // HACK: Reset the terminal + term.restore(); + term.init(); + } } } catch (Throwable t) { - log.error("Pipe read failed", t); + log.error("Pipe read failure", t); if (t instanceof RuntimeException) { throw (RuntimeException) t; }
Handle cases that show up when CTRL-Z is used to suspend the shell, causing the pipe to fail. Also need to reset the terminal.
diff --git a/server/storage/mvcc/index.go b/server/storage/mvcc/index.go index <HASH>..<HASH> 100644 --- a/server/storage/mvcc/index.go +++ b/server/storage/mvcc/index.go @@ -257,8 +257,14 @@ func (ti *treeIndex) Equal(bi index) bool { equal := true ti.tree.Ascend(func(item btree.Item) bool { - aki := item.(*keyIndex) - bki := b.tree.Get(item).(*keyIndex) + var aki, bki *keyIndex + var ok bool + if aki, ok = item.(*keyIndex); !ok { + return false + } + if bki, ok = b.tree.Get(item).(*keyIndex); !ok { + return false + } if !aki.equal(bki) { equal = false return false
server/storage/mvcc: fix oss-fuzz issue <I>
diff --git a/fireplace/game.py b/fireplace/game.py index <HASH>..<HASH> 100644 --- a/fireplace/game.py +++ b/fireplace/game.py @@ -164,13 +164,13 @@ class Game(Entity): return ret - def toss_coin(self): - outcome = random.randint(0, 1) - # player who wins the outcome is the index - winner = self.players[outcome] - loser = winner.opponent - logging.info("Tossing the coin... %s wins!" % (winner)) - return winner, loser + def pick_first_player(self): + """ + Picks and returns first player, second player + In the default implementation, the first player is always + "Player 0". Use CoinRules to decide it randomly. + """ + return self.players[0], self.players[1] def refresh_auras(self): for aura in self.auras: @@ -178,7 +178,7 @@ class Game(Entity): def start(self): logging.info("Starting game: %r" % (self)) - self.player1, self.player2 = self.toss_coin() + self.player1, self.player2 = self.pick_first_player() self.manager.new_entity(self.player1) self.manager.new_entity(self.player2) self.current_player = self.player1
Simplify Game.toss_coin() logic and rename it to pick_first_player()
diff --git a/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb b/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb +++ b/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb @@ -131,7 +131,7 @@ module ActiveRecord def record_changed_lobs @changed_lob_columns = self.class.lob_columns.select do |col| - (self.class.serialized_attributes.keys.include?(col.name) || self.send(:"#{col.name}_changed?")) && !self.class.readonly_attributes.to_a.include?(col.name) + self.attribute_changed?(col.name) && !self.class.readonly_attributes.to_a.include?(col.name) end end end
Remove call to deprecated `serialized_attributes`. According to <URL> it should be no longer necessary to check whether the attribute is serialized. Note: this change is probably incompatible with rails prior <I>.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,25 @@ from setuptools import setup from setuptools.command.install import install as orig_install +try: + from wheel.bdist_wheel import bdist_wheel as _bdist_wheel + + class bdist_wheel(_bdist_wheel): + + def finalize_options(self): + _bdist_wheel.finalize_options(self) + # Mark us as not a pure python package + self.root_is_pure = False + + def get_tag(self): + python, abi, plat = _bdist_wheel.get_tag(self) + # We don't contain any python source + python, abi = 'py2.py3', 'none' + return python, abi, plat +except ImportError: + bdist_wheel = None + + class ExeDistribution(Distribution): c_executables = () @@ -99,6 +118,7 @@ setup( ), ], cmdclass={ + 'bdist_wheel': bdist_wheel, 'build': build, 'build_cexe': build_cexe, 'install': install,
dumb-init is not a pure python package
diff --git a/stats/cloud/client.go b/stats/cloud/client.go index <HASH>..<HASH> 100644 --- a/stats/cloud/client.go +++ b/stats/cloud/client.go @@ -117,7 +117,9 @@ func (c *Client) Do(req *http.Request, v interface{}) error { func (c *Client) do(req *http.Request, v interface{}, attempt int) (retry bool, err error) { req.Header.Set("Content-Type", "application/json") - req.Header.Set("Authorization", fmt.Sprintf("Token %s", c.token)) + if c.token != "" { + req.Header.Set("Authorization", fmt.Sprintf("Token %s", c.token)) + } req.Header.Set("User-Agent", "k6cloud/"+c.version) resp, err := c.client.Do(req)
Fix: anonymous users running the `cloud` collector will not send the `Authorization` header
diff --git a/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoConnection.java b/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoConnection.java index <HASH>..<HASH> 100644 --- a/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoConnection.java +++ b/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoConnection.java @@ -225,7 +225,7 @@ public class PrestoConnection public int getTransactionIsolation() throws SQLException { - throw new UnsupportedOperationException("getTransactionIsolation"); + return TRANSACTION_NONE; } @Override
Implement PrestoConnection.getTransactionIsolation Resolves #<I>
diff --git a/src/components/multiselect/MultiSelect.js b/src/components/multiselect/MultiSelect.js index <HASH>..<HASH> 100644 --- a/src/components/multiselect/MultiSelect.js +++ b/src/components/multiselect/MultiSelect.js @@ -396,12 +396,11 @@ export class MultiSelect extends Component { callback && callback(); } - onOverlayEntered(callback) { + onOverlayEntered() { this.bindDocumentClickListener(); this.bindScrollListener(); this.bindResizeListener(); - callback && callback(); this.props.onShow && this.props.onShow(); }
Fixed #<I> - MultiSelect with transitionOptions property throws an exception
diff --git a/lib/WebDriverTargetLocator.php b/lib/WebDriverTargetLocator.php index <HASH>..<HASH> 100644 --- a/lib/WebDriverTargetLocator.php +++ b/lib/WebDriverTargetLocator.php @@ -41,10 +41,18 @@ class WebDriverTargetLocator { /** * Switch to the iframe by its id or name. * + * @param WebDriverElement|string $frame The WebDriverElement, + the id or the name of the frame. * @return WebDriver The driver focused on the given frame. */ - public function frame($id_or_name) { - $params = array('id' => (string)$id_or_name); + public function frame($frame) { + if ($frame instanceof WebDriverElement) { + $id = array('ELEMENT' => $frame->getID()); + } else { + $id = (string)$frame; + } + + $params = array('id' => $id); $this->executor->execute('focusFrame', $params); return $this->driver;
[switchTo] switch to frame by WebDriverElement Allow switching to a frame by the WebDriverElement. Sample: $frame_element = $driver->findElement($by); $driver->switchTo()->frame($frame_element);
diff --git a/src/resource.php b/src/resource.php index <HASH>..<HASH> 100644 --- a/src/resource.php +++ b/src/resource.php @@ -204,6 +204,10 @@ public function fill_data($values) { * @todo allow to add collections as well */ public function add_relation($key, $relation, $skip_include=false) { + if (isset($this->primary_relationships[$key]) && $relation instanceof \alsvanzelf\jsonapi\resource == false) { + throw new \Exception('can not add a relation twice, unless using a resource object'); + } + if ($relation instanceof \alsvanzelf\jsonapi\resource) { // add whole resources as included resource, while keeping the relationship if ($relation->has_data() && $skip_include == false) { @@ -214,6 +218,12 @@ public function add_relation($key, $relation, $skip_include=false) { $relation_type = $relation->get_type(); $relation_id = $relation->get_id() ?: null; + if (isset($this->primary_relationships[$key])) { + $this->primary_relationships[$key]['data']['id'] = array($this->primary_relationships[$key]['data']['id']); + $this->primary_relationships[$key]['data']['id'][] = $relation_id; + return; + } + $relation = array( 'links' => array( 'self' => $base_url.'/relationships/'.$relation_type,
modify add_relation method for handle multi same relation
diff --git a/test/entity_test.rb b/test/entity_test.rb index <HASH>..<HASH> 100644 --- a/test/entity_test.rb +++ b/test/entity_test.rb @@ -91,6 +91,13 @@ module XCDM "Author", inverseName: "article", inverseEntity: "Author" }], e.relationships end + def test_has_one_should_not_plural + e.has_one 'address' + assert_equal [{ optional: "YES", deletionRule: "Nullify", syncable: "YES", + name: "address", minCount: "1", maxCount: "1", destinationEntity: + "Address", inverseName: "article", inverseEntity: "Address" }], e.relationships + end + def test_belongs_to e.belongs_to 'author' assert_equal [{ optional: "YES", deletionRule: "Nullify", syncable: "YES",
Added test for entities that end 's' and has_one The reason for this test is that release <I> has a bug where if you an entity with the name 'Address' and another entity 'has_one :address', the relationship is not properly handled. In other words, if you run this test for verson <I>, it fails. On master, it succeeds. So this test is simply to prevent regression. I believe the fix to this was simply when the code updated the version of ActiveSupport.
diff --git a/tests/google/requests/storage/bucket_tests.rb b/tests/google/requests/storage/bucket_tests.rb index <HASH>..<HASH> 100644 --- a/tests/google/requests/storage/bucket_tests.rb +++ b/tests/google/requests/storage/bucket_tests.rb @@ -16,8 +16,7 @@ Shindo.tests('Fog::Storage[:google] | bucket requests', ["google"]) do 'DisplayName' => String, 'ID' => String }, - 'Size' => Integer, - 'StorageClass' => String + 'Size' => Integer }] }
[google|storage] update expected format to remove StorageClass
diff --git a/bot/api/api.py b/bot/api/api.py index <HASH>..<HASH> 100644 --- a/bot/api/api.py +++ b/bot/api/api.py @@ -11,7 +11,7 @@ class Api: def send_message(self, message: Message, **params): message_params = message.data.copy() message_params.update(params) - return self.telegram_api.sendMessage(**message_params) + return self.sendMessage(**message_params) def get_pending_updates(self): there_are_pending_updates = True @@ -22,7 +22,7 @@ class Api: yield update def get_updates(self, timeout=45): - updates = self.telegram_api.getUpdates(offset=self.__get_updates_offset(), timeout=timeout) + updates = self.getUpdates(offset=self.__get_updates_offset(), timeout=timeout) for update in updates: self.__set_updates_offset(update.update_id) yield update
Remove direct access to telegram_api from api.py to pass through hook
diff --git a/command/node_status.go b/command/node_status.go index <HASH>..<HASH> 100644 --- a/command/node_status.go +++ b/command/node_status.go @@ -12,7 +12,7 @@ type NodeStatusCommand struct { func (c *NodeStatusCommand) Help() string { helpText := ` -Usage: nomad node-status [options] [node] +Usage: nomad node-status [options] <node> Display status information about a given node. The list of nodes returned includes only nodes which jobs may be scheduled to, and diff --git a/command/status.go b/command/status.go index <HASH>..<HASH> 100644 --- a/command/status.go +++ b/command/status.go @@ -18,7 +18,7 @@ type StatusCommand struct { func (c *StatusCommand) Help() string { helpText := ` -Usage: nomad status [options] [job] +Usage: nomad status [options] <job> Display status information about jobs. If no job ID is given, a list of all known jobs will be dumped.
standardize on <> for required flags
diff --git a/test/com/google/javascript/jscomp/SymbolTableTest.java b/test/com/google/javascript/jscomp/SymbolTableTest.java index <HASH>..<HASH> 100644 --- a/test/com/google/javascript/jscomp/SymbolTableTest.java +++ b/test/com/google/javascript/jscomp/SymbolTableTest.java @@ -1421,7 +1421,7 @@ public final class SymbolTableTest extends TestCase { // Add window so that it triggers logic that defines all global externs on window. // See DeclaredGlobalExternsOnWindow.java pass. String externs = lines("/** @externs */", "var window", "var foo;"); - String mainCode = lines("foo;", "window.foo;"); + String mainCode = lines("foo = 2;", "window.foo = 1;"); SymbolTable table = createSymbolTable(mainCode, externs); Map<String, Integer> refsPerFile = new HashMap<>();
Fix flakiness of SymbolTableTest. The flakiness caused by window.foo; being declared both in externs and main code and compiler doesn't know which one is declaration and which one is "usage" and depending on the order of processing they both might be used as declaration. By changing test to use "window.foo = 1;" the compiler will treat it as usage. And that's how that variable is going to be used in actual code anyway. ------------- Created by MOE: <URL>
diff --git a/instaloader/structures.py b/instaloader/structures.py index <HASH>..<HASH> 100644 --- a/instaloader/structures.py +++ b/instaloader/structures.py @@ -134,6 +134,12 @@ class Post: pic_json = self._context.get_json("p/{0}/".format(self.shortcode), params={}) self._full_metadata_dict = pic_json['entry_data']['PostPage'][0]['graphql']['shortcode_media'] self._rhx_gis_str = pic_json.get('rhx_gis') + if self._full_metadata_dict is None: + # issue #449 + self._context.error("Fetching Post metadata failed (issue #449). " + "The following data has been returned:\n" + + json.dumps(pic_json['entry_data'], indent=2)) + raise BadResponseException("Fetching Post metadata failed.") if self.shortcode != self._full_metadata_dict['shortcode']: self._node.update(self._full_metadata_dict) raise PostChangedException
Alleviate #<I> by catching bad metadata response Instead of ungracefully failing with a TypeError, the Post is now skipped with an error message containing the invalid JSON.
diff --git a/deltas/__init__.py b/deltas/__init__.py index <HASH>..<HASH> 100644 --- a/deltas/__init__.py +++ b/deltas/__init__.py @@ -8,7 +8,7 @@ from .tokenizers import (Token, Tokenizer, RegexTokenizer, text_split, from .segmenters import (Segmenter, Segment, MatchableSegment, ParagraphsSentencesAndWhitespace) -__version__ = "0.3.7" +__version__ = "0.3.8" __all__ = [apply, Operation, Insert, Delete, Equal, diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ def requirements(fname): setup( name = "deltas", - version = "0.3.7", + version = "0.3.8", author = "Aaron Halfaker", author_email = "ahalfaker@wikimedia.org", description = "An experimental diff library for generating " + \
Increments version to <I>
diff --git a/tests/Platform/Domains/Addon/Features/UninstallAddonTest.php b/tests/Platform/Domains/Addon/Features/UninstallAddonTest.php index <HASH>..<HASH> 100644 --- a/tests/Platform/Domains/Addon/Features/UninstallAddonTest.php +++ b/tests/Platform/Domains/Addon/Features/UninstallAddonTest.php @@ -18,4 +18,14 @@ class UninstallAddonTest extends TestCase $this->assertDatabaseMissing('sv_addons', ['slug' => 'superv.addons.sample']); } -} \ No newline at end of file + + function test__rollback_migrations() + { + $this->setUpAddon(null, null); + $this->assertEquals(3, \DB::table('migrations')->where('addon', 'superv.addons.sample')->count()); + + UninstallAddonJob::dispatch('superv.addons.sample'); + + $this->assertEquals(0, \DB::table('migrations')->where('addon', 'superv.addons.sample')->count()); + } +}
Add test to check rolling back migrations
diff --git a/quantecon/tests/test_lqcontrol.py b/quantecon/tests/test_lqcontrol.py index <HASH>..<HASH> 100644 --- a/quantecon/tests/test_lqcontrol.py +++ b/quantecon/tests/test_lqcontrol.py @@ -68,8 +68,8 @@ class TestLQControl(unittest.TestCase): x_seq, u_seq, w_seq = lq_mat.compute_sequence(x0) - assert_allclose(np.sum(u_seq), .95 * np.sum(x0), rtol=1e-4) - assert_allclose(x_seq[:, -1], np.zeros_like(x0), rtol=1e-4) + assert_allclose(np.sum(u_seq), .95 * np.sum(x0), atol=1e-3) + assert_allclose(x_seq[:, -1], np.zeros_like(x0), atol=1e-3) def test_stationary_mat(self): @@ -83,8 +83,8 @@ class TestLQControl(unittest.TestCase): val_func_lq = np.dot(x0, P).dot(x0) val_func_answer = x0[0]**2 - assert_allclose(f_answer, F, rtol=1e-4) - assert_allclose(val_func_lq, val_func_answer, rtol=1e-4) + assert_allclose(f_answer, F, atol=1e-3) + assert_allclose(val_func_lq, val_func_answer, atol=1e-3)
TEST: Lower tolerance on the compute stationary matrices.
diff --git a/system_tests/pubsub.py b/system_tests/pubsub.py index <HASH>..<HASH> 100644 --- a/system_tests/pubsub.py +++ b/system_tests/pubsub.py @@ -267,7 +267,8 @@ class TestPubsub(unittest.TestCase): def _no_topic(instance): return instance.topic is None - retry = RetryInstanceState(_no_topic, max_tries=6) + # Wait for the topic to clear: up to 63 seconds (2 ** 8 - 1) + retry = RetryInstanceState(_no_topic, max_tries=7) retry(orphaned.reload)() self.assertTrue(orphaned.topic is None)
Wait even longer for orphaned subscr topic to clear. See #<I>.
diff --git a/server/index.js b/server/index.js index <HASH>..<HASH> 100644 --- a/server/index.js +++ b/server/index.js @@ -152,11 +152,11 @@ function staticFn(req, res) { function execute(socket, command, cwd) { const cmd = command.cmd; - const env = command.env; + const env = Object.assign({}, command.env, process.env); const spawn = spawnify(cmd, { - cwd: cwd(), - env: env + env, + cwd: cwd() }); socket.on('kill', kill);
fix(index) execute: old env variables droped by new ones
diff --git a/lib/Cake/Event/CakeEventManager.php b/lib/Cake/Event/CakeEventManager.php index <HASH>..<HASH> 100644 --- a/lib/Cake/Event/CakeEventManager.php +++ b/lib/Cake/Event/CakeEventManager.php @@ -222,7 +222,7 @@ class CakeEventManager { * Dispatches a new event to all configured listeners * * @param string|CakeEvent $event the event key name or instance of CakeEvent - * @return void + * @return CakeEvent */ public function dispatch($event) { if (is_string($event)) { @@ -231,7 +231,7 @@ class CakeEventManager { $listeners = $this->listeners($event->name()); if (empty($listeners)) { - return; + return $event; } foreach ($listeners as $listener) { @@ -250,6 +250,7 @@ class CakeEventManager { $event->result = $result; } } + return $event; } /**
Make dispatch return CakeEvent - resolves #<I>
diff --git a/lib/fs_utils/generate.js b/lib/fs_utils/generate.js index <HASH>..<HASH> 100644 --- a/lib/fs_utils/generate.js +++ b/lib/fs_utils/generate.js @@ -192,12 +192,15 @@ const generate = (path, sourceFiles, config, optimizers) => { return Promise.reject(error); }) .then(data => { - common.writeFile(path, data.code); - return data; + return common.writeFile(path, data.code).then(() => { + return data; + }); }) .then(data => { if (withMaps) { - common.writeFile(mapPath, data.map.toString()); + return common.writeFile(mapPath, data.map.toString()).then(() => { + return data; + }); } return data; });
We have to return the 'write' promise, else the callbacks are called before the files are actually written
diff --git a/app/controllers/rails_i18nterface/translate_controller.rb b/app/controllers/rails_i18nterface/translate_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/rails_i18nterface/translate_controller.rb +++ b/app/controllers/rails_i18nterface/translate_controller.rb @@ -22,8 +22,8 @@ module RailsI18nterface def export locale = params[:locale].to_sym - #keys = {locale => I18n.backend.send(:translations)[locale]} - keys = {locale => {}} + keys = {locale => I18n.backend.send(:translations)[locale]} + #keys = {locale => {}} Translation.where(:locale => @to_locale).each { |translation| next if translation.value == '' next if !translation.value
export ALL translations, even from old yaml
diff --git a/spectrum.js b/spectrum.js index <HASH>..<HASH> 100644 --- a/spectrum.js +++ b/spectrum.js @@ -249,7 +249,7 @@ if (opts.palette) { palette = opts.palette.slice(0); - paletteArray = $.isArray(palette[0]) ? palette : [palette]; + paletteArray = Array.isArray(palette[0]) ? palette : [palette]; paletteLookup = {}; for (var i = 0; i < paletteArray.length; i++) { for (var j = 0; j < paletteArray[i].length; j++) { @@ -321,14 +321,14 @@ } // Prevent clicks from bubbling up to document. This would cause it to be hidden. - container.click(stopPropagation); + container.on("click", stopPropagation); // Handle user typed input - textInput.change(setFromTextInput); + textInput.on("change", setFromTextInput); textInput.on("paste", function () { setTimeout(setFromTextInput, 1); }); - textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); + textInput.on("keydown", function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); cancelButton.text(opts.cancelText); cancelButton.on("click.spectrum", function (e) {
Replace deprecated jQuery methods Fixes these warnings from jquery-migrate: JQMIGRATE: jQuery.isArray is deprecated; use Array.isArray JQMIGRATE: jQuery.fn.click() event shorthand is deprecated JQMIGRATE: jQuery.fn.change() event shorthand is deprecated JQMIGRATE: jQuery.fn.keydown() event shorthand is deprecated
diff --git a/cmsplugin_cascade/generic/mixins.py b/cmsplugin_cascade/generic/mixins.py index <HASH>..<HASH> 100644 --- a/cmsplugin_cascade/generic/mixins.py +++ b/cmsplugin_cascade/generic/mixins.py @@ -40,14 +40,14 @@ class SectionModelMixin(object): if id_attr: return '{bookmark_prefix}{0}'.format(id_attr, **CMSPLUGIN_CASCADE) - def delete(self): + def delete(self, *args, **kwargs): try: self.placeholder.page.cascadepage.glossary['element_ids'].pop(str(self.pk)) except (AttributeError, KeyError, ObjectDoesNotExist): pass else: self.placeholder.page.cascadepage.save() - super(SectionModelMixin, self).delete() + super(SectionModelMixin, self).delete(*args, **kwargs) class SectionMixin(object):
bypass args and kwargs
diff --git a/src/hamster/lib/__init__.py b/src/hamster/lib/__init__.py index <HASH>..<HASH> 100644 --- a/src/hamster/lib/__init__.py +++ b/src/hamster/lib/__init__.py @@ -264,7 +264,7 @@ def parse_fact(text, phase=None, res=None, date=None): date = dt.datetime.strptime(fragment, DATE_FMT).date() remaining_text = remove_fragment(text, fragment) except ValueError: - date = now.date() + date = datetime_to_hamsterday(now) remaining_text = text return parse_fact(remaining_text, "start_time", res, date)
take the current hamster day as default date
diff --git a/command/state/state.go b/command/state/state.go index <HASH>..<HASH> 100644 --- a/command/state/state.go +++ b/command/state/state.go @@ -16,7 +16,7 @@ import ( ) const ( - LockThreshold = 250 * time.Millisecond + LockThreshold = 400 * time.Millisecond LockMessage = "Acquiring state lock. This may take a few moments..." UnlockMessage = "Releasing state lock. This may take a few moments..."
command/state: up the threshold for showing lock info
diff --git a/network/stats.go b/network/stats.go index <HASH>..<HASH> 100644 --- a/network/stats.go +++ b/network/stats.go @@ -44,11 +44,8 @@ func GetStats(networkState *NetworkState) (NetworkStats, error) { func readSysfsNetworkStats(ethInterface string) (map[string]uint64, error) { out := make(map[string]uint64) - fullPath, err := filepath.Abs(filepath.Join("/sys/class/net", ethInterface, "statistics/")) - if err != nil { - return out, nil - } - err = filepath.Walk(fullPath, func(path string, _ os.FileInfo, _ error) error { + fullPath := filepath.Join("/sys/class/net", ethInterface, "statistics/") + err := filepath.Walk(fullPath, func(path string, _ os.FileInfo, _ error) error { // skip fullPath. if path == fullPath { return nil
Further refactoring. Docker-DCO-<I>-
diff --git a/salt/fileserver/__init__.py b/salt/fileserver/__init__.py index <HASH>..<HASH> 100644 --- a/salt/fileserver/__init__.py +++ b/salt/fileserver/__init__.py @@ -532,3 +532,26 @@ class Fileserver(object): (x, y) for x, y in ret.items() if x.startswith(prefix) ]) return ret + + +class FSChan(object): + ''' + A class that mimics the transport channels allowing for local access to + to the fileserver class class structure + ''' + def __init__(self, opts, **kwargs): + self.opts = opts + self.kwargs = kwargs + self.fs = Fileserver(self.opts) + + def send(self, load, tries=None, timeout=None): + ''' + Emulate the channel send method, the tries and timeout are not used + ''' + if 'cmd' not in load: + log.error('Malformed request: {0}'.format(load)) + return {} + if not hasattr(self.fs, load['cmd']): + log.error('Malformed request: {0}'.format(load)) + return {} + return getattr(self.fs, load['cmd'])(load)
Add initial FSChan object This object will allow us to replace a channel in the file client with a local channel that just uses the file server class
diff --git a/src/GameQ/Filters/Stripcolors.php b/src/GameQ/Filters/Stripcolors.php index <HASH>..<HASH> 100644 --- a/src/GameQ/Filters/Stripcolors.php +++ b/src/GameQ/Filters/Stripcolors.php @@ -33,6 +33,8 @@ class Stripcolors extends Base /** * Apply this filter * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * * @param array $result * @param \GameQ\Server $server * @@ -62,6 +64,9 @@ class Stripcolors extends Base case 'gamespy2': array_walk_recursive($result, [$this, 'stripUnreal']); break; + case 'source': + array_walk_recursive($result, [$this, 'stripSource']); + break; } /*$data['filtered'][ $server->id() ] = $result; @@ -97,4 +102,14 @@ class Stripcolors extends Base { $string = preg_replace('/\x1b.../', '', $string); } + + /** + * Strip color codes from Source based games + * + * @param string $string + */ + protected function stripSource(&$string) + { + $string = strip_tags($string); + } }
Source based games support (#<I>) * Source based games support Remove HTML tags. Example: Before - [RU/EU] <color=#ffe<I>>HURTWORLD ❷</color> After - [RU/EU] HURTWORLD ❷ * Change line endings * PHPMD being annoying.
diff --git a/entry_types/scrolled/package/spec/support/stories.js b/entry_types/scrolled/package/spec/support/stories.js index <HASH>..<HASH> 100644 --- a/entry_types/scrolled/package/spec/support/stories.js +++ b/entry_types/scrolled/package/spec/support/stories.js @@ -268,7 +268,7 @@ export function examplePositionedElement({sectionId, position, caption}) { typeName: 'inlineImage', configuration: { position, - id: filePermaId('imageFiles', 'turtle'), + id: null, caption } }
Use empty inline images in appearance stories Prevent big images from loading to slowly and thus not showing up in snapshots causing false positives on Percy. REDMINE-<I>