diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/sos/report/reporting.py b/sos/report/reporting.py
index <HASH>..<HASH> 100644
--- a/sos/report/reporting.py
+++ b/sos/report/reporting.py
@@ -191,7 +191,10 @@ class PlainTextReport(object):
def process_subsection(self, section, key, header, format_, footer):
if key in section:
self.line_buf.append(header)
- for item in section.get(key):
+ for item in sorted(
+ section.get(key),
+ key=lambda x: x["name"] if isinstance(x, dict) else ''
+ ):
self.line_buf.append(format_ % item)
if (len(footer) > 0):
self.line_buf.append(footer)
|
[reporting] Sort order of report contents by name
When using `reporting.py`, e.g. for `sos.txt`, sort the content on a
per-section basis so that comparison between multiple sos reports is
easier.
Closes: #<I>
Resolves: #<I>
|
diff --git a/src/Shell/ImportShell.php b/src/Shell/ImportShell.php
index <HASH>..<HASH> 100644
--- a/src/Shell/ImportShell.php
+++ b/src/Shell/ImportShell.php
@@ -74,8 +74,6 @@ class ImportShell extends Shell
$this->hr();
$this->info('Preparing records ..');
- // skip if failed to generate import results records
- if (!$this->createImportResults($import, $count)) {
continue;
}
@@ -217,6 +215,8 @@ class ImportShell extends Shell
$progress->init();
$this->info('Importing records ..');
+ // generate import results records
+ $this->createImportResults($import, $count);
$reader = Reader::createFromPath($import->filename, 'r');
|
Generate import results during data imports (task #<I>)
|
diff --git a/src/android/CropPlugin.java b/src/android/CropPlugin.java
index <HASH>..<HASH> 100644
--- a/src/android/CropPlugin.java
+++ b/src/android/CropPlugin.java
@@ -27,7 +27,7 @@ public class CropPlugin extends CordovaPlugin {
String imagePath = args.getString(0);
this.inputUri = Uri.parse(imagePath);
- this.outputUri = Uri.fromFile(new File(getTempDirectoryPath() + "/cropped.jpg"));
+ this.outputUri = Uri.fromFile(new File(getTempDirectoryPath() + "/" + System.currentTimeMillis()+ "-cropped.jpg"));
PluginResult pr = new PluginResult(PluginResult.Status.NO_RESULT);
pr.setKeepCallback(true);
@@ -92,4 +92,4 @@ public class CropPlugin extends CordovaPlugin {
cache.mkdirs();
return cache.getAbsolutePath();
}
-}
\ No newline at end of file
+}
|
Fixes #<I> - File was overwritten in temporary path (#<I>)
|
diff --git a/docs/source/conf.py b/docs/source/conf.py
index <HASH>..<HASH> 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -1,3 +1,18 @@
+# Copyright 2017 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ------------------------------------------------------------------------------
+
# -*- coding: utf-8 -*-
#
# Sawtooth documentation build configuration file, created by
|
Add license to docs conf.py
|
diff --git a/multiqc/modules/bcl2fastq/bcl2fastq.py b/multiqc/modules/bcl2fastq/bcl2fastq.py
index <HASH>..<HASH> 100644
--- a/multiqc/modules/bcl2fastq/bcl2fastq.py
+++ b/multiqc/modules/bcl2fastq/bcl2fastq.py
@@ -83,6 +83,8 @@ class MultiqcModule(BaseMultiqcModule):
run_data[lane] = {"total": 0, "perfectIndex": 0, "samples": dict()}
for demuxResult in conversionResult["DemuxResults"]:
sample = demuxResult["SampleName"]
+ if sample in run_data[lane]["samples"]:
+ log.debug("Duplicate runId/lane/sample combination found! Overwriting: {}, {}".format(self.prepend_runid(runId, lane),sample))
run_data[lane]["samples"][sample] = {"total": 0, "perfectIndex": 0, "filename": os.path.join(myfile['root'],myfile["fn"])}
run_data[lane]["total"] += demuxResult["NumberReads"]
run_data[lane]["samples"][sample]["total"] += demuxResult["NumberReads"]
|
Add warning for duplicate runID/lane/sample combination
|
diff --git a/lib/logger.js b/lib/logger.js
index <HASH>..<HASH> 100644
--- a/lib/logger.js
+++ b/lib/logger.js
@@ -34,15 +34,9 @@ Logger.prototype = {
},
log: function(message) {
var timestamp = '[' + this.getTimestamp() + ']';
- message = message.split('\n');
- if (message.length == 1) {
- this.stream.write(timestamp + ' ' + message[0] + '\n');
- } else {
- this.stream.write(timestamp + '\n');
- message.forEach(function(line) {
- this.stream.write(' ' + line + '\n');
- }, this);
- }
+ message.split('\n').forEach(function(line) {
+ this.stream.write(timestamp + ' ' + line + '\n');
+ }, this);
}
};
|
Output timestamp for all lines
|
diff --git a/App/Ui/DataProvider/Grid/Query/Builder.php b/App/Ui/DataProvider/Grid/Query/Builder.php
index <HASH>..<HASH> 100644
--- a/App/Ui/DataProvider/Grid/Query/Builder.php
+++ b/App/Ui/DataProvider/Grid/Query/Builder.php
@@ -56,7 +56,9 @@ abstract class Builder
/* limit pages */
$pageSize = $search->getPageSize();
$pageIndx = $search->getCurrentPage();
- $query->limitPage($pageIndx, $pageSize);
+ if ($pageSize || $pageIndx) {
+ $query->limitPage($pageIndx, $pageSize);
+ }
$result = $this->conn->fetchAll($query);
return $result;
}
|
MOBI-<I> PV transfers batch upload
|
diff --git a/test/e2e/windows/dns.go b/test/e2e/windows/dns.go
index <HASH>..<HASH> 100644
--- a/test/e2e/windows/dns.go
+++ b/test/e2e/windows/dns.go
@@ -30,7 +30,7 @@ import (
"github.com/onsi/ginkgo"
)
-var _ = SIGDescribe("DNS", func() {
+var _ = SIGDescribe("[Feature:Windows] DNS", func() {
ginkgo.BeforeEach(func() {
e2eskipper.SkipUnlessNodeOSDistroIs("windows")
@@ -50,6 +50,9 @@ var _ = SIGDescribe("DNS", func() {
Nameservers: []string{testInjectedIP},
Searches: []string{testSearchPath},
}
+ testUtilsPod.Spec.NodeSelector = map[string]string{
+ "kubernetes.io/os": "windows",
+ }
testUtilsPod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(context.TODO(), testUtilsPod, metav1.CreateOptions{})
framework.ExpectNoError(err)
framework.Logf("Created pod %v", testUtilsPod)
|
adding windows os selector to the dnsPolicy tests
adding a feature selector to the windows Describe dns test
|
diff --git a/src/Services/Air/AirParser.js b/src/Services/Air/AirParser.js
index <HASH>..<HASH> 100644
--- a/src/Services/Air/AirParser.js
+++ b/src/Services/Air/AirParser.js
@@ -779,10 +779,10 @@ function importRequest(data) {
function extractFareRules(obj) {
const rulesList = obj['air:FareRule'];
- _.forEach(rulesList, (item) => {
+ rulesList.forEach((item) => {
const result = [];
const listName = (item['air:FareRuleLong']) ? 'air:FareRuleLong' : 'air:FareRuleShort';
- _.forEach(item[listName], (rule) => {
+ item[listName].forEach((rule) => {
const ruleCategoryNumber = parseInt(rule.Category, 10);
if (rule['air:FareRuleNameValue']) {
// for short rules
|
#<I> rewrite parser without lodash
|
diff --git a/hap.conf.js b/hap.conf.js
index <HASH>..<HASH> 100644
--- a/hap.conf.js
+++ b/hap.conf.js
@@ -10,6 +10,11 @@ module.exports = function(config) {
basePath: '',
browserNoActivityTimeout: 100000,
+ browserConsoleLogOptions: {
+ level: 'log',
+ format: '%b %T: %m',
+ terminal: true,
+ },
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
Enable console.log output in karma logs
|
diff --git a/lib/nucleon/action/node/facts.rb b/lib/nucleon/action/node/facts.rb
index <HASH>..<HASH> 100644
--- a/lib/nucleon/action/node/facts.rb
+++ b/lib/nucleon/action/node/facts.rb
@@ -11,13 +11,6 @@ class Facts < CORL.plugin_class(:nucleon, :cloud_action)
super(:node, :facts, 570)
end
- #----
-
- def prepare
- CORL.quiet = true
- super
- end
-
#-----------------------------------------------------------------------------
# Settings
@@ -29,7 +22,7 @@ class Facts < CORL.plugin_class(:nucleon, :cloud_action)
ensure_node(node) do
facter_facts = node.facts
- puts Util::Data.to_json(facter_facts, true)
+ $stderr.puts Util::Data.to_json(facter_facts, true)
myself.result = facter_facts
end
end
|
Reworking the node facts action provider to work with updated lookup architecture.
|
diff --git a/handler/src/main/java/io/netty/handler/ssl/OpenSsl.java b/handler/src/main/java/io/netty/handler/ssl/OpenSsl.java
index <HASH>..<HASH> 100644
--- a/handler/src/main/java/io/netty/handler/ssl/OpenSsl.java
+++ b/handler/src/main/java/io/netty/handler/ssl/OpenSsl.java
@@ -112,6 +112,8 @@ public final class OpenSsl {
UNAVAILABILITY_CAUSE = cause;
if (cause == null) {
+ logger.debug("netty-tcnative using native library: {}", SSL.versionString());
+
final Set<String> availableOpenSslCipherSuites = new LinkedHashSet<String>(128);
boolean supportsKeyManagerFactory = false;
boolean useKeyManagerFactory = false;
|
Log used native library by netty-tcnative
Motivation:
As netty-tcnative can be build against different native libraries and versions we should log the used one.
Modifications:
Log the used native library after netty-tcnative was loaded.
Result:
Easier to understand what native SSL library was used.
|
diff --git a/spec/acceptance/examples_spec.rb b/spec/acceptance/examples_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/acceptance/examples_spec.rb
+++ b/spec/acceptance/examples_spec.rb
@@ -11,7 +11,7 @@ describe "Regression on" do
gsub('example/','example/output/')
end
- it "runs successfully" do
+ it "runs successfully", :ruby => 1.9 do
stdin, stdout, stderr = Open3.popen3("ruby #{example}")
handle_map = {
|
. only run examples on <I> as part of the spec
Output of <I> and <I> differs largely. <I> will have to be verified manually.
|
diff --git a/casper.js b/casper.js
index <HASH>..<HASH> 100644
--- a/casper.js
+++ b/casper.js
@@ -536,7 +536,7 @@
utils: encodeURIComponent(phantom.Casper.ClientUtils.toString())
}));
if (!injected) {
- casper.log('Failed to inject Casper client-side utilities!', "debug");
+ casper.log('Failed to inject Casper client-side utilities!', "warning");
} else {
casper.log('Successfully injected Casper client-side utilities', "debug");
}
|
log message when failed injecting client-side utils raised to 'warning'
|
diff --git a/pkg/cache/resource.go b/pkg/cache/resource.go
index <HASH>..<HASH> 100644
--- a/pkg/cache/resource.go
+++ b/pkg/cache/resource.go
@@ -30,6 +30,7 @@ type Resource interface {
// Common names for Envoy filters.
const (
+ CORS = "envoy.cors"
Router = "envoy.router"
HTTPConnectionManager = "envoy.http_connection_manager"
TCPProxy = "envoy.tcp_proxy"
|
Add CORS filter string (#<I>)
|
diff --git a/fixtures/go-server/server.go b/fixtures/go-server/server.go
index <HASH>..<HASH> 100644
--- a/fixtures/go-server/server.go
+++ b/fixtures/go-server/server.go
@@ -1,6 +1,7 @@
package main
import (
+ "flag"
"fmt"
"io/ioutil"
"net/http"
@@ -10,6 +11,11 @@ import (
"syscall"
)
+var (
+ memoryAllocated = flag.Uint("allocate-memory-b", 0, "allocate this much memory (in mb) on the heap and do not release it")
+ someGarbage []uint8
+)
+
func main() {
http.HandleFunc("/", hello)
http.HandleFunc("/env", env)
@@ -21,6 +27,10 @@ func main() {
http.HandleFunc("/cf-instance-key", cfInstanceKey)
http.HandleFunc("/cat", catFile)
+ if memoryAllocated != nil {
+ someGarbage = make([]uint8, *memoryAllocated*1024*1024)
+ }
+
fmt.Println("listening...")
ports := os.Getenv("PORT")
|
add a flag to cause the go-server to consume constant amount of memory
|
diff --git a/src/main/java/net/openhft/chronicle/network/WanSimulator.java b/src/main/java/net/openhft/chronicle/network/WanSimulator.java
index <HASH>..<HASH> 100755
--- a/src/main/java/net/openhft/chronicle/network/WanSimulator.java
+++ b/src/main/java/net/openhft/chronicle/network/WanSimulator.java
@@ -2,6 +2,8 @@ package net.openhft.chronicle.network;
import net.openhft.chronicle.core.Jvm;
+import java.util.Random;
+
/**
* Created by peter.lawrey on 16/07/2015.
*/
@@ -9,11 +11,12 @@ public enum WanSimulator {
;
private static final int NET_BANDWIDTH = Integer.getInteger("wanMB", 0);
private static final int BYTES_PER_MS = NET_BANDWIDTH * 1000;
+ private static final Random RANDOM = new Random();
private static long totalRead = 0;
public static void dataRead(int bytes) {
if (NET_BANDWIDTH <= 0) return;
- totalRead += bytes + 128;
+ totalRead += bytes + RANDOM.nextInt(BYTES_PER_MS);
int delay = (int) (totalRead / BYTES_PER_MS);
if (delay > 0) {
Jvm.pause(delay);
|
Add a wan simulator to reproduce timing sensitive issues with a random <I> ms delay.
|
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index <HASH>..<HASH> 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -66,8 +66,11 @@ class Manager extends Singleton
'AnonymizeIP',
'DBStats',
'DevicesDetection',
-// 'Events',
- 'TreemapVisualization', // should be moved to marketplace
+ 'ExampleCommand',
+ 'ExampleSettingsPlugin',
+ 'ExampleUI',
+ 'ExampleVisualization',
+ 'ExamplePluginTemplate'
);
public function getCorePluginsDisabledByDefault()
|
refs #<I> mark does plugins as core plugins
|
diff --git a/molmod/molecular_graphs.py b/molmod/molecular_graphs.py
index <HASH>..<HASH> 100644
--- a/molmod/molecular_graphs.py
+++ b/molmod/molecular_graphs.py
@@ -165,7 +165,7 @@ class MolecularGraph(Graph):
# actual removal
edges = [edges[i] for i in range(len(edges)) if mask[i]]
if do_orders:
- bond_order = [bond_order[i] for i in range(len(bond_order)) if mask[i]]
+ orders = [orders[i] for i in range(len(orders)) if mask[i]]
result = cls(edges, molecule.numbers, orders)
else:
result = cls(edges, molecule.numbers)
|
Fixed small bug in (bond) orders attribute assignation
|
diff --git a/src/structures/MessageEmbed.js b/src/structures/MessageEmbed.js
index <HASH>..<HASH> 100644
--- a/src/structures/MessageEmbed.js
+++ b/src/structures/MessageEmbed.js
@@ -7,6 +7,13 @@ const Util = require('../util/Util');
* Represents an embed in a message (image/video preview, rich embed, etc.)
*/
class MessageEmbed {
+ /**
+ * @name MessageEmbed
+ * @kind constructor
+ * @memberof MessageEmbed
+ * @param {MessageEmbed|Object} [data={}] MessageEmbed to clone or raw embed data
+ */
+
constructor(data = {}, skipValidation = false) {
this.setup(data, skipValidation);
}
|
docs(MessageEmbed): document the constructor (#<I>)
|
diff --git a/addon/components/ember-remodal.js b/addon/components/ember-remodal.js
index <HASH>..<HASH> 100644
--- a/addon/components/ember-remodal.js
+++ b/addon/components/ember-remodal.js
@@ -53,6 +53,7 @@ export default Component.extend({
},
willDestroy() {
+ scheduleOnce('destroy', this, '_destroyDomElements');
scheduleOnce('afterRender', this, '_deregisterObservers');
},
@@ -127,6 +128,14 @@ export default Component.extend({
Ember.$(document).off('closed', modal);
},
+ _destroyDomElements() {
+ const modal = this.get('modal');
+
+ if (modal) {
+ modal.destroy();
+ }
+ },
+
_createInstanceAndOpen() {
let modal = Ember.$(this.get('modalId')).remodal({
hashTracking: this.get('hashTracking'),
|
call remodal's native destroy on willDestroyElement
without calling remodal’s native `destroy()`, the dom elements that it
creates are left around after the `ember-remodal` component instance
has been destroyed, resulting in a resource leak. Closes #<I>
|
diff --git a/lib/6to5/generation/generators/statements.js b/lib/6to5/generation/generators/statements.js
index <HASH>..<HASH> 100644
--- a/lib/6to5/generation/generators/statements.js
+++ b/lib/6to5/generation/generators/statements.js
@@ -23,7 +23,11 @@ exports.IfStatement = function (node, print) {
if (node.alternate) {
if (this.isLast("}")) this.push(" ");
this.keyword("else");
- this.push(" ");
+
+ if (this.format.format && !t.isBlockStatement(node.alternate)) {
+ this.push(" ");
+ }
+
print.indentOnComments(node.alternate);
}
};
|
better handle spaces in IfStatement generator
|
diff --git a/src/es5.js b/src/es5.js
index <HASH>..<HASH> 100644
--- a/src/es5.js
+++ b/src/es5.js
@@ -19,7 +19,7 @@ else {
var str = {}.toString;
var proto = {}.constructor.prototype;
- function ObjectKeys(o) {
+ var ObjectKeys = function ObjectKeys(o) {
var ret = [];
for (var key in o) {
if (has.call(o, key)) {
@@ -29,16 +29,16 @@ else {
return ret;
}
- function ObjectDefineProperty(o, key, desc) {
+ var ObjectDefineProperty = function ObjectDefineProperty(o, key, desc) {
o[key] = desc.value;
return o;
}
- function ObjectFreeze(obj) {
+ var ObjectFreeze = function ObjectFreeze(obj) {
return obj;
}
- function ObjectGetPrototypeOf(obj) {
+ var ObjectGetPrototypeOf = function ObjectGetPrototypeOf(obj) {
try {
return Object(obj).constructor.prototype;
}
@@ -47,7 +47,7 @@ else {
}
}
- function ArrayIsArray(obj) {
+ var ArrayIsArray = function ArrayIsArray(obj) {
try {
return str.call(obj) === "[object Array]";
}
|
Change function defs to variable defs in block scope.
Function definitions in blocks cause chrome to throw syntax error in
strict mode.
|
diff --git a/Kwc/User/Login/Form/Success/Component.js b/Kwc/User/Login/Form/Success/Component.js
index <HASH>..<HASH> 100644
--- a/Kwc/User/Login/Form/Success/Component.js
+++ b/Kwc/User/Login/Form/Success/Component.js
@@ -1,6 +1,6 @@
var onReady = require('kwf/on-ready');
-onReady.onShow('.kwcUserLoginFormSuccess', function(el) {
+onReady.onShow('.kwcClass', function(el) {
var url = el.find('input.redirectTo').val();
if (!url) url = location.href;
location.href = url;
|
fixed redirect after login, onReady has to use kwcClass to find correct element
|
diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py
index <HASH>..<HASH> 100644
--- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py
+++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/taskapp/celery.py
@@ -4,6 +4,10 @@ import os
from celery import Celery
from django.apps import AppConfig
from django.conf import settings
+{% if cookiecutter.use_sentry == "y" -%}
+from raven import Client
+from raven.contrib.celery import register_signal
+{%- endif %}
if not settings.configured:
# set the default Django settings module for the 'celery' program.
@@ -23,6 +27,13 @@ class CeleryConfig(AppConfig):
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS, force=True)
+ {% if cookiecutter.use_sentry == "y" -%}
+ if hasattr(settings, 'RAVEN_CONFIG'):
+ # Celery signal registration
+ client = Client(dsn=settings.RAVEN_CONFIG['dsn'])
+ register_signal(client)
+ {%- endif %}
+
@app.task(bind=True)
def debug_task(self):
|
fix sentry logging in conjunction with celery
|
diff --git a/tests/test_chain.py b/tests/test_chain.py
index <HASH>..<HASH> 100644
--- a/tests/test_chain.py
+++ b/tests/test_chain.py
@@ -403,8 +403,7 @@ def test_invalid_transaction():
blk = mine_next_block(blk, transactions=[tx])
assert blk.get_balance(v) == 0
assert blk.get_balance(v2) == utils.denoms.ether * 1
- # should invalid transaction be included in blocks?
- assert tx in blk.get_transactions()
+ assert tx not in blk.get_transactions()
def test_add_side_chain():
|
invalid tx must not be included in block
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,8 @@ rules_lib = ('rules_py',
rules = Extension('rules',
sources = ['src/rulespy/rules.c'],
- include_dirs=['src/rules'])
+ include_dirs=['src/rules'],
+ extra_compile_args = ['-std=c99'])
here = path.abspath(path.dirname(__file__)) + '/docs/py'
with open(path.join(here, 'README.txt'), encoding='utf-8') as f:
@@ -36,7 +37,7 @@ with open(path.join(here, 'README.txt'), encoding='utf-8') as f:
setup (
name = 'durable_rules',
- version = '0.33.04',
+ version = '0.33.05',
description = 'for real time analytics',
long_description=long_description,
url='https://github.com/jruizgit/rules',
|
python build for POSIX
|
diff --git a/mongo_import.py b/mongo_import.py
index <HASH>..<HASH> 100755
--- a/mongo_import.py
+++ b/mongo_import.py
@@ -571,7 +571,7 @@ def insert_infocontent_data(germanet_db):
# Although Resnik (1995) suggests dividing count by the number
# of synsets, Patwardhan et al (2003) argue against doing
# this.
- #count /= len(synsets)
+ count = float(count) / len(synsets)
for synset in synsets:
total_count += count
paths = synset.hypernym_paths
|
mongo_import: revert to resnik's method for information content
|
diff --git a/umbra/controller.py b/umbra/controller.py
index <HASH>..<HASH> 100644
--- a/umbra/controller.py
+++ b/umbra/controller.py
@@ -138,8 +138,9 @@ class AmqpBrowserController:
self.logger.info('browser={} client_id={} url={}'.format(browser, client_id, url))
try:
browser.browse_page(url, on_request=on_request)
- finally:
self._browser_pool.release(browser)
+ except:
+ self.logger.critical("problem browsing page, may have lost browser process", exc_info=True)
import random
threadName = "BrowsingThread{}-{}".format(browser.chrome_port,
|
dump stack trace and don't return browser to pool on critical error where chrome process might still be running
|
diff --git a/tests/Asserts/ArtisanAssertsTest.php b/tests/Asserts/ArtisanAssertsTest.php
index <HASH>..<HASH> 100644
--- a/tests/Asserts/ArtisanAssertsTest.php
+++ b/tests/Asserts/ArtisanAssertsTest.php
@@ -11,6 +11,14 @@ class ArtisanAssertsTest extends TestCase
}
/** @test */
+ public function which_accepts_file_path_as_output_parameter()
+ {
+ $this->artisan('generic');
+
+ $this->seeArtisanOutput(__DIR__ . '/ArtisanAssertsTest/correct.output.txt');
+ }
+
+ /** @test */
public function it_has_dont_see_artisan_output_assertion()
{
$this->artisan('generic');
@@ -19,6 +27,14 @@ class ArtisanAssertsTest extends TestCase
}
/** @test */
+ public function which_also_accepts_file_path_as_output_parameter()
+ {
+ $this->artisan('generic');
+
+ $this->dontSeeArtisanOutput(__DIR__ . '/ArtisanAssertsTest/incorrect.output.txt');
+ }
+
+ /** @test */
public function it_has_see_artisan_table_output_assertion()
{
$this->artisan('table-output');
|
ITT: Ability to use file path - tests added.
|
diff --git a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetStaticContent.java b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetStaticContent.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetStaticContent.java
+++ b/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetStaticContent.java
@@ -97,7 +97,7 @@ public class OServerCommandGetStaticContent extends OServerCommandConfigurableAb
}
iResponse.setHeader(header);
- return super.beforeExecute(iRequest, iResponse);
+ return true;
}
@Override
|
Fixed cache problem: every static resource returned a no-cache header. This is the reason why the WebServer performed so bad
|
diff --git a/classes/PHPTAL/Context.php b/classes/PHPTAL/Context.php
index <HASH>..<HASH> 100644
--- a/classes/PHPTAL/Context.php
+++ b/classes/PHPTAL/Context.php
@@ -499,10 +499,8 @@ function phptal_isempty($var)
*/
function phptal_true($var)
{
- if (is_callable($var, false, $callable_name)) {
- if ($callable_name === 'Closure::__invoke') {
- return $var();
- }
+ if (is_a($var, 'Closure')) {
+ return $var();
}
return $var && (!$var instanceof Countable || count($var));
}
@@ -544,10 +542,8 @@ function phptal_tostring($var)
return $xml;
}
}
- if (is_callable($var, false, $callable_name)) {
- if ($callable_name === 'Closure::__invoke') {
- return $var();
- }
+ if (is_a($var, 'Closure')) {
+ return $var();
}
return (string)$var;
}
|
Closures: Updating check for closure call for data type compatibility
|
diff --git a/protocol-designer/src/ui/steps/actions/__tests__/actions.test.js b/protocol-designer/src/ui/steps/actions/__tests__/actions.test.js
index <HASH>..<HASH> 100644
--- a/protocol-designer/src/ui/steps/actions/__tests__/actions.test.js
+++ b/protocol-designer/src/ui/steps/actions/__tests__/actions.test.js
@@ -18,6 +18,9 @@ describe('steps actions', () => {
pipettes: { mount: 'left' },
})
formLevel.getNextDefaultPipetteId.mockReturnValue(pipetteId)
+ stepFormSelectors._getStepFormData.mockReturnValue({
+ stepType: 'magnet',
+ })
})
test('action is created to populate form with default engage height to scale when engage magnet step', () => {
@@ -44,6 +47,7 @@ describe('steps actions', () => {
moduleId: magnetModule,
magnetAction: magnetAction,
engageHeight: '10.9',
+ stepType: 'magnet',
},
},
])
@@ -73,6 +77,7 @@ describe('steps actions', () => {
moduleId: magnetModule,
magnetAction: magnetAction,
engageHeight: null,
+ stepType: 'magnet',
},
},
])
|
fix(protocol-designer): fix failing action test (#<I>)
|
diff --git a/src/WebinoImageThumb/PhpThumb/Plugin/Sharpen.php b/src/WebinoImageThumb/PhpThumb/Plugin/Sharpen.php
index <HASH>..<HASH> 100644
--- a/src/WebinoImageThumb/PhpThumb/Plugin/Sharpen.php
+++ b/src/WebinoImageThumb/PhpThumb/Plugin/Sharpen.php
@@ -2,7 +2,7 @@
namespace WebinoImageThumb\PhpThumb\Plugin;
-use PHPThumb\PHPThumb;
+use PHPThumb\GD as PHPThumb;
class Sharpen implements \PHPThumb\PluginInterface
{
@@ -34,4 +34,4 @@ class Sharpen implements \PHPThumb\PluginInterface
return $phpthumb;
}
-}
+}
\ No newline at end of file
diff --git a/src/WebinoImageThumb/WebinoImageThumb.php b/src/WebinoImageThumb/WebinoImageThumb.php
index <HASH>..<HASH> 100644
--- a/src/WebinoImageThumb/WebinoImageThumb.php
+++ b/src/WebinoImageThumb/WebinoImageThumb.php
@@ -80,4 +80,4 @@ class WebinoImageThumb
{
return new ExtraPlugins\Sharpen($offset, $matrix);
}
-}
+}
\ No newline at end of file
|
- The method getOldImage() does not seem to exist on object<PHPThumb\PHPThumb> (solved);
|
diff --git a/src/iframeResizer.js b/src/iframeResizer.js
index <HASH>..<HASH> 100644
--- a/src/iframeResizer.js
+++ b/src/iframeResizer.js
@@ -17,7 +17,6 @@
msgHeaderLen = msgHeader.length,
msgId = '[iFrameSizer]', //Must match iframe msg ID
msgIdLen = msgId.length,
- page = '', //:'+location.href, //Uncoment to debug nested iFrames
pagePosition = null,
requestAnimationFrame = window.requestAnimationFrame,
resetRequiredMethods = {max:1,scroll:1,bodyScroll:1,documentElementScroll:1},
@@ -216,7 +215,7 @@
function checkIFrameExists(){
if (null === messageData.iframe) {
- warn('iFrame ('+messageData.id+') does not exist on ' + page);
+ warn(' IFrame ('+messageData.id+') not found');
return false;
}
return true;
|
Updated warning message for iFrame not found
|
diff --git a/src/server/pps/server/worker_pool.go b/src/server/pps/server/worker_pool.go
index <HASH>..<HASH> 100644
--- a/src/server/pps/server/worker_pool.go
+++ b/src/server/pps/server/worker_pool.go
@@ -307,3 +307,20 @@ func (a *apiServer) delWorkerPool(id string) {
defer a.workerPoolsLock.Unlock()
delete(a.workerPools, id)
}
+
+func workerClients(ctx context.Context, id string, etcdClient etcd.Client, etcdPrefix string) ([]workerpkg.WorkerClient, error) {
+ resp, err := etcdClient.Get(ctx, path.Join(etcdPrefix, workerEtcdPrefix, id), etcd.WithPrefix())
+ if err != nil {
+ return nil, err
+ }
+
+ var result []workerpkg.WorkerClient
+ for _, kv := range resp.Kvs {
+ conn, err := grpc.Dial(fmt.Sprintf("%s:%d", string(kv.Key), client.PPSWorkerPort), grpc.WithInsecure(), grpc.WithTimeout(5*time.Second))
+ if err != nil {
+ return nil, err
+ }
+ result = append(result, workerpkg.NewWorkerClient(conn))
+ }
+ return result, nil
+}
|
Adds a method to get workerClients for a pool.
|
diff --git a/lib/fakeredis/minitest.rb b/lib/fakeredis/minitest.rb
index <HASH>..<HASH> 100644
--- a/lib/fakeredis/minitest.rb
+++ b/lib/fakeredis/minitest.rb
@@ -3,7 +3,7 @@
#
# # Gemfile
# group :test do
-# gem 'rspec'
+# gem 'minitest'
# gem 'fakeredis', :require => 'fakeredis/minitest'
# end
#
|
fix doc that minitest is not rspec
|
diff --git a/src/Notificator.php b/src/Notificator.php
index <HASH>..<HASH> 100644
--- a/src/Notificator.php
+++ b/src/Notificator.php
@@ -10,12 +10,21 @@ namespace Lloople\Notificator;
class Notificator
{
+ /**
+ * @param string $message
+ * @param int $duration
+ */
public static function success(string $message, int $duration = 5000)
{
self::createNotification('success', $message, $duration);
}
+ /**
+ * @param string $type
+ * @param string $message
+ * @param int $duration
+ */
public static function createNotification(string $type, string $message, int $duration)
{
@@ -24,24 +33,30 @@ class Notificator
session()->flash('notifications.' . $notification->getId(), $notification);
}
- public static function getUniqueId(): string
- {
-
- return uniqid();
- }
-
+ /**
+ * @param string $message
+ * @param int $duration
+ */
public static function warning(string $message, int $duration = 5000)
{
self::createNotification('warning', $message, $duration);
}
+ /**
+ * @param string $message
+ * @param int $duration
+ */
public static function info(string $message, int $duration = 5000)
{
self::createNotification('info', $message, $duration);
}
+ /**
+ * @param string $message
+ * @param int $duration
+ */
public static function error(string $message, int $duration = 5000)
{
|
Delete unused method and add PHPDoc
|
diff --git a/classes/models/forum.php b/classes/models/forum.php
index <HASH>..<HASH> 100644
--- a/classes/models/forum.php
+++ b/classes/models/forum.php
@@ -130,4 +130,10 @@ class Forum extends Base
$this->subscription()->delete();
}
}
+
+ public function unsubscribe()
+ {
+ return $this->subscribe(false);
+ }
+
}
diff --git a/classes/models/topic.php b/classes/models/topic.php
index <HASH>..<HASH> 100644
--- a/classes/models/topic.php
+++ b/classes/models/topic.php
@@ -84,4 +84,9 @@ class Topic extends Base
}
}
+ public function unsubscribe()
+ {
+ return $this->subscribe(false);
+ }
+
}
|
Add more expressive methods for unsubscribing from forums and topics.
|
diff --git a/budou/budou.py b/budou/budou.py
index <HASH>..<HASH> 100644
--- a/budou/budou.py
+++ b/budou/budou.py
@@ -64,6 +64,7 @@ def main():
elif not sys.stdin.isatty():
source = sys.stdin.read()
else:
+ print(__doc__.split("\n\n")[1])
sys.exit()
result = parse(
|
Make sure "Usage" is displayed when no source is provided
|
diff --git a/src/xhr.js b/src/xhr.js
index <HASH>..<HASH> 100644
--- a/src/xhr.js
+++ b/src/xhr.js
@@ -121,7 +121,7 @@ XHR.load = function(xhr, cfg, resolve, reject) {
if (cfg.cache) {
XHR.cache(xhr);
}
- var data = xhr.response || xhr.responseText;
+ var data = xhr.responseType ? xhr.response : xhr.responseText;
if (cfg.responseData && XHR.isData(data)) {
var ret = cfg.responseData(data);
data = ret === undefined ? data : ret;
|
only use response when responseType is present
|
diff --git a/salt/fileserver/svnfs.py b/salt/fileserver/svnfs.py
index <HASH>..<HASH> 100644
--- a/salt/fileserver/svnfs.py
+++ b/salt/fileserver/svnfs.py
@@ -732,6 +732,8 @@ def _file_lists(load, form):
env_root
)
ret['files'].add(os.path.join(repo['mountpoint'], rel_fn))
+ if repo['mountpoint']:
+ ret['dirs'].add(repo['mountpoint'])
# Convert all compiled sets to lists
for key in ret:
ret[key] = sorted(ret[key])
|
Fix file.recurse on root of svnfs repo
This fixes a condition where a file.recurse fails on the root of an
svnfs repo when the repo has a mountpoint. See #<I>.
|
diff --git a/tests/test_twitter.py b/tests/test_twitter.py
index <HASH>..<HASH> 100644
--- a/tests/test_twitter.py
+++ b/tests/test_twitter.py
@@ -41,7 +41,7 @@ def client_oauth(key, event_loop):
clients[key] = PeonyClient(auth=headers[key], **creds)
clients[key].loop = event_loop
- clients[key]._session = aiohttp.ClientSession(loop=event_loop)
+ clients[key]._session = aiohttp.ClientSession()
return clients[key]
|
tests: don't use pytest-asyncio loop (?)
I'm not sure, but it seems like the loop used by the tests is wrong
sometimes.
|
diff --git a/lib/middleware.js b/lib/middleware.js
index <HASH>..<HASH> 100644
--- a/lib/middleware.js
+++ b/lib/middleware.js
@@ -69,6 +69,9 @@ function createMiddleware(logger, fileList, emitter, injector) {
} else {
reverseContextFile = reverseContextFile.path;
}
+
+ log.debug(`Adding reverse context file ${reverseContextFile} to chunk ${typeof chunk}(${chunk.length})`);
+
chunk = chunk.replace('%REVERSE_CONTEXT%', reverseContextFile);
return includeScriptsIntoContext(includeServedOnly(files), log, injector, chunk, req);
}
|
Some more logs to help debug travis
|
diff --git a/lib/adhearsion/process.rb b/lib/adhearsion/process.rb
index <HASH>..<HASH> 100644
--- a/lib/adhearsion/process.rb
+++ b/lib/adhearsion/process.rb
@@ -32,11 +32,6 @@ module Adhearsion
event :reset do
transition all => :booting
end
-
- def trigger_shutdown_events
- Events.trigger_immediately :shutdown
- end
-
end
def initialize
@@ -48,6 +43,10 @@ module Adhearsion
puts "Adhearsion transitioning from #{from} to #{to}."
end
+ def trigger_shutdown_events
+ Events.trigger_immediately :shutdown
+ end
+
def self.method_missing(method_name, *args, &block)
instance.send method_name, *args, &block
end
|
[FEATURE] Trigger shutdown events
|
diff --git a/options.go b/options.go
index <HASH>..<HASH> 100644
--- a/options.go
+++ b/options.go
@@ -43,8 +43,14 @@ func NewOptions() Options {
func optionsWithDefaults(opts Options) Options {
opts.Env = defaults.String(opts.Env, defaults.String(os.Getenv("GO_ENV"), "development"))
opts.LogLevel = defaults.String(opts.LogLevel, "debug")
- pwd, _ := os.Getwd()
- opts.LogDir = defaults.String(opts.LogDir, filepath.Join(pwd, "logs"))
+
+ if opts.Env == "test" {
+ opts.LogDir = os.TempDir()
+ } else {
+ pwd, _ := os.Getwd()
+ opts.LogDir = defaults.String(opts.LogDir, filepath.Join(pwd, "logs"))
+ }
+
if opts.SessionStore == nil {
opts.SessionStore = sessions.NewCookieStore([]byte(os.Getenv("SESSION_SECRET")))
}
|
this outputs the test logs to a tmp folder isntead of the folder were the tests run
|
diff --git a/go/client/cmd_chat_conv_info.go b/go/client/cmd_chat_conv_info.go
index <HASH>..<HASH> 100644
--- a/go/client/cmd_chat_conv_info.go
+++ b/go/client/cmd_chat_conv_info.go
@@ -97,8 +97,8 @@ func (c *CmdChatConvInfo) Run() error {
if info.Triple.TopicType != chat1.TopicType_CHAT {
topicType = fmt.Sprintf(" (%s)", info.Triple.TopicType)
}
- _, err = dui.Printf("ConversationName: %s%s\nConversationID: %v\n",
- utils.FormatConversationName(info, c.G().Env.GetUsername().String()), topicType, info.Id)
+ _, err = dui.Printf("ConversationName: %s%s\nConversationID: %v\nConvIDShort: %v\n",
+ utils.FormatConversationName(info, c.G().Env.GetUsername().String()), topicType, info.Id, info.Id.DbShortFormString())
return err
}
|
add convid short to conv info command (#<I>)
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -213,11 +213,11 @@ class IpfsRepo {
(err, res) => {
log('init', err, res)
if (err) {
- return callback(err)
- }
-
- if (!res.config) {
- return callback(new Error('repo is not initialized yet'))
+ return callback(Object.assign(new Error('repo is not initialized yet'),
+ {
+ code: 'ERR_REPO_NOT_INITIALIZED',
+ path: this.path
+ }))
}
callback()
}
|
feat: add uniform error to isInitialized
_isInitialized is used in several other repos to check the repo even being a pseudo private method
the error should be uniform for easier handling and not whatever this.config.exists(cb) or this.version.check(repoVersion, cb) returns on error
|
diff --git a/core/Core/BackController.php b/core/Core/BackController.php
index <HASH>..<HASH> 100644
--- a/core/Core/BackController.php
+++ b/core/Core/BackController.php
@@ -57,30 +57,4 @@ class BackController
{
$this->action = $action;
}
-
- /**
- * Renvoie une instance de \phpGone\Renderer\Renderer
- *
- * @return \phpGone\Renderer\Renderer
- */
- public function getRenderer()
- {
- if (is_null($this->renderer)) {
- $this->setRenderer(new \phpGone\Renderer\Renderer());
- return $this->renderer;
- } else {
- return $this->renderer;
- }
- }
-
- /**
- * Défini l'attribut renderer
- *
- * @param \phpGone\Renderer\Renderer $renderer
- * @return void
- */
- private function setRenderer(\phpGone\Renderer\Renderer $renderer)
- {
- $this->renderer = $renderer;
- }
}
|
Remove renderer method in backController and format files
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -3,7 +3,7 @@
var path = require('path'),
chalk = require('chalk'),
childProcess = require('child_process'),
- phantomjs = require('phantomjs'),
+ phantomjs = require('phantomjs-prebuilt'),
binPath = phantomjs.path,
phantomjsRunnerDir = path.dirname(require.resolve('qunit-phantomjs-runner'));
|
Update phantomjs package name.
|
diff --git a/src/main/java/org/openqa/selenium/WebElement.java b/src/main/java/org/openqa/selenium/WebElement.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/openqa/selenium/WebElement.java
+++ b/src/main/java/org/openqa/selenium/WebElement.java
@@ -101,17 +101,6 @@ public interface WebElement extends SearchContext {
String getAttribute(String name);
/**
- * If the element is a checkbox this will toggle the elements state from selected to not
- * selected, or from not selected to selected.
- *
- * @return Whether the toggled element is selected (true) or not (false) after this toggle is
- * complete
- * @deprecated To be removed. Determine the current state using {@link #isSelected()}
- */
- @Deprecated
- boolean toggle();
-
- /**
* Determine whether or not this element is selected or not. This operation only applies to
* input elements such as checkboxes, options in a select and radio buttons.
*
|
SimonStewart: Deleting the deprecated toggle method
r<I>
|
diff --git a/bootstraps/react-dom-bootstrap.js b/bootstraps/react-dom-bootstrap.js
index <HASH>..<HASH> 100644
--- a/bootstraps/react-dom-bootstrap.js
+++ b/bootstraps/react-dom-bootstrap.js
@@ -82,7 +82,7 @@ function makeWebTagFactory(tagName) {
children.push(val)
}
}
- return React.createElement.call(React, tagName, props, children)
+ return React.createElement(tagName, props, ...children)
}
}
|
Splat children argument to stop react-js warning about array-contained children having a key property
|
diff --git a/server/client.js b/server/client.js
index <HASH>..<HASH> 100755
--- a/server/client.js
+++ b/server/client.js
@@ -9,6 +9,11 @@ var util = require('util'),
Stats = require('./stats.js');
+var next_client_id = 1;
+function generateClientId() {
+ return next_client_id++;
+}
+
var Client = function (websocket, opts) {
var that = this;
@@ -31,12 +36,8 @@ var Client = function (websocket, opts) {
// Clients address
this.real_address = this.websocket.meta.real_address;
- // A hash to identify this client instance
- this.hash = crypto.createHash('sha256')
- .update(this.real_address)
- .update('' + Date.now())
- .update(Math.floor(Math.random() * 100000).toString())
- .digest('hex');
+ // An ID to identify this client instance
+ this.id = generateClientId();
this.state = new State(this);
|
Switching client IDs from pointless expensive sha<I> hashes to simple ints
|
diff --git a/spec/unit/application/agent_spec.rb b/spec/unit/application/agent_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/application/agent_spec.rb
+++ b/spec/unit/application/agent_spec.rb
@@ -5,6 +5,7 @@ require File.dirname(__FILE__) + '/../../spec_helper'
require 'puppet/agent'
require 'puppet/application/agent'
require 'puppet/network/server'
+require 'puppet/network/handler'
require 'puppet/daemon'
describe Puppet::Application::Agent do
diff --git a/spec/unit/network/xmlrpc/client_spec.rb b/spec/unit/network/xmlrpc/client_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/network/xmlrpc/client_spec.rb
+++ b/spec/unit/network/xmlrpc/client_spec.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+require 'puppet/network/client'
Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
|
maint: Fix a test that was missing a require
Paired-with: Nick Lewis
|
diff --git a/thinc/initializers.py b/thinc/initializers.py
index <HASH>..<HASH> 100644
--- a/thinc/initializers.py
+++ b/thinc/initializers.py
@@ -52,7 +52,7 @@ def configure_uniform_init(
def normal_init(ops: Ops, shape: Shape, *, fan_in: int = -1) -> FloatsXd:
if fan_in == -1:
fan_in = shape[1]
- scale = ops.xp.sqrt(1.0 / fan_in)
+ scale = float(ops.xp.sqrt(1.0 / fan_in))
size = int(ops.xp.prod(ops.xp.asarray(shape)))
inits = numpy.random.normal(scale=scale, size=size).astype("float32")
inits = ops.reshape_f(inits, shape)
|
Cast scale to float in normal_init() for cupy (#<I>)
|
diff --git a/harmonize.js b/harmonize.js
index <HASH>..<HASH> 100644
--- a/harmonize.js
+++ b/harmonize.js
@@ -21,6 +21,7 @@
*/
var child_process = require("child_process");
var isIojs = require("is-iojs");
+var tty = require('tty');
module.exports = function() {
if (typeof Proxy == 'undefined') { // We take direct proxies as our marker
@@ -35,7 +36,7 @@ module.exports = function() {
return;
}
- var node = child_process.spawn(process.argv[0], ['--harmony', '--harmony-proxies'].concat(process.argv.slice(1)), {});
+ var node = child_process.spawn(process.argv[0], ['--harmony', '--harmony-proxies'].concat(process.argv.slice(1)), { pty: tty.isatty(0) });
node.stdout.pipe(process.stdout);
node.stderr.pipe(process.stderr);
node.on("close", function(code) {
|
spawn with correct tty, resolves color issues
|
diff --git a/api_test.go b/api_test.go
index <HASH>..<HASH> 100644
--- a/api_test.go
+++ b/api_test.go
@@ -69,6 +69,8 @@ var (
"virCopyLastError",
"virFreeError",
"virGetLastErrorMessage",
+ "virGetLastErrorCode",
+ "virGetLastErrorDomain",
"virResetLastError",
"virSaveLastError",
"virDefaultErrorFunc",
|
Blacklist virGetLastError{Code,Domain}
These methods will not be exposed to apps, since we always return
all errors.
|
diff --git a/mutagen/id3.py b/mutagen/id3.py
index <HASH>..<HASH> 100644
--- a/mutagen/id3.py
+++ b/mutagen/id3.py
@@ -254,7 +254,8 @@ class ID3(DictProxy, mutagen.Metadata):
if self.f_extended:
extsize = self.__fullread(4)
- if (extsize.decode('ascii') if PY3 else extsize) in Frames:
+ frame_id = extsize.decode("ascii", "replace") if PY3 else extsize
+ if frame_id in Frames:
# Some tagger sets the extended header flag but
# doesn't write an extended header; in this case, the
# ID3 data follows immediately. Since no extended
|
don't raise decode error when checking for potential frame id
|
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
index <HASH>..<HASH> 100644
--- a/lib/sup/crypto.rb
+++ b/lib/sup/crypto.rb
@@ -128,7 +128,6 @@ EOS
gpg_opts.merge!(gen_sign_user_opts(from))
gpg_opts = HookManager.run("gpg-options",
{:operation => "sign", :options => gpg_opts}) || gpg_opts
-
begin
if GPGME.respond_to?('detach_sign')
sig = GPGME.detach_sign(format_payload(payload), gpg_opts)
@@ -443,16 +442,18 @@ private
# if gpgkey set for this account, then use that
# elsif only one account, then leave blank so gpg default will be user
# else set --local-user from_email_address
+ # NOTE: multiple signers doesn't seem to work with gpgme (2.0.2, 1.0.8)
+ #
def gen_sign_user_opts from
account = AccountManager.account_for from
account ||= AccountManager.default_account
if !account.gpgkey.nil?
- opts = {:signers => account.gpgkey}
+ opts = {:signer => account.gpgkey}
elsif AccountManager.user_emails.length == 1
# only one account
opts = {}
else
- opts = {:signers => from}
+ opts = {:signer => from}
end
opts
end
|
Multiple Signers did not work with gpgme <I>
Exchanged :signers with :signer, this seems to allow to create a
signature based on account or from.
Previously always the default or first private key had been used.
But I haven't communicated with the developers of gpgme.
|
diff --git a/test/deserializer_test.js b/test/deserializer_test.js
index <HASH>..<HASH> 100644
--- a/test/deserializer_test.js
+++ b/test/deserializer_test.js
@@ -6,7 +6,7 @@ var vows = require('vows')
, error_gallery = process.env.XMLRPC_ERROR_GALLERY
-vows.describe('deserialize').addBatch({
+vows.describe('Deserializer').addBatch({
'deserializeMethodResponse() called with': {
diff --git a/test/serializer_test.js b/test/serializer_test.js
index <HASH>..<HASH> 100644
--- a/test/serializer_test.js
+++ b/test/serializer_test.js
@@ -5,7 +5,7 @@ var vows = require('vows')
, Serializer = require('../lib/serializer')
-vows.describe('deserialize').addBatch({
+vows.describe('Serializer').addBatch({
'serializeMethodCall() called with': {
|
Minor renaming of (de)serializing tests.
|
diff --git a/Exceptions/InvalidKeyException.php b/Exceptions/InvalidKeyException.php
index <HASH>..<HASH> 100644
--- a/Exceptions/InvalidKeyException.php
+++ b/Exceptions/InvalidKeyException.php
@@ -16,7 +16,7 @@ class InvalidKeyException extends \LogicException
sprintf(
'The key \'%s\' does not exist on the collection.%s',
$offset,
- 0 !== count($validOffsets)
+ 0 !== \count($validOffsets)
? sprintf(' The valid keys are: \'%s\'', implode('\', \'', $validOffsets))
: ''
)
|
Collection | Use fqn for performance
|
diff --git a/pkg/client/record/event.go b/pkg/client/record/event.go
index <HASH>..<HASH> 100644
--- a/pkg/client/record/event.go
+++ b/pkg/client/record/event.go
@@ -176,7 +176,11 @@ func recordEvent(sink EventSink, event *api.Event, updateExistingEvent bool) boo
glog.Errorf("Unable to construct event '%#v': '%v' (will not retry!)", event, err)
return true
case *errors.StatusError:
- glog.Errorf("Server rejected event '%#v': '%v' (will not retry!)", event, err)
+ if errors.IsAlreadyExists(err) {
+ glog.V(5).Infof("Server rejected event '%#v': '%v' (will not retry!)", event, err)
+ } else {
+ glog.Errorf("Server rejected event '%#v': '%v' (will not retry!)", event, err)
+ }
return true
case *errors.UnexpectedObjectError:
// We don't expect this; it implies the server's response didn't match a
|
Do not log "event already exists" errors
When the server rejects an event because it has already been created, log it
at a very high level (debug) instead of the default level. Duplicate events
typically only occur due to programmer error or failure conditions, so they
can safely be ignored in production environments.
|
diff --git a/libraries/lithium/g11n/Locale.php b/libraries/lithium/g11n/Locale.php
index <HASH>..<HASH> 100644
--- a/libraries/lithium/g11n/Locale.php
+++ b/libraries/lithium/g11n/Locale.php
@@ -143,6 +143,7 @@ class Locale extends \lithium\core\StaticObject {
* // returns array('zh_Hans_HK_REVISED', 'zh_Hans_HK', 'zh_Hans', 'zh', 'root')
* }}}
*
+ * @link http://www.unicode.org/reports/tr35/tr35-13.html#Locale_Inheritance
* @param string $locale A locale in an arbitrary form (i.e. `'en_US'` or `'EN-US'`).
* @return array Indexed array of locales (starting with the most specific one).
*/
|
Adding reference to RFC to `Locale` class docblock.
|
diff --git a/pyemu/plot/plot_utils.py b/pyemu/plot/plot_utils.py
index <HASH>..<HASH> 100644
--- a/pyemu/plot/plot_utils.py
+++ b/pyemu/plot/plot_utils.py
@@ -863,7 +863,7 @@ def ensemble_helper(ensemble,bins=10,facecolor='0.5',plot_cols=None,
# try:
# en.loc[:,pc].hist(bins=plot_bins,facecolor=fc,
# edgecolor="none",alpha=0.5,
- # normed=True,ax=ax)
+ # density=True,ax=ax)
# except Exception as e:
# logger.warn("error plotting histogram for {0}:{1}".
# format(pc,str(e)))
@@ -871,7 +871,7 @@ def ensemble_helper(ensemble,bins=10,facecolor='0.5',plot_cols=None,
#print(plot_bins)
#print(vals)
- ax.hist(vals,bins=plot_bins,edgecolor="none",alpha=0.5,normed=True,facecolor=fc)
+ ax.hist(vals,bins=plot_bins,edgecolor="none",alpha=0.5,density=True,facecolor=fc)
v = None
if deter_vals is not None:
for pc in plot_col:
|
Fixed tiny matplotlib whinge abour normed->density in hist
|
diff --git a/android/src/main/java/com/horcrux/svg/GroupView.java b/android/src/main/java/com/horcrux/svg/GroupView.java
index <HASH>..<HASH> 100644
--- a/android/src/main/java/com/horcrux/svg/GroupView.java
+++ b/android/src/main/java/com/horcrux/svg/GroupView.java
@@ -126,18 +126,21 @@ class GroupView extends RenderableView {
@Override
Path getPath(final Canvas canvas, final Paint paint) {
- final Path path = new Path();
+ if (mPath != null) {
+ return mPath;
+ }
+ mPath = new Path();
for (int i = 0; i < getChildCount(); i++) {
View node = getChildAt(i);
if (node instanceof VirtualView) {
VirtualView n = (VirtualView)node;
Matrix transform = n.mMatrix;
- path.addPath(n.getPath(canvas, paint), transform);
+ mPath.addPath(n.getPath(canvas, paint), transform);
}
}
- return path;
+ return mPath;
}
Path getPath(final Canvas canvas, final Paint paint, final Region.Op op) {
|
[android] Cache group paths.
|
diff --git a/test/youtube-dl/support_test.rb b/test/youtube-dl/support_test.rb
index <HASH>..<HASH> 100644
--- a/test/youtube-dl/support_test.rb
+++ b/test/youtube-dl/support_test.rb
@@ -30,7 +30,7 @@ describe YoutubeDL::Support do
end
it 'should not have a newline char in the executable_path' do
- assert_match /youtube-dl\z/, @klass.executable_path
+ assert_match(/youtube-dl\z/, @klass.executable_path)
end
end
@@ -70,7 +70,7 @@ describe YoutubeDL::Support do
it 'should not symbolize capitalized keys' do
original = {"No-Man" => "don't capitalize this plz", "but" => "Do capitalize this"}
expected = {"No-Man" => "don't capitalize this plz", :but => "Do capitalize this"}
-
+
assert_equal(expected, @klass.symbolize_json(original))
end
end
|
Less ambiguous?
Thanks, Ruby syntax checker????
|
diff --git a/src/watoki/cli/commands/DependentCommandGroup.php b/src/watoki/cli/commands/DependentCommandGroup.php
index <HASH>..<HASH> 100644
--- a/src/watoki/cli/commands/DependentCommandGroup.php
+++ b/src/watoki/cli/commands/DependentCommandGroup.php
@@ -26,6 +26,8 @@ class DependentCommandGroup extends CommandGroup {
$this->executed = array();
parent::execute($console, $arguments);
+
+ $console->out->writeLine('<<<<<<<<< done.');
}
protected function executeCommand($name, array $arguments, Console $console) {
@@ -45,6 +47,12 @@ class DependentCommandGroup extends CommandGroup {
$this->executeCommand($dependency['command'], $dependency['arguments'], $console);
}
+ if (count($this->queue) + count($this->executed) > 1) {
+ $console->out->writeLine('');
+ $console->out->writeLine('>>>>>>>>> ' . $name);
+ $console->out->writeLine('');
+ }
+
parent::executeCommand($name, $arguments, $console);
array_pop($this->queue);
|
Output of DependentCommandGroup
|
diff --git a/lib/weary/middleware/hmac_auth.rb b/lib/weary/middleware/hmac_auth.rb
index <HASH>..<HASH> 100644
--- a/lib/weary/middleware/hmac_auth.rb
+++ b/lib/weary/middleware/hmac_auth.rb
@@ -28,7 +28,7 @@ module Weary
# there's no difference in the headers when it's authenticated.
if ['POST', 'PUT'].include? e['REQUEST_METHOD']
e.update 'CONTENT_TYPE' => 'application/x-www-form-urlencoded'
- elsif e['REQUEST_METHOD'] == 'GET' && e['CONTENT_TYPE'].blank?
+ elsif e['REQUEST_METHOD'] == 'GET' && e['CONTENT_TYPE'].to_s == ''
e.update 'CONTENT_TYPE' => 'text/plain'
end
end
|
Remove call to blank? active_support method
Active support should not be a dependency.
|
diff --git a/tests/Unit/Suites/Context/ContextBuilder/ContextCountryTest.php b/tests/Unit/Suites/Context/ContextBuilder/ContextCountryTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/Suites/Context/ContextBuilder/ContextCountryTest.php
+++ b/tests/Unit/Suites/Context/ContextBuilder/ContextCountryTest.php
@@ -42,7 +42,7 @@ class ContextCountryTest extends \PHPUnit_Framework_TestCase
$this->assertInstanceOf(ContextPartBuilder::class, $this->contextCountry);
}
- public function testItReturnsTheCorrectCode()
+ public function testItReturnsTheCountryContextPartCode()
{
$this->assertSame(ContextCountry::CODE, $this->contextCountry->getCode());
}
|
Issue #<I>: Rename test to be more descriptive
|
diff --git a/bin/validate.py b/bin/validate.py
index <HASH>..<HASH> 100644
--- a/bin/validate.py
+++ b/bin/validate.py
@@ -609,12 +609,13 @@ def rule(metadata_dir, out, ontology, gaferencer_file):
all_examples_valid = False
all_results += results
-
- try:
- with open(out, "w") as outfile:
- json.dump(rules.validation_report(all_results), outfile, indent=4)
- except Exception as e:
- raise click.ClickException("Could not write report to {}: ".format(out, e))
+
+ if out:
+ try:
+ with open(out, "w") as outfile:
+ json.dump(rules.validation_report(all_results), outfile, indent=4)
+ except Exception as e:
+ raise click.ClickException("Could not write report to {}: ".format(out, e))
if not all_examples_valid:
raise click.ClickException("At least one rule example was not validated.")
|
fixing how json report gets written
|
diff --git a/lib/discordrb/data.rb b/lib/discordrb/data.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/data.rb
+++ b/lib/discordrb/data.rb
@@ -499,7 +499,7 @@ module Discordrb
@afk_timeout = new_data[:afk_timeout] || new_data['afk_timeout'].to_i || @afk_timeout
afk_channel_id = new_data[:afk_channel_id] || new_data['afk_channel_id'].to_i || @afk_channel.id
- @afk_channel = @bot.channel(afk_channel_id) if !@afk_channel || afk_channel_id != @afk_channel.id
+ @afk_channel = @bot.channel(afk_channel_id) if !@afk_channel || (afk_channel_id != 0 && afk_channel_id != @afk_channel.id)
end
private
|
Only initialize the afk channel if the id isn't 0
|
diff --git a/azurerm/settings.py b/azurerm/settings.py
index <HASH>..<HASH> 100644
--- a/azurerm/settings.py
+++ b/azurerm/settings.py
@@ -4,7 +4,8 @@ azure_rm_endpoint = 'https://management.azure.com'
ACS_API = '2016-03-30'
BASE_API = '2015-01-01'
-COMP_API = '2016-03-30'
+#COMP_API = '2016-03-30'
+COMP_API = '2016-04-30-preview'
INSIGHTS_API = '2015-04-01'
INSIGHTS_METRICS_API = '2016-03-01'
INSIGHTS_PREVIEW_API = '2016-06-01'
|
Increment Compute API to <I>-<I>-<I>-preview
|
diff --git a/toc.js b/toc.js
index <HASH>..<HASH> 100644
--- a/toc.js
+++ b/toc.js
@@ -3,7 +3,7 @@ var TOCContainer = require("./toc-container-control");
var el = document.getElementsByClassName("on-this-page-container");
if (el.length) {
- new TOCContainer(el);
+ new TOCContainer(el.item(0));
} else {
console.log("An element with class 'on-this-page-container' is required");
}
|
Pass the first match an not the whole collection
|
diff --git a/lib/resolver.js b/lib/resolver.js
index <HASH>..<HASH> 100644
--- a/lib/resolver.js
+++ b/lib/resolver.js
@@ -2,7 +2,9 @@
var goog = require('./goog');
// TODO(vojta): can we handle provide "same thing provided multiple times" ?
-var DependencyResolver = function() {
+var DependencyResolver = function(logger) {
+ var log = logger.create('closure');
+
// the state
var fileMap = Object.create(null);
var provideMap = Object.create(null);
@@ -29,8 +31,13 @@ var DependencyResolver = function() {
// resolve all dependencies first
fileMap[filepath].requires.forEach(function(dep) {
if (!alreadyResolvedMap[dep]) {
- // TODO(vojta): error if dep not provided
- resolveFile(provideMap[dep], files, alreadyResolvedMap);
+ if (provideMap[dep]) {
+ resolveFile(provideMap[dep], files, alreadyResolvedMap);
+ } else {
+ log.error('MISSING DEPENDENCY:', dep);
+ log.error('Did you forget to preprocess your source directory? Or did you leave off ' +
+ 'the google closure library deps.js file?');
+ }
}
});
|
fix: Show error for a missing dependency.
This ensures that something is printed out for users who didn't add a mapping for one of their dependencies. Either they missed a deps.js file or they didn't preprocess all of their source files. The current behavior adds an undefined filepath which ends up causing the karma web-server to blow up when it trys to do indexOf on undefined.
|
diff --git a/bokeh/core/properties.py b/bokeh/core/properties.py
index <HASH>..<HASH> 100644
--- a/bokeh/core/properties.py
+++ b/bokeh/core/properties.py
@@ -715,7 +715,7 @@ class HasProps(with_metaclass(MetaHasProps, object)):
# instead of models, and takes a doc to look up the refs in
def _json_record_references(doc, v, result, recurse):
if v is None: return
- if isinstance(v, dict) and set(v.keys()) == set(['id', 'type']):
+ if isinstance(v, dict) and set(['id', 'type']).issubset(set(v.keys())):
if v['id'] not in result:
model = doc.get_model_by_id(v['id'])
HasProps._value_record_references(model, result, recurse)
|
accomodate subtypes in json_record_references
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,7 @@
module.exports = {
AppBar: require('./dist/js/app-bar.jsx'),
AppCanvas: require('./dist/js/app-canvas.jsx'),
- Constants: require('./dist/js/utils/constants.js'),
+ Checkbox: require('./dist/js/checkbox.jsx'),
DropDownMenu: require('./dist/js/drop-down-menu.jsx'),
Icon: require('./dist/js/icon.jsx'),
Input: require('./dist/js/input.jsx'),
@@ -11,5 +11,7 @@ module.exports = {
PaperButton: require('./dist/js/paper-button.jsx'),
Paper: require('./dist/js/paper.jsx'),
RadioButton: require('./dist/js/radio-button.jsx'),
- Toggle: require('./dist/js/toggle.jsx')
-};
\ No newline at end of file
+ Toggle: require('./dist/js/toggle.jsx'),
+ Toolbar: require('./dist/js/toolbar.jsx'),
+ ToolbarGroup: require('./dist/js/toolbar-group.jsx')
+};
|
Update to latest mui-components
|
diff --git a/jest-common/src/main/java/io/searchbox/indices/Analyze.java b/jest-common/src/main/java/io/searchbox/indices/Analyze.java
index <HASH>..<HASH> 100644
--- a/jest-common/src/main/java/io/searchbox/indices/Analyze.java
+++ b/jest-common/src/main/java/io/searchbox/indices/Analyze.java
@@ -95,7 +95,7 @@ public class Analyze extends GenericResultAbstractAction {
}
public Builder filter(String filter) {
- return setParameter("filters", filter);
+ return setParameter("filter", filter);
}
/**
diff --git a/jest-common/src/test/java/io/searchbox/indices/AnalyzeTest.java b/jest-common/src/test/java/io/searchbox/indices/AnalyzeTest.java
index <HASH>..<HASH> 100644
--- a/jest-common/src/test/java/io/searchbox/indices/AnalyzeTest.java
+++ b/jest-common/src/test/java/io/searchbox/indices/AnalyzeTest.java
@@ -26,7 +26,7 @@ public class AnalyzeTest {
.tokenizer("keyword")
.filter("lowercase")
.build();
- assertEquals("/_analyze?tokenizer=keyword&filters=lowercase", analyze.getURI());
+ assertEquals("/_analyze?tokenizer=keyword&filter=lowercase", analyze.getURI());
}
@Test
|
Fix Analyze.Builder#filter(String)
The "filters" attribute was renamed to "filter".
|
diff --git a/test/searchjoy_test.rb b/test/searchjoy_test.rb
index <HASH>..<HASH> 100644
--- a/test/searchjoy_test.rb
+++ b/test/searchjoy_test.rb
@@ -39,6 +39,18 @@ class SearchjoyTest < Minitest::Test
assert_equal "All Indices", search.search_type
end
+ def test_additional_attributes
+ Product.search("APPLE", track: {source: "web"})
+ search = Searchjoy::Search.last
+ assert_equal "web", search.source
+ end
+
+ def test_override_attributes
+ Product.search("APPLE", track: {search_type: "Item"})
+ search = Searchjoy::Search.last
+ assert_equal "Item", search.search_type
+ end
+
def test_no_track
Product.search("apple")
assert_equal 0, Searchjoy::Search.count
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -28,6 +28,7 @@ ActiveRecord::Migration.create_table :searchjoy_searches do |t|
t.timestamp :created_at
t.references :convertable, polymorphic: true, index: {name: "index_searchjoy_searches_on_convertable"}
t.timestamp :converted_at
+ t.string :source
end
class Product < ActiveRecord::Base
|
Added tests for additional attributes and overriding attributes
|
diff --git a/src/Checkout/OrderProcessor.php b/src/Checkout/OrderProcessor.php
index <HASH>..<HASH> 100644
--- a/src/Checkout/OrderProcessor.php
+++ b/src/Checkout/OrderProcessor.php
@@ -291,6 +291,7 @@ class OrderProcessor
$this->order->Status = 'Unpaid';
} else {
$this->order->Status = 'Paid';
+ $this->order->Paid = DBDatetime::now()->Rfc2822();
}
if (!$this->order->Placed) {
|
Fix OrderProcessor not setting the paid date when an order has nothing outstanding
|
diff --git a/test/query.js b/test/query.js
index <HASH>..<HASH> 100644
--- a/test/query.js
+++ b/test/query.js
@@ -47,9 +47,8 @@ describe('Monoxide - query', function() {
$count: true,
}, function(err, res) {
expect(err).to.not.be.ok;
- expect(res).to.be.an.object;
-
- expect(res).to.have.property('count', 2);
+ expect(res).to.be.a.number;
+ expect(res).to.be.equal(2);
finish();
});
|
BUGFIX: Query test was using old syntax for {$count: true} returns
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,8 @@ setup(
'Environment :: Web Environment',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2'
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 3',
],
author='Hans Meine',
author_email='hans_meine@gmx.net',
|
PY3: add trove classifier
at least, ctk-cli is passing superficial tests (e.g. with pyflakes-<I>)
and ctk-cli-indexer produced the same output with Python <I> and <I>.
|
diff --git a/varify/phenotypes/management/subcommands/load.py b/varify/phenotypes/management/subcommands/load.py
index <HASH>..<HASH> 100644
--- a/varify/phenotypes/management/subcommands/load.py
+++ b/varify/phenotypes/management/subcommands/load.py
@@ -124,7 +124,7 @@ class Command(BaseCommand):
help='Load HGMD phenotypes and associations for INDELs.'),
)
- def load_hpo(self, cursor):
+ def load_hpo(self, cursor, using):
keys = ['gene_id', 'hpo_terms']
# Fetch, parse and load only genes that cleanly map to the gene table.
@@ -275,7 +275,8 @@ class Command(BaseCommand):
(
select
m.acc_num as hgmd_id,
- trim(both from regexp_replace(m.disease, '\s*\?$', '')) as disease, # noqa
+ trim(both from regexp_replace(m.disease, '\s*\?$', ''))
+ as disease,
m.gene,
m.pmid,
c.chromosome as chr,
|
Remove clumsy comment within a multi-line SQL statement
Fix load_hpo method to take the using argument.
From internal change on <I>/6
|
diff --git a/lib/bollettino/renderers/payer_renderer.rb b/lib/bollettino/renderers/payer_renderer.rb
index <HASH>..<HASH> 100644
--- a/lib/bollettino/renderers/payer_renderer.rb
+++ b/lib/bollettino/renderers/payer_renderer.rb
@@ -11,7 +11,7 @@ class Bollettino::Renderer::PayerRenderer < Bollettino::Renderer
write_text(image, [85, 315], payer.name[25..49])
write_text(image, [1508, 375], payer.name[0..22], KERNING_BOX_SMALLEST)
- write_text(image, [1508, 330], payer.name[22..44], KERNING_BOX_SMALLEST)
+ write_text(image, [1508, 330], payer.name[23..45], KERNING_BOX_SMALLEST)
end
def self.render_address(image, payer)
|
Fix overlapping in payer's name
|
diff --git a/provisioner/windows-restart/provisioner.go b/provisioner/windows-restart/provisioner.go
index <HASH>..<HASH> 100644
--- a/provisioner/windows-restart/provisioner.go
+++ b/provisioner/windows-restart/provisioner.go
@@ -114,6 +114,12 @@ var waitForRestart = func(p *Provisioner, comm packer.Communicator) error {
var cmd *packer.RemoteCmd
trycommand := TryCheckReboot
abortcommand := AbortReboot
+
+ // This sleep works around an azure/winrm bug. For more info see
+ // https://github.com/hashicorp/packer/issues/5257; we can remove the
+ // sleep when the underlying bug has been resolved.
+ time.Sleep(1 * time.Second)
+
// Stolen from Vagrant reboot checker
for {
log.Printf("Check if machine is rebooting...")
|
add workaround for azure bug.
|
diff --git a/deimos/usage.py b/deimos/usage.py
index <HASH>..<HASH> 100644
--- a/deimos/usage.py
+++ b/deimos/usage.py
@@ -18,5 +18,5 @@ def children(level=logging.DEBUG):
def rusage(target=resource.RUSAGE_SELF):
r = resource.getrusage(target)
fmt = "rss = %0.03fM user = %0.03f sys = %0.03f"
- return fmt % (r.ru_maxrss / (1024.0 * 1024.0), r.ru_utime, r.ru_stime)
+ return fmt % (r.ru_maxrss / 1024.0, r.ru_utime, r.ru_stime)
|
Fix memory reporting.
ru_maxrss is in kilobytes, not bytes...
|
diff --git a/attitude/orientation/__init__.py b/attitude/orientation/__init__.py
index <HASH>..<HASH> 100644
--- a/attitude/orientation/__init__.py
+++ b/attitude/orientation/__init__.py
@@ -1,4 +1,4 @@
-from __future__ import division
+from __future__ import division, print_function
from ..regression import Regression
import numpy as N
from scipy.linalg import eig
@@ -19,6 +19,7 @@ def axes(matrix):
class Orientation(object):
def __init__(self, coordinates):
+ assert len(coordinates) >= 3
self.fit = Regression(centered(coordinates))
values = self.fit.coefficients()
|
Added an assertion to prevent underfitting
|
diff --git a/src/Xmla.js b/src/Xmla.js
index <HASH>..<HASH> 100644
--- a/src/Xmla.js
+++ b/src/Xmla.js
@@ -5775,9 +5775,7 @@ Xmla.Dataset.Cellset.prototype = {
return this._idx < this._cellCount;
},
nextCell: function(){
- if (this._cellOrd === this._ord
- && this.hasMoreCells()
- ) {
+ if (this.hasMoreCells()) {
this._getCellNode();
}
this._ord += 1;
@@ -5858,7 +5856,7 @@ Xmla.Dataset.Cellset.prototype = {
}
},
getByIndex: function(index) {
- this._cellNodes.item(index);
+ return this._cellNodes.item(index);
},
getByOrdinal: function(ordinal) {
},
|
Fixed some mddataset related code.
|
diff --git a/ArgusWeb/app/js/directives/charts/chart.js b/ArgusWeb/app/js/directives/charts/chart.js
index <HASH>..<HASH> 100644
--- a/ArgusWeb/app/js/directives/charts/chart.js
+++ b/ArgusWeb/app/js/directives/charts/chart.js
@@ -22,6 +22,7 @@ function(Metrics, ChartRenderingService, ChartDataProcessingService, ChartOption
ChartRenderingService.setChartContainer(element, newChartId, cssOpts);
scope.$on(dashboardCtrl.getSubmitBtnEventName(), function(event, controls) {
+
var data = {
metrics: scope.metrics,
annotations: scope.annotations,
@@ -109,6 +110,9 @@ function(Metrics, ChartRenderingService, ChartDataProcessingService, ChartOption
// LineChartService
+ // empty any previous content
+ $("#" + newChartId).empty();
+
LineChartService.render(newChartId, series);
// bind series data to highchart options
|
bug fix: empty chart container before re-rendering graph again, prevents duplicate graph.
|
diff --git a/pykeyboard/x11.py b/pykeyboard/x11.py
index <HASH>..<HASH> 100644
--- a/pykeyboard/x11.py
+++ b/pykeyboard/x11.py
@@ -229,7 +229,7 @@ class PyKeyboardEvent(PyKeyboardEventMeta):
The PyKeyboardEvent implementation for X11 systems (mostly linux). This
allows one to listen for keyboard input.
"""
- def __init__(self, display=None):
+ def __init__(self, capture=False, display=None):
self.display = Display(display)
self.display2 = Display(display)
self.ctx = self.display2.record_create_context(
@@ -263,7 +263,7 @@ class PyKeyboardEvent(PyKeyboardEventMeta):
#for i in range(len(self.display._keymap_codes)):
# print('{0}: {1}'.format(i, self.display._keymap_codes[i]))
- PyKeyboardEventMeta.__init__(self)
+ PyKeyboardEventMeta.__init__(self, capture)
def run(self):
"""Begin listening for keyboard input events."""
|
X<I> PyKeyboardEvent __init__ should match its parent interface.
|
diff --git a/src/org/mozilla/javascript/NativeJavaTopPackage.java b/src/org/mozilla/javascript/NativeJavaTopPackage.java
index <HASH>..<HASH> 100644
--- a/src/org/mozilla/javascript/NativeJavaTopPackage.java
+++ b/src/org/mozilla/javascript/NativeJavaTopPackage.java
@@ -98,7 +98,9 @@ public class NativeJavaTopPackage
Context.reportRuntimeError0("msg.not.classloader");
return null;
}
- return new NativeJavaPackage(true, "", loader);
+ NativeJavaPackage pkg = new NativeJavaPackage(true, "", loader);
+ ScriptRuntime.setObjectProtoAndParent(pkg, scope);
+ return pkg;
}
public static void init(Context cx, Scriptable scope, boolean sealed)
|
Fix bug <I>: Regression: constructor form of Packages is broken
|
diff --git a/go/cmd/pfacct/radius.go b/go/cmd/pfacct/radius.go
index <HASH>..<HASH> 100644
--- a/go/cmd/pfacct/radius.go
+++ b/go/cmd/pfacct/radius.go
@@ -222,19 +222,13 @@ func (h *PfAcct) sendRadiusAccounting(r *radius.Request) {
}
func (h *PfAcct) radiusListen(w *sync.WaitGroup) *radius.PacketServer {
- var connStr string
- if h.Management.Vip != "" {
- connStr = h.Management.Vip + ":1813"
- } else {
- connStr = h.Management.Ip + ":1813"
- }
-
- addr, err := net.ResolveUDPAddr("udp", connStr)
+ connStr := "0.0.0.0:1813"
+ addr, err := net.ResolveUDPAddr("udp4", connStr)
if err != nil {
panic(err)
}
- pc, err := net.ListenUDP("udp", addr)
+ pc, err := net.ListenUDP("udp4", addr)
if err != nil {
panic(err)
}
|
Listen to all interfaces for accounting
Fixes #<I>
|
diff --git a/model/src/main/java/org/qsardb/model/Cargo.java b/model/src/main/java/org/qsardb/model/Cargo.java
index <HASH>..<HASH> 100644
--- a/model/src/main/java/org/qsardb/model/Cargo.java
+++ b/model/src/main/java/org/qsardb/model/Cargo.java
@@ -363,7 +363,12 @@ public class Cargo<C extends Container> implements Stateable, Resource {
static
private void store(Cargo<?> cargo, Storage storage) throws IOException {
- InputStream is = cargo.getInputStream();
+ InputStream is;
+ try {
+ is = cargo.getInputStream();
+ } catch (FileNotFoundException ex) {
+ return; // cargo without payload
+ }
try {
OutputStream os = storage.getOutputStream(cargo.qdbPath());
|
Handle cargos with empty payloads
|
diff --git a/http/org_service.go b/http/org_service.go
index <HASH>..<HASH> 100644
--- a/http/org_service.go
+++ b/http/org_service.go
@@ -321,6 +321,10 @@ func (s *OrganizationService) FindOrganizations(ctx context.Context, filter plat
// CreateOrganization creates an organization.
func (s *OrganizationService) CreateOrganization(ctx context.Context, o *platform.Organization) error {
+ if o.Name == "" {
+ return kerrors.InvalidDataf("organization name is required")
+ }
+
url, err := newURL(s.Addr, organizationPath)
if err != nil {
return err
|
fix(http): prevent creation of nameless organizations
|
diff --git a/firecloud/api.py b/firecloud/api.py
index <HASH>..<HASH> 100755
--- a/firecloud/api.py
+++ b/firecloud/api.py
@@ -627,13 +627,16 @@ def copy_config_to_repo(namespace, workspace, from_cnamespace,
### 1.3 Method Repository
###########################
-def list_repository_methods():
+def list_repository_methods(name=None):
"""List methods in the methods repository.
Swagger:
https://api.firecloud.org/#!/Method_Repository/listMethodRepositoryMethods
"""
- return __get("methods")
+ params = dict()
+ if name:
+ params['name'] = name
+ return __get("methods", params=params)
def list_repository_configs():
"""List configurations in the methods repository.
|
list_repository_methods() now accepts an optional name parameter, to provide a more performant means of checking for a single method
|
diff --git a/src/Payum/Paypal/ExpressCheckout/Nvp/Api.php b/src/Payum/Paypal/ExpressCheckout/Nvp/Api.php
index <HASH>..<HASH> 100644
--- a/src/Payum/Paypal/ExpressCheckout/Nvp/Api.php
+++ b/src/Payum/Paypal/ExpressCheckout/Nvp/Api.php
@@ -302,6 +302,7 @@ class Api
'username' => null,
'password' => null,
'signature' => null,
+ 'subject' => null,
'return_url' => null,
'cancel_url' => null,
'sandbox' => null,
@@ -634,6 +635,10 @@ class Api
$fields['PWD'] = $this->options['password'];
$fields['USER'] = $this->options['username'];
$fields['SIGNATURE'] = $this->options['signature'];
+
+ if ($this->options['subject']) {
+ $fields['SUBJECT'] = $this->options['subject'];
+ }
}
/**
|
Add support for Subject authorization
If you're calling the API on behalf of a third-party merchant, you must specify the email address on file with PayPal of the third-party merchant or the merchant's account ID (sometimes called Payer ID).
|
diff --git a/lib/engineyard-serverside/deploy.rb b/lib/engineyard-serverside/deploy.rb
index <HASH>..<HASH> 100644
--- a/lib/engineyard-serverside/deploy.rb
+++ b/lib/engineyard-serverside/deploy.rb
@@ -146,7 +146,7 @@ module EY
def clean_environment
"unset BUNDLE_PATH BUNDLE_FROZEN BUNDLE_WITHOUT BUNDLE_BIN BUNDLE_GEMFILE"
# GIT_SSH needs to be defined in the environment for customers with private bundler repos in their Gemfile.
- ENV['GIT_SSH'] = "ssh -o 'StrictHostKeyChecking no' -o 'PasswordAuthentication no' -o 'LogLevel DEBUG' -i ~/.ssh/#{app}-deploy-key"
+ ENV['GIT_SSH'] = "ssh -o 'StrictHostKeyChecking no' -o 'PasswordAuthentication no' -o 'LogLevel DEBUG' -i ~/.ssh/#{c[:app]}-deploy-key"
end
# task
|
Fixed a wrong variable when setting GIT_SSH environment
|
diff --git a/indra/reach/reach_api.py b/indra/reach/reach_api.py
index <HASH>..<HASH> 100644
--- a/indra/reach/reach_api.py
+++ b/indra/reach/reach_api.py
@@ -38,10 +38,14 @@ def process_pubmed_abstract(pubmed_id, offline=False):
def process_text(text, citation=None, offline=False):
if offline:
+ if api_ruler is None:
+ print 'Cannot read offline because the REACH ApiRuler could not' +\
+ 'be instantiated.'
+ return None
try:
result_map = api_ruler.annotateText(text, 'fries')
except JavaException:
- print 'Could not process file %s.' % file_name
+ print 'Could not process text.'
return None
json_str = result_map.get('resultJson')
else:
@@ -64,6 +68,10 @@ def process_nxml_str(nxml_str, citation):
def process_nxml(file_name, citation=None, offline=False):
if offline:
+ if api_ruler is None:
+ print 'Cannot read offline because the REACH ApiRuler could not' +\
+ 'be instantiated.'
+ return None
try:
result_map = api_ruler.annotateNxml(file_name, 'fries')
except JavaException:
|
Error messages in REACH if ApiRuler could not be instantiated
|
diff --git a/tests/test-rest-posts-controller.php b/tests/test-rest-posts-controller.php
index <HASH>..<HASH> 100644
--- a/tests/test-rest-posts-controller.php
+++ b/tests/test-rest-posts-controller.php
@@ -184,6 +184,9 @@ class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te
$category_url = rest_url( '/wp/v2/posts/' . $this->post_id . '/terms/category' );
$this->assertEquals( $category_url, $cat_link['href'] );
+
+ $meta_links = $links['https://api.w.org/meta'];
+ $this->assertEquals( rest_url( '/wp/v2/posts/' . $this->post_id . '/meta' ), $meta_links[0]['href'] );
}
public function test_get_item_links_no_author() {
|
Add test case for Post's meta links
|
diff --git a/internal/service/ec2/ebs_snapshot.go b/internal/service/ec2/ebs_snapshot.go
index <HASH>..<HASH> 100644
--- a/internal/service/ec2/ebs_snapshot.go
+++ b/internal/service/ec2/ebs_snapshot.go
@@ -193,6 +193,7 @@ func resourceEBSSnapshotRead(d *schema.ResourceData, meta interface{}) error {
d.Set("kms_key_id", snapshot.KmsKeyId)
d.Set("volume_size", snapshot.VolumeSize)
d.Set("storage_tier", snapshot.StorageTier)
+ d.Set("volume_id", snapshot.VolumeId)
if snapshot.OutpostArn != nil {
d.Set("outpost_arn", snapshot.OutpostArn)
|
Set 'volume_id' during resource Read (for Import).
|
diff --git a/lib/ronin/remote_file.rb b/lib/ronin/remote_file.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/remote_file.rb
+++ b/lib/ronin/remote_file.rb
@@ -49,5 +49,17 @@ module Ronin
# Tags
has_tags_on :tags
+ #
+ # Searches for all remote files that have been downloaded.
+ #
+ # @return [Array<RemoteFile>]
+ # The downloaded remote files.
+ #
+ # @since 1.0.0
+ #
+ def self.downloaded
+ all(:local_path.not => nil)
+ end
+
end
end
|
Added RemoteFile.downloaded.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.