diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -352,6 +352,7 @@ SSDP.prototype.stop = function () { this.advertise(false) this.advertise(false) this.sock.close() + this.sock = null; }
Null socket when stopping the service. Fixes #8.
diff --git a/fritzconnection/fritztools.py b/fritzconnection/fritztools.py index <HASH>..<HASH> 100644 --- a/fritzconnection/fritztools.py +++ b/fritzconnection/fritztools.py @@ -1,6 +1,9 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import division + + """ helper functions.
fixed division error with python2
diff --git a/test/backend-test.js b/test/backend-test.js index <HASH>..<HASH> 100644 --- a/test/backend-test.js +++ b/test/backend-test.js @@ -157,12 +157,12 @@ suite.addBatch({ suite.addBatch({ 'connect client to backend socket': { topic: function () { - sock = socket_client('http://127.0.0.1:' + testport); + sock = socket_client.connect('http://127.0.0.1:' + testport); sock.on('connect', this.callback); }, - 'connected': function () { - //Connected successfully + 'connected': function (err) { + assert.ifError(err); } } });
for some reason the test changes were not coming through
diff --git a/zounds/__init__.py b/zounds/__init__.py index <HASH>..<HASH> 100644 --- a/zounds/__init__.py +++ b/zounds/__init__.py @@ -47,7 +47,7 @@ from index import SearchResults, HammingDb, HammingIndex from basic import \ Slice, Sum, Max, Pooled, process_dir, stft, audio_graph, with_onsets, \ - resampled + resampled, frequency_adaptive from util import \ simple_lmdb_settings, simple_in_memory_settings, \ diff --git a/zounds/basic/__init__.py b/zounds/basic/__init__.py index <HASH>..<HASH> 100644 --- a/zounds/basic/__init__.py +++ b/zounds/basic/__init__.py @@ -2,5 +2,6 @@ from basic import Slice, Sum, Max, Pooled, Binarize from util import process_dir -from audiograph import resampled, stft, audio_graph, with_onsets +from audiograph import \ + resampled, stft, audio_graph, with_onsets, frequency_adaptive
Export the frequency adaptive convenience function from the top-level module
diff --git a/src/sos/hosts.py b/src/sos/hosts.py index <HASH>..<HASH> 100755 --- a/src/sos/hosts.py +++ b/src/sos/hosts.py @@ -1030,9 +1030,16 @@ class Host: return self._get_local_host() if not isinstance(alias, str): raise ValueError(f'A string is expected for host {alias}') - if 'hosts' not in env.sos_dict['CONFIG'] or alias not in env.sos_dict[ - 'CONFIG']['hosts']: - raise ValueError(f'Undefined remote host {alias}') + if 'hosts' not in env.sos_dict['CONFIG']: + env.sos_dict['CONFIG']['hosts'] = {} + if alias in env.sos_dict['CONFIG']['hosts']: + return alias + # assuming the host name is a name or IP address + env.logger.debug(f'Assuming {alias} to be a hostname or IP address not defined in hosts file') + env.sos_dict['CONFIG']['hosts'][alias] = { + 'address': alias, + 'alias': alias, + } return alias def _get_config(self, alias: Optional[str]) -> None:
Allow the use of hostname or IP address as hosts (without task engine and other information)
diff --git a/closure/goog/base.js b/closure/goog/base.js index <HASH>..<HASH> 100644 --- a/closure/goog/base.js +++ b/closure/goog/base.js @@ -1800,6 +1800,7 @@ goog.mixin = function(target, source) { /** * @return {number} An integer value representing the number of milliseconds * between midnight, January 1, 1970 and the current time. + * @deprecated Use Date.now */ goog.now = (goog.TRUSTED_SITE && Date.now) || (function() { // Unary plus operator converts its operand to a number which in
Deprecate goog.now. RELNOTES: goog.now is now deprecated in favor of Date.now ------------- Created by MOE: <URL>
diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index <HASH>..<HASH> 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -175,7 +175,8 @@ class ModelsCommand extends Command // handle abstract classes, interfaces, ... $reflectionClass = new \ReflectionClass($name); - if (!$reflectionClass->isSubclassOf('Illuminate\Database\Eloquent\Model')) { + if (!$reflectionClass->isSubclassOf('Illuminate\Database\Eloquent\Model') + || $reflectionClass->isSubclassOf('Illuminate\Database\Eloquent\Relations\Pivot')) { continue; }
ignore intermediate table models (#<I>)
diff --git a/framework/zii/widgets/grid/CButtonColumn.php b/framework/zii/widgets/grid/CButtonColumn.php index <HASH>..<HASH> 100644 --- a/framework/zii/widgets/grid/CButtonColumn.php +++ b/framework/zii/widgets/grid/CButtonColumn.php @@ -149,10 +149,13 @@ class CButtonColumn extends CGridColumn * 'visible'=>'...', // a PHP expression for determining whether the button is visible * ) * </pre> + * * In the PHP expression for the 'url' option and/or 'visible' option, the variable <code>$row</code> * refers to the current row number (zero-based), and <code>$data</code> refers to the data model for * the row. * + * If the 'buttonID' is 'view', 'update' or 'delete' the options will be applied to the default buttons. + * * Note that in order to display non-default buttons, the {@link template} property needs to * be configured so that the corresponding button IDs appear as tokens in the template. */
Added doc clarification for #<I> #<I>
diff --git a/spec/provider/s3_spec.rb b/spec/provider/s3_spec.rb index <HASH>..<HASH> 100644 --- a/spec/provider/s3_spec.rb +++ b/spec/provider/s3_spec.rb @@ -134,6 +134,13 @@ describe DPL::Provider::S3 do provider.push_app end + example "Sets SSE" do + provider.options.update(:server_side_encryption => true) + expect(Dir).to receive(:glob).and_yield(__FILE__) + expect_any_instance_of(Aws::S3::Object).to receive(:upload_file).with(anything(), hash_including(:server_side_encryption => "AES256")) + provider.push_app + end + example "Sets Website Index Document" do provider.options.update(:index_document_suffix => "test/index.html") expect(Dir).to receive(:glob).and_yield(__FILE__)
Add rspec testing. Patterned after storage_class work.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ // adapted from https://github.com/grawity/code/blob/master/lib/python/nullroute/irc.py#L24-L53 module.exports = function parsePrefix(prefix) { - if (prefix.length === 0) { + if (!prefix || prefix.length === 0) { return null }
Check is prefix does not exist (fixes #1)
diff --git a/src/graphql_relay/connection/connectiontypes.py b/src/graphql_relay/connection/connectiontypes.py index <HASH>..<HASH> 100644 --- a/src/graphql_relay/connection/connectiontypes.py +++ b/src/graphql_relay/connection/connectiontypes.py @@ -20,10 +20,10 @@ class PageInfoType(Protocol): def endCursor(self) -> Optional[ConnectionCursor]: ... - def hasPreviousPage(self) -> Optional[bool]: + def hasPreviousPage(self) -> bool: ... - def hasNextPage(self) -> Optional[bool]: + def hasNextPage(self) -> bool: ... @@ -33,8 +33,8 @@ class PageInfoConstructor(Protocol): *, startCursor: Optional[ConnectionCursor], endCursor: Optional[ConnectionCursor], - hasPreviousPage: Optional[bool], - hasNextPage: Optional[bool], + hasPreviousPage: bool, + hasNextPage: bool, ) -> PageInfoType: ... @@ -44,8 +44,8 @@ class PageInfo(NamedTuple): startCursor: Optional[ConnectionCursor] endCursor: Optional[ConnectionCursor] - hasPreviousPage: Optional[bool] - hasNextPage: Optional[bool] + hasPreviousPage: bool + hasNextPage: bool class EdgeType(Protocol):
hasPrevious/NextPage should not be optional (#<I>) Replicates graphql/graphql-relay-js@<I>a<I>ac<I>c3b<I>a<I>ec<I>cc<I>dee<I>e5bb5
diff --git a/scanpy/api/pl.py b/scanpy/api/pl.py index <HASH>..<HASH> 100644 --- a/scanpy/api/pl.py +++ b/scanpy/api/pl.py @@ -1,4 +1,4 @@ -from ..plotting.anndata import scatter, violin, ranking, clustermap, heatmap +from ..plotting.anndata import scatter, violin, ranking, clustermap, heatmap, dotplot from ..plotting.preprocessing import filter_genes_dispersion
added dotplot to api
diff --git a/etcd/v3/kv_etcd.go b/etcd/v3/kv_etcd.go index <HASH>..<HASH> 100644 --- a/etcd/v3/kv_etcd.go +++ b/etcd/v3/kv_etcd.go @@ -77,7 +77,7 @@ func (w *watchQ) start() { // Indicate the caller that watch has been canceled _ = w.cb(key, w.opaque, nil, kvdb.ErrWatchStopped) // Indicate that watch is returning. - w.watchRet <- err + close(w.watchRet) break } } @@ -914,7 +914,7 @@ func (et *etcdKV) watchStart( action = "unknown" } if !watchQ.enqueue(key, et.resultToKv(ev.Kv, action), err) { - break + return } } } @@ -928,8 +928,9 @@ func (et *etcdKV) watchStart( // Indicate the caller that watch has been canceled logrus.Errorf("Watch closing session") watchQ.enqueue(key, nil, kvdb.ErrWatchStopped) - case err := <-watchRet: // error in watcher - logrus.Errorf("Watch for %v stopped: %v", key, err) + case <-watchRet: // error in watcher + logrus.Errorf("Watch for %v stopped", key) + return } }
Return on watch close break does not work since there is a double loop.
diff --git a/lib/dialects/sqlite3/runner.js b/lib/dialects/sqlite3/runner.js index <HASH>..<HASH> 100644 --- a/lib/dialects/sqlite3/runner.js +++ b/lib/dialects/sqlite3/runner.js @@ -40,17 +40,17 @@ Runner_SQLite3.prototype._query = Promise.method(function(obj) { }); }); -// Grab a connection, run the query via the MySQL streaming interface, -// and pass that through to the stream we've sent back to the client. +// Sounds like .each doesn't work great for Runner_SQLite3.prototype._stream = Promise.method(function(sql, stream, options) { var runner = this; return new Promise(function(resolver, rejecter) { stream.on('error', rejecter); stream.on('end', resolver); - runner.connection.each(sql.sql, sql.bindings, function(err, row) { - if (err) return rejecter(err); + return runner.query().map(function(row) { stream.write(row); - }, function() { + }).catch(function() { + stream.emit('error'); + }).then(function() { stream.end(); }); });
different stream implementation for the sqlite3 runner
diff --git a/test/test-load-filters-on-demand.js b/test/test-load-filters-on-demand.js index <HASH>..<HASH> 100644 --- a/test/test-load-filters-on-demand.js +++ b/test/test-load-filters-on-demand.js @@ -25,7 +25,7 @@ function buildChecklist(tf, colIdx){ module('Sanity checks'); -test('Selet type filters exist', function() { +test('Select type filters exist', function() { deepEqual(tf.loadFltOnDemand, true, 'loadFltOnDemand property'); notEqual(flt1, null, 'Filter 1 element exists'); notEqual(flt2, null, 'Filter 2 element exists');
Fixed typo in test load filters on demand
diff --git a/spacy/language.py b/spacy/language.py index <HASH>..<HASH> 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -350,6 +350,7 @@ class Language(object): 'ner': self.entity.cfg if self.entity else {}, } + path = util.ensure_path(path) self.setup_directory(path, **configs) strings_loc = path / 'vocab' / 'strings.json'
Ensure path in save_to_directory
diff --git a/includes/functions.php b/includes/functions.php index <HASH>..<HASH> 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -1368,7 +1368,7 @@ function yourls_check_IP_flood( $ip = '' ) { if( ( $now - $then ) <= YOURLS_FLOOD_DELAY_SECONDS ) { // Flood! yourls_do_action( 'ip_flood', $ip, $now - $then ); - yourls_die( yourls__( 'Too many URLs added too fast. Slow down please.' ), yourls__( 'Forbidden' ), 403 ); + yourls_die( yourls__( 'Too many URLs added too fast. Slow down please.' ), yourls__( 'Too Many Requests' ), 429 ); } }
use correct http status code for rate limiting
diff --git a/lib/page.js b/lib/page.js index <HASH>..<HASH> 100644 --- a/lib/page.js +++ b/lib/page.js @@ -89,16 +89,16 @@ Page.prototype.event = function(name){ }; /** - * Convert this Page to a Track facade with `event`. + * Convert this Page to a Track facade with `name`. * - * @param {String} event + * @param {String} name * @return {Track} */ -Page.prototype.track = function(event){ +Page.prototype.track = function(name){ var props = this.properties(); return new Track({ - properties: props, - event: event + event: this.event(name), + properties: props }); }; diff --git a/test/page.js b/test/page.js index <HASH>..<HASH> 100644 --- a/test/page.js +++ b/test/page.js @@ -74,7 +74,9 @@ describe('Page', function(){ }); expect(page.track('event')).to.be.a(Track); - expect(page.track('event').event()).to.eql('event'); + expect(page.track().event()).to.eql('Loaded a Page'); + expect(page.track('name').event()).to.eql('Viewed name Page'); + expect(page.track('category').event()).to.eql('Viewed category Page'); expect(page.track('event').properties()).to.eql({ category: 'category', name: 'name',
change .track() to accept name instead of event
diff --git a/Bridges/HttpKernel.php b/Bridges/HttpKernel.php index <HASH>..<HASH> 100644 --- a/Bridges/HttpKernel.php +++ b/Bridges/HttpKernel.php @@ -159,7 +159,13 @@ class HttpKernel implements BridgeInterface $this->tempFiles[] = $tmpname; if (UPLOAD_ERR_NO_FILE == $file->getError()) { - $file = null; + $file = [ + 'error' => $file->getError(), + 'name' => $file->getClientFilename(), + 'size' => $file->getSize(), + 'tmp_name' => $tmpname, + 'type' => $file->getClientMediaType() + ]; } else { if (UPLOAD_ERR_OK == $file->getError()) { file_put_contents($tmpname, (string)$file->getStream());
Fix empty file inputs in Symfony <I> (#<I>) Symfony <I> fails on uploaded files that are null: they must be array or UploadedFile. UploadedFile can only be used for actual files. Solution is to pass the uploaded file as array instead. The array cannot be passed for actual uploaded files because Symfony will not trust the files because they were not created by PHP core. A better solution would be to let Symfony accept null files (see implementation of FileBag).
diff --git a/supervisor/iptables.go b/supervisor/iptables.go index <HASH>..<HASH> 100644 --- a/supervisor/iptables.go +++ b/supervisor/iptables.go @@ -355,7 +355,7 @@ func (s *iptablesSupervisor) chainRules(appChain string, netChain string, ip str appPacketIPTableContext, appPacketIPTableSection, "-s", ip, - "-i", "docker0", + // "-i", "docker0", "-m", "comment", "--comment", "Container specific chain", "-j", appChain, }, @@ -363,7 +363,7 @@ func (s *iptablesSupervisor) chainRules(appChain string, netChain string, ip str appPacketIPTableSection, "-s", ip, "-p", "tcp", - "-i", "docker0", + // "-i", "docker0", "-m", "comment", "--comment", "Container specific chain", "-j", appChain, },
FIXED: No need for docker0 reference
diff --git a/eth/vm/forks/london/headers.py b/eth/vm/forks/london/headers.py index <HASH>..<HASH> 100644 --- a/eth/vm/forks/london/headers.py +++ b/eth/vm/forks/london/headers.py @@ -22,9 +22,12 @@ from eth.abc import ( from eth.constants import GENESIS_GAS_LIMIT from eth.rlp.headers import BlockHeader from eth.vm.forks.berlin.headers import ( - compute_berlin_difficulty, configure_header, ) +from eth.vm.forks.muir_glacier.headers import ( + compute_difficulty, +) + from .blocks import LondonBlockHeader from .constants import ( @@ -121,7 +124,7 @@ def create_header_from_parent(difficulty_fn: Callable[[BlockHeaderAPI, int], int return new_header -compute_london_difficulty = compute_berlin_difficulty +compute_london_difficulty = compute_difficulty(9700000) create_london_header_from_parent = create_header_from_parent( compute_london_difficulty
eip-<I>: delay difficulty bomb further to ~ Dec <I>
diff --git a/pylint_django/transforms/transforms/django_views_generic_base.py b/pylint_django/transforms/transforms/django_views_generic_base.py index <HASH>..<HASH> 100644 --- a/pylint_django/transforms/transforms/django_views_generic_base.py +++ b/pylint_django/transforms/transforms/django_views_generic_base.py @@ -1,7 +1,7 @@ class View(object): request = None - args = None - kwargs = None + args = () + kwargs = {} # as_view is marked as class-only def as_view(*args, **kwargs):
Fix view.args and view.kwargs types Args should be a tuple and kwargs a dict so that Pylint gets the types correct.
diff --git a/bakery/tasks.py b/bakery/tasks.py index <HASH>..<HASH> 100644 --- a/bakery/tasks.py +++ b/bakery/tasks.py @@ -507,7 +507,7 @@ def fontaine_process(project, build, log): os.chdir(_out) files = glob.glob('*.ttf') for file in files: - cmd = "python pyfontaine --text '%s' >> 'sources/fontaine.txt'" % file + cmd = "pyfontaine --text '%s' >> 'sources/fontaine.txt'" % file run(cmd, cwd=_out, log=log) # TODO also save the totals for the dashboard.... # log.write('Running Fontaine on Results\n', prefix='### ')
pyfontaine is a standalone script
diff --git a/resource_aws_cloudtrail.go b/resource_aws_cloudtrail.go index <HASH>..<HASH> 100644 --- a/resource_aws_cloudtrail.go +++ b/resource_aws_cloudtrail.go @@ -200,7 +200,7 @@ func cloudTrailGetLoggingStatus(conn *cloudtrail.CloudTrail, id *string) (bool, } resp, err := conn.GetTrailStatus(GetTrailStatusOpts) if err != nil { - return false, fmt.Errorf("Error retrieving logging status of CloudTrail (%s): %s", id, err) + return false, fmt.Errorf("Error retrieving logging status of CloudTrail (%s): %s", *id, err) } return *resp.IsLogging, err
Mistake in type refactor in cloudTrailGetLoggingStatus When adjusting the types to prevent casting, I didn't change the error message to handle the pointer change. "go tool vet" caught this.
diff --git a/lib/Thelia/ImportExport/Export/Type/ProductSEOExport.php b/lib/Thelia/ImportExport/Export/Type/ProductSEOExport.php index <HASH>..<HASH> 100644 --- a/lib/Thelia/ImportExport/Export/Type/ProductSEOExport.php +++ b/lib/Thelia/ImportExport/Export/Type/ProductSEOExport.php @@ -28,6 +28,7 @@ class ProductSEOExport extends JsonFileAbstractExport public const FILE_NAME = 'product_seo'; protected $orderAndAliases = [ + 'product_id' => 'id', 'product_ref' => 'ref', 'product_i18n_title' => 'product_title', 'product_visible' => 'visible', @@ -43,6 +44,7 @@ class ProductSEOExport extends JsonFileAbstractExport $con = Propel::getConnection(); $query = 'SELECT + product.id as "product_id", product.ref as "product_ref", product_i18n.title as "product_i18n_title", product.visible as "product_visible",
adding IDs in product SEO export (#<I>)
diff --git a/jodd-db/src/main/java/jodd/db/pool/CoreConnectionPool.java b/jodd-db/src/main/java/jodd/db/pool/CoreConnectionPool.java index <HASH>..<HASH> 100644 --- a/jodd-db/src/main/java/jodd/db/pool/CoreConnectionPool.java +++ b/jodd-db/src/main/java/jodd/db/pool/CoreConnectionPool.java @@ -381,6 +381,9 @@ public class CoreConnectionPool implements Runnable, ConnectionProvider { } private void closeConnections(final ArrayList<ConnectionData> connections) { + if (connections == null) { + return; + } try { for (ConnectionData connectionData : connections) { Connection connection = connectionData.connection; @@ -388,7 +391,7 @@ public class CoreConnectionPool implements Runnable, ConnectionProvider { connection.close(); } } - } catch (SQLException sex) { + } catch (SQLException ignore) { // Ignore errors; garbage collect anyhow } }
Fixing minor issue with core connection pool
diff --git a/rest-api/src/test/java/org/jboss/pnc/client/ClientTest.java b/rest-api/src/test/java/org/jboss/pnc/client/ClientTest.java index <HASH>..<HASH> 100644 --- a/rest-api/src/test/java/org/jboss/pnc/client/ClientTest.java +++ b/rest-api/src/test/java/org/jboss/pnc/client/ClientTest.java @@ -30,6 +30,7 @@ import org.junit.Test; import org.slf4j.MDC; import javax.ws.rs.NotAuthorizedException; +import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -116,6 +117,7 @@ public class ClientTest { wireMockServer.stubFor(get(urlMatching(".*")).willReturn(aResponse() .withStatus(401) + .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON) )); BuildClient buildClient = new BuildClient(configuration);
Fix client test by adding a content-type
diff --git a/djangocms_text_ckeditor/fields.py b/djangocms_text_ckeditor/fields.py index <HASH>..<HASH> 100644 --- a/djangocms_text_ckeditor/fields.py +++ b/djangocms_text_ckeditor/fields.py @@ -2,6 +2,11 @@ from django.db import models from django.contrib.admin import widgets as admin_widgets from djangocms_text_ckeditor.html import clean_html from djangocms_text_ckeditor.widgets import TextEditorWidget +try: + from south.modelsinspector import add_introspection_rules + add_introspection_rules([], ['^djangocms_text_ckeditor\.fields\.HTMLField']) +except ImportError: + pass class HTMLField(models.TextField):
added south introspection rules to the field
diff --git a/bika/lims/browser/dashboard/dashboard.py b/bika/lims/browser/dashboard/dashboard.py index <HASH>..<HASH> 100644 --- a/bika/lims/browser/dashboard/dashboard.py +++ b/bika/lims/browser/dashboard/dashboard.py @@ -150,7 +150,7 @@ class DashboardView(BrowserView): if filtering_allowed: query_dic['getDepartmentUIDs'] = { "query":cookie_dep_uid,"operator":"or" } numars += len(bc(query_dic)) - + if (sampenabled): # Analysis Requests awaiting to be sampled or scheduled review_state = ['to_be_sampled',] @@ -495,8 +495,7 @@ class DashboardView(BrowserView): # Analyses pending review_state = ['sample_received', 'assigned', - 'attachment_due', - 'to_be_verified'] + 'attachment_due'] query_dic = {'portal_type':"Analysis", 'review_state':review_state} if filtering_allowed:
Remove to_be_verified state from pending analyses query...
diff --git a/src/Console/Commands/CrudGeneratorCommand.php b/src/Console/Commands/CrudGeneratorCommand.php index <HASH>..<HASH> 100644 --- a/src/Console/Commands/CrudGeneratorCommand.php +++ b/src/Console/Commands/CrudGeneratorCommand.php @@ -56,7 +56,7 @@ class CrudGeneratorCommand extends Command $this->info("List of tables: ".print_r($tables, true)); foreach ($tables as $t) { - if(str_contains($t, $prefix)) + if($prefix == '' || str_contains($t, $prefix)) $tablenames[] = strtolower(substr($t, strlen($prefix))); //else //$tablenames[] = strtolower($t);
Fix preventing creating crud for all tables with no prefix
diff --git a/lib/dill/matchers.rb b/lib/dill/matchers.rb index <HASH>..<HASH> 100644 --- a/lib/dill/matchers.rb +++ b/lib/dill/matchers.rb @@ -1,7 +1,11 @@ require 'rspec/matchers' RSpec::Matchers.define :see do |widget_name, *args| - match do |role| - role.see?(widget_name, *args) + match do |role| + begin + eventually { role.see?(widget_name, *args) } + rescue Dill::Checkpoint::ConditionNotMet + false + end end end
[matchers] Let #see wait.
diff --git a/lib/conf/cli.js b/lib/conf/cli.js index <HASH>..<HASH> 100755 --- a/lib/conf/cli.js +++ b/lib/conf/cli.js @@ -191,8 +191,10 @@ var show_gui_and_exit = function () { else if (os_name == 'linux') gui_path = gui_path + '.py'; else { - args = [gui_path.replace('prey-config', 'PreyConfig.app/Contents/MacOS/prey-config.rb')] - gui_path = '/usr/bin/ruby'; + // args = [gui_path.replace('prey-config', 'PreyConfig.app/Contents/MacOS/prey-config.rb')] + // gui_path = '/usr/bin/ruby'; + args = [gui_path.replace('prey-config', 'PreyConfig.app')]; + gui_path = '/usr/bin/open'; } helpers.run_detached(gui_path, args);
Use OSX's open command to fire up PreyConfig.
diff --git a/oauthlib/oauth1/rfc5849/__init__.py b/oauthlib/oauth1/rfc5849/__init__.py index <HASH>..<HASH> 100644 --- a/oauthlib/oauth1/rfc5849/__init__.py +++ b/oauthlib/oauth1/rfc5849/__init__.py @@ -270,7 +270,7 @@ class Server(object): verifier=verifier) client_signature = oauth_client.get_oauth_signature(uri, - body=body, headers=headers) + http_method=http_method, body=body, headers=headers) # FIXME: use near constant time string compare to avoid timing attacks return client_signature == request_signature
Pass through the request method to the client when generating signature.
diff --git a/src/nlu.js b/src/nlu.js index <HASH>..<HASH> 100644 --- a/src/nlu.js +++ b/src/nlu.js @@ -133,7 +133,7 @@ class Nlu { } const qnaResult = await this.computeWithQna(sentence); logger.debug('compute: qnaResult', qnaResult); - return qnaResult.intents.length > 0 ? qnaResult : { intents: [], entities: [] }; + return qnaResult.intents.length > 0 ? qnaResult : { intents: [], entities: classifierResult.entities }; } return this.computeWithClassifier(sentence); }
Fix empty entities when qna after
diff --git a/mmtf/api/mmtf_writer.py b/mmtf/api/mmtf_writer.py index <HASH>..<HASH> 100644 --- a/mmtf/api/mmtf_writer.py +++ b/mmtf/api/mmtf_writer.py @@ -209,7 +209,7 @@ class MMTFEncoder(TemplateEncoder): def encode_data(self): """Encode the data back into a dict.""" output_data = {} - output_data[b"groupTypeList"] = encode_array(self.group_type_list, 2, 0) + output_data[b"groupTypeList"] = encode_array(self.group_type_list, 4, 0) output_data[b"xCoordList"] = encode_array(self.x_coord_list, 10, 1000) output_data[b"yCoordList"] = encode_array(self.y_coord_list, 10, 1000) output_data[b"zCoordList"] = encode_array(self.z_coord_list, 10, 1000)
Fixed a bug in the writing of MMTF files
diff --git a/src/main/java/org/minimalj/security/Authorization.java b/src/main/java/org/minimalj/security/Authorization.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/minimalj/security/Authorization.java +++ b/src/main/java/org/minimalj/security/Authorization.java @@ -20,15 +20,9 @@ public abstract class Authorization { private static ThreadLocal<Serializable> securityToken = new ThreadLocal<>(); private Map<UUID, Subject> userByToken = new HashMap<>(); - private static boolean active = true; - private static InheritableThreadLocal<Authorization> current = new InheritableThreadLocal<Authorization>() { @Override protected Authorization initialValue() { - if (!active) { - return null; - } - String authorizationClassName = System.getProperty("MjAuthorization"); if (!StringUtils.isBlank(authorizationClassName)) { try { @@ -51,7 +45,6 @@ public abstract class Authorization { return new JaasAuthorization(jaasConfiguration); } - active = false; return null; } }; @@ -68,8 +61,7 @@ public abstract class Authorization { } public static boolean isActive() { - getCurrent(); - return active; + return getCurrent() != null; } public static boolean isAllowed(Transaction<?> transaction) {
Authorization: active flag is not needed anymore
diff --git a/websocketproxy.go b/websocketproxy.go index <HASH>..<HASH> 100644 --- a/websocketproxy.go +++ b/websocketproxy.go @@ -56,15 +56,18 @@ func NewProxy(target *url.URL) *WebsocketProxy { return &WebsocketProxy{Backend: backend} } -func (w *WebsocketProxy) CloseNotify() { -} - // ServeHTTP implements the http.Handler that proxies WebSocket connections. func (w *WebsocketProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) { + if w.Backend == nil { + log.Println("websocketproxy: backend function is not defined") + http.Error(rw, "internal server error (code: 1)", http.StatusInternalServerError) + return + } + backendURL := w.Backend(req) if backendURL == nil { log.Println("websocketproxy: backend URL is nil") - http.Error(rw, "internal server error", http.StatusInternalServerError) + http.Error(rw, "internal server error (code: 2)", http.StatusInternalServerError) return }
websocketproxy: also test the nilness of backend function
diff --git a/src/ChrisKonnertz/OpenGraph/OpenGraph.php b/src/ChrisKonnertz/OpenGraph/OpenGraph.php index <HASH>..<HASH> 100644 --- a/src/ChrisKonnertz/OpenGraph/OpenGraph.php +++ b/src/ChrisKonnertz/OpenGraph/OpenGraph.php @@ -173,7 +173,7 @@ class OpenGraph * @param bool $prefixed Add the "og"-prefix? * @return OpenGraph */ - public function attributesstring ( + public function attributes ( string $tagName, array $attributes = [], array $valid = [],
Fixed: attributesstring to attributes I have changed function names due to this error, <URL>
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -442,7 +442,7 @@ module.exports = function(grunt) { grunt.registerTask('docs', ['http','generate-docs', 'yuidoc']); grunt.registerTask('github-pages', ['copy:github-pages', 'clean:github-pages']); grunt.registerTask('zip', ['compress', 'copy:F2-examples', 'clean:F2-examples']); - grunt.registerTask('js', ['test', 'concat:dist', 'concat:no-third-party', 'uglify:dist', 'sourcemap', 'copy:f2ToRoot']); + grunt.registerTask('js', ['concat:dist', 'concat:no-third-party', 'uglify:dist', 'sourcemap', 'copy:f2ToRoot','test']); grunt.registerTask('sourcemap', ['uglify:sourcemap', 'fix-sourcemap']); grunt.registerTask('packages', [ 'concat:no-jquery-or-bootstrap',
has this always been this way? test should be last
diff --git a/packages/rum/src/apm-base.js b/packages/rum/src/apm-base.js index <HASH>..<HASH> 100644 --- a/packages/rum/src/apm-base.js +++ b/packages/rum/src/apm-base.js @@ -23,8 +23,11 @@ * */ -import { getInstrumentationFlags } from '@elastic/apm-rum-core' -import { PAGE_LOAD, ERROR } from '@elastic/apm-rum-core' +import { + getInstrumentationFlags, + PAGE_LOAD, + ERROR +} from '@elastic/apm-rum-core' class ApmBase { constructor(serviceFactory, disable) {
chore(rum): merge duplicate import statementments in apm base (#<I>)
diff --git a/Connector/ZimbraConnector.php b/Connector/ZimbraConnector.php index <HASH>..<HASH> 100644 --- a/Connector/ZimbraConnector.php +++ b/Connector/ZimbraConnector.php @@ -776,7 +776,7 @@ class ZimbraConnector { $this->delegateAuth($account); - $response = $this->request('GetFolder', array(), array( + $response = $this->request('GetFolders', array(), array( 'folder' => array( '@attributes' => array( 'l' => $folderId
GetTag and GetFolder should be GetTags and GetFolders
diff --git a/test/helpers/add-to-html-methods.js b/test/helpers/add-to-html-methods.js index <HASH>..<HASH> 100644 --- a/test/helpers/add-to-html-methods.js +++ b/test/helpers/add-to-html-methods.js @@ -23,7 +23,7 @@ Node.prototype.toHTML = function (leftAncestorInputPosition = ZERO_POINT, leftAn let changeEnd = !this.isChangeStart ? ' &lt;&lt;' : '' let inputPosition = traverse(leftAncestorInputPosition, this.inputLeftExtent) let outputPosition = traverse(leftAncestorOutputPosition, this.outputLeftExtent) - s += '<td colspan="2">' + changeEnd + formatPoint(inputPosition) + ' / ' + formatPoint(outputPosition) + ' {' + JSON.stringify(this.changeText) + '} ' + changeStart + '</td>' + s += '<td colspan="2">' + ' {' + JSON.stringify(this.changeText) + '} ' + changeEnd + formatPoint(inputPosition) + ' / ' + formatPoint(outputPosition) + changeStart + '</td>' s += '</tr>' if (this.left || this.right) {
Print text first for more intuitive tree HTML
diff --git a/allpairspy/allpairs.py b/allpairspy/allpairs.py index <HASH>..<HASH> 100644 --- a/allpairspy/allpairs.py +++ b/allpairspy/allpairs.py @@ -126,7 +126,7 @@ class AllPairs(object): while -1 < i < len(self.__working_item_array): if direction == 1: # move forward - self.resort_working_array(chosen_values_arr[:i], i) + self.__resort_working_array(chosen_values_arr[:i], i) indexes[i] = 0 elif direction == 0 or direction == -1: # scan current array or go back @@ -164,7 +164,7 @@ class AllPairs(object): # replace returned array elements with real values and return it return self.__get_values_array(chosen_values_arr) - def resort_working_array(self, chosen_values_arr, num): + def __resort_working_array(self, chosen_values_arr, num): for item in self.__working_item_array[num]: data_node = self.__pairs.get_node_info(item)
Change a public method to a private method that not called from outside
diff --git a/lib/mactag/builder.rb b/lib/mactag/builder.rb index <HASH>..<HASH> 100644 --- a/lib/mactag/builder.rb +++ b/lib/mactag/builder.rb @@ -37,7 +37,7 @@ module Mactag end if @builder.gems? - system "cd #{Rails.root} && #{Mactag::Config.binary} #{@builder.files.join(' ')}" + system "cd #{Rails.root} && #{Mactag::Config.binary} #{builder.files.join(' ')}" puts "Successfully generated TAGS file" else @@ -55,5 +55,9 @@ module Mactag def self.gem_home_exists? File.directory?(Mactag::Config.gem_home) end + + def self.builder + @builder + end end end diff --git a/spec/mactag/builder_spec.rb b/spec/mactag/builder_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mactag/builder_spec.rb +++ b/spec/mactag/builder_spec.rb @@ -105,4 +105,11 @@ describe Mactag::Builder do Mactag::Builder.gem_home_exists?.should be_false end end + + describe '#builder' do + it 'should return builder instance' do + Mactag::Builder.generate {} + Mactag::Builder.builder.should == Mactag::Builder.instance_variable_get('@builder') + end + end end
Added method that return builder.
diff --git a/demo/app.js b/demo/app.js index <HASH>..<HASH> 100644 --- a/demo/app.js +++ b/demo/app.js @@ -11,7 +11,6 @@ }; $scope.froalaAction = function(action){ - console.log('froalaAction', action); $scope.options.froala(action); }; diff --git a/src/angular-froala.js b/src/angular-froala.js index <HASH>..<HASH> 100644 --- a/src/angular-froala.js +++ b/src/angular-froala.js @@ -13,6 +13,10 @@ angular.module('froala', []). froala : '=' }, link: function(scope, element, attrs, ngModel) { + if(!(element instanceof jQuery)){ + throw "Froala requires jQuery, are you loading it before Angular?"; + } + var defaultOptions = {}; var contentChangedCallback; var options = angular.extend(defaultOptions, froalaConfig, scope.froala);
check that jQuery is loaded before initializing froala
diff --git a/hearthstone/cardxml.py b/hearthstone/cardxml.py index <HASH>..<HASH> 100644 --- a/hearthstone/cardxml.py +++ b/hearthstone/cardxml.py @@ -198,10 +198,18 @@ class CardXML(object): return bool(self.tags.get(GameTag.Collectible, False)) @property + def battlecry(self): + return bool(self.tags.get(GameTag.BATTLECRY, False)) + + @property def deathrattle(self): return bool(self.tags.get(GameTag.DEATHRATTLE, False)) @property + def divine_shield(self): + return bool(self.tags.get(GameTag.DIVINE_SHIELD, False)) + + @property def double_spelldamage_bonus(self): return bool(self.tags.get(GameTag.RECEIVES_DOUBLE_SPELLDAMAGE_BONUS, False)) @@ -238,6 +246,10 @@ class CardXML(object): return bool(self.tags.get(GameTag.SECRET, False)) @property + def taunt(self): + return bool(self.tags.get(GameTag.TAUNT, False)) + + @property def spare_part(self): return bool(self.tags.get(GameTag.SPARE_PART, False))
cardxml: Implement battlecry, divine_shield and taunt properties
diff --git a/lib/mauth/client.rb b/lib/mauth/client.rb index <HASH>..<HASH> 100644 --- a/lib/mauth/client.rb +++ b/lib/mauth/client.rb @@ -144,8 +144,6 @@ module MAuth class ConfigurationError < StandardError; end MWS_TOKEN = 'MWS'.freeze - MWSV2_TOKEN = 'MWSV2'.freeze - AUTH_HEADER_DELIMITER = ';'.freeze # new client with the given App UUID and public key. config may include the following (all # config keys may be strings or symbols):
move constants into v2 file
diff --git a/manifest_test.go b/manifest_test.go index <HASH>..<HASH> 100644 --- a/manifest_test.go +++ b/manifest_test.go @@ -315,7 +315,7 @@ func expectedResourceList(root string, resources []dresource) ([]Resource, error absPath = "/" + absPath } uidStr := strconv.Itoa(r.uid) - gidStr := strconv.Itoa(r.uid) + gidStr := strconv.Itoa(r.gid) switch r.kind { case rfile: f := &regularFile{
Fix test fixture gid If uid == gid tests will pass, but fail if that is not the case.
diff --git a/app/initializers/setup-sanitizers.js b/app/initializers/setup-sanitizers.js index <HASH>..<HASH> 100644 --- a/app/initializers/setup-sanitizers.js +++ b/app/initializers/setup-sanitizers.js @@ -4,6 +4,11 @@ export default { name: 'ember-sanitize-setup-sanitizers', initialize: function(container) { - container.registerOptionsForType('sanitizer', { instantiate: false }); + if (container.registerOptionsForType) { + container.registerOptionsForType('sanitizer', { instantiate: false }); + } else { + // Ember < 2 + container.optionsForType('sanitizer', { instantiate: false }); + } } };
use correct container method for <I>
diff --git a/public/js/front/formhelper.js b/public/js/front/formhelper.js index <HASH>..<HASH> 100755 --- a/public/js/front/formhelper.js +++ b/public/js/front/formhelper.js @@ -243,18 +243,9 @@ Garp.apply(Garp.FormHelper, { changeYear: true }; // Look for data-attributes to customize config - /* - var attrs = this.attributes; - console.dir(attrs); - for (var i in attrs) { - if (i.indexOf('data-datepicker-') !== 0) { - continue; - } - i = i.replace(/^data-datepicker-/, ''); - datepickerConfig[i] = data[i]; - console.log('setting datepicker config: ', i, data[i]); + if ($this.data('datepicker-default-date')) { + datepickerConfig.defaultDate = $this.data('datepicker-default-date'); } - */ $this.datepicker(datepickerConfig); }); },
Allow configuration of defaultDate from form
diff --git a/src/main/java/org/threeten/extra/chrono/PaxDate.java b/src/main/java/org/threeten/extra/chrono/PaxDate.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/threeten/extra/chrono/PaxDate.java +++ b/src/main/java/org/threeten/extra/chrono/PaxDate.java @@ -587,7 +587,7 @@ public final class PaxDate extends AbstractDate implements ChronoLocalDate, Seri */ @Override long getProlepticMonth() { - return getProlepticYear() * MONTHS_IN_YEAR + getLeapYearsBefore(getProlepticYear()) + getMonth() - 1; + return ((long) getProlepticYear()) * MONTHS_IN_YEAR + getLeapYearsBefore(getProlepticYear()) + getMonth() - 1; } /**
Add cast to protect from overflow.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -14,14 +14,14 @@ var Key = require('./key'); var CachingWriter = {}; -CachingWriter.init = function(inputTrees, options) { +CachingWriter.init = function(inputTrees, _options) { this._lastKeys = []; this._shouldBeIgnoredCache = Object.create(null); this._destDir = path.resolve(path.join('tmp', 'caching-writer-dest-dir_' + generateRandomString(6) + '.tmp')); this.debug = debugGenerator('broccoli-caching-writer:' + (this.description || this.constructor.name)); - options = options || {}; + var options = _options || {}; for (var key in options) { if (options.hasOwnProperty(key)) {
don't re-write argument vars
diff --git a/tofu/data/_mesh.py b/tofu/data/_mesh.py index <HASH>..<HASH> 100644 --- a/tofu/data/_mesh.py +++ b/tofu/data/_mesh.py @@ -527,7 +527,7 @@ class Mesh2DRect(DataCollection): operator=None, geometry=None, isotropic=None, - method=None, + algo=None, sparse=None, chain=None, positive=None, @@ -549,7 +549,7 @@ class Mesh2DRect(DataCollection): operator=operator, geometry=geometry, isotropic=isotropic, - method=method, + algo=algo, sparse=sparse, chain=chain, positive=positive,
[#<I>] method renamed algo (method can be used by scipy)
diff --git a/src/vs/workbench/contrib/webview/browser/pre/main.js b/src/vs/workbench/contrib/webview/browser/pre/main.js index <HASH>..<HASH> 100644 --- a/src/vs/workbench/contrib/webview/browser/pre/main.js +++ b/src/vs/workbench/contrib/webview/browser/pre/main.js @@ -994,13 +994,18 @@ onDomReady(() => { if (!target) { return; } + + // Reset selection so we start search after current find result + const selection = target.contentWindow.getSelection(); + selection.collapse(selection.anchorNode); + const didFind = (/** @type {any} */ (target.contentWindow)).find( data.value, - false, + /* caseSensitive*/ false, /* backwards*/ data.previous, /* wrapAround*/ true, - false, - /*aSearchInFrames*/ true, + /* wholeWord */ false, + /* searchInFrames*/ false, false); hostMessaging.postMessage('did-find', didFind); });
Improving ux for search in webviews on web
diff --git a/lib/MtgDbClient/card.rb b/lib/MtgDbClient/card.rb index <HASH>..<HASH> 100644 --- a/lib/MtgDbClient/card.rb +++ b/lib/MtgDbClient/card.rb @@ -29,7 +29,7 @@ module MtgDbClient self.promo = response["promo"] self.rulings = response["rulings"].map{|r| Ruling.new(r)} self.formats = response["formats"].map{|f| Format.new(f)} - self.released_at = Date.parse(response["releasedAt"]) + self.released_at = Date.parse(response["releasedAt"]) unless response["releasedAt"].nil? end def image_low
handle possible null value at response["releasedAt"], see issue #1
diff --git a/app/controllers/devise/password_expired_controller.rb b/app/controllers/devise/password_expired_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/devise/password_expired_controller.rb +++ b/app/controllers/devise/password_expired_controller.rb @@ -1,6 +1,6 @@ class Devise::PasswordExpiredController < DeviseController skip_before_filter :handle_password_change - before_action :skip_password_change, only: [:show, :update] + before_filter :skip_password_change, only: [:show, :update] prepend_before_filter :authenticate_scope!, :only => [:show, :update] def show
change before_action to before_filter
diff --git a/google/storeutils/get.go b/google/storeutils/get.go index <HASH>..<HASH> 100644 --- a/google/storeutils/get.go +++ b/google/storeutils/get.go @@ -12,8 +12,12 @@ import ( // GetObject Gets a single object's bytes based on bucket and name parameters func GetObject(gc *storage.Client, bucket, name string) (*bytes.Buffer, error) { + return GetObjectWithContext(context.Background(), gc, bucket, name) +} - rc, err := gc.Bucket(bucket).Object(name).NewReader(context.Background()) +// GetObject Gets a single object's bytes based on bucket and name parameters +func GetObjectWithContext(ctx context.Context, gc *storage.Client, bucket, name string) (*bytes.Buffer, error) { + rc, err := gc.Bucket(bucket).Object(name).NewReader(ctx) if err != nil { if err == storage.ErrObjectNotExist { return nil, cloudstorage.ErrObjectNotFound
Add option to pass in context to getobject
diff --git a/test/test_post.rb b/test/test_post.rb index <HASH>..<HASH> 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -5,6 +5,8 @@ $LOAD_PATH.unshift(__dir__) require 'helper' describe 'Post' do + before { test_site.scan_files } + subject do filename = '2015-01-01-a-post.markdown' path = File.join(test_site.source_paths[:posts], filename) @@ -13,11 +15,11 @@ describe 'Post' do it 'parses its YAML frontmatter' do subject.title.must_equal('My first post') - subject.categories.sort.must_equal(%w[a b c]) + subject.categories.sort.must_equal(%w[green red]) end it 'renders its contents' do - expected_output = render_template('post') + expected_output = read_fixture('posts/2015-01-01-a-post') subject.render.must_equal(expected_output) end
Switch to calling read_fixture, rename the categories, and have the test site scan its files.
diff --git a/monero_serialize/xmrrpc.py b/monero_serialize/xmrrpc.py index <HASH>..<HASH> 100644 --- a/monero_serialize/xmrrpc.py +++ b/monero_serialize/xmrrpc.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- ''' XMR RPC serialization +WARNING: Not finished yet {json, binary} <-> portable_storage <-> object @@ -21,7 +22,7 @@ Mainly related to: /contrib/epee/include/storages/portable_storage_to_bin.h /contrib/epee/include/storages/portable_storage_to_json.h -...Not finished yet... +WARNING: Not finished yet '''
xmrrpc: not finished yet warning
diff --git a/perceval/backends/puppet/puppetforge.py b/perceval/backends/puppet/puppetforge.py index <HASH>..<HASH> 100644 --- a/perceval/backends/puppet/puppetforge.py +++ b/perceval/backends/puppet/puppetforge.py @@ -349,7 +349,7 @@ class PuppetForgeCommand(BackendCommand): def setup_cmd_parser(cls): """Returns the Puppet Forge argument parser.""" - parser = BackendCommandArgumentParser(cls.BACKEND.CATEGORIES, + parser = BackendCommandArgumentParser(cls.BACKEND, from_date=True, archive=True) diff --git a/tests/test_puppetforge.py b/tests/test_puppetforge.py index <HASH>..<HASH> 100644 --- a/tests/test_puppetforge.py +++ b/tests/test_puppetforge.py @@ -493,7 +493,7 @@ class TestPuppetForgeCommand(unittest.TestCase): parser = PuppetForgeCommand.setup_cmd_parser() self.assertIsInstance(parser, BackendCommandArgumentParser) - self.assertEqual(parser._categories, PuppetForge.CATEGORIES) + self.assertEqual(parser._backend, PuppetForge) args = ['--max-items', '5', '--tag', 'test',
[backend] Change signature BackendCommandArgumentParser This code changes the signature of the class `BackendCommandArgumentParser`, which now accepts as first parameter the backend object instead its categories. This change is needed to simplify accessing other backend attributes, beyond the categories. Puppetforge backend and corresponding tests have been updated.
diff --git a/Module.php b/Module.php index <HASH>..<HASH> 100644 --- a/Module.php +++ b/Module.php @@ -2,16 +2,16 @@ namespace ZfcUserDoctrineORM; -use Zend\Module\Manager, - Zend\Module\Consumer\AutoloaderProvider, +use Zend\ModuleManager\ModuleManager, + Zend\ModuleManager\Feature\AutoloaderProviderInterface, ZfcUserDoctrineORM\Event\ResolveTargetEntityListener, ZfcUser\Module as ZfcUser, Doctrine\ORM\Events, Zend\EventManager\StaticEventManager; -class Module implements AutoloaderProvider +class Module implements AutoloaderProviderInterface { - public function init(Manager $moduleManager) + public function init(ModuleManager $moduleManager) { $events = StaticEventManager::getInstance(); $events->attach('bootstrap', 'bootstrap', array($this, 'attachDoctrineEvents'), 100);
Updated Module.php for zf2 b4 compliance.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -21,14 +21,15 @@ function header (stream) { var m if(!(m = /\n/.exec(soFar))) return var meta = JSON.parse(soFar.substring(0, m.index)) - soFar = soFar.substring(m.index) + //+ 1 to get past the newline + soFar = soFar.substring(m.index + 1) stream.emit = emit stream.meta = meta stream.emit('header', meta) //check that the stream is still readable, //it may have been ended during the 'header' //event. - if(soFar != '' && stream.readable) + if('' !== soFar && stream.readable) stream.emit('data', soFar) }
don\'t emit \'\' as data
diff --git a/src/main/java/net/kuujo/vertigo/context/WorkerContext.java b/src/main/java/net/kuujo/vertigo/context/WorkerContext.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/kuujo/vertigo/context/WorkerContext.java +++ b/src/main/java/net/kuujo/vertigo/context/WorkerContext.java @@ -91,7 +91,10 @@ public class WorkerContext implements Context { * A JSON configuration. */ public JsonObject config() { - JsonObject config = getComponentContext().getDefinition().config(); + if (parent == null) { + return new JsonObject(); + } + JsonObject config = parent.getDefinition().config(); if (config == null) { config = new JsonObject(); }
Support empty WorkerContext instances for other language support.
diff --git a/bucketcache/__init__.py b/bucketcache/__init__.py index <HASH>..<HASH> 100644 --- a/bucketcache/__init__.py +++ b/bucketcache/__init__.py @@ -12,6 +12,6 @@ __all__ = (backends.__all__ + buckets.__all__ + config.__all__ + exceptions.__all__ + keymakers.__all__ + utilities.__all__) __author__ = 'Frazer McLean <frazer@frazermclean.co.uk>' -__version__ = '0.11.0' +__version__ = '0.11.1' __license__ = 'MIT' __description__ = 'Versatile persisent file cache.'
Bumped version number to <I>
diff --git a/lib/features/popup-menu/PopupMenu.js b/lib/features/popup-menu/PopupMenu.js index <HASH>..<HASH> 100644 --- a/lib/features/popup-menu/PopupMenu.js +++ b/lib/features/popup-menu/PopupMenu.js @@ -308,7 +308,7 @@ PopupMenu.prototype._createEntries = function(entries, container) { self._createEntry(entry, entriesContainer); }); - domClasses(entriesContainer).add('dropdown-menu'); + domClasses(entriesContainer).add('popup-dropdown-menu'); container.appendChild(entriesContainer); }; @@ -364,7 +364,7 @@ PopupMenu.prototype._createEntry = function(entry, container) { if(entry.content.entries) { // create a nested menu label.textContent = entry.content.label; - entryClasses.add('dropdown'); + entryClasses.add('popup-dropdown'); this._createEntries(entry.content.entries, entryContainer); } else { // create a normal entry
refact(popup): prefix dropdown class names with popup- Related to CAM-<I>
diff --git a/Manager/InstallationManager.php b/Manager/InstallationManager.php index <HASH>..<HASH> 100644 --- a/Manager/InstallationManager.php +++ b/Manager/InstallationManager.php @@ -154,7 +154,7 @@ class InstallationManager $ds = DIRECTORY_SEPARATOR; $om = $this->container->get('doctrine.orm.entity_manager'); $entity = $om->getRepository('ClarolineCoreBundle:Bundle') - ->findOneByName($bundle->getName()); + ->findOneByName($bundle->getClarolineName()); if (!$entity) { $entity = new Bundle();
[InstallationBundle] Update InstallationManager.php
diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index <HASH>..<HASH> 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -28,7 +28,7 @@ import ( ) const ( - scaleTimeout = 2 * time.Minute + scaleTimeout = 5 * time.Minute ) var _ = framework.KubeDescribe("Cluster size autoscaling [Feature:ClusterSizeAutoscaling] [Slow]", func() {
Increase cluster resize timeout in e2e tests from 2 min to 5 min
diff --git a/xclim/indices/_anuclim.py b/xclim/indices/_anuclim.py index <HASH>..<HASH> 100644 --- a/xclim/indices/_anuclim.py +++ b/xclim/indices/_anuclim.py @@ -486,11 +486,9 @@ def prcptot(pr: xarray.DataArray, input_freq: str = None, freq: str = "YS"): Parameters ---------- pr : xarray.DataArray - Total precipitation flux [mm d-1], [mm week-1], [mm month-1] or similar - + Total precipitation flux [mm d-1], [mm week-1], [mm month-1] or similar. input_freq : str - Input data time frequency - One of 'daily', 'weekly' or 'monthly' - + Input data time frequency - One of 'daily', 'weekly' or 'monthly'. freq : str Resampling frequency; Defaults to "YS".
Update xclim/indices/_anuclim.py
diff --git a/src/Factory/Invoice.php b/src/Factory/Invoice.php index <HASH>..<HASH> 100644 --- a/src/Factory/Invoice.php +++ b/src/Factory/Invoice.php @@ -506,6 +506,9 @@ class Invoice } elseif ($mKey instanceof \stdClass) { $this->oCallbackData = new CallbackData($mKey); } else { + if ($this->oCallbackData === null) { + $this->oCallbackData = new \stdClass(); + } $this->oCallbackData->{$mKey} = $mValue; } diff --git a/src/Factory/Invoice/Item.php b/src/Factory/Invoice/Item.php index <HASH>..<HASH> 100644 --- a/src/Factory/Invoice/Item.php +++ b/src/Factory/Invoice/Item.php @@ -289,6 +289,9 @@ class Item } elseif ($mKey instanceof \stdClass) { $this->oCallbackData = new CallbackData($mKey); } else { + if ($this->oCallbackData === null) { + $this->oCallbackData = new \stdClass(); + } $this->oCallbackData->{$mKey} = $mValue; }
Prevents phpe rror when passing in key/values to invoice and invoice item factories setCallbackData methods
diff --git a/java/client/src/org/openqa/selenium/support/ui/FluentWait.java b/java/client/src/org/openqa/selenium/support/ui/FluentWait.java index <HASH>..<HASH> 100644 --- a/java/client/src/org/openqa/selenium/support/ui/FluentWait.java +++ b/java/client/src/org/openqa/selenium/support/ui/FluentWait.java @@ -67,7 +67,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; */ public class FluentWait<T> implements Wait<T> { - public static Duration FIVE_HUNDRED_MILLIS = new Duration(500, MILLISECONDS); + public static final Duration FIVE_HUNDRED_MILLIS = new Duration(500, MILLISECONDS); private final T input; private final Clock clock;
java: Adding final modifier for a constant
diff --git a/spec/lib/sapience/appender/datadog_spec.rb b/spec/lib/sapience/appender/datadog_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/sapience/appender/datadog_spec.rb +++ b/spec/lib/sapience/appender/datadog_spec.rb @@ -164,4 +164,13 @@ describe Sapience::Appender::Datadog do end end + describe "#histogram" do + let(:metric_amount) { 444 } + + it "calls timing" do + expect(statsd).to receive(:histogram).with(metric, metric_amount) + subject.histogram(metric, metric_amount) + end + end + end
Add tests for Statsd histogram method
diff --git a/odl/operator/operator.py b/odl/operator/operator.py index <HASH>..<HASH> 100644 --- a/odl/operator/operator.py +++ b/odl/operator/operator.py @@ -963,6 +963,8 @@ class Operator(object): else: return NotImplemented + __div__ = __truediv__ + def __neg__(self): """Return ``-self``.""" return -1 * self
ENH: add __div__ to operators, allows division by scalars in python 2
diff --git a/lib/Scan.js b/lib/Scan.js index <HASH>..<HASH> 100644 --- a/lib/Scan.js +++ b/lib/Scan.js @@ -65,7 +65,7 @@ Scan.prototype.exec = function (next) { function scanByRawFilter() { var deferred = Q.defer(); var dbClient = Model.$__.base.documentClient(); - var AWSSet = dbClient.createSet([1, 2, 3]).constructor; + var DynamoDBSet = dbClient.createSet([1, 2, 3]).constructor; dbClient.scan(scanReq, function(err, data) { if (err) { @@ -78,7 +78,7 @@ Scan.prototype.exec = function (next) { var model; Object.keys(item).forEach(function (prop) { - if (item.hasOwnProperty(prop) && item[prop] instanceof AWSSet) { + if (item[prop] instanceof DynamoDBSet) { item[prop] = item[prop].values; } });
Removed redundant hasOwnProperty call. Renamed variable for better clarity.
diff --git a/tests/unit/errorBag.js b/tests/unit/errorBag.js index <HASH>..<HASH> 100644 --- a/tests/unit/errorBag.js +++ b/tests/unit/errorBag.js @@ -356,11 +356,11 @@ test('groups errors by field name', () => { }); expect(errors.collect(null, undefined, false)).toEqual({ email: [ - { field: 'email', msg: 'The email is invalid', scope: null, rule: 'rule1' }, - { field: 'email', msg: 'The email is shorter than 3 chars.', scope: null, rule: 'rule1' }, + { field: 'email', msg: 'The email is invalid', scope: null, rule: 'rule1', vmId: null }, + { field: 'email', msg: 'The email is shorter than 3 chars.', scope: null, rule: 'rule1', vmId: null }, ], name: [ - { field: 'name', msg: 'The name is invalid', scope: null, rule: 'rule1' }, + { field: 'name', msg: 'The name is invalid', scope: null, rule: 'rule1', vmId: null }, ] }); });
tests: fix test case with vmId being injected into the errorbag
diff --git a/devices.js b/devices.js index <HASH>..<HASH> 100755 --- a/devices.js +++ b/devices.js @@ -3025,6 +3025,14 @@ const devices = [ supports: 'on/off, brightness, color temperature, color', }, { + zigbeeModel: ['GL-B-007ZS'], + model: 'GL-B-007ZS', + vendor: 'Gledopto', + description: 'Smart+ 6W E27 RGB / CCT LED bulb', + extend: gledopto.light, + supports: 'on/off, brightness, color temperature, color', + }, + { zigbeeModel: ['GL-B-008Z'], model: 'GL-B-008Z', vendor: 'Gledopto',
GLEDOPTO GL-B-<I>ZS Bulb (#<I>) Support for this bulb
diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php index <HASH>..<HASH> 100644 --- a/plugins/Goals/API.php +++ b/plugins/Goals/API.php @@ -192,7 +192,7 @@ class API extends \Piwik\Plugin\API WHERE idsite = ? AND idgoal = ?", array($idSite, $idGoal)); - Db::deleteAllRows(Common::prefixTable("log_conversion"), "WHERE idgoal = ?", "idvisit", 100000, array($idGoal)); + Db::deleteAllRows(Common::prefixTable("log_conversion"), "WHERE idgoal = ? AND idsite = ?", "idvisit", 100000, array($idGoal, $idSite)); Cache::regenerateCacheWebsiteAttributes($idSite); }
Goal delete fix Disallow to delete all conversions for given idgoal (across all websites) after goal (soft)delete.
diff --git a/packages/vuetifyjs.com/build/webpack.base.config.js b/packages/vuetifyjs.com/build/webpack.base.config.js index <HASH>..<HASH> 100755 --- a/packages/vuetifyjs.com/build/webpack.base.config.js +++ b/packages/vuetifyjs.com/build/webpack.base.config.js @@ -24,7 +24,8 @@ module.exports = { alias: { '@': path.resolve(__dirname, '../'), 'vue$': 'vue/dist/vue.common.js' - } + }, + symlinks: false }, module: { noParse: /es6-promise\.js$/, // avoid webpack shimming process
don't let webpack resolve symlinks allows linked packages to have their own babel configs
diff --git a/library/Services/ShopInstaller/ShopInstaller.php b/library/Services/ShopInstaller/ShopInstaller.php index <HASH>..<HASH> 100644 --- a/library/Services/ShopInstaller/ShopInstaller.php +++ b/library/Services/ShopInstaller/ShopInstaller.php @@ -128,7 +128,7 @@ class ShopInstaller implements ShopServiceInterface $vendorDir = $testConfig->getVendorDirectory(); CliExecutor::executeCommand("{$vendorDir}/bin/oe-eshop-facts oe-eshop-db_migrate"); - CliExecutor::executeCommand("{$vendorDir}/bin/oe-eshop-facts oe-eshop-db_views_regenerate"); + CliExecutor::executeCommand("{$vendorDir}/bin/oe-eshop-db_views_regenerate"); } /**
ESDEV-<I> Use different script to generate views The new script is operating system independent.
diff --git a/chef/spec/unit/mixin/find_preferred_file_spec.rb b/chef/spec/unit/mixin/find_preferred_file_spec.rb index <HASH>..<HASH> 100644 --- a/chef/spec/unit/mixin/find_preferred_file_spec.rb +++ b/chef/spec/unit/mixin/find_preferred_file_spec.rb @@ -69,6 +69,17 @@ describe Chef::Mixin::FindPreferredFile do args = %w{no_cookbook_id no_filetype mods/deflate.conf.erb nohost.example.com noplatform noversion} @finder.find_preferred_file(*args).should == "/srv/chef/cookbooks/apache2/templates/default/mods/deflate.conf.erb" end + + it "finds the default file with brackets" do + file_name = "file-with-[brackets]" + expected_file_path = "/srv/chef/cookbooks/apache2/templates/default/#{file_name}" + hsh = default_file_hash.merge({ + expected_file_path => expected_file_path + }) + @finder.stub!(:load_cookbook_files).and_return(hsh) + args = %w{no_cookbook_id no_filetype} + [ file_name ] + %w{nohost.example.com noplatform noversion} + @finder.find_preferred_file(*args).should == expected_file_path + end it "prefers a platform specific file to the default" do @default_file_list << "/srv/chef/cookbooks/apache2/templates/ubuntu/mods/deflate.conf.erb"
[CHEF-<I>] New spec for - Filenames with brackets need regular expression escaping
diff --git a/mempool/reactor_test.go b/mempool/reactor_test.go index <HASH>..<HASH> 100644 --- a/mempool/reactor_test.go +++ b/mempool/reactor_test.go @@ -76,6 +76,11 @@ func TestReactorNoBroadcastToSender(t *testing.T) { } } }() + for _, r := range reactors { + for _, peer := range r.Switch.Peers().List() { + peer.Set(types.PeerStateKey, peerState{1}) + } + } const peerID = 1 checkTxs(t, reactors[0].mempool, numTxs, peerID)
mempool/reactor: fix reactor broadcast test (#<I>) found out this issue when trying to decouple mempool reactor with its underlying clist implementation. according to its comment, the test `TestReactorNoBroadcastToSender` is intended to make sure that a peer shouldn't send tx back to its origin. however, the current test forgot to init peer state key, thus the code will get stuck at waiting for peer to catch up state *instead of* skipping sending tx back: <URL>
diff --git a/src/Classifier.php b/src/Classifier.php index <HASH>..<HASH> 100644 --- a/src/Classifier.php +++ b/src/Classifier.php @@ -68,7 +68,13 @@ class Classifier throw new Exception("Classifier {$classifier} does not implement ".ClassifierContract::class.'.'); } - if ($c->satisfies($class)) { + // Wrap the `satisfies` method call in the `resuce` helper to + // catch possible thrown Exceptions + $satisfied = rescue(function() use ($c, $class) { + return $c->satisfies($class); + }, false); + + if ($satisfied) { return $c->getName(); } }
Wrap satisfies call within rescue helper
diff --git a/lib/arel/engines/sql/relations/table.rb b/lib/arel/engines/sql/relations/table.rb index <HASH>..<HASH> 100644 --- a/lib/arel/engines/sql/relations/table.rb +++ b/lib/arel/engines/sql/relations/table.rb @@ -20,10 +20,16 @@ module Arel if @engine.connection begin require "arel/engines/sql/compilers/#{@engine.adapter_name.downcase}_compiler" - @@tables ||= engine.tables rescue LoadError - raise "#{@engine.adapter_name} is not supported by Arel." + begin + # try to load an externally defined compiler, in case this adapter has defined the compiler on its own. + require "#{@engine.adapter_name.downcase}/arel_compiler" + rescue LoadError + raise "#{@engine.adapter_name} is not supported by Arel." + end end + + @@tables ||= engine.tables end end
Allow externally defined AR adapters to define their own compiler.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -21,6 +21,10 @@ ENCODING = "utf8" pkg_info = {} +def need_pytest(): + return set(["pytest", "test", "ptr"]).intersection(sys.argv) + + with open(os.path.join(MODULE_NAME, "__version__.py")) as f: exec(f.read(), pkg_info) @@ -33,8 +37,7 @@ with open(os.path.join(REQUIREMENT_DIR, "requirements.txt")) as f: with open(os.path.join(REQUIREMENT_DIR, "test_requirements.txt")) as f: tests_requires = [line.strip() for line in f if line.strip()] -needs_pytest = set(["pytest", "test", "ptr"]).intersection(sys.argv) -pytest_runner = ["pytest-runner"] if needs_pytest else [] +pytest_runner = ["pytest-runner"] if need_pytest() else [] setuptools.setup( name=MODULE_NAME,
Extract a function that gets pytest-runner requirement
diff --git a/Docs/WebFrontend/Geocode.js b/Docs/WebFrontend/Geocode.js index <HASH>..<HASH> 100644 --- a/Docs/WebFrontend/Geocode.js +++ b/Docs/WebFrontend/Geocode.js @@ -50,7 +50,7 @@ function geocodeAddress(tf){ freeform = document.getElementById('tfEndSearch').value; } - if(freeform.match(/^\s*[-+]?[0-9]*\.?[0-9]+\s*,\s*[-+]?[0-9]*\.?[0-9]+\s*$/)){ + if(freeform.match(/^\s*[-+]?[0-9]*\.?[0-9]+\s*[,;]\s*[-+]?[0-9]*\.?[0-9]+\s*$/)){ var marker; if(tf == 'start'){ @@ -61,7 +61,7 @@ function geocodeAddress(tf){ isEndPointSet = true; marker = 'end'; } - var coord = freeform.split(","); + var coord = freeform.split(/[,;]/); lonlat = new OpenLayers.LonLat(coord[1],coord[0]); setMarkerAndZoom(marker, lonlat); return;
support coordinates as start/end point: also accept semicolon as separator
diff --git a/lib/lifx/transport/tcp.rb b/lib/lifx/transport/tcp.rb index <HASH>..<HASH> 100644 --- a/lib/lifx/transport/tcp.rb +++ b/lib/lifx/transport/tcp.rb @@ -6,9 +6,6 @@ module LIFX def initialize(host, port) super connect - at_exit do - close - end end def connected?
Probably not the best method at this stage
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ except ImportError: long_description = 'A pedigree parser.' setup(name="ped_parser", - version="1.4", + version="1.5", description="A ped file parser.", author="Mans Magnusson", author_email="mans.magnusson@scilifelab.se",
Bumped version to <I>
diff --git a/src/main/java/sklearn/preprocessing/FunctionTransformer.java b/src/main/java/sklearn/preprocessing/FunctionTransformer.java index <HASH>..<HASH> 100644 --- a/src/main/java/sklearn/preprocessing/FunctionTransformer.java +++ b/src/main/java/sklearn/preprocessing/FunctionTransformer.java @@ -117,7 +117,9 @@ public class FunctionTransformer extends Transformer { case "cosh": case "expm1": case "hypot": - case "ln1p": + return PMMLUtil.createApply("x-" + name, fieldRef); + case "log1p": + return PMMLUtil.createApply("x-ln1p", fieldRef); case "rint": case "sin": case "sinh":
Fixed the name of a Numpy universal function. Fixes #<I>
diff --git a/lib/jazzy/sourcekitten.rb b/lib/jazzy/sourcekitten.rb index <HASH>..<HASH> 100644 --- a/lib/jazzy/sourcekitten.rb +++ b/lib/jazzy/sourcekitten.rb @@ -47,7 +47,6 @@ module Jazzy def self.run_sourcekitten(arguments) bin_path = Pathname(__FILE__).parent + 'sourcekitten/sourcekitten' command = "#{bin_path} #{(arguments).join(' ')}" - p command output = `#{command}` raise 'Running sourcekitten failed: ' + output unless $?.success? output
[SourceKitten] Don't print command
diff --git a/lxd/device/device_utils_network.go b/lxd/device/device_utils_network.go index <HASH>..<HASH> 100644 --- a/lxd/device/device_utils_network.go +++ b/lxd/device/device_utils_network.go @@ -1,8 +1,6 @@ package device import ( - "crypto/rand" - "encoding/hex" "fmt" "io/ioutil" "strconv" @@ -210,21 +208,6 @@ func networkRestorePhysicalNic(hostName string, volatile map[string]string) erro return nil } -// networkRandomDevName returns a random device name with prefix. -// If the random string combined with the prefix exceeds 13 characters then empty string is returned. -// This is to ensure we support buggy dhclient applications: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858580 -func networkRandomDevName(prefix string) string { - // Return a new random veth device name - randBytes := make([]byte, 4) - rand.Read(randBytes) - iface := prefix + hex.EncodeToString(randBytes) - if len(iface) > 13 { - return "" - } - - return iface -} - // networkCreateVethPair creates and configures a veth pair. It will set the hwaddr and mtu settings // in the supplied config to the newly created peer interface. If mtu is not specified, but parent // is supplied in config, then the MTU of the new peer interface will inherit the parent MTU.
lxd/device/device/utils/network: Removes networkRandomDevName Moving to network package.
diff --git a/conn.go b/conn.go index <HASH>..<HASH> 100644 --- a/conn.go +++ b/conn.go @@ -499,9 +499,7 @@ func (conn *Conn) sendReply(dest string, serial uint32, values ...interface{}) { // The caller has to make sure that ch is sufficiently buffered; if a message // arrives when a write to c is not possible, it is discarded. // -// Multiple of these channels can be registered at the same time. Passing a -// channel that already is registered will remove it from the list of the -// registered channels. +// Multiple of these channels can be registered at the same time. // // These channels are "overwritten" by Eavesdrop; i.e., if there currently is a // channel for eavesdropped messages, this channel receives all signals, and @@ -512,6 +510,17 @@ func (conn *Conn) Signal(ch chan<- *Signal) { conn.signalsLck.Unlock() } +// RemoveSignal removes the given channel from the list of the registered channels. +func (conn *Conn) RemoveSignal(ch chan<- *Signal) { + conn.signalsLck.Lock() + for i, c := range conn.signals { + if c == ch { + conn.signals = append(conn.signals[:i], conn.signals[i+1:]...) + } + } + conn.signalsLck.Unlock() +} + // SupportsUnixFDs returns whether the underlying transport supports passing of // unix file descriptors. If this is false, method calls containing unix file // descriptors will return an error and emitted signals containing them will
conn: add RemoveSignal method to *Conn this loops over all conn.signals and removes all that match the given signal. Possible fix for #<I>
diff --git a/project/library/CM/Action/Abstract.php b/project/library/CM/Action/Abstract.php index <HASH>..<HASH> 100644 --- a/project/library/CM/Action/Abstract.php +++ b/project/library/CM/Action/Abstract.php @@ -276,4 +276,30 @@ abstract class CM_Action_Abstract extends CM_Class_Abstract implements CM_ArrayC CM_Mysql::insert(TBL_CM_ACTION, array('verb', 'type', 'createStamp', 'count', 'interval'), $insert); } } + + /** + * @return string + * @throws CM_Exception_Invalid + */ + public function getVerbName() { + $actionVerbs = self::_getConfig()->verbs; + if (!array_key_exists($this->getVerb(), $actionVerbs)) { + throw new CM_Exception_Invalid('The specified Action does not exist!'); + } + return $actionVerbs[$this->getVerb()]; + } + + /** + * @return string + */ + public function getName() { + return str_replace($this->_getNamespace() . '_Action_', '', $this->_getClassName()); + } + + /** + * @return string + */ + public function getLabel() { + return $this->getName() . ' ' . $this->getVerbName(); + } }
t<I>: New methods for events naming
diff --git a/src/Feature.php b/src/Feature.php index <HASH>..<HASH> 100644 --- a/src/Feature.php +++ b/src/Feature.php @@ -1,6 +1,6 @@ <?php /** - * + * */ namespace Opensoft\Rollout; @@ -183,7 +183,7 @@ class Feature */ private function isUserInPercentage(RolloutUserInterface $user) { - return crc32($user->getRolloutIdentifier()) % 100 < $this->percentage; + return abs(crc32($user->getRolloutIdentifier()) % 100) < $this->percentage; } /** @@ -210,4 +210,4 @@ class Feature return false; } -} +}
[fix] fix for Feature::isUserInPercentage() method The CRC<I> % <I> returns negative numbers that are *always* lower than percentage.
diff --git a/Migrations/DatabaseMigrationRepository.php b/Migrations/DatabaseMigrationRepository.php index <HASH>..<HASH> 100755 --- a/Migrations/DatabaseMigrationRepository.php +++ b/Migrations/DatabaseMigrationRepository.php @@ -135,9 +135,7 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface { { $schema = $this->getConnection()->getSchemaBuilder(); - $prefix = $this->getConnection()->getTablePrefix(); - - return $schema->hasTable($prefix.$this->table); + return $schema->hasTable($this->table); } /**
Fix bug in migration table builder.
diff --git a/lib/rails-action-args/vm_args.rb b/lib/rails-action-args/vm_args.rb index <HASH>..<HASH> 100644 --- a/lib/rails-action-args/vm_args.rb +++ b/lib/rails-action-args/vm_args.rb @@ -1,7 +1,9 @@ begin require "methopara" -rescue - puts "make sure you have methora http://github.com/genki/methopara installed if you want to use action args on Ruby 1.9" +rescue LoadError + unless RUBY_VERSION >= "1.9.2" + puts "make sure you have methopara (http://github.com/genki/methopara) installed if you want to use action args with Ruby < 1.9.2" + end end module GetArgs
Make vm_args ruby <I> friendly Starting with <I>, we don't need methopara any more
diff --git a/library/src/main/java/com/github/sundeepk/compactcalendarview/CompactCalendarController.java b/library/src/main/java/com/github/sundeepk/compactcalendarview/CompactCalendarController.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/github/sundeepk/compactcalendarview/CompactCalendarController.java +++ b/library/src/main/java/com/github/sundeepk/compactcalendarview/CompactCalendarController.java @@ -203,10 +203,9 @@ class CompactCalendarController { List<CalendarDayEvent> uniqCalendarDayEvents = events.get(key); if(uniqCalendarDayEvents == null){ uniqCalendarDayEvents = new ArrayList<>(); - }else{ - if(!uniqCalendarDayEvents.contains(event)){ - uniqCalendarDayEvents.add(event); - } + } + if(!uniqCalendarDayEvents.contains(event)){ + uniqCalendarDayEvents.add(event); } events.put(key, uniqCalendarDayEvents); }
Fixed big where first event was not being added
diff --git a/warehouse/views.py b/warehouse/views.py index <HASH>..<HASH> 100644 --- a/warehouse/views.py +++ b/warehouse/views.py @@ -452,6 +452,9 @@ def session_notifications(request): renderer="includes/sidebar-sponsor-logo.html", uses_session=False, has_translations=False, + decorator=[ + cache_control(30), # 30 seconds + ], ) def sidebar_sponsor_logo(request): return {}
Add cache_control to sidebar logo (#<I>)
diff --git a/cmsplugin_cascade/bootstrap3/gallery.py b/cmsplugin_cascade/bootstrap3/gallery.py index <HASH>..<HASH> 100644 --- a/cmsplugin_cascade/bootstrap3/gallery.py +++ b/cmsplugin_cascade/bootstrap3/gallery.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals + from django.forms import widgets, ModelChoiceField, CharField from django.forms.models import ModelForm from django.db.models.fields.related import ManyToOneRel @@ -65,7 +66,7 @@ class GalleryPluginInline(StackedInline): model = InlineCascadeElement raw_id_fields = ('image_file',) form = GalleryImageForm - extra = 0 + extra = 1 class BootstrapGalleryPlugin(CascadePluginBase):
We need at least one extra Gallery Plugin
diff --git a/tests/TwigJs/Tests/FullIntegrationTest.php b/tests/TwigJs/Tests/FullIntegrationTest.php index <HASH>..<HASH> 100644 --- a/tests/TwigJs/Tests/FullIntegrationTest.php +++ b/tests/TwigJs/Tests/FullIntegrationTest.php @@ -86,7 +86,7 @@ class FullIntegrationTest extends PHPUnit_Framework_TestCase return $tests; } - private function loadTest($file) + public function loadTest($file) { $test = file_get_contents($file);
Fix another test suite fatal error to unblock the Travis build
diff --git a/serf/serf.go b/serf/serf.go index <HASH>..<HASH> 100644 --- a/serf/serf.go +++ b/serf/serf.go @@ -190,13 +190,18 @@ func (s *Serf) Leave() error { panic("Leave after Shutdown") } - s.memberLock.RLock() - defer s.memberLock.RUnlock() + // Construct the message for the graceful leave + msg := messageLeave{Node: s.config.NodeName} + + // Process the leave locally + s.handleNodeLeaveIntent(&msg) // If we have more than one member (more than ourself), then we need // to broadcast that we intend to gracefully leave. + s.memberLock.RLock() + defer s.memberLock.RUnlock() + if len(s.members) > 1 { - msg := messageLeave{Node: s.config.NodeName} notifyCh := make(chan struct{}) if err := s.broadcast(messageLeaveType, msg.Node, &msg, notifyCh); err != nil { return err
serf: process leave locally right away
diff --git a/openid/consumer/discover.py b/openid/consumer/discover.py index <HASH>..<HASH> 100644 --- a/openid/consumer/discover.py +++ b/openid/consumer/discover.py @@ -61,10 +61,14 @@ class OpenIDServiceEndpoint(object): return OPENID_1_0_MESSAGE_NS def supportsType(self, type_uri): - """Does this endpoint support this type?""" - return ((type_uri == OPENID_2_0_TYPE and - OPENID_IDP_2_0_TYPE in self.type_uris) or - self.usesExtension(type_uri)) + """Does this endpoint support this type? + + I consider C{/server} endpoints to implicitly support C{/signon}. + """ + return ( + (type_uri in self.type_uris) or + (type_uri == OPENID_2_0_TYPE and self.isOPIdentifier()) + ) def compatibilityMode(self): return self.preferredNamespace() != OPENID_2_0_MESSAGE_NS
[project @ consumer.discover.OpenIDServiceEndpoint.supportsType: clarification]