diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/ORM/TransactionMiddleware.php b/src/ORM/TransactionMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/ORM/TransactionMiddleware.php
+++ b/src/ORM/TransactionMiddleware.php
@@ -31,6 +31,7 @@ class TransactionMiddleware implements Middleware
* @param callable $next
* @return mixed
* @throws Throwable
+ * @throws Exception
*/
public function execute($command, callable $next)
{
|
Readd Exception to throws for PHP 5.x
|
diff --git a/tests/screenshot.py b/tests/screenshot.py
index <HASH>..<HASH> 100644
--- a/tests/screenshot.py
+++ b/tests/screenshot.py
@@ -1,15 +1,18 @@
# -*- coding: utf-8 -*-
-# Copyright 2013 splinter authors. All rights reserved.
+# Copyright 2014 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
+import tempfile
+
+
class ScreenshotTest(object):
def test_take_screenshot(self):
"should take a screenshot of the current page"
filename = self.browser.screenshot()
- self.assertTrue('tmp' in filename)
+ self.assertTrue(tempfile.gettempdir() in filename)
def test_take_screenshot_with_prefix(self):
"should add the prefix to the screenshot file name"
|
tests: improved screenshot test to get tempdir using tempfile module.
|
diff --git a/spyderlib/widgets/codeeditor/syntaxhighlighters.py b/spyderlib/widgets/codeeditor/syntaxhighlighters.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/codeeditor/syntaxhighlighters.py
+++ b/spyderlib/widgets/codeeditor/syntaxhighlighters.py
@@ -423,7 +423,8 @@ C_TYPES = 'bool char double enum float int long mutable short signed struct unsi
class CythonSH(PythonSH):
"""Cython Syntax Highlighter"""
- ADDITIONAL_KEYWORDS = ["cdef", "ctypedef"]
+ ADDITIONAL_KEYWORDS = ["cdef", "ctypedef", "cpdef", "inline", "cimport",
+ "DEF"]
ADDITIONAL_BUILTINS = C_TYPES.split()
PROG = re.compile(make_python_patterns(ADDITIONAL_KEYWORDS,
ADDITIONAL_BUILTINS), re.S)
|
(Fixes Issue <I>) Code editor syntax highlighting: added more keywords to Cython syntax highlighter (cpdef, inline, cimport and DEF)
|
diff --git a/lib/output-engine/dom/container.js b/lib/output-engine/dom/container.js
index <HASH>..<HASH> 100644
--- a/lib/output-engine/dom/container.js
+++ b/lib/output-engine/dom/container.js
@@ -180,7 +180,7 @@ var proto = {
return this;
},
removeChild: function(child) {
- if (typeof child === 'number') {
+ if (typeof child !== 'object') {
var index = child;
child = this.childNodes[index];
if (!child)
|
Container : .removeChild : check if is not object in place of is number
|
diff --git a/src/Api/Invoices.php b/src/Api/Invoices.php
index <HASH>..<HASH> 100644
--- a/src/Api/Invoices.php
+++ b/src/Api/Invoices.php
@@ -66,14 +66,17 @@ class Invoices extends Api
*
* @param string $customerId
* @param string $subscriptionId
+ * @param array $parameters
* @return array
*/
- public function upcomingInvoice($customerId, $subscriptionId = null)
+ public function upcomingInvoice($customerId, $subscriptionId = null, array $parameters = [])
{
- return $this->_get('invoices/upcoming', [
+ $parameters = array_merge($parameters, [
'customer' => $customerId,
'subscription' => $subscriptionId,
]);
+
+ return $this->_get('invoices/upcoming', $parameters);
}
/**
|
chore: Add extra argument to the upcomingInvoice method.
|
diff --git a/src/DefaultNode.php b/src/DefaultNode.php
index <HASH>..<HASH> 100644
--- a/src/DefaultNode.php
+++ b/src/DefaultNode.php
@@ -7,6 +7,7 @@ use NoTee\Exceptions\PathOutdatedException;
class DefaultNode implements Fertile, Node
{
+ public static $validateAttributes = true;
public static $validateAttributeNames = true;
protected $tagName;
@@ -82,8 +83,10 @@ class DefaultNode implements Fertile, Node
private static function validateAttributes($attributes)
{
- foreach($attributes as $key => $value) {
- static::validateAttribute($key, $value);
+ if(static::$validateAttributes) {
+ foreach($attributes as $key => $value) {
+ static::validateAttribute($key, $value);
+ }
}
}
|
added switch for attribute check for performance comparison reasons
|
diff --git a/ui/app/models/node.js b/ui/app/models/node.js
index <HASH>..<HASH> 100644
--- a/ui/app/models/node.js
+++ b/ui/app/models/node.js
@@ -91,6 +91,21 @@ export default Model.extend({
}
}),
+ compositeStatusIcon: computed('isDraining', 'isEligible', 'status', function() {
+ // ineligible = exclamation point
+ // ready = checkmark
+ // down = x
+ // initializing = exclamation???
+ if (this.isDraining || !this.isEligible) {
+ return 'alert-circle-fill';
+ } else if (this.status === 'down') {
+ return 'cancel-plain';
+ } else if (this.status === 'initializing') {
+ return 'run';
+ }
+ return 'check-plain';
+ }),
+
setEligible() {
if (this.isEligible) return RSVP.resolve();
// Optimistically update schedulingEligibility for immediate feedback
|
Assign icons to node statuses
|
diff --git a/ghost/admin/mirage/fixtures/configs.js b/ghost/admin/mirage/fixtures/configs.js
index <HASH>..<HASH> 100644
--- a/ghost/admin/mirage/fixtures/configs.js
+++ b/ghost/admin/mirage/fixtures/configs.js
@@ -1,7 +1,7 @@
export default [{
clientExtensions: {},
database: 'mysql',
- enableDeveloperExperiments: true,
+ enableDeveloperExperiments: false,
environment: 'development',
labs: {},
mail: 'SMTP',
|
Default developer experiments to "off" in tests
no issue
- we should be testing production functionality by default, if tests need to test functionality behind the developer experiments flag they should explicitly enable it
|
diff --git a/test/test-api.js b/test/test-api.js
index <HASH>..<HASH> 100644
--- a/test/test-api.js
+++ b/test/test-api.js
@@ -19,5 +19,18 @@ describe('Twitter.API Functions:', function() {
api.should.be.an.instanceOf(Object);
});
+
+ it('should throw an exception on missing arguments', function (done) {
+ try {
+ var api = new Twitter.API({
+ 'consumer_key': config.consumer_key
+ });
+ } catch (err) {
+ should.exist(err);
+ should.not.exist(api);
+ done();
+ }
+ });
});
+
});
|
Testing exceptions on missing parameters
On API initialization errors are throwed if it fails to found some
arguments
|
diff --git a/src/app/Services/Search.php b/src/app/Services/Search.php
index <HASH>..<HASH> 100644
--- a/src/app/Services/Search.php
+++ b/src/app/Services/Search.php
@@ -23,11 +23,8 @@ class Search
public function remove($models)
{
- $models = collect($models);
-
- $this->sources = $this->sources
- ->reject(function ($config, $model) use ($models) {
- return $models->contains($model);
- });
+ collect($models)->each(function ($model) {
+ $this->sources->forget($model);
+ });
}
}
|
refines remove logic in search.php
|
diff --git a/cartoframes/context.py b/cartoframes/context.py
index <HASH>..<HASH> 100644
--- a/cartoframes/context.py
+++ b/cartoframes/context.py
@@ -2018,7 +2018,6 @@ def _df2pg_schema(dataframe, pgcolnames):
a SQL query"""
util_cols = set(('the_geom', 'the_geom_webmercator', 'cartodb_id'))
if set(dataframe.columns).issubset(util_cols):
- print(f'subset: {", ".join(dataframe.columns)}')
return ', '.join(dataframe.columns)
schema = ', '.join([
'NULLIF("{col}", \'\')::{t} AS {col}'.format(col=c,
|
removes print with f-string
|
diff --git a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/deployment/ClusteringDependencyProcessor.java b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/deployment/ClusteringDependencyProcessor.java
index <HASH>..<HASH> 100644
--- a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/deployment/ClusteringDependencyProcessor.java
+++ b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/deployment/ClusteringDependencyProcessor.java
@@ -35,7 +35,8 @@ import org.jboss.modules.ModuleLoader;
* {@link DeploymentUnitProcessor} that adds the clustering api to the deployment classpath.
* @author Paul Ferraro
*/
-public class ClusteringDependencyProcessor implements DeploymentUnitProcessor {
+@SuppressWarnings("deprecation")
+public class ClusteringDependencyProcessor implements DeploymentUnitProcessor {
private static final ModuleIdentifier API = ModuleIdentifier.create("org.wildfly.clustering.api");
private static final ModuleIdentifier MARSHALLING_API = ModuleIdentifier.create("org.wildfly.clustering.marshalling.api");
|
Suppress deprecation warnings so long as ModuleIdentifier is required by ModuleSpecification API.
|
diff --git a/tests/common.py b/tests/common.py
index <HASH>..<HASH> 100644
--- a/tests/common.py
+++ b/tests/common.py
@@ -94,9 +94,6 @@ class EWSTest(TimedTestCase):
# Allow unverified TLS if requested in settings file
BaseProtocol.HTTP_ADAPTER_CLS = NoVerifyHTTPAdapter
- # Speed up tests a bit. We don't need to wait 10 seconds for every nonexisting server in the discover dance
- AutodiscoverProtocol.TIMEOUT = 2
-
# Create an account shared by all tests
tz = EWSTimeZone.timezone('Europe/Copenhagen')
cls.retry_policy = FaultTolerance(max_wait=600)
diff --git a/tests/test_autodiscover_legacy.py b/tests/test_autodiscover_legacy.py
index <HASH>..<HASH> 100644
--- a/tests/test_autodiscover_legacy.py
+++ b/tests/test_autodiscover_legacy.py
@@ -22,7 +22,7 @@ class AutodiscoverLegacyTest(EWSTest):
@classmethod
def setUpClass(cls):
super(AutodiscoverLegacyTest, cls).setUpClass()
- AutodiscoverProtocol.INITIAL_RETRY_POLICY = FaultTolerance(max_wait=30)
+ exchangelib.autodiscover.legacy.INITIAL_RETRY_POLICY = FaultTolerance(max_wait=30)
def test_magic(self):
# Just test we don't fail
|
Tweak test settings for stability. Fix for moved INITIAL_RETRY_POLICY
|
diff --git a/redisdb/datadog_checks/redisdb/redisdb.py b/redisdb/datadog_checks/redisdb/redisdb.py
index <HASH>..<HASH> 100644
--- a/redisdb/datadog_checks/redisdb/redisdb.py
+++ b/redisdb/datadog_checks/redisdb/redisdb.py
@@ -134,7 +134,7 @@ class Redis(AgentCheck):
if 'unix_socket_path' in instance:
return instance.get('unix_socket_path'), instance.get('db')
else:
- return instance.get('host'), self.instance.get('port'), instance.get('db')
+ return instance.get('host'), instance.get('port'), instance.get('db')
def _get_conn(self, instance=None):
if instance is None:
|
Remove self.instance when getting port (#<I>)
|
diff --git a/packages/enzyme/src/ReactWrapper.js b/packages/enzyme/src/ReactWrapper.js
index <HASH>..<HASH> 100644
--- a/packages/enzyme/src/ReactWrapper.js
+++ b/packages/enzyme/src/ReactWrapper.js
@@ -298,19 +298,23 @@ class ReactWrapper {
* @param {Function} cb - callback function
* @returns {ReactWrapper}
*/
- setState(state, callback = noop) {
+ setState(state, callback = undefined) {
if (this[ROOT] !== this) {
throw new Error('ReactWrapper::setState() can only be called on the root');
}
if (this.instance() === null || this[RENDERER].getNode().nodeType === 'function') {
throw new Error('ReactWrapper::setState() can only be called on class components');
}
- if (typeof callback !== 'function') {
+ if (arguments.length > 1 && typeof callback !== 'function') {
throw new TypeError('ReactWrapper::setState() expects a function as its second argument');
}
this.instance().setState(state, () => {
this.update();
- callback();
+ if (callback) {
+ const adapter = getAdapter(this[OPTIONS]);
+ const instance = this.instance();
+ adapter.invokeSetStateCallback(instance, callback);
+ }
});
return this;
}
|
[Fix] `mount`: `setState`: invoke callback with the proper receiver
|
diff --git a/lib/active_record_extensions/geometry_columns.rb b/lib/active_record_extensions/geometry_columns.rb
index <HASH>..<HASH> 100644
--- a/lib/active_record_extensions/geometry_columns.rb
+++ b/lib/active_record_extensions/geometry_columns.rb
@@ -57,6 +57,15 @@ module Geos
@geometry_columns
end
+ # Grabs a geometry column based on name.
+ def geometry_column_by_name(name)
+ @geometry_column_by_name ||= self.geometry_columns.inject(HashWithIndifferentAccess.new) do |memo, obj|
+ memo[obj.name] = obj
+ memo
+ end
+ @geometry_column_by_name[name]
+ end
+
protected
# Sets up nifty setters and getters for geometry columns.
# The methods created look like this:
|
New method for grabbing a particular geometry column by its'
column name.
git-svn-id: file:///usr/local/svnroot/ruby_extensions/geos_extensions/trunk@<I> <I>ac<I>-ee<I>-4e<I>-b<I>-<I>b<I>ff<I>b
|
diff --git a/lib/tests/modinfolib_test.php b/lib/tests/modinfolib_test.php
index <HASH>..<HASH> 100644
--- a/lib/tests/modinfolib_test.php
+++ b/lib/tests/modinfolib_test.php
@@ -470,9 +470,10 @@ class core_modinfolib_testcase extends advanced_testcase {
* Tests for function cm_info::get_course_module_record()
*/
public function test_cm_info_get_course_module_record() {
- global $DB, $CFG;
+ global $DB;
$this->resetAfterTest();
+ $this->setAdminUser();
set_config('enableavailability', 1);
set_config('enablecompletion', 1);
|
MDL-<I> core: fixed failing unit test
Part of MDL-<I> epic.
|
diff --git a/pyani/pyani_graphics.py b/pyani/pyani_graphics.py
index <HASH>..<HASH> 100644
--- a/pyani/pyani_graphics.py
+++ b/pyani/pyani_graphics.py
@@ -96,6 +96,10 @@ def heatmap_seaborn(df, outfilename=None, title=None, cmap=None,
# Obtain colour map
cmap = plt.get_cmap(cmap)
+ # Decide on figure layout size
+ figsize = max(8, df.shape[0] * 1.1)
+ print(figsize)
+
# Add class colour bar. The aim is to get a pd.Series for the columns
# of the form:
# 0 colour for class in col 0
@@ -118,6 +122,7 @@ def heatmap_seaborn(df, outfilename=None, title=None, cmap=None,
# Plot heatmap
fig = sns.clustermap(df, cmap=cmap, vmin=vmin, vmax=vmax,
col_colors=col_cb, row_colors=col_cb,
+ figsize=(figsize, figsize),
linewidths=0.5,
xticklabels=newlabels,
yticklabels=newlabels,
@@ -132,7 +137,6 @@ def heatmap_seaborn(df, outfilename=None, title=None, cmap=None,
fig.ax_heatmap.set_yticklabels(fig.ax_heatmap.get_yticklabels(),
rotation=0)
-
# Save to file
if outfilename:
fig.savefig(outfilename)
|
pyani_graphics.py: Modified seaborn presentation
Using seaborn, the annotations in the heatmaps are now visible.
|
diff --git a/src/main/java/net/masterthought/cucumber/ReportBuilder.java b/src/main/java/net/masterthought/cucumber/ReportBuilder.java
index <HASH>..<HASH> 100755
--- a/src/main/java/net/masterthought/cucumber/ReportBuilder.java
+++ b/src/main/java/net/masterthought/cucumber/ReportBuilder.java
@@ -51,7 +51,7 @@ public class ReportBuilder {
private Map<String, String> customHeader;
- private final String VERSION = "cucumber-reporting-0.0.23";
+ private final String VERSION = "cucumber-reporting-0.0.24";
public ReportBuilder(List<String> jsonReports, File reportDirectory, String pluginUrlPath, String buildNumber, String buildProject, boolean skippedFails, boolean undefinedFails, boolean flashCharts, boolean runWithJenkins, boolean artifactsEnabled, String artifactConfig, boolean highCharts) throws Exception {
|
Updated VERSION variable to the latest version
The version should be taken from somewhere instead of being hardcoded in the Java file.
|
diff --git a/lib/less/tree/debug-info.js b/lib/less/tree/debug-info.js
index <HASH>..<HASH> 100644
--- a/lib/less/tree/debug-info.js
+++ b/lib/less/tree/debug-info.js
@@ -16,9 +16,10 @@ const debugInfo = (context, ctx, lineSeparator) => {
return result;
};
-debugInfo.asComment = ctx => `/* line ${ctx.debugInfo.lineNumber}, ${ctx.debugInfo.fileName} */\n`;
+debugInfo.asComment = ctx => ctx.debugInfo ? `/* line ${ctx.debugInfo.lineNumber}, ${ctx.debugInfo.fileName} */\n` : '';
debugInfo.asMediaQuery = ctx => {
+ if (!ctx.debugInfo) { return ''; }
let filenameWithProtocol = ctx.debugInfo.fileName;
if (!/^[a-z]+:\/\//i.test(filenameWithProtocol)) {
filenameWithProtocol = `file://${filenameWithProtocol}`;
|
issue#<I> ignore missing debugInfo (#<I>)
|
diff --git a/utils/reflector/src/main/java/org/robolectric/util/reflector/ReflectorClassWriter.java b/utils/reflector/src/main/java/org/robolectric/util/reflector/ReflectorClassWriter.java
index <HASH>..<HASH> 100644
--- a/utils/reflector/src/main/java/org/robolectric/util/reflector/ReflectorClassWriter.java
+++ b/utils/reflector/src/main/java/org/robolectric/util/reflector/ReflectorClassWriter.java
@@ -80,7 +80,7 @@ class ReflectorClassWriter extends ClassWriter {
void write() {
int accessModifiers =
- iClass.getModifiers() & (Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE);
+ iClass.getModifiers() & (Modifier.PUBLIC | Modifier.PROTECTED);
visit(
V1_5,
accessModifiers | ACC_SUPER | ACC_FINAL,
|
Generate reflector class with valid access
|
diff --git a/command/format.go b/command/format.go
index <HASH>..<HASH> 100644
--- a/command/format.go
+++ b/command/format.go
@@ -74,7 +74,7 @@ func outputFormatTable(ui cli.Ui, s *api.Secret, whitespace bool) int {
if len(s.Warnings) != 0 {
input = append(input, "")
- input = append(input, "The following warnings were generated:")
+ input = append(input, "The following warnings were returned from the Vault server:")
for _, warning := range s.Warnings {
input = append(input, fmt.Sprintf("* %s", warning))
}
|
Adjust warnings message to make it clear they are from the server
|
diff --git a/pkg/services/notifications/webhook.go b/pkg/services/notifications/webhook.go
index <HASH>..<HASH> 100644
--- a/pkg/services/notifications/webhook.go
+++ b/pkg/services/notifications/webhook.go
@@ -48,6 +48,10 @@ func (ns *NotificationService) sendWebRequestSync(ctx context.Context, webhook *
webhook.HttpMethod = http.MethodPost
}
+ if webhook.HttpMethod != http.MethodPost && webhook.HttpMethod != http.MethodPut {
+ return fmt.Errorf("webhook only supports HTTP methods PUT or POST")
+ }
+
request, err := http.NewRequest(webhook.HttpMethod, webhook.Url, bytes.NewReader([]byte(webhook.Body)))
if err != nil {
return err
|
Security: Fixes minor security issue with alert notification webhooks that allowed GET & DELETE requests #<I>
|
diff --git a/web/src/getValueOrFallback.js b/web/src/getValueOrFallback.js
index <HASH>..<HASH> 100644
--- a/web/src/getValueOrFallback.js
+++ b/web/src/getValueOrFallback.js
@@ -1,23 +1,21 @@
-import { has, get } from 'lodash';
+import { has, get, merge } from 'lodash';
export default function getValueOrFallback(state, calculatedState, fallbackState, paths, parse) {
+ const combinedState = merge({}, state, calculatedState);
for (let path of paths) {
- if (has(state, path)) {
+ if (has(combinedState, path)) {
if (parse) {
try {
- return parse(get(state, path));
+ return parse(get(combinedState, path));
}
catch {
continue;
}
}
else {
- return get(state, path);
+ return get(combinedState, path);
}
}
- else if (has(calculatedState, path)) {
- return get(calculatedState, path);
- }
else {
continue;
}
|
Calculated state should override raw state.
|
diff --git a/lib/EasyPost/Resource.php b/lib/EasyPost/Resource.php
index <HASH>..<HASH> 100644
--- a/lib/EasyPost/Resource.php
+++ b/lib/EasyPost/Resource.php
@@ -96,15 +96,6 @@ abstract class Resource extends Object
return Util::convertToEasyPostObject($response, $apiKey);
}
- public static function string_to_params($params = array(), $pieces = array()) {
- if (count($pieces) == 0) {
- return $params;
- }
- $first_piece = array_shift($pieces);
- $params[] = $first_piece;
- return \EasyPost\Resource::string_to_params($params, $pieces);
- }
-
protected function _save($class)
{
self::_validate('save');
|
Removed a vestigial function.
|
diff --git a/lib/tdiary/configuration.rb b/lib/tdiary/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/tdiary/configuration.rb
+++ b/lib/tdiary/configuration.rb
@@ -111,9 +111,10 @@ module TDiary
cgi_conf = @io_class.load_cgi_conf(self)
- eval( def_vars1, binding )
+ b = binding
+ eval( def_vars1, b )
begin
- eval( cgi_conf, binding, "(TDiary::Configuration#load_cgi_conf)", 1 )
+ eval( cgi_conf, b, "(TDiary::Configuration#load_cgi_conf)", 1 )
rescue SyntaxError
enc = case @lang
when 'en'
@@ -124,7 +125,7 @@ module TDiary
cgi_conf.force_encoding( enc )
retry
end if cgi_conf
- eval( def_vars2, binding )
+ eval( def_vars2, b )
end
# loading tdiary.conf in current directory
|
Partly reverted evaluate binding on configuration
|
diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -72,7 +72,7 @@ const startServer = (config, callback) => {
child.kill();
return typeof cb === 'function' ? cb() : undefined;
};
- serverCb();
+ setTimeout(serverCb, 0);
return child;
} else {
const opts = {noLog: true, path: publicPath};
|
Fix handling of custom servers. Closes GH-<I>
|
diff --git a/ibis/backends/datafusion/__init__.py b/ibis/backends/datafusion/__init__.py
index <HASH>..<HASH> 100644
--- a/ibis/backends/datafusion/__init__.py
+++ b/ibis/backends/datafusion/__init__.py
@@ -128,13 +128,12 @@ class Backend(BaseBackend):
schema
An optional schema
"""
- self._context.register_csv(name, path, schema=schema)
+ self._context.register_csv(name, str(path), schema=schema)
def register_parquet(
self,
name: str,
path: str | Path,
- schema: sch.Schema | None = None,
) -> None:
"""Register a parquet file with with `name` located at `path`.
@@ -147,7 +146,7 @@ class Backend(BaseBackend):
schema
An optional schema
"""
- self._context.register_parquet(name, path, schema=schema)
+ self._context.register_parquet(name, str(path))
def execute(
self,
|
fix: remove passing schema into register_parquet
|
diff --git a/Test/function_test.py b/Test/function_test.py
index <HASH>..<HASH> 100644
--- a/Test/function_test.py
+++ b/Test/function_test.py
@@ -705,4 +705,8 @@ array([[5, 1],
>>> cm4.to_array()
array([[3, 1],
[0, 0]])
+>>> cm4 = ConfusionMatrix([1,1,1,1],["1",2,1,1],classes=[1,2])
+>>> cm4.to_array()
+array([[3, 1],
+ [0, 0]])
"""
|
test : a test added.
|
diff --git a/rulebook-core/src/main/java/com/deliveredtechnologies/rulebook/model/runner/RuleAdapter.java b/rulebook-core/src/main/java/com/deliveredtechnologies/rulebook/model/runner/RuleAdapter.java
index <HASH>..<HASH> 100644
--- a/rulebook-core/src/main/java/com/deliveredtechnologies/rulebook/model/runner/RuleAdapter.java
+++ b/rulebook-core/src/main/java/com/deliveredtechnologies/rulebook/model/runner/RuleAdapter.java
@@ -187,7 +187,7 @@ public class RuleAdapter implements Rule {
.ifPresent(field -> {
field.setAccessible(true);
try {
- if (result.getValue() != null) {
+ if (field.getType().isAssignableFrom((result.getValue().getClass()))) {
field.set(_pojoRule, result.getValue());
}
} catch (Exception ex) {
|
updated RuleAdapter to not set result is it's not assignable
|
diff --git a/connection.go b/connection.go
index <HASH>..<HASH> 100644
--- a/connection.go
+++ b/connection.go
@@ -129,17 +129,20 @@ func (connection *redisConnection) heartbeat(errChan chan<- error) {
errorCount++
- select { // try to add error to channel, but don't block
- case errChan <- &HeartbeatError{RedisErr: err, Count: errorCount}:
- default:
- }
-
if errorCount >= HeartbeatErrorLimit {
// reached error limit
connection.StopAllConsuming()
+ // Clients reading from errChan need to see this error
+ // This allows them to shut themselves down
+ // Therefore we block adding it to errChan to ensure delivery
+ errChan <- &HeartbeatError{RedisErr: err, Count: errorCount}
return
+ } else {
+ select { // try to add error to channel, but don't block
+ case errChan <- &HeartbeatError{RedisErr: err, Count: errorCount}:
+ default:
+ }
}
-
// keep trying until we hit the limit
}
}
|
HeartbeatError is sent blocking on shutdown
When the heartbeat error threshold is reached, and RMQ shuts itself
down, the final HeartbeatError is sent in a blocking manner.
We do this to ensure that if the client is listening for this error it
is guaranteed to eventually see the error. If this critical error is
dropped the client may be unaware that RMQ has stopped working and won't
shut itself down.
|
diff --git a/mbed/mbed.py b/mbed/mbed.py
index <HASH>..<HASH> 100644
--- a/mbed/mbed.py
+++ b/mbed/mbed.py
@@ -42,7 +42,11 @@ ver = '1.2.2'
# Default paths to Mercurial and Git
hg_cmd = 'hg'
git_cmd = 'git'
+
+# override python command when running standalone Mbed CLI
python_cmd = sys.executable
+if os.path.basename(python_cmd).startswith('mbed'):
+ python_cmd = 'python'
ignores = [
# Version control folders
|
Fall back to python when exec name starts with mbed, allows for standalone Mbed CLI install
|
diff --git a/pkg/kubectl/cmd/cp.go b/pkg/kubectl/cmd/cp.go
index <HASH>..<HASH> 100644
--- a/pkg/kubectl/cmd/cp.go
+++ b/pkg/kubectl/cmd/cp.go
@@ -287,9 +287,22 @@ func (o *CopyOptions) copyFromPod(src, dest fileSpec) error {
}()
prefix := getPrefix(src.File)
prefix = path.Clean(prefix)
+ // remove extraneous path shortcuts - these could occur if a path contained extra "../"
+ // and attempted to navigate beyond "/" in a remote filesystem
+ prefix = stripPathShortcuts(prefix)
return untarAll(reader, dest.File, prefix)
}
+// stripPathShortcuts removes any leading or trailing "../" from a given path
+func stripPathShortcuts(p string) string {
+ newPath := path.Clean(p)
+ if len(newPath) > 0 && string(newPath[0]) == "/" {
+ return newPath[1:]
+ }
+
+ return newPath
+}
+
func makeTar(srcPath, destPath string, writer io.Writer) error {
// TODO: use compression here?
tarWriter := tar.NewWriter(writer)
|
remove extra "../" when copying from pod to local
|
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index <HASH>..<HASH> 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -6196,6 +6196,14 @@ function unzip_file ($zipfile, $destination = '', $showstatus = true) {
return false;
}
+ //Clear $zipfile
+ $zipfile = cleardoubleslashes($zipfile);
+
+ //Check zipfile exists
+ if (!file_exists($zipfile)) {
+ return false;
+ }
+
//If no destination, passed let's go with the same directory
if (empty($destination)) {
$destination = $zippath;
|
Added one check to test that the zipfile in unzip_file() is real!
|
diff --git a/src/main/java/com/brettonw/bag/formats/text/FormatReaderText.java b/src/main/java/com/brettonw/bag/formats/text/FormatReaderText.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/brettonw/bag/formats/text/FormatReaderText.java
+++ b/src/main/java/com/brettonw/bag/formats/text/FormatReaderText.java
@@ -35,7 +35,20 @@ public class FormatReaderText extends FormatReader {
for (String entry : entries) {
entry = entry.trim ();
if ((entry.length () > 0) && (! (entry.startsWith (ignoreEntryMarker)))) {
- bagArray.add (entry);
+ if (pairSeparator != null) {
+ String[] fields = entry.split (pairSeparator);
+ if (fields.length > 1) {
+ BagArray fieldArray = new BagArray (fields.length);
+ for (String field : fields) {
+ fieldArray.add (field);
+ }
+ bagArray.add (fieldArray);
+ } else {
+ bagArray.add (fields[0]);
+ }
+ } else {
+ bagArray.add (entry);
+ }
}
}
return bagArray;
|
minor update to allow reading array files with the pair delimiter, may want to come back to that someday...
|
diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php
index <HASH>..<HASH> 100644
--- a/src/JoomlaBrowser.php
+++ b/src/JoomlaBrowser.php
@@ -124,8 +124,10 @@ class JoomlaBrowser extends WebDriver
$I->click('Install');
// Wait while Joomla gets installed
- $I->waitForText('Congratulations! Joomla! is now installed.', 30, 'h3');
+ $this->debug('I wait for Joomla being installed');
+ $I->waitForText('Congratulations! Joomla! is now installed.', 10, '//h3');
$this->debug('Joomla is now installed');
+ $I->see('Congratulations! Joomla! is now installed.','//h3');
}
/**
|
Move CSS locators to XPath in Joomla installation
|
diff --git a/src/InputController/CLIController/CLIArgument.php b/src/InputController/CLIController/CLIArgument.php
index <HASH>..<HASH> 100644
--- a/src/InputController/CLIController/CLIArgument.php
+++ b/src/InputController/CLIController/CLIArgument.php
@@ -3,7 +3,7 @@
* TypeValidator
*/
-namespace Orpheus\InputController;
+namespace Orpheus\InputController\CLIController;
/**
* The CLIArgument class
diff --git a/src/InputController/CLIController/CLIRoute.php b/src/InputController/CLIController/CLIRoute.php
index <HASH>..<HASH> 100644
--- a/src/InputController/CLIController/CLIRoute.php
+++ b/src/InputController/CLIController/CLIRoute.php
@@ -7,9 +7,8 @@ namespace Orpheus\InputController\CLIController;
use Orpheus\InputController\ControllerRoute;
use Orpheus\InputController\InputRequest;
-use Orpheus;
use Orpheus\InputController\TypeValidator;
-use Orpheus\InputController\CLIArgument;
+use Orpheus\InputController\CLIController\CLIArgument;
/**
* The CLIRoute class
|
Implement CLI classes for MVC (unstable)
|
diff --git a/src/com/opera/core/systems/OperaWebElement.java b/src/com/opera/core/systems/OperaWebElement.java
index <HASH>..<HASH> 100644
--- a/src/com/opera/core/systems/OperaWebElement.java
+++ b/src/com/opera/core/systems/OperaWebElement.java
@@ -114,6 +114,7 @@ public class OperaWebElement extends RemoteWebElement {
return debugger.callFunctionOnObject(script, objectId, true);
}
+ // TODO(andreastt): OPDRV-199
public void click() {
assertElementNotStale();
assertElementDisplayed();
diff --git a/test/com/opera/core/systems/pages/WindowPage.java b/test/com/opera/core/systems/pages/WindowPage.java
index <HASH>..<HASH> 100644
--- a/test/com/opera/core/systems/pages/WindowPage.java
+++ b/test/com/opera/core/systems/pages/WindowPage.java
@@ -71,6 +71,7 @@ public class WindowPage extends Page {
String currentWindow = driver.getWindowHandle();
// Trigger new window load and wait for window to open
+ // TODO: OPDRV-199
windowLink.click();
try {
Thread.sleep(100);
|
Adding a note about OPDRV-<I>
|
diff --git a/lib/html/pipeline/emoji_filter.rb b/lib/html/pipeline/emoji_filter.rb
index <HASH>..<HASH> 100644
--- a/lib/html/pipeline/emoji_filter.rb
+++ b/lib/html/pipeline/emoji_filter.rb
@@ -65,7 +65,7 @@ module HTML
if context[:asset_path]
context[:asset_path].gsub(":file_name", "#{::CGI.escape(name)}.png")
else
- "emoji/#{::CGI.escape(name)}.png"
+ File.join("emoji", "#{::CGI.escape(name)}.png")
end
end
|
Using File.join to join asset path segments.
|
diff --git a/pysnmp/entity/rfc3413/ntforg.py b/pysnmp/entity/rfc3413/ntforg.py
index <HASH>..<HASH> 100644
--- a/pysnmp/entity/rfc3413/ntforg.py
+++ b/pysnmp/entity/rfc3413/ntforg.py
@@ -171,6 +171,10 @@ class NotificationOriginator:
):
debug.logger & debug.flagApp and debug.logger('sendNotification: notificationTarget %s, notificationName %s, additionalVarBinds %s, contextName "%s", instanceIndex %s' % (notificationTarget, notificationName, additionalVarBinds, contextName, instanceIndex))
+ if contextName:
+ __SnmpAdminString, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
+ contextName = __SnmpAdminString(contextName)
+
# 3.3
( notifyTag,
notifyType ) = config.getNotificationInfo(
|
cast non-default contextName into pyasn1 object to avoid Py3K comparation
issues
|
diff --git a/lib/fog/hp/storage.rb b/lib/fog/hp/storage.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/hp/storage.rb
+++ b/lib/fog/hp/storage.rb
@@ -29,15 +29,16 @@ module Fog
module Utils
def cdn
- @cdn ||= Fog::CDN.new(
- :provider => 'HP',
- :hp_account_id => @hp_account_id,
- :hp_secret_key => @hp_secret_key,
- :hp_auth_uri => @hp_auth_uri
- )
- if @cdn.enabled?
- @cdn
- end
+ #@cdn ||= Fog::CDN.new(
+ # :provider => 'HP',
+ # :hp_account_id => @hp_account_id,
+ # :hp_secret_key => @hp_secret_key,
+ # :hp_auth_uri => @hp_auth_uri
+ #)
+ #if @cdn.enabled?
+ # @cdn
+ #end
+ nil
end
def url
|
Remove CDN integration from within Storage service, till CDN service is more mature.
|
diff --git a/src/DuskServer.php b/src/DuskServer.php
index <HASH>..<HASH> 100644
--- a/src/DuskServer.php
+++ b/src/DuskServer.php
@@ -131,7 +131,7 @@ class DuskServer
{
$this->guardServerStarting();
- $this->process = new Process($this->prepareCommand());
+ $this->process = Process::fromShellCommandline($this->prepareCommand());
$this->process->setWorkingDirectory($this->laravelPublicPath());
$this->process->start();
}
|
Update to Process::fromShellCommandline().
|
diff --git a/system/Helpers/form_helper.php b/system/Helpers/form_helper.php
index <HASH>..<HASH> 100644
--- a/system/Helpers/form_helper.php
+++ b/system/Helpers/form_helper.php
@@ -2,7 +2,28 @@
/**
* CodeIgniter
- *
+ *<?= form_open(current_url()); ?>
+<?=
+form_field(
+ 'email',
+ ['name' => 'p[username]', 'pattern' => esc(INPUT_PATTERN_EMAIL_HTML,'html'), 'autofocus' => false],
+ ['use_defaults' => true],
+ array_merge($label_col, ['text' => lang('PagesUser.logInFormEmailLabel')]),
+ $field_col
+);
+?>
+<?=
+form_field(
+ 'password',
+ ['name' => 'p[username]'],
+ ['use_defaults' => true],
+ array_merge($label_col, ['text' => lang('PagesUser.logInFormEmailLabel')]),
+ $field_col
+);
+?>
+<?= form_close(); ?>
+
+
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
@@ -927,7 +948,7 @@ if (! function_exists('parse_form_attributes'))
foreach ($default as $key => $val)
{
- if($val !== false)
+ if(!is_bool($val))
{
if ($key === 'value')
{
|
Update form_helper.php
better to use is_bool here (instead of my previous solution which was $value !== false) , that way we left more flexibility for users for pre/post process attributes
|
diff --git a/tasks/npm.js b/tasks/npm.js
index <HASH>..<HASH> 100644
--- a/tasks/npm.js
+++ b/tasks/npm.js
@@ -26,7 +26,7 @@ module.exports = function(grunt) {
var done = this.async();
var pkg = grunt.config('pkg');
var minor = parseInt(pkg.version.split('.')[1], 10);
- var tag = minor % 2 ? 'latest' : 'canary';
+ var tag = minor % 2 ? 'canary' : 'latest';
exec('npm publish --tag ' + tag, function(err, output, error) {
if (err) return grunt.fail.fatal(err.message.replace(/\n$/, '.'));
|
Fix grunt npm-release task
|
diff --git a/environs/azure/instance.go b/environs/azure/instance.go
index <HASH>..<HASH> 100644
--- a/environs/azure/instance.go
+++ b/environs/azure/instance.go
@@ -62,7 +62,10 @@ func (azInstance *azureInstance) Addresses() ([]instance.Address, error) {
func (azInstance *azureInstance) netInfo() (ip, netname string, err error) {
err = azInstance.apiCall(false, func(c *azureManagementContext) error {
- d, err := c.GetDeployment(&gwacl.GetDeploymentRequest{ServiceName: azInstance.ServiceName})
+ d, err := c.GetDeployment(&gwacl.GetDeploymentRequest{
+ ServiceName: azInstance.ServiceName,
+ DeploymentName: azInstance.ServiceName,
+ })
if err != nil {
return err
}
|
tweak to make the code actually work... turns out you need the deploymentname on GetdeploymentRequest
|
diff --git a/lib/docker-sync/preconditions.rb b/lib/docker-sync/preconditions.rb
index <HASH>..<HASH> 100644
--- a/lib/docker-sync/preconditions.rb
+++ b/lib/docker-sync/preconditions.rb
@@ -55,7 +55,7 @@ module Preconditions
if Thor::Shell::Basic.new.yes?('Shall I install unison-fsmonitor for you? (y/N)')
system cmd1
else
- raise("Please install it, see https://github.com/hnsl/unox, or simply run :\n #{cmd1} && #{cmd2}")
+ raise("Please install it, see https://github.com/hnsl/unox, or simply run :\n #{cmd1}")
end
end
@@ -65,7 +65,6 @@ module Preconditions
`python -c 'import fsevents'`
unless $?.success?
Thor::Shell::Basic.new.say_status 'warning','Could not find macfsevents. Will try to install it using pip', :red
- sudo = false
if find_executable0('python') == '/usr/bin/python'
Thor::Shell::Basic.new.say_status 'ok','You seem to use the system python, we will need sudo below'
sudo = true
|
fix old leftover with cmd2, #<I>
|
diff --git a/hydra_base/lib/attributes.py b/hydra_base/lib/attributes.py
index <HASH>..<HASH> 100644
--- a/hydra_base/lib/attributes.py
+++ b/hydra_base/lib/attributes.py
@@ -1289,6 +1289,8 @@ def delete_duplicate_attributes(dupe_list):
db.DBSession.flush()
+ return keeper
+
def remap_attribute_reference(old_attr_id, new_attr_id, flush=False):
"""
Remap everything which references old_attr_id to reference
|
Return keeper attribute when remapping attributes so clients can access the ID of the kept attribute
|
diff --git a/event/registry.go b/event/registry.go
index <HASH>..<HASH> 100644
--- a/event/registry.go
+++ b/event/registry.go
@@ -50,7 +50,7 @@ type registry struct {
dispatcher func(r *registry, name string, ev ...interface{})
}
-func NewRegistry() *registry {
+func NewRegistry() EventRegistry {
r := ®istry{events: make(map[string]*list.List)}
r.Parallel()
return r
@@ -89,6 +89,14 @@ func (r *registry) Dispatch(name string, ev ...interface{}) {
r.dispatcher(r, name, ev...)
}
+func (r *registry) ClearEvents(name string) {
+ r.Lock()
+ defer r.Unlock()
+ if l, ok := r.events[name]; ok {
+ l.Init()
+ }
+}
+
func (r *registry) Parallel() {
r.dispatcher = (*registry).parallelDispatch
}
|
Make struct registry conform to EventRegistry.
|
diff --git a/src/renderer/Renderer.js b/src/renderer/Renderer.js
index <HASH>..<HASH> 100644
--- a/src/renderer/Renderer.js
+++ b/src/renderer/Renderer.js
@@ -36,7 +36,7 @@ export const FILTERING_THRESHOLD = 0.5;
*/
export const RTT_WIDTH = 1024;
-export const MIN_VERTEX_TEXTURE_IMAGE_UNITS_NEEDED = 16;
+export const MIN_VERTEX_TEXTURE_IMAGE_UNITS_NEEDED = 8;
/**
* @description Renderer constructor. Use it to create a new renderer bound to the provided canvas.
diff --git a/test/unit/renderer/renderer.test.js b/test/unit/renderer/renderer.test.js
index <HASH>..<HASH> 100644
--- a/test/unit/renderer/renderer.test.js
+++ b/test/unit/renderer/renderer.test.js
@@ -33,7 +33,7 @@ describe('src/renderer/Renderer', () => {
};
const webGLInvalidImageTextureUnits = {
MAX_RENDERBUFFER_SIZE: RTT_WIDTH,
- MAX_VERTEX_TEXTURE_IMAGE_UNITS: 8,
+ MAX_VERTEX_TEXTURE_IMAGE_UNITS: 4,
getExtension: () => ({}),
getParameter
};
|
Lower minimum MAX_VERTEX_TEXTURE_IMAGE_UNITS requirement
|
diff --git a/environs/ec2/auth.go b/environs/ec2/auth.go
index <HASH>..<HASH> 100644
--- a/environs/ec2/auth.go
+++ b/environs/ec2/auth.go
@@ -47,7 +47,7 @@ func expandFileName(f string) string {
func authorizedKeys(path string) (string, error) {
var files []string
if path == "" {
- files = []string{"id_dsa.pub", "id_rsa.pub", "identity.pub", "authorized_keys"}
+ files = []string{"id_dsa.pub", "id_rsa.pub", "identity.pub"}
} else {
files = []string{path}
}
|
do not use authorized_keys file
|
diff --git a/test/helpers/node.go b/test/helpers/node.go
index <HASH>..<HASH> 100644
--- a/test/helpers/node.go
+++ b/test/helpers/node.go
@@ -251,10 +251,10 @@ func (s *SSHMeta) ExecContext(ctx context.Context, cmd string, options ...ExecOp
wg: &wg,
}
+ res.wg.Add(1)
go func(res *CmdRes) {
- start := time.Now()
- res.wg.Add(1)
defer res.wg.Done()
+ start := time.Now()
err := s.sshClient.RunCommandContext(ctx, command)
if err != nil {
exiterr, isExitError := err.(*ssh.ExitError)
|
test: add WaitGroup delta before goroutine
To avoid a WaitGroup.Wait() being executed without the
execution of Add(1), the Add(1) should be perform before a go routine
initialization.
|
diff --git a/go/vt/mysqlctl/schema.go b/go/vt/mysqlctl/schema.go
index <HASH>..<HASH> 100644
--- a/go/vt/mysqlctl/schema.go
+++ b/go/vt/mysqlctl/schema.go
@@ -133,7 +133,7 @@ func ResolveTables(mysqld MysqlDaemon, dbName string, tables []string) ([]string
// GetColumns returns the columns of table.
func (mysqld *Mysqld) GetColumns(dbName, table string) ([]string, error) {
- conn, err := mysqld.dbaPool.Get(context.TODO())
+ conn, err := getPoolReconnect(context.TODO(), mysqld.dbaPool)
if err != nil {
return nil, err
}
@@ -152,7 +152,7 @@ func (mysqld *Mysqld) GetColumns(dbName, table string) ([]string, error) {
// GetPrimaryKeyColumns returns the primary key columns of table.
func (mysqld *Mysqld) GetPrimaryKeyColumns(dbName, table string) ([]string, error) {
- conn, err := mysqld.dbaPool.Get(context.TODO())
+ conn, err := getPoolReconnect(context.TODO(), mysqld.dbaPool)
if err != nil {
return nil, err
}
|
Always verify pool connections when working on ApplySchema request. (#<I>)
When we just get a connection from the pool it might be already closed due to
MySQL restart or some other reason. This results in bogus errors returned to
the user requesting to apply new schema. By using getPoolReconnect() instead we
make sure that the connection we get is actually live. Note that only
GetColumns() and GetPrimaryKeyColumns() need to be fixed, because all other
places here already use getPoolReconnect().
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@ with open('requirements.txt') as f:
setup(
name='rip',
- version='0.0.5c',
+ version='0.0.8c',
description='A python framework for writing restful APIs.',
long_description=readme + '\n\n' + history,
author='Aplopio developers',
|
Update the version in setup.py
|
diff --git a/client.go b/client.go
index <HASH>..<HASH> 100644
--- a/client.go
+++ b/client.go
@@ -8,7 +8,6 @@ import (
"net/http"
"net/url"
"strings"
- "sync"
"time"
"github.com/gogap/errors"
@@ -46,13 +45,12 @@ type MNSClient interface {
}
type AliMNSClient struct {
- Timeout int64
- url string
- credential Credential
- accessKeyId string
- clientLocker sync.Mutex
- client *http.Client
- proxyURL string
+ Timeout int64
+ url string
+ credential Credential
+ accessKeyId string
+ client *http.Client
+ proxyURL string
}
func NewAliMNSClient(url, accessKeyId, accessKeySecret string) MNSClient {
@@ -152,9 +150,6 @@ func (p *AliMNSClient) Send(method Method, headers map[string]string, message in
postBodyReader := strings.NewReader(string(xmlContent))
- p.clientLocker.Lock()
- defer p.clientLocker.Unlock()
-
var req *http.Request
if req, err = http.NewRequest(string(method), url, postBodyReader); err != nil {
err = ERR_CREATE_NEW_REQUEST_FAILED.New(errors.Params{"err": err})
|
remove lock of http request, it will lock loing polling
|
diff --git a/test/stream.js b/test/stream.js
index <HASH>..<HASH> 100644
--- a/test/stream.js
+++ b/test/stream.js
@@ -1,7 +1,8 @@
var expect = require('chai').expect;
var util = require('./util');
-var Stream = require('../lib/stream').Stream;
+var stream = require('../lib/stream');
+var Stream = stream.Stream;
function createStream() {
var stream = new Stream(util.log);
@@ -307,4 +308,17 @@ describe('stream.js', function() {
});
});
});
+
+ describe('bunyan formatter', function() {
+ describe('`s`', function() {
+ var format = stream.serializers.s;
+ it('should assign a unique ID to each frame', function() {
+ var stream1 = createStream();
+ var stream2 = createStream();
+ expect(format(stream1)).to.be.equal(format(stream1));
+ expect(format(stream2)).to.be.equal(format(stream2));
+ expect(format(stream1)).to.not.be.equal(format(stream2));
+ });
+ });
+ });
});
|
Stream tests: testin bunyan formatter.
|
diff --git a/flask_appbuilder/api/convert.py b/flask_appbuilder/api/convert.py
index <HASH>..<HASH> 100644
--- a/flask_appbuilder/api/convert.py
+++ b/flask_appbuilder/api/convert.py
@@ -96,7 +96,6 @@ class Model2SchemaConverter(BaseModel2SchemaConverter):
class Meta:
model = _model
fields = columns
- strict = True
load_instance = True
sqla_session = self.datamodel.session
@@ -105,7 +104,6 @@ class Model2SchemaConverter(BaseModel2SchemaConverter):
class MetaSchema(SQLAlchemyAutoSchema, class_mixin):
class Meta:
model = _model
- strict = True
load_instance = True
sqla_session = self.datamodel.session
|
refactor: remove unnecessary strict option from schemas (#<I>)
|
diff --git a/lib/WebSocket.js b/lib/WebSocket.js
index <HASH>..<HASH> 100644
--- a/lib/WebSocket.js
+++ b/lib/WebSocket.js
@@ -465,6 +465,7 @@ function initAsClient(address, options) {
var isSecure = serverUrl.protocol === 'wss:' || serverUrl.protocol === 'https:';
var httpObj = isSecure ? https : http;
var port = serverUrl.port || (isSecure ? 443 : 80);
+ var auth = serverUrl.auth;
// expose state properties
this._isServer = false;
@@ -501,6 +502,12 @@ function initAsClient(address, options) {
'Sec-WebSocket-Key': key
}
};
+
+ // If we have basic auth
+ if (auth) {
+ requestOptions.headers['authorization'] = new Buffer('Basic ' + auth).toString('base64');
+ }
+
if (options.value.protocol) {
requestOptions.headers['Sec-WebSocket-Protocol'] = options.value.protocol;
}
|
[fix] add ability to handle basic auth
|
diff --git a/angular-intercom.js b/angular-intercom.js
index <HASH>..<HASH> 100644
--- a/angular-intercom.js
+++ b/angular-intercom.js
@@ -46,12 +46,22 @@
var _intercom = angular.isFunction($window.Intercom) ? $window.Intercom : angular.noop;
if (_asyncLoading) {
+ // wait up to 1 sec before aborting
+ var _try = 10;
// Load client in the browser
- var onScriptLoad = function(callback) {
+ var onScriptLoad = function tryF(callback) {
$timeout(function() {
- // Resolve the deferred promise
- // as the Intercom object on the window
- deferred.resolve($window.Intercom);
+ if(_try === 0){
+ return deferred.resolve($window.Intercom);
+ }
+
+ if($window.Intercom){
+ // Resolve the deferred promise
+ // as the Intercom object on the window
+ return deferred.resolve($window.Intercom);
+ }
+ _try--;
+ setTimeout(tryF.bind(null, callback), 100); // wait 100ms before next try
});
};
createScript($document[0], onScriptLoad);
|
Retry each <I>ms for 1s intercom async loading, fixes #2
|
diff --git a/test_path.py b/test_path.py
index <HASH>..<HASH> 100644
--- a/test_path.py
+++ b/test_path.py
@@ -910,17 +910,6 @@ class TestTempDir:
d.__exit__(None, None, None)
assert not d.exists()
- def test_context_manager_exception(self):
- """
- The context manager will not clean up if an exception occurs.
- """
- d = TempDir()
- d.__enter__()
- (d / 'somefile.txt').touch()
- assert not isinstance(d / 'somefile.txt', TempDir)
- d.__exit__(TypeError, TypeError('foo'), None)
- assert d.exists()
-
def test_context_manager_using_with(self):
"""
The context manager will allow using the with keyword and
|
Remove prior expectation that an exception causes a TempDir not to be cleaned up. Ref #<I>.
|
diff --git a/Classes/Lightwerk/SurfTasks/Task/Transfer/RsyncTask.php b/Classes/Lightwerk/SurfTasks/Task/Transfer/RsyncTask.php
index <HASH>..<HASH> 100755
--- a/Classes/Lightwerk/SurfTasks/Task/Transfer/RsyncTask.php
+++ b/Classes/Lightwerk/SurfTasks/Task/Transfer/RsyncTask.php
@@ -42,12 +42,6 @@ class RsyncTask extends Task {
* @return void
*/
public function execute(Node $node, Application $application, Deployment $deployment, array $options = array()) {
- // Create directory if it does not exist
- $this->shell->executeOrSimulate(
- 'mkdir -p ' . escapeshellarg($deployment->getApplicationReleasePath($application)),
- $node,
- $deployment
- );
// Sync files
$this->rsyncService->sync(
// $sourceNode
|
[TASK] Removes mkdir from RsyncTask.php
|
diff --git a/src/test/org/openscience/cdk/io/MDLV2000ReaderTest.java b/src/test/org/openscience/cdk/io/MDLV2000ReaderTest.java
index <HASH>..<HASH> 100644
--- a/src/test/org/openscience/cdk/io/MDLV2000ReaderTest.java
+++ b/src/test/org/openscience/cdk/io/MDLV2000ReaderTest.java
@@ -896,12 +896,13 @@ public class MDLV2000ReaderTest extends SimpleChemObjectReaderTest {
IAtom[] atoms = AtomContainerManipulator.getAtomArray(molecule);
-
+ int r1Count = 0;
for (IAtom atom : atoms) {
if (atom instanceof IPseudoAtom) {
Assert.assertEquals("R1", ((IPseudoAtom) atom).getLabel());
+ r1Count++;
}
}
-
+ Assert.assertEquals(2, r1Count);
}
}
|
Also check that there are two such R1 atoms
|
diff --git a/test/parentchild.js b/test/parentchild.js
index <HASH>..<HASH> 100644
--- a/test/parentchild.js
+++ b/test/parentchild.js
@@ -168,6 +168,7 @@ describe('parent child', function () {
request.get(url, function (err, response, body) {
should.not.exist(err)
body = JSON.parse(body)
+ console.log(err, response, body);
// this confirms that there are no orphans too!
body.hits.total.should.equal(cities.length + (cities.length * people.length))
done()
|
Adding log to see why Travis fails
|
diff --git a/estnltk/layer/span.py b/estnltk/layer/span.py
index <HASH>..<HASH> 100644
--- a/estnltk/layer/span.py
+++ b/estnltk/layer/span.py
@@ -23,7 +23,7 @@ class Span:
self.parent = parent # type: Span
if isinstance(start, int) and isinstance(end, int):
- assert start < end
+ assert start <= end, (start, end)
self._start = start
self._end = end
|
allow Span with start==end
|
diff --git a/samples/boot/oauth2resourceserver-opaque/src/main/java/sample/OAuth2ResourceServerController.java b/samples/boot/oauth2resourceserver-opaque/src/main/java/sample/OAuth2ResourceServerController.java
index <HASH>..<HASH> 100644
--- a/samples/boot/oauth2resourceserver-opaque/src/main/java/sample/OAuth2ResourceServerController.java
+++ b/samples/boot/oauth2resourceserver-opaque/src/main/java/sample/OAuth2ResourceServerController.java
@@ -16,7 +16,6 @@
package sample;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
-import org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -29,8 +28,8 @@ import org.springframework.web.bind.annotation.RestController;
public class OAuth2ResourceServerController {
@GetMapping("/")
- public String index(@AuthenticationPrincipal OAuth2AuthenticatedPrincipal principal) {
- return String.format("Hello, %s!", (String) principal.getAttribute("sub"));
+ public String index(@AuthenticationPrincipal(expression="subject") String subject) {
+ return String.format("Hello, %s!", subject);
}
@GetMapping("/message")
|
Update Opaque Token Sample
Issue gh-<I>
|
diff --git a/validator/sawtooth_validator/server/core.py b/validator/sawtooth_validator/server/core.py
index <HASH>..<HASH> 100644
--- a/validator/sawtooth_validator/server/core.py
+++ b/validator/sawtooth_validator/server/core.py
@@ -162,7 +162,7 @@ class Validator(object):
server_private_key=network_private_key,
heartbeat=True,
public_endpoint=endpoint,
- connection_timeout=30,
+ connection_timeout=120,
max_incoming_connections=100,
max_future_callback_workers=10,
authorize=True,
|
increase connection_timeout to <I>
|
diff --git a/test_tableone.py b/test_tableone.py
index <HASH>..<HASH> 100644
--- a/test_tableone.py
+++ b/test_tableone.py
@@ -78,6 +78,16 @@ class TestTableOne(object):
assert x != y
@with_setup(setup, teardown)
+ def test_examples_used_in_the_readme_run_without_raising_error(self):
+
+ convars = ['time','age','bili','chol','albumin','copper','alk.phos','ast','trig','platelet','protime']
+ catvars = ['status', 'ascites', 'hepato', 'spiders', 'edema','stage', 'sex']
+ strat = 'trt'
+ nonnormal = ['bili']
+ mytable = TableOne(self.data_pbc, convars, catvars, strat, nonnormal, pval=False)
+ mytable = TableOne(self.data_pbc, convars, catvars, strat, nonnormal, pval=True)
+
+ @with_setup(setup, teardown)
def test_overall_mean_and_std_as_expected_for_cont_variable(self):
continuous=['normal','nonnormal','height']
|
add tests for example used in readme
|
diff --git a/lib/tml.rb b/lib/tml.rb
index <HASH>..<HASH> 100644
--- a/lib/tml.rb
+++ b/lib/tml.rb
@@ -38,6 +38,30 @@ module Tml
module Decorators end
module CacheAdapters end
module Generators end
+
+ def self.default_language
+ Tml.config.default_language
+ end
+
+ def self.current_language
+ Tml.session.current_language
+ end
+
+ def self.language(locale)
+ Tml.session.application.language(locale)
+ end
+
+ def self.translate(label, description = '', tokens = {}, options = {})
+ Tml.session.translate(label, description, tokens, options)
+ end
+
+ def self.with_options(opts)
+ Tml.session.with_options(opts) do
+ if block_given?
+ yield
+ end
+ end
+ end
end
%w(tml/base.rb tml tml/api tml/rules_engine tml/tokens tml/tokenizers tml/decorators tml/cache_adapters tml/cache tml/ext).each do |f|
|
Added an external interface for application methods
|
diff --git a/src/frontend/assets/AppAsset.php b/src/frontend/assets/AppAsset.php
index <HASH>..<HASH> 100644
--- a/src/frontend/assets/AppAsset.php
+++ b/src/frontend/assets/AppAsset.php
@@ -24,5 +24,6 @@ class AppAsset extends AssetBundle
// This is a temporary fix because of https://github.com/yiisoft/yii2/issues/2310
// On Pjax page loading, ajax prefilter removes all CSS styles that are not on the main page
'hiqdev\yii2\assets\JqueryResizableColumns\ResizableColumnsAsset',
+ 'hiqdev\assets\pnotify\PNotifyAsset',
];
}
|
Added PNotifyAsset to AppAsset
|
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -247,13 +247,8 @@ module Rails
return [] if options[:skip_sprockets]
gems = []
- if options.dev? || options.edge?
- gems << GemfileEntry.github('sass-rails', 'rails/sass-rails', nil,
- 'Use SCSS for stylesheets')
- else
- gems << GemfileEntry.version('sass-rails', '~> 4.0',
+ gems << GemfileEntry.version('sass-rails', '~> 5.0',
'Use SCSS for stylesheets')
- end
gems << GemfileEntry.version('uglifier',
'>= 1.3.0',
|
New applications should use sass-rails <I>
|
diff --git a/fut/core.py b/fut/core.py
index <HASH>..<HASH> 100644
--- a/fut/core.py
+++ b/fut/core.py
@@ -604,11 +604,12 @@ class Core(object):
:params resource_id: Resource id.
"""
# TODO: add referer to headers (futweb)
- return self.players[baseId(resource_id)]
- '''
- url = '{0}{1}.json'.format(self.urls['card_info'], baseId(resource_id))
- return requests.get(url, timeout=self.timeout).json()
- '''
+ base_id = baseId(resource_id)
+ if base_id in self.players:
+ return self.players[base_id]
+ else: # not a player?
+ url = '{0}{1}.json'.format(self.urls['card_info'], base_id)
+ return requests.get(url, timeout=self.timeout).json()
def searchDefinition(self, asset_id, start=0, count=35):
"""Return variations of the given asset id, e.g. IF cards.
|
core: fix cardInfo for not players
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -81,7 +81,7 @@ Notifications.configure = function(options: Object) {
if ( firstNotification !== null ) {
this._onNotification(firstNotification, true);
}
- });
+ }.bind(this));
}
this.isLoaded = true;
|
Add missing this binding to popInitialNotification callback
When popInitialNotification is true and app is closed, clicking on a notification causes an app crash
|
diff --git a/src/TicketitServiceProvider.php b/src/TicketitServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/TicketitServiceProvider.php
+++ b/src/TicketitServiceProvider.php
@@ -6,6 +6,7 @@ use Collective\Html\FormFacade as CollectiveForm;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Route;
+use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Kordy\Ticketit\Console\Htmlify;
use Kordy\Ticketit\Controllers\InstallController;
@@ -25,6 +26,10 @@ class TicketitServiceProvider extends ServiceProvider
*/
public function boot()
{
+ if (!Schema::hasTable('migrations')) {
+ // Database isn't installed yet.
+ return;
+ }
$installer = new InstallController();
// if a migration or new setting is missing scape to the installation
|
Check migrations table exists before attempting to read table
|
diff --git a/src/Nut/ConfigSet.php b/src/Nut/ConfigSet.php
index <HASH>..<HASH> 100644
--- a/src/Nut/ConfigSet.php
+++ b/src/Nut/ConfigSet.php
@@ -36,10 +36,11 @@ class ConfigSet extends AbstractConfig
$value = $input->getArgument('value');
$backup = $input->getOption('backup');
- $updater->change($key, $value, $backup, true);
- if (is_bool($value)) {
- $value = $value ? 'true' : 'false';
- }
+ $newValue = $value === 'true' || $value === 'false'
+ ? filter_var($value, FILTER_VALIDATE_BOOLEAN)
+ : $value
+ ;
+ $updater->change($key, $newValue, $backup, true);
$this->io->title(sprintf('Updating configuration setting in file %s', $this->file->getFullPath()));
$this->io->success([
|
Pass boolean string as booleans to YamlUpdater
|
diff --git a/src/OpenApi/Model/Parameter.php b/src/OpenApi/Model/Parameter.php
index <HASH>..<HASH> 100644
--- a/src/OpenApi/Model/Parameter.php
+++ b/src/OpenApi/Model/Parameter.php
@@ -56,12 +56,12 @@ final class Parameter
}
}
- public function getName(): ?string
+ public function getName(): string
{
return $this->name;
}
- public function getIn(): ?string
+ public function getIn(): string
{
return $this->in;
}
@@ -91,7 +91,7 @@ final class Parameter
return $this->schema;
}
- public function getStyle(): string
+ public function getStyle(): ?string
{
return $this->style;
}
|
Fix getStyle, getName, getIn return type to be consistent with construct. (#<I>)
|
diff --git a/refiners/ALL/MissingComponentsRefiner.js b/refiners/ALL/MissingComponentsRefiner.js
index <HASH>..<HASH> 100644
--- a/refiners/ALL/MissingComponentsRefiner.js
+++ b/refiners/ALL/MissingComponentsRefiner.js
@@ -40,6 +40,8 @@
result.start[component] = refResult.start[component]
}
});
+
+ result.start.impliedComponents = impliedComponents;
}
return results;
}
|
impliedComponents after filling missing component
|
diff --git a/py3status/modules/backlight.py b/py3status/modules/backlight.py
index <HASH>..<HASH> 100644
--- a/py3status/modules/backlight.py
+++ b/py3status/modules/backlight.py
@@ -109,7 +109,9 @@ class Py3status:
else:
raise Exception(STRING_NOT_AVAILABLE)
- self.format = self.py3.update_placeholder_formats(self.format, {"level": ":d"})
+ self.format = self.py3.update_placeholder_formats(
+ self.format, {"level": ":.0f"}
+ )
# check for an error code and an output
self.command_available = False
try:
|
backlight module: round brightness percentage instead of truncating (#<I>)
|
diff --git a/logstash_formatter.go b/logstash_formatter.go
index <HASH>..<HASH> 100644
--- a/logstash_formatter.go
+++ b/logstash_formatter.go
@@ -44,7 +44,8 @@ func (f *LogstashFormatter) FormatWithPrefix(entry *logrus.Entry, prefix string)
timeStampFormat := f.TimestampFormat
if timeStampFormat == "" {
- timeStampFormat = logrus.DefaultTimestampFormat
+ //timeStampFormat = logrus.DefaultTimestampFormat
+ timeStampFormat = "2006-01-02 15:04:05.000"
}
fields["@timestamp"] = entry.Time.Format(timeStampFormat)
|
time format with milliseconds (#<I>)
Till the logstash hook will have a way to set time format, this change is applied.
|
diff --git a/restygwt/src/main/java/org/fusesource/restygwt/rebind/RestServiceClassCreator.java b/restygwt/src/main/java/org/fusesource/restygwt/rebind/RestServiceClassCreator.java
index <HASH>..<HASH> 100644
--- a/restygwt/src/main/java/org/fusesource/restygwt/rebind/RestServiceClassCreator.java
+++ b/restygwt/src/main/java/org/fusesource/restygwt/rebind/RestServiceClassCreator.java
@@ -321,9 +321,6 @@ public class RestServiceClassCreator extends BaseSourceCreator {
PathParam paramPath = arg.getAnnotation(PathParam.class);
if (paramPath != null) {
pathExpression = pathExpression.replaceAll(Pattern.quote("{" + paramPath.value() + "}"), "\"+" + toStringExpression(arg) + "+\"");
- if (arg.getAnnotation(Attribute.class) != null) {
- error("Attribute annotations not allowed on subresource locators");
- }
}
}
|
Removed restriction on @Attribute for sub resource locators
|
diff --git a/src/Sonrisa/Component/Sitemap/SubmitSitemap.php b/src/Sonrisa/Component/Sitemap/SubmitSitemap.php
index <HASH>..<HASH> 100644
--- a/src/Sonrisa/Component/Sitemap/SubmitSitemap.php
+++ b/src/Sonrisa/Component/Sitemap/SubmitSitemap.php
@@ -34,7 +34,7 @@ class SubmitSitemap
//Validate URL format and Response
if ( filter_var( $url, FILTER_VALIDATE_URL, array('options' => array('flags' => FILTER_FLAG_PATH_REQUIRED)) ) ) {
if (self::sendHttpHeadRequest($url) === true ) {
- return self::do_submit($url);
+ return self::submitSitemap($url);
}
throw new SitemapException("The URL provided ({$url}) holds no accessible sitemap file.");
}
@@ -47,7 +47,7 @@ class SubmitSitemap
* @param $url string Valid URL being submitted.
* @return array Array with the search engine submission success status as a boolean.
*/
- protected static function do_submit($url)
+ protected static function submitSitemap($url)
{
$response = array();
|
Fix for [Insight] PHP code should follow PSR-1 basic coding standard #5
|
diff --git a/imhotep/testing_utils.py b/imhotep/testing_utils.py
index <HASH>..<HASH> 100644
--- a/imhotep/testing_utils.py
+++ b/imhotep/testing_utils.py
@@ -31,7 +31,6 @@ class Requester(object):
return JsonWrapper(self.fixture, 200)
-
def calls_matching_re(mockObj, regex):
matches = []
for call in mockObj.call_args_list:
|
E<I> too many blank lines
|
diff --git a/packages/crafty-preset-postcss/src/index.js b/packages/crafty-preset-postcss/src/index.js
index <HASH>..<HASH> 100755
--- a/packages/crafty-preset-postcss/src/index.js
+++ b/packages/crafty-preset-postcss/src/index.js
@@ -165,7 +165,7 @@ module.exports = {
.loader(require.resolve("css-loader"))
.options({
importLoaders: 1,
- sourceMap: crafty.getEnvironment() === "production" && bundle.extractCSS
+ sourceMap: crafty.getEnvironment() === "production" && !!bundle.extractCSS
});
styleRule
|
crafty-preset-postcss: fix css-loader options - ensure that 'sourceMap' is always boolean
|
diff --git a/socks.go b/socks.go
index <HASH>..<HASH> 100644
--- a/socks.go
+++ b/socks.go
@@ -88,10 +88,10 @@ func dialSocks5(proxy, targetAddr string) (conn net.Conn, err error) {
return
} else if len(resp) != 2 {
err = errors.New("Server does not respond properly.")
- return
+ return
} else if resp[0] != 5 {
err = errors.New("Server does not support Socks 5.")
- return
+ return
} else if resp[1] != 0 { // no auth
err = errors.New("socks method negotiation failed.")
return
@@ -159,7 +159,7 @@ func dialSocks4(socksType int, proxy, targetAddr string) (conn net.Conn, err err
return
} else if len(resp) != 8 {
err = errors.New("Server does not respond properly.")
- return
+ return
}
switch resp[1] {
case 90:
|
Fix formatting with go fmt.
|
diff --git a/quart/cli.py b/quart/cli.py
index <HASH>..<HASH> 100644
--- a/quart/cli.py
+++ b/quart/cli.py
@@ -53,7 +53,10 @@ class ScriptInfo:
module_path = Path(module_name).resolve()
sys.path.insert(0, str(module_path.parent))
- import_name = module_path.with_suffix('').name
+ if module_path.is_file():
+ import_name = module_path.with_suffix('').name
+ else:
+ import_name = module_path.name
try:
module = import_module(import_name)
except ModuleNotFoundError as error:
|
Bugfix cli module name parsing
Quart accepts the Gunicorn format ``file.ext:application`` but should
also support the Flask format ``module_a.module_b:application``. To
allow for both the code simply checks if the resolved path is a file
then Gunicorn and if not Flask. This should help match expected Flask
usage.
|
diff --git a/lib/delta/delta.js b/lib/delta/delta.js
index <HASH>..<HASH> 100644
--- a/lib/delta/delta.js
+++ b/lib/delta/delta.js
@@ -420,7 +420,7 @@ function findLocalConflict(node, callback) {
}
if(!syncedNode) {
- logger.error('DELTA: node not found in database even if it should exists:', {targetPath, targetStat});
+ logger.error('DELTA: node not found in database even if it should exists:', {targetPath, node, targetStat});
throw (new BlnDeltaError('Target node \' ' + targetPath + ' \' with ino \'' + targetStat.ino + '\' not found in db'));
}
|
Improve logging when node is missing in db
Related to: #<I>
|
diff --git a/lib/discordrb/bot.rb b/lib/discordrb/bot.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/bot.rb
+++ b/lib/discordrb/bot.rb
@@ -1059,6 +1059,7 @@ module Discordrb
end
@ready_time = Time.now
+ @unavailable_timeout_time = Time.now
when :RESUMED
# The RESUMED event is received after a successful op 6 (resume). It does nothing except tell the bot the
# connection is initiated (like READY would) and set a new heartbeat interval.
|
Set unavailable_timeout_time at READY so it's never nil
|
diff --git a/android/CouchbaseLite/src/ce/java/com/couchbase/lite/ReplicatorConfiguration.java b/android/CouchbaseLite/src/ce/java/com/couchbase/lite/ReplicatorConfiguration.java
index <HASH>..<HASH> 100644
--- a/android/CouchbaseLite/src/ce/java/com/couchbase/lite/ReplicatorConfiguration.java
+++ b/android/CouchbaseLite/src/ce/java/com/couchbase/lite/ReplicatorConfiguration.java
@@ -323,8 +323,8 @@ public final class ReplicatorConfiguration {
public ReplicationFilter getPushFilter() { return pushFilter; }
/**
- * Gets a filter closure for validating whether the documents can be pushed
- * to the remote endpoint.
+ * Gets a filter closure for validating whether the documents can be pulled from the
+ * remote endpoint. Only documents for which the closure returns true are replicated.
*/
public ReplicationFilter getPullFilter() { return pullFilter; }
|
Replication filters: fix pull filter getter comments.
|
diff --git a/fshandler.go b/fshandler.go
index <HASH>..<HASH> 100644
--- a/fshandler.go
+++ b/fshandler.go
@@ -324,6 +324,7 @@ func (h *fsHandler) createDirIndex(base *URI, filePath string) (*fsFile, error)
var u URI
base.CopyTo(&u)
+ u.Update(string(u.Path()) + "/")
sort.Sort(sort.StringSlice(filenames))
for _, name := range filenames {
|
FSHandler index page: fixed urls to files
|
diff --git a/folderPane.js b/folderPane.js
index <HASH>..<HASH> 100644
--- a/folderPane.js
+++ b/folderPane.js
@@ -25,7 +25,7 @@ module.exports = {
// @@@@ kludge until we can get the solid-client version working
// Force the folder by saving a dummy file inside it
return kb.fetcher
- .webOperation('PUT', newInstance.uri + '.dummy')
+ .webOperation('PUT', newInstance.uri + '.dummy', { contentType: 'application/octet-stream' })
.then(function () {
console.log('New folder created: ' + newInstance.uri)
|
add contentType to folder creation with PUT
|
diff --git a/pypfopt/hierarchical_portfolio.py b/pypfopt/hierarchical_portfolio.py
index <HASH>..<HASH> 100644
--- a/pypfopt/hierarchical_portfolio.py
+++ b/pypfopt/hierarchical_portfolio.py
@@ -153,7 +153,10 @@ class HRPOpt(base_optimizer.BaseOptimizer):
# Compute distance matrix, with ClusterWarning fix as
# per https://stackoverflow.com/questions/18952587/
- dist = ssd.squareform(((1 - corr) / 2) ** 0.5)
+
+ # this can avoid some nasty floating point issues
+ matrix = np.sqrt(np.clip((1.0 - corr) / 2., a_min=0.0, a_max=1.0))
+ dist = ssd.squareform(matrix, checks=False)
self.clusters = sch.linkage(dist, "single")
sort_ix = HRPOpt._get_quasi_diag(self.clusters)
|
quasi_diag replaced by pre_order of a tree
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,6 @@ tests_require = [
'isort>=4.2.2',
'mock>=1.3.0',
'pydocstyle>=1.0.0',
- 'pytest-cache>=1.0',
'pytest-cov>=1.8.0',
'pytest-pep8>=1.0.6',
'pytest>=2.8.0,!=3.3.0',
|
installation: removed pytest-cache dependency
|
diff --git a/pub/js/cookie.js b/pub/js/cookie.js
index <HASH>..<HASH> 100644
--- a/pub/js/cookie.js
+++ b/pub/js/cookie.js
@@ -11,7 +11,7 @@ define(function() {
return null;
},
getJsonValue: function(cookieKey, jsonKey) {
- var jsonData = JSON.parse(decodeURIComponent(this.get(cookieKey)));
+ var jsonData = JSON.parse(unescape(this.get(cookieKey)));
if (null === jsonData || !jsonData.hasOwnProperty(jsonKey)) {
return '';
|
Issue #<I>: Change cookie decodeURIComponent back to unescape
|
diff --git a/src/main/java/org/primefaces/component/datatable/feature/SortFeature.java b/src/main/java/org/primefaces/component/datatable/feature/SortFeature.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/primefaces/component/datatable/feature/SortFeature.java
+++ b/src/main/java/org/primefaces/component/datatable/feature/SortFeature.java
@@ -56,7 +56,16 @@ public class SortFeature implements DataTableFeature {
for(int i = 0; i < sortKeys.length; i++) {
UIColumn sortColumn = findSortColumn(table, sortKeys[i]);
- String sortField = table.resolveStaticField(sortColumn.getValueExpression("sortBy"));
+ ValueExpression sortByVE = sortColumn.getValueExpression("sortBy");
+ String sortField = null;
+
+ if(sortColumn.isDynamic()) {
+ ((DynamicColumn) sortColumn).applyStatelessModel();
+ sortField = table.resolveDynamicField(sortByVE);
+ }
+ else {
+ sortField = table.resolveStaticField(sortByVE);
+ }
multiSortMeta.add(new SortMeta(sortColumn, sortField, SortOrder.valueOf(sortOrders[i]), sortColumn.getSortFunction()));
}
|
LazyDataModel support for dynamic columns and multi sort
|
diff --git a/DataCollector/Collector.php b/DataCollector/Collector.php
index <HASH>..<HASH> 100644
--- a/DataCollector/Collector.php
+++ b/DataCollector/Collector.php
@@ -17,7 +17,7 @@ class Collector extends DataCollector implements CollectorInterface, LateDataCol
}
public function getName() {
- return 'logauth.tree_collector';
+ return 'logauth.collector';
}
public function collect(Request $request, Response $response, \Exception $exception = null) {
|
kristofer: Updated collector name
|
diff --git a/test/scenarios/rebalance.py b/test/scenarios/rebalance.py
index <HASH>..<HASH> 100755
--- a/test/scenarios/rebalance.py
+++ b/test/scenarios/rebalance.py
@@ -12,8 +12,6 @@ op["timeout"] = IntFlag("--timeout", 600)
op["num-nodes"] = IntFlag("--num-nodes", 3)
opts = op.parse(sys.argv)
-serve_flags = shlex.split(opts["serve-flags"])
-
with driver.Metacluster() as metacluster:
cluster = driver.Cluster(metacluster)
executable_path, command_prefix, serve_options = scenario_common.parse_mode_flags(opts)
|
Removed unused serve_flags variable from shlex.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ class PyTest(Command):
raise SystemExit(errno)
setup(name='pyramid_webassets',
- version='0.0',
+ version='0.1',
description='pyramid_webassets',
long_description=README + '\n\n' + CHANGES,
classifiers=[
|
increased version for release to pypi
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -104,24 +104,18 @@ module.exports = function(config) {
version: '11',
platform: 'Windows 8.1',
},
- 'sl-safari-11': {
+ 'sl-safari-14': {
base: 'SauceLabs',
browserName: 'safari',
- version: '11',
- platform: 'macOS 10.13',
+ version: '14',
+ platform: 'macOS 11.00',
},
- 'sl-safari-10': {
+ 'sl-safari-13': {
base: 'SauceLabs',
browserName: 'safari',
- version: '10',
- platform: 'OS X 10.12',
+ version: '13',
+ platform: 'OS X 10.15',
},
- // 'sl-safari-9': {
- // base: 'SauceLabs',
- // browserName: 'safari',
- // version: '9',
- // platform: 'OS X 10.11',
- // },
// 'sl-chrome-41': {
// base: 'SauceLabs',
// browserName: 'chrome',
|
chore: bumb safari test versions
|
diff --git a/lib/active_window_x/event_listener.rb b/lib/active_window_x/event_listener.rb
index <HASH>..<HASH> 100644
--- a/lib/active_window_x/event_listener.rb
+++ b/lib/active_window_x/event_listener.rb
@@ -24,7 +24,6 @@ module ActiveWindowX
@aw_atom = Atom.new @display, '_NET_ACTIVE_WINDOW'
@name_atom = Atom.new @display, 'WM_NAME'
@delete_atom = Atom.new @display, 'WM_DELETE_WINDOW'
- puts "delete_atom: id:#{@delete_atom.id}"
@conn = @display.connection
@active_window = @root.active_window
@@ -51,7 +50,12 @@ module ActiveWindowX
begin
while @continue
event = listen timeout
- yield event if event and event.type and not window_closed?(event.window)
+ next if not event
+
+ if window_closed?(event.window)
+ event.window = @root.active_window
+ end
+ yield event if event.type
end
ensure
@display.close if @display.closed?
@@ -102,7 +106,7 @@ module ActiveWindowX
end
class Event
- attr_reader :type, :window
+ attr_accessor :type, :window
def initialize type, window
@type = type; @window = window
end
|
get new active_window if current active_window was closed
|
diff --git a/cleancat/base.py b/cleancat/base.py
index <HASH>..<HASH> 100644
--- a/cleancat/base.py
+++ b/cleancat/base.py
@@ -13,9 +13,10 @@ class Field(object):
base_type = None
blank_value = None
- def __init__(self, required=True, default=None, field_name=None):
+ def __init__(self, required=True, default=None, field_name=None, mutable=True):
self.required = required
self.default = default
+ self.mutable = mutable
self.field_name = field_name
def has_value(self, value):
@@ -280,7 +281,10 @@ class Schema(object):
try:
# Treat non-existing fields like None.
if field_name in self.raw_data or field_name not in self.data:
- self.data[field_name] = field.clean(self.raw_data.get(field_name))
+ value = field.clean(self.raw_data.get(field_name))
+ if not field.mutable and self.orig_data and value in self.orig_data and value != self.orig_data[value]:
+ raise ValidationError('Value cannot be changed.')
+ self.data[field_name] = value
except ValidationError, e:
self.errors[field_name] = e.message
|
Adding Field.mutable attribute for fields that cannot be changed after they were set.
|
diff --git a/src/org/openscience/cdk/Atom.java b/src/org/openscience/cdk/Atom.java
index <HASH>..<HASH> 100644
--- a/src/org/openscience/cdk/Atom.java
+++ b/src/org/openscience/cdk/Atom.java
@@ -116,6 +116,7 @@ public class Atom extends AtomType implements IAtom, Serializable, Cloneable {
this.fractionalPoint3d = null;
this.point3d = null;
this.point2d = null;
+ this.hydrogenCount = 0;
}
/**
@@ -129,6 +130,7 @@ public class Atom extends AtomType implements IAtom, Serializable, Cloneable {
this.fractionalPoint3d = null;
this.point3d = null;
this.point2d = null;
+ this.hydrogenCount = 0;
}
/**
|
Several implementations expect the H-count to be zero by default, instead of unset :(
git-svn-id: <URL>
|
diff --git a/Controller/ClearbitController.php b/Controller/ClearbitController.php
index <HASH>..<HASH> 100644
--- a/Controller/ClearbitController.php
+++ b/Controller/ClearbitController.php
@@ -43,7 +43,7 @@ class ClearbitController extends Controller
$isNew = false;
}
- $form = $this->createFormBuilder($clearbitLocation)
+ $form = $this->createFormBuilder(Clearbit::class)
->add('apiKey', 'text', array(
'label' => 'API Key',
'attr' => array('help_text' => 'Find your API key at https://dashboard.clearbit.com/api')
|
CampaignChain/campaignchain#<I> Upgrade to Symfony 3.x
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.