diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/Geometry/rectangle.py b/Geometry/rectangle.py index <HASH>..<HASH> 100644 --- a/Geometry/rectangle.py +++ b/Geometry/rectangle.py @@ -8,10 +8,11 @@ Provides an implementation of a rectangle designed to be easy to use: import random import math -from .point import Point +from .point2 import Point from .exceptions import * + class Rectangle(object): ''' Implements a Rectangle object in the XY plane defined by @@ -21,11 +22,6 @@ class Rectangle(object): Note: Origin may have a non-zero z coordinate. ''' - vertexNames = 'ABCD' - vertexNameA = vertexNames[0] - vertexNameB = vertexNames[1] - vertexNameC = vertexNames[2] - vertexNameD = vertexNames[3] @classmethod def randomSizeAndLocation(cls, radius, widthLimits, @@ -71,7 +67,7 @@ class Rectangle(object): height, Point.randomLocation(radius, origin)) - def __init__(self, origin=None, width=1, height=1): + def __init__(self, origin=None, width=1, height=1, theta=0): ''' :param: width - float X distance from origin.x :param: height - float Y distance from origin.y
added support for new Point, beginning of rotations
diff --git a/lib/travis/services/find_repo_settings.rb b/lib/travis/services/find_repo_settings.rb index <HASH>..<HASH> 100644 --- a/lib/travis/services/find_repo_settings.rb +++ b/lib/travis/services/find_repo_settings.rb @@ -4,7 +4,7 @@ module Travis register :find_repo_settings def run(options = {}) - result if authorized? + result if repo && authorized? end def updated_at diff --git a/spec/travis/services/find_repo_settings_spec.rb b/spec/travis/services/find_repo_settings_spec.rb index <HASH>..<HASH> 100644 --- a/spec/travis/services/find_repo_settings_spec.rb +++ b/spec/travis/services/find_repo_settings_spec.rb @@ -22,6 +22,11 @@ describe Travis::Services::FindRepoSettings do end describe 'run' do + it 'should return nil without a repo' do + repo.destroy + service.run.should be_nil + end + it 'should return repo settings' do user.permissions.create(repository_id: repo.id, push: true) service.run.to_hash.should == Repository::Settings.defaults.deep_merge({ 'foo' => 'bar' })
Return nil from find_repo_settings service if repo can't be find
diff --git a/integration/cluster.go b/integration/cluster.go index <HASH>..<HASH> 100644 --- a/integration/cluster.go +++ b/integration/cluster.go @@ -837,6 +837,7 @@ func NewClusterV3(t *testing.T, cfg *ClusterConfig) *ClusterV3 { clus := &ClusterV3{ cluster: NewClusterByConfig(t, cfg), } + clus.Launch(t) for _, m := range clus.Members { client, err := NewClientV3(m) if err != nil { @@ -844,7 +845,6 @@ func NewClusterV3(t *testing.T, cfg *ClusterConfig) *ClusterV3 { } clus.clients = append(clus.clients, client) } - clus.Launch(t) return clus }
integration: NewClusterV3 should launch cluster before creating clients
diff --git a/src/components/TableBody.js b/src/components/TableBody.js index <HASH>..<HASH> 100644 --- a/src/components/TableBody.js +++ b/src/components/TableBody.js @@ -55,13 +55,7 @@ class TableBody extends React.Component { const toIndex = Math.min(count, (page + 1) * rowsPerPage); if (page > totalPages && totalPages !== 0) { - throw new Error( - 'Provided options.page of `' + - page + - '` is greater than the total available page length of `' + - totalPages + - '`', - ); + console.warn('Current page is out of range.'); } for (let rowIndex = fromIndex; rowIndex < count && rowIndex < toIndex; rowIndex++) {
Issue warning insteaf of throwing an error (#<I>) We have a means to clean up the page out of bounds issue elsewhere, so this error is no longer needed and was causing breakage in certain circumstances.
diff --git a/salt/states/file.py b/salt/states/file.py index <HASH>..<HASH> 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -2199,7 +2199,7 @@ def replace(name, not_found_content=None, backup='.bak', show_changes=True): - ''' + r''' Maintain an edit in a file .. versionadded:: 0.17.0 @@ -2207,6 +2207,17 @@ def replace(name, Params are identical to the remote execution function :mod:`file.replace <salt.modules.file.replace>`. + For complex regex patterns it can be useful to avoid the need for complex + quoting and escape sequences by making use of YAML's multiline string + syntax. + + .. code-block:: yaml + + complex_search_and_replace: + file.replace: + # <...snip...> + - pattern: | + CentOS \(2.6.32[^\n]+\n\s+root[^\n]+\n\)+ ''' ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}
Added note to file.replace about avoiding quoting and escaping in YAML
diff --git a/tests/test_integrated_channels/test_canvas/test_client.py b/tests/test_integrated_channels/test_canvas/test_client.py index <HASH>..<HASH> 100644 --- a/tests/test_integrated_channels/test_canvas/test_client.py +++ b/tests/test_integrated_channels/test_canvas/test_client.py @@ -19,7 +19,7 @@ NOW = datetime.datetime(2017, 1, 2, 3, 4, 5, tzinfo=timezone.utc) NOW_TIMESTAMP_FORMATTED = NOW.strftime('%F') -@freeze_time(NOW) +@freeze_time(NOW)z @pytest.mark.django_db @pytest.mark.skip('Can only run once key field is removed from db, since it was marked Not Null') class TestCanvasApiClient(unittest.TestCase):
add canvas to installed_apps for test env
diff --git a/build/deps.js b/build/deps.js index <HASH>..<HASH> 100644 --- a/build/deps.js +++ b/build/deps.js @@ -34,6 +34,7 @@ var deps = { Extensions: { src: [ 'ext/LatLngUtil.js', + 'ext/PolygonUtil.js', 'ext/LineUtil.Intersect.js', 'ext/Polyline.Intersect.js', 'ext/Polygon.Intersect.js'
Including the PolygonUtil file in the dependencies config so it is included in the build.
diff --git a/spec/xpath_spec.rb b/spec/xpath_spec.rb index <HASH>..<HASH> 100644 --- a/spec/xpath_spec.rb +++ b/spec/xpath_spec.rb @@ -155,6 +155,19 @@ describe Capybara::XPath do @driver.find(@query).first.value.should == 'seeekrit' end end + + describe '#button' do + it "should find a button by id or content" do + @query = @xpath.button('awe123').to_s + @driver.find(@query).first.value.should == 'awesome' + @query = @xpath.button('okay556').to_s + @driver.find(@query).first.value.should == 'okay' + @query = @xpath.button('click_me_123').to_s + @driver.find(@query).first.value.should == 'click_me' + @query = @xpath.button('Click me!').to_s + @driver.find(@query).first.value.should == 'click_me' + end + end describe '#radio_button' do it "should find a radio button by id or label" do
Spec example for XPath.button was added
diff --git a/httpretty/core.py b/httpretty/core.py index <HASH>..<HASH> 100644 --- a/httpretty/core.py +++ b/httpretty/core.py @@ -482,7 +482,8 @@ class fakesock(object): self.truesock = self.create_socket() elif not self.truesock: raise UnmockedError() - with restored_libs(): + undo_patch_socket() + try: hostname = self._address[0] port = 80 if len(self._address) == 2: @@ -495,6 +496,9 @@ class fakesock(object): sock.connect(self._address) self.__truesock_is_connected__ = True self.truesock = sock + finally: + apply_patch_socket() + return self.truesock def real_socket_is_connected(self):
prevent exception from re-applying monkey patches. closes #<I>
diff --git a/src/Command/ModuleDownloadCommand.php b/src/Command/ModuleDownloadCommand.php index <HASH>..<HASH> 100644 --- a/src/Command/ModuleDownloadCommand.php +++ b/src/Command/ModuleDownloadCommand.php @@ -16,7 +16,6 @@ use Symfony\Component\Console\Output\OutputInterface; use Buzz\Browser; use Alchemy\Zippy\Zippy; - class ModuleDownloadCommand extends Command { protected function configure() @@ -135,7 +134,7 @@ class ModuleDownloadCommand extends Command // Determine destination folder for contrib modules $drupal = $this->getDrupalHelper(); $drupalRoot = $drupal->getRoot(); - if($drupalRoot) { + if ($drupalRoot) { $module_contrib_path = $drupalRoot . '/modules/contrib'; } else { $output->writeln( @@ -152,7 +151,7 @@ class ModuleDownloadCommand extends Command // Create directory if does not exist if (!file_exists(dirname($module_contrib_path))) { - if(!mkdir($module_contrib_path, 0777, true)) { + if (!mkdir($module_contrib_path, 0777, true)) { $output->writeln( ' <error>'. $this->trans('commands.module.download.messages.error-creating-folter') . ': ' . $module_contrib_path .'</error>' );
Applied PHPQA to be PSR-2 complaint
diff --git a/dpark/tracker.py b/dpark/tracker.py index <HASH>..<HASH> 100644 --- a/dpark/tracker.py +++ b/dpark/tracker.py @@ -127,13 +127,15 @@ class TrackerClient(object): if self.ctx is None: self.ctx = zmq.Context() + sock = None try: sock = self.ctx.socket(zmq.REQ) sock.connect(self.addr) sock.send_pyobj(msg) return sock.recv_pyobj() finally: - sock.close() + if sock: + sock.close() def stop(self): if self.ctx is not None:
Bugfix: variable maybe not defined in finnal block.
diff --git a/tohu/v6/tohu_namespace.py b/tohu/v6/tohu_namespace.py index <HASH>..<HASH> 100644 --- a/tohu/v6/tohu_namespace.py +++ b/tohu/v6/tohu_namespace.py @@ -17,8 +17,7 @@ def get_anonymous_name_for(g): if g.tohu_name is not None: return f"ANONYMOUS_ANONYMOUS_ANONYMOUS_{g.tohu_name}" else: - return f"ANONYMOUS_ANONYMOUS_ANONYMOUS_{g.tohu_id}" - + return f"ANONYMOUS_ANONYMOUS_ANONYMOUS_{g.__class__.__name__}_{g.tohu_id}" class TohuNamespace:
Display generator type in anonymous names (for easier debugging)
diff --git a/javamelody-core/src/main/java/net/bull/javamelody/CounterError.java b/javamelody-core/src/main/java/net/bull/javamelody/CounterError.java index <HASH>..<HASH> 100644 --- a/javamelody-core/src/main/java/net/bull/javamelody/CounterError.java +++ b/javamelody-core/src/main/java/net/bull/javamelody/CounterError.java @@ -37,7 +37,7 @@ class CounterError implements Serializable { * Default max size of error message. */ public static final int DEFAULT_MESSAGE_MAX_SIZE = 1000; - public static final int DEFAULT_STACKTRACE_MAX_SIZE = 10000; + public static final int DEFAULT_STACKTRACE_MAX_SIZE = 50000; private final long time; private final String remoteUser;
increase the default max size of stacktrace to <I> characters
diff --git a/datajoint/blob.py b/datajoint/blob.py index <HASH>..<HASH> 100644 --- a/datajoint/blob.py +++ b/datajoint/blob.py @@ -11,8 +11,15 @@ from decimal import Decimal import datetime import uuid import numpy as np +import sys from .errors import DataJointError +if sys.version_info[1] < 6: + from collections import OrderedDict +else: + # use dict in Python 3.6+ -- They are already ordered and look nicer + OrderedDict = dict + mxClassID = OrderedDict(( # see http://www.mathworks.com/help/techdoc/apiref/mxclassid.html @@ -301,7 +308,7 @@ class Blob: len_u64(it) + it for it in (self.pack_blob(i) for i in t)) def read_dict(self): - return dict((self.read_blob(self.read_value()), self.read_blob(self.read_value())) + return OrderedDict((self.read_blob(self.read_value()), self.read_blob(self.read_value())) for _ in range(self.read_value())) def pack_dict(self, d):
Update read_dict to return an OrderedDict.
diff --git a/action/Adapter.php b/action/Adapter.php index <HASH>..<HASH> 100644 --- a/action/Adapter.php +++ b/action/Adapter.php @@ -39,8 +39,10 @@ abstract class Adapter extends Component } if ($view = $this->getView()) { - foreach ($response->content as $key => $value) { - $view->$key = $value; + if (is_array($response->content)) { + foreach ($response->content as $key => $value) { + $view->$key = $value; + } } $response->content = $view->run();
fixed bug with related adapter without vars
diff --git a/test/test_all_basic.rb b/test/test_all_basic.rb index <HASH>..<HASH> 100755 --- a/test/test_all_basic.rb +++ b/test/test_all_basic.rb @@ -7,12 +7,12 @@ FILES = Dir[IMAGES_DIR + '/Button_*.gif'].sort FLOWER_HAT = IMAGES_DIR + '/Flower_Hat.jpg' IMAGE_WITH_PROFILE = IMAGES_DIR + '/image_with_profile.jpg' +require 'simplecov' require 'test/unit' if RUBY_VERSION < '1.9' require 'test/unit/ui/console/testrunner' $LOAD_PATH.push(root_dir) else - require 'simplecov' $LOAD_PATH.unshift(File.join(root_dir, 'lib')) $LOAD_PATH.unshift(File.join(root_dir, 'test')) end
Require 'simplecov' before 'test/unit' to retrives valid result (#<I>) Seems simplecov generate wrong report if it was required after 'test/unit’. * Before simplecov reports <I>% covered in rmagick_internal.rb * After simplecov reports <I>% covered in rmagick_internal.rb
diff --git a/src/components/zoom/zoom.js b/src/components/zoom/zoom.js index <HASH>..<HASH> 100644 --- a/src/components/zoom/zoom.js +++ b/src/components/zoom/zoom.js @@ -646,7 +646,12 @@ export default { swiper.zoom.onTouchEnd(e); }, doubleTap(swiper, e) { - if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { + if ( + !swiper.animating && + swiper.params.zoom.enabled && + swiper.zoom.enabled && + swiper.params.zoom.toggle + ) { swiper.zoom.toggle(e); } },
fix(core): don't toggle zoom during transition Fixes #<I>
diff --git a/resource/meta.go b/resource/meta.go index <HASH>..<HASH> 100644 --- a/resource/meta.go +++ b/resource/meta.go @@ -157,6 +157,9 @@ func (meta *Meta) UpdateMeta() { qor.ExitWithMsg("%v meta type %v needs Collection", meta.Name, meta.Type) } + scopeField, _ := scope.FieldByName(meta.Alias) + relationship := scopeField.Relationship + if meta.Setter == nil { meta.Setter = func(resource interface{}, metaValues *MetaValues, context *qor.Context) { metaValue := metaValues.Get(meta.Name) @@ -166,11 +169,9 @@ func (meta *Meta) UpdateMeta() { value := metaValue.Value scope := &gorm.Scope{Value: resource} - scopeField, _ := scope.FieldByName(meta.Alias) field := reflect.Indirect(reflect.ValueOf(resource)).FieldByName(meta.Alias) if field.IsValid() && field.CanAddr() { - relationship := scopeField.Relationship if relationship != nil && relationship.Kind == "many_to_many" { context.DB().Where(ToArray(value)).Find(field.Addr().Interface()) if !scope.PrimaryKeyZero() {
Move get scope field outside of Setter
diff --git a/spec/cycle_spec.rb b/spec/cycle_spec.rb index <HASH>..<HASH> 100644 --- a/spec/cycle_spec.rb +++ b/spec/cycle_spec.rb @@ -58,7 +58,7 @@ def create_chickens!(options = {}) options[:random].to_i.times do attributes = {} data.each do |type, values| - attributes["#{type}_col"] = values.rand if rand > 0.5 + attributes["#{type}_col"] = values[rand(values.length)] if rand > 0.5 end Chicken.create!(attributes) end
there is no Array::rand
diff --git a/pydas/core.py b/pydas/core.py index <HASH>..<HASH> 100644 --- a/pydas/core.py +++ b/pydas/core.py @@ -78,18 +78,12 @@ class Communicator(object): return self._url @url.setter - def url_set(self, value): + def url(self, value): """Setter for the url. """ for driver in self.drivers: driver.url = value - @url.deleter - def url_del(self): - """Delete the url. - """ - del self._url - @property def debug(self): """Return the debug state of all drivers by logically anding them. diff --git a/pydas/drivers.py b/pydas/drivers.py index <HASH>..<HASH> 100644 --- a/pydas/drivers.py +++ b/pydas/drivers.py @@ -59,7 +59,7 @@ class BaseDriver(object): return self._url @url.setter - def url_set(self, value): + def url(self, value): """Set the url """ self._url = value @@ -118,7 +118,7 @@ class BaseDriver(object): "%d" % code) try: response = json.loads(request.content) - except json.JSONDecodeError: + except ValueError: raise PydasException("Request failed with HTTP error code " "%d and request.content %s" % (code, request.content))
BUG: Fixing url setter property errors. Thanks go to David Thompson for finding this.
diff --git a/linguist/models/base.py b/linguist/models/base.py index <HASH>..<HASH> 100644 --- a/linguist/models/base.py +++ b/linguist/models/base.py @@ -57,7 +57,7 @@ class Translation(models.Model): language = models.CharField( max_length=10, - verbose_name=_('locale'), + verbose_name=_('language'), choices=settings.SUPPORTED_LANGUAGES, default=settings.DEFAULT_LANGUAGE, help_text=_('The language for this translation'))
Fix language field verbose name.
diff --git a/app/controllers/no_cms/admin/pages/pages_controller.rb b/app/controllers/no_cms/admin/pages/pages_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/no_cms/admin/pages/pages_controller.rb +++ b/app/controllers/no_cms/admin/pages/pages_controller.rb @@ -72,7 +72,7 @@ module NoCms::Admin::Pages end def page_params - page_params = params.require(:page).permit(:title, :body, :parent_id, :draft) + page_params = params.require(:page).permit(:title, :template, :slug, :body, :parent_id, :draft) page_params.merge!(blocks_attributes: params[:page][:blocks_attributes]) unless params[:page][:blocks_attributes].blank? page_params end
Added some params to the allowed ones
diff --git a/shared/actions/chat2/index.js b/shared/actions/chat2/index.js index <HASH>..<HASH> 100644 --- a/shared/actions/chat2/index.js +++ b/shared/actions/chat2/index.js @@ -814,15 +814,19 @@ const clearInboxFilter = (action: Chat2Gen.SelectConversationPayload) => // Show a desktop notification const desktopNotify = (action: Chat2Gen.DesktopNotificationPayload, state: TypedState) => { const {conversationIDKey, author, body} = action.payload - const metaMap = state.chat2.metaMap + const meta = Constants.getMeta(state, conversationIDKey) if ( !Constants.isUserActivelyLookingAtThisThread(state, conversationIDKey) && - !metaMap.getIn([conversationIDKey, 'isMuted']) // ignore muted convos + !meta.isMuted // ignore muted convos ) { logger.info('Sending Chat notification') return Saga.put((dispatch: Dispatch) => { - NotifyPopup(author, {body}, -1, author, () => { + let title = ['small', 'big'].includes(meta.teamType) ? meta.teamname : author + if (meta.teamType === 'big') { + title += `#${meta.channelname}` + } + NotifyPopup(title, {body}, -1, author, () => { dispatch( Chat2Gen.createSelectConversation({ conversationIDKey,
Show teamname as the title for big team chat notifications (#<I>) * replace notification title with teamname for team chat notifications * include channelname for big teams
diff --git a/backbone.js b/backbone.js index <HASH>..<HASH> 100644 --- a/backbone.js +++ b/backbone.js @@ -1292,7 +1292,7 @@ return optional ? match : '([^/?]+)'; }) .replace(splatParam, '([^?]*?)'); - return new RegExp('^' + route + '(?:\\?(.*))?$'); + return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$'); }, // Given a route, and a URL fragment that it matches, return the array of diff --git a/test/router.js b/test/router.js index <HASH>..<HASH> 100644 --- a/test/router.js +++ b/test/router.js @@ -788,7 +788,22 @@ } } }); - var router = new Router; + new Router; + Backbone.history.start({pushState: true}); + }); + + test('newline in route', 1, function() { + location.replace('http://example.com/stuff%0Anonsense?param=foo%0Abar'); + Backbone.history.stop(); + Backbone.history = _.extend(new Backbone.History, {location: location}); + var Router = Backbone.Router.extend({ + routes: { + 'stuff\nnonsense': function() { + ok(true); + } + } + }); + new Router; Backbone.history.start({pushState: true}); });
Handle newlines in route params.
diff --git a/package/src/testHelpers/factories.js b/package/src/testHelpers/factories.js index <HASH>..<HASH> 100644 --- a/package/src/testHelpers/factories.js +++ b/package/src/testHelpers/factories.js @@ -124,6 +124,23 @@ export const factories = { return this; }, + withAudioFileType: function(options) { + fileTypes.register('audio_files', _.extend({ + model: VideoFile, + matchUpload: /^audio/, + topLevelType: true + }, options)); + + fileTypesSetupArray.push({ + collectionName: 'audio_files', + typeName: 'Pageflow::AudioFile', + i18nKey: 'pageflow/audio_files', + nestedFileTypes: [{collectionName: 'text_track_files'}] + }); + + return this; + }, + withTextTrackFileType: function(options) { fileTypes.register('text_track_files', _.extend({ model: TextTrackFile,
Add factory builder method to define audio file type
diff --git a/scdl/scdl.py b/scdl/scdl.py index <HASH>..<HASH> 100755 --- a/scdl/scdl.py +++ b/scdl/scdl.py @@ -395,7 +395,7 @@ def download_playlist(client: SoundCloud, playlist: BasicAlbumPlaylist, **kwargs try: if kwargs.get("n"): # Order by creation date and get the n lasts tracks playlist.tracks.sort( - key=lambda track: track.created_at, reverse=True + key=lambda track: track.id, reverse=True ) playlist.tracks = playlist.tracks[: int(kwargs.get("n"))] else:
Fix issue for limitting number of playlist entry downloads created_at doesn't seem to be present in the MiniTrack class, but id will always be present and works equally well.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup.py -- setup script for use of packages. """ from setuptools import setup, find_packages -__version__ = '1.3.6' +__version__ = '1.3.7' # create entry points # see http://astropy.readthedocs.org/en/latest/development/scripts.html
Bump to <I>. This includes mainly removal of large filterbank files to an outside source, and JOSS paper initial submission (not last version). Former-commit-id: a<I>dce<I>c7f<I>dfd2d<I>c7dd<I>c4db0c<I>
diff --git a/src/com/opera/core/systems/preferences/FilePreference.java b/src/com/opera/core/systems/preferences/FilePreference.java index <HASH>..<HASH> 100644 --- a/src/com/opera/core/systems/preferences/FilePreference.java +++ b/src/com/opera/core/systems/preferences/FilePreference.java @@ -28,7 +28,7 @@ public class FilePreference extends AbstractPreference { public FilePreference(OperaFilePreferences parent, String section, String key, Object value) { super(section, key, value); this.parent = parent; - super.setValue(value); + parent.write(); } /**
The constructor in super is already setting the value, instead we want to write it to disk
diff --git a/lib/opentsdb/version.rb b/lib/opentsdb/version.rb index <HASH>..<HASH> 100644 --- a/lib/opentsdb/version.rb +++ b/lib/opentsdb/version.rb @@ -1,3 +1,3 @@ module OpenTSDB - VERSION = "0.2.0" + VERSION = '1.0.0' end
Bumps the version to MAJOR.
diff --git a/cli/includes/helpers.php b/cli/includes/helpers.php index <HASH>..<HASH> 100644 --- a/cli/includes/helpers.php +++ b/cli/includes/helpers.php @@ -16,7 +16,7 @@ define('VALET_STATIC_PREFIX', '41c270e4-5535-4daa-b23e-c269744c2f45'); define('VALET_LEGACY_HOME_PATH', $_SERVER['HOME'].'/.valet'); -define('PHP_BINARY_PATH', (new CommandLine())->runAsUser('echo $(brew --prefix)/bin/php')); +define('PHP_BINARY_PATH', (new CommandLine())->runAsUser('printf $(brew --prefix)/bin/php')); /** * Output the given text to the console.
Fix command to get binary path Because echo is include new line but printf is not include
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -54,4 +54,20 @@ describe('funcDeps', function() { assert.equal(testDeps.func, test); }); }); + describe('called with inline annotated functions', function() { + it('handles functions with different args', function() { + function test(c, d) {} + test.$deps = ['a','b']; + var testDeps = funcDeps(test); + assert.deepEqual(testDeps.deps, ['a','b']); + assert.equal(testDeps.func, test); + }); + it('handles functions with no args', function() { + function test() {} + test.$deps = ['a','b']; + var testDeps = funcDeps(test); + assert.deepEqual(testDeps.deps, ['a','b']); + assert.equal(testDeps.func, test); + }); + }); });
Add tests for inline annotated functions
diff --git a/tests/test_integration.py b/tests/test_integration.py index <HASH>..<HASH> 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -484,7 +484,12 @@ class TestSonosPlaylist(object): with pytest.raises(SoCoUPnPException): soco.remove_sonos_playlist("SQ:-7") # realistic non-existing - hpl_i = max([int(x.item_id.split(":")[1]) for x in soco.get_sonos_playlists()]) + playlists = soco.get_sonos_playlists() + # Accommodate the case of no existing playlists + if len(playlists) == 0: + hpl_i = 0 + else: + hpl_i = max([int(x.item_id.split(":")[1]) for x in playlists]) with pytest.raises(SoCoUPnPException): soco.remove_sonos_playlist("SQ:{}".format(hpl_i + 1))
Improve test_remove_playlist_bad_id() to accommodate no existing playlists
diff --git a/src/main/java/org/dasein/cloud/google/compute/server/ServerSupport.java b/src/main/java/org/dasein/cloud/google/compute/server/ServerSupport.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/dasein/cloud/google/compute/server/ServerSupport.java +++ b/src/main/java/org/dasein/cloud/google/compute/server/ServerSupport.java @@ -524,11 +524,11 @@ public class ServerSupport extends AbstractVMSupport<Google> { Iterable<VirtualMachineProduct> candidateProduct = listProducts(options, null); for (VirtualMachineProduct product : candidateProduct) { - if ( options == null || options.matches(product) ) { + if (options == null || options.matches(product)) { products.add(product); } } - return products; + return products; } @Override
and forgot to save between staging, editing and comitting...
diff --git a/lib/sample.js b/lib/sample.js index <HASH>..<HASH> 100644 --- a/lib/sample.js +++ b/lib/sample.js @@ -12,10 +12,6 @@ const readFileAsync = util.promisify(fs.readFile) const pathToSamples = path.join(__dirname, '../samples.json') module.exports = function (reporter, definition) { - if (reporter.compilation) { - reporter.compilation.resourceInTemp('samples.json', pathToSamples) - } - reporter.on('express-configure', (app) => { app.post('/studio/create-samples', async (req, res) => { const { ignore } = req.body.ignore @@ -73,9 +69,7 @@ async function createSamples (reporter) { await reporter.settings.addOrSet('sample-created', true) - const pathToResource = reporter.execution ? reporter.execution.resourceTempPath('samples.json') : pathToSamples - - const res = await readFileAsync(pathToResource) + const res = await readFileAsync(pathToSamples) const entities = JSON.parse(res) const found = await reporter.documentStore.collection('folders').findOne({
refactor exe compilation to be compatible with new pkg compilation
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index <HASH>..<HASH> 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -528,6 +528,14 @@ public class TreeGen implements Kinds, Modifiers, TypeTags { //######################################################################## // Public Methods - Building expressions + /** Builds an instance test with given value and type. */ + public Tree mkIsInstanceOf(int pos, Tree value, Type type) { + return mkApplyT_(pos, Select(value, definitions.IS), new Type[]{type}); + } + public Tree mkIsInstanceOf(Tree value, Type type) { + return mkIsInstanceOf(value.pos, value, type); + } + /** Builds a cast with given value and type. */ public Tree mkAsInstanceOf(int pos, Tree value, Type type) { return mkApplyT_(pos, Select(value, definitions.AS), new Type[]{type});
- Added methods isInstanceOf
diff --git a/anime.js b/anime.js index <HASH>..<HASH> 100644 --- a/anime.js +++ b/anime.js @@ -7,8 +7,20 @@ * Released under the MIT license */ -var anime = (function() { - +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], factory); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.anime = factory(); + } +}(this, function () { // Defaults var defaultSettings = { @@ -590,4 +602,4 @@ var anime = (function() { return animation; -})(); +});
make anime export as a UMD module
diff --git a/closure/goog/db/error.js b/closure/goog/db/error.js index <HASH>..<HASH> 100644 --- a/closure/goog/db/error.js +++ b/closure/goog/db/error.js @@ -340,6 +340,8 @@ goog.db.Error.fromRequest = function(request, message) { * @param {!IDBDatabaseException} ex The exception that was thrown. * @param {string} message The error message to add to err if it's wrapped. * @return {!goog.db.Error} The error that caused the failure. + * @suppress {invalidCasts} The cast from IDBDatabaseException to DOMError + * is invalid and will not compile. */ goog.db.Error.fromException = function(ex, message) { if ('name' in ex) {
Fix issues blocking the JSCompiler release Most of these consist of - invalid type casts - function declarations in 'if' blocks, which are forbidden in future versions of JS - bad generic types DELTA=2 (2 added, 0 deleted, 0 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=<I> git-svn-id: <URL>
diff --git a/src/Dingo/Api/Api.php b/src/Dingo/Api/Api.php index <HASH>..<HASH> 100644 --- a/src/Dingo/Api/Api.php +++ b/src/Dingo/Api/Api.php @@ -100,11 +100,11 @@ class Api { */ public function currentRequestTargettingApi() { - if ($this->request->header('host') == $this->domain) + if ( ! is_null($this->domain) and $this->request->header('host') == $this->domain) { return true; } - elseif (preg_match('#^/'.$this->prefix.'(/?.*?)#', $this->request->getPathInfo())) + elseif ( ! is_null($this->prefix) and preg_match('#^/'.$this->prefix.'(/?.*?)#', $this->request->getPathInfo())) { return true; }
Fixed bug where all requests treated as API request.
diff --git a/ipyrad/assemble/cluster_across.py b/ipyrad/assemble/cluster_across.py index <HASH>..<HASH> 100644 --- a/ipyrad/assemble/cluster_across.py +++ b/ipyrad/assemble/cluster_across.py @@ -1336,6 +1336,7 @@ def build_clustbits(data, ipyclient, force): uhandle = os.path.join(data.dirs.across, data.name+".utemp") usort = os.path.join(data.dirs.across, data.name+".utemp.sort") + async1 = "" ## skip usorting if not force and already exists if not os.path.exists(usort) or force: @@ -1379,9 +1380,13 @@ def build_clustbits(data, ipyclient, force): ## check for errors for job in [async1, async2, async3]: - if not job.successful(): - raise IPyradWarningExit(job.result()) - + try: + if not job.successful(): + raise IPyradWarningExit(job.result()) + except AttributeError: + ## If we skip usorting then async1 == "" so the call to + ## successful() raises, but we can ignore it. + pass def sub_build_clustbits(data, usort, nseeds):
Better handling for restarting jobs in substeps of step 6.
diff --git a/spec/client_spec.rb b/spec/client_spec.rb index <HASH>..<HASH> 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -128,10 +128,10 @@ describe Customerio::Client do Customerio::Client.should_receive(:post).with( "/api/v1/customers/5/events", { :basic_auth => anything(), - :body => { + :body => MultiJson.dump({ :name => "purchase", :data => { :type => "socks", :price => "13.99" } - }.to_json, + }), :headers=>{"Content-Type"=>"application/json"}}).and_return(response) client.track(5, "purchase", :type => "socks", :price => "13.99") end
Fix use of to_json in spec
diff --git a/vagrant_box_defaults.rb b/vagrant_box_defaults.rb index <HASH>..<HASH> 100644 --- a/vagrant_box_defaults.rb +++ b/vagrant_box_defaults.rb @@ -3,10 +3,10 @@ Vagrant.require_version ">= 2.2.0" $SERVER_BOX = "cilium/ubuntu-dev" -$SERVER_VERSION= "186" +$SERVER_VERSION= "188" $NETNEXT_SERVER_BOX= "cilium/ubuntu-next" -$NETNEXT_SERVER_VERSION= "81" +$NETNEXT_SERVER_VERSION= "83" @v419_SERVER_BOX= "cilium/ubuntu-4-19" -@v419_SERVER_VERSION= "28" +@v419_SERVER_VERSION= "30" @v49_SERVER_BOX= "cilium/ubuntu" -@v49_SERVER_VERSION= "186" +@v49_SERVER_VERSION= "188"
vagrant: bump box versions These new box images include Go <I> (cilium/packer-ci-build#<I>) and pre-pull all Docker images which are currently used to build and test Cilium (cilium/packer-ci-build#<I> and cilium/packer-ci-build#<I>).
diff --git a/src/components/fields/Select/index.js b/src/components/fields/Select/index.js index <HASH>..<HASH> 100644 --- a/src/components/fields/Select/index.js +++ b/src/components/fields/Select/index.js @@ -3,6 +3,7 @@ import Select from 'react-select' import autobind from 'autobind-decorator' import PropTypes from 'prop-types' import isEqual from 'lodash/isEqual' +import isNil from 'lodash/isNil' export default class SelectField extends React.Component { static propTypes = { @@ -26,7 +27,7 @@ export default class SelectField extends React.Component { componentDidUpdate(prevProps, prevState) { if (!isEqual(prevProps.options, this.props.options)) { - if (!this.getValue()) { + if (isNil(this.getValue())) { this.props.onChange(null) } } @@ -38,7 +39,7 @@ export default class SelectField extends React.Component { if (multi) { this.props.onChange(params.map(item => item.value)) } else { - if (params && params.value) { + if (params && !isNil(params.value)) { this.props.onChange(params.value) } else { this.props.onChange(null)
use isNil for select has value
diff --git a/test.js b/test.js index <HASH>..<HASH> 100755 --- a/test.js +++ b/test.js @@ -15,7 +15,7 @@ console.log('starting actionhero test suite with NODE_ENV=test'); var execeutable; if(process.platform === 'win32'){ - execeutable = 'mocha.bash'; + execeutable = 'mocha.cmd'; }else{ execeutable = 'mocha'; }
back to spawn; but with mocha.bat
diff --git a/src/Email/Swift5.php b/src/Email/Swift5.php index <HASH>..<HASH> 100644 --- a/src/Email/Swift5.php +++ b/src/Email/Swift5.php @@ -35,7 +35,7 @@ class Swift5 extends SwiftAbstract { $this->config = $config; if( !class_exists('\Swift_Mailer') ) { - require_once dirname(__FILE__).'../../../vendor/swiftmailer/swiftmailer/lib/swift_required.php'; + //require_once dirname(__FILE__).'../../../vendor/swiftmailer/swiftmailer/lib/swift_required.php'; } }
removes hardcoded include to swift
diff --git a/config/options.go b/config/options.go index <HASH>..<HASH> 100644 --- a/config/options.go +++ b/config/options.go @@ -143,6 +143,26 @@ func LoadOptions(ops Options) { }).Debug("Overriding Elastic startup timeout") options.ESStartupTimeout = minTimeout } + + if options.ZKReconnectStartDelay < 1 { + log.WithFields(logrus.Fields{ + "reconnectstartdelay": options.ZKReconnectStartDelay, + }).Debug("ZK_RECONNECT_START_DELAY too low; Resetting to 1 second") + options.ZKReconnectStartDelay = 1 + } + if options.ZKReconnectMaxDelay < 1 { + log.WithFields(logrus.Fields{ + "reconnectmaxdelay": options.ZKReconnectMaxDelay, + }).Debug("ZK_RECONNECT_MAX_DELAY too low; Resetting to 1 second") + options.ZKReconnectMaxDelay = 1 + } + if options.ZKReconnectStartDelay > options.ZKReconnectMaxDelay { + log.WithFields(logrus.Fields{ + "reconnectstartdelay": options.ZKReconnectStartDelay, + "reconnectmaxdelay": options.ZKReconnectMaxDelay, + }).Debug("ZK_RECONNECT_START_DELAY too large; Resetting to ZK_RECONNECT_MAX_DELAY") + options.ZKReconnectStartDelay = options.ZKReconnectMaxDelay + } } func MuxTLSIsEnabled() bool {
Make sure start and max delays meet minimum requirements
diff --git a/src/main/java/org/skysql/jdbc/MySQLStatement.java b/src/main/java/org/skysql/jdbc/MySQLStatement.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/skysql/jdbc/MySQLStatement.java +++ b/src/main/java/org/skysql/jdbc/MySQLStatement.java @@ -303,7 +303,12 @@ public class MySQLStatement implements Statement { isClosed = true; if (queryResult != null) { queryResult.close(); + queryResult = null; } + // No possible future use for the cached results, so these can be cleared + // This makes the cache eligible for garbage collection earlier if the statement is not + // immediately garbage collected + cachedResultSets.clear(); if (!isStreaming()) return; synchronized (protocol) {
Null out cached statements early on when a statement is closed. Attempt to reduce memory overhead
diff --git a/test/com/google/javascript/jscomp/CommandLineRunnerTest.java b/test/com/google/javascript/jscomp/CommandLineRunnerTest.java index <HASH>..<HASH> 100644 --- a/test/com/google/javascript/jscomp/CommandLineRunnerTest.java +++ b/test/com/google/javascript/jscomp/CommandLineRunnerTest.java @@ -1884,7 +1884,6 @@ public final class CommandLineRunnerTest extends TestCase { private void test(String[] original, String[] compiled, DiagnosticType warning) { exitCodes.clear(); Compiler compiler = compile(original); - assertThat(exitCodes).containsExactly(0); if (warning == null) { assertEquals("Expected no warnings or errors\n" + @@ -1906,6 +1905,8 @@ public final class CommandLineRunnerTest extends TestCase { "\nResult: " + compiler.toSource(root) + "\n" + explanation, explanation); } + + assertThat(exitCodes).containsExactly(0); } /**
Move the exit code test to the end of the function so that it doesn't hide real error messages.
diff --git a/app/mailers/pointless_feedback/feedback_mailer.rb b/app/mailers/pointless_feedback/feedback_mailer.rb index <HASH>..<HASH> 100644 --- a/app/mailers/pointless_feedback/feedback_mailer.rb +++ b/app/mailers/pointless_feedback/feedback_mailer.rb @@ -14,7 +14,7 @@ module PointlessFeedback end def feedback_subject - I18n.t('pointless_feedback.email.subject', :default => 'Pointless Feedback') + I18n.t('pointless_feedback.email.subject', :default => 'Feedback') end end end
Changed default email subject to just "Feedback" - warmest regards
diff --git a/lib/active_file/hash_and_array_files.rb b/lib/active_file/hash_and_array_files.rb index <HASH>..<HASH> 100644 --- a/lib/active_file/hash_and_array_files.rb +++ b/lib/active_file/hash_and_array_files.rb @@ -13,7 +13,7 @@ module ActiveFile loaded_files = full_paths.collect { |path| load_path(path) } if loaded_files.all?{ |file_data| file_data.is_a?(Array) } - loaded_files.sum + loaded_files.sum([]) elsif loaded_files.all?{ |file_data| file_data.is_a?(Hash) } loaded_files.inject({}) { |hash, file_data| hash.merge(file_data) } else
Fix deprecation warning of `Enumerable#sum` ``` DEPRECATION WARNING: Rails <I> has deprecated Enumerable.sum in favor of Ruby's native implementation available since <I>. Sum of non-numeric elements requires an initial argument. ```
diff --git a/app/src/js/modules/omnisearch.js b/app/src/js/modules/omnisearch.js index <HASH>..<HASH> 100644 --- a/app/src/js/modules/omnisearch.js +++ b/app/src/js/modules/omnisearch.js @@ -49,8 +49,7 @@ results.push({ id: item.path, path: item.path, - text: item.label, - priority: item.priority + text: item.label }); });
Remove priority from result, as it is unused
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -121,8 +121,8 @@ gulp.task('build.js.dev', function () { var result = gulp.src([join(PATH.src.all, '**/*ts'), '!' + join(PATH.src.all, '**/*_spec.ts')]) .pipe(plumber()) - .pipe(sourcemaps.init()) .pipe(inlineNg2Template({ base: 'app' })) + .pipe(sourcemaps.init()) .pipe(tsc(tsProject)); return result.js
Move inlining as does not support source map yet
diff --git a/src/StrokerCache/Service/CacheService.php b/src/StrokerCache/Service/CacheService.php index <HASH>..<HASH> 100644 --- a/src/StrokerCache/Service/CacheService.php +++ b/src/StrokerCache/Service/CacheService.php @@ -86,17 +86,18 @@ class CacheService /** * @param array $tags + * @return bool */ public function clearByTags(array $tags = array()) { if (!$this->getCacheStorage() instanceof TaggableInterface) { - return; + return false; } $tags = array_map( function ($tag) { return self::TAG_PREFIX . $tag; }, $tags ); - $this->getCacheStorage()->clearByTags($tags); + return $this->getCacheStorage()->clearByTags($tags); } /**
clearByTags should return a boolean
diff --git a/js/main.js b/js/main.js index <HASH>..<HASH> 100644 --- a/js/main.js +++ b/js/main.js @@ -1,5 +1,5 @@ /* - * jQuery File Upload Plugin JS Example 7.1 + * jQuery File Upload Plugin JS Example 7.1.1 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan @@ -32,7 +32,8 @@ $(function () { ) ); - if (window.location.hostname === 'blueimp.github.com') { + if (window.location.hostname === 'blueimp.github.com' || + window.location.hostname === 'blueimp.github.io') { // Demo settings: $('#fileupload').fileupload('option', { url: '//jquery-file-upload.appspot.com/', @@ -75,10 +76,10 @@ $(function () { url: $('#fileupload').fileupload('option', 'url'), dataType: 'json', context: $('#fileupload')[0] + }).always(function (result) { + $(this).removeClass('fileupload-processing'); }).done(function (result) { - $(this) - .removeClass('fileupload-processing') - .fileupload('option', 'done') + $(this).fileupload('option', 'done') .call(this, null, {result: result}); }); }
Updated domain check for the demo settings. blueimp.github.com => blueimp.github.io
diff --git a/stagpy/processing.py b/stagpy/processing.py index <HASH>..<HASH> 100644 --- a/stagpy/processing.py +++ b/stagpy/processing.py @@ -155,8 +155,9 @@ def stream_function(step): x=r_coord, initial=0) for i_z, r_pos in enumerate(r_coord): - psi[:, i_z] = psi[0, i_z] / r_pos - \ - integrate.cumtrapz(r_pos * v_z[:, i_z], x=x_coord, initial=0) + psi[:, i_z] = psi[0, i_z] - \ + integrate.cumtrapz(r_pos**2 * v_z[:, i_z], + x=x_coord, initial=0) else: # assume cartesian geometry psi[0, :] = integrate.cumtrapz(v_x[0, :], x=step.geom.z_coord,
Fix stream function computation in spherical geom
diff --git a/packages/eslint-config-import/index.js b/packages/eslint-config-import/index.js index <HASH>..<HASH> 100644 --- a/packages/eslint-config-import/index.js +++ b/packages/eslint-config-import/index.js @@ -1,6 +1,6 @@ module.exports = { "parser": "babel-eslint", - "extends": "airbnb-base/rules/import", + "extends": "airbnb-base/rules/imports", "env": { "browser": true, "node": true,
fix(eslint-config-import): fix typo in airbnb rules name affects: @goldwasserexchange/eslint-config-import the rule package is called imports and not import
diff --git a/core/ports/jms/src/test/java/org/openengsb/core/ports/jms/JMSPortTest.java b/core/ports/jms/src/test/java/org/openengsb/core/ports/jms/JMSPortTest.java index <HASH>..<HASH> 100644 --- a/core/ports/jms/src/test/java/org/openengsb/core/ports/jms/JMSPortTest.java +++ b/core/ports/jms/src/test/java/org/openengsb/core/ports/jms/JMSPortTest.java @@ -228,8 +228,7 @@ public class JMSPortTest { JmsTemplate template = new JmsTemplate(cf); String request = "{\"callId\":\"12345\",\"answer\":true,\"classes\":[\"java.lang.String\"]," - + "\"methodName\":\"doSomething\",\"metaData\":{\"serviceId\":\"12345\"}," - + "\"args\":[\"Audit\"]}"; + + "\"methodName\":\"audit\",\"metaData\":{\"serviceId\":\"auditing\"}," + "\"args\":[\"Audit\"]}"; template.convertAndSend("receive", request); System.out.println(template.receiveAndConvert("12345")); }
Calling audit in TestCase
diff --git a/benchmarks/regression-test.js b/benchmarks/regression-test.js index <HASH>..<HASH> 100644 --- a/benchmarks/regression-test.js +++ b/benchmarks/regression-test.js @@ -17,6 +17,10 @@ fs.readFile('books.json', 'utf8', (err, data) => setupBenchmarks(JSON.parse(data).books) ); +var filter = process.argv.length === 3 + ? new RegExp(process.argv[2]) + : null; + var benchmarks = []; function setupBenchmarks(corpus) { @@ -67,6 +71,14 @@ function initBenchmark({ indexStrategy, searchIndex }) { + if ( + filter && + !indexStrategy.match(filter) && + !searchIndex.match(filter) + ) { + return; + } + console.log(`Initializing benchmark\t${indexStrategy}\t${searchIndex}`); initBenchmarkForCreateIndex({
Added support for filtering benchmarks
diff --git a/org/postgresql/jdbc2/TimestampUtils.java b/org/postgresql/jdbc2/TimestampUtils.java index <HASH>..<HASH> 100644 --- a/org/postgresql/jdbc2/TimestampUtils.java +++ b/org/postgresql/jdbc2/TimestampUtils.java @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------- * -* Copyright (c) 2003-2011, PostgreSQL Global Development Group +* Copyright (c) 2003-2014, PostgreSQL Global Development Group * * *------------------------------------------------------------------------- @@ -793,7 +793,7 @@ public class TimestampUtils { if (tz == null) { tz = defaultTz; } - int offset = tz.getOffset(millis); + int offset = tz.getOffset(millis) + tz.getDSTSavings(); long timePart = millis % ONEDAY; if (timePart + offset >= ONEDAY) { millis += ONEDAY;
use DSTSavings when converting to timestamp
diff --git a/src/multi.js b/src/multi.js index <HASH>..<HASH> 100644 --- a/src/multi.js +++ b/src/multi.js @@ -135,10 +135,10 @@ var multi = (function() { item_group.className = "item-group"; if ( option.parentNode.label ) { - var label = document.createElement("span"); - label.innerHTML = option.parentNode.label; - label.className = "group-label" - item_group.appendChild(label); + var groupLabel = document.createElement("span"); + groupLabel.innerHTML = option.parentNode.label; + groupLabel.className = "group-label" + item_group.appendChild(groupLabel); } select.wrapper.non_selected.appendChild(item_group);
Fixed issue where search wouldn’t work with optgroups
diff --git a/deliver/lib/deliver/html_generator.rb b/deliver/lib/deliver/html_generator.rb index <HASH>..<HASH> 100644 --- a/deliver/lib/deliver/html_generator.rb +++ b/deliver/lib/deliver/html_generator.rb @@ -9,7 +9,8 @@ module Deliver def run(options, screenshots) begin - html_path = self.render(options, screenshots, '.') + fastlane_path = FastlaneCore::FastlaneFolder.path + html_path = self.render(options, screenshots, fastlane_path) rescue => ex UI.error(ex.inspect) UI.error(ex.backtrace.join("\n"))
[deliver] generate Preview.html file in fastlane directory like gitignore suggests (#<I>)
diff --git a/Tests/ResourceMirrorTest.php b/Tests/ResourceMirrorTest.php index <HASH>..<HASH> 100644 --- a/Tests/ResourceMirrorTest.php +++ b/Tests/ResourceMirrorTest.php @@ -37,4 +37,15 @@ class ResourceMirrorTest extends \PHPUnit_Framework_TestCase $mirror = new ResourceMirror(new EventDispatcher(), 'http://example.com/', $tempDir = sys_get_temp_dir()); $this->assertEquals($tempDir, $mirror->getDirectory()); } + + /** + * A resource mirror is not created if directory is not writable. + * + * @depends testCreate + * @expectedException \InvalidArgumentException + */ + public function testCreateBadDirectory() + { + new ResourceMirror(new EventDispatcher(), 'http://example.com/', '/a/probably/not/writable/directory'); + } }
Test creating a mirror with a bad directory.
diff --git a/tests/explainers/test_kernel.py b/tests/explainers/test_kernel.py index <HASH>..<HASH> 100644 --- a/tests/explainers/test_kernel.py +++ b/tests/explainers/test_kernel.py @@ -71,7 +71,7 @@ def test_kernel_shap_with_a1a_sparse_zero_background(): explainer.shap_values(x_test) def test_kernel_shap_with_a1a_sparse_nonzero_background(): - np.set_printoptions(threshold=np.nan) + np.set_printoptions(threshold=100000) from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.utils.sparsefuncs import csc_median_axis_0
Fix windows issue with set_printoptions
diff --git a/lib/matcher/Matcher.js b/lib/matcher/Matcher.js index <HASH>..<HASH> 100644 --- a/lib/matcher/Matcher.js +++ b/lib/matcher/Matcher.js @@ -874,7 +874,7 @@ i = -1, len = m.length; for ( ; ++i < len ; ) { - for902 (j in m[i]) { + for (j in m[i]) { if (m[i].hasOwnProperty(j)) { if (j === oldId) { // Do the swap.
matcher fixedRoles and canMatchSameRole
diff --git a/packages/eslint-config/lib/overrides.js b/packages/eslint-config/lib/overrides.js index <HASH>..<HASH> 100644 --- a/packages/eslint-config/lib/overrides.js +++ b/packages/eslint-config/lib/overrides.js @@ -14,6 +14,23 @@ const overrides = []; if (hasTypescript) { overrides.push( { + files: ['*.mjs'], + extends: ['airbnb-base'], + parserOptions: { + ecmaVersion: 8, + sourceType: 'module', + ecmaFeatures: { + modules: true, + }, + }, + env: { + node: true, + jasmine: true, + jest: true, + }, + rules: rules.javascript, + }, + { // overrides just for react files files: ['*.jsx', '*.tsx'], extends: ['plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'airbnb'],
Make sure eslint works with mjs files
diff --git a/src/threadPool.py b/src/threadPool.py index <HASH>..<HASH> 100644 --- a/src/threadPool.py +++ b/src/threadPool.py @@ -32,6 +32,7 @@ class ThreadPool(Module): self.name = name if prctl: prctl.set_name(name) + prctl.set_proctitle(name) self.pool.actualFT -= 1 self.pool.cond.release() try: @@ -46,6 +47,7 @@ class ThreadPool(Module): self.name = 'free' if prctl: prctl.set_name('(free)') + prctl.set_proctitle('(free)') self.pool.actualFT += 1 self.pool.expectedFT += 1 if not ret:
threadPool: also set proctitle
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( author="David Uebelacker", author_email="david@uebelacker.ch", url="https://github.com/hackercowboy/python-maxcube-api.git", - license=license, + license='MIT', packages=["maxcube"], test_suite="tests", python_requires=">=3.7",
setup.py: fix license value The value is unset, which does not propagate the license into PyPi.
diff --git a/specs-go/config.go b/specs-go/config.go index <HASH>..<HASH> 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -24,9 +24,9 @@ type Spec struct { Annotations map[string]string `json:"annotations,omitempty"` // Linux is platform specific configuration for Linux based containers. - Linux Linux `json:"linux" platform:"linux"` + Linux Linux `json:"linux" platform:"linux,omitempty"` // Solaris is platform specific configuration for Solaris containers. - Solaris Solaris `json:"solaris" platform:"solaris"` + Solaris Solaris `json:"solaris" platform:"solaris,omitempty"` } // Process contains information to start a specific application inside the container.
specs-go/config: Make Linux and Solaris omitempty Both fields are optional, so you could conceivably have neither. However, in most cases folks will populate the one corresponding to their platform. The one that *doesn't* match their platform must not show up, in order to avoid violating the: This should only be set if **`platform.os`** is ... phrasing.
diff --git a/dns.go b/dns.go index <HASH>..<HASH> 100644 --- a/dns.go +++ b/dns.go @@ -16,7 +16,7 @@ type DNSRecord struct { Name string `json:"name,omitempty"` Content string `json:"content,omitempty"` Proxiable bool `json:"proxiable,omitempty"` - Proxied bool `json:"proxied,omitempty"` + Proxied bool `json:"proxied"` TTL int `json:"ttl,omitempty"` Locked bool `json:"locked,omitempty"` ZoneID string `json:"zone_id,omitempty"` @@ -25,7 +25,7 @@ type DNSRecord struct { ModifiedOn time.Time `json:"modified_on,omitempty"` Data interface{} `json:"data,omitempty"` // data returned by: SRV, LOC Meta interface{} `json:"meta,omitempty"` - Priority int `json:"priority,omitempty"` + Priority int `json:"priority"` } // DNSRecordResponse represents the response from the DNS endpoint.
Always serialize Proxied and Priority fields
diff --git a/lib/dalli/client.rb b/lib/dalli/client.rb index <HASH>..<HASH> 100644 --- a/lib/dalli/client.rb +++ b/lib/dalli/client.rb @@ -269,7 +269,7 @@ module Dalli end def key_without_namespace(key) - @options[:namespace] ? key.gsub(%r(\A#{@options[:namespace]}:), '') : key + @options[:namespace] ? key.sub(%r(\A#{@options[:namespace]}:), '') : key end def normalize_options(opts)
Stop attempting to strip the namespace from a key multiple times
diff --git a/test/net/fortuna/ical4j/data/CalendarOutputterTest.java b/test/net/fortuna/ical4j/data/CalendarOutputterTest.java index <HASH>..<HASH> 100644 --- a/test/net/fortuna/ical4j/data/CalendarOutputterTest.java +++ b/test/net/fortuna/ical4j/data/CalendarOutputterTest.java @@ -118,7 +118,7 @@ public class CalendarOutputterTest extends TestCase { log.debug(out.toString()); } - BufferedReader bin = new BufferedReader(new UnfoldingReader(new FileReader(filename))); + BufferedReader bin = new BufferedReader(new UnfoldingReader(new FileReader(filename), 1024), 1024); StringWriter rout = new StringWriter(); BufferedWriter bout = new BufferedWriter(rout);
Ensure BufferedReader buffer size <= UnfoldingReader buffer size
diff --git a/lib/models/design.js b/lib/models/design.js index <HASH>..<HASH> 100644 --- a/lib/models/design.js +++ b/lib/models/design.js @@ -50,8 +50,8 @@ let designModel = function (modelSchema, methods) { _modelSchema.attributes[index].type = property.type; if (modelSchema.index) _modelSchema.attributes[index].index = modelSchema.index; - if (property.defaultValue) _modelSchema.attributes[index].defaultsTo = property.defaultValue; - if (property.defaultValue && property.defaultValue == 'timestamp') _modelSchema.attributes[index].default = Date.now(); + if (property.defaultValue !== null) _modelSchema.attributes[index].defaultsTo = property.defaultValue; + if (property.defaultValue && property.defaultValue == 'timestamp') _modelSchema.attributes[index].defaultsTo = new Date(); }); if (methods) _modelSchema[methods] = methods[modelSchema.name] ? methods : false || false;
Don't let default value of fall through.
diff --git a/scheduler/scheduler.go b/scheduler/scheduler.go index <HASH>..<HASH> 100644 --- a/scheduler/scheduler.go +++ b/scheduler/scheduler.go @@ -158,6 +158,11 @@ func NewMesosSchedulerDriver(config DriverConfig) (initializedDriver *MesosSched if framework.GetUser() == "" { user, err := user.Current() if err != nil || user == nil { + if err != nil { + log.Warningln("Failed to obtain username: %v", err) + } else { + log.Warningln("Failed to obtain username.") + } framework.User = proto.String("") } else { framework.User = proto.String(user.Username)
Log warning if no username can be obtained (and none is given).
diff --git a/publish.js b/publish.js index <HASH>..<HASH> 100644 --- a/publish.js +++ b/publish.js @@ -21,7 +21,7 @@ module.exports = function() { function putThemInVendorDir (filepath) { return 'vendor/' + path.basename(filepath); - }g + } return { humaName : 'UI.Ace',
fix(publisher): remove typo
diff --git a/js/base/Exchange.js b/js/base/Exchange.js index <HASH>..<HASH> 100644 --- a/js/base/Exchange.js +++ b/js/base/Exchange.js @@ -677,8 +677,8 @@ module.exports = class Exchange { async fetchL2OrderBook (symbol, params = {}) { let orderbook = await this.fetchOrderBook (symbol, params) return extend (orderbook, { - 'bids': aggregate (orderbook.bids), - 'asks': aggregate (orderbook.asks), + 'bids': sortBy (aggregate (orderbook.bids), 0, true), + 'asks': sortBy (aggregate (orderbook.asks), 0), }) }
Exchange: fix for "removed the bidask sorting from fetchL2OrderBook to fetchOrderBook #<I>"
diff --git a/lib/server.js b/lib/server.js index <HASH>..<HASH> 100644 --- a/lib/server.js +++ b/lib/server.js @@ -82,8 +82,12 @@ function handleResponse (opts, newReq, resp, response) { resp.writeHead(response.status, '', response.headers); resp.end(body); } else { - if (response.headers && response.headers['content-length']) { - opts.log('error/response/content-length', {req: newReq, res: response}); + if (response.headers['content-length']) { + opts.log('warn/response/content-length', { + req: newReq, + res: response, + reason: new Error('Invalid content-length') + }); delete response.headers['content-length']; } resp.writeHead(response.status, '', response.headers);
Include an Error instance in the log warning
diff --git a/src/js/lightbox/lightbox.js b/src/js/lightbox/lightbox.js index <HASH>..<HASH> 100644 --- a/src/js/lightbox/lightbox.js +++ b/src/js/lightbox/lightbox.js @@ -94,6 +94,9 @@ class PhotoSwipeLightbox extends PhotoSwipeBase { if (clickedChildIndex !== -1) { return clickedChildIndex; + } else if (this.options.children || this.options.childSelector) { + // click wasn't on a child element + return -1; } // There is only one item (which is the gallery)
#<I> fix - Clicking the surrounding element always opens the first image of the gallery
diff --git a/src/EncodingHelper/FromUtf8.php b/src/EncodingHelper/FromUtf8.php index <HASH>..<HASH> 100644 --- a/src/EncodingHelper/FromUtf8.php +++ b/src/EncodingHelper/FromUtf8.php @@ -58,7 +58,7 @@ class FromUtf8 implements EncodingHelperInterface { $return = ''; for ($i = 0; $i < strlen($string); ++$i) { - $codePoint = ord($string{$i}); + $codePoint = ord($string[$i]); switch ($codePoint) { case 196: $return .= chr(142); diff --git a/src/EncodingHelper/ToUtf8.php b/src/EncodingHelper/ToUtf8.php index <HASH>..<HASH> 100644 --- a/src/EncodingHelper/ToUtf8.php +++ b/src/EncodingHelper/ToUtf8.php @@ -58,7 +58,7 @@ class ToUtf8 implements EncodingHelperInterface { $return = ''; for ($i = 0; $i < strlen($string); ++$i) { - $codePoint = ord($string{$i}); + $codePoint = ord($string[$i]); switch ($codePoint) { case 129: $return .= chr(252);
fix 'Array and string offset access syntax with curly braces is deprecated' note in php-<I> (#<I>)
diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -17,7 +17,7 @@ class ServiceProvider extends LaravelServiceProvider * * @return void */ - protected function boot() + public function boot() { $this->publishes([ __DIR__.'/config.php' => config_path('importer.php'), @@ -29,7 +29,7 @@ class ServiceProvider extends LaravelServiceProvider * * @return void */ - protected function register() + public function register() { $this->app->singleton('importer', function () { return new Importer;
Fix wrong access type for service provider methods
diff --git a/model1.py b/model1.py index <HASH>..<HASH> 100644 --- a/model1.py +++ b/model1.py @@ -24,7 +24,7 @@ class Model1(object): self.en_dict, self.en_words = self.convertArgsToTokens( self.data[2] ) self.dev_in = open(self.data[3], 'r') - self._dev_lines = self.dev_in.readlines() + self.dev_lines = self.dev_in.readlines() self.dev_in.close() for index in range(len(self.en_dict)): @@ -33,7 +33,17 @@ class Model1(object): # print "PAIRS:" # print self.sent_pairs - + def printInfo(self): + for line in self.dev_lines: + self.dev_words += line.split() + #print self.dev_words + + print self.transmissions + # for word in self.dev_words: + # print "English Word:" + word + # print "German Words and Probabilities:" + # print self.transmissions[word] + def convertArgsToTokens(self, data): """ @@ -174,7 +184,7 @@ def main(): model1 = Model1(args) model1.initTef() model1.iterateEM(10) - model1._printInfo() + model1.printInfo() if __name__=="__main__": main()
writing dev-words handling and realized that I am storing the transmissions inccorrectly... need to reverse the dict.... debugging now
diff --git a/lib/browse_everything/version.rb b/lib/browse_everything/version.rb index <HASH>..<HASH> 100644 --- a/lib/browse_everything/version.rb +++ b/lib/browse_everything/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module BrowseEverything - VERSION = '1.0.1' + VERSION = '1.0.2' end
Preparing for release <I>
diff --git a/bugwarrior/services/gitlab.py b/bugwarrior/services/gitlab.py index <HASH>..<HASH> 100644 --- a/bugwarrior/services/gitlab.py +++ b/bugwarrior/services/gitlab.py @@ -80,7 +80,7 @@ class GitlabIssue(Issue): 'label': 'Gitlab Type', }, NUMBER: { - 'type': 'numeric', + 'type': 'string', 'label': 'Gitlab Issue/MR #', }, STATE: { @@ -180,7 +180,7 @@ class GitlabIssue(Issue): self.TITLE: title, self.DESCRIPTION: description, self.MILESTONE: milestone, - self.NUMBER: number, + self.NUMBER: str(number), self.CREATED_AT: created, self.UPDATED_AT: updated, self.DUEDATE: duedate,
gitlab: make the gitlabnumber UDA a string (fixes #<I>) The gitlabnumber's of todos on gitlab.com have grown beyond the limits of the numeric type, and that may happen on other instances too.
diff --git a/anypubsub/backends/memory.py b/anypubsub/backends/memory.py index <HASH>..<HASH> 100644 --- a/anypubsub/backends/memory.py +++ b/anypubsub/backends/memory.py @@ -9,8 +9,8 @@ except ImportError: # pragma: nocover class MemorySubscriber(Subscriber): - def __init__(self): - self.messages = Queue(maxsize=0) + def __init__(self, queue_factory): + self.messages = queue_factory(maxsize=0) def __iter__(self): return self @@ -25,8 +25,9 @@ class MemorySubscriber(Subscriber): class MemoryPubSub(PubSub): - def __init__(self): + def __init__(self, queue_factory=Queue): self.subscribers = defaultdict(lambda: WeakSet()) + self.queue_factory = queue_factory def publish(self, channel, message): subscribers = self.subscribers.get(channel, []) @@ -35,9 +36,9 @@ class MemoryPubSub(PubSub): return len(subscribers) def subscribe(self, *channels): - subscriber = MemorySubscriber() + subscriber = MemorySubscriber(self.queue_factory) for channel in channels: self.subscribers[channel].add(subscriber) return subscriber -backend = MemoryPubSub \ No newline at end of file +backend = MemoryPubSub
Allowed using a custom queue in memory backend.
diff --git a/tensorpack/dataflow/format.py b/tensorpack/dataflow/format.py index <HASH>..<HASH> 100644 --- a/tensorpack/dataflow/format.py +++ b/tensorpack/dataflow/format.py @@ -6,6 +6,7 @@ import h5py import random from six.moves import range +from ..utils import logger from .base import DataFlow """ @@ -20,7 +21,8 @@ class HDF5Data(DataFlow): """ def __init__(self, filename, data_paths, shuffle=True): self.f = h5py.File(filename, 'r') - self.dps = [self.f[k] for k in data_paths] + logger.info("Loading {} to memory...".format(filename)) + self.dps = [self.f[k].value for k in data_paths] lens = [len(k) for k in self.dps] assert all([k==lens[0] for k in lens]) self._size = lens[0]
consume all hdf5 to memory
diff --git a/pandas/tests/test_series.py b/pandas/tests/test_series.py index <HASH>..<HASH> 100644 --- a/pandas/tests/test_series.py +++ b/pandas/tests/test_series.py @@ -1127,12 +1127,21 @@ class TestSeries(unittest.TestCase, CheckNameIntegration): self.assertRaises(ValueError, s.__setitem__, tuple([[[True, False]]]), [0,2,3]) self.assertRaises(ValueError, s.__setitem__, tuple([[[True, False]]]), []) + + s = Series(np.arange(10), dtype=np.int32) + mask = s < 5 + s[mask] = range(5) + expected = Series(np.arange(10), dtype=np.int32) + assert_series_equal(s, expected) + self.assertEquals(s.dtype, expected.dtype) + # GH3235 s = Series(np.arange(10)) mask = s < 5 s[mask] = range(5) - expected = Series(np.arange(10),dtype='float64') - assert_series_equal(s,expected) + expected = Series(np.arange(10)) + assert_series_equal(s, expected) + self.assertEquals(s.dtype, expected.dtype) s = Series(np.arange(10)) mask = s > 5
BUG: test case showing why assigning to dtype is unsafe
diff --git a/tasks/loop-mocha.js b/tasks/loop-mocha.js index <HASH>..<HASH> 100644 --- a/tasks/loop-mocha.js +++ b/tasks/loop-mocha.js @@ -97,7 +97,6 @@ module.exports = function (grunt) { _.each(_.omit(localMochaOptions , 'reportLocation' , 'iterations' - , 'noFail' , 'limit' // the limit var for mapLimit ) , function (value, key) { @@ -111,7 +110,7 @@ module.exports = function (grunt) { done(new Error("[grunt-loop-mocha] You need to make sure your report directory exists before using the xunit-file reporter")); } } - if (localMochaOptions.noFail && localMochaOptions.noFail.toString().toLowerCase() === "true") { + if (loopOptions.noFail && loopOptions.noFail.toString().toLowerCase() === "true") { noFail = true; }
moving noFail to the loop configuration area
diff --git a/test/test_publish.py b/test/test_publish.py index <HASH>..<HASH> 100644 --- a/test/test_publish.py +++ b/test/test_publish.py @@ -11,7 +11,6 @@ import shutil import six from asv import config -from asv.commands.publish import Publish from asv import util @@ -61,7 +60,6 @@ def test_publish(tmpdir): shutil.copyfile(join(RESULT_DIR, 'cheetah', 'machine.json'), join(result_dir, 'cheetah', 'machine.json')) - # Publish the synthesized data conf = config.Config.from_json( {'benchmark_dir': BENCHMARK_DIR,
test: Remove unused import and too many blank line
diff --git a/example/src/components/IconPage.react.js b/example/src/components/IconPage.react.js index <HASH>..<HASH> 100644 --- a/example/src/components/IconPage.react.js +++ b/example/src/components/IconPage.react.js @@ -36,7 +36,7 @@ function IconPage(): React.Node { {iconSets.map(iconSet => ( <Card key={iconSet.prefix}> <Card.Header> - <Card.Title>Feather Icons</Card.Title> + <Card.Title>{iconSet.title}</Card.Title> </Card.Header> <Card.Body> <Grid.Row>
feat(IconPage): Include the title
diff --git a/lib/active_record/connection_adapters/activesalesforce_adapter.rb b/lib/active_record/connection_adapters/activesalesforce_adapter.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/activesalesforce_adapter.rb +++ b/lib/active_record/connection_adapters/activesalesforce_adapter.rb @@ -321,7 +321,7 @@ module ActiveRecord sql = fix_single_quote_in_where(sql) # Arel adds the class to the selection - we do not want this i.e... # SELECT contacts.* FROM => SELECT * FROM - sql = sql.gsub(/SELECT\s+[^\(][A-Z]+\./mi," ") + sql = sql.gsub(/SELECT\s+[^\(][A-Z]+\./mi,"SELECT ") raw_table_name = sql.match(/FROM (\w+)/mi)[1]
fixed rail <I> bug, see select_all() method: regex
diff --git a/src/Scripts/jquery.fileDownload.js b/src/Scripts/jquery.fileDownload.js index <HASH>..<HASH> 100644 --- a/src/Scripts/jquery.fileDownload.js +++ b/src/Scripts/jquery.fileDownload.js @@ -329,7 +329,9 @@ $.extend({ function checkFileDownloadComplete() { //has the cookie been written due to a file download occuring? - if (document.cookie.indexOf(settings.cookieName + "=" + settings.cookieValue) != -1) { + var lowerCaseCookie = settings.cookieName.toLowerCase() + "=" + settings.cookieValue.toLowerCase(); + + if (document.cookie.toLowerCase().indexOf(lowerCaseCookie) > -1) { //execute specified callback internalCallbacks.onSuccess(fileUrl);
Made cookie filename comparison case insensitive.
diff --git a/docs/build.py b/docs/build.py index <HASH>..<HASH> 100644 --- a/docs/build.py +++ b/docs/build.py @@ -74,6 +74,7 @@ if __name__ == '__main__': # build the API doc api = ['sphinx-apidoc', + '-e', '-o', cwd, abspath('../trimesh')]
Put documentation for each module on its own page
diff --git a/tests/vcloud/models/compute/conn_helper.rb b/tests/vcloud/models/compute/conn_helper.rb index <HASH>..<HASH> 100644 --- a/tests/vcloud/models/compute/conn_helper.rb +++ b/tests/vcloud/models/compute/conn_helper.rb @@ -1,19 +1,17 @@ module Fog module Vcloud - class Compute < Fog::Service - class Real - def request(params, &block) - path = File.expand_path(File.join(File.dirname(__FILE__),'..','..','data',params[:path].gsub(/^\//,'').gsub('/','_+_'))) - if File.exists?(path) - body = File.read(path) - else - '' - end - Excon::Response.new( - :body => body, - :status => 200, - :header => '') + class Fog::Connection + def request(params, &block) + path = File.expand_path(File.join(File.dirname(__FILE__),'..','..','data',params[:path].gsub(/^\//,'').gsub('/','_+_'))) + if File.exists?(path) + body = File.read(path) + else + '' end + Excon::Response.new( + :body => body, + :status => 200, + :header => '') end end end
[vcloud|compute] rather mock Fog::Vcloud::Connection as this is the right place to mock things
diff --git a/src/blocks/scratch3_data.js b/src/blocks/scratch3_data.js index <HASH>..<HASH> 100644 --- a/src/blocks/scratch3_data.js +++ b/src/blocks/scratch3_data.js @@ -17,7 +17,7 @@ Scratch3DataBlocks.prototype.getPrimitives = function () { 'data_variable': this.getVariable, 'data_setvariableto': this.setVariableTo, 'data_changevariableby': this.changeVariableBy, - 'data_list': this.getListContents, + 'data_listcontents': this.getListContents, 'data_addtolist': this.addToList, 'data_deleteoflist': this.deleteOfList, 'data_insertatlist': this.insertAtList,
Fix data_listcontents block name (#<I>)
diff --git a/fastlane_core/lib/fastlane_core/helper.rb b/fastlane_core/lib/fastlane_core/helper.rb index <HASH>..<HASH> 100644 --- a/fastlane_core/lib/fastlane_core/helper.rb +++ b/fastlane_core/lib/fastlane_core/helper.rb @@ -202,9 +202,15 @@ module FastlaneCore return ENV["FASTLANE_ITUNES_TRANSPORTER_PATH"] if FastlaneCore::Env.truthy?("FASTLANE_ITUNES_TRANSPORTER_PATH") if self.mac? + # First check for manually install iTMSTransporter + user_local_itms_path = "/usr/local/itms" + return user_local_itms_path if File.exist?(user_local_itms_path) + + # Then check for iTMSTransporter in the Xcode path [ "../Applications/Application Loader.app/Contents/MacOS/itms", - "../Applications/Application Loader.app/Contents/itms" + "../Applications/Application Loader.app/Contents/itms", + "../SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms" # For Xcode 11 ].each do |path| result = File.expand_path(File.join(self.xcode_path, path)) return result if File.exist?(result)
[fastlane_core] added deliver/pilot support for Xcode <I> - new search path for itms_path (#<I>) * [fastlane_core] added new search path for itms_path for xcode <I> * Added path check for manually installed itms
diff --git a/api/models.py b/api/models.py index <HASH>..<HASH> 100644 --- a/api/models.py +++ b/api/models.py @@ -444,7 +444,7 @@ class Release(UuidAuditedModel): config = models.ForeignKey('Config') build = models.ForeignKey('Build') # NOTE: image contains combined build + config, ready to run - image = models.CharField(max_length=256) + image = models.CharField(max_length=256, default=settings.DEFAULT_BUILD) class Meta: get_latest_by = 'created' diff --git a/api/tests/test_release.py b/api/tests/test_release.py index <HASH>..<HASH> 100644 --- a/api/tests/test_release.py +++ b/api/tests/test_release.py @@ -60,6 +60,7 @@ class ReleaseTest(TransactionTestCase): self.assertIn('config', response.data) self.assertIn('build', response.data) self.assertEquals(release1['version'], 1) + self.assertEquals(release1['image'], 'deis/helloworld') # check to see that a new release was created url = '/api/apps/{app_id}/releases/v2'.format(**locals()) response = self.client.get(url)
fix(controller): set default release image If you scale an application with `deis scale cmd=1` before an application has been pushed, it should deploy deis/helloworld. However, the initial release (v1) does not have a image set for the release, only the build. Setting the default to deis/helloworld fixes the "scale before deploy" problem.
diff --git a/gwpy/plotter/core.py b/gwpy/plotter/core.py index <HASH>..<HASH> 100644 --- a/gwpy/plotter/core.py +++ b/gwpy/plotter/core.py @@ -32,6 +32,7 @@ except ImportError: from mpl_toolkits.axes_grid import make_axes_locatable from . import (tex, axes, utils) +from .axes import Axes from .log import CombinedLogFormatterMathtext from .decorators import (auto_refresh, axes_method) @@ -56,6 +57,8 @@ class Plot(figure.Figure): figures from GWpy data objects, and modifying them on-the-fly in interactive mode. """ + _DefaultAxesClass = Axes + def __init__(self, *args, **kwargs): # pull non-standard keyword arguments auto_refresh = kwargs.pop('auto_refresh', False) @@ -291,6 +294,11 @@ class Plot(figure.Figure): # These methods try to guess which axes to add to, otherwise generate # a new one + def add_subplot(self, *args, **kwargs): + kwargs.setdefault('projection', self._DefaultAxesClass.name) + return super(Plot, self).add_subplot(*args, **kwargs) + add_subplot.__doc__ = figure.Figure.add_subplot.__doc__ + def get_axes(self, projection=None): """Find all `Axes`, optionally matching the given projection
Plot: add_subplot now sets default projection - this should fix problems introduced by removing the custom gca()
diff --git a/cmsplugin_cascade/__init__.py b/cmsplugin_cascade/__init__.py index <HASH>..<HASH> 100644 --- a/cmsplugin_cascade/__init__.py +++ b/cmsplugin_cascade/__init__.py @@ -19,6 +19,6 @@ Release logic: 12. git commit -m 'Start with <version>' 13. git push """ -__version__ = "0.9.1" +__version__ = "0.10.dev" default_app_config = 'cmsplugin_cascade.apps.CascadeConfig'
prepare for version <I>.x
diff --git a/lib/client_side_validations/active_record.rb b/lib/client_side_validations/active_record.rb index <HASH>..<HASH> 100644 --- a/lib/client_side_validations/active_record.rb +++ b/lib/client_side_validations/active_record.rb @@ -6,3 +6,6 @@ require 'client_side_validations/active_record/middleware' validator.capitalize! eval "ActiveRecord::Validations::#{validator}Validator.send(:include, ClientSideValidations::ActiveRecord::#{validator})" end + +ActiveRecord::Base.send(:include, ClientSideValidations::ActiveModel::Validations) +
Load order fix. Force ActiveRecord::Base instances to have the instance methods
diff --git a/src/workerCode.js b/src/workerCode.js index <HASH>..<HASH> 100644 --- a/src/workerCode.js +++ b/src/workerCode.js @@ -7,12 +7,12 @@ export function workerCode() { self.document = {}; // Workaround for "ReferenceError: document is not defined" in hpccWasm - var hpccWasm; self.onconnect = function(e) { const port = e.ports[0]; port.addEventListener('message', function(event) { - if (event.data.vizURL) { + let hpccWasm = self["@hpcc-js/wasm"]; + if (hpccWasm == undefined && event.data.vizURL) { importScripts(event.data.vizURL); hpccWasm = self["@hpcc-js/wasm"]; hpccWasm.wasmFolder(event.data.vizURL.match(/.*\//)[0]);
Avoid loading script in shared worker more than once
diff --git a/src/ngrest/base/Plugin.php b/src/ngrest/base/Plugin.php index <HASH>..<HASH> 100644 --- a/src/ngrest/base/Plugin.php +++ b/src/ngrest/base/Plugin.php @@ -77,7 +77,7 @@ abstract class Plugin extends Component throw new Exception("Plugin attributes name, alias and i18n must be configured."); } - $this->addEvent(NgRestModel::EVENT_AFTER_VALIDATE, 'onSave'); + $this->addEvent(NgRestModel::EVENT_BEFORE_VALIDATE, 'onSave'); $this->addEvent(NgRestModel::EVENT_AFTER_FIND, 'onFind'); $this->addEvent(NgRestModel::EVENT_AFTER_NGREST_FIND, 'onListFind'); $this->addEvent(NgRestModel::EVENT_AFTER_NGREST_UPDATE_FIND, 'onExpandFind'); @@ -258,7 +258,9 @@ abstract class Plugin extends Component } /** - * This event will be triggered `onSave` event. If the property of this plugin inside the model, the event will not be triggered. + * This event will be triggered `onSave` event. If the model property is not writeable the event will not trigger. + * + * If the beforeSave method returns true and i18n is enabled, the value will be json encoded. * * @param \yii\db\AfterSaveEvent $event AfterSaveEvent represents the information available in yii\db\ActiveRecord::EVENT_AFTER_INSERT and yii\db\ActiveRecord::EVENT_AFTER_UPDATE. * @return void
revert event validation index in order to keep model generates rules. closes #<I>
diff --git a/pydle/connection.py b/pydle/connection.py index <HASH>..<HASH> 100644 --- a/pydle/connection.py +++ b/pydle/connection.py @@ -85,6 +85,26 @@ class Connection: self.eventloop.register(self.socket.fileno()) self.setup_handlers() + + def upgrade_to_tls(self, tls_verify=False, tls_certificate_file=None, tls_certificate_keyfile=None, tls_certificate_password=None): + """ Uprade existing connection to TLS. """ + # Set local config options. + self.tls = True + self.tls_verify = False + if tls_certificate_file: + self.tls_certificate_file = tls_certificate_file + if tls_certificate_keyfile: + self.tls_certificate_keyfile = tls_certificate_keyfile + if tls_certificate_password: + self.tls_certificate_password = tls_certificate_password + + # Remove socket callbacks since the fd might change as the event loop sees it, setup TLS, and setup handlers again. + self.remove_handlers() + self.eventloop.unregister(self.socket.fileno()) + self.setup_tls() + self.eventloop.register(self.socket.fileno()) + self.setup_handlers() + def setup_tls(self): """ Transform our regular socket into a TLS socket. """ # Set up context.
Add upgrade to TLS functionality to connection.