diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,8 @@ #!/usr/bin/env python # coding=utf-8 + +import codecs + from setuptools import setup classifiers = """ @@ -54,5 +57,5 @@ setup( classifiers=list(filter(None, classifiers.split('\n'))), description='Facilitates automated and reproducible experimental research', - long_description=open('README.rst').read() + long_description=codecs.open('README.rst', encoding='utf_8').read() )
Fix a bug where a unicode char in README.rst would fail install (#<I>)
diff --git a/core/codegen-runtime/src/main/java/org/overture/codegen/runtime/IO.java b/core/codegen-runtime/src/main/java/org/overture/codegen/runtime/IO.java index <HASH>..<HASH> 100644 --- a/core/codegen-runtime/src/main/java/org/overture/codegen/runtime/IO.java +++ b/core/codegen-runtime/src/main/java/org/overture/codegen/runtime/IO.java @@ -86,11 +86,11 @@ public class IO { } public boolean echo(String text) { - return fecho("", text, null); + return fecho("[]", text, null); } public boolean echo(VDMSeq text) { - return fecho("", SeqUtil.toStr(text), null); + return fecho("[]", SeqUtil.toStr(text), null); } public boolean fecho(String filename, String text, Number fdir) {
Minor fix to the Java codegen runtime represention of the echo operation
diff --git a/www/javascript/swat-checkbox-cell-renderer.js b/www/javascript/swat-checkbox-cell-renderer.js index <HASH>..<HASH> 100644 --- a/www/javascript/swat-checkbox-cell-renderer.js +++ b/www/javascript/swat-checkbox-cell-renderer.js @@ -33,12 +33,22 @@ function SwatCheckboxCellRenderer(id, view) YAHOO.util.Event.addListener(input_nodes[i], 'dblclick', this.handleClick, this, true); + + // prevent selecting label text when shify key is held + YAHOO.util.Event.addListener(input_nodes[i].parentNode, 'mousedown', + this.handleMouseDown, this, true); } } this.last_clicked_index = null; } +SwatCheckboxCellRenderer.prototype.handleMouseDown = function(e) +{ + // prevent selecting label text when shify key is held + YAHOO.util.Event.preventDefault(e); +} + SwatCheckboxCellRenderer.prototype.handleClick = function(e) { var checkbox_node = YAHOO.util.Event.getTarget(e);
Prevent bug that caused text to accidentally be selected when shift-clicking. svn commit r<I>
diff --git a/bigquery/tests/system.py b/bigquery/tests/system.py index <HASH>..<HASH> 100644 --- a/bigquery/tests/system.py +++ b/bigquery/tests/system.py @@ -107,6 +107,11 @@ TIME_PARTITIONING_CLUSTERING_FIELDS_SCHEMA = [ ), ] +# The VPC-SC team maintains a mirror of the GCS bucket used for code +# samples. The public bucket crosses the configured security boundary. +# See: https://github.com/googleapis/google-cloud-python/issues/8550 +SAMPLES_BUCKET = os.environ.get("GCLOUD_TEST_SAMPLES_BUCKET", "cloud-samples-data") + retry_storage_errors = RetryErrors( (TooManyRequests, InternalServerError, ServiceUnavailable) ) @@ -1877,7 +1882,9 @@ class TestBigQuery(unittest.TestCase): language="JAVASCRIPT", type_="SCALAR_FUNCTION", return_type=float64_type, - imported_libraries=["gs://cloud-samples-data/bigquery/udfs/max-value.js"], + imported_libraries=[ + "gs://{}/bigquery/udfs/max-value.js".format(SAMPLES_BUCKET) + ], ) routine.arguments = [ bigquery.RoutineArgument(
Use configurable bucket name for GCS samples data in systems tests. (#<I>) * Use configurable bucket name for GCS samples data in systems tests. This allows the VPC-SC team to use their private mirror which is within the security boundary when testing BigQuery VPC-SC support. * Blacken
diff --git a/src/com/google/bitcoin/core/VersionMessage.java b/src/com/google/bitcoin/core/VersionMessage.java index <HASH>..<HASH> 100644 --- a/src/com/google/bitcoin/core/VersionMessage.java +++ b/src/com/google/bitcoin/core/VersionMessage.java @@ -75,10 +75,13 @@ public class VersionMessage extends Message { // Note that the official client doesn't do anything with these, and finding out your own external IP address // is kind of tricky anyway, so we just put nonsense here for now. try { - myAddr = new PeerAddress(InetAddress.getLocalHost(), params.port, 0); - theirAddr = new PeerAddress(InetAddress.getLocalHost(), params.port, 0); + // We hard-code the IPv4 localhost address here rather than use InetAddress.getLocalHost() because some + // mobile phones have broken localhost DNS entries, also, this is faster. + final byte[] localhost = new byte[] { 127, 0, 0, 1 }; + myAddr = new PeerAddress(InetAddress.getByAddress(localhost), params.port, 0); + theirAddr = new PeerAddress(InetAddress.getByAddress(localhost), params.port, 0); } catch (UnknownHostException e) { - throw new RuntimeException(e); // Cannot happen. + throw new RuntimeException(e); // Cannot happen (illegal IP length). } subVer = "/BitCoinJ:0.4-SNAPSHOT/"; bestHeight = newBestHeight;
Create the localhost address without relying on a method that does DNS lookups behind the scenes. Resolves issue <I>.
diff --git a/src/components/Tile/Tile.js b/src/components/Tile/Tile.js index <HASH>..<HASH> 100644 --- a/src/components/Tile/Tile.js +++ b/src/components/Tile/Tile.js @@ -154,15 +154,14 @@ export class SelectableTile extends Component { ); return ( - // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/onclick-has-role + // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions <label htmlFor={id} className={classes} tabIndex={tabIndex} {...other} onClick={this.handleClick} - onKeyDown={this.handleKeyDown} - role="presentation"> + onKeyDown={this.handleKeyDown}> <input ref={input => { this.input = input;
fix(a<I>y): remove role from label (#<I>)
diff --git a/hitch.go b/hitch.go index <HASH>..<HASH> 100644 --- a/hitch.go +++ b/hitch.go @@ -101,8 +101,7 @@ const paramsKey key = 1 func wrap(handler http.Handler) httprouter.Handle { return func(w http.ResponseWriter, req *http.Request, params httprouter.Params) { ctx := context.WithValue(req.Context(), paramsKey, params) - *req = *req.WithContext(ctx) - handler.ServeHTTP(w, req) + handler.ServeHTTP(w, req.WithContext(ctx)) } }
fixed to not dereference a request
diff --git a/server/webapp/WEB-INF/rails.new/spec/webpack/lib/plugin_endpoint_spec.js b/server/webapp/WEB-INF/rails.new/spec/webpack/lib/plugin_endpoint_spec.js index <HASH>..<HASH> 100644 --- a/server/webapp/WEB-INF/rails.new/spec/webpack/lib/plugin_endpoint_spec.js +++ b/server/webapp/WEB-INF/rails.new/spec/webpack/lib/plugin_endpoint_spec.js @@ -39,9 +39,11 @@ } }; - window.postMessage = function(message, _origin) { - dispatch(mockEvent(message)); - }; + Object.defineProperty(window, "postMessage", { + value: function(message, _origin) { + dispatch(mockEvent(message)); + } + }); PluginEndpoint.ensure(); });
Fix plugin_endpoint_spec in IE strict mode
diff --git a/tests/src/test/java/org/sonarqube/tests/performance/scanner/HighlightingTest.java b/tests/src/test/java/org/sonarqube/tests/performance/scanner/HighlightingTest.java index <HASH>..<HASH> 100644 --- a/tests/src/test/java/org/sonarqube/tests/performance/scanner/HighlightingTest.java +++ b/tests/src/test/java/org/sonarqube/tests/performance/scanner/HighlightingTest.java @@ -100,7 +100,7 @@ public class HighlightingTest extends AbstractPerfTest { perfRule.assertDurationAround(MavenLogs.extractTotalTime(result.getLogs()), 25700L); Properties prof = readProfiling(baseDir, "highlighting"); - perfRule.assertDurationAround(Long.valueOf(prof.getProperty("Xoo Highlighting Sensor")), 9700L); + perfRule.assertDurationAround(Long.valueOf(prof.getProperty("Xoo Highlighting Sensor")), 8900L); } }
Fix excepted time of perf test
diff --git a/openstack_dashboard/dashboards/project/stacks/forms.py b/openstack_dashboard/dashboards/project/stacks/forms.py index <HASH>..<HASH> 100644 --- a/openstack_dashboard/dashboards/project/stacks/forms.py +++ b/openstack_dashboard/dashboards/project/stacks/forms.py @@ -295,8 +295,8 @@ class CreateStackForm(forms.SelfHandlingForm): if param in params: params_in_order.append((param, params[param])) else: - # no parameter groups, so no way to determine order - params_in_order = params.items() + # no parameter groups, simply sorted to make the order fixed + params_in_order = sorted(params.items()) for param_key, param in params_in_order: field = None field_key = self.param_prefix + param_key
Make params order fixed in stack forms Horizon input fields may be swapped when launching stack instances with some errors. The patch make params order fixed by simply sort them. Change-Id: Ied3e<I>cfa<I>a<I>bde<I>ddc<I>ff3c<I>b3cac3 Closes-Bug: #<I>
diff --git a/java/src/com/swiftnav/sbp/SBPMessage.java b/java/src/com/swiftnav/sbp/SBPMessage.java index <HASH>..<HASH> 100644 --- a/java/src/com/swiftnav/sbp/SBPMessage.java +++ b/java/src/com/swiftnav/sbp/SBPMessage.java @@ -18,6 +18,7 @@ import java.lang.reflect.Array; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; +import java.util.Arrays; import java.util.LinkedList; /** Superclass of all SBP messages. */ @@ -188,9 +189,7 @@ public class SBPMessage { } private byte[] getPayload() { - byte[] payload = new byte[buf.position()]; - buf.get(payload, 0, buf.position()); - return payload; + return Arrays.copyOf(buf.array(), buf.position()); } public void putU8(int x) {
java: Fix rebuilding payload from expanded message classes.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -50,9 +50,6 @@ setup( 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.0', - 'Programming Language :: Python :: 3.1', - 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5',
Also update Python versions in setup.py
diff --git a/test/createLogicMiddleware-latest.spec.js b/test/createLogicMiddleware-latest.spec.js index <HASH>..<HASH> 100644 --- a/test/createLogicMiddleware-latest.spec.js +++ b/test/createLogicMiddleware-latest.spec.js @@ -345,7 +345,7 @@ describe('createLogicMiddleware-latest', () => { ...action, type: 'BAR' }); - }, 20); + }, 100); // needs to be delayed so we can check next calls } }); mw = createLogicMiddleware([logicA]);
improve sporadic test due to timing issues
diff --git a/ropetest/reprtest.py b/ropetest/reprtest.py index <HASH>..<HASH> 100644 --- a/ropetest/reprtest.py +++ b/ropetest/reprtest.py @@ -1,8 +1,9 @@ +import pathlib import tempfile import pytest -from rope.base import libutils, resources, pyobjectsdef, pynames +from rope.base import libutils, resources, pyobjectsdef from rope.base.project import Project from ropetest import testutils @@ -27,6 +28,7 @@ def mod1(project): def test_repr_project(): with tempfile.TemporaryDirectory() as folder: + folder = pathlib.Path(folder).resolve() obj = testutils.sample_project(folder) assert isinstance(obj, Project) assert repr(obj) == f'<rope.base.project.Project "{folder}">'
resolve() path name Fixes temporary folder name issue in MacOS
diff --git a/lib/coursecatlib.php b/lib/coursecatlib.php index <HASH>..<HASH> 100644 --- a/lib/coursecatlib.php +++ b/lib/coursecatlib.php @@ -596,6 +596,9 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate { } else { // parent not found. This is data consistency error but next fix_course_sortorder() should fix it $all[0][] = $record->id; + if (!$record->visible) { + $all['0i'][] = $record->id; + } } $count++; }
MDL-<I> Bug fix for orphaned invisible categories thanks to L.Sanocki
diff --git a/src/EditorconfigChecker/Validation/FinalNewlineValidator.php b/src/EditorconfigChecker/Validation/FinalNewlineValidator.php index <HASH>..<HASH> 100644 --- a/src/EditorconfigChecker/Validation/FinalNewlineValidator.php +++ b/src/EditorconfigChecker/Validation/FinalNewlineValidator.php @@ -44,7 +44,7 @@ class FinalNewlineValidator if ($error) { Logger::getInstance()->addError('Missing final newline', $filename); - $eolChar = $rules['end_of_line'] == 'lf' ? "\n" : $rules['end_of_line'] == 'cr' ? "\r" : "\r\n"; + $eolChar = $rules['end_of_line'] == 'lf' ? "\n" : ($rules['end_of_line'] == 'cr' ? "\r" : "\r\n"); if (FinalNewlineFix::insert($filename, $eolChar)) { Logger::getInstance()->errorFixed(); }
BUGFIX: Put paranthesis around nested terneray operator
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -304,7 +304,6 @@ install_requires = [ 'pylint', 'psutil', 'qtawesome', - 'path.py', 'pickleshare' ]
Setuo.py: Remove path.py from our list of deps
diff --git a/Test/Unit/DrupalCodeBuilderAssertionsTest.php b/Test/Unit/DrupalCodeBuilderAssertionsTest.php index <HASH>..<HASH> 100644 --- a/Test/Unit/DrupalCodeBuilderAssertionsTest.php +++ b/Test/Unit/DrupalCodeBuilderAssertionsTest.php @@ -12,6 +12,13 @@ use PHPUnit\Framework\ExpectationFailedException; class DrupalCodeBuilderAssertionsTest extends TestBase { /** + * {@inheritdoc} + */ + protected function setupDrupalCodeBuilder($version) { + // Do nothing; we don't need to set up DCB. + } + + /** * Tests the assertNoTrailingWhitespace() assertion. * * @dataProvider providerAssertNoTrailingWhitespace
Fixed assertions test setting up a DCB environment without a Drupal core version.
diff --git a/pymc3/step_methods/gibbs.py b/pymc3/step_methods/gibbs.py index <HASH>..<HASH> 100644 --- a/pymc3/step_methods/gibbs.py +++ b/pymc3/step_methods/gibbs.py @@ -19,6 +19,9 @@ Created on May 12, 2012 """ from warnings import warn +import aesara.tensor as aet + +from aesara.graph.basic import graph_inputs from numpy import arange, array, cumsum, empty, exp, max, nested_iters, searchsorted from numpy.random import uniform @@ -78,7 +81,7 @@ def elemwise_logp(model, var): v_logp = logpt(v) if var in graph_inputs([v_logp]): terms.append(v_logp) - return model.fn(add(*terms)) + return model.fn(aet.add(*terms)) def categorical(prob, shape):
Add missing imports to pymc3.step_methods.gibbs
diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -34,7 +34,7 @@ describe('migrator', function() { fakeHexo.call('migrate', { _: ['rss', 'https://github.com/danmactough/node-feedparser/raw/master/test/feeds/rss2sample.xml'] }, function(err) { if (err) throw err; - fakeHexo.setValues.receivedPosts.length.should.be.gt(0); + fakeHexo.setValues.receivedPosts.length.should.eql(0); should.not.exist(fakeHexo.setValues.receivedPosts[0].alias); done(); }); @@ -46,7 +46,7 @@ describe('migrator', function() { fakeHexo.call('migrate', { _: ['rss', 'https://github.com/danmactough/node-feedparser/raw/master/test/feeds/rss2sample.xml'], alias: true }, function(err) { if (err) throw err; - fakeHexo.setValues.receivedPosts.length.should.be.gt(0); + fakeHexo.setValues.receivedPosts.length.should.eql(0); should.exist(fakeHexo.setValues.receivedPosts[0].alias, 'alias missing'); done(); });
refactor: use should.eql
diff --git a/File/src/MarkdownFile.php b/File/src/MarkdownFile.php index <HASH>..<HASH> 100644 --- a/File/src/MarkdownFile.php +++ b/File/src/MarkdownFile.php @@ -127,18 +127,20 @@ class MarkdownFile extends File $content['header'] = array(); $content['frontmatter'] = array(); + $frontmatter_regex = "/^---\n(.+?)\n---(\n\n|$)/uim"; + // Normalize line endings to Unix style. $var = preg_replace("/(\r\n|\r)/", "\n", $var); // Parse header. - preg_match("/---\n(.+?)\n---(\n\n|$)/uism", $var, $m); - if (isset($m[1])) { + preg_match($frontmatter_regex, $var, $m); + if (isset($m[1]) && (isset($m[2]) && $m[2]!="")) { $content['frontmatter'] = preg_replace("/\n\t/", "\n ", $m[1]); $content['header'] = YamlParser::parse($content['frontmatter']); } // Strip header to get content. - $content['markdown'] = trim(preg_replace("/---\n(.+?)\n---(\n\n|$)/uism", '', $var)); + $content['markdown'] = trim(preg_replace($frontmatter_regex, '', $var, 1)); return $content; }
Better isolation of YAML front matter
diff --git a/stats.js b/stats.js index <HASH>..<HASH> 100644 --- a/stats.js +++ b/stats.js @@ -70,8 +70,6 @@ var conf; // Flush metrics to each backend. function flushMetrics() { - setTimeout(flushMetrics, getFlushTimeout(flushInterval)); - var time_stamp = Math.round(new Date().getTime() / 1000); if (old_timestamp > 0) { gauges[timestamp_lag_namespace] = (time_stamp - old_timestamp - (Number(conf.flushInterval)/1000)); @@ -141,7 +139,7 @@ function flushMetrics() { } } - // normally gauges are not reset. so if we don't delete them, continue to persist previous value + // Normally gauges are not reset. so if we don't delete them, continue to persist previous value conf.deleteGauges = conf.deleteGauges || false; if (conf.deleteGauges) { for (var gauge_key in metrics.gauges) { @@ -154,6 +152,10 @@ function flushMetrics() { backendEvents.emit('flush', time_stamp, metrics); }); + // Performing this setTimeout at the end of this method rather than the beginning + // helps ensure we adapt to negative clock skew by letting the method's latency + // introduce a short delay that should more than compensate. + setTimeout(flushMetrics, getFlushTimeout(flushInterval)); } var stats = {
Account for negative clock skew in flushMetrics
diff --git a/docs/storage/driver/oss/oss.go b/docs/storage/driver/oss/oss.go index <HASH>..<HASH> 100644 --- a/docs/storage/driver/oss/oss.go +++ b/docs/storage/driver/oss/oss.go @@ -754,7 +754,7 @@ func (d *driver) ossPath(path string) string { } func parseError(path string, err error) error { - if ossErr, ok := err.(*oss.Error); ok && ossErr.Code == "NoSuchKey" { + if ossErr, ok := err.(*oss.Error); ok && ossErr.StatusCode == 404 && (ossErr.Code == "NoSuchKey" || ossErr.Code == "") { return storagedriver.PathNotFoundError{Path: path} }
In HEAD request for missing resource, only <I> NOT FOUND is returned Change-Id: I<I>caf<I>b<I>e6f4f<I>f7d<I>f5d4fd4ad9affcd
diff --git a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/TypeConvertingCompiler.java b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/TypeConvertingCompiler.java index <HASH>..<HASH> 100644 --- a/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/TypeConvertingCompiler.java +++ b/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/compiler/TypeConvertingCompiler.java @@ -91,6 +91,17 @@ public class TypeConvertingCompiler extends AbstractXbaseCompiler { }); return; } + } else { + JvmTypeReference actualType = getType(obj); + if (obj instanceof XAbstractFeatureCall && mustInsertTypeCast(obj, actualType)){ + doCastConversion(actualType, appendable, obj, new Later() { + public void exec(ITreeAppendable appendable) { + appendable = appendable.trace(obj, true); + internalToConvertedExpression(obj, appendable); + } + }); + return; + } } final ITreeAppendable trace = appendable.trace(obj, true); internalToConvertedExpression(obj, trace);
[xbase][compiler] Fixed another regression in the compiler
diff --git a/cli50/__main__.py b/cli50/__main__.py index <HASH>..<HASH> 100644 --- a/cli50/__main__.py +++ b/cli50/__main__.py @@ -166,7 +166,7 @@ def main(): pull(IMAGE, args["tag"]) # Options - workdir = "/home/ubuntu/workspace" + workdir = "/mnt" options = ["--detach", "--interactive", "--label", LABEL, diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,6 @@ setup( "console_scripts": ["cli50=cli50.__main__:main"] }, url="https://github.com/cs50/cli50", - version="5.0.1", + version="5.1.0", include_package_data=True )
mounting at /mnt again instead of /home/ubuntu/workspace
diff --git a/cruddy/lambdaclient.py b/cruddy/lambdaclient.py index <HASH>..<HASH> 100644 --- a/cruddy/lambdaclient.py +++ b/cruddy/lambdaclient.py @@ -17,7 +17,7 @@ import json import boto3 import botocore.exceptions -from response import CRUDResponse +from cruddy.response import CRUDResponse LOG = logging.getLogger(__name__)
Add more specific import in lambdaclient to allow both command line and lambda function to work
diff --git a/lib/molecule.js b/lib/molecule.js index <HASH>..<HASH> 100644 --- a/lib/molecule.js +++ b/lib/molecule.js @@ -37,10 +37,12 @@ module.exports = function (inchi) { @param {Number} from Source atom @param {Number} to Target atom */ - Molecule.prototype.addBond = function (from, to) { + Molecule.prototype.addBond = function (from, to, order) { var self = this; - self.bonds.push({from: from, to: to}); + order = order || 1; + + self.bonds.push({from: from, to: to, order: order}); }; /** @@ -53,18 +55,9 @@ module.exports = function (inchi) { */ Molecule.prototype.getInchi = function (callback) { var self = this, - mol = { - atom: [] - }; - - self.atoms.forEach(function (atom) { - mol.atom.push({ - elname: atom, - neighbor: [] - }); - }); + mol = new inchilib.Molecule(this); - inchilib.GetINCHI(mol, function (err, result) { + mol.GetInChI(function (err, result) { callback(err, result.inchi); }); };
molecule: delegate prep, calculation to addon
diff --git a/Bundle/CriteriaBundle/DataSource/RequestDataSource.php b/Bundle/CriteriaBundle/DataSource/RequestDataSource.php index <HASH>..<HASH> 100644 --- a/Bundle/CriteriaBundle/DataSource/RequestDataSource.php +++ b/Bundle/CriteriaBundle/DataSource/RequestDataSource.php @@ -40,7 +40,11 @@ class RequestDataSource return [ 'type' => ChoiceType::class, 'options' => [ - 'choices' => $this->availableLocales, + 'choices' => $this->availableLocales, + 'choices_as_values' => true, + 'choice_label' => function ($value) { + return $value; + }, ], ]; }
bugfix/local-criteria (#<I>) Add choice as value to prevent criteria choice field to give int instead of local
diff --git a/src/Control/InitialisationMiddleware.php b/src/Control/InitialisationMiddleware.php index <HASH>..<HASH> 100644 --- a/src/Control/InitialisationMiddleware.php +++ b/src/Control/InitialisationMiddleware.php @@ -61,7 +61,7 @@ class InitialisationMiddleware implements HTTPMiddleware * environment: dev * --- * CWP\Core\Control\InitialisationMiddleware: - * strict_transport_security: 'max-age: 300' + * strict_transport_security: 'max-age=300' * SilverStripe\Core\Injector\Injector: * SilverStripe\Control\Middleware\CanonicalURLMiddleware: * properties:
BUG max-age syntax in comments is incorrect The syntax for the HSTS related 'max-age' is incorrect, see <URL>
diff --git a/Classes/Core/Functional/FunctionalTestCase.php b/Classes/Core/Functional/FunctionalTestCase.php index <HASH>..<HASH> 100644 --- a/Classes/Core/Functional/FunctionalTestCase.php +++ b/Classes/Core/Functional/FunctionalTestCase.php @@ -987,11 +987,21 @@ abstract class FunctionalTestCase extends BaseTestCase $uriString = (string)$uri; $uri = new Uri($uriString); + // build minimal serverParams for normalizedparamsAttribute initialzation + $serverParams = [ + 'SCRIPT_NAME' => $_SERVER['SCRIPT_NAME'], + 'HTTP_HOST' => $_SERVER['HTTP_HOST'], + 'SERVER_NAME' => $_SERVER['SERVER_NAME'], + 'HTTPS' => $uri->getScheme() === 'https' ? 'on' : 'off', + 'REMOTE_ADDR' => '127.0.0.1', + ]; + $serverRequest = new ServerRequest( $uri, $request->getMethod(), 'php://input', - $request->getHeaders() + $request->getHeaders(), + $serverParams ); $requestUrlParts = []; parse_str($uri->getQuery(), $requestUrlParts);
[BUGFIX] Provide minimal serverParams for Frontend functional subrequest (#<I>) Provide minimal serverParams array for core <I> compatible frontend subrequest, so the normalized param attributes are set through corresponding frontend middleware, which is needed for some functional tests, ex. PageTypeSuffixDecorator tests.
diff --git a/js/core/I18n.js b/js/core/I18n.js index <HASH>..<HASH> 100644 --- a/js/core/I18n.js +++ b/js/core/I18n.js @@ -1,7 +1,7 @@ define(["require", "js/core/Component", "underscore"], function (require, Component, _) { return Component.inherit("js.core.I18n", { defaults: { - path: 'app/locale', + path: 'ivo/locale', locale: null, suffix: '.json', translations: {} @@ -26,9 +26,6 @@ define(["require", "js/core/Component", "underscore"], function (require, Compon } var self = this; -// if(callback){ -// callback(); -// } require(['json!' + this.$.path + '/' + this.$.locale], function (translations) { self.set({ translations: translations @@ -46,7 +43,7 @@ define(["require", "js/core/Component", "underscore"], function (require, Compon * @param - replacement for %0 * @param - replacement for %1 ... */ - translate: function () { + t: function () { var args = Array.prototype.slice.call(arguments); var key = args.shift(), isPlural;
renamed translate to t
diff --git a/provision/docker/docker.go b/provision/docker/docker.go index <HASH>..<HASH> 100644 --- a/provision/docker/docker.go +++ b/provision/docker/docker.go @@ -93,8 +93,8 @@ func dockerCluster() *cluster.Cluster { nodes = getDockerServers() dCluster, _ = cluster.New(nil, clusterStorage, nodes...) } - autoHealing, _ := config.GetBool("docker:healing:heal-nodes") - if autoHealing { + autoHealingNodes, _ := config.GetBool("docker:healing:heal-nodes") + if autoHealingNodes { disabledSeconds, _ := config.GetDuration("docker:healing:disabled-time") if disabledSeconds <= 0 { disabledSeconds = 30 @@ -115,6 +115,10 @@ func dockerCluster() *cluster.Cluster { } dCluster.SetHealer(&healer) } + healNodesTimeout, _ := config.GetDuration("docker:healing:heal-containers-timeout") + if healNodesTimeout > 0 { + go runContainerHealer(healNodesTimeout) + } activeMonitoring, _ := config.GetDuration("docker:healing:active-monitoring-interval") if activeMonitoring > 0 { dCluster.StartActiveMonitoring(activeMonitoring * time.Second)
provision/docker: activate containers healing if config is set
diff --git a/lib/backup/cli.rb b/lib/backup/cli.rb index <HASH>..<HASH> 100644 --- a/lib/backup/cli.rb +++ b/lib/backup/cli.rb @@ -8,6 +8,10 @@ module Backup # through a ruby method. This helps with test coverage and # improves readability. # + # It'll first remove all prefixing slashes ( / ) by using .gsub(/^\s+/, '') + # This allows for the EOS blocks to be indented without actually using any + # prefixing spaces. This cleans up the implementation code. + # # Every time the Backup::CLI#run method is invoked, it'll invoke # the Backup::CLI#raise_if_command_not_found method after running the # requested command on the OS. @@ -17,6 +21,7 @@ module Backup # name (e.g. mongodump, pgdump, etc) from a command like "/usr/local/bin/mongodump <options>" # and pass that in to the Backup::CLI#raise_if_command_not_found def run(command) + command.gsub!(/^\s+/, '') %x[#{command}] raise_if_command_not_found!( command.slice(0, command.index(/\s/)).split('/')[-1]
Added a feature to the CLI module that'll first trim each line of the provided (single, or multi-line command) by removing all prefixing whitespace.
diff --git a/vendor/imports_test.go b/vendor/imports_test.go index <HASH>..<HASH> 100644 --- a/vendor/imports_test.go +++ b/vendor/imports_test.go @@ -135,9 +135,10 @@ func TestParseMetadata(t *testing.T) { importpath: "gopkg.in/mgo.v2", vcs: "git", reporoot: "https://gopkg.in/mgo.v2", - }, { - path: "speter.net/go/exp", - err: fmt.Errorf("go-import metadata not found"), +// disabled: certificate has expired +// }, { +// path: "speter.net/go/exp", +// err: fmt.Errorf("go-import metadata not found"), }} for _, tt := range tests {
fix failing test due to cert timeout
diff --git a/parseany.go b/parseany.go index <HASH>..<HASH> 100644 --- a/parseany.go +++ b/parseany.go @@ -40,11 +40,17 @@ func ParseAny(datestr string) (time.Time, error) { state := ST_START + // General strategy is to read rune by rune through the date looking for + // certain hints of what type of date we are dealing with. + // Hopefully we only need to read about 5 or 6 bytes before + // we figure it out and then attempt a parse iterRunes: for i := 0; i < len(datestr); i++ { - r, _ := utf8.DecodeRuneInString(datestr[i:]) + r, bytesConsumed := utf8.DecodeRuneInString(datestr[i:]) + if bytesConsumed > 1 { + i += (bytesConsumed - 1) + } - //u.Infof("r=%s st=%d ", string(r), state) switch state { case ST_START: if unicode.IsDigit(r) {
doc some notes, and fix utf multi byte reads
diff --git a/parsl/dataflow/strategy.py b/parsl/dataflow/strategy.py index <HASH>..<HASH> 100644 --- a/parsl/dataflow/strategy.py +++ b/parsl/dataflow/strategy.py @@ -189,8 +189,8 @@ class Strategy(object): nodes_per_block = executor.provider.nodes_per_block parallelism = executor.provider.parallelism - running = sum([1 for x in status if x.state == JobState.RUNNING]) - pending = sum([1 for x in status if x.state == JobState.PENDING]) + running = sum([1 for x in status.values() if x.state == JobState.RUNNING]) + pending = sum([1 for x in status.values() if x.state == JobState.PENDING]) active_blocks = running + pending active_slots = active_blocks * tasks_per_node * nodes_per_block
status is a Dict[Any, JobStatus] as opposed to a List[JobStatus], so we need .values() there. (#<I>)
diff --git a/gglsbl/storage.py b/gglsbl/storage.py index <HASH>..<HASH> 100644 --- a/gglsbl/storage.py +++ b/gglsbl/storage.py @@ -89,7 +89,7 @@ class SqliteStorage(StorageBase): list_name character varying(127) NOT NULL, downloaded_at timestamp DEFAULT current_timestamp, expires_at timestamp without time zone NOT NULL, - PRIMARY KEY (value) + PRIMARY KEY (value, list_name) )""" )
Adds list_name to primary key Fixes issue with URLs on multiple lists
diff --git a/volapi/volapi.py b/volapi/volapi.py index <HASH>..<HASH> 100644 --- a/volapi/volapi.py +++ b/volapi/volapi.py @@ -538,7 +538,10 @@ class Room: # pylint: disable=too-many-branches # pylint: disable=too-many-statements for item in data[1:]: - data_type = item[0][1][0] + try: + data_type = item[0][1][0] + except IndexError: + data_type = None try: data = item[0][1][1] except ValueError:
¯\_(ツ)_/¯
diff --git a/lib/common/errors.js b/lib/common/errors.js index <HASH>..<HASH> 100644 --- a/lib/common/errors.js +++ b/lib/common/errors.js @@ -10,4 +10,5 @@ exports.MethodError = responseClass.MethodError exports.NotAcceptableError = responseClass.NotAcceptableError exports.ConflictError = responseClass.ConflictError exports.UnsupportedError = responseClass.UnsupportedError +exports.UnprocessableError = responseClass.UnprocessableError exports.nativeErrors = responseClass.nativeErrors diff --git a/lib/common/response_classes.js b/lib/common/response_classes.js index <HASH>..<HASH> 100644 --- a/lib/common/response_classes.js +++ b/lib/common/response_classes.js @@ -19,6 +19,7 @@ exports.MethodError = errorClass('MethodError') exports.NotAcceptableError = errorClass('NotAcceptableError') exports.ConflictError = errorClass('ConflictError') exports.UnsupportedError = errorClass('UnsupportedError') +exports.UnprocessableError = errorClass('UnprocessableError') // White-list native error types. The list is gathered from here:
adds UnprocessableError class to allow for correct <I> errors inline with JsonApi Spec as used by Ember Js. [Documentation](<URL>)
diff --git a/richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphText.java b/richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphText.java index <HASH>..<HASH> 100644 --- a/richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphText.java +++ b/richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphText.java @@ -144,10 +144,18 @@ class ParagraphText<S> extends TextFlow { } Optional<HitInfo> hit(double x, double y) { - HitInfo hit = textLayout().getHitInfo((float)x, (float)y); - - if(hit.getCharIndex() == paragraph.length()) { // clicked beyond the end of line - return Optional.empty(); + TextLayout textLayout = textLayout(); + HitInfo hit = textLayout.getHitInfo((float)x, (float)y); + + if(hit.getCharIndex() == paragraph.length() - 1) { + // might be a hit beyond the end of line, investigate + PathElement[] elems = textLayout.getCaretShape(paragraph.length(), true, 0, 0); + Path caret = new Path(elems); + if(x > caret.getBoundsInLocal().getMinX()) { + return Optional.empty(); + } else { + return Optional.of(hit); + } } else { return Optional.of(hit); }
Correctly detect hit beyond the end of paragraph's text.
diff --git a/sos/report/plugins/processor.py b/sos/report/plugins/processor.py index <HASH>..<HASH> 100644 --- a/sos/report/plugins/processor.py +++ b/sos/report/plugins/processor.py @@ -7,6 +7,7 @@ # See the LICENSE file in the source distribution for further information. from sos.report.plugins import Plugin, IndependentPlugin +import os class Processor(Plugin, IndependentPlugin): @@ -34,7 +35,13 @@ class Processor(Plugin, IndependentPlugin): self.add_copy_spec([ "/proc/cpuinfo", "/sys/class/cpuid", - "/sys/devices/system/cpu" + ]) + # copy /sys/devices/system/cpu/cpuX with separately applied sizelimit + # this is required for systems with tens/hundreds of CPUs where the + # cumulative directory size exceeds 25MB or even 100MB. + cdirs = self.listdir('/sys/devices/system/cpu') + self.add_copy_spec([ + os.path.join('/sys/devices/system/cpu', cdir) for cdir in cdirs ]) self.add_cmd_output([
[processor] Apply sizelimit to /sys/devices/system/cpu/cpuX Copy /sys/devices/system/cpu/cpuX with separately applied sizelimit. This is required for systems with tens/hundreds of CPUs where the cumulative directory size exceeds <I>MB or even <I>MB. Resolves: #<I> Closes: #<I>
diff --git a/rightscale/util.py b/rightscale/util.py index <HASH>..<HASH> 100644 --- a/rightscale/util.py +++ b/rightscale/util.py @@ -57,9 +57,15 @@ def find_href(obj, rel): return l['href'] -def find_by_name(res, name): +def find_by_name(collection, name): + """ + :param rightscale.ResourceCollection collection: The collection in which to + look for :attr:`name`. + + :param str name: The name to look for in collection. + """ params = {'filter[]': ['name==%s' % name]} - found = res.index(params=params) + found = collection.index(params=params) if len(found) > 1: raise ValueError("Found too many matches for %s" % name) return found[0]
Document find_by_name so I remember what to do with it.
diff --git a/config/misc.php b/config/misc.php index <HASH>..<HASH> 100644 --- a/config/misc.php +++ b/config/misc.php @@ -10,6 +10,6 @@ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -define('CMS_CORE_VERSION', '1.2.0'); +define('CMS_CORE_VERSION', '1.3.0'); ?> \ No newline at end of file
This is becoming <I>.
diff --git a/src/sos/_version.py b/src/sos/_version.py index <HASH>..<HASH> 100644 --- a/src/sos/_version.py +++ b/src/sos/_version.py @@ -34,7 +34,7 @@ if _py_ver.major == 2 or (_py_ver.major == 3 and (_py_ver.minor, _py_ver.micro) # version of the SoS language __sos_version__ = '1.0' # version of the sos command -__version__ = '0.9.12.2' +__version__ = '0.9.12.3' __py_version__ = '{}.{}.{}'.format(_py_ver.major, _py_ver.minor, _py_ver.micro) #
Release <I> for lockfile related issues
diff --git a/test/modules/json/json-render.spec.js b/test/modules/json/json-render.spec.js index <HASH>..<HASH> 100644 --- a/test/modules/json/json-render.spec.js +++ b/test/modules/json/json-render.spec.js @@ -5,6 +5,7 @@ import configuration from './json-configuration-for-deck'; import JSON_DATA from './data/deck-props.json'; test('JSONConverter#render', t => { + const {gl} = require('@deck.gl/test-utils'); const jsonConverter = new JSONConverter({configuration}); t.ok(jsonConverter, 'JSONConverter created'); @@ -14,6 +15,7 @@ test('JSONConverter#render', t => { const jsonDeck = new Deck( Object.assign( { + gl, onAfterRender: () => { t.ok(jsonDeck, 'JSONConverter rendered'); jsonDeck.finalize();
Tests: use polyfilled gl for JSONConverter tests (#<I>)
diff --git a/lib/http.js b/lib/http.js index <HASH>..<HASH> 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1,3 +1,7 @@ +var util = require('util'); +var EventEmitter = require('events').EventEmitter; + + var ServerResponse = function() { var headSent = false; var bodySent = false; @@ -38,10 +42,14 @@ var ServerResponse = function() { }; }; +util.inherits(ServerResponse, EventEmitter); + var ServerRequest = function(url) { this.url = url; }; +util.inherits(ServerRequest, EventEmitter); + // PUBLIC stuff exports.ServerResponse = ServerResponse;
Make http.ServerResponse and http.ServerRequest event emitters [changelog]
diff --git a/core/src/main/java/io/keen/client/java/KeenClient.java b/core/src/main/java/io/keen/client/java/KeenClient.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/io/keen/client/java/KeenClient.java +++ b/core/src/main/java/io/keen/client/java/KeenClient.java @@ -1378,8 +1378,10 @@ public class KeenClient { String path = String.format(Locale.US, "%s/%s/projects/%s/events/%s", getBaseUrl(), KeenConstants.API_VERSION, project.getProjectId(), rawPath); return new URL(path); - } catch (URISyntaxException | MalformedURLException e) { - KeenLogging.log("Event you sent has invalid URL address", e); + } catch (URISyntaxException e) { + KeenLogging.log("Event collection name has invalid character to encode", e); + } catch (MalformedURLException e) { + KeenLogging.log("Url you create is malformed or there is not legal protocol in string you specified", e); } return null;
Refactor catch statement to work with android <I>
diff --git a/packages/metascraper/src/get-data.js b/packages/metascraper/src/get-data.js index <HASH>..<HASH> 100644 --- a/packages/metascraper/src/get-data.js +++ b/packages/metascraper/src/get-data.js @@ -11,13 +11,13 @@ const { const xss = require('xss') -const getValue = async ({ htmlDom, jsonLd, url, conditions, meta }) => { +const getValue = async ({ htmlDom, url, conditions, meta }) => { const lastIndex = conditions.length let index = 0 let value while (isEmpty(value) && index < lastIndex) { - value = await conditions[index++]({ htmlDom, jsonLd, url, meta }) + value = await conditions[index++]({ htmlDom, url, meta }) } return value
refactor: removed unreferenced code
diff --git a/patroni/dcs/kubernetes.py b/patroni/dcs/kubernetes.py index <HASH>..<HASH> 100644 --- a/patroni/dcs/kubernetes.py +++ b/patroni/dcs/kubernetes.py @@ -950,7 +950,8 @@ class Kubernetes(AbstractDCS): if not self._api.create_namespaced_service(self._namespace, body): return except Exception as e: - if not isinstance(e, k8s_client.rest.ApiException) or e.status != 409: # Service already exists + if not isinstance(e, k8s_client.rest.ApiException) or e.status != 409 or e.status != 403: + # Service already exists return logger.exception('create_config_service failed') self._should_create_config_service = False
Ignore <I>s when trying to create Kubernetes Service (#<I>) Close #<I>
diff --git a/pilight/pilight.py b/pilight/pilight.py index <HASH>..<HASH> 100644 --- a/pilight/pilight.py +++ b/pilight/pilight.py @@ -114,19 +114,17 @@ class Client(threading.Thread): # f you want to close the connection in a timely fashion, # call shutdown() before close(). with self._lock: # Receive thread might use the socket - self._receive_socket.shutdown() - self._receive_socket.close() + self.receive_socket.shutdown(socket.SHUT_RDWR) + self.receive_socket.close() - self._send_socket.shutdown() - self._send_socket.close() + self.send_socket.shutdown(socket.SHUT_RDWR) + self.send_socket.close() def run(self): # Thread for receiving data from pilight """Receiver thread function called on Client.start().""" logging.debug('Pilight receiver thread started') if not self.callback: - logging.warning( - 'No callback function set, stopping readout thread') - return + raise RuntimeError('No callback function set, cancel readout thread') def handle_messages(messages): """Call callback on each receive message."""
BUG: fix socket close ENH: throw exception and no error logging
diff --git a/src/jquery.contextMenu.js b/src/jquery.contextMenu.js index <HASH>..<HASH> 100755 --- a/src/jquery.contextMenu.js +++ b/src/jquery.contextMenu.js @@ -800,7 +800,9 @@ // make sure only one item is selected (opt.$menu ? opt : root).$menu - .children('.hover').trigger('contextmenu:blur'); + .children(root.classNames.hover).trigger('contextmenu:blur'); + // Also check this for all siblings of the LI + $this.siblings().trigger('contextmenu:blur'); if ($this.hasClass(root.classNames.disabled) || $this.hasClass(root.classNames.notSelectable)) { opt.$selected = null;
Double check for siblings with hover state. Fixes #<I>
diff --git a/server.js b/server.js index <HASH>..<HASH> 100644 --- a/server.js +++ b/server.js @@ -9,7 +9,7 @@ const errorHandler = require('errorhandler') const serveStatic = require('serve-static') const config = require('./config') -var app = express() +const app = express() app.use(morgan('dev')) app.use(errorHandler()) @@ -19,11 +19,11 @@ app.use(serveStatic(path.join(__dirname, 'fonts'))) app.use(serveStatic(path.join(__dirname, 'node_modules'))) if (app.get('env') === 'development') { - var webpack = require('webpack') - var webpackDevMiddleware = require('webpack-dev-middleware') - var webpackHotMiddleware = require('webpack-hot-middleware') - var webpackConfig = require('./webpack.config') - var compiler = webpack(webpackConfig) + const webpack = require('webpack') + const webpackDevMiddleware = require('webpack-dev-middleware') + const webpackHotMiddleware = require('webpack-hot-middleware') + const webpackConfig = require('./webpack.config') + const compiler = webpack(webpackConfig) app.use(webpackDevMiddleware(compiler, { noInfo: true,
change var to const in server.js
diff --git a/lib/absolutely.rb b/lib/absolutely.rb index <HASH>..<HASH> 100644 --- a/lib/absolutely.rb +++ b/lib/absolutely.rb @@ -7,9 +7,9 @@ require_relative 'absolutely/version' require_relative 'absolutely/uri' module Absolutely - class AbsolutelyError < StandardError; end - class ArgumentError < AbsolutelyError; end - class InvalidURIError < AbsolutelyError; end + class Error < StandardError; end + class ArgumentError < Error; end + class InvalidURIError < Error; end # Convert a relative path to an absolute URI. #
Rename AbsolutelyError to Error
diff --git a/test/unit/PersonalApiTest.php b/test/unit/PersonalApiTest.php index <HASH>..<HASH> 100644 --- a/test/unit/PersonalApiTest.php +++ b/test/unit/PersonalApiTest.php @@ -88,8 +88,33 @@ class PersonalApiTest extends TestCase $personal->unlockAccount($this->newAccount, '123456', function ($err, $unlocked) { if ($err !== null) { - // infura banned us to use unlock account - return $this->assertTrue($err->getCode() === 405); + return $this->fail($err->getMessage()); + } + $this->assertTrue($unlocked); + }); + } + + /** + * testUnlockAccountWithDuration + * + * @return void + */ + public function testUnlockAccountWithDuration() + { + $personal = $this->personal; + + // create account + $personal->newAccount('123456', function ($err, $account) { + if ($err !== null) { + return $this->fail($e->getMessage()); + } + $this->newAccount = $account; + $this->assertTrue(is_string($account)); + }); + + $personal->unlockAccount($this->newAccount, '123456', 100, function ($err, $unlocked) { + if ($err !== null) { + return $this->fail($err->getMessage()); } $this->assertTrue($unlocked); });
Add test for unlockAccount with duration.
diff --git a/core/gekkoStream.js b/core/gekkoStream.js index <HASH>..<HASH> 100644 --- a/core/gekkoStream.js +++ b/core/gekkoStream.js @@ -18,8 +18,8 @@ var Gekko = function(plugins) { .filter(plugin => plugin.processCandle); Writable.call(this, {objectMode: true}); - this.defferedProducers = this.plugins - .filter(p => p.broadcastDeferredEmit); + this.producers = this.plugins + .filter(p => p.meta.emits); this.finalize = _.bind(this.finalize, this); } @@ -39,7 +39,7 @@ if(config.debug) { const timer = setTimeout(() => { if(!relayed) log.error([ - `The plugin "${at}" has not processed a candle for 0.5 seconds.`, + `The plugin "${at}" has not processed a candle for 1 second.`, `This will cause Gekko to slow down or stop working completely.` ].join(' ')); }, 1000); @@ -70,7 +70,7 @@ if(config.debug) { Gekko.prototype.flushDefferedEvents = function() { const broadcasted = _.find( - this.defferedProducers, + this.producers, producer => producer.broadcastDeferredEmit() );
only flush events from plugins that actually emit
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -435,7 +435,7 @@ function vuCoin(host, port, authenticated, withSignature, intialized){ var clearTextMessage = openpgp.cleartext.readArmored(clearSigned); var sigRes = openpgp.verifyClearSignedMessage(pubkeys, clearTextMessage); if (sigRes.signatures && sigRes.signatures.length > 0) { - verified = sigRes.signatures[0].valid && sigRes.text == content; + verified = sigRes.signatures[0].valid; } } catch(ex){ @@ -445,7 +445,9 @@ function vuCoin(host, port, authenticated, withSignature, intialized){ if(verified){ errorCode(res, content, sigMessage, done); } - else done("Signature verification failed"); + else{ + done("Signature verification failed for URL " + res.request.href); + } } } else done("Non signed content.");
Fix: there were still good signatures considered as false
diff --git a/nfc/tag/tt3.py b/nfc/tag/tt3.py index <HASH>..<HASH> 100644 --- a/nfc/tag/tt3.py +++ b/nfc/tag/tt3.py @@ -182,7 +182,7 @@ class Type3Tag(object): self.pmm = target.pmm self.sys = target.sys - if self.sys != "\x12\xFC": + if self.sys != "\x12\xFC" and self.pmm[0:2] != "\x01\xE0": idm, pmm = self.poll(0x12FC) if idm is not None and pmm is not None: self.sys = bytearray([0x12, 0xFC])
don't check for <I>FC sytem code when a FeliCa Plug is found - some implementations get confused
diff --git a/nabu/sdk/builders/nabu/CNabuPHPClassTableBuilder.php b/nabu/sdk/builders/nabu/CNabuPHPClassTableBuilder.php index <HASH>..<HASH> 100644 --- a/nabu/sdk/builders/nabu/CNabuPHPClassTableBuilder.php +++ b/nabu/sdk/builders/nabu/CNabuPHPClassTableBuilder.php @@ -824,7 +824,7 @@ class CNabuPHPClassTableBuilder extends CNabuPHPClassTableAbstractBuilder $this->addFragment($fragment); $is_enclosed = $this->is_customer_foreign || $this->is_site_foreign || $this->is_medioteca_foreign || - $this->is_commerce_foreign || $this->is_catalog_foreign + $this->is_commerce_foreign || $this->is_catalog_foreign || $this->is_messaging_foreign ; if ($this->is_customer_foreign) {
Add support for self generated Messaging classes
diff --git a/lib/rabl/partials.rb b/lib/rabl/partials.rb index <HASH>..<HASH> 100644 --- a/lib/rabl/partials.rb +++ b/lib/rabl/partials.rb @@ -7,6 +7,7 @@ module Rabl # options must have :object # options can have :view_path, :child_root, :root def partial(file, options={}, &block) + raise ArgumentError, "Must provide an :object option to render a partial" unless options[:object] object, view_path = options.delete(:object), options.delete(:view_path) source, location = self.fetch_source(file, :view_path => view_path) engine_options = options.merge(:source => source, :source_location => location)
[partials] Raise an error when no object is passed to partial
diff --git a/src/Commands/InstallerCommand.php b/src/Commands/InstallerCommand.php index <HASH>..<HASH> 100644 --- a/src/Commands/InstallerCommand.php +++ b/src/Commands/InstallerCommand.php @@ -67,8 +67,6 @@ class InstallerCommand extends Command /** * Create a new command instance. - * - * @return void */ public function __construct() { diff --git a/src/Commands/SetupCommand.php b/src/Commands/SetupCommand.php index <HASH>..<HASH> 100644 --- a/src/Commands/SetupCommand.php +++ b/src/Commands/SetupCommand.php @@ -36,8 +36,6 @@ class SetupCommand extends InstallerCommand /** * Create a new command instance. - * - * @return void */ public function __construct() {
Removed _constructor @return void from commands.
diff --git a/indra/databases/context_client.py b/indra/databases/context_client.py index <HASH>..<HASH> 100644 --- a/indra/databases/context_client.py +++ b/indra/databases/context_client.py @@ -1,6 +1,7 @@ from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str from indra.databases import ndex_client +from indra.databases import cbio_client # Python 2 try: basestring diff --git a/indra/sources/trips/processor.py b/indra/sources/trips/processor.py index <HASH>..<HASH> 100644 --- a/indra/sources/trips/processor.py +++ b/indra/sources/trips/processor.py @@ -1516,6 +1516,8 @@ def _get_db_refs(term): top_idx = 0 for i, entry in enumerate(entries): if entry['priority'] < top_entry['priority']: + if 'NCIT' in entry['refs'] and 'HGNC' in entry['refs']: + continue top_entry = entry top_idx = i for i, entry in enumerate(entries):
Add corner case for grounding prioritization
diff --git a/test/macaroon-identity/auth.go b/test/macaroon-identity/auth.go index <HASH>..<HASH> 100644 --- a/test/macaroon-identity/auth.go +++ b/test/macaroon-identity/auth.go @@ -66,8 +66,7 @@ func (s *authService) thirdPartyChecker(ctx context.Context, req *http.Request, return nil, err } - tokenString := string(token.Value) - username, ok := s.userTokens[tokenString] + username, ok := s.userTokens[string(token.Value)] if token.Kind != "form" || !ok { return nil, fmt.Errorf("invalid token %#v", token) }
test/macaroon-identity: Remove assignment to tokenString.
diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py index <HASH>..<HASH> 100755 --- a/ec2/spark_ec2.py +++ b/ec2/spark_ec2.py @@ -113,6 +113,16 @@ def parse_args(): # Boto config check # http://boto.cloudhackers.com/en/latest/boto_config_tut.html home_dir = os.getenv('HOME') + if home_dir == None or not os.path.isfile(home_dir + '/.boto'): + if not os.path.isfile('/etc/boto.cfg'): + if os.getenv('AWS_ACCESS_KEY_ID') == None: + print >> stderr, ("ERROR: The environment variable AWS_ACCESS_KEY_ID " + + "must be set") + sys.exit(1) + if os.getenv('AWS_SECRET_ACCESS_KEY') == None: + print >> stderr, ("ERROR: The environment variable AWS_SECRET_ACCESS_KEY " + + "must be set") + sys.exit(1) return (opts, action, cluster_name)
old version of spark_ec2
diff --git a/home/collect/handlers.py b/home/collect/handlers.py index <HASH>..<HASH> 100644 --- a/home/collect/handlers.py +++ b/home/collect/handlers.py @@ -85,7 +85,8 @@ class LoggingHandler(BaseHandler): def __call__(self, packet): self.log.warning( - "Ignoring packet: {0} ({1})".format(packet, self.format_packet(packet.raw))) + "Ignoring packet: {0} ({1})".format( + packet, self.format_packet(packet.raw))) class RecordingHandler(BaseHandler): diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ setup( 'psycopg2>=2.5.2', 'python-dateutil>=2.2', 'redis>=2.9.1', - 'rfxcom>=0.2.1', + 'rfxcom>=0.2.2', 'simplejson>=3.3.3', 'SQLAlchemy>=0.9.4', 'uwsgi>=2.0',
Bump rfxcom.
diff --git a/robots/models.py b/robots/models.py index <HASH>..<HASH> 100644 --- a/robots/models.py +++ b/robots/models.py @@ -2,7 +2,7 @@ from django.db import models from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from django.utils.text import get_text_list - +from six import u class Url(models.Model): """ @@ -22,7 +22,7 @@ class Url(models.Model): verbose_name_plural = _('url') def __unicode__(self): - return u"%s" % self.pattern + return u("%s") % self.pattern def save(self, *args, **kwargs): if not self.pattern.startswith('/'): @@ -80,7 +80,7 @@ class Rule(models.Model): verbose_name_plural = _('rules') def __unicode__(self): - return u"%s" % self.robot + return u("%s") % self.robot def allowed_urls(self): return get_text_list(list(self.allowed.all()), _('and'))
Replaced string literal `u` prefixes with calls to `six.u()` for compatibility with python <I>
diff --git a/test/tetest.js b/test/tetest.js index <HASH>..<HASH> 100644 --- a/test/tetest.js +++ b/test/tetest.js @@ -86,5 +86,12 @@ test("print", function() { equal(transform(r), "Test"); }); +test("singleLineEventSlashEscape", function() { + var r = e.eval("\\\n%print(1+1)"); + equal(r, "\n%print(1+1)"); + var r = e.eval("\\\\\n%print(1+1)"); + equal(r, "\\2"); +}); + });
Added test about slash escaping of %
diff --git a/modules/cms/assets/js/october.cmspage.js b/modules/cms/assets/js/october.cmspage.js index <HASH>..<HASH> 100644 --- a/modules/cms/assets/js/october.cmspage.js +++ b/modules/cms/assets/js/october.cmspage.js @@ -102,7 +102,6 @@ }).always(function() { $.oc.stripeLoadIndicator.hide() }).fail(function(jqXHR, textStatus, errorThrown) { - alert(jqXHR.responseText.length ? jqXHR.responseText : jqXHR.statusText) $.oc.stripeLoadIndicator.hide() })
Remove alert to prevent showing same popup twice (#<I>) Credit to @Samuell1
diff --git a/php/wp-settings-cli.php b/php/wp-settings-cli.php index <HASH>..<HASH> 100644 --- a/php/wp-settings-cli.php +++ b/php/wp-settings-cli.php @@ -80,11 +80,14 @@ if ( defined( 'WP_INSTALLING' ) && is_multisite() ) { require_wp_db(); // WP-CLI: Handle db error ourselves, instead of waiting for dead_db() +global $wpdb; if ( !empty( $wpdb->error ) ) wp_die( $wpdb->error ); // Set the database table prefix and the format specifiers for database table columns. +// @codingStandardsIgnoreStart $GLOBALS['table_prefix'] = $table_prefix; +// @codingStandardsIgnoreEnd wp_set_wpdb_vars(); // Start the WordPress object cache, or an external object cache if the drop-in is present. @@ -298,6 +301,7 @@ require_once( ABSPATH . WPINC . '/locale.php' ); $GLOBALS['wp_locale'] = new WP_Locale(); // Load the functions for the active theme, for both parent and child theme if applicable. +global $pagenow; if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) { if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) ) include( STYLESHEETPATH . '/functions.php' );
fix undefined variable warnings in wp-settings-cli.php
diff --git a/gdxpy.py b/gdxpy.py index <HASH>..<HASH> 100644 --- a/gdxpy.py +++ b/gdxpy.py @@ -253,8 +253,8 @@ class gdxsymb: return ret - def __call__(self,filt=None,idval=None,reset=False): - return self.get_values(filt=filt,idval=idval,reset=reset) + def __call__(self,filt=None,idval=None,reset=False,reshape=RESHAPE_DEFAULT): + return self.get_values(filt=filt,idval=idval,reset=reset,reshape=reshape) class gdxfile: """
add reshape to call routine
diff --git a/test/publish.js b/test/publish.js index <HASH>..<HASH> 100644 --- a/test/publish.js +++ b/test/publish.js @@ -21,7 +21,6 @@ part('Checking configuration', function () { process.exit(); } - return false; var missingEnv = ['NPM_USERNAME', 'NPM_PASSWORD', 'NPM_EMAIL', 'GH_TOKEN'].filter(function (name) { return !(name in env) }); if (missingEnv.length) { @@ -29,7 +28,7 @@ part('Checking configuration', function () { } }); -if (false) part('Publishing to npm', function (npm) { +part('Publishing to npm', function (npm) { npm.load(function () { console.log(npm.config); npm.registry.adduser(env.NPM_USERNAME, env.NPM_PASSWORD, env.NPM_EMAIL, function (err) { @@ -62,7 +61,7 @@ part('Publishing to GitHub', function (fs, rimraf) { outSourceMap: scriptName + '.map' }); - fs.writeFileSync('dist/' + scriptName, minified.code); + fs.writeFileSync('dist/' + scriptName, minified.code + ['#', '@'].map(function (c) { return '\n//# sourceMappingURL=' + scriptName + '.map' })); fs.writeFileSync('dist/' + scriptName + '.map', minified.map); });
Re-enabled npm publisher, added source map comments to generated code.
diff --git a/tests/Renderer/RenderDataCollectionTest.php b/tests/Renderer/RenderDataCollectionTest.php index <HASH>..<HASH> 100644 --- a/tests/Renderer/RenderDataCollectionTest.php +++ b/tests/Renderer/RenderDataCollectionTest.php @@ -38,6 +38,14 @@ class RenderCollectionTest extends RenderTestBase { $this->assertArrayHasKey('sys_pathNames', $collectedData); } + public function testRenderMergesCollectorDataWithEnvironmentData() + { + $r = $this->getRenderer(); + $r->addCollector(new DummyCollector()); + $data = $r->getData(); + $this->assertArrayHasKey('dummy', $data); + } + /** * @expectedException ErrorException */
Data collector data now merged with env data
diff --git a/src/EditorconfigChecker/Cli/Cli.php b/src/EditorconfigChecker/Cli/Cli.php index <HASH>..<HASH> 100644 --- a/src/EditorconfigChecker/Cli/Cli.php +++ b/src/EditorconfigChecker/Cli/Cli.php @@ -151,11 +151,12 @@ class Cli $excludedPattern = [$options['e'], $options['exclude']]; } } - - if (is_array($excludedPattern)) { - $pattern = '/' . implode('|', $excludedPattern) . '/'; - } else { - $pattern = '/' . $excludedPattern . '/'; + if (isset($excludedPattern)) { + if (is_array($excludedPattern)) { + $pattern = '/' . implode('|', $excludedPattern) . '/'; + } else { + $pattern = '/' . $excludedPattern . '/'; + } } return $pattern;
BUGFIX: Fix behavior when no exclude is provided
diff --git a/activesupport/test/callbacks_test.rb b/activesupport/test/callbacks_test.rb index <HASH>..<HASH> 100644 --- a/activesupport/test/callbacks_test.rb +++ b/activesupport/test/callbacks_test.rb @@ -149,6 +149,27 @@ module CallbacksTest end end + class AfterSaveConditionalPerson < Record + after_save Proc.new { |r| r.history << [:after_save, :string1] } + after_save Proc.new { |r| r.history << [:after_save, :string2] } + def save + run_callbacks :save + end + end + + class AfterSaveConditionalPersonCallbackTest < Test::Unit::TestCase + def test_after_save_runs_in_the_reverse_order + person = AfterSaveConditionalPerson.new + person.save + assert_equal [ + [:after_save, :string2], + [:after_save, :string1] + ], person.history + end + end + + + class ConditionalPerson < Record # proc before_save Proc.new { |r| r.history << [:before_save, :proc] }, :if => Proc.new { |r| true } @@ -352,6 +373,8 @@ module CallbacksTest end end + + class ResetCallbackTest < Test::Unit::TestCase def test_save_conditional_person person = CleanPerson.new
Test for after_create callback order in ActiveSupport [#<I> state:resolved]
diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -64,7 +64,7 @@ class Route implements \Serializable /** * @var string */ - private $condition; + private $condition = ''; /** * Constructor. @@ -84,7 +84,7 @@ class Route implements \Serializable * * @api */ - public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = null) + public function __construct($path, array $defaults = array(), array $requirements = array(), array $options = array(), $host = '', $schemes = array(), $methods = array(), $condition = '') { $this->setPath($path); $this->setDefaults($defaults);
[Routing] correctly initialize condition as string
diff --git a/worker.js b/worker.js index <HASH>..<HASH> 100644 --- a/worker.js +++ b/worker.js @@ -48,9 +48,6 @@ module.exports = function(files, cb) { amountOfErrors += json.data.errors.length; } - else { - console.log(chalk.green('No issues found.')); - } cb(); }); @@ -60,9 +57,13 @@ module.exports = function(files, cb) { return cb(err); } - if (amountOfErrors) { + console.log(); + if (amountOfErrors > 0) { console.log(chalk[COLORS.warning](amountOfErrors, 'issues found in total.')); } + else { + console.log(chalk.green('No issues found.')); + } return cb(); }
Fix: Show No issues found after all files, not after each file
diff --git a/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php b/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php @@ -106,11 +106,7 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements $this->called[$eventName.'.'.$info['pretty']] = $info; - $name = isset($info['class']) - ? substr($info['class'], strrpos($info['class'], '\\') + 1) - : 'Closure'; - - $e2 = $this->stopwatch->start($name, 'event_listener'); + $e2 = $this->stopwatch->start(isset($info['class']) ? substr($info['class'], strrpos($info['class'], '\\') + 1) : $info['type'], 'event_listener'); call_user_func($listener, $event);
[FrameworkBundle] make the code more generic
diff --git a/lib/core/validation/validator.js b/lib/core/validation/validator.js index <HASH>..<HASH> 100644 --- a/lib/core/validation/validator.js +++ b/lib/core/validation/validator.js @@ -92,7 +92,7 @@ var ruleConfig = rules[key]; if(!ruleConfig) { - $log.error('Failed to get rules key [' + key + ']. Forms must be tagged with a rules set name for validation to work.'); + $log.warn('Could not resolve the form rules key [' + key + ']. This can happen when the rules key is inside a promise and the key value has not resolved on page load.'); return; } diff --git a/lib/ui/validation/field.js b/lib/ui/validation/field.js index <HASH>..<HASH> 100644 --- a/lib/ui/validation/field.js +++ b/lib/ui/validation/field.js @@ -81,8 +81,10 @@ // validate function is called within the context of angular so fn.call and set the context // to "this" - self.updateModel.call(self, results); - self.updateView.call(self); + if(results) { + self.updateModel.call(self, results); + self.updateView.call(self); + } return results; };
Fix invalid error messges on page load for form validation Fix invalid error messges displaying in console when the form validation key has not resolved. This issue can happen when the form validation key is resolved inside a promise. Fixes #<I>
diff --git a/Console/PruneCommand.php b/Console/PruneCommand.php index <HASH>..<HASH> 100644 --- a/Console/PruneCommand.php +++ b/Console/PruneCommand.php @@ -87,7 +87,7 @@ class PruneCommand extends Command return collect($models); } - return collect((new Finder)->in(app_path('Models'))->files()) + return collect((new Finder)->in(app_path('Models'))->files()->name('*.php')) ->map(function ($model) { $namespace = $this->laravel->getNamespace();
Only look for files ending with .php in model:prune (#<I>)
diff --git a/context.go b/context.go index <HASH>..<HASH> 100644 --- a/context.go +++ b/context.go @@ -491,4 +491,6 @@ func (dc *Context) Pop() { dc.strokePath = before.strokePath dc.fillPath = before.fillPath dc.start = before.start + dc.current = before.current + dc.hasCurrent = before.hasCurrent }
stack should not affect current, hasCurrent
diff --git a/webapps/ui/cockpit/client/scripts/directives/time-to-live.js b/webapps/ui/cockpit/client/scripts/directives/time-to-live.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/client/scripts/directives/time-to-live.js +++ b/webapps/ui/cockpit/client/scripts/directives/time-to-live.js @@ -41,8 +41,14 @@ module.exports = ['camAPI', '$window' , 'Notifications', function(camAPI, $windo }; function updateValue(timeToLive) { + var id = ( + $scope.definition.id || + $scope.definition.processDefinitionId || + $scope.definition.caseDefinitionId || + $scope.definition.decisionDefinitionId + ); return resource.updateHistoryTimeToLive( - $scope.definition.id, + id, { historyTimeToLive: timeToLive }
feat(time-to-live): update time-to-live to handle different keys for definitionId Related to CAM-<I>
diff --git a/lib/feed2email/entry.rb b/lib/feed2email/entry.rb index <HASH>..<HASH> 100644 --- a/lib/feed2email/entry.rb +++ b/lib/feed2email/entry.rb @@ -20,9 +20,7 @@ module Feed2Email include Configurable include Loggable - attr_accessor :data - attr_accessor :feed_data - attr_accessor :feed_uri + attr_accessor :data, :feed_data, :feed_uri def process if missing_data?
Combine attr_accessor calls
diff --git a/go/service/gregor.go b/go/service/gregor.go index <HASH>..<HASH> 100644 --- a/go/service/gregor.go +++ b/go/service/gregor.go @@ -738,6 +738,17 @@ func (g *gregorHandler) notifyFavoritesChanged(ctx context.Context, uid gregor.U func (g *gregorHandler) auth(ctx context.Context, cli rpc.GenericClient) error { var token string var uid keybase1.UID + + // Check to see if we have been shutdown, + select { + case <-g.shutdownCh: + g.Debug("server is dead, not authenticating") + return errors.New("server is dead, not authenticating") + default: + // if we were going to block, then that means we are still alive + } + + // Continue on and authenticate aerr := g.G().LoginState().LocalSession(func(s *libkb.Session) { token = s.GetToken() uid = s.GetUID()
make sure we arent dead before auth
diff --git a/extension-impl/tracer-opentracing/src/main/java/com/alipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java b/extension-impl/tracer-opentracing/src/main/java/com/alipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java index <HASH>..<HASH> 100644 --- a/extension-impl/tracer-opentracing/src/main/java/com/alipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java +++ b/extension-impl/tracer-opentracing/src/main/java/com/alipay/sofa/rpc/tracer/sofatracer/RpcSofaTracer.java @@ -345,8 +345,9 @@ public class RpcSofaTracer extends Tracer { throwableShow = new SofaRpcException(RpcErrorType.SERVER_UNDECLARED_ERROR, response.getErrorMsg()); } else { Object ret = response.getAppResponse(); - if (ret instanceof Throwable) { - throwableShow = (Throwable) ret; + //for server throw exception ,but this class can not be found in current + if (ret instanceof Throwable || + "true".equals(response.getResponseProp(RemotingConstants.HEAD_RESPONSE_ERROR))) { errorSourceApp = clientSpan.getTagsWithStr().get(RpcSpanTags.REMOTE_APP); // 业务异常 resultCode = TracerResultCode.RPC_RESULT_BIZ_FAILED;
Fix tracer class not found exp. (#<I>) * fix tracer class not found exp
diff --git a/workflow/cron/operator.go b/workflow/cron/operator.go index <HASH>..<HASH> 100644 --- a/workflow/cron/operator.go +++ b/workflow/cron/operator.go @@ -136,7 +136,7 @@ func (woc *cronWfOperationCtx) persistUpdate() { } var reapplyErr error _, reapplyErr = woc.reapplyUpdate() - if err != nil { + if reapplyErr != nil { woc.log.WithError(reapplyErr).WithField("original error", err).Error("failed to update CronWorkflow after reapply attempt") return }
fix(controller): Check the correct object for Cronworkflow reapply error log (#<I>)
diff --git a/lib/kudzu/adapter/base/page.rb b/lib/kudzu/adapter/base/page.rb index <HASH>..<HASH> 100644 --- a/lib/kudzu/adapter/base/page.rb +++ b/lib/kudzu/adapter/base/page.rb @@ -4,7 +4,7 @@ module Kudzu module Page def last_modified last_modified = response_header['last-modified'] - Time.parse(last_modified) if last_modified + Time.parse(last_modified).localtime if last_modified rescue nil end
Convert last_modified to localtime
diff --git a/lib/epub/ocf/physical_container.rb b/lib/epub/ocf/physical_container.rb index <HASH>..<HASH> 100644 --- a/lib/epub/ocf/physical_container.rb +++ b/lib/epub/ocf/physical_container.rb @@ -7,7 +7,15 @@ module EPUB class OCF # @todo: Make thread save class PhysicalContainer - class NoEntry < StandardError; end + class NoEntry < StandardError + class << self + def from_error(error) + no_entry = new(error.message) + no_entry.set_backtrace error.backtrace + no_entry + end + end + end @adapter = ArchiveZip
Define OCF::PhysicalContainer::NoEntry.from_error
diff --git a/src/TreeWalker.php b/src/TreeWalker.php index <HASH>..<HASH> 100644 --- a/src/TreeWalker.php +++ b/src/TreeWalker.php @@ -249,7 +249,7 @@ class TreeWalker foreach ($assocarray as $key => $value) { if (array_key_exists($key, $assocarray)) { - $path = $currentpath ? $currentpath . "/" . $key : $key; + $path = $currentpath !== '' ? $currentpath . "/" . $key : sprintf($key); if (gettype($assocarray[$key]) == "array" && !empty($assocarray[$key])) { $this->structPathArray($assocarray[$key], $array, $path);
0 index Array If the first object is an array, $path is build with a '0' (integer) index, that does not pass the first '$currentpath == ''' ternal. Force type comparison (!==) and 'cast' 0 to string (sprintf($key))
diff --git a/assets/query-monitor.js b/assets/query-monitor.js index <HASH>..<HASH> 100644 --- a/assets/query-monitor.js +++ b/assets/query-monitor.js @@ -167,6 +167,8 @@ jQuery( function($) { } } + $('#qm-panel-menu').find('a').on('click',link_click); + $('#qm').find('.qm-filter').on('change',function(e){ var filter = $(this).attr('data-filter'), @@ -238,10 +240,7 @@ jQuery( function($) { target = $(this).data('qm-target'); $('#qm-' + target).find('.qm-filter').not('[data-filter="' + filter + '"]').val('').removeClass('qm-highlight').change(); $('#qm-' + target).find('[data-filter="' + filter + '"]').val(value).addClass('qm-highlight').change(); - $('html, body').scrollTop( $(this).closest('.qm').offset().top ); - $('html, body').animate({ - scrollTop: $('#qm-' + target).offset().top - }, 500); + $('#qm-panel-menu').find('a[href="#qm-' + target + '"]').click(); e.preventDefault(); });
Handle links in the panel menu and filtering links.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: setup( name='jupytext', - version='0.6.5', + version='0.7.0', author='Marc Wouts', author_email='marc.wouts@gmail.com', description='Jupyter notebooks as Markdown documents, '
Version <I> (way before pre release)
diff --git a/bhmm/init/gaussian.py b/bhmm/init/gaussian.py index <HASH>..<HASH> 100644 --- a/bhmm/init/gaussian.py +++ b/bhmm/init/gaussian.py @@ -62,15 +62,7 @@ def initial_model_gaussian1d(observations, nstates, reversible=True, verbose=Fal Nij = np.zeros([nstates, nstates], np.float64) for o_t in observations: # length of trajectory - try: - T = o_t.shape[0] - except Exception as e: - out = "" - out += str(e) + '\n' - out += str(o_t) + '\n' - out += 'observations = \n' - out += str(observations) + '\n' - raise Exception(out) + T = o_t.shape[0] # output probability pobs = output_model.p_obs(o_t) # normalize
Removed debug code from gaussian initialization.
diff --git a/lib/awspec/type/route_table.rb b/lib/awspec/type/route_table.rb index <HASH>..<HASH> 100644 --- a/lib/awspec/type/route_table.rb +++ b/lib/awspec/type/route_table.rb @@ -35,6 +35,10 @@ module Awspec::Type end end + def route_count + resource_via_client.routes.count + end + private def target_gateway?(route, gateway_id)
Added function to count routes in a route table. Tested with `its (:route_count) { should eq <I> }`
diff --git a/src/sap.m/src/sap/m/ListBase.js b/src/sap.m/src/sap/m/ListBase.js index <HASH>..<HASH> 100644 --- a/src/sap.m/src/sap/m/ListBase.js +++ b/src/sap.m/src/sap/m/ListBase.js @@ -238,8 +238,8 @@ function( * * There are also some known limitations with respect to the scrolling behavior. A few are given below: * <ul> - * <li>If the control is placed in certain layout containers, for example, the <code>sap.ui.layout.Grid</code> control, - * the sticky elements of the control are not fixed at the top of the viewport. The control behaves in a similar way when placed within the <code>sap.m.ObjectPage</code> control.</li> + * <li>If the control is placed in layout containers that have the <code>overflow: hidden</code> or <code>overflow: auto</code> style definition, this can + * prevent the sticky elements of the control from becoming fixed at the top of the viewport.</li> * <li>If sticky column headers are enabled in the <code>sap.m.Table</code> control, setting focus on the column headers will let the table scroll to the top.</li> * </ul> * @since 1.58
[INTERNAL] ListBase: sticky JSDoc update As the documentation of the sticky property was obsolete in case of the ObjectPage, the limitation with respected to the overflow style definition is made generic. Change-Id: I<I>fa<I>c<I>ce4ff3fc6c<I>d<I>da<I>c4c
diff --git a/test/mocha/retry.js b/test/mocha/retry.js index <HASH>..<HASH> 100644 --- a/test/mocha/retry.js +++ b/test/mocha/retry.js @@ -297,9 +297,10 @@ describe('retry', function (){ }); -/* + describe('#retryMethod', function (){ + }); -*/ + }); \ No newline at end of file
Added retryMethod test to retry.js tests, <I>% coverage incoming.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -69,11 +69,12 @@ setup( # your project is installed. For an analysis of "install_requires" vs pip's # requirements files see: # https://packaging.python.org/en/latest/requirements.html - install_requires=['numpy>=1.9.2', - 'scipy>=0.15.1', - 'matplotlib>=1.4.3', - 'scikit-learn>=0.16.1', - 'xlrd>=0.9.3', + install_requires=['numpy>=1.9.2', + 'scipy>=0.15.1', + 'matplotlib>=1.4.3', + 'palettable>=2.1.1', + 'scikit-learn>=0.16.1', + 'xlrd>=0.9.3', 'openpyxl==2.0.2'], # List additional groups of dependencies here (e.g. development
Added palettable to setup.py.
diff --git a/src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java b/src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java +++ b/src/main/java/com/github/ansell/restletutils/RestletUtilSesameRealm.java @@ -301,6 +301,7 @@ public class RestletUtilSesameRealm extends Realm { conn.rollback(); } + throw e; } finally {
Rethrow exception instead of silently logging it
diff --git a/eventsourcing/infrastructure/event_player.py b/eventsourcing/infrastructure/event_player.py index <HASH>..<HASH> 100644 --- a/eventsourcing/infrastructure/event_player.py +++ b/eventsourcing/infrastructure/event_player.py @@ -33,12 +33,14 @@ class EventPlayer(object): # Decide since when we need to get the events. since = snapshot.last_event_id if snapshot else None - # Get entity's domain events from event store. + # Get entity's domain events from the event store. domain_events = self.event_store.get_entity_events(stored_entity_id, since=since) - # Get the entity by a left fold of the domain events over the initial state. + # Get the entity, left fold the domain events over the initial state. domain_entity = reduce(self.mutate, domain_events, initial_state) + # Todo: Move this onto the domain entity (maybe) and make it know of last snapshot so it. + # Todo: Or maybe have a completely indepdendent snapshotting object which listens to events and checks. # Take a snapshot if too many versions since the initial version for this type. if domain_entity is not None: assert isinstance(domain_entity, EventSourcedEntity)
Added todos about moving snapshotting out of the event player.
diff --git a/src/main/java/de/slackspace/openkeepass/domain/xml/adapter/BooleanSimpleXmlAdapter.java b/src/main/java/de/slackspace/openkeepass/domain/xml/adapter/BooleanSimpleXmlAdapter.java index <HASH>..<HASH> 100644 --- a/src/main/java/de/slackspace/openkeepass/domain/xml/adapter/BooleanSimpleXmlAdapter.java +++ b/src/main/java/de/slackspace/openkeepass/domain/xml/adapter/BooleanSimpleXmlAdapter.java @@ -5,9 +5,8 @@ import org.simpleframework.xml.transform.Transform; public class BooleanSimpleXmlAdapter implements Transform<Boolean> { @Override - public Boolean read(String arg0) throws Exception { - // TODO Auto-generated method stub - return null; + public Boolean read(String value) throws Exception { + return "true".equalsIgnoreCase(value); } @Override
Implemented read method of BooleanAdapter
diff --git a/liquibase-integration-tests/src/test/java/liquibase/test/DatabaseTestContext.java b/liquibase-integration-tests/src/test/java/liquibase/test/DatabaseTestContext.java index <HASH>..<HASH> 100644 --- a/liquibase-integration-tests/src/test/java/liquibase/test/DatabaseTestContext.java +++ b/liquibase-integration-tests/src/test/java/liquibase/test/DatabaseTestContext.java @@ -56,7 +56,7 @@ public class DatabaseTestContext { private DatabaseConnection openConnection(final String givenUrl, final String username, final String password) throws Exception { // Insert the temp dir path - String url = givenUrl.replace("'***TEMPDIR***", System.getProperty("java.io.tmpdir")); + String url = givenUrl.replace("***TEMPDIR***", System.getProperty("java.io.tmpdir")); if (connectionsAttempted.containsKey(url)) { JdbcConnection connection = (JdbcConnection) connectionsByUrl.get(url);
Integration tests: Automatically places embedded database in the temp directory
diff --git a/examples/with-webpack-bundle-analyzer/next.config.js b/examples/with-webpack-bundle-analyzer/next.config.js index <HASH>..<HASH> 100644 --- a/examples/with-webpack-bundle-analyzer/next.config.js +++ b/examples/with-webpack-bundle-analyzer/next.config.js @@ -2,11 +2,11 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') const { ANALYZE } = process.env module.exports = { - webpack: function (config) { + webpack: function (config, { isServer }) { if (ANALYZE) { config.plugins.push(new BundleAnalyzerPlugin({ analyzerMode: 'server', - analyzerPort: 8888, + analyzerPort: isServer ? 8888 : 8889, openAnalyzer: true })) }
Fix webpack-bundle-analyzer example to work with Next 5 (#<I>)
diff --git a/Model/ContentManager.php b/Model/ContentManager.php index <HASH>..<HASH> 100644 --- a/Model/ContentManager.php +++ b/Model/ContentManager.php @@ -279,6 +279,7 @@ class ContentManager implements ContentManagerInterface //duplicate content $duplicatedContent = clone $content; + $duplicatedContent->setSlug(null); $duplicatedContent->setValueSet($duplicatedValueset); if (!is_null($nestedIn)) {
Set slug to null while duplicating