diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/stripe/__init__.py b/stripe/__init__.py
index <HASH>..<HASH> 100644
--- a/stripe/__init__.py
+++ b/stripe/__init__.py
@@ -329,7 +329,9 @@ class APIRequestor(object):
# However, that's ok because the CA bundle they use recognizes
# api.stripe.com.
args['validate_certificate'] = verify_ssl_certs
- args['deadline'] = 10
+ # GAE requests time out after 60 seconds, so make sure we leave
+ # some time for the application to handle a slow Stripe
+ args['deadline'] = 55
try:
result = urlfetch.fetch(**args)
|
Time out GAE requests after <I> seconds
|
diff --git a/crispy_forms/tests/test_settings_bootstrap.py b/crispy_forms/tests/test_settings_bootstrap.py
index <HASH>..<HASH> 100644
--- a/crispy_forms/tests/test_settings_bootstrap.py
+++ b/crispy_forms/tests/test_settings_bootstrap.py
@@ -25,3 +25,4 @@ MIDDLEWARE_CLASSES = (
ROOT_URLCONF = 'urls'
CRISPY_TEMPLATE_PACK = 'bootstrap'
+SECRET_KEY = 'secretkey'
|
Added compulsory SECRET_KEY to test settings
|
diff --git a/lib/guard/coffeelint.rb b/lib/guard/coffeelint.rb
index <HASH>..<HASH> 100644
--- a/lib/guard/coffeelint.rb
+++ b/lib/guard/coffeelint.rb
@@ -44,7 +44,13 @@ module Guard
"#{error_count} errors in #{paths.length} files"
end
- Notifier.notify(message, title: "Coffeelint", image: :failed)
+ image = if error_count > 0
+ :failed
+ else
+ :success
+ end
+
+ Notifier.notify(message, title: "Coffeelint", image: image)
end
|
Show the "success" image when error count equals 0.
|
diff --git a/pyvisa-py/serial.py b/pyvisa-py/serial.py
index <HASH>..<HASH> 100644
--- a/pyvisa-py/serial.py
+++ b/pyvisa-py/serial.py
@@ -65,7 +65,7 @@ class SerialSession(Session):
else:
cls = Serial
- self.interface = cls(port=self.parsed.board, timeout=2000, writeTimeout=2000)
+ self.interface = cls(port=self.parsed.board, timeout=2000, write_timeout=2000)
for name in ('ASRL_END_IN', 'ASRL_END_OUT', 'SEND_END_EN', 'TERMCHAR',
'TERMCHAR_EN', 'SUPPRESS_END_EN'):
@@ -93,7 +93,7 @@ class SerialSession(Session):
value = value / 1000.
self.interface.timeout = value
- self.interface.writeTimeout = value
+ self.interface.write_timeout = value
def close(self):
self.interface.close()
|
pyserial renamed writeTimeout to write_timeout in version <I>
|
diff --git a/src/main/java/com/orientechnologies/security/auditing/ODefaultAuditing.java b/src/main/java/com/orientechnologies/security/auditing/ODefaultAuditing.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/orientechnologies/security/auditing/ODefaultAuditing.java
+++ b/src/main/java/com/orientechnologies/security/auditing/ODefaultAuditing.java
@@ -231,13 +231,7 @@ public class ODefaultAuditing implements OAuditingService, ODatabaseLifecycleLis
}
private File getConfigFile(String iDatabaseName) {
- String storagePath = server.getDatabases().getDatabasePath(iDatabaseName);
-
- if (storagePath != null) {
- return new File(storagePath + File.separator + FILE_AUDITING_DB_CONFIG);
- }
-
- return null;
+ return new File(server.getDatabaseDirectory() + iDatabaseName + File.separator + FILE_AUDITING_DB_CONFIG);
}
@Override
|
Fixed ODefaultAuditing.getConfigFile() so it would compile.
|
diff --git a/collectors/build/sonar/src/main/java/com/capitalone/dashboard/collector/DefaultSonar6Client.java b/collectors/build/sonar/src/main/java/com/capitalone/dashboard/collector/DefaultSonar6Client.java
index <HASH>..<HASH> 100644
--- a/collectors/build/sonar/src/main/java/com/capitalone/dashboard/collector/DefaultSonar6Client.java
+++ b/collectors/build/sonar/src/main/java/com/capitalone/dashboard/collector/DefaultSonar6Client.java
@@ -201,7 +201,7 @@ public class DefaultSonar6Client implements SonarClient {
public JSONArray getQualityProfileConfigurationChanges(String instanceUrl,String qualityProfile) throws ParseException{
String url = instanceUrl + URL_QUALITY_PROFILE_CHANGES + qualityProfile;
try {
- JSONArray qualityProfileConfigChanges = this.parseAsArray(instanceUrl, "events");
+ JSONArray qualityProfileConfigChanges = this.parseAsArray(url, "events");
return qualityProfileConfigChanges;
} catch (ParseException e) {
LOG.error("Could not parse response from: " + url, e);
|
Fix sonar CodeQuallity collector parse error (#<I>) (#<I>)
|
diff --git a/great_expectations/dataset/dataset.py b/great_expectations/dataset/dataset.py
index <HASH>..<HASH> 100644
--- a/great_expectations/dataset/dataset.py
+++ b/great_expectations/dataset/dataset.py
@@ -3564,7 +3564,7 @@ class Dataset(MetaDataset):
"""
if partition_object is None:
- partition_object = build_continuous_partition_object(dataset=self, column=column, bins='auto')
+ partition_object = build_continuous_partition_object(dataset=self, column=column, bins='uniform')
if not is_valid_partition_object(partition_object):
raise ValueError("Invalid partition object.")
|
Return to default of "uniform" bins for profiling
|
diff --git a/lib/redis-search.js b/lib/redis-search.js
index <HASH>..<HASH> 100644
--- a/lib/redis-search.js
+++ b/lib/redis-search.js
@@ -55,16 +55,18 @@ Search.prototype.query = function(data, start, stop, callback) {
for(var index in keyMap) {
if (keyMap.hasOwnProperty(index)) {
var keys = keyMap[index];
- if (keys.length === 1) {
- tmpKeys.push(keys[0]);
- } else if (keys.length > 1) {
- var tmpKeyName = namespace + ':' + index + ':temp';
- tmpKeys.push(tmpKeyName);
- var command = commands.and;
- if (index === 'content' && data.matchWords === 'any') {
- command = commands.or;
+ if (Array.isArray(keys)) {
+ if (keys.length === 1) {
+ tmpKeys.push(keys[0]);
+ } else if (keys.length > 1) {
+ var tmpKeyName = namespace + ':' + index + ':temp';
+ tmpKeys.push(tmpKeyName);
+ var command = commands.and;
+ if (index === 'content' && data.matchWords === 'any') {
+ command = commands.or;
+ }
+ cmds.push([command, tmpKeyName, keys.length].concat(keys));
}
- cmds.push([command, tmpKeyName, keys.length].concat(keys));
}
}
}
|
don't crash if keys is undefined
|
diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Autoload/AutoloadGenerator.php
+++ b/src/Composer/Autoload/AutoloadGenerator.php
@@ -148,6 +148,10 @@ EOF;
}
foreach ($package->getAutoload() as $type => $mapping) {
+ // skip misconfigured packages
+ if (!is_array($mapping)) {
+ continue;
+ }
foreach ($mapping as $namespace => $paths) {
foreach ((array) $paths as $path) {
$autoloads[$type][$namespace][] = empty($installPath) ? $path : $installPath.'/'.$path;
|
Avoid blowing up on misconfigured autoload entries
|
diff --git a/bootstrap/run_app_action.go b/bootstrap/run_app_action.go
index <HASH>..<HASH> 100644
--- a/bootstrap/run_app_action.go
+++ b/bootstrap/run_app_action.go
@@ -117,6 +117,9 @@ func (a *RunAppAction) Run(s *State) error {
if err != nil {
return err
}
+ if len(hosts) == 0 {
+ return errors.New("bootstrap: no running hosts found")
+ }
sort.Sort(schedutil.HostSlice(hosts))
for i := 0; i < count; i++ {
hostID := hosts[i%len(hosts)].ID
|
bootstrap: Avoid divide by zero in host selection
If there are no hosts running at this point, the host selection will
panic with a divide by zero. Instead, if there are no hosts, return an
error.
|
diff --git a/settings/default.includes.settings.php b/settings/default.includes.settings.php
index <HASH>..<HASH> 100644
--- a/settings/default.includes.settings.php
+++ b/settings/default.includes.settings.php
@@ -2,13 +2,13 @@
/**
* @file
- * Generated by BLT. Serves as a central aggregation point for adding settings
- * files.
+ * Generated by BLT. A central aggregation point for adding settings files.
*/
/**
- * Use this file to add any addition settings files which should be required by
- * your application. To use, rename this file to be `includes.settings.php and
+ * Adds any additional settings files required by your application.
+ *
+ * To use, rename this file to be `includes.settings.php and
* add file references to the `additionalSettingsFiles` array below.
*
* Files required into this file are included into the blt.settings.php file
diff --git a/settings/global.settings.default.php b/settings/global.settings.default.php
index <HASH>..<HASH> 100644
--- a/settings/global.settings.default.php
+++ b/settings/global.settings.default.php
@@ -6,11 +6,12 @@
*/
/**
+ * An example global include file.
+ *
* Any file placed directly in the docroot/sites/settings directory whose name
* matches a glob pattern of *.settings.php will be incorporated to the settings
* of every defined site.
*
* If instead you want to add settings to a specific site, see BLT's includes
* file in docroot/sites/{site-name}/settings/default.includes.settings.php.
- *
*/
|
Fix code style standards in settings files. (#<I>)
|
diff --git a/daemon/k8s_watcher.go b/daemon/k8s_watcher.go
index <HASH>..<HASH> 100644
--- a/daemon/k8s_watcher.go
+++ b/daemon/k8s_watcher.go
@@ -233,7 +233,14 @@ func (d *Daemon) serviceAddFn(obj interface{}) {
}
if svc.Spec.Type != v1.ServiceTypeClusterIP {
- log.Infof("Ignoring service %s/%s since its type is %s", svc.Namespace, svc.Name, svc.Spec.Type)
+ log.Infof("Ignoring k8s service %s/%s, reason unsupported type %s",
+ svc.Namespace, svc.Name, svc.Spec.Type)
+ return
+ }
+
+ if strings.ToLower(svc.Spec.ClusterIP) == "none" || svc.Spec.ClusterIP == "" {
+ log.Infof("Ignoring k8s service %s/%s, reason: headless",
+ svc.Namespace, svc.Name, svc.Spec.Type)
return
}
|
k8s: Ignore headless services
|
diff --git a/lib/dashboard.js b/lib/dashboard.js
index <HASH>..<HASH> 100644
--- a/lib/dashboard.js
+++ b/lib/dashboard.js
@@ -475,18 +475,24 @@ async function findRecord(ctx, next) {
async function _getContentSections() {
return Section.scope('content').findAll({
- where: {
- fields: {
- [Sequelize.Op.ne]: {},
- },
- },
+ /*
+ * BUG: Postgresql can't compare equality in where clause,
+ * so for now we'll just filter the sections after SQL
+ *
+ * https://github.com/vapid/vapid/issues/149
+ */
+ // where: {
+ // fields: {
+ // [Sequelize.Op.ne]: {},
+ // },
+ // },
order: [
[Sequelize.literal(`CASE WHEN name = '${Section.DEFAULT_NAME}' THEN 1 ELSE 0 END`), 'DESC'],
['multiple', 'ASC'],
[Sequelize.cast(Sequelize.json('options.priority'), 'integer'), 'ASC'],
['name', 'ASC'],
],
- });
+ }).then(sections => Utils.filter(sections, section => !Utils.isEmpty(section.fields)));
}
async function _newRecordAction(ctx, errors = {}) {
|
Filter out sections that don't have fields (#<I>)
Resolves #<I>
|
diff --git a/test/lib/system/index_spec.js b/test/lib/system/index_spec.js
index <HASH>..<HASH> 100644
--- a/test/lib/system/index_spec.js
+++ b/test/lib/system/index_spec.js
@@ -77,6 +77,30 @@ describe('lib/system/index_spec.js', function(){
});
});
+ describe('get_os_name', function(){
+
+ it('should get os name', function(done) {
+ index.get_os_name(function(err, name) {
+ should.not.exist(err);
+ name.should.be.a('string');
+ done();
+ });
+ });
+
+ });
+
+ describe('get_os_version', function(){
+
+ it('should get os version', function(done) {
+ index.get_os_name(function(err, version) {
+ should.not.exist(err);
+ version.should.be.a('string');
+ done();
+ });
+ });
+
+ });
+
describe('set_interval()', function(){
describe('when there is NOT an interval set', function(){
|
Added a few things in system/index testse.
|
diff --git a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/LocalCacheBuilder.java b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/LocalCacheBuilder.java
index <HASH>..<HASH> 100644
--- a/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/LocalCacheBuilder.java
+++ b/clustering/infinispan/extension/src/main/java/org/jboss/as/clustering/infinispan/subsystem/LocalCacheBuilder.java
@@ -72,7 +72,8 @@ public class LocalCacheBuilder extends CacheConfigurationBuilder {
PersistenceConfiguration persistence = this.persistence.getValue();
// Auto-enable simple cache optimization if cache is non-transactional and non-persistent
- builder.simpleCache(!transaction.transactionMode().isTransactional() && !persistence.usingStores());
+ // ISPN-5957 workaround - this doesn't work when statistics are enabled
+ builder.simpleCache(!transaction.transactionMode().isTransactional() && !persistence.usingStores() && !builder.jmxStatistics().create().available());
if ((transaction.lockingMode() == LockingMode.OPTIMISTIC) && (locking.isolationLevel() == IsolationLevel.REPEATABLE_READ)) {
builder.locking().writeSkewCheck(true);
|
Add workaround for ISPN-<I>.
|
diff --git a/lib/build/jake.rb b/lib/build/jake.rb
index <HASH>..<HASH> 100644
--- a/lib/build/jake.rb
+++ b/lib/build/jake.rb
@@ -153,6 +153,17 @@ class Jake
return server, addr, port
end
+ def self.run_local_server_with_logger(port, log_file)
+ addr = localip
+ log = WEBrick::Log.new log_file
+ access_log = [[log_file, WEBrick::AccessLog::COMBINED_LOG_FORMAT]]
+ server = WEBrick::HTTPServer.new :Port => port, :Logger => log, :AccessLog => access_log
+ port = server.config[:Port]
+ # puts "LOCAL SERVER STARTED ON #{addr}:#{port}"
+ Thread.new { server.start }
+ return server, addr, port
+ end
+
def self.reset_spec_server(platform)
require 'rest_client'
require 'json'
|
Added to Jake a method to run it with custom logger
|
diff --git a/packages/cli/src/commands/server/middleware/getSecurityHeadersMiddleware.js b/packages/cli/src/commands/server/middleware/getSecurityHeadersMiddleware.js
index <HASH>..<HASH> 100644
--- a/packages/cli/src/commands/server/middleware/getSecurityHeadersMiddleware.js
+++ b/packages/cli/src/commands/server/middleware/getSecurityHeadersMiddleware.js
@@ -16,7 +16,13 @@ export default function getSecurityHeadersMiddleware(req, res, next) {
req.headers.origin &&
req.headers.origin !== `http://localhost:${address.port}`
) {
- next(new Error('Unauthorized'));
+ next(
+ new Error(
+ 'Unauthorized request from ' +
+ req.headers.origin +
+ '. This may happen because of a conflicting browser extension. Please try to disable it and try again.',
+ ),
+ );
return;
}
|
feat: Add hint for browser extensions that may break debug (#<I>)
* Add hint for browser extensions that may break debug
* Update getSecurityHeadersMiddleware.js
* Fix lint error
|
diff --git a/BraintreeApi/src/main/java/com/braintreepayments/api/BraintreeApi.java b/BraintreeApi/src/main/java/com/braintreepayments/api/BraintreeApi.java
index <HASH>..<HASH> 100644
--- a/BraintreeApi/src/main/java/com/braintreepayments/api/BraintreeApi.java
+++ b/BraintreeApi/src/main/java/com/braintreepayments/api/BraintreeApi.java
@@ -318,7 +318,9 @@ public class BraintreeApi {
coinbaseAccount.storeInVault(true);
}
- return create(coinbaseAccount);
+ return create(new CoinbaseAccountBuilder()
+ .source("coinbase-browser")
+ .code(mCoinbase.parseResponse(redirectUri)));
}
return null;
}
|
Send metadata source as coinbase-browser on coinbase tokenization
|
diff --git a/convert_to_ejml31.py b/convert_to_ejml31.py
index <HASH>..<HASH> 100755
--- a/convert_to_ejml31.py
+++ b/convert_to_ejml31.py
@@ -64,13 +64,13 @@ F("_D32","_R32")
F("_CD64","_CR64")
F("_CD32","_CR32")
-F("CommonOps.","CommonOps_R64")
-F("CovarianceOps.","CovarianceOps_R64")
-F("EigenOps.","EigenOps_R64")
-F("MatrixFeatures.","MatrixFeatures_R64")
-F("NormOps.","NormOps_R64")
-F("RandomMatrices.","RandomMatrices_R64")
-F("SingularOps.","SingularOps_R64")
-F("SpecializedOps.","SpecializedOps_R64")
+F("CommonOps\.","CommonOps_R64")
+F("CovarianceOps\.","CovarianceOps_R64")
+F("EigenOps\.","EigenOps_R64")
+F("MatrixFeatures\.","MatrixFeatures_R64")
+F("NormOps\.","NormOps_R64")
+F("RandomMatrices\.","RandomMatrices_R64")
+F("SingularOps\.","SingularOps_R64")
+F("SpecializedOps\.","SpecializedOps_R64")
print "Finished!"
|
- covering more situations in convert script
|
diff --git a/tests/unit/utils/verify_test.py b/tests/unit/utils/verify_test.py
index <HASH>..<HASH> 100644
--- a/tests/unit/utils/verify_test.py
+++ b/tests/unit/utils/verify_test.py
@@ -10,6 +10,7 @@ import stat
import shutil
import resource
import tempfile
+import socket
# Import Salt libs
import salt.utils
@@ -75,6 +76,10 @@ class TestVerify(TestCase):
def test_verify_socket(self):
self.assertTrue(verify_socket('', 18000, 18001))
+ if socket.has_ipv6:
+ # Only run if Python is built with IPv6 support; otherwise
+ # this will just fail.
+ self.assertTrue(verify_socket('[::]', 18000, 18001))
@skipIf(os.environ.get('TRAVIS_PYTHON_VERSION', None) is not None,
'Travis environment does not like too many open files')
|
Add a unit test for passing IPv6-formatted addresses to verify_socket.
|
diff --git a/src/Gzero/Repository/ContentRepository.php b/src/Gzero/Repository/ContentRepository.php
index <HASH>..<HASH> 100644
--- a/src/Gzero/Repository/ContentRepository.php
+++ b/src/Gzero/Repository/ContentRepository.php
@@ -155,7 +155,7 @@ class ContentRepository extends BaseRepository {
*/
/**
- * Get all node ancestors
+ * Get all ancestors nodes to specific node
*
* @param Tree $node Tree node
* @param array $criteria Array of conditions
|
KMS-<I>_getAncestors fix function desc
|
diff --git a/rpcserver.go b/rpcserver.go
index <HASH>..<HASH> 100644
--- a/rpcserver.go
+++ b/rpcserver.go
@@ -965,13 +965,21 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
return nil, err
}
- // Finally generate the payment hash itself from the pre-image. This
- // will be used by clients to query for the state of a particular
- // invoice.
+ // Next, generate the payment hash itself from the pre-image. This will
+ // be used by clients to query for the state of a particular invoice.
rHash := fastsha256.Sum256(paymentPreimage[:])
+ // Finally we also create an encoded payment request which allows the
+ // caller to comactly send the invoice to the payer.
+ payReqString := zpay32.Encode(&zpay32.PaymentRequest{
+ Destination: r.server.identityPriv.PubKey(),
+ PaymentHash: rHash,
+ Amount: btcutil.Amount(invoice.Value),
+ })
+
return &lnrpc.AddInvoiceResponse{
- RHash: rHash[:],
+ RHash: rHash[:],
+ PaymentRequest: payReqString,
}, nil
}
|
rpcserver: return an encoded payment request in AddInvoice
This commit modifies the generated response to an “AddInvoice” RPC by
including an encoded payment request in the response. This change gives
callers a new atomic piece of information that they can present to the
payee, to allow completion of the payment in a seamless manner.
|
diff --git a/vcr/cassette.py b/vcr/cassette.py
index <HASH>..<HASH> 100644
--- a/vcr/cassette.py
+++ b/vcr/cassette.py
@@ -38,20 +38,18 @@ class CassetteContextDecorator(object):
with contextlib2.ExitStack() as exit_stack:
for patcher in build_patchers(cassette):
exit_stack.enter_context(patcher)
- yield
+ yield cassette
# TODO(@IvanMalison): Hmmm. it kind of feels like this should be somewhere else.
cassette._save()
def __enter__(self):
assert self.__finish is None
path, kwargs = self._args_getter()
- cassette = self.cls.load(path, **kwargs)
- self.__finish = self._patch_generator(cassette)
- self.__finish.__next__()
- return cassette
+ self.__finish = self._patch_generator(self.cls.load(path, **kwargs))
+ return next(self.__finish)
def __exit__(self, *args):
- [_ for _ in self.__finish] # this exits the context created by the call to _patch_generator.
+ next(self.__finish, None)
self.__finish = None
def __call__(self, function):
|
Python version agnostic way of getting the next item in the generator.
|
diff --git a/src/Tonic/Exception.php b/src/Tonic/Exception.php
index <HASH>..<HASH> 100644
--- a/src/Tonic/Exception.php
+++ b/src/Tonic/Exception.php
@@ -7,5 +7,6 @@ namespace Tonic;
*/
class Exception extends \Exception
{
- protected $message = 'An unknown Tonic exception occurred';
+ protected $message = 'An unknown Tonic exception occurred';
+ protected $code = 500;
}
|
Default Error code in Tonic\Exception
Moving the default error code of <I> from dispatch.php to Tonic\Exception.php
|
diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -45,6 +45,7 @@ var Server = exports.Server = function (root, config, components) {
, body_parser: true
, cookie_parser: true
, method_override: true
+ , cleanup_response: false
};
this.useragent_redirects = [];
this.error_handler = null;
@@ -89,6 +90,24 @@ Server.prototype.create = function () {
app = express();
}
+ //Cleanup cyclic references and certain objects that may cause leaks
+ if (this.components.cleanup_response) {
+ var cleanupResponse = function() {
+ if (this.req) {
+ delete this.req.next;
+ delete this.req.res;
+ delete this.req.query;
+ delete this.req.trailers;
+ }
+ delete this.next;
+ delete this.req;
+ };
+ app.use(function (request, response, next) {
+ response.on('end', cleanupResponse);
+ response.on('close', cleanupResponse);
+ });
+ }
+
//Send 400 when a malformed url is encountered
app.use(function (request, response, next) {
try {
|
Add an experimental middleware to cleanup the response object
|
diff --git a/lib/fase-2/commonality.js b/lib/fase-2/commonality.js
index <HASH>..<HASH> 100644
--- a/lib/fase-2/commonality.js
+++ b/lib/fase-2/commonality.js
@@ -19,6 +19,11 @@ Commonality.prototype.collect = function (nodelist) {
this.matrix.summarise();
};
+var ttest_options = {
+ alpha: 0.05,
+ alternative: "greater"
+};
+
Commonality.prototype.reduce = function () {
var maxRemoval = this.top.getText().length * 0.35;
@@ -36,8 +41,6 @@ Commonality.prototype.reduce = function () {
}
else if (this.matrix.cellTextLength(a, b) > maxRemoval) {
- console.log('skip: ' + this.matrix.cellName(a, b));
- console.log('cause: ' + this.matrix.cellTextLength(a, b) + ' < ' + maxRemoval);
continue;
}
@@ -58,10 +61,7 @@ Commonality.prototype.reduce = function () {
}
// Check if the maxdataset mean is greater than the current tagname
- else if (ttest(best, compare, {
- alpha: 0.05,
- alternative: "greater"
- }).valid() === false) {
+ else if (ttest(best, compare, ttest_options).valid() === false) {
this.matrix.removeCell(a, b);
}
}
|
[cleanup] t-test with alpha = <I> looks good
|
diff --git a/zipline/examples/dual_ema_talib.py b/zipline/examples/dual_ema_talib.py
index <HASH>..<HASH> 100644
--- a/zipline/examples/dual_ema_talib.py
+++ b/zipline/examples/dual_ema_talib.py
@@ -38,8 +38,8 @@ class DualEMATaLib(TradingAlgorithm):
def initialize(self, short_window=20, long_window=40):
# Add 2 mavg transforms, one with a long window, one
# with a short window.
- self.short_ema_trans = EMA('AAPL', window_length=short_window)
- self.long_ema_trans = EMA('AAPL', window_length=long_window)
+ self.short_ema_trans = EMA(window_length=short_window)
+ self.long_ema_trans = EMA(window_length=long_window)
# To keep track of whether we invested in the stock or not
self.invested = False
|
BUG: Fix TALib example due to parameter changes.
Remove use of `sid` parameter, which was recently removed.
|
diff --git a/desktop/app/menu-bar.js b/desktop/app/menu-bar.js
index <HASH>..<HASH> 100644
--- a/desktop/app/menu-bar.js
+++ b/desktop/app/menu-bar.js
@@ -28,7 +28,10 @@ export default function () {
resizable: false,
preloadWindow: true,
icon: icon,
- showDockIcon: true, // This causes menubar to not touch dock icon, yeah it's weird
+ // Without this flag set, menubar will hide the dock icon when the app
+ // ready event fires. We manage the dock icon ourselves, so this flag
+ // prevents menubar from changing the state.
+ 'show-dock-icon': true,
})
ipcMain.on('showTrayLoading', () => {
|
Update showDockIcon option to reflect upstream rename
|
diff --git a/src/Http/FormAuthenticationHook.php b/src/Http/FormAuthenticationHook.php
index <HASH>..<HASH> 100644
--- a/src/Http/FormAuthenticationHook.php
+++ b/src/Http/FormAuthenticationHook.php
@@ -36,10 +36,6 @@ class FormAuthenticationHook implements BeforeHookInterface
if ('/_form/auth/verify' === $request->getPathInfo()) {
return;
}
- // ignore POST to token endpoint
- if ('/_oauth/token' === $request->getPathInfo()) {
- return;
- }
}
if ($this->session->has('_form_auth_user')) {
diff --git a/src/Http/TwoFactorHook.php b/src/Http/TwoFactorHook.php
index <HASH>..<HASH> 100644
--- a/src/Http/TwoFactorHook.php
+++ b/src/Http/TwoFactorHook.php
@@ -41,7 +41,6 @@ class TwoFactorHook implements BeforeHookInterface
'/_form/auth/logout',
'/_two_factor/auth/verify/totp',
'/_two_factor/auth/verify/yubi',
- '/_oauth/token',
];
if (in_array($request->getPathInfo(), $allowedUris, true) && 'POST' === $request->getRequestMethod()) {
|
oauth token path is obsolete, remove it from ignored URLs
|
diff --git a/nanocomp/NanoComp.py b/nanocomp/NanoComp.py
index <HASH>..<HASH> 100644
--- a/nanocomp/NanoComp.py
+++ b/nanocomp/NanoComp.py
@@ -185,7 +185,7 @@ def make_plots(df, settings):
df=df,
y="lengths",
figformat=settings["format"],
- path=path,
+ path=settings["path"],
violin=violin,
title=settings["title"])
)
@@ -194,7 +194,7 @@ def make_plots(df, settings):
df=df,
y="log length",
figformat=settings["format"],
- path=path,
+ path=settings["path"],
violin=violin,
log=True,
title=settings["title"])
@@ -204,7 +204,7 @@ def make_plots(df, settings):
df=df,
y="quals",
figformat=settings["format"],
- path=path,
+ path=settings["path"],
violin=violin,
title=settings["title"])
)
@@ -214,7 +214,7 @@ def make_plots(df, settings):
df=df[df["percentIdentity"] > np.percentile(df["percentIdentity"], 1)],
y="percentIdentity",
figformat=settings["format"],
- path=path,
+ path=settings["path"],
violin=violin,
title=settings["title"])
)
|
should have been settings["path"] instead of path
|
diff --git a/squad/frontend/tests.py b/squad/frontend/tests.py
index <HASH>..<HASH> 100644
--- a/squad/frontend/tests.py
+++ b/squad/frontend/tests.py
@@ -84,7 +84,7 @@ class TestResultTable(list):
suite_id,
name,
SUM(CASE when result is null then 1 else 0 end) as skips,
- SUM(CASE when result is not null and not result and not has_known_issues then 1 else 0 end) as fails,
+ SUM(CASE when result is not null and not result and (has_known_issues is null or not has_known_issues) then 1 else 0 end) as fails,
SUM(CASE when result is not null and not result and has_known_issues then 1 else 0 end) as xfails,
SUM(CASE when result is null then 0 when result then 1 else 0 end) as passes
FROM core_test
|
frontend: fix sorting test with failures first
`has_known_issues` has to be handled like it is in Python, i.e. null
needs to also be considered as 'false'.
|
diff --git a/test/server.js b/test/server.js
index <HASH>..<HASH> 100644
--- a/test/server.js
+++ b/test/server.js
@@ -15,6 +15,20 @@ const dummyFetch = function () {
require('./spec')(fetchMock, global, require('node-fetch').Request);
+describe('support for Buffers', function () {
+ it('can respond with a buffer', function () {
+ fetchMock.mock(/a/, {
+ sendAsJson: false,
+ body: new Buffer('buffer')
+ })
+ return fetch('http://a.com')
+ .then(res => res.text())
+ .then(txt => {
+ expect(txt).to.equal('buffer');
+ });
+ });
+});
+
describe('new non-global use', function () {
before(function () {
|
added test for buffer (#<I>)
|
diff --git a/src/Image/Transformation/Icc.php b/src/Image/Transformation/Icc.php
index <HASH>..<HASH> 100644
--- a/src/Image/Transformation/Icc.php
+++ b/src/Image/Transformation/Icc.php
@@ -10,9 +10,15 @@
namespace Imbo\Image\Transformation;
-use Imbo\Exception\ConfigurationException;
-use Imbo\Exception\InvalidArgumentException;
+use Imbo\Exception\ConfigurationException,
+ Imbo\Exception\InvalidArgumentException;
+/**
+ * Transformation for applying ICC profiles to an image.
+ *
+ * @author Mats Lindh <mats@lindh.no>
+ * @package Image\Transformations
+ */
class Icc extends Transformation {
/**
* @var array
|
Add docblock and normalize use statement
|
diff --git a/samples/memfs/memfs_test.go b/samples/memfs/memfs_test.go
index <HASH>..<HASH> 100644
--- a/samples/memfs/memfs_test.go
+++ b/samples/memfs/memfs_test.go
@@ -1187,5 +1187,25 @@ func (t *MemFSTest) ReadLink_NonExistent() {
}
func (t *MemFSTest) ReadLink_NotASymlink() {
- AssertTrue(false, "TODO")
+ var err error
+
+ // Create a file and a directory.
+ fileName := path.Join(t.Dir, "foo")
+ err = ioutil.WriteFile(fileName, []byte{}, 0400)
+ AssertEq(nil, err)
+
+ dirName := path.Join(t.Dir, "bar")
+ err = os.Mkdir(dirName, 0700)
+ AssertEq(nil, err)
+
+ // Reading either of them as a symlink should fail.
+ names := []string{
+ fileName,
+ dirName,
+ }
+
+ for _, n := range names {
+ _, err = os.Readlink(n)
+ ExpectThat(err, Error(HasSubstr("invalid argument")))
+ }
}
|
MemFSTest.ReadLink_NotASymlink
|
diff --git a/src/system/modules/metamodels/MetaModels/Helper/ToolboxFile.php b/src/system/modules/metamodels/MetaModels/Helper/ToolboxFile.php
index <HASH>..<HASH> 100644
--- a/src/system/modules/metamodels/MetaModels/Helper/ToolboxFile.php
+++ b/src/system/modules/metamodels/MetaModels/Helper/ToolboxFile.php
@@ -74,7 +74,7 @@ class ToolboxFile
*
* @var array
*/
- protected $foundFiles;
+ protected $foundFiles = array();
/**
* The folders to process in this instance.
|
Fix issue #<I> - Found files is not initialized as array.
|
diff --git a/synapse/tools/autodoc.py b/synapse/tools/autodoc.py
index <HASH>..<HASH> 100644
--- a/synapse/tools/autodoc.py
+++ b/synapse/tools/autodoc.py
@@ -225,7 +225,7 @@ def docModel(outp, fd, core):
regex = inst.get('regex')
if regex is not None:
- cons.append('- regex: %s' % (regex,))
+ cons.append('- regex: ``%s``' % (regex,))
lower = inst.get('lower')
if lower:
|
Do not allow a regex to be interpreted as rst
|
diff --git a/molgenis-web/src/main/java/org/molgenis/web/PluginInterceptor.java b/molgenis-web/src/main/java/org/molgenis/web/PluginInterceptor.java
index <HASH>..<HASH> 100644
--- a/molgenis-web/src/main/java/org/molgenis/web/PluginInterceptor.java
+++ b/molgenis-web/src/main/java/org/molgenis/web/PluginInterceptor.java
@@ -58,19 +58,19 @@ public class PluginInterceptor extends HandlerInterceptorAdapter
}
Entity pluginSettings = molgenisPlugin.getPluginSettings();
- Boolean pluginSettingsCanWrite;
+ boolean pluginSettingsCanWrite;
if (pluginSettings != null)
{
String pluginSettingsEntityName = pluginSettings.getEntityType().getId();
pluginSettingsCanWrite = permissionService.hasPermissionOnEntityType(pluginSettingsEntityName,
Permission.WRITE);
+ modelAndView.addObject(PluginAttributes.KEY_PLUGIN_SETTINGS, pluginSettings);
}
else
{
- pluginSettingsCanWrite = null;
+ pluginSettingsCanWrite = false;
}
- modelAndView.addObject(PluginAttributes.KEY_PLUGIN_SETTINGS, pluginSettings);
modelAndView.addObject(PluginAttributes.KEY_PLUGIN_SETTINGS_CAN_WRITE, pluginSettingsCanWrite);
modelAndView.addObject(PluginAttributes.KEY_MOLGENIS_UI, molgenisUi);
modelAndView.addObject(PluginAttributes.KEY_AUTHENTICATED, SecurityUtils.currentUserIsAuthenticated());
|
Fix high prio FindBugs warnings
|
diff --git a/cmd/exo/cmd/vm_delete.go b/cmd/exo/cmd/vm_delete.go
index <HASH>..<HASH> 100644
--- a/cmd/exo/cmd/vm_delete.go
+++ b/cmd/exo/cmd/vm_delete.go
@@ -3,6 +3,8 @@ package cmd
import (
"fmt"
"log"
+ "os"
+ "path"
"github.com/exoscale/egoscale"
"github.com/spf13/cobra"
@@ -54,6 +56,14 @@ func deleteVM(name string) error {
return errorReq
}
+ folder := path.Join(configFolder, "instances", vm.ID)
+
+ if _, err := os.Stat(folder); !os.IsNotExist(err) {
+ if err := os.RemoveAll(folder); err != nil {
+ return err
+ }
+ }
+
println(vm.ID)
return nil
|
Perform vm delete (#<I>)
|
diff --git a/lib/rules/no-unused-vars.js b/lib/rules/no-unused-vars.js
index <HASH>..<HASH> 100644
--- a/lib/rules/no-unused-vars.js
+++ b/lib/rules/no-unused-vars.js
@@ -449,18 +449,24 @@ module.exports = {
return ref.isRead() && (
// self update. e.g. `a += 1`, `a++`
- (// in RHS of an assignment for itself. e.g. `a = a + 1`
- ((
+ (
+ (
parent.type === "AssignmentExpression" &&
- isUnusedExpression(parent) &&
- parent.left === id
+ parent.left === id &&
+ isUnusedExpression(parent)
) ||
+ (
+ parent.type === "UpdateExpression" &&
+ isUnusedExpression(parent)
+ )
+ ) ||
+
+ // in RHS of an assignment for itself. e.g. `a = a + 1`
(
- parent.type === "UpdateExpression" &&
- isUnusedExpression(parent)
- ) || rhsNode &&
- isInside(id, rhsNode) &&
- !isInsideOfStorableFunction(id, rhsNode)))
+ rhsNode &&
+ isInside(id, rhsNode) &&
+ !isInsideOfStorableFunction(id, rhsNode)
+ )
);
}
|
Chore: fix comment location in no-unused-vars (#<I>)
|
diff --git a/enhydrator/src/main/java/com/airhacks/enhydrator/flexpipe/Pipeline.java b/enhydrator/src/main/java/com/airhacks/enhydrator/flexpipe/Pipeline.java
index <HASH>..<HASH> 100644
--- a/enhydrator/src/main/java/com/airhacks/enhydrator/flexpipe/Pipeline.java
+++ b/enhydrator/src/main/java/com/airhacks/enhydrator/flexpipe/Pipeline.java
@@ -9,9 +9,9 @@ package com.airhacks.enhydrator.flexpipe;
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -122,6 +122,10 @@ public class Pipeline {
return source;
}
+ public void setSource(Source source) {
+ this.source = source;
+ }
+
public String getSqlQuery() {
return sqlQuery;
}
|
#<I> - Added setSource() to Pipeline
|
diff --git a/test/OverlayTriggerSpec.js b/test/OverlayTriggerSpec.js
index <HASH>..<HASH> 100644
--- a/test/OverlayTriggerSpec.js
+++ b/test/OverlayTriggerSpec.js
@@ -123,6 +123,33 @@ describe('<OverlayTrigger>', () => {
wrapper.assertSingle('div.test');
});
+ it('Should show after mouseover trigger', (done) => {
+ const clock = sinon.useFakeTimers();
+
+ try {
+ const wrapper = mount(
+ <OverlayTrigger overlay={<Div className="test" />}>
+ <span>hover me</span>
+ </OverlayTrigger>,
+ );
+
+ wrapper.assertNone('.test');
+
+ wrapper.find('span').simulate('mouseover');
+
+ wrapper.assertSingle('div.test');
+
+ wrapper.find('span').simulate('mouseout');
+
+ clock.tick(50);
+
+ wrapper.assertNone('.test');
+ } finally {
+ clock.restore();
+ done();
+ }
+ });
+
it('Should not set aria-describedby if the state is not show', () => {
const [button] = mount(
<OverlayTrigger trigger="click" overlay={<Div />}>
|
test: add tests for mouseover trigger and use fake timers (#<I>)
|
diff --git a/seaworthy/tests/test_utils.py b/seaworthy/tests/test_utils.py
index <HASH>..<HASH> 100644
--- a/seaworthy/tests/test_utils.py
+++ b/seaworthy/tests/test_utils.py
@@ -1,9 +1,9 @@
-from testtools.assertions import assert_that
-from testtools.matchers import Equals
+from unittest import TestCase
from seaworthy.utils import resource_name
-def test_resource_name():
- # Dummy test so that pytest passes
- assert_that(resource_name('foo'), Equals('test_foo'))
+class DummyTest(TestCase):
+ def test_resource_name(self):
+ # Dummy test so that pytest passes
+ self.assertEqual(resource_name('foo'), 'test_foo')
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,6 @@ setup(
],
'test': [
'pytest>=3.0.0',
- 'testtools',
],
'docstest': [
'doc8',
|
No testtools in core tests.
|
diff --git a/zxingorg/src/main/java/com/google/zxing/web/DecodeServlet.java b/zxingorg/src/main/java/com/google/zxing/web/DecodeServlet.java
index <HASH>..<HASH> 100644
--- a/zxingorg/src/main/java/com/google/zxing/web/DecodeServlet.java
+++ b/zxingorg/src/main/java/com/google/zxing/web/DecodeServlet.java
@@ -303,7 +303,7 @@ public final class DecodeServlet extends HttpServlet {
return;
} catch (IOException ioe) {
log.info(ioe.toString());
- errorResponse(request, response, "badurl");
+ errorResponse(request, response, "badimage");
return;
}
Part fileUploadPart = null;
|
Fixed error key in doPost() (#<I>)
doPost() works only with badimage
|
diff --git a/lib/default_value_for.rb b/lib/default_value_for.rb
index <HASH>..<HASH> 100644
--- a/lib/default_value_for.rb
+++ b/lib/default_value_for.rb
@@ -70,13 +70,8 @@ module DefaultValueFor
after_initialize :set_default_values
- if respond_to?(:class_attribute)
- class_attribute :_default_attribute_values
- class_attribute :_default_attribute_values_not_allowing_nil
- else
- class_inheritable_accessor :_default_attribute_values
- class_inheritable_accessor :_default_attribute_values_not_allowing_nil
- end
+ class_attribute :_default_attribute_values
+ class_attribute :_default_attribute_values_not_allowing_nil
extend(DelayedClassMethods)
init_hash = true
|
class_inheritable_accessor is gone in Rails <I>
|
diff --git a/actionpack/lib/action_dispatch/middleware/params_parser.rb b/actionpack/lib/action_dispatch/middleware/params_parser.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/middleware/params_parser.rb
+++ b/actionpack/lib/action_dispatch/middleware/params_parser.rb
@@ -26,20 +26,19 @@ module ActionDispatch
end
def call(env)
- if params = parse_formatted_parameters(env)
- env["action_dispatch.request.request_parameters"] = params
- end
+ default = env["action_dispatch.request.request_parameters"]
+ env["action_dispatch.request.request_parameters"] = parse_formatted_parameters(env, default)
@app.call(env)
end
private
- def parse_formatted_parameters(env)
+ def parse_formatted_parameters(env, default)
request = Request.new(env)
- return false if request.content_length.zero?
+ return default if request.content_length.zero?
- strategy = @parsers.fetch(request.content_mime_type) { return false }
+ strategy = @parsers.fetch(request.content_mime_type) { return default }
strategy.call(request.raw_post)
|
drop a conditional by always assigning
We will always make an assignment to the env hash and eliminate a
conditional
|
diff --git a/src/test/java/org/takes/facets/auth/PsByFlagTest.java b/src/test/java/org/takes/facets/auth/PsByFlagTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/takes/facets/auth/PsByFlagTest.java
+++ b/src/test/java/org/takes/facets/auth/PsByFlagTest.java
@@ -126,7 +126,7 @@ public final class PsByFlagTest {
new PsByFlag.Pair(
KEY, new PsFake(true)
)
- ).exit(response, this.identity),
+ ).exit(response, identity),
Matchers.is(response)
);
}
|
PsByFlag is not tested #<I> - fixed qulice violations and removed "this" for static members
|
diff --git a/src/module-elasticsuite-tracker/view/frontend/web/js/user-consent.js b/src/module-elasticsuite-tracker/view/frontend/web/js/user-consent.js
index <HASH>..<HASH> 100644
--- a/src/module-elasticsuite-tracker/view/frontend/web/js/user-consent.js
+++ b/src/module-elasticsuite-tracker/view/frontend/web/js/user-consent.js
@@ -15,4 +15,4 @@ define(['jquery', 'mage/cookies'], function ($) {
return function(config) {
return config.cookieRestrictionEnabled == false || $.mage.cookies.get(config.cookieRestrictionName) !== null;
};
-})
+});
|
Make js compatible to merging with other files.
When merging this file using e.g. magepack, the missing semicolon may cause problems in the file that gets appended. It may try to call define() as a function.
|
diff --git a/checklist-model.js b/checklist-model.js
index <HASH>..<HASH> 100644
--- a/checklist-model.js
+++ b/checklist-model.js
@@ -88,7 +88,7 @@ angular.module('checklist-model', [])
}
// exclude recursion
- tElement.removeAttr('checklist-model data-checklist-model');
+ tElement.removeAttr('checklist-model');
// local scope var storing individual checkbox model
tElement.attr('ng-model', 'checked');
|
Looped for ever.
Fixed infinity loop.
|
diff --git a/Spread/ReplySpread.php b/Spread/ReplySpread.php
index <HASH>..<HASH> 100644
--- a/Spread/ReplySpread.php
+++ b/Spread/ReplySpread.php
@@ -45,11 +45,9 @@ class ReplySpread implements SpreadInterface
$posts = array_merge([$parent], $parent->getChildren()->toArray());
$done = [];
foreach ($posts as $check) {
- // Load the author, spread if they are not the new reply author and
- // they have not been spread to yet.
+ // Load the author, spread if they have not been spread to yet.
$author = $this->user_provider->loadUserByUsername($check->getAuthor());
if (!$author instanceof UserInterface
- || $author->getUsername() == $post->getAuthor()
|| isset($done[$author->getUsername()])) {
continue;
}
|
Spread to post authors, notifications will be handled.
|
diff --git a/src/js/pannellum.js b/src/js/pannellum.js
index <HASH>..<HASH> 100644
--- a/src/js/pannellum.js
+++ b/src/js/pannellum.js
@@ -480,10 +480,10 @@ function onImageLoad() {
if (config.doubleClickZoom) {
dragFix.addEventListener('dblclick', onDocumentDoubleClick, false);
}
- uiContainer.addEventListener('mozfullscreenchange', onFullScreenChange, false);
- uiContainer.addEventListener('webkitfullscreenchange', onFullScreenChange, false);
- uiContainer.addEventListener('msfullscreenchange', onFullScreenChange, false);
- uiContainer.addEventListener('fullscreenchange', onFullScreenChange, false);
+ container.addEventListener('mozfullscreenchange', onFullScreenChange, false);
+ container.addEventListener('webkitfullscreenchange', onFullScreenChange, false);
+ container.addEventListener('msfullscreenchange', onFullScreenChange, false);
+ container.addEventListener('fullscreenchange', onFullScreenChange, false);
window.addEventListener('resize', onDocumentResize, false);
window.addEventListener('orientationchange', onDocumentResize, false);
if (!config.disableKeyboardCtrl) {
|
Fix interaction between F<I> and API fullscreens in Chrome (fixes #<I>).
|
diff --git a/connection.go b/connection.go
index <HASH>..<HASH> 100644
--- a/connection.go
+++ b/connection.go
@@ -69,6 +69,8 @@ type Connection struct {
conn io.ReadWriteCloser
+ LocalAddr net.Addr // local TCP peer address
+
rpc chan message
writer *writer
sends chan time.Time // timestamps of each frame sent
@@ -188,7 +190,14 @@ func DialConfig(url string, config Config) (*Connection, error) {
conn = client
}
- return Open(conn, config)
+ c, err := Open(conn, config)
+ if err != nil {
+ return nil, err
+ }
+
+ c.LocalAddr = conn.LocalAddr()
+
+ return c, err
}
/*
|
Expose the local TCP address
|
diff --git a/waldur_core/logging/loggers.py b/waldur_core/logging/loggers.py
index <HASH>..<HASH> 100644
--- a/waldur_core/logging/loggers.py
+++ b/waldur_core/logging/loggers.py
@@ -373,7 +373,7 @@ class BaseLoggerRegistry(object):
def register(self, name, logger_class):
if name in self.__dict__:
raise EventLoggerError("Logger '%s' already registered." % name)
- self.__dict__[name] = logger_class() if isinstance(logger, type) else logger_class
+ self.__dict__[name] = logger_class()
def unregister_all(self):
self.__dict__ = {}
|
Fix tests [WAL-<I>]
|
diff --git a/docs/exts/redirects.py b/docs/exts/redirects.py
index <HASH>..<HASH> 100644
--- a/docs/exts/redirects.py
+++ b/docs/exts/redirects.py
@@ -29,7 +29,7 @@ log = logging.getLogger(__name__)
def generate_redirects(app):
- """Generaate redirects files."""
+ """Generate redirects files."""
redirect_file_path = os.path.join(app.srcdir, app.config.redirects_file)
if not os.path.exists(redirect_file_path):
raise ExtensionError(f"Could not find redirects file at '{redirect_file_path}'")
@@ -38,7 +38,7 @@ def generate_redirects(app):
if not isinstance(app.builder, builders.StandaloneHTMLBuilder):
log.warning(
- "The plugin is support only 'html' builder, but you are using '{type(app.builder)}'. Skipping..."
+ f"The plugin supports only 'html' builder, but you are using '{type(app.builder)}'. Skipping..."
)
return
|
Fix Warning when using a different Sphinx Builder (#<I>)
|
diff --git a/aiidalab_widgets_base/codes.py b/aiidalab_widgets_base/codes.py
index <HASH>..<HASH> 100644
--- a/aiidalab_widgets_base/codes.py
+++ b/aiidalab_widgets_base/codes.py
@@ -8,7 +8,7 @@ from aiida.plugins.entry_point import get_entry_point_names
from IPython.display import clear_output
from traitlets import Bool, Dict, Instance, Unicode, Union, dlink, link, validate
-from aiidalab_widgets_base.computers import ComputerDropdown
+from .computers import ComputerDropdown
class CodeDropdown(ipw.VBox):
diff --git a/aiidalab_widgets_base/viewers.py b/aiidalab_widgets_base/viewers.py
index <HASH>..<HASH> 100644
--- a/aiidalab_widgets_base/viewers.py
+++ b/aiidalab_widgets_base/viewers.py
@@ -94,8 +94,6 @@ class AiidaNodeViewWidget(ipw.VBox):
@traitlets.observe("node")
def _observe_node(self, change):
- from aiidalab_widgets_base import viewer
-
if change["new"] != change["old"]:
with self._output:
clear_output()
|
Fix imports: (#<I>)
- Do not import viewer, as it is defined in the same file.
- Use "import .computers" instead of "import awb.computers"
|
diff --git a/u2flib_server/__init__.py b/u2flib_server/__init__.py
index <HASH>..<HASH> 100644
--- a/u2flib_server/__init__.py
+++ b/u2flib_server/__init__.py
@@ -25,4 +25,4 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
-__version__ = "3.3.0-dev"
+__version__ = "4.0.0-dev"
|
Increment version to <I>
|
diff --git a/remi/server.py b/remi/server.py
index <HASH>..<HASH> 100644
--- a/remi/server.py
+++ b/remi/server.py
@@ -571,7 +571,7 @@ ws.onerror = function(evt){
if self.server.enable_file_cache:
self.send_header('Cache-Control', 'public, max-age=86400')
self.end_headers()
- with open(filename, 'r+b') as f:
+ with open(filename, 'rb') as f:
content = f.read()
self.wfile.write(content)
elif attr_call:
|
Removing the + on the file permission as we are only reading the file
|
diff --git a/store/redigostore/redigostore.go b/store/redigostore/redigostore.go
index <HASH>..<HASH> 100644
--- a/store/redigostore/redigostore.go
+++ b/store/redigostore/redigostore.go
@@ -74,7 +74,7 @@ func (r *RedigoStore) GetWithTime(key string) (int64, time.Time, error) {
if _, err := redis.Scan(timeReply, &s, &ms); err != nil {
return 0, now, err
}
- now = time.Unix(s, ms*int64(time.Millisecond))
+ now = time.Unix(s, ms*int64(time.Microsecond))
v, err := redis.Int64(conn.Receive())
if err == redis.ErrNil {
|
Fix parsing of `TIME` in redigostore
I noticed that the current time being returned from this store looked
off, and upon [reading the docs for Redis' TIME][redis-time], it looks
like the second element in the array is actually supposed to be read as
microseconds. This patch changes the current millisecond implementation
to microseconds.
[redis-time]: <URL>
|
diff --git a/ontobio/io/hpoaparser.py b/ontobio/io/hpoaparser.py
index <HASH>..<HASH> 100644
--- a/ontobio/io/hpoaparser.py
+++ b/ontobio/io/hpoaparser.py
@@ -174,9 +174,8 @@ class HpoaParser(AssocParser):
relation = None
# With/From
- # withfroms = self.validate_pipe_separated_ids(withfrom, split_line, empty_allowed=True, extra_delims=",")
+ withfroms = self.validate_pipe_separated_ids(withfrom, split_line, empty_allowed=True, extra_delims=",")
- withfroms = self._unroll_withfrom_and_replair_obsoletes(split_line, 'gpad')
if withfroms is None:
# Reporting occurs in above function call
return assocparser.ParseResult(line, [], True)
|
talking to Kent, leave HPOA out of this change.
|
diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb
index <HASH>..<HASH> 100644
--- a/omnibus_overrides.rb
+++ b/omnibus_overrides.rb
@@ -14,7 +14,7 @@ override "libyaml", version: "0.1.7"
override "makedepend", version: "1.0.5"
override "ncurses", version: "5.9"
override "pkg-config-lite", version: "0.28-1"
-override "ruby", version: "2.4.3"
+override "ruby", version: "2.5.0"
override "ruby-windows-devkit-bash", version: "3.1.23-4-msys-1.0.18"
override "util-macros", version: "1.19.0"
override "xproto", version: "7.0.28"
|
Bump to ruby <I>
|
diff --git a/services-discovery/src/main/java/io/scalecube/services/discovery/ScalecubeServiceDiscovery.java b/services-discovery/src/main/java/io/scalecube/services/discovery/ScalecubeServiceDiscovery.java
index <HASH>..<HASH> 100644
--- a/services-discovery/src/main/java/io/scalecube/services/discovery/ScalecubeServiceDiscovery.java
+++ b/services-discovery/src/main/java/io/scalecube/services/discovery/ScalecubeServiceDiscovery.java
@@ -122,7 +122,7 @@ public class ScalecubeServiceDiscovery implements ServiceDiscovery {
private void onMemberEvent(MembershipEvent event) {
final Member member = event.member();
- Map<String, String> metadata = Collections.emptyMap();
+ Map<String, String> metadata = null;
if (event.isAdded()) {
metadata = event.newMetadata();
}
@@ -131,7 +131,8 @@ public class ScalecubeServiceDiscovery implements ServiceDiscovery {
}
List<ServiceEndpoint> serviceEndpoints =
- metadata
+ Optional.ofNullable(metadata)
+ .orElse(Collections.emptyMap())
.values()
.stream()
.map(ClusterMetadataDecoder::decodeMetadata)
|
Fixed NPE with metadta during some tests run
|
diff --git a/framework/validators/Validator.php b/framework/validators/Validator.php
index <HASH>..<HASH> 100644
--- a/framework/validators/Validator.php
+++ b/framework/validators/Validator.php
@@ -316,7 +316,21 @@ class Validator extends Component
* Validates a value.
* A validator class can implement this method to support data validation out of the context of a data model.
* @param mixed $value the data value to be validated.
- * @return array|null the error message and the parameters to be inserted into the error message.
+ * @return array|null the error message and the array of parameters to be inserted into the error message.
+ * ```php
+ * if (!$valid) {
+ * return [$this->message, [
+ * 'param1' => $this->param1,
+ * 'formattedLimit' => Yii::$app->formatter->asShortSize($this->getSizeLimit()),
+ * 'mimeTypes' => implode(', ', $this->mimeTypes),
+ * 'param4' => 'etc...',
+ * ]];
+ * }
+ *
+ * return null;
+ * ```
+ * for this example `message` template can contain `{param1}`, `{formattedLimit}`, `{mimeTypes}`, `{param4}`
+ *
* Null should be returned if the data is valid.
* @throws NotSupportedException if the validator does not supporting data validation without a model
*/
|
Added example to validateValue PHPDoc [skip ci] (#<I>)
|
diff --git a/v2/handler.js b/v2/handler.js
index <HASH>..<HASH> 100644
--- a/v2/handler.js
+++ b/v2/handler.js
@@ -51,9 +51,6 @@ var GLOBAL_WRITE_BUFFER = new Buffer(v2.Frame.MaxSize);
module.exports = TChannelV2Handler;
function TChannelV2Handler(options) {
- if (!(this instanceof TChannelV2Handler)) {
- return new TChannelV2Handler(options);
- }
var self = this;
EventEmitter.call(self);
self.errorEvent = self.defineEvent('error');
|
TChannelV2Handler: drop new-less support
|
diff --git a/pmagpy/new_builder.py b/pmagpy/new_builder.py
index <HASH>..<HASH> 100644
--- a/pmagpy/new_builder.py
+++ b/pmagpy/new_builder.py
@@ -1582,7 +1582,7 @@ class MagicDataFrame(object):
def merge_dfs(self, df1):
"""
- Description: takes new calculated data and replaces the corresponding data in self.df with the new input data preserving the most important metadata if they are not otherwise saved.
+ Description: takes new calculated data and replaces the corresponding data in self.df with the new input data preserving the most important metadata if they are not otherwise saved. Note this does not mutate self.df it simply returns the merged dataframe if you want to replace self.df you'll have to do that yourself.
@param: df1 - first DataFrame whose data will preferentially be used.
"""
|
just a small change to merge_dfs documentation I forgot in the last commit
|
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index <HASH>..<HASH> 100644
--- a/test/visitors/test_to_sql.rb
+++ b/test/visitors/test_to_sql.rb
@@ -695,7 +695,7 @@ module Arel
it 'supports #when with two arguments and no #then' do
node = Arel::Nodes::Case.new @table[:name]
- { foo: 1, bar: 0 }.reduce(node) { |node, pair| node.when *pair }
+ { foo: 1, bar: 0 }.reduce(node) { |_node, pair| _node.when(*pair) }
compile(node).must_be_like %{
CASE "users"."name" WHEN 'foo' THEN 1 WHEN 'bar' THEN 0 END
|
Fix warnings from test_to_sql test
|
diff --git a/src/Symfony/Component/Stopwatch/StopwatchEvent.php b/src/Symfony/Component/Stopwatch/StopwatchEvent.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Stopwatch/StopwatchEvent.php
+++ b/src/Symfony/Component/Stopwatch/StopwatchEvent.php
@@ -150,7 +150,7 @@ class StopwatchEvent
/**
* Gets the relative time of the start of the first period.
*
- * @return int The time (in milliseconds)
+ * @return int|float The time (in milliseconds)
*/
public function getStartTime()
{
@@ -160,7 +160,7 @@ class StopwatchEvent
/**
* Gets the relative time of the end of the last period.
*
- * @return int The time (in milliseconds)
+ * @return int|float The time (in milliseconds)
*/
public function getEndTime()
{
@@ -172,7 +172,7 @@ class StopwatchEvent
/**
* Gets the duration of the events (including all periods).
*
- * @return int The duration (in milliseconds)
+ * @return int|float The duration (in milliseconds)
*/
public function getDuration()
{
|
updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a<I>f<I>f<I>e5e<I>c<I>ff
|
diff --git a/packages/gluestick/src/generator/predefined/new.js b/packages/gluestick/src/generator/predefined/new.js
index <HASH>..<HASH> 100644
--- a/packages/gluestick/src/generator/predefined/new.js
+++ b/packages/gluestick/src/generator/predefined/new.js
@@ -34,6 +34,7 @@ const templateNoMatchApp = require('../templates/NoMatchApp')(createTemplate);
const templateReducer = require('../templates/Reducer')(createTemplate);
const templateEntries = require('../templates/entries')(createTemplate);
const templateGluestickPlugins = require('../templates/gluestick.plugins')(createTemplate);
+const templateGluestickHooks = require('../templates/gluestick.hooks')(createTemplate);
const { flowVersion } = require('../constants');
// @TODO use config in new command when PR #571 is merged
@@ -108,6 +109,11 @@ module.exports = (options: GeneratorOptions) => ({
template: templateGluestickPlugins,
},
{
+ path: 'src',
+ filename: 'gluestick.hooks.js',
+ template: templateGluestickHooks,
+ },
+ {
path: 'src/config',
filename: '.Dockerfile',
template: templateDockerfile,
|
add gluestick.hooks.js to new generator
|
diff --git a/server.go b/server.go
index <HASH>..<HASH> 100644
--- a/server.go
+++ b/server.go
@@ -75,17 +75,11 @@ func NewServer(cert, privKey, clientCACert, clientCAKey []byte, laddr string, de
})
privRoute.Request("msg.send", func(ctx *jsonrpc.ReqContext) {
- ctx.Res = ctx.Req.Params
- if ctx.Res == nil {
- ctx.Res = ""
- }
+
})
privRoute.Request("msg.recv", func(ctx *jsonrpc.ReqContext) {
- ctx.Res = ctx.Req.Params
- if ctx.Res == nil {
- ctx.Res = ""
- }
+
})
// privRoute.Middleware(NotFoundHandler()) // 404-like handler
|
clear dummy route handlers
|
diff --git a/controller/types/types.go b/controller/types/types.go
index <HASH>..<HASH> 100644
--- a/controller/types/types.go
+++ b/controller/types/types.go
@@ -28,6 +28,11 @@ type ExpandedFormation struct {
Tags map[string]map[string]string `json:"tags,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
Deleted bool `json:"deleted,omitempty"`
+
+ // DeprecatedImageArtifact is for creating backwards compatible cluster
+ // backups (the restore process used to require the ImageArtifact field
+ // to be set).
+ DeprecatedImageArtifact *Artifact `json:"artifact,omitempty"`
}
type App struct {
diff --git a/pkg/backup/backup.go b/pkg/backup/backup.go
index <HASH>..<HASH> 100644
--- a/pkg/backup/backup.go
+++ b/pkg/backup/backup.go
@@ -115,6 +115,11 @@ func getApps(client controller.Client) (map[string]*ct.ExpandedFormation, error)
App: app,
Release: release,
Processes: formation.Processes,
+
+ // set DeprecatedImageArtifact to support restoring
+ // to old clusters (the URI is overwritten on restore,
+ // but the field is expected to be set)
+ DeprecatedImageArtifact: &ct.Artifact{Type: ct.DeprecatedArtifactTypeDocker},
}
}
return data, nil
|
pkg/backup: Create backwards compatible backups
|
diff --git a/default_reporter.js b/default_reporter.js
index <HASH>..<HASH> 100644
--- a/default_reporter.js
+++ b/default_reporter.js
@@ -94,7 +94,7 @@ module.exports =
console.log('```');
console.log(JSON.stringify(error, null, 2));
console.log('```');
- };
+ }
console.log('\n## Final State:\n');
console.log('```');
diff --git a/tests/error_async.js b/tests/error_async.js
index <HASH>..<HASH> 100644
--- a/tests/error_async.js
+++ b/tests/error_async.js
@@ -16,13 +16,16 @@ module.exports =
},
// terminable function
- function(cb)
+ // function needs to be defined with an argument
+ // to signal that it's async capable
+ // but eslint complaining
+ function(cb) //eslint-disable-line no-unused-vars
{
var id = setTimeout(function()
{
throw new Error('Should be cancelled.');
- cb('will not get here');
+ // cb('will not get here');
}, 1500);
return function terminate()
|
Cleaned up lint errors.
|
diff --git a/test/fixture/interface.js b/test/fixture/interface.js
index <HASH>..<HASH> 100644
--- a/test/fixture/interface.js
+++ b/test/fixture/interface.js
@@ -54,7 +54,7 @@
// When listener is ready start immortal
listener.once('listening', function () {
immortal.start(filename, common.extend(preOptions, options), function (error) {
- if (error) throw error;
+ if (error) return callback(error, null);
});
});
};
@@ -72,7 +72,7 @@
self.pid = object.pid;
// Execute testcase callback
- callback(self);
+ callback(null, self);
});
// Set ready function
|
[test] relay errors to callback
|
diff --git a/sdk/src/classes.js b/sdk/src/classes.js
index <HASH>..<HASH> 100644
--- a/sdk/src/classes.js
+++ b/sdk/src/classes.js
@@ -508,6 +508,6 @@ F2.extend('', {
* }
* });
*/
- loadScripts: function(scripts,inlines,callback){}
+ loadStyles: function(styles,callback){}
}
});
\ No newline at end of file
|
Fixed dup properties, oops
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -4,11 +4,6 @@ install_requirements = ['pytz', 'tzlocal']
version = '2.4.3'
-try:
- import importlib
-except ImportError:
- install_requirements.append('importlib')
-
setup(
name='tasklib',
version=version,
|
Drop importlib from install_requirements
Part of Python since <I>.
|
diff --git a/packages/babel-register/src/node.js b/packages/babel-register/src/node.js
index <HASH>..<HASH> 100644
--- a/packages/babel-register/src/node.js
+++ b/packages/babel-register/src/node.js
@@ -101,7 +101,6 @@ function hookExtensions(exts) {
export function revert() {
if (piratesRevert) piratesRevert();
- delete require.cache[require.resolve(__filename)];
}
register();
diff --git a/packages/babel-register/test/index.js b/packages/babel-register/test/index.js
index <HASH>..<HASH> 100644
--- a/packages/babel-register/test/index.js
+++ b/packages/babel-register/test/index.js
@@ -52,6 +52,7 @@ describe("@babel/register", function() {
function revertRegister() {
if (babelRegister) {
babelRegister.revert();
+ delete require.cache[registerFile];
babelRegister = null;
}
}
|
Leave it to users to clear the require cache if they want to.
|
diff --git a/chunkenc/xor.go b/chunkenc/xor.go
index <HASH>..<HASH> 100644
--- a/chunkenc/xor.go
+++ b/chunkenc/xor.go
@@ -89,7 +89,6 @@ func (c *XORChunk) Appender() (Appender, error) {
}
a := &xorAppender{
- c: c,
b: c.b,
t: it.t,
v: it.val,
@@ -119,7 +118,6 @@ func (c *XORChunk) Iterator() Iterator {
}
type xorAppender struct {
- c *XORChunk
b *bstream
t int64
|
Remove unused field from xorAppender
This field is not used, remove it.
|
diff --git a/js/binance.js b/js/binance.js
index <HASH>..<HASH> 100644
--- a/js/binance.js
+++ b/js/binance.js
@@ -3478,7 +3478,8 @@ module.exports = class binance extends Exchange {
await this.loadMarkets ();
// by default cache the leverage bracket
// it contains useful stuff like the maintenance margin and initial margin for positions
- if ((this.options['leverageBrackets'] === undefined) || (reload)) {
+ const leverageBrackets = this.safeValue (this.options, 'leverageBrackets', {});
+ if ((leverageBrackets === undefined) || (reload)) {
let method = undefined;
const defaultType = this.safeString2 (this.options, 'fetchPositions', 'defaultType', 'future');
const type = this.safeString (params, 'type', defaultType);
|
binance loadLeverageBrackets linting
|
diff --git a/lib/airtable/version.rb b/lib/airtable/version.rb
index <HASH>..<HASH> 100644
--- a/lib/airtable/version.rb
+++ b/lib/airtable/version.rb
@@ -1,3 +1,3 @@
module Airtable
- VERSION = "0.0.1"
+ VERSION = "0.0.2"
end
|
Bump to version <I>
|
diff --git a/app/code/community/Varien/Profiler.php b/app/code/community/Varien/Profiler.php
index <HASH>..<HASH> 100755
--- a/app/code/community/Varien/Profiler.php
+++ b/app/code/community/Varien/Profiler.php
@@ -579,12 +579,12 @@ class Varien_Profiler
public static function getTimers()
{
if (!self::$_timers) {
- self::$_timers = [];
+ self::$_timers = array();
foreach (self::getStackLog() as $stackLogItem) {
$timerName = end($stackLogItem['stack']);
reset($stackLogItem['stack']);
if (!isset(self::$_timers[$timerName])) {
- self::$_timers[$timerName] = [
+ self::$_timers[$timerName] = array(
'start' => false,
'count' => 0,
'sum' => 0,
@@ -592,7 +592,7 @@ class Varien_Profiler
'emalloc' => 0,
'realmem_start' => $stackLogItem['realmem_start'],
'emalloc_start' => 0, //$stackLogItem['emalloc_start']
- ];
+ );
}
self::$_timers[$timerName]['count'] += 1;
self::$_timers[$timerName]['sum'] += $stackLogItem['time_total'];
|
[BUGFIX] Fix compatibility with PHP <I>
|
diff --git a/ut/__init__.py b/ut/__init__.py
index <HASH>..<HASH> 100644
--- a/ut/__init__.py
+++ b/ut/__init__.py
@@ -8,6 +8,7 @@ from hsyncnet import tests as hsyncnet_unit_tests;
from kmeans import tests as kmeans_unit_tests;
from nnet.som import tests as nnet_som_unit_tests;
from nnet.sync import tests as nnet_sync_unit_tests;
+from rock import tests as rock_unit_tests;
from support import tests as support_unit_tests;
from syncnet import tests as syncnet_unit_tests;
@@ -25,6 +26,7 @@ if __name__ == "__main__":
suite.addTests(unittest.TestLoader().loadTestsFromModule(support_unit_tests));
suite.addTests(unittest.TestLoader().loadTestsFromModule(syncnet_unit_tests));
suite.addTests(unittest.TestLoader().loadTestsFromModule(kmeans_unit_tests));
+ suite.addTests(unittest.TestLoader().loadTestsFromModule(rock_unit_tests));
unittest.TextTestRunner(verbosity = 2).run(suite);
\ No newline at end of file
|
The unit-tests for the ROCK have been registered in the ut module
|
diff --git a/src/components/list/QItemWrapper.js b/src/components/list/QItemWrapper.js
index <HASH>..<HASH> 100644
--- a/src/components/list/QItemWrapper.js
+++ b/src/components/list/QItemWrapper.js
@@ -45,7 +45,7 @@ export default {
push(child, h, QItemSide, slot.left, replace, {
icon: cfg.icon,
- color: cfg.iconColor,
+ color: cfg.leftColor,
avatar: cfg.avatar,
letter: cfg.letter,
image: cfg.image
@@ -62,7 +62,7 @@ export default {
push(child, h, QItemSide, slot.right, replace, {
right: true,
icon: cfg.rightIcon,
- color: cfg.rightIconColor,
+ color: cfg.rightColor,
avatar: cfg.rightAvatar,
letter: cfg.rightLetter,
image: cfg.rightImage,
|
feat: Add iconColor and rightIconColor as options to QSelect items #<I>
|
diff --git a/js/slider.js b/js/slider.js
index <HASH>..<HASH> 100644
--- a/js/slider.js
+++ b/js/slider.js
@@ -223,7 +223,7 @@
panning = false;
curr_index = $slider.find('.active').index();
- if (!swipeRight && !swipeLeft) {
+ if (!swipeRight && !swipeLeft || $slides.length <=1) {
// Return to original spot
$curr_slide.velocity({ translateX: 0
}, {duration: 300, queue: false, easing: 'easeOutQuad'});
@@ -318,4 +318,4 @@
$.error( 'Method ' + methodOrOptions + ' does not exist on jQuery.tooltip' );
}
}; // Plugin end
-}( jQuery ));
\ No newline at end of file
+}( jQuery ));
|
Fix for #<I>. If there is a single slide in slider and swipe left or rigth, return to original position
|
diff --git a/core/server/data/migrations/utils.js b/core/server/data/migrations/utils.js
index <HASH>..<HASH> 100644
--- a/core/server/data/migrations/utils.js
+++ b/core/server/data/migrations/utils.js
@@ -178,7 +178,7 @@ function addPermissionToRole(config) {
return;
}
- logging.warn(`Adding permission(${config.permission}) to role(${config.role})`);
+ logging.info(`Adding permission(${config.permission}) to role(${config.role})`);
await connection('permissions_roles').insert({
id: ObjectId().toHexString(),
permission_id: permission.id,
|
Fixed logging level when adding permissions to roles
- `info` should be used here because it's an expected point in the code and
there's nothing to warn about
|
diff --git a/example/appengine_oauth.py b/example/appengine_oauth.py
index <HASH>..<HASH> 100644
--- a/example/appengine_oauth.py
+++ b/example/appengine_oauth.py
@@ -27,7 +27,7 @@ import os
from google.appengine.ext import webapp
from google.appengine.ext import db
from google.appengine.ext.webapp import util
-import oauth2 as oauth
+import oauth2 as oauth # httplib2 is required for this to work on AppEngine
class Client(db.Model):
# oauth_key is the Model's key_name field
|
Added a note about requiring httplib2
|
diff --git a/lib/DirectEditing.js b/lib/DirectEditing.js
index <HASH>..<HASH> 100644
--- a/lib/DirectEditing.js
+++ b/lib/DirectEditing.js
@@ -13,6 +13,8 @@ var TextBox = require('./TextBox');
*/
function DirectEditing(eventBus, canvas) {
+ this._eventBus = eventBus;
+
this._providers = [];
this._textbox = new TextBox({
container: canvas.getContainer(),
@@ -55,12 +57,20 @@ DirectEditing.prototype.cancel = function() {
return;
}
+ this._fire('cancel');
this.close();
};
+DirectEditing.prototype._fire = function(event) {
+ this._eventBus.fire('directEditing.' + event, { active: this._active });
+};
+
DirectEditing.prototype.close = function() {
this._textbox.destroy();
+
+ this._fire('deactivate');
+
this._active = null;
};
@@ -79,6 +89,8 @@ DirectEditing.prototype.complete = function() {
active.provider.update(active.element, text, active.context.text);
}
+ this._fire('complete');
+
this.close();
};
@@ -137,6 +149,8 @@ DirectEditing.prototype.activate = function(element) {
context: context,
provider: provider
};
+
+ this._fire('activate');
}
return !!context;
|
feat(plug-in): fire events during editing operation
|
diff --git a/trix/widgets.py b/trix/widgets.py
index <HASH>..<HASH> 100644
--- a/trix/widgets.py
+++ b/trix/widgets.py
@@ -1,6 +1,7 @@
from __future__ import unicode_literals
from django import forms
from django.contrib.admin import widgets as admin_widgets
+from django.utils.html import format_html
class TrixEditor(forms.Textarea):
@@ -18,7 +19,8 @@ class TrixEditor(forms.Textarea):
param_str = ' '.join('{}="{}"'.format(k, v) for k, v in params.items())
html = super(TrixEditor, self).render(name, value, attrs)
- html += '<p><trix-editor {}></trix-editor></p>'.format(param_str)
+ html = format_html(
+ '{}<p><trix-editor {}></trix-editor></p>', html, param_str)
return html
class Media:
|
use format_html when building widget to mark safe
|
diff --git a/nexus/sites.py b/nexus/sites.py
index <HASH>..<HASH> 100644
--- a/nexus/sites.py
+++ b/nexus/sites.py
@@ -212,13 +212,16 @@ class NexusSite(object):
response["Content-Length"] = len(contents)
return response
- def login(self, request):
+ def login(self, request, form_class=None):
"Login form"
from django.contrib.auth import login as login_
from django.contrib.auth.forms import AuthenticationForm
+ if form_class is None:
+ form_class = AuthenticationForm
+
if request.POST:
- form = AuthenticationForm(request, request.POST)
+ form = form_class(request, request.POST)
if form.is_valid():
login_(request, form.get_user())
request.session.save()
@@ -226,7 +229,7 @@ class NexusSite(object):
else:
request.session.set_test_cookie()
else:
- form = AuthenticationForm(request)
+ form = form_class(request)
request.session.set_test_cookie()
return self.render_to_response('nexus/login.html', {
|
Allow the form_class used by NexusSite to be overriden by a subclass.
|
diff --git a/src/Carbon/Lang/et.php b/src/Carbon/Lang/et.php
index <HASH>..<HASH> 100644
--- a/src/Carbon/Lang/et.php
+++ b/src/Carbon/Lang/et.php
@@ -30,6 +30,7 @@
* - Zahhar Kirillov
* - João Magalhães
* - Ingmar
+ * - Illimar Tambek
*/
return [
'year' => ':count aasta|:count aastat',
@@ -68,10 +69,10 @@ return [
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
- 'L' => 'DD/MM/YYYY',
- 'LL' => 'DD. MMMM YYYY',
- 'LLL' => 'DD. MMMM YYYY HH:mm',
- 'LLLL' => 'dddd, DD. MMMM YYYY HH:mm',
+ 'L' => 'DD.MM.YYYY',
+ 'LL' => 'D. MMMM YYYY',
+ 'LLL' => 'D. MMMM YYYY HH:mm',
+ 'LLLL' => 'dddd, D. MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[täna] LT',
|
Fix estonian date formats based on CLDR data
|
diff --git a/js/coinmarketcap.js b/js/coinmarketcap.js
index <HASH>..<HASH> 100644
--- a/js/coinmarketcap.js
+++ b/js/coinmarketcap.js
@@ -16,16 +16,16 @@ module.exports = class coinmarketcap extends Exchange {
'rateLimit': 10000,
'version': 'v1',
'countries': 'US',
- 'hasCORS': true,
- 'hasPrivateAPI': false,
- 'hasCreateOrder': false,
- 'hasCancelOrder': false,
- 'hasFetchBalance': false,
- 'hasFetchOrderBook': false,
- 'hasFetchTrades': false,
- 'hasFetchTickers': true,
- 'hasFetchCurrencies': true,
'has': {
+ 'CORS': true,
+ 'privateAPI': false,
+ 'createOrder': false,
+ 'cancelOrder': false,
+ 'fetchBalance': false,
+ 'fetchOrderBook': false,
+ 'fetchTrades': false,
+ 'fetchTickers': true,
+ 'fetchCurrencies': true,
'fetchCurrencies': true,
},
'urls': {
|
removed obsolete metainfo interface in coinmarketcap.js
|
diff --git a/salt/utils/schema.py b/salt/utils/schema.py
index <HASH>..<HASH> 100644
--- a/salt/utils/schema.py
+++ b/salt/utils/schema.py
@@ -558,8 +558,9 @@ class Schema(six.with_metaclass(SchemaMeta, object)):
properties.update(serialized_section['properties'])
if 'x-ordering' in serialized_section:
ordering.extend(serialized_section['x-ordering'])
- if 'required' in serialized:
+ if 'required' in serialized_section:
required.extend(serialized_section['required'])
+ skip_order = True
else:
# Store it as a configuration section
properties[name] = serialized_section
@@ -568,7 +569,8 @@ class Schema(six.with_metaclass(SchemaMeta, object)):
config = cls._items[name]
# Handle the configuration items defined in the class instance
if config.__flatten__ is True:
- after_items_update.update(config.serialize())
+ serialized_config = config.serialize()
+ after_items_update.update(serialized_config)
skip_order = True
else:
properties[name] = config.serialize()
|
Fix missing required entries when flattening Schemas
|
diff --git a/test/test_log.rb b/test/test_log.rb
index <HASH>..<HASH> 100644
--- a/test/test_log.rb
+++ b/test/test_log.rb
@@ -12,7 +12,7 @@ class LogTest < Test::Unit::TestCase
FileUtils.rm_rf(TMP_DIR)
FileUtils.mkdir_p(TMP_DIR)
@log_device = Fluent::Test::DummyLogDevice.new
- @timestamp = Time.parse("2016-04-21 11:58:41 +0900")
+ @timestamp = Time.parse("2016-04-21 02:58:41 +0000")
@timestamp_str = @timestamp.strftime("%Y-%m-%d %H:%M:%S %z")
Timecop.freeze(@timestamp)
end
@@ -540,7 +540,7 @@ end
class PluginLoggerTest < Test::Unit::TestCase
def setup
@log_device = Fluent::Test::DummyLogDevice.new
- @timestamp = Time.parse("2016-04-21 11:58:41 +0900")
+ @timestamp = Time.parse("2016-04-21 02:58:41 +0000")
@timestamp_str = @timestamp.strftime("%Y-%m-%d %H:%M:%S %z")
Timecop.freeze(@timestamp)
dl_opts = {}
|
test_log.rb: use utc timezone for original timestamp
|
diff --git a/packages/jsdoc2spec/src/cli.js b/packages/jsdoc2spec/src/cli.js
index <HASH>..<HASH> 100755
--- a/packages/jsdoc2spec/src/cli.js
+++ b/packages/jsdoc2spec/src/cli.js
@@ -99,7 +99,7 @@ const runWithJSDoc = (files) => {
const temp = path.join(__dirname, 'temp.conf.json');
fs.writeFileSync(temp, JSON.stringify(cfg, null, 2));
try {
- s = cp.execSync('jsdoc -c ./temp.conf.json -p -X', { cwd: __dirname });
+ s = cp.execSync('npx jsdoc -c ./temp.conf.json -p -X', { cwd: __dirname });
} finally {
fs.unlinkSync(temp);
}
|
fix: fix jsdoc runner to use npx
|
diff --git a/source/Internal/ServiceFactory/FacadeServiceFactory.php b/source/Internal/ServiceFactory/FacadeServiceFactory.php
index <HASH>..<HASH> 100644
--- a/source/Internal/ServiceFactory/FacadeServiceFactory.php
+++ b/source/Internal/ServiceFactory/FacadeServiceFactory.php
@@ -32,7 +32,7 @@ class FacadeServiceFactory
/**
* FacadeServiceFactory constructor.
*/
- public function __construct()
+ protected function __construct()
{
}
|
OXDEV-<I> Protected FacadeServiceFactory constructor
|
diff --git a/lib/facebook_ads/base.rb b/lib/facebook_ads/base.rb
index <HASH>..<HASH> 100644
--- a/lib/facebook_ads/base.rb
+++ b/lib/facebook_ads/base.rb
@@ -11,7 +11,9 @@ module FacebookAds
get!("/#{id}", objectify: true)
end
- # HTTMultiParty wrappers
+ protected
+
+ # HTTMultiParty wrappers.
def get!(path, query: {}, objectify: false, fields: true)
query = query.merge(access_token: FacebookAds.access_token)
@@ -38,6 +40,8 @@ module FacebookAds
response = parse(response, objectify: false)
end
+ # Pagination helper.
+
def paginate!(path, query: {})
response = get!(path, query: query)
data = response['data'].present? ? response['data'] : []
@@ -76,17 +80,6 @@ module FacebookAds
end
end
- def before(*names)
- names.each do |name|
- m = instance_method(name)
-
- define_method(name) do |*args, &block|
- yield
- m.bind(self).(*args, &block)
- end
- end
- end
-
end
attr_accessor :changes
|
The HTTMultiParty wrappers should be protected methods.
|
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/relation/calculations.rb
+++ b/activerecord/lib/active_record/relation/calculations.rb
@@ -333,7 +333,7 @@ module ActiveRecord
def select_for_count
if @select_values.present?
select = @select_values.join(", ")
- select if select !~ /(,|\*)/
+ select if select !~ /[,*]/
end
end
diff --git a/railties/lib/rails/generators/generated_attribute.rb b/railties/lib/rails/generators/generated_attribute.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/generators/generated_attribute.rb
+++ b/railties/lib/rails/generators/generated_attribute.rb
@@ -32,7 +32,7 @@ module Rails
case type
when /(string|text|binary|integer)\{(\d+)\}/
return $1, :limit => $2.to_i
- when /decimal\{(\d+)(,|\.|\-)(\d+)\}/
+ when /decimal\{(\d+)[,.-](\d+)\}/
return :decimal, :precision => $1.to_i, :scale => $3.to_i
else
return type, {}
|
rewrites a couple of alternations in regexps as character classes
Character classes are the specific regexp construct
to express alternation of individual characters.
|
diff --git a/src/Knp/FriendlyContexts/Extension.php b/src/Knp/FriendlyContexts/Extension.php
index <HASH>..<HASH> 100644
--- a/src/Knp/FriendlyContexts/Extension.php
+++ b/src/Knp/FriendlyContexts/Extension.php
@@ -34,7 +34,7 @@ class Extension implements ExtensionInterface
));
}
- $config['api']['base_url'];
+ $config['api']['base_url'] = $container->getParameter('mink.base_url');
}
$container->setParameter('api.base_url', $config['api']['base_url']);
|
Fix a missing statement ... youps
|
diff --git a/command/build_ext.py b/command/build_ext.py
index <HASH>..<HASH> 100644
--- a/command/build_ext.py
+++ b/command/build_ext.py
@@ -8,6 +8,7 @@ import sys, os, re
from distutils.core import Command
from distutils.errors import *
from distutils.sysconfig import customize_compiler, get_python_version
+from distutils.sysconfig import get_config_h_filename
from distutils.dep_util import newer_group
from distutils.extension import Extension
from distutils.util import get_platform
@@ -196,7 +197,10 @@ class build_ext(Command):
# Append the source distribution include and library directories,
# this allows distutils on windows to work in the source tree
- self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC'))
+ self.include_dirs.append(os.path.dirname(get_config_h_filename()))
+ _sys_home = getattr(sys, '_home', None)
+ if _sys_home:
+ self.library_dirs.append(_sys_home)
if MSVC_VERSION >= 9:
# Use the .lib files for the correct architecture
if self.plat_name == 'win32':
|
Closes #<I>: Corrected computation of include locations for source builds on Windows. Thanks to Richard Oudkerk for the bug report and patch.
|
diff --git a/lib/execjs/external_runtime.rb b/lib/execjs/external_runtime.rb
index <HASH>..<HASH> 100644
--- a/lib/execjs/external_runtime.rb
+++ b/lib/execjs/external_runtime.rb
@@ -85,21 +85,19 @@ module ExecJS
end
end
- if MultiJson.respond_to?(:load)
+ if MultiJson.respond_to?(:dump)
def json_decode(obj)
MultiJson.load(obj)
end
- else
- def json_decode(obj)
- MultiJson.decode(obj)
- end
- end
- if MultiJson.respond_to?(:dump)
def json_encode(obj)
MultiJson.dump(obj)
end
else
+ def json_decode(obj)
+ MultiJson.decode(obj)
+ end
+
def json_encode(obj)
MultiJson.encode(obj)
end
|
Fix invalid MultiJson API detection (closes #<I>)
`#load` is defined in Kernel and inherited in every object, thus Object.respond_to?(:load) will always return true.
MultiJson switched to load/dump from decode/encode. Thus it's safe to use a single check for both encoding and decoding methods.
|
diff --git a/lib/cfndsl.rb b/lib/cfndsl.rb
index <HASH>..<HASH> 100644
--- a/lib/cfndsl.rb
+++ b/lib/cfndsl.rb
@@ -18,8 +18,7 @@ def CloudFormation(&block)
x.declare(&block)
invalid_references = x.checkRefs()
if( invalid_references ) then
- puts invalid_references.join("\n");
- exit(-1)
+ $stderr.puts invalid_references.join("\n");
elsif( CfnDsl::Errors.errors? ) then
CfnDsl::Errors.report
else
|
Don't exit - write error to STDERR
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ from deploy import get_version
setup(
- name='configlib',
+ name='pyconfiglib',
version=get_version(),
packages=['configlib'],
url='https://github.com/ddorn/configlib',
|
changed name for real pypi
|
diff --git a/src/Common/Model/Base.php b/src/Common/Model/Base.php
index <HASH>..<HASH> 100644
--- a/src/Common/Model/Base.php
+++ b/src/Common/Model/Base.php
@@ -1526,8 +1526,8 @@ abstract class Base
$aKey = array_filter([
strtoupper($sColumn),
- json_encode($mValue),
- $aData !== null ? md5(json_encode($aData)) : null,
+ serialize($mValue),
+ $aData !== null ? md5(serialize($aData)) : null,
]);
return implode(':', $aKey);
|
Using serialize for cache key in model base
|
diff --git a/lib/weblib.php b/lib/weblib.php
index <HASH>..<HASH> 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -1473,7 +1473,7 @@ function format_string($string, $striplinks=true, $courseid=NULL ) {
// First replace all ampersands not followed by html entity code
$string = preg_replace("/\&(?![a-zA-Z0-9#]{1,8};)/", "&", $string);
- if (!empty($CFG->filterall)) {
+ if (!empty($CFG->filterall) && $CFG->version >= 2009040600) { // Avoid errors during the upgrade to the new system.
$context = get_context_instance(CONTEXT_SYSTEM); // TODO change, once we have $PAGE->context.
$string = filter_manager::instance()->filter_string($string, $context, $courseid);
}
|
filters: MDL-<I> fix upgrade problem when filterall is on. Thanks Nico for finding.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.