diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/extensions/wisdom-monitor/src/main/resources/assets/js/wisit/shell/WisitShellComp.js b/extensions/wisdom-monitor/src/main/resources/assets/js/wisit/shell/WisitShellComp.js
index <HASH>..<HASH> 100644
--- a/extensions/wisdom-monitor/src/main/resources/assets/js/wisit/shell/WisitShellComp.js
+++ b/extensions/wisdom-monitor/src/main/resources/assets/js/wisit/shell/WisitShellComp.js
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
Fix file header (trailing space)
|
diff --git a/cherrypy/test/test_misc_tools.py b/cherrypy/test/test_misc_tools.py
index <HASH>..<HASH> 100644
--- a/cherrypy/test/test_misc_tools.py
+++ b/cherrypy/test/test_misc_tools.py
@@ -197,7 +197,7 @@ class AutoVaryTest(helper.CPWebCase):
def testAutoVary(self):
self.getPage('/autovary/')
self.assertHeader(
- "Vary", 'Accept, Accept-Encoding, Host, If-Modified-Since, Range')
+ "Vary", 'Accept, Accept-Charset, Accept-Encoding, Host, If-Modified-Since, Range')
if __name__ == "__main__":
|
Updated vary test for always-on encoding. We ''want'' Accept-Charset in the list since output will vary based on it.
|
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/relation/calculations.rb
+++ b/activerecord/lib/active_record/relation/calculations.rb
@@ -391,7 +391,7 @@ module ActiveRecord
def build_count_subquery(relation, column_name, distinct)
relation.select_values = [
if column_name == :all
- distinct ? table[Arel.star] : Arel.sql("1")
+ distinct ? table[Arel.star] : Arel.sql(FinderMethods::ONE_AS_ONE)
else
column_alias = Arel.sql("count_column")
aggregate_column(column_name).as(column_alias)
|
Ensure `1 AS one` for SQL Server with calculations.
|
diff --git a/packages/cli-plugin-deploy-components/execute/Status.js b/packages/cli-plugin-deploy-components/execute/Status.js
index <HASH>..<HASH> 100644
--- a/packages/cli-plugin-deploy-components/execute/Status.js
+++ b/packages/cli-plugin-deploy-components/execute/Status.js
@@ -20,6 +20,10 @@ class Status {
}
start() {
+ if (process.env.CI) {
+ return;
+ }
+
// Hide cursor always, to keep it clean
process.stdout.write(ansiEscapes.cursorHide);
this.status.running = true;
@@ -65,6 +69,10 @@ class Status {
}
async render(status) {
+ if (process.env.CI) {
+ return;
+ }
+
// Start Status engine, if it isn't running yet
if (!this.isRunning()) {
this.start();
|
fix(cli-plugin-deploy-components): disable status messages in CI
|
diff --git a/lib/ooor/relation.rb b/lib/ooor/relation.rb
index <HASH>..<HASH> 100644
--- a/lib/ooor/relation.rb
+++ b/lib/ooor/relation.rb
@@ -17,7 +17,7 @@ module Ooor
def build_where(opts, other = [])#TODO OpenERP domain is more than just the intersection of restrictions
case opts
- when Array
+ when Array || '|' || '&'
[opts]
when Hash
opts.keys.map {|key|["#{key}", "=", opts[key]]}
@@ -26,7 +26,11 @@ module Ooor
def where(opts, *rest)
relation = clone
- relation.where_values += build_where(opts, rest) unless opts.blank?
+ if opts.is_a?(Array) && opts.any? {|e| e.is_a? Array}
+ relation.where_values = opts
+ else
+ relation.where_values += build_where(opts, rest) unless opts.blank?
+ end
relation
end
|
ablity to pass full OpenERP S-expresions domains in relation.where(...)
|
diff --git a/expr/node.go b/expr/node.go
index <HASH>..<HASH> 100644
--- a/expr/node.go
+++ b/expr/node.go
@@ -779,9 +779,9 @@ func (m *IdentityNode) Equal(n Node) bool {
if nt.Text != m.Text {
return false
}
- if nt.Quote != m.Quote {
- return false
- }
+ // if nt.Quote != m.Quote {
+ // return false
+ // }
return true
}
return false
|
Dont force identities to match quote type
|
diff --git a/pymysql/tests/test_issues.py b/pymysql/tests/test_issues.py
index <HASH>..<HASH> 100644
--- a/pymysql/tests/test_issues.py
+++ b/pymysql/tests/test_issues.py
@@ -76,7 +76,7 @@ class TestOldIssues(base.PyMySQLTestCase):
warnings.filterwarnings("ignore")
c.execute("drop table if exists test")
c.execute("""CREATE TABLE `test` (`station` int(10) NOT NULL DEFAULT '0', `dh`
-datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `echeance` int(1) NOT NULL
+datetime NOT NULL DEFAULT '2015-01-01 00:00:00', `echeance` int(1) NOT NULL
DEFAULT '0', `me` double DEFAULT NULL, `mo` double DEFAULT NULL, PRIMARY
KEY (`station`,`dh`,`echeance`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;""")
try:
|
datetime cannot have <I>-<I>-<I>... as a valid value in <I> - was not part of test so changed to a valid date
|
diff --git a/python/setup.py b/python/setup.py
index <HASH>..<HASH> 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -7,7 +7,7 @@ setup(name='jsbeautifier',
description='JavaScript unobfuscator and beautifier.',
long_description=('Beautify, unpack or deobfuscate JavaScript. '
'Handles popular online obfuscators.'),
- author='Einar Lielmanis et al.',
+ author='Einar Lielmanis, Stefano Sanfilippo et al.',
author_email='einar@jsbeautifier.org',
url='http://jsbeautifier.org',
packages=['jsbeautifier', 'jsbeautifier.tests',
|
Updated copyright notice in setup.py installation facility.
|
diff --git a/addon/components/sl-grid.js b/addon/components/sl-grid.js
index <HASH>..<HASH> 100755
--- a/addon/components/sl-grid.js
+++ b/addon/components/sl-grid.js
@@ -201,6 +201,19 @@ export default Ember.Component.extend({
// -------------------------------------------------------------------------
// Events
+ /**
+ * Post-template insert hook to set column heading default widths
+ *
+ * @function
+ * @returns {undefined}
+ */
+ didInsertElement: function() {
+ const colHeaders = $( '.list-pane .column-headers tr:first th' );
+ this.$( '.list-pane .content > table tr:first td' ).each( function( index ) {
+ colHeaders.eq( index ).width( $( this ).width() );
+ });
+ },
+
// -------------------------------------------------------------------------
// Properties
|
added an event hook to set widths on column headers based on data column widths
|
diff --git a/gitlab/base.py b/gitlab/base.py
index <HASH>..<HASH> 100644
--- a/gitlab/base.py
+++ b/gitlab/base.py
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import importlib
+from types import ModuleType
from typing import Any, Dict, Optional, Type
from .client import Gitlab, GitlabList
@@ -38,7 +39,12 @@ class RESTObject(object):
without ID in the url.
"""
- _id_attr = "id"
+ _id_attr: Optional[str] = "id"
+ _attrs: Dict[str, Any]
+ _module: ModuleType
+ _parent_attrs: Dict[str, Any]
+ _updated_attrs: Dict[str, Any]
+ manager: "RESTManager"
def __init__(self, manager: "RESTManager", attrs: Dict[str, Any]) -> None:
self.__dict__.update(
|
chore: add additional type-hints for gitlab/base.py
Add type-hints for the variables which are set via self.__dict__
mypy doesn't see them when they are assigned via self.__dict__. So
declare them in the class definition.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -76,6 +76,7 @@ function attachVirtuals(schema, res) {
function attachVirtualsToDoc(schema, doc, virtuals) {
const numVirtuals = virtuals.length;
+ if (doc == null) return;
if (Array.isArray(doc)) {
for (let i = 0; i < doc.length; ++i) {
attachVirtualsToDoc(schema, doc[i], virtuals);
|
fix: avoid undefined doc from being virtualized
|
diff --git a/src/Commands/ValidationMakeCommand.php b/src/Commands/ValidationMakeCommand.php
index <HASH>..<HASH> 100644
--- a/src/Commands/ValidationMakeCommand.php
+++ b/src/Commands/ValidationMakeCommand.php
@@ -16,7 +16,7 @@ class ValidationMakeCommand extends GeneratorCommand
*
* @var string
*/
- protected $description = 'Create a new validation definition.';
+ protected $description = 'Create a new validation definition';
/**
* The type of class being generated.
|
format
keep the same styling as existing artisan commands
|
diff --git a/datascience/tables.py b/datascience/tables.py
index <HASH>..<HASH> 100644
--- a/datascience/tables.py
+++ b/datascience/tables.py
@@ -280,7 +280,32 @@ class Table(collections.abc.MutableMapping):
return table
def select(self, column_label_or_labels):
- """Return a Table with selected column or columns by label."""
+ """Return a Table with selected column or columns by label.
+
+ Args:
+ ``column_label_or_labels`` (string or list of strings): The header
+ names of the columns to be selected. ``column_label_or_labels`` must
+ be an existing header name.
+
+ Returns:
+ An instance of ``Table`` containing only selected columns.
+
+ >>> print(t)
+ burgers | prices | calories
+ cheeseburger | 6 | 743
+ hamburger | 5 | 651
+ veggie burger | 5 | 582
+ >>> print(t.select(['burgers', 'calories']))
+ burgers | calories
+ cheeseburger | 743
+ hamburger | 651
+ veggie burger | 582
+ >>> print(t.select('prices'))
+ prices
+ 6
+ 5
+ 5
+ """
column_labels = _as_labels(column_label_or_labels)
table = Table()
for label in column_labels:
|
wrote docs for table.select
|
diff --git a/src/Controller/Plugin/FlashData.php b/src/Controller/Plugin/FlashData.php
index <HASH>..<HASH> 100644
--- a/src/Controller/Plugin/FlashData.php
+++ b/src/Controller/Plugin/FlashData.php
@@ -237,18 +237,20 @@ class FlashData extends AbstractPlugin
$routeName = $routeMatch->getMatchedRouteName();
}
+ $routeName = str_replace(
+ [
+ '\\',
+ '/'
+ ], '_', $routeName
+ );
+
if (array_key_exists($routeName, $this->sessions)) {
return $this->sessions[$routeName];
}
$this->sessions[$routeName] = new SessionContainer(
$this->getName() . '_' . strtolower(
- str_replace(
- [
- '\\',
- '/'
- ], '_', $routeName
- )
+ $routeName
)
);
|
Chore: Update flash data plugin route name
|
diff --git a/src/Services/Adapters/RequestAdapter.php b/src/Services/Adapters/RequestAdapter.php
index <HASH>..<HASH> 100644
--- a/src/Services/Adapters/RequestAdapter.php
+++ b/src/Services/Adapters/RequestAdapter.php
@@ -46,6 +46,7 @@ abstract class RequestAdapter extends BaseAdapter
$payload = array(
'currency_code' => $this->config->baseCurrency,
'notification_url' => $this->config->notificationUrl,
+ 'redirect_url' => $this->config->redirectUrl,
'name' => $this->payment->person->name,
'email' => $this->payment->person->email,
'amount_total' => $this->payment->amountTotal,
|
Added redirect_url to adapter
|
diff --git a/core/src/main/java/org/kohsuke/stapler/Stapler.java b/core/src/main/java/org/kohsuke/stapler/Stapler.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/kohsuke/stapler/Stapler.java
+++ b/core/src/main/java/org/kohsuke/stapler/Stapler.java
@@ -1,6 +1,5 @@
package org.kohsuke.stapler;
-import net.sf.json.JSONObject;
import org.apache.commons.beanutils.ConversionException;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.ConvertUtilsBean;
@@ -374,7 +373,7 @@ public class Stapler extends HttpServlet {
return null;
try {
//when URL contains escapes like %20, this does the conversion correctly
- return new File(url.toURI().getPath());
+ return new File(url.toURI());
} catch (URISyntaxException e) {
try {
// some containers, such as Winstone, doesn't escape ' ', and for those
|
new File(URI) is the correct way to convert a URI to a File (pending NIO<I>).
|
diff --git a/lib/datapackage/schema.rb b/lib/datapackage/schema.rb
index <HASH>..<HASH> 100644
--- a/lib/datapackage/schema.rb
+++ b/lib/datapackage/schema.rb
@@ -32,7 +32,6 @@ module DataPackage
def dereference_schema path_or_url, schema
@base_path = base_path path_or_url
-
paths = hash_to_slashed_path schema['properties']
ref_keys = paths.keys.find { |p| p =~ /\$ref/ }
if ref_keys
@@ -42,13 +41,10 @@ module DataPackage
path = key.split('/')[0..-2]
replacement = resolve(schema['properties'].dig(*path, '$ref'))
- until path.count == 1
- schema['properties'] = schema['properties'][path.shift]
- end
-
- last_path = path.shift
- schema['properties'][last_path].merge! replacement
- schema['properties'][last_path].delete '$ref'
+ s = "schema['properties']#{path.map { |k| "['#{k}']" }.join}.merge! replacement"
+ eval s
+ s = "schema['properties']#{path.map { |k| "['#{k}']" }.join}.delete '$ref'"
+ eval s
end
end
|
This feels wrong
But I don’t know how else to do it
|
diff --git a/lib/transformers.js b/lib/transformers.js
index <HASH>..<HASH> 100644
--- a/lib/transformers.js
+++ b/lib/transformers.js
@@ -193,8 +193,8 @@ exports.mustache = new Transformer({
engines: ['mustache'],
outputFormat: 'xml',
sync: function(str, options){
- var tmpl = this.cache(options) || this.cache(options, this.engine.compile(str));
- return tmpl(options, options.partials);
+ str = this.cache(options) || this.cache(options, str);
+ return this.engine.to_html(str, options, options.partials);
}
});
|
Don't cache compiled mustache since the API sucks
[closes #<I>] (it's not ideal but it works)
|
diff --git a/src/resolvelib/__init__.py b/src/resolvelib/__init__.py
index <HASH>..<HASH> 100644
--- a/src/resolvelib/__init__.py
+++ b/src/resolvelib/__init__.py
@@ -11,7 +11,7 @@ __all__ = [
"ResolutionTooDeep",
]
-__version__ = "0.8.0"
+__version__ = "0.8.1.dev0"
from .providers import AbstractProvider, AbstractResolver
|
Prebump to <I>.dev0
|
diff --git a/html.go b/html.go
index <HASH>..<HASH> 100644
--- a/html.go
+++ b/html.go
@@ -190,9 +190,9 @@ func (m Minify) HTML(w io.Writer, r io.Reader) error {
getAttr(token, "rel") != "external" || attr.Key == "profile" || attr.Key == "xmlns" {
if strings.HasPrefix(val, "http:") {
val = val[5:]
- } else if strings.HasPrefix(val, "https:") {
- val = val[6:]
- }
+ }// else if strings.HasPrefix(val, "https:") { // TODO: remove or readd; https: is not the default protocol
+ // val = val[6:]
+ //}
} else if token.Data == "meta" && attr.Key == "content" {
http_equiv := getAttr(token, "http-equiv")
if http_equiv == "content-type" {
|
URL protocol https: not stripped
https: is probably not the default protocol and cannot be inferred by
the browser, therefore it cannot be removed
|
diff --git a/lib/client.js b/lib/client.js
index <HASH>..<HASH> 100644
--- a/lib/client.js
+++ b/lib/client.js
@@ -192,13 +192,20 @@ Client.prototype.stream = function () {
* @param {resultCallback} callback Executes callback(err, result) when the batch was executed
*/
Client.prototype.batch = function () {
+ var self = this;
var args = this._parseBatchArgs.apply(null, arguments);
//logged batch by default
args.options = utils.extend({logged: true}, this.options.queryOptions, args.options);
- var request = new requests.BatchRequest(args.queries, args.options.consistency, args.options);
- var handler = new RequestHandler(this, this.options);
- args.callback = utils.bindDomain(args.callback);
- handler.send(request, null, args.callback);
+
+ this.connect(function afterConnect(err) {
+ if (err) {
+ return args.callback(err);
+ }
+ var request = new requests.BatchRequest(args.queries, args.options.consistency, args.options);
+ var handler = new RequestHandler(self, self.options);
+ args.callback = utils.bindDomain(args.callback);
+ handler.send(request, null, args.callback);
+ });
};
/**
|
Ensure connection exists before executing batch queries
|
diff --git a/src/DayPicker.js b/src/DayPicker.js
index <HASH>..<HASH> 100644
--- a/src/DayPicker.js
+++ b/src/DayPicker.js
@@ -25,6 +25,7 @@ class Caption extends Component { // eslint-disable-line
}
export default class DayPicker extends Component {
+ static VERSION = "2.0.0";
static propTypes = {
tabIndex: PropTypes.number,
|
Add version number to DayPicker class
This can be helpful if you need to figure out what version of a library is actually running in your app.
|
diff --git a/example.js b/example.js
index <HASH>..<HASH> 100644
--- a/example.js
+++ b/example.js
@@ -12,6 +12,14 @@ var client = new SambaClient({
username: 'Guest'
});
+client.mkdir('test-directory', function(err) {
+ if (err) {
+ return console.error(err);
+ }
+
+ console.log('created test directory on samba share at ' + client.address);
+});
+
client.sendFile(testFile, testFile, function(err) {
if (err) {
return console.error(err);
@@ -28,6 +36,18 @@ client.sendFile(testFile, testFile, function(err) {
console.log('got test file from samba share at ' + client.address);
});
+
+ client.fileExists(testFile, function(err, exists) {
+ if (err) {
+ return console.error(err);
+ }
+
+ if (exists) {
+ console.log('test file exists on samba share at ' + client.address);
+ } else {
+ console.log('test file does not exist on samba share at ' + client.address);
+ }
+ });
});
process.on('exit', function() {
|
add examples for mkdir, fileExists
|
diff --git a/src-modules/org/opencms/workplace/tools/sites/CmsSiteDialogObject.java b/src-modules/org/opencms/workplace/tools/sites/CmsSiteDialogObject.java
index <HASH>..<HASH> 100644
--- a/src-modules/org/opencms/workplace/tools/sites/CmsSiteDialogObject.java
+++ b/src-modules/org/opencms/workplace/tools/sites/CmsSiteDialogObject.java
@@ -512,13 +512,14 @@ public class CmsSiteDialogObject {
if ((site != null) && (site.getSiteMatcher() != null)) {
uuid = (CmsUUID)site.getSiteRootUUID().clone();
}
+ String errorPage = CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_errorPage) ? m_errorPage : null;
return new CmsSite(
m_siteRoot,
uuid,
m_title,
new CmsSiteMatcher(m_server),
String.valueOf(m_position),
- m_errorPage,
+ errorPage,
matcher,
m_exclusiveUrl,
m_exclusiveError,
|
Do not write an empty error page attribute to the system configuration.
|
diff --git a/salt/modules/rh_ip.py b/salt/modules/rh_ip.py
index <HASH>..<HASH> 100644
--- a/salt/modules/rh_ip.py
+++ b/salt/modules/rh_ip.py
@@ -1013,7 +1013,10 @@ def build_interface(iface, iface_type, enabled, **settings):
salt '*' ip.build_interface eth0 eth <settings>
'''
if __grains__['os'] == 'Fedora':
- rh_major = '6'
+ if __grains__['osmajorrelease'] >= 18:
+ rh_major = '7'
+ else:
+ rh_major = '6'
else:
rh_major = __grains__['osrelease'][:1]
|
Fix rh_ip template use for Fedora
Salt assumes that all Fedora releases conform to the RHEL6 version.
This means that on current Fedora releases an older interface template
is used resulting in non-working routes.
The logic could probably use a bit of rework as I could see future
Fedora releases diverging more from RHEL but for now an additional
check was added that handles Fedora <I> and higher as RHEL7 (which was
branched off from F<I>).
|
diff --git a/lib/omnibus/project.rb b/lib/omnibus/project.rb
index <HASH>..<HASH> 100644
--- a/lib/omnibus/project.rb
+++ b/lib/omnibus/project.rb
@@ -263,7 +263,7 @@ module Omnibus
task "#{@name}:copy" => (package_types.map {|pkg_type| "#{@name}:#{pkg_type}"}) do
if OHAI.platform == "windows"
- cp_cmd = "xcopy #{config.package_dir}\\* pkg\\ /Y"
+ cp_cmd = "xcopy #{config.package_dir}\\*.msi pkg\\ /Y"
else
cp_cmd = "cp #{config.package_dir}/* pkg/"
end
|
Modify release script to copy only msi files as release artifacts
|
diff --git a/lib/rules/click-events-have-key-events.js b/lib/rules/click-events-have-key-events.js
index <HASH>..<HASH> 100644
--- a/lib/rules/click-events-have-key-events.js
+++ b/lib/rules/click-events-have-key-events.js
@@ -18,7 +18,7 @@ module.exports = {
},
create (context) {
return VueUtils.defineTemplateBodyVisitor(context, {
- "VAttribute[directive=true][key.name='on'][key.argument='click']" (node) {
+ "VAttribute[directive=true][key.name.name='on'][key.argument.name='click']" (node) {
const requiredEvents = ['keydown', 'keyup', 'keypress'];
const element = node.parent.parent;
if (VueUtils.isCustomComponent(element)) {
@@ -42,4 +42,4 @@ module.exports = {
}
}, JsxRule.create(context))
}
-}
\ No newline at end of file
+}
|
fix: patch click-events-have-key-events rule
|
diff --git a/any_urlfield/registry.py b/any_urlfield/registry.py
index <HASH>..<HASH> 100644
--- a/any_urlfield/registry.py
+++ b/any_urlfield/registry.py
@@ -12,7 +12,7 @@ class UrlType(object):
if form_field is None:
# Generate default form field if nothing is provided.
if has_id_value:
- form_field = forms.ModelChoiceField(queryset=model._default_manager.all(), widget=widget)
+ form_field = lambda: forms.ModelChoiceField(queryset=model._default_manager.all(), widget=widget)
else:
form_field = forms.CharField(widget=widget)
|
Use delayed fields for auto-generated ModelChoiceField too.
|
diff --git a/runtests.py b/runtests.py
index <HASH>..<HASH> 100755
--- a/runtests.py
+++ b/runtests.py
@@ -14,13 +14,12 @@ settings.configure(
'testserver',
],
INSTALLED_APPS=[
- 'django_nose',
'permissions',
'permissions.tests',
],
MIDDLEWARE_CLASSES=[],
ROOT_URLCONF='permissions.tests.urls',
- TEST_RUNNER='django_nose.NoseTestSuiteRunner'
+ TEST_RUNNER='django.test.runner.DiscoverRunner',
)
if django.VERSION[:2] >= (1, 7):
diff --git a/setup.cfg b/setup.cfg
index <HASH>..<HASH> 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,3 +0,0 @@
-[nosetests]
-with-coverage = true
-cover-package = permissions
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -24,8 +24,6 @@ setup(
'dev': [
'coverage',
'django{version}'.format(version=django_version),
- 'django-nose',
- 'nose',
'six',
],
},
|
Use Django's DiscoverRunner to run tests
Use this instead of the django_nose runner and drop the django_nose and
nose dev dependencies.
|
diff --git a/lib/gcli/ui/arg_fetch.js b/lib/gcli/ui/arg_fetch.js
index <HASH>..<HASH> 100644
--- a/lib/gcli/ui/arg_fetch.js
+++ b/lib/gcli/ui/arg_fetch.js
@@ -134,7 +134,7 @@ ArgFetcher.prototype.linkMessageElement = function(assignment, element) {
// HACK: See #getInputFor()
var field = assignment.field;
if (field == null) {
- console.error('Missing field for ' + JSON.stringify(assignment));
+ console.error('Missing field for ' + assignment.param.name);
return 'Missing field';
}
field.setMessageElement(element);
|
Assignments are recursive, dont call JSON.stringify on them
|
diff --git a/lib/brightbox-cli/config.rb b/lib/brightbox-cli/config.rb
index <HASH>..<HASH> 100644
--- a/lib/brightbox-cli/config.rb
+++ b/lib/brightbox-cli/config.rb
@@ -102,7 +102,7 @@ module Brightbox
else
# Is client ambigious?
if default_client.nil? && clients.length > 1
- raise BBConfigError, "You must specify a default client using brightbox-config client_default"
+ raise BBConfigError, "You must specify a default client using brightbox config client_default"
end
@client_name = default_client || clients.first
end
diff --git a/spec/unit/brightbox/bb_config/client_name_spec.rb b/spec/unit/brightbox/bb_config/client_name_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/brightbox/bb_config/client_name_spec.rb
+++ b/spec/unit/brightbox/bb_config/client_name_spec.rb
@@ -70,7 +70,7 @@ describe Brightbox::BBConfig do
it "raises an error" do
expect {
@config.client_name
- }.to raise_error(Brightbox::BBConfigError, "You must specify a default client using brightbox-config client_default")
+ }.to raise_error(Brightbox::BBConfigError, "You must specify a default client using brightbox config client_default")
end
end
|
Updates command to run in output
"brightbox config" should be used in preference to "brightbox-config"
|
diff --git a/classes/PodsAPI.php b/classes/PodsAPI.php
index <HASH>..<HASH> 100644
--- a/classes/PodsAPI.php
+++ b/classes/PodsAPI.php
@@ -1752,7 +1752,7 @@ class PodsAPI {
return $object;
}
- $result = pods_query( "SELECT * FROM `@wp_pods_objects` WHERE $where `type` = '{$params->type}' LIMIT 1", $this );
+ $result = pods_query( "SELECT * FROM `@wp_pods_objects` WHERE $where AND `type` = '{$params->type}' LIMIT 1", $this );
if ( empty( $result ) )
return pods_error( ucwords( $params->type ) . ' Object not found', $this );
|
Fixed PodsAPI->load_object method by adding AND to WHERE clause
|
diff --git a/src/Graviton/CoreBundle/Tests/Controller/AppControllerTest.php b/src/Graviton/CoreBundle/Tests/Controller/AppControllerTest.php
index <HASH>..<HASH> 100644
--- a/src/Graviton/CoreBundle/Tests/Controller/AppControllerTest.php
+++ b/src/Graviton/CoreBundle/Tests/Controller/AppControllerTest.php
@@ -146,7 +146,7 @@ class AppControllerTest extends RestTestCase
$this->assertTrue($results->showInMenu);
$this->assertContains(
- '<http://localhost/core/app/new>; rel="self"',
+ '<http://localhost/core/app/'.$results->id.'>; rel="self"',
explode(',', $response->headers->get('Link'))
);
}
|
fix id handling in app test..
|
diff --git a/pkg/kubelet/cadvisor/cadvisor_linux.go b/pkg/kubelet/cadvisor/cadvisor_linux.go
index <HASH>..<HASH> 100644
--- a/pkg/kubelet/cadvisor/cadvisor_linux.go
+++ b/pkg/kubelet/cadvisor/cadvisor_linux.go
@@ -42,8 +42,8 @@ type cadvisorClient struct {
var _ Interface = new(cadvisorClient)
// TODO(vmarmol): Make configurable.
-// The number of stats to keep in memory.
-const statsToCache = 60
+// The amount of time for which to keep stats in memory.
+const statsCacheDuration = 2 * time.Minute
// Creates a cAdvisor and exports its API on the specified port if port > 0.
func New(port uint) (Interface, error) {
@@ -53,7 +53,7 @@ func New(port uint) (Interface, error) {
}
// Create and start the cAdvisor container manager.
- m, err := manager.New(memory.New(statsToCache, nil), sysFs)
+ m, err := manager.New(memory.New(statsCacheDuration, nil), sysFs)
if err != nil {
return nil, err
}
|
Raise cAdvisor stats cache to 2m.
This used to be <I>ns which was a bug from when we switched from number
of stats to duration. Seems like the type was silently
converted/ignored.
|
diff --git a/lib/generators/geocoder/config/templates/initializer.rb b/lib/generators/geocoder/config/templates/initializer.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/geocoder/config/templates/initializer.rb
+++ b/lib/generators/geocoder/config/templates/initializer.rb
@@ -9,8 +9,7 @@ Geocoder.configure(
# https_proxy: nil, # HTTPS proxy server (user:pass@host:port)
# api_key: nil, # API key for geocoding service
# cache: nil, # cache object (must respond to #[], #[]=, and #del)
- # cache_prefix: 'geocoder:', # prefix (string) to use for all cache keys
- # cache_expiration: 1.day, # expiration time (ttl)
+ # cache_prefix: 'geocoder:', # - DEPRECATED - prefix (string) to use for all cache keys
# Exceptions that should not be rescued by default
# (if you want to implement custom error handling);
@@ -20,4 +19,13 @@ Geocoder.configure(
# Calculation options
# units: :mi, # :km for kilometers or :mi for miles
# distances: :linear # :spherical or :linear
+
+ # Cache service type-specific configurations
+ # cache_options: {}
+
+ # Redis cache configurations (for cache_options):
+ # {
+ # expiration: 2.days # redis ttl for all cache
+ # prefix: 'geocoder:' # prefix to add to redis keys, if used cache_prefix will be ignored
+ # }
)
|
Update the docs in the initializer
|
diff --git a/lib/sheepsafe/controller.rb b/lib/sheepsafe/controller.rb
index <HASH>..<HASH> 100644
--- a/lib/sheepsafe/controller.rb
+++ b/lib/sheepsafe/controller.rb
@@ -87,6 +87,7 @@ module Sheepsafe
Process.kill("TERM", pid)
exit 0
end
+ sleep 2 # wait a bit before starting proxy
loop do
pid = fork do
exec("ssh -ND #{@config.socks_port} #{@config.ssh_host}")
|
lib/sheepsafe/controller.rb: Wait a bit before starting proxy
|
diff --git a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/TypeWriter.java b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/TypeWriter.java
index <HASH>..<HASH> 100644
--- a/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/TypeWriter.java
+++ b/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/TypeWriter.java
@@ -2954,7 +2954,7 @@ public interface TypeWriter<T> {
String superTypeInternalName,
String[] interfaceTypeInternalName) {
super.visit(classFileVersionNumber,
- instrumentedType.getActualModifiers((modifiers & Opcodes.ACC_SUPER) != 0),
+ instrumentedType.getActualModifiers((modifiers & Opcodes.ACC_SUPER) != 0 && !instrumentedType.isInterface()),
instrumentedType.getInternalName(),
instrumentedType.getGenericSignature(),
(instrumentedType.getSuperType() == null ?
|
Added interface check to super flag.
|
diff --git a/lib/Channel.js b/lib/Channel.js
index <HASH>..<HASH> 100644
--- a/lib/Channel.js
+++ b/lib/Channel.js
@@ -404,6 +404,7 @@ module.exports = Channel;
function ChannelStream(channel) {
+ // TODO: update readable and writable appropriately
var self = this;
this.readable = true;
this.writable = true;
@@ -449,6 +450,7 @@ ChannelStream.prototype.write = function(data, encoding, extended) {
ChannelStream.prototype.pause = function() {
this.paused = true;
+ this._channel._conn._sock.pause();
};
ChannelStream.prototype.resume = function() {
@@ -469,6 +471,8 @@ ChannelStream.prototype.resume = function() {
if (ret === true)
this.emit('drain');
+
+ this._channel._conn._sock.resume();
};
ChannelStream.prototype.end = function(data, encoding, extended) {
|
channel: pause/resume underlying socket when necessary
|
diff --git a/spec/factories/hyrax_collection.rb b/spec/factories/hyrax_collection.rb
index <HASH>..<HASH> 100644
--- a/spec/factories/hyrax_collection.rb
+++ b/spec/factories/hyrax_collection.rb
@@ -8,11 +8,31 @@ FactoryBot.define do
collection_type_gid { Hyrax::CollectionType.find_or_create_default_collection_type.to_global_id }
transient do
+ edit_groups { [] }
+ edit_users { [] }
+ read_groups { [] }
+ read_users { [] }
members { nil }
end
after(:build) do |collection, evaluator|
collection.member_ids = evaluator.members.map(&:id) if evaluator.members
+ collection.permission_manager.edit_groups = evaluator.edit_groups
+ collection.permission_manager.edit_users = evaluator.edit_users
+ collection.permission_manager.read_groups = evaluator.read_groups
+ collection.permission_manager.read_users = evaluator.read_users
+ end
+
+ after(:create) do |collection, evaluator|
+ collection.permission_manager.edit_groups = evaluator.edit_groups
+ collection.permission_manager.edit_users = evaluator.edit_users
+ collection.permission_manager.read_groups = evaluator.read_groups
+ collection.permission_manager.read_users = evaluator.read_users
+ collection.permission_manager.acl.save
+ end
+
+ trait :public do
+ read_groups { ['public'] }
end
trait :with_member_works do
|
extend :hyrax_collection factory to handle ACLs
|
diff --git a/templates/js/ui.combobox.js b/templates/js/ui.combobox.js
index <HASH>..<HASH> 100644
--- a/templates/js/ui.combobox.js
+++ b/templates/js/ui.combobox.js
@@ -30,6 +30,7 @@
},
select: function( event, ui ) {
ui.item.option.selected = true;
+ select.change();
self._trigger( "selected", event, {
item: ui.item.option
});
|
add "change" event triggering into combobox
|
diff --git a/lxd-user/proxy.go b/lxd-user/proxy.go
index <HASH>..<HASH> 100644
--- a/lxd-user/proxy.go
+++ b/lxd-user/proxy.go
@@ -32,7 +32,12 @@ func tlsConfig(uid uint32) (*tls.Config, error) {
tlsClientKey := string(content)
// Load the server certificate.
- content, err = ioutil.ReadFile(shared.VarPath("server.crt"))
+ certPath := shared.VarPath("cluster.crt")
+ if !shared.PathExists(certPath) {
+ certPath = shared.VarPath("server.crt")
+ }
+
+ content, err = ioutil.ReadFile(certPath)
if err != nil {
return nil, fmt.Errorf("Unable to open server certificate: %w", err)
}
|
lxd-user: Fix use with clusters
|
diff --git a/nece/managers.py b/nece/managers.py
index <HASH>..<HASH> 100644
--- a/nece/managers.py
+++ b/nece/managers.py
@@ -1,11 +1,9 @@
from django.db import models
-from distutils.version import StrictVersion
-from django import get_version
from django.conf import settings
-if StrictVersion(get_version()) >= StrictVersion('1.9.0'):
+try:
from django.db.models.query import ModelIterable
-else:
+except ImportError:
ModelIterable = object # just mocking it
diff --git a/nece/models.py b/nece/models.py
index <HASH>..<HASH> 100644
--- a/nece/models.py
+++ b/nece/models.py
@@ -1,15 +1,13 @@
from __future__ import unicode_literals
-from distutils.version import StrictVersion
-from django import get_version
from django.db import models
from django.db.models import options
from nece.managers import TranslationManager, TranslationMixin
from nece.exceptions import NonTranslatableFieldError
-if StrictVersion(get_version()) >= StrictVersion('1.9.0'):
+try:
from django.contrib.postgres.fields import JSONField
-else:
+except ImportError:
from nece.fields.pgjson import JSONField
options.DEFAULT_NAMES += ('translatable_fields',)
|
Detect features instead of checking Django version
Working on the `master` branch of Django, `get_version` returns
something like '<I>.de<I>', which doesn't play well
with `StrictVersion`.
Instead of relying on this mechanism, we use a `try/except` block
to import what we need and fallback, if necessary, on what's actually
available.
|
diff --git a/test/define.js b/test/define.js
index <HASH>..<HASH> 100644
--- a/test/define.js
+++ b/test/define.js
@@ -389,7 +389,7 @@ describe("define", function () {
});
-if (gpf.host() === gpf.hosts.nodejs) {
+if (config.features.es6class) {
include("define.es6");
|
Use features (#<I>)
|
diff --git a/lib/httparty/request.rb b/lib/httparty/request.rb
index <HASH>..<HASH> 100644
--- a/lib/httparty/request.rb
+++ b/lib/httparty/request.rb
@@ -20,9 +20,9 @@ module HTTParty
end
def uri
- uri = path.relative? ? URI.parse("#{options[:base_uri]}#{path}") : path
- uri.query = query_string(uri)
- uri
+ new_uri = path.relative? ? URI.parse("#{options[:base_uri]}#{path}") : path
+ new_uri.query = query_string(new_uri)
+ new_uri
end
def format
@@ -61,7 +61,7 @@ module HTTParty
end
def perform_actual_request
- http(uri).request(@raw_request)
+ http.request(@raw_request)
end
def get_response #:nodoc:
|
removed uri from http call as it is no longer needed. Changed uri variable to new_uri to better differentiate it from uri method.
|
diff --git a/spring-security-oauth2/src/test/java/org/springframework/security/oauth2/client/token/TestOAuth2AccessTokenSupport.java b/spring-security-oauth2/src/test/java/org/springframework/security/oauth2/client/token/TestOAuth2AccessTokenSupport.java
index <HASH>..<HASH> 100644
--- a/spring-security-oauth2/src/test/java/org/springframework/security/oauth2/client/token/TestOAuth2AccessTokenSupport.java
+++ b/spring-security-oauth2/src/test/java/org/springframework/security/oauth2/client/token/TestOAuth2AccessTokenSupport.java
@@ -80,6 +80,7 @@ public class TestOAuth2AccessTokenSupport {
@Test(expected = OAuth2AccessDeniedException.class)
public void testRetrieveTokenFailsWhenTokenEndpointNotAvailable() {
error = new IOException("Planned");
+ response.setStatus(HttpStatus.BAD_REQUEST);
support.retrieveToken(form, requestHeaders, resource);
}
@@ -120,6 +121,10 @@ public class TestOAuth2AccessTokenSupport {
public void setHeaders(HttpHeaders headers) {
this.headers = headers;
}
+
+ public void setStatus(HttpStatus status) {
+ this.status = status;
+ }
public int getRawStatusCode() throws IOException {
return status.value();
|
Fix bug in unit test tickled by Spring <I>
|
diff --git a/scripts/release/releaseNotesTemplate.js b/scripts/release/releaseNotesTemplate.js
index <HASH>..<HASH> 100644
--- a/scripts/release/releaseNotesTemplate.js
+++ b/scripts/release/releaseNotesTemplate.js
@@ -54,10 +54,36 @@ ${feat.map(Package).join('\n')}
`
}
+function writeDocs(docs) {
+ if (!docs.length) {
+ return ''
+ }
+
+ return `
+## documentation
+${docs.map(Package).join('\n')}
+---
+`
+}
+
+function writeChore(chore) {
+ if (!chore.length) {
+ return ''
+ }
+
+ return `
+## ${chore.length} ${chore.length === 1 ? 'chore' : 'chores'}
+${chore.map(Package).join('\n')}
+---
+`
+}
+
export default release => {
- return `${writeBreaks(release.breaks)}
-${writeFixes(release.fix)}
-${writeFeat(release.feat)}
+ return `${writeBreaks(release.summary.breaks)}
+${writeFixes(release.summary.fix)}
+${writeFeat(release.summary.feat)}
+${writeDocs(release.summary.docs)}
+${writeChore(release.summary.chore)}
With :heart: from the Cerebral Team!
`
|
chore(release): update release template to show docs and chore
|
diff --git a/src/hieroglyph/__init__.py b/src/hieroglyph/__init__.py
index <HASH>..<HASH> 100644
--- a/src/hieroglyph/__init__.py
+++ b/src/hieroglyph/__init__.py
@@ -75,6 +75,12 @@ def setup(app):
app.connect('builder-inited', html.inspect_config)
app.connect('html-page-context', html.add_link)
+ return {
+ 'version': __version__,
+ 'parallel_read_safe': True,
+ 'parallel_write_safe': True,
+ }
+
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
|
Enable parallel reading of source files with Sphinx (#<I>)
|
diff --git a/bosh-stemcell/spec/support/os_image_shared_examples.rb b/bosh-stemcell/spec/support/os_image_shared_examples.rb
index <HASH>..<HASH> 100644
--- a/bosh-stemcell/spec/support/os_image_shared_examples.rb
+++ b/bosh-stemcell/spec/support/os_image_shared_examples.rb
@@ -123,8 +123,13 @@ shared_examples_for 'every OS image' do
end
context 'telnet-server is not installed (stig: V-38587, V-38589)' do
- describe package('telnet-server') do
- it { should_not be_installed }
+ it "shouldn't be installed" do
+ expect(package('telnet-server')).to_not be_installed
+ expect(package('telnetd')).to_not be_installed
+ expect(package('telnetd-ssl')).to_not be_installed
+ expect(package('telnet-server-krb5')).to_not be_installed
+ expect(package('inetutils-telnetd')).to_not be_installed
+ expect(package('mactelnet-server')).to_not be_installed
end
end
|
Check more telnet server packages aren't installed
[finishes #<I>](<URL>)
|
diff --git a/tools/azure-sdk-tools/packaging_tools/code_report.py b/tools/azure-sdk-tools/packaging_tools/code_report.py
index <HASH>..<HASH> 100644
--- a/tools/azure-sdk-tools/packaging_tools/code_report.py
+++ b/tools/azure-sdk-tools/packaging_tools/code_report.py
@@ -15,7 +15,7 @@ from typing import Dict, Any, Optional
try:
# If I'm started as a module __main__
from .venvtools import create_venv_with_package
-except ModuleNotFoundError:
+except (ModuleNotFoundError, ImportError) as e:
# If I'm started by my main directly
from venvtools import create_venv_with_package
|
Update code_report to support python <I> (#<I>)
|
diff --git a/lib/action_tracker.rb b/lib/action_tracker.rb
index <HASH>..<HASH> 100644
--- a/lib/action_tracker.rb
+++ b/lib/action_tracker.rb
@@ -9,6 +9,7 @@ require 'action_tracker/configuration'
module ActionTracker
if defined?(Rails)
require 'action_tracker/engine'
- ActiveSupport.on_load(:action_controller) { ::ActionController::Base.include ActionTracker::Concerns::Tracker }
- end
+ ActiveSupport.on_load(:action_controller) do
+ ::ActionController::Base.include ActionTracker::Concerns::Tracker
+ end
end
|
fix [houndci-bot] Line is too long
|
diff --git a/lib/link/utils.js b/lib/link/utils.js
index <HASH>..<HASH> 100644
--- a/lib/link/utils.js
+++ b/lib/link/utils.js
@@ -6,18 +6,18 @@ exports.types = {
};
// Virtual link types.
-exports.vl_types = [
- 'bridge', // Ethernet Bridge device.
- 'can', // Controller Area Network interface.
- 'dummy', // Dummy network interface.
- 'ifb', // Intermediate Functional Block device.
- 'ipoib', // IP over Infiniband device.
- 'macvlan', // Virtual interface base on link layer address (MAC).
- 'vcan', // Virtual Local CAN interface.
- 'veth', // Virtual ethernet interface.
- 'vlan', // 802.1q tagged virtual LAN interface.
- 'vxlan' // Virtual eXtended LAN.
-];
+exports.vl_types = {
+ bridge : 'bridge', // Ethernet Bridge device.
+ can : 'can', // Controller Area Network interface.
+ dummy : 'dummy', // Dummy network interface.
+ ifb : 'ifb', // Intermediate Functional Block device.
+ ipoib : 'ipoib', // IP over Infiniband device.
+ macvlan: 'macvlan', // Virtual interface base on link layer address (MAC).
+ vcan : 'vcan', // Virtual Local CAN interface.
+ veth : 'veth', // Virtual ethernet interface.
+ vlan : 'vlan', // 802.1q tagged virtual LAN interface.
+ vxlan : 'vxlan' // Virtual eXtended LAN.
+};
// Interface flags.
exports.flags = [
|
ip-link: Changed vl_types to an object format to make it really usable.
|
diff --git a/lib/addressable/uri.rb b/lib/addressable/uri.rb
index <HASH>..<HASH> 100644
--- a/lib/addressable/uri.rb
+++ b/lib/addressable/uri.rb
@@ -867,12 +867,18 @@ module Addressable
validate()
end
- # Returns the password for this URI.
+ ##
+ # The password component for this URI.
+ #
+ # @return [String] The password component.
def password
return @password
end
- # Returns the URI's password component, normalized.
+ ##
+ # The password component for this URI, normalized.
+ #
+ # @return [String] The password component, normalized.
def normalized_password
@normalized_password ||= (begin
if self.password
@@ -888,7 +894,10 @@ module Addressable
end)
end
- # Sets the password for this URI.
+ ##
+ # Sets the password component for this URI.
+ #
+ # @param [String, #to_str] new_password The new password component.
def password=(new_password)
@password = new_password ? new_password.to_str : nil
|
Updated the documentation for the password methods.
|
diff --git a/test/integration/generated_regress_test.rb b/test/integration/generated_regress_test.rb
index <HASH>..<HASH> 100644
--- a/test/integration/generated_regress_test.rb
+++ b/test/integration/generated_regress_test.rb
@@ -1216,12 +1216,23 @@ describe Regress do
end
describe "Regress::TestStructB" do
+ let(:instance) { Regress::TestStructB.new }
it "has a writable field some_int8" do
- skip
+ instance.some_int8.must_equal 0
+ instance.some_int8 = 42
+ instance.some_int8.must_equal 42
end
+
it "has a writable field nested_a" do
- skip
+ instance.nested_a.some_int.must_equal 0
+
+ nested = Regress::TestStructA.new
+ nested.some_int = -4321
+
+ instance.nested_a = nested
+ instance.nested_a.some_int.must_equal(-4321)
end
+
it "has a working method #clone" do
a = Regress::TestStructB.new
a.some_int8 = 42
|
Add tests for Regress::TestStructB's fields
|
diff --git a/pkg/endpoint/bpf.go b/pkg/endpoint/bpf.go
index <HASH>..<HASH> 100644
--- a/pkg/endpoint/bpf.go
+++ b/pkg/endpoint/bpf.go
@@ -75,7 +75,7 @@ func (e *Endpoint) writeHeaderfile(prefix string, owner Owner) error {
}
}
if err != nil {
- e.LogStatus(BPF, Warning, fmt.Sprintf("Unable to create a base64: %s", err))
+ e.logStatusLocked(BPF, Warning, fmt.Sprintf("Unable to create a base64: %s", err))
}
if e.DockerID == "" {
|
pkg/endpoint: use logStatusLocked in writeHeaderfile
writeHeaderfile is called with the endpoint Mutex is held. LogStatus tries to
acquire the endpoint Mutex, and is called within writeHeaderfile. This is a
deadlock scenario. Fix by calling logStatusLocked instead, which assumes the
endpoint Mutex is held.
Fixes: #<I>
|
diff --git a/housekeeper/store/api.py b/housekeeper/store/api.py
index <HASH>..<HASH> 100644
--- a/housekeeper/store/api.py
+++ b/housekeeper/store/api.py
@@ -85,10 +85,11 @@ def cases(query_str=None, missing=None, version=None, onhold=None):
query = Case.query.filter(Case.is_manual == None).order_by(Case.created_at)
if missing == 'analyzed':
+ not_analyzed = ((Sample.sequenced_at > datetime.date(2017, 1, 1)) &
+ (AnalysisRun.analyzed_at == None))
query = (query.outerjoin(Case.runs)
.join(Case.samples)
- .filter(AnalysisRun.analyzed_at == None,
- Sample.sequenced_at > datetime.date(2017, 1, 1)))
+ .filter(not_analyzed | Case.rerun_requested))
elif missing == 'delivered':
query = (query.join(Case.runs)
.filter(AnalysisRun.analyzed_at != None,
|
include cases marked to be rerun in list of cases to analyze
|
diff --git a/salt/grains/metadata.py b/salt/grains/metadata.py
index <HASH>..<HASH> 100644
--- a/salt/grains/metadata.py
+++ b/salt/grains/metadata.py
@@ -30,7 +30,7 @@ HOST = 'http://{0}/'.format(IP)
def __virtual__():
- if __salt__['config.get']('metadata_server_grains', False) is False:
+ if __opts__.get('metadata_server_grains', False) is False:
return False
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(.1)
|
use opts for metadata grains
I checked for them, but apparently we manually load the cmdmod stuff for
the core grains, so __salt__ is not loaded in metadata grain. This just
means that this setting will have to be put in the minion config to
enable it.
|
diff --git a/lib/discordrb/data.rb b/lib/discordrb/data.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/data.rb
+++ b/lib/discordrb/data.rb
@@ -1250,20 +1250,20 @@ module Discordrb
end
# Bans a user from this server.
- # @param user [User] The user to ban.
+ # @param user [User, #resolve_id] The user to ban.
# @param message_days [Integer] How many days worth of messages sent by the user should be deleted.
def ban(user, message_days = 0)
API.ban_user(@bot.token, @id, user.resolve_id, message_days)
end
# Unbans a previously banned user from this server.
- # @param user [User] The user to unban.
+ # @param user [User, #resolve_id] The user to unban.
def unban(user)
API.unban_user(@bot.token, @id, user.resolve_id)
end
# Kicks a user from this server.
- # @param user [User] The user to kick.
+ # @param user [User, #resolve_id] The user to kick.
def kick(user)
API.kick_user(@bot.token, @id, user.resolve_id)
end
|
Make it clear in doc comments that other resolvables can be used now
|
diff --git a/manager/manager/manager_test.go b/manager/manager/manager_test.go
index <HASH>..<HASH> 100644
--- a/manager/manager/manager_test.go
+++ b/manager/manager/manager_test.go
@@ -400,8 +400,12 @@ func TestExpand(t *testing.T) {
t.Error("Failed to expand template into manifest.")
}
- if m.InputConfig != nil {
- t.Errorf("Input config not nil: %v", *m)
+ if m.Name != "" {
+ t.Errorf("Name was not empty: %v", *m)
+ }
+
+ if m.Deployment != "" {
+ t.Errorf("Deployment was not empty: %v", *m)
}
if m.InputConfig != nil {
|
Adding the rest of validations for manager expand test.
|
diff --git a/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java b/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java
+++ b/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java
@@ -54,7 +54,7 @@ public abstract class DockerClientProviderStrategy {
LOGGER.info("Looking for Docker environment. Trying {}", strategy.getDescription());
strategy.test();
return strategy;
- } catch (Exception | ExceptionInInitializerError e) {
+ } catch (Exception | ExceptionInInitializerError | NoClassDefFoundError e) {
@Nullable String throwableMessage = e.getMessage();
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
Throwable rootCause = Throwables.getRootCause(e);
|
Fix uncaught NoClassDefFoundError when environment variables are set on OS X
|
diff --git a/releng/org.eclipse.orion.client.releng/builder/scripts/orion.build.js b/releng/org.eclipse.orion.client.releng/builder/scripts/orion.build.js
index <HASH>..<HASH> 100644
--- a/releng/org.eclipse.orion.client.releng/builder/scripts/orion.build.js
+++ b/releng/org.eclipse.orion.client.releng/builder/scripts/orion.build.js
@@ -125,7 +125,6 @@
{ name: "plugins/webEditingPlugin" },
{ name: "profile/user-list" },
{ name: "profile/userservicePlugin" },
- { name: "search/search" },
{ name: "settings/settings" },
{ name: "shell/plugins/shellPagePlugin" },
{ name: "shell/shellPage" },
|
Bug <I> build failure: module path does not exist: search/search.js
|
diff --git a/lib/support/chromePerflogParser.js b/lib/support/chromePerflogParser.js
index <HASH>..<HASH> 100644
--- a/lib/support/chromePerflogParser.js
+++ b/lib/support/chromePerflogParser.js
@@ -213,7 +213,7 @@ module.exports = {
queryString: parseQueryData(urlParser.parse(url, true).query),
postData: parsePostData(getHeaderValue(request.headers, 'Content-Type'), request.postData),
headersSize: -1,
- bodySize: -1,
+ bodySize: -1, // FIXME calculate based on postData
_initialPriority: request.initialPriority,
cookies: parseRequestCookies(cookieHeader),
headers: parseHeaders(request.headers)
@@ -348,6 +348,7 @@ module.exports = {
timings.send + timings.wait + timings.receive;
entry._loadingFinishedTime = params.timestamp;
+ // FIXME, encodedDataLength includes headers according to https://github.com/cyrus-and/chrome-har-capturer/issues/25
entry.response.bodySize = params.encodedDataLength > 0 ? params.encodedDataLength : entry.response.bodySize;
//if (entry.response.headersSize > -1) {
// entry.response.bodySize -= entry.response.headersSize;
|
Add FIXMEs for incorrect size calculations.
|
diff --git a/jumeaux/executor.py b/jumeaux/executor.py
index <HASH>..<HASH> 100644
--- a/jumeaux/executor.py
+++ b/jumeaux/executor.py
@@ -163,7 +163,7 @@ def judgement(r_one: Response, r_other: Response,
regard_as_same: bool = global_addon_executor.apply_judgement(
JudgementAddOnPayload.from_dict({
"remaining_diff_keys": diff_keys,
- "regard_as_same": r_one.body == r_other.body,
+ "regard_as_same": r_one.body == r_other.body if diff_keys is None else diff_keys.is_empty(),
}),
JudgementAddOnReference.from_dict({
"name": name,
diff --git a/jumeaux/models.py b/jumeaux/models.py
index <HASH>..<HASH> 100644
--- a/jumeaux/models.py
+++ b/jumeaux/models.py
@@ -274,6 +274,9 @@ class DiffKeys(OwlMixin):
changed: TList[str]
removed: TList[str]
+ def is_empty(self) -> bool:
+ return len(self.added) == len(self.changed) == len(self.removed) == 0
+
class ResponseSummary(OwlMixin):
url: str
|
:skull: Fix bug that regard as different even if properties are same #<I>
|
diff --git a/zhmcclient/_session.py b/zhmcclient/_session.py
index <HASH>..<HASH> 100644
--- a/zhmcclient/_session.py
+++ b/zhmcclient/_session.py
@@ -378,7 +378,6 @@ class Session(object):
if logon_required:
self.logon()
url = self.base_url + uri
- data = json.dumps(body)
stats = self.time_stats_keeper.get_stats('post ' + uri)
stats.begin()
req = self._session or requests
@@ -387,6 +386,7 @@ class Session(object):
result = req.post(url, headers=self.headers,
verify=False)
else:
+ data = json.dumps(body)
result = req.post(url, data=data, headers=self.headers,
verify=False)
self._log_hmc_request_id(result)
|
Moved the setting of data into the branch where it is used.
|
diff --git a/lib/aerospike/cluster/cluster.rb b/lib/aerospike/cluster/cluster.rb
index <HASH>..<HASH> 100644
--- a/lib/aerospike/cluster/cluster.rb
+++ b/lib/aerospike/cluster/cluster.rb
@@ -35,7 +35,7 @@ module Aerospike
@cluster_nodes = []
@partition_write_map = {}
@node_index = Atomic.new(0)
- @closed = Atomic.new(false)
+ @closed = Atomic.new(true)
@mutex = Mutex.new
# setup auth info for cluster
@@ -271,6 +271,8 @@ module Aerospike
thr.kill if thr.alive?
end
+ @closed.value = false if @cluster_nodes.length > 0
+
end
def set_partitions(part_map)
|
Fix cluster connection logic to correctly set the @closed value
|
diff --git a/tests/test_attacks.py b/tests/test_attacks.py
index <HASH>..<HASH> 100644
--- a/tests/test_attacks.py
+++ b/tests/test_attacks.py
@@ -33,7 +33,8 @@ attacks: List[Tuple[fbn.Attack, bool, bool]] = [
(fa.L2FastGradientAttack(L2(100.0)), True, False),
(fa.LinfFastGradientAttack(Linf(100.0)), True, False),
(fa.GaussianBlurAttack(steps=10), True, True),
- (fa.L2DeepFoolAttack(steps=50), True, False),
+ (fa.L2DeepFoolAttack(steps=50, loss="logits"), True, False),
+ (fa.L2DeepFoolAttack(steps=50, loss="crossentropy"), True, False),
(fa.LinfDeepFoolAttack(steps=50), True, False),
]
|
added test for DeepFool with crossentropy
|
diff --git a/src/CoandaCMS/Coanda/Coanda.php b/src/CoandaCMS/Coanda/Coanda.php
index <HASH>..<HASH> 100644
--- a/src/CoandaCMS/Coanda/Coanda.php
+++ b/src/CoandaCMS/Coanda/Coanda.php
@@ -149,7 +149,7 @@ class Coanda {
{
return Coanda::route($slug);
- })->where('slug', '[\/_\-\_A-Za-z]+');
+ })->where('slug', '[\/_\-\_A-Za-z0-9]+');
}
/**
|
Bugfix - allowed numbers in the URL's
|
diff --git a/src/walk.js b/src/walk.js
index <HASH>..<HASH> 100644
--- a/src/walk.js
+++ b/src/walk.js
@@ -312,11 +312,10 @@ function begin (delay) {
if (quoting) {
quoting = false;
- return next().then(function (character) {
- escape(character).then(function (escaped) {
- string += escaped;
- next().then(step);
- });
+ return escape(character).then(function (escaped) {
+ console.log('walkString::escaped: ' + escaped);
+ string += escaped;
+ next().then(step);
});
}
@@ -326,10 +325,8 @@ function begin (delay) {
}
if (character !== '"') {
- return next().then(function (character) {
- string += character;
- next().then(step);
- });
+ string += character;
+ return next().then(step);
}
insideString = false;
|
Eliminate bad calls to next.
|
diff --git a/src/org/parosproxy/paros/core/scanner/VariantUserDefined.java b/src/org/parosproxy/paros/core/scanner/VariantUserDefined.java
index <HASH>..<HASH> 100644
--- a/src/org/parosproxy/paros/core/scanner/VariantUserDefined.java
+++ b/src/org/parosproxy/paros/core/scanner/VariantUserDefined.java
@@ -71,7 +71,7 @@ public class VariantUserDefined implements Variant {
if (isInHeader(this.injectionPoints[i]) || isInBody(this.injectionPoints[i]) ) {
list.add(new NameValuePair(NameValuePair.TYPE_UNDEFINED, "", "", i));
} else {
- logger.equals("Invalid injection point: " + this.injectionPoints[i]);
+ logger.warn("Invalid injection point: " + this.injectionPoints[i]);
}
}
}
|
Address FindBugs Item:
* logger.equals was used in assignment instead of comparison
|
diff --git a/nece/managers.py b/nece/managers.py
index <HASH>..<HASH> 100644
--- a/nece/managers.py
+++ b/nece/managers.py
@@ -77,5 +77,7 @@ class TranslationManager(models.Manager, TranslationMixin):
def language(self, language_code):
language_code = self.get_language_key(language_code)
+ if self.is_default_language(language_code):
+ return self.language_or_default(language_code)
return self.language_or_default(language_code).filter(
translations__has_key=(language_code))
|
get records by their default language_code as settled over language method
|
diff --git a/rails_event_store/spec/browser_integration_spec.rb b/rails_event_store/spec/browser_integration_spec.rb
index <HASH>..<HASH> 100644
--- a/rails_event_store/spec/browser_integration_spec.rb
+++ b/rails_event_store/spec/browser_integration_spec.rb
@@ -16,11 +16,11 @@ module RailsEventStore
specify 'api' do
event_store.publish(events = 21.times.map { DummyEvent.new })
request = ::Rack::MockRequest.new(app)
- response = request.get('/res/streams/all')
+ response = request.get('/res/streams/all/relationships/events')
expect(JSON.parse(response.body)["links"]).to eq({
- "last" => "http://example.org/res/streams/all/head/forward/20",
- "next" => "http://example.org/res/streams/all/#{events[1].event_id}/backward/20"
+ "last" => "http://example.org/res/streams/all/relationships/events/head/forward/20",
+ "next" => "http://example.org/res/streams/all/relationships/events/#{events[1].event_id}/backward/20"
})
end
|
Fix tests from RailsEventStore::Browser
The URL structure has slightly changed in the meantime
|
diff --git a/lib/capybara/driver/webkit.rb b/lib/capybara/driver/webkit.rb
index <HASH>..<HASH> 100644
--- a/lib/capybara/driver/webkit.rb
+++ b/lib/capybara/driver/webkit.rb
@@ -126,6 +126,10 @@ class Capybara::Driver::Webkit
@cookie_jar ||= CookieJar.new(browser)
end
+ def invalid_element_errors
+ []
+ end
+
private
def url(path)
|
Added empty invalid_element_errors method. Driver does not inherit from Base driver and was intermittently causing the following error:
undefined method `invalid_element_errors' for #<Capybara::Driver::Webkit:0x...> (NoMethodError)
(eval):2:in `has_content?'
|
diff --git a/streak_client/streak_client.py b/streak_client/streak_client.py
index <HASH>..<HASH> 100644
--- a/streak_client/streak_client.py
+++ b/streak_client/streak_client.py
@@ -2,7 +2,7 @@ import json, requests
from streak_objects import *
import requests
-DEBUG = 1
+DEBUG = 0
class StreakClientBaseObject(object):
'''Specified basics for the Streak API Client
@@ -96,7 +96,7 @@ class StreakClient(StreakClientBaseObject):
Args:
my_api_key api key for this instance
'''
- super(StreakClient, self).__init__(my_api_key)
+ super(self.__class__, self).__init__(my_api_key)
self.sort_by_postfix = '?sortBy='
self.boxes_suffix = 'boxes'
@@ -852,6 +852,7 @@ class StreakClient(StreakClientBaseObject):
])
return self._req('get', uri)
############
+#Temporary test routines.
############
def user_api_test(s_client):
code, user_data = s_client.get_user()
@@ -1201,6 +1202,7 @@ def box_reminder_api_test(s_client):
print("------------------")
raw_input()
############
+#Main as temporary test runner
############
def main():
"""Code to run simple demo commands"""
|
Minor changes.
Comments need to be cleaned up along with uri generation parts.
|
diff --git a/tofu/geom/_core.py b/tofu/geom/_core.py
index <HASH>..<HASH> 100644
--- a/tofu/geom/_core.py
+++ b/tofu/geom/_core.py
@@ -2802,11 +2802,11 @@ class Rays(utils.ToFuObject):
if dgeom['case'] in ['A','B']:
u = dgeom['u'][:,0:1]
sca2 = np.sum(dgeom['u'][:,1:]*u,axis=0)**2
- if np.all(sca2<1.-1.e-9):
+ if np.all(sca2 < 1.-1.e-9):
DDb = dgeom['D'][:,1:]-dgeom['D'][:,0:1]
- k = np.sum(DDb*(u + np.sqrt(sca)*dgeom['u'][:,1:]),axis=0)
- k = k / (1.-sca**2)
- if np.all(k[1:]-k[0]<1.e-9):
+ k = np.sum(DDb*(u + np.sqrt(sca2)*dgeom['u'][:,1:]),axis=0)
+ k = k / (1.-sca2)
+ if k[0] > 0 and np.all(k[1:]-k[0]<1.e-9):
pinhole = dgeom['D'][:,0] + k[0]*u
dgeom['pinhole'] = pinhole
|
[debugging] debugging raytracing
|
diff --git a/reactor-net/src/main/java/reactor/rx/net/NetStreams.java b/reactor-net/src/main/java/reactor/rx/net/NetStreams.java
index <HASH>..<HASH> 100644
--- a/reactor-net/src/main/java/reactor/rx/net/NetStreams.java
+++ b/reactor-net/src/main/java/reactor/rx/net/NetStreams.java
@@ -74,7 +74,7 @@ public enum NetStreams {
;
static {
- if (!DependencyUtils.hasReactorFluxion()) {
+ if (!DependencyUtils.hasReactorStream()) {
throw new IllegalStateException("io.projectreactor:reactor-stream dependency is missing from the classpath.");
}
|
revert module Reactor Fluxion to Reactor Stream
|
diff --git a/dvc/project.py b/dvc/project.py
index <HASH>..<HASH> 100644
--- a/dvc/project.py
+++ b/dvc/project.py
@@ -229,7 +229,8 @@ class Project(object):
self._check_dag(self.stages() + stages)
for stage in stages:
- stage.dump()
+ if stage is not None:
+ stage.dump()
self._remind_to_git_add()
diff --git a/tests/test_add.py b/tests/test_add.py
index <HASH>..<HASH> 100644
--- a/tests/test_add.py
+++ b/tests/test_add.py
@@ -188,3 +188,19 @@ class TestCmdAdd(TestDvc):
ret = main(["add", "non-existing-file"])
self.assertNotEqual(ret, 0)
+
+
+class TestDoubleAddUnchanged(TestDvc):
+ def test_file(self):
+ ret = main(["add", self.FOO])
+ self.assertEqual(ret, 0)
+
+ ret = main(["add", self.FOO])
+ self.assertEqual(ret, 0)
+
+ def test_dir(self):
+ ret = main(["add", self.DATA_DIR])
+ self.assertEqual(ret, 0)
+
+ ret = main(["add", self.DATA_DIR])
+ self.assertEqual(ret, 0)
|
add: don't try to save cached stages
Cached stages are already saved, so there is no need to try to save them
once again.
Fixes #<I>
|
diff --git a/test/func/add.spec.js b/test/func/add.spec.js
index <HASH>..<HASH> 100644
--- a/test/func/add.spec.js
+++ b/test/func/add.spec.js
@@ -56,7 +56,7 @@ describe('Functional: add()', function () {
const seven = add(archive, source)
seven.on('end', function () {
const size = statSync(archive).size
- expect(size).to.greaterThan(398)
+ expect(size).to.greaterThan(350)
expect(existsSync(archive)).to.equal(true)
done()
})
|
test: Lower min size threshold cause 7-Zip is better on Windows
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ setup(
author_email='sebastien.eustace@gmail.com',
url='https://github.com/SDisPater/cleo',
download_url='https://github.com/SDisPater/cleo/archive/v%s.tar.gz' % __version__,
- packages=find_packages(),
+ packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=['nose', 'pylev', 'mock'],
tests_require=['nose', 'mock'],
test_suite='nose.collector',
|
Fix #<I>: Added list of exclude values for tests in the `find_packages` function.
|
diff --git a/lxd/network/driver_bridge.go b/lxd/network/driver_bridge.go
index <HASH>..<HASH> 100644
--- a/lxd/network/driver_bridge.go
+++ b/lxd/network/driver_bridge.go
@@ -512,7 +512,7 @@ func (n *bridge) Delete(clientType request.ClientType) error {
}
// Delete apparmor profiles.
- err = apparmor.NetworkDelete(n.state, n)
+ err = apparmor.NetworkDelete(n.state.OS, n)
if err != nil {
return err
}
@@ -1479,7 +1479,7 @@ func (n *bridge) setup(oldConfig map[string]string) error {
}
// Generate and load apparmor profiles.
- err = apparmor.NetworkLoad(n.state, n)
+ err = apparmor.NetworkLoad(n.state.OS, n)
if err != nil {
return err
}
@@ -1760,7 +1760,7 @@ func (n *bridge) Stop() error {
}
// Unload apparmor profiles.
- err = apparmor.NetworkUnload(n.state, n)
+ err = apparmor.NetworkUnload(n.state.OS, n)
if err != nil {
return err
}
|
lxd/network: Remove state.State dependency from apparmor package
|
diff --git a/helper/i18n.js b/helper/i18n.js
index <HASH>..<HASH> 100755
--- a/helper/i18n.js
+++ b/helper/i18n.js
@@ -141,7 +141,7 @@ I18n.setStatic(async function getTranslation(domain, key, parameters) {
}
if (!source) {
- return '';
+ source = key;
}
let result;
@@ -677,7 +677,11 @@ XI18n.setMethod(function introduced() {
}
promise.then(function gotTranslation(result) {
- that.innerHTML = result;
+
+ if (result) {
+ that.innerHTML = result;
+ }
+
that.fallback = false;
});
}
|
Use key if fallback method still can't find translation
|
diff --git a/lib/Doctrine/Common/Collections/ArrayCollection.php b/lib/Doctrine/Common/Collections/ArrayCollection.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/Common/Collections/ArrayCollection.php
+++ b/lib/Doctrine/Common/Collections/ArrayCollection.php
@@ -312,6 +312,10 @@ class ArrayCollection implements Collection, Selectable
* {@inheritDoc}
*
* @return static
+ *
+ * @psalm-template U
+ * @psalm-param Closure(T=):U $func
+ * @psalm-return static<TKey, U>
*/
public function map(Closure $func)
{
|
fix #<I> by including psalm-* annotations to ArrayCollection#map() method
|
diff --git a/tests/test_blobservice.py b/tests/test_blobservice.py
index <HASH>..<HASH> 100644
--- a/tests/test_blobservice.py
+++ b/tests/test_blobservice.py
@@ -339,7 +339,7 @@ class BlobServiceTest(AzureTestCase):
connection.send(content)
resp = connection.getresponse()
- respheaders = resp.getheaders()
+ respheaders = [(name.lower(), val) for name, val in resp.getheaders()]
respbody = None
if resp.length is None:
respbody = resp.read()
|
Changes blob tests so that headers are returned with a lowercase name. This matches the behavior of the SDK, which does this to ensure consistency across httplib on python 2.x and 3.x, winhttp, as well as other platforms.
|
diff --git a/lib/inventory_refresh/save_collection/saver/concurrent_safe_batch.rb b/lib/inventory_refresh/save_collection/saver/concurrent_safe_batch.rb
index <HASH>..<HASH> 100644
--- a/lib/inventory_refresh/save_collection/saver/concurrent_safe_batch.rb
+++ b/lib/inventory_refresh/save_collection/saver/concurrent_safe_batch.rb
@@ -184,9 +184,9 @@ module InventoryRefresh::SaveCollection
[:resource_counter, :resource_counters_max]
end
- next if skeletonize_or_skip_record(record.try(version_attr) || record.try(:[], version_attr),
+ next if skeletonize_or_skip_record(record_key(record, version_attr),
hash[version_attr],
- record.try(max_version_attr) || record.try(:[], max_version_attr),
+ record_key(record, max_version_attr),
inventory_object)
end
|
Use the right accessor to the record
|
diff --git a/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java b/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java
index <HASH>..<HASH> 100644
--- a/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java
+++ b/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java
@@ -67,8 +67,11 @@ public class Static extends Middleware {
* @param includeHidden in the directory listing show dot files
*/
public Static(String root, long maxAge, boolean directoryListing, boolean includeHidden) {
- if (root.endsWith("/")) {
- root = root.substring(0, root.length() - 1);
+ // if the root is not empty it should end with / for convenience
+ if (!"".equals(root)) {
+ if (!root.endsWith("/")) {
+ root = root + "/";
+ }
}
this.root = root;
this.maxAge = maxAge;
|
add trailing slash to static middleware
|
diff --git a/extensions/cms/Panes.php b/extensions/cms/Panes.php
index <HASH>..<HASH> 100644
--- a/extensions/cms/Panes.php
+++ b/extensions/cms/Panes.php
@@ -27,12 +27,13 @@ class Panes extends \lithium\core\StaticObject {
$options += [
'title' => Inflector::humanize($name),
'url' => null,
- 'group' => Panes::GROUP_NONE
+ 'group' => Panes::GROUP_NONE,
+ 'nested' => []
];
if (is_callable($options['url'])) {
$options['url'] = $options['url']();
}
- Environment::set(true, ['panes' => [$name => compact('name', 'library') + $options]]);
+ Environment::set(true, ['panes' => [$name => compact('name', 'library') + $options]]);
}
public static function grouped() {
|
Allow nested panes.
|
diff --git a/src/de/mrapp/android/preference/activity/PreferenceFragment.java b/src/de/mrapp/android/preference/activity/PreferenceFragment.java
index <HASH>..<HASH> 100644
--- a/src/de/mrapp/android/preference/activity/PreferenceFragment.java
+++ b/src/de/mrapp/android/preference/activity/PreferenceFragment.java
@@ -206,13 +206,12 @@ public abstract class PreferenceFragment extends
} else if (preference.getKey() != null
&& !preference.getKey().isEmpty()
&& !isBlackListed(preference.getKey())
- && (!areDisabledPreferencesRestored() || preference
+ && (areDisabledPreferencesRestored() || preference
.isEnabled())) {
sharedPreferences.edit().remove(preference.getKey()).commit();
+ preferenceGroup.removePreference(preference);
+ preferenceGroup.addPreference(preference);
}
-
- preferenceGroup.removePreference(preference);
- preferenceGroup.addPreference(preference);
}
}
|
Bugfix #1: The default values of disabled preferences are not restored anymore, when the restoreDisabledPreferences-attribute is set to false.
|
diff --git a/tests/contrib/django/middleware.py b/tests/contrib/django/middleware.py
index <HASH>..<HASH> 100644
--- a/tests/contrib/django/middleware.py
+++ b/tests/contrib/django/middleware.py
@@ -1,13 +1,22 @@
-class BrokenRequestMiddleware(object):
+try:
+ # Django >= 1.10
+ from django.utils.deprecation import MiddlewareMixin
+except ImportError:
+ # Not required for Django <= 1.9, see:
+ # https://docs.djangoproject.com/en/1.10/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
+ MiddlewareMixin = object
+
+
+class BrokenRequestMiddleware(MiddlewareMixin):
def process_request(self, request):
raise ImportError('request')
-class BrokenResponseMiddleware(object):
+class BrokenResponseMiddleware(MiddlewareMixin):
def process_response(self, request, response):
raise ImportError('response')
-class BrokenViewMiddleware(object):
+class BrokenViewMiddleware(MiddlewareMixin):
def process_view(self, request, func, args, kwargs):
raise ImportError('view')
|
Add `MiddlewareMixin` for these test classes as well
|
diff --git a/components/fuse/src/test/java/org/datacleaner/components/fuse/FuseStreamsComponentIntegrationTest.java b/components/fuse/src/test/java/org/datacleaner/components/fuse/FuseStreamsComponentIntegrationTest.java
index <HASH>..<HASH> 100644
--- a/components/fuse/src/test/java/org/datacleaner/components/fuse/FuseStreamsComponentIntegrationTest.java
+++ b/components/fuse/src/test/java/org/datacleaner/components/fuse/FuseStreamsComponentIntegrationTest.java
@@ -47,6 +47,7 @@ import org.datacleaner.test.MockAnalyzer;
import org.datacleaner.test.MockOutputDataStreamAnalyzer;
import org.datacleaner.test.TestHelper;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
public class FuseStreamsComponentIntegrationTest {
@@ -230,6 +231,7 @@ public class FuseStreamsComponentIntegrationTest {
}
@Test
+ @Ignore("Not yet implemented")
public void testFuseSourceTableAndOutputDataStream() throws Exception {
Assert.fail("Not yet implemented");
}
|
Marked "for now irrelevant" unittest as ignored
|
diff --git a/pippo-core/src/main/java/ro/fortsoft/pippo/core/ContentTypeEngines.java b/pippo-core/src/main/java/ro/fortsoft/pippo/core/ContentTypeEngines.java
index <HASH>..<HASH> 100644
--- a/pippo-core/src/main/java/ro/fortsoft/pippo/core/ContentTypeEngines.java
+++ b/pippo-core/src/main/java/ro/fortsoft/pippo/core/ContentTypeEngines.java
@@ -17,6 +17,9 @@ package ro.fortsoft.pippo.core;
import ro.fortsoft.pippo.core.util.StringUtils;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
import java.util.Map;
import java.util.TreeMap;
@@ -59,6 +62,15 @@ public class ContentTypeEngines {
}
/**
+ * Returns the list of registered content types.
+ *
+ * @return the list of registered content types
+ */
+ public List<String> getContentTypes() {
+ return Collections.unmodifiableList(new ArrayList<>(engines.keySet()));
+ }
+
+ /**
* Registers a content type engine if no other engine has been registered
* for the content type.
*
|
Add accessor to retrieve registered content types in ContentTypeEngines
|
diff --git a/tests/integration/modules/test_network.py b/tests/integration/modules/test_network.py
index <HASH>..<HASH> 100644
--- a/tests/integration/modules/test_network.py
+++ b/tests/integration/modules/test_network.py
@@ -1,7 +1,3 @@
-# -*- coding: utf-8 -*-
-
-from __future__ import absolute_import
-
import pytest
import salt.utils.path
import salt.utils.platform
|
Drop Py2 and six on tests/integration/modules/test_network.py
|
diff --git a/stdnet/utils/encoders.py b/stdnet/utils/encoders.py
index <HASH>..<HASH> 100644
--- a/stdnet/utils/encoders.py
+++ b/stdnet/utils/encoders.py
@@ -94,10 +94,7 @@ between python 2 and python 3.'''
elif isinstance(x, bytes):
try:
return pickle.loads(x)
- except pickle.UnpicklingError:
- return None
- except EOFError:
- # Probably it wasn't a pickle string, treat it as binary data
+ except (pickle.UnpicklingError,EOFError):
return x.decode('utf-8','ignore')
else:
return x
|
another fix for the python pickler encoder
|
diff --git a/resources/lang/fr-FR/forms.php b/resources/lang/fr-FR/forms.php
index <HASH>..<HASH> 100644
--- a/resources/lang/fr-FR/forms.php
+++ b/resources/lang/fr-FR/forms.php
@@ -153,7 +153,7 @@ return [
'days-of-incidents' => 'Combien de jours d\'incidents à montrer ?',
'time_before_refresh' => 'Fréquence de rafraîchissement de la page de statut (en secondes).',
'banner' => 'Image d\'en-tête',
- 'banner-help' => 'Il est recommandé de téléchargez un fichier ne dépassant pas 930px de large .',
+ 'banner-help' => "Il est recommandé de téléchargez un fichier ne dépassant pas 930px de large .",
'subscribers' => 'Permettre aux personnes de s\'inscrire aux notifications par e-mail ?',
'skip_subscriber_verification' => 'Ne pas vérifier les utilisateurs ? (Attention, vous pourriez être spammé)',
'automatic_localization' => 'Traduire automatiquement votre page de statut dans la langue du visiteur ?',
|
New translations forms.php (French)
|
diff --git a/duolingo.py b/duolingo.py
index <HASH>..<HASH> 100644
--- a/duolingo.py
+++ b/duolingo.py
@@ -25,6 +25,10 @@ class AlreadyHaveStoreItemException(DuolingoException):
pass
+class InsufficientFundsException(DuolingoException):
+ pass
+
+
class CaptchaException(DuolingoException):
pass
@@ -128,8 +132,11 @@ class Duolingo(object):
returns a text like: {"streak_freeze":"2017-01-10 02:39:59.594327"}
"""
- if request.status_code == 400 and request.json()['error'] == 'ALREADY_HAVE_STORE_ITEM':
- raise AlreadyHaveStoreItemException('Already equipped with ' + item_name + '.')
+ if request.status_code == 400:
+ if request.json()["error"] == "ALREADY_HAVE_STORE_ITEM":
+ raise AlreadyHaveStoreItemException("Already equipped with {}.".format(item_name))
+ if request.json()["error"] == "INSUFFICIENT_FUNDS":
+ raise InsufficientFundsException("Insufficient funds to purchase {}.".format(item_name))
if not request.ok:
# any other error:
raise DuolingoException('Not possible to buy item.')
|
Adding an InsufficientFundsException while I'm at it
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -89,11 +89,11 @@ function EVC(options) {
data.content = dataFound.content;
cb(null, true);
} else {
+ var headers = req.headers;
+ headers.express_view_cache = cacheKey;
curl({
'method': 'GET',
- 'headers': {
- 'express_view_cache': cacheKey
- },
+ 'headers': headers,
'url': 'http://localhost:' + config.appPort + key
}, function (error, response, body) {
if (error) {
|
passing headers for populating cache call
|
diff --git a/src/main/java/com/googlecode/lanterna/terminal/text/ANSITerminal.java b/src/main/java/com/googlecode/lanterna/terminal/text/ANSITerminal.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/googlecode/lanterna/terminal/text/ANSITerminal.java
+++ b/src/main/java/com/googlecode/lanterna/terminal/text/ANSITerminal.java
@@ -180,6 +180,9 @@ public abstract class ANSITerminal extends StreamBasedTerminal
case RESET_ALL:
writeToTerminal((byte)'0');
break;
+ case EXIT_BLINK:
+ default:
+ break;
}
if(index++ < options.length - 1)
writeToTerminal((byte)';');
|
ANSITerminal: handle (i.e. don't handle) EXIT_BLINK
|
diff --git a/spec/event_sourcery/event_store/subscription_spec.rb b/spec/event_sourcery/event_store/subscription_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/event_sourcery/event_store/subscription_spec.rb
+++ b/spec/event_sourcery/event_store/subscription_spec.rb
@@ -20,7 +20,7 @@ RSpec.describe EventSourcery::EventStore::Subscription do
end
let(:event_types) { nil }
- let(:event_store) { EventSourcery::EventStore::Postgres::Connection.new(pg_connection) }
+ let(:event_store) { EventSourcery::EventStore::Postgres::ConnectionWithOptimisticConcurrency.new(pg_connection) }
subject(:subscription) { described_class.new(event_store: event_store,
poll_waiter: waiter,
event_types: event_types,
|
Use optimistic concurrency connection in subscription spec
|
diff --git a/devices.js b/devices.js
index <HASH>..<HASH> 100755
--- a/devices.js
+++ b/devices.js
@@ -13152,7 +13152,7 @@ const devices = [
fromZigbee: [fz.on_off_skip_duplicate_transaction_and_disable_default_response],
},
{
- zigbeeModel: ['ZB-SW02'],
+ zigbeeModel: ['ZB-SW02', 'E220-KR2N0Z0-HA'],
model: 'ZB-SW02',
vendor: 'eWeLink',
description: 'Smart light switch - 2 gang',
|
added support for E<I>-KR2N0Z0-HA (#<I>)
|
diff --git a/lib/octopress/page.rb b/lib/octopress/page.rb
index <HASH>..<HASH> 100644
--- a/lib/octopress/page.rb
+++ b/lib/octopress/page.rb
@@ -25,7 +25,15 @@ module Octopress
end
def path
- File.join(@config['source'], "#{@options['path']}.#{extension}")
+ file = @options['path']
+
+ # If path ends with a slash, make it an index
+ file << "index" if file =~ /\/$/
+
+ # if path has no extension, add the default extension
+ file << ".#{extension}" unless file =~ /\.\w+$/
+
+ File.join(@config['source'], file)
end
def extension
|
Improved new page command. Now trailing slashes create index pages.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,7 @@ lint_requires = [
]
doc_requires = [
- 'mkdocs',
+ 'mkdocs==1.1',
'mkdocs-material',
'mkdocstrings==0.15.0'
]
|
pin mkdocs to avoid build issue with <I>
|
diff --git a/test/conftest.py b/test/conftest.py
index <HASH>..<HASH> 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -87,8 +87,8 @@ def rabbit_config(request, rabbit_manager):
conf['vhost'] = vhost
conf['username'] = username
- reset_rabbit_vhost(vhost, username, rabbit_manager)
reset_rabbit_connections(vhost, rabbit_manager)
+ reset_rabbit_vhost(vhost, username, rabbit_manager)
yield conf
diff --git a/test/test_queue_consumer.py b/test/test_queue_consumer.py
index <HASH>..<HASH> 100644
--- a/test/test_queue_consumer.py
+++ b/test/test_queue_consumer.py
@@ -279,8 +279,12 @@ def test_prefetch_count(rabbit_manager, rabbit_config):
queue_consumer1.unregister_provider(handler1)
queue_consumer2.unregister_provider(handler2)
+ queue_consumer1.stop()
+ queue_consumer2.stop()
+
def test_kill_closes_connections(rabbit_manager, rabbit_config):
+
container = Mock()
container.config = rabbit_config
container.max_workers = 1
|
reset rabbit connections before the vhost; stop queueconsumers before resetting connections
(avoiding bugs documented here <URL>)
|
diff --git a/src/require/javascript.js b/src/require/javascript.js
index <HASH>..<HASH> 100644
--- a/src/require/javascript.js
+++ b/src/require/javascript.js
@@ -124,6 +124,10 @@ _gpfRequireProcessor[".js"] = function (resourceName, content) {
var wrapper = _gpfRequireWrapGpf(this, resourceName);
return _gpfRequireJSGetStaticDependencies.call(this, resourceName, content)
.then(function (staticDependencies) {
- return _gpfRequireJS(wrapper.gpf, content, staticDependencies) || wrapper.promise;
+ var exports = _gpfRequireJS(wrapper.gpf, content, staticDependencies);
+ if (undefined === exports) {
+ return wrapper.promise;
+ }
+ return exports;
});
};
|
Exports might be a falsy value, improves switch (#<I>)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.