diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/docker/manager.rb b/docker/manager.rb
index <HASH>..<HASH> 100644
--- a/docker/manager.rb
+++ b/docker/manager.rb
@@ -13,6 +13,7 @@ module Docker
2.3.8
2.4.5
2.5.3
+ 2.6.0
head
].freeze
|
Add ruby <I> to the build matrix
|
diff --git a/swagger/swagger_webservice.go b/swagger/swagger_webservice.go
index <HASH>..<HASH> 100644
--- a/swagger/swagger_webservice.go
+++ b/swagger/swagger_webservice.go
@@ -211,7 +211,7 @@ func (sws SwaggerService) addModelTo(st reflect.Type, decl *ApiDeclaration) {
jsonName := sf.Name
// see if a tag overrides this
if override := st.Field(i).Tag.Get("json"); override != "" {
- jsonName = override
+ jsonName = strings.Split(override, ",")[0] // take the name from the tag
}
// convert to model property
sft := sf.Type
@@ -231,6 +231,10 @@ func (sws SwaggerService) addModelTo(st reflect.Type, decl *ApiDeclaration) {
prop.Items = map[string]string{"$ref": sft.Elem().Elem().String()}
// add|overwrite model for element type
sws.addModelTo(sft.Elem().Elem(), decl)
+ } else {
+ // non-array, pointer type
+ prop.Type = sft.String()[1:] // no star, include pkg path
+ sws.addModelTo(sft.Elem(), decl)
}
}
sm.Properties[jsonName] = prop
|
fix Issue #<I> pointer type fields
|
diff --git a/bin/tessel-2.js b/bin/tessel-2.js
index <HASH>..<HASH> 100755
--- a/bin/tessel-2.js
+++ b/bin/tessel-2.js
@@ -299,7 +299,6 @@ makeCommand('version')
makeCommand('ap')
.option('ssid', {
abbr: 'n',
- required: true,
help: 'Name of the network.'
})
.option('pass', {
|
fix(bin): ssid not required for ap --trigger
|
diff --git a/library/src/main/java/com/sksamuel/jqm4gwt/JQMPopup.java b/library/src/main/java/com/sksamuel/jqm4gwt/JQMPopup.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/sksamuel/jqm4gwt/JQMPopup.java
+++ b/library/src/main/java/com/sksamuel/jqm4gwt/JQMPopup.java
@@ -127,6 +127,18 @@ public class JQMPopup extends JQMContainer {
return "popup";
}
+ @Override
+ public String getTheme() {
+ String rslt = JQMCommon.getThemeEx(this, JQMCommon.STYLE_UI_BODY);
+ if (rslt == null || rslt.isEmpty()) rslt = super.getTheme();
+ return rslt;
+ }
+
+ @Override
+ public void setTheme(String theme) {
+ JQMCommon.setThemeEx(this, theme, JQMCommon.STYLE_UI_BODY);
+ }
+
public String getOverlayTheme() {
return getAttribute("data-overlay-theme");
}
|
JQMPopup.setTheme() changed to allow dynamic usage.
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -3,7 +3,7 @@ module.exports = function(grunt) {
grunt.initConfig({
ghost: {
dist: {
- filesSrc: ['test/googleTest.js']
+ filesSrc: ['test/*.js']
}
},
jshint: {
|
Changed test to use globs for selecting test files
|
diff --git a/core/finance/financial_metrics.py b/core/finance/financial_metrics.py
index <HASH>..<HASH> 100644
--- a/core/finance/financial_metrics.py
+++ b/core/finance/financial_metrics.py
@@ -35,14 +35,14 @@ class FinancialMetrics():
metrics = self.metrics.keys()
for metric in metrics:
+ if metric not in self.metrics:
+ raise Exception('metricNotFound: {}'.format(metric))
+
+ for metric in metrics:
try:
print('Getting Metrics for [{}]'.format(metric))
- if metric not in self.metrics:
- print('Metric {} not found!'.format(metric))
metric_obj = self.metrics[metric]
results[metric] = metric_obj.get_metrics(pronac)
- except KeyError:
- raise Exception('metricNotFound: {}'.format(metric))
except: #TODO: create exception types
pass
|
Change exception handling for financial metrics get_metrics.
|
diff --git a/polyaxon/monitor_statuses/jobs.py b/polyaxon/monitor_statuses/jobs.py
index <HASH>..<HASH> 100644
--- a/polyaxon/monitor_statuses/jobs.py
+++ b/polyaxon/monitor_statuses/jobs.py
@@ -1,5 +1,3 @@
-from hestia.bool_utils import to_bool
-
from constants.containers import ContainerStatuses
from constants.jobs import JobLifeCycle
from constants.pods import PodConditions
@@ -41,7 +39,7 @@ def get_pod_state(event_type, event):
})
-def get_job_status(pod_state, job_container_names):
+def get_job_status(pod_state, job_container_names): # pylint:disable=too-many-branches
# For terminated pods that failed and successfully terminated pods
if pod_state.phase == PodLifeCycle.FAILED:
return JobLifeCycle.FAILED, None
|
Update tests and fix linting issues
|
diff --git a/cmd/xl-storage.go b/cmd/xl-storage.go
index <HASH>..<HASH> 100644
--- a/cmd/xl-storage.go
+++ b/cmd/xl-storage.go
@@ -1432,7 +1432,9 @@ func (s *xlStorage) CreateFile(ctx context.Context, volume, path string, fileSiz
parentFilePath := pathutil.Dir(filePath)
defer func() {
if err != nil {
- removeAll(parentFilePath)
+ if volume == minioMetaTmpBucket {
+ removeAll(parentFilePath)
+ }
}
}()
|
xl: add checks for minioTmpMetaBucket in CreateFile
|
diff --git a/placebo/utils.py b/placebo/utils.py
index <HASH>..<HASH> 100644
--- a/placebo/utils.py
+++ b/placebo/utils.py
@@ -3,8 +3,6 @@ import boto3
import os
import functools
-PLACEBO_DIR = os.path.join(os.path.dirname(__file__), 'placebo')
-
def placebo_session(function):
"""
@@ -14,6 +12,7 @@ def placebo_session(function):
Accepts the following environment variables to configure placebo:
PLACEBO_MODE: set to "record" to record AWS calls and save them
PLACEBO_PROFILE: optionally set an AWS credential profile to record with
+ PLACEBO_DIR: set the directory to record to / read from
"""
@functools.wraps(function)
@@ -29,7 +28,9 @@ def placebo_session(function):
self = args[0]
prefix = self.__class__.__name__ + '.' + function.__name__
- record_dir = os.path.join(PLACEBO_DIR, prefix)
+ base_dir = os.environ.get("PLACEBO_DIR", os.getcwd())
+ base_dir = os.path.join(base_dir, "placebo")
+ record_dir = os.path.join(base_dir, prefix)
if not os.path.exists(record_dir):
os.makedirs(record_dir)
@@ -45,4 +46,4 @@ def placebo_session(function):
return function(*args, **kwargs)
- return wrapper
\ No newline at end of file
+ return wrapper
|
placebo_dir environment variable instead of __file__
|
diff --git a/lib/channelManager.js b/lib/channelManager.js
index <HASH>..<HASH> 100644
--- a/lib/channelManager.js
+++ b/lib/channelManager.js
@@ -83,9 +83,11 @@ channelManager.create = function() {
};
channelManager.createRawProducer = function(topic, options) {
+ var a = getAdapter(); // Adapter must be loaded before config is used
+
var producerConfig = _.merge(adapterConfig, options);
- return getAdapter().Publish(producerConfig).channel(helpers.validatedTopic(topic));
+ return a.Publish(producerConfig).channel(helpers.validatedTopic(topic));
};
channelManager.findOrCreateConsumer = function(topic, options) {
@@ -169,7 +171,7 @@ channelManager.create = function() {
};
channelManager.createRawConsumer = function(topic, options) {
- var a = getAdapter();
+ var a = getAdapter(); // Adapter must be loaded before config is used
var subscriberConfig = _.merge({
channel: helpers.validatedTopic(topic)
|
Fix adapter config not loaded for publishers
|
diff --git a/webssh/worker.py b/webssh/worker.py
index <HASH>..<HASH> 100644
--- a/webssh/worker.py
+++ b/webssh/worker.py
@@ -94,11 +94,11 @@ class Worker(object):
def close(self, reason=None):
logging.info(
- 'Closing worker {} with reason {}'.format(self.id, reason)
+ 'Closing worker {} with reason: {}'.format(self.id, reason)
)
if self.handler:
self.loop.remove_handler(self.fd)
- self.handler.close()
+ self.handler.close(reason=reason)
self.chan.close()
self.ssh.close()
logging.info('Connection to {}:{} lost'.format(*self.dst_addr))
|
Close handler with reason why worker closed
|
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index <HASH>..<HASH> 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -833,6 +833,8 @@ class FinderTest < ActiveRecord::TestCase
rescue ActiveRecord::RecordNotFound => e
assert_equal 'Couldn\'t find Toy with name=Hello World!', e.message
end
+ ensure
+ Toy.reset_primary_key
end
def test_finder_with_offset_string
|
Reset the primary key for other tests
|
diff --git a/src/main/java/com/yammer/metrics/core/MetricsServlet.java b/src/main/java/com/yammer/metrics/core/MetricsServlet.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/yammer/metrics/core/MetricsServlet.java
+++ b/src/main/java/com/yammer/metrics/core/MetricsServlet.java
@@ -190,7 +190,7 @@ public class MetricsServlet extends HttpServlet {
private void handleMetrics(String classPrefix, boolean showFullSamples, HttpServletResponse resp) throws IOException {
resp.setStatus(HttpServletResponse.SC_OK);
- resp.setContentType("text/plain");
+ resp.setContentType("application/json");
final OutputStream output = resp.getOutputStream();
final JsonGenerator json = factory.createJsonGenerator(output, JsonEncoding.UTF8);
json.writeStartObject();
|
Serve JSON as application/json
|
diff --git a/src/Pjax/Dom.js b/src/Pjax/Dom.js
index <HASH>..<HASH> 100644
--- a/src/Pjax/Dom.js
+++ b/src/Pjax/Dom.js
@@ -67,7 +67,7 @@ var Dom = {
*/
putContainer: function(element) {
//User customizable
- element.style.display = 'none';
+ element.style.visibility = 'hidden';
document.getElementById('barba-wrapper').appendChild(element);
},
diff --git a/src/Transition/HideShowTransition.js b/src/Transition/HideShowTransition.js
index <HASH>..<HASH> 100644
--- a/src/Transition/HideShowTransition.js
+++ b/src/Transition/HideShowTransition.js
@@ -13,8 +13,8 @@ var HideShowTransition = BaseTransition.extend({
},
hideShow: function() {
- this.oldContainer.style.display = 'none';
- this.newContainer.style.display = 'block';
+ this.oldContainer.style.visibility = 'hidden';
+ this.newContainer.style.visibility = 'visible';
document.body.scrollTop = 0;
this.done();
|
Prefer to use visibility: hidden instead of display: none for the new container
|
diff --git a/lib/weechat/rubyext/string.rb b/lib/weechat/rubyext/string.rb
index <HASH>..<HASH> 100644
--- a/lib/weechat/rubyext/string.rb
+++ b/lib/weechat/rubyext/string.rb
@@ -144,7 +144,7 @@ class String
#
# @return [String]
def irc_downcase
- downcase.tr("[]\\", "{}|")
+ downcase.tr("[]\\~", "{}|^")
end
# Same as #irc_downcase, but modifying the string in place.
@@ -158,7 +158,7 @@ class String
#
# @return [String]
def irc_upcase
- upcase.tr("{}|", "[]\\")
+ upcase.tr("{}|^", "[]\\~")
end
# Same as #irc_upcase, but modifying the string in place.
|
fixed RFC <I> up/downcasing for strings to be complete
|
diff --git a/features/eolearn/features/interpolation.py b/features/eolearn/features/interpolation.py
index <HASH>..<HASH> 100644
--- a/features/eolearn/features/interpolation.py
+++ b/features/eolearn/features/interpolation.py
@@ -408,7 +408,7 @@ class KrigingInterpolation(InterpolationTask):
"""
def __init__(self, feature, **kwargs):
- super().__init__(feature, KrigingObject, interpolate_pixel_wise=False, **kwargs)
+ super().__init__(feature, KrigingObject, interpolate_pixel_wise=True, **kwargs)
class ResamplingTask(InterpolationTask):
|
Fixed wrong argument in KrigingInterpolation
|
diff --git a/azkaban-common/src/test/java/azkaban/project/validator/ValidationReportTest.java b/azkaban-common/src/test/java/azkaban/project/validator/ValidationReportTest.java
index <HASH>..<HASH> 100644
--- a/azkaban-common/src/test/java/azkaban/project/validator/ValidationReportTest.java
+++ b/azkaban-common/src/test/java/azkaban/project/validator/ValidationReportTest.java
@@ -8,7 +8,7 @@ import java.util.Set;
import org.junit.Test;
/**
- * Test
+ * Test adding messages to {@link ValidationReport}
*/
public class ValidationReportTest {
diff --git a/azkaban-webserver/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java b/azkaban-webserver/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java
index <HASH>..<HASH> 100644
--- a/azkaban-webserver/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java
+++ b/azkaban-webserver/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java
@@ -1596,7 +1596,7 @@ public class ProjectManagerServlet extends LoginAbstractAzkabanServlet {
warnMsgs.append(ValidationReport.getInfoMsg(msg) + "<br/>");
break;
default:
- break;
+ break;
}
}
}
|
Fix the indention and unit test comments.
|
diff --git a/datefinder.py b/datefinder.py
index <HASH>..<HASH> 100644
--- a/datefinder.py
+++ b/datefinder.py
@@ -152,7 +152,7 @@ class DateFinder():
date_string = date_string.lower()
for key, replacement in self.REPLACEMENTS.items():
- date_string = date_string.replace(key, replacement)
+ date_string = re.sub(key,replacement,date_string,flags=re.IGNORECASE)
return date_string, self._pop_tz_string(sorted(captures.get('timezones',[])))
|
make sure we use case insenstive search
|
diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py
index <HASH>..<HASH> 100644
--- a/tests/integration/__init__.py
+++ b/tests/integration/__init__.py
@@ -33,7 +33,7 @@ def recursive_delete(client, bucket_name):
client.delete_objects(Bucket=bucket_name, Delete={'Objects': keys})
for _ in range(5):
try:
- client.delete_bucket(Bucket=bucket)
+ client.delete_bucket(Bucket=bucket_name)
break
except client.exceptions.NoSuchBucket:
exists_waiter.wait(Bucket=bucket_name)
|
Fix NameError in bucket cleanup
|
diff --git a/fedmsg/commands/__init__.py b/fedmsg/commands/__init__.py
index <HASH>..<HASH> 100644
--- a/fedmsg/commands/__init__.py
+++ b/fedmsg/commands/__init__.py
@@ -56,7 +56,7 @@ class BaseCommand(object):
def get_config(self):
return fedmsg.config.load_config(
self.extra_args,
- self.usage,
+ self.__doc__,
fedmsg_command=True,
)
@@ -88,15 +88,6 @@ class BaseCommand(object):
with daemon:
return self.run()
- @property
- def usage(self):
- parser = fedmsg.config.build_parser(
- self.extra_args,
- self.__doc__,
- prog=self.name,
- )
- return parser.format_help()
-
def execute(self):
if self.daemonizable and self.config['daemon'] is True:
return self._daemonize()
|
Remove duplicate help strings. Fixes #<I>.
Introduced in a<I>e<I>ce3f8d2aec4b4ad<I>d2a<I>f<I>c8bb
|
diff --git a/src/java/org/apache/cassandra/db/CollationController.java b/src/java/org/apache/cassandra/db/CollationController.java
index <HASH>..<HASH> 100644
--- a/src/java/org/apache/cassandra/db/CollationController.java
+++ b/src/java/org/apache/cassandra/db/CollationController.java
@@ -126,7 +126,7 @@ public class CollationController
if (cf.isMarkedForDelete())
{
// track the most recent row level tombstone we encounter
- mostRecentRowTombstone = cf.deletionInfo().maxTimestamp();
+ mostRecentRowTombstone = cf.deletionInfo().getTopLevelDeletion().markedForDeleteAt;
}
container.delete(cf);
@@ -257,7 +257,7 @@ public class CollationController
{
ColumnFamily cf = iter.getColumnFamily();
if (cf.isMarkedForDelete())
- mostRecentRowTombstone = cf.deletionInfo().maxTimestamp();
+ mostRecentRowTombstone = cf.deletionInfo().getTopLevelDeletion().markedForDeleteAt;
returnCF.delete(cf);
sstablesIterated++;
|
Only consider whole row tombstone in collation controller
patch by slebresne; reviewed by jbellis for CASSANDRA-<I>
|
diff --git a/src/view/adminhtml/web/js/customer/accounting.js b/src/view/adminhtml/web/js/customer/accounting.js
index <HASH>..<HASH> 100644
--- a/src/view/adminhtml/web/js/customer/accounting.js
+++ b/src/view/adminhtml/web/js/customer/accounting.js
@@ -131,20 +131,20 @@ define([
}
/**
- * Search customers on server and prepare data for UI.
+ * Search counterparty customers on the server and prepare data for UI.
*
* @param request
* @param response
*/
var fnAjaxCustomerSearch = function (request, response) {
+ var data = {search_key: request.term};
+ var json = JSON.stringify(data);
$.ajax({
url: urlCustomerSearch,
- data: {
- /* see: \Praxigento\Downline\Controller\Adminhtml\Customer\Search::VAR_SEARCH_KEY*/
- search_key: request.term
- },
- success: function (data) {
+ data: json,
+ success: function (resp) {
/* convert API data into JQuery widget data */
+ var data = resp.data;
var found = [];
for (var i in data.items) {
var one = data.items[i];
|
MOBI-<I> Fix customer search in admin (asset transfer)
|
diff --git a/airflow/www/decorators.py b/airflow/www/decorators.py
index <HASH>..<HASH> 100644
--- a/airflow/www/decorators.py
+++ b/airflow/www/decorators.py
@@ -102,7 +102,7 @@ def has_dag_access(**dag_kwargs):
@functools.wraps(f)
def wrapper(self, *args, **kwargs):
has_access = self.appbuilder.sm.has_access
- dag_id = request.args.get('dag_id')
+ dag_id = request.values.get('dag_id')
# if it is false, we need to check whether user has write access on the dag
can_dag_edit = dag_kwargs.get('can_dag_edit', False)
|
[AIRFLOW-<I>] Fix request arguments in has_dag_access (#<I>)
has_dag_access needs to use request arguments from both
request.args and request.form.
This is related to the changes made in AIRFLOW-<I>/#<I>.
|
diff --git a/msm/skill_entry.py b/msm/skill_entry.py
index <HASH>..<HASH> 100644
--- a/msm/skill_entry.py
+++ b/msm/skill_entry.py
@@ -562,7 +562,7 @@ class SkillEntry(object):
'Attempting to retrieve the remote origin URL config for '
'skill in path ' + path
)
- return Git(path).config('remote.origin.url')
+ return Repo(path).remote('origin').url
except GitError:
return ''
|
Use git.Repo() to determine remote url
In newer GitPython the Git(path).config() seems to fall back to info
contained in the current directory leading to a possible mixup of origin
URLs. (as illustrated in the test case test_from_folder())
This replaces the check with a check using Repo.remote() to find the
remote for a repo at a location.
|
diff --git a/client/boot/index.js b/client/boot/index.js
index <HASH>..<HASH> 100644
--- a/client/boot/index.js
+++ b/client/boot/index.js
@@ -354,6 +354,7 @@ function reduxStoreReady( reduxStore ) {
return;
}
+ //see server/pages/index for prod redirect
if ( '/plans' === context.pathname ) {
// pricing page is outside of Calypso, needs a full page load
window.location = 'https://wordpress.com/pricing';
diff --git a/server/pages/index.js b/server/pages/index.js
index <HASH>..<HASH> 100644
--- a/server/pages/index.js
+++ b/server/pages/index.js
@@ -315,6 +315,14 @@ module.exports = function() {
next();
}
} );
+
+ app.get( '/plans', function( req, res, next ) {
+ if ( ! req.cookies.wordpress_logged_in ) {
+ res.redirect( 'https://wordpress.com/pricing' );
+ } else {
+ next();
+ }
+ } );
}
app.get( '/theme', ( req, res ) => res.redirect( '/design' ) );
|
Plans: redirect from /plans to /pricing when logged out (#<I>)
|
diff --git a/src/Typeahead.react.js b/src/Typeahead.react.js
index <HASH>..<HASH> 100644
--- a/src/Typeahead.react.js
+++ b/src/Typeahead.react.js
@@ -1,5 +1,6 @@
'use strict';
+import cx from 'classnames';
import {isEqual, noop} from 'lodash';
import onClickOutside from 'react-onclickoutside';
import React, {PropTypes} from 'react';
@@ -157,7 +158,7 @@ const Typeahead = React.createClass({
},
render() {
- const {allowNew, labelKey, paginate} = this.props;
+ const {allowNew, className, labelKey, paginate} = this.props;
const {shownResults, text} = this.state;
// First filter the results by the input string.
@@ -176,7 +177,7 @@ const Typeahead = React.createClass({
return (
<div
- className="bootstrap-typeahead open"
+ className={cx('bootstrap-typeahead', 'open', className)}
style={{position: 'relative'}}>
{this._renderInput(results)}
{this._renderMenu(results, shouldPaginate)}
|
Allow className to be passed to parent node
|
diff --git a/src/provider/AbstractProvider.php b/src/provider/AbstractProvider.php
index <HASH>..<HASH> 100644
--- a/src/provider/AbstractProvider.php
+++ b/src/provider/AbstractProvider.php
@@ -76,7 +76,8 @@ abstract class AbstractProvider implements ProviderInterface
return trim($output[0]);
}
- return null;
+ $cmd = 'curl api.ipify.org';
+ return shell_exec($cmd);
}
/**
|
use curl to get extenal ip when dig command not found
|
diff --git a/sllurp/llrp.py b/sllurp/llrp.py
index <HASH>..<HASH> 100644
--- a/sllurp/llrp.py
+++ b/sllurp/llrp.py
@@ -135,11 +135,11 @@ class LLRPClientFactory (ClientFactory):
def clientConnectionFailed (self, connector, reason):
logging.error('Connection failed: {}'.format(reason))
- reactor.stop()
+ reactor.callFromThread(reactor.stop)
def clientConnectionLost (self, connector, reason):
logging.info('Connection lost: {}'.format(reason))
- reactor.stop()
+ reactor.callFromThread(reactor.stop)
class LLRPReaderThread (Thread):
""" Thread object that connects input and output message queues to a
|
properly shut down reactor on connection fail/lost
|
diff --git a/vespa/populations.py b/vespa/populations.py
index <HASH>..<HASH> 100644
--- a/vespa/populations.py
+++ b/vespa/populations.py
@@ -1254,7 +1254,6 @@ class PopulationSet(object):
pop.replace_constraint(name,**kwargs)
if name not in self.constraints:
self.constraints.append(name)
- self._set_constraintcolors()
def remove_constraint(self,*names):
for name in names:
|
removed old _set_constraint_colors call
|
diff --git a/lxd/device/disk.go b/lxd/device/disk.go
index <HASH>..<HASH> 100644
--- a/lxd/device/disk.go
+++ b/lxd/device/disk.go
@@ -397,11 +397,7 @@ func (d *disk) postStart() error {
// Update applies configuration changes to a started device.
func (d *disk) Update(oldDevices deviceConfig.Devices, isRunning bool) error {
- if d.inst.Type() == instancetype.VM {
- if shared.IsRootDiskDevice(d.config) {
- return nil
- }
-
+ if d.inst.Type() == instancetype.VM && !shared.IsRootDiskDevice(d.config) {
return fmt.Errorf("Non-root disks not supported for VMs")
}
|
lxd/device/disk: Allow VM disks to be updated
|
diff --git a/spyderlib/widgets/editor.py b/spyderlib/widgets/editor.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/editor.py
+++ b/spyderlib/widgets/editor.py
@@ -39,8 +39,8 @@ from spyderlib.widgets.tabs import BaseTabs
from spyderlib.widgets.findreplace import FindReplace
from spyderlib.widgets.editortools import OutlineExplorerWidget
from spyderlib.widgets.sourcecode import syntaxhighlighters, codeeditor
-from spyderlib.widgets.sourcecode.base import TextEditBaseWidget #@UnusedImport
-from spyderlib.widgets.sourcecode.codeeditor import Printer #@UnusedImport
+from spyderlib.widgets.sourcecode.base import TextEditBaseWidget #analysis:ignore
+from spyderlib.widgets.sourcecode.codeeditor import Printer #analysis:ignore
from spyderlib.widgets.sourcecode.codeeditor import get_file_language
@@ -532,6 +532,8 @@ class EditorStack(QWidget):
self.calltips_enabled = True
self.go_to_definition_enabled = True
self.close_parentheses_enabled = True
+ self.close_quotes_enabled = True
+ self.add_colons_enabled = True
self.auto_unindent_enabled = True
self.indent_chars = " "*4
self.tab_stop_width = 40
|
widget/editor.py test was broken: added missing attribute definitions
|
diff --git a/extended-cpts.php b/extended-cpts.php
index <HASH>..<HASH> 100644
--- a/extended-cpts.php
+++ b/extended-cpts.php
@@ -1503,7 +1503,7 @@ class Extended_CPT_Admin {
global $post;
- $terms = wp_get_object_terms( get_the_ID(), $taxonomy );
+ $terms = get_the_terms( $post, $taxonomy );
$tax = get_taxonomy( $taxonomy );
if ( is_wp_error( $terms ) ) {
|
Switch to `get_terms()` in the taxonomy admin columns to save some queries.
|
diff --git a/neo.py b/neo.py
index <HASH>..<HASH> 100755
--- a/neo.py
+++ b/neo.py
@@ -195,6 +195,9 @@ def scm(name):
return cls
return scm
+# pylint: disable=no-self-argument
+# pylint: disable=no-method-argument
+# pylint: disable=no-member
@scm('hg')
@staticclass
class Hg(object):
@@ -376,6 +379,9 @@ class Hg(object):
except IOError:
error("Unable to write ignore file in \"%s\"" % exclude)
+# pylint: disable=no-self-argument
+# pylint: disable=no-method-argument
+# pylint: disable=no-member
@scm('git')
@staticclass
class Git(object):
|
Add pylint override for static-classes
The staticclass decorator confuses pylint, causing a large number of
of false-positives. (#<I>)
|
diff --git a/segno/writers.py b/segno/writers.py
index <HASH>..<HASH> 100644
--- a/segno/writers.py
+++ b/segno/writers.py
@@ -558,7 +558,7 @@ def write_png(matrix, version, out, scale=1, border=None, color='#000',
res += scanline(chain(vertical_border, row, vertical_border))
res += same_as_above # This is b'' if no scaling factor was provided
res += horizontal_border
- if _PY2:
+ if _PY2: # pragma: no cover
res = bytes(res)
write(chunk(b'IDAT', zlib.compress(res, compresslevel)))
if addad:
|
Ignore Py2 specific code in coverage report
|
diff --git a/tests/tests.py b/tests/tests.py
index <HASH>..<HASH> 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -308,7 +308,7 @@ class LocationTemplateFilterTest(TestCase):
@skipUnless(geoip, geoip_msg)
def test_locations(self):
- self.assertEqual(location('8.8.8.8'), 'United States')
+ self.assertEqual(location('8.8.8.8'), 'Mountain View, United States')
self.assertEqual(location('44.55.66.77'), 'San Diego, United States')
|
Fix failing geoip test, with July <I> GeoLite database
|
diff --git a/cypress/integration/example_spec.js b/cypress/integration/example_spec.js
index <HASH>..<HASH> 100644
--- a/cypress/integration/example_spec.js
+++ b/cypress/integration/example_spec.js
@@ -1274,7 +1274,8 @@ describe('Kitchen Sink', function(){
// http://on.cypress.io/api/cypress-blob
// get the dataUrl string for the javascript-logo
- return Cypress.Blob.imgSrcToDataURL('/assets/img/javascript-logo.png').then(function(dataUrl){
+ return Cypress.Blob.imgSrcToDataURL('/assets/img/javascript-logo.png', undefined, {crossOrigin: 'Anonymous'})
+ .then(function(dataUrl){
// create an <img> element and set its src to the dataUrl
var img = Cypress.$('<img />', {src: dataUrl})
|
use crossOrigin anonymous for fetching image
|
diff --git a/Slim/CallableResolver.php b/Slim/CallableResolver.php
index <HASH>..<HASH> 100644
--- a/Slim/CallableResolver.php
+++ b/Slim/CallableResolver.php
@@ -14,7 +14,7 @@ final class CallableResolver implements CallableResolverInterface
protected $resolved;
- public function __construct(Container $container, $toResolve = null)
+ public function __construct(ContainerInterface $container, $toResolve = null)
{
$this->toResolve = $toResolve;
$this->container = $container;
|
Depend on the ContainerInterface, not the concrete Container
|
diff --git a/lib/enju_leaf/openurl.rb b/lib/enju_leaf/openurl.rb
index <HASH>..<HASH> 100755
--- a/lib/enju_leaf/openurl.rb
+++ b/lib/enju_leaf/openurl.rb
@@ -122,7 +122,7 @@ class Openurl
if [:issn, :isbn].include?(key.to_sym)
val.gsub!('-', '')
end
- raise OpenurlQuerySyntaxError unless /\A\d{1,#{NUM_CHECK[key]}}\Z/ =~ val
+ raise OpenurlQuerySyntaxError unless /\A\d{1,#{NUM_CHECK[key]}}X?\Z/i =~ val
end
"%s:%s*" % [field, val]
end
|
fix a error when issn/isbn contains "X" character.
|
diff --git a/axiom/plugins/mantissacmd.py b/axiom/plugins/mantissacmd.py
index <HASH>..<HASH> 100644
--- a/axiom/plugins/mantissacmd.py
+++ b/axiom/plugins/mantissacmd.py
@@ -18,7 +18,7 @@ from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import rsa
-from cryptography.x509.oid import NameOID
+from cryptography.x509.oid import NameOID, ExtendedKeyUsageOID
from xmantissa.ixmantissa import IOfferingTechnician
from xmantissa import webadmin, publicweb, stats
@@ -146,6 +146,20 @@ class Mantissa(axiomatic.AxiomaticCommand):
.add_extension(
x509.BasicConstraints(ca=False, path_length=None),
critical=True)
+ .add_extension(
+ x509.KeyUsage(
+ digital_signature=True,
+ content_commitment=False,
+ key_encipherment=True,
+ data_encipherment=False,
+ key_agreement=False,
+ key_cert_sign=False,
+ crl_sign=False,
+ encipher_only=False,
+ decipher_only=False))
+ .add_extension(
+ x509.ExtendedKeyUsage([
+ ExtendedKeyUsageOID.SERVER_AUTH]))
.sign(
private_key=privateKey,
algorithm=hashes.SHA256(),
|
Add KU and EKU extensions.
|
diff --git a/lib/test.js b/lib/test.js
index <HASH>..<HASH> 100644
--- a/lib/test.js
+++ b/lib/test.js
@@ -894,6 +894,14 @@ function cleanYamlObj(object, isRoot, seen) {
if (isRoot && (k === 'todo' || k === 'skip'))
return set
+ // Don't dump massive EventEmitter and Domain
+ // objects onto the output, that's never friendly.
+ if (object &&
+ typeof object === 'object' &&
+ object instanceof Error &&
+ /^domain/.test(k))
+ return set
+
if (isRoot && k === 'at' && !object[k])
return set
|
Don't dump massive domain objects into yaml
|
diff --git a/lib/namespace.rb b/lib/namespace.rb
index <HASH>..<HASH> 100644
--- a/lib/namespace.rb
+++ b/lib/namespace.rb
@@ -2,10 +2,13 @@ module Atomy
NAMESPACES = {}
NAMESPACE_DELIM = "_ns_"
- def self.namespaced(ns, name)
- return name.to_s if !ns or ns == "_"
+ def self.namespaced(*names)
+ names.collect!(&:to_s)
+ name = names.pop
+ ns = names.join(NAMESPACE_DELIM)
+ return name if ns.empty? or ns == "_"
raise "empty name" unless name && !name.empty?
- ns.to_s + NAMESPACE_DELIM + name.to_s
+ ns + NAMESPACE_DELIM + name
end
def self.from_namespaced(resolved)
|
refactor Atomy.namespaced to take a splat arg
|
diff --git a/paid_witnessing.js b/paid_witnessing.js
index <HASH>..<HASH> 100644
--- a/paid_witnessing.js
+++ b/paid_witnessing.js
@@ -192,7 +192,7 @@ function buildPaidWitnesses(conn, objUnitProps, arrWitnesses, onDone){
graph.readDescendantUnitsByAuthorsBeforeMcIndex(conn, objUnitProps, arrWitnesses, to_main_chain_index, function(arrUnits){
rt+=Date.now()-t;
t=Date.now();
- var strUnitsList = (arrUnits.length === 0) ? 'NULL' : arrUnits.map(conn.escape).join(', ');
+ var strUnitsList = (arrUnits.length === 0) ? 'NULL' : arrUnits.map(function(unit){ return conn.escape(unit); }).join(', ');
//throw "no witnesses before mc "+to_main_chain_index+" for unit "+objUnitProps.unit;
profiler.start();
conn.query( // we don't care if the unit is majority witnessed by the unit-designated witnesses
|
try to workaround 'this' <URL>
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -5,11 +5,7 @@ if (typeof asap === "undefined") {
var asap = require("../asap");
var expect = require("expect.js");
var mocha = require("mocha");
-
- var domain;
- try {
- domain = require("domain");
- } catch (e) {}
+ var domain = require("domain");
}
|
`require("domain")` is safe.
|
diff --git a/fetch-filecache.js b/fetch-filecache.js
index <HASH>..<HASH> 100644
--- a/fetch-filecache.js
+++ b/fetch-filecache.js
@@ -68,6 +68,19 @@ function filenamify(url) {
/**
+ * Sleep during the provided number of ms
+ *
+ * @function
+ * @param {Number} ms Number of milliseconds to sleep
+ * @return {Promise} promise to sleep during the provided number of ms
+ */
+async function sleep(ms) {
+ return new Promise(resolve => setTimeout(resolve, ms));
+}
+
+
+
+/**
* Wrapper around the baseFetch function that returns the response from the
* local cache if one is found.
*
@@ -248,18 +261,13 @@ async function fetch(url, options) {
// a few seconds elapse between attempts
async function fetchWithRetry(url, options, remainingAttempts) {
try {
- return baseFetch(url, options);
+ return await baseFetch(url, options);
}
catch (err) {
if (remainingAttempts <= 0) throw err;
- log('fetch attempt failed');
- return new Promise((resolve, reject) => {
- setTimeout(function () {
- fetchWithRetry(url, options, remainingAttempts - 1)
- .then(resolve)
- .catch(reject);
- }, 2000 + Math.floor(Math.random() * 8000));
- });
+ log('fetch attempt failed, sleep and try again');
+ await sleep(2000 + Math.floor(Math.random() * 8000));
+ return fetchWithRetry(url, options, remainingAttempts - 1);
}
}
|
Fix automatic retry feature
The code was supposed to sleep a bit and retry a couple of times a URL that
cannot be fetched directly. The auto-retry code was not being run because of
a missing `await`.
|
diff --git a/packages/mdc-bottom-navigation/addon/mixins/bottom-navigation-button.js b/packages/mdc-bottom-navigation/addon/mixins/bottom-navigation-button.js
index <HASH>..<HASH> 100644
--- a/packages/mdc-bottom-navigation/addon/mixins/bottom-navigation-button.js
+++ b/packages/mdc-bottom-navigation/addon/mixins/bottom-navigation-button.js
@@ -12,5 +12,11 @@ export default Mixin.create (RippleMixin, {
horizontal: false,
- createRippleComponent: true
+ createRippleComponent: true,
+
+ didRender () {
+ this._super (...arguments);
+
+ this._ripple.unbounded = true;
+ }
});
|
chore: Attempted to fix ripple on buttons
|
diff --git a/stackmate.rb b/stackmate.rb
index <HASH>..<HASH> 100644
--- a/stackmate.rb
+++ b/stackmate.rb
@@ -18,6 +18,10 @@ opt_parser = OptionParser.new do |opts|
options[:params] = p
puts p
end
+ options[:wait_handles] = true
+ opts.on("-n", "--no-wait-handles", "Do not create any wait handles") do
+ options[:wait_handles] = false
+ end
opts.on("-h", "--help", "Show this message") do
puts opts
exit
@@ -36,8 +40,10 @@ rescue => e
end
if options[:file] && stack_name != ''
- Thread.new do
- WaitConditionServer.run!
+ if options[:wait_handles]
+ Thread.new do
+ WaitConditionServer.run!
+ end
end
engine = Ruote::Dashboard.new(
Ruote::Worker.new(
|
Add option to not start wait handle server
|
diff --git a/gwpy/types/series.py b/gwpy/types/series.py
index <HASH>..<HASH> 100644
--- a/gwpy/types/series.py
+++ b/gwpy/types/series.py
@@ -978,19 +978,37 @@ class Series(Array):
% type(self).__name__)
end = None
+ # check if series is irregular
+ try:
+ _ = self.dx
+ irregular = False
+ except AttributeError:
+ irregular = True
+
# find start index
if start is None:
idx0 = None
else:
- idx0 = int((xtype(start) - x0) // self.dx.value)
+ if not irregular:
+ idx0 = int((xtype(start) - x0) // self.dx.value)
+ else:
+ idx0 = numpy.searchsorted(self.xindex.value, xtype(start), side="left")
# find end index
if end is None:
idx1 = None
else:
- idx1 = int((xtype(end) - x0) // self.dx.value)
- if idx1 >= self.size:
- idx1 = None
+ if not irregular:
+ idx1 = int((xtype(end) - x0) // self.dx.value)
+ if idx1 >= self.size:
+ idx1 = None
+ else:
+ if xtype(end) >= self.xindex.value[-1]:
+ idx1 = None
+ else:
+ idx1 = (
+ numpy.searchsorted(self.xindex.value, xtype(end), side="left") - 1
+ )
# crop
if copy:
|
series.py: allowing cropping of irregular Series
|
diff --git a/src/urh/simulator/Simulator.py b/src/urh/simulator/Simulator.py
index <HASH>..<HASH> 100644
--- a/src/urh/simulator/Simulator.py
+++ b/src/urh/simulator/Simulator.py
@@ -371,8 +371,8 @@ class Simulator(QObject):
return False, "Failed to decode message {}".format(msg_index)
for lbl in received_msg.message_type:
- if lbl.value_type_index in [1, 3, 4]:
- # get live, external program, random
+ if lbl.value_type_index in (1, 4):
+ # get live, random
continue
start_recv, end_recv = received_msg.get_label_range(lbl.label, 0, True)
diff --git a/tests/test_simulator.py b/tests/test_simulator.py
index <HASH>..<HASH> 100644
--- a/tests/test_simulator.py
+++ b/tests/test_simulator.py
@@ -332,7 +332,7 @@ class TestSimulator(QtTestCase):
modulator = dialog.project_manager.modulators[0] # type: Modulator
- self.alice.send_raw_data(modulator.modulate("10" * 42), 1)
+ self.alice.send_raw_data(modulator.modulate("100"+"10101010"*42), 1)
self.alice.send_raw_data(np.zeros(self.num_zeros_for_pause, dtype=np.complex64), 1)
bits = self.__demodulate(conn)
|
check result of external programs when receiving message
|
diff --git a/src/main/java/org/thymeleaf/standard/expression/OGNLShortcutExpression.java b/src/main/java/org/thymeleaf/standard/expression/OGNLShortcutExpression.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/thymeleaf/standard/expression/OGNLShortcutExpression.java
+++ b/src/main/java/org/thymeleaf/standard/expression/OGNLShortcutExpression.java
@@ -92,7 +92,14 @@ final class OGNLShortcutExpression {
final PropertyAccessor ognlPropertyAccessor = OgnlRuntime.getPropertyAccessor(targetClass);
// Depending on the returned OGNL property accessor, we will try to apply ours
- if (OGNLVariablesMapPropertyAccessor.class.equals(ognlPropertyAccessor.getClass())) {
+ if (target instanceof Class<?>) {
+
+ // Because of the way OGNL works, the "OgnlRuntime.getTargetClass(...)" of a Class object is the class
+ // object itself, so we might be trying to apply a PropertyAccessor to a Class instead of a real object,
+ // something we avoid by means of this shortcut
+ target = getObjectProperty(textRepository, expressionCache, propertyName, target);
+
+ } else if (OGNLVariablesMapPropertyAccessor.class.equals(ognlPropertyAccessor.getClass())) {
target = getVariablesMapProperty(propertyName, target);
|
Fixed behaviour with OGNL selecting the same PropertyAccesor for an instance of a class and the class object itself
|
diff --git a/time-elements.js b/time-elements.js
index <HASH>..<HASH> 100644
--- a/time-elements.js
+++ b/time-elements.js
@@ -95,7 +95,7 @@
}
CalendarDate.fromDate = function(date) {
- return new this(date.getFullYear(), date.getMonth() + 1, date.getDate());
+ return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate());
};
CalendarDate.today = function() {
|
Consistently use UTC dates.
Fixes daysPassed() comparison.
|
diff --git a/user.go b/user.go
index <HASH>..<HASH> 100644
--- a/user.go
+++ b/user.go
@@ -2,7 +2,7 @@ package platform
import "context"
-// User is an user. 🎉
+// User is a user. 🎉
type User struct {
ID ID `json:"id,omitempty"`
Name string `json:"name"`
|
fix(user): update comment about user service
|
diff --git a/lib/emir/dataproducts.py b/lib/emir/dataproducts.py
index <HASH>..<HASH> 100644
--- a/lib/emir/dataproducts.py
+++ b/lib/emir/dataproducts.py
@@ -36,10 +36,13 @@ class EMIRConfigurationType(InstrumentConfigurationType):
def validate(self, value):
super(EMIRConfigurationType, self).validate(value)
-class MasterBadPixelMask(FrameDataProduct):
+class EMIRFrame(FrameDataProduct):
pass
-class MasterBias(FrameDataProduct):
+class MasterBadPixelMask(EMIRFrame):
+ pass
+
+class MasterBias(EMIRFrame):
'''Master bias product
This image has 4 extensions: primary, two variance extensions
@@ -53,7 +56,7 @@ class MasterBias(FrameDataProduct):
'''
pass
-class MasterDark(FrameDataProduct):
+class MasterDark(EMIRFrame):
'''Master dark product
This image has 4 extensions: primary, two variance extensions
@@ -67,13 +70,13 @@ class MasterDark(FrameDataProduct):
'''
pass
-class DarkCurrentValue(FrameDataProduct):
+class DarkCurrentValue(EMIRFrame):
pass
-class MasterIntensityFlat(FrameDataProduct):
+class MasterIntensityFlat(EMIRFrame):
pass
-class MasterSpectralFlat(FrameDataProduct):
+class MasterSpectralFlat(EMIRFrame):
pass
class Spectra(FrameDataProduct):
|
Create a EMIRFrame for validation
|
diff --git a/telethon/client/updates.py b/telethon/client/updates.py
index <HASH>..<HASH> 100644
--- a/telethon/client/updates.py
+++ b/telethon/client/updates.py
@@ -160,6 +160,7 @@ class UpdateMethods(UserMethods):
# region Private methods
def _handle_update(self, update):
+ self.session.process_entities(update)
if isinstance(update, (types.Updates, types.UpdatesCombined)):
entities = {utils.get_peer_id(x): x for x in
itertools.chain(update.users, update.chats)}
diff --git a/telethon/client/users.py b/telethon/client/users.py
index <HASH>..<HASH> 100644
--- a/telethon/client/users.py
+++ b/telethon/client/users.py
@@ -25,10 +25,14 @@ class UserMethods(TelegramBaseClient):
if isinstance(future, list):
results = []
for f in future:
- results.append(await f)
+ result = await f
+ self.session.process_entities(result)
+ results.append(result)
return results
else:
- return await future
+ result = await future
+ self.session.process_entities(result)
+ return result
except (errors.ServerError, errors.RpcCallFailError) as e:
__log__.warning('Telegram is having internal issues %s: %s',
e.__class__.__name__, e)
|
Process entities from sent requests/updates
|
diff --git a/homely/_ui.py b/homely/_ui.py
index <HASH>..<HASH> 100644
--- a/homely/_ui.py
+++ b/homely/_ui.py
@@ -420,7 +420,11 @@ def setcurrentrepo(info):
def _write(path, content):
with open(path + ".new", 'w') as f:
f.write(content)
- os.replace(path + ".new", path)
+ if sys.version_info[0] < 3:
+ # use the less-reliable os.rename() on python2
+ os.rename(path + ".new", path)
+ else:
+ os.replace(path + ".new", path)
_PREV_SECTION = []
|
[9] homely._ui: python2 doesn't have os.replace()
|
diff --git a/src/Codeception/Event/DispatcherWrapper.php b/src/Codeception/Event/DispatcherWrapper.php
index <HASH>..<HASH> 100644
--- a/src/Codeception/Event/DispatcherWrapper.php
+++ b/src/Codeception/Event/DispatcherWrapper.php
@@ -4,6 +4,7 @@ namespace Codeception\Event;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcher;
+use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface;
trait DispatcherWrapper
{
@@ -15,7 +16,8 @@ trait DispatcherWrapper
*/
protected function dispatch(EventDispatcher $dispatcher, $eventType, Event $eventObject)
{
- if (class_exists('Symfony\Contracts\EventDispatcher\Event')) {
+ //TraceableEventDispatcherInterface was introduced in symfony/event-dispatcher 2.5 and removed in 5.0
+ if (!interface_exists(TraceableEventDispatcherInterface::class)) {
//Symfony 5
$dispatcher->dispatch($eventObject, $eventType);
} else {
|
Improved detection of event-dispatcher version
Previous detector used class from symfony/event-dispatcher-contracts
so it wasn't precise enough.
TraceableEventDispatcherInterface was a part of event-dispatcher,
so it is more accurate
|
diff --git a/application/modules/g/controllers/AuthController.php b/application/modules/g/controllers/AuthController.php
index <HASH>..<HASH> 100755
--- a/application/modules/g/controllers/AuthController.php
+++ b/application/modules/g/controllers/AuthController.php
@@ -236,6 +236,9 @@ class G_AuthController extends Garp_Controller_Action {
$flashMessenger = $this->_helper->getHelper('FlashMessenger');
$flashMessenger->addMessage(__($authVars['logout']['successMessage']));
+
+ $cacheBuster = 'action=logout';
+ $target .= (strpos($target, '?') === false ? '?' : '&') . $cacheBuster;
$this->_redirect($target);
}
|
Refactored logoutAction: add cacheBuster param
|
diff --git a/nuimo_dbus.py b/nuimo_dbus.py
index <HASH>..<HASH> 100644
--- a/nuimo_dbus.py
+++ b/nuimo_dbus.py
@@ -137,6 +137,9 @@ class GattDevice:
pass
elif (self.__connect_retry_attempt < 5) and (e.get_dbus_name() == "org.bluez.Error.Failed") and (e.get_dbus_message() == "Software caused connection abort"):
self.__connect()
+ elif (e.get_dbus_name() == "org.freedesktop.DBus.Error.NoReply"):
+ # TODO: How to handle properly? Reproducable when we repeatedly shut off Nuimo immediately after its flashing Bluetooth icon appears
+ self.connect_failed(e)
else:
self.connect_failed(e)
|
Add error case for “no reply” during connection
|
diff --git a/router/distribute.go b/router/distribute.go
index <HASH>..<HASH> 100644
--- a/router/distribute.go
+++ b/router/distribute.go
@@ -36,7 +36,7 @@ import (
// If no route is set messages are forwarded on the incoming router.
// When routing to multiple routers, the incoming stream has to be listed explicitly to be used.
type Distribute struct {
- Broadcast `gollumdoc:embed_type`
+ Broadcast `//gollumdoc:embed_type`
routers []core.Router
boundStreamIDs []core.MessageStreamID
}
|
Temporary workaround for rst generator
|
diff --git a/src/Psalm/Internal/Cli/Psalm.php b/src/Psalm/Internal/Cli/Psalm.php
index <HASH>..<HASH> 100644
--- a/src/Psalm/Internal/Cli/Psalm.php
+++ b/src/Psalm/Internal/Cli/Psalm.php
@@ -618,10 +618,14 @@ final class Psalm
): array {
fwrite(STDERR, 'Writing error baseline to file...' . PHP_EOL);
- $issue_baseline = ErrorBaseline::read(
- new \Psalm\Internal\Provider\FileProvider,
- $options['set-baseline']
- );
+ try {
+ $issue_baseline = ErrorBaseline::read(
+ new \Psalm\Internal\Provider\FileProvider,
+ $options['set-baseline']
+ );
+ } catch (\Psalm\Exception\ConfigException $e) {
+ $issue_baseline = [];
+ }
ErrorBaseline::create(
new \Psalm\Internal\Provider\FileProvider,
|
Fix #<I> - catch exception when baseline cannot be located
|
diff --git a/bokeh/protocol.py b/bokeh/protocol.py
index <HASH>..<HASH> 100644
--- a/bokeh/protocol.py
+++ b/bokeh/protocol.py
@@ -62,7 +62,7 @@ class BokehJSONEncoder(json.JSONEncoder):
return obj.value / millifactor #nanosecond to millisecond
elif isinstance(obj, np.float):
return float(obj)
- elif isinstance(obj, np.integer):
+ elif isinstance(obj, (np.int, np.integer)):
return int(obj)
# Datetime, Date
elif isinstance(obj, (dt.datetime, dt.date)):
|
Serialize both np.int and np.integer
|
diff --git a/lib/bundler/local_development.rb b/lib/bundler/local_development.rb
index <HASH>..<HASH> 100644
--- a/lib/bundler/local_development.rb
+++ b/lib/bundler/local_development.rb
@@ -36,6 +36,14 @@ module Bundler
# Check each local gem's gemspec to see if any dependencies need to be made local
gemspec_path = File.join(dir, name, "#{name}.gemspec")
process_gemspec_dependencies(gemspec_path) if File.exist?(gemspec_path)
+ # Evaluate local gem's Gemfile, if present
+ gemfile_path = File.join(dir, name, "Gemfile")
+ if File.exist?(gemfile_path)
+ gemfile = File.read(gemfile_path).
+ gsub(/^(source|gemspec).*\s+/, ''). # Strip sources and gemspecs
+ gsub(/^\s*gem ['"]rake['"].*/, '') # Strip rake
+ eval gemfile
+ end
return gem_without_development name, :path => path
end
end
|
Evaluate local gem's Gemfile, if present
|
diff --git a/spyder/widgets/tests/test_github.py b/spyder/widgets/tests/test_github.py
index <HASH>..<HASH> 100644
--- a/spyder/widgets/tests/test_github.py
+++ b/spyder/widgets/tests/test_github.py
@@ -6,7 +6,7 @@
# (see spyder/__init__.py for details)
# -----------------------------------------------------------------------------
-"""Tests for the report error dialog."""
+"""Tests for the Github authentication dialog."""
# Third party imports
import pytest
|
Testing: Fix docstring for the Github dialog tests
|
diff --git a/python/ray/serve/config.py b/python/ray/serve/config.py
index <HASH>..<HASH> 100644
--- a/python/ray/serve/config.py
+++ b/python/ray/serve/config.py
@@ -36,7 +36,10 @@ class BackendConfig:
# timeout is default zero seconds, then we keep the existing
# behavior to allow at most max batch size queries.
if self.is_blocking and self.batch_wait_timeout == 0:
- self.max_concurrent_queries = self.max_batch_size or 1
+ if self.max_batch_size:
+ self.max_concurrent_queries = 2 * self.max_batch_size
+ else:
+ self.max_concurrent_queries = 8
# Pipeline/async mode: if the servable is not blocking,
# router should just keep pushing queries to the worker
|
[Serve] Improve buffering for simple cases (#<I>)
|
diff --git a/flaskext/mongoalchemy.py b/flaskext/mongoalchemy.py
index <HASH>..<HASH> 100644
--- a/flaskext/mongoalchemy.py
+++ b/flaskext/mongoalchemy.py
@@ -122,7 +122,7 @@ class Document(document.Document):
def get(cls, mongo_id):
"""Returns a document instance from its mongo_id"""
query = cls._session.query(cls)
- return query.filter(cls.f.mongo_id==mongo_id).first()
+ return query.filter(cls.mongo_id==mongo_id).first()
def __cmp__(self, other):
if isinstance(other, type(self)) and self.has_id() and other.has_id():
|
Updated query API for new MongoAlchemy version (<I>)
|
diff --git a/refcycle/object_graph.py b/refcycle/object_graph.py
index <HASH>..<HASH> 100755
--- a/refcycle/object_graph.py
+++ b/refcycle/object_graph.py
@@ -330,7 +330,7 @@ class ObjectGraph(IDirectedGraph):
try:
dot_file = os.path.join(tempdir, 'output.gv')
with open(dot_file, 'wb') as f:
- f.write(dot_graph.encode('utf8'))
+ f.write(dot_graph.encode('utf-8'))
cmd = [
dot_executable,
|
utf-8 seems to be the more standard name for the encoding.
|
diff --git a/nodeconductor/structure/views.py b/nodeconductor/structure/views.py
index <HASH>..<HASH> 100644
--- a/nodeconductor/structure/views.py
+++ b/nodeconductor/structure/views.py
@@ -557,7 +557,7 @@ class ProjectGroupPermissionViewSet(rf_mixins.RetrieveModelMixin,
def can_save(self, user_group):
user = self.request.user
if user.is_staff:
- return
+ return True
project_group = user_group.group.projectgrouprole.project_group
|
Fix to allow staff to set PG permissions
|
diff --git a/lib/reek/smells/smell_repository.rb b/lib/reek/smells/smell_repository.rb
index <HASH>..<HASH> 100644
--- a/lib/reek/smells/smell_repository.rb
+++ b/lib/reek/smells/smell_repository.rb
@@ -17,10 +17,9 @@ module Reek
def initialize(source_description: nil,
smell_types: self.class.smell_types,
configuration: Configuration::AppConfiguration.new)
- @source_via = source_description
- @typed_detectors = nil
- @configuration = configuration
- @smell_types = smell_types
+ @source_via = source_description
+ @configuration = configuration
+ @smell_types = smell_types
configuration.directive_for(source_via).each do |klass, config|
configure klass, config
@@ -51,14 +50,12 @@ module Reek
private
- private_attr_reader :configuration, :source_via, :smell_types, :typed_detectors
+ private_attr_reader :configuration, :source_via, :smell_types
def smell_listeners
- unless typed_detectors
- @typed_detectors = Hash.new { |hash, key| hash[key] = [] }
- detectors.each_value { |detector| detector.register(typed_detectors) }
+ @smell_listeners ||= Hash.new { |hash, key| hash[key] = [] }.tap do |listeners|
+ detectors.each_value { |detector| detector.register(listeners) }
end
- typed_detectors
end
end
end
|
SmellRepository: typed_detectors are (refactored) smell_listeners
|
diff --git a/tests/system/HTTP/IncomingRequestTest.php b/tests/system/HTTP/IncomingRequestTest.php
index <HASH>..<HASH> 100644
--- a/tests/system/HTTP/IncomingRequestTest.php
+++ b/tests/system/HTTP/IncomingRequestTest.php
@@ -385,15 +385,17 @@ class IncomingRequestTest extends CIUnitTestCase
public function testGetVarWorksWithJsonAndGetParams()
{
- $config = new App();
+ $config = new App();
$config->baseURL = 'http://example.com/';
- // get method
- $uri = new URI('http://example.com/path?foo=bar&fizz=buzz');
- $_REQUEST['foo'] = 'bar';
+
+ // GET method
+ $_REQUEST['foo'] = 'bar';
$_REQUEST['fizz'] = 'buzz';
- $request = new IncomingRequest($config, $uri, 'php://input', new UserAgent());
+
+ $request = new IncomingRequest($config, new URI('http://example.com/path?foo=bar&fizz=buzz'), 'php://input', new UserAgent());
$request = $request->withMethod('GET');
- // json type
+
+ // JSON type
$request->setHeader('Content-Type', 'application/json');
$this->assertEquals('bar', $request->getVar('foo'));
|
Update tests/system/HTTP/IncomingRequestTest.php
|
diff --git a/docs/src/modules/components/AppNavDrawer.js b/docs/src/modules/components/AppNavDrawer.js
index <HASH>..<HASH> 100644
--- a/docs/src/modules/components/AppNavDrawer.js
+++ b/docs/src/modules/components/AppNavDrawer.js
@@ -9,6 +9,7 @@ import Divider from '@material-ui/core/Divider';
import Hidden from '@material-ui/core/Hidden';
import useMediaQuery from '@material-ui/core/useMediaQuery';
import Box from '@material-ui/core/Box';
+import { unstable_useEnhancedEffect as useEnhancedEffect } from '@material-ui/utils';
import DiamondSponsors from 'docs/src/modules/components/DiamondSponsors';
import AppNavDrawerItem from 'docs/src/modules/components/AppNavDrawerItem';
import Link from 'docs/src/modules/components/Link';
@@ -22,7 +23,7 @@ function PersistScroll(props) {
const { slot, children, enabled } = props;
const rootRef = React.useRef();
- React.useLayoutEffect(() => {
+ useEnhancedEffect(() => {
const parent = rootRef.current ? rootRef.current.parentElement : null;
const activeElement = parent.querySelector('.app-drawer-active');
|
[docs] Fix useLayoutEffect warning (#<I>)
|
diff --git a/ufork/test.py b/ufork/test.py
index <HASH>..<HASH> 100644
--- a/ufork/test.py
+++ b/ufork/test.py
@@ -192,6 +192,13 @@ def test_stdout_handler():
print str(i) * 100
time.sleep(11)
+def test_stdout_flood():
+ def stdout_flood():
+ while 1:
+ print 'a' * 10000000
+ arb = ufork.Arbiter(stdout_flood)
+ arb.run()
+
if __name__ == "__main__":
regression_test()
|
added stdout flood test; unable to reproduce crash with <I>MB chunks written as quickly as possible from 2 workers
|
diff --git a/src/main/java/org/aludratest/testcase/data/impl/xml/XmlBasedTestDataProvider.java b/src/main/java/org/aludratest/testcase/data/impl/xml/XmlBasedTestDataProvider.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/aludratest/testcase/data/impl/xml/XmlBasedTestDataProvider.java
+++ b/src/main/java/org/aludratest/testcase/data/impl/xml/XmlBasedTestDataProvider.java
@@ -252,7 +252,7 @@ public class XmlBasedTestDataProvider implements TestDataProvider {
}
// perform auto-conversion based on type
- if (value instanceof String) {
+ if (value instanceof String && !"".equals(value)) {
switch (fieldMeta.getType()) {
case BOOLEAN:
value = Boolean.parseBoolean(value.toString());
@@ -282,6 +282,9 @@ public class XmlBasedTestDataProvider implements TestDataProvider {
return format(value, fieldMeta.getFormatterPattern(), toLocale(fieldMeta.getFormatterLocale()))
.toString();
}
+ else if ("".equals(value)) {
+ return null;
+ }
return value;
}
}
|
Treat empty string as NULL on load
|
diff --git a/app/code/local/Aoe/Layout/Helper/Data.php b/app/code/local/Aoe/Layout/Helper/Data.php
index <HASH>..<HASH> 100644
--- a/app/code/local/Aoe/Layout/Helper/Data.php
+++ b/app/code/local/Aoe/Layout/Helper/Data.php
@@ -149,6 +149,18 @@ class Aoe_Layout_Helper_Data extends Mage_Core_Helper_Abstract
}
/**
+ * Simple helper method to expose Mage_Core_Model_App::isSingleStoreMode()
+ *
+ * @return bool
+ *
+ * @see Mage_Core_Model_App::isSingleStoreMode()
+ */
+ public function getIsSingleStoreMode()
+ {
+ return Mage::app()->isSingleStoreMode();
+ }
+
+ /**
* @param Mage_Core_Model_Resource_Db_Collection_Abstract $collection
* @param array $filters
* @param array $ifConditionals
|
Add helper method to expose single store mode
|
diff --git a/lib/et-orbi.rb b/lib/et-orbi.rb
index <HASH>..<HASH> 100644
--- a/lib/et-orbi.rb
+++ b/lib/et-orbi.rb
@@ -190,6 +190,8 @@ if Time.respond_to?(:zone) && Time.zone
p Time.zone
p Time.zone.to_s
p Time.zone.inspect
+ p Time.zone.tzinfo
+ p Time.zone.gem
puts "-" * 80
end
etos = Proc.new { |k, v| "#{k}:#{v.inspect}" }
|
Add even more debug output for ArZone issue, gh-5
|
diff --git a/adapters/src/main/java/org/jboss/jca/adapters/jdbc/xa/XAManagedConnection.java b/adapters/src/main/java/org/jboss/jca/adapters/jdbc/xa/XAManagedConnection.java
index <HASH>..<HASH> 100644
--- a/adapters/src/main/java/org/jboss/jca/adapters/jdbc/xa/XAManagedConnection.java
+++ b/adapters/src/main/java/org/jboss/jca/adapters/jdbc/xa/XAManagedConnection.java
@@ -397,7 +397,7 @@ public class XAManagedConnection extends BaseWrapperManagedConnection implements
private boolean isFailedXA(int errorCode)
{
- return !(errorCode >= XAException.XA_RBBASE && errorCode < XAException.XA_RBEND);
+ return !(errorCode >= XAException.XA_RBBASE && errorCode <= XAException.XA_RBEND);
}
/**
|
[JBJCA-<I>] XARB_END should be included in check
|
diff --git a/backend/geomajas-api/src/main/java/org/geomajas/layer/VectorLayer.java b/backend/geomajas-api/src/main/java/org/geomajas/layer/VectorLayer.java
index <HASH>..<HASH> 100644
--- a/backend/geomajas-api/src/main/java/org/geomajas/layer/VectorLayer.java
+++ b/backend/geomajas-api/src/main/java/org/geomajas/layer/VectorLayer.java
@@ -93,10 +93,13 @@ public interface VectorLayer extends Layer<VectorLayerInfo> {
/**
* Reads an existing feature of the model.
+ * <p/>
+ * When no feature with the requested id is found,
+ * {@link org.geomajas.global.ExceptionCode#LAYER_MODEL_FEATURE_NOT_FOUND} is thrown.
*
* @param featureId unique id of the feature
* @return feature value object
- * @throws LayerException oops
+ * @throws LayerException when reading failed, for example ExceptionCode.LAYER_MODEL_FEATURE_NOT_FOUND
*/
Object read(String featureId) throws LayerException;
|
HIB-7, HBE-<I> improve comments to make requirements more clear
|
diff --git a/lib/views/swagger2.js b/lib/views/swagger2.js
index <HASH>..<HASH> 100644
--- a/lib/views/swagger2.js
+++ b/lib/views/swagger2.js
@@ -4,7 +4,7 @@ import YAML from 'yamljs';
import jsonfile from 'jsonfile';
const loadFile = function (path) {
- if (path.match(/\.yml$/)) {
+ if (path.match(/\.ya?ml$/)) {
return YAML.load(path);
}
|
Support for .yaml file extension
You may have `.yaml` for YAML file.
The current extension only supports `.yml`
I wonder if trying to load the file as yaml and acting on failure would be better (?).
|
diff --git a/cerberus/base.py b/cerberus/base.py
index <HASH>..<HASH> 100644
--- a/cerberus/base.py
+++ b/cerberus/base.py
@@ -91,6 +91,11 @@ def normalize_schema(schema: Schema) -> Schema:
if isinstance(rules, str):
continue
+ rules_with_whitespace = [x for x in rules if " " in x]
+ if rules_with_whitespace:
+ for rule in rules_with_whitespace:
+ rules[rule.replace(" ", "_")] = rules.pop(rule)
+
if "type" in rules:
constraint = rules["type"]
if not (
diff --git a/cerberus/tests/test_schema.py b/cerberus/tests/test_schema.py
index <HASH>..<HASH> 100644
--- a/cerberus/tests/test_schema.py
+++ b/cerberus/tests/test_schema.py
@@ -125,3 +125,10 @@ def test_expansion_with_unvalidated_schema():
{"field": {'allof_regex': ['^Aladdin .*', '.* Sane$']}}
)
assert_success(document={"field": "Aladdin Sane"}, validator=validator)
+
+
+def test_rulename_space_is_normalized():
+ validator = Validator(
+ schema={"field": {"default setter": lambda x: x, "type": "string"}}
+ )
+ assert "default_setter" in validator.schema["field"]
|
Fixes missing normalization of whitespace in schema's rule names
|
diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb
index <HASH>..<HASH> 100644
--- a/railties/test/railties/engine_test.rb
+++ b/railties/test/railties/engine_test.rb
@@ -120,7 +120,7 @@ module RailtiesTest
RUBY
@plugin.write "lib/bukkits/plugins/yaffle/init.rb", <<-RUBY
- Bukkits::Engine.config.yaffle_loaded = true
+ config.yaffle_loaded = true
RUBY
boot_rails
|
Ensure that init.rb is evaled in context of Engine
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -111,8 +111,8 @@ ManifestRevisionPlugin.prototype.walkAndPrefetchAssets = function (compiler) {
var walker_options = {
listeners: {
file: function (root, fileStat, next) {
- if (self.isSafeToTrack(root)) {
- var assetPath = './' + path.join(root, fileStat.name);
+ var assetPath = './' + path.join(root, fileStat.name);
+ if (self.isSafeToTrack(assetPath)) {
compiler.apply(new webpack.PrefetchPlugin(assetPath));
}
|
Now ignorePath takes into account full path with file name
|
diff --git a/src/LaravelShop.php b/src/LaravelShop.php
index <HASH>..<HASH> 100644
--- a/src/LaravelShop.php
+++ b/src/LaravelShop.php
@@ -107,7 +107,10 @@ class LaravelShop
*/
public static function getGateway()
{
- return Session::get('shop.gateway')[0];
+ $gateways = Session::get('shop.gateway');
+ return $gateways && count($gateways) > 0
+ ? $gateways[count($gateways) - 1]
+ : null;
}
/**
@@ -180,12 +183,26 @@ class LaravelShop
if (isset($order)) {
$order->statusCode = 'failed';
$order->save();
+ // Create failed transaction
+ $order->placeTransaction(
+ static::$gatewayKey,
+ uniqid(),
+ static::$exception->getMessage(),
+ $order->statusCode
+ );
}
} catch (GatewayException $e) {
static::$exception = $e;
if (isset($order)) {
$order->statusCode = 'failed';
$order->save();
+ // Create failed transaction
+ $order->placeTransaction(
+ static::$gatewayKey,
+ uniqid(),
+ static::$exception->getMessage(),
+ $order->statusCode
+ );
}
}
if ($order) {
|
getGateway function fix and added transactions
getGateway now returns the tail not the head in session variable. Failed
transactions are now stored in the transactions table.
|
diff --git a/lib/haml/util.rb b/lib/haml/util.rb
index <HASH>..<HASH> 100644
--- a/lib/haml/util.rb
+++ b/lib/haml/util.rb
@@ -292,6 +292,34 @@ module Haml
warn(msg)
end
+ # Try loading Sass. If the `sass` gem isn't installed,
+ # print a warning and load from the vendored gem.
+ #
+ # @return [Boolean] True if Sass was successfully loaded from the `sass` gem,
+ # false otherwise.
+ def try_sass
+ begin
+ require 'sass/version'
+ loaded = Sass.respond_to?(:version) && Sass.version[:major] &&
+ Sass.version[:minor] && ((Sass.version[:major] > 3 && Sass.version[:minor] > 1) ||
+ ((Sass.version[:major] == 3 && Sass.version[:minor] == 1) &&
+ (Sass.version[:prerelease] || Sass.version[:name] != "Bleeding Edge")))
+ rescue LoadError => e
+ loaded = false
+ end
+
+ unless loaded
+ haml_warn(<<WARNING)
+Sass is in the process of being separated from Haml,
+and will no longer be bundled at all in Haml 3.2.0.
+Please install the 'sass' gem if you want to use Sass.
+WARNING
+ $".delete('sass/version')
+ $LOAD_PATH.unshift(scope("vendor/sass/lib"))
+ end
+ loaded
+ end
+
## Cross Rails Version Compatibility
# Returns the root of the Rails application,
|
Add a util method to load Sass.
|
diff --git a/prestans/rest.py b/prestans/rest.py
index <HASH>..<HASH> 100644
--- a/prestans/rest.py
+++ b/prestans/rest.py
@@ -763,6 +763,7 @@ class RequestHandler(object):
class BlueprintHandler(RequestHandler):
def __init__(self, args, request, response, logger, debug, route_map):
+
super(BlueprintHandler, self).__init__(args, request, response, logger, debug)
self._route_map = route_map
@@ -805,7 +806,9 @@ class BlueprintHandler(RequestHandler):
import logging
logging.error(self._create_blueprint())
- return []
+ logging.error(self.response)
+
+ return self.response(environ, start_response)
class RequestRouter(object):
@@ -823,12 +826,13 @@ class RequestRouter(object):
def __init__(self, routes, serializers=None, default_serializer=None, deserializers=None,
default_deserializer=None, charset="utf-8", application_name="prestans",
- logger=None, debug=False):
+ logger=None, debug=False, description=None):
self._application_name = application_name
self._debug = debug
self._routes = routes
self._charset = charset
+ self._description = description
#: Are formats prestans handlers can send data back as
self._serializers = serializers
|
Adds description to request router for blueprint
|
diff --git a/src/main/java/org/dasein/cloud/google/platform/RDS.java b/src/main/java/org/dasein/cloud/google/platform/RDS.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/dasein/cloud/google/platform/RDS.java
+++ b/src/main/java/org/dasein/cloud/google/platform/RDS.java
@@ -866,8 +866,8 @@ public class RDS extends AbstractRelationalDatabaseSupport<Google> {
database.setProductSize(s.getTier()); // D0
LocationPreference lp = s.getLocationPreference();
- if (null != lp)
- database.setProviderDataCenterId(lp.getZone());
+ if ((null != lp) && (null != lp.getZone()))
+ database.setProviderDataCenterId(lp.getZone()); // broken database instance is in a state where this is not set as the database is in maintenence mode.
database.setProviderDatabaseId(d.getInstance()); // dsnrdbms317
database.setProviderOwnerId(d.getProject()); // qa-project-2
database.setProviderRegionId(d.getRegion());
|
added comment explaining why database.setProviderDataCenterId is failing
(DUE to a stuck database instance.
|
diff --git a/lib/lolcommits/plugins/lol_twitter.rb b/lib/lolcommits/plugins/lol_twitter.rb
index <HASH>..<HASH> 100644
--- a/lib/lolcommits/plugins/lol_twitter.rb
+++ b/lib/lolcommits/plugins/lol_twitter.rb
@@ -65,8 +65,8 @@ module Lolcommits
consumer = OAuth::Consumer.new(TWITTER_CONSUMER_KEY,
TWITTER_CONSUMER_SECRET,
- :site => 'http://api.twitter.com',
- :request_endpoint => 'http://api.twitter.com',
+ :site => 'https://api.twitter.com',
+ :request_endpoint => 'https://api.twitter.com',
:sign_in => true)
request_token = consumer.get_request_token
|
Replace http with https in twitter plugin.
http requests produce a <I> error during OAuth.
|
diff --git a/app/assets/javascripts/fae/form/_validator.js b/app/assets/javascripts/fae/form/_validator.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/fae/form/_validator.js
+++ b/app/assets/javascripts/fae/form/_validator.js
@@ -30,7 +30,8 @@ Fae.form.validator = {
FCH.$document.on('submit', 'form', function (e) {
_this.is_valid = true;
- $('[data-validate]').each(function () {
+ // Scope the data-validation only to the form submitted
+ $('[data-validate]', $(this)).each(function () {
if ($(this).data('validate').length) {
_this.judge_it($(this));
}
|
scope validations to current form to prevent main form from being validated on nested submission
|
diff --git a/lib/artifactory/client.rb b/lib/artifactory/client.rb
index <HASH>..<HASH> 100644
--- a/lib/artifactory/client.rb
+++ b/lib/artifactory/client.rb
@@ -266,7 +266,7 @@ module Artifactory
case response
when Net::HTTPRedirection
- redirect = URI.parse(response["location"])
+ redirect = response["location"]
request(verb, redirect, data, headers)
when Net::HTTPSuccess
success(response)
|
Fix handling of redirection
request expects a path, not a URI.
|
diff --git a/lib/contracts.js b/lib/contracts.js
index <HASH>..<HASH> 100644
--- a/lib/contracts.js
+++ b/lib/contracts.js
@@ -143,7 +143,7 @@ ContractsManager.prototype.build = function() {
};
ContractsManager.prototype.getContract = function(className) {
- return this.compiledContracts[className];
+ return this.contracts[className];
};
ContractsManager.prototype.sortContracts = function(contractList) {
|
get contract from contract list, not compiled contracts
|
diff --git a/src/fi/tkk/ics/hadoop/bam/cli/Frontend.java b/src/fi/tkk/ics/hadoop/bam/cli/Frontend.java
index <HASH>..<HASH> 100644
--- a/src/fi/tkk/ics/hadoop/bam/cli/Frontend.java
+++ b/src/fi/tkk/ics/hadoop/bam/cli/Frontend.java
@@ -120,8 +120,8 @@ public final class Frontend {
thread.setContextClassLoader(
new URLClassLoader(allURLs, loader2.getParent()));
- // Evidently we don't need to do conf.setClassLoader(). Presumably
- // Hadoop loads the libjars and the main jar in the same class loader.
+ // Make sure Hadoop also uses the right class loader.
+ conf.setClassLoader(thread.getContextClassLoader());
}
/* Call the go(args,conf) method of this class, but do it via
|
CLI frontend: set conf.setClassLoader
Appears to be necessary at least in CDH <I>.
|
diff --git a/public/src/Route/Link.php b/public/src/Route/Link.php
index <HASH>..<HASH> 100644
--- a/public/src/Route/Link.php
+++ b/public/src/Route/Link.php
@@ -27,6 +27,7 @@ class Link extends Route
$setor = Config::getSetor();
$this->viewAssetsUpdate($setor);
$this->addJsTemplates();
+ $this->createHeadMinify();
$this->formatParam($setor);
}
@@ -40,8 +41,6 @@ class Link extends Route
$this->param['css'] = file_exists(PATH_HOME . "assetsPublic/view/{$setor}/" . parent::getFile() . ".min.css") ? file_get_contents(PATH_HOME . "assetsPublic/view/" . $setor . "/" . parent::getFile() . ".min.css") : "";
$this->param['js'] = file_exists(PATH_HOME . "assetsPublic/view/{$setor}/" . parent::getFile() . ".min.js") ? HOME . "assetsPublic/view/{$setor}/" . parent::getFile() . ".min.js?v=" . VERSION : "";
$this->param['variaveis'] = parent::getVariaveis();
-
- $this->createHeadMinify();
}
/**
|
remove css and js original, move link and script to css and js
|
diff --git a/spec/cli_spec.js b/spec/cli_spec.js
index <HASH>..<HASH> 100644
--- a/spec/cli_spec.js
+++ b/spec/cli_spec.js
@@ -114,7 +114,23 @@ describe('prey.js', function(){
})
- describe('when a different signal is received', function(){
+ describe('when SIGINT signal is received', function(){
+
+ it('should do nothing', function(){
+
+ })
+
+ })
+
+ describe('when SIGTERM signal is received', function(){
+
+ it('should do nothing', function(){
+
+ })
+
+ })
+
+ describe('when SIGQUIT signal is received', function(){
it('should do nothing', function(){
|
Added a few things on cli spec.
|
diff --git a/lib/kamerling/repos.rb b/lib/kamerling/repos.rb
index <HASH>..<HASH> 100644
--- a/lib/kamerling/repos.rb
+++ b/lib/kamerling/repos.rb
@@ -20,6 +20,10 @@ module Kamerling class Repos
@db = db
end
+ def free_clients_for project
+ repos[Registration].related_to(project).map(&:client).reject(&:busy)
+ end
+
def projects
repos[Project].all
end
diff --git a/spec/kamerling/repos_spec.rb b/spec/kamerling/repos_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/kamerling/repos_spec.rb
+++ b/spec/kamerling/repos_spec.rb
@@ -28,6 +28,20 @@ module Kamerling describe Repos do
end
end
+ describe '.free_clients_for' do
+ it 'returns free clients for the given project' do
+ busy_client = fake :client, busy: true
+ free_client = fake :client, busy: false
+ busy_reg = fake :registration, client: busy_client
+ free_reg = fake :registration, client: free_client
+ project = fake :project
+ repo = fake :repo
+ stub(repo).related_to(project) { [busy_reg, free_reg] }
+ Repos.repos = { Registration => repo }
+ Repos.free_clients_for(project).must_equal [free_client]
+ end
+ end
+
describe '.projects' do
it 'returns all projects' do
Repos.repos = { Project => fake(:repo, all: all_projects = fake) }
|
add Repos.free_clients_for
|
diff --git a/test/system/src/test/java/io/pravega/test/system/ControllerFailoverTest.java b/test/system/src/test/java/io/pravega/test/system/ControllerFailoverTest.java
index <HASH>..<HASH> 100644
--- a/test/system/src/test/java/io/pravega/test/system/ControllerFailoverTest.java
+++ b/test/system/src/test/java/io/pravega/test/system/ControllerFailoverTest.java
@@ -184,7 +184,7 @@ public class ControllerFailoverTest {
// Scale operation should now complete on the second controller instance.
// Note: if scale does not complete within desired time, test will timeout.
while (!scaleStatus) {
- scaleStatus = controller1.checkScaleStatus(stream1, 0).join();
+ scaleStatus = controller2.checkScaleStatus(stream1, 0).join();
Thread.sleep(30000);
}
|
Issue <I>: Call controller2 instead of controller1 as controller is stopped in system test (#<I>)
* Fixes problem in failovertest where we call a controller that we have shut down to check scaling
status.
|
diff --git a/agent/test/unit/com/thoughtworks/go/agent/AgentWebSocketClientControllerTest.java b/agent/test/unit/com/thoughtworks/go/agent/AgentWebSocketClientControllerTest.java
index <HASH>..<HASH> 100644
--- a/agent/test/unit/com/thoughtworks/go/agent/AgentWebSocketClientControllerTest.java
+++ b/agent/test/unit/com/thoughtworks/go/agent/AgentWebSocketClientControllerTest.java
@@ -102,8 +102,8 @@ public class AgentWebSocketClientControllerTest {
@After
public void tearDown() {
GuidService.deleteGuid();
- System.clearProperty("go.agent.websocket.enabled");
- System.clearProperty("go.agent.console.logs.websocket.enabled");
+ System.clearProperty(SystemEnvironment.WEBSOCKET_ENABLED.propertyName());
+ System.clearProperty(SystemEnvironment.CONSOLE_LOGS_THROUGH_WEBSOCKET_ENABLED.propertyName());
}
@Test
|
Change the way we clear system property so keys aren't duplicated in test
|
diff --git a/src/main/java/hudson/plugins/groovy/Groovy.java b/src/main/java/hudson/plugins/groovy/Groovy.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hudson/plugins/groovy/Groovy.java
+++ b/src/main/java/hudson/plugins/groovy/Groovy.java
@@ -186,10 +186,11 @@ public class Groovy extends AbstractGroovy {
public void setInstallations(hudson.plugins.groovy.GroovyInstallation... installations) {
//this.installations = installations;
- this.installations2 = new ArrayList<hudson.plugins.groovy.GroovyInstallation>();
+ List<hudson.plugins.groovy.GroovyInstallation> installations2 = new ArrayList<hudson.plugins.groovy.GroovyInstallation>();
for(hudson.plugins.groovy.GroovyInstallation install: installations){
- this.installations2.add(install);
+ installations2.add(install);
}
+ this.installations2 = installations2;
save();
}
|
[JENKINS-<I>] Fixed @CopyOnWrite semantics
|
diff --git a/src/main/java/com/cloudbees/jenkins/support/AsyncResultCache.java b/src/main/java/com/cloudbees/jenkins/support/AsyncResultCache.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudbees/jenkins/support/AsyncResultCache.java
+++ b/src/main/java/com/cloudbees/jenkins/support/AsyncResultCache.java
@@ -79,7 +79,7 @@ public class AsyncResultCache<T> implements Runnable {
}
private static String getNodeName(Node node) {
- return node instanceof Jenkins ? "master" : node.getNodeName();
+ return node instanceof Jenkins ? "master" : node.getDisplayName();
}
public AsyncResultCache(Node node, WeakHashMap<Node, T> cache, Future<T> future, String name) {
|
Use display name of node in order to retain consistency with support bundle
|
diff --git a/phpsec/phpsec.session.php b/phpsec/phpsec.session.php
index <HASH>..<HASH> 100644
--- a/phpsec/phpsec.session.php
+++ b/phpsec/phpsec.session.php
@@ -74,7 +74,7 @@ class phpsecSession {
self::$_currID = null;
}
if(self::$_sessIdRegen === true || self::$_currID === null) {
- self::$_newID = phpsecRand::str(128);
+ self::$_newID = phpsecRand::str(128, 'abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ-_.!*#=%');
} else {
self::$_newID = self::$_currID;
}
|
Adds more characters to the session ID charset.
|
diff --git a/lib/symmetric_encryption.rb b/lib/symmetric_encryption.rb
index <HASH>..<HASH> 100644
--- a/lib/symmetric_encryption.rb
+++ b/lib/symmetric_encryption.rb
@@ -7,18 +7,14 @@ begin
rescue LoadError
end
-begin
- require 'active_record'
+ActiveSupport.on_load(:active_record) do
require 'symmetric_encryption/railties/attr_encrypted'
require 'symmetric_encryption/railties/symmetric_encryption_validator'
ActiveRecord::Base.include(SymmetricEncryption::Railties::AttrEncrypted)
-rescue LoadError
end
-begin
- require 'mongoid'
+ActiveSupport.on_load(:mongoid) do
require 'symmetric_encryption/railties/mongoid_encrypted'
require 'symmetric_encryption/railties/symmetric_encryption_validator'
-rescue LoadError
end
|
Lazily loads ORM adapters to mitigate #<I>
|
diff --git a/packages/reactstrap-validation-date/src/AvDateRange.js b/packages/reactstrap-validation-date/src/AvDateRange.js
index <HASH>..<HASH> 100644
--- a/packages/reactstrap-validation-date/src/AvDateRange.js
+++ b/packages/reactstrap-validation-date/src/AvDateRange.js
@@ -326,8 +326,10 @@ export default class AvDateRange extends Component {
disabled={attributes.disabled}
className={classes}
onChange={({ target }) => {
- (target.id === startId || target.id === endId) &&
+ if(target.id === startId || target.id === endId){
this.onDatesChange(target.value);
+
+ }
}}
data-testid={`date-range-input-group-${name}`}
>
|
refactor(reactstrap-validation-date): linter didnt like shorthand
|
diff --git a/app/models/unidom/visitor/password.rb b/app/models/unidom/visitor/password.rb
index <HASH>..<HASH> 100644
--- a/app/models/unidom/visitor/password.rb
+++ b/app/models/unidom/visitor/password.rb
@@ -6,7 +6,7 @@ class Unidom::Visitor::Password < ActiveRecord::Base
has_one :authenticating, class_name: 'Unidom::Visitor::Authenticating', as: :credential
- include ::Unidom::Common::Concerns::ModelExtension
+ include Unidom::Common::Concerns::ModelExtension
def generate_pepper_content
self.pepper_content = self.pepper_content||::SecureRandom.hex(self.class.columns_hash['pepper_content'].limit/2)
|
1, Improved the coding style of the Password model.
|
diff --git a/tests/unit/OutputManagerTest.php b/tests/unit/OutputManagerTest.php
index <HASH>..<HASH> 100644
--- a/tests/unit/OutputManagerTest.php
+++ b/tests/unit/OutputManagerTest.php
@@ -92,6 +92,7 @@ class OutputManagerTest extends \Codeception\Test\Unit
"template" => $this->tplName
]
);
+ $this->manager->setHandler(m::mock(\SlaxWeb\Output\AbstractHandler::class));
restore_error_handler();
}
|
set a mocked output handler in manager unit test
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.