diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/leaflet.markercluster.layersupport-src.js b/leaflet.markercluster.layersupport-src.js
index <HASH>..<HASH> 100644
--- a/leaflet.markercluster.layersupport-src.js
+++ b/leaflet.markercluster.layersupport-src.js
@@ -487,9 +487,7 @@
layer = this._layers[layer];
}
- if ('off' in layer) {
- layer.off(EVENTS, this._propagateEvent, this);
- }
+ layer.removeEventParent(this);
var id = L.stamp(layer);
|
Fix #6
due to missing event migration from Leaflet <I> to <I>
|
diff --git a/lib/DSL.js b/lib/DSL.js
index <HASH>..<HASH> 100644
--- a/lib/DSL.js
+++ b/lib/DSL.js
@@ -41,7 +41,7 @@ class Parser {
}
cb(null, {
globals: global_scope,
- success: true
+ success: self.interpreter.success
});
});
});
@@ -56,7 +56,7 @@ class Parser {
}
cb(null, {
globals: global_scope,
- success: true
+ success: self.interpreter.success
});
});
}
|
Report on success, don't clobber interpreter value.
|
diff --git a/dna.js b/dna.js
index <HASH>..<HASH> 100755
--- a/dna.js
+++ b/dna.js
@@ -29,14 +29,16 @@ dna.util = {
call: function(func, param) { //calls func (string name or actual function) passing in param
// Example: dna.util.call('app.cart.buy', 7); ==> app.cart.buy(7);
function contextCall(obj, names) {
- if (!obj)
- dna.core.berserk('Invalid name before "' + names[0] + '" in: ' + func);
+ if (!obj || (names.length == 1 && typeof obj[names[0]] !== 'function'))
+ dna.core.berserk('Callback function not found: ' + func);
else if (names.length == 1)
obj[names[0]](param); //'app.cart.buy' -> window['app']['cart']['buy'](param);
else
contextCall(obj[names[0]], names.slice(1));
}
- if (typeof(func) === 'string')
+ if (func === '' || $.inArray(typeof func, ['number', 'boolean']) !== -1)
+ dna.core.berserk('Invalid callback function: ' + func);
+ else if (typeof(func) === 'string' && func.lenght > 0)
contextCall(window, func.split('.'));
else if (func instanceof Function)
func(param);
|
Additional validation for func param in dna.util.call()
|
diff --git a/cake/tests/cases/console/console_output.test.php b/cake/tests/cases/console/console_output.test.php
index <HASH>..<HASH> 100644
--- a/cake/tests/cases/console/console_output.test.php
+++ b/cake/tests/cases/console/console_output.test.php
@@ -134,6 +134,18 @@ class ConsoleOutputTest extends CakeTestCase {
}
/**
+ * test that formatting doesn't eat tags it doesn't know about.
+ *
+ * @return void
+ */
+ function testFormattingNotEatingTags() {
+ $this->output->expects($this->once())->method('_write')
+ ->with("<red> Something bad");
+
+ $this->output->write('<red> Something bad', false);
+ }
+
+/**
* test formatting with custom styles.
*
* @return void
|
Adding test to make sure tags that are unknown are not removed.
|
diff --git a/lib/jsonapi/request.rb b/lib/jsonapi/request.rb
index <HASH>..<HASH> 100644
--- a/lib/jsonapi/request.rb
+++ b/lib/jsonapi/request.rb
@@ -281,7 +281,7 @@ module JSONAPI
# Since we do not yet support polymorphic associations we will raise an error if the type does not match the
# association's type.
# ToDo: Support Polymorphic associations
- if links_object[:type] && (links_object[:type] != format_key(association.type).to_s)
+ if links_object[:type] && (links_object[:type] != association.type.to_s)
raise JSONAPI::Exceptions::TypeMismatch.new(links_object[:type])
end
|
Removed errant type key re-formatting in parse_params
|
diff --git a/src/main/java/com/auth0/net/CustomRequest.java b/src/main/java/com/auth0/net/CustomRequest.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/auth0/net/CustomRequest.java
+++ b/src/main/java/com/auth0/net/CustomRequest.java
@@ -100,12 +100,11 @@ public class CustomRequest<T> extends BaseRequest<T> implements CustomizableRequ
}
protected Auth0Exception createResponseException(Response response) {
- if (response.code() == STATUS_CODE_TOO_MANY_REQUEST) {
- return createRateLimitException(response);
- }
-
String payload = null;
try (ResponseBody body = response.body()) {
+ if (response.code() == STATUS_CODE_TOO_MANY_REQUEST) {
+ return createRateLimitException(response);
+ }
payload = body.string();
MapType mapType = mapper.getTypeFactory().constructMapType(HashMap.class, String.class, Object.class);
Map<String, Object> values = mapper.readValue(payload, mapType);
|
Closing response body on RateLimitException
|
diff --git a/app/controllers/patient_event_types_controller.rb b/app/controllers/patient_event_types_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/patient_event_types_controller.rb
+++ b/app/controllers/patient_event_types_controller.rb
@@ -31,13 +31,11 @@ class PatientEventTypesController < ApplicationController
end
def destroy
- @patient_event_type = PatientEventType.find(params[:id])
- @patient_event_type.soft_delete!
+ PatientEventType.destroy(params[:id])
redirect_to patient_event_types_path, :notice => "You have successfully removed a patient event type."
- end
+ end
def allowed_params
params.require(:patient_event_type).permit(:name, :deleted_at)
- end
-
+ end
end
diff --git a/app/models/patient_event_type.rb b/app/models/patient_event_type.rb
index <HASH>..<HASH> 100644
--- a/app/models/patient_event_type.rb
+++ b/app/models/patient_event_type.rb
@@ -1,5 +1,5 @@
class PatientEventType < ActiveRecord::Base
- include Concerns::SoftDelete
+ acts_as_paranoid
has_many :patient_event
|
Remove SoftDelete from PatientEventType
|
diff --git a/cluster/calcium/lambda.go b/cluster/calcium/lambda.go
index <HASH>..<HASH> 100644
--- a/cluster/calcium/lambda.go
+++ b/cluster/calcium/lambda.go
@@ -36,7 +36,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
return nil, errors.WithStack(types.ErrRunAndWaitCountOneWithStdin)
}
- commit, err := c.walCreateLambda(ctx, opts)
+ commit, err := c.walCreateLambda(opts)
if err != nil {
return nil, logger.Err(err)
}
@@ -134,7 +134,7 @@ func (c *Calcium) RunAndWait(ctx context.Context, opts *types.DeployOptions, inC
return runMsgCh, nil
}
-func (c *Calcium) walCreateLambda(ctx context.Context, opts *types.DeployOptions) (wal.Commit, error) {
+func (c *Calcium) walCreateLambda(opts *types.DeployOptions) (wal.Commit, error) {
uid, err := uuid.NewRandom()
if err != nil {
return nil, errors.WithStack(err)
|
fix: make golint works (#<I>)
|
diff --git a/polyfills/Promise/prototype/finally/polyfill.js b/polyfills/Promise/prototype/finally/polyfill.js
index <HASH>..<HASH> 100644
--- a/polyfills/Promise/prototype/finally/polyfill.js
+++ b/polyfills/Promise/prototype/finally/polyfill.js
@@ -52,7 +52,7 @@
// 1.2 If IsPromise(promise) is false, throw a TypeError exception.
// N.B. IsPromise is called within Promise.prototype.then (25.4.5.3)
var newPromise = then(
- this, // throws if IsPromise(this) is not true
+ promise, // throws if IsPromise(promise) is not true
function (x) {
return then(getPromise(C, handler), function () {
return x;
@@ -66,7 +66,7 @@
);
// 1.3 Let C be ? SpeciesConstructor(promise, %Promise%).
- var C = speciesConstructor(this, Promise); // throws if SpeciesConstructor throws
+ var C = speciesConstructor(promise, Promise); // throws if SpeciesConstructor throws
// 1.4 Let resultCapablity be ? NewPromiseCapablity(C).
// 1.5 Return PerformPromiseFinally(promise, onFinaaly, resultCapability).
|
use variable according to spec (#<I>)
|
diff --git a/src/mako/syringe/Container.php b/src/mako/syringe/Container.php
index <HASH>..<HASH> 100644
--- a/src/mako/syringe/Container.php
+++ b/src/mako/syringe/Container.php
@@ -436,7 +436,7 @@ class Container
* @access public
* @param callable $callable Callable
* @param array $parameters (optional) Parameters
- * @return mixed
+ * @return object
*/
public function call(callable $callable, array $parameters = [])
|
Changed return type from mixed to object
|
diff --git a/src/Input.js b/src/Input.js
index <HASH>..<HASH> 100644
--- a/src/Input.js
+++ b/src/Input.js
@@ -78,7 +78,9 @@ class Input extends Base {
// check, but here we need to do it to preserve selection in Safari.
const base = super.updates;
const value = this.state.innerProperties.value;
- if (this.$.inner.value === value && base.$.inner.value === value) {
+ /** @type {any} */
+ const cast = this.$.inner;
+ if (cast.value === value && base.$.inner.value === value) {
delete base.$.inner.value;
}
return merge(base, {
@@ -91,6 +93,7 @@ class Input extends Base {
// Updating the value can also update the selectionStart and selectionEnd
// properties, so we have to update our state to match.
get value() {
+ // @ts-ignore
return super.value;
}
set value(value) {
|
Fix lint warnings.
|
diff --git a/crochet/_version.py b/crochet/_version.py
index <HASH>..<HASH> 100644
--- a/crochet/_version.py
+++ b/crochet/_version.py
@@ -2,4 +2,4 @@
Store version in its own module so we can access it from both setup.py and
__init__.
"""
-__version__ = "0.9.0"
+__version__ = "1.0.0"
|
Change version to <I>.
|
diff --git a/shared/actions/login.js b/shared/actions/login.js
index <HASH>..<HASH> 100644
--- a/shared/actions/login.js
+++ b/shared/actions/login.js
@@ -152,6 +152,11 @@ function* navBasedOnLoginAndInitialState(): Saga.SagaGenerator<any, any> {
yield Saga.put(switchRouteDef(loginRouteTree))
yield Saga.put.resolve(getExtendedStatus())
yield Saga.call(getAccounts)
+ // We may have logged successfully in by now, check before trying to navigate
+ const state = yield Saga.select()
+ if (state.config.loggedIn) {
+ return
+ }
yield Saga.put(navigateTo(['login'], [loginTab]))
} else if (loginError) {
// show error on login screen
|
add check for race in login flow (#<I>)
|
diff --git a/lib/helpers/utils.js b/lib/helpers/utils.js
index <HASH>..<HASH> 100644
--- a/lib/helpers/utils.js
+++ b/lib/helpers/utils.js
@@ -27,3 +27,9 @@ module.exports.pushIfNotExist = function (type, array, value) {
return array;
};
+
+module.exports.timeoutPromise = (timer) => {
+ return new Promise((resolve) => {
+ setTimeout(resolve, timer);
+ });
+};
diff --git a/lib/producer.js b/lib/producer.js
index <HASH>..<HASH> 100644
--- a/lib/producer.js
+++ b/lib/producer.js
@@ -132,7 +132,10 @@ var produce = function(queue, msg, options) {
})
.catch(function (err) {
Logger.error('[BMQ-PRODUCER]', err);
- return produce(queue, msg, options);
+ return utils.timeoutPromise(1000)
+ .then(() => {
+ return produce(queue, msg, options);
+ });
});
};
|
Add a timer on messages to not overflow CPU when connection is lost
|
diff --git a/Auth/OpenID/Discover.php b/Auth/OpenID/Discover.php
index <HASH>..<HASH> 100644
--- a/Auth/OpenID/Discover.php
+++ b/Auth/OpenID/Discover.php
@@ -377,7 +377,8 @@ function Auth_OpenID_discoverURI($uri, &$fetcher)
{
$parsed = parse_url($uri);
- if ($parsed && $parsed['scheme'] && $parsed['host']) {
+ if ($parsed && isset($parsed['scheme']) &&
+ isset($parsed['host'])) {
if (!in_array($parsed['scheme'], array('http', 'https'))) {
// raise DiscoveryFailure('URI scheme is not HTTP or HTTPS', None)
return array($uri, array());
|
[project @ isset() to silence notices]
|
diff --git a/lib/ace/Document.js b/lib/ace/Document.js
index <HASH>..<HASH> 100644
--- a/lib/ace/Document.js
+++ b/lib/ace/Document.js
@@ -25,7 +25,7 @@ var Document = function(text, mode) {
if (mode) {
this.setMode(mode);
}
-
+
if (lang.isArray(text)) {
this.$insertLines(0, text);
} else {
diff --git a/lib/ace/Editor.js b/lib/ace/Editor.js
index <HASH>..<HASH> 100644
--- a/lib/ace/Editor.js
+++ b/lib/ace/Editor.js
@@ -423,7 +423,7 @@ var Editor = function(renderer, doc) {
else
break;
console.log("Indent " + indent + "(" + line.length + ")");
- if (line.length != 0)
+ if (/[^\s]$/.test(line))
minIndent = Math.min(indent, minIndent);
}
console.log("min indent " + minIndent);
|
Small fix in audo-indentation.
|
diff --git a/Event.php b/Event.php
index <HASH>..<HASH> 100644
--- a/Event.php
+++ b/Event.php
@@ -154,7 +154,7 @@ class Event
{
return EVENT::ISSUE;
}
- elseif ($json['object_kind'] == 'merge_request' && $json['object_attributes']['state'] == 'merged')
+ elseif ($json['object_kind'] == 'merge_request' && $json['object_attributes']['action'] == 'merge')
{
return EVENT::MERGE;
}
|
Fix a bug : all update of MRs after merging were considered as merge action
|
diff --git a/src/questionPanel.js b/src/questionPanel.js
index <HASH>..<HASH> 100644
--- a/src/questionPanel.js
+++ b/src/questionPanel.js
@@ -1,5 +1,6 @@
-var React = require('react');
-var _ = require('lodash');
+var React = require('react');
+var _ = require('lodash');
+var KeyCodez = require('keycodez');
var Validation = require('./lib/validation');
var ErrorMessages = require('./lib/errors');
@@ -150,7 +151,10 @@ class QuestionPanel extends React.Component {
}
handleInputKeyDown(e) {
-
+ if (KeyCodez[e.keyCode] === 'enter') {
+ e.preventDefault();
+ this.handleMainButtonClick.call(this);
+ }
}
render() {
|
On enter key - Stop the form from submitting and run the handleMainButtonClick method - fixes #8
|
diff --git a/Neos.Flow/Classes/Command/CacheCommandController.php b/Neos.Flow/Classes/Command/CacheCommandController.php
index <HASH>..<HASH> 100644
--- a/Neos.Flow/Classes/Command/CacheCommandController.php
+++ b/Neos.Flow/Classes/Command/CacheCommandController.php
@@ -450,7 +450,6 @@ class CacheCommandController extends CommandController
$this->outputLine('<success>Completed</success>', [$identifier]);
}
}
-
}
/**
|
[TASK] Remove newline to satisfy PSR-2
|
diff --git a/molgenis-data/src/main/java/org/molgenis/data/annotation/RepositoryAnnotator.java b/molgenis-data/src/main/java/org/molgenis/data/annotation/RepositoryAnnotator.java
index <HASH>..<HASH> 100644
--- a/molgenis-data/src/main/java/org/molgenis/data/annotation/RepositoryAnnotator.java
+++ b/molgenis-data/src/main/java/org/molgenis/data/annotation/RepositoryAnnotator.java
@@ -42,13 +42,4 @@ public interface RepositoryAnnotator
* @return name
*/
String getName();
-
- /**
- * Checks if folder and files that were set with a runtime property actually exist, or if a webservice can be
- * reached
- *
- * @return annotationDataExists
- * */
- boolean annotationDataExists();
-
}
|
Removed annotationDataExists from the interface
|
diff --git a/numina/array/wavecal/arccalibration.py b/numina/array/wavecal/arccalibration.py
index <HASH>..<HASH> 100644
--- a/numina/array/wavecal/arccalibration.py
+++ b/numina/array/wavecal/arccalibration.py
@@ -599,7 +599,7 @@ def arccalibration_direct(wv_master,
# each triplet from the master list provides a potential solution
# for CRVAL1 and CDELT1
- for j_loc in range(j_loc_min, j_loc_max):
+ for j_loc in range(j_loc_min, j_loc_max+1):
j1, j2, j3 = triplets_master_sorted_list[j_loc]
# initial solutions for CDELT1, CRVAL1 and CRVALN
cdelt1_temp = (wv_master[j3]-wv_master[j1])/dist13
|
Correcting missing <I> in loop
|
diff --git a/src/autotyper.js b/src/autotyper.js
index <HASH>..<HASH> 100644
--- a/src/autotyper.js
+++ b/src/autotyper.js
@@ -174,7 +174,7 @@ const autotyper = {
this.letterTotal = this.settings.text.length;
this.letterCount = 0;
- this.emit(LOOP_EVENT);
+ this.emit(LOOP_EVENT, this.loopCount);
return this;
},
|
feat: pass `loopCount` on emitting `LOOP_EVENT`
|
diff --git a/lib/AmazonSNS.php b/lib/AmazonSNS.php
index <HASH>..<HASH> 100644
--- a/lib/AmazonSNS.php
+++ b/lib/AmazonSNS.php
@@ -246,7 +246,13 @@ class AmazonSNS {
// Get subscriptions
$subs = $resultXml->ListSubscriptionsResult->Subscriptions->member;
- return $this->_processXmlToArray($subs);
+ $return = ['members' => $this->_processXmlToArray($subs)];
+
+ if(isset($resultXml->ListSubscriptionsResult->NextToken)) {
+ $return['nextToken'] = strval($resultXml->ListSubscriptionsResult->NextToken);
+ }
+
+ return $return;
}
/**
@@ -276,7 +282,13 @@ class AmazonSNS {
// Get subscriptions
$subs = $resultXml->ListSubscriptionsByTopicResult->Subscriptions->member;
- return $this->_processXmlToArray($subs);
+ $return = ['members' => $this->_processXmlToArray($subs)];
+
+ if(isset($resultXml->ListSubscriptionsByTopicResult->NextToken)) {
+ $return['nextToken'] = strval($resultXml->ListSubscriptionsByTopicResult->NextToken);
+ }
+
+ return $return;
}
/**
|
Return subscriptions as 'members' and return 'nextToken' if there is one in subscription list methods - #<I>
|
diff --git a/lib/modem.js b/lib/modem.js
index <HASH>..<HASH> 100644
--- a/lib/modem.js
+++ b/lib/modem.js
@@ -147,6 +147,8 @@ Modem.prototype.dial = function(options, callback) {
optionsf.headers['Content-Length'] = Buffer.byteLength(data);
} else if (Buffer.isBuffer(data) === true) {
optionsf.headers['Content-Length'] = data.length;
+ } else {
+ optionsf.headers['Transfer-Encoding'] = 'chunked';
}
if (options.hijack) {
|
Making modem work better when using a stream
When using a stream with docker modem there is no header 'Content-Length' since there is no known length to it. The right replacement for that is using the header 'Transfer-Encoding: chunked'.
This can cause problem with docker daemon as an example: when building an image and canceling (by exiting process or destroying connection) omitting this header while using a stream cause the daemon to ignore the dropped connection and continue the build.
|
diff --git a/pkg/kubelet/kubelet_pods.go b/pkg/kubelet/kubelet_pods.go
index <HASH>..<HASH> 100644
--- a/pkg/kubelet/kubelet_pods.go
+++ b/pkg/kubelet/kubelet_pods.go
@@ -1357,7 +1357,7 @@ func (kl *Kubelet) GetAttach(podFullName string, podUID types.UID, containerName
// since whether the process is running in a TTY cannot be changed after it has started. We
// need the api.Pod to get the TTY status.
pod, found := kl.GetPodByFullName(podFullName)
- if !found || pod.UID != podUID {
+ if !found || (string(podUID) != "" && pod.UID != podUID) {
return nil, fmt.Errorf("pod %s not found", podFullName)
}
containerSpec := kubecontainer.GetContainerSpec(pod, containerName)
|
Kubelet: only check podUID when it is actually set
|
diff --git a/rootpy/plotting/canvas.py b/rootpy/plotting/canvas.py
index <HASH>..<HASH> 100644
--- a/rootpy/plotting/canvas.py
+++ b/rootpy/plotting/canvas.py
@@ -44,7 +44,8 @@ class Canvas(_PadBase, QROOT.TCanvas):
def __init__(self,
width=None, height=None,
x=None, y=None,
- name=None, title=None):
+ name=None, title=None,
+ size_includes_decorations=False):
# The following line will trigger finalSetup and start the graphics
# thread if not started already
@@ -61,4 +62,12 @@ class Canvas(_PadBase, QROOT.TCanvas):
ROOT.kTRUE
super(Canvas, self).__init__(x, y, width, height,
name=name, title=title)
+ if not size_includes_decorations:
+ # Canvas dimensions include the window manager's decorations by
+ # default in vanilla ROOT. I think this is a bad default.
+ # Since in the most common case I don't care about the window
+ # decorations, the default will be to set the dimensions of the
+ # paintable area of the canvas.
+ self.SetWindowSize(width + (width - self.GetWw()),
+ height + (height - self.GetWh()))
self._post_init()
|
don't include canvas window manager decorations in canvas size by default
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ requirements = [
'invenio-documents>=0.1.0.post2',
'invenio-ext>=0.2.1',
'invenio-records>=0.2.1',
- 'invenio-utils>=0.1.0',
+ 'invenio-utils>=0.1.1',
]
test_requirements = [
|
installation: inveni-utils>=<I>
|
diff --git a/lib/cancan/matchers.rb b/lib/cancan/matchers.rb
index <HASH>..<HASH> 100644
--- a/lib/cancan/matchers.rb
+++ b/lib/cancan/matchers.rb
@@ -4,8 +4,7 @@ if rspec_module == 'RSpec'
require 'rspec/core'
require 'rspec/expectations'
else
- ActiveSupport::Deprecation
- .warn('RSpec < 3 will not be supported in the CanCanCan >= 2.0.0')
+ ActiveSupport::Deprecation.warn('RSpec < 3 will not be supported in the CanCanCan >= 2.0.0')
end
Kernel.const_get(rspec_module)::Matchers.define :be_able_to do |*args|
|
Fix a errant newline during conflict merge.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -15,13 +15,13 @@ function writefile(pair, type) {
module.exports = postcss.plugin('postcss-classname', function (opts) {
opts = opts || {};
var dist = opts.dist || ".",
- outputName = opts.outputName || "style",
- type = opts.type || ".js",
- hashType = opts.hashType || "md5",
- digestType = opts.digestType || "base32",
- classnameFormat = opts.classnameFormat || "[classname]-[hash]",
- maxLength = opts.maxLength || 6,
- outputFile;
+ outputName = opts.outputName || "style",
+ type = opts.type || ".js",
+ hashType = opts.hashType || "md5",
+ digestType = opts.digestType || "base32",
+ classnameFormat = opts.classnameFormat || "[classname]-[hash]",
+ maxLength = opts.maxLength || 6,
+ outputFile;
if (type[0] !== '.')
type = '.' + type;
|
Fixing changes to spacing done by my editor
|
diff --git a/src/BotApi.php b/src/BotApi.php
index <HASH>..<HASH> 100644
--- a/src/BotApi.php
+++ b/src/BotApi.php
@@ -783,6 +783,26 @@ class BotApi
'user_id' => $userId,
]);
}
+
+ /**
+ * Use this method to unban a previously kicked user in a supergroup.
+ * The user will not return to the group automatically, but will be able to join via link, etc.
+ * The bot must be an administrator in the group for this to work. Returns True on success.
+ *
+ * @param int|string $chatId Unique identifier for the target group
+ * or username of the target supergroup (in the format @supergroupusername)
+ * @param int $userId Unique identifier of the target user
+ *
+ * @return bool
+ */
+ public function unbanChatMember($chatId, $userId) {
+ return $this->call('unbanChatMember', [
+ 'chat_id' => $chatId,
+ 'user_id' => $userId
+ ]);
+ }
+
+ /**
* Close curl
*/
public function __destruct()
|
added unbanChatMember method
|
diff --git a/src/sap.m/src/sap/m/Avatar.js b/src/sap.m/src/sap/m/Avatar.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/src/sap/m/Avatar.js
+++ b/src/sap.m/src/sap/m/Avatar.js
@@ -131,9 +131,6 @@ sap.ui.define([
fallbackIcon: {type: "string", group: "Data", defaultValue: null},
/**
* Determines the background color of the control.
- *
- * <b>Note:</b> By using background colors from the predefined sets,
- * your colors can later be customized from the Theme Designer.
*/
backgroundColor: {type: "sap.m.AvatarColor", group: "Appearance", defaultValue: AvatarColor.Accent6},
|
[INTERNAL] sap.m.Avatar: Control jsdoc improved
The text in jsdoc was referring to another system's
ability to perform a task which is not actually possible.
Change-Id: I8aff3ee2af<I>aec<I>c6e9d5aa<I>f0bb0e4fc<I>
|
diff --git a/run.go b/run.go
index <HASH>..<HASH> 100644
--- a/run.go
+++ b/run.go
@@ -130,23 +130,9 @@ func (i *imageDumperGame) Layout(outsideWidth, outsideHeight int) (screenWidth,
// RunGame starts the main loop and runs the game.
// game's Update function is called every tick to update the game logic.
-// game's Draw function is, if it exists, called every frame to draw the screen.
+// game's Draw function is called every frame to draw the screen.
// game's Layout function is called when necessary, and you can specify the logical screen size by the function.
//
-// game must implement Game interface.
-// Game's Draw function is optional, but it is recommended to implement Draw to seperate updating the logic and
-// rendering.
-//
-// RunGame is a more flexibile form of Run due to game's Layout function.
-// You can make a resizable window if you use RunGame, while you cannot if you use Run.
-// RunGame is more sophisticated way than Run and hides the notion of 'scale'.
-//
-// While Run specifies the window size, RunGame does not.
-// You need to call SetWindowSize before RunGame if you want.
-// Otherwise, a default window size is adopted.
-//
-// Some functions (ScreenScale, SetScreenScale, SetScreenSize) are not available with RunGame.
-//
// On browsers, it is strongly recommended to use iframe if you embed an Ebiten application in your website.
//
// RunGame must be called on the main thread.
|
ebiten: Fix old and wrong comments
|
diff --git a/rna-seq-pipeline/rna-seq_pipeline_multi_sample.py b/rna-seq-pipeline/rna-seq_pipeline_multi_sample.py
index <HASH>..<HASH> 100644
--- a/rna-seq-pipeline/rna-seq_pipeline_multi_sample.py
+++ b/rna-seq-pipeline/rna-seq_pipeline_multi_sample.py
@@ -125,8 +125,7 @@ def docker_call(tool, tool_parameters, work_dir):
Makes subprocess call of a command to a docker container.
work_dir MUST BE AN ABSOLUTE PATH or the call will fail.
"""
- # base_docker_call = 'sudo docker run -v {}:/data'.format(work_dir)
- base_docker_call = 'docker run -v {}:/data'.format(work_dir)
+ base_docker_call = 'sudo docker run -v {}:/data'.format(work_dir)
call = base_docker_call.split() + [tool] + tool_parameters
try:
subprocess.check_call(call)
|
Unless the user script is being run on a CGCloud-launched cluster docker calls must use Sudo.
|
diff --git a/lib/you_shall_not_pass/version.rb b/lib/you_shall_not_pass/version.rb
index <HASH>..<HASH> 100644
--- a/lib/you_shall_not_pass/version.rb
+++ b/lib/you_shall_not_pass/version.rb
@@ -1,3 +1,3 @@
module YouShallNotPass
- VERSION = "0.0.3"
+ VERSION = "0.1.0"
end
|
Releasing version <I>
|
diff --git a/lib/helpers.js b/lib/helpers.js
index <HASH>..<HASH> 100644
--- a/lib/helpers.js
+++ b/lib/helpers.js
@@ -139,11 +139,15 @@ Helpers.ParseDIDL = function (didl, host, port, trackUri) {
}
Helpers.ParseDIDLItem = function (item, host, port, trackUri) {
+ let albumArtURI = item['upnp:albumArtURI'] || null
+ if (albumArtURI && Array.isArray(albumArtURI)) {
+ albumArtURI = albumArtURI.length > 0 ? albumArtURI[0] : null
+ }
let track = {
title: item['r:streamContent'] || item['dc:title'] || null,
artist: item['dc:creator'] || null,
album: item['upnp:album'] || null,
- albumArtURI: item['upnp:albumArtURI'] || null
+ albumArtURI
}
if (trackUri) track.uri = trackUri
if (host && port && track.albumArtURI && !track.albumArtURI.startsWith('http://')) {
|
Handle when albumArtURI is an Array
If the albumArtURI of an item is an Array, the first item is picked
|
diff --git a/glymur/lib/config.py b/glymur/lib/config.py
index <HASH>..<HASH> 100644
--- a/glymur/lib/config.py
+++ b/glymur/lib/config.py
@@ -145,9 +145,8 @@ def get_configdir():
if 'HOME' in os.environ and os.name != 'nt':
# HOME is set by WinPython to something unusual, so we don't
- # want that.
+ # necessarily want that.
return os.path.join(os.environ['HOME'], '.config', 'glymur')
- if os.name == 'nt':
- # Windows.
- return os.path.join(os.path.expanduser('~'), 'glymur')
+ # Last stand. Should handle windows... others?
+ return os.path.join(os.path.expanduser('~'), 'glymur')
|
Windows if-statement is now a catch-all for config file location.
Closes #<I>, again.
|
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
index <HASH>..<HASH> 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/computer/GraphComputerTest.java
@@ -1043,7 +1043,7 @@ public class GraphComputerTest extends AbstractGremlinProcessTest {
@Override
public void workerIterationStart(final Memory memory) {
-// assertEquals(memory.getIteration(), memory.<Integer>get("test").intValue());
+ assertEquals(memory.getIteration(), memory.<Integer>get("test").intValue());
final long time = System.nanoTime();
if (!memory.isInitialIteration())
assertNotEquals(-1l, TIMER_KEEPER.get());
|
had a commented out assert() when figuring out a bug in Spark. Uncommented. All good.
|
diff --git a/cr8/run_crate.py b/cr8/run_crate.py
index <HASH>..<HASH> 100644
--- a/cr8/run_crate.py
+++ b/cr8/run_crate.py
@@ -280,7 +280,7 @@ class CrateNode(contextlib.ExitStack):
try:
wait_until(
lambda: show_spinner() and _ensure_running(proc) and self.http_host,
- timeout=30
+ timeout=60
)
host = self.addresses.http.host
port = self.addresses.http.port
|
Increase run-crate start-up timeout to <I> seconds
Should be enough to start up CrateDB on a raspberry
|
diff --git a/libkbfs/reporter_kbpki.go b/libkbfs/reporter_kbpki.go
index <HASH>..<HASH> 100644
--- a/libkbfs/reporter_kbpki.go
+++ b/libkbfs/reporter_kbpki.go
@@ -43,6 +43,7 @@ var noErrorNames = map[string]bool{
"Gemfile": true, // rvm
"devfs": true, // lsof? KBFS-823
"_mtn": true, // emacs on Linux
+ "_MTN": true, // emacs on Linux
"docker-machine": true, // docker shell stuff
"HEAD": true, // git shell
"Keybase.app": true, // some OSX mount thing
|
reporter_kbpki: ignore _MTN (looked up by emacs on Linux) (#<I>)
|
diff --git a/upload/install/model/install/install.php b/upload/install/model/install/install.php
index <HASH>..<HASH> 100644
--- a/upload/install/model/install/install.php
+++ b/upload/install/model/install/install.php
@@ -46,7 +46,7 @@ class Install extends \Opencart\System\Engine\Model {
}
$sql = rtrim($sql, ",\n") . "\n";
- $sql .= ") ENGINE=" . $table['engine'] . " CHARSET=" . $table['charset'] . " COLLATE=" . $table['collate'] . ";\n";
+ $sql .= ") ENGINE=" . $table['engine'] . " CHARSET=" . $table['charset'] . " ROW_FORMAT=DYNAMIC COLLATE=" . $table['collate'] . ";\n";
$db->query($sql);
}
|
Update install.php
hot fix bug Index column size too large. The maximum column size is <I> bytes (maybe need another better way)
<URL>
|
diff --git a/yt_array.py b/yt_array.py
index <HASH>..<HASH> 100644
--- a/yt_array.py
+++ b/yt_array.py
@@ -595,9 +595,13 @@ class YTArray(np.ndarray):
units, and returns it.
Optionally, an equivalence can be specified to convert to an
- equivalent quantity which is not in the same dimensions. All
- additional keyword arguments are passed to the equivalency if
- necessary.
+ equivalent quantity which is not in the same dimensions.
+
+ .. note::
+
+ All additional keyword arguments are passed to the
+ equivalency, which should be used if that particular
+ equivalency requires them.
Parameters
----------
@@ -641,9 +645,13 @@ class YTArray(np.ndarray):
bare NumPy array.
Optionally, an equivalence can be specified to convert to an
- equivalent quantity which is not in the same dimensions. All
- additional keyword arguments are passed to the equivalency if
- necessary.
+ equivalent quantity which is not in the same dimensions.
+
+ .. note::
+
+ All additional keyword arguments are passed to the
+ equivalency, which should be used if that particular
+ equivalency requires them.
Parameters
----------
|
Make docstrings clearer and more explicit
|
diff --git a/Console/Command/ResqueShell.php b/Console/Command/ResqueShell.php
index <HASH>..<HASH> 100755
--- a/Console/Command/ResqueShell.php
+++ b/Console/Command/ResqueShell.php
@@ -137,7 +137,12 @@ class ResqueShell extends Shell {
$path = App::pluginPath('Resque') . 'Vendor' . DS . 'php-resque' . DS;
$log_path = $this->log_path;
- $bootstrap_path = App::pluginPath('Resque') . 'Lib' . DS . 'ResqueBootstrap.php';
+
+ if (file_exists(APP . 'Lib' . DS . 'ResqueBootstrap.php')) {
+ $bootstrap_path = APP . 'Lib' . DS . 'ResqueBootstrap.php';
+ } else {
+ $bootstrap_path = App::pluginPath('Resque') . 'Lib' . DS . 'ResqueBootstrap.php';
+ }
$this->out("<warning>Forking new PHP Resque worker service</warning> (<info>queue:</info>{$queue} <info>user:</info>{$user})");
$cmd = 'nohup sudo -u '.$user.' bash -c "cd ' .
|
Allow overriding the ResqueBootstrap.php file from the app
|
diff --git a/lib/oauth.js b/lib/oauth.js
index <HASH>..<HASH> 100644
--- a/lib/oauth.js
+++ b/lib/oauth.js
@@ -159,17 +159,17 @@ module.exports = OAuth = (function() {
* Public: get authenticate URL
* ----------------------------
*
- * params - Object with:
- * + token: [Required] String with `oauth_token` from `OAuth.requestToken`
+ * token - [Required] String with `oauth_token` from
+ * `OAuth.requestToken`.
* callback - Callback Function
*
* Returns a callback with an Error object as the first parameter and a string
* with the URL to which redirect users as second parameter.
**/
- OAuth.prototype.authenticate = function(params, callback) {
+ OAuth.prototype.authenticate = function(token, callback) {
var self = this;
- if ((params.token == null) || (typeof params.token !== 'string')) {
+ if ((token == null) || (typeof token !== 'string')) {
return callback(new Error(
'Error: Twitter:OAuth.authenticate requires a token as first argument.'
));
@@ -177,7 +177,7 @@ module.exports = OAuth = (function() {
return callback(
null,
- self.uri.authenticate + "?oauth_token=" + params.token
+ self.uri.authenticate + "?oauth_token=" + token
);
};
|
lib/oauth#authenticate just gets `token` as a param
|
diff --git a/Generator/PluginType.php b/Generator/PluginType.php
index <HASH>..<HASH> 100644
--- a/Generator/PluginType.php
+++ b/Generator/PluginType.php
@@ -88,6 +88,16 @@ class PluginType extends BaseGenerator {
]);
},
),
+ // TODO: Argh, do something about this mess of relative / qualified
+ // class names!
+ 'base_class_short_name' => [
+ 'computed' => TRUE,
+ 'default' => function($component_data) {
+ $short_class_name = $component_data['annotation_class'];
+
+ return $short_class_name;
+ },
+ ],
'base_class' => [
'label' => 'Base class',
'computed' => TRUE,
@@ -97,7 +107,7 @@ class PluginType extends BaseGenerator {
'%module',
'Plugin',
$component_data['plugin_relative_namespace'],
- $component_data['annotation_class'] . 'Base',
+ $component_data['base_class_short_name'],
]);
},
],
@@ -210,7 +220,7 @@ class PluginType extends BaseGenerator {
'relative_class_name' => array_merge(
['Plugin'],
$plugin_relative_namespace_pieces,
- [$this->component_data['annotation_class'] . 'Base']
+ [$this->component_data['base_class_short_name']]
),
'parent_class_name' => '\Drupal\Component\Plugin\PluginBase',
'interfaces' => [
|
Fixed plugin type base class not using the computed property for the class name.
|
diff --git a/app/src/components/mainWindow/mainWindow.js b/app/src/components/mainWindow/mainWindow.js
index <HASH>..<HASH> 100644
--- a/app/src/components/mainWindow/mainWindow.js
+++ b/app/src/components/mainWindow/mainWindow.js
@@ -199,7 +199,7 @@ function createMainWindow(inpOptions, onAppQuit, setDockBadge) {
return;
}
// eslint-disable-next-line no-param-reassign
- event.guest = createNewWindow(urlToGo);
+ event.newGuest = createNewWindow(urlToGo);
};
const sendParamsOnDidFinishLoad = (window) => {
|
Fix Gmail complaining window creation was prevented by a popup blocker (PR #<I>)
By changing incorrect window `guest` property to `newGuest`. See
<URL>` will prevent Electron from
> automatically creating a new BrowserWindow. If you call
> `event.preventDefault()` and manually create a new BrowserWindow
> then you must set `event.newGuest` to reference the new BrowserWindow
> instance, failing to do so may result in unexpected behavior.
|
diff --git a/src/main/java/org/primefaces/component/datatable/DataTableRenderer.java b/src/main/java/org/primefaces/component/datatable/DataTableRenderer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/primefaces/component/datatable/DataTableRenderer.java
+++ b/src/main/java/org/primefaces/component/datatable/DataTableRenderer.java
@@ -119,11 +119,13 @@ public class DataTableRenderer extends DataRenderer {
if (filters != null) {
for (FilterState filterState : filters) {
UIColumn column = table.findColumn(filterState.getColumnKey());
- filterMetadata.add(
+ if (column != null) {
+ filterMetadata.add(
new FilterMeta(
- column,
- column.getValueExpression(DataTable.PropertyKeys.filterBy.toString()),
- filterState.getFilterValue()));
+ column,
+ column.getValueExpression(DataTable.PropertyKeys.filterBy.toString()),
+ filterState.getFilterValue()));
+ }
}
table.setFilterMetadata(filterMetadata);
|
fixed NPE from #<I>
|
diff --git a/src/main/java/org/sikuli/slides/sikuli/RegionSelector.java b/src/main/java/org/sikuli/slides/sikuli/RegionSelector.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/sikuli/slides/sikuli/RegionSelector.java
+++ b/src/main/java/org/sikuli/slides/sikuli/RegionSelector.java
@@ -186,7 +186,7 @@ public class RegionSelector {
private ScreenRegion doDirectionalSearch(ImageTarget imageTarget,
SlideTargetRegion slideTargetRegion, int direction) {
- ScreenRegion fullScreenRegion=new DesktopScreenRegion();
+ ScreenRegion fullScreenRegion=SikuliController.getFullScreenRegion();
List<ScreenRegion> directionScreenRegions;
if(direction==TOP){
directionScreenRegions=getTopScreenRegionList();
|
use screen id constant to support external monitor mode
|
diff --git a/src/Utils.php b/src/Utils.php
index <HASH>..<HASH> 100644
--- a/src/Utils.php
+++ b/src/Utils.php
@@ -48,11 +48,6 @@ abstract class Utils
$dom = self::loadXML($xml);
$xpath = new DOMXPath($dom);
$nodes = $xpath->query(str_repeat('//' . $tagName, 1 + $nestingLevel));
- if (!$nodes)
- {
- return $xml;
- }
-
foreach ($nodes as $node)
{
$node->parentNode->removeChild($node);
|
Utils: removed alternative code path from removeTag()
|
diff --git a/lib/travis/services/find_build.rb b/lib/travis/services/find_build.rb
index <HASH>..<HASH> 100644
--- a/lib/travis/services/find_build.rb
+++ b/lib/travis/services/find_build.rb
@@ -47,9 +47,6 @@ module Travis
ActiveRecord::Associations::Preloader.new(build, [:matrix, :commit, :request]).run
ActiveRecord::Associations::Preloader.new(build.matrix, :log, select: [:id, :job_id, :updated_at]).run
ActiveRecord::Associations::Preloader.new(build.matrix, :annotations).run
- build.matrix.each do |job|
- job.config = {} if params[:exclude_config]
- end
build
end
end
|
don't blank out the job config in find_build
|
diff --git a/src/system.config.js b/src/system.config.js
index <HASH>..<HASH> 100644
--- a/src/system.config.js
+++ b/src/system.config.js
@@ -38,7 +38,7 @@ var systemConfig = {
* http://localhost:9010/ when you're running tests. The window/tab can be left
* open and the tests will automatically occur there during the build.
*/
- browsers: ['PhantomJS']
+ browsers: []
},
e2e: {
// Enable / disable running end-to-end tests in dev mode
@@ -53,7 +53,7 @@ var systemConfig = {
* http://localhost:9011/ when you're running tests. The window/tab can be left
* open and the tests will automatically occur there during the build.
*/
- browsers: ['PhantomJS']
+ browsers: []
},
mocks: {
/**
|
fix(test): run tests with no browser started automatically
Implements Solution 2: Remove PhantomJS from system.config.js
Closes #<I>
|
diff --git a/src/MadeYourDay/Contao/CustomElements.php b/src/MadeYourDay/Contao/CustomElements.php
index <HASH>..<HASH> 100644
--- a/src/MadeYourDay/Contao/CustomElements.php
+++ b/src/MadeYourDay/Contao/CustomElements.php
@@ -929,6 +929,16 @@ class CustomElements
}
}
+ // The getInstance calls are neccessary to keep the contao instance
+ // stack intact and prevent an "Invalid connection resource" exception
+ if (TL_MODE === 'BE') {
+ \BackendUser::getInstance();
+ }
+ else if(TL_MODE === 'FE') {
+ \FrontendUser::getInstance();
+ }
+ \Database::getInstance();
+
$contents = array();
$contents[] = '<?php' . "\n";
$contents[] = '$fileCacheHash = ' . var_export($cacheHash, true) . ';' . "\n";
|
Fixed "Invalid connection resource" exception
|
diff --git a/db/seeds.rb b/db/seeds.rb
index <HASH>..<HASH> 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -70,6 +70,7 @@ Role.allow 'admin_role', [:read, :delete, :sync], "sync_management"
Role.allow 'admin_role', [:read], "packages"
Role.allow 'admin_role', [:read], "errata"
Role.allow 'admin_role', [:create, :delete, :read], "search"
+Role.allow 'admin_role', [:read], "operations"
#These are candlepin proxy actions
Role.allow 'admin_role', [:create, :read, :update, :delete, :import], "owners"
|
adding missing operations resource_type to seeds
|
diff --git a/kafka/kafka.go b/kafka/kafka.go
index <HASH>..<HASH> 100644
--- a/kafka/kafka.go
+++ b/kafka/kafka.go
@@ -1,5 +1,3 @@
-package kafka
-
/**
* Copyright 2016 Confluent Inc.
*
@@ -251,6 +249,7 @@ package kafka
// possible complications with blocking Poll() calls.
//
// Note: The Confluent Kafka Go client is safe for concurrent use.
+package kafka
import (
"fmt"
|
kafka.go: revert partial f9fce7ae to reinstate package docs
The "package .." stanza needs to follow the package docs comment, but
a previous commit moved the stanza to the top of the file which caused the
package docs to be ignored by 'godoc'.
|
diff --git a/probe.js b/probe.js
index <HASH>..<HASH> 100644
--- a/probe.js
+++ b/probe.js
@@ -86,7 +86,7 @@ Probe.prototype.error = function errorTrace(event, order, value) {
Probe.prototype.make = function make(name) {
assert(name, 'new probes need a name');
-
+
var probe = Probe.New();
probe.module = name;
@@ -103,7 +103,7 @@ Probe.NewWithTracer = function NewWithTracer(tracer) {
var probe = Probe.New();
probe.tracer = tracer;
- probe.module = '/';
+ probe.module = 'ROOT';
return probe;
};
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -16,7 +16,7 @@ test('happy path', function (t) {
jtrace.on(yes, function (facets, values) {
t.equals(facets.event, 'test');
t.equals(facets.rank, 001);
- t.deepEquals(facets.module, '/');
+ t.deepEquals(facets.module, 'ROOT');
t.deepEquals(item, values);
});
|
rename / to ROOT module
|
diff --git a/lib/jsi/base.rb b/lib/jsi/base.rb
index <HASH>..<HASH> 100644
--- a/lib/jsi/base.rb
+++ b/lib/jsi/base.rb
@@ -443,11 +443,8 @@ module JSI
def jsi_modified_copy(&block)
if @jsi_ptr.root?
modified_document = @jsi_ptr.modified_document_copy(@jsi_document, &block)
- self.class.new(Base::NOINSTANCE,
- jsi_document: modified_document,
- jsi_ptr: @jsi_ptr,
- jsi_schema_base_uri: @jsi_schema_base_uri,
- jsi_schema_resource_ancestors: @jsi_schema_resource_ancestors, # this can only be empty but included for consistency
+ jsi_schemas.new_jsi(modified_document,
+ uri: jsi_schema_base_uri,
)
else
modified_jsi_root_node = @jsi_root_node.jsi_modified_copy do |root|
|
Base#jsi_modified_copy reinstantiates the root with SchemaSet#new_jsi
|
diff --git a/script/enable_i2c.js b/script/enable_i2c.js
index <HASH>..<HASH> 100755
--- a/script/enable_i2c.js
+++ b/script/enable_i2c.js
@@ -27,7 +27,16 @@ var fs = require('fs');
var iniBuilder = require('ini-builder');
console.log('Checking if I2C is enabled at boot time');
-var config = iniBuilder.parse(fs.readFileSync('/boot/config.txt').toString(), { commentDelimiter: '#' });
+
+var config = '';
+
+try {
+ config = fs.readFileSync('/boot/config.txt').toString()
+} catch (e) {
+}
+
+config = iniBuilder.parse(config, { commentDelimiter: '#' })
+
var changes = false;
var i2c_arm = iniBuilder.find(config, ['dtparam', 'i2c_arm']);
|
Run enable_i2c.js where /boot/config.txt does not exist
|
diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/client/ssh/__init__.py
+++ b/salt/client/ssh/__init__.py
@@ -409,6 +409,10 @@ class SSH(object):
running.pop(host)
if len(rets) >= len(self.targets):
break
+ # Sleep when limit or all threads started
+ if len(running) >= self.opts.get('ssh_max_procs', 25) or len(self.targets) >= len(running):
+ time.sleep(0.1)
+
def run_iter(self):
'''
|
Fix for high cpu usage by salt-ssh
|
diff --git a/lib/opal/parser/lexer.rb b/lib/opal/parser/lexer.rb
index <HASH>..<HASH> 100644
--- a/lib/opal/parser/lexer.rb
+++ b/lib/opal/parser/lexer.rb
@@ -421,13 +421,13 @@ module Opal
end
def heredoc_identifier
- if @scanner.scan(/(-?)['"]?(\w+)['"]?/)
+ if scan(/(-?)['"]?(\w+)['"]?/)
heredoc = @scanner[2]
self.strterm = new_strterm(:heredoc, heredoc, heredoc)
# if ruby code at end of line after heredoc, we have to store it to
# parse after heredoc is finished parsing
- end_of_line = @scanner.scan(/.*\n/)
+ end_of_line = scan(/.*\n/)
self.strterm[:scanner] = StringScanner.new(end_of_line) if end_of_line != "\n"
self.yylval = heredoc
|
Always use #scan() and never @scanner directly [lexer]
|
diff --git a/src/HtmlPage.php b/src/HtmlPage.php
index <HASH>..<HASH> 100644
--- a/src/HtmlPage.php
+++ b/src/HtmlPage.php
@@ -217,7 +217,7 @@ class HtmlPage implements Linkable, ContentElementInterface, StatusCodeContainer
*/
public function getLinks()
{
- return array_values($this->getStyleLinks() + array_filter($this->headElements, function(HeadElement $element) {
+ return array_merge($this->getStyleLinks(), array_filter($this->headElements, function(HeadElement $element) {
return $element instanceof LinkInterface;
}));
}
|
More stable way of merging the 2 kinds of links.
|
diff --git a/src/playbacks/html5_audio/html5_audio.js b/src/playbacks/html5_audio/html5_audio.js
index <HASH>..<HASH> 100644
--- a/src/playbacks/html5_audio/html5_audio.js
+++ b/src/playbacks/html5_audio/html5_audio.js
@@ -77,7 +77,9 @@ class HTML5Audio extends Playback {
}
play() {
- this.el.src = this.options.src
+ if (this.el.src !== this.options.src) {
+ this.el.src = this.options.src
+ }
this.el.play()
this.trigger(Events.PLAYBACK_PLAY);
}
|
html5 audio: fix seek back on play (closes #<I>)
|
diff --git a/lib/ansiblelint/version.py b/lib/ansiblelint/version.py
index <HASH>..<HASH> 100644
--- a/lib/ansiblelint/version.py
+++ b/lib/ansiblelint/version.py
@@ -1 +1 @@
-__version__ = '3.4.0'
+__version__ = '3.4.1'
|
Update version to <I>
Mistagged <I> on an out-of-sync repo
|
diff --git a/gandi/cli/commands/vm.py b/gandi/cli/commands/vm.py
index <HASH>..<HASH> 100644
--- a/gandi/cli/commands/vm.py
+++ b/gandi/cli/commands/vm.py
@@ -232,7 +232,7 @@ def create(gandi, datacenter, memory, cores, ip_version, bandwidth, login,
pwd = click.prompt('password', hide_input=True,
confirmation_prompt=True)
- if not password:
+ if not pwd:
gandi.echo('/!\ Please be aware that you did not provide a password, '
'some services like console will not be able to work.')
|
Don't show console password warning when creating a vm if password is provided
|
diff --git a/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADAuthenticationFilterAutoConfiguration.java b/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADAuthenticationFilterAutoConfiguration.java
index <HASH>..<HASH> 100644
--- a/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADAuthenticationFilterAutoConfiguration.java
+++ b/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AADAuthenticationFilterAutoConfiguration.java
@@ -7,7 +7,6 @@ package com.microsoft.azure.spring.autoconfigure.aad;
import com.microsoft.azure.telemetry.TelemetryData;
import com.microsoft.azure.telemetry.TelemetryProxy;
-import com.microsoft.azure.utils.PropertyLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
removes unused import (#<I>)
|
diff --git a/shared/teams/team/settings-tab/index.js b/shared/teams/team/settings-tab/index.js
index <HASH>..<HASH> 100644
--- a/shared/teams/team/settings-tab/index.js
+++ b/shared/teams/team/settings-tab/index.js
@@ -76,7 +76,9 @@ const SetMemberShowcase = (props: SettingProps) => (
<Text type="BodySmall">
{props.yourOperations.setMemberShowcase
? 'Your profile will mention this team. Team description and number of members will be public.'
- : "Admins aren't allowing members to publish this team on their profile."}
+ : props.yourOperations.joinTeam
+ ? 'You must join this team to publish it on your profile.'
+ : "Admins aren't allowing members to publish this team on their profile."}
</Text>
</Box>
</Box>
|
prompt implicit admins who have not joined yet (#<I>)
|
diff --git a/Classes/Command/DocumentationCommandController.php b/Classes/Command/DocumentationCommandController.php
index <HASH>..<HASH> 100644
--- a/Classes/Command/DocumentationCommandController.php
+++ b/Classes/Command/DocumentationCommandController.php
@@ -62,7 +62,7 @@ class DocumentationCommandController extends CommandController implements Single
$this->sendAndExit(1);
}
if ($targetFile === NULL) {
- $this->output($xsdSchema);
+ echo $xsdSchema;
} else {
file_put_contents($targetFile, $xsdSchema);
}
|
[BUGFIX] Direct echo of XSD to avoid console formatting
|
diff --git a/lib/jsduck/options.rb b/lib/jsduck/options.rb
index <HASH>..<HASH> 100644
--- a/lib/jsduck/options.rb
+++ b/lib/jsduck/options.rb
@@ -137,6 +137,7 @@ module JsDuck
# enable all warnings except :link_auto
Logger.set_warning(:all, true)
Logger.set_warning(:link_auto, false)
+ Logger.set_warning(:param_count, false)
end
# Make options object behave like hash.
|
Disable the param_count warning by default.
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -48,6 +48,7 @@
options = options || {};
var makeApiCall = require('./internal/make-api-call').inject(options);
+ var deprecate = require('util').deprecate;
var makeApiMethod = function(apiConfig) {
return function(query, callback, customParams) {
@@ -88,7 +89,7 @@
reverseGeocode: makeApiMethod(geocode.reverseGeocode),
places: makeApiMethod(places.places),
placesNearby: makeApiMethod(places.placesNearby),
- placesRadar: makeApiMethod(places.placesRadar),
+ placesRadar: deprecate(makeApiMethod(places.placesRadar), 'placesRadar is deprecated, see http://goo.gl/BGiumE'),
place: makeApiMethod(places.place),
placesPhoto: makeApiMethod(places.placesPhoto),
placesAutoComplete: makeApiMethod(places.placesAutoComplete),
|
Mark places radar search as deprecated.
|
diff --git a/tests/compiler_test.js b/tests/compiler_test.js
index <HASH>..<HASH> 100644
--- a/tests/compiler_test.js
+++ b/tests/compiler_test.js
@@ -131,4 +131,21 @@ exports.test_lda_indy = function(test){
var code = compiler.semantic(ast);
test.deepEqual(code, [0xb1, 0x20]);
test.done();
-};
\ No newline at end of file
+};
+
+exports.test_invalid_token = function(test){
+ try {
+ var tokens = compiler.lexical('.invalid #TOKEN');
+ test.fail();
+ }catch(e){
+ test.equal("Lexical Error" , e.name);
+ test.equal("Lexical Error Message" , e.message);
+ test.equal(1 , e.erros.length);
+ test.equal("Invalid Token" , e.erros[0].name);
+ test.equal(1 , e.erros[0].line);
+ test.equal(10 , e.erros[0].column);
+ test.equal("#TOKEN" , e.erros[0].value);
+ test.equal("Token #TOKEN at line 1 column 10 is invalid" , e.erros[0].message);
+ }
+ test.done();
+};
|
added a test_invalid_token on compiler_test
|
diff --git a/pymatgen/apps/borg/tests/test_hive.py b/pymatgen/apps/borg/tests/test_hive.py
index <HASH>..<HASH> 100644
--- a/pymatgen/apps/borg/tests/test_hive.py
+++ b/pymatgen/apps/borg/tests/test_hive.py
@@ -52,7 +52,7 @@ class VaspToComputedEntryDroneTest(unittest.TestCase):
self.assertAlmostEqual(entry.energy, 0.5559329)
self.assertIsInstance(entry, ComputedStructureEntry)
self.assertIsNotNone(entry.structure)
- self.assertEqual(len(entry.parameters["history"]), 2)
+ # self.assertEqual(len(entry.parameters["history"]), 2)
def test_to_from_dict(self):
d = self.structure_drone.as_dict()
|
Remove hisotry test. If people do not want to implement tests properly,
the BDFL will unilaterally remove these changes.
|
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/adapter/BaseDrawerAdapter.java b/library/src/main/java/com/mikepenz/materialdrawer/adapter/BaseDrawerAdapter.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/mikepenz/materialdrawer/adapter/BaseDrawerAdapter.java
+++ b/library/src/main/java/com/mikepenz/materialdrawer/adapter/BaseDrawerAdapter.java
@@ -108,7 +108,7 @@ public abstract class BaseDrawerAdapter extends RecyclerView.Adapter<RecyclerVie
//fix wrong remembered position
if (position < previousSelection) {
- previousSelection = previousSelection + 1;
+ previousSelection = previousSelection - 1;
}
}
|
* fix selection not removed if items were removed
|
diff --git a/gcs/gcstesting/bucket_tests.go b/gcs/gcstesting/bucket_tests.go
index <HASH>..<HASH> 100644
--- a/gcs/gcstesting/bucket_tests.go
+++ b/gcs/gcstesting/bucket_tests.go
@@ -76,8 +76,8 @@ type bucketTest struct {
var _ bucketTestSetUpInterface = &bucketTest{}
func (t *bucketTest) setUpBucketTest(deps BucketTestDeps) {
- t.bucket = deps.bucket
- t.clock = deps.clock
+ t.bucket = deps.Bucket
+ t.clock = deps.Clock
t.ctx = context.Background()
}
diff --git a/gcs/gcstesting/register_bucket_tests.go b/gcs/gcstesting/register_bucket_tests.go
index <HASH>..<HASH> 100644
--- a/gcs/gcstesting/register_bucket_tests.go
+++ b/gcs/gcstesting/register_bucket_tests.go
@@ -27,10 +27,10 @@ import (
// Dependencies needed for tests registered by RegisterBucketTests.
type BucketTestDeps struct {
// An initialized, empty bucket.
- bucket gcs.Bucket
+ Bucket gcs.Bucket
// A clock matching the bucket's notion of time.
- clock timeutil.Clock
+ Clock timeutil.Clock
}
// An interface that all bucket tests must implement.
|
Oops, export bucket and clock fields.
|
diff --git a/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java b/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java
index <HASH>..<HASH> 100644
--- a/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java
+++ b/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java
@@ -428,6 +428,7 @@ public class JavadocTokenizer extends JavaTokenizer {
}
} finally {
scanned = true;
+ comment_reader = null;
if (docComment != null &&
docComment.matches("(?sm).*^\\s*@deprecated( |$).*")) {
deprecatedFlag = true;
|
<I>: javadoc OutOfMemory error results in several jdk8 tl nightly failures
Reviewed-by: ksrini
|
diff --git a/spec/js_serializer_spec.rb b/spec/js_serializer_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/js_serializer_spec.rb
+++ b/spec/js_serializer_spec.rb
@@ -50,10 +50,6 @@ describe JsDuck::Js::Serializer do
test("var foo, bar = 5;")
end
- it "variable declaration with let" do
- test("let foo = true;")
- end
-
it "assignment of function expression" do
test("foo = function (a) {};")
end
|
Eliminate test for let expression.
That's not supported by RKelly, and really not needed in practice.
|
diff --git a/pymbar/__init__.py b/pymbar/__init__.py
index <HASH>..<HASH> 100644
--- a/pymbar/__init__.py
+++ b/pymbar/__init__.py
@@ -31,10 +31,19 @@ __license__ = "LGPL"
__maintainer__ = "Michael R. Shirts and John D. Chodera"
__email__ = "michael.shirts@virginia.edu,choderaj@mskcc.org"
-from pymbar import timeseries, testsystems, confidenceintervals, version
+from pymbar import timeseries, testsystems, confidenceintervals
from pymbar.mbar import MBAR
from pymbar.bar import BAR, BARzero
from pymbar.exp import EXP, EXPGauss
+try:
+ from pymbar import version
+except:
+ # Fill in information manually.
+ # TODO: See if we can at least get the git revision info in here.
+ version = 'dev'
+ full_version = 'dev'
+ git_revision = 'dev'
+ isrelease = False
__all__ = ['EXP', 'EXPGauss', 'BAR', 'BARzero', 'MBAR', 'timeseries', 'testsystems', 'confidenceintervals', 'utils']
|
Attempted workaround for version travis conda issue.
|
diff --git a/apns2/client.py b/apns2/client.py
index <HASH>..<HASH> 100644
--- a/apns2/client.py
+++ b/apns2/client.py
@@ -22,7 +22,7 @@ class APNsClient(object):
self.__connection = HTTP20Connection(server, port, ssl_context=ssl_context)
def send_notification(self, token_hex, notification, priority=NotificationPriority.Immediate, topic=None):
- json_payload = dumps(notification.dict(), ensure_ascii=False, separators=(',',':')).encode('utf-8')
+ json_payload = dumps(notification.dict(), ensure_ascii=False, separators=(',', ':')).encode('utf-8')
headers = {
'apns-priority': priority.value
|
Update client.py according to PEP8
|
diff --git a/eth/backend.go b/eth/backend.go
index <HASH>..<HASH> 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -449,14 +449,10 @@ func (s *Ethereum) Start() error {
ClientString: s.net.Name,
ProtocolVersion: ProtocolVersion,
})
-
- if s.net.MaxPeers > 0 {
- err := s.net.Start()
- if err != nil {
- return err
- }
+ err := s.net.Start()
+ if err != nil {
+ return err
}
-
// periodically flush databases
go s.syncDatabases()
diff --git a/p2p/server.go b/p2p/server.go
index <HASH>..<HASH> 100644
--- a/p2p/server.go
+++ b/p2p/server.go
@@ -275,9 +275,6 @@ func (srv *Server) Start() (err error) {
if srv.PrivateKey == nil {
return fmt.Errorf("Server.PrivateKey must be set to a non-nil key")
}
- if srv.MaxPeers <= 0 {
- return fmt.Errorf("Server.MaxPeers must be > 0")
- }
if srv.newTransport == nil {
srv.newTransport = newRLPX
}
|
eth, p2p: start the p2p server even if maxpeers == 0
|
diff --git a/tohu/generators_NEW.py b/tohu/generators_NEW.py
index <HASH>..<HASH> 100644
--- a/tohu/generators_NEW.py
+++ b/tohu/generators_NEW.py
@@ -175,8 +175,13 @@ class SelectOne(TohuUltraBaseGenerator):
return cur_values[idx]
def reset(self, seed):
+ logger.debug(f"Ignoring explicit reset() on derived generator: {self}")
+
+ def reset_clone(self, seed):
+ logger.warning("TODO: rename method reset_clone() to reset_dependent_generator() because ExtractAttribute is not a direct clone")
if seed is not None:
self.randgen.seed(seed)
+ #self.gen.reset(seed)
return self
|
Make SelectOne a proper derived generator
|
diff --git a/num2words/lang_ES_CO.py b/num2words/lang_ES_CO.py
index <HASH>..<HASH> 100644
--- a/num2words/lang_ES_CO.py
+++ b/num2words/lang_ES_CO.py
@@ -20,7 +20,7 @@ from __future__ import unicode_literals, print_function
from .lang_EU import Num2Word_EU
-class Num2Word_ES(Num2Word_EU):
+class Num2Word_ES_CO(Num2Word_EU):
# //CHECK: Is this sufficient??
def set_high_numwords(self, high):
max = 3 + 6*len(high)
diff --git a/num2words/lang_ES_VE.py b/num2words/lang_ES_VE.py
index <HASH>..<HASH> 100644
--- a/num2words/lang_ES_VE.py
+++ b/num2words/lang_ES_VE.py
@@ -20,7 +20,7 @@ from __future__ import unicode_literals, print_function
from .lang_EU import Num2Word_EU
-class Num2Word_ES(Num2Word_EU):
+class Num2Word_ES_VE(Num2Word_EU):
# //CHECK: Is this sufficient??
def set_high_numwords(self, high):
max = 3 + 6*len(high)
|
[IMP]Adds new files for ES_CO and ES_VE.
|
diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/model/Run.java
+++ b/core/src/main/java/hudson/model/Run.java
@@ -1523,7 +1523,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
}
/**
- * Used in {@link RunExecution#run} to indicates that a fatal error in a build
+ * Used in {@link Run.RunExecution#run} to indicates that a fatal error in a build
* is reported to {@link BuildListener} and the build should be simply aborted
* without further recording a stack trace.
*/
|
IntelliJ complains about this. Not sure if it's a real problem
|
diff --git a/test/consumer.py b/test/consumer.py
index <HASH>..<HASH> 100644
--- a/test/consumer.py
+++ b/test/consumer.py
@@ -73,7 +73,7 @@ class TestFetcher(object):
response = associate(body, self.assoc_secret, self.assoc_handle)
self.num_assocs += 1
return self.response(url, response)
-
+
user_page_pat = '''\
<html>
<head>
@@ -208,7 +208,7 @@ def test_construct():
assert oidc.store is store_sentinel
assert oidc.fetcher is fetcher_sentinel
assert oidc.immediate
-
+
oidc = OpenIDConsumer(store_sentinel, fetcher=None)
f = oidc.fetcher
assert hasattr(f, 'get')
|
[project @ M-x whitespace-cleanup]
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -27,6 +27,10 @@ export class RangePool {
for (const worker of this.workers) {
if (!worker.hasCompleted()) {
+ if (!worker.isActive()) {
+ return worker.activate()
+ }
+
const percentage = worker.getCompletionPercentage()
const diff = worker.getIndexLimit() - worker.getCurrentIndex()
lastWorker = worker
@@ -46,7 +50,7 @@ export class RangePool {
if (this.hasCompleted()) {
throw new Error('Can not add a new worker on a completed pool')
}
- return this.registerWorker(new PoolWorker(this.getCompletedSteps(), this.length))
+ return this.registerWorker(new PoolWorker(this.getCompletedSteps(), this.length)).activate()
}
const workLeft = lazyWorker.getRemaining()
@@ -61,7 +65,7 @@ export class RangePool {
}
hasWorkingWorker(): boolean {
for (const worker of this.workers) {
- if (!worker.hasCompleted()) {
+ if (!worker.hasCompleted() && worker.isActive()) {
return true
}
}
|
:new: Use existing non-finished workers if available
This way we won't be creating gaps in the pool and will be completing the work in it's entirety
|
diff --git a/bin/svgfont2svgicons.js b/bin/svgfont2svgicons.js
index <HASH>..<HASH> 100755
--- a/bin/svgfont2svgicons.js
+++ b/bin/svgfont2svgicons.js
@@ -7,6 +7,7 @@ var svgfont2svgicons = require(__dirname + '/../src/index.js')
var fontStream = Fs.createReadStream(process.argv[2]);
var iconProvider = svgfont2svgicons();
+var unamedIconCount = 0;
fontStream.pipe(iconProvider);
@@ -15,7 +16,10 @@ iconProvider.on('readable', function() {
while(null !== glyph) {
glyph = iconProvider.read();
if(glyph) {
- glyphPath = path.join(process.argv[3], glyph.name + '.svg');
+ glyphPath = path.join(
+ process.argv[3],
+ (glyph.name || 'icon' + (++unamedIconCount) + '.svg')
+ );
console.log('Saving glyph "' + glyph.name + '" to "' + glyphPath + '"');
glyph.stream.pipe(Fs.createWriteStream(glyphPath));
}
|
Taking in count unamed icons
|
diff --git a/lib/plugins/static.js b/lib/plugins/static.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/static.js
+++ b/lib/plugins/static.js
@@ -35,7 +35,7 @@ function serveStatic(opts) {
req.path()));
return;
} else if (!stats.isFile()) {
- next(new ResourceNotFoundError(req.path()));
+ next(new ResourceNotFoundError('%s does not exist', req.path()));
return;
}
|
#<I> - serveStatic does not append
|
diff --git a/tests/test_request.py b/tests/test_request.py
index <HASH>..<HASH> 100644
--- a/tests/test_request.py
+++ b/tests/test_request.py
@@ -93,7 +93,7 @@ def server_thread(server):
request = server.get_request()
server.process_request(*request)
server.server_close()
- server.socket.close()
+ # server.socket.close()
class TestQuery(object):
|
test - More time for the client to fetch the data returned
|
diff --git a/lib/class.OS_Linux.php b/lib/class.OS_Linux.php
index <HASH>..<HASH> 100644
--- a/lib/class.OS_Linux.php
+++ b/lib/class.OS_Linux.php
@@ -455,7 +455,7 @@ class OS_Linux extends OS_Unix_Common {
$return = array();
// hddtemp?
- if (array_key_exists('hddtemp', (array)$this->settings['temps']) && !empty($this->settings['temps']['hddtemp'])) {
+ if (array_key_exists('hddtemp', (array)$this->settings['temps']) && !empty($this->settings['temps']['hddtemp']) && isset($this->settings['hddtemp'])) {
try {
// Initiate class
$hddtemp = new GetHddTemp($this->settings);
@@ -487,7 +487,7 @@ class OS_Linux extends OS_Unix_Common {
}
// mbmon?
- if (array_key_exists('mbmon', (array)$this->settings['temps']) && !empty($this->settings['temps']['mbmon'])) {
+ if (array_key_exists('mbmon', (array)$this->settings['temps']) && !empty($this->settings['temps']['mbmon']) && isset($this->settings['mbmon'])) {
try {
// Initiate class
$mbmon = new GetMbMon;
|
Adding array index checks
In test suite, config details are missing for hddtemp/mbmon in the test config,
which caused phpunit to spit invalid index errors. This is now safeguarded
against using isset()'s
|
diff --git a/lib/ooor/errors.rb b/lib/ooor/errors.rb
index <HASH>..<HASH> 100644
--- a/lib/ooor/errors.rb
+++ b/lib/ooor/errors.rb
@@ -25,6 +25,8 @@ module Ooor
return ValueError.new(method, faultCode, faultString, *args)
elsif faultCode =~ /ValidateError/
return ValidationError.new(method, faultCode, faultString, *args)
+ elsif faultCode =~ /AccessDenied/
+ return UnAuthorizedError.new(method, faultCode, faultString, *args)
elsif faultCode =~ /AuthenticationError: Credentials not provided/
return InvalidSessionError.new(method, faultCode, faultString, *args)
else
|
properly generates UnAuthorizedError
|
diff --git a/db/sql.php b/db/sql.php
index <HASH>..<HASH> 100644
--- a/db/sql.php
+++ b/db/sql.php
@@ -302,9 +302,8 @@ class SQL extends \PDO {
// This requires SUPER privilege!
$rows=array();
foreach ($this->exec($val[0],NULL,$ttl) as $row) {
- $field=trim($row[$val[1]],'\'"[]`');
- if (!$fields || in_array($field,$fields))
- $rows[$field]=array(
+ if (!$fields || in_array($row[$val[1]],$fields))
+ $rows[$row[$val[1]]]=array(
'type'=>$row[$val[2]],
'pdo_type'=>
preg_match('/int\b|int(?=eger)|bool/i',
|
Revert to prior schema detection (Issue #<I>)
|
diff --git a/smart_selects/views.py b/smart_selects/views.py
index <HASH>..<HASH> 100644
--- a/smart_selects/views.py
+++ b/smart_selects/views.py
@@ -1,5 +1,6 @@
from django.http import HttpResponse
from django.db.models import Q
+from django.utils.six import iteritems
try:
from django.apps import apps
@@ -41,7 +42,7 @@ def do_filter(qs, keywords, exclude=False):
Support for multiple-selected parent values.
"""
and_q = Q()
- for keyword, value in keywords.iteritems():
+ for keyword, value in iteritems(keywords):
values = value.split(",")
if len(values) > 0:
or_q = Q()
|
Fix python 3 compatibility issue
Using iteritems() to iterate dicts isn't supported by Python 3. Applied a solution that supports both Python 2 and 3.
|
diff --git a/molgenis-api-tests/src/test/java/org/molgenis/api/tests/rest/v2/RestControllerV2IT.java b/molgenis-api-tests/src/test/java/org/molgenis/api/tests/rest/v2/RestControllerV2IT.java
index <HASH>..<HASH> 100644
--- a/molgenis-api-tests/src/test/java/org/molgenis/api/tests/rest/v2/RestControllerV2IT.java
+++ b/molgenis-api-tests/src/test/java/org/molgenis/api/tests/rest/v2/RestControllerV2IT.java
@@ -269,7 +269,7 @@ public class RestControllerV2IT
.all()
.header(X_MOLGENIS_TOKEN, testUserToken)
.when()
- .get(API_V2 + "sys_sec_User?aggs=x==active;y==superuser")
+ .get(API_V2 + "sys_sec_User?aggs=x==active;y==superuser;distinct==active")
.then()
.statusCode(OKE)
.body("aggs.matrix[0][0]", Matchers.equalTo(1));
|
Use distinct query to prevent test users to interfere with the aggregate result
|
diff --git a/src/tests/org/owasp/html/AntiSamyTest.java b/src/tests/org/owasp/html/AntiSamyTest.java
index <HASH>..<HASH> 100644
--- a/src/tests/org/owasp/html/AntiSamyTest.java
+++ b/src/tests/org/owasp/html/AntiSamyTest.java
@@ -49,7 +49,7 @@ import junit.framework.TestSuite;
public class AntiSamyTest extends TestCase {
static final boolean RUN_KNOWN_FAILURES = false;
- static final boolean DISABLE_INTERNETS = true;
+ static final boolean DISABLE_INTERNETS = false;
private static HtmlSanitizer.Policy makePolicy(Appendable buffer) {
final HtmlStreamRenderer renderer = HtmlStreamRenderer.create(
|
re-enable internet tests inherited from AntiSamy
|
diff --git a/pyemma/msm/tests/test_bayesian_hmsm.py b/pyemma/msm/tests/test_bayesian_hmsm.py
index <HASH>..<HASH> 100644
--- a/pyemma/msm/tests/test_bayesian_hmsm.py
+++ b/pyemma/msm/tests/test_bayesian_hmsm.py
@@ -320,5 +320,19 @@ class TestBHMMSpecialCases(unittest.TestCase):
assert strajs[0][0] == 2
assert strajs[0][6] == 2
+ def test_initialized_bhmm(self):
+ import pyemma.datasets
+ import pyemma.msm
+
+ obs = pyemma.datasets.load_2well_discrete().dtraj_T100K_dt10
+
+ init_hmm = pyemma.msm.estimate_hidden_markov_model(obs, 2, 10)
+ bay_hmm = pyemma.msm.estimators.BayesianHMSM(nstates=init_hmm.nstates, lag=init_hmm.lag,
+ init_hmsm=init_hmm)
+ bay_hmm.estimate(obs)
+
+ assert np.isclose(bay_hmm.stationary_distribution.sum(), 1)
+
+
if __name__ == "__main__":
unittest.main()
|
[TestBHMMSpecialCases] added test for initialized bhmm
|
diff --git a/integration_tests/root_test.go b/integration_tests/root_test.go
index <HASH>..<HASH> 100644
--- a/integration_tests/root_test.go
+++ b/integration_tests/root_test.go
@@ -3,12 +3,17 @@ package wl_integration_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
+ "github.com/robdimsdale/wl"
)
var _ = Describe("basic root functionality", func() {
It("gets root correctly", func() {
- root, err := client.Root()
- Expect(err).NotTo(HaveOccurred())
+ var err error
+ var root wl.Root
+ Eventually(func() error {
+ root, err = client.Root()
+ return err
+ }).Should(Succeed())
Expect(root.ID).To(BeNumerically(">", 0))
})
|
Reduce flakiness in root test.
[#<I>]
|
diff --git a/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php b/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php
index <HASH>..<HASH> 100644
--- a/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php
+++ b/tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php
@@ -548,9 +548,9 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
)),
array(array(
'fieldName' => 'decimal',
- 'phpType' => 'float',
+ 'phpType' => 'string',
'dbType' => 'decimal',
- 'value' => 33.33
+ 'value' => '33.33'
),
));
}
|
Updated EntityGeneratorTest::testEntityTypeAlias
|
diff --git a/lib/deployml/project.rb b/lib/deployml/project.rb
index <HASH>..<HASH> 100644
--- a/lib/deployml/project.rb
+++ b/lib/deployml/project.rb
@@ -159,13 +159,15 @@ module DeploYML
end
def load_server!
- unless Servers.has_key?(@config.server_name)
- raise(InvalidConfig,"Unknown Server #{@config.server_name} given under the :server option",caller)
- end
+ if @config.server_name
+ unless Servers.has_key?(@config.server_name)
+ raise(InvalidConfig,"Unknown Server #{@config.server_name} given under the :server option",caller)
+ end
- extend SERVERS[@config.server_name]
+ extend SERVERS[@config.server_name]
- initialize_server() if self.respond_to?(:initialize_server)
+ initialize_server() if self.respond_to?(:initialize_server)
+ end
end
end
|
Only load the Server module if a server was defined in deploy.yml.
|
diff --git a/module/base/src/cache.js b/module/base/src/cache.js
index <HASH>..<HASH> 100644
--- a/module/base/src/cache.js
+++ b/module/base/src/cache.js
@@ -7,7 +7,7 @@ const { execSync } = require('child_process');
const appCore = require('./_app-core');
function isOlder(cacheStat, fullStat) {
- return cacheStat.ctimeMs < fullStat.ctimeMs || cacheStat.mtimeMs < fullStat.mtimeMs || cacheStat.atimeMs < fullStat.atimeMs;
+ return cacheStat.ctimeMs < fullStat.ctimeMs || cacheStat.mtimeMs < fullStat.mtimeMs;
}
class Cache {
|
No longer consider access time for staleness, only mtime and ctime
|
diff --git a/buildbot/slave/commands.py b/buildbot/slave/commands.py
index <HASH>..<HASH> 100644
--- a/buildbot/slave/commands.py
+++ b/buildbot/slave/commands.py
@@ -196,6 +196,7 @@ class LogFileWatcher:
return # no file to work with
self.f = open(self.logfile, "rb")
self.started = True
+ self.f.seek(self.f.tell(), 0)
while True:
data = self.f.read(10000)
if not data:
|
Seek to current file position to clear EOF status on Mac OS X.
Mac OS X and Linux differ in behaviour when reading from a file that has previously reached EOF. On
Linux, any new data that has been appended to the file will be returned. On Mac OS X, the empty string
will always be returned. Seeking to the current position in the file resets the EOF flag on Mac OS X
and will allow future reads to work as intended.
|
diff --git a/src/Adapters/PostgreSQL.php b/src/Adapters/PostgreSQL.php
index <HASH>..<HASH> 100644
--- a/src/Adapters/PostgreSQL.php
+++ b/src/Adapters/PostgreSQL.php
@@ -19,6 +19,31 @@ class PostgreSQL extends SQL
{
return $this->client->exec("TRUNCATE TABLE $this->table") !== false;
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set($key, $value, $expire = 0)
+ {
+ $value = $this->serialize($value);
+ $expire = $this->expire($expire);
+
+ $this->clearExpired();
+
+ $statement = $this->client->prepare(
+ "INSERT INTO $this->table (k, v, e)
+ VALUES (:key, :value, :expire)
+ ON CONFLICT (k) DO UPDATE SET v=EXCLUDED.v, e=EXCLUDED.e"
+ );
+
+ $statement->execute([
+ ':key' => $key,
+ ':value' => $value,
+ ':expire' => $expire,
+ ]);
+
+ return $statement->rowCount() === 1;
+ }
/**
* {@inheritdoc}
|
Postgres set on conflict update
Since version <I> postgres (<I> latest) has on conflict update set syntax. This syntax avoids lots of error record in postgres logs (duplicate key error).
<URL>
|
diff --git a/qualysapi/config.py b/qualysapi/config.py
index <HASH>..<HASH> 100644
--- a/qualysapi/config.py
+++ b/qualysapi/config.py
@@ -86,17 +86,17 @@ class QualysConnectConfig:
self.max_retries = int(self.max_retries)
#Get template ID... user will need to set this to pull back CSV reports
- if not self._cfgparse.has_option('qualys', 'template_id'):
+ if not self._cfgparse.has_option(self._section, 'template_id'):
self.report_template_id = qcs.defaults['template_id']
else:
- self.report_template_id = self._cfgparse.get('qualys', 'template_id')
+ self.report_template_id = self._cfgparse.get(self._section, 'template_id')
try:
self.report_template_id = int(self.report_template_id)
except Exception:
logger.error('Report Template ID Must be set and be an integer')
print('Value template ID must be an integer.')
exit(1)
- self._cfgparse.set('qualys', 'template_id', str(self.report_template_id))
+ self._cfgparse.set(self._section, 'template_id', str(self.report_template_id))
self.report_template_id = int(self.report_template_id)
# Proxy support
|
changed section on VulnWhisperer functions
|
diff --git a/test/functional/ft_5_on_error.rb b/test/functional/ft_5_on_error.rb
index <HASH>..<HASH> 100644
--- a/test/functional/ft_5_on_error.rb
+++ b/test/functional/ft_5_on_error.rb
@@ -127,5 +127,30 @@ class FtOnErrorTest < Test::Unit::TestCase
assert_trace(pdef, 'failed.')
end
+
+ def test_with_concurrence
+
+ pdef = Ruote.process_definition do
+ sequence do
+ concurrence :on_error => 'emil' do
+ alpha
+ error 'nada0'
+ error 'nada1'
+ end
+ echo 'done.'
+ end
+ end
+
+ acount = 0
+ ecount = 0
+ @engine.register_participant(:alpha) { |wi| acount += 1 }
+ @engine.register_participant(:emil) { |wi| ecount += 1 }
+
+ #noisy
+
+ assert_trace pdef, 'done.'
+ assert_equal 1, acount
+ assert_equal 1, ecount
+ end
end
|
added test about concurrence :on_error => 'x'
|
diff --git a/includes/functions-html.php b/includes/functions-html.php
index <HASH>..<HASH> 100644
--- a/includes/functions-html.php
+++ b/includes/functions-html.php
@@ -564,7 +564,7 @@ function yourls_table_add_row( $keyword, $url, $title = '', $ip, $clicks, $times
'onclick' => "remove_link('$id');return false;",
)
);
- $actions = yourls_apply_filter( 'table_add_row_action_array', $actions );
+ $actions = yourls_apply_filter( 'table_add_row_action_array', $actions, $keyword );
// Action link buttons: the HTML
$action_links = '';
|
Extend filter-hook "table_add_row_action_array"
Closes #<I>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.