diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/test/cursor_test.js b/test/cursor_test.js
index <HASH>..<HASH> 100644
--- a/test/cursor_test.js
+++ b/test/cursor_test.js
@@ -945,27 +945,6 @@ var tests = testCase({
});
});
});
- },
-
- shouldHandleThrowingNextObjectCallback : function(test) {
- client.createCollection('test_throwing_in_nextObject_callback', function(err, collection) {
- collection.insert({'x':1}, {safe:true}, function(err, doc) {
- test.equal(err, null);
- collection.find(function(err, cursor) {
- test.equal(err, null);
-
- var times = 0;
- cursor.nextObject(function(err, doc) {
- ++times;
- test.equal(times, 1);
- if (times > 1) return test.done();
- //test.equal(err, null);
- //test.equal(1, doc.x);
- throw new Error("KaBoom!");
- });
- });
- });
- });
}
})
|
remove double callback test
now that the test passes, its throwing (which is what
we want) but theres no way to catch it anymore for
nice tests - or maybe there is, i just haven't figured
it out.
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -63,8 +63,8 @@ module.exports = function (grunt) {
'}\n',
jqueryVersionCheck: '+function ($) {\n' +
' var version = $.fn.jquery.split(\' \')[0].split(\'.\')\n' +
- ' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {\n' +
- ' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery version 1.9.1 or higher\')\n' +
+ ' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 3)) {\n' +
+ ' throw new Error(\'Bootstrap\\\'s JavaScript requires at least jQuery v1.9.1 but less than v3.0.0\')\n' +
' }\n' +
'}(jQuery);\n\n',
|
Check for jQuery >= 3.
Reword jQuery version mismatch error message since jQuery v3 isn't supported.
|
diff --git a/test/unit/RouterTest.php b/test/unit/RouterTest.php
index <HASH>..<HASH> 100644
--- a/test/unit/RouterTest.php
+++ b/test/unit/RouterTest.php
@@ -3,11 +3,26 @@
namespace SwoftTest\Console\Unit;
use PHPUnit\Framework\TestCase;
+use function bean;
+use ReflectionException;
+use Swoft\Bean\Exception\ContainerException;
/**
* Class RouterTest
*/
class RouterTest extends TestCase
{
+ /**
+ * @throws ReflectionException
+ * @throws ContainerException
+ */
+ public function testBasic(): void
+ {
+ $router = bean('cliRouter');
+ $this->assertTrue($router->count() > 0);
+ $router->setIdAliases(['run' => 'serve:run']);
+ $this->assertNotEmpty($list = $router->getIdAliases());
+ $this->assertSame('serve:run', $list['run']);
+ }
}
|
update some logic for tcp proto
|
diff --git a/test/index-spec.js b/test/index-spec.js
index <HASH>..<HASH> 100644
--- a/test/index-spec.js
+++ b/test/index-spec.js
@@ -56,7 +56,7 @@ describe('Base', function() {
describe('Fire', function() {
it('Should return the request body on success.', function(done) {
- hookcord.Fire("", {link: fullLink}, {conbtent: 'unit test'})
+ hookcord.Fire("", {link: fullLink}, {content: 'unit test'})
.then(
function(x) {
if (x) {
|
Stupid Unit Test Error Fix
|
diff --git a/plugin/common/init.go b/plugin/common/init.go
index <HASH>..<HASH> 100644
--- a/plugin/common/init.go
+++ b/plugin/common/init.go
@@ -137,6 +137,7 @@ func (p *HashicorpPlugin) Call(funcName string, args ...interface{}) (interface{
func (p *HashicorpPlugin) Quit() error {
// kill hashicorp plugin process
+ log.Warn().Msg("quit hashicorp plugin process")
pluginHost.Quit()
return nil
}
diff --git a/runner.go b/runner.go
index <HASH>..<HASH> 100644
--- a/runner.go
+++ b/runner.go
@@ -9,8 +9,11 @@ import (
"net/http"
"net/http/httputil"
"net/url"
+ "os"
+ "os/signal"
"strconv"
"strings"
+ "syscall"
"testing"
"time"
@@ -213,6 +216,18 @@ func initPlugin(path string) (plugin common.Plugin, err error) {
go ga.SendEvent(event)
}()
plugin, err = common.Init(path)
+
+ // catch Interrupt and SIGTERM signals to ensure plugin quitted
+ c := make(chan os.Signal)
+ signal.Notify(c, os.Interrupt, syscall.SIGTERM)
+ go func() {
+ <-c
+ if plugin != nil {
+ plugin.Quit()
+ }
+ os.Exit(1)
+ }()
+
return
}
|
feat: catch Interrupt and SIGTERM signals to ensure plugin quitted
|
diff --git a/knights/parse.py b/knights/parse.py
index <HASH>..<HASH> 100644
--- a/knights/parse.py
+++ b/knights/parse.py
@@ -2,7 +2,7 @@
import ast
from importlib import import_module
-from .lexer import tokenise, Token
+from .lexer import tokenise, TokenType
class Node(object):
@@ -91,17 +91,17 @@ class Parser:
return list(self.parse_node())
def parse_node(self):
- for mode, token in self.stream:
- if mode == Token.load:
- self.load_library(token)
+ for token in self.stream:
+ if token.mode == TokenType.load:
+ self.load_library(token.token)
continue
- elif mode == Token.text:
- node = TextNode(self, token)
- elif mode == Token.var:
- node = VarNode(self, token)
- elif mode == Token.block:
+ elif token.mode == TokenType.text:
+ node = TextNode(self, token.token)
+ elif token.mode == TokenType.var:
+ node = VarNode(self, token.token)
+ elif token.mode == TokenType.block:
# magicks go here
- bits = [x.strip() for x in token.strip().split(' ', 1)]
+ bits = [x.strip() for x in token.token.strip().split(' ', 1)]
tag_name = bits.pop(0)
func = self.tags[tag_name]
node = func(self, *bits)
|
Fix patch for Token class changeover
|
diff --git a/tests/activeExpressionTests.js b/tests/activeExpressionTests.js
index <HASH>..<HASH> 100644
--- a/tests/activeExpressionTests.js
+++ b/tests/activeExpressionTests.js
@@ -106,7 +106,7 @@ describe('Active Expressions', function() {
assert(obj.a + obj.b == 3, "Solver failed: " + obj.a + ", " + obj.b)
});
- it("should run a basic aexpr", () => {
+ it("runs a basic aexpr", () => {
var obj = {a: 2, b: 3};
let spy = sinon.spy();
@@ -119,7 +119,7 @@ describe('Active Expressions', function() {
expect(spy.calledOnce).to.be.true;
});
- it("should allow to uninstall an aexpr", () => {
+ it("uninstalls an aexpr (and reinstalls it afterwards)", () => {
var obj = {a: 2, b: 3};
let spy = sinon.spy();
@@ -132,5 +132,11 @@ describe('Active Expressions', function() {
obj.a = 42;
expect(spy.called).to.be.false;
+
+ expr.installListeners();
+
+ obj.a = 3;
+
+ expect(spy.calledOnce).to.be.true;
});
});
|
added test for reinstalling an aexpr
|
diff --git a/lib/connection.js b/lib/connection.js
index <HASH>..<HASH> 100644
--- a/lib/connection.js
+++ b/lib/connection.js
@@ -24,15 +24,16 @@ module.exports = (function () {
this.config = _.extend(config, defaults);
},
ensureDB = function (database) {
+ var dbProps = (typeof database === 'object') ? database : { name: database };
var deferred = Q.defer();
server.list().then(function (dbs) {
var dbExists = _.find(dbs, function (db) {
- return db.name === database.name;
+ return db.name === dbProps.name;
});
if (dbExists) {
- deferred.resolve(server.use(database));
+ deferred.resolve(server.use(dbProps));
} else {
- server.create(database).then(function (db) {
+ server.create(dbProps).then(function (db) {
deferred.resolve(db);
});
}
|
Changed the connection config to be more like waterline where "database" is not an object but it contains the name of the database. This change is backwards compatible with previous configurations.
Example: <URL>
|
diff --git a/SoftLayer/CLI/core.py b/SoftLayer/CLI/core.py
index <HASH>..<HASH> 100644
--- a/SoftLayer/CLI/core.py
+++ b/SoftLayer/CLI/core.py
@@ -141,7 +141,6 @@ def cli(env,
else:
# Create SL Client
client = SoftLayer.create_client_from_env(
- transport=SoftLayer.RestTransport(),
proxy=proxy,
config_file=config,
)
|
Set default transport for CLI back to XMLRPC
|
diff --git a/tests/TestCase/View/Helper/FormHelperTest.php b/tests/TestCase/View/Helper/FormHelperTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/View/Helper/FormHelperTest.php
+++ b/tests/TestCase/View/Helper/FormHelperTest.php
@@ -5172,7 +5172,7 @@ class FormHelperTest extends TestCase
{
extract($this->dateRegex);
- $result = $this->Form->day('Model.field', array('value' => false));
+ $result = $this->Form->day('Model.field', array('value' => ''));
$expected = array(
array('select' => array('name' => 'Model[field][day]')),
array('option' => array('selected' => 'selected', 'value' => '')),
|
Fix failing test.
false => current day now. '' maps to ''.
|
diff --git a/core/unit_tests/streaming/test_transfer.py b/core/unit_tests/streaming/test_transfer.py
index <HASH>..<HASH> 100644
--- a/core/unit_tests/streaming/test_transfer.py
+++ b/core/unit_tests/streaming/test_transfer.py
@@ -1952,5 +1952,6 @@ def _tempdir_maker():
return _tempdir_mgr
+
_tempdir = _tempdir_maker()
del _tempdir_maker
diff --git a/docs/bigquery_snippets.py b/docs/bigquery_snippets.py
index <HASH>..<HASH> 100644
--- a/docs/bigquery_snippets.py
+++ b/docs/bigquery_snippets.py
@@ -591,5 +591,6 @@ def main():
for item in to_delete:
item.delete()
+
if __name__ == '__main__':
main()
diff --git a/docs/pubsub_snippets.py b/docs/pubsub_snippets.py
index <HASH>..<HASH> 100644
--- a/docs/pubsub_snippets.py
+++ b/docs/pubsub_snippets.py
@@ -456,5 +456,6 @@ def main():
for item in to_delete:
item.delete()
+
if __name__ == '__main__':
main()
|
Lint fixes needed for the latest (<I>) pycodestyle.
|
diff --git a/benchbuild/utils/log.py b/benchbuild/utils/log.py
index <HASH>..<HASH> 100644
--- a/benchbuild/utils/log.py
+++ b/benchbuild/utils/log.py
@@ -17,7 +17,8 @@ def configure_plumbum_log():
if settings.CFG["debug"]:
plumbum_local.setLevel(logging.DEBUG)
plumbum_local.addHandler(plumbum_hdl)
- plumbum_local.propagate = False
+ plumbum_format = logging.Formatter('$> %(message)s')
+ plumbum_hdl.setFormatter(plumbum_format)
def configure_parse_log():
|
utils/log: random logging format change
|
diff --git a/spec/functional/resource/msu_package_spec.rb b/spec/functional/resource/msu_package_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/functional/resource/msu_package_spec.rb
+++ b/spec/functional/resource/msu_package_spec.rb
@@ -19,7 +19,7 @@
require "spec_helper"
require "chef/provider/package/cab"
-describe Chef::Resource::MsuPackage, :win2012r2_only do
+describe Chef::Resource::MsuPackage, :win2012r2_only, :appveyor_only do
let(:package_name) { "Package_for_KB2959977" }
let(:package_source) { "https://download.microsoft.com/download/3/B/3/3B320C07-B7B1-41E5-81F4-79EBC02DF7D3/Windows8.1-KB2959977-x64.msu" }
|
Only run msu_package functional tests on Appveyor
Choosing an MSU that works on a system but shouldn't be installed is hard / impossible.
These tests work on appveyor but break the build in Jenkins. For now, let them just run on
appveyor.
|
diff --git a/externs/w3c_indexeddb.js b/externs/w3c_indexeddb.js
index <HASH>..<HASH> 100644
--- a/externs/w3c_indexeddb.js
+++ b/externs/w3c_indexeddb.js
@@ -34,6 +34,9 @@ Window.prototype.mozIndexedDB;
Window.prototype.webkitIndexedDB;
/** @type {IDBFactory} */
+Window.prototype.msIndexedDB;
+
+/** @type {IDBFactory} */
Window.prototype.indexedDB;
/**
@@ -232,10 +235,21 @@ Window.prototype.webkitIDBRequest;
/**
* @constructor
+ * @implements {EventTarget}
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBRequest
*/
function IDBRequest() {}
+/** @override */
+IDBRequest.prototype.addEventListener = function(type, listener, useCapture) {};
+
+/** @override */
+IDBRequest.prototype.removeEventListener =
+ function(type, listener, useCapture) {};
+
+/** @override */
+IDBRequest.prototype.dispatchEvent = function(evt) {};
+
/**
* @constructor
* @extends {IDBRequest}
|
Have IDBRequest implement EventTarget.
Add msIndexedDB as another alias.
R=nicksantos
DELTA=<I> (<I> added, 0 deleted, 0 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=<I>
git-svn-id: <URL>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,7 @@ with open('README.rst', 'r') as fh:
setup(
name='localshop',
- version='0.5.0',
+ version='0.6.0-dev',
author='Michael van Tellingen',
author_email='michaelvantellingen@gmail.com',
url='http://github.com/mvantellingen/localshop',
|
Bump to <I>-dev
|
diff --git a/commands/command_track.go b/commands/command_track.go
index <HASH>..<HASH> 100644
--- a/commands/command_track.go
+++ b/commands/command_track.go
@@ -49,6 +49,7 @@ func trackCommand(cmd *cobra.Command, args []string) {
for _, k := range knownPaths {
if t == k.Path {
isKnownPath = true
+ break
}
}
|
Breaking when a known path was found, no need to continue the iteration
|
diff --git a/ceph_deploy/tests/test_cli_new.py b/ceph_deploy/tests/test_cli_new.py
index <HASH>..<HASH> 100644
--- a/ceph_deploy/tests/test_cli_new.py
+++ b/ceph_deploy/tests/test_cli_new.py
@@ -2,6 +2,7 @@ import re
import subprocess
import uuid
+import pytest
from mock import patch
from ceph_deploy import conf
@@ -20,6 +21,18 @@ def test_help(tmpdir, cli):
assert 'optional arguments' in result
+def test_bad_no_mon(tmpdir, cli):
+ with pytest.raises(cli.Failed) as err:
+ with cli(
+ args=['ceph-deploy', 'new'],
+ stderr=subprocess.PIPE,
+ ) as p:
+ result = p.stderr.read()
+ assert 'usage: ceph-deploy new' in result
+ assert 'too few arguments' in result
+ assert err.value.status == 2
+
+
def test_write_global_conf_section(tmpdir, cli):
fake_ip_addresses = lambda x: ['10.0.0.1']
|
[RM-<I>] Add test for missing host(s) to 'new' cmd
|
diff --git a/src/pyvesync/vesyncfan.py b/src/pyvesync/vesyncfan.py
index <HASH>..<HASH> 100644
--- a/src/pyvesync/vesyncfan.py
+++ b/src/pyvesync/vesyncfan.py
@@ -14,7 +14,7 @@ class VeSyncAir131(VeSyncBaseDevice):
body = helpers.req_body(self.manager, 'devicedetail')
head = helpers.req_headers(self.manager)
- r, _ = helpers.call_api('/131airpurifier/v1/device/deviceDetail',
+ r, _ = helpers.call_api('/131airPurifier/v1/device/deviceDetail',
method='post', headers=head, json=body)
if r is not None and helpers.check_response(r, 'airpur_detail'):
|
Fix typo in get_details in air purifier object
|
diff --git a/cmd/healthcheck-router.go b/cmd/healthcheck-router.go
index <HASH>..<HASH> 100644
--- a/cmd/healthcheck-router.go
+++ b/cmd/healthcheck-router.go
@@ -40,7 +40,9 @@ func registerHealthCheckRouter(router *mux.Router) {
// Cluster check handler to verify cluster is active
healthRouter.Methods(http.MethodGet).Path(healthCheckClusterPath).HandlerFunc(httpTraceAll(ClusterCheckHandler))
+ healthRouter.Methods(http.MethodHead).Path(healthCheckClusterPath).HandlerFunc(httpTraceAll(ClusterCheckHandler))
healthRouter.Methods(http.MethodGet).Path(healthCheckClusterReadPath).HandlerFunc(httpTraceAll(ClusterReadCheckHandler))
+ healthRouter.Methods(http.MethodHead).Path(healthCheckClusterReadPath).HandlerFunc(httpTraceAll(ClusterReadCheckHandler))
// Liveness handler
healthRouter.Methods(http.MethodGet).Path(healthCheckLivenessPath).HandlerFunc(httpTraceAll(LivenessCheckHandler))
|
add HEAD for cluster healthcheck (#<I>)
fixes #<I>
|
diff --git a/lib/outputimage.py b/lib/outputimage.py
index <HASH>..<HASH> 100644
--- a/lib/outputimage.py
+++ b/lib/outputimage.py
@@ -232,8 +232,18 @@ class OutputImage:
scihdr.update('NCOMBINE', self.parlist[0]['nimages'])
# If BUNIT keyword was found and reset, then
+
if self.bunit is not None:
- scihdr.update('BUNIT',self.bunit,comment="Units of science product")
+ comment_str = "Units of science product"
+ if self.bunit.lower()[:5] == 'count':
+ comment_str = "counts * gain = electrons"
+ scihdr.update('BUNIT',self.bunit,comment=comment_str)
+ else:
+ # check to see whether to update already present BUNIT comment
+ if scihdr.has_key('bunit') and scihdr['bunit'].lower()[:5]== 'count':
+ comment_str = "counts * gain = electrons"
+ scihdr.update('BUNIT',scihdr['bunit'],comment=comment_str)
+
if self.wcs:
# Update WCS Keywords based on PyDrizzle product's value
|
Comment for BUNIT keyword was revised to define 'counts * gain = electrons' when BUNIT is in units of counts or counts/s. WJH
git-svn-id: <URL>
|
diff --git a/st_reg/consistency.py b/st_reg/consistency.py
index <HASH>..<HASH> 100644
--- a/st_reg/consistency.py
+++ b/st_reg/consistency.py
@@ -1,14 +1,7 @@
# -*- coding: utf-8 -*-
"""Module de validation the states number"""
-import sys
-
-if sys.version >= '3':
- import .states.ac as ac
-else:
- import states.ac as ac
-
-
+import states.ac as ac
import states.al as al
import states.am as am
import states.ap as ap
@@ -36,7 +29,6 @@ import states.sp as sp
import states.se as se
import states.to as to
-
def check(st_reg_number, state_index):
"""
This function is like a Facade to another modules that
|
Back to regular python 2 imports
|
diff --git a/lib/generators/surveyor/templates/db/migrate/create_survey_translations.rb b/lib/generators/surveyor/templates/db/migrate/create_survey_translations.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/surveyor/templates/db/migrate/create_survey_translations.rb
+++ b/lib/generators/surveyor/templates/db/migrate/create_survey_translations.rb
@@ -14,6 +14,6 @@ class CreateSurveyTranslations < ActiveRecord::Migration
end
def self.down
- drop_table :surveys
+ drop_table :survey_translations
end
end
|
Ref. <I> - Fixes migration.
|
diff --git a/server.go b/server.go
index <HASH>..<HASH> 100644
--- a/server.go
+++ b/server.go
@@ -3868,8 +3868,8 @@ func (s *Server) applyDropContinuousQueryCommand(m *messaging.Message) error {
// RunContinuousQueries will run any continuous queries that are due to run and write the
// results back into the database
func (s *Server) RunContinuousQueries() error {
- s.mu.Lock()
- defer s.mu.Unlock()
+ s.mu.RLock()
+ defer s.mu.RUnlock()
for _, d := range s.databases {
for _, c := range d.continuousQueries {
|
Use a read lock for running continuous queries
|
diff --git a/bugsnag.go b/bugsnag.go
index <HASH>..<HASH> 100644
--- a/bugsnag.go
+++ b/bugsnag.go
@@ -186,6 +186,7 @@ func startSessionTracking() {
})
if sessionTracker != nil {
Config.logf(configuredMultipleTimes)
+ } else {
+ sessionTracker = sessions.NewSessionTracker(&sessionTrackingConfig)
}
- sessionTracker = sessions.NewSessionTracker(&sessionTrackingConfig)
}
|
[fix] Don't make new session tracker if it exists
|
diff --git a/lib/cli/cli.js b/lib/cli/cli.js
index <HASH>..<HASH> 100644
--- a/lib/cli/cli.js
+++ b/lib/cli/cli.js
@@ -450,6 +450,13 @@ module.exports.parseCommandLine = function parseCommandLine() {
'e.g. "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary"',
group: 'Chrome'
})
+ .option('browsertime.chrome.chromedriverPath', {
+ alias: 'chrome.chromedriverPath',
+ describe:
+ "Path to custom Chromedriver binary. Make sure to use a Chromedriver version that's compatible with " +
+ "the version of Chrome you're using",
+ group: 'Chrome'
+ })
.option('browsertime.chrome.cdp.performance', {
alias: 'chrome.cdp.performance',
type: 'boolean',
|
cli: set which chromedriver to use
|
diff --git a/code/DMSDocument.php b/code/DMSDocument.php
index <HASH>..<HASH> 100644
--- a/code/DMSDocument.php
+++ b/code/DMSDocument.php
@@ -2,8 +2,10 @@
class DMSDocument extends DataObject implements DMSDocumentInterface {
static $db = array(
- "Filename" => "Text",
- "Folder" => "Text"
+ "Filename" => "Varchar(255)",
+ "Folder" => "Varchar(255)",
+ "Title" => 'Varchar(1024)',
+ "Description" => 'Text',
);
static $many_many = array(
@@ -46,6 +48,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
$this->Pages()->removeAll();
}
+
/**
* Adds a metadata tag to the Document. The tag has a category and a value.
* Each category can have multiple values by default. So: addTag("fruit","banana") addTag("fruit", "apple") will add two items.
diff --git a/code/ea-specific/DocumentType.php b/code/ea-specific/DocumentType.php
index <HASH>..<HASH> 100644
--- a/code/ea-specific/DocumentType.php
+++ b/code/ea-specific/DocumentType.php
@@ -0,0 +1,11 @@
+<?php
+
+class DocumentType extends DataObject {
+ static $db = array(
+ 'Name' => 'Varchar(255)'
+ );
+
+ static $has_many = array(
+ 'Documents' => 'EADocument'
+ );
+}
|
ENHANCEMENT: adding document type one to many relation to specific EA extension of the DMS
|
diff --git a/spec/node/tag-spec.js b/spec/node/tag-spec.js
index <HASH>..<HASH> 100644
--- a/spec/node/tag-spec.js
+++ b/spec/node/tag-spec.js
@@ -424,6 +424,14 @@ describe("Tag", function() {
});
+ it("ignores null elements", function() {
+
+ var br = h({ tagName: "div" }, ["child1", null, "child2"]);
+ var html = br.toHtml();
+ expect(html).toBe("<div>child1child2</div>");
+
+ });
+
});
});
\ No newline at end of file
diff --git a/src/node/tag.js b/src/node/tag.js
index <HASH>..<HASH> 100644
--- a/src/node/tag.js
+++ b/src/node/tag.js
@@ -268,7 +268,9 @@ Tag.prototype.toHtml = function() {
html += this.props.innerHTML;
} else {
for (var i = 0; i < len ; i++) {
- html += children[i].toHtml();
+ if (children[i]) {
+ html += children[i].toHtml();
+ }
}
}
html += voidElements[this.tagName] ? "" : "</" + this.tagName + ">";
|
Ignores null children for HTML rendering.
|
diff --git a/src/pt-BR/validation.php b/src/pt-BR/validation.php
index <HASH>..<HASH> 100644
--- a/src/pt-BR/validation.php
+++ b/src/pt-BR/validation.php
@@ -34,7 +34,7 @@ return [
'different' => 'Os campos :attribute e :other deverão conter valores diferentes.',
'digits' => 'O campo :attribute deverá conter :digits dígitos.',
'digits_between' => 'O campo :attribute deverá conter entre :min a :max dígitos.',
- 'dimensions' => 'The :attribute has invalid image dimensions.',
+ 'dimensions' => 'O valor indicado para o campo :attribute não é uma dimensão de imagem válida.',
'distinct' => 'O campo :attribute contém um valor duplicado.',
'email' => 'O campo :attribute não contém um endereço de email válido.',
'exists' => 'O valor selecionado para o campo :attribute é inválido.',
|
Dimension value for pt-BR
Translation for the dimension value missing in the pt-BR translation
|
diff --git a/lib/magic_grid/html_grid.rb b/lib/magic_grid/html_grid.rb
index <HASH>..<HASH> 100644
--- a/lib/magic_grid/html_grid.rb
+++ b/lib/magic_grid/html_grid.rb
@@ -92,8 +92,6 @@ module MagicGrid
class: 'full-width ui-widget-header',
colspan: @grid.columns.count)
end
- else
- ''.html_safe
end
end
|
nil is html_safe
|
diff --git a/claripy/backends/backend_z3.py b/claripy/backends/backend_z3.py
index <HASH>..<HASH> 100644
--- a/claripy/backends/backend_z3.py
+++ b/claripy/backends/backend_z3.py
@@ -355,6 +355,7 @@ function_map['or'] = 'Or'
function_map['and'] = 'And'
function_map['not'] = 'Not'
function_map['if'] = 'If'
+function_map['iff'] = 'If'
function_map['bvlshr'] = 'LShR'
from ..expression import E, A
|
add iff->If mapping for abstracting Z3 stuff
|
diff --git a/app/controllers/renalware/letters/contacts_controller.rb b/app/controllers/renalware/letters/contacts_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/renalware/letters/contacts_controller.rb
+++ b/app/controllers/renalware/letters/contacts_controller.rb
@@ -38,7 +38,7 @@ module Renalware
end
def find_contacts
- CollectionPresenter.new(@patient.contacts.ordered, ContactPresenter)
+ CollectionPresenter.new(@patient.contacts.includes(:description).ordered, ContactPresenter)
end
def find_contact_descriptions
|
Include :description in contacts query to fix N<I>
|
diff --git a/chef/spec/unit/knife/bootstrap_spec.rb b/chef/spec/unit/knife/bootstrap_spec.rb
index <HASH>..<HASH> 100644
--- a/chef/spec/unit/knife/bootstrap_spec.rb
+++ b/chef/spec/unit/knife/bootstrap_spec.rb
@@ -44,8 +44,10 @@ describe Chef::Knife::Bootstrap do
it "should load the specified template from a Ruby gem" do
@knife.config[:template_file] = false
- @gem = mock('Gem').stub!(:find_files).and_return(["/Users/schisamo/.rvm/gems/ruby-1.9.2-p180@chef-0.10/gems/knife-windows-0.5.4/lib/chef/knife/bootstrap/windows-shell.erb"])
- @knife.config[:distro] = 'windows-shell'
+ Gem.stub(:find_files).and_return(["/Users/schisamo/.rvm/gems/ruby-1.9.2-p180@chef-0.10/gems/knife-windows-0.5.4/lib/chef/knife/bootstrap/fake-bootstrap-template.erb"])
+ File.stub(:exists?).and_return(true)
+ IO.stub(:read).and_return('random content')
+ @knife.config[:distro] = 'fake-bootstrap-template'
lambda { @knife.load_template }.should_not raise_error
end
|
add additional stubbing to bootstrap_spec
|
diff --git a/sockeye/decoder.py b/sockeye/decoder.py
index <HASH>..<HASH> 100644
--- a/sockeye/decoder.py
+++ b/sockeye/decoder.py
@@ -849,11 +849,11 @@ class RecurrentDecoder(Decoder):
# concat previous word embedding and previous hidden state
if enc_last_hidden is not None:
word_vec_prev = mx.sym.concat(word_vec_prev, enc_last_hidden, dim=1,
- name="%sconcat_target_encoder_t%d" % (self.prefix, seq_idx))
+ name="%sconcat_target_encoder_t%d" % (self.prefix, seq_idx))
rnn_input = mx.sym.concat(word_vec_prev, state.hidden, dim=1,
name="%sconcat_target_context_t%d" % (self.prefix, seq_idx))
# rnn_pre_attention_output: (batch_size, rnn_num_hidden)
- # next_layer_states: num_layers * [batch_size, rnn_num_hidden]
+ # rnn_pre_attention_layer_states: num_layers * [batch_size, rnn_num_hidden]
rnn_pre_attention_output, rnn_pre_attention_layer_states = \
self.rnn_pre_attention(rnn_input, state.layer_states[:self.rnn_pre_attention_n_states])
|
Fixed an incorrect comment on rnn_pre_attention output. (#<I>)
|
diff --git a/TYPO3.Flow/Classes/TYPO3/Flow/Resource/Storage/WritableFileSystemStorage.php b/TYPO3.Flow/Classes/TYPO3/Flow/Resource/Storage/WritableFileSystemStorage.php
index <HASH>..<HASH> 100644
--- a/TYPO3.Flow/Classes/TYPO3/Flow/Resource/Storage/WritableFileSystemStorage.php
+++ b/TYPO3.Flow/Classes/TYPO3/Flow/Resource/Storage/WritableFileSystemStorage.php
@@ -162,10 +162,10 @@ class WritableFileSystemStorage extends FileSystemStorage implements WritableSto
if (!file_exists(dirname($finalTargetPathAndFilename))) {
Files::createDirectoryRecursively(dirname($finalTargetPathAndFilename));
}
- if (rename($temporaryFile, $finalTargetPathAndFilename) === false) {
- unlink($temporaryFile);
+ if (copy($temporaryFile, $finalTargetPathAndFilename) === false) {
throw new StorageException(sprintf('The temporary file of the file import could not be moved to the final target "%s".', $finalTargetPathAndFilename), 1381156103);
}
+ unlink($temporaryFile);
$this->fixFilePermissions($finalTargetPathAndFilename);
}
|
[FIX] temporary files move across volumes
PHP throws a operation not permitted warning when using rename across
volumes, which happens e.g. if you have FLOW_PATH_TEMPORARY_BASE pointing
to a different (more performant) volume.
|
diff --git a/lib/pickle/adapter.rb b/lib/pickle/adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/pickle/adapter.rb
+++ b/lib/pickle/adapter.rb
@@ -90,7 +90,7 @@ module Pickle
end
def create(attrs = {})
- @klass.send(:make, @blueprint, attrs)
+ @klass.send(:make!, @blueprint, attrs)
end
end
|
Fixing Machinist adaptor to work with Machinist 2
|
diff --git a/src/module-elasticsuite-catalog/Model/ResourceModel/Category/Indexer/Fulltext/Action/Full.php b/src/module-elasticsuite-catalog/Model/ResourceModel/Category/Indexer/Fulltext/Action/Full.php
index <HASH>..<HASH> 100644
--- a/src/module-elasticsuite-catalog/Model/ResourceModel/Category/Indexer/Fulltext/Action/Full.php
+++ b/src/module-elasticsuite-catalog/Model/ResourceModel/Category/Indexer/Fulltext/Action/Full.php
@@ -80,8 +80,6 @@ class Full extends Indexer
->limit($limit)
->order('e.entity_id');
- $select = $this->addActiveFilterCategoriesFilter($select);
-
return $this->connection->fetchAll($select);
}
|
Fix call to undefined method addActiveFilterCategoriesFilter during indexing.
|
diff --git a/lib/dynamoid/persistence.rb b/lib/dynamoid/persistence.rb
index <HASH>..<HASH> 100644
--- a/lib/dynamoid/persistence.rb
+++ b/lib/dynamoid/persistence.rb
@@ -146,7 +146,8 @@ module Dynamoid
# @since 0.2.0
def delete
delete_indexes
- Dynamoid::Adapter.delete(self.class.table_name, self.id)
+ options = range_key ? {:range_key => attributes[range_key]} : nil
+ Dynamoid::Adapter.delete(self.class.table_name, self.id, options)
end
# Dump this object's attributes into hash form, fit to be persisted into the datastore.
|
deleting an item now works with range fields
|
diff --git a/src/Util/Text.php b/src/Util/Text.php
index <HASH>..<HASH> 100644
--- a/src/Util/Text.php
+++ b/src/Util/Text.php
@@ -373,7 +373,7 @@ class Text
*
* @return string
*/
- function toSlug($string)
+ public static function toSlug($string)
{
$string = preg_replace('/[^\p{L}\d]+/u', '-', $string);
$string = iconv('UTF-8', 'US-ASCII//TRANSLIT', $string);
|
Bugfix (2) in phpDoc for Util methods Text::toSlug()
|
diff --git a/app/assets/javascripts/kmz_compressor/map_layer_manager.js b/app/assets/javascripts/kmz_compressor/map_layer_manager.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/kmz_compressor/map_layer_manager.js
+++ b/app/assets/javascripts/kmz_compressor/map_layer_manager.js
@@ -70,7 +70,9 @@ window.MapLayerManager = function(map){
// Returns the layer names
function layerNames(){
- return $(layers.slice(0)).map(function(){return name})
+ return $.map(layers, function(layer){
+ return layer.name
+ })
}
function addLayer(layerName, kml){
diff --git a/lib/kmz_compressor/version.rb b/lib/kmz_compressor/version.rb
index <HASH>..<HASH> 100644
--- a/lib/kmz_compressor/version.rb
+++ b/lib/kmz_compressor/version.rb
@@ -1,3 +1,3 @@
module KMZCompressor
- VERSION = "2.0.2"
+ VERSION = "2.0.3"
end
|
Fixed bug in layerNames that caused them to return a list of empty strings.
|
diff --git a/test.py b/test.py
index <HASH>..<HASH> 100644
--- a/test.py
+++ b/test.py
@@ -131,6 +131,18 @@ if not skipUnless:
return skip
return wrapper
+def requires_progs(*progs):
+ missing = []
+ for prog in progs:
+ try:
+ sh.Command(prog)
+ except sh.CommandNotFound:
+ missing.append(prog)
+
+ friendly_missing = ", ".join(missing)
+ return skipUnless(len(missing) == 0, "Missing required system programs: %s"
+ % friendly_missing)
+
requires_posix = skipUnless(os.name == "posix", "Requires POSIX")
requires_utf8 = skipUnless(sh.DEFAULT_ENCODING == "UTF-8", "System encoding must be UTF-8")
not_osx = skipUnless(not IS_OSX, "Doesn't work on OSX")
@@ -2534,6 +2546,7 @@ print("cool")
# for some reason, i can't get a good stable baseline measured in this test
# on osx. so skip it for now if osx
@not_osx
+ @requires_progs("lsof")
def test_no_fd_leak(self):
import sh
import os
|
mechanism for skipping test based on missing system bins
|
diff --git a/salt/states/mysql_user.py b/salt/states/mysql_user.py
index <HASH>..<HASH> 100644
--- a/salt/states/mysql_user.py
+++ b/salt/states/mysql_user.py
@@ -39,8 +39,9 @@ def present(name,
password_hash
The password in hashed form. Be sure to quote the password because
- YAML does't like the *
- SELECT PASSWORD('mypass') ==> *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
+ YAML does't like the ``*``::
+
+ SELECT PASSWORD('mypass') ==> *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
'''
ret = {'name': name,
'changes': {},
diff --git a/salt/states/virtualenv.py b/salt/states/virtualenv.py
index <HASH>..<HASH> 100644
--- a/salt/states/virtualenv.py
+++ b/salt/states/virtualenv.py
@@ -36,7 +36,7 @@ def managed(name,
Also accepts any kwargs that the virtualenv module will.
- .. code-block: yaml
+ .. code-block:: yaml
/var/www/myvirtualenv.com:
virtualenv.manage:
|
Fixed two reST errors in states docstrings
|
diff --git a/lib/travis/model/build.rb b/lib/travis/model/build.rb
index <HASH>..<HASH> 100644
--- a/lib/travis/model/build.rb
+++ b/lib/travis/model/build.rb
@@ -84,7 +84,7 @@ class Build < ActiveRecord::Base
end
def pushes
- joins(:request).where(requests: { event_type: ['push', '', nil] })
+ where(:event_type => 'push')
end
def pull_requests
|
No need to JOIN request to get event_type
|
diff --git a/plugins/data.headers.js b/plugins/data.headers.js
index <HASH>..<HASH> 100644
--- a/plugins/data.headers.js
+++ b/plugins/data.headers.js
@@ -260,6 +260,11 @@ exports.from_match = function (next, connection) {
if (!connection.transaction) { return next(); }
var env_addr = connection.transaction.mail_from;
+ if (!env_addr) {
+ connection.transaction.results.add(plugin, {fail: 'from_match(null)'});
+ return next();
+ }
+
var hdr_from = connection.transaction.header.get('From');
if (!hdr_from) {
connection.transaction.results.add(plugin, {fail: 'from_match(missing)'});
|
headers: skip from_match if MF is null
|
diff --git a/salt/modules/guestfs.py b/salt/modules/guestfs.py
index <HASH>..<HASH> 100644
--- a/salt/modules/guestfs.py
+++ b/salt/modules/guestfs.py
@@ -46,3 +46,4 @@ def mount(location, access='rw'):
break
cmd = 'guestmount -i -a {0} --{1} {2}'.format(location, access, root)
__salt__['cmd.run'](cmd)
+ return root
|
guestfs needs to return the path to the mount point
|
diff --git a/src/descriptors/SqliteDescriptor.php b/src/descriptors/SqliteDescriptor.php
index <HASH>..<HASH> 100644
--- a/src/descriptors/SqliteDescriptor.php
+++ b/src/descriptors/SqliteDescriptor.php
@@ -26,10 +26,10 @@ class SqliteDescriptor extends \ntentan\atiaa\Descriptor
{
$foreignKeys = [];
$pragmaColumns = $this->driver->query("pragma foreign_key_list({$table['name']})");
- foreach($pragmaColumns as $foreignKey)
+ foreach($pragmaColumns as $i => $foreignKey)
{
$foreignKeys[] = [
- 'name' => "{$table['name']}_{$foreignKey['table']}_fk",
+ 'name' => "{$table['name']}_{$foreignKey['table']}_{$i}_fk",
'schema' => $table['schema'],
'table' => $table['name'],
'column' => $foreignKey['from'],
@@ -40,6 +40,7 @@ class SqliteDescriptor extends \ntentan\atiaa\Descriptor
'on_delete' => $foreignKey['on_delete']
];
}
+
return $foreignKeys;
}
|
Added a way to get sqlite foreign keys on the same table to be represented differently.
|
diff --git a/src/main/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java b/src/main/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
index <HASH>..<HASH> 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/BinaryExpressionMultiTypeDispatcher.java
@@ -301,7 +301,7 @@ public class BinaryExpressionMultiTypeDispatcher extends BinaryExpressionHelper
operandStack.load(ClassHelper.int_TYPE, subscriptValueId);
operandStack.swap();
bew.arraySet(false);
- operandStack.remove(2);
+ operandStack.remove(3); // 3 operands, the array, the index and the value!
// load return value
operandStack.load(rightType, resultValueId);
|
fix array set operator popping error. since only 2 operators where removed, but it should have been 3, there have been possible pops from empty stacks, which can result in VerifyError
|
diff --git a/lib/figleaf/settings.rb b/lib/figleaf/settings.rb
index <HASH>..<HASH> 100644
--- a/lib/figleaf/settings.rb
+++ b/lib/figleaf/settings.rb
@@ -62,8 +62,8 @@ module Figleaf
property = YAML.load(ERB.new(IO.read(file_path)).result)
property = property[env] if env
use_hashie_if_hash(property)
- rescue Psych::SyntaxError
- raise InvalidYAML, "#{file_path} has invalid YAML"
+ rescue Psych::SyntaxError => e
+ raise InvalidYAML, "#{file_path} has invalid YAML\n" + e.message
end
def root
|
Include original message which shows where in the file the error is
|
diff --git a/tests/integration/standard/test_concurrent.py b/tests/integration/standard/test_concurrent.py
index <HASH>..<HASH> 100644
--- a/tests/integration/standard/test_concurrent.py
+++ b/tests/integration/standard/test_concurrent.py
@@ -24,6 +24,8 @@ from cassandra.query import tuple_factory, SimpleStatement
from tests.integration import use_singledc, PROTOCOL_VERSION
+from six import next
+
try:
import unittest2 as unittest
except ImportError:
@@ -151,7 +153,7 @@ class ClusterTests(unittest.TestCase):
results = self.execute_concurrent_args_helper(self.session, statement, parameters, results_generator=True)
for i in range(num_statements):
- result = results.next()
+ result = next(results)
self.assertEqual((True, [(i,)]), result)
def test_execute_concurrent_paged_result(self):
|
Fix use of next() in test_concurrent
|
diff --git a/src/psalm.php b/src/psalm.php
index <HASH>..<HASH> 100644
--- a/src/psalm.php
+++ b/src/psalm.php
@@ -193,7 +193,7 @@ Options:
If greater than one, Psalm will run analysis on multiple threads, speeding things up.
--report=PATH
- The path where to output report file. The output format is base on the file extension.
+ The path where to output report file. The output format is based on the file extension.
(Currently supported format: ".json", ".xml", ".txt", ".emacs")
--clear-cache
|
Fix typo in --help ("is base" -> "is based")
|
diff --git a/lib/Honeybadger/Logger.php b/lib/Honeybadger/Logger.php
index <HASH>..<HASH> 100644
--- a/lib/Honeybadger/Logger.php
+++ b/lib/Honeybadger/Logger.php
@@ -2,6 +2,9 @@
namespace Honeybadger;
+use \Honeybadger\Errors\NonExistentProperty;
+use \Honeybadger\Errors\ReadOnly;
+
/**
* Abstract logger. Should be extended to add support for various frameworks and
* libraries utilizing Honeybadger.
@@ -39,6 +42,25 @@ abstract class Logger {
$this->threshold = $threshold;
}
+ public function __get($key)
+ {
+ switch ($key)
+ {
+ case 'logger':
+ case 'threshold':
+ return $this->$key;
+ break;
+ default:
+ throw new NonExistentProperty($this, $key);
+ break;
+ }
+ }
+
+ public function __set($key, $value)
+ {
+ throw new ReadOnly($this);
+ }
+
/**
* Adds a new debug log entry with the supplied `$message`, replacing
* with `$variables`, if any. If the threshold is lower than
|
Allow access to wrapper logger and threshold
|
diff --git a/songtext/base.py b/songtext/base.py
index <HASH>..<HASH> 100644
--- a/songtext/base.py
+++ b/songtext/base.py
@@ -1,3 +1,4 @@
+from lxml import html
import requests
diff --git a/songtext/lyricsnmusic.py b/songtext/lyricsnmusic.py
index <HASH>..<HASH> 100644
--- a/songtext/lyricsnmusic.py
+++ b/songtext/lyricsnmusic.py
@@ -1,6 +1,9 @@
+# LYRICSnMUSIC API wrapper
+# Documentation: http://www.lyricsnmusic.com/api
+
+
import os
-from lxml import html
import requests
from base import BaseTrack, BaseTrackList
@@ -29,14 +32,6 @@ class Track(BaseTrack):
CSS_SELECTOR = "pre[itemprop='description']"
- def __init__(self, url):
- self.url = url
- self.response = requests.get(url)
-
- @property
- def html_string(self):
- return html.document_fromstring(self.response.text)
-
def get_lyrics(self):
try:
print u'{0}\n\n'.format(
|
oops, those methods are defined in BaseTrack
|
diff --git a/tests/store.js b/tests/store.js
index <HASH>..<HASH> 100644
--- a/tests/store.js
+++ b/tests/store.js
@@ -136,13 +136,7 @@ exports['should indicate async actions'] = function (test) {
};
exports['should indicate when async actions are running'] = function (test) {
- var count = 0;
- var ctrl = Lib.Controller({
- onStoreChange: function () {
- count++;
- }
- });
- ctrl.store.toggleKeepState();
+ var ctrl = Lib.Controller();
ctrl.signal('test', [function (args, state, next) {
next();
}]);
|
trying to understand why only Travis fails this test
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -65,6 +65,7 @@ def mas_net_http(response)
http.stub!(:request).and_return(response)
http.stub!(:start).and_yield(http)
http.stub!(:use_ssl=)
+ http.stub!(:verify_mode=)
http
end
|
Added :verify_mode= stub for stubbed Net::HTTP
|
diff --git a/khard/khard.py b/khard/khard.py
index <HASH>..<HASH> 100644
--- a/khard/khard.py
+++ b/khard/khard.py
@@ -542,18 +542,17 @@ def load_address_books(names, config, search_queries=None):
"""
result = []
- if names:
- # load address books which are defined in the configuration file
- for name in names:
- address_book = config.get_address_book(name, search_queries)
- if address_book is None:
- sys.exit(
- 'Error: The entered address book "{}" does not exist.\n'
- 'Possible values are: {}'.format(name, ', '.join(
- str(book) for book in config.get_all_address_books())))
- else:
- result.append(address_book)
- else:
+ # load address books which are defined in the configuration file
+ for name in names:
+ address_book = config.get_address_book(name, search_queries)
+ if address_book is None:
+ sys.exit('Error: The entered address book "{}" does not exist.\n'
+ 'Possible values are: {}'.format(name, ', '.join(
+ str(book) for book in config.get_all_address_books())))
+ else:
+ result.append(address_book)
+ # In case names were empty and the for loop did not run.
+ if not result and not names:
# load contacts of all address books
for address_book in config.get_all_address_books():
result.append(config.get_address_book(address_book.name,
|
Simplify for loop and if conditions interaction
|
diff --git a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php
+++ b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/DiffCommand.php
@@ -116,7 +116,7 @@ EOT
);
if (! $up && ! $down) {
- $output->writeln('No changes detected in your mapping information.', 'ERROR');
+ $output->writeln('No changes detected in your mapping information.');
return;
}
|
Fix writeln call when no changes are to be done (#<I>)
|
diff --git a/pachyderm/plot.py b/pachyderm/plot.py
index <HASH>..<HASH> 100644
--- a/pachyderm/plot.py
+++ b/pachyderm/plot.py
@@ -104,10 +104,14 @@ def configure() -> None:
# why that might be preferable here.
# Setup the LaTeX preamble
- # Enable AMS math package (for among other things, "\text")
- matplotlib.rcParams["text.latex.preamble"].append(r"\usepackage{amsmath}")
- # Add fonts that will be used below. See the `mathtext` fonts set below for further info.
- matplotlib.rcParams["text.latex.preamble"].append(r"\usepackage{sfmath}")
+ matplotlib.rcParams["text.latex.preamble"] = [
+ # Enable AMS math package (for among other things, "\text")
+ r"\usepackage{amsmath}",
+ # Add fonts that will be used below. See the `mathtext` fonts set below for further info.
+ r"\usepackage{sfmath}",
+ # Ensure that existing values are included.
+ matplotlib.rcParams["text.latex.preamble"],
+ ]
params = {
# Enable latex
"text.usetex": True,
|
Fix for latex preamble changes in MPL <I>
Now it cannot be appended to directly. Instead, we have to set a list
and explicitly add the previous values
|
diff --git a/src/Service/Sale/Order/Delete.php b/src/Service/Sale/Order/Delete.php
index <HASH>..<HASH> 100644
--- a/src/Service/Sale/Order/Delete.php
+++ b/src/Service/Sale/Order/Delete.php
@@ -109,6 +109,7 @@ class Delete
if ($cleanDb) {
/* TODO: move PV related stuff to PV module */
$this->removeSalePv($saleId);
+ $this->removeSaleGrid($saleId);
$this->removeSale($saleId);
}
}
@@ -155,6 +156,13 @@ class Delete
$this->repoGeneric->deleteEntityByPk($entity, $id);
}
+ private function removeSaleGrid($saleId)
+ {
+ $entity = Cfg::ENTITY_MAGE_SALES_ORDER_GRID;
+ $id = [Cfg::E_SALE_ORDER_GRID_A_ENTITY_ID => $saleId];
+ $this->repoGeneric->deleteEntityByPk($entity, $id);
+ }
+
private function removeSaleItem($saleItemId)
{
$entity = Cfg::ENTITY_MAGE_SALES_ORDER_ITEM;
|
MOBI-<I>
Delete order operation
|
diff --git a/lib/capnotify.rb b/lib/capnotify.rb
index <HASH>..<HASH> 100644
--- a/lib/capnotify.rb
+++ b/lib/capnotify.rb
@@ -39,7 +39,7 @@ module Capnotify
_cset(:capnotify_appname) do
name = [ fetch(:application, nil), fetch(:stage, nil) ].compact.join(" ")
if fetch(:branch, nil)
- name = "name / #{ branch }"
+ name = "#{ name } / #{ branch }"
end
name
end
diff --git a/lib/capnotify/version.rb b/lib/capnotify/version.rb
index <HASH>..<HASH> 100644
--- a/lib/capnotify/version.rb
+++ b/lib/capnotify/version.rb
@@ -1,3 +1,3 @@
module Capnotify
- VERSION = "0.1.3pre"
+ VERSION = "0.1.4pre"
end
diff --git a/spec/capnotify_spec.rb b/spec/capnotify_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/capnotify_spec.rb
+++ b/spec/capnotify_spec.rb
@@ -178,6 +178,14 @@ describe Capnotify do
config.set :branch, 'mybranch'
end
+ it "should include the application name" do
+ config.capnotify_appname.should match(/SimpleApp/)
+ end
+
+ it "should include the stage name" do
+ config.capnotify_appname.should match(/production/)
+ end
+
it "should contain the branch name" do
config.capnotify_appname.should match(/mybranch/)
end
|
fixed capnotify_appname when branch is specified
had a typo where it was putting "name" in the name if the branch was
specified
|
diff --git a/gridmap/job.py b/gridmap/job.py
index <HASH>..<HASH> 100644
--- a/gridmap/job.py
+++ b/gridmap/job.py
@@ -752,8 +752,10 @@ def _append_job_to_session(session, job, temp_dir='/scratch/', quiet=True):
# set job fields that depend on the job_id assigned by grid engine
job.id = job_id
- job.log_stdout_fn = os.path.join(temp_dir, '{}.o{}'.format(job.name, job_id))
- job.log_stderr_fn = os.path.join(temp_dir, '{}.e{}'.format(job.name, job_id))
+ job.log_stdout_fn = os.path.join(temp_dir, '{}.o{}'.format(job.name,
+ job_id))
+ job.log_stderr_fn = os.path.join(temp_dir, '{}.e{}'.format(job.name,
+ job_id))
if not quiet:
print('Your job {} has been submitted with id {}'.format(job.name,
|
PEP8 compliance in job.py
|
diff --git a/validator_test.go b/validator_test.go
index <HASH>..<HASH> 100644
--- a/validator_test.go
+++ b/validator_test.go
@@ -1878,6 +1878,9 @@ func TestErrorsByField(t *testing.T) {
post := &Post{Title: "My123", Message: "duck13126", AuthorIP: "123"}
_, err := ValidateStruct(post)
errs := ErrorsByField(err)
+ if len(errs) != 2 {
+ t.Errorf("There should only be 2 errors but got %v", len(errs))
+ }
for _, test := range tests {
if actual, ok := errs[test.param]; !ok || actual != test.expected {
|
Added additional test to check for the number of errors returned to be correct.
|
diff --git a/lib/flapjack/applications/worker.rb b/lib/flapjack/applications/worker.rb
index <HASH>..<HASH> 100644
--- a/lib/flapjack/applications/worker.rb
+++ b/lib/flapjack/applications/worker.rb
@@ -53,7 +53,7 @@ module Flapjack
class_name = config[:type].to_s.camel_case
filename = File.join(basedir, "#{config[:type]}.rb")
- @log.info("Loading the #{class_name} transport")
+ @log.info("Loading the #{class_name} transport for queue: #{queue_name}.")
begin
require filename
|
log which queue name we're connecting to
|
diff --git a/vaex/multithreading.py b/vaex/multithreading.py
index <HASH>..<HASH> 100644
--- a/vaex/multithreading.py
+++ b/vaex/multithreading.py
@@ -111,6 +111,11 @@ class ThreadPoolIndex(object):
done = yielded == count
return results
finally:
+ # clean up in case of an exception
+ for other_job in alljobs:
+ other_job.cancel()
+ while not self.queue_out.empty():
+ self.queue_out.get()
self._working = False
#self.jobs = []
self.new_jobs_event.clear()
|
cleanup on exit, for instance ctrl-c in notebook
|
diff --git a/src/crypto/index.js b/src/crypto/index.js
index <HASH>..<HASH> 100644
--- a/src/crypto/index.js
+++ b/src/crypto/index.js
@@ -951,6 +951,15 @@ Crypto.prototype.forceDiscardSession = function(roomId) {
* the device query is always inhibited as the members are not tracked.
*/
Crypto.prototype.setRoomEncryption = async function(roomId, config, inhibitDeviceQuery) {
+ // ignore crypto events with no algorithm defined
+ // This will happen if a crypto event is redacted before we fetch the room state
+ // It would otherwise just throw later as an unknown algorithm would, but we may
+ // as well catch this here
+ if (!config.algorithm) {
+ console.log("Ignoring setRoomEncryption with no algorithm");
+ return;
+ }
+
// if state is being replayed from storage, we might already have a configuration
// for this room as they are persisted as well.
// We just need to make sure the algorithm is initialized in this case.
|
Ignore crypto events with no content
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -161,6 +161,7 @@ module.exports = function(grunt) {
grunt.registerTask("default", ["newer:copy:build", "mkdir:build",
"newer:shell:regexp",
"newer:fix_jison:regexp",
+ "npmignore",
"chmod"]);
grunt.registerMultiTask("fix_jison", function () {
@@ -180,6 +181,12 @@ module.exports = function(grunt) {
return undefined;
});
+ grunt.registerTask("npmignore", function () {
+ var data = "bin/parse.js";
+ fs.writeFileSync("build/dist/.npmignore", data);
+ });
+
+
grunt.registerTask("copy_jsdoc_template",
["copy:jsdoc_template_defaults",
"copy:publish_js", "copy:layout_tmpl",
|
Added the npmignore task.
|
diff --git a/lib/listeners/history.js b/lib/listeners/history.js
index <HASH>..<HASH> 100644
--- a/lib/listeners/history.js
+++ b/lib/listeners/history.js
@@ -1,4 +1,3 @@
-#!/usr/bin/env node
//
// lib/listeners/history.js
//
@@ -11,4 +10,12 @@
exports = module.exports = function (app) {
+ var $ = require('jquery-browserify')
+
+ $(document).ready(function () {
+ }
+
+ window.onpopstate = function (event) {
+ console.log('Location: '+ document.location +', state: '+ JSON.stringify(event.state))
+ }
}
\ No newline at end of file
|
Added a little debugger info for now.
|
diff --git a/gosu-core/src/main/java/gw/internal/gosu/ir/transform/AbstractElementTransformer.java b/gosu-core/src/main/java/gw/internal/gosu/ir/transform/AbstractElementTransformer.java
index <HASH>..<HASH> 100644
--- a/gosu-core/src/main/java/gw/internal/gosu/ir/transform/AbstractElementTransformer.java
+++ b/gosu-core/src/main/java/gw/internal/gosu/ir/transform/AbstractElementTransformer.java
@@ -1014,7 +1014,8 @@ public abstract class AbstractElementTransformer<T extends IParsedElement>
}
else
{
- return nullLiteral();
+ // Note we cast the Null value to make ASM's stack map frame calculations work, otherwise ASM has a bug where it calculates the wrong type
+ return checkCast( type, nullLiteral() );
}
}
|
cast null value for implicit local var initialization, this is purely for ASM's stack map frame calculations, otherwise ASM has a bug where it determines the wrong type which may cause a bytecode verify error
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -81,7 +81,7 @@ var createScheduler = function createScheduler(optName) {
var length = this.schedulablesList.push(object);
var index = length - 1;
var name = object.name ? object.name : object.schedulingID;
- console.log("Scheduling element #" + index + ' \"' + name + '\"');
+ console.log("add():", this.name, "scheduling element #" + index + ' \"' + name + '\"');
if (!this.isRunning) {
// this.resetAll();
}
|
Cleaned up a bunch of console.log() debugging messages.
|
diff --git a/lib/async.js b/lib/async.js
index <HASH>..<HASH> 100644
--- a/lib/async.js
+++ b/lib/async.js
@@ -39,20 +39,18 @@
};
function only_once(fn) {
- var called = false;
return function() {
- if (called) throw new Error("Callback was already called.");
- called = true;
+ if (fn === null) throw new Error("Callback was already called.");
fn.apply(this, arguments);
+ fn = null;
};
}
function _once(fn) {
- var called = false;
return function() {
- if (called) return;
- called = true;
+ if (fn === null) return;
fn.apply(this, arguments);
+ fn = null;
};
}
|
once: ensure fn is gced
|
diff --git a/python/orca/src/bigdl/orca/data/elastic_search.py b/python/orca/src/bigdl/orca/data/elastic_search.py
index <HASH>..<HASH> 100644
--- a/python/orca/src/bigdl/orca/data/elastic_search.py
+++ b/python/orca/src/bigdl/orca/data/elastic_search.py
@@ -43,7 +43,7 @@ class elastic_search:
sqlContext = SQLContext.getOrCreate(sc)
spark = sqlContext.sparkSession
- reader = spark.read_df.format("org.elasticsearch.spark.sql")
+ reader = spark.read.format("org.elasticsearch.spark.sql")
for key in esConfig:
reader.option(key, esConfig[key])
|
fix es_read typo (#<I>)
|
diff --git a/builtin/providers/aws/resource_aws_route53_record_test.go b/builtin/providers/aws/resource_aws_route53_record_test.go
index <HASH>..<HASH> 100644
--- a/builtin/providers/aws/resource_aws_route53_record_test.go
+++ b/builtin/providers/aws/resource_aws_route53_record_test.go
@@ -50,7 +50,7 @@ func TestExpandRecordName(t *testing.T) {
}
}
-func TestAccRoute53Record(t *testing.T) {
+func TestAccRoute53Record_basic(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
|
provider/aws: Change Route <I> record test name, so it can be ran individually
|
diff --git a/src/CornerstoneViewport/CornerstoneViewport.js b/src/CornerstoneViewport/CornerstoneViewport.js
index <HASH>..<HASH> 100644
--- a/src/CornerstoneViewport/CornerstoneViewport.js
+++ b/src/CornerstoneViewport/CornerstoneViewport.js
@@ -107,7 +107,6 @@ class CornerstoneViewport extends Component {
imageIdIndex, // Maybe
imageProgress: 0,
isLoading: true,
- numImagesLoaded: 0,
error: null,
// Overlay
scale: undefined,
@@ -127,6 +126,8 @@ class CornerstoneViewport extends Component {
this.startLoadHandler = this.props.startLoadHandler;
this.endLoadHandler = this.props.endLoadHandler;
this.loadHandlerTimeout = undefined; // "Loading..." timer
+
+ this.numImagesLoaded = 0;
}
// ~~ LIFECYCLE
@@ -686,9 +687,7 @@ class CornerstoneViewport extends Component {
onImageLoaded = () => {
// TODO: This is not necessarily true :thinking:
// We need better cache reporting a layer up
- this.setState({
- numImagesLoaded: this.state.numImagesLoaded + 1,
- });
+ this.numImagesLoaded++;
};
onImageProgress = e => {
|
fix: shift numImages out of state to avoid re-renders (unused)
|
diff --git a/lib/s3sync/sync.rb b/lib/s3sync/sync.rb
index <HASH>..<HASH> 100644
--- a/lib/s3sync/sync.rb
+++ b/lib/s3sync/sync.rb
@@ -306,7 +306,9 @@ module S3Sync
# etag comes back with quotes (obj.etag.inspcet # => "\"abc...def\""
small_comparator = lambda { obj.etag[/[a-z0-9]+/] }
node = Node.new(location.path, obj.key, obj.content_length, small_comparator)
- nodes[node.path] = node
+ # The key is relative path from dir.
+ key = node.path[(dir || "").length,node.path.length - 1]
+ nodes[key] = node
end
return nodes
end
|
Use relative path for node check key in S3 files.
|
diff --git a/src/main/java/org/activiti/camel/ActivitiComponent.java b/src/main/java/org/activiti/camel/ActivitiComponent.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/activiti/camel/ActivitiComponent.java
+++ b/src/main/java/org/activiti/camel/ActivitiComponent.java
@@ -23,8 +23,11 @@ public class ActivitiComponent extends DefaultComponent {
private RuntimeService runtimeService;
- public ActivitiComponent(CamelContext context) {
- super(context);
+ public ActivitiComponent() {}
+
+ @Override
+ public void setCamelContext(CamelContext context) {
+ super.setCamelContext(context);
runtimeService = getByType(context, RuntimeService.class);
}
|
ACT-<I> added blueprint support in activiti-camel
|
diff --git a/lib/sprockets/processing.rb b/lib/sprockets/processing.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/processing.rb
+++ b/lib/sprockets/processing.rb
@@ -202,7 +202,9 @@ module Sprockets
processors += config[:postprocessors][type]
if type != file_type && processor = transformers[file_type][type]
+ processors += config[:preprocessors][type]
processors += [processor]
+ processors += config[:postprocessors][file_type]
end
processors += engine_extnames.map { |ext| engines[ext] }
diff --git a/test/test_environment.rb b/test/test_environment.rb
index <HASH>..<HASH> 100644
--- a/test/test_environment.rb
+++ b/test/test_environment.rb
@@ -619,7 +619,7 @@ class TestEnvironment < Sprockets::TestCase
assert asset = @env.find_asset("logo.png")
assert_equal "image/png", asset.content_type
- assert_equal [:pre_svg, :post_png], asset.metadata[:test]
+ assert_equal [:pre_svg, :post_svg, :pre_png, :post_png], asset.metadata[:test]
end
test "access selector count metadata" do
|
Include pre/post when running transformers
|
diff --git a/cake/libs/configure.php b/cake/libs/configure.php
index <HASH>..<HASH> 100644
--- a/cake/libs/configure.php
+++ b/cake/libs/configure.php
@@ -893,7 +893,9 @@ class App extends Object {
continue;
}
if (!isset($_this->__paths[$path])) {
- $_this->import('Folder');
+ if (!class_exists('Folder')) {
+ require LIBS . 'folder.php';
+ }
$Folder =& new Folder();
$directories = $Folder->tree($path, false, 'dir');
$_this->__paths[$path] = $directories;
|
Changing how Folder Class is loaded. Fixes infinite loops resulting in segfault under apache 2 when Cache.disable = true and debug = 0. Closes #<I>
git-svn-id: <URL>
|
diff --git a/src/Definition/Plugin/NamespaceDefinitionPlugin.php b/src/Definition/Plugin/NamespaceDefinitionPlugin.php
index <HASH>..<HASH> 100644
--- a/src/Definition/Plugin/NamespaceDefinitionPlugin.php
+++ b/src/Definition/Plugin/NamespaceDefinitionPlugin.php
@@ -216,7 +216,11 @@ class NamespaceDefinitionPlugin extends AbstractDefinitionPlugin
$name = lcfirst($namespace);
$typeName = ucfirst($namespace).(($definition instanceof MutationDefinition) ? $mutationSuffix : $querySuffix);
if (!$root) {
- $root = $this->createRootNamespace(\get_class($definition), $name, $typeName, $endpoint);
+ if (isset($namespacedDefinitions[$name])) {
+ $root = $namespacedDefinitions[$name];
+ } else {
+ $root = $this->createRootNamespace(\get_class($definition), $name, $typeName, $endpoint);
+ }
$parent = $endpoint->getType($root->getType());
$namespacedDefinitions[$root->getName()] = $root;
} else {
|
fix: does not override operations using the same namespace
|
diff --git a/src/runner.js b/src/runner.js
index <HASH>..<HASH> 100644
--- a/src/runner.js
+++ b/src/runner.js
@@ -389,7 +389,11 @@ async function runTest(test, logs) {
} else {
file.passCount += 1
if (runner.verbose) {
- logs.prepend(indent + huey.green('✦ ') + getTestName(test) + '\n')
+ if (logs.length) {
+ logs.ln()
+ logs.prepend('')
+ }
+ logs.prepend(indent + huey.green('✦ ') + getTestName(test))
} else {
logs.quiet = true
}
@@ -455,10 +459,10 @@ async function runGroup(group) {
logs = mockConsole(true)
logs.quiet = runner.quiet
}
- log('')
try {
await runAll(group.afterEach)
} finally {
+ logs.ln()
logs.exec()
}
} else if (test.fn) {
|
fix: ensure an empty line exists between sections
Where "sections" refers to:
- test names
- test logs
- test errors
- beforeEach logs
- afterEach logs
NOTE: If a test has no logs, no empty line will exist between its name and the next test's name.
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -25,6 +25,10 @@ async function prompt(questions=[], { onSubmit=noop, onCancel=noop }={}) {
continue; // take val & run
}
+ if (typeof question.message !== 'string') {
+ throw new Error('prompt message is required');
+ }
+
// if property is a function, invoke it unless it's ignored
for (key in question) {
if (ignore.includes(key)) continue;
diff --git a/lib/prompts.js b/lib/prompts.js
index <HASH>..<HASH> 100644
--- a/lib/prompts.js
+++ b/lib/prompts.js
@@ -4,10 +4,6 @@ const el = require('./elements');
const noop = v => v;
function toPrompt(type, args, opts={}) {
- if (typeof args.message !== 'string') {
- throw new Error('message is required');
- }
-
return new Promise((res, rej) => {
const p = new el[type](args);
const onAbort = opts.onAbort || noop;
|
move `o.message` throw into main loop
|
diff --git a/pkg/api/api.go b/pkg/api/api.go
index <HASH>..<HASH> 100644
--- a/pkg/api/api.go
+++ b/pkg/api/api.go
@@ -245,7 +245,7 @@ func Register(r *macaron.Macaron) {
r.Put("/:alertId/state", bind(m.UpdateAlertStateCommand{}), wrap(PutAlertState))
r.Get("/:alertId", ValidateOrgAlert, wrap(GetAlert))
- r.Delete("/:alertId", ValidateOrgAlert, wrap(DelAlert))
+ //r.Delete("/:alertId", ValidateOrgAlert, wrap(DelAlert)) disabled until we know how to handle it dashboard updates
r.Get("/", wrap(GetAlerts))
})
|
tech(alerting): disable DEL for alert rules in the api
|
diff --git a/src/Model/User.php b/src/Model/User.php
index <HASH>..<HASH> 100644
--- a/src/Model/User.php
+++ b/src/Model/User.php
@@ -2180,7 +2180,11 @@ class User extends Base
$oEmail->data = new \stdClass();
// Add required user data to the email
- $oEmail->data->user->username = $aUserData['username'];
+ $oEmail->data = (object) [
+ 'user' => (object) [
+ 'username' => $aUserData['username']
+ ]
+ ];
// If this user is created by an admin then take note of that.
if ($this->isAdmin() && $this->activeUser('id') != $iId) {
|
Improving the way the email data object is built
|
diff --git a/Tests/Config/Processor/InheritanceProcessorTest.php b/Tests/Config/Processor/InheritanceProcessorTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Config/Processor/InheritanceProcessorTest.php
+++ b/Tests/Config/Processor/InheritanceProcessorTest.php
@@ -17,7 +17,7 @@ class InheritanceProcessorTest extends TestCase
/**
* @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Type "toto" inherits by "bar" not found.
+ * @expectedExceptionMessage Type "toto" inherited by "bar" not found.
*/
public function testExtendsUnknownType()
{
@@ -53,7 +53,7 @@ class InheritanceProcessorTest extends TestCase
/**
* @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Type "toto" can't inherits "bar" because "enum" is not allowed type (["object","interface"]).
+ * @expectedExceptionMessage Type "bar" can't inherit "toto" because its type ("enum") is not allowed type (["object","interface"]).
*/
public function testNotAllowedType()
{
|
Update InheritanceProcessorTest.php
|
diff --git a/js/whitebit.js b/js/whitebit.js
index <HASH>..<HASH> 100644
--- a/js/whitebit.js
+++ b/js/whitebit.js
@@ -1021,12 +1021,12 @@ module.exports = class whitebit extends Exchange {
let method = 'v4PrivatePostMainAccountAddress';
if (this.isFiat (code)) {
method = 'v4PrivatePostMainAccountFiatDepositUrl';
- const provider = this.safeNumber2 (params, 'provider');
+ const provider = this.safeNumber (params, 'provider');
if (provider === undefined) {
throw new ArgumentsRequired (this.id + ' fetchDepositAddress() requires a provider when the ticker is fiat');
}
request['provider'] = provider;
- const amount = this.safeNumber2 (params, 'amount');
+ const amount = this.safeNumber (params, 'amount');
if (amount === undefined) {
throw new ArgumentsRequired (this.id + ' fetchDepositAddress() requires an amount when the ticker is fiat');
}
|
safeNumber2 -> safeNumber
|
diff --git a/webroot/js/cart.js b/webroot/js/cart.js
index <HASH>..<HASH> 100644
--- a/webroot/js/cart.js
+++ b/webroot/js/cart.js
@@ -445,6 +445,9 @@ foodcoopshop.Cart = {
},
getCartProductHtml: function (productId, amount, price, productName, unity, manufacturerLink, image, deposit, tax, timebasedCurrencyHours, orderedQuantityInUnits, unitName, unitAmount, priceInclPerUnit, pickupDay) {
+
+ priceInclPerUnit = parseFloat(priceInclPerUnit);
+
var imgHtml = '<span class="image">' + image + '</span>';
if (!$(image).attr('src').match(/de-default-home/)) {
imgHtml = '<a href="javascript:void(0);" data-modal-title="' + productName + '" data-modal-image="' + $(image).attr('src').replace(/-home_/, '-thickbox_') + '" class="image">' + image + '</a>';
|
fix: entering weight multiple times causes wrong price
|
diff --git a/lib/conditions/predefined.js b/lib/conditions/predefined.js
index <HASH>..<HASH> 100644
--- a/lib/conditions/predefined.js
+++ b/lib/conditions/predefined.js
@@ -62,7 +62,8 @@ module.exports = [
type: 'object',
properties: {
pattern: {
- type: 'string'
+ type: 'string',
+ format: 'regex'
}
},
required: ['pattern']
@@ -94,8 +95,13 @@ module.exports = [
type: 'object',
properties: {
methods: {
- type: ['string', 'array'],
- items: { type: 'string' }
+ anyOf: [{
+ type: 'string',
+ enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']
+ }, {
+ type: 'array',
+ items: { type: 'string', enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'] }
+ }]
}
},
required: ['methods']
|
Tweak some JSON Schemas
|
diff --git a/juicer/juicer/Juicer.py b/juicer/juicer/Juicer.py
index <HASH>..<HASH> 100644
--- a/juicer/juicer/Juicer.py
+++ b/juicer/juicer/Juicer.py
@@ -199,7 +199,7 @@ class Juicer(object):
cart.load(cart_name)
else:
cln = juicer.utils.get_login_info()[1]['start_in']
- cart = juicer.utils.cart_db()[cln].find_one({'_id': cart_name})
+ cart = juicer.common.Cart.Cart(juicer.utils.cart_db()[cln].find_one({'_id': {'$regex': cart_name}}))
return str(cart)
def list(self, cart_glob=['*.json']):
|
`juicer show` will check remote carts via regex for #<I>
this uses mongodb regex syntax
|
diff --git a/start.py b/start.py
index <HASH>..<HASH> 100644
--- a/start.py
+++ b/start.py
@@ -6,7 +6,8 @@ template = """
<th style="text-align:center">AiiDA Lab widgets</th>
<tr>
<td valign="top"><ul>
- <li><a href="{appbase}/structures.ipynb" target="_blank">Dealing with structures</a></li>
+ <li><a href="{appbase}/structures.ipynb" target="_blank">Dealing with one structure</a></li>
+ <li><a href="{appbase}/structures_multi.ipynb" target="_blank">Dealing with multiple structures</a></li>
<li><a href="{appbase}/example.ipynb" target="_blank">Dealing with codes</a></li>
</ul></td>
</tr>
|
Add reference to structures_muli.ipynb in start.py
|
diff --git a/lib/cli/cli.js b/lib/cli/cli.js
index <HASH>..<HASH> 100644
--- a/lib/cli/cli.js
+++ b/lib/cli/cli.js
@@ -206,6 +206,18 @@ module.exports.parseCommandLine = function parseCommandLine() {
'A URL that will be accessed first by the browser before the URL that you wanna analyze. Use it to fill the cache.',
group: 'Browser'
})
+ .option('browsertime.preScript', {
+ alias: 'preScript',
+ describe:
+ 'Selenium script(s) to run before you test your URL. They will run outside of the analyze phase. Note that --preScript can be passed multiple times.',
+ group: 'Browser'
+ })
+ .option('browsertime.postScript', {
+ alias: 'postScript',
+ describe:
+ 'Selenium script(s) to run after you test your URL. They will run outside of the analyze phase. Note that --postScript can be passed multiple times.',
+ group: 'Browser'
+ })
.option('browsertime.delay', {
alias: 'delay',
describe:
|
Adding back the pre/post script (#<I>)
|
diff --git a/builtin/providers/consul/attr_writer_map.go b/builtin/providers/consul/attr_writer_map.go
index <HASH>..<HASH> 100644
--- a/builtin/providers/consul/attr_writer_map.go
+++ b/builtin/providers/consul/attr_writer_map.go
@@ -3,7 +3,6 @@ package consul
import (
"fmt"
"strconv"
- "strings"
"github.com/hashicorp/terraform/helper/schema"
)
@@ -49,18 +48,6 @@ func (w *_AttrWriterMap) SetFloat64(name _SchemaAttr, f float64) error {
func (w *_AttrWriterMap) SetList(name _SchemaAttr, l []interface{}) error {
panic(fmt.Sprintf("PROVIDER BUG: Cat set a list within a map for %s", name))
- out := make([]string, 0, len(l))
- for i, v := range l {
- switch u := v.(type) {
- case string:
- out[i] = u
- default:
- panic(fmt.Sprintf("PROVIDER BUG: SetList type %T not supported (%#v)", v, v))
- }
- }
-
- (*w.m)[string(name)] = strings.Join(out, ", ")
- return nil
}
func (w *_AttrWriterMap) SetMap(name _SchemaAttr, m map[string]interface{}) error {
|
Remove stale code that would never be called at present.
|
diff --git a/src/TerminalObject/Dynamic/Checkbox/Checkbox.php b/src/TerminalObject/Dynamic/Checkbox/Checkbox.php
index <HASH>..<HASH> 100644
--- a/src/TerminalObject/Dynamic/Checkbox/Checkbox.php
+++ b/src/TerminalObject/Dynamic/Checkbox/Checkbox.php
@@ -174,6 +174,9 @@ class Checkbox
protected function getPaddingString($line)
{
$length = $this->util->width() - $this->lengthWithoutTags($line);
+ if ($length < 1) {
+ return '';
+ }
return str_repeat(' ', $length);
}
|
Don't try add padding if the there's no spare space
|
diff --git a/lib/acyclic.js b/lib/acyclic.js
index <HASH>..<HASH> 100644
--- a/lib/acyclic.js
+++ b/lib/acyclic.js
@@ -1,7 +1,9 @@
+var util = require("./util");
+
module.exports = acyclic;
module.exports.undo = undo;
-function acyclic(g, debugLevel) {
+function acyclic(g) {
var onStack = {},
visited = {},
reverseCount = 0;
@@ -34,9 +36,8 @@ function acyclic(g, debugLevel) {
g.eachNode(function(u) { dfs(u); });
- if (debugLevel >= 2) {
- console.log("Acyclic Phase: reversed " + reverseCount + " edge(s)");
- }
+ util.log(2, "Acyclic Phase: reversed " + reverseCount + " edge(s)");
+
return reverseCount;
}
|
Use util.log for logging in acyclic phase
|
diff --git a/rows/utils/__init__.py b/rows/utils/__init__.py
index <HASH>..<HASH> 100644
--- a/rows/utils/__init__.py
+++ b/rows/utils/__init__.py
@@ -394,6 +394,7 @@ def download_file(
chunk_size=8192,
sample_size=1048576,
retries=3,
+ progress_pattern="Downloading file"
):
# TODO: add ability to continue download
@@ -422,15 +423,26 @@ def download_file(
_, options = cgi.parse_header(headers["content-disposition"])
real_filename = options.get("filename", real_filename)
- if progress:
- total = response.headers.get("content-length", None)
- total = int(total) if total else None
- progress_bar = ProgressBar(prefix="Downloading file", total=total, unit="bytes")
if filename is None:
tmp = tempfile.NamedTemporaryFile(delete=False)
fobj = open_compressed(tmp.name, mode="wb")
else:
fobj = open_compressed(filename, mode="wb")
+
+ if progress:
+ total = response.headers.get("content-length", None)
+ total = int(total) if total else None
+ progress_bar = ProgressBar(
+ prefix=progress_pattern.format(
+ uri=uri,
+ filename=Path(fobj.name),
+ mime_type=mime_type,
+ encoding=encoding,
+ ),
+ total=total,
+ unit="bytes",
+ )
+
sample_data = b""
for data in response.iter_content(chunk_size=chunk_size):
fobj.write(data)
|
Add custom progress bar pattern to download_file
|
diff --git a/lib/cql/version.rb b/lib/cql/version.rb
index <HASH>..<HASH> 100644
--- a/lib/cql/version.rb
+++ b/lib/cql/version.rb
@@ -1,4 +1,4 @@
module CQL
# The current version of the gem
- VERSION = '1.5.0'
+ VERSION = '1.5.1'
end
|
Bump gem version
Incrementing the version for the upcoming release.
|
diff --git a/nipap/nipap/nipapconfig.py b/nipap/nipap/nipapconfig.py
index <HASH>..<HASH> 100644
--- a/nipap/nipap/nipapconfig.py
+++ b/nipap/nipap/nipapconfig.py
@@ -26,7 +26,7 @@ class NipapConfig(ConfigParser.SafeConfigParser):
# First time - create new instance!
self._cfg_path = cfg_path
- ConfigParser.ConfigParser.__init__(self, default)
+ ConfigParser.SafeConfigParser.__init__(self, default)
self.read_file()
|
backend: use SafeConfigParser
nipapconfig uses SafeConfigParser as base class but used the __init__
function from the non-Safe parser. Let's go all Safe!
|
diff --git a/elasticsearch-model/test/test_helper.rb b/elasticsearch-model/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/elasticsearch-model/test/test_helper.rb
+++ b/elasticsearch-model/test/test_helper.rb
@@ -30,7 +30,7 @@ module Elasticsearch
class IntegrationTestCase < ::Test::Unit::TestCase
extend Elasticsearch::Extensions::Test::StartupShutdown
- startup { Elasticsearch::TestCluster.start if ENV['SERVER'] and not Elasticsearch::TestCluster.running? }
+ startup { Elasticsearch::Extensions::Test::Cluster.start if ENV['SERVER'] and not Elasticsearch::Extensions::Test::Cluster.running? }
shutdown { Elasticsearch::Extensions::Test::Cluster.stop if ENV['SERVER'] && started? }
context "IntegrationTest" do; should "noop on Ruby 1.8" do; end; end if RUBY_1_8
|
[MODEL] Correct launching of test server in test helper
|
diff --git a/lib/Cake/Log/CakeLog.php b/lib/Cake/Log/CakeLog.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Log/CakeLog.php
+++ b/lib/Cake/Log/CakeLog.php
@@ -19,39 +19,6 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-/**
- * Set up error level constants to be used within the framework if they are not defined within the
- * system.
- *
- */
-if (!defined('LOG_EMERG')) {
- define('LOG_EMERG', 0);
-}
-if (!defined('LOG_ALERT')) {
- define('LOG_ALERT', 1);
-}
-if (!defined('LOG_CRIT')) {
- define('LOG_CRIT', 2);
-}
-if (!defined('LOG_ERR')) {
- define('LOG_ERR', 3);
-}
-if (!defined('LOG_ERROR')) {
- define('LOG_ERROR', LOG_ERR);
-}
-if (!defined('LOG_WARNING')) {
- define('LOG_WARNING', 4);
-}
-if (!defined('LOG_NOTICE')) {
- define('LOG_NOTICE', 5);
-}
-if (!defined('LOG_INFO')) {
- define('LOG_INFO', 6);
-}
-if (!defined('LOG_DEBUG')) {
- define('LOG_DEBUG', 7);
-}
-
App::uses('LogEngineCollection', 'Log');
/**
|
removing unneeded LOG_* constant checks
|
diff --git a/db/migrate/20121102142657_create_task_manager_assignables.rb b/db/migrate/20121102142657_create_task_manager_assignables.rb
index <HASH>..<HASH> 100644
--- a/db/migrate/20121102142657_create_task_manager_assignables.rb
+++ b/db/migrate/20121102142657_create_task_manager_assignables.rb
@@ -1,13 +1,13 @@
class CreateTaskManagerAssignables < ActiveRecord::Migration
def change
create_table :task_manager_assignables do |t|
- t.belongs_to :plan
+ t.belongs_to :target, polymorphic: true
t.belongs_to :assignee, polymorphic: true
t.timestamps
end
add_index :task_manager_assignables, [:assignee_id, :assignee_type]
- add_index :task_manager_assignables, :plan_id
+ add_index :task_manager_assignables, [:target_id, :target_type]
end
end
|
Assignable should have targets with different types
|
diff --git a/pyblish_qml/rest.py b/pyblish_qml/rest.py
index <HASH>..<HASH> 100644
--- a/pyblish_qml/rest.py
+++ b/pyblish_qml/rest.py
@@ -1,5 +1,4 @@
import json
-from vendor import requests
ADDRESS = "http://127.0.0.1:{port}/pyblish/v1{endpoint}"
PORT = 6000
@@ -7,6 +6,7 @@ MOCK = None
def request(verb, endpoint, data=None, **kwargs):
+ from vendor import requests
endpoint = ADDRESS.format(port=PORT, endpoint=endpoint)
request = getattr(MOCK or requests, verb.lower())
|
Deferring heavy import of requests library.
|
diff --git a/mux_command.go b/mux_command.go
index <HASH>..<HASH> 100644
--- a/mux_command.go
+++ b/mux_command.go
@@ -132,8 +132,7 @@ func (m *CommandMux) HandleEvent(c *Client, e *Event) {
}
// Copy it into a new Event
- newEvent := &Event{}
- *newEvent = *e
+ newEvent := e.Copy()
// Chop off the command itself
msgParts := strings.SplitN(lastArg, " ", 2)
diff --git a/mux_mention.go b/mux_mention.go
index <HASH>..<HASH> 100644
--- a/mux_mention.go
+++ b/mux_mention.go
@@ -53,8 +53,7 @@ func (m *MentionMux) HandleEvent(c *Client, e *Event) {
}
// Copy it into a new Event
- newEvent := &Event{}
- *newEvent = *e
+ newEvent := e.Copy()
// Strip the nick, punctuation, and spaces from the message
newEvent.Args[len(newEvent.Args)-1] = strings.TrimSpace(lastArg[len(nick)+1:])
|
Use Event.Copy() in the new muxes
|
diff --git a/app/js/lib/conf/routes.js b/app/js/lib/conf/routes.js
index <HASH>..<HASH> 100644
--- a/app/js/lib/conf/routes.js
+++ b/app/js/lib/conf/routes.js
@@ -170,8 +170,8 @@ module.exports = (app) => {
state('main.settings.currency', {
url: '/currency',
resolve: {
- conf: (bmapi) => co(function *() {
- return bmapi.currency.parameters();
+ conf: (summary) => co(function *() {
+ return summary.parameters;
})
},
template: require('views/main/settings/tabs/currency'),
|
Fix: Settings > Currency should display even with a down server
|
diff --git a/lib/reading_view.js b/lib/reading_view.js
index <HASH>..<HASH> 100644
--- a/lib/reading_view.js
+++ b/lib/reading_view.js
@@ -16,8 +16,9 @@ exports.convert = function (url, params, cb) {
self.articleSelector = params.articleQuery || 'article';
self.tagsToInclude = (is.array(params.tagQueries) && params.tagQueries.lenght > 0) ? params.tagQueries : ['p','img'];
self.title = {
- textOnly: params.title.textOnly || true,
- query: params.title.query || (function () {
+ textOnly: params.title.textOnly || true,
+ tagToWrap: params.title.tagToWrap || 'h2',
+ query: params.title.query || (function () {
let resStr = [];
for(let i = 1; i < 7; i++) {
resStr.push(`${self.articleSelector} h${i}:first`);
@@ -54,7 +55,7 @@ exports.convert = function (url, params, cb) {
res = "",
title = (function () {
let element = $(self.title.query).first();
- return (self.title.textOnly ? $('h2').html(element.text()) : element)[0].outerHTML;
+ return (self.title.textOnly ? $(self.title.tagToWrap).html(element.text()) : element)[0].outerHTML;
}())
res += title;
|
Added tag to wrap for title that binds only text
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.