diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/state/backups/create.go b/state/backups/create.go index <HASH>..<HASH> 100644 --- a/state/backups/create.go +++ b/state/backups/create.go @@ -316,6 +316,18 @@ func (b *builder) buildAll() error { return nil } +// result returns a "create" result relative to the current state of the +// builder. create() uses this method to get the final backup result +// from the builder it used. +// +// Note that create() calls builder.cleanUp() after it calls +// builder.result(). cleanUp() causes the builder's workspace directory +// to be deleted. This means that while the file in the result is still +// open, it no longer corresponds to any filename on the filesystem. +// We do this to avoid leaving any temporary files around. The +// consequence is that we cannot simply return the temp filename, we +// must leave the file open, and the caller is responsible for closing +// the file (hence io.ReadCloser). func (b *builder) result() (*createResult, error) { // Open the file in read-only mode. file, err := os.Open(b.archive.Filename)
Clarify why create() returns an open file instead of a filename.
diff --git a/leaflet.rotatedMarker.js b/leaflet.rotatedMarker.js index <HASH>..<HASH> 100644 --- a/leaflet.rotatedMarker.js +++ b/leaflet.rotatedMarker.js @@ -27,7 +27,7 @@ if(oldIE) { // for IE 9, use the 2D rotation - this._icon.style[L.DomUtil.TRANSFORM] = ' rotate(' + this.options.rotationAngle + 'deg)'; + this._icon.style[L.DomUtil.TRANSFORM] = 'rotate(' + this.options.rotationAngle + 'deg)'; } else { // for modern browsers, prefer the 3D accelerated version this._icon.style[L.DomUtil.TRANSFORM] += ' rotateZ(' + this.options.rotationAngle + 'deg)';
Remove unnecessary space for 2D rotation styles In case of the old IE browser we are using ``=`` instead of ``+=`` operator so this blank space is unnecessary
diff --git a/tests/test-logger-interface-compliant.php b/tests/test-logger-interface-compliant.php index <HASH>..<HASH> 100644 --- a/tests/test-logger-interface-compliant.php +++ b/tests/test-logger-interface-compliant.php @@ -15,6 +15,7 @@ use IronBound\DB\Query\Simple_Query; use IronBound\DBLogger\Logger; use IronBound\DBLogger\Table; use Psr\Log\LoggerInterface; +use Psr\Log\Test\DummyTest; use Psr\Log\Test\LoggerInterfaceTest; /** @@ -122,7 +123,7 @@ class Test_Logger_Interface_Compliant extends LoggerInterfaceTest { 'string' => 'Foo', 'int' => 0, 'float' => 0.5, - 'nested' => array('with object' => new DummyTest), + 'nested' => array('with object' => new DummyTest()), 'object' => new \DateTime, //'resource' => fopen('php://memory', 'r'), );
Fix fatal error due to class not existing.
diff --git a/lib/Proem/Api/IO/Response/Http/Standard.php b/lib/Proem/Api/IO/Response/Http/Standard.php index <HASH>..<HASH> 100644 --- a/lib/Proem/Api/IO/Response/Http/Standard.php +++ b/lib/Proem/Api/IO/Response/Http/Standard.php @@ -43,7 +43,7 @@ class Standard implements Template * * @var string */ - protected $httpVersion = '1.1'; + protected $httpVersion = '1.0'; /** * Store the HTTP Status code @@ -289,8 +289,6 @@ class Standard implements Template foreach ($this->headers->all() as $index => $value) { header(sprintf('%s: %s', $index, $value)); } - - flush(); } /**
Fix protocol version and remove explicit flush.
diff --git a/lib/devtools/index.js b/lib/devtools/index.js index <HASH>..<HASH> 100644 --- a/lib/devtools/index.js +++ b/lib/devtools/index.js @@ -667,20 +667,22 @@ var scratchpadCommandSpec = { description: { key: 'scratchpad_desc' }, params: [ { + name: 'script', + type: 'string', + description: { key: 'scratchpad_script_desc' }, + defaultValue: null + }, + { group: 'Options', params: [ + /* { name: 'file', type: 'file', description: { key: 'scratchpad_file_desc' }, defaultValue: null }, - { - name: 'script', - type: 'string', - description: { key: 'scratchpad_script_desc' }, - defaultValue: null - }, + */ { name: 'chrome', type: 'boolean',
Bug <I> (scratchpad, part): Avoid bug with only grouped params (see also bug <I>)
diff --git a/lib/dmllib.php b/lib/dmllib.php index <HASH>..<HASH> 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -1207,6 +1207,10 @@ function sql_paging_limit($page, $recordsperpage) { /** * Returns the proper SQL to do LIKE in a case-insensitive way * + * Note the LIKE are case sensitive for Oracle. Oracle 10g is required to use + * the caseinsensitive search using regexp_like() or NLS_COMP=LINGUISTIC :-( + * See http://docs.moodle.org/en/XMLDB_Problems#Case-insensitive_searches + * * @uses $CFG * @return string */ @@ -1214,10 +1218,10 @@ function sql_ilike() { global $CFG; switch ($CFG->dbtype) { - case 'mysql': - return 'LIKE'; - default: + case 'postgres7': return 'ILIKE'; + default: + return 'LIKE'; } }
sql_ilike() -- added notes on Oracle support or lack thereof
diff --git a/ca/django_ca/extensions.py b/ca/django_ca/extensions.py index <HASH>..<HASH> 100644 --- a/ca/django_ca/extensions.py +++ b/ca/django_ca/extensions.py @@ -2108,6 +2108,14 @@ class SubjectKeyIdentifier(KeyIdExtension): def extension_type(self): return x509.SubjectKeyIdentifier(digest=self.value) + def from_other(self, value): + if isinstance(value, x509.SubjectKeyIdentifier): + self.critical = self.default_critical + self.value = value.digest + self._test_value() + else: + super(AuthorityKeyIdentifier, self).from_other(value) + def from_extension(self, ext): self.value = ext.value.digest
add abilty to create extensions from x<I>.SKI
diff --git a/packages/ui/vue/app-client.js b/packages/ui/vue/app-client.js index <HASH>..<HASH> 100644 --- a/packages/ui/vue/app-client.js +++ b/packages/ui/vue/app-client.js @@ -44,11 +44,8 @@ router.onReady(() => { // async components are resolved. router.beforeResolve(async (to, from, next) => { if (to.matched.some(record => !store.state.$user.scp.includes(record.meta.scope) && !store.state.$user.scp.includes('write_root'))) { - console.log("scope didnt match") next(false) } else { - console.log("scope did match") - const matched = router.getMatchedComponents(to) // Register dyanmic store modules on route change (not direct load!)
fix(ui): removed debug logs
diff --git a/src/Support/ArrayHelpers.php b/src/Support/ArrayHelpers.php index <HASH>..<HASH> 100644 --- a/src/Support/ArrayHelpers.php +++ b/src/Support/ArrayHelpers.php @@ -5,8 +5,7 @@ declare(strict_types=1); namespace Roave\ApiCompare\Support; use Assert\Assert; -use function array_flip; -use function array_key_exists; +use function in_array; final class ArrayHelpers { @@ -22,6 +21,6 @@ final class ArrayHelpers { Assert::that($arrayOfStrings)->all()->string(); - return array_key_exists($value, array_flip($arrayOfStrings)); + return in_array($value, $arrayOfStrings); } }
Using non-strict `in_array()` checks to avoid copying data around without any need for that
diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/delete/delete.go b/staging/src/k8s.io/kubectl/pkg/cmd/delete/delete.go index <HASH>..<HASH> 100644 --- a/staging/src/k8s.io/kubectl/pkg/cmd/delete/delete.go +++ b/staging/src/k8s.io/kubectl/pkg/cmd/delete/delete.go @@ -84,7 +84,7 @@ var ( kubectl delete -k dir # Delete resources from all files that end with '.json' - i.e. expand wildcard characters in file names - kubectl apply -f '*.json' + kubectl delete -f '*.json' # Delete a pod based on the type and name in the JSON passed into stdin cat pod.json | kubectl delete -f -
Typo in kubectl delete --help <I>
diff --git a/pages/app/presenters/refinery/pages/section_presenter.rb b/pages/app/presenters/refinery/pages/section_presenter.rb index <HASH>..<HASH> 100644 --- a/pages/app/presenters/refinery/pages/section_presenter.rb +++ b/pages/app/presenters/refinery/pages/section_presenter.rb @@ -91,13 +91,16 @@ module Refinery @attributes = attributes end - #see https://github.com/flavorjones/loofah/blob/master/lib/loofah/html5/scrub.rb#L21 - def scrub_attributes(node) - node.attribute_nodes.each do |attr_node| - next if attr_node.node_name =~ /\Adata-[\w-]+\z/ + def allowed_node?(node) + tags.include?(node.name) + end - super - end + def skip_node?(node) + node.text? + end + + def scrub_attribute?(name) + attributes.exclude?(name) && name !~ /\Adata-[\w-]+\z/ end end
Refactor CustomScrubber to fix support of data-attr (#<I>)
diff --git a/colormath/__init__.py b/colormath/__init__.py index <HASH>..<HASH> 100644 --- a/colormath/__init__.py +++ b/colormath/__init__.py @@ -1 +1 @@ -VERSION = '1.0.3' \ No newline at end of file +VERSION = '1.0.4' \ No newline at end of file
Version bump to <I> for next eventual release.
diff --git a/packages/upload-core/src/upload.js b/packages/upload-core/src/upload.js index <HASH>..<HASH> 100644 --- a/packages/upload-core/src/upload.js +++ b/packages/upload-core/src/upload.js @@ -1,5 +1,6 @@ import tus from 'tus-js-client'; import resolveUrl from '@availity/resolve-url'; +import * as Tiff from 'tiff'; // https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript/8831937#8831937 const hashCode = str => {
feat(POCL-<I>): added missing import.
diff --git a/src/bundleWriter.js b/src/bundleWriter.js index <HASH>..<HASH> 100644 --- a/src/bundleWriter.js +++ b/src/bundleWriter.js @@ -13,6 +13,8 @@ function bundleWriter() { if (bundle.content && dest) { pending.push(writeBundle(logger, bundle, streamFactory(dest))); } + + return bundle; }); return Promise.all(pending).then(function() { return context;}); diff --git a/src/context.js b/src/context.js index <HASH>..<HASH> 100644 --- a/src/context.js +++ b/src/context.js @@ -84,7 +84,7 @@ Context.prototype.setShard = function(name, shard, dest) { if (shard) { shards[name] = new Bundle(name, shard); - shards[name].dest = dest || name; + shards[name].dest = shard.dest || dest || name; } else { delete shards[name];
fixed issue with shard dest not getting properly setup
diff --git a/plugins/no-caching/index.js b/plugins/no-caching/index.js index <HASH>..<HASH> 100644 --- a/plugins/no-caching/index.js +++ b/plugins/no-caching/index.js @@ -12,6 +12,7 @@ function getBodyParts(config) { // Tweak client cache-related headers so ensure no // caching, then let the request be dispatched normally delete req.headers['if-modified-since']; + delete req.headers['if-none-match']; req.headers['cache-control'] = 'no-cache'; next(req, res);
Delete the if-none-match header in the no-caching plugin
diff --git a/spec/punchblock/component/prompt_spec.rb b/spec/punchblock/component/prompt_spec.rb index <HASH>..<HASH> 100644 --- a/spec/punchblock/component/prompt_spec.rb +++ b/spec/punchblock/component/prompt_spec.rb @@ -69,7 +69,6 @@ module Punchblock let(:command) { Input.new :grammar => '[5 DIGITS]' } before do - pending command.component_id = 'abc123' command.target_call_id = '123abc' command.client = mock_client @@ -78,7 +77,7 @@ module Punchblock describe '#stop_action' do subject { command.stop_action } - its(:to_xml) { should be == '<stop xmlns="urn:xmpp:rayo:1"/>' } + its(:to_xml) { should be == '<stop xmlns="urn:xmpp:rayo:ext:1"/>' } its(:component_id) { should be == 'abc123' } its(:target_call_id) { should be == '123abc' } end
[CS] Some Prompt model specs were pending for no reason
diff --git a/game.js b/game.js index <HASH>..<HASH> 100644 --- a/game.js +++ b/game.js @@ -982,7 +982,7 @@ var __slice = Array.prototype.slice; var root; root = typeof exports !== "undefined" && exports !== null ? exports : this; return root.Core = function(I) { - var self; + var Module, moduleName, self, _i, _len, _ref; if (I == null) I = {}; Object.reverseMerge(I, { includedModules: [] @@ -1155,6 +1155,12 @@ var __slice = Array.prototype.slice; return self[name].apply(self, args); } }; + _ref = I.includedModules; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + moduleName = _ref[_i]; + Module = moduleName.constantize(); + self.extend(Module(I, self)); + } return self; }; })();
loading initial modules, should withstand serialization and deserialization
diff --git a/examples/movies/model/all.php b/examples/movies/model/all.php index <HASH>..<HASH> 100644 --- a/examples/movies/model/all.php +++ b/examples/movies/model/all.php @@ -99,7 +99,7 @@ foreach ($movie->getTranslations()->filterLanguage('en') as $translation) { echo "Trailers<br/>"; -foreach ($movie->getTrailers() as $trailer) { +foreach ($movie->getVideos() as $trailer) { printf(" - %s<br/>", $trailer->getUrl()); }
Method getTrailers() doesn't exist
diff --git a/lib/puppet/network/format_handler.rb b/lib/puppet/network/format_handler.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/network/format_handler.rb +++ b/lib/puppet/network/format_handler.rb @@ -121,20 +121,28 @@ module Puppet::Network::FormatHandler result = put_preferred_format_first(result) - Puppet.debug "#{indirection.name} supports formats: #{result.sort.join(' ')}; using #{result.first}" + Puppet.debug "#{friendly_name} supports formats: #{result.map{ |f| f.to_s }.sort.join(' ')}; using #{result.first}" result end private + def friendly_name + if self.respond_to? :indirection + indirection.name + else + self + end + end + def put_preferred_format_first(list) preferred_format = Puppet.settings[:preferred_serialization_format].to_sym if list.include?(preferred_format) list.delete(preferred_format) list.unshift(preferred_format) else - Puppet.warning "Value of 'preferred_serialization_format' (#{preferred_format}) is invalid for #{indirection.name}, using default (#{list.first})" + Puppet.warning "Value of 'preferred_serialization_format' (#{preferred_format}) is invalid for #{friendly_name}, using default (#{list.first})" end list end
Fixing <I>: Failing specs in format_handler Clean up warning messages so that they don't fail when run inside the test class.
diff --git a/cmd/kube-proxy/app/conntrack.go b/cmd/kube-proxy/app/conntrack.go index <HASH>..<HASH> 100644 --- a/cmd/kube-proxy/app/conntrack.go +++ b/cmd/kube-proxy/app/conntrack.go @@ -34,7 +34,7 @@ type Conntracker interface { type realConntracker struct{} -var readOnlySysFSError = errors.New("ReadOnlySysFS") +var readOnlySysFSError = errors.New("readOnlySysFS") func (realConntracker) SetMax(max int) error { glog.Infof("Setting nf_conntrack_max to %d", max)
In error, the first letter should be lowcase
diff --git a/test/test_autopep8.py b/test/test_autopep8.py index <HASH>..<HASH> 100644 --- a/test/test_autopep8.py +++ b/test/test_autopep8.py @@ -1437,6 +1437,7 @@ a.has_key( self._inner_setup(line) self.assertEqual(self.result, fixed) + @unittest.skipIf(sys.version_info[0] < 3, 'needs to be fixed on Python 2') def test_w601_with_non_ascii(self): line = """ # -*- coding: utf-8 -*-
Skip test_w<I>_with_non_ascii() for now It is failing on Python 2.
diff --git a/lib/utils.rb b/lib/utils.rb index <HASH>..<HASH> 100644 --- a/lib/utils.rb +++ b/lib/utils.rb @@ -12,18 +12,30 @@ module Geos end def create_point(cs) + if cs.length != 1 + raise RuntimeError.new("IllegalArgumentException: Point coordinate list must contain a single element") + end + cast_geometry_ptr(FFIGeos.GEOSGeom_createPoint_r(Geos.current_handle, cs.ptr)).tap { cs.ptr.autorelease = false } end def create_line_string(cs) + if cs.length <= 1 && cs.length != 0 + raise RuntimeError.new("IllegalArgumentException: point array must contain 0 or >1 elements") + end + cast_geometry_ptr(FFIGeos.GEOSGeom_createLineString_r(Geos.current_handle, cs.ptr)).tap { cs.ptr.autorelease = false } end def create_linear_ring(cs) + if cs.length <= 1 && cs.length != 0 + raise RuntimeError.new("IllegalArgumentException: point array must contain 0 or >1 elements") + end + cast_geometry_ptr(FFIGeos.GEOSGeom_createLinearRing_r(Geos.current_handle, cs.ptr)).tap { cs.ptr.autorelease = false }
Check dimension bounds on create methods.
diff --git a/jquery.floatThead.js b/jquery.floatThead.js index <HASH>..<HASH> 100644 --- a/jquery.floatThead.js +++ b/jquery.floatThead.js @@ -641,6 +641,9 @@ $table.unbind('reflow'); reflowEvent = windowResizeEvent = containerScrollEvent = windowScrollEvent = function() {}; $scrollContainer.unbind('scroll.floatTHead'); + if (wrappedContainer) { + $scrollContainer.unwrap(); + } $floatContainer.remove(); $table.data('floatThead-attached', false); floatTheadCreated--;
Fixed DOM leakage in destroy.
diff --git a/lib/project.api.js b/lib/project.api.js index <HASH>..<HASH> 100644 --- a/lib/project.api.js +++ b/lib/project.api.js @@ -60,6 +60,8 @@ class Project { let localJsonPath = path.join(directory, 'aquifer.local.json'); + + // Default directory to Aquifer.projectDir. this.directory = directory = directory || Aquifer.projectDir; @@ -91,10 +93,6 @@ class Project { // If this project has no defined core version, default to 7. this.config.core = this.config.core || this.drupalVersion; - - // Backward compatibility for make and build paths - this.config.build.makeFile = this.config.build.makeFile; - this.config.build.directory = this.config.build.directory; this.setDrupalVersion(this.config.core); // Define absolute paths to assets.
Remove backward compatibility vars.
diff --git a/src/Environment.php b/src/Environment.php index <HASH>..<HASH> 100644 --- a/src/Environment.php +++ b/src/Environment.php @@ -82,14 +82,19 @@ class Environment // Temp, cache directories define('TMP_DIR', TESTER_DIR . '/tmp'); - define('TEMP_DIR', TMP_DIR . '/tests/' . getmypid()); + define('TEMP_DIR', TMP_DIR . '/tests/' . lcg_value()); define('CACHE_DIR', TMP_DIR . '/cache'); ini_set('session.save_path', TEMP_DIR); // Create folders - self::mkdir(dirname(TEMP_DIR)); + self::mkdir(TEMP_DIR); self::mkdir(CACHE_DIR); self::purge(TEMP_DIR); + + register_shutdown_function(function () { + self::purge(TMP_DIR); + @rmdir(TMP_DIR); + }); } /**
Environment: use lcg_value instead of PID, cleanup TEMP folders
diff --git a/FtpLibrary.py b/FtpLibrary.py index <HASH>..<HASH> 100644 --- a/FtpLibrary.py +++ b/FtpLibrary.py @@ -152,6 +152,7 @@ To run library remotely execute: python FtpLibrary.py <ipaddress> <portnumber> else: newFtp = None outputMsg = "" + connected = False try: timeout = int(timeout) port = int(port) @@ -161,10 +162,13 @@ To run library remotely execute: python FtpLibrary.py <ipaddress> <portnumber> else: newFtp = ftplib.FTP() outputMsg += newFtp.connect(host, port, timeout) + connected = True outputMsg += newFtp.login(user, password) except socket.error as se: raise FtpLibraryError('Socket error exception occured.') except ftplib.all_errors as e: + if connected == True: + newFtp.quit() raise FtpLibraryError(str(e)) except Exception as e: raise FtpLibraryError(str(e))
- fixed closing the connection if login fails (otherwise connection is left open)
diff --git a/lib/extract.js b/lib/extract.js index <HASH>..<HASH> 100644 --- a/lib/extract.js +++ b/lib/extract.js @@ -26,12 +26,20 @@ function extract(html, model, options = {}) { const parserOptions = Object.assign({}, HTMLPARSER2_OPTIONS, options.htmlparser2) const handlerOptions = Object.assign({}, DOMHANDLER_OPTIONS, options.domhandler) + let deserializedModel + + try { + deserializedModel = JSON.parse(JSON.stringify(model)) + } catch (error) { + throw new ModelError(`The model cannot be serialized; ${error.message}`) + } + const handler = new DomHandler(handlerOptions) const parser = new Parser(handler, parserOptions) parser.end(html) - return getItem(handler.dom, model) + return getItem(handler.dom, deserializedModel) } /**
Ensure the model is JSON-serializable
diff --git a/pyqg/model.py b/pyqg/model.py index <HASH>..<HASH> 100644 --- a/pyqg/model.py +++ b/pyqg/model.py @@ -363,7 +363,7 @@ class Model(PseudoSpectralKernel): #print 't=%16d, tc=%10d: cfl=%5.6f, ke=%9.9f' % ( # self.t, self.tc, cfl, ke) self.logger.info(' Step: %i, Time: %e, KE: %e, CFL: %f' - %(self.tc,self.t,self.ke,self.cfl)) + , self.tc,self.t,self.ke,self.cfl ) assert self.cfl<1., self.logger.error('CFL condition violated')
Small change to avoid incurring in cost of string interpolation (as per landscape tip)
diff --git a/app/models/neighborly/balanced/order_proxy.rb b/app/models/neighborly/balanced/order_proxy.rb index <HASH>..<HASH> 100644 --- a/app/models/neighborly/balanced/order_proxy.rb +++ b/app/models/neighborly/balanced/order_proxy.rb @@ -38,14 +38,14 @@ module Neighborly::Balanced project_url = Rails.application.routes.url_helpers.project_url(project) subject.meta = { - project: project.name, - goal: project.goal, - campaign_type: project.campaign_type.humanize, - user: project.user.name, - category: project.category.name_en, - url: project_url, - expires_at: I18n.l(project.expires_at.utc), - id: project.id, + 'Project' => project.name, + 'Goal' => project.goal, + 'Campaign Type' => project.campaign_type.humanize, + 'User' => project.user.name, + 'Category' => project.category.name_en, + 'URL' => project_url, + 'Expires At' => I18n.l(project.expires_at), + 'ID' => project.id, } subject.save
Humanize keys of meta information sent to Balanced
diff --git a/lib/models/candle/audit_gaps.js b/lib/models/candle/audit_gaps.js index <HASH>..<HASH> 100644 --- a/lib/models/candle/audit_gaps.js +++ b/lib/models/candle/audit_gaps.js @@ -7,7 +7,7 @@ module.exports = ({ getInRange }) => (doc, { start, end }) => { const candles = getInRange(doc, { start, end }) if (candles.length < 2) { - return gaps + return { gaps, candles } } const width = TIME_FRAME_WIDTHS[tf] @@ -22,5 +22,5 @@ module.exports = ({ getInRange }) => (doc, { start, end }) => { } } - return gaps + return { gaps, candles } }
(refactor) return gap indexes & candles from auditGaps
diff --git a/test/unit/UnitTestCase.php b/test/unit/UnitTestCase.php index <HASH>..<HASH> 100644 --- a/test/unit/UnitTestCase.php +++ b/test/unit/UnitTestCase.php @@ -14,22 +14,5 @@ namespace PMG\Queue; abstract class UnitTestCase extends \PHPUnit\Framework\TestCase { - protected function skipIfPhp7() - { - if (self::isPhp7()) { - $this->markTestSkipped(sprintf('PHP < 7.X is required, have %s', PHP_VERSION)); - } - } - - protected function skipIfPhp5() - { - if (!self::isPhp7()) { - $this->markTestSkipped(sprintf('PHP 7.X is required, have %s', PHP_VERSION)); - } - } - - protected static function isPhp7() - { - return PHP_VERSION_ID >= 70000; - } + // noop }
Remove the skipIf* Functions No longer used!
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -4,9 +4,9 @@ monkeyhex.py is a small library to assist users of the python shell who work in Monkeyhex, as the name suggests, monkeypatches the system displayhook as well as the pprint and pdb modules to format integers as hex. To use it, just import the library and all future results will be formatted. To view a result in decimal again, put the expression in a print statement. ''' -from distutils.core import setup +from setuptools import setup setup(name='monkeyhex', - version='1.7', + version='1.7.1', py_modules=['monkeyhex'], description='Monkeypatch the python interpreter and debugger to print integer results in hex', long_description=long_description,
switch to setuptools; tick again for good measure
diff --git a/androguard/core/bytecodes/apk.py b/androguard/core/bytecodes/apk.py index <HASH>..<HASH> 100644 --- a/androguard/core/bytecodes/apk.py +++ b/androguard/core/bytecodes/apk.py @@ -1974,7 +1974,7 @@ class ARSCParser(object): def put_ate_value(self, result, ate, config): if ate.is_complex(): complex_array = [] - result.append(config, complex_array) + result.append((config, complex_array)) for _, item in ate.item.items: self.put_item_value(complex_array, item, config, complex_=True) else:
[apk] ARSCParser.ResourceResolver: fix handling of complex resources.
diff --git a/shared/api/storage_pool_volume.go b/shared/api/storage_pool_volume.go index <HASH>..<HASH> 100644 --- a/shared/api/storage_pool_volume.go +++ b/shared/api/storage_pool_volume.go @@ -185,6 +185,12 @@ type StorageVolumeSource struct { // API extension: storage_api_volume_snapshots VolumeOnly bool `json:"volume_only" yaml:"volume_only"` + // Whether existing destination volume should be refreshed + // Example: false + // + // API extension: custom_volume_refresh + Refresh bool `json:"refresh" yaml:"refresh"` + // Source project name // Example: foo //
shared/api: Add Refresh to StorageVolumeSource
diff --git a/src/MediaEmbed/Data/stubs.php b/src/MediaEmbed/Data/stubs.php index <HASH>..<HASH> 100644 --- a/src/MediaEmbed/Data/stubs.php +++ b/src/MediaEmbed/Data/stubs.php @@ -47,7 +47,10 @@ $stubs = array( array( 'name' => 'Dailymotion', 'website' => 'http://www.dailymotion.com', - 'url-match' => 'http://(?:www\.)?dailymotion\.(?:com|alice\.it)/(?:(?:[^"]*?)?video|swf)/([a-z0-9]{1,18})', + 'url-match' => array( + 'http://dai\.ly/([a-z0-9]{1,})', + 'http://(?:www\.)?dailymotion\.(?:com|alice\.it)/(?:(?:[^"]*?)?video|swf)/([a-z0-9]{1,18})', + ), 'embed-src' => 'http://www.dailymotion.com/swf/$2&related=0', 'embed-width' => '420', 'embed-height' => '339',
Added support for Dailymotion short urls
diff --git a/green/output.py b/green/output.py index <HASH>..<HASH> 100644 --- a/green/output.py +++ b/green/output.py @@ -46,12 +46,6 @@ class Colors: else: self.termcolor = termcolor - # Windows needs an extra library to translate ANSI colors into Windows - # terminal colors. - if self.termcolor and (platform.system() == 'Windows'): # pragma: no cover - import colorama - colorama.init() - self._restoreColor()
Since we're using colorama's wrapped stream directly, we don't need the global init.
diff --git a/internal/report/source_test.go b/internal/report/source_test.go index <HASH>..<HASH> 100644 --- a/internal/report/source_test.go +++ b/internal/report/source_test.go @@ -47,7 +47,7 @@ func TestWebList(t *testing.T) { } output := buf.String() - for _, expect := range []string{"func busyLoop", "callq.*mapassign"} { + for _, expect := range []string{"func busyLoop", "call.*mapassign"} { if match, _ := regexp.MatchString(expect, output); !match { t.Errorf("weblist output does not contain '%s':\n%s", expect, output) }
Update mapassign regex to match both call variants (#<I>) Different versions of `objdump` output `call` or `callq`. Both work fine for the purposes of the test. Fixes #<I>
diff --git a/js/currencycom.js b/js/currencycom.js index <HASH>..<HASH> 100644 --- a/js/currencycom.js +++ b/js/currencycom.js @@ -177,13 +177,6 @@ module.exports = class currencycom extends Exchange { return this.options['timeDifference']; } - parsePrecision (precision) { - if (precision === undefined) { - return undefined; - } - return '1e' + Precise.stringNeg (precision); - } - async fetchMarkets (params = {}) { const response = await this.publicGetExchangeInfo (params); //
currencycom parsePrecision is in the base class
diff --git a/tests/support/mixins.py b/tests/support/mixins.py index <HASH>..<HASH> 100644 --- a/tests/support/mixins.py +++ b/tests/support/mixins.py @@ -651,12 +651,8 @@ def _fetch_events(q): queue_item.task_done() atexit.register(_clean_queue) - a_config = AdaptedConfigurationTestCaseMixin() - event = salt.utils.event.get_event( - 'minion', - sock_dir=a_config.get_config('minion')['sock_dir'], - opts=a_config.get_config('minion'), - ) + opts = RUNTIME_VARS.RUNTIME_CONFIGS['minion'] + event = salt.utils.event.get_event('minion', sock_dir=opts['sock_dir'], opts=opts) while True: try: events = event.get_event(full=False)
Revert part of <I>c since it is not a fix
diff --git a/lib/dugway/theme.rb b/lib/dugway/theme.rb index <HASH>..<HASH> 100644 --- a/lib/dugway/theme.rb +++ b/lib/dugway/theme.rb @@ -114,7 +114,7 @@ module Dugway file_path = File.join(source_dir, file_name) if File.exist?(file_path) - File.read(file_path) + File.read(file_path).encode('utf-8') else nil end
Ensure all source files are UTF-8
diff --git a/h2o-py/tests/_utils.py b/h2o-py/tests/_utils.py index <HASH>..<HASH> 100644 --- a/h2o-py/tests/_utils.py +++ b/h2o-py/tests/_utils.py @@ -1,7 +1,7 @@ import fnmatch -import imp import importlib import os +import re import sys @@ -64,12 +64,15 @@ def load_module(name, dir_path, no_conflict=True): spec.loader.exec_module(module) return module except AttributeError: # Py2 + import imp spec = imp.find_module(name, [dir_path]) return imp.load_module(name, *spec) def load_utilities(test_file=None): - ff = file_filter(include="**/_*.py", exclude="**/__init__.py") + utils_pat = re.compile(r".*/_\w+\.py$") + ff = file_filter(include=(lambda p: utils_pat.match(p)), + exclude="*/__init__.py") recursive = False folders = [] if test_file is None:
replace lenient glob-like pattern with more specific regexp to load test utility modules
diff --git a/modules/__tests__/Router-test.js b/modules/__tests__/Router-test.js index <HASH>..<HASH> 100644 --- a/modules/__tests__/Router-test.js +++ b/modules/__tests__/Router-test.js @@ -190,6 +190,33 @@ describe('Router', function () { }); }); + it('handles forward slashes', function(done) { + // https://github.com/rackt/react-router/issues/1865 + class Parent extends React.Component { + render() { + return <div>{this.props.children} </div> + } + } + + class Child extends React.Component { + render() { + const {params} = this.props + return <h1>{params.name}</h1> + } + } + + React.render(( + <Router history={createHistory('/apple%2Fbanana')}> + <Route component={Parent}> + <Route path='/:name' component={Child} /> + </Route> + </Router> + ), node, function () { + expect(node.textContent.trim()).toEqual('apple/banana'); + done(); + }); + }); + }); });
added forward slash test in param name closes #<I>
diff --git a/angr/simos/simos.py b/angr/simos/simos.py index <HASH>..<HASH> 100644 --- a/angr/simos/simos.py +++ b/angr/simos/simos.py @@ -41,7 +41,7 @@ class SimOS(object): self.project.hook(self.return_deadend, P['stubs']['CallReturn']()) self.unresolvable_target = self.project.loader.extern_object.allocate() - self.project.hook(self.unresolvable_target, P['stubs']['UnresolvableTarget']) + self.project.hook(self.unresolvable_target, P['stubs']['UnresolvableTarget']()) def irelative_resolver(resolver_addr): # autohooking runs before this does, might have provided this already
Don't hook with a class fish jeez!
diff --git a/command/alloc_exec.go b/command/alloc_exec.go index <HASH>..<HASH> 100644 --- a/command/alloc_exec.go +++ b/command/alloc_exec.go @@ -265,6 +265,11 @@ func (l *AllocExecCommand) execImpl(client *api.Client, alloc *api.Allocation, t stdin = escapingio.NewReader(stdin, escapeChar[0], func(c byte) bool { switch c { case '.': + // need to restore tty state so error reporting here + // gets emitted at beginning of line + outCleanup() + inCleanup() + stderr.Write([]byte("\nConnection closed\n")) cancelFn() return true @@ -272,7 +277,6 @@ func (l *AllocExecCommand) execImpl(client *api.Client, alloc *api.Allocation, t return false } }) - } }
Restore tty start before emitting errors Otherwise, the error message appears indented unexpectedly.
diff --git a/core/src/main/java/com/linecorp/armeria/client/HttpResponseDecoder.java b/core/src/main/java/com/linecorp/armeria/client/HttpResponseDecoder.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/linecorp/armeria/client/HttpResponseDecoder.java +++ b/core/src/main/java/com/linecorp/armeria/client/HttpResponseDecoder.java @@ -286,8 +286,18 @@ abstract class HttpResponseDecoder { if (cancelTimeout()) { actionOnTimeoutCancelled.accept(cause); } else { - if (cause != null && !Exceptions.isExpected(cause)) { - logger.warn("Unexpected exception:", cause); + if (cause != null && logger.isWarnEnabled() && !Exceptions.isExpected(cause)) { + final StringBuilder logMsg = new StringBuilder("Unexpected exception while closing"); + if (request != null) { + final String authority = request.authority(); + if (authority != null) { + logMsg.append(" a request to ").append(authority); + } + } + if (cause instanceof ResponseTimeoutException) { + logMsg.append(" after ").append(responseTimeoutMillis).append("ms"); + } + logger.warn(logMsg.toString(), cause); } }
Explain Response timeout (#<I>) Motivation: We're observing a cryptic warn : Unexpected exception: and the cause has no trace: com.linecorp.armeria.client.ResponseTimeoutException: null Modifications: - Add which host failed - Add timeout value .. to the warning log message. Result: Less cryptic error message.
diff --git a/cmd2.py b/cmd2.py index <HASH>..<HASH> 100755 --- a/cmd2.py +++ b/cmd2.py @@ -1887,6 +1887,13 @@ class Cmd(cmd.Cmd): # Get all tokens through the one being completed tokens = tokens_for_completion(line, begidx, endidx, preserve_quotes=True) + # Either had a parsing error or are trying to complete the command token + # The latter can happen if default_to_shell is True and parseline() allowed + # assumed something like " or ' was a command. + if tokens is None or len(tokens) == 1: + self.completion_matches = [] + return None + # Get the status of quotes in the token being completed completion_token = tokens[-1]
Added an extra parsing check
diff --git a/lib/ruboty.rb b/lib/ruboty.rb index <HASH>..<HASH> 100644 --- a/lib/ruboty.rb +++ b/lib/ruboty.rb @@ -25,7 +25,7 @@ module Ruboty memoize :handlers def actions - handlers.map(&:actions).flatten.sort_by(&:all?) + handlers.map(&:actions).flatten.sort_by { |action| action.all? ? 1 : 0 } end end end
Booleans can't be compared >> [true,false].sort ArgumentError: comparison of TrueClass with false failed >> [false,false].sort => [false,false]
diff --git a/js/cobinhood.js b/js/cobinhood.js index <HASH>..<HASH> 100644 --- a/js/cobinhood.js +++ b/js/cobinhood.js @@ -622,7 +622,7 @@ module.exports = class cobinhood extends Exchange { }; } - async withdraw (code, amount, address, params = {}) { + async withdraw (code, amount, address, tag = undefined, params = {}) { await this.loadMarkets (); let currency = this.currency (code); let response = await this.privatePostWalletWithdrawals (this.extend ({
cobinhood withdraw() signature unified fix #<I>
diff --git a/account/dashboards.widgets.js b/account/dashboards.widgets.js index <HASH>..<HASH> 100644 --- a/account/dashboards.widgets.js +++ b/account/dashboards.widgets.js @@ -98,11 +98,17 @@ class Widgets { * @param {JSON} data * @return {Promise} */ - sendData(dashboard_id, widget_id, data) { + sendData(dashboard_id, widget_id, data, bypassBucket) { const url = `${config.api_url}/data/${dashboard_id}/${widget_id}`; const method = 'POST'; - const options = Object.assign({}, this.default_options, {url, method, data}); + const options = Object.assign({}, this.default_options, { + url, + method, + data, + paramsSerializer, + params: { bypass_bucket: bypassBucket || false } + }); return request(options); }
feat: added bypassbucket method
diff --git a/lib/baton/channel.rb b/lib/baton/channel.rb index <HASH>..<HASH> 100644 --- a/lib/baton/channel.rb +++ b/lib/baton/channel.rb @@ -31,6 +31,7 @@ module Baton # Attach callbacks for error handling @connection.on_tcp_connection_loss(&method(:handle_tcp_failure)) + @connection.on_skipped_heartbeats(&method(:handle_tcp_failure)) @channel.on_error(&method(:handle_channel_exception)) end
Reconnect if we get a skipped heartbeat
diff --git a/lib/emitter.js b/lib/emitter.js index <HASH>..<HASH> 100644 --- a/lib/emitter.js +++ b/lib/emitter.js @@ -70,7 +70,7 @@ Emitter.parseURI = function(options) break; case 'ws:': - options.websocket = true; + options.ws = true; options.host = parsed.hostname; options.port = parsed.port; break; @@ -101,7 +101,7 @@ Emitter.prototype.connect = function connect() if (this.options.udp) this.client = new UDPStream(this.options); - else if (this.options.websocket) + else if (this.options.ws) this.client = new WSStream(this.options); else this.client = net.connect(this.options);
renamed websocket to ws
diff --git a/libraries/lithium/data/source/http/adapter/CouchDb.php b/libraries/lithium/data/source/http/adapter/CouchDb.php index <HASH>..<HASH> 100644 --- a/libraries/lithium/data/source/http/adapter/CouchDb.php +++ b/libraries/lithium/data/source/http/adapter/CouchDb.php @@ -44,6 +44,9 @@ class CouchDb extends \lithium\data\source\Http { /** * Deconstruct * + * Ensures that the server connection is closed and resources are freed when the adapter + * instance is destroyed. + * * @return void */ public function __destruct() { @@ -125,12 +128,14 @@ class CouchDb extends \lithium\data\source\Http { } /** - * name + * Quotes identifiers. + * + * CouchDb does not need identifiers quoted, so this method simply returns the identifier. * - * @param string $name - * @return string + * @param string $name The identifier to quote. + * @return string The quoted identifier. */ - public function name($name) { + public function name($name) { return $name; }
Fixing whitespace and adding to dockblocks
diff --git a/fpbox/funcs.py b/fpbox/funcs.py index <HASH>..<HASH> 100644 --- a/fpbox/funcs.py +++ b/fpbox/funcs.py @@ -137,4 +137,4 @@ def c(f, g): def compose(fs): """Function composition over a list of functions""" - return reduce(c, reversed(fs)) + return reduce(c, fs)
(De-)reversed composed
diff --git a/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java b/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java index <HASH>..<HASH> 100644 --- a/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java +++ b/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java @@ -47,7 +47,8 @@ public abstract class PagedList<E> implements List<E> { * @param page the {@link Page} object. */ public PagedList(Page<E> page) { - items = page.getItems(); + this(); + items.addAll(page.getItems()); nextPageLink = page.getNextPageLink(); currentPage = page; }
Fixing UnsupportedOperation exception in PagedList
diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb index <HASH>..<HASH> 100644 --- a/activesupport/lib/active_support/deprecation/reporting.rb +++ b/activesupport/lib/active_support/deprecation/reporting.rb @@ -83,7 +83,7 @@ module ActiveSupport rails_gem_root = File.expand_path("../../../../..", __FILE__) + "/" offending_line = callstack.find { |frame| - !frame.absolute_path.start_with?(rails_gem_root) + frame.absolute_path && !frame.absolute_path.start_with?(rails_gem_root) } || callstack.first [offending_line.path, offending_line.lineno, offending_line.label] end
Fix deprecation message when frame doesn't have absolute_path When a frame is an eval block without filename argument there is no absolute_path so the previous implementation would fail because `nil` doesn't responds to `start_with?`.
diff --git a/asana/client.py b/asana/client.py index <HASH>..<HASH> 100644 --- a/asana/client.py +++ b/asana/client.py @@ -270,6 +270,18 @@ class Client(object): } @classmethod + def basic_auth(Klass, apiKey): + """DEPRECATED: this is only present for backwards-compatibility. + + This will be removed in the future; for new apps, prefer the + `access_token` method. + + Construct an Asana Client using a Personal Access Token as if it + were an old (removed) Asana API Key. + """ + return Klass(auth=requests.auth.HTTPBasicAuth(apiKey, '')) + + @classmethod def access_token(Klass, accessToken): """Construct an Asana Client with a Personal Access Token""" return Klass(
Added back in the basic_auth function
diff --git a/cookies.py b/cookies.py index <HASH>..<HASH> 100644 --- a/cookies.py +++ b/cookies.py @@ -2,7 +2,7 @@ "cookies.py" -import os, copy +import os, copy, urllib import itertools import string, re @@ -66,7 +66,7 @@ class cookie( dict ): def getRequestHeader( self ): "returns the cookie as can be used in an HTTP Request" - return '='.join( ( self['name'], self['value'] ) ) + return '='.join( ( self['name'], urllib.quote( self['value'] ) ) ) def isSecure( self ): return eval( string.capwords( self.get( 'secure', 'False' ) ) ) \ No newline at end of file
Apparently, cookies are supposed to be quoted strings. In the past, this wasn't an issue, but when I started generating strings with spaces and other characters in them, they need to be quoted. Does this mean I should unquote the cookies when they come in?
diff --git a/inputs/text-area/text-area.js b/inputs/text-area/text-area.js index <HASH>..<HASH> 100644 --- a/inputs/text-area/text-area.js +++ b/inputs/text-area/text-area.js @@ -87,6 +87,10 @@ export class TextArea extends React.Component { }; render() { + const isElementBiggerThanMinRowCount = + this.state.textareaRowCount > TextArea.MIN_ROW_COUNT; + const isContentBiggerThanMinRowCount = + this.state.contentRowCount > TextArea.MIN_ROW_COUNT; return ( <Constraints.Horizontal constraint={this.props.horizontalConstraint}> <Collapsible isDefaultClosed={this.props.isDefaultClosed}> @@ -123,9 +127,8 @@ export class TextArea extends React.Component { {...filterDataAttributes(this.props)} /> {((!this.props.isDefaultClosed && - (this.state.textareaRowCount > TextArea.MIN_ROW_COUNT || - !isOpen)) || - this.state.contentRowCount > TextArea.MIN_ROW_COUNT) && ( + (isElementBiggerThanMinRowCount || !isOpen)) || + isContentBiggerThanMinRowCount) && ( <FlatButton onClick={toggle} type="primary"
fix(text-area): extract assertions to variables
diff --git a/engine/models/Living.js b/engine/models/Living.js index <HASH>..<HASH> 100644 --- a/engine/models/Living.js +++ b/engine/models/Living.js @@ -86,7 +86,7 @@ Living = new Class({ lines.push(this.genderize('%You %are carrying ', obsv)+ this.listItems().conjoin()+'.'); } - if (lines.length==0) return "%You have nothing."; + if (lines.length==0) lines.push("%You have nothing."); return lines; }, diff --git a/engine/models/World.js b/engine/models/World.js index <HASH>..<HASH> 100644 --- a/engine/models/World.js +++ b/engine/models/World.js @@ -116,7 +116,7 @@ World = new Class({ if (!this.items[path]) { var file = this.itemPath+path; this.loadFile(file, function(e,item) { - item.path = path; + item.implement({'path':path}); that.items[path] = item; }, {'sync':true}); } @@ -131,6 +131,7 @@ World = new Class({ var that = this; if (!this.npcs[path]) { this.loadFile(file, function(e,item) { + item.implement({'path':path}); that.npcs[path] = item; }, {'sync':true}); }
Fixed the item path bug for hopefully the last time.
diff --git a/pyontutils/ttlser.py b/pyontutils/ttlser.py index <HASH>..<HASH> 100644 --- a/pyontutils/ttlser.py +++ b/pyontutils/ttlser.py @@ -83,6 +83,7 @@ class CustomTurtleSerializer(TurtleSerializer): SKOS.related, DC.description, RDFS.subClassOf, + RDFS.subPropertyOf, OWL.intersectionOf, OWL.unionOf, OWL.disjointWith, @@ -373,5 +374,5 @@ class CustomTurtleSerializer(TurtleSerializer): self.endDocument() stream.write(u"\n".encode('ascii')) - stream.write((u"### Serialized using the nifstd custom serializer v1.0.6\n").encode('ascii')) + stream.write((u"### Serialized using the nifstd custom serializer v1.0.7\n").encode('ascii'))
ttlser added RDFS.subPropertyOf to predicateOrder -> version bump to <I>
diff --git a/discord/state.py b/discord/state.py index <HASH>..<HASH> 100644 --- a/discord/state.py +++ b/discord/state.py @@ -208,7 +208,6 @@ class ConnectionState: if len(self._private_channels) > 128: _, to_remove = self._private_channels.popitem(last=False) - print(to_remove) if isinstance(to_remove, DMChannel): self._private_channels_by_user.pop(to_remove.recipient.id, None)
Accidentally left a print statement.
diff --git a/src/monitorActions.js b/src/monitorActions.js index <HASH>..<HASH> 100644 --- a/src/monitorActions.js +++ b/src/monitorActions.js @@ -5,6 +5,7 @@ import { setValue } from './utils'; export const isMonitorAction = (store) => store.__isRemotedevAction === true; export const dispatchMonitorAction = (store, devTools) => { + let intermValue; const initValue = mobx.toJS(store); devTools.init(initValue); @@ -15,6 +16,14 @@ export const dispatchMonitorAction = (store, devTools) => { setValue(store, initValue); devTools.init(initValue); return; + case 'COMMIT': + intermValue = mobx.toJS(store); + devTools.init(intermValue); + return; + case 'ROLLBACK': + setValue(store, intermValue); + devTools.init(intermValue); + return; case 'JUMP_TO_STATE': setValue(store, parse(message.state)); return;
Implement COMMIT and ROLLBACK actions
diff --git a/runtime/dev.js b/runtime/dev.js index <HASH>..<HASH> 100644 --- a/runtime/dev.js +++ b/runtime/dev.js @@ -74,6 +74,13 @@ if (delegate) { try { var info = delegate.generator[method](arg); + + // Delegate generator ran and handled its own exceptions so + // regardless of what the method was, we continue as if it is + // "next" with an undefined arg. + method = "next"; + arg = void 0; + } catch (uncaught) { context.delegate = null; @@ -81,6 +88,7 @@ // overhead of an extra function call. method = "throw"; arg = uncaught; + continue; }
Handle .throw method in delegate generator. Fix #<I>.
diff --git a/lib/console-reporter.js b/lib/console-reporter.js index <HASH>..<HASH> 100644 --- a/lib/console-reporter.js +++ b/lib/console-reporter.js @@ -222,13 +222,13 @@ ConsoleReporter.prototype.printReport = function printReport(report, opts) { let result = []; for(const metricName of sortedAlphabetically) { - if (report.counters?.[metricName]) { + if (typeof report.counters?.[metricName] !== 'undefined') { result = result.concat(printCounters([metricName], report)); } - if (report.summaries?.[metricName]) { + if (typeof report.summaries?.[metricName] !== 'undefined') { result = result.concat(printSummaries([metricName], report)); } - if (report.rates?.[metricName]) { + if (typeof report.rates?.[metricName] !== 'undefined') { result = result.concat(printRates([metricName], report)); } }
fix(console-reporter): handle metrics with value of zero
diff --git a/lib/NormalModuleFactory.js b/lib/NormalModuleFactory.js index <HASH>..<HASH> 100644 --- a/lib/NormalModuleFactory.js +++ b/lib/NormalModuleFactory.js @@ -54,6 +54,9 @@ NormalModuleFactory.prototype.create = function(context, dependency, callback) { if(err) return callback(err); var loaders = results[0]; resource = results[1]; + + if(resource === false) return callback(); // ignored + var userRequest = loaders.concat([resource]).join("!"); if(noPrePostAutoLoaders)
allow to ignore a file by browser field fixes #<I>
diff --git a/lib/reactive-ruby/isomorphic_helpers.rb b/lib/reactive-ruby/isomorphic_helpers.rb index <HASH>..<HASH> 100644 --- a/lib/reactive-ruby/isomorphic_helpers.rb +++ b/lib/reactive-ruby/isomorphic_helpers.rb @@ -6,19 +6,12 @@ module React if RUBY_ENGINE != 'opal' def self.load_context(ctx, controller, name = nil) - puts "************************** React Server Context Initialized #{name} *********************************************" @context = Context.new("#{controller.object_id}-#{Time.now.to_i}", ctx, controller, name) end else def self.load_context(unique_id = nil, name = nil) # can be called on the client to force re-initialization for testing purposes if !unique_id || !@context || @context.unique_id != unique_id - if on_opal_server? - message = "************************ React Prerendering Context Initialized #{name} ***********************" - else - message = "************************ React Browser Context Initialized ****************************" - end - log(message) @context = Context.new(unique_id) end @context
kill puts logging. closes #<I>
diff --git a/src/de/mrapp/android/preference/PreferenceActivity.java b/src/de/mrapp/android/preference/PreferenceActivity.java index <HASH>..<HASH> 100644 --- a/src/de/mrapp/android/preference/PreferenceActivity.java +++ b/src/de/mrapp/android/preference/PreferenceActivity.java @@ -375,10 +375,15 @@ public abstract class PreferenceActivity extends Activity implements * devices with a large screen. * * @return The color of the shadow, which is drawn besides the navigation, - * an {@link Integer} value + * as an {@link Integer} value or -1, if the device has a small + * screen */ public final int getShadowColor() { - return shadowColor; + if (isSplitScreen()) { + return shadowColor; + } else { + return -1; + } } /**
The method getShadowColor() does now return -1 on devices with a small screen.
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,7 +47,7 @@ master_doc = 'index' # General information about the project. project = u'Agile UI' -copyright = u'2016-2017, Agile Toolkit' +copyright = u'2016-2019, Agile Toolkit' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the
Update copyright to <I>
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -35,7 +35,6 @@ var postprocess = R.memoize(function(symbols) { var toDecimalRaw = R.curryN(4, function(b, symbols, base, n) { return R.pipe( toString, - splitWithoutSep, R.reverse, R.map(indexOfSymbol(symbols)), R.addIndex(R.map)(posNotation.mapper(b, base)),
refactor: remove superfluous step
diff --git a/gulp/tasks/watch.js b/gulp/tasks/watch.js index <HASH>..<HASH> 100644 --- a/gulp/tasks/watch.js +++ b/gulp/tasks/watch.js @@ -63,4 +63,4 @@ gulp.task("watch-noserve", cb => { watchTask(cb); }); -gulp.task("watch", [html, javascript, less, staticContent, watchTask]); \ No newline at end of file +gulp.task("watch", ["html", "javascript", "less", "staticContent", watchTask]); \ No newline at end of file
Tasks needs to be named - not referenced :)
diff --git a/nameko/__init__.py b/nameko/__init__.py index <HASH>..<HASH> 100644 --- a/nameko/__init__.py +++ b/nameko/__init__.py @@ -1,5 +0,0 @@ -from __future__ import absolute_import -import logging - -root_logger = logging.getLogger() -root_logger.setLevel(logging.INFO)
removing logger setupgit st
diff --git a/source/rafcon/gui/utils/comparison.py b/source/rafcon/gui/utils/comparison.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/utils/comparison.py +++ b/source/rafcon/gui/utils/comparison.py @@ -11,9 +11,9 @@ def compare_variables(tree_model, iter1, iter2, user_data=None): path1 = tree_model.get_path(iter1)[0] path2 = tree_model.get_path(iter2)[0] # get key of first variable - name1 = tree_model[path1][0][0] + name1 = tree_model[path1][0] # get key of second variable - name2 = tree_model[path2][0][0] + name2 = tree_model[path2][0] name1_as_bits = ' '.join(format(ord(x), 'b') for x in name1) name2_as_bits = ' '.join(format(ord(x), 'b') for x in name2) if name1_as_bits == name2_as_bits:
fix cata port comparison in data port list store
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -33,8 +33,8 @@ setup( long_description=read('README.rst'), packages=find_packages(exclude='tests'), install_requires=[ - 'mock==1.0.1', - 'six==1.9.0', + 'mock~=1.0.1', + 'six>=1.9.0', 'requests', ], license='MIT',
fix: Use ranges for dependencies
diff --git a/zipline/gens/tradesimulation.py b/zipline/gens/tradesimulation.py index <HASH>..<HASH> 100644 --- a/zipline/gens/tradesimulation.py +++ b/zipline/gens/tradesimulation.py @@ -223,7 +223,7 @@ class AlgorithmSimulator(object): elif event.type == DATASOURCE_TYPE.SPLIT: self.algo.blotter.process_split(event) - if not self.algo.instant_fill: + if not instant_fill: self.process_event(event) else: events_to_be_processed.append(event)
MAINT: Use local variable with same value
diff --git a/basic_cms/tests/test_api.py b/basic_cms/tests/test_api.py index <HASH>..<HASH> 100644 --- a/basic_cms/tests/test_api.py +++ b/basic_cms/tests/test_api.py @@ -31,8 +31,8 @@ class CMSPagesApiTests(TestCase): self.assertEqual(response.status_code, 404) response = self.client.get(reverse('basic_cms_api', args=['terms']), data) self.assertEqual(response.status_code, 200) - # self.assertJSONEqual(self.original_json_data, response.content) - self.assertEqual(self.original_json_data, response.data) + self.assertJSONEqual(self.original_json_data, response.content) + self.assertEqual(self.original_json_data, response.content) response = self.client.get(reverse('basic_cms_api', args=['terms'])) self.assertEqual(response.status_code, 200)
python <I> support #3
diff --git a/classes/Boom/Controller/Asset.php b/classes/Boom/Controller/Asset.php index <HASH>..<HASH> 100644 --- a/classes/Boom/Controller/Asset.php +++ b/classes/Boom/Controller/Asset.php @@ -48,7 +48,7 @@ abstract class Boom_Controller_Asset extends Boom_Controller public function action_embed() { - $this->response->body(HTML::image('asset/view/'.$this->asset->id.'/400')); + $this->response->body(HTML::anchor('asset/view/'.$this->asset->id, "Download {$this->asset->title}")); } /** diff --git a/classes/Boom/Controller/Asset/Image.php b/classes/Boom/Controller/Asset/Image.php index <HASH>..<HASH> 100644 --- a/classes/Boom/Controller/Asset/Image.php +++ b/classes/Boom/Controller/Asset/Image.php @@ -108,6 +108,11 @@ class Boom_Controller_Asset_Image extends Controller_Asset ->body(file_get_contents($filename)); } + public function action_embed() + { + $this->response->body(HTML::image('asset/view/'.$this->asset->id.'/400')); + } + /** * Show a thumbnail of the asset. * For images a thumbnail is just showing an image with different dimensions.
Fix for embedding non-image assets in text
diff --git a/lib/icims/job.rb b/lib/icims/job.rb index <HASH>..<HASH> 100644 --- a/lib/icims/job.rb +++ b/lib/icims/job.rb @@ -23,13 +23,13 @@ module ICIMS fetch_records(ids, fields) end - def approved portal_ids=[] + def approved portal_ids: [], fields: [] portal_ids = ICIMS.portal_ids unless portal_ids.any? portal_ids.map do |id| search([ { name: "job.folder", value: ['D31001'], operator: "=" }, { name: "job.postedto", value: [id], operator: "=" } - ]) + ], fields: fields) end.flatten end
Added fields to ICIMS::Job.approved
diff --git a/fusesoc/main.py b/fusesoc/main.py index <HASH>..<HASH> 100644 --- a/fusesoc/main.py +++ b/fusesoc/main.py @@ -156,7 +156,7 @@ def add_library(cm, args): name = args.name library['sync-uri'] = vars(args)['sync-uri'] if args.location: - library['location'] = args.location + library['location'] = os.path.abspath(args.location) if args.no_auto_sync: library['auto-sync'] = False
Use absolute path for location in library add
diff --git a/packages/conventional-github-releaser/index.js b/packages/conventional-github-releaser/index.js index <HASH>..<HASH> 100644 --- a/packages/conventional-github-releaser/index.js +++ b/packages/conventional-github-releaser/index.js @@ -40,7 +40,7 @@ function conventionalGithubReleaser(auth, changelogOpts, context, gitRawCommitsO writerOpts = changelogArgs[4]; changelogOpts = merge({ - transform: through.obj(function(chunk, enc, cb) { + transform: function(chunk, cb) { if (typeof chunk.gitTags === 'string') { var match = /tag:\s*(.+?)[,\)]/gi.exec(chunk.gitTags); if (match) { @@ -53,7 +53,7 @@ function conventionalGithubReleaser(auth, changelogOpts, context, gitRawCommitsO } cb(null, chunk); - }), + }, releaseCount: 1 }, changelogOpts);
fix(transform): use new syntax of conventional-changelog@<I>
diff --git a/rlp/sedes/binary.py b/rlp/sedes/binary.py index <HASH>..<HASH> 100644 --- a/rlp/sedes/binary.py +++ b/rlp/sedes/binary.py @@ -16,9 +16,9 @@ class Binary(object): self.allow_empty = allow_empty @classmethod - def fixed_length(cls, l): + def fixed_length(cls, l, allow_empty=False): """Create a sedes for binary data with exactly `l` bytes.""" - return cls(l, l) + return cls(l, l, allow_empty=allow_empty) def is_valid_length(self, l): return any((self.min_length <= l <= self.max_length, diff --git a/rlp/sedes/lists.py b/rlp/sedes/lists.py index <HASH>..<HASH> 100644 --- a/rlp/sedes/lists.py +++ b/rlp/sedes/lists.py @@ -80,7 +80,7 @@ class Serializable(object): :param \*args: initial values for the first attributes defined via :attr:`fields` :param \*\*kwargs: initial values for all attributes not initialized via - positional arguments + positional arguments """ fields = tuple()
Added allow_empty option for fixed_length binary
diff --git a/concrete/src/Page/Collection/Version/Version.php b/concrete/src/Page/Collection/Version/Version.php index <HASH>..<HASH> 100644 --- a/concrete/src/Page/Collection/Version/Version.php +++ b/concrete/src/Page/Collection/Version/Version.php @@ -447,14 +447,11 @@ class Version extends Object implements PermissionObjectInterface, AttributeObje $db->executeQuery($q2, $v2); // next, we rescan our collection paths for the particular collection, but only if this isn't a generated collection - // I don't know why but this just isn't reliable. It might be a race condition with the cached page objects? - /* - * if ((($oldHandle != $newHandle) || $oldHandle == '') && (!$c->isGeneratedCollection())) { - */ + if ((($oldHandle != $newHandle) || $oldHandle == '') && (!$c->isGeneratedCollection())) { - $c->rescanCollectionPath(); + $c->rescanCollectionPath(); - // } + } // check for related version edits. This only gets applied when we edit global areas. $r = $db->executeQuery('select cRelationID, cvRelationID from CollectionVersionRelatedEdits where cID = ? and cvID = ?', array(
Rescan collection paths only if the collection handle is updated
diff --git a/doc/generator/parseFile.js b/doc/generator/parseFile.js index <HASH>..<HASH> 100644 --- a/doc/generator/parseFile.js +++ b/doc/generator/parseFile.js @@ -399,10 +399,10 @@ oo.initClass(_Parser); var _parseTagTypes = dox.parseTagTypes; dox.parseTagTypes = function(str, tag) { if (/\{\w+(\/\w+)+([.#]\w+)*\}/.exec(str)) { - str = str.replace('/', '_SEP_'); + str = str.replace(/\//g, '_SEP_'); var types = _parseTagTypes(str, tag); for (var i = 0; i < types.length; i++) { - types[i] = types[i].replace('_SEP_', '/'); + types[i] = types[i].replace(/_SEP_/g, '/'); } } else { return _parseTagTypes(str, tag);
Fix in jsdoc type parser workaround.
diff --git a/cilium-net-daemon/daemon/endpoint_test.go b/cilium-net-daemon/daemon/endpoint_test.go index <HASH>..<HASH> 100644 --- a/cilium-net-daemon/daemon/endpoint_test.go +++ b/cilium-net-daemon/daemon/endpoint_test.go @@ -26,3 +26,11 @@ func (s *DaemonSuite) TestIsValidID(c *C) { c.Assert(isValidID("0x12"), Equals, false) c.Assert(isValidID("./../../../etc"), Equals, false) } + +func (s *DaemonSuite) TestGoArray2C(c *C) { + c.Assert(goArray2C([]byte{0, 0x01, 0x02, 0x03}), Equals, "{ 0x0, 0x1, 0x2, 0x3 }") + c.Assert(goArray2C([]byte{0, 0xFF, 0xFF, 0xFF}), Equals, "{ 0x0, 0xff, 0xff, 0xff }") + c.Assert(goArray2C([]byte{0xa, 0xbc, 0xde, 0xf1}), Equals, "{ 0xa, 0xbc, 0xde, 0xf1 }") + c.Assert(goArray2C([]byte{0}), Equals, "{ 0x0 }") + c.Assert(goArray2C([]byte{}), Equals, "{ }") +}
Added Test to goArray2C
diff --git a/src/tabs/tabs.js b/src/tabs/tabs.js index <HASH>..<HASH> 100644 --- a/src/tabs/tabs.js +++ b/src/tabs/tabs.js @@ -1,4 +1,5 @@ import { customAttribute, bindable, bindingMode, inject } from 'aurelia-framework'; +import { fireMaterializeEvent } from '../common/events' @customAttribute('md-tabs') @inject(Element) @@ -8,8 +9,19 @@ export class MdTabs { } attached() { $(this.element).tabs(); + // $('li a', this.element).on('click', this.fireTabSelectedEvent); + this.element.querySelectorAll('li a').forEach(a => { + a.addEventListener('click', this.fireTabSelectedEvent); + }); } detached() { // no destroy handler in tabs + this.element.querySelectorAll('li a').forEach(a => { + a.removeEventListener('click', this.fireTabSelectedEvent); + }); + } + fireTabSelectedEvent() { + let href = $('li a').attr('href'); + fireMaterializeEvent(this.element, 'tabSelected', href); } }
feat(tabs): tried to implement tabSelected event
diff --git a/src/main/java/org/redisson/connection/ClusterPartition.java b/src/main/java/org/redisson/connection/ClusterPartition.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/redisson/connection/ClusterPartition.java +++ b/src/main/java/org/redisson/connection/ClusterPartition.java @@ -1,3 +1,18 @@ +/** + * Copyright 2014 Nikita Koksharov, Nickolay Borbit + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.redisson.connection; import java.util.ArrayList;
header for mvn compilation added
diff --git a/contract_variable_quantity/tests/test_contract_variable_quantity.py b/contract_variable_quantity/tests/test_contract_variable_quantity.py index <HASH>..<HASH> 100644 --- a/contract_variable_quantity/tests/test_contract_variable_quantity.py +++ b/contract_variable_quantity/tests/test_contract_variable_quantity.py @@ -54,7 +54,7 @@ class TestContractVariableQuantity(common.SavepointCase): self.formula.code = "user.id" def test_check_variable_quantity(self): - self.contract._create_invoice(self.contract) + self.contract._create_invoice() invoice = self.env['account.invoice'].search( [('contract_id', '=', self.contract.id)]) self.assertEqual(invoice.invoice_line_ids[0].quantity, 12)
[IMP] contract: Add past receipt type. Fix yearly. Add month last day
diff --git a/micrometer-core/src/main/java/io/micrometer/core/aop/TimedAspect.java b/micrometer-core/src/main/java/io/micrometer/core/aop/TimedAspect.java index <HASH>..<HASH> 100644 --- a/micrometer-core/src/main/java/io/micrometer/core/aop/TimedAspect.java +++ b/micrometer-core/src/main/java/io/micrometer/core/aop/TimedAspect.java @@ -21,6 +21,7 @@ import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.Tag; import io.micrometer.core.instrument.Tags; import io.micrometer.core.instrument.Timer; +import io.micrometer.core.instrument.Metrics; import io.micrometer.core.lang.NonNullApi; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; @@ -54,6 +55,10 @@ public class TimedAspect { private final MeterRegistry registry; private final Function<ProceedingJoinPoint, Iterable<Tag>> tagsBasedOnJoinPoint; + public TimedAspect() { + this(Metrics.globalRegistry); + } + public TimedAspect(MeterRegistry registry) { this(registry, pjp -> Tags.of("class", pjp.getStaticPart().getSignature().getDeclaringTypeName(),
Add an empty constructor to TimedAspect (#<I>) Having an empty constructor available on TimedAspect would make it easier to use load time weaving via aspectj. This uses the static global registry (Metrics.globalRegistry) to achieve this.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -44,8 +44,7 @@ Spinner.prototype.start = function() { var hasPos = self.text.indexOf('%s') > -1; this.id = setInterval(function() { var msg = hasPos ? self.text.replace('%s', self.chars[current]) : self.chars[current] + ' ' + self.text; - process.stdout.clearLine(); - process.stdout.cursorTo(0); + clearLine(); process.stdout.write(msg); current = ++current % self.chars.length; }, this.delay); @@ -59,8 +58,11 @@ Spinner.prototype.setSpinnerString = function(str) { this.chars = mapToSpinner(str, this.spinners).split(''); }; -Spinner.prototype.stop = function() { +Spinner.prototype.stop = function(clear) { clearInterval(this.id); + if (clear) { + clearLine(); + } }; // Helpers @@ -83,4 +85,9 @@ function mapToSpinner(value, spinners) { return Spinner.spinners[value]; } +function clearLine() { + process.stdout.clearLine(); + process.stdout.cursorTo(0); +} + exports.Spinner = Spinner; \ No newline at end of file
Added back option to clean the line on `stop()`
diff --git a/rake-tasks/ruby.rb b/rake-tasks/ruby.rb index <HASH>..<HASH> 100644 --- a/rake-tasks/ruby.rb +++ b/rake-tasks/ruby.rb @@ -71,8 +71,11 @@ begin s.add_dependency "json_pure" s.add_dependency "ffi" - s.add_development_dependency "rspec" - s.add_development_dependency "rack" + + if s.respond_to? :add_development_dependency + s.add_development_dependency "rspec" + s.add_development_dependency "rack" + end s.require_paths = []
JariBakken: Make sure the rakefile works with older rubygems versions. r<I>
diff --git a/spyderlib/widgets/externalshell/monitor.py b/spyderlib/widgets/externalshell/monitor.py index <HASH>..<HASH> 100644 --- a/spyderlib/widgets/externalshell/monitor.py +++ b/spyderlib/widgets/externalshell/monitor.py @@ -7,9 +7,10 @@ # remote views for all consoles...! import os -import threading import socket import struct +import thread +import threading # Local imports from spyderlib.utils.misc import fix_reference_name @@ -160,6 +161,7 @@ class Monitor(threading.Thread): "getenv": self.getenv, "setenv": self.setenv, "isdefined": self.isdefined, + "thread": thread, "toggle_inputhook_flag": self.toggle_inputhook_flag, "set_monitor_timeout": self.set_timeout, "set_monitor_auto_refresh": self.set_auto_refresh,
All Consoles: Fix keyboard interruption (which was broken since revision <I>fd<I>a) Update Issue <I> Status: Started
diff --git a/lib/http_content_type/checker.rb b/lib/http_content_type/checker.rb index <HASH>..<HASH> 100644 --- a/lib/http_content_type/checker.rb +++ b/lib/http_content_type/checker.rb @@ -14,6 +14,10 @@ module HttpContentType @options = DEFAULT_OPTIONS.merge(opts) end + def error? + !_head[:error].nil? + end + def found? _head[:found] end diff --git a/spec/lib/http_content_type/checker_spec.rb b/spec/lib/http_content_type/checker_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/http_content_type/checker_spec.rb +++ b/spec/lib/http_content_type/checker_spec.rb @@ -28,6 +28,23 @@ describe HttpContentType::Checker do end end + describe '#error?' do + context 'asset do not return an error' do + before { checker.stub(:_head).and_return({ found: false, error: nil }) } + + it 'return false' do + checker.should_not be_error + end + end + + context 'asset returns an error' do + before { checker.stub(:_head).and_return({ found: false, error: true }) } + + it 'return true' do + checker.should be_error + end + end + end describe '#found?' do context 'asset is not found' do
New `#error?` method to check if the request on the asset failed for any reason
diff --git a/www/src/py_complex.js b/www/src/py_complex.js index <HASH>..<HASH> 100644 --- a/www/src/py_complex.js +++ b/www/src/py_complex.js @@ -149,7 +149,6 @@ $ComplexDict.__ior__=$ComplexDict.__or__ // operations var $op_func = function(self,other){ - console.log('complex -',self,other) if(isinstance(other,complex)) return complex(self.real-other.real,self.imag-other.imag) if (isinstance(other,_b_.int)) return complex($B.sub(self.real,other.valueOf()),self.imag) if(isinstance(other,_b_.float)) return complex(self.real - other.value, self.imag)
Remove trace in py_complex.js
diff --git a/pkg/stores/sqlstore/accounts.go b/pkg/stores/sqlstore/accounts.go index <HASH>..<HASH> 100644 --- a/pkg/stores/sqlstore/accounts.go +++ b/pkg/stores/sqlstore/accounts.go @@ -114,7 +114,10 @@ func GetAccountByToken(query *m.GetAccountByTokenQuery) error { var err error var account m.Account - has, err := x.Where("token=?", query.Token).Get(&account) + sess := x.Join("INNER", "token", "token.account_id = account.id") + sess.Omit("token.id", "token.account_id", "token.name", "token.token", + "token.role", "token.updated", "token.created") + has, err := sess.Where("token.token=?", query.Token).Get(&account) if err != nil { return err
fix getAccountByToken query.
diff --git a/lib/fog/core/collection.rb b/lib/fog/core/collection.rb index <HASH>..<HASH> 100644 --- a/lib/fog/core/collection.rb +++ b/lib/fog/core/collection.rb @@ -94,7 +94,9 @@ module Fog end def new(attributes = {}) - raise ArgumentError, "Initialization parameters must be an attributes hash, got #{attributes.inspect}" unless attributes.respond_to? :merge + unless attributes.is_a?(Hash) + raise(ArgumentError.new("Initialization parameters must be an attributes hash, got #{attributes.inspect}")) + end model.new( attributes.merge( :collection => self,
[core] making collection.new error more idiomatic
diff --git a/lib/zyps.rb b/lib/zyps.rb index <HASH>..<HASH> 100644 --- a/lib/zyps.rb +++ b/lib/zyps.rb @@ -21,7 +21,7 @@ require 'observer' # Ruby 1.9 compatibility - bind Enumerable::Enumerator to stdlib Enumerator module Enumerable - Enumerator = Enumerator + Enumerator = Enumerator unless defined? Enumerable::Enumerator end module Zyps
Fix warning about changing constant under <I>
diff --git a/lib/twitter/client/local_trends.rb b/lib/twitter/client/local_trends.rb index <HASH>..<HASH> 100644 --- a/lib/twitter/client/local_trends.rb +++ b/lib/twitter/client/local_trends.rb @@ -24,7 +24,7 @@ module Twitter # @formats :json, :xml # @authenticated false # @rate_limited true - # @param woeid [Integer] The {http://developer.yahoo.com/geo/geoplanet Yahoo! Where On Earth ID} of the location to return trending information for. Global information is available by using 1 as the WOEID. + # @param woeid [Integer] The {http://developer.yahoo.com/geo/geoplanet Yahoo! Where On Earth ID} of the location to return trending information for. WOEIDs can be retrieved by calling {Twitter::Client::LocalTrends#trend_locations}. Global information is available by using 1 as the WOEID. # @param options [Hash] A customizable set of options. # @return [Array] # @see http://dev.twitter.com/doc/get/trends/:woeid
Clarify how to get WOEIDs
diff --git a/src/TestCase.php b/src/TestCase.php index <HASH>..<HASH> 100644 --- a/src/TestCase.php +++ b/src/TestCase.php @@ -14,6 +14,8 @@ abstract class TestCase extends LumenTestCase Concerns\InteractsWithAuthentication, Concerns\MocksApplicationServices; + static protected $appPath; + /** * Setup the test environment. * @@ -22,7 +24,6 @@ abstract class TestCase extends LumenTestCase public function setUp() { parent::setUp(); - $this->refreshApplication(); $this->appendTraits(); } @@ -43,7 +44,7 @@ abstract class TestCase extends LumenTestCase */ public function createApplication() { - return require base_path('bootstrap/app.php'); + return require $this->getAppPath(); } /** @@ -60,5 +61,17 @@ abstract class TestCase extends LumenTestCase } } + /** + * Get the path of lumen application. + * + * @return string + */ + protected function getAppPath() + { + if (is_null(static::$appPath)) { + return static::$appPath = base_path('bootstrap/app.php'); + } + return static::$appPath; + } }
fix extra flush method in lumen <I>
diff --git a/test/unit/Repo/Entity/Quantity/Def/Sale_Test.php b/test/unit/Repo/Entity/Quantity/Def/Sale_Test.php index <HASH>..<HASH> 100644 --- a/test/unit/Repo/Entity/Quantity/Def/Sale_Test.php +++ b/test/unit/Repo/Entity/Quantity/Def/Sale_Test.php @@ -6,7 +6,7 @@ namespace Praxigento\Warehouse\Repo\Entity\Quantity\Def; include_once(__DIR__ . '/../../../../phpunit_bootstrap.php'); -class Item_UnitTest extends \Praxigento\Core\Test\BaseCase\Repo\Entity +class Sale_UnitTest extends \Praxigento\Core\Test\BaseCase\Repo\Entity { /** @var \Mockery\MockInterface */ private $mManObj; @@ -44,9 +44,6 @@ class Item_UnitTest extends \Praxigento\Core\Test\BaseCase\Repo\Entity /** === Test Data === */ $ID = 32; /** === Mock object itself === */ - $this->mResource - ->shouldReceive('getConnection')->once() - ->andReturn($this->mConn); $this->obj = \Mockery::mock(Sale::class . '[get]', $this->objArgs); /** === Setup Mocks === */ // $rows = $this->get($where);
MOBI-<I> - Refresh bonus base structure
diff --git a/src/Pingpong/Modules/Publishing/AssetPublisher.php b/src/Pingpong/Modules/Publishing/AssetPublisher.php index <HASH>..<HASH> 100644 --- a/src/Pingpong/Modules/Publishing/AssetPublisher.php +++ b/src/Pingpong/Modules/Publishing/AssetPublisher.php @@ -19,7 +19,9 @@ class AssetPublisher extends Publisher { */ public function getSourcePath() { - return $this->getModule()->getExtraPath('Assets'); + return $this->getModule()->getExtraPath( + $this->repository->config('paths.generator.assets') + ); } } \ No newline at end of file
Fix #<I>: Publishing Assets From A Custom Directory
diff --git a/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/RollupRunnable.java b/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/RollupRunnable.java index <HASH>..<HASH> 100644 --- a/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/RollupRunnable.java +++ b/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/RollupRunnable.java @@ -112,12 +112,12 @@ public class RollupRunnable implements Runnable { AstyanaxReader.getUnitString(singleRollupReadContext.getLocator()), singleRollupReadContext.getRollupGranularity().name(), singleRollupReadContext.getRange().getStart())); - } catch (Throwable th) { + } catch (Exception e) { log.error("Rollup failed; Locator: {}, Source Granularity: {}, For period: {}", new Object[] { singleRollupReadContext.getLocator(), singleRollupReadContext.getRange().toString(), srcGran.name(), - th}); + e}); } finally { executionContext.decrementReadCounter(); timerContext.stop();
Catch on Exception instead of Throwable `Throwable` has 2 subclasses: `Exception` and `Error`. According to the java docs, quote: An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. <URL>