diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/src/ResourceGenerator.php b/src/ResourceGenerator.php
index <HASH>..<HASH> 100644
--- a/src/ResourceGenerator.php
+++ b/src/ResourceGenerator.php
@@ -194,7 +194,7 @@ class ResourceGenerator
'.php_cs ' .
' --allow-risky=yes -q -v --stop-on-violation --using-cache=no';
- system($command, $null);
+ exec($command);
}
private function out(string $message) | Use exec instead of system, don't want any output shown |
diff --git a/src/lib/client.js b/src/lib/client.js
index <HASH>..<HASH> 100755
--- a/src/lib/client.js
+++ b/src/lib/client.js
@@ -58,7 +58,7 @@ function Client(config) {
_.each(EsApiClient.prototype, _.bind(function (Fn, prop) {
if (Fn.prototype instanceof clientAction.ApiNamespace) {
- this[prop] = new Fn(this.transport);
+ this[prop] = new Fn(this.transport, this);
}
}, this));
diff --git a/src/lib/client_action.js b/src/lib/client_action.js
index <HASH>..<HASH> 100644
--- a/src/lib/client_action.js
+++ b/src/lib/client_action.js
@@ -24,8 +24,9 @@ exports._resolveUrl = resolveUrl;
exports.ApiNamespace = function () {};
exports.namespaceFactory = function () {
- function ClientNamespace(transport) {
+ function ClientNamespace(transport, client) {
this.transport = transport;
+ this.client = client;
}
ClientNamespace.prototype = new exports.ApiNamespace(); | pass client instance to namespaceFactory |
diff --git a/lib/chef/resource/hostname.rb b/lib/chef/resource/hostname.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/resource/hostname.rb
+++ b/lib/chef/resource/hostname.rb
@@ -203,7 +203,7 @@ class Chef
end
else # windows
- raise "Windows hostnames cannot contain a period." if new_resource.hostname.match?(/./)
+ raise "Windows hostnames cannot contain a period." if new_resource.hostname.match?(/\./)
# suppress EC2 config service from setting our hostname
if ::File.exist?('C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml') | Don't fail on every hostname with windows
Look for periods instead of the regex value . |
diff --git a/src/Transport/Http.php b/src/Transport/Http.php
index <HASH>..<HASH> 100644
--- a/src/Transport/Http.php
+++ b/src/Transport/Http.php
@@ -89,7 +89,7 @@ class Http extends AbstractTransport
// Let's only apply this value if the number of ms is greater than or equal to "1".
// In case "0" is passed as an argument, the value is reset to its default (300 s)
- if ($connectTimeoutMs > 1) {
+ if ($connectTimeoutMs >= 1) {
\curl_setopt($conn, \CURLOPT_CONNECTTIMEOUT_MS, $connectTimeoutMs);
} | Fix minimal value for connect timeout (#<I>) |
diff --git a/src/ima-plugin.js b/src/ima-plugin.js
index <HASH>..<HASH> 100644
--- a/src/ima-plugin.js
+++ b/src/ima-plugin.js
@@ -187,6 +187,24 @@ const ImaPlugin = function(player, options) {
contentSrc, adsResponse, playOnLoad);
}.bind(this);
+ /**
+ * Sets the content of the video player. You should use this method instead
+ * of setting the content src directly to ensure the proper ads request is
+ * used when the video content is loaded.
+ * @param {?string} contentSrc The URI for the content to be played. Leave
+ * blank to use the existing content.
+ * @param {?Object} adsRequest The ads request to be requested when the
+ * content loads. Leave blank to use the existing ads request.
+ * @param {?boolean} playOnLoad True to play the content once it has loaded,
+ * false to only load the content but not start playback.
+ */
+ this.setContentWithAdsResponse =
+ function(contentSrc, adsRequest, playOnLoad) {
+ this.controller.setContentWithAdsRequest(
+ contentSrc, adsRequest, playOnLoad);
+ }.bind(this);
+
+
/**
* Changes the flag to show or hide the ad countdown timer. | Added setContentWithAdsRequest to ima-plugin. |
diff --git a/abilian/web/forms/widgets.py b/abilian/web/forms/widgets.py
index <HASH>..<HASH> 100644
--- a/abilian/web/forms/widgets.py
+++ b/abilian/web/forms/widgets.py
@@ -605,8 +605,8 @@ class DateTimeInput(object):
if field_value:
value = datetime.strptime(field_value, '%d/%m/%Y %H:%M')
- date_value = value.strftime('%d/%m/%Y') if value else None
- time_value = value.strftime('%H:%M') if value else None
+ date_value = value.strftime('%d/%m/%Y') if value else u''
+ time_value = value.strftime('%H:%M') if value else u''
return (
Markup(u'<input class="datetimepicker" type="hidden" id="{id}" name="{id}" value="{date} {time}" />\n' | datetimeinput: don't use None but empty string for empty value |
diff --git a/spec/dummy/app/models/article.rb b/spec/dummy/app/models/article.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/app/models/article.rb
+++ b/spec/dummy/app/models/article.rb
@@ -1,3 +1,2 @@
class Article < ActiveRecord::Base
- attr_accessible :body, :title
end
diff --git a/spec/dummy/app/models/user.rb b/spec/dummy/app/models/user.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/app/models/user.rb
+++ b/spec/dummy/app/models/user.rb
@@ -1,3 +1,2 @@
class User < ActiveRecord::Base
- attr_accessible :locale, :name
end
diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/config/application.rb
+++ b/spec/dummy/config/application.rb
@@ -50,7 +50,7 @@ module Dummy
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
- # config.active_record.whitelist_attributes = true
+ config.active_record.whitelist_attributes = false
# Enable the asset pipeline
# config.assets.enabled = true | let's not attr_accessible, thanks |
diff --git a/lib/Widget/Widget.php b/lib/Widget/Widget.php
index <HASH>..<HASH> 100644
--- a/lib/Widget/Widget.php
+++ b/lib/Widget/Widget.php
@@ -249,7 +249,12 @@ class Widget extends WidgetProvider
}
if (2 == func_num_args()) {
- return $temp[$name] = func_get_arg(1);
+ if (isset($this->widgets[$name])) {
+ $this->widgets[$name]->option(func_get_arg(1));
+ } else {
+ $temp[$name] = func_get_arg(1);
+ }
+ return $this;
}
return isset($temp[$name]) ? $temp[$name] : null; | synced the config to instaned widget |
diff --git a/lib/stripe/webhook.rb b/lib/stripe/webhook.rb
index <HASH>..<HASH> 100644
--- a/lib/stripe/webhook.rb
+++ b/lib/stripe/webhook.rb
@@ -9,6 +9,11 @@ module Stripe
def self.construct_event(payload, sig_header, secret, tolerance: DEFAULT_TOLERANCE)
Signature.verify_header(payload, sig_header, secret, tolerance: tolerance)
+ # It's a good idea to parse the payload only after verifying it. We use
+ # `symbolize_names` so it would otherwise be technically possible to
+ # flood a target's memory if they were on an older version of Ruby that
+ # doesn't GC symbols. It also decreases the likelihood that we receive a
+ # bad payload that fails to parse and throws an exception.
data = JSON.parse(payload, symbolize_names: true)
Event.construct_from(data)
end | Add comment so the post-verify parse change doesn't regress |
diff --git a/lib/View/Button.php b/lib/View/Button.php
index <HASH>..<HASH> 100644
--- a/lib/View/Button.php
+++ b/lib/View/Button.php
@@ -55,6 +55,11 @@ class View_Button extends View_HtmlElement {
return parent::render();
}
+ function link($page,$args=array()){
+ $this->setElement('a');
+ $this->setAttr('href',$this->api->url($page,$args));
+ return $this;
+ }
// }}}
// {{{ Click handlers | add $button->link(page) for simple use of button as a link |
diff --git a/controller/deployer/main.go b/controller/deployer/main.go
index <HASH>..<HASH> 100644
--- a/controller/deployer/main.go
+++ b/controller/deployer/main.go
@@ -21,6 +21,8 @@ type context struct {
log log15.Logger
}
+const workerCount = 10
+
func main() {
log := log15.New("app", "deployer")
@@ -46,8 +48,9 @@ func main() {
}
pgxpool, err := pgx.NewConnPool(pgx.ConnPoolConfig{
- ConnConfig: pgxcfg,
- AfterConnect: que.PrepareStatements,
+ ConnConfig: pgxcfg,
+ AfterConnect: que.PrepareStatements,
+ MaxConnections: workerCount,
})
if err != nil {
log.Error("Failed to create a pgx.ConnPool", "err", err)
@@ -58,7 +61,7 @@ func main() {
q := que.NewClient(pgxpool)
wm := que.WorkMap{"deployment": cxt.HandleJob}
- workers := que.NewWorkerPool(q, wm, 10)
+ workers := que.NewWorkerPool(q, wm, workerCount)
go workers.Start()
shutdown.BeforeExit(func() { workers.Shutdown() }) | controller/deployer: Set postgres pool MaxConnections
This defaults to 5 but we run <I> workers, so bump it to <I>. |
diff --git a/activiti-engine/src/main/java/org/activiti/DbProcessEngineBuilder.java b/activiti-engine/src/main/java/org/activiti/DbProcessEngineBuilder.java
index <HASH>..<HASH> 100644
--- a/activiti-engine/src/main/java/org/activiti/DbProcessEngineBuilder.java
+++ b/activiti-engine/src/main/java/org/activiti/DbProcessEngineBuilder.java
@@ -186,7 +186,8 @@ public class DbProcessEngineBuilder {
} else if ("check-version".equals(dbSchemaStrategy)) {
this.dbSchemaStrategy = DbSchemaStrategy.CHECK_VERSION;
} else {
- throw new ActivitiException("unknown db.schema.strategy: '"+dbSchemaStrategy+"': should be 'create-drop' or 'check-version'");
+ throw new ActivitiException("unknown db.schema.strategy: '"+dbSchemaStrategy
+ +"': should be 'create', 'create-drop' or 'check-version'");
}
} | Added 'create' to DbSchemaStrategy, since I needed it for testing (rebooting the processEgine) |
diff --git a/spec/features/renalware/adding_pd_regimes_spec.rb b/spec/features/renalware/adding_pd_regimes_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/features/renalware/adding_pd_regimes_spec.rb
+++ b/spec/features/renalware/adding_pd_regimes_spec.rb
@@ -20,7 +20,7 @@ module Renalware
select 'CAPD 4 exchanges per day', from: 'Treatment'
select 'Star Brand, Lucky Brand Green–2.34', from: 'Bag Type'
- fill_in 'Volume', with: '250'
+ select '2500', from: 'Volume (ml)'
uncheck 'Sunday'
uncheck 'Thursday'
@@ -32,7 +32,7 @@ module Renalware
within('.current-regime') do
expect(page).to have_content('Regime Start Date: 15/06/2015')
expect(page).to have_content('CAPD 4 exchanges per day')
- expect(page).to have_content('Bag type: Green–2.34, Volume: 250ml, No. per week: 5, Days: Mon, Tue, Wed, Fri, Sat')
+ expect(page).to have_content('Bag type: Green–2.34, Volume: 2500ml, No. per week: 5, Days: Mon, Tue, Wed, Fri, Sat')
expect(page).to have_content('On additional HD?: Yes')
end
end | Updated feature spec tests for adding_pd_regimes to work with changed pd regime bag volume input - now fixed options. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -26,6 +26,7 @@ class TestCommand(Command):
'django.contrib.contenttypes',
'bakery',
)
+ BUILD_DIR="./build/"
)
from django.core.management import call_command
import django | Added BUILD_DIR to setup.py tests |
diff --git a/src/exchange/information/information.controller.js b/src/exchange/information/information.controller.js
index <HASH>..<HASH> 100644
--- a/src/exchange/information/information.controller.js
+++ b/src/exchange/information/information.controller.js
@@ -82,7 +82,7 @@ angular
shouldDisplaySSLRenew () {
const now = moment();
const sslExpirationDate = moment(this.exchange.sslExpirationDate);
- const aMonthBeforeSSLExpirationDate = sslExpirationDate.subtract(30, "days");
+ const aMonthBeforeSSLExpirationDate = sslExpirationDate.subtract(1, "months");
const isAlreadyExpired = now.isAfter(sslExpirationDate);
const canRenewBeforeExpiration = now.isAfter(aMonthBeforeSSLExpirationDate);
@@ -95,7 +95,7 @@ angular
getSSLRenewTooltipText () {
const now = moment();
const sslExpirationDate = moment(this.exchange.sslExpirationDate);
- const aMonthBeforeSSLExpirationDate = sslExpirationDate.subtract(30, "days");
+ const aMonthBeforeSSLExpirationDate = sslExpirationDate.subtract(1, "months");
if (this.hasSSLTask) {
return this.services.translator.tr("exchange_action_renew_ssl_info"); | :ambulance: fix(*): replaced <I> days by 1 month |
diff --git a/ontrack-web/src/app/view/view.admin.predefined-validation-stamps.js b/ontrack-web/src/app/view/view.admin.predefined-validation-stamps.js
index <HASH>..<HASH> 100644
--- a/ontrack-web/src/app/view/view.admin.predefined-validation-stamps.js
+++ b/ontrack-web/src/app/view/view.admin.predefined-validation-stamps.js
@@ -57,7 +57,7 @@ angular.module('ot.view.admin.predefined-validation-stamps', [
$scope.editValidationStampImage = function (predefinedValidationStamp) {
otStructureService.changeImage(predefinedValidationStamp, {
title: 'Image for predefined validation stamp ' + predefinedValidationStamp.name
- });
+ }).then(loadPredefinedValidationStamps);
};
}) | #<I> Image upload - reloading the list |
diff --git a/tests/index.js b/tests/index.js
index <HASH>..<HASH> 100644
--- a/tests/index.js
+++ b/tests/index.js
@@ -58,4 +58,31 @@ describe('connectSequence.run(req, res, next, middlewares)', function () {
expect(_req.ids).to.contain('third')
expect(_req.ids).to.contain('fourth')
})
+
+ it('should run all the middlewares in the same order than the given array', function () {
+ var _req = {
+ ids: []
+ }
+ var _res = {}
+ var _next = function (req, res, next) {
+ req.ids.push('last')
+ }
+ var first = function (req, res, next) {
+ req.ids.push('first')
+ }
+ var second = function (req, res, next) {
+ req.ids.push('second')
+ }
+ var third = function (req, res, next) {
+ req.ids.push('third')
+ }
+ var fourth = function (req, res, next) {
+ req.ids.push('fourth')
+ }
+ var mids = [first, second, third, fourth]
+
+ connectSequence.run(_req, _res, _next, mids)
+
+ expect(_req.ids.join()).to.equal('first,second,third,fourth,last')
+ })
}) | it should run all the middlewares in the same order than the given array |
diff --git a/src/ApcQueryLocator.php b/src/ApcQueryLocator.php
index <HASH>..<HASH> 100644
--- a/src/ApcQueryLocator.php
+++ b/src/ApcQueryLocator.php
@@ -40,12 +40,12 @@ final class ApcQueryLocator implements QueryLocatorInterface
public function get($queryName)
{
$sqlId = $this->nameSpace . $queryName;
- $sql = apc_fetch($sqlId);
+ $sql = apcu_fetch($sqlId);
if ($sql !== false) {
return $sql;
}
$sql = $this->query->get($queryName);
- apc_store($sqlId, $sql);
+ apcu_store($sqlId, $sql);
return $sql;
}
@@ -56,12 +56,12 @@ final class ApcQueryLocator implements QueryLocatorInterface
public function getCountQuery($queryName)
{
$sqlId = $this->nameSpace . $queryName;
- $sql = apc_fetch($sqlId);
+ $sql = apcu_fetch($sqlId);
if ($sql !== false) {
return $sql;
}
$sql = $this->query->getCountQuery($queryName);
- apc_store($sqlId, $sql);
+ apcu_store($sqlId, $sql);
return $sql;
} | apc* to apcu* |
diff --git a/lib/git-process/github_configuration.rb b/lib/git-process/github_configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/git-process/github_configuration.rb
+++ b/lib/git-process/github_configuration.rb
@@ -102,6 +102,9 @@ module GitHubService
Octokit.configure do |c|
c.api_endpoint = api_endpoint(base_url)
c.web_endpoint = web_endpoint(base_url)
+ c.faraday_config do |f|
+ #f.response :logger
+ end
end
end
diff --git a/lib/git-process/github_pull_request.rb b/lib/git-process/github_pull_request.rb
index <HASH>..<HASH> 100644
--- a/lib/git-process/github_pull_request.rb
+++ b/lib/git-process/github_pull_request.rb
@@ -34,8 +34,8 @@ module GitHub
end
- def pull_requests
- @pull_requests ||= client.pull_requests(repo)
+ def pull_requests(state = 'open', opts = {})
+ @pull_requests ||= client.pull_requests(repo, state, opts)
end | Updated pull_requests to be able to specify options. |
diff --git a/src/JamesPath/Ast/ElementsBranchNode.php b/src/JamesPath/Ast/ElementsBranchNode.php
index <HASH>..<HASH> 100644
--- a/src/JamesPath/Ast/ElementsBranchNode.php
+++ b/src/JamesPath/Ast/ElementsBranchNode.php
@@ -18,7 +18,7 @@ class ElementsBranchNode extends AbstractNode
public function search($value)
{
if ($result = $this->node->search($value)) {
- return new MultiMatch((array) $result);
+ return $result instanceof MultiMatch ? $result : new MultiMatch((array) $result);
}
} | Not creating a new MultiMatch if is already one |
diff --git a/lib/falkorlib/version.rb b/lib/falkorlib/version.rb
index <HASH>..<HASH> 100644
--- a/lib/falkorlib/version.rb
+++ b/lib/falkorlib/version.rb
@@ -19,7 +19,7 @@ module FalkorLib #:nodoc:
# MAJOR: Defines the major version
# MINOR: Defines the minor version
# PATCH: Defines the patch version
- MAJOR, MINOR, PATCH = 0, 5, 4
+ MAJOR, MINOR, PATCH = 0, 5, 5
module_function | bump to version '<I>' |
diff --git a/lib/entry.js b/lib/entry.js
index <HASH>..<HASH> 100644
--- a/lib/entry.js
+++ b/lib/entry.js
@@ -18,6 +18,8 @@
var log = require('logmagic').local('entry');
var optimist = require('optimist')
+var path = require('path');
+
var webApp = require('./web/app');
var Deployinator = require('./dreadnot').Deployinator;
var plugins = require('./plugins');
@@ -27,11 +29,11 @@ exports.run = function() {
optimist = optimist.usage('Usage: $0 -p [port] -c [/path/to/settings.js] -s [/path/to/stack/directory/]');
optimist = optimist['default']('p', 8000);
- optimisc = optimist['default']('c', '../local_settings');
+ optimisc = optimist['default']('c', './local_settings');
optimisc = optimist['default']('s', './stacks');
argv = optimist.argv;
- config = require(argv.c).config;
+ config = require(path.resolve(argv.c)).config;
d = new Deployinator(config, argv.s);
d.init(function(err) { | fix bug resolving relative config paths |
diff --git a/lib/whenever/command_line.rb b/lib/whenever/command_line.rb
index <HASH>..<HASH> 100644
--- a/lib/whenever/command_line.rb
+++ b/lib/whenever/command_line.rb
@@ -66,22 +66,23 @@ module Whenever
end
def write_crontab(contents)
- tmp_cron_file = Tempfile.new('whenever_tmp_cron').path
- File.open(tmp_cron_file, File::WRONLY | File::APPEND) do |file|
- file << contents
- end
+ tmp_cron_file = Tempfile.open('whenever_tmp_cron')
+ tmp_cron_file << contents
+ tmp_cron_file.fsync
command = ['crontab']
command << "-u #{@options[:user]}" if @options[:user]
- command << tmp_cron_file
+ command << tmp_cron_file.path
if system(command.join(' '))
action = 'written' if @options[:write]
action = 'updated' if @options[:update]
puts "[write] crontab file #{action}"
+ tmp_cron_file.close!
exit(0)
else
warn "[fail] Couldn't write crontab; try running `whenever' with no options to ensure your schedule file is valid."
+ tmp_cron_file.close!
exit(1)
end
end | fix file not found error when running under JRuby
(cherry picked from commit 1ca<I>c<I>fb<I>b2a6cd<I>deb<I>d<I>e) |
diff --git a/src/main/java/picocli/CommandLine.java b/src/main/java/picocli/CommandLine.java
index <HASH>..<HASH> 100644
--- a/src/main/java/picocli/CommandLine.java
+++ b/src/main/java/picocli/CommandLine.java
@@ -14438,7 +14438,9 @@ public class CommandLine {
if (argSpec.arity().max > 1) {
desc += " at index " + optionParamIndex;
}
- desc += " (" + argSpec.paramLabel() + ")";
+ if (argSpec.arity().max > 0) {
+ desc += " (" + argSpec.paramLabel() + ")";
+ }
}
} else {
desc = prefix + "positional parameter at index " + ((PositionalParamSpec) argSpec).index() + " (" + argSpec.paramLabel() + ")"; | Print paramLabel only when it could exist |
diff --git a/fd.go b/fd.go
index <HASH>..<HASH> 100644
--- a/fd.go
+++ b/fd.go
@@ -30,8 +30,10 @@ import (
// Internal files' names to be assigned are specified via optional filenames
// argument.
//
-// Use net.FileConn() if you're receiving a network connection. Don't
-// forget to close the returned *os.File though.
+// You need to close all files in the returned slice. The slice can be
+// non-empty even if this function returns an error.
+//
+// Use net.FileConn() if you're receiving a network connection.
func Get(via *net.UnixConn, num int, filenames []string) ([]*os.File, error) {
if num < 1 {
return nil, nil | document that Get can return some files on errors
As ParseUnixRights can return an error after some file descriptors are
appended to the res slice, the caller must close file descriptors even
if the error is returned. |
diff --git a/lib/verifyUser.js b/lib/verifyUser.js
index <HASH>..<HASH> 100755
--- a/lib/verifyUser.js
+++ b/lib/verifyUser.js
@@ -53,7 +53,7 @@ module.exports = {
'searchEntry', function (entry) {
data.raw = entry.object;
data.valid = true;
- if (Number(entry.object.lockoutTime) == 0) {
+ if (Number(entry.object.lockoutTime) == 0 || typeof entry.object.lockoutTime == 'undefined') {
if (config.debug) {
console.log(
"account not locked and valid!" | Added lockoutTime undefined to be unlocked
AD does not have a lockoutTime variable if the account has never been locked. Was treating lockoutTime == null as locked, but this is not the case. |
diff --git a/src/ol-ext/format.js b/src/ol-ext/format.js
index <HASH>..<HASH> 100644
--- a/src/ol-ext/format.js
+++ b/src/ol-ext/format.js
@@ -21,14 +21,6 @@ export function createTopoJsonFmt (options) {
}
class GeoJSON extends BaseGeoJSON {
- adaptOptions (options) {
- return {
- dataProjection: this.defaultDataProjection,
- featureProjection: this.defaultFeatureProjection,
- ...options,
- }
- }
-
writeGeometryObject (geometry, options) {
if (isCircle(geometry)) {
geometry = createCircularPolygon(geometry.getCenter(), geometry.getRadius())
@@ -37,7 +29,6 @@ class GeoJSON extends BaseGeoJSON {
}
writeFeatureObject (feature, options) {
- options = this.adaptOptions(options)
const object = /** @type {GeoJSONFeature} */ ({
'type': 'Feature',
}) | custom geojson fmt: work through public methods |
diff --git a/src/sagemaker/model.py b/src/sagemaker/model.py
index <HASH>..<HASH> 100644
--- a/src/sagemaker/model.py
+++ b/src/sagemaker/model.py
@@ -1581,9 +1581,6 @@ class ModelPackage(Model):
container_def = {"ModelPackageName": model_package_name}
- if self.env != {}:
- container_def["Environment"] = self.env
-
self._ensure_base_name_if_needed(model_package_name.split("/")[-1])
self._set_model_name_if_needed() | fix: remove specifying env-vars when creating model from model package (#<I>) |
diff --git a/src/mattermostdriver/endpoints/elasticsearch.py b/src/mattermostdriver/endpoints/elasticsearch.py
index <HASH>..<HASH> 100644
--- a/src/mattermostdriver/endpoints/elasticsearch.py
+++ b/src/mattermostdriver/endpoints/elasticsearch.py
@@ -8,3 +8,8 @@ class Elasticsearch(Base):
return self.client.post(
self.endpoint + '/test'
)
+
+ def purge_all_elasticsearch_indexes(self):
+ return self.client.post(
+ self.endpoint + '/purge_indexes'
+ ) | elasticsearch: Update api endpoints |
diff --git a/lib/crypto.js b/lib/crypto.js
index <HASH>..<HASH> 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -2,7 +2,8 @@ module.exports = function BlastCrypto(Blast, Collection) {
'use strict';
- var libcrypto;
+ var libcrypto,
+ instance;
/**
* The Crypto class
@@ -18,6 +19,25 @@ module.exports = function BlastCrypto(Blast, Collection) {
});
/**
+ * Get a UID
+ *
+ * @author Jelle De Loecker <jelle@codedor.be>
+ * @since 0.1.4
+ * @version 0.1.4
+ *
+ * @return {String}
+ */
+ Crypto.setStatic(function uid() {
+
+ if (instance == null) {
+ instance = new Crypto();
+ instance.populate(10);
+ }
+
+ return instance.uid();
+ });
+
+ /**
* Generate a pseudorandom hex string
*
* @author Jelle De Loecker <jelle@codedor.be>
@@ -228,4 +248,6 @@ module.exports = function BlastCrypto(Blast, Collection) {
});
});
}
+
+ Blast.defineClass('Crypto', Crypto);
};
\ No newline at end of file | feat: Expose Crypto class & allow user to create uid without instancing manually |
diff --git a/router_test.go b/router_test.go
index <HASH>..<HASH> 100644
--- a/router_test.go
+++ b/router_test.go
@@ -108,17 +108,20 @@ func TestIncorrectPath(t *testing.T) {
}
func TestPathNotFound(t *testing.T) {
- path := map[string]string {
- "/users/name/": "/users/name/dinever/",
+ path := []struct {
+ method, path, incomingMethod, incomingPath string
+ } {
+ {"GET", "/users/name/", "GET", "/users/name/dinever/"},
+ {"GET", "/dinever/repo/", "POST", "/dinever/repo/"},
}
defer func() {
if err := recover(); err != nil {
}
}()
router := newRouter()
- for route, wrongPath := range path {
- router.AddRoute("GET", route, handler)
- h, p, err := router.FindRoute("GET", wrongPath)
+ for _, path := range path {
+ router.AddRoute(path.method, path.path, handler)
+ h, p, err := router.FindRoute(path.incomingMethod, path.incomingPath)
if h != nil {
t.Errorf("Should return nil handler when path not found.")
} | [test] Improve test coverage when method is not found |
diff --git a/headers.js b/headers.js
index <HASH>..<HASH> 100644
--- a/headers.js
+++ b/headers.js
@@ -166,7 +166,7 @@ exports.encode = function(opts) {
if (opts.linkname && Buffer.byteLength(opts.linkname) > 100) return null
buf.write(name)
- buf.write(encodeOct(opts.mode & 07777, 6), 100)
+ buf.write(encodeOct(opts.mode & parseInt('07777', 8), 6), 100)
buf.write(encodeOct(opts.uid, 6), 108)
buf.write(encodeOct(opts.gid, 6), 116)
buf.write(encodeOct(opts.size, 11), 124)
diff --git a/pack.js b/pack.js
index <HASH>..<HASH> 100644
--- a/pack.js
+++ b/pack.js
@@ -118,7 +118,7 @@ Pack.prototype.entry = function(header, buffer, callback) {
if (!header.size) header.size = 0
if (!header.type) header.type = modeToType(header.mode)
- if (!header.mode) header.mode = header.type === 'directory' ? 0755 : 0644
+ if (!header.mode) header.mode = parseInt(header.type === 'directory' ? '0755' : '0644')
if (!header.uid) header.uid = 0
if (!header.gid) header.gid = 0
if (!header.mtime) header.mtime = new Date() | Don't use octal numbers
When run with the "--use_strict" flag, NodeJS raises an error citing:
SyntaxError: Octal literals are not allowed in strict mode.
when parsing files which contain Octal numbers (or numbers which look
like octals - usually because they have leading zeros). This commit
replaces two instances of this with strings.
See [this Stack Overflow answer](<URL>) for more info. |
diff --git a/packages/components/bolt-share/src/share.standalone.js b/packages/components/bolt-share/src/share.standalone.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-share/src/share.standalone.js
+++ b/packages/components/bolt-share/src/share.standalone.js
@@ -7,6 +7,7 @@ class BoltShare extends withHyperHtml {
constructor(self) {
self = super(self);
+ this.useShadow = false;
return self;
} | fix: manually opt out of shadow DOM encapsulation of the share component for the time being (until ongoing refactor work is wrapped up) |
diff --git a/src/Cli/Kahlan.php b/src/Cli/Kahlan.php
index <HASH>..<HASH> 100644
--- a/src/Cli/Kahlan.php
+++ b/src/Cli/Kahlan.php
@@ -450,6 +450,7 @@ EOD;
return Filter::on($this, 'load', [], function($chain) {
$files = Dir::scan($this->args()->get('spec'), [
'include' => $this->args()->get('pattern'),
+ 'exclude' => '*/.*',
'type' => 'file'
]);
foreach($files as $file) { | Exclude dot-hidden folders inside the spec folder |
diff --git a/lib/action_kit_api/event_campaign.rb b/lib/action_kit_api/event_campaign.rb
index <HASH>..<HASH> 100644
--- a/lib/action_kit_api/event_campaign.rb
+++ b/lib/action_kit_api/event_campaign.rb
@@ -1,4 +1,5 @@
require 'action_kit_api'
+require 'pry'
module ActionKitApi
class EventCampaign < ApiDataModel
@@ -64,6 +65,7 @@ module ActionKitApi
(args[0]).merge(:campaign_id => self.id)
event = ActionKitApi::Event.new(*args)
+ binding.pry
event.save
result = ActionKitApi.connection.call("EventCreate.create", {:event_id => event.id}) | Temporarily added pry for debugging |
diff --git a/src/Database/index.js b/src/Database/index.js
index <HASH>..<HASH> 100644
--- a/src/Database/index.js
+++ b/src/Database/index.js
@@ -50,8 +50,10 @@ export type DataFactory<T> = () => T;
export type DataSerializer<T: Object, S: Object> = (data: T) => S;
+export opaque type RecordId = number;
+
export type Record<T> = {
- +id: number,
+ +id: RecordId,
+data: T,
save(): void,
delete(): void | refactor: add record id flow type |
diff --git a/lnrpc/routerrpc/router_server.go b/lnrpc/routerrpc/router_server.go
index <HASH>..<HASH> 100644
--- a/lnrpc/routerrpc/router_server.go
+++ b/lnrpc/routerrpc/router_server.go
@@ -445,7 +445,10 @@ func (s *Server) QueryMissionControl(ctx context.Context,
snapshot := s.cfg.RouterBackend.MissionControl.GetHistorySnapshot()
rpcNodes := make([]*NodeHistory, len(snapshot.Nodes))
- for i, node := range snapshot.Nodes {
+ for i, n := range snapshot.Nodes {
+ // Copy node struct to prevent loop variable binding bugs.
+ node := n
+
channels := make([]*ChannelHistory, len(node.Channels))
for j, channel := range node.Channels {
channels[j] = &ChannelHistory{ | routerrpc: fix loop variable binding bug in querymc
This bug caused all node pubkey to be the same. |
diff --git a/src/Picqer/Financials/Exact/Connection.php b/src/Picqer/Financials/Exact/Connection.php
index <HASH>..<HASH> 100644
--- a/src/Picqer/Financials/Exact/Connection.php
+++ b/src/Picqer/Financials/Exact/Connection.php
@@ -526,9 +526,13 @@ class Connection
Psr7\Message::rewindBody($response);
$simpleXml = new \SimpleXMLElement($response->getBody()->getContents());
- foreach ($simpleXml->Messages as $message) {
- $keyAlt = (string) $message->Message->Topic->Data->attributes()['keyAlt'];
- $answer[$keyAlt] = (string) $message->Message->Description;
+ foreach ($simpleXml->Messages->Message as $message) {
+ if (null === $message->Topic->Data->attributes()) {
+ $answer[] = (string) $message->Description;
+ } else {
+ $keyAlt = (string) $message->Topic->Data->attributes()['keyAlt'];
+ $answer[$keyAlt] = (string) $message->Description;
+ }
}
return $answer; | Fixed parsing of messages after XML upload |
diff --git a/leancloud/engine/https_redirect.py b/leancloud/engine/https_redirect.py
index <HASH>..<HASH> 100644
--- a/leancloud/engine/https_redirect.py
+++ b/leancloud/engine/https_redirect.py
@@ -1,18 +1,23 @@
# coding: utf-8
+import os
+
from werkzeug.wrappers import Request
from werkzeug.utils import redirect
__author__ = 'asaka <lan@leancloud.rocks>'
+is_prod = int(os.environ.get('LC_APP_PROD', '0'))
+
+
class HttpsRedirectMiddleware(object):
def __init__(self, wsgi_app):
self.origin_app = wsgi_app
def __call__(self, environ, start_response):
request = Request(environ)
- if request.headers.get('X-Forwarded-Proto') == 'http':
+ if is_prod and request.headers.get('X-Forwarded-Proto') != 'https':
url = 'https://{0}{1}'.format(request.host, request.path)
if request.query_string:
url += '?{}'.format(request.query_string) | https redirect only works on production env |
diff --git a/core/src/main/java/hudson/scm/SubversionSCM.java b/core/src/main/java/hudson/scm/SubversionSCM.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/scm/SubversionSCM.java
+++ b/core/src/main/java/hudson/scm/SubversionSCM.java
@@ -657,15 +657,15 @@ public class SubversionSCM extends SCM implements Serializable {
rsp.forward(Hudson.getInstance(),"error",req);
}
}
+
+ static {
+ DAVRepositoryFactory.setup(); // http, https
+ SVNRepositoryFactoryImpl.setup(); // svn, svn+xxx
+ FSRepositoryFactory.setup(); // file
+ }
}
private static final long serialVersionUID = 1L;
private static final Logger logger = Logger.getLogger(SubversionSCM.class.getName());
-
- static {
- DAVRepositoryFactory.setup(); // http, https
- SVNRepositoryFactoryImpl.setup(); // svn, svn+xxx
- FSRepositoryFactory.setup(); // file
- }
} | perhaps this is why? Maybe static initializer in SubversionSCM doesn't run early enough?
git-svn-id: <URL> |
diff --git a/builtin/providers/aws/resource_aws_s3_bucket_object_test.go b/builtin/providers/aws/resource_aws_s3_bucket_object_test.go
index <HASH>..<HASH> 100644
--- a/builtin/providers/aws/resource_aws_s3_bucket_object_test.go
+++ b/builtin/providers/aws/resource_aws_s3_bucket_object_test.go
@@ -354,7 +354,7 @@ resource "aws_s3_bucket_object" "object" {
bucket = "${aws_s3_bucket.object_bucket_2.bucket}"
key = "test-key"
content = "stuff"
- kms_key_id = "${aws_kms_key.kms_key_1.key_id}"
+ kms_key_id = "${aws_kms_key.kms_key_1.arn}"
}
`, randInt)
} | provider/aws: Use KMS ARN in S3 Bucket test |
diff --git a/src/test/java/com/opentok/test/OpenTokTest.java b/src/test/java/com/opentok/test/OpenTokTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/opentok/test/OpenTokTest.java
+++ b/src/test/java/com/opentok/test/OpenTokTest.java
@@ -544,6 +544,9 @@ public class OpenTokTest {
}
}
+ /* TODO: find a way to match JSON without caring about spacing
+ .withRequestBody(matching("."+".")) in the following archive tests */
+
@Test
public void testGetArchive() throws OpenTokException {
String archiveId = "ARCHIVEID"; | Bringing back TODO comment
and putting it in one place with reminder to do the work in all archive tests |
diff --git a/src/Illuminate/Foundation/Testing/CrawlerTrait.php b/src/Illuminate/Foundation/Testing/CrawlerTrait.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Foundation/Testing/CrawlerTrait.php
+++ b/src/Illuminate/Foundation/Testing/CrawlerTrait.php
@@ -461,7 +461,7 @@ trait CrawlerTrait
*/
public function seeIsSelected($selector, $expected)
{
- $this->assertSame(
+ $this->assertEquals(
$expected, $this->getSelectedValue($selector),
"The field [{$selector}] does not contain the selected value [{$expected}]."
);
@@ -478,7 +478,7 @@ trait CrawlerTrait
*/
public function dontSeeIsSelected($selector, $value)
{
- $this->assertNotSame(
+ $this->assertNotEquals(
$value, $this->getSelectedValue($selector),
"The field [{$selector}] contains the selected value [{$value}]."
); | CrawlerTrait:seeisSelected doesn't need to be so strict |
diff --git a/lib/archive/support/zlib.rb b/lib/archive/support/zlib.rb
index <HASH>..<HASH> 100644
--- a/lib/archive/support/zlib.rb
+++ b/lib/archive/support/zlib.rb
@@ -5,17 +5,20 @@ require 'zlib'
require 'archive/support/io-like'
module Zlib # :nodoc:
- if ! const_defined?(:MAX_WBITS) then
- MAX_WBITS = Deflate::MAX_WBITS
- end
+ # The maximum size of the zlib history buffer. Note that zlib allows larger
+ # values to enable different inflate modes. See Zlib::Inflate.new for details.
+ # Provided here only for Ruby versions that do not provide it.
+ MAX_WBITS = Deflate::MAX_WBITS unless const_defined?(:MAX_WBITS)
# A deflate strategy which limits match distances to 1, also known as
- # run-length encoding.
- RLE = 3
+ # run-length encoding. Provided here only for Ruby versions that do not
+ # provide it.
+ RLE = 3 unless const_defined?(:RLE)
# A deflate strategy which does not use dynamic Huffman codes, allowing for a
- # simpler decoder to be used to inflate.
- FIXED = 4
+ # simpler decoder to be used to inflate. Provided here only for Ruby versions
+ # that do not provide it.
+ FIXED = 4 unless const_defined?(:FIXED)
# Zlib::ZWriter is a writable, IO-like object (includes IO::Like) which wraps
# other writable, IO-like objects in order to facilitate writing data to those | Only define Zlib constants if they are not already defined
* Fixes constant redefinition warnings under MRI <I>-p0 |
diff --git a/packages/core/plugins/scoping.js b/packages/core/plugins/scoping.js
index <HASH>..<HASH> 100644
--- a/packages/core/plugins/scoping.js
+++ b/packages/core/plugins/scoping.js
@@ -60,9 +60,11 @@ module.exports = (css, result) => {
}
globals[key] = true;
- if (result.opts.exportGlobals !== false) {
+
+ if(result.opts.exportGlobals !== false) {
lookup[key] = [ child.value ];
}
+
child.ignore = true;
});
});
diff --git a/packages/core/test/plugin.scoping.test.js b/packages/core/test/plugin.scoping.test.js
index <HASH>..<HASH> 100644
--- a/packages/core/test/plugin.scoping.test.js
+++ b/packages/core/test/plugin.scoping.test.js
@@ -201,7 +201,7 @@ describe("/plugins", function() {
100% { color: black; }
}
`), {
- exportGlobals: false
+ exportGlobals : false
}).messages
)
.toMatchSnapshot(); | chore: fix some linting warnings |
diff --git a/src/nmi/builds/remote_post.py b/src/nmi/builds/remote_post.py
index <HASH>..<HASH> 100755
--- a/src/nmi/builds/remote_post.py
+++ b/src/nmi/builds/remote_post.py
@@ -32,7 +32,7 @@ if os.getenv("_NMI_STEP_FAILED") is not None:
debugging_files = [ "src" ]
tar = tarfile.open("results.tar.gz", "w:gz")
-for name in [ "head" ] + debugging_files:
+for name in [ "opt" ] + debugging_files:
tar.add(name)
if options.verbose: | lalsuite is now installed under ./opt in the build dir, not ./head |
diff --git a/lib/Archives.php b/lib/Archives.php
index <HASH>..<HASH> 100644
--- a/lib/Archives.php
+++ b/lib/Archives.php
@@ -87,7 +87,7 @@ class Archives extends Core {
$ret = array();
$ret['text'] = $ret['title'] = $ret['name'] = wptexturize($text);
$ret['url'] = $ret['link'] = esc_url(URLHelper::prepend_to_url($url, $this->base));
- $ret['post_count'] = $post_count;
+ $ret['post_count'] = (int) $post_count;
return $ret;
} | Convert post_count to int |
diff --git a/lib/Patch.php b/lib/Patch.php
index <HASH>..<HASH> 100644
--- a/lib/Patch.php
+++ b/lib/Patch.php
@@ -41,11 +41,11 @@ class Patch implements JsonSerializable
return $this->assign('diffMatchPatch', $props);
}
- public function unsetButWeCantNameItThatSoDontUseItUntilWeDecideOnAlternativeName($attrs)
+ public function remove($attrs)
{
if (!is_array($attrs)) {
throw new Exception\InvalidArgumentException(
- 'unset(attrs) takes an array of attributes to unset, non-array given'
+ 'remove(attrs) takes an array of attributes to unset, non-array given'
);
} | Rename 'unset' to 'remove' to prevent syntax errors on PHP<7 |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@ def long_desc():
setup(
name='shellish',
- version='3',
+ version='3.1',
description='A framework for CLI/shell programs.',
author='Justin Mayfield',
author_email='tooker@gmail.com', | Rev to <I> (dev) |
diff --git a/test/dummy/config/application.rb b/test/dummy/config/application.rb
index <HASH>..<HASH> 100644
--- a/test/dummy/config/application.rb
+++ b/test/dummy/config/application.rb
@@ -4,7 +4,6 @@ require 'active_model/railtie'
require 'action_controller/railtie'
require 'action_mailer/railtie'
require 'action_view/railtie'
-require 'active_job/railtie'
require 'sprockets/railtie'
require 'rails/test_unit/railtie' | Fix rails <I> and <I> compatibility |
diff --git a/extension/Extension.php b/extension/Extension.php
index <HASH>..<HASH> 100644
--- a/extension/Extension.php
+++ b/extension/Extension.php
@@ -84,9 +84,10 @@ abstract class Extension extends \yii\base\Component
/**
* Search, according to the keywords.
* @param mixed $keywords
+ * @param mixed $config
* @return string search result.
*/
- abstract public function search($keywords);
+ abstract public function search($keywords, $config = []);
/**
* Get module configuration array. | Update Extension.php
Enable to pass search configuration to search() method. |
diff --git a/symphony/content/content.ajaxquery.php b/symphony/content/content.ajaxquery.php
index <HASH>..<HASH> 100644
--- a/symphony/content/content.ajaxquery.php
+++ b/symphony/content/content.ajaxquery.php
@@ -1,7 +1,5 @@
<?php
-require_once(TOOLKIT . '/class.jsonpage.php');
-
class contentAjaxQuery extends JSONPage
{
public function view() | remove require_once call
Picked from <I>a<I>b2 |
diff --git a/version/version_base.go b/version/version_base.go
index <HASH>..<HASH> 100644
--- a/version/version_base.go
+++ b/version/version_base.go
@@ -12,5 +12,5 @@ func init() {
// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
// such as "dev" (in development), "beta", "rc1", etc.
- VersionPrerelease = "dev"
+ VersionPrerelease = ""
} | Puts the tree in <I> release mode. |
diff --git a/spyder/plugins/editor/widgets/base.py b/spyder/plugins/editor/widgets/base.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/editor/widgets/base.py
+++ b/spyder/plugins/editor/widgets/base.py
@@ -617,6 +617,7 @@ class TextEditBaseWidget(QPlainTextEdit, BaseEditMixin):
"""Duplicate current line or selected text"""
cursor = self.textCursor()
cursor.beginEditBlock()
+ cur_pos = cursor.position()
start_pos, end_pos = self.__save_selection()
end_pos_orig = end_pos
if to_text_string(cursor.selectedText()):
@@ -648,11 +649,15 @@ class TextEditBaseWidget(QPlainTextEdit, BaseEditMixin):
cursor.movePosition(QTextCursor.StartOfBlock)
start_pos += len(text)
end_pos_orig += len(text)
+ cur_pos += len(text)
cursor.insertText(text)
cursor.endEditBlock()
self.setTextCursor(cursor)
- self.__restore_selection(start_pos, end_pos_orig)
+ if cur_pos == start_pos:
+ self.__restore_selection(end_pos_orig, start_pos)
+ else:
+ self.__restore_selection(start_pos, end_pos_orig)
def duplicate_line(self):
""" | Preserve cursor pos in duplicate line |
diff --git a/lib/foreman_discovery/engine.rb b/lib/foreman_discovery/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/foreman_discovery/engine.rb
+++ b/lib/foreman_discovery/engine.rb
@@ -42,7 +42,7 @@ module ForemanDiscovery
initializer 'foreman_discovery.register_plugin', :before => :finisher_hook do |app|
Foreman::Plugin.register :foreman_discovery do
- requires_foreman '>= 1.15.0'
+ requires_foreman '>= 1.16.0'
# discovered hosts permissions
security_block :discovery do | Refs #<I> - mark compatible with Foreman <I>+
required after 3c6f9bd |
diff --git a/src/ol/source/Tile.js b/src/ol/source/Tile.js
index <HASH>..<HASH> 100644
--- a/src/ol/source/Tile.js
+++ b/src/ol/source/Tile.js
@@ -317,9 +317,6 @@ class TileSource extends Source {
this.tileCache.clear();
}
- /**
- * @inheritDoc
- */
refresh() {
this.clear();
super.refresh(); | Remove inheritDoc to work around JSDoc issue |
diff --git a/lib/active_scaffold/helpers/id_helpers.rb b/lib/active_scaffold/helpers/id_helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/active_scaffold/helpers/id_helpers.rb
+++ b/lib/active_scaffold/helpers/id_helpers.rb
@@ -3,7 +3,7 @@ module ActiveScaffold
# A bunch of helper methods to produce the common view ids
module IdHelpers
def controller_id
- @controller_id ||= (params[:parent_controller] || params[:controller] || params[:eid]).gsub("/", "__")
+ @controller_id ||= (params[:eid] || params[:parent_controller] || params[:controller]).gsub("/", "__")
end
def active_scaffold_id | Fix duplicate ids, and fix 'RJS Error when using a 1:N -> N:1 in nested scaffolds' reported in ActiveScaffold Google Group. |
diff --git a/whizzer/__init__.py b/whizzer/__init__.py
index <HASH>..<HASH> 100644
--- a/whizzer/__init__.py
+++ b/whizzer/__init__.py
@@ -19,10 +19,17 @@ def signal_handler(loop):
return watcher
def _perform_call(watcher, events):
- (method, args, kwargs) = watcher.data
+ print("performing call")
+ (d, method, args, kwargs) = watcher.data
+ try:
+ d.callback(method(*args, **kwargs))
+ except Exception as e:
+ d.errback(e)
-def call_later(loop, delay, method, *args, **kwargs):
+def call_later(loop, logger, delay, method, *args, **kwargs):
"""Convienence method to create a timed function call."""
- t = pyev.Timer(delay, 0.0, loop, _perform_call, (method, args, kwargs))
+ d = Deferred(loop, logger=logger)
+ t = pyev.Timer(delay, 0.0, loop, _perform_call, (d, method, args, kwargs))
t.start()
- return t
+ d.timer = t
+ return d | call_later now correctly returns a deferred, the caller MUST HOLD on to the deferred at the moment |
diff --git a/src/Proxy/ClassProxy.php b/src/Proxy/ClassProxy.php
index <HASH>..<HASH> 100644
--- a/src/Proxy/ClassProxy.php
+++ b/src/Proxy/ClassProxy.php
@@ -599,7 +599,7 @@ SETTER;
}
$assocProperties = $this->indent(join(',' . PHP_EOL, $assocProperties));
$listProperties = $this->indent(join(',' . PHP_EOL, $listProperties));
- if ($constructor) {
+ if (isset($this->methodsCode['__construct'])) {
$parentCall = $this->getJoinpointInvocationBody($constructor);
} elseif ($isCallParent) {
$parentCall = '\call_user_func_array(["parent", __FUNCTION__], \func_get_args());'; | Fix calling of parent constructor with property interception, resolves #<I> |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@ with open('HISTORY.md') as history_file:
install_requires = [
- 'Keras>=2.1.6,<3',
+ 'Keras>=2.1.6,<2.4',
'featuretools>=0.6.1,<0.12',
'iso639>=0.1.4,<0.2',
'langdetect>=1.0.7,<2', | Making sure that keras version is below <I> in order to avoid incompatibilities with tensorflow. |
diff --git a/src/Open/Client.php b/src/Open/Client.php
index <HASH>..<HASH> 100644
--- a/src/Open/Client.php
+++ b/src/Open/Client.php
@@ -16,11 +16,20 @@ class Client
$this->accessToken = $accessToken;
}
- public function get($method, $apiVersion, $params = [], $files = [], $config = [])
+ /**
+ * 调用接口 GET
+ *
+ * @deprecated 已废弃, 请使用 post 方法
+ * @see self::post
+ */
+ public function get($method, $apiVersion, $params = [], $files = [])
{
- return $this->post($method, $apiVersion, $params, $files, $config);
+ return $this->post($method, $apiVersion, $params, $files);
}
+ /**
+ * 调用接口 POST
+ */
public function post($method, $apiVersion, $params = [], $files = [], $config = [])
{
return $this->parseResponse( | add client get deprecated and document |
diff --git a/fileupload.go b/fileupload.go
index <HASH>..<HASH> 100644
--- a/fileupload.go
+++ b/fileupload.go
@@ -36,7 +36,7 @@ type FileUpload struct {
Size int64 `json:"size"`
Purpose FileUploadPurpose `json:"purpose"`
URL string `json:"url"`
- Mime string `json:"mimetype"`
+ Type string `json:"type"`
}
// AppendDetails adds the file upload details to an io.ReadWriter. It returns
diff --git a/fileupload/client_test.go b/fileupload/client_test.go
index <HASH>..<HASH> 100644
--- a/fileupload/client_test.go
+++ b/fileupload/client_test.go
@@ -10,7 +10,7 @@ import (
const (
expectedSize = 734
- expectedMime = "application/pdf"
+ expectedType = "pdf"
)
func init() {
@@ -41,8 +41,8 @@ func TestFileUploadNewThenGet(t *testing.T) {
t.Errorf("(POST) Purpose %v does not match expected purpose %v\n", target.Purpose, uploadParams.Purpose)
}
- if target.Mime != expectedMime {
- t.Errorf("(POST) Mime %v does not match expected mime %v\n", target.Mime, expectedMime)
+ if target.Type != expectedType {
+ t.Errorf("(POST) Type %v does not match expected type %v\n", target.Type, expectedType)
}
res, err := Get(target.ID, nil) | Mime -> Type on FileUploads to stay consistent with main api. |
diff --git a/zvmsdk/database.py b/zvmsdk/database.py
index <HASH>..<HASH> 100644
--- a/zvmsdk/database.py
+++ b/zvmsdk/database.py
@@ -647,7 +647,7 @@ class GuestDbOperator(object):
def get_migrated_guest_list(self):
with get_guest_conn() as conn:
res = conn.execute("SELECT * FROM guests "
- "WHERE comments LIKE '\%\"migrated\"\:\"1\"\%'")
+ "WHERE comments LIKE '%\"migrated\": 1%'")
guests = res.fetchall()
return guests
@@ -656,13 +656,14 @@ class GuestDbOperator(object):
output should be like: {'k1': 'v1', 'k2': 'v2'}'
"""
userid = userid
- comments = {}
with get_guest_conn() as conn:
res = conn.execute("SELECT comments FROM guests "
"WHERE userid=?", (userid,))
result = res.fetchall()
- if result != []:
+ if result == []:
+ comments = {}
+ else:
comments = json.loads(result)
return comments | Update database operation for guest comments.
Change-Id: I2d0de1d<I>d0ca<I>f7ce6c<I>eb3aa1b<I>dc<I> |
diff --git a/sqlite3/sqlite.go b/sqlite3/sqlite.go
index <HASH>..<HASH> 100644
--- a/sqlite3/sqlite.go
+++ b/sqlite3/sqlite.go
@@ -64,7 +64,7 @@ var txqueries []string = []string{
txtmpFetchLocationByShaStmt: "SELECT blockid, txoff, txlen FROM txtmp WHERE key = ?;",
txMigrateCopy: "INSERT INTO tx (key, blockid, txoff, txlen, data) SELECT key, blockid, txoff, txlen, data FROM txtmp;",
txMigrateClear: "DELETE from txtmp;",
- txMigratePrep: "DROP index uniquetx;",
+ txMigratePrep: "DROP index IF EXISTS uniquetx;",
txMigrateFinish: "CREATE UNIQUE INDEX IF NOT EXISTS uniquetx ON tx (key);",
txMigrateCount: "SELECT COUNT(*) FROM txtmp;",
txPragmaVacuumOn: "PRAGMA auto_vacuum = FULL;", | Only try to drop the uniquetx index if it exists.
Solves a corner case after a crash. |
diff --git a/server.go b/server.go
index <HASH>..<HASH> 100644
--- a/server.go
+++ b/server.go
@@ -267,18 +267,29 @@ func (s *Server) handleQuestion(q dns.Question) (multicastRecs, unicastRecs []dn
// sendResponse is used to send a response packet
func (s *Server) sendResponse(resp *dns.Msg, from net.Addr, unicast bool) error {
- // TODO(reddaly): Respect the unicast argument, and allow sending responses
- // over multicast.
buf, err := resp.Pack()
if err != nil {
return err
}
addr := from.(*net.UDPAddr)
- if addr.IP.To4() != nil {
- _, err = s.ipv4List.WriteToUDP(buf, addr)
- return err
- } else {
- _, err = s.ipv6List.WriteToUDP(buf, addr)
- return err
+ ipv4 := addr.IP.To4() != nil
+ conn := s.ipv4List
+
+ switch ipv4 {
+ case true: // ipv4
+ if unicast == false {
+ addr = ipv4Addr
+ }
+ case false: // ipv6
+ if unicast == false {
+ addr = ipv6Addr
+ }
+
+ conn = s.ipv6List
+ default:
+ break
}
+
+ _, err = conn.WriteToUDP(buf, addr)
+ return err
} | Send response to multicast address if requested |
diff --git a/docroot/modules/custom/ymca_retention/src/Form/MemberTrackActivityLoginForm.php b/docroot/modules/custom/ymca_retention/src/Form/MemberTrackActivityLoginForm.php
index <HASH>..<HASH> 100644
--- a/docroot/modules/custom/ymca_retention/src/Form/MemberTrackActivityLoginForm.php
+++ b/docroot/modules/custom/ymca_retention/src/Form/MemberTrackActivityLoginForm.php
@@ -28,7 +28,7 @@ class MemberTrackActivityLoginForm extends FormBase {
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$verify_membership_id = $form_state->getTemporaryValue('verify_membership_id');
- $validate = ['::elementValidateRequired'];
+ $validate = [get_class($this), 'elementValidateRequired'];
if (empty($verify_membership_id)) {
$form['mail'] = [
'#type' => 'email',
@@ -39,7 +39,10 @@ class MemberTrackActivityLoginForm extends FormBase {
],
],
'#element_required_error' => $this->t('Email is required.'),
- '#element_validate' => $validate,
+ '#element_validate' => [
+ ['\Drupal\Core\Render\Element\Email', 'validateEmail'],
+ $validate,
+ ],
];
}
else { | [YSR-<I>] email validation |
diff --git a/webpack.client.config.base.js b/webpack.client.config.base.js
index <HASH>..<HASH> 100644
--- a/webpack.client.config.base.js
+++ b/webpack.client.config.base.js
@@ -16,13 +16,18 @@ const {
} = util;
const plugins = [
- new MiniCssExtractPlugin(),
- new BundleAnalyzerPlugin({
- analyzerMode: "static",
- openAnalyzer: false
- })
+ new MiniCssExtractPlugin()
];
+if (!process.env.CI) {
+ plugins.push(
+ new BundleAnalyzerPlugin({
+ analyzerMode: "static",
+ openAnalyzer: false
+ })
+ );
+}
+
if (process.env.DEPLOY && process.env.SENTRY_AUTH_TOKEN) {
plugins.push(
new SentryPlugin({ | chore: Don't run the webpack analyzer plugin in CI environments.
See if this saves us anything over time. |
diff --git a/build/copy-jsbeautify.js b/build/copy-jsbeautify.js
index <HASH>..<HASH> 100644
--- a/build/copy-jsbeautify.js
+++ b/build/copy-jsbeautify.js
@@ -16,14 +16,6 @@ function copy(from, to) {
}
}
-if (!fs.existsSync(path.join(__dirname, '..', 'lib', 'umd'))) {
- fs.mkdirSync(path.join(__dirname, '..', 'lib', 'umd'));
-}
-
-if (!fs.existsSync(path.join(__dirname, '..', 'lib', 'esm'))) {
- fs.mkdirSync(path.join(__dirname, '..', 'lib', 'esm'));
-}
-
const umdDir = path.join(__dirname, '..', 'lib', 'umd', 'beautify');
copy(path.join(__dirname, '..', 'src', 'beautify'), umdDir); | Update copy-jsbeautify.js |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -51,7 +51,7 @@ dirs.extend(numpy_include_dirs)
dirs.append('.')
print dirs
-ext_cplfit = Extension("plfit",
+ext_cplfit = Extension("plfit.cplfit",
["plfit/cplfit.pyx"],
include_dirs=dirs,
extra_compile_args=['-O3'])
@@ -66,7 +66,7 @@ if __name__=="__main__":
# therefore, run this command separately
# gfortran = OK. g77, g95 NOT ok
# also, this is kind of a ridiculous hack...
- if any([x in sys.argv for x in ['build','install']]):
+ if any([x in sys.argv for x in ['build','install','develop']]):
fortran_compile_command = "cd plfit && f2py -c fplfit.f -m fplfit --fcompiler=gfortran && cd .."
os.system(fortran_compile_command)
# do this first so it gets copied (in principle...) | fix setup.py: compilation actually works now! |
diff --git a/oceansdb/utils.py b/oceansdb/utils.py
index <HASH>..<HASH> 100644
--- a/oceansdb/utils.py
+++ b/oceansdb/utils.py
@@ -19,9 +19,6 @@ else:
from urlparse import urlparse
-def oceansdb_dir():
- return os.path.expanduser(os.getenv('OCEANSDB_DIR', '~/.config/oceansdb'))
-
"""
http://data.nodc.noaa.gov/thredds/dodsC/woa/WOA13/DATAv2/temperature/netcdf/decav/0.25/woa13_decav_t00_04v2.nc.html
@@ -41,6 +38,13 @@ http://data.nodc.noaa.gov/thredds/fileServer/woa/WOA13/DATAv2/temperature/netcdf
"""
+def oceansdb_dir():
+ """Path where oceansDB databases files are saved
+ """
+ dbpath = os.getenv('OCEANSDB_DIR', '~/.config/oceansdb')
+ return os.path.expanduser(dbpath).replace('/', os.path.sep)
+
+
class Dataset_flex(object):
def __init__(self, filename, **kwargs):
self.ds = Dataset(filename, mode='r') | Generalizing oceansdb_dir() path to include Windows.
Linux and Windows use opposite directory separators. |
diff --git a/src/test/java/net/emaze/dysfunctional/equality/EqualsBuilderTest.java b/src/test/java/net/emaze/dysfunctional/equality/EqualsBuilderTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/net/emaze/dysfunctional/equality/EqualsBuilderTest.java
+++ b/src/test/java/net/emaze/dysfunctional/equality/EqualsBuilderTest.java
@@ -21,7 +21,7 @@ import org.junit.runners.Suite.SuiteClasses;
TestArrays.class,
TestIgnoreParamsWhenAlreadyDifferent.class,
TestIgnoreArrayParamsWhenAlreadyDifferent.class,
- TestIntrospectsArrays.class,
+ TestIntrospectsArrays.class
})
public class EqualsBuilderTest { | fix: spurious comma |
diff --git a/imghash/__init__.py b/imghash/__init__.py
index <HASH>..<HASH> 100644
--- a/imghash/__init__.py
+++ b/imghash/__init__.py
@@ -36,7 +36,7 @@ def get_hash(path):
def main():
import sys
for path in sys.argv[1:]:
- print get_hash(path).hexdigest(), path
+ print(get_hash(path).hexdigest(), path)
if __name__ == '__main__':
main() | porting to python3 |
diff --git a/bin/determine-basal.js b/bin/determine-basal.js
index <HASH>..<HASH> 100644
--- a/bin/determine-basal.js
+++ b/bin/determine-basal.js
@@ -99,7 +99,7 @@ if (!module.parent) {
console.error("No action required (" + bg + "<" + threshold + ", and no high-temp to cancel)")
}
}
- else { // if (glucose_status.delta <= 0) { // BG is not yet rising
+ else { // BG is not yet rising
setTempBasal(0, 30);
}
@@ -148,7 +148,7 @@ if (!module.parent) {
setTempBasal(rate, 30);
}
- } else { // if (profile_data.min_bg < eventualBG < profile_data.max_bg) {
+ } else {
console.error(eventualBG + " is in range. No action required.")
}
} | remove { from comments to unconfuse vi |
diff --git a/meddler.go b/meddler.go
index <HASH>..<HASH> 100644
--- a/meddler.go
+++ b/meddler.go
@@ -225,6 +225,7 @@ func (elt ZeroIsNullMeddler) PreWrite(field interface{}) (saveValue interface{},
return field, nil
}
+// JSONMeddler encodes or decodes the field value to or from JSON
type JSONMeddler bool
// PreRead is called before a Scan operation for fields that have the JSONMeddler
@@ -295,6 +296,7 @@ func (zip JSONMeddler) PreWrite(field interface{}) (saveValue interface{}, err e
return buffer.Bytes(), nil
}
+// GobMeddler encodes or decodes the field value to or from gob
type GobMeddler bool
// PreRead is called before a Scan operation for fields that have the GobMeddler | add comments to JSONMeddler & GobMeddler |
diff --git a/lib/Logger.php b/lib/Logger.php
index <HASH>..<HASH> 100644
--- a/lib/Logger.php
+++ b/lib/Logger.php
@@ -76,6 +76,16 @@ abstract class Logger implements PsrLogger {
$level = isset(self::LEVELS[$level]) ? $level : "unknown";
$level = $this->ansify ? $this->ansify($level) : $level;
+ foreach ($context as $key => $replacement) {
+ // avoid invalid casts to string
+ if (!is_array($replacement) && (!is_object($replacement) || method_exists($replacement, '__toString'))) {
+ $replacements["{{$key}}"] = $replacement;
+ }
+ }
+ if (isset($replacements)) {
+ $message = strtr($message, $replacements);
+ }
+
return "[{$time}] {$level} {$message}";
} | Implement #<I> (Placeholder support for PSR-3) |
diff --git a/lib/vagrant/systems/debian.rb b/lib/vagrant/systems/debian.rb
index <HASH>..<HASH> 100644
--- a/lib/vagrant/systems/debian.rb
+++ b/lib/vagrant/systems/debian.rb
@@ -26,6 +26,7 @@ module Vagrant
vm.ssh.execute do |ssh|
if !ssh.test?("sudo hostname | grep '#{name}'")
ssh.exec!("sudo sed -i 's/.*$/#{name}/' /etc/hostname")
+ ssh.exec!("sudo sed -i 's@^\\(127[.]0[.]1[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts")
ssh.exec!("sudo service hostname start")
end
end | Changes to fix the fqdn |
diff --git a/django_measurement/models.py b/django_measurement/models.py
index <HASH>..<HASH> 100644
--- a/django_measurement/models.py
+++ b/django_measurement/models.py
@@ -32,7 +32,7 @@ class MeasurementField(six.with_metaclass(models.SubfieldBase, Field)):
min_value=None, max_value=None, *args, **kwargs):
if not measurement and measurement_class:
- measurement = getattr(measures, measurement_class)
+ measurement = getattr(measures, six.text_type(measurement_class))
if not measurement:
raise TypeError('MeasurementField() takes a measurement'
@@ -45,7 +45,7 @@ class MeasurementField(six.with_metaclass(models.SubfieldBase, Field)):
)
self.measurement = measurement
- self.measurement_class = measurement.__name__
+ self.measurement_class = six.text_type(measurement.__name__)
self.widget_args = {
'measurement': measurement,
'unit_choices': unit_choices,
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@ class PyTest(Command):
setup(
name='django-measurement',
- version='2.0.0',
+ version='2.0.1',
url='http://github.com/coddingtonbear/django-measurement/',
description='Convenient fields and classes for handling measurements',
author='Adam Coddington', | fixes bytes/string error when upgrading to python3
Closed #3 |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,9 @@
'use strict';
const plugins = require('./lib/input-plugins');
+const fixtures = require('./tests/fixtures');
-module.exports.plugins = plugins;
+module.exports = {
+ fixtures,
+ plugins
+}; | :new: export fixtures tooooo |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -52,7 +52,9 @@ const isConnected = conn => isConnection(conn) && conn.readyState === 1;
*/
mongoose.oldConnect = function() {
const conn = mongoose.connection;
- return conn.openUri(arguments[0], arguments[1], arguments[2]).then(() => mongoose);
+ return conn
+ .openUri(arguments[0], arguments[1], arguments[2])
+ .then(() => mongoose);
};
/* set global mongoose promise */
@@ -642,7 +644,11 @@ exports.connect = (url, done) => {
const _done = _.isFunction(url) ? url : done;
// connection options
- const _options = { useNewUrlParser: true, useCreateIndex: true };
+ const _options = {
+ useNewUrlParser: true,
+ useCreateIndex: true,
+ useUnifiedTopology: true,
+ };
// establish mongoose connection
uri = _.trim(uri) || MONGODB_URI; | fix: add support for new server discover & monitoring engine |
diff --git a/src/Components/Logo/stubs/logo.php b/src/Components/Logo/stubs/logo.php
index <HASH>..<HASH> 100644
--- a/src/Components/Logo/stubs/logo.php
+++ b/src/Components/Logo/stubs/logo.php
@@ -20,7 +20,9 @@ return [
| Logo Name
|--------------------------------------------------------------------------
|
- | This value is your logo.
+ | This value determines the text that is rendered for the logo.
+ | It defaults to the app name, but it can be any other text
+ | value if the logo should be different to the app name.
|
*/
'name' => config('app.name'), | Update src/Components/Logo/stubs/logo.php |
diff --git a/kirki.php b/kirki.php
index <HASH>..<HASH> 100644
--- a/kirki.php
+++ b/kirki.php
@@ -5,7 +5,7 @@
* Description: The Ultimate WordPress Customizer Framework
* Author: Ari Stathopoulos (@aristath)
* Author URI: https://aristath.github.io
- * Version: 3.0.45
+ * Version: 4.0-dev
* Text Domain: kirki
* Requires WP: 4.9
* Requires PHP: 5.3
@@ -47,7 +47,7 @@ require_once __DIR__ . '/inc/bootstrap.php'; // phpcs:ignore WPThemeReview.CoreF
// Define the KIRKI_VERSION constant.
if ( ! defined( 'KIRKI_VERSION' ) ) {
- define( 'KIRKI_VERSION', '3.0.45' );
+ define( 'KIRKI_VERSION', '4.0-dev' );
}
if ( ! function_exists( 'Kirki' ) ) { | change version to <I>-dev |
diff --git a/blueprints/ember-cli-typescript/index.js b/blueprints/ember-cli-typescript/index.js
index <HASH>..<HASH> 100644
--- a/blueprints/ember-cli-typescript/index.js
+++ b/blueprints/ember-cli-typescript/index.js
@@ -31,7 +31,8 @@ module.exports = {
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'typescript', target: '^2.1' },
- { name: '@types/ember', target: '^2.7.34' }
+ { name: '@types/ember', target: '^2.7.41' },
+ { name: '@types/rsvp', target: '^3.3.0' }
]);
}
} | Include `@types/rsvp` in blueprint. (#<I>) |
diff --git a/lib/rocket_chat/gem_version.rb b/lib/rocket_chat/gem_version.rb
index <HASH>..<HASH> 100644
--- a/lib/rocket_chat/gem_version.rb
+++ b/lib/rocket_chat/gem_version.rb
@@ -1,3 +1,3 @@
module RocketChat
- VERSION = '0.1.9'.freeze
+ VERSION = '0.1.10'.freeze
end | Bumped version to <I> |
diff --git a/lib/triagens/ArangoDb/ConnectionOptions.php b/lib/triagens/ArangoDb/ConnectionOptions.php
index <HASH>..<HASH> 100644
--- a/lib/triagens/ArangoDb/ConnectionOptions.php
+++ b/lib/triagens/ArangoDb/ConnectionOptions.php
@@ -246,7 +246,7 @@ class ConnectionOptions implements \ArrayAccess {
assert(isset($this->_values[self::OPTION_ENDPOINT]));
// set up a new endpoint, this will also validate it
$this->getEndpoint();
- if (Endpoint::getType(self::OPTION_ENDPOINT) === Endpoint::TYPE_UNIX) {
+ if (Endpoint::getType($this->_values[self::OPTION_ENDPOINT]) === Endpoint::TYPE_UNIX) {
// must set port to 0 for UNIX sockets
$this->_values[self::OPTION_PORT] = 0;
} | fixed bug when handling unix socket-based connections |
diff --git a/ck/kernel.py b/ck/kernel.py
index <HASH>..<HASH> 100644
--- a/ck/kernel.py
+++ b/ck/kernel.py
@@ -5144,7 +5144,9 @@ def list_data(i):
import time
start_time = time.time()
- ls=int(i.get('limit_size','0'))
+ xls=i.get('limit_size','')
+ if xls=='': xls='0'
+ ls=int(xls)
ils=0
lst=[] | bug fix with limitation of returned entries during search |
diff --git a/backbone.chromestorage.js b/backbone.chromestorage.js
index <HASH>..<HASH> 100644
--- a/backbone.chromestorage.js
+++ b/backbone.chromestorage.js
@@ -117,9 +117,32 @@
pipe(this._parseRecords).
done((function(records) {
this.records = records;
+ chrome.storage.onChanged.addListener(_update_records.bind(this));
}).bind(this));
}
+ function _update_records(changes, type){
+ var records_change = changes[this.name];
+ if(_our_store_records_changed(records_change, type)){
+ _set_records_from_string(records_change.newValue);
+ }
+ }
+
+ function _our_store_records_changed(records_change, type){
+ return
+ type === this.type &&
+ records_change &&
+ records_change.newValue !== _get_records_string();
+ }
+
+ function _set_records_from_string(records_string){
+ this.records = records_string.split(',');
+ }
+
+ function _get_records_string(){
+ return this.records.join(',');
+ }
+
// `Backbone.ChromeStorage.defaultType` can be overridden globally if desired.
//
// The current options are `'local'` or `'sync'`. | Now listen for changes in the records string and update accordingly.
This is so if another page / tab etc updates the same store the current
page will know about the changes. |
diff --git a/scripts/listPackagesWithTests.js b/scripts/listPackagesWithTests.js
index <HASH>..<HASH> 100644
--- a/scripts/listPackagesWithTests.js
+++ b/scripts/listPackagesWithTests.js
@@ -20,8 +20,8 @@ const CUSTOM_HANDLERS = {
// Split "api-headless-cms" tests into batches of
"api-headless-cms": () => {
return [
- "packages/api-page-builder/* --keyword=cms:ddb --keyword=cms:base",
- "packages/api-page-builder/* --keyword=cms:ddb-es --keyword=cms:base"
+ "packages/api-headless-cms/* --keyword=cms:ddb --keyword=cms:base",
+ "packages/api-headless-cms/* --keyword=cms:ddb-es --keyword=cms:base"
];
}
}; | ci: split PB and CMS Jest tests into two separate runs (ddb, ddb+es) |
diff --git a/question/qbank.js b/question/qbank.js
index <HASH>..<HASH> 100644
--- a/question/qbank.js
+++ b/question/qbank.js
@@ -85,7 +85,10 @@ qtype_chooser = {
if (!document.getElementById('qtypechoicecontainer')) {
return;
}
- qtype_chooser.container = new YAHOO.widget.Dialog('qtypechoicecontainer', {
+ var qtypechoicecontainer = document.getElementById('qtypechoicecontainer');
+ qtypechoicecontainer.parentNode.removeChild(qtypechoicecontainer);
+ document.body.appendChild(qtypechoicecontainer);
+ qtype_chooser.container = new YAHOO.widget.Dialog(qtypechoicecontainer, {
constraintoviewport: true,
visible: false,
modal: true, | question bank: MDL-<I> Add question button did not work when the question bank was hidden. |
diff --git a/pyGeno/importation/Genomes.py b/pyGeno/importation/Genomes.py
index <HASH>..<HASH> 100644
--- a/pyGeno/importation/Genomes.py
+++ b/pyGeno/importation/Genomes.py
@@ -337,7 +337,18 @@ def _importGenomeObjects(gtfFilePath, chroSet, genome, batchSize, verbose = 0) :
protId = None
if verbose > 2 :
printf('Warning: no protein_id found in line %s' % gtf[i])
-
+
+ # Store selenocysteine positions in transcript
+ if regionType == 'Selenocysteine':
+
+ if store.transcripts[transId].selenocysteine is None:
+ positions = list()
+ else:
+ positions = store.transcripts[transId].selenocysteine
+
+ positions.append(start)
+ store.transcripts[transId].set(selenocysteine=positions)
+
if protId is not None and protId not in store.proteins :
if verbose > 1 :
printf('\t\tProtein %s...' % (protId)) | Stores selenocysteine positions in transcript |
diff --git a/tests/unit/fileserver/test_gitfs.py b/tests/unit/fileserver/test_gitfs.py
index <HASH>..<HASH> 100644
--- a/tests/unit/fileserver/test_gitfs.py
+++ b/tests/unit/fileserver/test_gitfs.py
@@ -424,7 +424,9 @@ class GitFSTestBase(object):
# Add a tag
repo.create_tag(TAG_NAME, 'HEAD')
- repo.close()
+ # Older GitPython versions do not have a close method.
+ if hasattr(repo, 'close'):
+ repo.close()
finally:
if orig_username is not None:
os.environ[username_key] = orig_username
@@ -443,8 +445,6 @@ class GitFSTestBase(object):
except OSError as exc:
if exc.errno != errno.EEXIST:
raise
- except Exception:
- log.exception("Exception encountered durring recursive remove: %s", path)
def setUp(self):
''' | Older GitPython version do not have a close method |
diff --git a/src/Cluster.js b/src/Cluster.js
index <HASH>..<HASH> 100644
--- a/src/Cluster.js
+++ b/src/Cluster.js
@@ -34,7 +34,7 @@ Cluster.prototype.cut = function (threshold) {
/**
* Merge the leaves in the minimum way to have 'minGroups' number of clusters
- * @param {number} minGroups
+ * @param {number} minGroups - Them minimum number of children the first level of the tree should have
* @return {Cluster}
*/
Cluster.prototype.group = function (minGroups) {
@@ -61,4 +61,21 @@ Cluster.prototype.group = function (minGroups) {
return root;
};
+/**
+ * Traverses the tree depth-first and provide callback to be called on each individual node
+ * @param {function} cb - The callback to be called on each node encounter
+ * @type {Cluster}
+ */
+Cluster.prototype.traverse = function (cb) {
+ function visit(root, callback) {
+ callback(root);
+ if (root.children) {
+ for (var i = root.children.length - 1; i >= 0; i--) {
+ visit(root.children[i], callback);
+ }
+ }
+ }
+ visit(this, cb);
+};
+
module.exports = Cluster; | feat(cluster): add traverse method
Traverses all the nodes of the tree and calls provided callback on each of them |
diff --git a/packages/form/src/react/divider.js b/packages/form/src/react/divider.js
index <HASH>..<HASH> 100644
--- a/packages/form/src/react/divider.js
+++ b/packages/form/src/react/divider.js
@@ -1,5 +1,4 @@
import * as glamor from 'glamor'
-import PropTypes from 'prop-types'
import React from 'react'
import { useTheme } from '@pluralsight/ps-design-system-theme/react'
@@ -26,8 +25,5 @@ const Divider = props => {
)
}
Divider.displayName = 'Divider'
-Divider.contextTypes = {
- themeName: PropTypes.string
-}
export default Divider | refactor(form): remove unneed contexttype declaration |
diff --git a/test/test_rpc.py b/test/test_rpc.py
index <HASH>..<HASH> 100644
--- a/test/test_rpc.py
+++ b/test/test_rpc.py
@@ -500,6 +500,26 @@ def test_rpc_unknown_service_standalone(rabbit_config, rabbit_manager):
assert exc_info.value._service_name == 'unknown_service'
+def test_rpc_container_being_killed_retries(
+ container_factory, rabbit_config, rabbit_manager):
+
+ container = container_factory(ExampleService, rabbit_config)
+ container.start()
+
+ with RpcProxy("exampleservice", rabbit_config) as proxy:
+ assert proxy.task_a()
+
+ container._being_killed = True
+
+ with pytest.raises(eventlet.Timeout):
+ with eventlet.Timeout(.1):
+ proxy.task_a()
+
+ container._being_killed = False
+
+ assert proxy.task_a()
+
+
def test_rpc_responder_auto_retries(container_factory, rabbit_config,
rabbit_manager): | test for rpc ConsumerBeingKilled |
diff --git a/datatableview/views/legacy.py b/datatableview/views/legacy.py
index <HASH>..<HASH> 100644
--- a/datatableview/views/legacy.py
+++ b/datatableview/views/legacy.py
@@ -522,6 +522,16 @@ class LegacyConfigurationDatatableMixin(DatatableMixin):
""" Helps to keep the promise that we only run ``get_datatable_options()`` once. """
if not hasattr(self, '_datatable_options'):
self._datatable_options = self.get_datatable_options()
+
+ # Convert sources from list to tuple, so that modern Column tracking dicts can hold the
+ # field definitions as keys.
+ columns = self._datatable_options.get('columns', [])
+ for i, column in enumerate(columns):
+ if len(column) >= 2 and isinstance(column[1], list):
+ column = list(column)
+ column[1] = tuple(column[1])
+ columns[i] = tuple(column)
+
return self._datatable_options
def get_datatable_kwargs(self, **kwargs): | Fix issue with lists being used as dict keys |
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index <HASH>..<HASH> 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -26,10 +26,10 @@ __license__ = "GNU Lesser General Public License v3 or later (LGPLv3+)"
__version__ = "0.6.5"
from .api.errors import Error
+from .api.types.pyrogram import *
from .client import ChatAction
from .client import Client
from .client import ParseMode
from .client.input_media import InputMedia
from .client.input_phone_contact import InputPhoneContact
from .client import Emoji
-from .api.types.pyrogram import * | Move pyrogram types import on the top |
diff --git a/upload/catalog/controller/account/download.php b/upload/catalog/controller/account/download.php
index <HASH>..<HASH> 100644
--- a/upload/catalog/controller/account/download.php
+++ b/upload/catalog/controller/account/download.php
@@ -31,7 +31,7 @@ class ControllerAccountDownload extends Controller {
$this->load->model('account/download');
if (isset($this->request->get['page'])) {
- $page = $this->request->get['page'];
+ $page = (int)$this->request->get['page'];
} else {
$page = 1;
}
@@ -145,4 +145,4 @@ class ControllerAccountDownload extends Controller {
$this->response->redirect($this->url->link('account/download', 'language=' . $this->config->get('config_language')));
}
}
-}
\ No newline at end of file
+} | Non well formed numeric page download fix #<I> |
diff --git a/Controller/Box/ProducerProductsBoxController.php b/Controller/Box/ProducerProductsBoxController.php
index <HASH>..<HASH> 100755
--- a/Controller/Box/ProducerProductsBoxController.php
+++ b/Controller/Box/ProducerProductsBoxController.php
@@ -12,7 +12,6 @@
namespace WellCommerce\Bundle\ProducerBundle\Controller\Box;
-use WellCommerce\Bundle\AppBundle\Conditions\LayeredNavigationConditions;
use WellCommerce\Bundle\CoreBundle\Controller\Box\AbstractBoxController;
use WellCommerce\Bundle\LayoutBundle\Collection\LayoutBoxSettingsCollection;
@@ -24,7 +23,7 @@ use WellCommerce\Bundle\LayoutBundle\Collection\LayoutBoxSettingsCollection;
class ProducerProductsBoxController extends AbstractBoxController
{
/**
- * @var \WellCommerce\Bundle\AppBundle\Manager\Front\ProducerManager
+ * @var \WellCommerce\Bundle\ProducerBundle\Manager\Front\ProducerManager
*/
protected $manager; | Removed unused use statements
(cherry picked from commit fe<I>e8e<I>c0ee<I>de<I>a5cb4deb<I>f<I>c<I>) |
diff --git a/includes/class-freemius.php b/includes/class-freemius.php
index <HASH>..<HASH> 100644
--- a/includes/class-freemius.php
+++ b/includes/class-freemius.php
@@ -10404,8 +10404,10 @@
return;
}
+ if ( ! $this->is_ajax() ) {
// Inject license activation dialog UI and client side code.
add_action( 'admin_footer', array( &$this, '_add_license_activation_dialog_box' ) );
+ }
$link_text = __fs(
$this->is_free_plan() ? 'activate-license' : 'change-license', | [license-activation] [link] Only add license activation dialog HTML with the plugin link when it’s not an AJAX request. |
diff --git a/src/model.py b/src/model.py
index <HASH>..<HASH> 100644
--- a/src/model.py
+++ b/src/model.py
@@ -43,7 +43,7 @@ class Model:
"""
saver = tf.train.Saver()
- with tf.Session() as sess:
+ with tf.Session(config=allow_growth_config) as sess:
if restore_model_path:
saver.restore(sess, restore_model_path)
else:
@@ -100,7 +100,7 @@ class Model:
lattices can ultimately be extracted."""
saver = tf.train.Saver()
- with tf.Session() as sess:
+ with tf.Session(config=allow_growth_config) as sess:
if restore_model_path:
saver.restore(sess, restore_model_path)
else:
@@ -184,7 +184,7 @@ class Model:
""" Evaluates the model on a test set."""
saver = tf.train.Saver()
- with tf.Session() as sess:
+ with tf.Session(config=allow_growth_config) as sess:
if restore_model_path:
saver.restore(sess, restore_model_path)
else: | Added allow_growth_config to other sessions in model.py |
diff --git a/src/Distill/Distill.php b/src/Distill/Distill.php
index <HASH>..<HASH> 100644
--- a/src/Distill/Distill.php
+++ b/src/Distill/Distill.php
@@ -86,7 +86,7 @@ class Distill
public function extractWithoutRootDirectory($file, $path, FormatInterface $format = null)
{
// extract to a temporary place
- $tempDirectory = sys_get_temp_dir() . uniqid(time()) . DIRECTORY_SEPARATOR;
+ $tempDirectory = sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid(time()) . DIRECTORY_SEPARATOR;
$this->extract($file, $tempDirectory, $format);
// move directory | Added missing directory separator for tmp directories |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.