diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/pmag_menu_dialogs.py b/pmag_menu_dialogs.py
index <HASH>..<HASH> 100755
--- a/pmag_menu_dialogs.py
+++ b/pmag_menu_dialogs.py
@@ -1984,6 +1984,7 @@ class PlotFrame(wx.Frame):
def on_save(self, event):
plt.savefig(self.figname)
+ plt.clf() # clear figure
dir_path, figname = os.path.split(self.figname)
if not dir_path:
dir_path = os.getcwd()
@@ -1996,6 +1997,7 @@ class PlotFrame(wx.Frame):
dlg = wx.MessageDialog(self, "Are you sure you want to delete this plot?", "Not so fast", style=wx.YES_NO|wx.NO_DEFAULT|wx.ICON_EXCLAMATION)
response = dlg.ShowModal()
if response == wx.ID_YES:
+ plt.clf() # clear figure
dlg.Destroy()
self.Destroy()
|
add clf() to PlotFrame to make sure each plot is unique
|
diff --git a/tests/test_dates.py b/tests/test_dates.py
index <HASH>..<HASH> 100644
--- a/tests/test_dates.py
+++ b/tests/test_dates.py
@@ -15,6 +15,21 @@ def test_date_rounding():
assert chart.date == '1996-08-03'
+def test_previous_next():
+ """Checks that the date, previousDate, and nextDate attributes are parsed
+ from the HTML, not computed. Specifically, we shouldn't assume charts are
+ always published seven days apart, since (as this example demonstrates)
+ this is not true.
+ """
+ chart = billboard.ChartData('hot-100', date='1962-01-06')
+ assert chart.date == '1962-01-06'
+ assert chart.previousDate == '1961-12-25'
+
+ chart = billboard.ChartData('hot-100', date='1961-12-25')
+ assert chart.date == '1961-12-25'
+ assert chart.nextDate == '1962-01-06'
+
+
def test_datetime_date():
"""Checks that ChartData correctly handles datetime objects as the
date parameter.
|
Test that date attributes are parsed, not computed
Currently failing. I brought this example up in #<I>.
|
diff --git a/packages/xod-client/src/project/selectors.js b/packages/xod-client/src/project/selectors.js
index <HASH>..<HASH> 100644
--- a/packages/xod-client/src/project/selectors.js
+++ b/packages/xod-client/src/project/selectors.js
@@ -352,6 +352,7 @@ export const getPatchSearchIndex = createSelector(
R.reject(
R.anyPass([
isPatchDeadTerminal,
+ XP.isUtilityPatch,
XP.isDeprecatedPatch,
patchEqualsToCurPatchPath(maybeCurPatchPath),
])
|
feat(xod-client): do not show utility patches from suggester
|
diff --git a/ethrpc/packages.go b/ethrpc/packages.go
index <HASH>..<HASH> 100644
--- a/ethrpc/packages.go
+++ b/ethrpc/packages.go
@@ -4,7 +4,8 @@ import (
"encoding/json"
"errors"
"github.com/ethereum/eth-go/ethpub"
- _ "log"
+ "github.com/ethereum/eth-go/ethutil"
+ "math/big"
)
type EthereumApi struct {
@@ -173,7 +174,10 @@ func (p *EthereumApi) GetStorageAt(args *GetStorageArgs, reply *string) error {
return err
}
state := p.ethp.GetStateObject(args.Address)
- value := state.GetStorage(args.Key)
+ // Convert the incoming string (which is a bigint) into hex
+ i, _ := new(big.Int).SetString(args.Key, 10)
+ hx := ethutil.Hex(i.Bytes())
+ value := state.GetStorage(hx)
*reply = NewSuccessRes(GetStorageAtRes{Address: args.Address, Key: args.Key, Value: value})
return nil
}
|
Assume arguments are supplied as strings to the rpc interface
|
diff --git a/src/Libraries/File/File.php b/src/Libraries/File/File.php
index <HASH>..<HASH> 100644
--- a/src/Libraries/File/File.php
+++ b/src/Libraries/File/File.php
@@ -17,8 +17,6 @@ namespace Quantum\Libraries\File;
/**
* File class
*
- * Initialize the database
- *
* @package Quantum
* @subpackage Libraries.File
* @category Libraries
diff --git a/src/Libraries/Validation/Validation.php b/src/Libraries/Validation/Validation.php
index <HASH>..<HASH> 100644
--- a/src/Libraries/Validation/Validation.php
+++ b/src/Libraries/Validation/Validation.php
@@ -19,8 +19,6 @@ use GUMP;
/**
* Validation class
*
- * Initialize the database
- *
* @package Quantum
* @subpackage Libraries.Validation
* @category Libraries
|
Removing incorrect comments from doc block
|
diff --git a/core/src/main/java/org/bitcoinj/core/Block.java b/core/src/main/java/org/bitcoinj/core/Block.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/bitcoinj/core/Block.java
+++ b/core/src/main/java/org/bitcoinj/core/Block.java
@@ -180,7 +180,7 @@ public class Block extends Message {
hash = null;
}
- private void parseHeader() throws ProtocolException {
+ protected void parseHeader() throws ProtocolException {
if (headerParsed)
return;
@@ -198,7 +198,7 @@ public class Block extends Message {
headerBytesValid = parseRetain;
}
- private void parseTransactions() throws ProtocolException {
+ protected void parseTransactions() throws ProtocolException {
if (transactionsParsed)
return;
@@ -561,6 +561,12 @@ public class Block extends Message {
public Block cloneAsHeader() {
maybeParseHeader();
Block block = new Block(params);
+ copyBitcoinHeaderTo(block);
+ return block;
+ }
+
+ /** Copy the block without transactions into the provided empty block. */
+ protected final void copyBitcoinHeaderTo(final Block block) {
block.nonce = nonce;
block.prevBlockHash = prevBlockHash;
block.merkleRoot = getMerkleRoot();
@@ -569,7 +575,6 @@ public class Block extends Message {
block.difficultyTarget = difficultyTarget;
block.transactions = null;
block.hash = getHash();
- return block;
}
/**
|
Block.parseHeader() and Block.parseTransactions() are now protected, so they can be called from subclasses.
|
diff --git a/NavigationReactNative/sample/twitter/Home.js b/NavigationReactNative/sample/twitter/Home.js
index <HASH>..<HASH> 100644
--- a/NavigationReactNative/sample/twitter/Home.js
+++ b/NavigationReactNative/sample/twitter/Home.js
@@ -18,7 +18,6 @@ const styles = StyleSheet.create({
paddingTop: 40,
paddingLeft: 60,
paddingBottom: 20,
- marginBottom: 10,
borderBottomWidth: 2,
borderColor: '#ccd6dd',
},
@@ -28,5 +27,6 @@ const styles = StyleSheet.create({
view: {
paddingLeft: 10,
paddingRight: 10,
+ paddingTop: 10,
},
});
|
Removed whitespace gap at top on scroll
|
diff --git a/lib/active_admin.rb b/lib/active_admin.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin.rb
+++ b/lib/active_admin.rb
@@ -1,4 +1,6 @@
-require 'active_support/core_ext/class/attribute' # needed for Ransack
+require 'active_support/core_ext'
+require 'set'
+
require 'ransack'
require 'ransack_ext'
require 'bourbon'
|
clearly require dependencies
activerecord-hackery/ransack#<I>
|
diff --git a/nodes/api_current-state/api_current-state.js b/nodes/api_current-state/api_current-state.js
index <HASH>..<HASH> 100644
--- a/nodes/api_current-state/api_current-state.js
+++ b/nodes/api_current-state/api_current-state.js
@@ -59,7 +59,8 @@ module.exports = function(RED) {
} else {
RED.util.setMessageProperty(message, this.nodeConfig.property, currentState);
}
-
+ var prettyDate = new Date().toLocaleDateString("en-US",{month: 'short', day: 'numeric', hour12: false, hour: 'numeric', minute: 'numeric'});
+ this.status({fill:"green",shape:"dot",text:`${currentState.state} at: ${prettyDate}`});
this.node.send(message);
}
}
|
re-add success status to api-call-service
|
diff --git a/src/PHPUnit/PHPMatcherConstraint.php b/src/PHPUnit/PHPMatcherConstraint.php
index <HASH>..<HASH> 100644
--- a/src/PHPUnit/PHPMatcherConstraint.php
+++ b/src/PHPUnit/PHPMatcherConstraint.php
@@ -16,7 +16,9 @@ final class PHPMatcherConstraint extends Constraint
public function __construct(string $pattern)
{
- parent::__construct();
+ if (\method_exists(Constraint::class, '__construct')) {
+ parent::__construct();
+ }
$this->pattern = $pattern;
$this->matcher = $this->createMatcher();
|
Fix PHPUnit 8 BC break by conditionally call Constraint constructor (#<I>)
|
diff --git a/lib/resque/worker.rb b/lib/resque/worker.rb
index <HASH>..<HASH> 100644
--- a/lib/resque/worker.rb
+++ b/lib/resque/worker.rb
@@ -16,6 +16,12 @@ module Resque
WORKER_HEARTBEAT_KEY = "workers:heartbeat"
+ @@all_heartbeat_threads = []
+ def self.kill_all_heartbeat_threads
+ @@all_heartbeat_threads.each(&:kill)
+ @@all_heartbeat_threads = []
+ end
+
def redis
Resque.redis
end
@@ -527,6 +533,8 @@ module Resque
heartbeat!
end
end
+
+ @@all_heartbeat_threads << @heart
end
# Kills the forked child immediately with minimal remorse. The job it
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -46,7 +46,6 @@ MiniTest::Unit.after_tests do
end
module MiniTest::Unit::LifecycleHooks
-
def before_setup
reset_logger
Resque.redis.flushall
@@ -55,6 +54,9 @@ module MiniTest::Unit::LifecycleHooks
Resque.after_fork = nil
end
+ def after_teardown
+ Resque::Worker.kill_all_heartbeat_threads
+ end
end
if ENV.key? 'RESQUE_DISTRIBUTED'
|
Kill all heartbeat threads after each test run
|
diff --git a/celeryconfig.py b/celeryconfig.py
index <HASH>..<HASH> 100644
--- a/celeryconfig.py
+++ b/celeryconfig.py
@@ -89,3 +89,8 @@ CELERY_IMPORTS = get_core_modules(engine) + [
]
os.environ["DJANGO_SETTINGS_MODULE"] = "openquake.engine.settings"
+
+try:
+ from openquake.engine.utils import tasks
+except ImportError: # circular import with celery 2, only affecting nose
+ pass
|
Fixed a bug affecting celery 2 only when nose is used to run the tests
Former-commit-id: <I>ce<I>fb<I>b<I>be3f3df<I>d<I>ac1e5
|
diff --git a/test/13-integration-tests.js b/test/13-integration-tests.js
index <HASH>..<HASH> 100644
--- a/test/13-integration-tests.js
+++ b/test/13-integration-tests.js
@@ -1186,7 +1186,9 @@ describe('Integration tests', () => {
err.message.indexOf('You do not have permission to publish') > -1 ||
err.message.indexOf('auth required for publishing') > -1 ||
err.message.indexOf('operation not permitted') > -1 ||
- err.message.indexOf('You must be logged in to publish packages') > -1
+ err.message.indexOf('You must be logged in to publish packages') > -1 ||
+ //https://github.com/npm/cli/issues/1637
+ err.message.indexOf('npm ERR! 404 Not Found - PUT https://registry.npmjs.org/testing-repo - Not found') > -1
);
}));
|
fix 'Should allow publishing with special flag'
|
diff --git a/src/textlint-rule-no-nfd.js b/src/textlint-rule-no-nfd.js
index <HASH>..<HASH> 100644
--- a/src/textlint-rule-no-nfd.js
+++ b/src/textlint-rule-no-nfd.js
@@ -13,6 +13,9 @@ function reporter(context) {
}
const text = getSource(node);
matchCaptureGroupAll(text, /([\u309b\u309c\u309a\u3099])/g).forEach(({index}) => {
+ if (index === 0) {
+ return;
+ }
// \u309b\u309c => \u309a\u3099
const dakutenChars = text.slice(index - 1, index + 1);
const nfdlized = dakutenChars.replace("\u309B", "\u3099").replace("\u309C", "\u309A")
|
fix(rule): avoid -index
|
diff --git a/lib/type.js b/lib/type.js
index <HASH>..<HASH> 100644
--- a/lib/type.js
+++ b/lib/type.js
@@ -114,7 +114,11 @@ function Type (type) {
if ('CString' == type.name) {
rtn = type.ffi_type = bindings.FFI_TYPES.pointer
} else {
- rtn = type.ffi_type = bindings.FFI_TYPES[type.name]
+ var cur = type
+ while (!rtn && cur) {
+ rtn = cur.ffi_type = bindings.FFI_TYPES[cur.name]
+ cur = Object.getPrototypeOf(cur)
+ }
}
}
diff --git a/test/types.js b/test/types.js
index <HASH>..<HASH> 100644
--- a/test/types.js
+++ b/test/types.js
@@ -33,6 +33,15 @@ describe('types', function () {
assert(Buffer.isBuffer(ffi_type))
})
+ it('should match a valid `ffi_type` for `ulong` without a cached value', function () {
+ // simulate a ref type without a "ffi_type" property set
+ var type = Object.create(ref.types.ulong)
+ type.ffi_type = undefined
+
+ var ffi_type = ffi.ffiType(type)
+ assert(Buffer.isBuffer(ffi_type))
+ })
+
})
})
|
type: recurse up the prototype chain to type to find the `ffi_type` to use
Makes the "long" and "ulong" types work.
|
diff --git a/hotdoc/core/tree.py b/hotdoc/core/tree.py
index <HASH>..<HASH> 100644
--- a/hotdoc/core/tree.py
+++ b/hotdoc/core/tree.py
@@ -87,8 +87,8 @@ Logger.register_warning_code('markdown-bad-link', HotdocSourceException)
class Page:
"Banana banana"
meta_schema = {Optional('title'): And(str, len),
- Optional('short-description'): And(str, len),
- Optional('description'): And(str, len),
+ Optional('short-description'): And(str),
+ Optional('description'): And(str),
Optional('render-subpages'): bool,
Optional('auto-sort'): bool,
Optional('full-width'): bool,
|
We should not force short-description and description to be none empty
|
diff --git a/mama_cas/mixins.py b/mama_cas/mixins.py
index <HASH>..<HASH> 100644
--- a/mama_cas/mixins.py
+++ b/mama_cas/mixins.py
@@ -12,7 +12,7 @@ from django.views.decorators.cache import never_cache
from mama_cas.models import ServiceTicket
from mama_cas.models import ProxyTicket
from mama_cas.models import ProxyGrantingTicket
-from mama_cas.exceptions import InvalidTicket
+from mama_cas.exceptions import InvalidTicketSpec
from mama_cas.exceptions import ValidationError
from mama_cas.utils import get_callable
@@ -67,8 +67,8 @@ class ValidateTicketMixin(object):
logger.debug("Service validation request received for %s" % ticket)
# Check for proxy tickets passed to /serviceValidate
if ticket and ticket.startswith(ProxyTicket.TICKET_PREFIX):
- e = InvalidTicket('Proxy tickets cannot be validated'
- ' with /serviceValidate')
+ e = InvalidTicketSpec('Proxy tickets cannot be validated'
+ ' with /serviceValidate')
logger.warning("%s %s" % (e.code, e))
return None, None, e
|
Use more specific error for wrong ticket type
|
diff --git a/pyrogram/connection/transport/tcp/__init__.py b/pyrogram/connection/transport/tcp/__init__.py
index <HASH>..<HASH> 100644
--- a/pyrogram/connection/transport/tcp/__init__.py
+++ b/pyrogram/connection/transport/tcp/__init__.py
@@ -17,5 +17,6 @@
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
from .tcp_abridged import TCPAbridged
+from .tcp_abridged_o import TCPAbridgedO
from .tcp_full import TCPFull
from .tcp_intermediate import TCPIntermediate
|
Make TCPAbridgedO importable
|
diff --git a/src/User/UserIdentityDetails.php b/src/User/UserIdentityDetails.php
index <HASH>..<HASH> 100644
--- a/src/User/UserIdentityDetails.php
+++ b/src/User/UserIdentityDetails.php
@@ -64,7 +64,7 @@ class UserIdentityDetails implements \JsonSerializable
/**
* @return array
*/
- function jsonSerialize()
+ public function jsonSerialize()
{
return [
'uuid' => $this->userId->toNative(),
|
III-<I> Fixed coding standards.
|
diff --git a/tests/test_pygdk3.py b/tests/test_pygdk3.py
index <HASH>..<HASH> 100644
--- a/tests/test_pygdk3.py
+++ b/tests/test_pygdk3.py
@@ -1,14 +1,18 @@
+from pyscreenshot.util import use_x_display
+
from ref import backend_to_check, check_import
ok = False
if check_import("gi"):
- import gi
- # Arch: AttributeError: module 'gi' has no attribute 'require_version'
- try:
- gi.require_version
- ok = True
- except AttributeError:
- pass
+ if use_x_display():
+ import gi
+
+ # Arch: AttributeError: module 'gi' has no attribute 'require_version'
+ try:
+ gi.require_version
+ ok = True
+ except AttributeError:
+ pass
if ok:
def test_pygdk3():
|
test: check gdk3 import
|
diff --git a/src/pylast/__init__.py b/src/pylast/__init__.py
index <HASH>..<HASH> 100644
--- a/src/pylast/__init__.py
+++ b/src/pylast/__init__.py
@@ -932,7 +932,15 @@ class _Request:
raise NetworkError(self.network, e)
try:
- response_text = _unicode(conn.getresponse().read())
+ response = conn.getresponse()
+ if response.status in [500, 502, 503, 504]:
+ raise WSError(
+ self.network,
+ response.status,
+ "Connection to the API failed with HTTP code "
+ + str(response.status),
+ )
+ response_text = _unicode(response.read())
except Exception as e:
raise MalformedResponseError(self.network, e)
|
Improve handling of error responses from the API
|
diff --git a/tests/Feature/UIWithCustomAssetConfigurationTest.php b/tests/Feature/UIWithCustomAssetConfigurationTest.php
index <HASH>..<HASH> 100644
--- a/tests/Feature/UIWithCustomAssetConfigurationTest.php
+++ b/tests/Feature/UIWithCustomAssetConfigurationTest.php
@@ -18,7 +18,7 @@ class UIWithCustomAssetConfigurationTest extends TestCase
$valuesInOrder = ['<head>', asset('/headerscript.js'), '</head>'];
if (method_exists($response, 'assertSeeInOrder')) {
- $response->assertSeeInOrder($valuesInOrder);
+ $response->assertSeeInOrder($valuesInOrder, false);
} else {
$this->assertThat($valuesInOrder, new SeeInOrder($response->getContent()));
}
@@ -35,7 +35,7 @@ class UIWithCustomAssetConfigurationTest extends TestCase
$valuesInOrder = ['</head>', asset('/footerstyle.css'), '</body>'];
if (method_exists($response, 'assertSeeInOrder')) {
- $response->assertSeeInOrder($valuesInOrder);
+ $response->assertSeeInOrder($valuesInOrder, false);
} else {
$this->assertThat($valuesInOrder, new SeeInOrder($response->getContent()));
}
|
Fixed L7 `assertSee` test compatibility (prevent from unwanted escape)
|
diff --git a/modules/ViewDataTable.php b/modules/ViewDataTable.php
index <HASH>..<HASH> 100644
--- a/modules/ViewDataTable.php
+++ b/modules/ViewDataTable.php
@@ -214,13 +214,13 @@ abstract class Piwik_ViewDataTable
protected function getUniqIdTable()
{
-
+ $uniqIdTable = '';
// if we request a subDataTable the $this->currentControllerAction DIV ID is already there in the page
// we make the DIV ID really unique by appending the ID of the subtable requested
- if( $this->idSubtable !== false
- && $this->idSubtable != 0)
+ if( $this->idSubtable != false)
{
- $uniqIdTable .= 'subTable_' . $this->idSubtable;
+ // see also datatable.js (the ID has to match with the html ID created to be replaced by the result of the ajax call)
+ $uniqIdTable = 'subDataTable_' . $this->idSubtable;
}
else
{
|
- fixing bug recently introduced, tables were not ajaxified anymore
git-svn-id: <URL>
|
diff --git a/site/assets/js/app.js b/site/assets/js/app.js
index <HASH>..<HASH> 100644
--- a/site/assets/js/app.js
+++ b/site/assets/js/app.js
@@ -41,7 +41,7 @@ if ($lgInlineContainer) {
rotate: false,
download: false,
slideDelay: 400,
- plugins: [lgZoom, lgFullscreen, lgShare, lgAutoplay, lgThumbnail],
+ plugins: [lgZoom, lgShare, lgAutoplay, lgThumbnail],
appendSubHtmlTo: '.lg-item',
...getResponsiveThumbnailsSettings(),
dynamicEl: [
|
docs(demo): remove fullscreen from inline demo
|
diff --git a/src/Dev/Tasks/MigrateFileTask.php b/src/Dev/Tasks/MigrateFileTask.php
index <HASH>..<HASH> 100644
--- a/src/Dev/Tasks/MigrateFileTask.php
+++ b/src/Dev/Tasks/MigrateFileTask.php
@@ -144,6 +144,8 @@ class MigrateFileTask extends BuildTask
}
}
+ $this->logger->info("Done!");
+
$this->extend('postFileMigration');
}
|
MigrateFileTask now outputs "Done" when it has finished running (#<I>)
|
diff --git a/Metadata/Driver/DoctrineTypeDriver.php b/Metadata/Driver/DoctrineTypeDriver.php
index <HASH>..<HASH> 100644
--- a/Metadata/Driver/DoctrineTypeDriver.php
+++ b/Metadata/Driver/DoctrineTypeDriver.php
@@ -76,7 +76,7 @@ class DoctrineTypeDriver implements DriverInterface
$classMetadata = $this->delegate->loadMetadataForClass($class);
// Abort if the given class is not a mapped entity
- if (!$doctrineMetadata = $this->tryLoadingDoctrineMetadata($class)) {
+ if (!$doctrineMetadata = $this->tryLoadingDoctrineMetadata($class->getName())) {
return $classMetadata;
}
|
Fix incorrect parameter in DoctrineTypeDriver
Reflection class was passed in instead of class name
|
diff --git a/km3pipe/utils/h5extract.py b/km3pipe/utils/h5extract.py
index <HASH>..<HASH> 100644
--- a/km3pipe/utils/h5extract.py
+++ b/km3pipe/utils/h5extract.py
@@ -34,6 +34,19 @@ def main():
args = docopt(__doc__, version=kp.version)
+ default_flags = (
+ "--offline-header",
+ "--event-info",
+ "--offline-hits",
+ "--mc-hits",
+ "--mc-tracks",
+ "--mc-tracks-usr-data",
+ "--reco-tracks",
+ )
+ if not any([args[k] for k in default_flags]):
+ for k in default_flags:
+ args[k] = True
+
outfile = args["-o"]
if outfile is None:
outfile = args["FILENAME"] + ".h5"
|
h5extract everything as default
|
diff --git a/clients/java/src/test/java/com/thoughtworks/selenium/ClientUnitTestSuite.java b/clients/java/src/test/java/com/thoughtworks/selenium/ClientUnitTestSuite.java
index <HASH>..<HASH> 100644
--- a/clients/java/src/test/java/com/thoughtworks/selenium/ClientUnitTestSuite.java
+++ b/clients/java/src/test/java/com/thoughtworks/selenium/ClientUnitTestSuite.java
@@ -1,9 +1,10 @@
package com.thoughtworks.selenium;
import junit.framework.Test;
+import junit.framework.TestCase;
import junit.framework.TestSuite;
-public class ClientUnitTestSuite {
+public class ClientUnitTestSuite extends TestCase {
public static Test suite() {
TestSuite suite = new TestSuite(ClientUnitTestSuite.class.getName());
suite.addTestSuite(CSVTest.class);
|
Stupid Maven bug; suites only get run if they extend TestCase
r<I>
|
diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100755
--- a/manifest.php
+++ b/manifest.php
@@ -29,7 +29,7 @@ return array(
'label' => 'QTI test model',
'description' => 'TAO QTI test implementation',
'license' => 'GPL-2.0',
- 'version' => '16.2.3',
+ 'version' => '16.2.4',
'author' => 'Open Assessment Technologies',
'requires' => array(
'taoTests' => '>=6.5.0',
diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php
index <HASH>..<HASH> 100644
--- a/scripts/update/Updater.php
+++ b/scripts/update/Updater.php
@@ -1611,6 +1611,6 @@ class Updater extends \common_ext_ExtensionUpdater {
$this->setVersion('16.2.0');
}
- $this->skip('16.2.0', '16.2.3');
+ $this->skip('16.2.0', '16.2.4');
}
}
|
Bump to version <I>
|
diff --git a/src/Fcm.php b/src/Fcm.php
index <HASH>..<HASH> 100644
--- a/src/Fcm.php
+++ b/src/Fcm.php
@@ -44,7 +44,7 @@ class Fcm extends Gcm
$json = $result->getBody();
- $this->setFeedback(json_decode($json));
+ $this->setFeedback(json_decode($json, false, 512, JSON_BIGINT_AS_STRING));
} catch (\Exception $e) {
$response = ['success' => false, 'error' => $e->getMessage()];
|
Using JSON_BIGINT_AS_STRING as bitmask to prevent large integers convertion to float type.
Fixes #<I>
|
diff --git a/lib/take2/configuration.rb b/lib/take2/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/take2/configuration.rb
+++ b/lib/take2/configuration.rb
@@ -25,9 +25,8 @@ module Take2
].freeze
@retry_proc = proc {}
@retry_condition_proc = proc { false }
- @time_to_sleep = 3
- @start = @time_to_sleep # TODO: Soft deprecate time to sleep
- @backoff_setup = { type: :constant, start: @start }
+ @time_to_sleep = 0 # TODO: Soft deprecate time to sleep
+ @backoff_setup = { type: :constant, start: 3 }
@backoff_intervals = Backoff.new(*@backoff_setup.values).intervals
# Overwriting the defaults
validate_options(options, &setter)
diff --git a/spec/take2/configuration_spec.rb b/spec/take2/configuration_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/take2/configuration_spec.rb
+++ b/spec/take2/configuration_spec.rb
@@ -30,7 +30,7 @@ RSpec.describe(Take2::Configuration) do
end
it 'has correct default value for time_to_sleep' do
- expect(default.time_to_sleep).to(eql(3))
+ expect(default.time_to_sleep).to(eql(0))
end
it 'has correct default value for backoff_intervals' do
|
support time to sleep only if set manually
|
diff --git a/src/test/java/com/algolia/search/saas/SimpleTest.java b/src/test/java/com/algolia/search/saas/SimpleTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/algolia/search/saas/SimpleTest.java
+++ b/src/test/java/com/algolia/search/saas/SimpleTest.java
@@ -543,7 +543,7 @@ public class SimpleTest {
@Test
public void test34_securedApiKeys() {
- assertEquals("143fec7bef6f16f6aa127a4949948a966816fa154e67a811e516c2549dbe2a8b", APIClient.hmac("my_api_key", "(public,user1)"));
+ assertEquals("1fd74b206c64fb49fdcd7a5f3004356cd3bdc9d9aba8733656443e64daafc417", APIClient.hmac("my_api_key", "(public,user1)"));
String key = client.generateSecuredApiKey("my_api_key", "(public,user1)");
assertEquals(key, APIClient.hmac("my_api_key", "(public,user1)"));
key = client.generateSecuredApiKey("my_api_key", "(public,user1)", "" + 42);
|
Update hmac value in the test
|
diff --git a/src/main/java/org/craftercms/engine/controller/ComponentRenderController.java b/src/main/java/org/craftercms/engine/controller/ComponentRenderController.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/craftercms/engine/controller/ComponentRenderController.java
+++ b/src/main/java/org/craftercms/engine/controller/ComponentRenderController.java
@@ -41,7 +41,7 @@ public class ComponentRenderController {
this.renderComponentViewName = renderComponentViewName;
}
- @RequestMapping(method = RequestMethod.GET)
+ @RequestMapping(method = {RequestMethod.GET, RequestMethod.POST})
protected ModelAndView render(@RequestParam("path") String path) throws Exception {
return new ModelAndView(renderComponentViewName, COMPONENT_PATH_MODEL_NAME, path);
}
|
Controller fix:
* Added support of POST method to ComponentRenderController.
|
diff --git a/tests/conftest.py b/tests/conftest.py
index <HASH>..<HASH> 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -379,8 +379,10 @@ def dummy_mailer():
from smtplib import SMTP
from dallinger.heroku import messages
server = mock.create_autospec(SMTP)
+ orig_server = messages.get_email_server
messages.get_email_server = lambda: server
- return server
+ yield server
+ messages.get_email_server = orig_server
def pytest_addoption(parser):
diff --git a/tests/test_experiment_server.py b/tests/test_experiment_server.py
index <HASH>..<HASH> 100644
--- a/tests/test_experiment_server.py
+++ b/tests/test_experiment_server.py
@@ -336,6 +336,7 @@ class TestHandleError(object):
dummy_mailer.sendmail.assert_called_once()
assert dummy_mailer.sendmail.call_args[0][0] == u'test_error@gmail.com'
+
@pytest.mark.usefixtures('experiment_dir', 'db_session')
class TestWorkerFailed(object):
|
Fix style error and un-monkeypatch fixture.
|
diff --git a/rspec/rspec_helper.rb b/rspec/rspec_helper.rb
index <HASH>..<HASH> 100644
--- a/rspec/rspec_helper.rb
+++ b/rspec/rspec_helper.rb
@@ -1,3 +1,5 @@
-$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib/view_assets')
+RSPEC_ROOT = File.dirname(__FILE__)
+$LOAD_PATH.unshift(RSPEC_ROOT + '/../lib/view_assets')
require 'view_assets'
-include ViewAssets
\ No newline at end of file
+include ViewAssets
+FIXTURE_ROOT = RSPEC_ROOT + '/fixtures'
|
use FIXTURE_ROOT constant to store the path to fixtures
|
diff --git a/DataFixtures/ObjectFactory.php b/DataFixtures/ObjectFactory.php
index <HASH>..<HASH> 100644
--- a/DataFixtures/ObjectFactory.php
+++ b/DataFixtures/ObjectFactory.php
@@ -9,6 +9,7 @@ class ObjectFactory
{
private $manager;
private $className;
+ private $defaultAttributes;
public function __construct(
ReferenceRepository $referenceRepository,
@@ -25,9 +26,11 @@ class ObjectFactory
public function add(array $attributes = array())
{
+ // We do not override $attributes because the reference manipulator will use the first element to generate the reference name
+ $mergedAttributes = array_merge($this->defaultAttributes, $attributes);
$object = new $this->className();
- foreach ($attributes as $attribute => $value) {
+ foreach ($mergedAttributes as $attribute => $value) {
$object->{'set'.ucfirst($attribute)}($value);
}
@@ -40,4 +43,11 @@ class ObjectFactory
return $this;
}
+
+ public function setDefaults(array $attributes = array())
+ {
+ $this->defaultAttributes = $attributes;
+
+ return $this;
+ }
}
|
Added a method to set default values to fixtures
|
diff --git a/aeron-client/src/main/java/uk/co/real_logic/aeron/Publication.java b/aeron-client/src/main/java/uk/co/real_logic/aeron/Publication.java
index <HASH>..<HASH> 100644
--- a/aeron-client/src/main/java/uk/co/real_logic/aeron/Publication.java
+++ b/aeron-client/src/main/java/uk/co/real_logic/aeron/Publication.java
@@ -240,7 +240,14 @@ public class Publication implements AutoCloseable
final int nextIndex = nextPartitionIndex(activeIndex);
logAppenders[nextIndex].defaultHeader().putInt(TERM_ID_FIELD_OFFSET, newTermId, LITTLE_ENDIAN);
- logAppenders[previousPartitionIndex(activeIndex)].statusOrdered(NEEDS_CLEANING);
+
+ final int previousIndex = previousPartitionIndex(activeIndex);
+
+ // Need to advance the term id in case a publication takes an interrupt between reading the active term
+ // and incrementing the tail. This covers the case of interrupt talking over one term in duration.
+ logAppenders[previousIndex].defaultHeader().putInt(TERM_ID_FIELD_OFFSET, newTermId + 1, LITTLE_ENDIAN);
+
+ logAppenders[previousIndex].statusOrdered(NEEDS_CLEANING);
LogBufferDescriptor.activeTermId(logMetaDataBuffer, newTermId);
}
|
[Java] Handel the case of a publisher reading the active term id and then taking an interrupt before doing an increment on the the term tail.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -64,9 +64,13 @@ class bump_version(Command):
args = ['--verbose'] if self.verbose > 1 else []
for k, v in kwargs.items():
- k = "--{}".format(k.replace("_", "-"))
- is_bool = isinstance(v, bool) and v is True
- args.extend([k] if is_bool else [k, str(v)])
+ arg = "--{}".format(k.replace("_", "-"))
+ if isinstance(v, bool):
+ if v is False:
+ continue
+ args.append(arg)
+ else:
+ args.extend([arg, str(v)])
args.append(part)
log.debug(
|
setup.py: fix issue with False boolean options in bump_version command
In the `setup.py release` custom command, when one doesn't pass the -s
option (to GPG sign the git tag), the resulting command-line that is passed
to the bumpversion script contains an invalid '--sign-tags False'
argument.
Boolean options with a False value should be omitted instead.
|
diff --git a/src/FlysystemStreamWrapper.php b/src/FlysystemStreamWrapper.php
index <HASH>..<HASH> 100644
--- a/src/FlysystemStreamWrapper.php
+++ b/src/FlysystemStreamWrapper.php
@@ -384,7 +384,9 @@ class FlysystemStreamWrapper
// as needed in that case. This will be a no-op for php 5.
$this->stream_flush();
- fclose($this->handle);
+ if (is_resource($this->handle)) {
+ fclose($this->handle);
+ }
}
/**
@@ -418,7 +420,9 @@ class FlysystemStreamWrapper
$args = [$this->getTarget(), $this->handle];
$success = $this->invoke($this->getFilesystem(), 'putStream', $args, 'fflush');
- fseek($this->handle, $pos);
+ if (is_resource($this->handle)) {
+ fseek($this->handle, $pos);
+ }
return $success;
}
|
#8 Add resource check on stream_flush and stream_close
|
diff --git a/lib/onebox/engine/amazon_onebox.rb b/lib/onebox/engine/amazon_onebox.rb
index <HASH>..<HASH> 100644
--- a/lib/onebox/engine/amazon_onebox.rb
+++ b/lib/onebox/engine/amazon_onebox.rb
@@ -10,13 +10,13 @@ module Onebox
private
- def extracted_data
+ def data
{
url: @url,
- name: @body.css("html body h1").inner_text,
- image: @body.css("html body #main-image").first["src"],
- description: @body.css("html body #postBodyPS").inner_text,
- price: @body.css("html body .priceLarge").inner_text
+ name: raw.css("html body h1").inner_text,
+ image: raw.css("html body #main-image").first["src"],
+ description: raw.css("html body #postBodyPS").inner_text,
+ price: raw.css("html body .priceLarge").inner_text
}
end
end
|
refactor amazon onebox - data method #<I>
|
diff --git a/src/filters/Select.js b/src/filters/Select.js
index <HASH>..<HASH> 100644
--- a/src/filters/Select.js
+++ b/src/filters/Select.js
@@ -21,10 +21,21 @@ class SelectFilter extends Component {
}
componentDidUpdate(prevProps) {
+ function optionsEquals(options1, options2) {
+ const keys = Object.keys(options1);
+ for(let k in keys) {
+ if(options1[k] !== options2[k]) {
+ return false;
+ }
+ }
+
+ return Object.keys(options1).length === Object.keys(options2).length
+ }
+
let needFilter = false;
if (this.props.defaultValue !== prevProps.defaultValue) {
needFilter = true;
- } else if (this.props.options !== prevProps.options) {
+ } else if (!optionsEquals(this.props.options, prevProps.options)) {
needFilter = true;
}
if (needFilter) {
|
Fix callback condition in Select filter
The filter changed callback will be called less often, and in particular it will not be called when the options object has changed but has the same entries. This should fix issue #<I>
|
diff --git a/lib/transport.js b/lib/transport.js
index <HASH>..<HASH> 100644
--- a/lib/transport.js
+++ b/lib/transport.js
@@ -21,7 +21,11 @@ module.exports = Transport;
*/
function Transport (opts) {
- this.options = opts;
+ this.path = opts.path;
+ this.host = opts.host;
+ this.port = opts.port;
+ this.secure = opts.secure;
+ this.query = opts.query;
this.readyState = '';
this.writeBuffer = [];
};
|
Expose transport options as properties.
|
diff --git a/src/ol/renderer/webgl/TileLayer.js b/src/ol/renderer/webgl/TileLayer.js
index <HASH>..<HASH> 100644
--- a/src/ol/renderer/webgl/TileLayer.js
+++ b/src/ol/renderer/webgl/TileLayer.js
@@ -5,6 +5,7 @@
// FIXME animated shaders! check in redraw
import LayerType from '../../LayerType.js';
+import ImageTile from '../../ImageTile.js';
import TileRange from '../../TileRange.js';
import TileState from '../../TileState.js';
import TileSource from '../../source/Tile.js';
@@ -286,6 +287,11 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
const tilesToDraw = tilesToDrawByZ[zs[i]];
for (const tileKey in tilesToDraw) {
tile = tilesToDraw[tileKey];
+
+ if (!(tile instanceof ImageTile)) {
+ continue;
+ }
+
tileExtent = tileGrid.getTileCoordExtent(tile.tileCoord, tmpExtent);
u_tileOffset[0] = 2 * (tileExtent[2] - tileExtent[0]) /
framebufferExtentDimension;
|
Check that tile is ImageTile before using it
|
diff --git a/ieml/calculation/thesaurus.py b/ieml/calculation/thesaurus.py
index <HASH>..<HASH> 100644
--- a/ieml/calculation/thesaurus.py
+++ b/ieml/calculation/thesaurus.py
@@ -8,10 +8,22 @@ from ieml.script import CONTAINED_RELATION
from bidict import bidict
from models.relations import RelationsConnector, RelationsQueries
from fractions import Fraction
+from collections import namedtuple
+
+
+ScoreNode = namedtuple('ScoreNode', ['script', 'score'])
def rank_paradigms(paradigms_list, usl_list):
+ paradigms = {p:0 for p in paradigms_list}
for usl in usl_list:
term_list = [term for term in usl.tree_iter() if isinstance(term, Term)]
for term in term_list:
+ # TODO : CHECK IF PARADIGM_LIST CONTAINS TERM OBJECT OR STRINGS
+ for paradigm in paradigms_list:
+ if set(term.script.singular_sequences) <= set(paradigm.script.singular_sequences):
+ paradigms[paradigm] += 1
+
+ # return sorted(list[paradigms], key= lambda e: paradigms[e])
+ return sorted(paradigms, key= lambda e: paradigms[e])
|
Add a method to rank the most cited root paradigms for a given usl collection. Pair programming with Zack #Zack
|
diff --git a/lib/sbsm/session.rb b/lib/sbsm/session.rb
index <HASH>..<HASH> 100644
--- a/lib/sbsm/session.rb
+++ b/lib/sbsm/session.rb
@@ -356,9 +356,19 @@ module SBSM
end
def user_input(*keys)
if(keys.size == 1)
- key = keys.first
- key_sym = (key.is_a? Symbol) ? key : key.to_s.intern
- @valid_input[key_sym]
+ index = nil
+ key = keys.first.to_s
+ if match = /([^\[]+)\[([^\]]+)\]/.match(key)
+ key = match[1]
+ index = match[2]
+ end
+ key_sym = key.to_sym
+ valid = @valid_input[key_sym]
+ if(index && valid.respond_to?(:[]))
+ valid[index]
+ else
+ valid
+ end
else
keys.inject({}) { |inj, key|
inj.store(key, user_input(key))
|
allow access to hashed inputs through hash-syntax strings
|
diff --git a/lib/fakefs/file.rb b/lib/fakefs/file.rb
index <HASH>..<HASH> 100644
--- a/lib/fakefs/file.rb
+++ b/lib/fakefs/file.rb
@@ -497,8 +497,8 @@ module FakeFS
true
end
- def write(str)
- val = super(str)
+ def write(*args)
+ val = super(*args)
@file.mtime = Time.now
val
end
|
FakeFS::File: fix interface of #write
It can take multiple arguments. This caused a warning at least since
ruby <I>
|
diff --git a/tests/Jasny/Config/DynamoDBLoaderTest.php b/tests/Jasny/Config/DynamoDBLoaderTest.php
index <HASH>..<HASH> 100644
--- a/tests/Jasny/Config/DynamoDBLoaderTest.php
+++ b/tests/Jasny/Config/DynamoDBLoaderTest.php
@@ -82,7 +82,9 @@ class DynamoDBLoaderTest extends \PHPUnit_Framework_TestCase
if (!$wait) return;
self::$dynamodb->waitUntil('TableExists', [
- 'TableName' => self::TABLE_NAME
+ 'TableName' => self::TABLE_NAME,
+ 'waiter.interval' => 1,
+ 'waiter.max_attempts' => 5
]);
}
@@ -100,7 +102,9 @@ class DynamoDBLoaderTest extends \PHPUnit_Framework_TestCase
if (!$wait) return;
self::$dynamodb->waitUntil('TableNotExists', [
- 'TableName' => self::TABLE_NAME
+ 'TableName' => self::TABLE_NAME,
+ 'waiter.interval' => 1,
+ 'waiter.max_attempts' => 5
]);
}
|
Set the poll interval for wait in DynamoDBLoaderTest
By default WaitOn for DynamoDB poll once every <I>s, causing the test to wait <I> seconds.
This is non-sense because the table is created in <I>s by dynalite.
Setting the poll interval to 1s significantly speeds up the DynamoDB test.
|
diff --git a/models/editor.js b/models/editor.js
index <HASH>..<HASH> 100644
--- a/models/editor.js
+++ b/models/editor.js
@@ -29,15 +29,16 @@ module.exports = (bookshelf) => {
idAttribute: 'id',
initialize() {
this.on('saving', (model) => {
- if (model.hasChanged('password')) {
- return bcrypt.genSaltAsync(10)
- .then((salt) =>
- bcrypt.hashAsync(model.get('password'), salt)
- )
- .then((hash) => {
- model.set('password', hash);
- });
+ if (!model.hasChanged('password')) {
+ return null;
}
+ return bcrypt.genSaltAsync(10)
+ .then((salt) =>
+ bcrypt.hashAsync(model.get('password'), salt)
+ )
+ .then((hash) => {
+ model.set('password', hash);
+ });
});
},
parse: util.snakeToCamel,
|
Ensure that password salting function always returns a value
|
diff --git a/generators/app/configs/package.json.js b/generators/app/configs/package.json.js
index <HASH>..<HASH> 100644
--- a/generators/app/configs/package.json.js
+++ b/generators/app/configs/package.json.js
@@ -26,7 +26,7 @@ module.exports = function(generator) {
[packager]: version
},
'scripts': {
- test: 'npm run eslint && npm run mocha',
+ test: `${packager} run eslint && ${packager} run mocha`,
eslint: `eslint ${lib}/. test/. --config .eslintrc.json`,
start: `node ${lib}/`,
mocha: 'mocha test/ --recursive --exit'
|
Use the selected packager to run commands (#<I>)
|
diff --git a/commands/review/post/mode_parent.go b/commands/review/post/mode_parent.go
index <HASH>..<HASH> 100644
--- a/commands/review/post/mode_parent.go
+++ b/commands/review/post/mode_parent.go
@@ -213,7 +213,7 @@ func merge(mergeTask, current, parent string) (act action.Action, err error) {
}
// Reset the branch to the original position.
- if err := git.Reset("--hard", currentSHA); err != nil {
+ if err := git.Reset("--keep", currentSHA); err != nil {
return errs.NewError(task, err)
}
return nil
|
review post: Use reset --keep instead of --hard
Actually the right thing is to use --keep instead of --hard since we only need
to reset the branch to the original position. We don't really care about the
working directory state.
Change-Id: <I>e3
Story-Id: salsaflow/salsaflow#<I>
|
diff --git a/docker/transport/unixconn.py b/docker/transport/unixconn.py
index <HASH>..<HASH> 100644
--- a/docker/transport/unixconn.py
+++ b/docker/transport/unixconn.py
@@ -21,13 +21,12 @@ RecentlyUsedContainer = urllib3._collections.RecentlyUsedContainer
class UnixHTTPResponse(httplib.HTTPResponse, object):
def __init__(self, sock, *args, **kwargs):
disable_buffering = kwargs.pop('disable_buffering', False)
+ if six.PY2:
+ # FIXME: We may need to disable buffering on Py3 as well,
+ # but there's no clear way to do it at the moment. See:
+ # https://github.com/docker/docker-py/issues/1799
+ kwargs['buffering'] = not disable_buffering
super(UnixHTTPResponse, self).__init__(sock, *args, **kwargs)
- if disable_buffering is True:
- # We must first create a new pointer then close the old one
- # to avoid closing the underlying socket.
- new_fp = sock.makefile('rb', 0)
- self.fp.close()
- self.fp = new_fp
class UnixHTTPConnection(httplib.HTTPConnection, object):
|
Fix broken unbuffered streaming with Py3
|
diff --git a/sphinx/conf.py b/sphinx/conf.py
index <HASH>..<HASH> 100644
--- a/sphinx/conf.py
+++ b/sphinx/conf.py
@@ -48,9 +48,9 @@ copyright = u'2011, Florian Ludwig'
# built documents.
#
# The short X.Y version.
-version = '0.0.1'
+version = '0.2.0'
# The full version, including alpha/beta/rc tags.
-release = '0.0.1'
+release = '0.2.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
|
DOC dump version to <I>
|
diff --git a/src/InputNumber.js b/src/InputNumber.js
index <HASH>..<HASH> 100644
--- a/src/InputNumber.js
+++ b/src/InputNumber.js
@@ -216,7 +216,11 @@ const InputNumber = React.createClass({
},
render() {
- const props = this.props;
+ const props = {...this.props};
+ // Remove React warning.
+ // Warning: Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both).
+ delete props.defaultValue;
+
const prefixCls = props.prefixCls;
const classes = classNames({
[prefixCls]: true,
|
fix: should work with React@<I>
|
diff --git a/src/js/mep-player.js b/src/js/mep-player.js
index <HASH>..<HASH> 100644
--- a/src/js/mep-player.js
+++ b/src/js/mep-player.js
@@ -695,12 +695,13 @@
setPlayerSize: function(width,height) {
var t = this;
- t.width = width;
- t.height = height;
+ if (typeof width != 'undefined')
+ t.width = width;
+
+ if (typeof height != 'undefined')
+ t.height = height;
- // XXX: Dirty hack:
- // If there is a % char in the supplied height value, set size to
- // 100% of parent container.
+ // detect 100% mode
if (t.height.toString().indexOf('%') > 0) {
// do we have the native dimensions yet?
|
updated height/width to check for undfined.
|
diff --git a/src/util/Util.js b/src/util/Util.js
index <HASH>..<HASH> 100644
--- a/src/util/Util.js
+++ b/src/util/Util.js
@@ -302,11 +302,11 @@ class Util {
.sort((a, b) => a.rawPosition - b.rawPosition || Long.fromString(a.id).sub(Long.fromString(b.id)).toNumber());
}
- static setPosition(item, position, relative, sorted, route, handle, reason) {
+ static setPosition(item, position, relative, sorted, route, reason) {
let updatedItems = sorted.array();
Util.moveElementInArray(updatedItems, item, position, relative);
updatedItems = updatedItems.map((r, i) => ({ id: r.id, position: i }));
- return route.patch({ data: updatedItems, reason }).then(handle || (x => x));
+ return route.patch({ data: updatedItems, reason });
}
}
|
fix a thing (#<I>)
|
diff --git a/lib/active_interaction/pipeline.rb b/lib/active_interaction/pipeline.rb
index <HASH>..<HASH> 100644
--- a/lib/active_interaction/pipeline.rb
+++ b/lib/active_interaction/pipeline.rb
@@ -34,9 +34,10 @@ module ActiveInteraction
# result straight through, use `nil`. To pass the result as a value in a
# hash, pass the key as a symbol.
#
- # @return [Array<Array(Proc, Base)>]
+ # @return [nil]
def pipe(interaction, function = nil)
@steps << [lambdafy(function), interaction]
+ nil
end
# Run all the interactions in the pipeline. If any interaction fails, stop
|
Return nil from pipe
I don't want to leak all of the steps.
|
diff --git a/src/Http/Client/Response.php b/src/Http/Client/Response.php
index <HASH>..<HASH> 100644
--- a/src/Http/Client/Response.php
+++ b/src/Http/Client/Response.php
@@ -13,7 +13,9 @@
*/
namespace Cake\Http\Client;
-use Cake\Http\Cookie\CookieCollection;
+// This alias is necessary to avoid class name conflicts
+// with the deprecated class in this namespace.
+use Cake\Http\Cookie\CookieCollection as CookiesCollection;
use Psr\Http\Message\ResponseInterface;
use RuntimeException;
use Zend\Diactoros\MessageTrait;
@@ -453,7 +455,7 @@ class Response extends Message implements ResponseInterface
if ($this->cookies) {
return;
}
- $this->cookies = CookieCollection::createFromHeader($this->getHeader('Set-Cookie'));
+ $this->cookies = CookiesCollection::createFromHeader($this->getHeader('Set-Cookie'));
}
/**
|
Use an alias to avoid duplicate class name issues.
The deprecated CookieCollection shares a name with this imported class
so we need an alias.
|
diff --git a/translator/prelude.go b/translator/prelude.go
index <HASH>..<HASH> 100644
--- a/translator/prelude.go
+++ b/translator/prelude.go
@@ -211,6 +211,7 @@ var go$newType = function(size, kind, string, name, pkgPath, constructor) {
typ.Ptr = go$newType(4, "Ptr", "*" + string, "", "", constructor);
typ.Ptr.Struct = typ;
typ.init = function(fields) {
+ typ.Ptr.init(typ);
typ.Ptr.nil = new constructor();
var i;
for (i = 0; i < fields.length; i++) {
@@ -234,7 +235,6 @@ var go$newType = function(size, kind, string, name, pkgPath, constructor) {
}
rt.structType = new go$reflect.structType(rt, new (go$sliceType(go$reflect.structField))(reflectFields));
};
- typ.Ptr.init(typ);
};
break;
|
fixed nil pointer error on field access of nil
|
diff --git a/activesupport/lib/active_support/core_ext/object/with_options.rb b/activesupport/lib/active_support/core_ext/object/with_options.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/core_ext/object/with_options.rb
+++ b/activesupport/lib/active_support/core_ext/object/with_options.rb
@@ -47,7 +47,21 @@ class Object
# end
#
# <tt>with_options</tt> can also be nested since the call is forwarded to its receiver.
- # Each nesting level will merge inherited defaults in addition to their own.
+ #
+ # NOTE: Each nesting level will merge inherited defaults in addition to their own.
+ #
+ # class Post < ActiveRecord::Base
+ # with_options if: :persisted?, length: { minimum: 50 } do
+ # validates :content, if: -> { content.present? }
+ # end
+ # end
+ #
+ # The code is equivalent to:
+ #
+ # validates :content, length: { minimum: 50 }, if: -> { content.present? }
+ #
+ # Hence the inherited default for `if` key is ignored.
+ #
def with_options(options, &block)
option_merger = ActiveSupport::OptionMerger.new(self, options)
block.arity.zero? ? option_merger.instance_eval(&block) : block.call(option_merger)
|
[ci skip] Add Doc of with_options for the case when inherited default options and original options have same keys
|
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/internal/JsonFastParser.java b/subprojects/groovy-json/src/main/java/groovy/json/internal/JsonFastParser.java
index <HASH>..<HASH> 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/internal/JsonFastParser.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/internal/JsonFastParser.java
@@ -161,6 +161,7 @@ public class JsonFastParser extends JsonParserCharArray {
int index = __index;
char currentChar;
boolean doubleFloat = false;
+ boolean foundDot = false;
if (minus && index + 1 < array.length) {
index++;
@@ -174,6 +175,12 @@ public class JsonFastParser extends JsonParserCharArray {
break;
} else if (isDelimiter(currentChar)) {
break;
+ } else if (currentChar == '.') {
+ if (foundDot) {
+ complain("unexpected character " + currentChar);
+ }
+ foundDot = true;
+ doubleFloat = true;
} else if (isDecimalChar(currentChar)) {
doubleFloat = true;
}
|
GROOVY-<I>: Ensure multiple decimal points caught when numbers lazily evaluated in the JsonFastParser.
|
diff --git a/app/helpers/rails_admin/main_helper.rb b/app/helpers/rails_admin/main_helper.rb
index <HASH>..<HASH> 100644
--- a/app/helpers/rails_admin/main_helper.rb
+++ b/app/helpers/rails_admin/main_helper.rb
@@ -71,7 +71,7 @@ module RailsAdmin
max_sets = sets.size-2
total = current_set.between?(1, max_sets) ? 704 : total
column_offset = total-sets[current_set][:size]
- per_property = column_offset/properties.size
+ per_property = properties.size != 0 ? column_offset / properties.size : 0
offset = column_offset - per_property * properties.size
properties.each do |property|
|
If there are no properties, don't crash, just set the per_property to 0, seems safe enough.
|
diff --git a/tests/functional/test_local.py b/tests/functional/test_local.py
index <HASH>..<HASH> 100644
--- a/tests/functional/test_local.py
+++ b/tests/functional/test_local.py
@@ -5,7 +5,6 @@ from threading import Thread
from threading import Event
import json
import subprocess
-import select
from contextlib import contextmanager
import pytest
@@ -182,14 +181,6 @@ def test_can_import_env_vars(unused_tcp_port):
def _wait_for_server_ready(process):
- result = select.select([process.stderr], [], [], 10)[0]
- if not result:
- raise AssertionError("Local server was unable to start up "
- "(did not send READY message).")
- status = process.stderr.read(5)
- if status != b'READY':
- raise AssertionError("Local server did not sent expect READ message, "
- "instead sent: %s" % status)
if process.poll() is not None:
raise AssertionError(
'Local server immediately exited with rc: %s' % process.poll()
|
Remove select() in local test
You can't select() on a file desriptor in windows, it has to
be a socket. Given we're already retrying connection errors, we
don't actually need this. It originally was used to speed up tests.
|
diff --git a/service/elastigroup/providers/aws/aws.go b/service/elastigroup/providers/aws/aws.go
index <HASH>..<HASH> 100644
--- a/service/elastigroup/providers/aws/aws.go
+++ b/service/elastigroup/providers/aws/aws.go
@@ -510,6 +510,7 @@ type BlockDeviceMapping struct {
type EBS struct {
DeleteOnTermination *bool `json:"deleteOnTermination,omitempty"`
Encrypted *bool `json:"encrypted,omitempty"`
+ KmsKeyId *string `json:"kmsKeyId,omitempty"`
SnapshotID *string `json:"snapshotId,omitempty"`
VolumeType *string `json:"volumeType,omitempty"`
VolumeSize *int `json:"volumeSize,omitempty"`
@@ -2597,6 +2598,13 @@ func (o *EBS) SetEncrypted(v *bool) *EBS {
return o
}
+func (o *EBS) SetKmsKeyId(v *string) *EBS {
+ if o.KmsKeyId = v; o.KmsKeyId == nil {
+ o.nullFields = append(o.nullFields, "KmsKeyId")
+ }
+ return o
+}
+
func (o *EBS) SetSnapshotId(v *string) *EBS {
if o.SnapshotID = v; o.SnapshotID == nil {
o.nullFields = append(o.nullFields, "SnapshotID")
|
[src] Added support for kms_key_id as part of the EBS
|
diff --git a/lib/generators/templates/blast.rb b/lib/generators/templates/blast.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/templates/blast.rb
+++ b/lib/generators/templates/blast.rb
@@ -295,7 +295,13 @@ module Quorum
logger("NCBI Blast", @cmd)
- @cmd.each { |c| system(c) }
+ # Execute each system command in a Thread.
+ threads = []
+ @cmd.each do |c|
+ threads << Thread.new { system(c) }
+ end
+ # Wait for every Thread to finish working.
+ threads.each { |t| t.join }
parse_and_save_results
end
diff --git a/spec/dummy/quorum/lib/tools/blast.rb b/spec/dummy/quorum/lib/tools/blast.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/quorum/lib/tools/blast.rb
+++ b/spec/dummy/quorum/lib/tools/blast.rb
@@ -295,7 +295,13 @@ module Quorum
logger("NCBI Blast", @cmd)
- @cmd.each { |c| system(c) }
+ # Execute each system command in a Thread.
+ threads = []
+ @cmd.each do |c|
+ threads << Thread.new { system(c) }
+ end
+ # Wait for every Thread to finish working.
+ threads.each { |t| t.join }
parse_and_save_results
end
|
Execute each Blast system command in a Thread.
|
diff --git a/system/BaseModel.php b/system/BaseModel.php
index <HASH>..<HASH> 100644
--- a/system/BaseModel.php
+++ b/system/BaseModel.php
@@ -290,12 +290,9 @@ abstract class BaseModel
/**
* BaseModel constructor.
*
- * @param object|null $db DB Connection
* @param ValidationInterface|null $validation Validation
- *
- * @phpstan-ignore-next-line
*/
- public function __construct(object &$db = null, ValidationInterface $validation = null)
+ public function __construct(ValidationInterface $validation = null)
{
$this->tempReturnType = $this->returnType;
$this->tempUseSoftDeletes = $this->useSoftDeletes;
diff --git a/system/Model.php b/system/Model.php
index <HASH>..<HASH> 100644
--- a/system/Model.php
+++ b/system/Model.php
@@ -90,9 +90,16 @@ class Model extends BaseModel
*/
public function __construct(ConnectionInterface &$db = null, ValidationInterface $validation = null)
{
- parent::__construct($db, $validation);
+ parent::__construct($validation);
- $this->db = $db ?? Database::connect($this->DBGroup);
+ if (is_null($db))
+ {
+ $this->db = Database::connect($this->DBGroup);
+ }
+ else
+ {
+ $this->db = &$db;
+ }
}
//--------------------------------------------------------------------
|
BaseModel/Model - Reworked Constructor to properly use reference
|
diff --git a/src/Select.js b/src/Select.js
index <HASH>..<HASH> 100644
--- a/src/Select.js
+++ b/src/Select.js
@@ -714,7 +714,7 @@ const Select = React.createClass({
onRemove={this.removeValue}
value={value}
>
- {renderLabel(value, 1)}
+ {renderLabel(value, i)}
<span className="Select-aria-only"> </span>
</ValueComponent>
);
@@ -729,7 +729,7 @@ const Select = React.createClass({
onClick={onClick}
value={valueArray[0]}
>
- {renderLabel(valueArray[0], 1)}
+ {renderLabel(valueArray[0], i)}
</ValueComponent>
);
}
@@ -904,7 +904,7 @@ const Select = React.createClass({
isSelected={isSelected}
ref={optionRef}
>
- {renderLabel(option, 1)}
+ {renderLabel(option, i)}
</Option>
);
});
|
Fix typo, change "1" -> "i"
|
diff --git a/cmd/peco/peco.go b/cmd/peco/peco.go
index <HASH>..<HASH> 100644
--- a/cmd/peco/peco.go
+++ b/cmd/peco/peco.go
@@ -1,5 +1,3 @@
-// +build build
-
package main
import (
@@ -13,12 +11,7 @@ import (
"github.com/nsf/termbox-go"
)
-// This value is to be initialized by an external tool at link time
-// via
-//
-// go build -ldflags "-X main.version vX.Y.Z" ...
-//
-var version string
+var version = "v0.1.1"
func showHelp() {
const v = `
|
Temporarily do away with hardcoding.
See thigs thread: <URL>
|
diff --git a/test/Tests/RemoteObjectTest.php b/test/Tests/RemoteObjectTest.php
index <HASH>..<HASH> 100644
--- a/test/Tests/RemoteObjectTest.php
+++ b/test/Tests/RemoteObjectTest.php
@@ -221,7 +221,7 @@ class RemoteObjectTest extends \HPCloud\Tests\TestCase {
// Change content and retest.
$obj->setContent('foo');
- $this->assertTrue(obj->isDirty());
+ $this->assertTrue($obj->isDirty());
}
/**
|
Fixed minor typo that I accidentally commit last time.
|
diff --git a/app/models/organization.rb b/app/models/organization.rb
index <HASH>..<HASH> 100644
--- a/app/models/organization.rb
+++ b/app/models/organization.rb
@@ -86,7 +86,7 @@ class Organization < ActiveRecord::Base
org_verbs = {
:update => N_("Manage Organization and Environments"),
-
+ :read => N_("Access Organization"),
:read_systems => N_("Access Systems"),
:create_systems =>N_("Register Systems"),
:update_systems => N_("Manage Systems"),
@@ -94,8 +94,7 @@ class Organization < ActiveRecord::Base
}
org_verbs.merge!({
:create => N_("Create Organization"),
- :read => N_("Access Organization"),
- :delete => N_("Delete Organization"),
+ :delete => N_("Delete Organization")
}) if global
org_verbs.with_indifferent_access
|
added read in the non global list for orgs
|
diff --git a/src/main/java/com/hp/autonomy/hod/client/api/textindex/query/parametric/FieldValues.java b/src/main/java/com/hp/autonomy/hod/client/api/textindex/query/parametric/FieldValues.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/hp/autonomy/hod/client/api/textindex/query/parametric/FieldValues.java
+++ b/src/main/java/com/hp/autonomy/hod/client/api/textindex/query/parametric/FieldValues.java
@@ -9,7 +9,7 @@ import lombok.Singular;
import java.util.List;
-@Builder
+@Builder(toBuilder = true)
@JsonDeserialize(builder = FieldValues.FieldValuesBuilder.class)
@Data
public class FieldValues {
@@ -25,7 +25,7 @@ public class FieldValues {
private Integer totalValues;
}
- @Builder
+ @Builder(toBuilder = true)
@JsonDeserialize(builder = ValueAndCount.ValueAndCountBuilder.class)
@Data
public static class ValueAndCount {
|
Sever-side meta-filter (FIND-<I>)
Add toBuilder to FieldValues so we can easily manipulate parametric response to ape ValueRestriction behaviour
[rev. matthew.gordon]
|
diff --git a/FlowCal/mef.py b/FlowCal/mef.py
index <HASH>..<HASH> 100644
--- a/FlowCal/mef.py
+++ b/FlowCal/mef.py
@@ -24,7 +24,7 @@ import FlowCal.plot
import FlowCal.transform
import FlowCal.stats
-standard_curve_colors = ['tab:blue', 'tab:green', 'tab:orange']
+standard_curve_colors = ['tab:blue', 'tab:green', 'tab:red']
def clustering_gmm(data,
n_clusters,
|
Changed standard curve color back to red.
|
diff --git a/classes/Living.js b/classes/Living.js
index <HASH>..<HASH> 100644
--- a/classes/Living.js
+++ b/classes/Living.js
@@ -176,7 +176,7 @@ Living = new Class({
* next command in the action queue will be called.
*/
startHeart: function() {
- this.heartTimer = (function(){ this.beatHeart(); }).periodical(1000, this);
+ this.heartTimer = this.beatHeart.periodical(1000, this);
},
/**
@@ -193,12 +193,13 @@ Living = new Class({
},
/**
- * The heart should be stopped when the player's hit points are below 0.
- * This will cause the player to become dead.
+ * Stops the character from acting. Should happen upon death, but
+ * heartbeat should NOT be confused with a physical, game-mechanic
+ * heartbeat.
*/
stopHeart: function() {
+ clearTimeout(this.heartTimer);
this.heartTimer = null;
- this.fireEvent('death');
},
/**
|
Fixed the heartbeat's timer clearance, iterated that heartbeat has nothing to do with the player's vital status.
|
diff --git a/tests/estestcase.py b/tests/estestcase.py
index <HASH>..<HASH> 100644
--- a/tests/estestcase.py
+++ b/tests/estestcase.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
+import logging
"""
Unit tests for pyes. These require an es server with thrift plugin running on the default port (localhost:9500).
@@ -16,7 +17,7 @@ def get_conn(*args, **kwargs):
class ESTestCase(unittest.TestCase):
def setUp(self):
- self.conn = get_conn(timeout=300.0)#incremented timeout for debugging
+ self.conn = get_conn(timeout=300.0,log_curl=True)#incremented timeout for debugging
self.index_name = "test-index"
self.document_type = "test-type"
self.conn.delete_index_if_exists(self.index_name)
@@ -133,7 +134,7 @@ def setUp():
'store': 'yes',
'type': u'string'}}
- conn = get_conn()
+ conn = get_conn(log_curl=True)
conn.delete_index_if_exists("test-pindex")
conn.create_index("test-pindex")
conn.put_mapping("test-type", {'properties': mapping}, ["test-pindex"])
|
Adding curl logging to the test connection. Note: output is suppressed by nose framework unless there is an error
|
diff --git a/tasks/zip.js b/tasks/zip.js
index <HASH>..<HASH> 100644
--- a/tasks/zip.js
+++ b/tasks/zip.js
@@ -45,11 +45,12 @@ module.exports = function(grunt) {
// If there is no router
if (!router) {
// Grab the cwd and return the relative path as our router
- var cwd = data.cwd || process.cwd();
+ var cwd = data.cwd || process.cwd(),
+ separator = new RegExp(path.sep.replace('\\', '\\\\'), 'g');
router = function routerFn (filepath) {
// Join path via /
// DEV: Files zipped on Windows need to use / to have the same layout on Linux
- return path.relative(cwd, filepath).split(path.sep).join('/');
+ return path.relative(cwd, filepath).replace(separator, '/');
};
} else if (data.cwd) {
// Otherwise, if a `cwd` was specified, throw a fit and leave
|
Moved to RegExp.replace over split
|
diff --git a/lib/Orkestra/Transactor/Entity/AbstractAccount.php b/lib/Orkestra/Transactor/Entity/AbstractAccount.php
index <HASH>..<HASH> 100644
--- a/lib/Orkestra/Transactor/Entity/AbstractAccount.php
+++ b/lib/Orkestra/Transactor/Entity/AbstractAccount.php
@@ -161,7 +161,7 @@ abstract class AbstractAccount extends AbstractEntity
*/
public function __toString()
{
- return (string) $this->alias;
+ return (string) ($this->alias ?: sprintf('%s ending with %s', $this->getType(), $this->lastFour));
}
/**
|
Updated toString for AbstractAccount
|
diff --git a/lib/expeditor/command.rb b/lib/expeditor/command.rb
index <HASH>..<HASH> 100644
--- a/lib/expeditor/command.rb
+++ b/lib/expeditor/command.rb
@@ -87,10 +87,9 @@ module Expeditor
end
# `chain` returns new command that has self as dependencies
- def chain(&block)
- Command.new(dependencies: [self]) do |v|
- block.call(v)
- end
+ def chain(opts = {}, &block)
+ opts[:dependencies] = [self]
+ Command.new(opts, &block)
end
def self.const(value)
diff --git a/spec/expeditor/command_spec.rb b/spec/expeditor/command_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/expeditor/command_spec.rb
+++ b/spec/expeditor/command_spec.rb
@@ -498,6 +498,17 @@ describe Expeditor::Command do
expect(command_double.get).to eq(84)
end
end
+
+ context 'with options' do
+ it 'should recognize options' do
+ command = simple_command(42)
+ command_sleep = command.chain(timeout: 0.01) do |n|
+ sleep 0.1
+ n * 2
+ end.start
+ expect { command_sleep.get }.to raise_error(Expeditor::TimeoutError)
+ end
+ end
end
describe '.const' do
|
Make it possible to use options in Command#chain
|
diff --git a/angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py b/angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py
index <HASH>..<HASH> 100644
--- a/angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py
+++ b/angr/storage/memory_mixins/paged_memory/paged_memory_mixin.py
@@ -528,10 +528,10 @@ class PagedMemoryMixin(MemoryMixin):
flushed = []
# cycle over all the keys ( the page number )
- for pageno, _ in self._pages.items():
+ for pageno, page in self._pages.items():
if pageno in white_list_page_number:
#l.warning("Page " + str(pageno) + " not flushed!")
- new_page_dict[pageno] = self._pages[pageno]
+ new_page_dict[pageno] = page
else:
#l.warning("Page " + str(pageno) + " flushed!")
flushed.append((pageno, self.page_size))
@@ -541,8 +541,6 @@ class PagedMemoryMixin(MemoryMixin):
# self.state.unicorn.uncache_region(addr, length)
self._pages = new_page_dict
- self._initialized = set()
-
return flushed
class ListPagesMixin(PagedMemoryMixin):
|
removed unused attributes and cleaned loop over self._pages
|
diff --git a/containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/container/internal/KarafTestContainer.java b/containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/container/internal/KarafTestContainer.java
index <HASH>..<HASH> 100644
--- a/containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/container/internal/KarafTestContainer.java
+++ b/containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/container/internal/KarafTestContainer.java
@@ -474,8 +474,10 @@ public class KarafTestContainer implements TestContainer {
// do the same for lib/boot
File[] bootJars = new File(karafHome + "/lib/boot")
.listFiles((FileFilter) new WildcardFileFilter("*.jar"));
- for (File jar : bootJars) {
- cp.add(jar.toString());
+ if (bootJars != null) {
+ for (File jar : bootJars) {
+ cp.add(jar.toString());
+ }
}
// do the same for lib/ext
File[] extJars = new File(karafHome + "/lib/ext")
|
[PAXEXAM-<I>] Support Karaf libraries in the lib/boot folder
|
diff --git a/salt/fileclient.py b/salt/fileclient.py
index <HASH>..<HASH> 100644
--- a/salt/fileclient.py
+++ b/salt/fileclient.py
@@ -223,7 +223,9 @@ class Client(object):
if fn_.strip() and fn_.startswith(path):
if salt.utils.check_include_exclude(
fn_, include_pat, exclude_pat):
- ret.append(self.cache_file('salt://' + fn_, saltenv))
+ fn_ = self.cache_file('salt://' + fn_, saltenv)
+ if fn_:
+ ret.append(fn_)
if include_empty:
# Break up the path into a list containing the bottom-level
|
Bugfix: crash on highstate population when empty path is passed
|
diff --git a/VM-Core/src/main/java/com/validation/manager/core/server/core/Versionable.java b/VM-Core/src/main/java/com/validation/manager/core/server/core/Versionable.java
index <HASH>..<HASH> 100644
--- a/VM-Core/src/main/java/com/validation/manager/core/server/core/Versionable.java
+++ b/VM-Core/src/main/java/com/validation/manager/core/server/core/Versionable.java
@@ -1,11 +1,9 @@
package com.validation.manager.core.server.core;
-import com.validation.manager.core.AuditedEntityListener;
import com.validation.manager.core.VMAuditedObject;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
-import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
@@ -15,7 +13,6 @@ import javax.validation.constraints.NotNull;
* @author Javier A. Ortiz Bultron <javier.ortiz.78@gmail.com>
*/
@MappedSuperclass
-@EntityListeners(AuditedEntityListener.class)
public class Versionable extends VMAuditedObject implements Serializable,
Comparable<Versionable> {
|
Remove the audit entity listener. Candidate to remove as dead code.
|
diff --git a/ryu/app/wsgi.py b/ryu/app/wsgi.py
index <HASH>..<HASH> 100644
--- a/ryu/app/wsgi.py
+++ b/ryu/app/wsgi.py
@@ -225,23 +225,15 @@ class WSGIApplication(object):
self.registory = {}
self._wsmanager = WebSocketManager()
super(WSGIApplication, self).__init__()
- # XXX: Switch how to call the API of Routes for every version
- match_argspec = inspect.getargspec(self.mapper.match)
- if 'environ' in match_argspec.args:
- # New API
- self._match = self._match_with_environ
- else:
- # Old API
- self._match = self._match_with_path_info
-
- def _match_with_environ(self, req):
- match = self.mapper.match(environ=req.environ)
- return match
-
- def _match_with_path_info(self, req):
- self.mapper.environ = req.environ
- match = self.mapper.match(req.path_info)
- return match
+
+ def _match(self, req):
+ # Note: Invoke the new API, first. If the arguments unmatched,
+ # invoke the old API.
+ try:
+ return self.mapper.match(environ=req.environ)
+ except TypeError:
+ self.mapper.environ = req.environ
+ return self.mapper.match(req.path_info)
@wsgify_hack
def __call__(self, req, start_response):
|
wsgi: Avoid using inspect.getargspec
Officially, "inspect.getargspec" is obsoleted in Python <I>,
this patch fixes to avoid using this function.
|
diff --git a/views/js/controller/runtime/testRunner.js b/views/js/controller/runtime/testRunner.js
index <HASH>..<HASH> 100644
--- a/views/js/controller/runtime/testRunner.js
+++ b/views/js/controller/runtime/testRunner.js
@@ -391,7 +391,13 @@ define(['jquery', 'lodash', 'spin', 'serviceApi/ServiceApi', 'serviceApi/UserInf
return {
start : function(assessmentTestContext){
-
+
+ $(document).ajaxError(function(event, jqxhr) {
+ if (jqxhr.status == 403) {
+ iframeNotifier.parent('serviceforbidden');
+ }
+ });
+
window.onServiceApiReady = function onServiceApiReady(serviceApi) {
TestRunner.serviceApi = serviceApi;
|
fixing silent fail at delivery time on expired session.
|
diff --git a/bloop/stream/buffer.py b/bloop/stream/buffer.py
index <HASH>..<HASH> 100644
--- a/bloop/stream/buffer.py
+++ b/bloop/stream/buffer.py
@@ -1,10 +1,4 @@
import heapq
-import random
-
-
-def jitter():
- """Used to advance a monotonic clock by a small amount"""
- return random.randint(1, 5)
def heap_item(clock, record, shard):
@@ -107,6 +101,6 @@ class RecordBuffer:
# Try to prevent collisions from someone accessing the underlying int.
# This offset ensures _RecordBuffer__monotonic_integer will never have
# the same value as any call to clock().
- value = self.__monotonic_integer + jitter()
- self.__monotonic_integer = value + jitter()
+ value = self.__monotonic_integer + 1
+ self.__monotonic_integer += 2
return value
|
Remove random jitter from stream.RecordBuffer.clock
|
diff --git a/tests/test_location_by_point_query_url.py b/tests/test_location_by_point_query_url.py
index <HASH>..<HASH> 100644
--- a/tests/test_location_by_point_query_url.py
+++ b/tests/test_location_by_point_query_url.py
@@ -79,18 +79,3 @@ def test_location_by_point_url_http_protocol(data, expected):
def test_location_by_point_url_https_protocol(data, expected):
loc_by_point = LocationByPoint(data, https_protocol)
assert loc_by_point.build_url() == expected
-
-
-@parametrize('data,expected', [
- (DATA[0], EXPECTED[0]),
- (DATA[1], EXPECTED[1]),
- (DATA[2], EXPECTED[2]),
- (DATA[3], EXPECTED[3]),
- (DATA[4], EXPECTED[4]),
- (DATA[5], EXPECTED[5]),
- (DATA[6], EXPECTED[6])
-])
-def test_location_by_point_url_get_data(data, expected):
- loc_by_point = LocationByPoint(data)
- loc_by_point.get_data()
- assert loc_by_point.status_code == 200
|
Divided data in between http and https protocol
|
diff --git a/salt/utils/ssdp.py b/salt/utils/ssdp.py
index <HASH>..<HASH> 100644
--- a/salt/utils/ssdp.py
+++ b/salt/utils/ssdp.py
@@ -380,12 +380,12 @@ class SSDPDiscoveryClient(SSDPBase):
:return:
'''
- self.log.info("Looking for a server discovery")
response = {}
- try:
- self._query()
- self._collect_masters_map(response)
- except socket.timeout:
+ masters = {}
+ self.log.info("Looking for a server discovery")
+ self._query()
+ self._collect_masters_map(response)
+ if not response:
msg = 'No master has been discovered.'
self.log.info(msg)
masters = {}
|
Bugfix for refactoring: the exception was never raised anyway
|
diff --git a/helper/resource/testing.go b/helper/resource/testing.go
index <HASH>..<HASH> 100644
--- a/helper/resource/testing.go
+++ b/helper/resource/testing.go
@@ -82,10 +82,25 @@ type TestCase struct {
// tests will only need one step.
type TestStep struct {
// PreConfig is called before the Config is applied to perform any per-step
- // setup that needs to happen
+ // setup that needs to happen. This is called regardless of "test mode"
+ // below.
PreConfig func()
- // Config a string of the configuration to give to Terraform.
+ //---------------------------------------------------------------
+ // Test modes. One of the following groups of settings must be
+ // set to determine what the test step will do. Ideally we would've
+ // used Go interfaces here but there are now hundreds of tests we don't
+ // want to re-type so instead we just determine which step logic
+ // to run based on what settings below are set.
+ //---------------------------------------------------------------
+
+ //---------------------------------------------------------------
+ // Plan, Apply testing
+ //---------------------------------------------------------------
+
+ // Config a string of the configuration to give to Terraform. If this
+ // is set, then the TestCase will execute this step with the same logic
+ // as a `terraform apply`.
Config string
// Check is called after the Config is applied. Use this step to
|
helper/resource: reshuffling to prepare for importstate testing
|
diff --git a/src/maplace.js b/src/maplace.js
index <HASH>..<HASH> 100644
--- a/src/maplace.js
+++ b/src/maplace.js
@@ -726,8 +726,9 @@
if (this.o.draggable) {
google.maps.event.addListener(this.directionsDisplay, 'directions_changed', function() {
+ var result = self.directionsDisplay.getDirections();
distance = self.compute_distance(self.directionsDisplay.directions);
- self.o.afterRoute.call(self, distance);
+ self.o.afterRoute.call(self, distance, result.status, result);
});
}
|
[fix] afterRoute not passing status or location with draggable #<I> #<I>
|
diff --git a/protobuf3/message.py b/protobuf3/message.py
index <HASH>..<HASH> 100644
--- a/protobuf3/message.py
+++ b/protobuf3/message.py
@@ -101,6 +101,8 @@ class Message(object):
return self.__wire_message.get(field_number, [])
def _set_wire_values(self, field_number, field_type, field_value, index=None, insert=False, append=False):
+ if field_number not in self.__wire_message:
+ self.__wire_message[field_number] = []
if append:
self.__wire_message[field_number].append(WireField(type=field_type, value=field_value))
elif insert:
|
Fixed KeyError in append method
|
diff --git a/src/routes.php b/src/routes.php
index <HASH>..<HASH> 100644
--- a/src/routes.php
+++ b/src/routes.php
@@ -55,7 +55,7 @@ Route::group(['prefix' => Config::get('bauhaus::admin.uri')], function () {
Route::get('model/{model}/export/{type}', [
'as' => 'admin.model.export',
'uses' => 'KraftHaus\Bauhaus\ModelController@export'
- ]);
+ ])->where('type', 'json|xml|csv|xls');
// extra route includes
require_once __DIR__ . '/routes/modals.php';
|
#<I> export route constraints added
|
diff --git a/src/Cartalyst/Sentry/Hashing/NativeHasher.php b/src/Cartalyst/Sentry/Hashing/NativeHasher.php
index <HASH>..<HASH> 100644
--- a/src/Cartalyst/Sentry/Hashing/NativeHasher.php
+++ b/src/Cartalyst/Sentry/Hashing/NativeHasher.php
@@ -31,6 +31,11 @@ class NativeHasher implements HasherInterface {
// Usually caused by an old PHP environment, see
// https://github.com/cartalyst/sentry/issues/98#issuecomment-12974603
// and https://github.com/ircmaxell/password_compat/issues/10
+ if (! function_exists('password_hash'))
+ {
+ throw new \RuntimeException('The function password_hash() does not exist, your PHP environment is probably incompatible. Try running [vendor/ircmaxell/password-compat/version-test.php] to check compatibility or use an alternative hashing strategy.');
+ }
+
if (($hash = password_hash($string, PASSWORD_DEFAULT)) === false)
{
throw new \RuntimeException('Error generating hash from string, your PHP environment is probably incompatible. Try running [vendor/ircmaxell/password-compat/version-test.php] to check compatibility or use an alternative hashing strategy.');
|
Check if password_hash() actually exists (>PHP<I>) and throw a descriptive RuntimeException if it doesn't.
|
diff --git a/config/tinker.php b/config/tinker.php
index <HASH>..<HASH> 100644
--- a/config/tinker.php
+++ b/config/tinker.php
@@ -4,6 +4,19 @@ return [
/*
|--------------------------------------------------------------------------
+ | Custom commands
+ |--------------------------------------------------------------------------
+ |
+ | Sometimes, you might want to make certain console commands available in
+ | Tinker. This option allows you to do just that. Simply provide a list
+ | of commands that you want to expose in Tinker.
+ |
+ */
+
+ 'commands' => [],
+
+ /*
+ |--------------------------------------------------------------------------
| Alias Blacklist
|--------------------------------------------------------------------------
|
diff --git a/src/Console/TinkerCommand.php b/src/Console/TinkerCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/TinkerCommand.php
+++ b/src/Console/TinkerCommand.php
@@ -80,6 +80,10 @@ class TinkerCommand extends Command
}
}
+ foreach (config('tinker.commands', []) as $command) {
+ $commands[] = $this->getApplication()->resolve($command);
+ }
+
return $commands;
}
|
allow to expose console command in tinker
|
diff --git a/builder/vmware/common/driver.go b/builder/vmware/common/driver.go
index <HASH>..<HASH> 100644
--- a/builder/vmware/common/driver.go
+++ b/builder/vmware/common/driver.go
@@ -106,6 +106,9 @@ func NewDriver(dconfig *DriverConfig, config *SSHConfig) (Driver, error) {
errs := ""
for _, driver := range drivers {
err := driver.Verify()
+ log.Printf("Testing vmware driver %T. Success: %t",
+ driver, err == nil)
+
if err == nil {
return driver, nil
}
|
log which vmware driver we decide on
|
diff --git a/__init__.py b/__init__.py
index <HASH>..<HASH> 100644
--- a/__init__.py
+++ b/__init__.py
@@ -22,5 +22,5 @@ __revision__ = "$Id$"
#
#--start constants--
-__version__ = "2.6b3"
+__version__ = "2.6rc1"
#--end constants--
|
Bumping to <I>rc1
|
diff --git a/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java b/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java
index <HASH>..<HASH> 100644
--- a/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java
+++ b/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java
@@ -1146,15 +1146,11 @@ public abstract class WebDriverManager {
String browserVersionOutput = getBrowserVersionInWindows(
programFilesEnv, winBrowserName, browserBinaryPath);
if (isNullOrEmpty(browserVersionOutput)) {
- String otherProgramFilesEnv = getOtherProgramFilesEnv();
browserVersionOutput = getBrowserVersionInWindows(
- otherProgramFilesEnv, winBrowserName,
+ getOtherProgramFilesEnv(), winBrowserName,
browserBinaryPath);
- if (!isNullOrEmpty(browserVersionOutput)) {
- return Optional
- .of(getVersionFromWmicOutput(browserVersionOutput));
- }
- } else {
+ }
+ if (!isNullOrEmpty(browserVersionOutput)) {
return Optional
.of(getVersionFromWmicOutput(browserVersionOutput));
}
|
Smell-fix: refactor method to reduce cognitive complexity
|
diff --git a/helper/resource/wait.go b/helper/resource/wait.go
index <HASH>..<HASH> 100644
--- a/helper/resource/wait.go
+++ b/helper/resource/wait.go
@@ -74,7 +74,7 @@ func RetryableError(err error) *RetryError {
return &RetryError{Err: err, Retryable: true}
}
-// NonRetryableError is a helper to create a RetryError that's _not)_ retryable
+// NonRetryableError is a helper to create a RetryError that's _not_ retryable
// from a given error.
func NonRetryableError(err error) *RetryError {
if err == nil {
|
Fixing small typo in resource/wait.go
|
diff --git a/debug.go b/debug.go
index <HASH>..<HASH> 100644
--- a/debug.go
+++ b/debug.go
@@ -128,7 +128,7 @@ func (l *State) errorMessage() {
l.top++
l.call(l.top-2, 1, false)
}
- l.throw(fmt.Errorf("%v: %s", RuntimeError, CheckString(l, -1)))
+ l.throw(RuntimeError(CheckString(l, -1)))
}
func SetHooker(l *State, f Hook, mask byte, count int) {
diff --git a/lua.go b/lua.go
index <HASH>..<HASH> 100644
--- a/lua.go
+++ b/lua.go
@@ -21,13 +21,16 @@ const (
)
var (
- RuntimeError = errors.New("runtime error")
- SyntaxError = errors.New("syntax error")
- MemoryError = errors.New("memory error")
- ErrorError = errors.New("error within the error handler")
- FileError = errors.New("file error")
+ SyntaxError = errors.New("syntax error")
+ MemoryError = errors.New("memory error")
+ ErrorError = errors.New("error within the error handler")
+ FileError = errors.New("file error")
)
+type RuntimeError string
+
+func (r RuntimeError) Error() string { return "runtime error: " + string(r) }
+
type Type int
const (
|
Throw RuntimeError as a structured error
|
diff --git a/packages/Pages/src/site/components/com_pages/filters/post.php b/packages/Pages/src/site/components/com_pages/filters/post.php
index <HASH>..<HASH> 100644
--- a/packages/Pages/src/site/components/com_pages/filters/post.php
+++ b/packages/Pages/src/site/components/com_pages/filters/post.php
@@ -39,7 +39,7 @@ class ComPagesFilterPost extends ComMediumFilterPost
protected function _initialize(KConfig $config)
{
$config->append(array(
- 'tag_list' => array('img', 'a', 'blockquote', 'strong', 'em', 'ul', 'ol', 'li', 'code', 'h2', 'h3', 'h4'),
+ 'tag_list' => array('img', 'blockquote', 'strong', 'em', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5'),
'tag_method' => 0
));
|
removed support for a, block quote tags
|
diff --git a/any_urlfield/forms/fields.py b/any_urlfield/forms/fields.py
index <HASH>..<HASH> 100644
--- a/any_urlfield/forms/fields.py
+++ b/any_urlfield/forms/fields.py
@@ -153,11 +153,11 @@ class ExtendedURLValidator(URLValidator):
def __call__(self, value):
try:
super(ExtendedURLValidator, self).__call__(value)
- except ValidationError as e:
+ except ValidationError:
parsed = urlparse(value)
if parsed.scheme == "tel" and re.match(self.tel_re, parsed.netloc):
return
- raise e
+ raise
|
Raise the original exception instead of reraising with a new traceback
|
diff --git a/Collection.php b/Collection.php
index <HASH>..<HASH> 100644
--- a/Collection.php
+++ b/Collection.php
@@ -1348,7 +1348,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate
// function which we were given. Then, we will sort the returned values and
// and grab the corresponding values for the sorted keys from this array.
foreach ($this->items as $key => $value) {
- $results[$key] = [$callback($value, $key), $key];
+ $results[$key] = $callback($value, $key);
}
$descending ? arsort($results, $options)
|
revert PR <I> (#<I>)
|
diff --git a/client/signup/jetpack-connect/controller.js b/client/signup/jetpack-connect/controller.js
index <HASH>..<HASH> 100644
--- a/client/signup/jetpack-connect/controller.js
+++ b/client/signup/jetpack-connect/controller.js
@@ -223,7 +223,7 @@ export default {
},
akismetLanding( context ) {
- getPlansLandingPage( context, false, '/jetpack/connect/akismet' );
+ getPlansLandingPage( context, true, '/jetpack/connect/akismet' );
},
plansLanding( context ) {
|
JPC: Hide free plan in akismet landing page
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.