diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/test/rfc_test.rb b/test/rfc_test.rb
index <HASH>..<HASH> 100644
--- a/test/rfc_test.rb
+++ b/test/rfc_test.rb
@@ -218,4 +218,22 @@ describe "RFC Recurrence Rules" do # http://www.kanzaki.com/docs/ical/rrule.html
dates.must_pair_with expected_dates
dates.size.must_equal expected_dates.size
end
+
+ it "supports every other month on the 1st and last Sunday of the month for 10 occurrences" do
+ schedule = new_schedule(
+ every: :month,
+ day: { sunday: [1, -1] },
+ interval: 2,
+ total: 10)
+
+ expected_dates = cherry_pick(
+ 2015 => { 9 => [6, 27], 11 => [1, 29] },
+ 2016 => { 1 => [3, 24], 3 => [6, 27], 5 => [1, 29] }
+ ).map { |t| t + 12.hours }
+
+ dates = schedule.events.to_a
+
+ dates.must_pair_with expected_dates
+ dates.size.must_equal expected_dates.size
+ end
end
|
WIP failing test for first, last day of month
|
diff --git a/lib/fs-tools.js b/lib/fs-tools.js
index <HASH>..<HASH> 100644
--- a/lib/fs-tools.js
+++ b/lib/fs-tools.js
@@ -129,7 +129,7 @@ function copy_symlink(src, dst, callback) {
function copy_directory(src, dst, callback) {
- fs.mkdir(dst, '0755', function (err) {
+ fstools.mkdir(dst, '0755', function (err) {
if (err) {
callback(err);
return;
|
Replaced fs.mkdir with fstools.mkdir since the latter checks for the existence of the destination before creating it.
|
diff --git a/ariadne/contrib/tracing/opentracing.py b/ariadne/contrib/tracing/opentracing.py
index <HASH>..<HASH> 100644
--- a/ariadne/contrib/tracing/opentracing.py
+++ b/ariadne/contrib/tracing/opentracing.py
@@ -27,9 +27,7 @@ class OpenTracingExtension(Extension):
self._root_scope = self._tracer.start_active_span("GraphQL Query")
self._root_scope.span.set_tag(tags.COMPONENT, "graphql")
- def request_finished(
- self, context: ContextValue, error: Optional[Exception] = None
- ):
+ def request_finished(self, context: ContextValue):
self._root_scope.close()
async def resolve(
|
Fix request_finished signature in opentracing extension
|
diff --git a/lib/opal/cli_runners/nodejs.rb b/lib/opal/cli_runners/nodejs.rb
index <HASH>..<HASH> 100644
--- a/lib/opal/cli_runners/nodejs.rb
+++ b/lib/opal/cli_runners/nodejs.rb
@@ -1,5 +1,6 @@
# frozen_string_literal: true
+require 'shellwords'
require 'opal/paths'
require 'opal/cli_runners/system_runner'
@@ -14,10 +15,13 @@ module Opal
argv = data[:argv].dup.to_a
argv.unshift('--') if argv.any?
+ opts = Shellwords.shellwords(ENV['NODE_OPTS'] || "")
+
SystemRunner.call(data) do |tempfile|
[
'node',
'--require', "#{__dir__}/source-map-support-node",
+ *opts,
tempfile.path,
*argv
]
|
Parse the NODE_OPTS environment variable in the Node runner
|
diff --git a/language.js b/language.js
index <HASH>..<HASH> 100644
--- a/language.js
+++ b/language.js
@@ -163,6 +163,22 @@ module.exports = {
ClientGoodbye: 4008,
ServerGoodbye: 4009,
+ // EGCBaseMsg
+ SystemMessage: 4001,
+ ReplicateConVars: 4002,
+ ConVarUpdated: 4003,
+ InviteToParty: 4501,
+ InvitationCreated: 4502,
+ PartyInviteResponse: 4503,
+ KickFromParty: 4504,
+ LeaveParty: 4505,
+ ServerAvailable: 4506,
+ ClientConnectToServer: 4507,
+ GameServerInfo: 4508,
+ Error: 4509,
+ Replay_UploadedToYouTube: 4510,
+ LANServerAvailable: 4511,
+
// ETFGCMsg
ReportWarKill: 5001,
VoteKickBanPlayer: 5018,
|
Added EGCBaseMsg to language.js
|
diff --git a/src/Manager.php b/src/Manager.php
index <HASH>..<HASH> 100644
--- a/src/Manager.php
+++ b/src/Manager.php
@@ -169,13 +169,16 @@ class Manager
*/
protected function buildRefreshClaims(Payload $payload)
{
- // assign the payload values as variables for use later
- extract($payload->toArray());
+ // Get the claims to be persisted from the payload
+ $persistentClaims = collect($payload->toArray())
+ ->only($this->persistentClaims)
+ ->toArray();
// persist the relevant claims
return array_merge(
$this->customClaims,
- compact($this->persistentClaims, 'sub', 'iat')
+ $persistentClaims,
+ $payload->get(['sub', 'iat']),
);
}
|
fix(php): Dont use compact
|
diff --git a/ghost/extract-api-key/test/extract-api-key.test.js b/ghost/extract-api-key/test/extract-api-key.test.js
index <HASH>..<HASH> 100644
--- a/ghost/extract-api-key/test/extract-api-key.test.js
+++ b/ghost/extract-api-key/test/extract-api-key.test.js
@@ -2,6 +2,17 @@ const assert = require('assert');
const extractApiKey = require('../index');
describe('Extract API Key', function () {
+ it('returns nulls for a request without any key', function () {
+ const {key, type} = extractApiKey({
+ query: {
+ filter: 'status:active'
+ }
+ });
+
+ assert.equal(key, null);
+ assert.equal(type, null);
+ });
+
it('Extracts Content API key from the request', function () {
const {key, type} = extractApiKey({
query: {
|
Added extra test for output when request has no keys
refs <URL>
|
diff --git a/sharding-proxy/src/main/java/io/shardingsphere/shardingproxy/runtime/GlobalRegistry.java b/sharding-proxy/src/main/java/io/shardingsphere/shardingproxy/runtime/GlobalRegistry.java
index <HASH>..<HASH> 100644
--- a/sharding-proxy/src/main/java/io/shardingsphere/shardingproxy/runtime/GlobalRegistry.java
+++ b/sharding-proxy/src/main/java/io/shardingsphere/shardingproxy/runtime/GlobalRegistry.java
@@ -154,12 +154,6 @@ public final class GlobalRegistry {
this.authentication = authentication;
}
- private void initShardingMetaData(final ShardingExecuteEngine executeEngine) {
- for (ShardingSchema each : shardingSchemas.values()) {
- each.initShardingMetaData(executeEngine);
- }
- }
-
/**
* Check schema exists.
*
|
delete initShardingMetaData
|
diff --git a/lib/merge-sort.js b/lib/merge-sort.js
index <HASH>..<HASH> 100644
--- a/lib/merge-sort.js
+++ b/lib/merge-sort.js
@@ -40,22 +40,21 @@ function sort(array, compare) {
* @return The merged array.
*/
function merge(left, right, compare) {
- var result = new Array(left.length + right.length);
+ var result = [];
var leftIndex = 0;
var rightIndex = 0;
- var resultIndex = 0;
while (leftIndex < left.length || rightIndex < right.length) {
if (leftIndex < left.length && rightIndex < right.length) {
if (compare(left[leftIndex], right[rightIndex]) <= 0) {
- result[resultIndex++] = left[leftIndex++];
+ result.push(left[leftIndex++]);
} else {
- result[resultIndex++] = right[rightIndex++];
+ result.push(right[rightIndex++]);
}
} else if (leftIndex < left.length) {
- result[resultIndex++] = left[leftIndex++];
+ result.push(left[leftIndex++]);
} else if (rightIndex < right.length) {
- result[resultIndex++] = right[rightIndex++];
+ result.push(right[rightIndex++]);
}
}
return result;
|
Use push instead of resultIndex
The time saved expanding the array is not worth it the additional
complexity considering this is primarily for educational purposed.
|
diff --git a/lib/xmpp/srv.js b/lib/xmpp/srv.js
index <HASH>..<HASH> 100644
--- a/lib/xmpp/srv.js
+++ b/lib/xmpp/srv.js
@@ -73,20 +73,16 @@ function resolveSrv(name, cb) {
// one of both A & AAAA, in case of broken tunnels
function resolveHost(name, cb) {
- var error, results = [], pending = 2;
- var cb1 = function(e, addrs) {
+ var error, results = [];
+ var cb1 = function(e, addr) {
error = error || e;
- var addr = addrs && addrs[Math.floor(Math.random() * addrs.length)];
if (addr)
results.push(addr);
- pending--;
- if (pending < 1)
- cb((results.length > 0) ? null : error, results);
+ cb((results.length > 0) ? null : error, results);
};
- dns.resolve4(name, cb1);
- dns.resolve6(name, cb1);
+ dns.lookup(name, cb1);
}
// connection attempts to multiple addresses in a row
|
Use dns.lookup() rather than dns.resolve4/6(). Abandons parallelism but finds localhost.
|
diff --git a/lib/url.js b/lib/url.js
index <HASH>..<HASH> 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -49,23 +49,8 @@ function parse(uri){
}
// in absence of `protocol`
- if (null == obj.secure) {
- // node.js secure by default
- if ('undefined' != typeof location) {
- obj.secure = 'https:' == location.protocol;
- } else {
- obj.secure = true;
- }
- }
if (!obj.protocol) obj.protocol = obj.secure ? 'https:' : 'http:';
- // in absence of `hostname`
- if (!obj.hostname && obj.host) {
- var pieces = obj.host.split(':');
- obj.hostname = pieces.shift();
- if (pieces.length) obj.port = pieces.pop();
- }
-
// make sure we treat `localhost:80` and `localhost` equally
if ((/(http|ws):/.test(obj.protocol) && 80 == obj.port) ||
(/(http|ws)s:/.test(obj.protocol) && 443 == obj.port)) {
|
url: simplify by no longer accepting object
|
diff --git a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java b/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java
index <HASH>..<HASH> 100644
--- a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java
+++ b/draggablepanel/src/main/java/com/github/pedrovgs/DraggableViewCallback.java
@@ -165,7 +165,7 @@ class DraggableViewCallback extends ViewDragHelper.Callback {
* @param xVel
*/
private void triggerOnReleaseActionsWhileHorizontalDrag(float xVel) {
- if (xVel < 0 && xVel <= X_MIN_VELOCITY) {
+ if (xVel < 0 && xVel <= -X_MIN_VELOCITY) {
draggableView.closeToLeft();
} else if (xVel > 0 && xVel >= X_MIN_VELOCITY) {
draggableView.closeToRight();
|
Fix bug related with horizontal drag and x velocity when draggable view is released
|
diff --git a/hererocks.py b/hererocks.py
index <HASH>..<HASH> 100755
--- a/hererocks.py
+++ b/hererocks.py
@@ -691,6 +691,10 @@ class Lua(Program):
os.path.join(module_path, "?", "init.lua")
]
module_path_parts.insert(0 if local_paths_first else 2, os.path.join(".", "?.lua"))
+
+ if self.major_version in ["5.3", "5.4"]:
+ module_path_parts.append(os.path.join(".", "?", "init.lua"))
+
self.package_path = ";".join(module_path_parts)
cmodule_path = os.path.join(opts.location, "lib", "lua", self.major_version)
|
Fix ./?/init.lua not being in package path for Lua <I>+
|
diff --git a/spec/requests/preview_spec.rb b/spec/requests/preview_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/requests/preview_spec.rb
+++ b/spec/requests/preview_spec.rb
@@ -46,12 +46,13 @@ describe "preview" do
click_on "Preview"
page.should have_selector("[data-toggle='post-preview']", visible: true)
-
- page.within_frame "preview" do
- wait_until(60) do
- page.should have_content(@post_title)
- end
+
+
+ page.driver.browser.switch_to.frame "preview"
+ wait_until(360) do
+ page.should have_content(@post_title)
end
+
end
it "Close Preview", :js=>true do
|
trying something different too see if capybara + ruby 2 will work appropriately with frames and page.should
|
diff --git a/src/main/resources/META-INF/resources/primefaces/datatable/datatable.js b/src/main/resources/META-INF/resources/primefaces/datatable/datatable.js
index <HASH>..<HASH> 100644
--- a/src/main/resources/META-INF/resources/primefaces/datatable/datatable.js
+++ b/src/main/resources/META-INF/resources/primefaces/datatable/datatable.js
@@ -912,7 +912,7 @@ PrimeFaces.widget.DataTable = PrimeFaces.widget.DeferredWidget.extend({
reflowHeaderText = headerColumn.find('.ui-reflow-headertext:first').text(),
colTitleEl = headerColumn.children('.ui-column-title'),
title = (reflowHeaderText && reflowHeaderText.length) ? reflowHeaderText : colTitleEl.text();
- this.tbody.find('> tr:not(.ui-datatable-empty-message) > td:nth-child(' + (i + 1) + ')').prepend('<span class="ui-column-title">' + title + '</span>');
+ this.tbody.find('> tr:not(.ui-datatable-empty-message) > td:nth-child(' + (i + 1) + ')').prepend('<span class="ui-column-title">' + PrimeFaces.escapeHTML(title) + '</span>');
}
},
|
fix DOM based XSS in dataTable as well (part of #<I>)
|
diff --git a/Vendor/Uploader.php b/Vendor/Uploader.php
index <HASH>..<HASH> 100644
--- a/Vendor/Uploader.php
+++ b/Vendor/Uploader.php
@@ -1479,6 +1479,12 @@ class Uploader {
if (isset($_FILES['data'])) {
foreach ($_FILES['data'] as $key => $file) {
$count = count($file);
+ $iterator = new RecursiveArrayIterator($file);
+ if (false === $iterator->hasChildren()) {
+ $file = array(
+ 'Fake' => $file
+ );
+ }
foreach ($file as $model => $fields) {
foreach ($fields as $field => $value) {
|
Update Vendor/Uploader.php
Model uses a false if there is no model.
|
diff --git a/enrol/paypal/lib.php b/enrol/paypal/lib.php
index <HASH>..<HASH> 100644
--- a/enrol/paypal/lib.php
+++ b/enrol/paypal/lib.php
@@ -207,4 +207,23 @@ class enrol_paypal_plugin extends enrol_plugin {
return $OUTPUT->box(ob_get_clean());
}
+ /**
+ * Gets an array of the user enrolment actions
+ *
+ * @param course_enrolment_manager $manager
+ * @param stdClass $ue A user enrolment object
+ * @return array An array of user_enrolment_actions
+ */
+ public function get_user_enrolment_actions(course_enrolment_manager $manager, $ue) {
+ $actions = array();
+ $context = $manager->get_context();
+ $instance = $ue->enrolmentinstance;
+ $params = $manager->get_moodlepage()->url->params();
+ $params['ue'] = $ue->id;
+ if ($this->allow_unenrol($instance) && has_capability("enrol/paypal:unenrol", $context)) {
+ $url = new moodle_url('/enrol/unenroluser.php', $params);
+ $actions[] = new user_enrolment_action(new pix_icon('t/delete', ''), get_string('unenrol', 'enrol'), $url, array('class'=>'unenrollink', 'rel'=>$ue->id));
+ }
+ return $actions;
+ }
}
|
MDL-<I> - paypal does not allow unenrol
|
diff --git a/troposphere/directoryservice.py b/troposphere/directoryservice.py
index <HASH>..<HASH> 100644
--- a/troposphere/directoryservice.py
+++ b/troposphere/directoryservice.py
@@ -19,6 +19,7 @@ class MicrosoftAD(AWSObject):
props = {
'CreateAlias': (boolean, False),
+ 'Edition': (basestring, False),
'EnableSso': (boolean, False),
'Name': (basestring, True),
'Password': (basestring, True),
|
Add Edition to DirectoryService::MicrosoftAD
|
diff --git a/test/test_Exceptions.py b/test/test_Exceptions.py
index <HASH>..<HASH> 100644
--- a/test/test_Exceptions.py
+++ b/test/test_Exceptions.py
@@ -38,7 +38,7 @@ class TestUtil(unittest.TestCase):
self.assertEqual(exc.hresult, SCARD_E_NO_SERVICE)
text = str(exc)
if get_platform().startswith('linux'):
- self.assertEqual(text, "Failed to list readers: Service not available. (0x8010001D)")
+ self.assertEqual(text, "Failed to list readers: Service not available. (0x%08X)" % SCARD_E_NO_SERVICE)
def test_NoReadersException(self):
exc = NoReadersException()
|
test: fix Exception test on <I>-bits CPU
Thanks to mnhauke for the bug report
<URL>
|
diff --git a/test/test_odict.py b/test/test_odict.py
index <HASH>..<HASH> 100755
--- a/test/test_odict.py
+++ b/test/test_odict.py
@@ -70,6 +70,7 @@ logger.info('test interpolation source_domainDN and source_domain ... %s : %s' %
assert source_domainDN == 'dc=%s' % ',dc='.join(source_domain.split('.'))
# FIXME: yaml loader seems to have changed @3.11 (debian 8: python3.4 + yaml 3.11 but NOT python2.7 + yaml 3.11 )
+"""
source_baseDN = conf['source']['baseDN']
logger.info('test interpolation source_baseDN ... %s' % source_baseDN)
assert source_baseDN == 'ou=Users,%s' % "dc={{ source.domain.split('.')|join(',dc=') }}"
@@ -77,6 +78,7 @@ assert source_baseDN == 'ou=Users,%s' % "dc={{ source.domain.split('.')|join(',d
source_bindDN = conf['source']['bindDN']
logger.info('test interpolation source_bindDN ... %s' % source_bindDN)
assert source_bindDN == 'cn=Administrator,%s' % 'ou=Users,{{ source.domainDN }}'
+"""
print('passed test %s' % __file__)
|
skip this test for now in order to allow a release
|
diff --git a/src/RestGalleries/Auth/Auth.php b/src/RestGalleries/Auth/Auth.php
index <HASH>..<HASH> 100644
--- a/src/RestGalleries/Auth/Auth.php
+++ b/src/RestGalleries/Auth/Auth.php
@@ -62,9 +62,10 @@ abstract class Auth implements AuthAdapter
protected function filterTokens($tokenCredentials)
{
$credentials = array_merge($this->clientCredentials, $tokenCredentials);
- var_dump($credentials);
$keys = call_user_func_array([$this, 'getAuth'.$this->protocol.'DefaultKeys'], [null]);
+ var_dump($tokenCredentials, array_only($credentials, $keys['token_credentials']), $keys['token_credentials']);
+
return array_only($credentials, $keys['token_credentials']);
}
|
AuthTest dump credentials :(
|
diff --git a/Swat/SwatNoteBook.php b/Swat/SwatNoteBook.php
index <HASH>..<HASH> 100644
--- a/Swat/SwatNoteBook.php
+++ b/Swat/SwatNoteBook.php
@@ -49,22 +49,6 @@ class SwatNoteBook extends SwatWidget implements SwatUIParent
// {{{ public properties
/**
- * Visible
- *
- * Whether the widget is display. All widgets should respect this.
- *
- * @var boolean
- */
- public $visible = true;
-
- /**
- * A non-visible unique id for this widget, or null
- *
- * @var string
- */
- public $id = null;
-
- /**
* A value containing the desired position of the tabs
*
* @var integer
@@ -81,13 +65,6 @@ class SwatNoteBook extends SwatWidget implements SwatUIParent
*/
protected $pages = array();
- /**
- * Messages affixed to this widget
- *
- * @var array
- */
- protected $messages = array();
-
// }}}
// {{{ public function __construct()
|
These properties are already defined in SwatWidget (the parent class). No need to redefine them here.
svn commit r<I>
|
diff --git a/mappyfile/validator.py b/mappyfile/validator.py
index <HASH>..<HASH> 100644
--- a/mappyfile/validator.py
+++ b/mappyfile/validator.py
@@ -99,6 +99,9 @@ class Validator(object):
path is the path to the error object, it can be empty if the error is in the root object
http://python-jsonschema.readthedocs.io/en/latest/errors/#jsonschema.exceptions.ValidationError.absolute_path
It can also reference an object in a list e.g. [u'layers', 0]
+
+ Unfortunately it is not currently possible to get the name of the failing property from the
+ JSONSchema error object, even though it is in the error message - see https://github.com/Julian/jsonschema/issues/119
"""
if not path:
@@ -113,7 +116,7 @@ class Validator(object):
key = path[-1]
d = utils.findkey(rootdict, *path[:-1])
- error_message = "ERROR: Invalid value for {}".format(key.upper())
+ error_message = "ERROR: Invalid value in {}".format(key.upper())
# add a comment to the dict structure
|
Add comment on validation and getting the key name
|
diff --git a/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/Helpers.java b/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/Helpers.java
index <HASH>..<HASH> 100644
--- a/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/Helpers.java
+++ b/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/Helpers.java
@@ -220,6 +220,7 @@ public final class Helpers
n.setPort(0);
n.setRepo(System.getProperty("user.dir") + "/jobs/");
n.setExportRepo(System.getProperty("user.dir") + "/exports/");
+ n.setRootLogLevel("INFO");
em.persist(n);
}
|
Default new node log level is now INFO (was: DEBUG)
|
diff --git a/tests/Template/ClassTemplateTest.php b/tests/Template/ClassTemplateTest.php
index <HASH>..<HASH> 100644
--- a/tests/Template/ClassTemplateTest.php
+++ b/tests/Template/ClassTemplateTest.php
@@ -2757,7 +2757,7 @@ class ClassTemplateTest extends TestCase
/** @var Foo<Enum::TYPE_ONE> $foo */
$foo = new Foo();'
],
- 'extendedPropertyTypeParameterised' => [
+ 'SKIPPED-extendedPropertyTypeParameterised' => [
'<?php
namespace App;
|
Skip test that requires ext-ds
|
diff --git a/easyargs/__init__.py b/easyargs/__init__.py
index <HASH>..<HASH> 100644
--- a/easyargs/__init__.py
+++ b/easyargs/__init__.py
@@ -1,5 +1,10 @@
import decorators
+import parsers
import sys
# This bit of magic allows us to use the module name as a decorator
+decorators.make_easy_args.parsers = parsers
+decorators.make_easy_args.decorators = decorators
+
sys.modules[__name__] = decorators.make_easy_args
+
|
Added the package's modules as properties so that imports work better
|
diff --git a/src/python/dxpy/cli/org.py b/src/python/dxpy/cli/org.py
index <HASH>..<HASH> 100644
--- a/src/python/dxpy/cli/org.py
+++ b/src/python/dxpy/cli/org.py
@@ -74,7 +74,7 @@ def add_membership(args):
except:
pass
else:
- raise DXCLIError("Cannot add a user who is already a member of the org")
+ raise DXCLIError("Cannot add a user who is already a member of the org. To update an existing member's permissions, use 'dx update member'")
dxpy.api.org_invite(args.org_id, get_org_invite_args(user_id, args))
|
Add more informative error message for `dx add member`.
Recommend that the user executes `dx update member` if the user executed `dx
add member` on a user who is already a member.
|
diff --git a/src/WsdlToClass/Wsdl/Method.php b/src/WsdlToClass/Wsdl/Method.php
index <HASH>..<HASH> 100644
--- a/src/WsdlToClass/Wsdl/Method.php
+++ b/src/WsdlToClass/Wsdl/Method.php
@@ -29,13 +29,13 @@ class Method
/**
*
- * @var Request
+ * @var string
*/
private $request;
/**
*
- * @var Response
+ * @var string
*/
private $response;
@@ -59,7 +59,7 @@ class Method
/**
*
- * @return Request
+ * @return string
*/
public function getRequest()
{
@@ -67,17 +67,17 @@ class Method
}
/**
- * @param Request $request
+ * @param string $request
*/
- public function setRequest(Request $request)
+ public function setRequest($request)
{
- $this->request = $request;
+ $this->request = (string) $request;
return $this;
}
/**
*
- * @return Response
+ * @return string
*/
public function getResponse()
{
@@ -85,11 +85,11 @@ class Method
}
/**
- * @param Response $response
+ * @param string $response
*/
- public function setResponse(Response $response)
+ public function setResponse($response)
{
- $this->response = $response;
+ $this->response = (string) $response;
return $this;
}
|
Corrected errors based on failing build
|
diff --git a/jsonrpcclient/__init__.py b/jsonrpcclient/__init__.py
index <HASH>..<HASH> 100644
--- a/jsonrpcclient/__init__.py
+++ b/jsonrpcclient/__init__.py
@@ -4,6 +4,5 @@ import logging
logger = logging.getLogger('jsonrpcclient')
logger.addHandler(logging.StreamHandler())
-logger.setLevel(logging.WARNING)
from jsonrpcclient.server import Server
|
Dont bother setting the log level to WARNING, thats the default anyway
|
diff --git a/lib/Importer.js b/lib/Importer.js
index <HASH>..<HASH> 100644
--- a/lib/Importer.js
+++ b/lib/Importer.js
@@ -72,8 +72,8 @@ class Importer {
this.reloadConfig();
const variableName = this.editor.currentWord();
if (!variableName) {
- this.message(`No variable to import. Place your cursor on a variable,
- then try again.`);
+ this.message('No variable to import. Place your cursor on a variable, ' +
+ 'then try again.');
return;
}
|
Fix incorrect message string
The indentation was kept, which led to a test failure. I thought about
finding a module that would automatically dedent, but since I only have
one case of this issue right now I decided it was yagni.
|
diff --git a/nitpycker/main.py b/nitpycker/main.py
index <HASH>..<HASH> 100644
--- a/nitpycker/main.py
+++ b/nitpycker/main.py
@@ -1,6 +1,6 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
-from unittest import TestProgram , signals
+from unittest import TestProgram, signals
__author__ = "Benjamin Schubert <ben.c.schubert@gmail.com>"
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ Setup declaration to install NitPycker
params = dict(
name='NitPycker',
version='0.1',
- packages=['nitpycker', 'nitpycker.plugins'],
+ packages=['nitpycker'],
url='https://github.com/BenjaminSchubert/NitPycker',
download_url="https://github.com/BenjaminSchubert/NitPycker/tar.gz/0.1",
license='MIT',
|
small typo and non existing plugins directory push
|
diff --git a/Samurai/Onikiri/EntityTable.php b/Samurai/Onikiri/EntityTable.php
index <HASH>..<HASH> 100644
--- a/Samurai/Onikiri/EntityTable.php
+++ b/Samurai/Onikiri/EntityTable.php
@@ -350,8 +350,8 @@ class EntityTable
$attributes = array_merge($defaults, $attributes);
$entity = new $class($this, $attributes, $exists);
- $entity->initialize();
$entity->setContainer($this->raikiri());
+ $entity->initialize();
return $entity;
}
|
call setContainer before initialize
|
diff --git a/html/pfappserver/root/src/store/modules/pfqueue.js b/html/pfappserver/root/src/store/modules/pfqueue.js
index <HASH>..<HASH> 100644
--- a/html/pfappserver/root/src/store/modules/pfqueue.js
+++ b/html/pfappserver/root/src/store/modules/pfqueue.js
@@ -81,8 +81,12 @@ const actions = {
throw new Error(data.error.message)
}
return data.item
- }).catch(err => {
- throw err
+ }).catch(error => {
+ return new Promise(resolve => {
+ setTimeout(() => {
+ resolve(dispatch('pollTaskStatus', id))
+ }, 3000)
+ })
})
}
}
|
fix for haproxy-admin restart in configurator
|
diff --git a/lib/deliver/ipa_uploader.rb b/lib/deliver/ipa_uploader.rb
index <HASH>..<HASH> 100644
--- a/lib/deliver/ipa_uploader.rb
+++ b/lib/deliver/ipa_uploader.rb
@@ -94,6 +94,15 @@ module Deliver
else
Helper.log.info "deliver will **not** submit the app for Review or for TestFlight distribution".yellow
Helper.log.info "If you want to distribute the binary, don't define `skip_deploy` ".yellow
+
+ if ENV["DELIVER_WHAT_TO_TEST"] or ENV["DELIVER_BETA_DESCRIPTION"] or ENV["DELIVER_BETA_FEEDBACK_EMAIL"]
+ Helper.log.warn "---------------------------------------------------".yellow
+ Helper.log.warn "You provided beta version metadata, but used the ".yellow
+ Helper.log.warn "`skip_deploy` option when running deliver.".yellow
+ Helper.log.warn "You have to remove `skip_deploy` to set a changelog".yellow
+ Helper.log.warn "for TestFlight builds".yellow
+ Helper.log.warn "---------------------------------------------------".yellow
+ end
end
return true
end
|
Added information about not used beta distribution variables
|
diff --git a/lib/dexter/indexer.rb b/lib/dexter/indexer.rb
index <HASH>..<HASH> 100644
--- a/lib/dexter/indexer.rb
+++ b/lib/dexter/indexer.rb
@@ -247,7 +247,10 @@ module Dexter
cost_savings2 = false
end
- suggest_index = (cost_savings || cost_savings2) && query_indexes.size <= 2
+ # TODO if multiple indexes are found (for either single or multicolumn)
+ # determine the impact of each individually
+ # for now, be conservative and don't suggest if more than one index
+ suggest_index = (cost_savings || cost_savings2) && query_indexes.size == 1
if suggest_index
query_indexes.each do |index|
|
Don't suggest multiple indexes per query until individual impact can be determined
|
diff --git a/lib/better_errors.rb b/lib/better_errors.rb
index <HASH>..<HASH> 100644
--- a/lib/better_errors.rb
+++ b/lib/better_errors.rb
@@ -19,6 +19,7 @@ module BetterErrors
{ symbols: [:textmate, :txmt, :tm], sniff: /mate/i, url: "txmt://open?url=file://%{file}&line=%{line}" },
{ symbols: [:idea], sniff: /idea/i, url: "idea://open?file=%{file}&line=%{line}" },
{ symbols: [:rubymine], sniff: /mine/i, url: "x-mine://open?file=%{file}&line=%{line}" },
+ { symbols: [:vscode, :code], sniff: /code/i, url: "vscode://file/%{file}:%{line}" },
]
class << self
diff --git a/spec/better_errors_spec.rb b/spec/better_errors_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/better_errors_spec.rb
+++ b/spec/better_errors_spec.rb
@@ -85,5 +85,13 @@ describe BetterErrors do
expect(subject.editor[]).to start_with "idea://"
end
end
+
+ ["vscode", "code"].each do |editor|
+ it "uses vscode:// scheme when EDITOR=#{editor}" do
+ ENV["EDITOR"] = editor
+ subject.editor = subject.default_editor
+ expect(subject.editor[]).to start_with "vscode://"
+ end
+ end
end
end
|
Add support for vscode editor
|
diff --git a/test/extended/image_ecosystem/mongodb_replica_petset.go b/test/extended/image_ecosystem/mongodb_replica_petset.go
index <HASH>..<HASH> 100644
--- a/test/extended/image_ecosystem/mongodb_replica_petset.go
+++ b/test/extended/image_ecosystem/mongodb_replica_petset.go
@@ -57,7 +57,7 @@ var _ = g.Describe("[image_ecosystem][mongodb][Slow] openshift mongodb replicati
exutil.ParseLabelsOrDie("name=mongodb-replicaset"),
exutil.CheckPodIsRunningFn,
3,
- 1*time.Minute,
+ 2*time.Minute,
)
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(podNames).Should(o.HaveLen(3))
@@ -83,7 +83,7 @@ var _ = g.Describe("[image_ecosystem][mongodb][Slow] openshift mongodb replicati
exutil.ParseLabelsOrDie("name=mongodb-replicaset"),
exutil.CheckPodIsRunningFn,
3,
- 1*time.Minute,
+ 2*time.Minute,
)
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(podNames).Should(o.HaveLen(3))
|
MongoDB replica petset test: increase time of waiting for pods.
|
diff --git a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
index <HASH>..<HASH> 100644
--- a/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
+++ b/saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
@@ -253,7 +253,7 @@ public final class OpenSamlAuthenticationProvider implements AuthenticationProvi
validationParams.put(SAML2AssertionValidationParameters.SIGNATURE_REQUIRED, false);
validationParams.put(
SAML2AssertionValidationParameters.CLOCK_SKEW,
- this.responseTimeValidationSkew
+ this.responseTimeValidationSkew.toMillis()
);
validationParams.put(
SAML2AssertionValidationParameters.COND_VALID_AUDIENCES,
|
OpenSAML expects type `long` representing millis for response time validation skew
Fixes gh-<I>
<URL>
|
diff --git a/app/controllers/spree/admin/admin_controller_decorator.rb b/app/controllers/spree/admin/admin_controller_decorator.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/spree/admin/admin_controller_decorator.rb
+++ b/app/controllers/spree/admin/admin_controller_decorator.rb
@@ -3,7 +3,11 @@ if defined?(Spree::Admin::BaseController)
Spree::Admin::BaseController.class_eval do
protected
def model_class
- "Spree::#{controller_name.classify}".constantize
+ const_name = "Spree::#{controller_name.classify}"
+ if Object.const_defined?(const_name)
+ return const_name.constantize
+ end
+ nil
end
end
end
|
Only return a value from model_class method if constant is available
Fixes spree/spree#<I>
|
diff --git a/common/packet/connect_options.go b/common/packet/connect_options.go
index <HASH>..<HASH> 100644
--- a/common/packet/connect_options.go
+++ b/common/packet/connect_options.go
@@ -1,5 +1,7 @@
package packet
+import "os"
+
// Defalut values
var (
DefaultCleanSession = true
@@ -30,6 +32,11 @@ type CONNECTOptions struct {
// Init initializes the CONNECTOptions.
func (opts *CONNECTOptions) Init() {
+ if opts.ClientID == "" {
+ hostname, _ := os.Hostname()
+ opts.ClientID = hostname
+ }
+
if opts.CleanSession == nil {
opts.CleanSession = &DefaultCleanSession
}
|
Update common/packet/connect_options.go
|
diff --git a/src/utils/TimeSlots.js b/src/utils/TimeSlots.js
index <HASH>..<HASH> 100644
--- a/src/utils/TimeSlots.js
+++ b/src/utils/TimeSlots.js
@@ -130,7 +130,10 @@ export function getSlotMetrics({ min: start, max: end, step, timeslots }) {
const rangeStartMin = positionFromDate(rangeStart)
const rangeEndMin = positionFromDate(rangeEnd)
- const top = (rangeStartMin / (step * numSlots)) * 100
+ const top =
+ rangeEndMin - rangeStartMin < step && !dates.eq(end, rangeEnd)
+ ? ((rangeStartMin - step) / (step * numSlots)) * 100
+ : (rangeStartMin / (step * numSlots)) * 100
return {
top,
|
Revert round logic and detect last slot
|
diff --git a/Classes/Wwwision/PrivateResources/Resource/Target/ProtectedResourceTarget.php b/Classes/Wwwision/PrivateResources/Resource/Target/ProtectedResourceTarget.php
index <HASH>..<HASH> 100644
--- a/Classes/Wwwision/PrivateResources/Resource/Target/ProtectedResourceTarget.php
+++ b/Classes/Wwwision/PrivateResources/Resource/Target/ProtectedResourceTarget.php
@@ -85,10 +85,10 @@ class ProtectedResourceTarget implements TargetInterface {
}
/**
- * @param Collection $collection The collection to publish
+ * @param CollectionInterface $collection The collection to publish
* @return void
*/
- public function publishCollection(Collection $collection) {
+ public function publishCollection(CollectionInterface $collection) {
// publishing is not required for protected resources
}
|
[BUGFIX] Adjust method signature of publishCollection to current Flow
|
diff --git a/src/Core/AbstractInterface/AbstractEvent.php b/src/Core/AbstractInterface/AbstractEvent.php
index <HASH>..<HASH> 100644
--- a/src/Core/AbstractInterface/AbstractEvent.php
+++ b/src/Core/AbstractInterface/AbstractEvent.php
@@ -76,5 +76,4 @@ abstract class AbstractEvent
abstract function onTask(\swoole_http_server $server, $taskId, $fromId,$taskObj);
abstract function onFinish(\swoole_http_server $server, $taskId, $fromId,$taskObj);
abstract function onWorkerError(\swoole_http_server $server,$worker_id,$worker_pid,$exit_code);
- abstract function onWorkerFatalError(\swoole_http_server $server);
}
\ No newline at end of file
|
delete onFatalError
|
diff --git a/util/mock/mocks/statement.go b/util/mock/mocks/statement.go
index <HASH>..<HASH> 100644
--- a/util/mock/mocks/statement.go
+++ b/util/mock/mocks/statement.go
@@ -11,6 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+// Package mocks is just for test only.
package mocks
import (
|
util/mock/mocks: add package comment.
|
diff --git a/lib/rprogram/compat.rb b/lib/rprogram/compat.rb
index <HASH>..<HASH> 100644
--- a/lib/rprogram/compat.rb
+++ b/lib/rprogram/compat.rb
@@ -5,7 +5,7 @@ module RProgram
#
# Compat.arch #=> "linux"
#
- def self.platform
+ def Compat.platform
RUBY_PLATFORM.split('-').last
end
@@ -16,7 +16,7 @@ module RProgram
#
# Compat.paths #=> ["/bin", "/usr/bin"]
#
- def self.paths
+ def Compat.paths
# return an empty array in case
# the PATH variable does not exist
return [] unless ENV['PATH']
@@ -34,8 +34,8 @@ module RProgram
#
# Compat.find_program('as') #=> "/usr/bin/as"
#
- def self.find_program(name)
- self.paths.each do |dir|
+ def Compat.find_program(name)
+ Compat.paths.each do |dir|
full_path = File.expand_path(File.join(dir,name))
return full_path if File.file?(full_path)
@@ -51,8 +51,8 @@ module RProgram
#
# Compat.find_program_by_names("gas","as") #=> "/usr/bin/as"
#
- def self.find_program_by_names(*names)
- names.map { |name| self.find_program(name) }.compact.first
+ def Compat.find_program_by_names(*names)
+ names.map { |name| Compat.find_program(name) }.compact.first
end
end
end
|
Put methods in the Compat namespace.
|
diff --git a/src/Message/MessageParser.php b/src/Message/MessageParser.php
index <HASH>..<HASH> 100644
--- a/src/Message/MessageParser.php
+++ b/src/Message/MessageParser.php
@@ -38,7 +38,8 @@ class MessageParser
'body' => $parts['body']
];
- $parsed['request_url'] = $this->getUrlPartsFromMessage($parts['start_line'][1], $parsed);
+ $parsed['request_url'] = $this->getUrlPartsFromMessage(
+ (isset($parts['start_line'][1]) ? $parts['start_line'][1] : ''), $parsed);
return $parsed;
}
|
Prevent crushes on parsing incorrect HTTP request
Steps to reproduce crush:
1. Start http-server (like in Ratchet's Hello World (<URL>, and send any text followed by '\n\n'.
Http-server will crush with "PHP Notice: Undefined offset: 1 in .../Guzzle/Parser/Message/MessageParser.php on line <I>" (ratchet currently uses <I>-dev)
|
diff --git a/clc-java-sdk/sdk/src/test/java/com/centurylink/cloud/sdk/servers/services/PublicIpTest.java b/clc-java-sdk/sdk/src/test/java/com/centurylink/cloud/sdk/servers/services/PublicIpTest.java
index <HASH>..<HASH> 100644
--- a/clc-java-sdk/sdk/src/test/java/com/centurylink/cloud/sdk/servers/services/PublicIpTest.java
+++ b/clc-java-sdk/sdk/src/test/java/com/centurylink/cloud/sdk/servers/services/PublicIpTest.java
@@ -37,7 +37,6 @@ public class PublicIpTest extends AbstractServersSdkTest {
@Test(groups = {INTEGRATION, LONG_RUNNING})
public void testPublicIp() {
- new SingleServerFixture().createServer();
serverRef = SingleServerFixture.server();
addPublicIp();
|
<I> Implement possibilities to update public IP settings. changes according comments
|
diff --git a/lib/rules/prefer-destructuring.js b/lib/rules/prefer-destructuring.js
index <HASH>..<HASH> 100644
--- a/lib/rules/prefer-destructuring.js
+++ b/lib/rules/prefer-destructuring.js
@@ -109,8 +109,10 @@ module.exports = {
return;
}
- if (checkArrays && isArrayIndexAccess(rightNode)) {
- report(reportNode, "array");
+ if (isArrayIndexAccess(rightNode)) {
+ if (checkArrays) {
+ report(reportNode, "array");
+ }
return;
}
diff --git a/tests/lib/rules/prefer-destructuring.js b/tests/lib/rules/prefer-destructuring.js
index <HASH>..<HASH> 100644
--- a/tests/lib/rules/prefer-destructuring.js
+++ b/tests/lib/rules/prefer-destructuring.js
@@ -72,6 +72,12 @@ ruleTester.run("prefer-destructuring", rule, {
{
code: "({ foo } = object);"
},
+ {
+
+ // Fix #8654
+ code: "var foo = array[0];",
+ options: [{ array: false }, { enforceForRenamedProperties: true }]
+ },
"[foo] = array;",
"foo += array[0]",
"foo += bar.foo"
|
Fix: Don't check object destructing in integer property (fixes #<I>) (#<I>)
|
diff --git a/src/Generator.php b/src/Generator.php
index <HASH>..<HASH> 100644
--- a/src/Generator.php
+++ b/src/Generator.php
@@ -257,13 +257,13 @@ class Generator extends Extractor
}
if ($column->defaultValue !== null) {
if ($column->defaultValue instanceof Expression) {
- $definition .= '->defaultExpression(\'' . $column->defaultValue->expression . '\')';
+ $definition .= '->defaultExpression(\'' . addslashes($column->defaultValue->expression) . '\')';
} else {
- $definition .= '->defaultValue(\'' . $column->defaultValue . '\')';
+ $definition .= '->defaultValue(\'' . addslashes($column->defaultValue) . '\')';
}
}
if ($column->comment) {
- $definition .= '->comment(\'' . $column->comment . '\')';
+ $definition .= '->comment(\'' . addslashes($column->comment) . '\')';
}
if (!$compositePk && $checkPrimaryKey && $column->isPrimaryKey) {
$definition .= '->append(\'' . $this->prepareSchemaAppend(true, $column->autoIncrement) . '\')';
|
Escape quotes in db comments and defaults
|
diff --git a/gffutils/db.py b/gffutils/db.py
index <HASH>..<HASH> 100644
--- a/gffutils/db.py
+++ b/gffutils/db.py
@@ -226,21 +226,22 @@ class GFFDBCreator(DBCreator):
class GTFDBCreator(DBCreator):
- def __init__(self, dbfn):
- DBCreator.__init__(self, dbfn)
+ def __init__(self, fn, dbfn, *args, **kwargs):
+ DBCreator.__init__(self, fn, dbfn, *args, **kwargs)
+ self.filetype = 'gtf'
def populate_from_features(self, features):
t0 = time.time()
self.drop_indexes()
c = self.conn.cursor()
for feature in features:
- parent = feature.attributes['transcript_id'][0]
- grandparent = feature.attributes['gene_id'][0]
+ parent = feature.attributes['transcript_id']
+ grandparent = feature.attributes['gene_id']
# A database-specific ID to use
- ID = '%s:%s:%s-%s' % (
+ ID = '%s:%s:%s-%s:%s' % (
feature.featuretype, feature.chrom, feature.start,
- feature.stop)
+ feature.stop, feature.strand)
# If it's an exon, its attributes include its parent transcript
# and its 'grandparent' gene. So we can insert these
|
use new dbid, which has strand as well
|
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -256,6 +256,7 @@ class Chef
run_context = nil
events.run_start(Chef::VERSION)
Chef::Log.info("*** Chef #{Chef::VERSION} ***")
+ Chef::Log.info("Platform: #{RUBY_PLATFORM}")
Chef::Log.info "Chef-client pid: #{Process.pid}"
Chef::Log.debug("Chef-client request_id: #{request_id}")
enforce_path_sanity
|
Log platform along with client version and pid.
|
diff --git a/src/com/xtremelabs/robolectric/shadows/ShadowActivity.java b/src/com/xtremelabs/robolectric/shadows/ShadowActivity.java
index <HASH>..<HASH> 100644
--- a/src/com/xtremelabs/robolectric/shadows/ShadowActivity.java
+++ b/src/com/xtremelabs/robolectric/shadows/ShadowActivity.java
@@ -6,6 +6,7 @@ import java.util.List;
import android.app.Activity;
import android.app.Application;
import android.content.Intent;
+import android.os.Looper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
@@ -151,6 +152,11 @@ public class ShadowActivity extends ShadowContextWrapper {
public void onDestroy() {
assertNoBroadcastListenersRegistered();
}
+
+ @Implementation
+ public final void runOnUiThread( Runnable action ) {
+ shadowOf(Looper.myLooper()).post( action, 0 );
+ }
/**
* Checks the {@code ApplicationContext} to see if {@code BroadcastListener}s are still registered.
|
Added runOnUiThread() to ShadowActivity
|
diff --git a/astropy_helpers/utils.py b/astropy_helpers/utils.py
index <HASH>..<HASH> 100644
--- a/astropy_helpers/utils.py
+++ b/astropy_helpers/utils.py
@@ -13,6 +13,9 @@ import warnings
try:
from importlib import machinery as import_machinery
+ # Python 3.2 does not have SourceLoader
+ if not hasattr(import_machinery, 'SourceLoader'):
+ import_machinery = None
except ImportError:
import_machinery = None
|
SourceLoader does not exist in Python <I>
|
diff --git a/environs/jujutest/livetests.go b/environs/jujutest/livetests.go
index <HASH>..<HASH> 100644
--- a/environs/jujutest/livetests.go
+++ b/environs/jujutest/livetests.go
@@ -584,17 +584,23 @@ func (t *LiveTests) TestFile(c *C) {
// check that the listed contents include the
// expected name.
found := false
- names, err := storage.List("")
- for _, lname := range names {
- if lname == name {
- found = true
- break
+ var names []string
+attempt:
+ for a := t.Attempt.Start(); a.Next(); {
+ var err error
+ names, err = storage.List("")
+ c.Assert(err, IsNil)
+ for _, lname := range names {
+ if lname == name {
+ found = true
+ break attempt
+ }
}
}
if !found {
c.Errorf("file name %q not found in file list %q", name, names)
}
- err = storage.Remove(name)
+ err := storage.Remove(name)
c.Check(err, IsNil)
checkFileDoesNotExist(c, storage, name, t.Attempt)
// removing a file that does not exist should not be an error.
|
environs/jujutest: revert TestFile loop removal
|
diff --git a/examples/update_user.rb b/examples/update_user.rb
index <HASH>..<HASH> 100644
--- a/examples/update_user.rb
+++ b/examples/update_user.rb
@@ -11,3 +11,4 @@ puts client.username_update(username: "Batman", new_username: "Alfred")
puts client.user_update(username: "Batman", name: "Bruce Wayne")
puts client.email_update(username: "Batman", email: "batman@example.com")
puts client.toggle_avatar(username: "Batman", use_uploaded_avatar: true)
+puts client.upload_avatar(username: "DiscourseHero", file: "http://cdn.discourse.org/assets/logo.png")
diff --git a/lib/discourse_api/client.rb b/lib/discourse_api/client.rb
index <HASH>..<HASH> 100644
--- a/lib/discourse_api/client.rb
+++ b/lib/discourse_api/client.rb
@@ -29,4 +29,7 @@ class DiscourseApi::Client < DiscourseApi::Resource
put :toggle_avatar => '/users/:username/preferences/avatar/toggle',
:require => [:username]
+ post :upload_avatar => '/users/:username/preferences/avatar',
+ :require => [:username, :file]
+
end
|
Added a post request to upload avatars with a url
|
diff --git a/src/Illuminate/Foundation/Exceptions/Handler.php b/src/Illuminate/Foundation/Exceptions/Handler.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Foundation/Exceptions/Handler.php
+++ b/src/Illuminate/Foundation/Exceptions/Handler.php
@@ -6,6 +6,7 @@ use Exception;
use Psr\Log\LoggerInterface;
use Illuminate\Http\Response;
use Illuminate\Routing\Router;
+use Illuminate\Support\Facades\Auth;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Contracts\Container\Container;
@@ -69,7 +70,7 @@ class Handler implements ExceptionHandlerContract
throw $e; // throw the original exception
}
- $logger->error($e);
+ $logger->error($e, $this->context());
}
/**
@@ -99,6 +100,20 @@ class Handler implements ExceptionHandlerContract
}
/**
+ * Get the default context variables for logging.
+ *
+ * @return array
+ */
+ protected function context()
+ {
+ return array_filter([
+ 'userId' => Auth::id(),
+ 'email' => Auth::check() && isset(Auth::user()->email)
+ ? Auth::user()->email : null,
+ ]);
+ }
+
+ /**
* Render an exception into a response.
*
* @param \Illuminate\Http\Request $request
|
Add some default context to logs if we know it.
If we know the user ID and email, add it to the log context for easier
searching for a given users error.
|
diff --git a/src/includes/classes/AppConfig.php b/src/includes/classes/AppConfig.php
index <HASH>..<HASH> 100644
--- a/src/includes/classes/AppConfig.php
+++ b/src/includes/classes/AppConfig.php
@@ -194,6 +194,11 @@ class AppConfig extends AbsCore
if (!is_array($config = json_decode(file_get_contents($config_file), true))) {
throw new Exception(sprintf('Invalid config file: `%1$s`.', $config_file));
}
+ if (!empty($config['core_app'])) {
+ $config = (array) $config['core_app'];
+ } elseif (!empty($config['app'])) {
+ $config = (array) $config['app'];
+ }
$config = $this->merge($instance_base, $config, true);
$config = $this->merge($config, $instance);
} else {
@@ -288,6 +293,7 @@ class AppConfig extends AbsCore
'%%app_dir%%',
'%%core_dir%%',
+ '%%home_dir%%',
],
[
$this->App->namespace,
@@ -295,6 +301,7 @@ class AppConfig extends AbsCore
$this->App->dir,
$this->App->core_dir,
+ (string) ($_SERVER['HOME'] ?? ''),
],
$value
);
|
Adding support for `%%home_dir%%` replacement code.
|
diff --git a/lib/jazzy/sourcekitten.rb b/lib/jazzy/sourcekitten.rb
index <HASH>..<HASH> 100644
--- a/lib/jazzy/sourcekitten.rb
+++ b/lib/jazzy/sourcekitten.rb
@@ -161,6 +161,15 @@ module Jazzy
end
end
+ # returns all subdirectories of specified path
+ def self.rec_path(path)
+ path.children.collect do |child|
+ if child.directory?
+ rec_path(child) + [child]
+ end
+ end.select { |x| x }.flatten(1)
+ end
+
# Builds SourceKitten arguments based on Jazzy options
def self.arguments_from_options(options)
arguments = ['doc']
@@ -170,8 +179,10 @@ module Jazzy
'objective-c', '-isysroot',
`xcrun --show-sdk-path --sdk #{options.sdk}`.chomp,
'-I', options.framework_root.to_s]
- # add additional -I arguments for each subdirectory of framework_root
- Pathname.new(options.framework_root.to_s).children.collect do |child|
+ end
+ # add additional -I arguments for each subdirectory of framework_root
+ unless options.framework_root.nil?
+ rec_path(Pathname.new(options.framework_root.to_s)).collect do |child|
if child.directory?
arguments += ['-I', child.to_s]
end
|
Include all subfolders of framework_root
Check if framework_root option is set and include all subfolders (recursively) of framework_root.
|
diff --git a/acceptance/tests/ticket_17458_puppet_command_prints_help.rb b/acceptance/tests/ticket_17458_puppet_command_prints_help.rb
index <HASH>..<HASH> 100644
--- a/acceptance/tests/ticket_17458_puppet_command_prints_help.rb
+++ b/acceptance/tests/ticket_17458_puppet_command_prints_help.rb
@@ -1,5 +1,5 @@
test_name "puppet command with an unknown external command prints help"
-on agents, puppet('unknown') do
+on(agents, puppet('unknown'), :acceptable_exit_codes => [1]) do
assert_match(/See 'puppet help' for help on available puppet subcommands/, stdout)
end
|
(maint) Allow exit code of 1 for unknown subcommand acceptance test.
Fixing acceptance test to now allow for an exit code of 1 when the
"unknown subcommand" error is returned from puppet.
|
diff --git a/ez_setup.py b/ez_setup.py
index <HASH>..<HASH> 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -36,7 +36,7 @@ try:
except ImportError:
USER_SITE = None
-DEFAULT_VERSION = "5.7"
+DEFAULT_VERSION = "5.8"
DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
def _python_cmd(*args):
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__ = '5.7'
+__version__ = '5.8'
|
Bumped to <I> in preparation for next release.
|
diff --git a/kernel/src/main/java/org/efaps/db/databases/OracleDatabase.java b/kernel/src/main/java/org/efaps/db/databases/OracleDatabase.java
index <HASH>..<HASH> 100644
--- a/kernel/src/main/java/org/efaps/db/databases/OracleDatabase.java
+++ b/kernel/src/main/java/org/efaps/db/databases/OracleDatabase.java
@@ -127,7 +127,7 @@ public class OracleDatabase extends AbstractDatabase {
try {
ResultSet rs = stmt.executeQuery(
- "select t.TABLENAME "
+ "select VIEW_NAME "
+ "from USER_VIEWS "
+ "where VIEW_NAME='" + _viewName.toUpperCase() + "'"
);
|
- wrong column name of the user views was used
git-svn-id: <URL>
|
diff --git a/test/jpypetest/test_buffer.py b/test/jpypetest/test_buffer.py
index <HASH>..<HASH> 100644
--- a/test/jpypetest/test_buffer.py
+++ b/test/jpypetest/test_buffer.py
@@ -122,8 +122,8 @@ class BufferTestCase(common.JPypeTestCase):
self.assertTrue(np.all(np.array(jtype(na), dtype=dtype)
== np.array(na, dtype=dtype)))
na = np.random.randint(0, 2**64 - 1, size=n, dtype=np.uint64)
- self.assertTrue(np.all(np.array(jtype(na), dtype=dtype)
- == np.array(na, dtype=dtype)))
+ self.assertTrue(np.allclose(np.array(jtype(na), dtype=dtype),
+ np.array(na, dtype=dtype), atol=1e-8))
na = np.random.random(n).astype(np.float32)
self.assertTrue(np.all(np.array(jtype(na), dtype=dtype)
== np.array(na, dtype=dtype)))
|
Use allclose to fix conversion issue.
|
diff --git a/src/Collection.php b/src/Collection.php
index <HASH>..<HASH> 100644
--- a/src/Collection.php
+++ b/src/Collection.php
@@ -446,7 +446,7 @@ class Collection
* @see http://docs.mongodb.org/manual/core/read-operations-introduction/
* @param array|object $filter Query by which to filter documents
* @param array $options Additional options
- * @return object|null
+ * @return array|object|null
*/
public function findOne($filter = [], array $options = [])
{
diff --git a/src/Operation/FindOne.php b/src/Operation/FindOne.php
index <HASH>..<HASH> 100644
--- a/src/Operation/FindOne.php
+++ b/src/Operation/FindOne.php
@@ -74,7 +74,7 @@ class FindOne implements Executable
*
* @see Executable::execute()
* @param Server $server
- * @return object|null
+ * @return array|object|null
*/
public function execute(Server $server)
{
|
FindOne::execute() may return an array
The return type documentation should have been updated when the typMap option was introduced in PHPLIB-<I>.
|
diff --git a/pypet/tests/testutils/ioutils.py b/pypet/tests/testutils/ioutils.py
index <HASH>..<HASH> 100644
--- a/pypet/tests/testutils/ioutils.py
+++ b/pypet/tests/testutils/ioutils.py
@@ -22,6 +22,9 @@ from pypet import HasLogger
from pypet.pypetlogging import LoggingManager, rename_log_file
from pypet.utils.decorators import copydoc
+import pypet.utils.ptcompat as ptcompat
+hdf5version = ptcompat.hdf5_version
+print('HDF5 Version: %s') % str(hdf5version)
testParams=dict(
tempdir = 'tmp_pypet_tests',
|
Added printing of HDF5 Version
|
diff --git a/core-bundle/src/Resources/contao/modules/ModuleArticle.php b/core-bundle/src/Resources/contao/modules/ModuleArticle.php
index <HASH>..<HASH> 100644
--- a/core-bundle/src/Resources/contao/modules/ModuleArticle.php
+++ b/core-bundle/src/Resources/contao/modules/ModuleArticle.php
@@ -10,7 +10,6 @@
namespace Contao;
-
/**
* Provides methodes to handle articles.
*
@@ -376,7 +375,6 @@ class ModuleArticle extends \Module
// Close and output PDF document
$pdf->lastPage();
$pdf->Output(standardize(ampersand($this->title, false)) . '.pdf', 'D');
- // FIXME: This has to be changed to a ResponseException somehow - rather write to temp file and stream it then?
// Stop script execution
exit;
}
|
[Core] Remove FIXME.
|
diff --git a/nodes/ccu-mqtt.js b/nodes/ccu-mqtt.js
index <HASH>..<HASH> 100644
--- a/nodes/ccu-mqtt.js
+++ b/nodes/ccu-mqtt.js
@@ -210,7 +210,7 @@ module.exports = function (RED) {
return;
}
- this.ccu.setValue(iface, filter.channel, filter.datapoint, payload);
+ this.ccu.setValue(iface, filter.channel, filter.datapoint, payload).catch(() => {});
}
sysvar(filter, payload) {
|
catch promise rejection on setValue (close #<I>)
|
diff --git a/gala/potential/common.py b/gala/potential/common.py
index <HASH>..<HASH> 100644
--- a/gala/potential/common.py
+++ b/gala/potential/common.py
@@ -83,6 +83,13 @@ class CommonBase:
def _parse_parameter_values(self, *args, **kwargs):
expected_parameter_keys = list(self._parameters.keys())
+ if len(args) > len(expected_parameter_keys):
+ raise ValueError("Too many positional arguments passed in to "
+ f"{self.__class__}: Potential and Frame classes "
+ "only accept parameters as positional arguments, "
+ "all other arguments (e.g., units) must now be "
+ "passed in as keyword argument.")
+
parameter_values = dict()
# Get any parameters passed as positional arguments
diff --git a/gala/potential/potential/tests/helpers.py b/gala/potential/potential/tests/helpers.py
index <HASH>..<HASH> 100644
--- a/gala/potential/potential/tests/helpers.py
+++ b/gala/potential/potential/tests/helpers.py
@@ -65,7 +65,7 @@ class PotentialTestBase(object):
def setup(self):
# set up hamiltonian
if self.frame is None:
- self.frame = StaticFrame(self.potential.units)
+ self.frame = StaticFrame(units=self.potential.units)
self.H = Hamiltonian(self.potential, self.frame)
def test_unitsystem(self):
|
frames must now take units as a keyword argument
|
diff --git a/parsl/executors/high_throughput/process_worker_pool.py b/parsl/executors/high_throughput/process_worker_pool.py
index <HASH>..<HASH> 100755
--- a/parsl/executors/high_throughput/process_worker_pool.py
+++ b/parsl/executors/high_throughput/process_worker_pool.py
@@ -114,8 +114,6 @@ class Manager(object):
last_beat = time.time()
if ready_worker_count > 0:
-
- ready_worker_count = 4
logger.debug("[TASK_PULL_THREAD] Requesting tasks: {}".format(ready_worker_count))
msg = ((ready_worker_count).to_bytes(4, "little"))
self.task_incoming.send(msg)
|
Removing hardcoded ready_worker_count
|
diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/lib.php
+++ b/mod/quiz/lib.php
@@ -1074,7 +1074,7 @@ function quiz_reset_userdata($data) {
function quiz_check_file_access($attemptuniqueid, $questionid) {
global $USER, $DB;
- $attempt = $DB->get_record('quiz_attempts', array('uniqueid' => $attemptid));
+ $attempt = $DB->get_record('quiz_attempts', array('uniqueid' => $attemptuniqueid));
$quiz = $DB->get_record('quiz', array('id' => $attempt->quiz));
$context = get_context_instance(CONTEXT_COURSE, $quiz->course);
|
Fixing typo introduced in <I> version of this file.
|
diff --git a/mod/resource/locallib.php b/mod/resource/locallib.php
index <HASH>..<HASH> 100644
--- a/mod/resource/locallib.php
+++ b/mod/resource/locallib.php
@@ -404,7 +404,7 @@ function resource_get_intro(object $resource, object $cm, bool $ignoresettings =
$content = "";
if ($ignoresettings || !empty($options['printintro']) || $extraintro) {
- $gotintro = trim(strip_tags($resource->intro));
+ $gotintro = !html_is_blank($resource->intro);
if ($gotintro || $extraintro) {
if ($gotintro) {
$content = format_module_intro('resource', $resource, $cm->id);
|
MDL-<I> mod_resource: better detection of empty module intro.
|
diff --git a/src/Model/Table/ConfigurationsTable.php b/src/Model/Table/ConfigurationsTable.php
index <HASH>..<HASH> 100644
--- a/src/Model/Table/ConfigurationsTable.php
+++ b/src/Model/Table/ConfigurationsTable.php
@@ -27,7 +27,7 @@ class ConfigurationsTable extends AbstractConfigurationsTable
public function validationDefault(Validator $validator)
{
$validator->requirePresence('namespace', 'create')
- ->add('namespace', 'valid-namespace', ['rule' => '@[a-z0-9\\\.]+@'])
+ ->add('namespace', 'valid-namespace', ['rule' => ['custom', '@[a-z0-9\\\.]+@']])
->requirePresence('path')
->notEmpty('path')
|
'custom' rule is used, and must be named accordingly.
|
diff --git a/SlimJson/Middleware.php b/SlimJson/Middleware.php
index <HASH>..<HASH> 100644
--- a/SlimJson/Middleware.php
+++ b/SlimJson/Middleware.php
@@ -101,15 +101,18 @@ class Middleware extends \Slim\Middleware {
$cors = $app->config(Config::Cors);
if ($cors) {
if(\is_callable($cors)) {
- $origin = \call_user_func($cors, $app->request());
+ $allowOrigin = \call_user_func($cors, $app->request()->headers->get('Origin'));
} else {
if (!\is_string($cors)) {
- $origin = '*';
+ $allowOrigin = '*';
} else {
- $origin = $cors;
+ $allowOrigin = $cors;
}
}
- $app->response()->header('Access-Control-Allow-Origin', $origin);
+
+ if($allowOrigin) {
+ $app->response()->header('Access-Control-Allow-Origin', $allowOrigin);
+ }
}
if ($app->config(Config::Protect)) {
|
Think it's better to call a function with the request origin as parameter
|
diff --git a/apps/editing-toolkit/editing-toolkit-plugin/full-site-editing-plugin.php b/apps/editing-toolkit/editing-toolkit-plugin/full-site-editing-plugin.php
index <HASH>..<HASH> 100644
--- a/apps/editing-toolkit/editing-toolkit-plugin/full-site-editing-plugin.php
+++ b/apps/editing-toolkit/editing-toolkit-plugin/full-site-editing-plugin.php
@@ -338,6 +338,11 @@ add_action( 'plugins_loaded', __NAMESPACE__ . '\load_tags_education' );
* (Core Full Site Editing)
*/
function load_wpcom_site_editor() {
+ // This is no longer needed after Gutenberg 12.2 due to the Navigation menu no longer being inscrutable.
+ // This should be deleted along with the files that would be loaded after 12.2 is in production.
+ if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '12.2.0', '>=' ) ) {
+ return;
+ }
require_once __DIR__ . '/wpcom-site-editor/index.php';
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_wpcom_site_editor', 11 ); // load just after the Gutenberg plugin.
|
Site Editor: don't hide nav after Gutenberg <I> (#<I>)
|
diff --git a/src/quill.mention.js b/src/quill.mention.js
index <HASH>..<HASH> 100644
--- a/src/quill.mention.js
+++ b/src/quill.mention.js
@@ -191,11 +191,14 @@ class Mention {
if (!this.options.showDenotationChar) {
render.denotationChar = '';
}
+
+ const prevMentionCharPos = this.mentionCharPos;
+
this.quill
.deleteText(this.mentionCharPos, this.cursorPos - this.mentionCharPos, Quill.sources.USER);
- this.quill.insertEmbed(this.mentionCharPos, 'mention', render, Quill.sources.USER);
- this.quill.insertText(this.mentionCharPos + 1, ' ', Quill.sources.USER);
- this.quill.setSelection(this.mentionCharPos + 2, Quill.sources.USER);
+ this.quill.insertEmbed(prevMentionCharPos, 'mention', render, Quill.sources.USER);
+ this.quill.insertText(prevMentionCharPos + 1, ' ', Quill.sources.USER);
+ this.quill.setSelection(prevMentionCharPos + 2, Quill.sources.USER);
this.hideMentionList();
}
|
Fix: Mention placement position (#<I>)
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+
"""
Setup script for the `can` package.
Learn more at https://github.com/hardbyte/python-can/
@@ -6,8 +7,6 @@ Learn more at https://github.com/hardbyte/python-can/
# pylint: disable=invalid-name
-from __future__ import absolute_import
-
from os import listdir
from os.path import isfile, join
import re
|
Remove Python 2 leftover from setup.py
|
diff --git a/Classes/Controller/BackendController.php b/Classes/Controller/BackendController.php
index <HASH>..<HASH> 100755
--- a/Classes/Controller/BackendController.php
+++ b/Classes/Controller/BackendController.php
@@ -87,7 +87,7 @@ class BackendController extends ActionController
LocalizationUtility::translate($this->languageFilePrefix . 'styleguide', 'styleguide'),
LocalizationUtility::translate($this->languageFilePrefix . ($arguments['action'] ?? 'index'), 'styleguide')
))
- ->setRouteIdentifier('help_StyleguideBackend')
+ ->setRouteIdentifier('help_StyleguideStyleguide')
->setArguments($shortcutArguments);
$buttonBar->addButton($shortcutButton);
}
|
[BUGFIX] Use correct route identifier for shortcut button
|
diff --git a/src/TwigJs/JsCompiler.php b/src/TwigJs/JsCompiler.php
index <HASH>..<HASH> 100644
--- a/src/TwigJs/JsCompiler.php
+++ b/src/TwigJs/JsCompiler.php
@@ -194,6 +194,7 @@ class JsCompiler extends \Twig_Compiler
$this->filterCompilers = array();
$this->filterFunctions = array(
'escape' => 'twig.filter.escape',
+ 'e' => 'twig.filter.escape',
'length' => 'twig.filter.length',
'capitalize' => 'twig.filter.capitalize',
'default' => 'twig.filter.def',
|
adds "e" filter (closes #<I>)
|
diff --git a/tests/helpers/run.js b/tests/helpers/run.js
index <HASH>..<HASH> 100644
--- a/tests/helpers/run.js
+++ b/tests/helpers/run.js
@@ -30,7 +30,7 @@ const bootstrap = () =>
module.exports = (...args) =>
bootstrap().then((rootDir) => {
process.chdir(rootDir);
- process.nextTick(() => run(null, ...args));
+ process.nextTick(() => run(...args));
const { events } = require(join(rootDir, 'core'));
const api = {
|
test: use new yargs API
|
diff --git a/tcex/tcex_batch_v2.py b/tcex/tcex_batch_v2.py
index <HASH>..<HASH> 100644
--- a/tcex/tcex_batch_v2.py
+++ b/tcex/tcex_batch_v2.py
@@ -535,9 +535,16 @@ class TcExBatch(object):
'type': group_data.get('type')
}
else:
+ GROUPS_CLASSES_WITH_FILE_CONTENTS = [Document, Report]
+ GROUPS_STRINGS_WITH_FILE_CONTENTS = ['Document', 'Report']
# process file content
- if group_data.data.get('type') in ['Document', 'Report']:
- self._files[group_data.data.get('xid')] = group_data.file_data
+ if group_data.data.get('type') in GROUPS_STRINGS_WITH_FILE_CONTENTS:
+ # this handles groups created using interface 1 (https://docs.threatconnect.com/en/latest/tcex/batch.html#group-interface-1)
+ if type(group_data) in GROUPS_CLASSES_WITH_FILE_CONTENTS:
+ self._files[group_data.data.get('xid')] = group_data.file_data
+ # this handles groups created using interface 2 (https://docs.threatconnect.com/en/latest/tcex/batch.html#group-interface-2)
+ else:
+ self._files[group_data.data.get('xid')] = group_data.data.get('file_data')
group_data = group_data.data
return group_data
|
Fixing document/report file content upload
This handles documents/reports uploaded using interface 2
|
diff --git a/qface/idl/listener.py b/qface/idl/listener.py
index <HASH>..<HASH> 100644
--- a/qface/idl/listener.py
+++ b/qface/idl/listener.py
@@ -63,6 +63,7 @@ class DomainListener(TListener):
log.warn('Unknown type: {0}. Missing import?'.format(type.name))
def parse_annotations(self, ctx, symbol):
+ assert ctx and symbol
if ctx.comment:
comment = ctx.comment.text
symbol.comment = comment
@@ -153,7 +154,7 @@ class DomainListener(TListener):
assert self.interface
name = ctx.name.text
self.signal = Signal(name, self.interface)
- self.parse_annotations(ctx, self.operation)
+ self.parse_annotations(ctx, self.signal)
contextMap[ctx] = self.signal
def exitSignalSymbol(self, ctx: TParser.SignalSymbolContext):
|
Fixed error where wrong symbol was parsed for signal annotation
|
diff --git a/packages/pob/utils/package.js b/packages/pob/utils/package.js
index <HASH>..<HASH> 100644
--- a/packages/pob/utils/package.js
+++ b/packages/pob/utils/package.js
@@ -152,19 +152,20 @@ const internalAddDependencies = (pkg, type, dependencies, cleaned) => {
const potentialNewVersion = pobDependencies[dependency];
const currentVersion = currentDependencies[dependency];
const potentialNewVersionCleaned = cleanVersion(potentialNewVersion);
+ const getNewVersion = () => cleaned ? potentialNewVersionCleaned : potentialNewVersion;
try {
if (
!currentVersion ||
semver.gt(potentialNewVersionCleaned, cleanVersion(currentVersion))
) {
- filtredDependencies[dependency] = potentialNewVersion;
+ filtredDependencies[dependency] = getNewVersion();
} else if (potentialNewVersionCleaned === cleanVersion(currentVersion)) {
- filtredDependencies[dependency] = potentialNewVersion;
+ filtredDependencies[dependency] = getNewVersion();
} else if (potentialNewVersion !== currentVersion) {
console.warn(`dependency "${dependency}" has a higher version: expected ${potentialNewVersion}, actual: ${currentVersion}.`);
}
} catch (err) {
- filtredDependencies[dependency] = cleaned ? potentialNewVersionCleaned : potentialNewVersion;
+ filtredDependencies[dependency] = getNewVersion();
}
});
}
|
fix: devDep always cleaned
|
diff --git a/lib/spiced_rumby.rb b/lib/spiced_rumby.rb
index <HASH>..<HASH> 100644
--- a/lib/spiced_rumby.rb
+++ b/lib/spiced_rumby.rb
@@ -15,7 +15,7 @@ module SpicedRumby
module_function
def start
- is_debugging = ['nogui', 'bash', 'd', 'debug'].include?(ARGV.first)
+ is_debugging = ['nogui', 'bash', 'b', 'd', 'debug'].include?(ARGV.first)
is_debugging ? debug_start : gui_start
end
|
add extra option to get to debug bash ui
|
diff --git a/Twig/DoctrineExtension.php b/Twig/DoctrineExtension.php
index <HASH>..<HASH> 100644
--- a/Twig/DoctrineExtension.php
+++ b/Twig/DoctrineExtension.php
@@ -233,9 +233,6 @@ class DoctrineExtension extends \Twig_Extension
$result = $this->composeMiniQuery($query, $keywords, $required);
}
- // Highlight the minified query
- $result = \SqlFormatter::highlight($result);
-
// Remove unneeded boilerplate HTML
$result = str_replace(array("<pre style='background:white;'", "</pre>"), array("<span", "</span>"), $result);
|
Removed the highlighting of minified queries
The minified queries are not valid SQL anymore, so highlighting them with
the SqlFormatter does not make sense.
Closes #<I>
|
diff --git a/app/modules/categories/CategoryController.js b/app/modules/categories/CategoryController.js
index <HASH>..<HASH> 100644
--- a/app/modules/categories/CategoryController.js
+++ b/app/modules/categories/CategoryController.js
@@ -19,11 +19,24 @@ angular
selectionService.select($stateParams.category, angular.element($event.currentTarget));
- if (!category.children){
- navigationService.navigateToProducts(category.urlId);
- } else {
- navigationService.navigateToCategory(category.urlId);
- }
+ //even if we have the category already provided by the function parameter,
+ //we have to fetch it again via the couchService. The reason for that is, that
+ //it might be a leaf with no children but it's just an alias to a category
+ //which does have children. In this case, we want to get to the real category
+ //which has the children.
+
+ //in 99% of the cases we will just get the same category returned by the couchService
+ //as the one we got via the function parameter but for such alias corner cases it's important
+ //to retrieve it through the couchService.
+ couchService
+ .getCategory(category.urlId)
+ .then(function(realCategory){
+ if (!realCategory.children){
+ navigationService.navigateToProducts(realCategory.urlId);
+ } else {
+ navigationService.navigateToCategory(realCategory.urlId);
+ }
+ });
};
if (!category.children){
|
fix(CategoryController): make sure to always fetch the category through the couchService
|
diff --git a/Lib/glyphsLib/builder/glyph.py b/Lib/glyphsLib/builder/glyph.py
index <HASH>..<HASH> 100644
--- a/Lib/glyphsLib/builder/glyph.py
+++ b/Lib/glyphsLib/builder/glyph.py
@@ -143,10 +143,18 @@ def to_glyphs_glyph(self, ufo_glyph, ufo_layer, master):
# have a write the first time, compare the next times for glyph
# always write for the layer
- if ufo_glyph.name in self.font.glyphs:
- glyph = self.font.glyphs[ufo_glyph.name]
- else:
- glyph = self.glyphs_module.GSGlyph(name=ufo_glyph.name)
+ # NOTE: This optimizes around the performance drain that is glyph name lookup
+ # without replacing the actual data structure. Ideally, FontGlyphsProxy
+ # provides O(1) lookup for all the ways you can use strings to look up
+ # glyphs.
+ ufo_glyph_name = ufo_glyph.name # Avoid method lookup in hot loop.
+ glyph = None
+ for glyph_object in self.font._glyphs: # HOT LOOP. Avoid FontGlyphsProxy for speed!
+ if glyph_object.name == ufo_glyph_name: # HOT HOT HOT
+ glyph = glyph_object
+ break
+ if glyph is None:
+ glyph = self.glyphs_module.GSGlyph(name=ufo_glyph_name)
# FIXME: (jany) ordering?
self.font.glyphs.append(glyph)
|
to_glyphs_glyph: Optimize glyph name lookup
|
diff --git a/atomic_reactor/plugins/pre_koji_parent.py b/atomic_reactor/plugins/pre_koji_parent.py
index <HASH>..<HASH> 100644
--- a/atomic_reactor/plugins/pre_koji_parent.py
+++ b/atomic_reactor/plugins/pre_koji_parent.py
@@ -29,19 +29,19 @@ class KojiParentBuildMissing(ValueError):
class KojiParentPlugin(PreBuildPlugin):
- """Wait for Koji build of parent image to be available
+ """Wait for Koji build of parent images to be available
- Uses inspected parent image config to determine the
- nvr (Name-Version-Release) of the parent image. It uses
+ Uses inspected parent image configs to determine the
+ nvrs (Name-Version-Release) of the parent images. It uses
this information to check if the corresponding Koji
- build exists. This check is performed periodically until
- the Koji build is found, or timeout expires.
+ builds exist. This check is performed periodically until
+ the Koji builds are all found, or timeout expires.
This check is required due to a timing issue that may
occur after the image is pushed to registry, but it
has not been yet uploaded and tagged in Koji. This plugin
- ensures that the layered image is only built with a parent
- image that is known in Koji.
+ ensures that the layered image is only built with parent
+ images that are known in Koji.
"""
key = PLUGIN_KOJI_PARENT_KEY
|
Update KojiParentPlugin docstring to describe multiple parents
|
diff --git a/Client/Api/StatementsApiClient.php b/Client/Api/StatementsApiClient.php
index <HASH>..<HASH> 100644
--- a/Client/Api/StatementsApiClient.php
+++ b/Client/Api/StatementsApiClient.php
@@ -146,7 +146,10 @@ class StatementsApiClient extends ApiClient implements StatementsApiClientInterf
return $createdStatements;
} else {
$createdStatement = clone $statements;
- $createdStatement->setId($statementIds[0]);
+
+ if (200 === $validStatusCode) {
+ $createdStatement->setId($statementIds[0]);
+ }
return $createdStatement;
}
|
When predefined id is setted, It doesn't spect content from store request (following xAPI spec <I> is used when id is included), so in case of <I> we don't need to fill id
|
diff --git a/physical/etcd/etcd2.go b/physical/etcd/etcd2.go
index <HASH>..<HASH> 100644
--- a/physical/etcd/etcd2.go
+++ b/physical/etcd/etcd2.go
@@ -138,9 +138,9 @@ func newEtcdV2Client(conf map[string]string) (client.Client, error) {
if (hasCert && hasKey) || hasCa {
var transportErr error
tls := transport.TLSInfo{
- CAFile: ca,
- CertFile: cert,
- KeyFile: key,
+ TrustedCAFile: ca,
+ CertFile: cert,
+ KeyFile: key,
}
cTransport, transportErr = transport.NewTransport(tls, 30*time.Second)
diff --git a/physical/etcd/etcd3.go b/physical/etcd/etcd3.go
index <HASH>..<HASH> 100644
--- a/physical/etcd/etcd3.go
+++ b/physical/etcd/etcd3.go
@@ -86,9 +86,9 @@ func newEtcd3Backend(conf map[string]string, logger log.Logger) (physical.Backen
ca, hasCa := conf["tls_ca_file"]
if (hasCert && hasKey) || hasCa {
tls := transport.TLSInfo{
- CAFile: ca,
- CertFile: cert,
- KeyFile: key,
+ TrustedCAFile: ca,
+ CertFile: cert,
+ KeyFile: key,
}
tlscfg, err := tls.ClientConfig()
|
Update to TrustedCAFile for etcd as CAFile is deprecated and removed in latest libs
|
diff --git a/notifier.go b/notifier.go
index <HASH>..<HASH> 100644
--- a/notifier.go
+++ b/notifier.go
@@ -34,7 +34,12 @@ func New(rawData ...interface{}) *Notifier {
// Bugsnag after being converted to JSON. e.g. bugsnag.SeverityError, bugsnag.Context,
// or bugsnag.MetaData.
func (notifier *Notifier) Notify(rawData ...interface{}) (e error) {
- return notifier.NotifySync(append(rawData, notifier.Config.Synchronous)...)
+ // Ensure any passed in raw-data synchronous boolean value takes precedence
+ args := append(rawData, nil)
+ copy(args[1:], args)
+ args[0] = notifier.Config.Synchronous
+
+ return notifier.NotifySync(args...)
}
// NotifySync sends an error to Bugsnag. A boolean parameter specifies whether
|
[fix] Ensure calls to Notify has correct arg precedence
|
diff --git a/vendor/plugins/enju_oai/lib/enju_oai/oai_controller.rb b/vendor/plugins/enju_oai/lib/enju_oai/oai_controller.rb
index <HASH>..<HASH> 100644
--- a/vendor/plugins/enju_oai/lib/enju_oai/oai_controller.rb
+++ b/vendor/plugins/enju_oai/lib/enju_oai/oai_controller.rb
@@ -54,12 +54,19 @@ module OaiController
end
def get_resumption_token(token)
- resumption = Rails.cache.read(token) rescue nil
+ if token.present?
+ resumption = Rails.cache.read(token)
+ end
+ rescue
+ nil
end
def set_resumption_token(token, from_time, until_time, per_page = 0)
- if resumption = Rails.cache.read(token)
- @cursor = resumption[:cursor] + per_page ||= resources.per_page
+ if token.present?
+ resumption = Rails.cache.read(token)
+ if resumption
+ @cursor = resumption[:cursor] + per_page ||= resources.per_page
+ end
end
@cursor ||= 0
yml = YAML.load_file("#{Rails.root.to_s}/config/oai_cache.yml")
|
ListRecords doesn't work if resumptionToken isn't set
|
diff --git a/includes/properties/class-property-repeater.php b/includes/properties/class-property-repeater.php
index <HASH>..<HASH> 100644
--- a/includes/properties/class-property-repeater.php
+++ b/includes/properties/class-property-repeater.php
@@ -62,7 +62,7 @@ class PropertyRepeater extends Papi_Property {
return (object) _papi_get_property_options( $item, false );
}, $items );
- $items = array_filter( $items, function ( $item ) use ( $not_allowed ) {
+ return array_filter( $items, function ( $item ) use ( $not_allowed ) {
if ( ! is_object( $item ) ) {
return false;
@@ -70,9 +70,6 @@ class PropertyRepeater extends Papi_Property {
return ! in_array( _papi_get_property_short_type( $item->type ), $not_allowed );
} );
-
- return _papi_sort_order( $items );
-
}
/**
|
Update class-property-repeater.php
|
diff --git a/lib/punchblock/rayo_node.rb b/lib/punchblock/rayo_node.rb
index <HASH>..<HASH> 100644
--- a/lib/punchblock/rayo_node.rb
+++ b/lib/punchblock/rayo_node.rb
@@ -60,6 +60,7 @@ module Punchblock
# not provided one will be created
# @return a new object with the registered name and namespace
def self.new(name = registered_name, doc = nil)
+ raise "Trying to create a new #{self} with no name" unless name
super name, doc, registered_ns
end
|
[FEATURE] Raise a sensible error when trying to create nameless nodes
|
diff --git a/lib/common/config.js b/lib/common/config.js
index <HASH>..<HASH> 100644
--- a/lib/common/config.js
+++ b/lib/common/config.js
@@ -93,7 +93,7 @@ define(['base', 'async', 'underscore'], function (Base, async, _) {
// else attempt async
for (i = len; i--;) {
- fns.push(fn.bind(configs[i]));
+ fns.push(_.bind(fn, configs[i]));
}
async.waterfall(fns, function (err, result) {
|
Bug #<I> - Replace native bind function with underscore bind.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,9 @@ from distutils.core import setup
setup(
name = 'date-extractor',
packages = ['date_extractor'],
- version = '1.9',
+ package_dir = {'date_extractor': 'date_extractor'},
+ package_data = {'date_extractor': ['arabic.py', 'enumerations.py', '__init__.py', 'data/months_verbose/arabic.txt', 'data/months_verbose/french.txt', 'data/months_verbose/sorani.txt', 'data/months_verbose/turkish.txt', 'tests/__init__.py', 'tests/test.py']},
+ version = '2.0',
description = 'Extract dates from text',
author = 'Daniel J. Dufour',
author_email = 'daniel.j.dufour@gmail.com',
|
Added files to setup.py
|
diff --git a/query/src/main/java/org/infinispan/query/indexmanager/InfinispanCommandsBackend.java b/query/src/main/java/org/infinispan/query/indexmanager/InfinispanCommandsBackend.java
index <HASH>..<HASH> 100644
--- a/query/src/main/java/org/infinispan/query/indexmanager/InfinispanCommandsBackend.java
+++ b/query/src/main/java/org/infinispan/query/indexmanager/InfinispanCommandsBackend.java
@@ -165,7 +165,7 @@ public class InfinispanCommandsBackend implements BackendQueueProcessor {
return members.get(elementIndex);
}
else { //If cache is configured as DIST
- return hashService.primaryLocation(indexName);
+ return hashService.locatePrimaryOwner(indexName);
}
}
|
ISPN-<I> Make query compile with the new ConsistentHash interface
|
diff --git a/sos/plugins/block.py b/sos/plugins/block.py
index <HASH>..<HASH> 100644
--- a/sos/plugins/block.py
+++ b/sos/plugins/block.py
@@ -46,7 +46,7 @@ class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
disk_path = os.path.join('/dev/', disk)
self.add_cmd_output([
"udevadm info -ap /sys/block/%s" % (disk),
- "parted -s %s print" % (disk_path),
+ "parted -s %s unit s print" % (disk_path),
"fdisk -l %s" % disk_path
])
|
[block] don't use parted human readable output
Changed the parted command to return data in sectors units
instead of human readable form.
Fixes #<I>.
|
diff --git a/nudibranch/diff_render.py b/nudibranch/diff_render.py
index <HASH>..<HASH> 100644
--- a/nudibranch/diff_render.py
+++ b/nudibranch/diff_render.py
@@ -331,9 +331,9 @@ class HTMLDiff(difflib.HtmlDiff):
return "<hr>"
def make_whole_file(self):
- tables = [self._diff_html[diff]
- for diff in self._all_diffs()
- if self._has_diff(diff)]
+ tables = sorted([self._diff_html[diff]
+ for diff in self._all_diffs()
+ if self._has_diff(diff)])
return self._file_template % dict(
summary=self.make_summary(),
legend=self.legend_html(),
|
Tests are now output in order.
|
diff --git a/src/Extension/PhiremockProcess.php b/src/Extension/PhiremockProcess.php
index <HASH>..<HASH> 100644
--- a/src/Extension/PhiremockProcess.php
+++ b/src/Extension/PhiremockProcess.php
@@ -73,8 +73,10 @@ class PhiremockProcess
*/
public function stop()
{
- $this->process->signal(SIGTERM);
- $this->process->stop(3, SIGKILL);
+ if (!$this->isWindows()) {
+ $this->process->signal(SIGTERM);
+ $this->process->stop(3, SIGKILL);
+ }
}
/**
|
#4 Fixed PCTNL exeption for windows environment
|
diff --git a/controller.go b/controller.go
index <HASH>..<HASH> 100644
--- a/controller.go
+++ b/controller.go
@@ -102,7 +102,7 @@ func (db *publishController) PublishOrDiscard(context *admin.Context) {
// ConfigureQorResource configure qor resource for qor admin
func (publish *Publish) ConfigureQorResource(res resource.Resourcer) {
if res, ok := res.(*admin.Resource); ok {
- admin.RegisterViewPath("github.com/qor/publish/views")
+ res.GetAdmin().RegisterViewPath("github.com/qor/publish/views")
res.UseTheme("publish")
if event := res.GetAdmin().GetResource("PublishEvent"); event == nil {
|
Upgrade to new RegisterViewPath API
|
diff --git a/ryu/app/ofctl_rest.py b/ryu/app/ofctl_rest.py
index <HASH>..<HASH> 100644
--- a/ryu/app/ofctl_rest.py
+++ b/ryu/app/ofctl_rest.py
@@ -519,10 +519,13 @@ class StatsController(ControllerBase):
if dp is None:
return Response(status=404)
- flow = {'table_id': dp.ofproto.OFPTT_ALL}
-
_ofp_version = dp.ofproto.OFP_VERSION
+ if ofproto_v1_0.OFP_VERSION == _ofp_version:
+ flow = {}
+ else:
+ flow = {'table_id': dp.ofproto.OFPTT_ALL}
+
_ofctl = supported_ofctl.get(_ofp_version, None)
if _ofctl is not None:
_ofctl.mod_flow_entry(dp, flow, dp.ofproto.OFPFC_DELETE)
|
ofctl_rest: fix error of delete_flow_entry
ofctl_rest caused an exception when run delete_flow_entry command in OpenFlow<I>.
this patch fixes this problem.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.