diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/Framework/helpers.php b/src/Framework/helpers.php index <HASH>..<HASH> 100644 --- a/src/Framework/helpers.php +++ b/src/Framework/helpers.php @@ -38,6 +38,8 @@ if (!function_exists('dumprr')) { */ function dumprr($value): void { - dump($value, Dumper::ERROR_LOG); + $result = dump($value, Dumper::RETURN); + + file_put_contents('php://stderr', $result); } }
Switch dumper from error_log to direct writing into php://stderr
diff --git a/src/test/java/com/smartsheet/api/models/format/FormatTest.java b/src/test/java/com/smartsheet/api/models/format/FormatTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/smartsheet/api/models/format/FormatTest.java +++ b/src/test/java/com/smartsheet/api/models/format/FormatTest.java @@ -1,4 +1,24 @@ package com.smartsheet.api.models.format; + +/* + * #[license] + * Smartsheet Java SDK + * %% + * Copyright (C) 2014 Smartsheet + * %% + * 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. + * %[license] + */ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue;
Added license to top of java files
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -9,5 +9,5 @@ setup( author='Luis y Anita', author_email='luismasuelli@hotmail.com', description='Python library with quick utilities to make use of in a wide variety of situations', - python_requires='>=3' + python_requires='>=3.6' )
Moving to python version <I>+
diff --git a/src/multitail2.py b/src/multitail2.py index <HASH>..<HASH> 100644 --- a/src/multitail2.py +++ b/src/multitail2.py @@ -1,8 +1,9 @@ import time import glob import os +import random -__version__ = "1.0.0" +__version__ = "1.1.0" class TailedFile: _max_buf_size = 1 * 1024 * 1024 # 1mb @@ -121,7 +122,13 @@ class MultiTail: self._last_scan = time.time() # Read new lines from all files and yield them. - for path, tailedfile in self._tailedfiles.iteritems(): + # Files are read from in random order each time poll is called + # in an attempt to read from all files evenly. + keys = self._tailedfiles.keys() + random.shuffle(keys) + for path in keys: + tailedfile = self._tailedfiles[path] + for line, offset in tailedfile.readlines(): self._offsets[path] = offset yield (path, offset), line
Reading from files in random order in an attempt to read from all files evenly, preventing one large file from starving the others of reads.
diff --git a/taco-team-build.js b/taco-team-build.js index <HASH>..<HASH> 100644 --- a/taco-team-build.js +++ b/taco-team-build.js @@ -136,7 +136,7 @@ function prepareProject(cordovaPlatforms, args, /* optional */ projectPath) { promise = promise.then(function () { // Build app with platform specific args if specified var callArgs = utilities.getCallArgs(platform, args); - var argsString = _getArgsString(callArgs); + var argsString = _getArgsString(callArgs.options); console.log('Queueing prepare for platform ' + platform + ' w/options: ' +argsString); return cordova.raw.prepare(callArgs); }); @@ -192,7 +192,7 @@ function buildProject(cordovaPlatforms, args, /* optional */ projectPath) { promise = promise.then(function () { // Build app with platform specific args if specified var callArgs = utilities.getCallArgs(platform, args, cordovaVersion); - var argsString = _getArgsString(callArgs); + var argsString = _getArgsString(callArgs.options); console.log('Queueing build for platform ' + platform + ' w/options: ' + argsString); return cordova.raw.build(callArgs); });
fix one more issue with displaying args passed to build
diff --git a/lib/carrierwave/storage/roz.rb b/lib/carrierwave/storage/roz.rb index <HASH>..<HASH> 100644 --- a/lib/carrierwave/storage/roz.rb +++ b/lib/carrierwave/storage/roz.rb @@ -46,9 +46,7 @@ module CarrierWave # Backwards compatibility for when we were storing only the filename URI.join(uploader.files_base_url, "#{uploader.access_id.to_s}/", "#{uploader.store_dir}/", path).to_s else - dirname = ::File.dirname(path) - basename = [uploader.version_name, ::File.basename(path)].compact.join('_') - URI.join(uploader.files_base_url, "#{dirname}/", basename).to_s + URI.join(uploader.files_base_url, path).to_s end end
Fix issue with duplicate sizes in file name. For example /some/path/small_small_zoidberg.jpg
diff --git a/src/Tenant/Setting.php b/src/Tenant/Setting.php index <HASH>..<HASH> 100644 --- a/src/Tenant/Setting.php +++ b/src/Tenant/Setting.php @@ -99,7 +99,7 @@ class Tenant_Setting extends Pluf_Model 'col' => 'mode, key' ), 'key_idx' => array( - 'type' => 'index', + 'type' => 'unique', 'col' => 'key' ) );
Bug fixed: key is a unique index.
diff --git a/configfile.js b/configfile.js index <HASH>..<HASH> 100644 --- a/configfile.js +++ b/configfile.js @@ -57,6 +57,9 @@ cfreader.load_config = function(name, type) { result = cfreader.load_flat_config(name); if (result && type !== 'list') { result = result[0]; + if (/^\d+$/.test(result)) { + result = parseInt(result); + } } }
if flat files contain integers, treat them as such
diff --git a/lang/en_US.rb b/lang/en_US.rb index <HASH>..<HASH> 100644 --- a/lang/en_US.rb +++ b/lang/en_US.rb @@ -8,7 +8,7 @@ Localization.define('en_US') do |l| l.store "he_IL", "Hebrew" l.store "it_IT", "Italian" l.store "ja_JP", "Japanese" - l.store "lt_LT", "Lituanian" + l.store "lt_LT", "Lithuanian" l.store "nb_NO", "Norwegian" l.store "nl_NL", "Nederland" l.store "pl_PL", "Polish"
missing the h in the lithuanian definition
diff --git a/aioredis/connection.py b/aioredis/connection.py index <HASH>..<HASH> 100644 --- a/aioredis/connection.py +++ b/aioredis/connection.py @@ -161,8 +161,8 @@ class RedisConnection(AbcConnection): self._db = 0 self._closing = False self._closed = False - self._close_waiter = loop.create_future() - self._reader_task.add_done_callback(self._close_waiter.set_result) + self._close_state = asyncio.Event() + self._reader_task.add_done_callback(lambda x: self._close_state.set()) self._in_transaction = None self._transaction_error = None # XXX: never used? self._in_pubsub = 0 @@ -431,7 +431,7 @@ class RedisConnection(AbcConnection): async def wait_closed(self): """Coroutine waiting until connection is closed.""" - await asyncio.shield(self._close_waiter, loop=self._loop) + await self._close_state.wait() @property def db(self):
simplify RedisConnection wait_closed() logic
diff --git a/scss/__init__.py b/scss/__init__.py index <HASH>..<HASH> 100644 --- a/scss/__init__.py +++ b/scss/__init__.py @@ -751,7 +751,7 @@ class Scss(object): @print_timing(2) def Compilation(self, scss_string=None, scss_file=None): if scss_string is not None: - self._scss_files = {'<string>': scss_string} + self._scss_files = {'<string %r>' % (scss_string.strip()[:50] + '...'): scss_string} elif scss_file is not None: self._scss_files = {scss_file: open(scss_file).read()} @@ -778,7 +778,7 @@ class Scss(object): final_cont = '' for fileid in self.css_files: - if fileid != '<string>': + if not fileid.startswith('<string '): final_cont += '/* Generated from: ' + fileid + ' */\n' fcont = self.create_css(fileid) final_cont += fcont
Added a chunk of code when code comes from string
diff --git a/ChunkSplittingPlugin.js b/ChunkSplittingPlugin.js index <HASH>..<HASH> 100644 --- a/ChunkSplittingPlugin.js +++ b/ChunkSplittingPlugin.js @@ -118,13 +118,13 @@ function extractOriginsOfChunkWithExtractedModules(chunk, reason = 'async common // from CommonsChunkPlugin (async methods): function extractOriginsOfChunksWithExtractedModules(chunks, reason) { return flatMap( - chunks, + Array.from(chunks), chunk => extractOriginsOfChunkWithExtractedModules(chunk, reason) ) } function breakChunksIntoPieces(chunksToSplit, compilation, { - getPartName = (sourceChunk, idx) => sourceChunk.name && `${sourceChunk.name}-part-${leadingZeros(idx + 1, 2)}`, + getPartName = (sourceChunk, idx, extractableModules) => sourceChunk.name && `${sourceChunk.name}-part-${leadingZeros(idx + 1, 2)}`, maxModulesPerChunk = 100, maxModulesPerEntry = 1, segregator = @@ -161,7 +161,7 @@ function breakChunksIntoPieces(chunksToSplit, compilation, { // return new chunks return freshChunkModuleGroups.map((extractableModules, idx) => { - let targetName = getPartName(chunk, idx) + let targetName = getPartName(chunk, idx, extractableModules) const targetChunk = compilation.addChunk(targetName) // Remove modules that are moved to commons chunk from their original chunks
fix(plugin): properly iterate chunks inside 'extractOriginsOfChunkWithExtractedModules' and pass additional data to 'getPartName' (#9) - lodash is expecting an Array, but a Set is passed to it, so the iterator is never used and the "async split" string is not added to the chunk origins as expected. - pass set of modules to getPartName() to provide additional data for those who need it
diff --git a/pyinfra/__main__.py b/pyinfra/__main__.py index <HASH>..<HASH> 100644 --- a/pyinfra/__main__.py +++ b/pyinfra/__main__.py @@ -11,7 +11,7 @@ Usage: pyinfra -i INVENTORY DEPLOY [-v -vv options] pyinfra -i INVENTORY --run OP ARGS [-v -vv options] pyinfra -i INVENTORY --run COMMAND [-v -vv options] - pyinfra -i INVENTORY --fact FACT [-v options] + pyinfra -i INVENTORY --fact FACT [-vv options] pyinfra -i INVENTORY [DEPLOY] --debug-data [options] pyinfra (--facts | --help | --version)
Flip back to `-vv` on facts to print output, consistent with deploy.
diff --git a/generators/upgrade/index.js b/generators/upgrade/index.js index <HASH>..<HASH> 100644 --- a/generators/upgrade/index.js +++ b/generators/upgrade/index.js @@ -151,7 +151,7 @@ module.exports = UpgradeGenerator.extend({ if (code !== 0) this.error('Unable to record current code has been generated with version ' + this.currentVersion + ':\n' + msg + ' ' + err); this.log('Current code recorded as generated with version ' + this.currentVersion); - this._gitCheckout(UPGRADE_BRANCH, done); + done(); }.bind(this)); }.bind(this); @@ -195,6 +195,11 @@ module.exports = UpgradeGenerator.extend({ }.bind(this)); }, + checkoutUpgradeBranch: function() { + var done = this.async(); + this._gitCheckout(UPGRADE_BRANCH, done); + }, + generateWithLatestVersion: function() { var done = this.async(); this._regenerate(this.latestVersion, done);
Upgrade submodule doesn't commit on jhipster_upgrade branch from second upgrade Fix #<I>
diff --git a/app_generators/ahn/templates/components/simon_game/lib/simon_game.rb b/app_generators/ahn/templates/components/simon_game/lib/simon_game.rb index <HASH>..<HASH> 100644 --- a/app_generators/ahn/templates/components/simon_game/lib/simon_game.rb +++ b/app_generators/ahn/templates/components/simon_game/lib/simon_game.rb @@ -38,8 +38,7 @@ class SimonGame call_context.play 'good' else call_context.play %W(#{number.size - 1} times wrong-try-again-smarty) - initialize_attempt - initialize_number + reset end end @@ -54,4 +53,9 @@ class SimonGame def initialize_number @number ||= '' end + + def reset + @attempt, @number = '', '' + end + end
The SimonGame component formerly forgot to reset its number after a failed try. Closes ticket #5. git-svn-id: <URL>
diff --git a/lib/core/seleniumRunner.js b/lib/core/seleniumRunner.js index <HASH>..<HASH> 100644 --- a/lib/core/seleniumRunner.js +++ b/lib/core/seleniumRunner.js @@ -140,8 +140,10 @@ class SeleniumRunner { // watch Jake Archibald on ‘The Event Loop’ https://vimeo.com/254947206 // TODO do we only want to do this when we record a video? const navigate = `(function() { - document.body.innerHTML = ''; - document.body.style.background = '#FFFFFF'; + const orange = document.getElementById('browsertime-orange'); + if (orange) { + orange.style.backgroundColor = '#FFFFFF'; + } window.requestAnimationFrame(function(){ window.requestAnimationFrame(function(){ window.location="${url}"; diff --git a/lib/video/screenRecording/setOrangeBackground.js b/lib/video/screenRecording/setOrangeBackground.js index <HASH>..<HASH> 100644 --- a/lib/video/screenRecording/setOrangeBackground.js +++ b/lib/video/screenRecording/setOrangeBackground.js @@ -10,6 +10,7 @@ module.exports = async function(driver) { const orangeScript = ` (function() { const orange = document.createElement('div'); + orange.id = 'browsertime-orange'; orange.style.position = 'absolute'; orange.style.top = '0'; orange.style.left = '0';
Change the div to white the same way of do with orange (#<I>)
diff --git a/src/Utils.php b/src/Utils.php index <HASH>..<HASH> 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -167,7 +167,7 @@ function getUserDefinedClasses() # TODO optimize $all = get_declared_classes(); return array_filter($all, function($class) { - return (new \ReflectionClass($class))->isUserDefined(); + return !(new \ReflectionClass($class))->isInternal(); }); }
HHVM fix attempt for wildcards
diff --git a/howdoi/howdoi.py b/howdoi/howdoi.py index <HASH>..<HASH> 100755 --- a/howdoi/howdoi.py +++ b/howdoi/howdoi.py @@ -46,8 +46,10 @@ else: if os.getenv('HOWDOI_DISABLE_SSL'): # Set http instead of https SEARCH_URL = 'http://www.google.com/search?q=site:{0}%20{1}' + VERIFY_SSL_CERTIFICATE = False else: SEARCH_URL = 'https://www.google.com/search?q=site:{0}%20{1}' + VERIFY_SSL_CERTIFICATE = True URL = os.getenv('HOWDOI_URL') or 'stackoverflow.com' @@ -81,7 +83,8 @@ def get_proxies(): def _get_result(url): try: - return requests.get(url, headers={'User-Agent': random.choice(USER_AGENTS)}, proxies=get_proxies()).text + return requests.get(url, headers={'User-Agent': random.choice(USER_AGENTS)}, proxies=get_proxies(), + verify=VERIFY_SSL_CERTIFICATE).text except requests.exceptions.SSLError as e: print('[ERROR] Encountered an SSL Error. Try using HTTP instead of ' 'HTTPS by setting the environment variable "HOWDOI_DISABLE_SSL".\n')
ignoring ssl certificate when HOWDOI_DISABLE_SSL is set
diff --git a/lxd/container_backup.go b/lxd/container_backup.go index <HASH>..<HASH> 100644 --- a/lxd/container_backup.go +++ b/lxd/container_backup.go @@ -81,10 +81,27 @@ func containerBackupsPost(d *Daemon, r *http.Request) Response { return SmartError(err) } - req := api.ContainerBackupsPost{ - ExpiryDate: time.Now().Add(30 * time.Minute), // default expiry time of 30 minutes + rj := shared.Jmap{} + err = json.NewDecoder(r.Body).Decode(&rj) + if err != nil { + return InternalError(err) } - err = json.NewDecoder(r.Body).Decode(&req) + + expiry, _ := rj.GetString("expiry") + if expiry == "" { + // Disable expiration by setting it to zero time + rj["expiry"] = time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC) + } + + // Create body with correct expiry + body, err := json.Marshal(rj) + if err != nil { + return InternalError(err) + } + + req := api.ContainerBackupsPost{} + + err = json.Unmarshal(body, &req) if err != nil { return BadRequest(err) }
backup: Allow backups to not expire
diff --git a/spec/cliver_spec.rb b/spec/cliver_spec.rb index <HASH>..<HASH> 100644 --- a/spec/cliver_spec.rb +++ b/spec/cliver_spec.rb @@ -15,7 +15,7 @@ describe Cliver do end context 'when dependency is present, but wrong version' do let(:executable) { 'ruby' } - let(:requirements) { ['~>0.1.0'] } + let(:requirements) { ['~> 0.1.0'] } let(:detector) { proc { RUBY_VERSION.sub('p', '.') } } it { should_not be_false } it { should match 'Dependency Version Mismatch:' }
<I>.x Gem::Requirement vs auto-spacing in specs
diff --git a/user_management/api/tests/test_views.py b/user_management/api/tests/test_views.py index <HASH>..<HASH> 100644 --- a/user_management/api/tests/test_views.py +++ b/user_management/api/tests/test_views.py @@ -23,7 +23,7 @@ TEST_SERVER = 'http://testserver' class TestThrottle(APIRequestTestCase): view_class = views.GetToken - @patch('rest_framework.throttling.SimpleRateThrottle.THROTTLE_RATES', new={ + @patch('rest_framework.throttling.AnonRateThrottle.THROTTLE_RATES', new={ 'anon': '1/day', 'user': '1/day', }) @@ -39,9 +39,9 @@ class TestThrottle(APIRequestTestCase): response = self.view_class.as_view()(request) self.assertEqual(response.status_code, expected_status) - @patch('rest_framework.throttling.SimpleRateThrottle.THROTTLE_RATES', new={ - 'anon': '2/day', - 'user': '2/day', + @patch('rest_framework.throttling.UserRateThrottle.THROTTLE_RATES', new={ + 'anon': '1/day', + 'user': '1/day', }) def test_user_password_reset_throttle(self): auth_url = reverse('user_management_api:password_reset')
Test different throttle class to avoid request conflicts
diff --git a/test/player_spec.js b/test/player_spec.js index <HASH>..<HASH> 100644 --- a/test/player_spec.js +++ b/test/player_spec.js @@ -53,8 +53,11 @@ describe('Player', function() { var onError = sinon.spy() player.on(Events.PLAYER_ERROR, onError) player.attachTo(element) - player.core.getCurrentContainer().playback.error() - expect(onError).called.once + // some playbacks don't have an error() method. e.g flash + if (player.core.getCurrentContainer().playback.error) { + player.core.getCurrentContainer().playback.error() + expect(onError).called.once + } }) }) })
PlayerSpec test fix Not all playbacks have an error method. Previously this test would fail on firefox, maybe it was using flash there?
diff --git a/lib/svtplay_dl/__init__.py b/lib/svtplay_dl/__init__.py index <HASH>..<HASH> 100644 --- a/lib/svtplay_dl/__init__.py +++ b/lib/svtplay_dl/__init__.py @@ -72,7 +72,7 @@ def get_media(url, options): options.output = filenamify(title_tag) else: # output is a directory - os.path.join(options.output, filenamify(title_tag)) + options.output = os.path.join(options.output, filenamify(title_tag)) try: stream.get(options)
Fix automatic filename generation when output is a directory
diff --git a/test/calendar.spec.js b/test/calendar.spec.js index <HASH>..<HASH> 100644 --- a/test/calendar.spec.js +++ b/test/calendar.spec.js @@ -367,12 +367,12 @@ describe('uiCalendar', function () { } }; - spyOn($rootScope,'$apply'); + spyOn($rootScope,'$apply').andCallThrough(); angular.forEach(scope.uiConfig.calendar, function(value,key){ if (typeof value === 'function'){ functionCount++; - spyOn(scope.uiConfig.calendar, key); + spyOn(scope.uiConfig.calendar, key).andCallThrough(); var fullCalendarConfig = calendarCtrl.getFullCalendarConfig(scope.uiConfig.calendar, {}); @@ -401,12 +401,12 @@ describe('uiCalendar', function () { } }; - spyOn($rootScope,'$apply'); + spyOn($rootScope,'$apply').andCallThrough(); angular.forEach(scope.uiConfig.calendar, function(value,key){ if (typeof value === 'function'){ functionCount++; - spyOn(scope.uiConfig.calendar, key); + spyOn(scope.uiConfig.calendar, key).andCallThrough(); var fullCalendarConfig = calendarCtrl.getFullCalendarConfig(scope.uiConfig.calendar, {});
Ensure spied functions contents is executed
diff --git a/km3pipe/tests/test_srv.py b/km3pipe/tests/test_srv.py index <HASH>..<HASH> 100644 --- a/km3pipe/tests/test_srv.py +++ b/km3pipe/tests/test_srv.py @@ -18,5 +18,5 @@ class TestSrvEvent(TestCase): def test_call(self, srv_data_mock): hits = Table({'pos_x': [1, 2], 'pos_y': [3, 4], 'pos_z': [5, 6], 'time': [100, 200], 'tot': [11, 22]}) - srv_event('token', hits) + srv_event('token', hits, 'rba_url') srv_data_mock.assert_called_once()
Add rba url, since it's normally taken from the config
diff --git a/spec/dragonfly/image_magick/plugin_spec.rb b/spec/dragonfly/image_magick/plugin_spec.rb index <HASH>..<HASH> 100644 --- a/spec/dragonfly/image_magick/plugin_spec.rb +++ b/spec/dragonfly/image_magick/plugin_spec.rb @@ -124,7 +124,7 @@ describe "a configured imagemagick app" do describe "identify" do it "gives the output of the command line" do image.identify.should =~ /280/ - image.identify("-format %h").should == "355\n" + image.identify("-format %h").chomp.should == "355" end end
modifying indentify spec to chomp the trailing /n
diff --git a/torf/_torrent.py b/torf/_torrent.py index <HASH>..<HASH> 100644 --- a/torf/_torrent.py +++ b/torf/_torrent.py @@ -714,7 +714,7 @@ class Torrent(): 3. The number of pieces that have been hashed (:class:`int`) 4. The total number of pieces (:class:`int`) - If `callback` returns anything that is not None, hashing is stopped. + If `callback` returns anything that is not ``None``, hashing is stopped. :raises PathEmptyError: if :attr:`path` contains only empty files/directories
Torrent.generate(): Highlight 'None' properly in docstring
diff --git a/binomial.go b/binomial.go index <HASH>..<HASH> 100644 --- a/binomial.go +++ b/binomial.go @@ -32,31 +32,25 @@ func (bing BinomialGenerator) Binomial(n int64, p float64) int64 { panic(fmt.Sprintf("Invalid parameter n: %d", n)) } - workers := 0 - resChan := make(chan int64) - for n > 0 { - if n > 1000 { + if n > 1000 { + workers := 0 + resChan := make(chan int64) + for n > 0 { go func() { res := bing.binomial(1000, p) resChan <- res }() n -= 1000 workers++ - } else { - go func() { - res := bing.binomial(n, p) - resChan <- res - }() - workers++ - break } + var result int64 + for i := 0; i < workers; i++ { + result += <-resChan + } + return result + } else { + return bing.binomial(n, p) } - - var result int64 - for i := 0; i < workers; i++ { - result += <-resChan - } - return result } func (bing BinomialGenerator) binomial(n int64, p float64) int64 {
binomial: simplify for clarity and performance. this also fixes a mistake about a loop iterator variable: <URL>
diff --git a/lib/puppet/indirector/exec.rb b/lib/puppet/indirector/exec.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/indirector/exec.rb +++ b/lib/puppet/indirector/exec.rb @@ -39,7 +39,7 @@ class Puppet::Indirector::Exec < Puppet::Indirector::Terminus end if output =~ /\A\s*\Z/ # all whitespace - Puppet.debug "Empty response for #{name} from exec #{self.name} terminus" + Puppet.debug "Empty response for #{name} from #{self.name} terminus" return nil else return output
Merge pull request #<I> from jblaine/patch-1 Removed spurious "exec" from a debug string
diff --git a/lib/rvc/modules/vm.rb b/lib/rvc/modules/vm.rb index <HASH>..<HASH> 100644 --- a/lib/rvc/modules/vm.rb +++ b/lib/rvc/modules/vm.rb @@ -88,9 +88,10 @@ def wait_for_shutdown vms, opts end end return if all_off - sleep [opts[:delay], finish_time - Time.now].min + sleep_time = [opts[:delay], finish_time - Time.now].min + sleep sleep_time if sleep_time > 0 end - puts "WARNING: At least one VM did not shut down!" + err "At least one VM did not shut down!" end
Fixed issue with potential negative sleep value on timeout
diff --git a/core/Email.php b/core/Email.php index <HASH>..<HASH> 100755 --- a/core/Email.php +++ b/core/Email.php @@ -808,7 +808,7 @@ class Email_BounceHandler extends Controller { if(!$duplicateBounce) { $record = new Email_BounceRecord(); - $member = DataObject::get_one( 'Member', "`Email`='$email'" ); + $member = DataObject::get_one( 'Member', "`Email`='$SQL_email'" ); if( $member ) $record->MemberID = $member->ID;
Add SQL_ prefix in place it was missing. (merge from gsoc branch, r<I>) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9
diff --git a/website/siteConfig.js b/website/siteConfig.js index <HASH>..<HASH> 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -87,8 +87,8 @@ const users = [ }, { caption: 'Notable', - image: 'https://raw.githubusercontent.com/notable/notable/master/resources/icon/icon.png', - infoLink: 'https://github.com/notable/notable', + image: 'https://notable.md/static/images/logo_app.png', + infoLink: 'https://notable.md', }, { caption: 'Observable',
Notable: update (#<I>) * Added “Notable” to the list of users * Added missing trailing comma * alphabetize the new entry * Notable: updated icon and website url
diff --git a/kitnirc/client.py b/kitnirc/client.py index <HASH>..<HASH> 100644 --- a/kitnirc/client.py +++ b/kitnirc/client.py @@ -338,7 +338,7 @@ class Client(object): if isinstance(incoming, User): self.msg(user, message) else: - self.msg(incoming, "%s: %s" % (user, message)) + self.msg(incoming, "%s: %s" % (user.nick, message)) def notice(self, target, message): """Send a NOTICE to a user or channel."""
Use a user's nick when hilighting, not the hostmask
diff --git a/servers/servertcp.js b/servers/servertcp.js index <HASH>..<HASH> 100644 --- a/servers/servertcp.js +++ b/servers/servertcp.js @@ -322,7 +322,7 @@ function _handleReadMultipleRegisters(requestBuffer, vector, unitID, callback) { if(vector.getMultipleHoldingRegisters.length===4){ vector.getMultipleHoldingRegisters(address,length,unitID,function(err,values){ - if(values.length!=length){ + if(!err && values.length!=length){ var error=new Error("Requested address length and response length do not match"); callback(error); throw error; @@ -436,7 +436,7 @@ function _handleReadInputRegisters(requestBuffer, vector, unitID, callback) { if(vector.getMultipleInputRegisters.length===4){ vector.getMultipleInputRegisters(address,length,unitID,function(err,values){ - if(values.length!=length){ + if(!err && values.length!=length){ var error=new Error("Requested address length and response length do not match"); callback(error); throw error;
length of register values is not compared with requested resisters if error is sent in callback
diff --git a/library/SimplePie/Cache/MySQL.php b/library/SimplePie/Cache/MySQL.php index <HASH>..<HASH> 100644 --- a/library/SimplePie/Cache/MySQL.php +++ b/library/SimplePie/Cache/MySQL.php @@ -96,7 +96,22 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB 'prefix' => '', ), ); - $this->options = array_merge($this->options, SimplePie_Cache::parse_URL($location)); + $parsed = SimplePie_Cache::parse_URL($location); + + foreach( $parsed as $key => $value ) + { + if( is_array($value) ) + { + foreach( $value as $array_key => $array_value ) + { + $this->options[$key][$array_key] = $array_value; + } + } + else + { + $this->options[$key] = $value; + } + } // Path is prefixed with a "/" $this->options['dbname'] = substr($this->options['path'], 1);
Fixed URI Parse Merge with Options in MySQL Class (currently inside constructor)
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -22,6 +22,12 @@ test('kind-error:', function () { test.throws(fixture, /Call KindError.*/) done() }) + test('should composed error object be instanceof Error', function (done) { + var err = new KindError() + + test.equal(err instanceof Error, true) + done() + }) test('should have proper name and dont have stack by default', function (done) { var err = new KindError()
test: composed error is instanceof Error
diff --git a/argresolver/resolver.py b/argresolver/resolver.py index <HASH>..<HASH> 100644 --- a/argresolver/resolver.py +++ b/argresolver/resolver.py @@ -254,7 +254,8 @@ class EnvironmentResolver(Resolver): if prefix is not None: lookup = prefix.upper() + '_' + lookup newval = os.environ.get(lookup, Missing) - if newval is Missing: - self.logger.info("Cannot resolve argument '{}' of {}. Try to set environment variable '{}'".format( + hasdefault = defaults.get(name, Missing) is not Missing + if newval is Missing and not hasdefault: + self.logger.warn("Cannot resolve argument '{}' of {}. Try to set environment variable '{}'".format( name, cls, lookup)) return newval
Supresses logging warning when default is present
diff --git a/avatar/util.py b/avatar/util.py index <HASH>..<HASH> 100644 --- a/avatar/util.py +++ b/avatar/util.py @@ -8,8 +8,8 @@ def get_default_avatar_url(): base_url = getattr(settings, 'STATIC_URL', None) if not base_url: base_url = getattr(settings, 'MEDIA_URL', '') - # Don't use base_url if the default avatar url starts with http:// - if AVATAR_DEFAULT_URL.startswith('http://'): + # Don't use base_url if the default avatar url starts with http:// of https:// + if AVATAR_DEFAULT_URL.startswith('http://') or AVATAR_DEFAULT_URL.startswith('https://'): return AVATAR_DEFAULT_URL # We'll be nice and make sure there are no duplicated forward slashes ends = base_url.endswith('/')
The default avatar URL could also start with https.
diff --git a/lib/gakubuchi/template.rb b/lib/gakubuchi/template.rb index <HASH>..<HASH> 100644 --- a/lib/gakubuchi/template.rb +++ b/lib/gakubuchi/template.rb @@ -68,7 +68,8 @@ module Gakubuchi def extract_extname(path) extname = path.extname - extname.empty? ? extname : "#{extract_extname(path.basename(extname))}#{extname}" + extname.empty? || extname == ".html" ? + extname : "#{extract_extname(path.basename(extname))}#{extname}" end end end
Fix unexpected extname of localized templates
diff --git a/pkg/clustermesh/config_test.go b/pkg/clustermesh/config_test.go index <HASH>..<HASH> 100644 --- a/pkg/clustermesh/config_test.go +++ b/pkg/clustermesh/config_test.go @@ -55,6 +55,9 @@ func expectNotExist(c *C, cm *ClusterMesh, name string) { func (s *ClusterMeshTestSuite) TestWatchConfigDirectory(c *C) { skipKvstoreConnection = true + defer func() { + skipKvstoreConnection = false + }() dir, err := ioutil.TempDir("", "multicluster") c.Assert(err, IsNil)
clustermesh: Undo skipKvstoreConnection in unit test Failure to undo the global variable can lead to follow-up unit tests failing that require kvstore interactions. Fixes: <I>b<I>b<I>d ("Inter cluster connectivity (ClusterMesh)")
diff --git a/spec/dummy/app/assets/javascripts/remote_posts.js b/spec/dummy/app/assets/javascripts/remote_posts.js index <HASH>..<HASH> 100644 --- a/spec/dummy/app/assets/javascripts/remote_posts.js +++ b/spec/dummy/app/assets/javascripts/remote_posts.js @@ -2,13 +2,12 @@ $(function(){ var form = $('#new-remote-post'); if(form.length > 0) { + form.hide(); - Bootsy.areas[0].editor.on('load', function(){ - form.hide(); - }); + $('a[href="#new-remote-post"]').on('click', function(e){ + form.toggle(); - $('a[href="#new-remote-post"]').on('click', function(){ - form.show(); + e.preventDefault(); }); } });
Fix remote post form on the Dummy app.
diff --git a/lib/generators/decorator/templates/decorator.rb b/lib/generators/decorator/templates/decorator.rb index <HASH>..<HASH> 100644 --- a/lib/generators/decorator/templates/decorator.rb +++ b/lib/generators/decorator/templates/decorator.rb @@ -27,7 +27,7 @@ class <%= class_name %>Decorator < <%= parent_class_name %> # generated by ActiveRecord: # # def created_at - # h.content_tag :span, time.strftime("%a %m/%d/%y"), + # h.content_tag :span, attributes["created_at"].strftime("%a %m/%d/%y"), # :class => 'timestamp' # end end
update comment in generator. You'd get an infinite loop with the current one
diff --git a/test/wiredup_test.js b/test/wiredup_test.js index <HASH>..<HASH> 100644 --- a/test/wiredup_test.js +++ b/test/wiredup_test.js @@ -261,6 +261,7 @@ exports.wiredep = { test.equal(typeof returnedObject.css, 'object'); test.equal(typeof returnedObject.less, 'object'); test.equal(typeof returnedObject.scss, 'object'); + test.equal(typeof returnedObject.packages, 'object'); test.done(); }
Added test for commit bf<I>d<I>f<I>decdb2c<I>d<I>.
diff --git a/public/js/editors/panel.js b/public/js/editors/panel.js index <HASH>..<HASH> 100644 --- a/public/js/editors/panel.js +++ b/public/js/editors/panel.js @@ -1,7 +1,8 @@ /*globals $, CodeMirror, jsbin, jshintEnabled, RSVP */ var $document = $(document), - $source = $('#source'); + $source = $('#source'), + userResizeable = !$('html').hasClass('layout'); var editorModes = { html: 'htmlmixed', @@ -266,7 +267,7 @@ Panel.prototype = { // update the splitter - but do it on the next tick // required to allow the splitter to see it's visible first setTimeout(function () { - if (panel.splitter.length) { + if (userResizeable) { if (x !== undefined) { panel.splitter.trigger('init', x); } else { @@ -486,8 +487,8 @@ Panel.prototype = { $source[0].style.paddingLeft = '1px'; setTimeout(function () { $source[0].style.paddingLeft = '0'; - }, 0) - }, 0) + }, 0); + }, 0); } });
Fixed switching back to resizable The issue was that there's no splitter on the HTML panel, so it was skipping some key code.
diff --git a/addon/validated-buffer.js b/addon/validated-buffer.js index <HASH>..<HASH> 100644 --- a/addon/validated-buffer.js +++ b/addon/validated-buffer.js @@ -1,11 +1,7 @@ import EmberValidations from 'ember-validations'; import BufferedProxy from 'ember-buffered-proxy/proxy'; -export default function validatedBuffer(object, classBody, container) { - if (container) { - object.set('container', container); - } - +export default function validatedBuffer(object, classBody) { var Buffer = BufferedProxy.extend(EmberValidations.Mixin, classBody); return Buffer.create({
require the object to have a container property
diff --git a/core/src/main/java/pl/project13/core/log/MessageFormatter.java b/core/src/main/java/pl/project13/core/log/MessageFormatter.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/pl/project13/core/log/MessageFormatter.java +++ b/core/src/main/java/pl/project13/core/log/MessageFormatter.java @@ -261,19 +261,11 @@ public final class MessageFormatter { return false; } char potentialEscape = messagePattern.charAt(delimeterStartIndex - 1); - if (potentialEscape == ESCAPE_CHAR) { - return true; - } else { - return false; - } + return (potentialEscape == ESCAPE_CHAR); } static boolean isDoubleEscaped(String messagePattern, int delimeterStartIndex) { - if (delimeterStartIndex >= 2 && messagePattern.charAt(delimeterStartIndex - 2) == ESCAPE_CHAR) { - return true; - } else { - return false; - } + return (delimeterStartIndex >= 2 && messagePattern.charAt(delimeterStartIndex - 2) == ESCAPE_CHAR); } // special treatment of array values was suggested by 'lizongbo'
Return of boolean expression should not be wrapped into an if-the-else statement
diff --git a/lib/sidekiq_unique_jobs/version.rb b/lib/sidekiq_unique_jobs/version.rb index <HASH>..<HASH> 100644 --- a/lib/sidekiq_unique_jobs/version.rb +++ b/lib/sidekiq_unique_jobs/version.rb @@ -3,5 +3,5 @@ module SidekiqUniqueJobs # # @return [String] the current SidekiqUniqueJobs version - VERSION = "7.1.21" + VERSION = "7.1.22" end
Bump sidekiq-unique-jobs to <I>
diff --git a/lib/dnsimple/client/certificates.rb b/lib/dnsimple/client/certificates.rb index <HASH>..<HASH> 100644 --- a/lib/dnsimple/client/certificates.rb +++ b/lib/dnsimple/client/certificates.rb @@ -2,19 +2,19 @@ module Dnsimple class Client module Certificates - # Lists the certificates in the account. + # Lists the certificates associated to the domain. # - # @see https://developer.dnsimple.com/v2/certificates/#list + # @see https://developer.dnsimple.com/v2/domains/certificates/#list # @see #all_certificates # # @example List certificates in the first page - # client.certificates.list(1010) + # client.certificates.list(1010, "example.com") # # @example List certificates, provide a specific page - # client.certificates.list(1010, page: 2) + # client.certificates.list(1010, "example.com", page: 2) # # @example List certificates, provide a sorting policy - # client.certificates.list(1010, sort: "email:asc") + # client.certificates.list(1010, "example.com", sort: "email:asc") # # @param [Fixnum] account_id the account ID # @param [#to_s] domain_name the domain name
Correct documentation link and include domain name in params. Closes GH-<I>.
diff --git a/src/js/core/core.js b/src/js/core/core.js index <HASH>..<HASH> 100644 --- a/src/js/core/core.js +++ b/src/js/core/core.js @@ -85,6 +85,8 @@ var modules = {}; + var isBrowser = (typeof window != UNDEFINED && typeof document != UNDEFINED); + var util = { isHostMethod: isHostMethod, isHostObject: isHostObject, @@ -99,6 +101,7 @@ var api = { version: "%%build:version%%", initialized: false, + isBrowser: isBrowser, supported: true, util: util, features: {}, @@ -118,7 +121,7 @@ } function alertOrLog(msg, shouldAlert) { - if (shouldAlert) { + if (isBrowser && shouldAlert) { window.alert(msg); } else { consoleLog(msg); @@ -174,7 +177,7 @@ } // Test whether we're in a browser and bail out if not - if (typeof window == UNDEFINED || typeof document == UNDEFINED) { + if (!isBrowser) { fail("Rangy can only run in a browser"); return; }
Another fix for running outside a browser
diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index <HASH>..<HASH> 100644 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -15,7 +15,7 @@ RE_OBJ = re.compile(PATTERN) def context(): return { 'project_name': 'My Test Project', - 'repo_name': 'my_test_project', + 'project_slug': 'my_test_project', 'author_name': 'Test Author', 'email': 'test@example.com', 'description': 'A short description of the project.',
Update test fixture to use project_slug, not repo_name
diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll/renderer.rb +++ b/lib/jekyll/renderer.rb @@ -5,11 +5,10 @@ module Jekyll attr_reader :document, :site attr_writer :layouts, :payload - def initialize(site, document, site_payload = nil, layouts: nil) + def initialize(site, document, site_payload = nil) @site = site @document = document @payload = site_payload - @layouts = layouts end # Fetches the payload used in Liquid rendering.
Remove layouts named param from Renderer#initialize
diff --git a/lib/core/manager.rb b/lib/core/manager.rb index <HASH>..<HASH> 100644 --- a/lib/core/manager.rb +++ b/lib/core/manager.rb @@ -303,7 +303,11 @@ class Manager existing_instance = get(type, name) if existing_instance - existing_instance.import(config.export) + config.export.each do |property_name, value| + unless [ :meta ].include?(property_name) + existing_instance[property_name] = value + end + end existing_instance.normalize(true) logger.info("Using existing instance of #{type}, #{name}")
Fixing the reload mechanism in the plugin manager.
diff --git a/tests/dummy/config/deprecation-workflow.js b/tests/dummy/config/deprecation-workflow.js index <HASH>..<HASH> 100644 --- a/tests/dummy/config/deprecation-workflow.js +++ b/tests/dummy/config/deprecation-workflow.js @@ -5,5 +5,7 @@ window.deprecationWorkflow.config = { workflow: [ { handler: "silence", matchId: "ember-cli-page-object.old-collection-api"}, { handler: "silence", matchId: "ember-component.send-action"}, + { handler: "silence", matchId: "events.inherited-function-listeners"}, + { handler: "silence", matchId: "ember-polyfills.deprecate-merge"}, ] };
Ignore some new deprecations
diff --git a/pygerrit/client.py b/pygerrit/client.py index <HASH>..<HASH> 100644 --- a/pygerrit/client.py +++ b/pygerrit/client.py @@ -76,10 +76,9 @@ class GerritClient(object): data = decoder.decode(line) except ValueError, err: raise GerritError("Query returned invalid data: %s", err) - if "type" in data: - if data["type"] == "error": - raise GerritError("Query error: %s" % data["message"]) - else: + if "type" in data and data["type"] == "error": + raise GerritError("Query error: %s" % data["message"]) + elif "project" in data: results.append(Change(data)) return results
Only add query result lines to returned data Only add JSON lines in the results if they contain "project". Otherwise the "rowCount" line, and anything else, will be included in the results as an empty Change object. Change-Id: Ia4de4ed<I>c8f5ba<I>f5e<I>dd<I>ff<I>b<I>b<I>
diff --git a/use_generic_stat.go b/use_generic_stat.go index <HASH>..<HASH> 100644 --- a/use_generic_stat.go +++ b/use_generic_stat.go @@ -3,3 +3,8 @@ package times const hasPlatformSpecificStat = false + +// do not use, only here to prevent "undefined" method error. +func platformSpecficStat(name string) (Timespec, error) { + return nil, nil +}
fixed undefined platformSpecificStat for non-windows builds
diff --git a/devices.js b/devices.js index <HASH>..<HASH> 100755 --- a/devices.js +++ b/devices.js @@ -10151,7 +10151,7 @@ const devices = [ exposes: [e.lock(), e.battery()], }, { - zigbeeModel: ['YRD256 TSDB'], + zigbeeModel: ['YRD256 TSDB', 'YRD256L TSDB'], model: 'YRD256HA20BP', vendor: 'Yale', description: 'Assure lock SL',
Adds variant of yale<I> lock (YRD<I>HA<I>BP) (#<I>)
diff --git a/pkg/bpfdebug/drop.go b/pkg/bpfdebug/drop.go index <HASH>..<HASH> 100644 --- a/pkg/bpfdebug/drop.go +++ b/pkg/bpfdebug/drop.go @@ -81,7 +81,7 @@ func dropReason(reason uint8) string { return fmt.Sprintf("%d", reason) } -// DumpInfo https://techcrunch.com/2017/07/12/soundshroud/ +// DumpInfo prints a summary of the drop messages. func (n *DropNotify) DumpInfo(data []byte) { fmt.Printf("xx drop (%s) to endpoint %d, identity %d->%d: %s\n", dropReason(n.SubType), n.DstID, n.SrcLabel, n.DstLabel,
pkg/bpfdebug: fix errant c/p in DumpInfo func desc Replace typo with comment that describes what DumpInfo function does.
diff --git a/addon/controllers/detail-edit-form.js b/addon/controllers/detail-edit-form.js index <HASH>..<HASH> 100644 --- a/addon/controllers/detail-edit-form.js +++ b/addon/controllers/detail-edit-form.js @@ -198,7 +198,11 @@ export default EditFormController.extend({ flexberryDetailInteractionService.set('modelCurrentNotSaved', modelCurrentAgregator); } - this.transitionToRoute(modelAgregatorRoute); + if (modelAgregatorRoute.indexOf('.new') > 0 && modelCurrentAgregator.get('id')) { + modelAgregatorRoute = modelAgregatorRoute.slice(0, -4); + } + + this.transitionToRoute(modelAgregatorRoute, modelCurrentAgregator); } else { this._super.apply(this, arguments); }
Fix detail-edit-form controller transition to edit form
diff --git a/satpy/modifiers/angles.py b/satpy/modifiers/angles.py index <HASH>..<HASH> 100644 --- a/satpy/modifiers/angles.py +++ b/satpy/modifiers/angles.py @@ -251,9 +251,8 @@ def get_angles(data_arr: xr.DataArray) -> tuple[xr.DataArray, xr.DataArray, xr.D Args: data_arr: DataArray to get angles for. Information extracted from this object are ``.attrs["area"]``,``.attrs["start_time"]``, and - ``.attrs["orbital_parameters"]`` or the available - ``.attrs["satellite_longitude"]``, ``.attrs["satellite_latitude"]``, - and ``.attrs["satellite_altitude"]``. + ``.attrs["orbital_parameters"]``. See :func:`satpy.utils.get_satpos` + and :ref:`dataset_metadata` for more information. Additionally, the dask array chunk size is used when generating new arrays. The actual data of the object is not used.
Remove satellite_<lat/lon/alt> doc since deprecated
diff --git a/shared/actions/provision.js b/shared/actions/provision.js index <HASH>..<HASH> 100644 --- a/shared/actions/provision.js +++ b/shared/actions/provision.js @@ -365,16 +365,23 @@ class ProvisioningManager { } this._stashedResponse = null this._stashedResponseKey = null - // clear errors and nav to root always - return Saga.sequentially([ - Saga.put(ProvisionGen.createProvisionError({error: new HiddenString('')})), - Saga.put( - RouteTreeGen.createNavigateTo({ - parentPath: [], - path: doingDeviceAdd ? devicesRoot : [Tabs.loginTab], - }) - ), - ]) + + // clear errors always, and nav to root if we actually canceled something + return Saga.sequentially( + [ + Saga.put(ProvisionGen.createProvisionError({error: new HiddenString('')})), + ...(response + ? [ + Saga.put( + RouteTreeGen.createNavigateTo({ + parentPath: [], + path: doingDeviceAdd ? devicesRoot : [Tabs.loginTab], + }) + ), + ] + : []), + ].filter(Boolean) + ) } } }
dont nav if we didn't actually cancel anything (#<I>)
diff --git a/sparklingpandas/__init__.py b/sparklingpandas/__init__.py index <HASH>..<HASH> 100644 --- a/sparklingpandas/__init__.py +++ b/sparklingpandas/__init__.py @@ -56,7 +56,7 @@ if 'IS_TEST' not in os.environ and "JARS" not in os.environ: try: jar = filter(lambda path: os.path.exists(path), jars)[0] except IndexError: - raise IOError("Failed to find jars " + str(jar)) + raise IOError("Failed to find jars.") os.environ["JARS"] = jar os.environ["PYSPARK_SUBMIT_ARGS"] = ("--jars %s --driver-class-path %s" + " pyspark-shell") % (jar, jar)
Fix error message to not rely on the variable we failed to define.
diff --git a/capture/genBitmaps.js b/capture/genBitmaps.js index <HASH>..<HASH> 100644 --- a/capture/genBitmaps.js +++ b/capture/genBitmaps.js @@ -123,6 +123,10 @@ function processScenario (casper, scenario, scenarioOrVariantLabel, scenarioLabe casper.each(viewports, function (casper, vp, viewportIndex) { this.then(function () { + var onBeforeScript = scenario.onBeforeScript || config.onBeforeScript; + if (onBeforeScript) { + require(getScriptPath(onBeforeScript))(casper, scenario, vp, isReference); + } this.viewport(vp.width || vp.viewport.width, vp.height || vp.viewport.height); }); @@ -131,11 +135,6 @@ function processScenario (casper, scenario, scenarioOrVariantLabel, scenarioLabe url = scenario.referenceUrl; } - var onBeforeScript = scenario.onBeforeScript || config.onBeforeScript; - if (onBeforeScript) { - require(getScriptPath(onBeforeScript))(casper, scenario, vp, isReference); - } - this.thenOpen(url, function () { casper.waitFor( function () { // test
Add cookies to bitmaps after each scenario has run (#<I>) This is awesome -- thanks Shane!!!
diff --git a/pwkit/environments/casa/spwglue.py b/pwkit/environments/casa/spwglue.py index <HASH>..<HASH> 100644 --- a/pwkit/environments/casa/spwglue.py +++ b/pwkit/environments/casa/spwglue.py @@ -183,7 +183,7 @@ class Config (ParseKeywords): # empty - column should be empty (ndim = -1) _spw_match_cols = frozenset ('MEAS_FREQ_REF FLAG_ROW FREQ_GROUP FREQ_GROUP_NAME ' 'IF_CONV_CHAIN NET_SIDEBAND BBC_NO'.split ()) -_spw_first_cols = frozenset ('REF_FREQUENCY NAME'.split ()) +_spw_first_cols = frozenset ('DOPPLER_ID REF_FREQUENCY NAME'.split ()) _spw_scsum_cols = frozenset ('NUM_CHAN TOTAL_BANDWIDTH'.split ()) _spw_concat_cols = frozenset ('CHAN_FREQ CHAN_WIDTH EFFECTIVE_BW RESOLUTION'.split ()) _spw_empty_cols = frozenset ('ASSOC_SPW_ID ASSOC_NATURE'.split ())
pwkit/environments/casa/spwglue.py: handle importvla datasets
diff --git a/nodeconductor/core/views.py b/nodeconductor/core/views.py index <HASH>..<HASH> 100644 --- a/nodeconductor/core/views.py +++ b/nodeconductor/core/views.py @@ -280,9 +280,9 @@ class ActionsViewSet(viewsets.ModelViewSet): # check if action is allowed if self.action in getattr(self, 'disabled_actions', []): raise exceptions.MethodNotAllowed(method=request.method) - self.validate_object_action(self.get_object(), self.action) + self.validate_object_action(self.action) - def validate_object_action(self, obj, action_name): + def validate_object_action(self, action_name, obj=None): """ Execute validation for actions that are related to particular object """ action_method = getattr(self, action_name) if not getattr(action_method, 'detail', False) and action_name not in ('update', 'partial_update', 'destroy'): @@ -291,7 +291,7 @@ class ActionsViewSet(viewsets.ModelViewSet): return validators = getattr(self, action_name + '_validators', []) for validator in validators: - validator(obj) + validator(obj or self.get_object()) class ReadOnlyActionsViewSet(ActionsViewSet):
Fix validate_object_action method call - wal-<I>
diff --git a/test-app/runtime/src/main/java/com/tns/Runtime.java b/test-app/runtime/src/main/java/com/tns/Runtime.java index <HASH>..<HASH> 100644 --- a/test-app/runtime/src/main/java/com/tns/Runtime.java +++ b/test-app/runtime/src/main/java/com/tns/Runtime.java @@ -284,7 +284,7 @@ public class Runtime { ex.printStackTrace(ps); try { - content = baos.toString("US-ASCII"); + content = baos.toString("UTF-8"); if (ex instanceof NativeScriptException) { content = getStackTraceOnly(content); content = ((NativeScriptException) ex).getIncomingStackTrace() + content;
Remove usage of ASCII encoding
diff --git a/lib/middleman/version.rb b/lib/middleman/version.rb index <HASH>..<HASH> 100644 --- a/lib/middleman/version.rb +++ b/lib/middleman/version.rb @@ -4,7 +4,7 @@ require "rubygems" module Middleman # Current Version # @return [String] - VERSION = "3.0.0.alpha.4" + VERSION = "3.0.0.alpha.5" # Parsed version for RubyGems # @private
final <I> alpha, hopefully
diff --git a/src/Response/Api/BaseResponse.php b/src/Response/Api/BaseResponse.php index <HASH>..<HASH> 100644 --- a/src/Response/Api/BaseResponse.php +++ b/src/Response/Api/BaseResponse.php @@ -10,6 +10,7 @@ namespace ZEROSPAM\Framework\SDK\Response\Api; use Carbon\Carbon; use ZEROSPAM\Framework\SDK\Response\Api\Helper\RateLimitedTrait; +use ZEROSPAM\Framework\SDK\Utils\Contracts\Arrayable; use ZEROSPAM\Framework\SDK\Utils\Str; /** @@ -20,7 +21,7 @@ use ZEROSPAM\Framework\SDK\Utils\Str; * * @package ZEROSPAM\Framework\SDK\Response\Api */ -abstract class BaseResponse implements IRateLimitedResponse +abstract class BaseResponse implements IRateLimitedResponse, Arrayable { use RateLimitedTrait; @@ -139,4 +140,14 @@ abstract class BaseResponse implements IRateLimitedResponse { return $this->get($name); } + + /** + * Return the object as Array. + * + * @return array + */ + public function toArray(): array + { + return $this->data; + } }
perf(Response): Makes response arrayable
diff --git a/lib/go/thrift/framed_transport.go b/lib/go/thrift/framed_transport.go index <HASH>..<HASH> 100644 --- a/lib/go/thrift/framed_transport.go +++ b/lib/go/thrift/framed_transport.go @@ -141,11 +141,13 @@ func (p *TFramedTransport) Flush() error { binary.BigEndian.PutUint32(buf, uint32(size)) _, err := p.transport.Write(buf) if err != nil { + p.buf.Truncate(0) return NewTTransportExceptionFromError(err) } if size > 0 { if n, err := p.buf.WriteTo(p.transport); err != nil { print("Error while flushing write buffer of size ", size, " to transport, only wrote ", n, " bytes: ", err.Error(), "\n") + p.buf.Truncate(0) return NewTTransportExceptionFromError(err) } }
THRIFT-<I> Golang TFramedTransport's writeBuffer increases if writes to transport failed Client: Go
diff --git a/lib/devise/controllers/helpers.rb b/lib/devise/controllers/helpers.rb index <HASH>..<HASH> 100644 --- a/lib/devise/controllers/helpers.rb +++ b/lib/devise/controllers/helpers.rb @@ -97,15 +97,17 @@ module Devise end # Render a view for the specified scope. Turned off by default. - def render_with_scope(action) + # Accepts just :controller as option. + def render_with_scope(action, options={}) +  controller_name = options.delete(:controller) || self.controller_name if Devise.scoped_views begin render :template => "#{controller_name}/#{devise_mapping.as}/#{action}" rescue ActionView::MissingTemplate - render action + render action, :controller => controller_name end else - render action + render action, :controller => controller_name end end
Allow :controller to be given to render_with_scope.
diff --git a/lib/lol/client.rb b/lib/lol/client.rb index <HASH>..<HASH> 100644 --- a/lib/lol/client.rb +++ b/lib/lol/client.rb @@ -53,6 +53,10 @@ module Lol @static_request ||= StaticRequest.new(api_key, region, cache_store) end + def lol_status + @lol_status ||= LolStatusRequest.new(region, cache_store) + end + # Initializes a Lol::Client # @param api_key [String] # @param options [Hash] diff --git a/spec/lol/client_spec.rb b/spec/lol/client_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lol/client_spec.rb +++ b/spec/lol/client_spec.rb @@ -155,6 +155,12 @@ describe Client do end end + describe '#lol_status' do + it 'return an instance of LolStatusRequest' do + expect(subject.lol_status).to be_a(LolStatusRequest) + end + end + describe "#api_key" do it "returns an api key" do expect(subject.api_key).to eq("foo")
Add lol_status_request to client
diff --git a/src/Commands/ShowCommand.php b/src/Commands/ShowCommand.php index <HASH>..<HASH> 100644 --- a/src/Commands/ShowCommand.php +++ b/src/Commands/ShowCommand.php @@ -103,13 +103,20 @@ class ShowCommand extends Command } } - // Now that we collected all values that matches the keyword argument - // in a close match, we collect the values for the rest of the - // languages for the found keys to complete the table view. + // Now that we collected all existing values, we are going to + // fill the missing ones with emptiness indicators to + // balance the table structure & alert developers. foreach ($output as $key => $values) { + $original = []; + foreach ($allLanguages as $languageKey) { - $output[$key][$languageKey] = $values[$languageKey] ?? '<bg=red> MISSING </>'; + $original[$languageKey] = $values[$languageKey] ?? '<bg=red> MISSING </>'; } + + // Sort the language values based on language name + ksort($original); + + $output[$key] = array_merge(['key' => $key], $original); } return array_values($output);
insure console table presents lines in correct order
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ classifiers = ['Development Status :: 3 - Alpha', 'Operating System :: OS Independent'] required = ['numpy>=1.7.1', 'scipy>=0.12.0', 'matplotlib>=1.2.1', - 'Theano>=0.6.1dev'] + 'Theano==0.6.0rc5'] if __name__ == "__main__": ## Current release of Theano does not support python 3, so need
Updated Theano dependency to <I>rc5.
diff --git a/lib/jekyll/converters/markdown.rb b/lib/jekyll/converters/markdown.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll/converters/markdown.rb +++ b/lib/jekyll/converters/markdown.rb @@ -20,7 +20,7 @@ module Jekyll else $stderr.puts "Invalid Markdown processor: #{@config['markdown']}" $stderr.puts " Valid options are [ maruku | rdiscount | kramdown | redcarpet ]" - raise FatalException.new("Invalid Markdown process: #{@config['markdown']}") + raise FatalException, "Invalid Markdown process: #{@config['markdown']}" end @setup = true end
New is implied by `raise`, 2nd is the message.
diff --git a/src/Html5FileUploadViewBridge.js b/src/Html5FileUploadViewBridge.js index <HASH>..<HASH> 100644 --- a/src/Html5FileUploadViewBridge.js +++ b/src/Html5FileUploadViewBridge.js @@ -1,8 +1,8 @@ window.rhubarb.vb.create("Html5FileUploadViewBridge", function(parent){ return { - onReady: function () { - parent.onReady.call(this); + attachEvents: function () { + parent.attachEvents.call(this); if (this.supportsHtml5Uploads()) { this.originalFileInput = this.viewNode.querySelector("input[type=file]");
Fix to support reRender of hosting parent
diff --git a/tests/integration/states/file.py b/tests/integration/states/file.py index <HASH>..<HASH> 100644 --- a/tests/integration/states/file.py +++ b/tests/integration/states/file.py @@ -413,7 +413,7 @@ class FileTest(integration.ModuleCase): fp.write(src) ret = self.run_state('file.patch', name=src_file, - source='salt://{}.patch'.format(patch_name), + source='salt://{0}.patch'.format(patch_name), hash='md5=f0ef7081e1539ac00ef5b761b4fb01b3', ) return src_file, ret @@ -427,7 +427,7 @@ class FileTest(integration.ModuleCase): def test_patch_hash_mismatch(self): src_file, ret = self.do_patch('hello_dolly') result = self.state_result(ret, raw=True) - msg = 'File {} hash mismatch after patch was applied'.format(src_file) + msg = 'File {0} hash mismatch after patch was applied'.format(src_file) self.assertEqual(result['comment'], msg) self.assertEqual(result['result'], False)
Fix python <I> compat issue in tests
diff --git a/bcbio/pipeline/rnaseq.py b/bcbio/pipeline/rnaseq.py index <HASH>..<HASH> 100644 --- a/bcbio/pipeline/rnaseq.py +++ b/bcbio/pipeline/rnaseq.py @@ -49,9 +49,10 @@ def quantitate_expression_noparallel(samples, run_parallel): """ run transcript quantitation for algorithms that don't run in parallel """ + data = samples[0][0] samples = run_parallel("run_express", samples) samples = run_parallel("run_dexseq", samples) - if "sailfish" in dd.get_expression_caller(samples[0]): + if "sailfish" in dd.get_expression_caller(data): samples = run_parallel("run_sailfish", samples) return samples
Look up expression_caller in the dictionary properly.
diff --git a/lib/page/format-properties/format-properties.unit.spec.js b/lib/page/format-properties/format-properties.unit.spec.js index <HASH>..<HASH> 100644 --- a/lib/page/format-properties/format-properties.unit.spec.js +++ b/lib/page/format-properties/format-properties.unit.spec.js @@ -11,9 +11,6 @@ const formatProperties = proxyquire('./format-properties', { const userData = (input) => { return { - getUserData: () => input, - getUserParams: () => ({}), - getAllData: () => ({}), getScopedUserData: (params = {}) => { const param = Object.assign({ x: 'param_value'
Remove unnecessary methods from mocked userData object passed to formatProperties tests
diff --git a/openquake/engine/engine.py b/openquake/engine/engine.py index <HASH>..<HASH> 100644 --- a/openquake/engine/engine.py +++ b/openquake/engine/engine.py @@ -146,6 +146,8 @@ def expose_outputs(dstore, owner=getpass.getuser(), status='complete'): if oq.conditional_loss_poes: # expose loss_maps outputs if 'loss_curves-stats' in dstore: dskeys.add('loss_maps-stats') + if len(dstore['csm_info/sg_data']) == 1: # do not export a single group + dskeys.remove('sourcegroups') if 'all_loss_ratios' in dskeys: dskeys.remove('all_loss_ratios') # export only specific IDs if 'ruptures' in dskeys and 'scenario' in calcmode:
Do not export sourcegroups if there is only one of them [skip hazardlib][demos] Former-commit-id: e<I>eeeb7fabd<I>c<I>bb<I>e<I>
diff --git a/tasks/ant_sfdc.js b/tasks/ant_sfdc.js index <HASH>..<HASH> 100644 --- a/tasks/ant_sfdc.js +++ b/tasks/ant_sfdc.js @@ -85,11 +85,10 @@ module.exports = function(grunt) { args.push(task); grunt.log.debug('ANT CMD: ant ' + args.join(' ')); grunt.log.writeln('Starting ANT ' + task + '...'); - grunt.util.spawn({ + var ant = grunt.util.spawn({ cmd: 'ant', args: args }, function(error, result, code) { - grunt.log.debug(String(result.stdout)); if(error) { grunt.log.error(error); } else { @@ -97,6 +96,12 @@ module.exports = function(grunt) { } done(error, result); }); + ant.stdout.on('data', function(data) { + grunt.log.write(data); + }); + ant.stderr.on('data', function(data) { + grunt.log.error(data); + }); } function buildPackageXml(pkg, version) {
Log ant output to grunt as it's generated Log ant's stdout and stderr output to grunt as it's generated. This allows long deploys to proceed on Travis CI, which kills builds with no output for <I> minutes.
diff --git a/faq-bundle/contao/dca/tl_faq_category.php b/faq-bundle/contao/dca/tl_faq_category.php index <HASH>..<HASH> 100644 --- a/faq-bundle/contao/dca/tl_faq_category.php +++ b/faq-bundle/contao/dca/tl_faq_category.php @@ -68,16 +68,14 @@ $GLOBALS['TL_DCA']['tl_faq_category'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_faq_category']['edit'], 'href' => 'table=tl_faq', - 'icon' => 'edit.gif', - 'attributes' => 'class="contextmenu"' + 'icon' => 'edit.gif' ), 'editheader' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_faq_category']['editheader'], 'href' => 'act=edit', 'icon' => 'header.gif', - 'button_callback' => array('tl_faq_category', 'editHeader'), - 'attributes' => 'class="edit-header"' + 'button_callback' => array('tl_faq_category', 'editHeader') ), 'copy' => array (
[Faq] `[Alt] + [Shift] + click` elements to edit their header data
diff --git a/landsat/utils.py b/landsat/utils.py index <HASH>..<HASH> 100644 --- a/landsat/utils.py +++ b/landsat/utils.py @@ -149,7 +149,11 @@ def convert_to_integer_list(value): """ convert a comma separate string to a list where all values are integers """ if value and isinstance(value, str): - new_list = re.findall('[0-9]', value) + if ',' in value: + value = re.sub('[^0-9,]', '', value) + new_list = value.split(',') + else: + new_list = re.findall('[0-9]', value) return new_list if new_list else None else: return value
handle comma for double digit bands
diff --git a/paypal/pro/forms.py b/paypal/pro/forms.py index <HASH>..<HASH> 100644 --- a/paypal/pro/forms.py +++ b/paypal/pro/forms.py @@ -12,13 +12,13 @@ from paypal.utils import warn_untested class PaymentForm(forms.Form): """Form used to process direct payments.""" - firstname = forms.CharField(255, label=_("First Name")) - lastname = forms.CharField(255, label=_("Last Name")) - street = forms.CharField(255, label=_("Street Address")) - city = forms.CharField(255, label=_("City")) - state = forms.CharField(255, label=_("State")) + firstname = forms.CharField(max_length=255, label=_("First Name")) + lastname = forms.CharField(max_length=255, label=_("Last Name")) + street = forms.CharField(max_length=255, label=_("Street Address")) + city = forms.CharField(max_length=255, label=_("City")) + state = forms.CharField(max_length=255, label=_("State")) countrycode = CountryField(label=_("Country"), initial="US") - zip = forms.CharField(32, label=_("Postal / Zip Code")) + zip = forms.CharField(max_length=32, label=_("Postal / Zip Code")) acct = CreditCardField(label=_("Credit Card Number")) expdate = CreditCardExpiryField(label=_("Expiration Date")) cvv2 = CreditCardCVV2Field(label=_("Card Security Code"))
Fixed a Django <I> incompatiblity
diff --git a/app/lib/ServerNodes.java b/app/lib/ServerNodes.java index <HASH>..<HASH> 100644 --- a/app/lib/ServerNodes.java +++ b/app/lib/ServerNodes.java @@ -44,7 +44,7 @@ public class ServerNodes { configuredNodes.put(configuredNode, configuredNode); } - log.info("Creating ServerNodes with initial nodes {}", configuredNodes.keySet()); + log.debug("Creating ServerNodes with initial nodes {}", configuredNodes.keySet()); // resolve the configured nodes: // we only know a transport address where we can reach them, but we don't know any node ids yet. // thus we do not know anything about them, and cannot even match them to node information coming
lower log level to not scare users :)
diff --git a/lib/hemp/version.rb b/lib/hemp/version.rb index <HASH>..<HASH> 100644 --- a/lib/hemp/version.rb +++ b/lib/hemp/version.rb @@ -1,3 +1,3 @@ module Hemp - VERSION = "0.1.0" + VERSION = "1.0.0".freeze end
Changed version information and pushed to Rubygems
diff --git a/base/src/main/java/uk/ac/ebi/atlas/utils/ColourGradient.java b/base/src/main/java/uk/ac/ebi/atlas/utils/ColourGradient.java index <HASH>..<HASH> 100644 --- a/base/src/main/java/uk/ac/ebi/atlas/utils/ColourGradient.java +++ b/base/src/main/java/uk/ac/ebi/atlas/utils/ColourGradient.java @@ -7,7 +7,9 @@ import java.awt.Color; public class ColourGradient { public static String getGradientColour(double value, double min, double max, String lowValueColourString, String highValueColourString) { - Preconditions.checkArgument(value >= min && value <= max); + Preconditions.checkArgument( + value >= 0.0 && value >= min && value <= max || + value < 0 && value <= min && value >= max); Color lowValueColour = getColour(lowValueColourString); Color highValueColour = getColour(highValueColourString);
Fix checking if value is within min and max
diff --git a/lib/ProMotion/classes/Screen.rb b/lib/ProMotion/classes/Screen.rb index <HASH>..<HASH> 100644 --- a/lib/ProMotion/classes/Screen.rb +++ b/lib/ProMotion/classes/Screen.rb @@ -11,6 +11,13 @@ module ProMotion def view return self.view_controller.view end + + def set_attributes(element, args = {}) + args.each do |k, v| + element.k = v if element.respond_to? "#{k}=" + end + element + end end module ScreenNavigation
Added a little helper for setting view element properties easily (set_attributes)
diff --git a/nmea.js b/nmea.js index <HASH>..<HASH> 100644 --- a/nmea.js +++ b/nmea.js @@ -91,7 +91,7 @@ exports.parsers = { // $GPGSV,3,1,12, 05,58,322,36, 02,55,032,, 26,50,173,, 04,31,085, var numRecords = (fields.length - 4) / 4, sats = []; - for (var i=1; i < numRecords; i++) { + for (var i=0; i < numRecords; i++) { var offset = i * 4 + 4; sats.push({id: fields[offset], elevationDeg: +fields[offset+1],
Catch the first satellite id in GSV
diff --git a/src/LearnositySdk/Utils/Uuid.php b/src/LearnositySdk/Utils/Uuid.php index <HASH>..<HASH> 100644 --- a/src/LearnositySdk/Utils/Uuid.php +++ b/src/LearnositySdk/Utils/Uuid.php @@ -2,6 +2,7 @@ namespace LearnositySdk\Utils; +// Loads PHP5 polyfill for random_bytes(). See self::uuidv4() declaration for more. require_once __DIR__ . '/../../../vendor/paragonie/random_compat/lib/random.php'; // Thanks to Andrew Moore http://www.php.net/manual/en/function.uniqid.php#94959 @@ -20,8 +21,11 @@ class Uuid case 'v5': return self::v5($namespace, $name); break; + case 'uuidv4': + return self::uuidv4($namespace, $name); + break; default: - return self::v4(); + return self::uuidv4(); break; } }
Fixed issue where uuidv4() wasn't being called
diff --git a/lib/geocoder/lookups/google.rb b/lib/geocoder/lookups/google.rb index <HASH>..<HASH> 100644 --- a/lib/geocoder/lookups/google.rb +++ b/lib/geocoder/lookups/google.rb @@ -40,6 +40,12 @@ module Geocoder::Lookup unless (bounds = query.options[:bounds]).nil? params[:bounds] = bounds.map{ |point| "%f,%f" % point }.join('|') end + unless (region = query.options[:region]).nil? + params[:region] = region + end + unless (components = query.options[:components]).nil? + params[:components] = components + end params end
pass region and components to google geocode query url
diff --git a/src/support/forge/api/Import.php b/src/support/forge/api/Import.php index <HASH>..<HASH> 100644 --- a/src/support/forge/api/Import.php +++ b/src/support/forge/api/Import.php @@ -498,7 +498,7 @@ class Import extract($item); $row = []; $row[] = $apiName . "(" . (empty($operation['parameters']) ? '' : 'array') . ")"; - $row[] = " \[{$operation['httpMethod']}\] {$operation['uri']} "; + $row[] = " \[{$operation['httpMethod']}\] /{$operation['uri']} "; $row[] = implode("<br/>", array_keys($operation['parameters'])); $row[] = $this->sanitizeDescription($api['request']['description']); $row[] = '';
[doc] Add / before enpoints
diff --git a/napalm_logs/listener_proc.py b/napalm_logs/listener_proc.py index <HASH>..<HASH> 100644 --- a/napalm_logs/listener_proc.py +++ b/napalm_logs/listener_proc.py @@ -52,6 +52,8 @@ class NapalmLogsListenerProc(NapalmLogsProc): Setup the transport. ''' listener_class = get_listener(self._listener_type) + self.address = self.listener_opts.pop('address', self.address) + self.port = self.listener_opts.pop('port', self.port) self.listener = listener_class(self.address, self.port, **self.listener_opts)
Fix #<I>: Use the most specific address and port options for the listener
diff --git a/airflow/providers/amazon/aws/hooks/s3.py b/airflow/providers/amazon/aws/hooks/s3.py index <HASH>..<HASH> 100644 --- a/airflow/providers/amazon/aws/hooks/s3.py +++ b/airflow/providers/amazon/aws/hooks/s3.py @@ -514,6 +514,7 @@ class S3Hook(AwsBaseHook): bytes_data = string_data.encode(encoding) file_obj = io.BytesIO(bytes_data) self._upload_file_obj(file_obj, key, bucket_name, replace, encrypt, acl_policy) + file_obj.close() @provide_bucket_name @unify_bucket_name_and_key @@ -548,6 +549,7 @@ class S3Hook(AwsBaseHook): """ file_obj = io.BytesIO(bytes_data) self._upload_file_obj(file_obj, key, bucket_name, replace, encrypt, acl_policy) + file_obj.close() @provide_bucket_name @unify_bucket_name_and_key
Close/Flush byte stream in s3 hook load_string and load_bytes (#<I>)
diff --git a/state/watcher.go b/state/watcher.go index <HASH>..<HASH> 100644 --- a/state/watcher.go +++ b/state/watcher.go @@ -1703,7 +1703,7 @@ func (w *machineInterfacesWatcher) Changes() <-chan struct{} { return w.out } -// initial retrieves the currently know interfaces and stores +// initial retrieves the currently known interfaces and stores // them together with their activation. func (w *machineInterfacesWatcher) initial() (map[bson.ObjectId]bool, error) { known := make(map[bson.ObjectId]bool)
Quickly fixed one typo of the last PR. ;)
diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py index <HASH>..<HASH> 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py @@ -313,7 +313,7 @@ if DEBUG: TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', - ), + ) else: TEMPLATE_LOADERS = ( ('django.template.loaders.cached.Loader', (
a comma to much - is no more.
diff --git a/cobra/core/model.py b/cobra/core/model.py index <HASH>..<HASH> 100644 --- a/cobra/core/model.py +++ b/cobra/core/model.py @@ -644,7 +644,7 @@ class Model(Object): def objective(self, value): if isinstance(value, sympy.Basic): value = self.solver.interface.Objective(value, sloppy=False) - if not isinstance(value, (dict, self.solver.interface.Objective)): + if not isinstance(value, (dict, optlang.interface.Objective)): value = {rxn: 1 for rxn in self.reactions.get_by_any(value)} set_objective(self, value, additive=False) diff --git a/cobra/util/solver.py b/cobra/util/solver.py index <HASH>..<HASH> 100644 --- a/cobra/util/solver.py +++ b/cobra/util/solver.py @@ -137,7 +137,7 @@ def set_objective(model, value, additive=False): {reaction.forward_variable: coef, reaction.reverse_variable: -coef}) - elif isinstance(value, (sympy.Basic, model.solver.interface.Objective)): + elif isinstance(value, (sympy.Basic, optlang.interface.Objective)): if isinstance(value, sympy.Basic): value = interface.Objective( value, direction=model.solver.objective.direction,
Fix instance checking for Objective (#<I>)
diff --git a/lib/ReactViews/Map/Panels/SharePanel/BuildShareLink.js b/lib/ReactViews/Map/Panels/SharePanel/BuildShareLink.js index <HASH>..<HASH> 100644 --- a/lib/ReactViews/Map/Panels/SharePanel/BuildShareLink.js +++ b/lib/ReactViews/Map/Panels/SharePanel/BuildShareLink.js @@ -199,7 +199,7 @@ function addViewSettings(viewState, initSources) { viewerMode: viewerMode, currentTime: time, sharedFromExplorerPanel: viewState.explorerPanelIsVisible, - previewedItemId: defined(viewState.previewedItem) && viewState.previewedItem.id + previewedItemId: defined(viewState.previewedItem) && (viewState.previewedItem.id || viewState.previewedItem.uniqueId) }; if (terria.showSplitter) { terriaSettings.showSplitter = terria.showSplitter;
Fix bug on CatalogGroups without ID Pre-mobx working around model behaviour in ui instead of in model
diff --git a/packages/ember-extension-support/lib/data_adapter.js b/packages/ember-extension-support/lib/data_adapter.js index <HASH>..<HASH> 100644 --- a/packages/ember-extension-support/lib/data_adapter.js +++ b/packages/ember-extension-support/lib/data_adapter.js @@ -302,9 +302,7 @@ export default EmberObject.extend({ addArrayObserver(records, this, observer); - function release() { - removeArrayObserver(records, this, observer); - } + let release = () => removeArrayObserver(records, this, observer); return release; },
Bind the watchModelTypes's release function to `this` so it correctly removes the array observers
diff --git a/spec/controllers/deal_redemptions/admin/redemptions_controller_spec.rb b/spec/controllers/deal_redemptions/admin/redemptions_controller_spec.rb index <HASH>..<HASH> 100644 --- a/spec/controllers/deal_redemptions/admin/redemptions_controller_spec.rb +++ b/spec/controllers/deal_redemptions/admin/redemptions_controller_spec.rb @@ -45,18 +45,25 @@ module DealRedemptions FactoryGirl.create(:redeem_transaction_3)] end - describe "GET index" do + describe "GET #index" do it "assigns all transactions as @transactions" do get :index, {}, valid_session expect(assigns(:transactions)).to eq(@transaction) end end - describe "GET show" do - it "assigns the requested transaction as @transaction" do + describe "GET #show" do + before(:each) do get :show, {:id => @transaction[0].id}, valid_session + end + + it "assigns the requested transaction as @transaction" do expect(assigns(:transaction)).to eq(@transaction[0]) end + + it "assigns redemption to @redemption to display user info" do + expect(assigns(:redemption)).to eq(@transaction[0].redemption[0]) + end end end
test to make sure redemption is assigned a instance variable in the controller
diff --git a/lib/ffi-gobject/value.rb b/lib/ffi-gobject/value.rb index <HASH>..<HASH> 100644 --- a/lib/ffi-gobject/value.rb +++ b/lib/ffi-gobject/value.rb @@ -18,11 +18,13 @@ module GObject def self.make_finalizer(struct, gtype) proc do ptr = struct.to_ptr - ptr.autorelease = false - unless struct[:g_type] == TYPE_INVALID - GObject::Lib.g_value_unset ptr + if ptr.autorelease? + ptr.autorelease = false + unless struct[:g_type] == TYPE_INVALID + GObject::Lib.g_value_unset ptr + end + GObject.boxed_free gtype, ptr end - GObject.boxed_free gtype, ptr end end @@ -111,6 +113,12 @@ module GObject end end + def self.copy_value_to_pointer(value, pointer, offset = 0) + super(value, pointer, offset).tap do |result| + value.to_ptr.autorelease = false if value + end + end + private def set_ruby_value(val)
Do not free GObject::Value that has been copied
diff --git a/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java b/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java +++ b/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java @@ -131,7 +131,8 @@ public class WalletAppKit extends AbstractIdleService { /** * If you want to learn about the sync process, you can provide a listener here. For instance, a - * {@link DownloadListener} is a good choice. + * {@link DownloadListener} is a good choice. This has no effect unless setBlockingStartup(false) has been called + * too, due to some missing implementation code. */ public WalletAppKit setDownloadListener(PeerEventListener listener) { this.downloadListener = listener;
WAK: add note in javadoc about missing feature.