diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/ELiDE/ELiDE/statlist.py b/ELiDE/ELiDE/statlist.py index <HASH>..<HASH> 100644 --- a/ELiDE/ELiDE/statlist.py +++ b/ELiDE/ELiDE/statlist.py @@ -156,21 +156,12 @@ class StatListView(ListView): def __init__(self, **kwargs): kwargs['adapter'] = self.get_adapter() self._listeners = {} - self.bind(remote=self._trigger_handle_remote) super().__init__(**kwargs) def on_time(self, *args): super().on_time(*args) self._trigger_upd_data() - def handle_remote(self, *args): - if hasattr(self, '_old_remote'): - self.unlisten(remote=self._old_remote) - self._old_remote = self.remote - self.mirror = dict(self.remote) - self.refresh_adapter() - _trigger_handle_remote = trigger(handle_remote) - def on_mirror(self, *args): self._trigger_upd_data() self._trigger_sortkeys() @@ -267,7 +258,6 @@ class StatListView(ListView): _trigger_refresh_adapter = trigger(refresh_adapter) def upd_data(self, *args): - self.mirror = dict(self.remote) if ( '_control' in self.mirror ):
Get rid of old MirrorMapping-based listeners
diff --git a/tests/test_library.py b/tests/test_library.py index <HASH>..<HASH> 100644 --- a/tests/test_library.py +++ b/tests/test_library.py @@ -125,7 +125,6 @@ def test_library_add_edit_delete(plex, movies, photos): # Create Other Videos library = No external metadata scanning section_name = "plexapi_test_section" movie_location = movies.locations[0] - movie_path = plex.browse(path=movie_location)[0] photo_location = photos.locations[0] plex.library.add( name=section_name, @@ -173,12 +172,6 @@ def test_library_add_edit_delete(plex, movies, photos): section.addLocations(photo_location) section.reload() assert len(section.locations) == 2 - section.removeLocations(movie_path) - section.reload() - assert len(section.locations) == 1 - section.addLocations(movie_path) - section.reload() - assert len(section.locations) == 2 section.edit(**{'location': [movie_location]}) section.reload() assert len(section.locations) == 1
removing testing with `Path` object
diff --git a/bundler.d/checking.rb b/bundler.d/checking.rb index <HASH>..<HASH> 100644 --- a/bundler.d/checking.rb +++ b/bundler.d/checking.rb @@ -1,7 +1,6 @@ group :checking do unless defined? JRUBY_VERSION - # TODO - lock until we get this working on rhel6 - gem 'therubyracer', "= 0.11.0beta8", :require => "v8" + gem 'therubyracer', "~> 0.11.0", :require => "v8" gem 'ref' end gem 'jshintrb', '0.2.1'
bumping version of therubyracer
diff --git a/lib/active_record/connection_adapters/sqlserver/database_statements.rb b/lib/active_record/connection_adapters/sqlserver/database_statements.rb index <HASH>..<HASH> 100644 --- a/lib/active_record/connection_adapters/sqlserver/database_statements.rb +++ b/lib/active_record/connection_adapters/sqlserver/database_statements.rb @@ -106,8 +106,8 @@ module ActiveRecord end end - def empty_insert_statement(table_name) - "INSERT INTO #{quote_table_name(table_name)} DEFAULT VALUES" + def empty_insert_statement_value + "DEFAULT VALUES" end def case_sensitive_equality_operator
[Rails3] New DatabaseStatement for empty insert statements.
diff --git a/news-bundle/src/Resources/contao/dca/tl_news.php b/news-bundle/src/Resources/contao/dca/tl_news.php index <HASH>..<HASH> 100644 --- a/news-bundle/src/Resources/contao/dca/tl_news.php +++ b/news-bundle/src/Resources/contao/dca/tl_news.php @@ -320,7 +320,7 @@ $GLOBALS['TL_DCA']['tl_news'] = array 'exclude' => true, 'search' => true, 'inputType' => 'text', - 'eval' => array('maxlength'=>255, 'tl_class'=>'w50'), + 'eval' => array('maxlength'=>255, 'allowHtml'=>true, 'tl_class'=>'w50'), 'sql' => "varchar(255) NOT NULL default ''" ), 'floating' => array
[News] Allow HTML input in image caption fields (see #<I>)
diff --git a/spec/unit/connection_spec.rb b/spec/unit/connection_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/connection_spec.rb +++ b/spec/unit/connection_spec.rb @@ -109,7 +109,7 @@ module Neography end it "does requests with authentication" do - connection.client.should_receive(:set_auth).with( + connection.client.should_not_receive(:set_auth).with( "http://localhost:7474/db/data/foo/bar", "foo", "bar") { double.as_null_object }
authentication now happens at initialization, not later
diff --git a/lib/dryrun/android_project.rb b/lib/dryrun/android_project.rb index <HASH>..<HASH> 100644 --- a/lib/dryrun/android_project.rb +++ b/lib/dryrun/android_project.rb @@ -82,7 +82,7 @@ module Dryrun content = File.open(@settings_gradle_path, 'rb').read modules = content.scan(/'([^']*)'/) - modules.each {|replacement| replacement.first.tr!(':', '/')} + modules.each {|replacement| replacement.first.tr!(':', '')} end def execute_command(command) @@ -112,8 +112,8 @@ module Dryrun end def sample_project - if @custom_module && @modules.any? {|m| m.first == "/#{@custom_module}"} - @path_to_sample = File.join(@base_path, "/#{@custom_module}") + if @custom_module && @modules.any? {|m| m.first == "#{@custom_module}"} + @path_to_sample = File.join(@base_path, "#{@custom_module}") return @path_to_sample else @modules.each do |child|
Do not inclue file separator to the name of custom module
diff --git a/silverberg/thrift_client.py b/silverberg/thrift_client.py index <HASH>..<HASH> 100644 --- a/silverberg/thrift_client.py +++ b/silverberg/thrift_client.py @@ -109,7 +109,7 @@ class OnDemandThriftClient(object): return d def _notify_on_connect(self): - d = Deferred(lambda d: self.disconnect()) + d = Deferred() self._waiting_on_connect.append(d) return d
reverted cancellation in thirftclient since cancellation of cqlclient will call its disconnect which will call thrift client's disconnect
diff --git a/gui.go b/gui.go index <HASH>..<HASH> 100644 --- a/gui.go +++ b/gui.go @@ -6,6 +6,7 @@ package gocui import ( "errors" + "sync" "github.com/nsf/termbox-go" ) @@ -28,6 +29,9 @@ type Gui struct { keybindings []*keybinding maxX, maxY int + // Protects the gui from being flushed concurrently. + mu sync.Mutex + // BgColor and FgColor allow to configure the background and foreground // colors of the GUI. BgColor, FgColor Attribute @@ -254,6 +258,9 @@ func (g *Gui) handleEvent(ev *termbox.Event) error { // Flush updates the gui, re-drawing frames and buffers. func (g *Gui) Flush() error { + g.mu.Lock() + defer g.mu.Unlock() + if g.layout == nil { return errors.New("Null layout") }
Protect Gui from being flushed concurrently
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -480,7 +480,7 @@ module.exports = function(grunt) { // public commands grunt.registerTask('happyplan:dev', ['jshint', 'happyplan:build']); - grunt.registerTask('happyplan:dist', ['jshint', 'happyplan:build', 'imagemin:dist']);//, 'clean:build']); + grunt.registerTask('happyplan:dist', ['jshint', 'happyplan:build', 'imagemin:dist']); //happyplan: == default grunt.registerTask('happyplan:default', ['happyplan:dev', 'connect:server', 'open:dev', 'watch']); diff --git a/tasks/build.js b/tasks/build.js index <HASH>..<HASH> 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -27,6 +27,7 @@ module.exports = function (grunt) { grunt.registerTask('happyplan:build', 'Build the website', [ // clean everything + 'clean:build', 'clean:dist', // run static generator
Start with a clean `build` directory each time you start the process. Close #<I>
diff --git a/helpers/io_helper.rb b/helpers/io_helper.rb index <HASH>..<HASH> 100644 --- a/helpers/io_helper.rb +++ b/helpers/io_helper.rb @@ -127,6 +127,11 @@ module IO_helper File.open(path, 'w+'){|f| f.write(new_lines.join)} end + def cd_in(path) + puts "cd into #{path}".colorize(:green) + FileUtils.cd(path) + end + def cli_exist?(path, cli) File.directory?("#{path}/#{cli}") end
io helper cd_in method added
diff --git a/tests/test_kvstore.py b/tests/test_kvstore.py index <HASH>..<HASH> 100644 --- a/tests/test_kvstore.py +++ b/tests/test_kvstore.py @@ -176,6 +176,13 @@ class KVStoreBase(object): class TestBsddbStore(unittest.TestCase, KVStoreBase): DB = "tests.test_bsddb_store" + @classmethod + def setUpClass(cls): + try: + import bsddb + except ImportError: + raise unittest.SkipTest("bsddb not installed") + def setUp(self): self.store = cobe.kvstore.BsddbStore(self.DB)
Skip BsddbStore tests if bsddb is missing or broken (as on OSX)
diff --git a/src/Controller/MenusController.php b/src/Controller/MenusController.php index <HASH>..<HASH> 100644 --- a/src/Controller/MenusController.php +++ b/src/Controller/MenusController.php @@ -18,7 +18,7 @@ class MenusController extends AppController */ public function index() { - $menus = $this->paginate($this->Menus); + $menus = $this->Menus->find('all'); $this->set(compact('menus')); $this->set('_serialize', ['navMenu']);
Removed pagination, will be handled by datatables (task #<I>)
diff --git a/src/test/java/com/esotericsoftware/kryo/KryoTest.java b/src/test/java/com/esotericsoftware/kryo/KryoTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/esotericsoftware/kryo/KryoTest.java +++ b/src/test/java/com/esotericsoftware/kryo/KryoTest.java @@ -84,7 +84,7 @@ public class KryoTest { @SuppressWarnings( "unchecked" ) @Override protected Serializer newDefaultSerializer( final Class type ) { - return new ReferenceFieldSerializer( _kryo, type ); + return new ReferenceFieldSerializer( this, type ); } /**
change reference to this instead of the field
diff --git a/meta/state.go b/meta/state.go index <HASH>..<HASH> 100644 --- a/meta/state.go +++ b/meta/state.go @@ -130,7 +130,19 @@ func (r *localRaft) open() error { return err } - // Make sure our address is in the raft peers or we won't be able to boot into the cluster + // For single-node clusters, we can update the raft peers before we start the cluster if the hostname + // has changed. + if config.EnableSingleNode { + if err := r.peerStore.SetPeers([]string{s.RemoteAddr.String()}); err != nil { + return err + } + peers = []string{s.RemoteAddr.String()} + } + + // If we have multiple nodes in the cluster, make sure our address is in the raft peers or + // we won't be able to boot into the cluster because the other peers will reject our new hostname. This + // is difficult to resolve automatically because we need to have all the raft peers agree on the current members + // of the cluster before we can change them. if len(peers) > 0 && !raft.PeerContained(peers, s.RemoteAddr.String()) { s.Logger.Printf("%v is not in the list of raft peers. Please update %v/peers.json on all raft nodes to have the same contents.", s.RemoteAddr.String(), s.Path()) return fmt.Errorf("peers out of sync: %v not in %v", s.RemoteAddr.String(), peers)
Make host rename on single node more seemless Renaming a host that is a raft peer member is pretty difficult but we can special case single-node renames since we know all the member in the cluster and we can update the peer store directly on all nodes (just one). Fixes #<I>
diff --git a/numexpr/version.py b/numexpr/version.py index <HASH>..<HASH> 100644 --- a/numexpr/version.py +++ b/numexpr/version.py @@ -1,5 +1,5 @@ version='1.2' -release=False +release=True if not release: version += '.dev'
Start the packaging phase for <I>.
diff --git a/tests/text_quotations_test.py b/tests/text_quotations_test.py index <HASH>..<HASH> 100644 --- a/tests/text_quotations_test.py +++ b/tests/text_quotations_test.py @@ -712,7 +712,11 @@ Subject: Hi Attachments: none Hello. + +-- Original Message -- +On 24th February 2016 at 09.32am Conal Wrote: +Hey! """ - expected_markers = "stttttsttttet" + expected_markers = "stttttsttttetestt" markers = quotations.split_emails(msg) eq_(markers, expected_markers)
Updating test to account for --original message-- case
diff --git a/src/models/color.js b/src/models/color.js index <HASH>..<HASH> 100644 --- a/src/models/color.js +++ b/src/models/color.js @@ -272,6 +272,9 @@ const ColorModel = Hook.extend({ : { min: timeMdl.start, max: timeMdl.end }; + if (!limits.min) limits.min = new Date(); + if (!limits.max) limits.max = new Date(); + const singlePoint = (limits.max - limits.min == 0); domain = domain.sort((a, b) => a - b);
Add protection for the case when buildScale is executed prematurely and limits are null, which results in error when doing null.valueOf() <URL>
diff --git a/Dropbox/OAuth/Storage/Encrypter.php b/Dropbox/OAuth/Storage/Encrypter.php index <HASH>..<HASH> 100644 --- a/Dropbox/OAuth/Storage/Encrypter.php +++ b/Dropbox/OAuth/Storage/Encrypter.php @@ -66,6 +66,11 @@ class Encrypter $iv = substr($cipherText, 0, self::IV_SIZE); $cipherText = substr($cipherText, self::IV_SIZE); $data = mcrypt_decrypt(self::CIPHER, $this->key, $cipherText, self::MODE, $iv); - return unserialize($data); + $token = @unserialize($data); + if($token === false){ // Unserialize fails if $token is boolean false + throw new \Dropbox\Exception('Failed to unserialize token'); + } else { + return $token; + } } }
Added check for failed unserialisation of token
diff --git a/src/base/reader.js b/src/base/reader.js index <HASH>..<HASH> 100644 --- a/src/base/reader.js +++ b/src/base/reader.js @@ -151,7 +151,14 @@ const Reader = Class.extend({ const result = Object.keys(row).reduce((result, key) => { if (correct) { - const value = utils.isString(row[key]) ? row[key].replace(",", ".").replace(/0*$/, "").trim() : row[key]; + const defaultValue = row[key]; + const value = !utils.isString(defaultValue) ? + defaultValue : + defaultValue.replace(",", ".") + .replace(new RegExp(defaultValue.includes(".") ? "0+$" : ""), "") + .replace(/\.$/, "") + .trim(); + const parser = parsers[key]; let resultValue;
Trim right zeros only if dot is present. Trim trailing dot (#<I>)
diff --git a/liquibase-core/src/main/java/liquibase/changelog/OfflineChangeLogHistoryService.java b/liquibase-core/src/main/java/liquibase/changelog/OfflineChangeLogHistoryService.java index <HASH>..<HASH> 100644 --- a/liquibase-core/src/main/java/liquibase/changelog/OfflineChangeLogHistoryService.java +++ b/liquibase-core/src/main/java/liquibase/changelog/OfflineChangeLogHistoryService.java @@ -222,11 +222,11 @@ public class OfflineChangeLogHistoryService extends AbstractChangeLogHistoryServ csvWriter.writeNext(line); } } - oldFile.delete(); - newFile.renameTo(oldFile); } catch (Exception e) { throw new DatabaseException(e); } + oldFile.delete(); + newFile.renameTo(oldFile); } protected void appendChangeSet(ChangeSet changeSet, ChangeSet.ExecType execType) throws DatabaseException { @@ -265,11 +265,12 @@ public class OfflineChangeLogHistoryService extends AbstractChangeLogHistoryServ csvWriter.writeNext(newLine); - oldFile.delete(); - newFile.renameTo(oldFile); } catch (Exception e) { throw new DatabaseException(e); } + + oldFile.delete(); + newFile.renameTo(oldFile); } @Override
closing streams before rename (cherry picked from commit b8c<I>afe7c<I>da<I>ef5f<I>e6a0bed6)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) os.system('pip install https://bitbucket.org/lazka/mutagen/get/default.tar.gz') setup( name='soundscrape', - version='0.22.2', + version='0.23.0', packages=['soundscrape'], install_requires=required, extras_require={ ':python_version < "3.0"': [ 'wsgiref>=0.1.2', ], }, @@ -42,6 +42,9 @@ setup( 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ],
<I> - initial Python3 support. Hoping this doesn't break P2 unicode..
diff --git a/common.js b/common.js index <HASH>..<HASH> 100644 --- a/common.js +++ b/common.js @@ -188,9 +188,11 @@ function schemaToArray(schema,offset,options,data) { let blockDepth = 0; let container = []; let block = { title: '', rows: [] }; - if (schema.description) block.title = schema.description; - if (!block.title && schema.title) block.title = schema.title; - if (schema.externalDocs) block.externalDocs = schema.externalDocs; + if (schema) { + if (schema.description) block.title = schema.description; + if (!block.title && schema.title) block.title = schema.title; + if (schema.externalDocs) block.externalDocs = schema.externalDocs; + } container.push(block); let wsState = wsGetState(); wsState.combine = true;
Harden prev commit against undefined schemas
diff --git a/server/clientcommands.js b/server/clientcommands.js index <HASH>..<HASH> 100644 --- a/server/clientcommands.js +++ b/server/clientcommands.js @@ -46,8 +46,13 @@ var listeners = { // be sent from the IRCd to the target without being truncated. var blocks = truncateString(args.msg, 350); - blocks.forEach(function (block) { - irc_connection.write('PRIVMSG ' + args.target + ' :' + block); + blocks.forEach(function (block, idx) { + // Apply the callback on the last message only + var cb = (idx === blocks.length - 1) ? + callback : + undefined; + + irc_connection.write('PRIVMSG ' + args.target + ' :' + block, cb); }); }, @@ -120,8 +125,13 @@ var listeners = { // be sent from the IRCd to the target without being truncated. var blocks = truncateString(args.msg, 350); - blocks.forEach(function (block) { - irc_connection.write('NOTICE ' + args.target + ' :' + block); + blocks.forEach(function (block, idx) { + // Apply the callback on the last message only + var cb = (idx === blocks.length - 1) ? + callback : + undefined; + + irc_connection.write('NOTICE ' + args.target + ' :' + block, cb); }); },
Callback fix on on truncated messages
diff --git a/src/autobind.js b/src/autobind.js index <HASH>..<HASH> 100644 --- a/src/autobind.js +++ b/src/autobind.js @@ -78,7 +78,7 @@ function autobindMethod(target, key, { value: fn, configurable, enumerable }) { return fn; } - // Autobound method calling calling super.sameMethod() which is also autobound and so on. + // Autobound method calling super.sameMethod() which is also autobound and so on. if (this.constructor !== constructor && key in this.constructor.prototype) { return getBoundSuper(this, fn); }
comment had double "calling" word
diff --git a/stanza/models/ner_tagger.py b/stanza/models/ner_tagger.py index <HASH>..<HASH> 100644 --- a/stanza/models/ner_tagger.py +++ b/stanza/models/ner_tagger.py @@ -249,8 +249,9 @@ def train(args): logger.info("Training ended with {} steps.".format(global_step)) - best_f, best_eval = max(dev_score_history)*100, np.argmax(dev_score_history)+1 - logger.info("Best dev F1 = {:.2f}, at iteration = {}".format(best_f, best_eval * args['eval_interval'])) + if len(dev_score_history) > 0: + best_f, best_eval = max(dev_score_history)*100, np.argmax(dev_score_history)+1 + logger.info("Best dev F1 = {:.2f}, at iteration = {}".format(best_f, best_eval * args['eval_interval'])) def evaluate(args): # file paths
Only report max dev score if ran dev set at least once
diff --git a/client/state/plugins/installed/test/selectors.js b/client/state/plugins/installed/test/selectors.js index <HASH>..<HASH> 100644 --- a/client/state/plugins/installed/test/selectors.js +++ b/client/state/plugins/installed/test/selectors.js @@ -125,6 +125,20 @@ describe( 'Installed plugin selectors', () => { } ); } ); + describe( 'isLoaded', () => { + test( 'Should get `false` if this site is not in the current state', () => { + expect( selectors.isLoaded( state, 'no.site' ) ).to.be.false; + } ); + + test( 'Should get `true` if this site is done being fetched', () => { + expect( selectors.isLoaded( state, 'site.one' ) ).to.be.true; + } ); + + test( 'Should get `false` if this site is currently being fetched', () => { + expect( selectors.isLoaded( state, 'site.three' ) ).to.be.false; + } ); + } ); + describe( 'isRequestingForSites', () => { test( 'Should get `false` if no sites are being fetched', () => { expect( selectors.isRequestingForSites( state, [ 'site.one', 'site.two' ] ) ).to.be.false;
Plugins State: Add test for new isLoaded selector (#<I>)
diff --git a/usb/_interop.py b/usb/_interop.py index <HASH>..<HASH> 100644 --- a/usb/_interop.py +++ b/usb/_interop.py @@ -131,8 +131,7 @@ def as_array(data=None): except TypeError: # When you pass a unicode string or a character sequence, # you get a TypeError if first parameter does not match - try: - return array.array('c', data) - except TypeError: - return array.array('u', data) + a = array.array('B') + a.fromstring(data) + return a
Fixed compatibility with Python <I>. closes #8. In usb/_interop.py in the as_array function, the array typecodes 'c' and 'u' are used. The 'c' typecode was removed from python <I> and 'u' will is deprecated. The solution is to use the fromstring array method, but it has the side effect of adding only the first byte of Unicode strings.
diff --git a/login/index.php b/login/index.php index <HASH>..<HASH> 100644 --- a/login/index.php +++ b/login/index.php @@ -152,6 +152,9 @@ if ($authsequence[0] == 'cas' and !empty($CFG->cas_enabled)) { set_moodle_cookie($USER->username); set_login_session_preferences(); + /// This is what lets the user do anything on the site :-) + load_all_capabilities(); + //Select password change url $userauth = get_auth_plugin($USER->auth); if ($userauth->can_change_password()) { @@ -214,8 +217,6 @@ if ($authsequence[0] == 'cas' and !empty($CFG->cas_enabled)) { reset_login_count(); - load_all_capabilities(); /// This is what lets the user do anything on the site :-) - redirect($urltogo); exit;
MDL-<I> placement of load_all_capabilities() in login page
diff --git a/packages/core/src/textures/resources/CanvasResource.js b/packages/core/src/textures/resources/CanvasResource.js index <HASH>..<HASH> 100644 --- a/packages/core/src/textures/resources/CanvasResource.js +++ b/packages/core/src/textures/resources/CanvasResource.js @@ -1,6 +1,10 @@ import BaseImageResource from './BaseImageResource'; /** + * @interface OffscreenCanvas + */ + +/** * Resource type for HTMLCanvasElement. * @class * @extends PIXI.resources.BaseImageResource
Compatibility with older typescript OffscreenCanvas type (#<I>)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -16,15 +16,9 @@ try: from Cython.Build import cythonize except ImportError: import os - try: - pyx_time = os.path.getmtime('cyflann/index.pyx') - pxd_time = os.path.getmtime('cyflann/flann.pxd') - c_time = os.path.getmtime('cyflann/index.c'.format(pkg, name)) - if max(pyx_time, pxd_time) >= c_time: - raise ValueError - except (OSError, ValueError): - msg = "{} extension needs to be compiled but cython isn't available" - raise ImportError(msg.format(name)) + if not os.path.exists('cyflann/index.c'): + msg = "index extension needs to be compiled but cython isn't available" + raise ImportError(msg) else: cythonize("cyflann/index.pyx", "cyflann/flann.pdx") ext_modules = [
meh; don't be clever about mod-times for .c when cython isn't available
diff --git a/sinatra-contrib/lib/sinatra/reloader.rb b/sinatra-contrib/lib/sinatra/reloader.rb index <HASH>..<HASH> 100644 --- a/sinatra-contrib/lib/sinatra/reloader.rb +++ b/sinatra-contrib/lib/sinatra/reloader.rb @@ -232,6 +232,15 @@ module Sinatra # Contains the methods defined in Sinatra::Base that are overriden. module BaseMethods + # Protects Sinatra::Base.run! from being called more than once. + def run!(*args) + if settings.reloader? + super unless running? + else + super + end + end + # Does everything Sinatra::Base#route does, but it also tells the # +Watcher::List+ for the Sinatra application to watch the defined # route.
don't run if we are already running, closes #<I>
diff --git a/pull_into_place/pipeline.py b/pull_into_place/pipeline.py index <HASH>..<HASH> 100644 --- a/pull_into_place/pipeline.py +++ b/pull_into_place/pipeline.py @@ -102,7 +102,7 @@ class Workspace(object): @property def rosetta_dir(self): - return self.find_path('rosetta') + return self.find_path('rosetta', self.root_dir) @property def rosetta_scripts_path(self): @@ -273,7 +273,7 @@ Expected to find a file matching '{0}'. Did you forget to compile rosetta? self.standard_params_dir, ] - def find_path(self, basename): + def find_path(self, basename, install_dir=None): """ Look in a few places for a file with the given name. If a custom version of the file is found in the directory being managed by @@ -294,7 +294,7 @@ Expected to find a file matching '{0}'. Did you forget to compile rosetta? # If we didn't find the file, return the path to where we'd like it to # be installed. - return os.path.join(self.preferred_install_dir, basename) + return os.path.join(install_dir or self.preferred_install_dir, basename) def check_paths(self): required_paths = [
Install the rosetta symlink into the root dir. This removes the need for creating a basically empty project_params dir in remote workspaces.
diff --git a/lib/fabrication/schematic/manager.rb b/lib/fabrication/schematic/manager.rb index <HASH>..<HASH> 100644 --- a/lib/fabrication/schematic/manager.rb +++ b/lib/fabrication/schematic/manager.rb @@ -8,16 +8,13 @@ class Fabrication::Schematic::Manager def initializing?; @initializing end - def freeze - @initializing = false - end - - def clear - schematics.clear + def schematics + @schematics ||= {} end + delegate :clear, :empty?, to: :schematics - def empty? - schematics.empty? + def freeze + @initializing = false end def register(name, options, &block) @@ -30,10 +27,6 @@ class Fabrication::Schematic::Manager schematics[name.to_sym] end - def schematics - @schematics ||= {} - end - def build_stack @build_stack ||= [] end
Delegate clear and empty? to schematics
diff --git a/app/controllers/tuttle/ruby_controller.rb b/app/controllers/tuttle/ruby_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/tuttle/ruby_controller.rb +++ b/app/controllers/tuttle/ruby_controller.rb @@ -7,7 +7,7 @@ module Tuttle def index # TODO: need better filter for sensitive values. this covers DB-style URLs with passwords, passwords, and keys - @filtered_env = ENV.to_hash.tap { |h| h.each { |k, _v| h[k] = '--FILTERED--' if /.*_(URL|PASSWORD|KEY|KEY_BASE)$/ =~ k } } + @filtered_env = ENV.to_hash.tap { |h| h.each { |k, _v| h[k] = '--FILTERED--' if /.*_(URL|PASSWORD|KEY|KEY_BASE|AUTHENTICATION)$/ =~ k } } end def tuning
filter *_AUTHENTICATION environment variables
diff --git a/test/unit/list_test.rb b/test/unit/list_test.rb index <HASH>..<HASH> 100644 --- a/test/unit/list_test.rb +++ b/test/unit/list_test.rb @@ -158,7 +158,8 @@ EOS def test_self_default_getter - assert_equal nil, PublicSuffix::List.class_eval { @default } + PublicSuffix::List.default = nil + assert_nil PublicSuffix::List.class_eval { @default; } PublicSuffix::List.default assert_not_equal nil, PublicSuffix::List.class_eval { @default } end
As we don't know test_self_default_getter will run, it must be set to nil
diff --git a/app/controllers/concerns/paginated.rb b/app/controllers/concerns/paginated.rb index <HASH>..<HASH> 100644 --- a/app/controllers/concerns/paginated.rb +++ b/app/controllers/concerns/paginated.rb @@ -6,7 +6,7 @@ module Paginated end def per_page - @per_page ||= params[:per_page].to_i == 0 ? AppSettings.default_page_size : params[:per].to_i + @per_page ||= params[:per_page].to_i == 0 ? AppSettings.default_page_size : params[:per_page].to_i end def set_pagination_results(resource, results, total_count = nil)
Fixed per_page assignment booboo
diff --git a/Helper/PasswordHelper.php b/Helper/PasswordHelper.php index <HASH>..<HASH> 100644 --- a/Helper/PasswordHelper.php +++ b/Helper/PasswordHelper.php @@ -12,7 +12,7 @@ namespace Orkestra\Bundle\ApplicationBundle\Helper; use Orkestra\Bundle\ApplicationBundle\Entity\HashedEntity; -use Orkestra\Bundle\ApplicationBundle\Entity\User; +use Orkestra\Bundle\ApplicationBundle\Model\UserInterface; class PasswordHelper { @@ -64,7 +64,7 @@ class PasswordHelper * * @return HashedEntity */ - public function sendPasswordResetEmail(User $user, $subject = 'Password reset request') + public function sendPasswordResetEmail(UserInterface $user, $subject = 'Password reset request') { $hashedEntity = $this->createHash($user); $this->emailHelper->createAndSendMessageFromTemplate( @@ -84,7 +84,7 @@ class PasswordHelper * @param User $user * @return HashedEntity */ - private function createHash(User $user) + private function createHash(UserInterface $user) { $hashedEntity = $this->hashedEntityHelper->create($user, new \DateTime('+1 day'));
PasswordHelper now only needs a UserInterface
diff --git a/firetv/__init__.py b/firetv/__init__.py index <HASH>..<HASH> 100644 --- a/firetv/__init__.py +++ b/firetv/__init__.py @@ -9,6 +9,7 @@ ADB Debugging must be enabled. import errno from socket import error as socket_error from adb import adb_commands +from adb.adb_protocol import InvalidChecksumError # ADB key event codes. HOME = 3 @@ -205,11 +206,15 @@ class FireTV: return result = [] ps = self._adb.StreamingShell('ps') - for bad_line in ps: - # The splitting of the StreamingShell doesn't always work - # this is to ensure that we get only one line - for line in bad_line.splitlines(): - if search in line: - result.append(line.strip().rsplit(' ',1)[-1]) - return result - + try: + for bad_line in ps: + # The splitting of the StreamingShell doesn't always work + # this is to ensure that we get only one line + for line in bad_line.splitlines(): + if search in line: + result.append(line.strip().rsplit(' ',1)[-1]) + return result + except InvalidChecksumError as e: + print e + self.connect() + raise IOError
Worked around bug with Checksum error dropping connection
diff --git a/bypy.py b/bypy.py index <HASH>..<HASH> 100755 --- a/bypy.py +++ b/bypy.py @@ -1500,13 +1500,15 @@ class ByPy(object): return EFileWrite def __store_json(self, r): + j = {} try: - r.json() + j = r.json() except Exception: perr("Failed to decode JSON:\n" \ "Exception:\n{}".format(traceback.format_exc())) + perr("Error response:\n{}".format(r.text)); return EInvalidJson - return self.__store_json_only(r.json()) + return self.__store_json_only(j) def __load_local_bduss(self): try:
Print auth/refresh web response on error
diff --git a/lib/api.js b/lib/api.js index <HASH>..<HASH> 100644 --- a/lib/api.js +++ b/lib/api.js @@ -1,7 +1,8 @@ /** * Helper "class" for accessing MediaWiki API and handling cookie-based session */ - var VERSION = '0.3.5'; +module.exports = (function() { + var VERSION = '0.3.6'; // @see https://github.com/mikeal/request var request = require('request'); @@ -104,15 +105,21 @@ port: this.port, hostname: this.server, pathname: this.path + '/api.php', - query: params + query: (options.method === 'GET') ? params : {} }); + // POST all parameters (avoid "request string too long" errors) + if (method === 'POST') { + options.form = params; + } + request(options, function(error, response, body) { if (error) { throw 'Request to API failed: ' + error; } if (response.statusCode !== 200) { + console.log(new Error().stack); throw 'Request to API failed: HTTP status code was ' + response.statusCode; } @@ -246,4 +253,5 @@ } }; - module.exports = api; + return api; +}());
api.js: * fix for huge POST requests (make sure data is POSTed, not encoded in URL) * wrap module in immediate function * <I>
diff --git a/src/main/java/org/java_websocket/WebSocket.java b/src/main/java/org/java_websocket/WebSocket.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/java_websocket/WebSocket.java +++ b/src/main/java/org/java_websocket/WebSocket.java @@ -137,17 +137,18 @@ public interface WebSocket { boolean hasBufferedData(); /** - * Returns the address of the endpoint this socket is connected to, or{@code null} if it is + * Returns the address of the endpoint this socket is connected to, or {@code null} if it is * unconnected. * - * @return never returns null + * @return the remote socket address or null, if this socket is unconnected */ InetSocketAddress getRemoteSocketAddress(); /** - * Returns the address of the endpoint this socket is bound to. + * Returns the address of the endpoint this socket is bound to, or {@code null} if it is not + * bound. * - * @return never returns null + * @return the local socket address or null, if this socket is not bound */ InetSocketAddress getLocalSocketAddress();
Update documentation comments for member methods Update documentation comments for methods getRemoteSocketAddress and getLocalSocketAddress in WebSocket.java.
diff --git a/montblanc/impl/biro/v5/gpu/RimeSumCoherencies.py b/montblanc/impl/biro/v5/gpu/RimeSumCoherencies.py index <HASH>..<HASH> 100644 --- a/montblanc/impl/biro/v5/gpu/RimeSumCoherencies.py +++ b/montblanc/impl/biro/v5/gpu/RimeSumCoherencies.py @@ -26,8 +26,8 @@ import pycuda.gpuarray as gpuarray import montblanc.impl.biro.v4.gpu.RimeSumCoherencies class RimeSumCoherencies(montblanc.impl.biro.v4.gpu.RimeSumCoherencies.RimeSumCoherencies): - def __init__(self, weight_vector=False): - super(RimeSumCoherencies, self).__init__(weight_vector=weight_vector) + def __init__(self): + super(RimeSumCoherencies, self).__init__() def initialise(self, solver, stream=None): super(RimeSumCoherencies, self).initialise(solver,stream) def shutdown(self, solver, stream=None):
Cease passing weight vector flags in v5.
diff --git a/js/sia.js b/js/sia.js index <HASH>..<HASH> 100644 --- a/js/sia.js +++ b/js/sia.js @@ -18,7 +18,6 @@ function SiadWrapper () { var settings = { fileName: process.platform === 'win32' ? 'siad.exe' : 'siad', detached: false, - agent: 'Sia-Agent', address: 'localhost:9980', rpcAddress: ':9981', hostAddress: ':9982', @@ -49,7 +48,7 @@ function SiadWrapper () { call.url = 'http://' + settings.address + call.url call.json = true call.headers = { - 'User-Agent': settings.agent + 'User-Agent': 'Sia-Agent' } // Return the request sent if the user wants to be creative and get more @@ -163,7 +162,6 @@ function SiadWrapper () { // Spawn siad const Process = require('child_process').spawn var daemonProcess = new Process(nodePath.join(settings.path, settings.fileName), [ - '--agent=' + settings.agent, '--api-addr=' + settings.address, '--rpc-addr=' + settings.rpcAddress, '--host-addr=' + settings.hostAddress,
User agent option prevented siad from starting Somehow I thought I already fixed this.
diff --git a/lib/sensu/api/routes/silenced.rb b/lib/sensu/api/routes/silenced.rb index <HASH>..<HASH> 100644 --- a/lib/sensu/api/routes/silenced.rb +++ b/lib/sensu/api/routes/silenced.rb @@ -77,7 +77,7 @@ module Sensu if data[:expire] expire = data[:expire] expire += begin_timestamp - timestamp - @redis.expire(silenced_key, expire) do + @redis.expire(silenced_key, expire) do created! end else
[maitenance] fixed minor indentation issue
diff --git a/jsx.js b/jsx.js index <HASH>..<HASH> 100644 --- a/jsx.js +++ b/jsx.js @@ -43,12 +43,9 @@ acornJSXWalk(walk.base); // Allow renaming variables used in JSX. - infer.searchVisitor.JSXIdentifier = function () { - // Identifier is defined ad-hoc, so call the latest instance. Using - // `this` is risky because the callee could be detached. However, at - // present, Tern only passes this visitor and its descendants to `walk` - // methods which preserve the context. - return this.Identifier.apply(this, arguments); + infer.searchVisitor.JSXIdentifier = function (node, st, c) { + // Identifier is defined ad-hoc, so call the latest instance. + c(node, st, 'Identifier'); }; // Allow finding the definition, type and docs of a JSXIdentifier.
Use typical "forwarding" technique.
diff --git a/src/util/Constants.js b/src/util/Constants.js index <HASH>..<HASH> 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -723,7 +723,7 @@ exports.VerificationLevels = createEnum(['NONE', 'LOW', 'MEDIUM', 'HIGH', 'VERY_ * * MESSAGE_ALREADY_HAS_THREAD * * THREAD_LOCKED * * MAXIMUM_ACTIVE_THREADS - * * MAXIMUM_ACTIVE_ANNOUCEMENT_THREAD + * * MAXIMUM_ACTIVE_ANNOUNCEMENT_THREAD * @typedef {string} APIError * @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes} */
docs(Constants): fix typo "announcement" (#<I>)
diff --git a/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java b/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java index <HASH>..<HASH> 100644 --- a/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java +++ b/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java @@ -503,6 +503,8 @@ implements ShutdownListener { if (redirScheme == null && isExactSchemeMatch()) { location = UrlOperations.resolveUrl(closest.getOriginalUrl(), location); redirScheme = UrlOperations.urlToScheme(location); + } else if (location.startsWith("/")) { + location = UrlOperations.resolveUrl(closest.getOriginalUrl(), location); } if (getSelfRedirectCanonicalizer() != null) {
FIX: self-redirect check accounts for relative urls
diff --git a/consumer_test.go b/consumer_test.go index <HASH>..<HASH> 100644 --- a/consumer_test.go +++ b/consumer_test.go @@ -243,7 +243,7 @@ func TestConsumerRebalancingMultiplePartitions(t *testing.T) { seedBroker.Close() } -func ExampleConsumer_usingSelect() { +func ExampleConsumer_select() { master, err := NewConsumer([]string{"localhost:9092"}, nil) if err != nil { panic(err) @@ -285,7 +285,7 @@ consumerLoop: fmt.Println("Got", msgCount, "messages.") } -func ExampleConsumer_usingGoroutines() { +func ExampleConsumer_goroutines() { master, err := NewConsumer([]string{"localhost:9092"}, nil) if err != nil { panic(err) @@ -298,7 +298,7 @@ func ExampleConsumer_usingGoroutines() { } }() - consumer, err := master.ConsumePartition("my_topic", 0, 0) + consumer, err := master.ConsumePartition("my_topic", 0, OffsetOldest) if err != nil { panic(err) } else {
Tweaks to consumer_test.rb
diff --git a/tests/class-wp-cli-test-case.php b/tests/class-wp-cli-test-case.php index <HASH>..<HASH> 100644 --- a/tests/class-wp-cli-test-case.php +++ b/tests/class-wp-cli-test-case.php @@ -43,12 +43,13 @@ abstract class Wp_Cli_Test_Case extends PHPUnit_Framework_TestCase { } class Wordpress_Installer { + private $install_dir; private $runner; - public function __construct( $install_dir, $runner ) { + public function __construct( $install_dir ) { $this->install_dir = $install_dir; - $this->runner = $runner; + $this->runner = new Command_Runner( $install_dir ); } public function create_config( $db_settings ) {
don't require passing a runner to Wordpress_Installer
diff --git a/closure/goog/locale/timezonefingerprint.js b/closure/goog/locale/timezonefingerprint.js index <HASH>..<HASH> 100644 --- a/closure/goog/locale/timezonefingerprint.js +++ b/closure/goog/locale/timezonefingerprint.js @@ -201,7 +201,7 @@ goog.locale.TimeZoneFingerprint = { 680176266: ['RU-Asia/Krasnoyarsk'], 1465210176: ['US-America/Anchorage'], 805312908: ['NI-America/Managua'], - 492088530: ['AU-Australia/Currie', 'AU-Australia/Hobart'], + 492088530: ['AU-Australia/Hobart', 'AU-Australia/Currie'], 901076366: ['BR-America/Campo_Grande', 'BR-America/Cuiaba'], 943019406: ['CL-America/Santiago', 'AQ-Antarctica/Palmer'], 928339288: ['US-America/New_York', 'CA-America/Montreal',
Avoid mystifying certain DownUnder users. Hobart is a far bigger place than Currie. Note that goog.locale.timeZoneDetection.detectTimeZone() looks at the 0'th string in the array. ------------- Created by MOE: <URL>
diff --git a/estnltk/taggers/web_taggers/v01/batch_processing_web_tagger.py b/estnltk/taggers/web_taggers/v01/batch_processing_web_tagger.py index <HASH>..<HASH> 100644 --- a/estnltk/taggers/web_taggers/v01/batch_processing_web_tagger.py +++ b/estnltk/taggers/web_taggers/v01/batch_processing_web_tagger.py @@ -44,7 +44,7 @@ class BatchProcessingWebTagger( WebTagger ): def batch_process(self, text: Text, layers: MutableMapping[str, Layer], parameters=None): # TODO: because estnltk.layer_operations contains some tangled # imports, we have to use inner-import-hack (for python 36) - from estnltk.layer_operations import join_layers + from estnltk.layer_operations import join_layers_while_reusing_spans assert self.batch_layer is not None and \ isinstance(self.batch_layer, str) and \ self.batch_layer in layers @@ -80,7 +80,7 @@ class BatchProcessingWebTagger( WebTagger ): resulting_layers.append( new_layer ) logger.debug( 'Batch processing completed.'.format() ) # Join/concatenate results - new_layer = join_layers( resulting_layers, separators ) + new_layer = join_layers_while_reusing_spans( resulting_layers, separators ) # Set Text object and return newly created layer new_layer.text_object = text return new_layer
Refactored BatchProcessingWebTagger: now join_layers_while_reusing_spans is used for joining
diff --git a/pyphi/labels.py b/pyphi/labels.py index <HASH>..<HASH> 100644 --- a/pyphi/labels.py +++ b/pyphi/labels.py @@ -12,18 +12,26 @@ def default_labels(indices): class NodeLabels: - ''' - TODO: validate labels for duplicates - TODO: pass in indices if defaults are generated here + '''Text labels for nodes in a network. + + Labels can either be instantiated as a tuple of strings: + + >>> NodeLabels(('A', 'IN'), (0, 1)).labels + ('A', 'IN') + + Or, if all labels are a single character, as a string: + + >>> NodeLabels('AB', (0, 1)).labels + ('A', 'B') ''' def __init__(self, labels, node_indices): if labels is None: labels = default_labels(node_indices) - self.labels = labels + self.labels = tuple(label for label in labels) self.node_indices = node_indices - validate.node_labels(labels, node_indices) + validate.node_labels(self.labels, node_indices) # Dicts mapping indices to labels and vice versa self._l2i = dict(zip(self.labels, self.node_indices))
Cast string of labels to a tuple
diff --git a/lib/axiom/relation/operation/sorted/direction_set.rb b/lib/axiom/relation/operation/sorted/direction_set.rb index <HASH>..<HASH> 100644 --- a/lib/axiom/relation/operation/sorted/direction_set.rb +++ b/lib/axiom/relation/operation/sorted/direction_set.rb @@ -90,7 +90,7 @@ module Axiom # @api private def cmp_tuples(left, right) reduce(0) do |cmp, direction| - break cmp if cmp.nonzero? + return cmp if cmp.nonzero? direction.call(left, right) end end
Refactor comparison to return early when it is nonzero
diff --git a/km3pipe/io/aanet.py b/km3pipe/io/aanet.py index <HASH>..<HASH> 100644 --- a/km3pipe/io/aanet.py +++ b/km3pipe/io/aanet.py @@ -327,7 +327,7 @@ class AanetPump(Pump): tab_dict['parameter'].append(parameter) tab_dict['field_names'].append(' '.join(fields)) tab_dict['field_values'].append(' '.join(values)) - tab_dict['dtype'].append(', '.join(types)) + tab_dict['dtype'].append(' '.join(types)) return Table( tab_dict, h5loc='/raw_header', name='RawHeader', h5singleton=True )
Don't use commas for splitting char in the dtype field
diff --git a/Tests/Logger/LoggerFactoryTest.php b/Tests/Logger/LoggerFactoryTest.php index <HASH>..<HASH> 100644 --- a/Tests/Logger/LoggerFactoryTest.php +++ b/Tests/Logger/LoggerFactoryTest.php @@ -48,14 +48,16 @@ class LoggerFactoryTest extends \PHPUnit_Framework_TestCase { { $this->initiateContainerWithDebugMode(false); $this->loggerFactory->addLogger("invalid", new AuditLog()); + $this->assertAttributeEquals(array(), 'loggers', $this->loggerFactory); } public function testLoggerFactoryThrowsNoExceptionOnAddValidLogger() { $logger1 = $this->getMock('Xiidea\EasyAuditBundle\Logger\LoggerInterface'); - $loggerFactory = new LoggerFactory(); - $loggerFactory->addLogger("valid", $logger1); + $this->loggerFactory->addLogger("valid", $logger1); + + $this->assertAttributeEquals(array('valid'=>$logger1), 'loggers', $this->loggerFactory); } public function testExecuteAllLoggers() {
Assert for check if logger is being added or not
diff --git a/disposable_email_checker/__init__.py b/disposable_email_checker/__init__.py index <HASH>..<HASH> 100644 --- a/disposable_email_checker/__init__.py +++ b/disposable_email_checker/__init__.py @@ -1 +1 @@ -__version__ = '1.0.0' +__version__ = '1.1.0'
version bump <I> - Increase number of blacklisted domains
diff --git a/limpyd/__init__.py b/limpyd/__init__.py index <HASH>..<HASH> 100644 --- a/limpyd/__init__.py +++ b/limpyd/__init__.py @@ -2,7 +2,7 @@ power and the control of the Redis API, in a limpid way, with just as abstraction as needed.""" -VERSION = (0, 1, 0) +VERSION = (0, 1, 1) __author__ = 'Yohan Boniface' __contact__ = "yb@enix.org" diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import codecs -from setuptools import setup, find_packages +from setuptools import setup import limpyd @@ -18,7 +18,7 @@ setup( keywords = "redis", url = limpyd.__homepage__, download_url = "https://github.com/yohanboniface/redis-limpyd/tags", - packages = find_packages(), + packages = ['limpyd'], include_package_data=True, install_requires=["redis", ], platforms=["any"],
Include only the "limpyd" package in setup.py (no tests)
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -23,7 +23,7 @@ module.exports = function createServePlaceholder (_options) { } // In case of no handler guessed - if (handler === undefined) { + if (typeof handler === 'undefined') { if (options.skipUnknown) { // Skip this middleware return next()
refactor: use typeof for undefined check
diff --git a/lib/fog/rackspace/models/auto_scale/policy.rb b/lib/fog/rackspace/models/auto_scale/policy.rb index <HASH>..<HASH> 100644 --- a/lib/fog/rackspace/models/auto_scale/policy.rb +++ b/lib/fog/rackspace/models/auto_scale/policy.rb @@ -154,6 +154,18 @@ module Fog true end + # Saves the policy + # Creates policy if it is new, otherwise it will update it + # @return [Boolean] true if policy has saved + def save + if persisted? + update + else + create + end + true + end + # Destroy the policy # # @return [Boolean] returns true if policy has started deleting
[rackspace|auto_scale] added a save method to policy
diff --git a/Example/bouncing/index.js b/Example/bouncing/index.js index <HASH>..<HASH> 100644 --- a/Example/bouncing/index.js +++ b/Example/bouncing/index.js @@ -43,6 +43,7 @@ class Snappable extends Component { return ( <PanGestureHandler {...this.props} + maxPointers={1} onGestureEvent={this._onGestureEvent} onHandlerStateChange={this._onHandlerStateChange}> <Animated.View style={{ transform: [{ translateX: this._transX }] }}>
Make it easier to twist view in twist & bounce example.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -3,6 +3,7 @@ var fs = require('fs'); var url = require('url'); +var pathlib = require('path'); var co = require('co'); var maybe = require('call-me-maybe'); @@ -10,7 +11,7 @@ var fetch = require('node-fetch'); var yaml = require('js-yaml'); var common = require('./common.js'); -var statusCodes = require('./statusCodes.json'); +var statusCodes = require(pathlib.join(__dirname,'statusCodes.json')); // TODO split out into params, security etc // TODO handle specification-extensions with plugins?
Make statusCodes.json findable when loaded as module
diff --git a/agrona/src/main/java/org/agrona/DeadlineTimerWheel.java b/agrona/src/main/java/org/agrona/DeadlineTimerWheel.java index <HASH>..<HASH> 100644 --- a/agrona/src/main/java/org/agrona/DeadlineTimerWheel.java +++ b/agrona/src/main/java/org/agrona/DeadlineTimerWheel.java @@ -244,7 +244,7 @@ public class DeadlineTimerWheel { final long[] array = wheel[currentTick & wheelMask]; - for (int length = array.length; pollIndex < length && maxTimersToExpire > timersExpired; pollIndex++) + for (int i = 0, length = array.length; i < length && maxTimersToExpire > timersExpired; i++) { final long deadline = array[pollIndex]; @@ -262,6 +262,8 @@ public class DeadlineTimerWheel return timersExpired; } } + + pollIndex = (pollIndex + 1) >= length ? 0 : (pollIndex + 1); } if (maxTimersToExpire > timersExpired && currentTickTime() <= now)
fix handling of timers that get shceduled to expire in the current tick by always perfoming one loop in the poll. If breaking out due to max expirations, don't advance the tick.
diff --git a/parsedatetime/pdt_locales/base.py b/parsedatetime/pdt_locales/base.py index <HASH>..<HASH> 100644 --- a/parsedatetime/pdt_locales/base.py +++ b/parsedatetime/pdt_locales/base.py @@ -86,8 +86,8 @@ decimal_mark = '.' # this will be added to re_values later units = { - 'seconds': ['second', 'seconds', 'sec', 's'], - 'minutes': ['minute', 'minutes', 'min', 'm'], + 'seconds': ['second', 'seconds', 'sec', 'secs' 's'], + 'minutes': ['minute', 'minutes', 'min', 'mins', 'm'], 'hours': ['hour', 'hours', 'hr', 'h'], 'days': ['day', 'days', 'dy', 'd'], 'weeks': ['week', 'weeks', 'wk', 'w'],
Add 'secs' and 'mins' into base units
diff --git a/src/Model/AssociationsAwareTrait.php b/src/Model/AssociationsAwareTrait.php index <HASH>..<HASH> 100644 --- a/src/Model/AssociationsAwareTrait.php +++ b/src/Model/AssociationsAwareTrait.php @@ -244,6 +244,12 @@ trait AssociationsAwareTrait */ if ($field->getAssocCsvModule() === $module) { $className = $module; + // Set self related association + $this->setAssociation( + 'hasMany', + static::generateAssociationName($field->getName(), $className), + ['className' => $className, 'foreignKey' => $field->getName()] + ); $associationType = 'belongsTo'; }
Add self related associations (task #<I>)
diff --git a/blockstack_client/cli.py b/blockstack_client/cli.py index <HASH>..<HASH> 100644 --- a/blockstack_client/cli.py +++ b/blockstack_client/cli.py @@ -214,7 +214,7 @@ def run_cli(argv=None, config_path=CONFIG_PATH): sys.exit(1) argv = new_argv - if cli_password or os.environ.get('BLOCKSTACK_CLIENT_WALLET_PASSWORD') is None: + if cli_password and os.environ.get('BLOCKSTACK_CLIENT_WALLET_PASSWORD') is None: log.debug("Use CLI password") os.environ["BLOCKSTACK_CLIENT_WALLET_PASSWORD"] = cli_password
don't set to boolean
diff --git a/client/html/src/Client/Html/Catalog/Lists/Standard.php b/client/html/src/Client/Html/Catalog/Lists/Standard.php index <HASH>..<HASH> 100644 --- a/client/html/src/Client/Html/Catalog/Lists/Standard.php +++ b/client/html/src/Client/Html/Catalog/Lists/Standard.php @@ -646,13 +646,15 @@ class Standard $page = min( max( $view->param( 'l_page', 1 ), 1 ), $pages ); $products = \Aimeos\Controller\Frontend::create( $context, 'product' ) + // apply sort() before category() to prioritize user sorting over the sorting through category + ->sort( $sort ) ->category( $catids, 'default', $level ) ->supplier( $view->param( 'f_supid', [] ) ) ->allOf( $view->param( 'f_attrid', [] ) ) ->oneOf( $view->param( 'f_optid', [] ) ) ->oneOf( $view->param( 'f_oneid', [] ) ) ->text( $view->param( 'f_search' ) ) - ->slice( ( $page - 1 ) * $size, $size )->sort( $sort ) + ->slice( ( $page - 1 ) * $size, $size ) ->uses( $domains ) ->search( $total );
Sort by parameter before category position (#<I>) Sort by the parameter `f_sort` with higher priority then the position of the item in the category.
diff --git a/SoftLayer/CLI/modules/subnet.py b/SoftLayer/CLI/modules/subnet.py index <HASH>..<HASH> 100644 --- a/SoftLayer/CLI/modules/subnet.py +++ b/SoftLayer/CLI/modules/subnet.py @@ -93,11 +93,12 @@ Options: table.align['cost'] = 'r' total = 0.0 - for price in result['prices']: - total += float(price.get('recurringFee', 0.0)) - rate = "%.2f" % float(price['recurringFee']) + if 'prices' in result: + for price in result['prices']: + total += float(price.get('recurringFee', 0.0)) + rate = "%.2f" % float(price['recurringFee']) - table.add_row([price['item']['description'], rate]) + table.add_row([price['item']['description'], rate]) table.add_row(['Total monthly cost', "%.2f" % total]) return table
Make sure the 'prices' key exists in the dictionary before trying to use it
diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index <HASH>..<HASH> 100644 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -43,7 +43,7 @@ @endforeach </head> -<body> +<body class="page-{{\Str::slug(\Route::currentRouteName())}}"> <div class="container-fluid" data-controller="@yield('controller')" @yield('controller-data')>
Added routeprefixed class to body (#<I>) * Added routeprefixed class to body Added a class to body, that will always use a slugified version of the current path as basic. This allows to style subpages (login, template, ...) differently easily using a custom css file. * Added slugified route name as body class
diff --git a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java index <HASH>..<HASH> 100644 --- a/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java +++ b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java @@ -3460,13 +3460,13 @@ public class GrailsDomainBinder implements MetadataContributor { protected final GrailsDomainBinder binder; protected final MetadataBuildingContext buildingContext; - protected static CollectionType SET; - protected static CollectionType LIST; - protected static CollectionType BAG; - protected static CollectionType MAP; - protected static boolean initialized; + protected CollectionType SET; + protected CollectionType LIST; + protected CollectionType BAG; + protected CollectionType MAP; + protected boolean initialized; - protected static final Map<Class<?>, CollectionType> INSTANCES = new HashMap<>(); + protected final Map<Class<?>, CollectionType> INSTANCES = new HashMap<>(); public abstract Collection create(ToMany property, PersistentClass owner, String path, InFlightMetadataCollector mappings, String sessionFactoryBeanName) throws MappingException;
fix for #<I> (#<I>)
diff --git a/tests/unit/Gateway/SeemeGatewayTest.php b/tests/unit/Gateway/SeemeGatewayTest.php index <HASH>..<HASH> 100644 --- a/tests/unit/Gateway/SeemeGatewayTest.php +++ b/tests/unit/Gateway/SeemeGatewayTest.php @@ -2,6 +2,7 @@ namespace Indigo\Sms\Test\Gateway; +use Indigo\Sms\Message; use Indigo\Sms\Gateway\SeemeGateway; use GuzzleHttp\Message\Response; use GuzzleHttp\Stream; @@ -52,13 +53,7 @@ class SeemeGatewayTest extends AbstractGatewayTest */ public function testMessage() { - $message = \Mockery::mock('Indigo\\Sms\\Message'); - - $message->shouldReceive('getData') - ->andReturn(array( - 'number' => 123456789, - 'message' => 'This is a test message', - )); + $message = new Message(123456789, 'This is a test message'); $result = $this->gateway->send($message);
Removes Message mocking for now, error thrown because of serializable
diff --git a/lib/browser/api/browser-window.js b/lib/browser/api/browser-window.js index <HASH>..<HASH> 100644 --- a/lib/browser/api/browser-window.js +++ b/lib/browser/api/browser-window.js @@ -95,17 +95,6 @@ BrowserWindow.prototype._init = function () { // Notify the creation of the window. app.emit('browser-window-created', {}, this) - // Be compatible with old APIs. - this.webContents.on('devtools-focused', () => { - this.emit('devtools-focused') - }) - this.webContents.on('devtools-opened', () => { - this.emit('devtools-opened') - }) - this.webContents.on('devtools-closed', () => { - this.emit('devtools-closed') - }) - Object.defineProperty(this, 'devToolsWebContents', { enumerable: true, configurable: false,
Remove BrowserWindow events now on WebContents
diff --git a/src/Illuminate/Routing/Router.php b/src/Illuminate/Routing/Router.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Routing/Router.php +++ b/src/Illuminate/Routing/Router.php @@ -305,7 +305,20 @@ class Router implements RegistrarContract, BindingRegistrar } /** - * Route an api resource to a controller. + * Register an array of API resource controllers. + * + * @param array $resources + * @return void + */ + public function apiResources(array $resources) + { + foreach ($resources as $name => $controller) { + $this->apiResource($name, $controller); + } + } + + /** + * Route an API resource to a controller. * * @param string $name * @param string $controller
[<I>] Add apiResources function to Router (#<I>) * Add apiResources function to Router Mimick the functionality of resources in routes with apiResources * Update Router.php
diff --git a/cmd/kube-scheduler/app/options/configfile.go b/cmd/kube-scheduler/app/options/configfile.go index <HASH>..<HASH> 100644 --- a/cmd/kube-scheduler/app/options/configfile.go +++ b/cmd/kube-scheduler/app/options/configfile.go @@ -53,7 +53,7 @@ func loadConfig(data []byte) (*config.KubeSchedulerConfiguration, error) { // more details. cfgObj.TypeMeta.APIVersion = gvk.GroupVersion().String() if cfgObj.TypeMeta.APIVersion == configv1beta2.SchemeGroupVersion.String() { - klog.Warning("KubeSchedulerConfiguration v1beta2 is deprecated in v1.25, will be removed in v1.26") + klog.InfoS("KubeSchedulerConfiguration v1beta2 is deprecated in v1.25, will be removed in v1.26") } return cfgObj, nil }
Switch klog call to use structured logging
diff --git a/client/my-sites/pages/page/index.js b/client/my-sites/pages/page/index.js index <HASH>..<HASH> 100644 --- a/client/my-sites/pages/page/index.js +++ b/client/my-sites/pages/page/index.js @@ -211,7 +211,11 @@ class Page extends Component { } return ( - <PopoverMenuItem onClick={ this.editPage } onMouseOver={ preloadEditor }> + <PopoverMenuItem + onClick={ this.editPage } + onMouseOver={ preloadEditor } + onFocus={ preloadEditor } + > <Gridicon icon="pencil" size={ 18 } /> { this.props.translate( 'Edit' ) } </PopoverMenuItem> @@ -456,6 +460,7 @@ class Page extends Component { } onClick={ this.props.recordPageTitle } onMouseOver={ preloadEditor } + onFocus={ preloadEditor } data-tip-target={ 'page-' + page.slug } > { depthIndicator } @@ -463,7 +468,7 @@ class Page extends Component { { latestPostsPage && ( <InfoPopover position="right"> { translate( - 'The content of your latest posts page is automatically generated and it cannot be edited.' + 'The content of your latest posts page is automatically generated and cannot be edited.' ) } </InfoPopover> ) }
Resolve a<I>y warnings
diff --git a/lib/health-data-standards/import/bundle/importer.rb b/lib/health-data-standards/import/bundle/importer.rb index <HASH>..<HASH> 100644 --- a/lib/health-data-standards/import/bundle/importer.rb +++ b/lib/health-data-standards/import/bundle/importer.rb @@ -64,8 +64,11 @@ module HealthDataStandards return bundle ensure - bundle.done_importing = true unless bundle.nil? - bundle.save + # If the bundle is nil or the bundle has never been saved then do not set done_importing or run save. + if bundle && bundle.created_at + bundle.done_importing = true + bundle.save + end end
Do not save the bundle if it did not successfully import Currently if you import a bundle and it fails because the same version already exists in the database, then the ensure block is still run and the bundle is still saved, leaving 2 records for the same bundle in the database. This adds a check to see if the bundle was ever saved in the first place before running bundle.save again. This issue can be seen now by accessing the cypress bundle import admin page and uploading the same bundle twice.
diff --git a/sqlparse/filters/reindent.py b/sqlparse/filters/reindent.py index <HASH>..<HASH> 100644 --- a/sqlparse/filters/reindent.py +++ b/sqlparse/filters/reindent.py @@ -168,7 +168,8 @@ class ReindentFilter(object): def _process_default(self, tlist, stmts=True): self._split_statements(tlist) if stmts else None self._split_kwds(tlist) - [self._process(sgroup) for sgroup in tlist.get_sublists()] + for sgroup in tlist.get_sublists(): + self._process(sgroup) def process(self, stmt): self._curr_stmt = stmt
Make reindent more robust regarding max recursion errors.
diff --git a/lib/discordrb/voice/voice_bot.rb b/lib/discordrb/voice/voice_bot.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/voice/voice_bot.rb +++ b/lib/discordrb/voice/voice_bot.rb @@ -99,6 +99,12 @@ module Discordrb::Voice @encoder.filter_volume = value end + # @see #filter_volume= + # @return [Integer] the volume used as a filter for ffmpeg/avconv. + def filter_volume + @encoder.filter_volume + end + # Pause playback. This is not instant; it may take up to 20 ms for this change to take effect. (This is usually # negligible.) def pause
Add a reader for filter_volume
diff --git a/tls.go b/tls.go index <HASH>..<HASH> 100644 --- a/tls.go +++ b/tls.go @@ -10,8 +10,9 @@ package gramework import ( + "crypto/ecdsa" + "crypto/elliptic" "crypto/rand" - "crypto/rsa" "crypto/tls" "crypto/x509" "crypto/x509/pkix" @@ -27,7 +28,7 @@ func selfSignedCertificate(clientHello *tls.ClientHelloInfo) (*tls.Certificate, return nil, fmt.Errorf("self-signed certificate for %q not permitted", clientHello.ServerName) } - priv, err := rsa.GenerateKey(rand.Reader, 1024) + priv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) if err != nil { return nil, err }
Using ECDSA for self-signed certificat
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -41,6 +41,6 @@ module.exports = function createGenerator(pattern, options) { var genericName = interpolateName(loaderContext, name, loaderOptions); return genericName .replace(new RegExp('[^a-zA-Z0-9\\-_\u00A0-\uFFFF]', 'g'), '-') - .replace(/^([^a-zA-Z_])/, '_$1'); + .replace(/^((-?[0-9])|--)/, "_$1"); }; };
Prefix hashes with underscores based on CSS spec To match with <URL>
diff --git a/src/attributes.js b/src/attributes.js index <HASH>..<HASH> 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -153,15 +153,15 @@ jQuery.fn.extend({ }, val: function( value ) { - var hooks, val, + var hooks, ret, elem = this[0]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; - if ( hooks && "get" in hooks && (val = hooks.get( elem )) !== undefined ) { - return val; + if ( hooks && "get" in hooks && (ret = hooks.get( elem )) !== undefined ) { + return ret; } return (elem.value || "").replace(rreturn, ""); @@ -173,15 +173,16 @@ jQuery.fn.extend({ var isFunction = jQuery.isFunction( value ); return this.each(function( i ) { - var self = jQuery(this); + var self = jQuery(this), val; if ( this.nodeType !== 1 ) { return; } - val = value; if ( isFunction ) { val = value.call( this, i, self.val() ); + } else { + val = value; } // Treat null/undefined as ""; convert numbers to string
Performance testing: localize val to each block and only set val to value when not a function
diff --git a/__pkginfo__.py b/__pkginfo__.py index <HASH>..<HASH> 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -23,10 +23,10 @@ numversion = (1, 2, 1) version = '.'.join([str(num) for num in numversion]) if sys.version_info < (2, 6): - install_requires = ['logilab-common >= 0.53.0', 'astroid >= 1.2', + install_requires = ['logilab-common >= 0.53.0', 'astroid >= 1.1', 'StringFormat'] else: - install_requires = ['logilab-common >= 0.53.0', 'astroid >= 1.2'] + install_requires = ['logilab-common >= 0.53.0', 'astroid >= 1.1'] license = 'GPL' description = "python code static checker"
go back to dependency on astroid <I> since it breaks tox tests, even when configured to grab astroid from hg :(
diff --git a/lib/frameit/editor.rb b/lib/frameit/editor.rb index <HASH>..<HASH> 100644 --- a/lib/frameit/editor.rb +++ b/lib/frameit/editor.rb @@ -20,7 +20,7 @@ module Frameit def run(path, color = Color::BLACK) @color = color - Dir["#{path}/**/*.png"].each do |screenshot| + Dir.glob("#{path}/**/*.{png,PNG}").each do |screenshot| next if screenshot.include?"_framed.png" begin template_path = get_template(screenshot) @@ -38,7 +38,7 @@ module Frameit c.geometry offset_information[:offset] end - output_path = screenshot.gsub('.png', '_framed.png') + output_path = screenshot.gsub('.png', '_framed.png').gsub('.PNG', '_framed.png') result.write output_path Helper.log.info "Successfully framed screenshot at path '#{output_path}'".green end
Added support for PNG files (upper case)
diff --git a/lib/audited/auditor.rb b/lib/audited/auditor.rb index <HASH>..<HASH> 100644 --- a/lib/audited/auditor.rb +++ b/lib/audited/auditor.rb @@ -43,7 +43,7 @@ module Audited class_attribute :audit_associated_with, instance_writer: false if options[:only] - except = column_names - options[:only].flatten.map(&:to_s) + except = column_names - Array(options[:only]).flatten.map(&:to_s) else except = default_ignored_attributes + Audited.ignored_attributes except |= Array(options[:except]).collect(&:to_s) if options[:except]
Fix bug when only: is a single field.
diff --git a/tofu/version.py b/tofu/version.py index <HASH>..<HASH> 100644 --- a/tofu/version.py +++ b/tofu/version.py @@ -1,2 +1,2 @@ # Do not edit, pipeline versioning governed by git tags! -__version__ = '1.4.3b4-44-g38061c12' \ No newline at end of file +__version__ = '1.4.3b4-44-g38061c12'
Added new line at end of file
diff --git a/drip/models.py b/drip/models.py index <HASH>..<HASH> 100644 --- a/drip/models.py +++ b/drip/models.py @@ -1,9 +1,14 @@ from datetime import datetime, timedelta from django.db import models -from django.contrib.auth.models import User from django.core.exceptions import ValidationError +try: + from django.contrib.auth import get_user_model + User = get_user_model() +except ImportError: + from django.contrib.auth.models import User + # just using this to parse, but totally insane package naming... # https://bitbucket.org/schinckel/django-timedelta-field/ import timedelta as djangotimedelta @@ -53,7 +58,7 @@ class SentDrip(models.Model): date = models.DateTimeField(auto_now_add=True) drip = models.ForeignKey('drip.Drip', related_name='sent_drips') - user = models.ForeignKey('auth.User', related_name='sent_drips') + user = models.ForeignKey(User, related_name='sent_drips') subject = models.TextField() body = models.TextField()
support for django <I>'s custom user model
diff --git a/src/scripts/directives/fa-input.js b/src/scripts/directives/fa-input.js index <HASH>..<HASH> 100644 --- a/src/scripts/directives/fa-input.js +++ b/src/scripts/directives/fa-input.js @@ -37,7 +37,7 @@ * **/ angular.module('famous.angular') -.config(function ($provide) { +.config(['$provide', function ($provide) { $provide.decorator('ngClickDirective', function ($delegate, $famousDecorator, $parse, $rootElement, $famous, $timeout) { var directive = $delegate[0]; @@ -270,7 +270,7 @@ angular.module('famous.angular') return $delegate; }); }); -}); +}]); /** * @ngdoc directive
=BG= minor: explicit directive name for minifcation one more yet!
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -98,7 +98,7 @@ var latencyReport = function() { max: latencyData.max, avg: latencyData.total / latencyData.count, }; - exports.emit('eventloop', { time: Date.now(), latency: latency }); + module.exports.emit('eventloop', { time: Date.now(), latency: latency }); latencyData.count = 0; latencyData.min = 1 * 60 * 1000; latencyData.max = 0; @@ -124,7 +124,7 @@ if (global.Appmetrics) { global.Appmetrics.VERSION + '.\n' ); - module.exports = global.Appmetrics; + exports = module.exports = global.Appmetrics; } else { global.Appmetrics = module.exports; module.exports.VERSION = VERSION;
Make use of module.exports/exports consistent (#<I>)
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -371,6 +371,7 @@ gulp.task('bundle-framework', function bundleBoot() { .external('reducer-register') .external('redux-thunk') .external('redux') + .external('silverstripe-backend') .external('silverstripe-component') .external('bootstrap-collapse') .bundle()
Require silverstripe-backend to avoid double include
diff --git a/lib/bmc-daemon-lib/conf.rb b/lib/bmc-daemon-lib/conf.rb index <HASH>..<HASH> 100644 --- a/lib/bmc-daemon-lib/conf.rb +++ b/lib/bmc-daemon-lib/conf.rb @@ -85,7 +85,7 @@ module BmcDaemonLib Encoding.default_external = "utf-8" # Try to access any key to force parsing of the files - self[:dummy] + self[:test35547647654856865436346453754746588586799078079876543245678654324567865432] rescue Psych::SyntaxError => e fail ConfigParseError, e.message
conf: avoid key collision in prepare method
diff --git a/src/main/java/water/TypeMap.java b/src/main/java/water/TypeMap.java index <HASH>..<HASH> 100644 --- a/src/main/java/water/TypeMap.java +++ b/src/main/java/water/TypeMap.java @@ -133,7 +133,9 @@ public class TypeMap { Freezable f = GOLD[id]; if( f == null ) { try { GOLD[id] = f = (Freezable) Class.forName(CLAZZES[id]).newInstance(); } - catch( Exception e ) { throw Log.errRTExcept(e); } + catch( Exception e ) { + throw Log.errRTExcept(e); + } } return f.newInstance(); }
Rearrange code to make it possible to set a breakpoint on the exception.
diff --git a/src/lewis/adapters/stream.py b/src/lewis/adapters/stream.py index <HASH>..<HASH> 100644 --- a/src/lewis/adapters/stream.py +++ b/src/lewis/adapters/stream.py @@ -675,6 +675,8 @@ class StreamInterface(InterfaceBase): in_terminator = '\r' out_terminator = '\r' + readtimeout = 100 + commands = None def __init__(self):
ReadTimeout attribute, analogous but opposite direction of ReadTimeout in protocol files
diff --git a/less.js b/less.js index <HASH>..<HASH> 100644 --- a/less.js +++ b/less.js @@ -9,7 +9,10 @@ var options = loader.lessOptions || {}; // default optimization value. options.optimization |= lessEngine.optimization; -lessEngine.options.async = true; +if(lessEngine.options) { + lessEngine.options.async = true; +} + exports.translate = function(load) { var address = load.address.replace(/^file\:/,"");
Make sure lessEngine.options exist Only exists in the browser, it seems.
diff --git a/specs/spec-reporter.spec.php b/specs/spec-reporter.spec.php index <HASH>..<HASH> 100644 --- a/specs/spec-reporter.spec.php +++ b/specs/spec-reporter.spec.php @@ -8,11 +8,10 @@ use Symfony\Component\Console\Output\BufferedOutput; describe('SpecReporter', function() { beforeEach(function() { - $config = new Configuration(); - + $this->configuration = new Configuration(); $this->output = new BufferedOutput(); $this->emitter = new EventEmitter(); - $this->reporter = new SpecReporter($config, $this->output, $this->emitter); + $this->reporter = new SpecReporter($this->configuration, $this->output, $this->emitter); }); context('when test.failed is emitted', function() { @@ -33,4 +32,14 @@ describe('SpecReporter', function() { }); }); + describe('->color()', function() { + context('when colors are disabled', function() { + it('should return plain text', function() { + $this->configuration->disableColors(); + $text = $this->reporter->color('color', 'hello world'); + assert($text == "hello world", "disabled colors should contain color sequences"); + }); + }); + }); + });
cover SpecReporter::color
diff --git a/resource/crud.go b/resource/crud.go index <HASH>..<HASH> 100644 --- a/resource/crud.go +++ b/resource/crud.go @@ -58,17 +58,7 @@ func (res *Resource) saveHandler(result interface{}, context *qor.Context) error if (context.GetDB().NewScope(result).PrimaryKeyZero() && res.HasPermission(roles.Create, context)) || // has create permission res.HasPermission(roles.Update, context) { // has update permission - results := context.GetDB().Save(result) - - if results.RowsAffected == 0 { - primaryField := context.GetDB().NewScope(result).PrimaryField() - // if primary field has value and it is not a auto increment field, then create it if nothing updated - if _, ok := primaryField.TagSettings["AUTO_INCREMENT"]; !primaryField.IsBlank && !ok { - return context.GetDB().Create(result).Error - } - } - - return results.Error + return context.GetDB().Save(result).Error } return roles.ErrPermissionDenied }
Remove unnecessary create operation if failed to save
diff --git a/source/Application/Model/PaymentList.php b/source/Application/Model/PaymentList.php index <HASH>..<HASH> 100644 --- a/source/Application/Model/PaymentList.php +++ b/source/Application/Model/PaymentList.php @@ -62,7 +62,6 @@ class PaymentList extends \OxidEsales\Eshop\Core\Model\ListModel $tableViewNameGenerator = oxNew(TableViewNameGenerator::class); $sTable = $tableViewNameGenerator->getViewName('oxpayments'); $sQ = "select {$sTable}.* from ( select distinct {$sTable}.* from {$sTable} "; - $sQ .= "left join oxobject2group ON oxobject2group.oxobjectid = {$sTable}.oxid "; $sQ .= "inner join oxobject2payment ON oxobject2payment.oxobjectid = " . $oDb->quote($sShipSetId) . " and oxobject2payment.oxpaymentid = {$sTable}.oxid "; $sQ .= "where {$sTable}.oxactive='1' "; $sQ .= " and {$sTable}.oxfromboni <= " . $oDb->quote($sBoni) . " and {$sTable}.oxfromamount <= " . $oDb->quote($dPrice) . " and {$sTable}.oxtoamount >= " . $oDb->quote($dPrice);
perf optimization payment list. question in slack by aurimas urbonas. would it be faster with this small change without any break?
diff --git a/tests/TestCase/Integration/JsonApi/SparseFieldsetsIntegrationTest.php b/tests/TestCase/Integration/JsonApi/SparseFieldsetsIntegrationTest.php index <HASH>..<HASH> 100644 --- a/tests/TestCase/Integration/JsonApi/SparseFieldsetsIntegrationTest.php +++ b/tests/TestCase/Integration/JsonApi/SparseFieldsetsIntegrationTest.php @@ -14,13 +14,13 @@ class SparseFieldsetsIntegrationTest extends JsonApiBaseTestCase public function viewProvider() { return [ - // assert "single-field" sparse for index actions + // assert "single-field" sparse for index actions 'single-field sparse index' => [ '/countries?fields[countries]=name', 'index-single-field-sparse.json', ], 'single-field sparse for included index data' => [ - '/countries?include=currencies&fields[currencies]=id,name', + '/countries?include=currency&fields[currency]=id,name', 'index-single-field-sparse-for-included-data.json', ], 'combined single-field sparse index (both primary and included data)' => [
Small difference in url to ensure that correct association is still used
diff --git a/metrics-core/src/test/java/com/codahale/metrics/TimerTest.java b/metrics-core/src/test/java/com/codahale/metrics/TimerTest.java index <HASH>..<HASH> 100644 --- a/metrics-core/src/test/java/com/codahale/metrics/TimerTest.java +++ b/metrics-core/src/test/java/com/codahale/metrics/TimerTest.java @@ -123,11 +123,11 @@ public class TimerTest { assertThat(timer.getCount()).isZero(); int dummy = 0; - try (Timer.Context context = timer.time()) { + assertThat(context).isNotNull(); dummy += 1; } - + assertThat(dummy).isEqualTo(1); assertThat(timer.getCount()) .isEqualTo(1);
Add additional checks for the try-with-resources test for a Timer
diff --git a/lib/FieldType/Mapper/RelationListFormMapper.php b/lib/FieldType/Mapper/RelationListFormMapper.php index <HASH>..<HASH> 100644 --- a/lib/FieldType/Mapper/RelationListFormMapper.php +++ b/lib/FieldType/Mapper/RelationListFormMapper.php @@ -48,7 +48,7 @@ class RelationListFormMapper implements FieldTypeFormMapperInterface $contentTypeHash[$contentType->identifier] = $this->translationHelper->getTranslatedByProperty($contentType, 'names'); } } - sort($contentTypeHash); + asort($contentTypeHash); $fieldDefinitionForm ->add('selectionDefaultLocation', 'hidden', [
Fix EZP-<I>: "Allowed content types" selected item, from ezobjectrelationlist, changes under certain conditions
diff --git a/src/connection.js b/src/connection.js index <HASH>..<HASH> 100644 --- a/src/connection.js +++ b/src/connection.js @@ -149,6 +149,9 @@ Connection.prototype.send = function(message) { if (this._options['apisecret']) { message.apisecret = this._options['apisecret']; } + if (!message['transaction']) { + message['transaction'] = Transaction.generateRandomId(); + } return this._websocketConnection.send(message); };
Always add transaction on connection.send if it's not present