diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/tests/Probability/Distribution/Continuous/StudentTTest.php b/tests/Probability/Distribution/Continuous/StudentTTest.php
index <HASH>..<HASH> 100644
--- a/tests/Probability/Distribution/Continuous/StudentTTest.php
+++ b/tests/Probability/Distribution/Continuous/StudentTTest.php
@@ -74,12 +74,16 @@ class StudentTTest extends \PHPUnit_Framework_TestCase
public function dataProviderForMean()
{
return [
- [1, null],
[2, 0],
[3, 0],
];
}
+ public function testMeanNAN()
+ {
+ $this->assertNan(StudentT::mean(1));
+ }
+
/**
* @dataProvider dataProviderForInverse
*/
|
update mean of StudentT to NAN if v<1
was null
|
diff --git a/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java b/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java
index <HASH>..<HASH> 100644
--- a/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java
+++ b/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java
@@ -58,7 +58,7 @@ public class UserResource {
private static final Logger LOGGER = LoggerFactory.getLogger(UserResource.class);
private static final Pattern USERNAME_PATTERN = Pattern.compile("^.{5,}$");
- private static final Pattern PASSWORD_PATTERN = Pattern.compile("^[a-zA-Z0-9_-]{5,}$");
+ private static final Pattern PASSWORD_PATTERN = Pattern.compile("^[^\\x00-\\x1F]{5,}$");
private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$");
private UserService userService;
|
Allow unicode characters in passwords.
|
diff --git a/app_generators/ruby_app/ruby_app_generator.rb b/app_generators/ruby_app/ruby_app_generator.rb
index <HASH>..<HASH> 100644
--- a/app_generators/ruby_app/ruby_app_generator.rb
+++ b/app_generators/ruby_app/ruby_app_generator.rb
@@ -56,7 +56,7 @@ class RubyAppGenerator < RubiGen::Base
opts.separator 'Options:'
opts.on("-r", "--ruby=path", String,
"Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).",
- "Default: #{DEFAULT_SHEBANG}") { |options[:shebang]| }
+ "Default: #{DEFAULT_SHEBANG}") { |v| options[:shebang] = v }
end
diff --git a/lib/rubigen/lookup.rb b/lib/rubigen/lookup.rb
index <HASH>..<HASH> 100644
--- a/lib/rubigen/lookup.rb
+++ b/lib/rubigen/lookup.rb
@@ -168,7 +168,7 @@ module RubiGen
private
# Lookup and cache every generator from the source list.
def cache
- @cache ||= sources.inject([]) { |cache, source| cache + source.map }
+ @cache ||= sources.inject([]) { |cache, source| cache + source.to_a }
end
# Clear the cache whenever the source list changes.
|
fixed some ruby <I> breakages
|
diff --git a/app/utils/pouch-views.js b/app/utils/pouch-views.js
index <HASH>..<HASH> 100644
--- a/app/utils/pouch-views.js
+++ b/app/utils/pouch-views.js
@@ -333,7 +333,8 @@ var designDocs = [{
patientListingKey +
'}'
),
- version: 2
+ sort: patientListingSearch,
+ version: 3
}, {
name: 'photo_by_patient',
function: generateView('photo',
|
Added back patientListingSearch
It was accidentally removed in the merge.
|
diff --git a/rw/plugins/mail_local.py b/rw/plugins/mail_local.py
index <HASH>..<HASH> 100644
--- a/rw/plugins/mail_local.py
+++ b/rw/plugins/mail_local.py
@@ -73,7 +73,6 @@ class Handler(RequestHandler):
html = unicode(mail_part.get_payload(decode=True), str(charset), "ignore")
self.finish(html)
-
@post('/delete')
def delete(self):
mid = int(self.get_argument('mid'))
@@ -83,6 +82,14 @@ class Handler(RequestHandler):
cPickle.dump(data, open(DB_PATH, 'w'))
self.redirect('/_p/rw.mail_local/')
+ @get('/json/count')
+ def count_json(self):
+ count = 0
+ if os.path.exists(DB_PATH):
+ mails = cPickle.load(open(DB_PATH))
+ count = len(mails)
+ self.finish({'count': count})
+
class HandlerPlug(rplug.rw.www):
name = 'rw.mail_local'
|
Added function to return unread messages as json.
|
diff --git a/lib/KurentoClient.js b/lib/KurentoClient.js
index <HASH>..<HASH> 100644
--- a/lib/KurentoClient.js
+++ b/lib/KurentoClient.js
@@ -177,6 +177,8 @@ function noop(error, result) {
* Timeout while a response is being stored
* @property {external:Number} [duplicates_timeout=20000]
* Timeout to ignore duplicated responses
+ * @property {Object} [socket]
+ * Websocket connection options
*/
/**
@@ -906,7 +908,7 @@ function KurentoClient(ws_uri, options, callback) {
onConnected();
}
})
- .connect(ws_uri);
+ .connect(ws_uri, options.socket);
Object.defineProperty(this, '_re', {
get: function () {
|
Forward WebSocket connection options to reconnect-ws when constructing KurentoClient instance.
|
diff --git a/src/com/googlecode/jmxtrans/util/JmxUtils.java b/src/com/googlecode/jmxtrans/util/JmxUtils.java
index <HASH>..<HASH> 100644
--- a/src/com/googlecode/jmxtrans/util/JmxUtils.java
+++ b/src/com/googlecode/jmxtrans/util/JmxUtils.java
@@ -294,7 +294,7 @@ public class JmxUtils {
private static void getResult(List<Result> resList, MBeanInfo info, ObjectInstance oi, Attribute attribute, Query query) {
Object value = attribute.getValue();
if (value != null) {
- if (value instanceof CompositeDataSupport) {
+ if (value instanceof CompositeData) {
getResult(resList, info, oi, attribute.getName(), (CompositeData) value, query);
} else if (value instanceof CompositeData[]) {
for (CompositeData cd : (CompositeData[]) value) {
|
Compare to interface not impl for CompositeData
checking for CompositeDataSupport is more specific than it needs to be. (The next line casts the value to "CompositeData") - this change will allow certain Gc fields to be parsed properly that implement CompositeData but do not extend CompositeDataSupport
|
diff --git a/PhpAmqpLib/Connection/AMQPSSLConnection.php b/PhpAmqpLib/Connection/AMQPSSLConnection.php
index <HASH>..<HASH> 100644
--- a/PhpAmqpLib/Connection/AMQPSSLConnection.php
+++ b/PhpAmqpLib/Connection/AMQPSSLConnection.php
@@ -40,6 +40,7 @@ class AMQPSSLConnection extends AMQPStreamConnection
isset($options['keepalive']) ? $options['keepalive'] : false,
isset($options['heartbeat']) ? $options['heartbeat'] : 0,
isset($options['channel_rpc_timeout']) ? $options['channel_rpc_timeout'] : 0.0,
+ $ssl_protocol
);
}
|
Return SSL protocol param in SSL connection
|
diff --git a/server/src/main/java/org/openqa/selenium/server/SeleniumServer.java b/server/src/main/java/org/openqa/selenium/server/SeleniumServer.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/org/openqa/selenium/server/SeleniumServer.java
+++ b/server/src/main/java/org/openqa/selenium/server/SeleniumServer.java
@@ -362,7 +362,7 @@ public class SeleniumServer {
if ("".equals(userInput)) continue;
if (!userInput.startsWith("cmd=") && !userInput.startsWith("commandResult=")) {
- System.err.println("ERROR - Invalid command: " + userInput);
+ System.err.println("ERROR - Invalid command: \"" + userInput + "\"");
continue;
}
|
Show invalid user input with quotes so that it will be easier to see leading spaces
r<I>
|
diff --git a/src/SAML2/AuthnRequestFactory.php b/src/SAML2/AuthnRequestFactory.php
index <HASH>..<HASH> 100644
--- a/src/SAML2/AuthnRequestFactory.php
+++ b/src/SAML2/AuthnRequestFactory.php
@@ -38,7 +38,8 @@ class AuthnRequestFactory
*/
public static function createFromHttpRequest(Request $httpRequest)
{
- $samlRequest = gzinflate(base64_decode(urldecode($httpRequest->get(AuthnRequest::PARAMETER_REQUEST))));
+ // the GET parameter is already urldecoded by Symfony, so we should not do it again.
+ $samlRequest = gzinflate(base64_decode($httpRequest->get(AuthnRequest::PARAMETER_REQUEST)));
$document = new DOMDocument();
$document->loadXML($samlRequest);
|
Fix SAMLRequest parsing
|
diff --git a/heimdall/take_screenshot.py b/heimdall/take_screenshot.py
index <HASH>..<HASH> 100644
--- a/heimdall/take_screenshot.py
+++ b/heimdall/take_screenshot.py
@@ -1,4 +1,4 @@
-from heimdall import screenshot
+from heimdall.heimdall import screenshot
if __name__ == '__main__':
|
update take_screenshot.py
Update needed in order for heimdall to work with Python3
|
diff --git a/packages/components/bolt-carousel/__tests__/carousel.js b/packages/components/bolt-carousel/__tests__/carousel.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-carousel/__tests__/carousel.js
+++ b/packages/components/bolt-carousel/__tests__/carousel.js
@@ -19,7 +19,7 @@ const vrtDefaultConfig = {
},
};
-const timeout = 120000;
+const timeout = 180000;
const viewportSizes = [
{
|
fix: increase max timeout in Carousel component Jest tests to reduce errors thrown
|
diff --git a/spyder/utils/introspection/manager.py b/spyder/utils/introspection/manager.py
index <HASH>..<HASH> 100644
--- a/spyder/utils/introspection/manager.py
+++ b/spyder/utils/introspection/manager.py
@@ -33,7 +33,7 @@ dependencies.add('rope',
_("Editor's code completion, go-to-definition and help"),
required_version=ROPE_REQVER)
-JEDI_REQVER = '>=0.8.1'
+JEDI_REQVER = '=0.9.0'
dependencies.add('jedi',
_("Editor's code completion, go-to-definition and help"),
required_version=JEDI_REQVER)
|
Introspection: Change Jedi required version to <I>
|
diff --git a/pycdlib/pycdlib.py b/pycdlib/pycdlib.py
index <HASH>..<HASH> 100644
--- a/pycdlib/pycdlib.py
+++ b/pycdlib/pycdlib.py
@@ -1421,7 +1421,7 @@ class PyCdlib(object):
if self.enhanced_vd is not None:
self.enhanced_vd.root_directory_record().new_extent_loc = self.pvd.root_directory_record().new_extent_loc
- self.needs_reshuffling = False
+ self._needs_reshuffle = False
def _add_child_to_dr(self, child, logical_block_size):
'''
|
Make sure to clear the proper _needs_reshuffle flag.
|
diff --git a/test/integration/test_buildtasks_api.py b/test/integration/test_buildtasks_api.py
index <HASH>..<HASH> 100644
--- a/test/integration/test_buildtasks_api.py
+++ b/test/integration/test_buildtasks_api.py
@@ -1,8 +1,11 @@
__author__ = 'thauser'
+import pytest
+
from test import testutils
from pnc_cli import utils
from pnc_cli.swagger_client.apis import BuildtasksApi
+
tasks_api = BuildtasksApi(utils.get_api_client())
@@ -18,6 +21,7 @@ def test_build_task_completed_invalid_param():
testutils.assert_raises_typeerror(tasks_api, 'build_task_completed', task_id=1, build_status='NEW')
+@pytest.mark.xfail(reason='unsure of how to test this correctly.')
def test_build_task_completed():
response = tasks_api.build_task_completed(task_id=1, build_status='NEW')
assert response
|
xfail the buildtasks api tests for now.
|
diff --git a/src/app/panels/timepicker/module.js b/src/app/panels/timepicker/module.js
index <HASH>..<HASH> 100644
--- a/src/app/panels/timepicker/module.js
+++ b/src/app/panels/timepicker/module.js
@@ -77,8 +77,8 @@ function (angular, app, _, moment, kbn) {
$scope.temptime = cloneTime($scope.time);
// Date picker needs the date to be at the start of the day
- $scope.temptime.from.date.setHours(0,0,0,0);
- $scope.temptime.to.date.setHours(0,0,0,0);
+ $scope.temptime.from.date.setHours(1,0,0,0);
+ $scope.temptime.to.date.setHours(1,0,0,0);
$q.when(customTimeModal).then(function(modalEl) {
modalEl.modal('show');
|
Fixes #<I>, custom datetime picker is one day off
|
diff --git a/src/Log.php b/src/Log.php
index <HASH>..<HASH> 100644
--- a/src/Log.php
+++ b/src/Log.php
@@ -1,8 +1,6 @@
<?php
namespace Phwoolcon;
-use Exception;
-use Phwoolcon\Exception\Http\NotFoundException;
use Phalcon\Di;
use Phalcon\Logger;
use Phalcon\Logger\Adapter\File;
@@ -27,7 +25,10 @@ class Log extends Logger
static::log(static::ERROR, $message, $context);
}
- public static function exception(Exception $e)
+ /**
+ * @param \Throwable $e
+ */
+ public static function exception($e)
{
$message = get_class($e);
$e instanceof HttpException or $message .= "\n" . $e->__toString();
|
fix: php7 compatibility in log::exception()
|
diff --git a/conllu/models.py b/conllu/models.py
index <HASH>..<HASH> 100644
--- a/conllu/models.py
+++ b/conllu/models.py
@@ -113,7 +113,7 @@ class TokenList(T.List[Token]):
token = self._dict_to_token_and_set_defaults(token)
super(TokenList, self).append(token)
- def insert(self, i: int, token: T.Union[dict, Token]) -> None:
+ def insert(self, i: 'SupportsIndex', token: T.Union[dict, Token]) -> None:
token = self._dict_to_token_and_set_defaults(token)
super(TokenList, self).insert(i, token)
|
Fix mypy error by making insert annotation more general.
|
diff --git a/fedmsg_meta_fedora_infrastructure/tests/pagure.py b/fedmsg_meta_fedora_infrastructure/tests/pagure.py
index <HASH>..<HASH> 100644
--- a/fedmsg_meta_fedora_infrastructure/tests/pagure.py
+++ b/fedmsg_meta_fedora_infrastructure/tests/pagure.py
@@ -2092,7 +2092,7 @@ class TestIssueDrop(Base):
}
-class TestIssueCommentEditLegacy(Base):
+class TestIssueCommentEdit(Base):
""" These messages are published when someone edits a comment on a ticket
on `pagure <https://pagure.io>`_.
"""
|
Rename TestIssueCommentEditLegacy to TestIssueCommentEdit
Since these tests are still actual and valid and thus not legacy
|
diff --git a/jsonrpc2/all_test.go b/jsonrpc2/all_test.go
index <HASH>..<HASH> 100644
--- a/jsonrpc2/all_test.go
+++ b/jsonrpc2/all_test.go
@@ -270,7 +270,11 @@ func TestBadHTTP2Server(t *testing.T) {
if err != nil {
t.Fatalf("[%#q] Write(), err = %v", c, err)
}
- resp, err := http.ReadResponse(bufio.NewReader(conn), nil)
+ req, err := http.NewRequest("POST", ts.URL, strings.NewReader(c))
+ if err != nil {
+ t.Errorf("[%#q] NewRequest(), err = %v", c, err)
+ }
+ resp, err := http.ReadResponse(bufio.NewReader(conn), req)
if err != nil {
t.Fatalf("[%#q] ReadResponse(), err = %v", c, err)
}
|
fix tests for go-<I>
|
diff --git a/yotta/test/test_versions.py b/yotta/test/test_versions.py
index <HASH>..<HASH> 100644
--- a/yotta/test/test_versions.py
+++ b/yotta/test/test_versions.py
@@ -18,9 +18,9 @@ class VersionTestCase(unittest.TestCase):
['0.1.2-alpha', '0.1.2', '1.3.4'],
),
'>=0.1.0,!=0.1.3-rc1,<0.1.4': (
- ['0.1.1', 'v0.1.0+b4', '0.1.2', '0.1.3-rc2'],
- ['0.0.1', '0.1.4', '0.1.4-alpha', '0.1.3-rc1+4',
- '0.1.0-alpha', 'v0.2.2', '0.2.2', '0.1.4-rc1'],
+ # 0.1.0-alpha satisfies >=0.1.0, but is lower precedence than 0.1.0
+ ['0.1.0-alpha', '0.1.1', 'v0.1.0+b4', '0.1.2', '0.1.3-rc2'],
+ ['0.0.1', '0.1.4', '0.1.4-alpha', '0.1.3-rc1+4', 'v0.2.2', '0.2.2', '0.1.4-rc1']
),
'^1.2.3':(
['1.2.3', '1.5.1'],
|
prerelease versions are (and should be) matched by >= version
|
diff --git a/codebird.js b/codebird.js
index <HASH>..<HASH> 100644
--- a/codebird.js
+++ b/codebird.js
@@ -1219,7 +1219,7 @@ var Codebird = function () {
var xml = null;
if (typeof window === "object"
&& window
- && typeof window.XMLHttpRequest === "function"
+ && typeof window.XMLHttpRequest !== "undefined"
) {
xml = new window.XMLHttpRequest();
} else if (typeof require === "function"
|
Change window.XMLHttpRequest typeof check to look for not-undefined, instead of function. Now detects XHR on Safari properly.
|
diff --git a/Test/Integration/Collection/CollectHooksTest.php b/Test/Integration/Collection/CollectHooksTest.php
index <HASH>..<HASH> 100644
--- a/Test/Integration/Collection/CollectHooksTest.php
+++ b/Test/Integration/Collection/CollectHooksTest.php
@@ -52,7 +52,7 @@ class CollectHooksTest extends CollectionTestBase {
$body = $hook_entity_base_field_info_data['body'];
$this->assertNotEmpty($body);
- $this->assertContains(
+ $this->assertStringContainsStringIgnoringCase(
"\$fields['mymodule_text'] = \Drupal\Core\Field\BaseFieldDefinition::create('string')",
$body,
'The short class name in hook body code is replaced with the fully-qualified version.'
|
Updated for deprecated assertion usage.
|
diff --git a/zinnia/management/commands/wp2zinnia.py b/zinnia/management/commands/wp2zinnia.py
index <HASH>..<HASH> 100644
--- a/zinnia/management/commands/wp2zinnia.py
+++ b/zinnia/management/commands/wp2zinnia.py
@@ -136,16 +136,20 @@ class Command(LabelCommand):
while 42:
user_text = "1. Select your user, by typing " \
"one of theses usernames:\n"\
- "[%s]\n"\
+ "[%s] or 'back'\n"\
"Please select a choice: " % ', '.join(usernames)
user_selected = raw_input(user_text)
if user_selected in usernames:
break
+ if user_selected.strip() == 'back':
+ return self.migrate_author(author_name)
return users.get(username=user_selected)
else:
- create_text = "2. Please type the email of the '%s' user: " % \
- author_name
+ create_text = "2. Please type the email of " \
+ "the '%s' user or 'back': " % author_name
author_mail = raw_input(create_text)
+ if author_mail.strip() == 'back':
+ return self.migrate_author(author_name)
try:
return User.objects.create_user(author_name, author_mail)
except IntegrityError:
|
can go back when migrating wp authors
|
diff --git a/pyradigm/base.py b/pyradigm/base.py
index <HASH>..<HASH> 100644
--- a/pyradigm/base.py
+++ b/pyradigm/base.py
@@ -37,8 +37,9 @@ class BaseDataset(ABC):
Parameters
-----------
- target_type : type
+ target_type : type, callable
Data type of the target for the child class.
+ Must be callable that takes in a datatype and converts to its own type.
allow_nan_inf : bool or str
Flag to indicate whether raise an error if NaN or Infinity values are
@@ -47,9 +48,20 @@ class BaseDataset(ABC):
'Inf' to specify which value to allow depending on your needs.
"""
- self._target_type = target_type
- self._allow_nan_inf = allow_nan_inf
- self._encode_nonnumeric = encode_nonnumeric
+ if not callable(target_type):
+ raise TypeError('target type must be callable, to allow for conversion!')
+ else:
+ self._target_type = target_type
+
+ if not isinstance(allow_nan_inf, (bool, str)):
+ raise TypeError('allow_nan_inf flag can only be bool or str')
+ else:
+ self._allow_nan_inf = allow_nan_inf
+
+ if not isinstance(encode_nonnumeric, bool):
+ raise TypeError('encode_nonnumeric flag can only be bool')
+ else:
+ self._encode_nonnumeric = encode_nonnumeric
@property
|
enforcing init expectations from child classes
|
diff --git a/panoramix/views.py b/panoramix/views.py
index <HASH>..<HASH> 100644
--- a/panoramix/views.py
+++ b/panoramix/views.py
@@ -352,15 +352,16 @@ class Panoramix(BaseView):
datasource,
form_data=request.args)
if request.args.get("json") == "true":
+ status = 200
if config.get("DEBUG"):
payload = obj.get_json()
- try:
- payload = obj.get_json()
- status=200
- except Exception as e:
- logging.exception(e)
- payload = str(e)
- status=500
+ else:
+ try:
+ payload = obj.get_json()
+ except Exception as e:
+ logging.exception(e)
+ payload = str(e)
+ status = 500
return Response(
payload,
status=status,
|
Fix debug mode calls get_json twice
|
diff --git a/src/Codeception/Util/FileSystem.php b/src/Codeception/Util/FileSystem.php
index <HASH>..<HASH> 100644
--- a/src/Codeception/Util/FileSystem.php
+++ b/src/Codeception/Util/FileSystem.php
@@ -44,13 +44,7 @@ class FileSystem
}
if (!is_dir($dir) || is_link($dir)) {
- return unlink($dir);
- }
-
- if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
- $dir = str_replace('/', '\\', $dir);
- exec('rd /s /q "'.$dir.'"');
- return true;
+ return @unlink($dir);
}
foreach (scandir($dir) as $item) {
@@ -66,7 +60,7 @@ class FileSystem
}
}
- return rmdir($dir);
+ return @rmdir($dir);
}
/**
|
reverted back changes in filesystem cleanup
|
diff --git a/py3status/modules/systemd.py b/py3status/modules/systemd.py
index <HASH>..<HASH> 100644
--- a/py3status/modules/systemd.py
+++ b/py3status/modules/systemd.py
@@ -14,6 +14,7 @@ Configuration parameters:
'inactive' the output is suppressed if the unit is inactive
(default 'off')
unit: specify the systemd unit to use (default 'dbus.service')
+ user: specify if this is a user service (default False)
Format of status string placeholders:
{unit} unit name, eg sshd.service
@@ -51,7 +52,7 @@ not-found
{'color': '#FFFF00', 'full_text': 'sshd.service: not-found'}
"""
-from pydbus import SystemBus
+from pydbus import SessionBus, SystemBus
class Py3status:
@@ -64,9 +65,13 @@ class Py3status:
hide_extension = False
hide_if_default = "off"
unit = "dbus.service"
+ user = False
def post_config_hook(self):
- bus = SystemBus()
+ if self.user:
+ bus = SessionBus()
+ else:
+ bus = SystemBus()
systemd = bus.get("org.freedesktop.systemd1")
self.systemd_unit = bus.get(".systemd1", systemd.LoadUnit(self.unit))
|
systemd: support user systemd units (#<I>)
|
diff --git a/runtime/src/main/java/com/tns/Runtime.java b/runtime/src/main/java/com/tns/Runtime.java
index <HASH>..<HASH> 100644
--- a/runtime/src/main/java/com/tns/Runtime.java
+++ b/runtime/src/main/java/com/tns/Runtime.java
@@ -452,14 +452,16 @@ public class Runtime {
throw new RuntimeException("Fail to initialize Require class", ex);
}
- if (debugger != null) {
+ // TODO: Pete: this.runtimeId == 0 is a temporary patching of jsDebugger not attaching on app start
+ // TODO: Pete: Debugger should not be created when a worker is created
+ if (debugger != null && this.runtimeId == 0) {
jsDebugger = new JsDebugger(debugger, threadScheduler);
}
initNativeScript(getRuntimeId(), Module.getApplicationFilesPath(), logger.isEnabled(), appName, v8Config, callingJsDir, jsDebugger);
- if (jsDebugger != null) {
- // jsDebugger.start();
+ if (jsDebugger != null && this.runtimeId == 0) {
+ jsDebugger.start();
}
clearStartupData(getRuntimeId()); // It's safe to delete the data after the V8 debugger is initialized
|
Fix js debugger not attaching on app start
|
diff --git a/src/test/java/me/atam/atam4j/AcceptanceTestHealthCheckManagerIntegrationTest.java b/src/test/java/me/atam/atam4j/AcceptanceTestHealthCheckManagerIntegrationTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/me/atam/atam4j/AcceptanceTestHealthCheckManagerIntegrationTest.java
+++ b/src/test/java/me/atam/atam4j/AcceptanceTestHealthCheckManagerIntegrationTest.java
@@ -34,6 +34,7 @@ public class AcceptanceTestHealthCheckManagerIntegrationTest {
new Atam4j.Atam4jBuilder()
.withTestClasses(new Class[]{PassingTest.class})
.withEnvironment(environment)
+ .withInitialDelay(0)
.build()
.initialise();
|
Override initalDelay in Test
- Default value has been changed in the library which doesn't suit tests. Hence tests should override the value using the builder.
|
diff --git a/src/class-u.php b/src/class-u.php
index <HASH>..<HASH> 100644
--- a/src/class-u.php
+++ b/src/class-u.php
@@ -49,7 +49,7 @@ interface U {
const HAIR_SPACE = "\xe2\x80\x8a";
const ZERO_WIDTH_SPACE = "\xe2\x80\x8b";
const HYPHEN_MINUS = '-';
- const HYPHEN = self::HYPHEN_MINUS; // "\xe2\x80\x90"; // should be Strings::_uchr(8208), but IE6 chokes.
+ const HYPHEN = self::HYPHEN_MINUS; // Should be "\xe2\x80\x90" (\u8208), but IE6 chokes.
const NO_BREAK_HYPHEN = "\xe2\x80\x91";
const EN_DASH = "\xe2\x80\x93";
const EM_DASH = "\xe2\x80\x94";
|
Docs: reword comment to let it pass style checks
|
diff --git a/test/host/loader.js b/test/host/loader.js
index <HASH>..<HASH> 100644
--- a/test/host/loader.js
+++ b/test/host/loader.js
@@ -171,6 +171,12 @@
};
},
+ _setupInclude = function (configuration) {
+ context.include = function (source) {
+ _loadTest(configuration, source);
+ }
+ },
+
_loadTestsFromNames = function (configuration, names, verbose) {
var len = names.length,
sourceIdx,
@@ -459,6 +465,7 @@
verbose("Console loaded.");
}
_setupConfig(configuration);
+ _setupInclude(configuration);
_loadTests(configuration, options, verbose);
_safeRunBDD(configuration, options, verbose);
};
|
include helper (#<I>)
|
diff --git a/test/src/Provider/GithubTest.php b/test/src/Provider/GithubTest.php
index <HASH>..<HASH> 100644
--- a/test/src/Provider/GithubTest.php
+++ b/test/src/Provider/GithubTest.php
@@ -66,12 +66,11 @@ class GithubTest extends ConcreteProviderTest
*/
public function testGetAccessTokenWithInvalidJson()
{
- $response = m::mock('Guzzle\Http\Message\Response');
- $response->shouldReceive('getBody')->times(1)->andReturn('invalid');
+ $client = $this->createMockHttpClient();
+ $response = $this->createMockResponse('invalid');
+
+ $client->shouldReceive('post')->times(1)->andReturn($response);
- $client = m::mock('Guzzle\Service\Client');
- $client->shouldReceive('setBaseUrl')->times(1);
- $client->shouldReceive('post->send')->times(1)->andReturn($response);
$this->provider->setHttpClient($client);
$this->provider->responseType = 'json';
|
Fix test for <I> branch
|
diff --git a/salt/state.py b/salt/state.py
index <HASH>..<HASH> 100644
--- a/salt/state.py
+++ b/salt/state.py
@@ -1288,17 +1288,19 @@ class BaseHighState(object):
'as a list'.format(sls))
errors.append(err)
else:
- for sub_sls in state.pop('include'):
- if sub_sls not in mods:
- nstate, mods, err = self.render_state(
- sub_sls,
- env,
- mods
- )
- if nstate:
- state.update(nstate)
- if err:
- errors += err
+ for inc_sls in state.pop('include'):
+ for sub_sls in fnmatch.filter(
+ self.avail[env], inc_sls):
+ if sub_sls not in mods:
+ nstate, mods, err = self.render_state(
+ sub_sls,
+ env,
+ mods
+ )
+ if nstate:
+ state.update(nstate)
+ if err:
+ errors += err
if 'extend' in state:
ext = state.pop('extend')
for name in ext:
|
Add glob mathing to include statements
|
diff --git a/routing/heap_test.go b/routing/heap_test.go
index <HASH>..<HASH> 100644
--- a/routing/heap_test.go
+++ b/routing/heap_test.go
@@ -26,7 +26,7 @@ func TestHeapOrdering(t *testing.T) {
sortedEntries := make([]nodeWithDist, 0, numEntries)
for i := 0; i < numEntries; i++ {
entry := nodeWithDist{
- dist: prand.Float64(),
+ dist: prand.Int63(),
}
heap.Push(&nodeHeap, entry)
|
routing: correct recent type change in heap_test.go
|
diff --git a/js/tests/client/client.js b/js/tests/client/client.js
index <HASH>..<HASH> 100644
--- a/js/tests/client/client.js
+++ b/js/tests/client/client.js
@@ -10,7 +10,7 @@ var http = require( 'http' ),
// git log --max-count=1 --pretty=format:"%H""
// git rev-parse HEAD
- config = require( './config.js' ),
+ config = require( process.argv[1] || './config.js' ),
rtTest = require( '../roundtrip-test.js' ),
getTitle = function ( cb ) {
|
Support passing in the config path to the client
Change-Id: Ia9b<I>b6c<I>e0be3ee<I>e5f<I>ce<I>d<I>
|
diff --git a/tests/heroku/test_plugin.py b/tests/heroku/test_plugin.py
index <HASH>..<HASH> 100644
--- a/tests/heroku/test_plugin.py
+++ b/tests/heroku/test_plugin.py
@@ -1,12 +1,13 @@
from __future__ import absolute_import
-from mock import patch
+from mock import Mock, patch
from django.utils import timezone
from datetime import timedelta
+from sentry.exceptions import HookValidationError
from sentry.models import (Commit, Deploy, Environment,
ProjectOption, Release, ReleaseCommit,
ReleaseHeadCommit, Repository, User)
@@ -130,3 +131,19 @@ class SetRefsTest(TestCase):
'prev_release_id': old_release.id,
}
)
+
+
+class HookHandleTest(TestCase):
+ def test_bad_version(self):
+ project = self.create_project()
+ user = self.create_user()
+ hook = HerokuReleaseHook(project)
+
+ req = Mock()
+ req.POST = {
+ 'head_long': '',
+ 'url': 'http://example.com',
+ 'user': user.email,
+ }
+ with self.assertRaises(HookValidationError):
+ hook.handle(req)
|
add test to heroku plugin to make sure version is validated (#<I>)
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -3,6 +3,10 @@ $LOAD_PATH << File.expand_path('../../spec/helpers', __FILE__)
require 'buildpack/packager'
require 'file_system_helpers'
+unless system("which tree")
+ raise "Please install the `tree` commandline tool."
+end
+
RSpec.configure do |config|
config.include FileSystemHelpers
end
|
Check for existence of `tree` before running suite.
|
diff --git a/raygun_django_middleware/__init__.py b/raygun_django_middleware/__init__.py
index <HASH>..<HASH> 100644
--- a/raygun_django_middleware/__init__.py
+++ b/raygun_django_middleware/__init__.py
@@ -58,7 +58,8 @@ class RaygunMiddleware(object):
'httpMethod': request.method,
'ipAddress': request.META.get('REMOTE_ADDR', '?'),
'queryString': dict((key, request.GET[key]) for key in request.GET),
- 'form': dict((key, request.POST[key]) for key in request.POST),
+ # F. Henard - 2/19/18 - bad practice to access request.POST in middleware - see https://stackoverflow.com/a/28641930
+ # 'form': dict((key, request.POST[key]) for key in request.POST),
'headers': _headers,
'rawData': raw_data,
}
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name="raygun-django-middleware",
- version="1.0.6",
+ version="1.0.7",
description="Raygun Django Middleware",
author="Mirus Research",
author_email="frank@mirusresearch.com",
|
don't access request.POST in middleware
|
diff --git a/clkhash/rest_client.py b/clkhash/rest_client.py
index <HASH>..<HASH> 100644
--- a/clkhash/rest_client.py
+++ b/clkhash/rest_client.py
@@ -87,10 +87,14 @@ def run_get_status(server, project, run, apikey):
def run_get_result_text(server, project, run, apikey):
- return requests.get(
+ response = requests.get(
'{}/api/v1/projects/{}/runs/{}/result'.format(server, project, run),
headers={"Authorization": apikey}
- ).text
+ )
+
+ if response.status_code != 200:
+ raise ServiceError("Error retrieving results", response)
+ return response.text
def format_run_status(status):
|
Treat the results endpoint the same and raise an exception on != <I> status
|
diff --git a/lib/active_admin/helpers/collection.rb b/lib/active_admin/helpers/collection.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin/helpers/collection.rb
+++ b/lib/active_admin/helpers/collection.rb
@@ -5,6 +5,7 @@ module ActiveAdmin
# 2. correctly handles the Hash returned when `group by` is used
def collection_size(c = collection)
return c.count if c.is_a?(Array)
+ return c.length if c.limit_value
c = c.except :select, :order
diff --git a/spec/unit/views/components/paginated_collection_spec.rb b/spec/unit/views/components/paginated_collection_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/views/components/paginated_collection_spec.rb
+++ b/spec/unit/views/components/paginated_collection_spec.rb
@@ -241,6 +241,15 @@ RSpec.describe ActiveAdmin::Views::PaginatedCollection do
.not_to make_database_queries(matching: "SELECT COUNT(*) FROM \"posts\"")
end
+ it "makes no COUNT queries to figure out the last element of each page" do
+ require "db-query-matchers"
+
+ undecorated_collection = Post.all.page(1).per(30)
+
+ expect { paginated_collection(undecorated_collection) }
+ .not_to make_database_queries(matching: "SELECT COUNT(*) FROM (SELECT")
+ end
+
context "when specifying per_page: array option" do
let(:collection) do
posts = 10.times.map { Post.new }
|
Use collection length instead of running COUNTs for limited collections (#<I>)
|
diff --git a/demo/runner.js b/demo/runner.js
index <HASH>..<HASH> 100644
--- a/demo/runner.js
+++ b/demo/runner.js
@@ -8,7 +8,7 @@ var files = fs.readdirSync( './entry/' );
files.forEach( function ( file ) {
var codeStr = fs.readFileSync( './entry/' + file ).toString();
- var formattedCode = esformatter.format( codeStr, {
+ var options = {
'whiteSpace': {
'value': ' ',
'removeTrailing': 1,
@@ -35,8 +35,13 @@ files.forEach( function ( file ) {
'preserve_newlines': true
}
}
- } );
+ };
+ var formattedCode = esformatter.format( codeStr, options );
fs.writeFileSync( './result/' + path.basename( file ), formattedCode );
+ var reformattedCode = esformatter.format( formattedCode, options );
+ if (formattedCode !== reformattedCode) {
+ throw new Error( 'Expected ' + file + ' to reformat to the same result' );
+ }
} );
|
Reformat within demo to ensure equal results
|
diff --git a/test/integration/percolator_test.rb b/test/integration/percolator_test.rb
index <HASH>..<HASH> 100644
--- a/test/integration/percolator_test.rb
+++ b/test/integration/percolator_test.rb
@@ -106,6 +106,6 @@ module Tire
Configuration.client.get("#{Configuration.url}/_percolator/percolator-test/weather") rescue nil
end
- end
+ end unless ENV['TRAVIS']
end
|
[TEST] Do not run percolator tests on TravisCI
Related: karmi/tire@<I>ad5
|
diff --git a/src/main/java/me/gosimple/nbvcxz/resources/ConfigurationBuilder.java b/src/main/java/me/gosimple/nbvcxz/resources/ConfigurationBuilder.java
index <HASH>..<HASH> 100644
--- a/src/main/java/me/gosimple/nbvcxz/resources/ConfigurationBuilder.java
+++ b/src/main/java/me/gosimple/nbvcxz/resources/ConfigurationBuilder.java
@@ -106,6 +106,18 @@ public class ConfigurationBuilder
}
/**
+ * This list was compiled in August 2018 using a baseline of what could be bought for roughly $20k usd for the offline attack values.
+ * <p>
+ * In the case this library is no longer maintained (or you choose to stay on an old version of it), we will scale the existing values by Moore's law.
+ *
+ * @return The default list of guess types and associated values of guesses per second.
+ */
+ public static Map<String, Long> getDefaultGuessTypes()
+ {
+ return getDefaultGuessTypes(getDefaultCrackingHardwareCost());
+ }
+
+ /**
* @return Returns all the dictionaries included with Nbvcxz.
* Namely there is a dictionary for common passwords, english male names, english female names, english surnames, and common english words.
*/
|
Add non-parameter getter for default guess types back in to not break API.
|
diff --git a/tests/OutputTest.php b/tests/OutputTest.php
index <HASH>..<HASH> 100644
--- a/tests/OutputTest.php
+++ b/tests/OutputTest.php
@@ -148,10 +148,18 @@ class OutputTest extends TestCase
}
- public function testSetDecorated(): void
+ public function testSetDecorated1(): void
{
- $this->console->shouldReceive("setDecorated")->once()->with(7);
- $this->output->setDecorated(7);
+ $this->console->shouldReceive("setDecorated")->once()->with(true);
+ $this->output->setDecorated(true);
+ $this->assertTrue(true);
+ }
+
+
+ public function testSetDecorated2(): void
+ {
+ $this->console->shouldReceive("setDecorated")->once()->with(false);
+ $this->output->setDecorated(false);
$this->assertTrue(true);
}
|
Use correct data types for the setDecorated() tests
|
diff --git a/src/Datasource/InvalidPropertyInterface.php b/src/Datasource/InvalidPropertyInterface.php
index <HASH>..<HASH> 100644
--- a/src/Datasource/InvalidPropertyInterface.php
+++ b/src/Datasource/InvalidPropertyInterface.php
@@ -36,7 +36,7 @@ interface InvalidPropertyInterface
* This value could not be patched into the entity and is simply copied into the _invalid property for debugging
* purposes or to be able to log it away.
*
- * @param array $fields The values to set.
+ * @param array<string, mixed> $fields The values to set.
* @param bool $overwrite Whether to overwrite pre-existing values for $field.
* @return $this
*/
|
Fix up assoc return docblocks.
|
diff --git a/pyquil/api/qvm.py b/pyquil/api/qvm.py
index <HASH>..<HASH> 100644
--- a/pyquil/api/qvm.py
+++ b/pyquil/api/qvm.py
@@ -319,9 +319,16 @@ programs run on this QVM.
sample. The expectations returned from *different* ``expectation`` calls *will then
generally be different*.
+ To measure the expectation of a PauliSum, you probably want to
+ do something like this::
+
+ progs, coefs = hamiltonian.get_programs()
+ expect_coeffs = np.array(cxn.expectation(prep_program, operator_programs=progs))
+ return np.real_if_close(np.dot(coefs, expect_coeffs))
+
:param Program prep_prog: Quil program for state preparation.
:param list operator_programs: A list of Programs, each specifying an operator whose expectation to compute.
- Default is a list containing only the empty Program.
+ Default is a list containing only the empty Program.
:param bool needs_compilation: If True, preprocesses the job with the compiler.
:param ISA isa: If set, compiles to this target ISA.
:returns: Expectation value of the operators.
|
Improve expectation docs (#<I>)
See #<I>
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,3 +1,4 @@
+import os
import sys
import warnings
from pathlib import Path
@@ -14,6 +15,7 @@ with warnings.catch_warnings():
warnings.filterwarnings('ignore', category=FutureWarning)
import scanpy.api
+on_rtd = os.environ.get('READTHEDOCS') == 'True'
# -- General configuration ------------------------------------------------
@@ -107,7 +109,7 @@ gh_url = 'https://github.com/{github_user}/{github_repo}'.format_map(html_contex
def setup(app):
- app.warningiserror = True
+ app.warningiserror = on_rtd
app.add_stylesheet('css/custom.css')
app.connect('autodoc-process-docstring', insert_function_images)
app.connect('build-finished', show_param_warnings)
|
Only make broken links cause a doc build failure when on readthedocs
Errors cause cache invalidation, making sphinx very slow on repeated builds.
We want the docs to fail building on rtd (to see errors) but locally warnings are sufficient.
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -201,7 +201,7 @@ function renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {
}
s = `<${nodeName}${s}>`;
- if (String(nodeName).match(/[\s\n\\/='"\0<>]/)) throw s;
+ if (String(nodeName).match(/[\s\n\\/='"\0<>]/)) throw new Error(`${nodeName} is not a valid HTML tag name in ${s}`);
let isVoid = String(nodeName).match(VOID_ELEMENTS);
if (isVoid) s = s.replace(/>$/, ' />');
|
Always throw errors, not strings (#<I>)
|
diff --git a/lib/did_you_mean/word_collection.rb b/lib/did_you_mean/word_collection.rb
index <HASH>..<HASH> 100644
--- a/lib/did_you_mean/word_collection.rb
+++ b/lib/did_you_mean/word_collection.rb
@@ -13,18 +13,12 @@ module DidYouMean
def similar_to(target_word)
target_word = target_word.to_s.downcase
- threshold = threshold(target_word)
+ threshold = (target_word.size * 0.3).ceil
map {|word| [Levenshtein.distance(word.to_s.downcase, target_word), word] }
.select {|distance, _| distance <= threshold }
.sort
.map(&:last)
end
-
- private
-
- def threshold(word)
- (word.size * 0.3).ceil
- end
end
end
|
Inline private WordCollection#threshold method
|
diff --git a/src/extensions/ignite.js b/src/extensions/ignite.js
index <HASH>..<HASH> 100644
--- a/src/extensions/ignite.js
+++ b/src/extensions/ignite.js
@@ -2,6 +2,7 @@
// of the functions defined here are available as functions on that.
// bring in each of the constituents
+const shell = require('shelljs')
const ignitePluginPathExt = require('./ignite/ignitePluginPath')
const igniteConfigExt = require('./ignite/igniteConfig')
const findIgnitePluginsExt = require('./ignite/findIgnitePlugins')
@@ -38,7 +39,7 @@ function attach (plugin, command, context) {
const forceNpm = parameters.options.npm
// should we be using yarn?
- const useYarn = !forceNpm && system.which('yarn')
+ const useYarn = !forceNpm && Boolean(shell.which('yarn'))
// the ignite plugin path
const {
|
Fixed failure when missing yarn (#<I>)
This fixes #<I>
|
diff --git a/lib/stars/favstar.rb b/lib/stars/favstar.rb
index <HASH>..<HASH> 100644
--- a/lib/stars/favstar.rb
+++ b/lib/stars/favstar.rb
@@ -16,7 +16,7 @@ module Stars
def show(url)
# hardcode 17 to strip favstar domain for now
html = self.class.get(url[17..200], :format => :html)
- Nokogiri::HTML(html).css('.avatarList img').collect do |img|
+ Nokogiri::HTML(html).css('div[id^="faved_by_others"] img').collect do |img|
" ★ #{img.attributes['alt'].value}"
end
end
|
THE KYLE NEATH HOTFIX
|
diff --git a/neo4j/v1/__init__.py b/neo4j/v1/__init__.py
index <HASH>..<HASH> 100644
--- a/neo4j/v1/__init__.py
+++ b/neo4j/v1/__init__.py
@@ -17,3 +17,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+
+from .session import *
+from .typesystem import *
|
Readded exports to neo4j.v1 package
|
diff --git a/examples/echoes_bot.rb b/examples/echoes_bot.rb
index <HASH>..<HASH> 100755
--- a/examples/echoes_bot.rb
+++ b/examples/echoes_bot.rb
@@ -4,6 +4,7 @@
#
# require the dsl lib to include all the methods you see below.
#
+require 'rubygems'
require 'chatterbot/dsl'
puts "Loading echoes_bot.rb"
|
added call to rubygems for completeness
|
diff --git a/sippr.py b/sippr.py
index <HASH>..<HASH> 100755
--- a/sippr.py
+++ b/sippr.py
@@ -132,6 +132,7 @@ class Sipprverse(object):
self.serotype = args.serotype
self.sixteens = args.sixteens
self.virulence = args.virulence
+ self.averagedepth = args.averagedepth
try:
self.user_genes = os.path.join(args.user_genes)
assert os.path.isfile(self.user_genes), 'Cannot find user-supplied target file: {targets}. Please ' \
@@ -176,7 +177,11 @@ if __name__ == '__main__':
required=True,
help='Path of .fastq(.gz) files to process.')
parser.add_argument('-r', '--referencefilepath',
+ required=True,
help='Provide the location of the folder containing reference database')
+ parser.add_argument('-a', '--averagedepth',
+ default=2,
+ help='Cutoff value for mapping depth to use when parsing BAM files.')
parser.add_argument('-n', '--numthreads',
help='Number of threads. Default is the number of cores in the system')
parser.add_argument('-c', '--customcutoffs',
|
Reducing the average depth mapping depth defaults
|
diff --git a/http/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/listener/HTTPServerConnector.java b/http/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/listener/HTTPServerConnector.java
index <HASH>..<HASH> 100644
--- a/http/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/listener/HTTPServerConnector.java
+++ b/http/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/listener/HTTPServerConnector.java
@@ -50,11 +50,7 @@ public class HTTPServerConnector extends ServerConnector {
if (listenerConfiguration.isBindOnStartup()) { // Already bind at the startup, hence skipping
return;
}
- try {
- serverConnectorController.bindInterface(this);
- } catch (Exception e) {
- throw new ServerConnectorException("Cannot bind to " + this + " : " + e.getMessage(), e);
- }
+ serverConnectorController.bindInterface(this);
}
@Override
public void stop() {
|
Modified code base for new carbon-messaging <I>
|
diff --git a/src/Utils/TokenUtils.php b/src/Utils/TokenUtils.php
index <HASH>..<HASH> 100644
--- a/src/Utils/TokenUtils.php
+++ b/src/Utils/TokenUtils.php
@@ -266,8 +266,10 @@ class TokenUtils {
// src offsets used to set mw:TemplateParams
if ( $offset === null ) {
$a->srcOffsets = null;
- } elseif ( $a->srcOffsets ) {
+ } elseif ( $a->srcOffsets !== null ) {
for ( $k = 0; $k < count( $a->srcOffsets ); $k++ ) {
+ // phpcs:disable Generic.Files.LineLength.TooLong
+ // @phan-suppress-next-line PhanTypeArraySuspiciousNullable https://github.com/phan/phan/issues/805
$a->srcOffsets[$k] += $offset;
}
}
|
Fix a phan warning in TokenUtils.php
Phan doesn't propagate the result of the test back to the value of
the property, which is <URL>
|
diff --git a/packages/upload/src/UploadProgressBar.js b/packages/upload/src/UploadProgressBar.js
index <HASH>..<HASH> 100644
--- a/packages/upload/src/UploadProgressBar.js
+++ b/packages/upload/src/UploadProgressBar.js
@@ -55,7 +55,7 @@ class UploadProgressBar extends Component {
event.preventDefault();
upload.sendPassword(password);
if (typeof onPasswordSubmit === 'function') {
- onPasswordSubmit(event);
+ onPasswordSubmit(event, upload);
}
this.toggleModal();
};
|
feat(upload): return upload onPasswordSubmit callback
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -188,10 +188,6 @@ var request = function request(method, path, query, options, callback){
}
});
- if (options.timeout) {
- req.setTimeout(options.timeout);
- }
-
req.on('error', function(e){
debug('Error', e);
reject(e);
|
fix(#request): Remove setTimeout option
It does not work in browsers, and is not important, yet.
|
diff --git a/bot/index.js b/bot/index.js
index <HASH>..<HASH> 100644
--- a/bot/index.js
+++ b/bot/index.js
@@ -145,10 +145,10 @@ module.exports = (app) => {
const log = makeLogFn(repository, pullNumber)
- if (context.payload.repository.private) {
- log('Repository is private, skipping landr build')
- return
- }
+ // If (context.payload.repository.private) {
+ // log('Repository is private, skipping landr build')
+ // return
+ // }
log(`Triggering build for PR: ${url}`)
|
Enable private repo builds for landrbot
Change-type: minor
|
diff --git a/admin/resource.go b/admin/resource.go
index <HASH>..<HASH> 100644
--- a/admin/resource.go
+++ b/admin/resource.go
@@ -138,6 +138,9 @@ MetaIncluded:
func (res *Resource) IndexAttrs(columns ...string) []string {
if len(columns) > 0 {
res.indexAttrs = columns
+ if len(res.searchAttrs) == 0 {
+ res.SearchAttrs(columns...)
+ }
}
if len(res.indexAttrs) == 0 {
return res.allAttrs()
@@ -230,6 +233,7 @@ func (res *Resource) SearchAttrs(columns ...string) []string {
}
}
}
+
return res.searchAttrs
}
|
Set search attrs if doesn't exist
|
diff --git a/schedule/__init__.py b/schedule/__init__.py
index <HASH>..<HASH> 100644
--- a/schedule/__init__.py
+++ b/schedule/__init__.py
@@ -134,11 +134,14 @@ class Job(object):
timestats = '(last run: %s, next run: %s)' % (
format_time(self.last_run), format_time(self.next_run))
- job_func_name = self.job_func.__name__
- args = [repr(x) for x in self.job_func.args]
- kwargs = ['%s=%s' % (k, repr(v))
- for k, v in self.job_func.keywords.items()]
- call_repr = job_func_name + '(' + ', '.join(args + kwargs) + ')'
+ try:
+ job_func_name = self.job_func.__name__
+ args = [repr(x) for x in self.job_func.args]
+ kwargs = ['%s=%s' % (k, repr(v))
+ for k, v in self.job_func.keywords.items()]
+ call_repr = job_func_name + '(' + ', '.join(args + kwargs) + ')'
+ except AttributeError:
+ call_repr = repr(self.job_func)
if self.at_time is not None:
return 'Every %s %s at %s do %s %s' % (
|
Add fallback for when job_func has no name
|
diff --git a/lib/active_mocker/rspec_helper.rb b/lib/active_mocker/rspec_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/active_mocker/rspec_helper.rb
+++ b/lib/active_mocker/rspec_helper.rb
@@ -1,3 +1,5 @@
+require 'active_mocker/loaded_mocks'
+
RSpec.configure do |config|
def mock_class(class_name)
|
Require loaded_mocks
If no mocks are required the constant lookup fails.
|
diff --git a/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js b/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js
+++ b/app/assets/javascripts/govuk_publishing_components/lib/header-navigation.js
@@ -47,3 +47,23 @@
}
}
}).call(this)
+
+;(function () {
+ var $menuToggleButtons = document.querySelectorAll('.govuk-js-header-toggle')
+
+ for (var j = 0; j < $menuToggleButtons.length; j++) {
+ var element = $menuToggleButtons[j]
+
+ element.addEventListener('click', function (event) {
+ var expanded = event.target.getAttribute('aria-expanded')
+
+ if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
+ if (expanded === 'true') {
+ window.GOVUK.analytics.trackEvent('headerClicked', 'menuClosed', { label: 'none' })
+ } else {
+ window.GOVUK.analytics.trackEvent('headerClicked', 'menuOpened', { label: 'none' })
+ }
+ }
+ })
+ }
+})()
|
Added tracking for the header menu toggle
There is already tracking in place to see how users use the search
toggle - this adds tracking for the menu toggle.
Since the functionality for the toggling of the menu comes from GOV.UK
Frontend, this needed to be a separate event listener added to
specifically send events to analytics.
This can be removed when the user research has been completed.
|
diff --git a/DeviceDetector.php b/DeviceDetector.php
index <HASH>..<HASH> 100644
--- a/DeviceDetector.php
+++ b/DeviceDetector.php
@@ -47,7 +47,7 @@ class DeviceDetector
/**
* Current version number of DeviceDetector
*/
- const VERSION = '3.1.1';
+ const VERSION = '3.3.0';
/**
* Holds all registered client types
|
next version will be <I>
|
diff --git a/ImageHandler.php b/ImageHandler.php
index <HASH>..<HASH> 100755
--- a/ImageHandler.php
+++ b/ImageHandler.php
@@ -28,7 +28,7 @@ class ImageHandler extends Image
{
$callback = $this->fileCallback;
- if (null !== $callback)
+ if (null === $callback)
return $filename;
return $callback($filename);
|
[ImageHandler] Problem with callback (fixes #7]
|
diff --git a/config/set/early-return.php b/config/set/early-return.php
index <HASH>..<HASH> 100644
--- a/config/set/early-return.php
+++ b/config/set/early-return.php
@@ -3,6 +3,7 @@
declare(strict_types=1);
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
+use Rector\EarlyReturn\Rector\Foreach_\ReturnAfterToEarlyOnBreakRector;
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
use Rector\EarlyReturn\Rector\If_\ChangeNestedIfsToEarlyReturnRector;
@@ -22,4 +23,5 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services->set(ReturnBinaryAndToEarlyReturnRector::class);
$services->set(ChangeOrIfReturnToEarlyReturnRector::class);
$services->set(ChangeOrIfContinueToMultiContinueRector::class);
+ $services->set(ReturnAfterToEarlyOnBreakRector::class);
};
|
[EarlyReturn] Register ReturnAfterToEarlyOnBreakRector to early-return config set (#<I>)
|
diff --git a/odl/space/cartesian.py b/odl/space/cartesian.py
index <HASH>..<HASH> 100644
--- a/odl/space/cartesian.py
+++ b/odl/space/cartesian.py
@@ -690,9 +690,9 @@ class Ntuples(NtuplesBase):
True
"""
if out is None:
- return self.data.__getitem__(slice(start, stop, step)).copy()
+ return self.data[start:stop:step].copy()
else:
- out[:] = self.data.__getitem__(slice(start, stop, step))
+ out[:] = self.data[start:stop:step]
return out
@property
|
Simplified asarray implementation in NTuples
|
diff --git a/src/Illuminate/Http/Resources/Json/JsonResource.php b/src/Illuminate/Http/Resources/Json/JsonResource.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Http/Resources/Json/JsonResource.php
+++ b/src/Illuminate/Http/Resources/Json/JsonResource.php
@@ -113,7 +113,7 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou
if (is_null($this->resource)) {
return [];
}
-
+
return is_array($this->resource)
? $this->resource
: $this->resource->toArray();
|
Apply fixes from StyleCI (#<I>)
|
diff --git a/domains.go b/domains.go
index <HASH>..<HASH> 100644
--- a/domains.go
+++ b/domains.go
@@ -3,6 +3,7 @@ package mailgun
import (
"github.com/mbanzon/simplehttp"
"strconv"
+ "time"
)
type Domain struct {
@@ -32,6 +33,11 @@ type singleDomainEnvelope struct {
SendingDNSRecords []DNSRecord `json:"sending_dns_records"`
}
+func (d Domain) GetCreatedAt() (t time.Time, err error) {
+ t, err = parseMailgunTime(d.CreatedAt)
+ return
+}
+
func (m *mailgunImpl) GetDomains(limit, skip int) (int, []Domain, error) {
r := simplehttp.NewGetRequest(generatePublicApiUrl(domainsEndpoint))
if limit != -1 {
|
Added timestamp parsing to domain struct.
|
diff --git a/wikipediaapi/wikipedia.py b/wikipediaapi/wikipedia.py
index <HASH>..<HASH> 100644
--- a/wikipediaapi/wikipedia.py
+++ b/wikipediaapi/wikipedia.py
@@ -94,7 +94,10 @@ class Wikipedia(object):
self.language = language.strip().lower()
self.extract_format = extract_format
self.__headers = dict() if headers is None else headers
- self.__headers.setdefault('User-Agent', 'Wikipedia-API (https://github.com/martin-majlis/Wikipedia-API)')
+ self.__headers.setdefault(
+ 'User-Agent',
+ 'Wikipedia-API (https://github.com/martin-majlis/Wikipedia-API)'
+ )
self.__request_kwargs = kwargs
def page(
|
updated a line for pep8 standard
|
diff --git a/lib/sharp.js b/lib/sharp.js
index <HASH>..<HASH> 100644
--- a/lib/sharp.js
+++ b/lib/sharp.js
@@ -135,12 +135,12 @@ module.exports = function(file, config, options, cb) {
image.toFormat(toFormat);
} catch (err) {
- return cb(new gutil.PluginError(PLUGIN_NAME, err));
+ return cb(new gutil.PluginError(PLUGIN_NAME, err, {showStack: true}));
}
image.toBuffer(function(err, buf) {
if (err) {
- return cb(new gutil.PluginError(PLUGIN_NAME, err));
+ return cb(new gutil.PluginError(PLUGIN_NAME, err, {showStack: true}));
}
var newFile = new gutil.File({
|
show error stack if error is from sharp
|
diff --git a/tests/TestCase/Model/Behavior/TrashBehaviorTest.php b/tests/TestCase/Model/Behavior/TrashBehaviorTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/Model/Behavior/TrashBehaviorTest.php
+++ b/tests/TestCase/Model/Behavior/TrashBehaviorTest.php
@@ -164,6 +164,33 @@ class TrashBehaviorTest extends TestCase
}
/**
+ * Test the beforeDelete callback.
+ *
+ * @return void
+ */
+ public function testBeforeDeleteAbort()
+ {
+ $article = $this->Articles->get(1);
+
+ $this->Articles->getEventManager()->on(
+ 'Model.beforeSave',
+ [],
+ function (Event $event, EntityInterface $entity, ArrayObject $options) use (&$hasDeleteOptionsBefore) {
+ $entity->setError('id', 'Save aborted');
+ $event->setResult(false);
+ $event->stopPropagation();
+ }
+
+ );
+
+ $result = $this->Articles->delete($article);
+
+ $this->assertFalse($result);
+ $this->assertArrayHasKey('id', $article->getErrors());
+ }
+
+
+ /**
* Tests that the options passed to the `delete()` method are being passed on into
* the cascading delete process.
*
|
Added test for aborting delete due to a beforeSave listener
|
diff --git a/shap/plots/force.py b/shap/plots/force.py
index <HASH>..<HASH> 100644
--- a/shap/plots/force.py
+++ b/shap/plots/force.py
@@ -12,6 +12,7 @@ import base64
import numpy as np
import scipy.cluster
import collections
+import warnings
from ..common import convert_to_link, Instance, Model, Data, DenseData, Link
def force_plot(base_value, shap_values, features=None, feature_names=None, out_names=None, link="identity",
|
import warnings
to comply with jupyter notebooks
|
diff --git a/tests/e2e/kubetest2-kops/deployer/up.go b/tests/e2e/kubetest2-kops/deployer/up.go
index <HASH>..<HASH> 100644
--- a/tests/e2e/kubetest2-kops/deployer/up.go
+++ b/tests/e2e/kubetest2-kops/deployer/up.go
@@ -131,7 +131,8 @@ func (d *deployer) createCluster(zones []string, adminAccess string) error {
if d.GCPProject != "" {
args = appendIfUnset(args, "--project", d.GCPProject)
}
- args = appendIfUnset(args, "--vpc", strings.Split(d.ClusterName, ".")[0])
+ // We used to set the --vpc flag to split clusters into different networks, this is now the default.
+ // args = appendIfUnset(args, "--vpc", strings.Split(d.ClusterName, ".")[0])
case "digitalocean":
args = appendIfUnset(args, "--master-size", "c2-16vcpu-32gb")
args = appendIfUnset(args, "--node-size", "c2-16vcpu-32gb")
|
gce: don't try to specify a pre-existing network
We now automatically create a network if an existing one is not
specified.
|
diff --git a/src/Gordalina/Easypay/Response/FetchAllPayments.php b/src/Gordalina/Easypay/Response/FetchAllPayments.php
index <HASH>..<HASH> 100644
--- a/src/Gordalina/Easypay/Response/FetchAllPayments.php
+++ b/src/Gordalina/Easypay/Response/FetchAllPayments.php
@@ -43,15 +43,18 @@ class FetchAllPayments extends AbstractResponse implements ResponseInterface
'ep_status' => 'status',
'ep_message' => 'message',
'ep_num_records' => 'recordCount',
- 'ref_detail' => array('records', array($this, 'normalizePayments'))
+ 'ref_detail' => array('records', function (array $payments) {
+ return FetchAllPayments::normalizePayments($payments);
+ })
));
}
/**
+ * @static
* @param array $payments
* @return array|PaymentComplete[]
*/
- public function normalizePayments(array $payments)
+ public static function normalizePayments(array $payments)
{
if (!isset($payments['ref']) || empty($payments['ref'])) {
return array();
|
Fix issue with PHP <I>
|
diff --git a/package-testing/lib/helper.rb b/package-testing/lib/helper.rb
index <HASH>..<HASH> 100644
--- a/package-testing/lib/helper.rb
+++ b/package-testing/lib/helper.rb
@@ -1 +1 @@
-$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
+$LOAD_PATH << File.expand_path(__dir__)
|
(MAINT) Resolve rubocop Style/Dir
|
diff --git a/python/pcs_api/_version.py b/python/pcs_api/_version.py
index <HASH>..<HASH> 100644
--- a/python/pcs_api/_version.py
+++ b/python/pcs_api/_version.py
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
-__version__ = '1.0.2'
+__version__ = '1.1-SNAPSHOT'
|
prepare python version <I>-SNAPSHOT for next development
|
diff --git a/helpers/class.Date.php b/helpers/class.Date.php
index <HASH>..<HASH> 100644
--- a/helpers/class.Date.php
+++ b/helpers/class.Date.php
@@ -174,10 +174,13 @@ class tao_helpers_Date
*/
static function getTimeStamp($microtime, $microseconds = false)
{
- list ($usec, $sec) = explode(" ", $microtime);
- $timestamp = $microseconds ? $sec + $usec : $sec;
+ $parts = array_reverse(explode(" ", $microtime));
- return ((float)$timestamp);
+ $timestamp = $microseconds && isset($parts[1])
+ ? $parts[0] . '.' . round($parts[1] * 1000000, 0)
+ : $parts[0];
+
+ return $timestamp;
}
static function getTimeStampWithMicroseconds(DateTime $dt)
|
Improved method for get timestamp of date with microseconds
|
diff --git a/addon/mixins/select-picker.js b/addon/mixins/select-picker.js
index <HASH>..<HASH> 100644
--- a/addon/mixins/select-picker.js
+++ b/addon/mixins/select-picker.js
@@ -112,14 +112,14 @@ export default Ember.Mixin.create({
// value of the multiple property. Ember.Select maintains the value
// property.
var selection = this.selectionAsArray().map(function(item) {
- return Ember.get(item, valuePath);
+ return valuePath ? Ember.get(item, valuePath) : item;
});
var searchMatcher = this.makeSearchMatcher();
var result = _compact(Ember.makeArray(this.get('content'))
.map(function(item, index) {
- const label = Ember.get(item, labelPath);
- const value = Ember.get(item, valuePath);
+ const label = labelPath ? Ember.get(item, labelPath) : item;
+ const value = valuePath ? Ember.get(item, valuePath) : item;
const group = groupPath ? Ember.get(item, groupPath) : null;
if (searchMatcher(group) || searchMatcher(label)) {
return Ember.Object.create({
|
Test for empty path values and use whole object rather than usig Ember.get with an empty string (which is no longer supported)
|
diff --git a/Components/AmazonPay/Shopware/AmazonPayPaymentResponseParser.php b/Components/AmazonPay/Shopware/AmazonPayPaymentResponseParser.php
index <HASH>..<HASH> 100644
--- a/Components/AmazonPay/Shopware/AmazonPayPaymentResponseParser.php
+++ b/Components/AmazonPay/Shopware/AmazonPayPaymentResponseParser.php
@@ -54,18 +54,18 @@ class AmazonPayPaymentResponseParser implements PaymentResponseParserInterface
}
/**
- * @param string $ordernumber
+ * @param string $orderId
*
- * @return array|bool
+ * @return array
*/
- private function getAmazonPayData($ordernumber)
+ private function getAmazonPayData($orderId): array
{
try {
- $query = 'SELECT * FROM s_order_attributes WHERE orderID = ?';
+ $query = 'SELECT bestit_amazon_authorization_id FROM s_order_attributes WHERE orderID = ?';
- return $this->connection->fetchAssoc($query, [$ordernumber]);
+ return $this->connection->fetchAssoc($query, [$orderId]);
} catch (Exception $exception) {
- return false;
+ return [];
}
}
|
surcharge tax fix (#<I>)
|
diff --git a/src/Dami/Migration/MigrationFiles.php b/src/Dami/Migration/MigrationFiles.php
index <HASH>..<HASH> 100644
--- a/src/Dami/Migration/MigrationFiles.php
+++ b/src/Dami/Migration/MigrationFiles.php
@@ -30,7 +30,7 @@ class MigrationFiles
public function get($version = null)
{
$currentVersion = $this->schemaTable->getCurrentVersion();
- if ($version && (int) $version === (int) $currentVersion) {
+ if (null !== $version && (int) $version === (int) $currentVersion) {
return null;
}
$migrateUp = null === $version || $version >= $currentVersion;
|
Checking if version of migration exists - better version :angry:
|
diff --git a/lib/custom/src/MShop/Customer/Manager/Typo3.php b/lib/custom/src/MShop/Customer/Manager/Typo3.php
index <HASH>..<HASH> 100644
--- a/lib/custom/src/MShop/Customer/Manager/Typo3.php
+++ b/lib/custom/src/MShop/Customer/Manager/Typo3.php
@@ -476,11 +476,11 @@ class MShop_Customer_Manager_Typo3
$item->setId( $this->_newId( $conn, $context->getConfig()->get( $path, $path ) ) );
}
- $dbm->release( $conn );
+ $dbm->release( $conn, $dbname );
}
catch( Exception $e )
{
- $dbm->release( $conn );
+ $dbm->release( $conn, $dbname );
throw $e;
}
}
@@ -513,11 +513,11 @@ class MShop_Customer_Manager_Typo3
$map[ $row['id'] ] = $row;
}
- $dbm->release( $conn );
+ $dbm->release( $conn, $dbname );
}
catch( Exception $e )
{
- $dbm->release( $conn );
+ $dbm->release( $conn, $dbname );
throw $e;
}
|
Fix for releasing db connections properly
|
diff --git a/src/Plugins/MediaEmbed/Parser.php b/src/Plugins/MediaEmbed/Parser.php
index <HASH>..<HASH> 100644
--- a/src/Plugins/MediaEmbed/Parser.php
+++ b/src/Plugins/MediaEmbed/Parser.php
@@ -7,10 +7,10 @@
*/
namespace s9e\TextFormatter\Plugins\MediaEmbed;
-use s9e\TextFormatter\Utils\Http;
use s9e\TextFormatter\Parser as TagStack;
use s9e\TextFormatter\Parser\Tag;
use s9e\TextFormatter\Plugins\ParserBase;
+use s9e\TextFormatter\Utils\Http;
class Parser extends ParserBase
{
|
MediaEmbed: reordered use statements [ci skip]
|
diff --git a/lib/bcsec.rb b/lib/bcsec.rb
index <HASH>..<HASH> 100644
--- a/lib/bcsec.rb
+++ b/lib/bcsec.rb
@@ -7,6 +7,7 @@ module Bcsec
autoload :Group, 'bcsec/group'
autoload :GroupMemberships, 'bcsec/group_membership'
autoload :GroupMembership, 'bcsec/group_membership'
+ autoload :Netid, 'bcsec/netid'
autoload :Rack, 'bcsec/rack'
autoload :User, 'bcsec/user'
autoload :Modes, 'bcsec/modes'
|
Expose the full LDAP record for LDAP-retrieved users. Closes #<I>.
|
diff --git a/lib/xcode/configurations/targeted_device_family_property.rb b/lib/xcode/configurations/targeted_device_family_property.rb
index <HASH>..<HASH> 100644
--- a/lib/xcode/configurations/targeted_device_family_property.rb
+++ b/lib/xcode/configurations/targeted_device_family_property.rb
@@ -7,14 +7,14 @@ module Xcode
# Family which assigns particular numeric values to the platform types.
#
# Instead of manipulating the numeric values, this will perform a conversion
- # return an array of names like 'iPhone' and 'iPad'.
+ # return an array of symbols with the platforms like :iphone and :ipad.
#
module TargetedDeviceFamily
extend self
#
# @param [String] value convert the comma-delimited list of platforms
- # @return [Array<String>] the platform names supported.
+ # @return [Array<Symbol>] the platform names supported.
#
def open(value)
value.to_s.split(",").map do |platform_number|
|
Fixed documentation for TargetedDeviceFamily
|
diff --git a/etc/webpack.common.js b/etc/webpack.common.js
index <HASH>..<HASH> 100755
--- a/etc/webpack.common.js
+++ b/etc/webpack.common.js
@@ -275,12 +275,7 @@ var config = {
'NODE_ENV': JSON.stringify(ENV),
'HMR': false
}
- }),
- /**
- * Plugin: NotifierPlugin
- * See: https://github.com/Turbo87/webpack-notifier#usage
- */
- new WebpackNotifierPlugin()
+ })
],
/*
@@ -299,6 +294,16 @@ var config = {
};
+if( os.platform() !== 'win32') {
+ // FIXME, see https://github.com/holisticon/angular-common/issues/11
+ config.plugins.push(
+ /**
+ * Plugin: NotifierPlugin
+ * See: https://github.com/Turbo87/webpack-notifier#usage
+ */
+ new WebpackNotifierPlugin());
+}
+
/*
* Plugin: HtmlWebpackPlugin
* Description: Simplifies creation of HTML files to serve your webpack bundles.
|
fix(#<I>): workaround for windows notification error
|
diff --git a/cmd/shfmt/main.go b/cmd/shfmt/main.go
index <HASH>..<HASH> 100644
--- a/cmd/shfmt/main.go
+++ b/cmd/shfmt/main.go
@@ -48,13 +48,9 @@ var (
copyBuf = make([]byte, 32*1024)
- in io.Reader = os.Stdin
- out io.Writer = os.Stdout
-
- color bool
- ansiFgRed = "\u001b[31m"
- ansiFgGreen = "\u001b[32m"
- ansiReset = "\u001b[0m"
+ in io.Reader = os.Stdin
+ out io.Writer = os.Stdout
+ color bool
version = "v3.0.0-alpha2"
)
diff --git a/interp/interp.go b/interp/interp.go
index <HASH>..<HASH> 100644
--- a/interp/interp.go
+++ b/interp/interp.go
@@ -1196,7 +1196,6 @@ func (r *Runner) call(ctx context.Context, pos syntax.Pos, args []string) {
}
func (r *Runner) exec(ctx context.Context, args []string) {
- // path := r.lookPath(args[0])
err := r.Exec(r.modCtx(ctx), args)
switch x := err.(type) {
case nil:
|
all: remove a few lines of unused code
Mostly my doing in the past week or so.
|
diff --git a/umap/tests/test_umap_metrics.py b/umap/tests/test_umap_metrics.py
index <HASH>..<HASH> 100644
--- a/umap/tests/test_umap_metrics.py
+++ b/umap/tests/test_umap_metrics.py
@@ -340,7 +340,7 @@ def test_seuclidean(spatial_data):
)
def test_weighted_minkowski(spatial_data):
v = np.abs(np.random.randn(spatial_data.shape[1]))
- dist_matrix = pairwise_distances(spatial_data, metric="wminkowski", w=v, p=3)
+ dist_matrix = pairwise_distances(spatial_data, metric="minkowski", w=v, p=3)
test_matrix = np.array(
[
[
|
Fixes for weighted minkowski (per changes in SciPy); Scipy changed the name...
|
diff --git a/axes/handlers/database.py b/axes/handlers/database.py
index <HASH>..<HASH> 100644
--- a/axes/handlers/database.py
+++ b/axes/handlers/database.py
@@ -125,6 +125,7 @@ class AxesDatabaseHandler(AbstractAxesHandler, AxesBaseHandler):
username=username,
ip_address=request.axes_ip_address,
user_agent=request.axes_user_agent,
+ defaults={"failures_since_start": failures_since_start}
)
# Update failed attempt information but do not touch the username, IP address, or user agent fields,
# because attackers can request the site with multiple different configurations
@@ -136,7 +137,8 @@ class AxesDatabaseHandler(AbstractAxesHandler, AxesBaseHandler):
attempt.post_data = Concat("post_data", Value(separator + post_data))
attempt.http_accept = request.axes_http_accept
attempt.path_info = request.axes_path_info
- attempt.failures_since_start += 1
+ if not created:
+ attempt.failures_since_start += 1
attempt.attempt_time = request.axes_attempt_time
attempt.save()
# Record failed attempt with all the relevant information.
|
Initiallize failures since start correctly
|
diff --git a/src/services/Routes.php b/src/services/Routes.php
index <HASH>..<HASH> 100644
--- a/src/services/Routes.php
+++ b/src/services/Routes.php
@@ -435,8 +435,9 @@ class Routes extends Component
// Iterate through the elements and grab their URLs
foreach ($elements as $element) {
- if (!empty($element->url) && !\in_array($element->url, $resultingUrls, true)) {
- $resultingUrls[] = $element->url;
+ if (!empty($element->uri) && !\in_array($element->uri, $resultingUrls, true)) {
+ $uri = $this->normalizeUri($element->uri);
+ $resultingUrls[] = $uri;
}
}
|
Return the URI rather than the URL
|
diff --git a/core-bundle/src/Resources/contao/library/Contao/Template.php b/core-bundle/src/Resources/contao/library/Contao/Template.php
index <HASH>..<HASH> 100644
--- a/core-bundle/src/Resources/contao/library/Contao/Template.php
+++ b/core-bundle/src/Resources/contao/library/Contao/Template.php
@@ -337,7 +337,7 @@ abstract class Template extends \Controller
. "$(document.body).setStyle('margin-bottom', $('debug').hasClass('closed')?'60px':'320px');"
. "$('tog').addEvent('click',function(e) {"
. "$('debug').toggleClass('closed');"
- . "Cookie.write('CONTAO_CONSOLE',$('debug').hasClass('closed')?'closed':'');"
+ . "Cookie.write('CONTAO_CONSOLE',$('debug').hasClass('closed')?'closed':'',{path:Contao.path});"
. "$(document.body).setStyle('margin-bottom', $('debug').hasClass('closed')?'60px':'320px');"
. "});"
. "window.addEvent('resize',function() {"
|
[Core] Add the cookie path to the debug console (see #<I>)
|
diff --git a/process/context/launch.go b/process/context/launch.go
index <HASH>..<HASH> 100644
--- a/process/context/launch.go
+++ b/process/context/launch.go
@@ -59,7 +59,7 @@ type ProcLaunchCommand struct {
// Run implements cmd.Command.
func (c *ProcLaunchCommand) Run(ctx *cmd.Context) error {
- logger.Tracef("running launch command")
+ logger.Tracef("running %s command", LaunchCommandInfo.Name)
if err := c.registeringCommand.Run(ctx); err != nil {
return errors.Trace(err)
}
|
Do not hard-code the command name in the log message.
|
diff --git a/pyt/cfg.py b/pyt/cfg.py
index <HASH>..<HASH> 100644
--- a/pyt/cfg.py
+++ b/pyt/cfg.py
@@ -334,7 +334,7 @@ class CFG(ast.NodeVisitor):
Args:
function_node: is the node to create a CFG of
"""
- print(function_node.name)
+ self.module_definitions_stack.append(ModuleDefinitions())
self.function_names.append(function_node.name)
|
Add stack when creating funciton as a cfg
|
diff --git a/demo/views.py b/demo/views.py
index <HASH>..<HASH> 100755
--- a/demo/views.py
+++ b/demo/views.py
@@ -138,3 +138,8 @@ def flot_demo(request):
'bar_chart': bar_chart,
'point_chart': point_chart}
return render(request, 'demo/flot.html', context)
+
+
+def mongodb_source_demo(request):
+ context = {}
+ return render(request, 'demo/mongodb_source.html', context)
|
added basic demo_mongodb_source view
|
diff --git a/paved/django.py b/paved/django.py
index <HASH>..<HASH> 100644
--- a/paved/django.py
+++ b/paved/django.py
@@ -24,7 +24,7 @@ util.update(
)
)
-__all__ = ['manage', 'call_manage', 'test', 'syncdb', 'shell', 'start']
+__all__ = ['manage', 'call_manage', 'djtest', 'syncdb', 'shell', 'start']
@task
|
Fixed name of djtest in __all__
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -567,7 +567,7 @@ gulp.task('test.all.dart', shell.task(['./scripts/ci/test_dart.sh']));
function getBrowsersFromCLI() {
var isSauce = false;
var args = minimist(process.argv.slice(2));
- var rawInput = args.browsers?args.browsers:'DartiumWithWebPlatform';
+ var rawInput = args.browsers ? args.browsers : 'DartiumWithWebPlatform';
var inputList = rawInput.replace(' ', '').split(',');
var outputList = [];
for (var i = 0; i < inputList.length; i++) {
|
style(gulp): make code more readable
|
diff --git a/lib/RateLimiter.js b/lib/RateLimiter.js
index <HASH>..<HASH> 100644
--- a/lib/RateLimiter.js
+++ b/lib/RateLimiter.js
@@ -20,10 +20,8 @@ class RateLimiter {
consume(key, rate = 1) {
return new Promise((resolve, reject) => {
const rlKey = RateLimiter.getKey(key);
- const tempKey = `tmp${rlKey}`;
this.redis.multi()
- .setex(tempKey, this.duration, 0)
- .renamenx(tempKey, rlKey)
+ .set(rlKey, 0, 'EX', this.duration, 'NX')
.incrby(rlKey, rate)
.pttl(rlKey)
.exec((err, results) => {
@@ -32,7 +30,7 @@ class RateLimiter {
if (err) {
reject(new Error('Redis Client error'));
} else {
- const [,, consumed, resTtlMs] = results;
+ const [, consumed, resTtlMs] = results;
if (resTtlMs === -1) {
msBeforeReset = this.duration;
this.redis.expire(rlKey, this.duration);
|
Improved: use set command with NX flag
|
diff --git a/setuptools/version.py b/setuptools/version.py
index <HASH>..<HASH> 100644
--- a/setuptools/version.py
+++ b/setuptools/version.py
@@ -1 +1 @@
-__version__ = '19.5'
+__version__ = '19.6'
|
Bumped to <I> in preparation for next release.
|
diff --git a/opbeat/utils/deprecation.py b/opbeat/utils/deprecation.py
index <HASH>..<HASH> 100644
--- a/opbeat/utils/deprecation.py
+++ b/opbeat/utils/deprecation.py
@@ -11,9 +11,9 @@ def deprecated(alternative=None):
def real_decorator(func):
@functools.wraps(func)
def new_func(*args, **kwargs):
- msg = "Call to deprecated function {}.".format(func.__name__)
+ msg = "Call to deprecated function {0}.".format(func.__name__)
if alternative:
- msg += " Use {} instead".format(alternative)
+ msg += " Use {0} instead".format(alternative)
warnings.warn_explicit(
msg,
category=DeprecationWarning,
|
Fix deprecation decorator not working on <I>.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.