diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/inflector.rb
+++ b/activesupport/lib/active_support/inflector.rb
@@ -257,7 +257,7 @@ module ActiveSupport
# <%= link_to(@person.name, person_path %>
# # => <a href="/person/1-donald-e-knuth">Donald E. Knuth</a>
def parameterize(string, sep = '-')
- string.chars.normalize(:kd).to_s.gsub(/[^\x00-\x7F]+/, '').gsub(/[^a-z0-9_\-]+/i, sep).downcase
+ string.mb_chars.normalize(:kd).to_s.gsub(/[^\x00-\x7F]+/, '').gsub(/[^a-z0-9_\-]+/i, sep).downcase
end
# Create the name of a table like Rails does for models to table names. This method | Change call to String#chars in inflector to String#mb_chars. |
diff --git a/src/Illuminate/Validation/Validator.php b/src/Illuminate/Validation/Validator.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Validation/Validator.php
+++ b/src/Illuminate/Validation/Validator.php
@@ -175,7 +175,7 @@ class Validator implements ValidatorContract
*
* @var array
*/
- protected $sizeRules = ['Size', 'Between', 'Min', 'Max', 'greater_than', 'less_than', 'greater_than_or_equal', 'less_than_or_equal'];
+ protected $sizeRules = ['Size', 'Between', 'Min', 'Max', 'GreaterThan', 'LessThan', 'GreaterThanOrEqual', 'LessThanOrEqual'];
/**
* The numeric related validation rules. | Fix rules declaration in numericRules array of the validator class |
diff --git a/src/Plugin/Node/Config/routes.php b/src/Plugin/Node/Config/routes.php
index <HASH>..<HASH> 100644
--- a/src/Plugin/Node/Config/routes.php
+++ b/src/Plugin/Node/Config/routes.php
@@ -33,7 +33,7 @@ if (!empty($node_types)) {
}
Router::connect(
- '/search/:criteria/*',
+ '/find/:criteria/*',
[
'plugin' => 'node',
'controller' => 'serve', | site url "/search/*" is now "/find/*" |
diff --git a/devices/ikea.js b/devices/ikea.js
index <HASH>..<HASH> 100644
--- a/devices/ikea.js
+++ b/devices/ikea.js
@@ -194,10 +194,8 @@ module.exports = [
model: 'LED1624G9',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E14/E26/E27 600 lumen, dimmable, color, opal white',
- extend: extend.light_onoff_brightness_color(),
- ota: ota.tradfri,
+ extend: tradfriExtend.light_onoff_brightness_colortemp_color(),
meta: {supportsHueAndSaturation: false},
- onEvent: bulbOnEvent,
},
{
zigbeeModel: ['TRADFRI bulb E26 CWS 800lm', 'TRADFRI bulb E27 CWS 806lm'], | Update LED<I>G9 to support white spectrum (#<I>)
Product should support both color and white spectrum controls.
Changed in ikea.js to reflect the change and remove code that became unnecessary, as it is included in tradfriExtend.
Unsure about if the meta -> supportsHueAndSaturation line <I> is still required, as it is not on any other lamp and I am unsure of its purpose. |
diff --git a/resources/cca/ra/src/main/java/org/mobicents/slee/resource/diameter/cca/CreditControlMessageFactoryImpl.java b/resources/cca/ra/src/main/java/org/mobicents/slee/resource/diameter/cca/CreditControlMessageFactoryImpl.java
index <HASH>..<HASH> 100644
--- a/resources/cca/ra/src/main/java/org/mobicents/slee/resource/diameter/cca/CreditControlMessageFactoryImpl.java
+++ b/resources/cca/ra/src/main/java/org/mobicents/slee/resource/diameter/cca/CreditControlMessageFactoryImpl.java
@@ -82,7 +82,7 @@ public class CreditControlMessageFactoryImpl implements CreditControlMessageFact
// _ids.add(Avp.DESTINATION_REALM);
//_ids.add(Avp.DESTINATION_HOST);
//{ Auth-Application-Id }
- _ids.add(Avp.AUTH_APPLICATION_ID);
+ //_ids.add(Avp.AUTH_APPLICATION_ID);
//{ Service-Context-Id }
_ids.add(CreditControlAVPCodes.Service_Context_Id);
//{ CC-Request-Type } | change:
- fix answer creation, it pushed two Auth-App-Id avps.
git-svn-id: <URL> |
diff --git a/lib/mail_interceptor.rb b/lib/mail_interceptor.rb
index <HASH>..<HASH> 100644
--- a/lib/mail_interceptor.rb
+++ b/lib/mail_interceptor.rb
@@ -52,11 +52,7 @@ module MailInterceptor
end
def forward_emails_to_empty?
- if forward_emails_to.is_a? Array
- forward_emails_to.reject(&:blank?).blank?
- else
- forward_emails_to.blank?
- end
+ Array.wrap(forward_emails_to).reject(&:blank?).empty?
end
def production?
diff --git a/test/mail_interceptor_test.rb b/test/mail_interceptor_test.rb
index <HASH>..<HASH> 100644
--- a/test/mail_interceptor_test.rb
+++ b/test/mail_interceptor_test.rb
@@ -63,7 +63,7 @@ class MailInterceptorTest < Minitest::Test
assert_equal "[wheel] Forgot password", @message.subject
end
- def test_error_if_foward_emails_to_is_empty
+ def test_error_if_forward_emails_to_is_empty
message = "forward_emails_to should not be empty"
exception = assert_raises(RuntimeError) do | Refactor 'forward_emails_to_empty?' and typo fix. |
diff --git a/astroplan/tests/test_constraints.py b/astroplan/tests/test_constraints.py
index <HASH>..<HASH> 100644
--- a/astroplan/tests/test_constraints.py
+++ b/astroplan/tests/test_constraints.py
@@ -127,6 +127,8 @@ def test_compare_airmass_constraint_and_observer():
assert all(always_from_observer == always_from_constraint)
+# xfail can be removed when #141 is finished and merged
+@pytest.mark.xfail
def test_sun_separation():
time = Time('2003-04-05 06:07:08')
apo = Observer.at_site("APO") | temporarily xfail test_sun_separation() until #<I> is merged |
diff --git a/lib/avatax/configuration.rb b/lib/avatax/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/avatax/configuration.rb
+++ b/lib/avatax/configuration.rb
@@ -31,7 +31,7 @@ module AvaTax
DEFAULT_LOGGER = false
DEFAULT_PROXY = nil
DEFAULT_FARADAY_RESPONSE = false
- DEFAULT_RESPONSE_BIG_DECIMAL_CONVERSION = true
+ DEFAULT_RESPONSE_BIG_DECIMAL_CONVERSION = false
attr_accessor *VALID_OPTIONS_KEYS | very little use case for big_decimal, change default to false |
diff --git a/lib/pwf.js b/lib/pwf.js
index <HASH>..<HASH> 100644
--- a/lib/pwf.js
+++ b/lib/pwf.js
@@ -951,17 +951,13 @@
*/
var v = function()
{
- var allowed = true;
+ if (typeof console != 'undefined' && ((pwf.status('config') && pwf.config.get('debug.frontend')) || !pwf.status('config'))) {
+ var args = Array.prototype.slice.call(arguments);
- if ((pwf.status('config') && pwf.config.get('debug.frontend')) || !pwf.status('config')) {
- if (typeof console != 'undefined') {
- var args = Array.prototype.slice.call(arguments);
-
- if (args.length > 1) {
- console.log(args);
- } else {
- console.log(args[0]);
- }
+ if (args.length > 1) {
+ console.log(args);
+ } else {
+ console.log(args[0]);
}
}
}; | Dump method v(), shorter form |
diff --git a/openstack_dashboard/dashboards/admin/flavors/tables.py b/openstack_dashboard/dashboards/admin/flavors/tables.py
index <HASH>..<HASH> 100644
--- a/openstack_dashboard/dashboards/admin/flavors/tables.py
+++ b/openstack_dashboard/dashboards/admin/flavors/tables.py
@@ -20,6 +20,7 @@ from django.core.urlresolvers import reverse
from django.template import defaultfilters as filters
from django.utils.http import urlencode
from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import ungettext_lazy
from horizon import tables
@@ -27,8 +28,21 @@ from openstack_dashboard import api
class DeleteFlavor(tables.DeleteAction):
- data_type_singular = _("Flavor")
- data_type_plural = _("Flavors")
+ @staticmethod
+ def action_present(count):
+ return ungettext_lazy(
+ u"Delete Flavor",
+ u"Delete Flavors",
+ count
+ )
+
+ @staticmethod
+ def action_past(count):
+ return ungettext_lazy(
+ u"Deleted Flavor",
+ u"Deleted Flavors",
+ count
+ )
def delete(self, request, obj_id):
api.nova.flavor_delete(request, obj_id) | Remove concatenation from Delete Flavors
Fix concatenation and pluralization problems with the Delete
Flavors action
Change-Id: I<I>f0b6cf0e<I>dd<I>fae<I>e<I>c<I>be
partial-bug: <I> |
diff --git a/lib/alchemy/essence.rb b/lib/alchemy/essence.rb
index <HASH>..<HASH> 100644
--- a/lib/alchemy/essence.rb
+++ b/lib/alchemy/essence.rb
@@ -160,6 +160,7 @@ module Alchemy #:nodoc:
if preview_text_method.blank?
self.send(preview_text_column).to_s[0..maxlength]
else
+ return "" if ingredient.blank?
ingredient.send(preview_text_method).to_s[0..maxlength]
end
end | Returning empt string if ingredient from essence is nil in preview text |
diff --git a/src/CatLab/CursorPagination/CursorPaginationBuilder.php b/src/CatLab/CursorPagination/CursorPaginationBuilder.php
index <HASH>..<HASH> 100644
--- a/src/CatLab/CursorPagination/CursorPaginationBuilder.php
+++ b/src/CatLab/CursorPagination/CursorPaginationBuilder.php
@@ -369,8 +369,14 @@ class CursorPaginationBuilder implements PaginationBuilder
* @param array $properties
* @return PaginationBuilder
*/
- private function setFirst(array $properties) : PaginationBuilder
+ public function setFirst($properties) : PaginationBuilder
{
+ if (!ArrayHelper::hasArrayAccess($properties)) {
+ throw new InvalidArgumentException(
+ "Could not read properties: properties must have ArrayAccess."
+ );
+ }
+
$this->first = $properties;
return $this;
}
@@ -379,8 +385,14 @@ class CursorPaginationBuilder implements PaginationBuilder
* @param array $properties
* @return PaginationBuilder
*/
- private function setLast(array $properties) : PaginationBuilder
+ public function setLast($properties) : PaginationBuilder
{
+ if (!ArrayHelper::hasArrayAccess($properties)) {
+ throw new InvalidArgumentException(
+ "Could not read properties: properties must have ArrayAccess."
+ );
+ }
+
$this->last = $properties;
return $this;
} | A few changes to the interfaces. |
diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py
index <HASH>..<HASH> 100644
--- a/tests/unit/test_cli.py
+++ b/tests/unit/test_cli.py
@@ -14,7 +14,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-import conu
from click.testing import CliRunner
from colin.cli.colin import check, list_checks, list_rulesets, info
@@ -130,12 +129,9 @@ def test_info():
assert __version__ in output[0]
assert "cli/colin.py" in output[1]
- assert output[3].startswith("conu")
- assert conu.version in output[3]
- assert output[3].endswith("/conu")
- assert output[4].startswith("podman")
- assert output[5].startswith("skopeo")
- assert output[6].startswith("ostree")
+ assert output[3].startswith("podman")
+ assert output[4].startswith("skopeo")
+ assert output[5].startswith("ostree")
def test_env(): | Fix conu in 'colin info' tests |
diff --git a/dispatch/migrations/0100_publishable_constraints.py b/dispatch/migrations/0100_publishable_constraints.py
index <HASH>..<HASH> 100644
--- a/dispatch/migrations/0100_publishable_constraints.py
+++ b/dispatch/migrations/0100_publishable_constraints.py
@@ -3,7 +3,7 @@
from django.db import migrations, models
-from dispatch.models import Article, Page
+from dispatch.models import Article, Page, Author
def fix_latest_head(model, item):
latest = model.objects. \
@@ -17,10 +17,14 @@ def fix_latest_head(model, item):
latest.head = True
latest.save(revision=False)
- duplicates = model.objects. \
- filter(slug=item.slug). \
- exclude(parent=item.parent). \
- delete()
+ try:
+ duplicates = model.objects. \
+ filter(slug=item.slug). \
+ exclude(parent=item.parent). \
+ delete()
+ except Exception as e:
+ print("Error encountered while trying to delete duplicates!\n")
+ print(e)
def fix_latest_published(model, item):
latest_items = model.objects. \ | attempt workaround for buggy migration - exception |
diff --git a/src/main/java/com/buschmais/jqassistant/scm/maven/ServerMojo.java b/src/main/java/com/buschmais/jqassistant/scm/maven/ServerMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/buschmais/jqassistant/scm/maven/ServerMojo.java
+++ b/src/main/java/com/buschmais/jqassistant/scm/maven/ServerMojo.java
@@ -16,6 +16,8 @@
package com.buschmais.jqassistant.scm.maven;
+import static edu.emory.mathcs.backport.java.util.Collections.emptyMap;
+
import java.io.IOException;
import java.util.Set;
@@ -37,7 +39,7 @@ public class ServerMojo extends AbstractAnalysisMojo {
@Override
protected void aggregate(MavenProject baseProject, Set<MavenProject> projects, Store store) throws MojoExecutionException, MojoFailureException {
- Server server = new DefaultServerImpl((EmbeddedGraphStore) store);
+ Server server = new DefaultServerImpl((EmbeddedGraphStore) store, getScannerPluginRepository(store, emptyMap()), getRulePluginRepository());
server.start();
getLog().info("Running server for module " + baseProject.getGroupId() + ":" + baseProject.getArtifactId() + ":" + baseProject.getVersion());
getLog().info("Press <Enter> to finish."); | allow injection of plugin repositories into server |
diff --git a/src/tagify.js b/src/tagify.js
index <HASH>..<HASH> 100644
--- a/src/tagify.js
+++ b/src/tagify.js
@@ -16,7 +16,7 @@ function Tagify( input, settings ){
if( !input ){
console.warn('Tagify:', 'input element not found', input)
// return an empty mock of all methods, so the code using tagify will not break
- // because it might be calling methods even though the input element does not exists
+ // because it might be calling methods even though the input element does not exist
const mockInstance = new Proxy(this, { get(){ return () => mockInstance } })
return mockInstance
} | Fixing typo (#<I>) |
diff --git a/ui/app/components/job-dispatch.js b/ui/app/components/job-dispatch.js
index <HASH>..<HASH> 100644
--- a/ui/app/components/job-dispatch.js
+++ b/ui/app/components/job-dispatch.js
@@ -54,7 +54,7 @@ export default class JobDispatch extends Component {
name: x,
required,
title: titleCase(noCase(x)),
- value: this.args.job.meta ? this.args.job.meta[x] : '',
+ value: this.args.job.meta ? this.args.job.meta.get(x) : '',
})
); | ui: use `get` to access job meta value (#<I>) |
diff --git a/network/tls_wrapper.go b/network/tls_wrapper.go
index <HASH>..<HASH> 100644
--- a/network/tls_wrapper.go
+++ b/network/tls_wrapper.go
@@ -62,6 +62,10 @@ func RegisterTLSBaseArgs(){
flag.StringVar(&tlsKey,"tls_key", "", "Path to private key that will be used for TLS connections")
flag.StringVar(&tlsCert,"tls_cert", "", "Path to certificate")
flag.IntVar(&tlsAuthType,"tls_auth", int(tls.RequireAndVerifyClientCert), "Set authentication mode that will be used in TLS connection. Values in range 0-4 that set auth type (https://golang.org/pkg/crypto/tls/#ClientAuthType). Default is tls.RequireAndVerifyClientCert")
+}
+
+// RegisterTLSClientArgs register CLI args tls_server_sni used by TLS client's connection
+func RegisterTLSClientArgs(){
flag.StringVar(&tlsServerName, "tls_server_sni", "", "Server name used as sni value")
} | separate client's tls args from base |
diff --git a/tests/Common/ComponentsPublishTest.php b/tests/Common/ComponentsPublishTest.php
index <HASH>..<HASH> 100644
--- a/tests/Common/ComponentsPublishTest.php
+++ b/tests/Common/ComponentsPublishTest.php
@@ -25,6 +25,18 @@ class ComponentsPublishTest extends StorageApiTestCase
$components->deleteConfiguration($component['id'], $configuration['id']);
}
}
+
+ // erase all deleted configurations
+ $index = $this->_client->indexAction();
+ foreach ($index['components'] as $component) {
+ $listOptions = new ListComponentConfigurationsOptions();
+ $listOptions->setComponentId($component['id']);
+ $listOptions->setIsDeleted(true);
+
+ foreach ($components->listComponentConfigurations($listOptions) as $configuration) {
+ $components->deleteConfiguration($component['id'], $configuration['id']);
+ }
+ }
}
public function testConfigurationPublish() | fix tests - delete deleted configurations |
diff --git a/examples/index.php b/examples/index.php
index <HASH>..<HASH> 100644
--- a/examples/index.php
+++ b/examples/index.php
@@ -6,4 +6,7 @@ $forecastPhp = new \Nwidart\ForecastPhp\Forecast('3da43a66de8ca36593e0f44324f496
$info = $forecastPhp->get('40.7324296', '-73.9977264');
+// Fetch weather at a given time
+// $info = $forecastPhp->get('40.7324296', '-73.9977264', '2013-05-06T12:00:00-0400');
+
var_dump($info); | Adding example for a given time |
diff --git a/packages/react-dev-utils/printHostingInstructions.js b/packages/react-dev-utils/printHostingInstructions.js
index <HASH>..<HASH> 100644
--- a/packages/react-dev-utils/printHostingInstructions.js
+++ b/packages/react-dev-utils/printHostingInstructions.js
@@ -39,7 +39,7 @@ function printHostingInstructions(
console.log();
console.log('Find out more about deployment here:');
console.log();
- console.log(` ${chalk.yellow('https://bit.ly/CRA-deploy')}`);
+ console.log(` ${chalk.yellow('https://create-react-app.dev/docs/deployment')}`);
console.log();
} | chore: Fix broken link for CRA deployment (#<I>) |
diff --git a/src/HttpController.php b/src/HttpController.php
index <HASH>..<HASH> 100644
--- a/src/HttpController.php
+++ b/src/HttpController.php
@@ -7,6 +7,7 @@ use Zend\Diactoros\ServerRequest;
use Zend\Diactoros\ServerRequestFactory;
use Psr\Http\Message\ResponseInterface;
use Zend\Diactoros\Response\SapiEmitter;
+use Zend\Diactoros\Response\EmptyResponse;
use League\Pipeline\Pipeline;
use League\Pipeline\PipelineBuilder;
use Exception;
@@ -35,8 +36,11 @@ class HttpController
public function run()
{
$this->pipeline->build()
- ->pipe(new Stage(function (ResponseInterface $response) {
+ ->pipe(new Stage(function (ResponseInterface $response = null) {
$emitter = new SapiEmitter;
+ if (is_null($response)) {
+ $response = new EmptyResponse(404);
+ }
return $emitter->emit($response);
}))
->process(ServerRequestFactory::fromGlobals()); | if this ends up with null, emit a <I> instead of erroring out |
diff --git a/src/toil/worker.py b/src/toil/worker.py
index <HASH>..<HASH> 100644
--- a/src/toil/worker.py
+++ b/src/toil/worker.py
@@ -147,7 +147,7 @@ def workerScript(jobStore, config, jobName, jobStoreID, redirectOutputToLogFile=
except OSError:
pass
# Exit without doing any of Toil's cleanup
- os._exit()
+ os._exit(0)
# We don't need to reap the child. Either it kills us, or we finish
# before it does. Either way, init will have to clean it up for us. | Send an argument to exit, as it is required |
diff --git a/export.js b/export.js
index <HASH>..<HASH> 100644
--- a/export.js
+++ b/export.js
@@ -25,7 +25,9 @@ function commonExportTests(exportFn, expectedFn, expectedErrorsFn) {
let _specs;
let checkExpected = function(expected) {
expect(exportFn(_specs)).to.eql(expected.result);
- expect(err.errors().length).to.equal(expected.errors.length);
+ if (err.errors().length !== expected.errors.length) {
+ expect(err.errors()).to.deep.equal(expected.errors);
+ }
for (let i=0; i < expected.errors.length; i++) {
const expErr = expected.errors[i];
const actErr = err.errors()[i]; | Incorrect error messages are now displayed. |
diff --git a/Test/Case/AllRatchetTestsTest.php b/Test/Case/AllRatchetTestsTest.php
index <HASH>..<HASH> 100644
--- a/Test/Case/AllRatchetTestsTest.php
+++ b/Test/Case/AllRatchetTestsTest.php
@@ -13,6 +13,9 @@ CakePlugin::loadAll(array(
'AssetCompress' => array(
'bootstrap' => true
),
+ 'Ratchet' => array(
+ 'bootstrap' => true
+ ),
));
class AllRatchetTestsTest extends PHPUnit_Framework_TestSuite { | The bootstrap for Ratchet also has to be loaded before the test can run as it depends on configuration values from bootstrap.php |
diff --git a/cache/classes/loaders.php b/cache/classes/loaders.php
index <HASH>..<HASH> 100644
--- a/cache/classes/loaders.php
+++ b/cache/classes/loaders.php
@@ -647,10 +647,11 @@ class cache implements cache_loader {
$this->static_acceleration_set($data[$key]['key'], $value);
}
}
- if ($this->perfdebug) {
- cache_helper::record_cache_set($this->storetype, $this->definition->get_id());
+ $successfullyset = $this->store->set_many($data);
+ if ($this->perfdebug && $successfullyset) {
+ cache_helper::record_cache_set($this->storetype, $this->definition->get_id(), $successfullyset);
}
- return $this->store->set_many($data);
+ return $successfullyset;
}
/**
@@ -2037,10 +2038,11 @@ class cache_session extends cache {
'value' => $value
);
}
- if ($this->perfdebug) {
- cache_helper::record_cache_set($this->storetype, $definitionid);
+ $successfullyset = $this->get_store()->set_many($data);
+ if ($this->perfdebug && $successfullyset) {
+ cache_helper::record_cache_set($this->storetype, $definitionid, $successfullyset);
}
- return $this->get_store()->set_many($data);
+ return $successfullyset;
}
/** | MDL-<I> cache: added stats logging to set_many methods |
diff --git a/src/main/java/org/jamesframework/core/search/NeighbourhoodSearch.java b/src/main/java/org/jamesframework/core/search/NeighbourhoodSearch.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jamesframework/core/search/NeighbourhoodSearch.java
+++ b/src/main/java/org/jamesframework/core/search/NeighbourhoodSearch.java
@@ -547,11 +547,29 @@ public abstract class NeighbourhoodSearch<SolutionType extends Solution> extends
}
/**
+ * Increase the number of accepted moves with the given value.
+ *
+ * @param inc value with which the number of accepted moves is increased
+ */
+ protected void incNumAcceptedMoves(long inc){
+ numAcceptedMoves += inc;
+ }
+
+ /**
* Indicate that a move was rejected. This method only updates the rejected move counter. If this method
* is called for every rejected move, the number of rejected moves will be correctly reported.
*/
protected void rejectMove(){
- numRejectedMoves++;
+ incNumRejectedMoves(1);
+ }
+
+ /**
+ * Increase the number of rejected moves with the given value.
+ *
+ * @param inc value with which the number of rejected moves is increased
+ */
+ protected void incNumRejectedMoves(long inc){
+ numRejectedMoves += inc;
}
} | added inc methods from accepted/rejected moves |
diff --git a/scripts/dts.js b/scripts/dts.js
index <HASH>..<HASH> 100644
--- a/scripts/dts.js
+++ b/scripts/dts.js
@@ -20,8 +20,7 @@ let result = [
` * Licensed under the MIT License. See License.txt in the project root for license information.`,
` *--------------------------------------------------------------------------------------------*/`,
``,
- `declare namespace monaco.languages.json {`,
- ``
+ `declare namespace monaco.languages.json {`
];
for (let line of lines) {
if (/^import/.test(line)) {
@@ -31,8 +30,8 @@ for (let line of lines) {
line = line.replace(/export declare/g, 'export');
if (line.length > 0) {
line = `\t${line}`;
+ result.push(line);
}
- result.push(line);
}
result.push(`}`);
result.push(``); | Avoid having diffs in `monaco.d.ts` |
diff --git a/trezor_agent/gpg/encode.py b/trezor_agent/gpg/encode.py
index <HASH>..<HASH> 100644
--- a/trezor_agent/gpg/encode.py
+++ b/trezor_agent/gpg/encode.py
@@ -249,6 +249,7 @@ def _make_signature(signer_func, data_to_sign, public_algo,
log.debug('hashing %d bytes', len(data_to_hash))
digest = hashlib.sha256(data_to_hash).digest()
+ log.info('SHA256 digest to sign: %s', util.hexlify(digest))
sig = signer_func(digest=digest)
return bytes(header + hashed + unhashed + | gpg: add logging for digest |
diff --git a/src/select/__test__/Select.test.js b/src/select/__test__/Select.test.js
index <HASH>..<HASH> 100644
--- a/src/select/__test__/Select.test.js
+++ b/src/select/__test__/Select.test.js
@@ -45,7 +45,7 @@ describe('<Select>', () => {
});
it('Test onChange func', () => {
- const select = wrapper.find('.w-select').at(0).find('.w-input').at(0);
+ const select = wrapper.find('.w-select').at(0).find('input').at(0);
select.simulate('change');
expect(wrapperState.value).toBe(7);
}); | test(Select): Update test case. |
diff --git a/src/Guard.php b/src/Guard.php
index <HASH>..<HASH> 100644
--- a/src/Guard.php
+++ b/src/Guard.php
@@ -119,7 +119,7 @@ class Guard implements MiddlewareInterface
}
/**
- * @param null|array|ArrayAccess
+ * @param null|array|ArrayAccess $storage
*
* @return self
* | fix docblock for setStorage method |
diff --git a/py3status/modules/rt.py b/py3status/modules/rt.py
index <HASH>..<HASH> 100644
--- a/py3status/modules/rt.py
+++ b/py3status/modules/rt.py
@@ -21,9 +21,9 @@ Color options:
color_degraded: Exceeded threshold_warning
Requires:
- PyMySQL: https://pypi.python.org/pypi/PyMySQL
+ PyMySQL: https://pypi.org/project/PyMySQL/
or
- MySQL-python: http://pypi.python.org/pypi/MySQL-python
+ MySQL-python: https://pypi.org/project/MySQL-python/
It features thresholds to colorize the output and forces a low timeout to
limit the impact of a server connectivity problem on your i3bar freshness. | rt: replace http with secure https |
diff --git a/rotunicode/utils.py b/rotunicode/utils.py
index <HASH>..<HASH> 100644
--- a/rotunicode/utils.py
+++ b/rotunicode/utils.py
@@ -2,6 +2,16 @@
from __future__ import unicode_literals
from os.path import splitext
+import codecs
+
+from rotunicode import RotUnicode
+
+
+def register_codec():
+ try:
+ codecs.lookup('rotunicode')
+ except LookupError:
+ codecs.register(RotUnicode.search_function)
def ruencode(string, extension=False):
@@ -24,6 +34,7 @@ def ruencode(string, extension=False):
:rtype:
`unicode`
"""
+ register_codec()
if extension:
file_name = string
file_ext = ''
@@ -46,4 +57,5 @@ def rudecode(string):
:rtype:
`unicode`
"""
+ register_codec()
return string.decode('rotunicode') | automatically register codec to make shorthand methods easier to import |
diff --git a/storage/tests/system.py b/storage/tests/system.py
index <HASH>..<HASH> 100644
--- a/storage/tests/system.py
+++ b/storage/tests/system.py
@@ -51,15 +51,11 @@ retry_bad_copy = RetryErrors(exceptions.BadRequest, error_predicate=_bad_copy)
def _empty_bucket(bucket):
- """Empty a bucket of all existing blobs.
-
- This accounts (partially) for the eventual consistency of the
- list blobs API call.
- """
- for blob in bucket.list_blobs():
+ """Empty a bucket of all existing blobs (including multiple versions)."""
+ for blob in bucket.list_blobs(versions=True):
try:
blob.delete()
- except exceptions.NotFound: # eventual consistency
+ except exceptions.NotFound:
pass
@@ -87,6 +83,7 @@ def setUpModule():
def tearDownModule():
errors = (exceptions.Conflict, exceptions.TooManyRequests)
retry = RetryErrors(errors, max_tries=9)
+ retry(_empty_bucket)(Config.TEST_BUCKET)
retry(Config.TEST_BUCKET.delete)(force=True) | storage: fix failing system tests (#<I>)
* Add additional object deletion
* Add versions to list_blobs during deletion
* Fix retry call to empty bucket |
diff --git a/lib/endpoint/pathsToRegexp.js b/lib/endpoint/pathsToRegexp.js
index <HASH>..<HASH> 100755
--- a/lib/endpoint/pathsToRegexp.js
+++ b/lib/endpoint/pathsToRegexp.js
@@ -15,10 +15,10 @@ function pathsToRegexp(regexpAndParams, paths) {
return path.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}
//A regexp path: ":paramName"
- //For the moment, this only match "[^/*]"
+ //For the moment, this only match "[^/]+"
var name = path.substr(1);
paramNames.push(name);
- return "([^\\/]*)";
+ return "([^\\/]+)";
})
.join("\\/"); | Fix: variable path (:xxx) should contain at least one character |
diff --git a/opal/core/enumerable.rb b/opal/core/enumerable.rb
index <HASH>..<HASH> 100644
--- a/opal/core/enumerable.rb
+++ b/opal/core/enumerable.rb
@@ -754,6 +754,10 @@ module Enumerable
return $breaker;
}
+ if (value === nil) {
+ #{raise ArgumentError, "comparison failed"};
+ }
+
if (value < 0) {
result = param;
}
@@ -768,7 +772,7 @@ module Enumerable
return;
}
- if (#{`param` <=> `result`} < 0) {
+ if (#{Opal.compare(`param`, `result`)} < 0) {
result = param;
}
};
diff --git a/spec/filters/bugs/enumerable.rb b/spec/filters/bugs/enumerable.rb
index <HASH>..<HASH> 100644
--- a/spec/filters/bugs/enumerable.rb
+++ b/spec/filters/bugs/enumerable.rb
@@ -15,9 +15,6 @@ opal_filter "Enumerable" do
fails "Enumerable#member? returns true if any element == argument for numbers"
fails "Enumerable#member? gathers whole arrays as elements when each yields multiple"
- fails "Enumerable#min raises an ArgumentError for incomparable elements"
- fails "Enumerable#min gathers whole arrays as elements when each yields multiple"
-
fails "Enumerable#reduce returns nil when fails(legacy rubycon)"
fails "Enumerable#reduce without inject arguments(legacy rubycon)" | Enumerable#min raises when it can't compare elements |
diff --git a/views/GridLayout.js b/views/GridLayout.js
index <HASH>..<HASH> 100644
--- a/views/GridLayout.js
+++ b/views/GridLayout.js
@@ -29,9 +29,18 @@ GridLayout.prototype._sequenceFrom = function _sequenceFrom(views) {
var x = w * (i % cols);
var y = h * ((i / cols) | 0);
+ var sizeMode = view.node.getSizeMode();
+ if (sizeMode[0] !== Size.ABSOLUTE ||
+ sizeMode[1] !== Size.ABSOLUTE) {
+ view._gridSizeFlag = true;
+ view.node
+ .setSizeMode(Size.ABSOLUTE, Size.ABSOLUTE);
+ }
+
+ if (view._gridSizeFlag)
+ view.node.setAbsoluteSize(w, h);
+
view.node
- .setSizeMode(Size.ABSOLUTE, Size.ABSOLUTE)
- .setAbsoluteSize(w, h)
.setMountPoint(0, 0)
.setPosition(x, y);
} | Fixed GridLayout items to use their own size when those are already absoluted sized |
diff --git a/lib/trax/model/mixins/sort_scopes.rb b/lib/trax/model/mixins/sort_scopes.rb
index <HASH>..<HASH> 100644
--- a/lib/trax/model/mixins/sort_scopes.rb
+++ b/lib/trax/model/mixins/sort_scopes.rb
@@ -40,6 +40,7 @@ module Trax
def define_order_by_scope_for_field(field_name, as:field_name, class_name:self.name, prefix:'sort_by', with:nil, **options)
klass = class_name.is_a?(String) ? class_name.constantize : class_name
+ return unless klass.table_exists?
column_type = klass.column_types[field_name.to_s].type
case column_type | return unless table_exists? to fix eager loading issue with CI environments |
diff --git a/import.js b/import.js
index <HASH>..<HASH> 100644
--- a/import.js
+++ b/import.js
@@ -95,10 +95,8 @@ var types = [
'venue-us-me',
'venue-us-wa',
'venue-us-ga',
- 'venue-us-tx',
'venue-us-sc',
'venue-us-sd',
- 'venue-us-ut',
'venue-us-vt',
'venue-us-nj',
'venue-us-wv', | Remove Texas and Utah
They don't have bundles yet. @thisisaaronland why you messin with Texas? |
diff --git a/fritzconnection/core/fritzconnection.py b/fritzconnection/core/fritzconnection.py
index <HASH>..<HASH> 100644
--- a/fritzconnection/core/fritzconnection.py
+++ b/fritzconnection/core/fritzconnection.py
@@ -289,3 +289,8 @@ class FritzConnection:
"""
self.call_action("WANIPConn1", "ForceTermination")
+ def reboot(self):
+ """
+ Reboot the system.
+ """
+ self.call_action("DeviceConfig1", "Reboot") | new reboot method for FritzConnection class |
diff --git a/src/BoomCMS/Core/Controllers/CMS/People/Person/SavePerson.php b/src/BoomCMS/Core/Controllers/CMS/People/Person/SavePerson.php
index <HASH>..<HASH> 100644
--- a/src/BoomCMS/Core/Controllers/CMS/People/Person/SavePerson.php
+++ b/src/BoomCMS/Core/Controllers/CMS/People/Person/SavePerson.php
@@ -14,7 +14,7 @@ class SavePerson extends BasePerson
'email' => $this->request->input('email'),
'name' => $this->request->input('name'),
],
- $this->request->input('groups'),
+ $this->request->input('groups')? : [],
$this->auth,
$this->personProvider,
$this->groupProvider | Fixed creating a person with no groups |
diff --git a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
+++ b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
@@ -22,6 +22,14 @@ class FormatterStyleTest extends \PHPUnit_Framework_TestCase
$this->assertEquals("foo<>bar", $formatter->format('foo<>bar'));
}
+ public function testLGCharEscaping()
+ {
+ $formatter = new OutputFormatter(true);
+ $this->assertEquals("foo<bar", $formatter->format('foo\\<bar'));
+ $this->assertEquals("<info>some info</info>", $formatter->format('\\<info>some info\\</info>'));
+ $this->assertEquals("\\<info>some info\\</info>", OutputFormatter::escape('<info>some info</info>'));
+ }
+
public function testBundledStyles()
{
$formatter = new OutputFormatter(true); | [Console] Added '<' escaping tests. |
diff --git a/spyderlib/plugins/editor.py b/spyderlib/plugins/editor.py
index <HASH>..<HASH> 100644
--- a/spyderlib/plugins/editor.py
+++ b/spyderlib/plugins/editor.py
@@ -883,6 +883,7 @@ class Editor(SpyderPluginWidget):
for other_editorstack in self.editorstacks:
if other_editorstack is not editorstack:
other_editorstack.set_todo_results(index, results)
+ self.update_todo_actions()
def refresh_eol_mode(self, os_name):
os_name = unicode(os_name) | Editor: todo list was not updated after loading file |
diff --git a/lib/svtplay_dl/fetcher/hls.py b/lib/svtplay_dl/fetcher/hls.py
index <HASH>..<HASH> 100644
--- a/lib/svtplay_dl/fetcher/hls.py
+++ b/lib/svtplay_dl/fetcher/hls.py
@@ -109,7 +109,7 @@ class HLS(VideoRetriever):
return "hls"
def download(self):
- self.output_extention = "tls"
+ self.output_extention = "ts"
if self.segments:
if self.audio:
self._download(self.audio, file_name=(copy.copy(self.output), "audio.ts")) | hls.download: the extension should be ts not tls |
diff --git a/src/controls/geocoder.js b/src/controls/geocoder.js
index <HASH>..<HASH> 100644
--- a/src/controls/geocoder.js
+++ b/src/controls/geocoder.js
@@ -93,7 +93,7 @@ export default class Geocoder {
this.fire('loading');
const geocodingOptions = this.options
- const exclude = ['placeholder', 'zoom', 'flyTo', 'accessToken'];
+ const exclude = ['placeholder', 'zoom', 'flyTo', 'accessToken', 'api'];
const options = Object.keys(this.options).filter(function(key) {
return exclude.indexOf(key) === -1;
}).map(function(key) { | Exclude options.api from query params (#<I>) |
diff --git a/openid/server/trustroot.py b/openid/server/trustroot.py
index <HASH>..<HASH> 100644
--- a/openid/server/trustroot.py
+++ b/openid/server/trustroot.py
@@ -233,9 +233,6 @@ class TrustRoot(object):
@rtype: C{NoneType} or C{L{TrustRoot}}
"""
- if not isinstance(trust_root, (str, unicode)):
- return None
-
url_parts = _parseURL(trust_root)
if url_parts is None:
return None | [project @ server.trustroot.TrustRoot.parse: don't return None if other types are passed in.]
If code is passing in funny values for this, I don't want silent failure. |
diff --git a/integration/single/test_basic_function.py b/integration/single/test_basic_function.py
index <HASH>..<HASH> 100644
--- a/integration/single/test_basic_function.py
+++ b/integration/single/test_basic_function.py
@@ -1,6 +1,7 @@
from unittest.case import skipIf
-from integration.config.service_names import KMS, XRAY, ARM, CODE_DEPLOY
+from integration.config.service_names import KMS, XRAY, ARM, CODE_DEPLOY, HTTP_API
+
from integration.helpers.resource import current_region_does_not_support
from parameterized import parameterized
from integration.helpers.base_test import BaseTest
@@ -35,6 +36,7 @@ class TestBasicFunction(BaseTest):
"single/function_alias_with_http_api_events",
]
)
+ @skipIf(current_region_does_not_support([HTTP_API]), "HTTP API is not supported in this testing region")
def test_function_with_http_api_events(self, file_name):
self.create_and_verify_stack(file_name) | chore: FOSS add skip tests (#<I>) |
diff --git a/lib/active_decorator/railtie.rb b/lib/active_decorator/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/active_decorator/railtie.rb
+++ b/lib/active_decorator/railtie.rb
@@ -29,8 +29,6 @@ module ActiveDecorator
require 'active_decorator/monkey/action_controller/base/rescue_from'
::ActionController::API.send :prepend, ActiveDecorator::Monkey::ActionController::Base
-
- ::ActionController::API.send :include, ActiveDecorator::ViewContext::Filter
end
end
end | Don't expect the API to have a view_context
fixes #<I> finally |
diff --git a/tests/_util.py b/tests/_util.py
index <HASH>..<HASH> 100644
--- a/tests/_util.py
+++ b/tests/_util.py
@@ -11,10 +11,12 @@ import os
import shutil
import tempfile
+import gutenberg.acquire.metadata
+import gutenberg.acquire.text
+
class MockTextMixin(object):
def setUp(self):
- import gutenberg.acquire.text
self.mock_text_cache = tempfile.mkdtemp()
gutenberg.acquire.text._TEXT_CACHE = self.mock_text_cache
@@ -30,7 +32,6 @@ class MockMetadataMixin(object):
raise NotImplementedError
def setUp(self):
- import gutenberg.acquire.metadata
self.mock_metadata_cache = _mock_metadata_cache(self.sample_data())
gutenberg.acquire.metadata._METADATA_CACHE = self.mock_metadata_cache | No-op: move all imports to top of file |
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index <HASH>..<HASH> 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -574,7 +574,7 @@ class SymbolicReference(object):
# walk loose refs
# Currently we do not follow links
for root, dirs, files in os.walk(join_path_native(repo.git_dir, common_path)):
- if 'refs/' not in root: # skip non-refs subfolders
+ if 'refs' not in root.split(os.sep): # skip non-refs subfolders
refs_id = [d for d in dirs if d == 'refs']
if refs_id:
dirs[0:] = ['refs'] | fix(refs): don't assume linux path separator
Instead, work with os.sep.
Fixes #<I> |
diff --git a/raft/progress.go b/raft/progress.go
index <HASH>..<HASH> 100644
--- a/raft/progress.go
+++ b/raft/progress.go
@@ -75,7 +75,6 @@ type Progress struct {
func (pr *Progress) resetState(state ProgressStateType) {
pr.Paused = false
- pr.RecentActive = false
pr.PendingSnapshot = 0
pr.State = state
pr.ins.reset() | raft: do not change RecentActive when resetState for progress |
diff --git a/dbt/tracking.py b/dbt/tracking.py
index <HASH>..<HASH> 100644
--- a/dbt/tracking.py
+++ b/dbt/tracking.py
@@ -1,6 +1,6 @@
from dbt import version as dbt_version
-from snowplow_tracker import Subject, Tracker, AsyncEmitter, logger as sp_logger
+from snowplow_tracker import Subject, Tracker, Emitter, logger as sp_logger
from snowplow_tracker import SelfDescribingJson, disable_contracts
disable_contracts()
@@ -24,7 +24,7 @@ INVOCATION_SPEC = "https://raw.githubusercontent.com/analyst-collective/dbt/mast
PLATFORM_SPEC = "https://raw.githubusercontent.com/analyst-collective/dbt/master/events/schemas/com.fishtownanalytics/platform_context.json"
RUN_MODEL_SPEC = "https://raw.githubusercontent.com/analyst-collective/dbt/master/events/schemas/com.fishtownanalytics/run_model_context.json"
-emitter = AsyncEmitter(COLLECTOR_URL, protocol=COLLECTOR_PROTOCOL, buffer_size=1)
+emitter = Emitter(COLLECTOR_URL, protocol=COLLECTOR_PROTOCOL, buffer_size=1)
tracker = Tracker(emitter, namespace="cf", app_id="dbt")
def __write_user(): | don't use async emitter |
diff --git a/config/webpack/test.js b/config/webpack/test.js
index <HASH>..<HASH> 100644
--- a/config/webpack/test.js
+++ b/config/webpack/test.js
@@ -7,7 +7,7 @@ export default {
{
test: /\.js$/,
exclude: /node_modules/,
- loader: 'babel-loader?stage=0&optional[]=runtime'
+ loader: 'babel-loader?stage=0&optional[]=runtime&loose=true'
}
]
},
diff --git a/tasks/react-components.js b/tasks/react-components.js
index <HASH>..<HASH> 100644
--- a/tasks/react-components.js
+++ b/tasks/react-components.js
@@ -17,7 +17,7 @@ const buildFolder = 'dist/react';
gulp.task('react-build-src', function() {
return gulp.src('src/pivotal-ui-react/**/*.js')
.pipe(plugins.plumber())
- .pipe(plugins.babel({stage: 0, optional: ['runtime']}))
+ .pipe(plugins.babel({stage: 0, optional: ['runtime'], loose: true}))
.pipe(plugins.header(COPYRIGHT))
.pipe(gulp.dest(buildFolder));
}); | chore(babel): Uses loose setting for babel translation
[Finishes #<I>] |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ class CustomInstall(install):
batfilename = 'pygubu-designer.bat'
batpath = os.path.join(self.install_scripts, batfilename)
with open(batpath, 'w') as batfile:
- content = "{0} -m pygubudesigner".format(sys.executable)
+ content = '"{0}" -m pygubudesigner'.format(sys.executable)
batfile.write(content) | Fix Windows batch file
It crashes in paths with spaces like `c:\program files\python <I>\python.exe -m pygubudesigner` returning `c:\program is not recognized as an internal or external command, operable program or batch file`.
Putting the path between quotes solves this. |
diff --git a/lib/db/access.php b/lib/db/access.php
index <HASH>..<HASH> 100644
--- a/lib/db/access.php
+++ b/lib/db/access.php
@@ -500,7 +500,7 @@ $capabilities = array(
'moodle/user:delete' => array(
- 'riskbitmask' => RISK_PERSONAL, RISK_DATALOSS,
+ 'riskbitmask' => RISK_PERSONAL | RISK_DATALOSS,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
diff --git a/version.php b/version.php
index <HASH>..<HASH> 100644
--- a/version.php
+++ b/version.php
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2017082400.00; // YYYYMMDD = weekly release date of this DEV branch.
+$version = 2017082400.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes. | MDL-<I> access: Fix definition of risks for user:delete. |
diff --git a/src/manager/componentsManager.py b/src/manager/componentsManager.py
index <HASH>..<HASH> 100644
--- a/src/manager/componentsManager.py
+++ b/src/manager/componentsManager.py
@@ -883,10 +883,11 @@ class Manager(object):
LOGGER.debug("> Current Component: '{0}'.".format(component))
if os.path.isfile(os.path.join(profile.path, profile.module) + ".py") or os.path.isdir(os.path.join(profile.path, profile.module)):
- not profile.path in sys.path and sys.path.append(profile.path)
+ path = profile.path
elif os.path.basename(profile.path) == profile.module:
path = os.path.join(profile.path, "..")
- not path in sys.path and sys.path.append(path)
+ not path in sys.path and sys.path.append(path)
+
profile.import_ = __import__(profile.module)
object_ = profile.object_ in profile.import_.__dict__ and getattr(profile.import_, profile.object_) or None
if object_ and inspect.isclass(object_): | Refactor "Manager" class "instantiateComponent" method in "componentsManager" module. |
diff --git a/lib/filelib.php b/lib/filelib.php
index <HASH>..<HASH> 100644
--- a/lib/filelib.php
+++ b/lib/filelib.php
@@ -637,9 +637,18 @@ function send_temp_file_finished($path) {
* @param bool $forcedownload If true (default false), forces download of file rather than view in browser/plugin
* @param string $mimetype Include to specify the MIME type; leave blank to have it guess the type from $filename
*/
-function send_file($path, $filename, $lifetime=86400 , $filter=0, $pathisstring=false, $forcedownload=false, $mimetype='') {
+function send_file($path, $filename, $lifetime = 'default' , $filter=0, $pathisstring=false, $forcedownload=false, $mimetype='') {
global $CFG, $COURSE, $SESSION;
+ // MDL-11789, apply $CFG->filelifetime here
+ if ($lifetime === 'default') {
+ if (!empty($CFG->filelifetime)) {
+ $filetime = $CFG->filelifetime;
+ } else {
+ $filetime = 86400;
+ }
+ }
+
session_write_close(); // unlock session during fileserving
// Use given MIME type if specified, otherwise guess it using mimeinfo. | MDL-<I>, apply $CFG->filelifetime in send_file function. |
diff --git a/span_context.go b/span_context.go
index <HASH>..<HASH> 100644
--- a/span_context.go
+++ b/span_context.go
@@ -74,7 +74,14 @@ func NewSpanContext(parent SpanContext) SpanContext {
}
if parent.TraceIDHi == 0 && parent.TraceID == 0 && parent.SpanID == 0 {
- return NewRootSpanContext()
+ c := NewRootSpanContext()
+
+ // preserve the W3C trace context even if it was not used
+ if !parent.W3CContext.IsZero() {
+ c.W3CContext = parent.W3CContext
+ }
+
+ return c
}
c := parent.Clone()
@@ -107,10 +114,16 @@ func NewSpanContext(parent SpanContext) SpanContext {
}
func restoreFromW3CTraceContext(trCtx w3ctrace.Context) SpanContext {
- if trCtx.IsZero() || sensor.options.disableW3CTraceCorrelation {
+ if trCtx.IsZero() {
return SpanContext{}
}
+ if sensor.options.disableW3CTraceCorrelation {
+ return SpanContext{
+ W3CContext: trCtx,
+ }
+ }
+
parent := trCtx.Parent()
traceIDHi, traceIDLo, err := ParseLongID(parent.TraceID) | Ensure W3C trace propagation even if the correlation is disabled |
diff --git a/yt_array.py b/yt_array.py
index <HASH>..<HASH> 100644
--- a/yt_array.py
+++ b/yt_array.py
@@ -634,6 +634,33 @@ class YTArray(np.ndarray):
"""
return self.in_units(units, equivalence=equivalence, **kwargs)
+ def to_value(self, units, equivalence=None, **kwargs):
+ """
+ Creates a copy of this array with the data in the supplied
+ units, and returns it without units. Output is therefore a
+ bare NumPy array.
+
+ Optionally, an equivalence can be specified to convert to an
+ equivalent quantity which is not in the same dimensions. All
+ additional keyword arguments are passed to the equivalency if
+ necessary.
+
+ Parameters
+ ----------
+ units : Unit object or string
+ The units you want to get a new quantity in.
+ equivalence : string, optional
+ The equivalence you wish to use. To see which
+ equivalencies are supported for this unitful
+ quantity, try the :meth:`list_equivalencies`
+ method. Default: None
+
+ Returns
+ -------
+ NumPy array
+ """
+ return self.in_units(units, equivalence=equivalence, **kwargs).value
+
def in_base(self, unit_system="cgs"):
"""
Creates a copy of this array with the data in the specified unit system, | Add to_value method to return quantities without units |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -12,7 +12,7 @@ var from = require('from2')
var each = require('stream-each')
var uint64be = require('uint64be')
var unixify = require('unixify')
-var path = require('path')
+var path = require('path').posix
var messages = require('./lib/messages')
var stat = require('./lib/stat')
var cursor = require('./lib/cursor') | Fix readdir / on windows (#<I>) |
diff --git a/identify/identify.py b/identify/identify.py
index <HASH>..<HASH> 100644
--- a/identify/identify.py
+++ b/identify/identify.py
@@ -3,7 +3,6 @@ from __future__ import absolute_import
from __future__ import unicode_literals
import os.path
-import re
import shlex
import string
@@ -12,7 +11,6 @@ from identify import interpreters
printable = frozenset(string.printable)
-WS_RE = re.compile(r'\s+')
DIRECTORY = 'directory'
SYMLINK = 'symlink'
@@ -129,7 +127,7 @@ def _shebang_split(line):
except ValueError:
# failing that, we'll do a more "traditional" shebang parsing which
# just involves splitting by whitespace
- return WS_RE.split(line)
+ return line.split()
def parse_shebang(bytesio): | No need to use regular expressions to split by whitespace |
diff --git a/import_export/results.py b/import_export/results.py
index <HASH>..<HASH> 100644
--- a/import_export/results.py
+++ b/import_export/results.py
@@ -53,7 +53,7 @@ class Result(object):
def append_failed_row(self, row, error):
row_values = [v for (k, v) in row.items()]
- row_values.append(error.error.message)
+ row_values.append(str(error.error))
self.failed_dataset.append(row_values)
def increment_row_result_total(self, row_result): | Error in converting exceptions to strings
Unless I'm misunderstanding something, the `Exception` class' `message` attribute has been removed in python <I>/<I> (at least according to <URL>`.
This caused an error for me when when a `ValueError` was caught during a dry run with `collect_failed_rows=True`. I'm running Python <I>. |
diff --git a/src/Console/ApplyMigrationCommand.php b/src/Console/ApplyMigrationCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/ApplyMigrationCommand.php
+++ b/src/Console/ApplyMigrationCommand.php
@@ -20,7 +20,7 @@ class ApplyMigrationCommand extends AbstractCommand
/**
* @var string
*/
- protected $signature = 'search:migrations:migrate {config : The path to the index configuration file}';
+ protected $signature = 'elastic:migrations:migrate {config : The path to the index configuration file}';
/**
* The console command description.
diff --git a/src/Console/CreateMigrationCommand.php b/src/Console/CreateMigrationCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/CreateMigrationCommand.php
+++ b/src/Console/CreateMigrationCommand.php
@@ -19,7 +19,7 @@ class CreateMigrationCommand extends Command
/**
* @var string
*/
- protected $signature = 'search:migrations:create {config : The path to the index configuration file}';
+ protected $signature = 'elastic:migrations:create {config : The path to the index configuration file}';
/**
* The console command description. | Use the correct command signature namespace in migration commands |
diff --git a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java
+++ b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java
@@ -833,7 +833,7 @@ public abstract class NanoHTTPD {
StringBuilder postLineBuffer = new StringBuilder();
char pbuf[] = new char[512];
int read = in.read(pbuf);
- while (read >= 0 && !postLine.endsWith("\r\n")) {
+ while (read >= 0) {
postLine = String.valueOf(pbuf, 0, read);
postLineBuffer.append(postLine);
read = in.read(pbuf); | Fix potential truncating of POST body. Closes #<I> |
diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js
index <HASH>..<HASH> 100644
--- a/src/structures/GuildMember.js
+++ b/src/structures/GuildMember.js
@@ -316,6 +316,17 @@ class GuildMember {
return this.client.rest.methods.banGuildMember(this.guild, this, deleteDays);
}
+ /**
+ * When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.
+ * @returns {string}
+ * @example
+ * // logs: Hello from <@123456789>!
+ * console.log(`Hello from ${member}!`);
+ */
+ toString() {
+ return `<@${this.user.id}>`;
+ }
+
// These are here only for documentation purposes - they are implemented by TextBasedChannel
sendMessage() { return; }
sendTTSMessage() { return; } | Add GuildMember.toString |
diff --git a/Slim/Slim.php b/Slim/Slim.php
index <HASH>..<HASH> 100644
--- a/Slim/Slim.php
+++ b/Slim/Slim.php
@@ -910,41 +910,6 @@ class Slim
}
/********************************************************************************
- * Flash Messages
- *******************************************************************************/
-
- /**
- * DEPRECATED
- * Set flash message for subsequent request
- * @param string $key
- * @param mixed $value
- */
- public function flash($key, $value)
- {
- $this->flash->next($key, $value);
- }
-
- /**
- * DEPRECATED
- * Set flash message for current request
- * @param string $key
- * @param mixed $value
- */
- public function flashNow($key, $value)
- {
- $this->flash->now($key, $value);
- }
-
- /**
- * DEPRECATED
- * Keep flash messages from previous request for subsequent request
- */
- public function flashKeep()
- {
- $this->flash->keep();
- }
-
- /********************************************************************************
* Hooks
*******************************************************************************/ | Remove obsolete flash methods from \Slim\Slim |
diff --git a/more_itertools/more.py b/more_itertools/more.py
index <HASH>..<HASH> 100644
--- a/more_itertools/more.py
+++ b/more_itertools/more.py
@@ -803,7 +803,7 @@ def interleave_longest(*iterables):
"""
i = chain.from_iterable(zip_longest(*iterables, fillvalue=_marker))
- return filter(lambda x: x is not _marker, i)
+ return (x for x in i if x is not _marker)
def collapse(iterable, base_type=None, levels=None): | Use genexp instead of filter (for PyPy) |
diff --git a/lib/waterline/query/finders/basic.js b/lib/waterline/query/finders/basic.js
index <HASH>..<HASH> 100644
--- a/lib/waterline/query/finders/basic.js
+++ b/lib/waterline/query/finders/basic.js
@@ -52,7 +52,7 @@ module.exports = {
// Normalize criteria
// criteria = normalize.criteria(criteria);
- criteria = normalizeCriteria(criteria);
+ criteria = normalizeCriteria(criteria, this.identity, this.waterline);
// Return Deferred or pass to adapter
if (typeof cb !== 'function') {
diff --git a/lib/waterline/utils/normalize-criteria.js b/lib/waterline/utils/normalize-criteria.js
index <HASH>..<HASH> 100644
--- a/lib/waterline/utils/normalize-criteria.js
+++ b/lib/waterline/utils/normalize-criteria.js
@@ -40,7 +40,12 @@ var getModel = require('./get-model');
*
* --
*
- * @param {Ref} criteria [The original criteria (i.e. from a "stage 1 query")]
+ * @param {Ref} criteria
+ * The original criteria (i.e. from a "stage 1 query").
+ * > WARNING:
+ * > IN SOME CASES (BUT NOT ALL!), THE PROVIDED CRITERIA WILL
+ * > UNDERGO DESTRUCTIVE, IN-PLACE CHANGES JUST BY PASSING IT
+ * > IN TO THIS UTILITY.
*
* @param {String?} modelIdentity
* The identity of the model this criteria is referring to (e.g. "pet" or "user") | Update findOne to call normalizeCriteria properly (it really should be switched to using forgePhaseTwoQuery(), but will come back to that). This commit also adds a loud warning comment in the fireworks atop normalizeCriteria() to make it clear that the provided criteria may be (but not necessarily _will_ be) mutated in-place. |
diff --git a/tinytag/__init__.py b/tinytag/__init__.py
index <HASH>..<HASH> 100644
--- a/tinytag/__init__.py
+++ b/tinytag/__init__.py
@@ -4,7 +4,7 @@ from .tinytag import TinyTag, TinyTagException, ID3, Ogg, Wave, Flac
import sys
-__version__ = '0.15.0'
+__version__ = '0.15.2'
if __name__ == '__main__':
print(TinyTag.get(sys.argv[1]))
\ No newline at end of file | bumped version to <I> |
diff --git a/is-master.js b/is-master.js
index <HASH>..<HASH> 100644
--- a/is-master.js
+++ b/is-master.js
@@ -73,7 +73,13 @@ im.prototype.mongooseInit = function() {
}
});
- this.imModel = mongoose.model(this.collection, imSchema);
+ // ensure we aren't attempting to redefine a collection that already exists
+ if(mongoose.models.hasOwnProperty(this.collection)){
+ this.imModel = mongoose.model(this.collection);
+ }else{
+ this.imModel = mongoose.model(this.collection, imSchema);
+ }
+
this.worker = new this.imModel({
hostname: this.hostname,
pid: this.pid, | Adding some logic to handle pre-existing models |
diff --git a/lib/specinfra/command/windows.rb b/lib/specinfra/command/windows.rb
index <HASH>..<HASH> 100644
--- a/lib/specinfra/command/windows.rb
+++ b/lib/specinfra/command/windows.rb
@@ -203,13 +203,18 @@ module SpecInfra
end
end
- def check_windows_feature_enabled(name)
-
- Backend::PowerShell::Command.new do
- using 'list_windows_features.ps1'
- exec "@(ListWindowsFeatures | Where-Object {($_.name -eq '#{name}') -and ($_.State -eq 'enabled')}).count -gt 0"
- end
+ def check_windows_feature_enabled(name,provider)
+ if provider.nil?
+ cmd = "@(ListWindowsFeatures -feature #{name}).count -gt 0"
+ else
+ cmd = "@(ListWindowsFeatures -feature #{name} -provider #{provider}).count -gt 0"
+ end
+
+ Backend::PowerShell::Command.new do
+ using 'list_windows_features.ps1'
+ exec cmd
+ end
end
private | take into account function calls with/without provider |
diff --git a/config/application.rb b/config/application.rb
index <HASH>..<HASH> 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -111,11 +111,6 @@ class Application < Rails::Application
extension_loader.load_extensions
extension_loader.load_extension_initalizers
-
- Dir["#{TRUSTY_CMS_ROOT}/config/initializers/**/*.rb"].sort.each do |initializer|
- load(initializer)
- end
-
extension_loader.activate_extensions # also calls initialize_views
#config.add_controller_paths(extension_loader.paths(:controller))
#config.add_eager_load_paths(extension_loader.paths(:eager_load)) | This seems to be loading initializers twice
Which the config stuff doesn't like very much :( I've tried trusty_blank
without this, and it seems to be working okay... |
diff --git a/coconut/root.py b/coconut/root.py
index <HASH>..<HASH> 100644
--- a/coconut/root.py
+++ b/coconut/root.py
@@ -23,10 +23,10 @@ import sys as _coconut_sys
# VERSION:
# -----------------------------------------------------------------------------------------------------------------------
-VERSION = "1.3.1"
-VERSION_NAME = "Dead Parrot"
+VERSION = "1.4.0"
+VERSION_NAME = "Ernest Scribbler"
# False for release, int >= 1 for develop
-DEVELOP = 29
+DEVELOP = False
# -----------------------------------------------------------------------------------------------------------------------
# CONSTANTS: | Set version to <I> [Ernest Scribbler] |
diff --git a/src/Sitemap.php b/src/Sitemap.php
index <HASH>..<HASH> 100644
--- a/src/Sitemap.php
+++ b/src/Sitemap.php
@@ -57,7 +57,7 @@ class Sitemap implements Responsable
{
sort($this->tags);
- $tags = collect($this->tags)->unique('url');
+ $tags = collect($this->tags)->unique('url')->filter();
return view('laravel-sitemap::sitemap')
->with(compact('tags')) | Update Sitemap.php (#<I>)
For some reason there are empty tags in the array, which results in the error:
Call to a member function getType() on null
The ->filter() method makes sure there are never empty tags in the view. |
diff --git a/revision_store.py b/revision_store.py
index <HASH>..<HASH> 100644
--- a/revision_store.py
+++ b/revision_store.py
@@ -306,7 +306,7 @@ class AbstractRevisionStore(object):
if len(parents):
validator, new_inv = self.repo.add_inventory_by_delta(parents[0],
inv_delta, revision_id, parents, basis_inv=basis_inv,
- propagate_caches=True)
+ propagate_caches=False)
else:
new_inv = basis_inv.create_by_apply_delta(inv_delta, revision_id)
validator = self.repo.add_inventory(revision_id, new_inv, parents) | back out cache propagation until more reliable |
diff --git a/test/integration/test.alchemy_vision.js b/test/integration/test.alchemy_vision.js
index <HASH>..<HASH> 100644
--- a/test/integration/test.alchemy_vision.js
+++ b/test/integration/test.alchemy_vision.js
@@ -8,11 +8,11 @@ var authHelper = require('./auth_helper.js');
var auth = authHelper.auth;
var describe = authHelper.describe; // this runs describe.skip if there is no auth.js file :)
-var TWENTY_SECONDS = 20000;
+var TWO_MINUTES = 2*60*10000;
var TWO_SECONDS = 2000;
describe('alchemy_vision_integration', function() {
- this.timeout(TWENTY_SECONDS);
+ this.timeout(TWO_MINUTES);
this.slow(TWO_SECONDS); // this controls when the tests get a colored warning for taking too long
this.retries(1); | bumping time allowed for alchemy vision tests, since <I> seconds doesn't seem to be sufficient in some cases |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ setup(
name='budoc',
version='0.1',
url='http://github.com/zeaphoo/budoc/',
- download_url='http://github.com/zeaphoo/cocopot/budoc/0.1',
+ download_url='http://github.com/zeaphoo/budoc/tarball/0.1',
license='BSD',
author='zeaphoo',
author_email='zeaphoo@gmail.com',
@@ -28,7 +28,7 @@ setup(
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
- 'License :: OSI Approved :: BSD License',
+ 'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3', | change setup config for release <I> |
diff --git a/src/FileContainer.php b/src/FileContainer.php
index <HASH>..<HASH> 100644
--- a/src/FileContainer.php
+++ b/src/FileContainer.php
@@ -140,6 +140,14 @@ class FileContainer implements \Serializable
}
/**
+ * @return boolean
+ */
+ protected function isNewFile()
+ {
+ return $this->isNewFile;
+ }
+
+ /**
* @return Api
*/
private function getApi()
@@ -150,12 +158,4 @@ class FileContainer implements \Serializable
return $this->api;
}
-
- /**
- * @return boolean
- */
- protected function isNewFile()
- {
- return $this->isNewFile;
- }
} | Order FileContainer methods by visibility |
diff --git a/airflow/www/views.py b/airflow/www/views.py
index <HASH>..<HASH> 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -5318,6 +5318,31 @@ class CustomUserDBModelView(MultiResourceUserMixin, UserDBModelView):
class CustomUserLDAPModelView(MultiResourceUserMixin, UserLDAPModelView):
"""Customize permission names for FAB's builtin UserLDAPModelView."""
+ _class_permission_name = permissions.RESOURCE_USER
+
+ class_permission_name_mapping = {
+ 'userinfoedit': permissions.RESOURCE_MY_PROFILE,
+ 'userinfo': permissions.RESOURCE_MY_PROFILE,
+ }
+
+ method_permission_name = {
+ 'add': 'create',
+ 'userinfo': 'read',
+ 'download': 'read',
+ 'show': 'read',
+ 'list': 'read',
+ 'edit': 'edit',
+ 'userinfoedit': 'edit',
+ 'delete': 'delete',
+ }
+
+ base_permissions = [
+ permissions.ACTION_CAN_CREATE,
+ permissions.ACTION_CAN_READ,
+ permissions.ACTION_CAN_EDIT,
+ permissions.ACTION_CAN_DELETE,
+ ]
+
class CustomUserOAuthModelView(MultiResourceUserMixin, UserOAuthModelView):
"""Customize permission names for FAB's builtin UserOAuthModelView.""" | Add possibility to create users in LDAP mode (#<I>)
* Add possibility to create users in LDAP mode |
diff --git a/src/main/java/codearea/skin/MyListView.java b/src/main/java/codearea/skin/MyListView.java
index <HASH>..<HASH> 100644
--- a/src/main/java/codearea/skin/MyListView.java
+++ b/src/main/java/codearea/skin/MyListView.java
@@ -87,7 +87,7 @@ class MyListView<T> extends ListView<T> {
* (for measurement purposes) and shall not be stored.
*/
public ListCell<T> getCell(int index) {
- return withFlow(flow -> flow.getCell(index), null);
+ return withFlow(flow -> flow.getCell(index), (ListCell<T>) null);
}
private static <C extends IndexedCell<?>> void showAsFirst(VirtualFlow<C> flow, int index) { | Help Eclipse JDT with type inference. |
diff --git a/Resources/public/js/tool/calendar.js b/Resources/public/js/tool/calendar.js
index <HASH>..<HASH> 100644
--- a/Resources/public/js/tool/calendar.js
+++ b/Resources/public/js/tool/calendar.js
@@ -115,7 +115,7 @@
monthNames: [t('january'), t('february'), t('march'), t('april'), t('may'), t('june'), t('july'),
t('august'), t('september'), t('october'), t('november'), t('december')],
monthNamesShort: [t('jan'), t('feb'), t('mar'), t('apr'), t('may'), t('ju'), t('jul'),
- t('aug'), t('sept'), t('nov'), t('dec')],
+ t('aug'), t('sept'), t('oct'), t('nov'), t('dec')],
dayNames: [ t('sunday'),t('monday'), t('tuesday'), t('wednesday'), t('thursday'), t('friday'), t('saturday')],
dayNamesShort: [ t('sun'), t('mon'), t('tue'), t('wed'), t('thu'), t('fri'), t('sat')],
editable: true, | Fixing calendar short months short name. |
diff --git a/lib/nexpose/device.rb b/lib/nexpose/device.rb
index <HASH>..<HASH> 100644
--- a/lib/nexpose/device.rb
+++ b/lib/nexpose/device.rb
@@ -208,7 +208,7 @@ module Nexpose
# object.
def self.parse_json(json)
new do
- @id = json['id'].to_i
+ @id = json['assetID'].to_i
@ip = json['ipAddress']
@host_name = json['hostName']
@os = json['operatingSystem'] | #<I>: Fixed parsing of completed asset response to use correct asset ID |
diff --git a/tests/support/helpers.py b/tests/support/helpers.py
index <HASH>..<HASH> 100644
--- a/tests/support/helpers.py
+++ b/tests/support/helpers.py
@@ -209,7 +209,10 @@ def flaky(caller=None, condition=True):
return caller(cls)
except Exception as exc:
if attempt >= 3:
- raise exc
+ if six.PY2:
+ raise
+ else:
+ raise exc
backoff_time = attempt ** 2
log.info(
'Found Exception. Waiting %s seconds to retry.', | Handling in flaky when maximum number of attempts raised and the exception should be raised. Different approaches depending on Py2 vs Py3. |
diff --git a/hive/src/main/java/org/elasticsearch/hadoop/hive/HiveFieldExtractor.java b/hive/src/main/java/org/elasticsearch/hadoop/hive/HiveFieldExtractor.java
index <HASH>..<HASH> 100644
--- a/hive/src/main/java/org/elasticsearch/hadoop/hive/HiveFieldExtractor.java
+++ b/hive/src/main/java/org/elasticsearch/hadoop/hive/HiveFieldExtractor.java
@@ -65,7 +65,7 @@ public class HiveFieldExtractor extends ConstantFieldExtractor {
// replace column name with _colX (which is what Hive uses during serialization)
fieldName = columnNames.get(getFieldName().toLowerCase(Locale.ENGLISH));
- if (!StringUtils.hasText(fieldName)) {
+ if (!settings.getInputAsJson() && !StringUtils.hasText(fieldName)) {
throw new EsHadoopIllegalArgumentException(
String.format(
"Cannot find field [%s] in mapping %s ; maybe a value was specified without '<','>' or there is a typo?", | [HIVE] Validate field extraction
Double check JSON input (which has a different schema)
Relates #<I> |
diff --git a/Classes/Lib/Searchphrase.php b/Classes/Lib/Searchphrase.php
index <HASH>..<HASH> 100644
--- a/Classes/Lib/Searchphrase.php
+++ b/Classes/Lib/Searchphrase.php
@@ -33,7 +33,7 @@ class Searchphrase
/**
* @var Pluginbase
*/
- protected $pObj;
+ public $pObj;
/**
* initializes this object | feat: make pluginbase accessible in searchphrase hooks |
diff --git a/config/projects/chef-windows.rb b/config/projects/chef-windows.rb
index <HASH>..<HASH> 100644
--- a/config/projects/chef-windows.rb
+++ b/config/projects/chef-windows.rb
@@ -36,13 +36,10 @@ end
package_name "chef-client"
-override :chef, version: "lcg/ffi-yajl-gem"
-override :ohai, version: "lcg/ffi-yajl-gem"
override :rubygems, version: "1.8.29"
dependency "preparation"
dependency "ffi-yajl"
-dependency "ohai"
dependency "chef-windows"
resources_path File.join(files_path, "chef")
diff --git a/config/projects/chef.rb b/config/projects/chef.rb
index <HASH>..<HASH> 100644
--- a/config/projects/chef.rb
+++ b/config/projects/chef.rb
@@ -34,12 +34,9 @@ install_path "/opt/chef"
resources_path File.join(files_path, "chef")
mac_pkg_identifier "com.getchef.pkg.chef"
-override :chef, version: "lcg/ffi-yajl-gem"
-override :ohai, version: "lcg/ffi-yajl-gem"
override :rubygems, version: "1.8.29"
dependency "preparation"
dependency "ffi-yajl"
-dependency "ohai"
dependency "chef"
dependency "version-manifest" | ffi-yajl merged to master in chef+ohai now |
diff --git a/src/js/floats.js b/src/js/floats.js
index <HASH>..<HASH> 100644
--- a/src/js/floats.js
+++ b/src/js/floats.js
@@ -98,7 +98,7 @@ ch.floats = function () {
}
// Classname with component type and extra classes from conf.classes
- container.push(" class=\"ch-" + that.type + (ch.utils.hasOwn(conf, "classes") ? " " + conf.classes : "") + "\"");
+ container.push(" class=\"ch-hide ch-" + that.type + (ch.utils.hasOwn(conf, "classes") ? " " + conf.classes : "") + "\"");
// Z-index
container.push(" style=\"z-index:" + (ch.utils.zIndex += 1) + ";"); | #<I> Floats: The first time that it shows, effects don't work. |
diff --git a/test/e2e/nightwatch.conf.js b/test/e2e/nightwatch.conf.js
index <HASH>..<HASH> 100644
--- a/test/e2e/nightwatch.conf.js
+++ b/test/e2e/nightwatch.conf.js
@@ -1,7 +1,5 @@
require('@babel/register');
-console.log('port', process.env.PORT);
-
// http://nightwatchjs.org/getingstarted#settings-file
module.exports = {
src_folders: ['test/e2e/specs'],
@@ -20,13 +18,17 @@ module.exports = {
cli_args: {
'webdriver.chrome.driver': require('chromedriver').path,
},
+ request_timeout_options: {
+ timeout: 30000,
+ retry_attempts: 2,
+ },
},
test_settings: {
default: {
selenium_port: 4444,
selenium_host: 'localhost',
- silent: true,
+ silent: false,
globals: {
devServerURL: `http://localhost:${process.env.PORT}` || 3000,
}, | test(nightwatch.config.js): add to config, turn on verbose logging |
diff --git a/sdu_bkjws/__init__.py b/sdu_bkjws/__init__.py
index <HASH>..<HASH> 100644
--- a/sdu_bkjws/__init__.py
+++ b/sdu_bkjws/__init__.py
@@ -115,3 +115,18 @@ class SduBkjws(object):
return self._raw_past_score
else:
raise Exception(response, 'unexpected error please create a issue on GitHub')
+
+ @_keep_live
+ def get_past_score(self):
+ """
+ :type: list
+ :return:
+ """
+
+ response = self.get_raw_past_score()
+ score_list = response['object']['aaData']
+ # parsed_list = []
+ # for obj in score_list:
+ # parsed_list.append({})
+ # print(score_list[1:3])
+ return score_list | feat(past score): new api to get past score
get_past_score()->list of score dicts |
diff --git a/tool/sdg/src/main/java/org/openscience/cdk/layout/AtomPlacer.java b/tool/sdg/src/main/java/org/openscience/cdk/layout/AtomPlacer.java
index <HASH>..<HASH> 100644
--- a/tool/sdg/src/main/java/org/openscience/cdk/layout/AtomPlacer.java
+++ b/tool/sdg/src/main/java/org/openscience/cdk/layout/AtomPlacer.java
@@ -896,6 +896,10 @@ public class AtomPlacer
{
//path += ac.getAtom(f).getSymbol();
degreeSum += superAC.getConnectedBondsCount(ac.getAtom(f));
+
+ Integer implH = ac.getAtom(f).getImplicitHydrogenCount();
+ if (implH != null)
+ degreeSum += implH;
}
//System.out.println(path + ": " + degreeSum);
return degreeSum; | Include hydrogens when counting degree. In practice this means carboxylic groups are always placed with the carbonyl pointing up or down when at the end of a chain. |
diff --git a/public/javascripts/activation_key.js b/public/javascripts/activation_key.js
index <HASH>..<HASH> 100644
--- a/public/javascripts/activation_key.js
+++ b/public/javascripts/activation_key.js
@@ -45,6 +45,21 @@ $(document).ready(function() {
});
}
});
+
+ $('#update_subscriptions').live('submit', function(e) {
+ e.preventDefault();
+ var button = $(this).find('input[type|="submit"]');
+ button.attr("disabled","disabled");
+ $(this).ajaxSubmit({
+ success: function(data) {
+ button.removeAttr('disabled');
+ notices.checkNotices();
+ }, error: function(e) {
+ button.removeAttr('disabled');
+ notices.checkNotices();
+ }});
+ });
+
});
var activation_key = (function() { | ajax call to update akey subscriptions |
diff --git a/dallinger/deployment.py b/dallinger/deployment.py
index <HASH>..<HASH> 100644
--- a/dallinger/deployment.py
+++ b/dallinger/deployment.py
@@ -406,7 +406,12 @@ class DebugDeployment(HerokuLocalDeployment):
dashboard_url = self.with_proxy_port("{}/dashboard/".format(base_url))
self.display_dashboard_access_details(dashboard_url)
if not self.no_browsers:
- self.open_dashboard(dashboard_url)
+ self.async_open_dashboard(dashboard_url)
+
+ # A little delay here ensures that the experiment window always opens
+ # after the dashboard window.
+ time.sleep(0.1)
+
self.heroku = heroku
self.out.log(
"Monitoring the Heroku Local server for recruitment or completion..."
@@ -443,6 +448,11 @@ class DebugDeployment(HerokuLocalDeployment):
)
)
+ def async_open_dashboard(self, url):
+ threading.Thread(
+ target=self.open_dashboard, name="Open dashboard", kwargs={"url": url}
+ ).start()
+
def open_dashboard(self, url):
config = get_config()
self.out.log("Opening dashboard") | Open dashboard window asynchronously (#<I>)
Modified `dallinger debug` to open the dashboard asynchronously. |
diff --git a/tests/Integration/Database/EloquentRelationshipsTest.php b/tests/Integration/Database/EloquentRelationshipsTest.php
index <HASH>..<HASH> 100644
--- a/tests/Integration/Database/EloquentRelationshipsTest.php
+++ b/tests/Integration/Database/EloquentRelationshipsTest.php
@@ -124,15 +124,13 @@ class CustomPost extends Post
protected function newBelongsToMany(Builder $query, Model $parent, $table, $foreignPivotKey, $relatedPivotKey,
$parentKey, $relatedKey, $relationName = null
- )
- {
+ ) {
return new CustomBelongsToMany($query, $parent, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName);
}
protected function newHasManyThrough(Builder $query, Model $farParent, Model $throughParent, $firstKey,
$secondKey, $localKey, $secondLocalKey
- )
- {
+ ) {
return new CustomHasManyThrough($query, $farParent, $throughParent, $firstKey, $secondKey, $localKey, $secondLocalKey);
}
} | HasManyThrough override |
diff --git a/tests/Formatter/PostalFormatterTest.php b/tests/Formatter/PostalFormatterTest.php
index <HASH>..<HASH> 100644
--- a/tests/Formatter/PostalFormatterTest.php
+++ b/tests/Formatter/PostalFormatterTest.php
@@ -5,7 +5,6 @@ namespace CommerceGuys\Addressing\Tests\Formatter;
use CommerceGuys\Addressing\Model\Address;
use CommerceGuys\Addressing\Formatter\PostalFormatter;
use CommerceGuys\Addressing\Provider\DataProvider;
-use CommerceGuys\Addressing\Provider\DataProviderInterface;
/**
* @coversDefaultClass \CommerceGuys\Addressing\Formatter\PostalFormatter
@@ -15,7 +14,7 @@ class PostalFormatterTest extends \PHPUnit_Framework_TestCase
/**
* The data provider.
*
- * @var DataProviderInterface
+ * @var DataProvider
*/
protected $dataProvider; | Clean up docblock in PostalFormatterTest, remove unneeded use statement. |
diff --git a/lib/sensu/client.rb b/lib/sensu/client.rb
index <HASH>..<HASH> 100644
--- a/lib/sensu/client.rb
+++ b/lib/sensu/client.rb
@@ -68,17 +68,21 @@ module Sensu
end
end
+ def find_attribute_with_default(configTree, path, default)
+ pathElement = path.shift()
+ attribute = configTree[pathElement]
+ if attribute.is_a?(Hash) and path.length > 0
+ find_attribute_with_default(attribute, path, default)
+ else
+ attribute.nil? ? default : attribute
+ end
+ end
+
def substitute_command_tokens(check)
unmatched_tokens = Array.new
- substituted = check[:command].gsub(/:::([^:]*?):::/) do
+ substituted = check[:command].gsub(/:::([^:].*?):::/) do
token, default = $1.to_s.split('|', -1)
- matched = token.split('.').inject(@settings[:client]) do |client, attribute|
- if client[attribute].nil?
- default.nil? ? break : default
- else
- client[attribute]
- end
- end
+ matched = find_attribute_with_default(@settings[:client], token.split('.'), default)
if matched.nil?
unmatched_tokens << token
end | proposed fix for issue <URL> |
diff --git a/packages/cli/lib/lib/output-hooks.js b/packages/cli/lib/lib/output-hooks.js
index <HASH>..<HASH> 100644
--- a/packages/cli/lib/lib/output-hooks.js
+++ b/packages/cli/lib/lib/output-hooks.js
@@ -3,11 +3,19 @@ const HOOKS = [
test: /^total precache size /i,
handler: text => `\n \u001b[32m${text}\u001b[39m`,
},
+ {
+ test: /DeprecationWarning/,
+ handler: () => false
+ }
];
function wrap(stream, handler) {
let write = stream.write;
- stream.write = text => write.call(stream, handler(text));
+ stream.write = text => {
+ const transformed = handler(text);
+ if (transformed === false) return;
+ return write.call(stream, transformed);
+ };
return () => {
stream.write = write;
}; | Silence DeprecationWarning (#<I>)
A DeprecationWarning message from some plugin (not sure which) breaks our nice progress meter and looks bad. This turns it off. |
diff --git a/src/test/java/com/cloudbees/jenkins/support/SupportActionTest.java b/src/test/java/com/cloudbees/jenkins/support/SupportActionTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/cloudbees/jenkins/support/SupportActionTest.java
+++ b/src/test/java/com/cloudbees/jenkins/support/SupportActionTest.java
@@ -102,7 +102,7 @@ public class SupportActionTest {
HtmlPage p = wc.goTo(root.getUrlName());
HtmlForm form = p.getFormByName("bundle-contents");
- HtmlButton submit = (HtmlButton) form.getHtmlElementsByTagName("button").get(0);
+ HtmlButton submit = (HtmlButton) form.getElementsByTagName("button").get(0);
Page zip = submit.click();
File zipFile = File.createTempFile("test", "zip");
IOUtils.copy(zip.getWebResponse().getContentAsStream(), Files.newOutputStream(zipFile.toPath())); | [JENKINS-<I>] Fix removed API usage in test
The method was renamed. |
diff --git a/widget_tweaks/templatetags/widget_tweaks.py b/widget_tweaks/templatetags/widget_tweaks.py
index <HASH>..<HASH> 100644
--- a/widget_tweaks/templatetags/widget_tweaks.py
+++ b/widget_tweaks/templatetags/widget_tweaks.py
@@ -181,7 +181,10 @@ class FieldAttributeNode(Node):
bounded_field = append_attr(bounded_field, 'class:%s' %
context['WIDGET_REQUIRED_CLASS'])
for k, v in self.set_attrs:
- bounded_field = set_attr(bounded_field, '%s:%s' % (k,v.resolve(context)))
+ if k == 'type':
+ bounded_field.field.widget.input_type = v.resolve(context)
+ else:
+ bounded_field = set_attr(bounded_field, '%s:%s' % (k,v.resolve(context)))
for k, v in self.append_attrs:
bounded_field = append_attr(bounded_field, '%s:%s' % (k,v.resolve(context)))
return bounded_field | Fix #<I>: Just tested in Django <I> |
diff --git a/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java b/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java
index <HASH>..<HASH> 100755
--- a/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentTx.java
@@ -496,8 +496,26 @@ public class ODatabaseDocumentTx extends OListenerManger<ODatabaseListener> impl
listener.onCreate(this);
} catch (Throwable ignore) {
}
-
} catch (Exception e) {
+ // REMOVE THE (PARTIAL) DATABASE
+ try {
+ drop();
+ } catch (Exception ex) {
+ // IGNORE IT
+ }
+
+ // DELETE THE STORAGE TOO
+ try {
+ if (storage == null)
+ storage = Orient.instance().loadStorage(url);
+ storage.delete();
+ } catch (Exception ex) {
+ // IGNORE IT
+ }
+
+ status = STATUS.CLOSED;
+ owner.set(null);
+
throw OException.wrapException(new ODatabaseException("Cannot create database '" + getName() + "'"), e);
}
return (DB) this; | Core: if the database cannot be created because an exception, now even if partially created, it's drop |
diff --git a/ga4gh/frontend.py b/ga4gh/frontend.py
index <HASH>..<HASH> 100644
--- a/ga4gh/frontend.py
+++ b/ga4gh/frontend.py
@@ -28,6 +28,8 @@ import ga4gh.datamodel as datamodel
import ga4gh.protocol as protocol
import ga4gh.exceptions as exceptions
import ga4gh.datarepo as datarepo
+import logging
+from logging import StreamHandler
MIMETYPE = "application/json"
@@ -188,6 +190,9 @@ def configure(configFile=None, baseConfig="ProductionConfig",
TODO Document this critical function! What does it do? What does
it assume?
"""
+ file_handler = StreamHandler()
+ file_handler.setLevel(logging.WARNING)
+ app.logger.addHandler(file_handler)
configStr = 'ga4gh.serverconfig:{0}'.format(baseConfig)
app.config.from_object(configStr)
if os.environ.get('GA4GH_CONFIGURATION') is not None:
@@ -340,7 +345,7 @@ def handleException(exception):
Handles an exception that occurs somewhere in the process of handling
a request.
"""
- if app.config['DEBUG']:
+ with app.test_request_context():
app.log_exception(exception)
serverException = exception
if not isinstance(exception, exceptions.BaseServerException): | added logger to output exception information when flask debugger is off |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.