diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
---|---|
diff --git a/cmd/puppeth/module_faucet.go b/cmd/puppeth/module_faucet.go
index <HASH>..<HASH> 100644
--- a/cmd/puppeth/module_faucet.go
+++ b/cmd/puppeth/module_faucet.go
@@ -33,7 +33,7 @@ import (
// faucetDockerfile is the Dockerfile required to build an faucet container to
// grant crypto tokens based on GitHub authentications.
var faucetDockerfile = `
-FROM puppeth/faucet:latest
+FROM ethereum/client-go:alltools-latest
ADD genesis.json /genesis.json
ADD account.json /account.json
|
cmd/puppeth: switch over to upstream alltools docker image
|
diff --git a/src/GitHub_Updater/Install.php b/src/GitHub_Updater/Install.php
index <HASH>..<HASH> 100644
--- a/src/GitHub_Updater/Install.php
+++ b/src/GitHub_Updater/Install.php
@@ -99,6 +99,12 @@ class Install {
*/
public function add_settings_tabs() {
$install_tabs = [];
+ if ( current_user_can( 'install_plugins' ) ) {
+ $install_tabs['github_updater_install_plugin'] = esc_html__( 'Install Plugin', 'github-updater' );
+ }
+ if ( current_user_can( 'install_themes' ) ) {
+ $install_tabs['github_updater_install_theme'] = esc_html__( 'Install Theme', 'github-updater' );
+ }
add_filter(
'github_updater_add_settings_tabs', function ( $tabs ) use ( $install_tabs ) {
return array_merge( $tabs, $install_tabs );
|
check specific privileges for setup of Install tabs
|
diff --git a/code/Debug/Helper/Data.php b/code/Debug/Helper/Data.php
index <HASH>..<HASH> 100644
--- a/code/Debug/Helper/Data.php
+++ b/code/Debug/Helper/Data.php
@@ -123,11 +123,27 @@ class Sheep_Debug_Helper_Data extends Mage_Core_Helper_Data
/**
* Decides if we need to capture request information.
*
- * For now, we'll not capture anything if we don't need to show the toolbar
+ * We don't capture requests if:
+ * - requests belons to our module
+ * - we're not allowed to show toolbar (module disabled, dev mod is off)
*/
public function canCapture()
{
- return $this->canShowToolbar();
+ return !$this->isSheepDebugRequest($this->_getRequest()) && $this->canShowToolbar();
+ }
+
+
+ /**
+ * Checks if current request belongs to our module by verifying if its request path starts with our route name.
+ *
+ * We cannot verify controller module becuase request is not yet dispatched.
+ *
+ * @param Mage_Core_Controller_Request_Http $request
+ * @return bool
+ */
+ public function isSheepDebugRequest(Mage_Core_Controller_Request_Http $request)
+ {
+ return strpos($request->getPathInfo(), '/sheep_debug/') === 0;
}
|
Don't capture debug request (at least for now)
|
diff --git a/www_src/lib/touchhandler.js b/www_src/lib/touchhandler.js
index <HASH>..<HASH> 100644
--- a/www_src/lib/touchhandler.js
+++ b/www_src/lib/touchhandler.js
@@ -73,7 +73,9 @@
endmark: function(evt) {
if (debug) { timedLog("endmark"); }
if(evt.touches && evt.touches.length > 0) {
- handlers.endSecondFinger(evt);
+ if (handlers.endSecondFinger(evt)) {
+ return;
+ }
}
if (debug) { timedLog("endmark - continued"); }
mark = copy(positionable.state);
@@ -150,10 +152,13 @@
if (debug) { timedLog("endSecondFinger"); }
if (evt.touches.length > 1) {
if (debug) { timedLog("endSecondFinger - capped"); }
- return;
+ return true;
}
if (debug) { timedLog("endSecondFinger - continued"); }
handlers.startmark(evt);
+ // If there are no fingers left on the screen,
+ // we have not finished the handling
+ return evt.touches.length !== 0;
}
};
|
put in a check to make sure we keep in mind whether zero or more fingers are on the screen after removing a finger
|
diff --git a/wandb/sdk/wandb_init.py b/wandb/sdk/wandb_init.py
index <HASH>..<HASH> 100644
--- a/wandb/sdk/wandb_init.py
+++ b/wandb/sdk/wandb_init.py
@@ -108,9 +108,15 @@ class _WandbInit(object):
self.printer = get_printer(singleton._settings._jupyter)
# check if environment variables have changed
singleton_env = {
- k: v for k, v in singleton._environ.items() if k.startswith("WANDB_")
+ k: v
+ for k, v in singleton._environ.items()
+ if k.startswith("WANDB_") and k != "WANDB_SERVICE"
+ }
+ os_env = {
+ k: v
+ for k, v in os.environ.items()
+ if k.startswith("WANDB_") and k != "WANDB_SERVICE"
}
- os_env = {k: v for k, v in os.environ.items() if k.startswith("WANDB_")}
if set(singleton_env.keys()) != set(os_env.keys()) or set(
singleton_env.values()
) != set(os_env.values()):
|
Ignore WANDB_SERVICE env var in env checks in wandb.init (#<I>)
|
diff --git a/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go b/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go
index <HASH>..<HASH> 100644
--- a/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go
+++ b/daemon/graphdriver/fuse-overlayfs/fuseoverlayfs.go
@@ -76,11 +76,9 @@ func init() {
graphdriver.Register(driverName, Init)
}
-// Init returns the native diff driver for overlay filesystem.
-// If overlay filesystem is not supported on the host, the error
+// Init returns the naive diff driver for fuse-overlayfs.
+// If fuse-overlayfs is not supported on the host, the error
// graphdriver.ErrNotSupported is returned.
-// If an overlay filesystem is not supported over an existing filesystem then
-// the error graphdriver.ErrIncompatibleFS is returned.
func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error) {
if _, err := exec.LookPath(binary); err != nil {
logger.Error(err)
@@ -117,7 +115,6 @@ func (d *Driver) String() string {
}
// Status returns current driver information in a two dimensional string array.
-// Output contains "Backing Filesystem" used in this implementation.
func (d *Driver) Status() [][2]string {
return [][2]string{}
}
|
fuse-overlayfs: fix godoc
"fuse-overlayfs" storage driver had wrong godoc comments
that were copied from "overlay2".
|
diff --git a/src/core.js b/src/core.js
index <HASH>..<HASH> 100644
--- a/src/core.js
+++ b/src/core.js
@@ -84,6 +84,13 @@ $.fn.powerTip = function(opts, arg) {
dataTarget = $this.data('powertiptarget'),
title = $this.attr('title');
+ // handle repeated powerTip calls on the same element by destroying
+ // the original instance hooked to it and replacing it with this call
+ if ($this.data('displayController')) {
+ apiDestroy($this);
+ title = $this.attr('title');
+ }
+
// attempt to use title attribute text if there is no data-powertip,
// data-powertipjq or data-powertiptarget. If we do use the title
// attribute, delete the attribute so the browser will not show it
|
Added check for existing PowerTip instance.
Resolves issue #<I>.
|
diff --git a/src/Models/Collections/AbstractCollection.php b/src/Models/Collections/AbstractCollection.php
index <HASH>..<HASH> 100644
--- a/src/Models/Collections/AbstractCollection.php
+++ b/src/Models/Collections/AbstractCollection.php
@@ -388,8 +388,8 @@ abstract class AbstractCollection implements Iterator, Countable
protected function evict($property, AbstractModel $model)
{
$key = $model->getCompositeKey();
- if (isset($this->$property)) {
- unset($this->$property[$key]);
+ if (isset($this->{$property})) {
+ unset($this->{$property}[$key]);
}
if ('models' === $property) {
@@ -425,10 +425,10 @@ abstract class AbstractCollection implements Iterator, Countable
protected function set($property, AbstractModel $model)
{
$key = $model->getCompositeKey();
- $this->$property[$key] = $model;
+ $this->{$property}[$key] = $model;
if ('models' === $property) {
- $keys = array_flip($this->models);
+ $keys = array_flip($this->modelKeyMap);
if (!isset($keys[$key])) {
$this->modelKeyMap[] = $key;
$this->totalCount++;
|
Esure dynamic properties are encapsulated
|
diff --git a/mailchimp3/baseapi.py b/mailchimp3/baseapi.py
index <HASH>..<HASH> 100644
--- a/mailchimp3/baseapi.py
+++ b/mailchimp3/baseapi.py
@@ -51,16 +51,16 @@ class BaseApi(object):
# Remove offset and count if provided in kwargs
kwargs.pop("offset", None)
kwargs.pop("count", None)
- #Fetch results from mailchimp, up to first 100
- result = self._mc_client._get(url=url, offset=0, count=100, **kwargs)
+ #Fetch results from mailchimp, up to first 5000
+ result = self._mc_client._get(url=url, offset=0, count=5000, **kwargs)
total = result['total_items']
#Fetch further results if necessary
- if total > 100:
- for offset in range(1, int(total / 100) + 1):
+ if total > 5000:
+ for offset in range(1, int(total / 5000) + 1):
result = merge_results(result, self._mc_client._get(
url=url,
- offset=int(offset*100),
- count=100,
+ offset=int(offset*5000),
+ count=5000,
**kwargs
))
return result
|
Increase count for iteration
For large datasets, it is faster to make less API calls with large results than lots of API calls with few results.
|
diff --git a/src/Middleware/SocialAuthMiddleware.php b/src/Middleware/SocialAuthMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/Middleware/SocialAuthMiddleware.php
+++ b/src/Middleware/SocialAuthMiddleware.php
@@ -314,6 +314,12 @@ class SocialAuthMiddleware implements MiddlewareInterface, EventDispatcherInterf
$provider = $this->_getService($request)->getProvider($providerName);
$accessToken = $provider->getAccessTokenByRequestParameters($request->getQueryParams());
$identity = $provider->getIdentity($accessToken);
+
+ if (!$identity->id) {
+ throw new RuntimeException(
+ "`id` field is empty for the identity returned by `{$providerName}` provider."
+ );
+ }
} catch (SocialConnectException $e) {
$this->_error = self::AUTH_STATUS_PROVIDER_FAILURE;
|
Throw exception if `id` is not available from the identity.
Refs #<I>.
|
diff --git a/chef/lib/chef/knife/cookbook_upload.rb b/chef/lib/chef/knife/cookbook_upload.rb
index <HASH>..<HASH> 100644
--- a/chef/lib/chef/knife/cookbook_upload.rb
+++ b/chef/lib/chef/knife/cookbook_upload.rb
@@ -118,7 +118,10 @@ class Chef
end
ui.info "upload complete"
- update_version_constraints(version_constraints_to_update) if config[:environment]
+
+ unless version_constraints_to_update.empty?
+ update_version_constraints(version_constraints_to_update) if config[:environment]
+ end
end
def cookbook_repo
|
CHEF-<I>: Only update the environment when necessary.
|
diff --git a/config/default.rb b/config/default.rb
index <HASH>..<HASH> 100644
--- a/config/default.rb
+++ b/config/default.rb
@@ -4,7 +4,6 @@ Vagrant::Config.run do |config|
config.vagrant.host = :detect
config.ssh.username = "vagrant"
- config.ssh.password = "vagrant"
config.ssh.host = "127.0.0.1"
config.ssh.guest_port = 22
config.ssh.max_tries = 100
|
Remove config.ssh.password, it hasn't been used in years
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,8 @@ setup(name="untwisted",
"untwisted.utils",
"untwisted.plugins"],
author="Iury O. G. Figueiredo",
- author_email="ioliveira@id.uff.br")
+ author_email="ioliveira@id.uff.br",
+ description="A library for asynchronous programming in python.",)
|
Adding description.
Adding `description` to `setup.py`
|
diff --git a/asv_bench/benchmarks/gil.py b/asv_bench/benchmarks/gil.py
index <HASH>..<HASH> 100644
--- a/asv_bench/benchmarks/gil.py
+++ b/asv_bench/benchmarks/gil.py
@@ -1,7 +1,7 @@
import numpy as np
from pandas import DataFrame, Series, date_range, factorize, read_csv
-from pandas.core.algorithms import take_1d
+from pandas.core.algorithms import take_nd
from .pandas_vb_common import tm
@@ -110,7 +110,7 @@ class ParallelTake1D:
@test_parallel(num_threads=2)
def parallel_take1d():
- take_1d(df["col"].values, indexer)
+ take_nd(df["col"].values, indexer)
self.parallel_take1d = parallel_take1d
|
CI: fix reference to take_1d() (#<I>)
Removed in <URL>
|
diff --git a/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php b/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
+++ b/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
@@ -35,7 +35,7 @@ class VerifyCsrfToken
protected $except = [];
/**
- * If you're client-side scripts need the XSRF-TOKEN cookie, enable this setting.
+ * If your client-side scripts need the XSRF-TOKEN cookie, enable this setting.
*
* @var bool
*/
|
Update VerifyCsrfToken.php
|
diff --git a/SoftLayer/managers/load_balancer.py b/SoftLayer/managers/load_balancer.py
index <HASH>..<HASH> 100644
--- a/SoftLayer/managers/load_balancer.py
+++ b/SoftLayer/managers/load_balancer.py
@@ -18,6 +18,11 @@ class LoadBalancerManager(utils.IdentifierMixin, object):
:param SoftLayer.API.BaseClient client: the client instance
"""
+ TYPE = {
+ 1: "Public to Private",
+ 0: "Private to Private",
+ 2: "Public to Public",
+ }
def __init__(self, client):
self.client = client
|
<I> add const type of load balancer as UI, and ibmcloud cli shows
|
diff --git a/src/Models/Relation.php b/src/Models/Relation.php
index <HASH>..<HASH> 100644
--- a/src/Models/Relation.php
+++ b/src/Models/Relation.php
@@ -7,9 +7,19 @@ use Illuminate\Database\Eloquent\Model;
class Relation extends Model
{
/**
+ * OneToMany Relationship.
+ */
+ const OneToMany = 'OneToMany';
+
+ /**
+ * ManyToMany Relationship.
+ */
+ const ManyToMany = 'ManyToMany';
+
+ /**
* The attributes that are mass assignable.
*
- * @var array
+ * @var array $fillable
*/
protected $fillable = ['scaffoldinterface_id', 'to', 'having'];
}
|
Create OneToMany, ManyToMany constant
|
diff --git a/src/graceful/serializers.py b/src/graceful/serializers.py
index <HASH>..<HASH> 100644
--- a/src/graceful/serializers.py
+++ b/src/graceful/serializers.py
@@ -196,8 +196,10 @@ class BaseSerializer(metaclass=MetaSerializer):
for single_value in value
]
else:
- object_dict[source] = field.from_representation(
- value) if not field.allow_null else None
+ if not field.allow_null:
+ object_dict[source] = field.from_representation(value)
+ else:
+ object_dict[source] = value
except ValueError as err:
failed[name] = str(err)
|
Returning always None of a nullable field is fixed
|
diff --git a/striplog/utils.py b/striplog/utils.py
index <HASH>..<HASH> 100644
--- a/striplog/utils.py
+++ b/striplog/utils.py
@@ -16,19 +16,22 @@ class CustomFormatter(Formatter):
def __init__(self):
super(CustomFormatter, self).__init__()
- self.last_index = 0
- def get_value(self, key, args, kwargs):
- if key == '':
- key = self.last_index
- self.last_index += 1
- return super(CustomFormatter, self).get_value(key, args, kwargs)
-
- def parse(self, format_string):
- # We'll leave this alone.
- return super(CustomFormatter, self).parse(format_string)
+ def get_field(self, field_name, args, kwargs):
+ """
+ Return an underscore if the attribute is absent.
+ Not all components have the same attributes.
+ """
+ try:
+ s = super(CustomFormatter, self)
+ return s.get_field(field_name, args, kwargs)
+ except KeyError:
+ return ("_", field_name)
def convert_field(self, value, conversion):
+ """
+ Define some extra field conversion functions.
+ """
try: # If the normal behaviour works, do it.
s = super(CustomFormatter, self)
return s.convert_field(value, conversion)
|
cope with missing fields in fmt
|
diff --git a/eventsourcing/examples/wiki/application.py b/eventsourcing/examples/wiki/application.py
index <HASH>..<HASH> 100644
--- a/eventsourcing/examples/wiki/application.py
+++ b/eventsourcing/examples/wiki/application.py
@@ -106,7 +106,7 @@ class Log(Generic[TDomainEvent]):
self.originator_id = originator_id
self.logged_cls = logged_cls
- def trigger_event(self, **kwargs: Any) -> AggregateEvent[Aggregate]:
+ def trigger_event(self, **kwargs: Any) -> TDomainEvent:
last_logged = self._get_last_logged()
if last_logged:
next_originator_version = last_logged.originator_version + 1
|
Adjusted type annotation in wiki example Log class.
|
diff --git a/lib/reporters/jshint/index.js b/lib/reporters/jshint/index.js
index <HASH>..<HASH> 100644
--- a/lib/reporters/jshint/index.js
+++ b/lib/reporters/jshint/index.js
@@ -3,7 +3,7 @@
var JSHINT = require("jshint").JSHINT;
exports.process = function (source, options/*, reportInfo */) {
- var results = lint(source, options.jshint, options.globals);
+ var results = lint(source, options.options, options.globals);
var report = generateReport(results);
return report;
};
|
fixed jshint option passing
|
diff --git a/flaskext/sqlalchemy.py b/flaskext/sqlalchemy.py
index <HASH>..<HASH> 100644
--- a/flaskext/sqlalchemy.py
+++ b/flaskext/sqlalchemy.py
@@ -533,8 +533,6 @@ class SQLAlchemy(object):
app.config.setdefault('SQLALCHEMY_POOL_TIMEOUT', None)
app.config.setdefault('SQLALCHEMY_POOL_RECYCLE', None)
- self.app = app
-
@app.after_request
def shutdown_session(response):
self.session.remove()
|
Don't assign app to self, that is not supported
|
diff --git a/core/src/main/java/org/ocpsoft/prettytime/i18n/Resources_de.java b/core/src/main/java/org/ocpsoft/prettytime/i18n/Resources_de.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/ocpsoft/prettytime/i18n/Resources_de.java
+++ b/core/src/main/java/org/ocpsoft/prettytime/i18n/Resources_de.java
@@ -51,7 +51,7 @@ public class Resources_de extends ListResourceBundle
{ "JustNowPattern", "%u" },
{ "JustNowFuturePrefix", "Jetzt" },
{ "JustNowFutureSuffix", "" },
- { "JustNowPastPrefix", "vor einem Augenblick" },
+ { "JustNowPastPrefix", "gerade eben" },
{ "JustNowPastSuffix", "" },
{ "JustNowSingularName", "" },
{ "JustNowPluralName", "" },
@@ -120,4 +120,4 @@ public class Resources_de extends ListResourceBundle
return OBJECTS;
}
-}
\ No newline at end of file
+}
|
Shorter German string for JustNowPast
Probably more fitting for some projects to have a shorter string there.
|
diff --git a/examples/with-iron-session/components/Header.js b/examples/with-iron-session/components/Header.js
index <HASH>..<HASH> 100644
--- a/examples/with-iron-session/components/Header.js
+++ b/examples/with-iron-session/components/Header.js
@@ -54,7 +54,7 @@ const Header = () => {
)}
<li>
<a href="https://github.com/vvo/next-iron-session">
- <img src="/GitHub-Mark-Light-32px.png" widht="32" height="32" />
+ <img src="/GitHub-Mark-Light-32px.png" width="32" height="32" />
</a>
</li>
</ul>
|
Fix typo in Header component of with-iron-session example (#<I>)
|
diff --git a/lib/capybara/selenium/node.rb b/lib/capybara/selenium/node.rb
index <HASH>..<HASH> 100644
--- a/lib/capybara/selenium/node.rb
+++ b/lib/capybara/selenium/node.rb
@@ -53,6 +53,11 @@ class Capybara::Selenium::Node < Capybara::Driver::Node
# :none => append the new value to the existing value <br/>
# :backspace => send backspace keystrokes to clear the field <br/>
# Array => an array of keys to send before the value being set, e.g. [[:command, 'a'], :backspace]
+ # @option options [Boolean] :rapid (nil) Whether setting text inputs should use a faster "rapid" mode<br/>
+ # nil => Text inputs with length greater than 30 characters will be set using a faster driver script mode<br/>
+ # true => Rapid mode will be used regardless of input length<br/>
+ # false => Sends keys via conventional mode. This may be required to avoid losing key-presses if you have certain
+ # Javascript interactions on form inputs<br/>
def set(value, **options)
if value.is_a?(Array) && !multiple?
raise ArgumentError, "Value cannot be an Array when 'multiple' attribute is not present. Not a #{value.class}"
|
Document the text "rapid" mode in RubyDocs
|
diff --git a/src/Stagehand/TestRunner/Core/Bootstrap.php b/src/Stagehand/TestRunner/Core/Bootstrap.php
index <HASH>..<HASH> 100644
--- a/src/Stagehand/TestRunner/Core/Bootstrap.php
+++ b/src/Stagehand/TestRunner/Core/Bootstrap.php
@@ -69,7 +69,7 @@ class Bootstrap
$this->prepareApplicationContext();
}
- public function prepareClassLoader()
+ protected function prepareClassLoader()
{
if (!class_exists('Stagehand\TestRunner\Core\Environment')) {
if (!class_exists('Symfony\Component\ClassLoader\UniversalClassLoader', false)) {
|
Changed the visibility of the prepareClassLoader() method to protected.
|
diff --git a/template.go b/template.go
index <HASH>..<HASH> 100644
--- a/template.go
+++ b/template.go
@@ -8,6 +8,7 @@ import (
"os"
"path/filepath"
"strings"
+ "syscall"
"text/template"
)
@@ -108,7 +109,13 @@ func generateFile(config Config, containers Context) bool {
if config.Dest != "" {
contents := []byte{}
- if _, err := os.Stat(config.Dest); err == nil {
+ if fi, err := os.Stat(config.Dest); err == nil {
+ if err := dest.Chmod(fi.Mode()); err != nil {
+ log.Fatalf("unable to chmod temp file: %s\n", err)
+ }
+ if err := dest.Chown(int(fi.Sys().(*syscall.Stat_t).Uid), int(fi.Sys().(*syscall.Stat_t).Gid)); err != nil {
+ log.Fatalf("unable to chown temp file: %s\n", err)
+ }
contents, err = ioutil.ReadFile(config.Dest)
if err != nil {
log.Fatalf("unable to compare current file contents: %s: %s\n", config.Dest, err)
|
Update permissions of temp file to match that of original file.
|
diff --git a/lib/foreman_docker/engine.rb b/lib/foreman_docker/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/foreman_docker/engine.rb
+++ b/lib/foreman_docker/engine.rb
@@ -41,7 +41,7 @@ module ForemanDocker
initializer 'foreman_docker.register_plugin', :after => :finisher_hook do
Foreman::Plugin.register :foreman_docker do
- requires_foreman '> 1.4'
+ requires_foreman '>= 1.11'
compute_resource ForemanDocker::Docker
sub_menu :top_menu, :containers_menu, :caption => N_('Containers'),
|
Fixes #<I> - Raise requires_foreman version to <I>
Since now we use attr_accessible, and more changes are coming up to make
this plugin Rails 4 compatible, the minimum version needs to be <I>.
|
diff --git a/test/test-utils.test.js b/test/test-utils.test.js
index <HASH>..<HASH> 100644
--- a/test/test-utils.test.js
+++ b/test/test-utils.test.js
@@ -107,19 +107,20 @@ Child ${config2Name}:
describe("appendFile functionality", () => {
describe("positive test-cases", () => {
const junkFile = resolve(__dirname, "junkFile.js");
+ const initialJunkData = "initial junk data";
+ const junkComment = "//junk comment";
beforeEach(() => {
- writeFileSync(junkFile, "");
+ writeFileSync(junkFile, initialJunkData);
});
afterEach(() => {
unlinkSync(junkFile);
});
it("should append data to file if file exists", () => {
- const expectedData = "//junk comment";
- appendDataIfFileExists(__dirname, junkFile, expectedData);
+ appendDataIfFileExists(__dirname, junkFile, junkComment);
const actualData = readFileSync(junkFile).toString();
- expect(actualData).toBe(expectedData);
+ expect(actualData).toBe(initialJunkData + junkComment);
});
});
|
tests: improve appendFile test-case
|
diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java
index <HASH>..<HASH> 100644
--- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java
+++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java
@@ -640,6 +640,10 @@ public class GenerateFeaturesMojo extends ServerFeatureSupport {
public void info(String msg) {
log.info(msg);
}
+ @Override
+ public boolean isDebugEnabled() {
+ return log.isDebugEnabled();
+ }
}
}
|
Enable binary scanner logging in debug mode.
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -145,6 +145,16 @@ module.exports = function(grunt) {
src: ['**'],
dest: path.join(chromiumSrc, 'tools/perf/')
}, {
+ expand: true,
+ flatten: true,
+ src: 'node_modules/topcoat-theme/font/**',
+ dest: path.join(chromiumSrc, 'tools/perf/page_sets/topcoat/font')
+ }, {
+ expand: true,
+ flatten: true,
+ src: 'node_modules/topcoat-theme/img/*',
+ dest: path.join(chromiumSrc, 'tools/perf/page_sets/topcoat/img')
+ }, {
src: ['css/**'],
dest: path.join(chromiumSrc, 'tools/perf/page_sets/topcoat/release/')
}]
|
fixed copy task for Grunt telemetry
|
diff --git a/test/specs/wrapper.spec.js b/test/specs/wrapper.spec.js
index <HASH>..<HASH> 100644
--- a/test/specs/wrapper.spec.js
+++ b/test/specs/wrapper.spec.js
@@ -146,7 +146,7 @@ describe('wrapper', function () {
}, 0);
});
- // TODO this won't work until karma-jasmine updates to jasmine-ajax 2.99.0
+ // TODO this won't work until karma-jasmine updates to jasmine-ajax 3.0.0
/*
it('should support array buffer response', function (done) {
var request, response;
@@ -176,12 +176,11 @@ describe('wrapper', function () {
});
setTimeout(function () {
- console.log(response.data);
- expect(response.data.byteLength).toBe(16);
+ expect(response.data.byteLength).toBe(22);
done();
}, 0);
}, 0);
});
- */
+ //*/
});
|
Noting that jasmine-ajax <I> is needed
|
diff --git a/Tests/Functional/UseCasesTest.php b/Tests/Functional/UseCasesTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Functional/UseCasesTest.php
+++ b/Tests/Functional/UseCasesTest.php
@@ -14,6 +14,7 @@ use Interop\Queue\PsrMessage;
use Interop\Queue\PsrQueue;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\Filesystem\Filesystem;
+use Symfony\Component\HttpKernel\Kernel;
/**
* @group functional
@@ -92,11 +93,14 @@ class UseCasesTest extends WebTestCase
],
]];
- yield 'default_dsn_as_env' => [[
- 'transport' => [
- 'default' => '%env(AMQP_DSN)%',
- ],
- ]];
+ // Symfony 2.x does not such env syntax
+ if (version_compare(Kernel::VERSION, '3.2', '>=')) {
+ yield 'default_dsn_as_env' => [[
+ 'transport' => [
+ 'default' => '%env(AMQP_DSN)%',
+ ],
+ ]];
+ }
yield 'default_dbal_as_dsn' => [[
'transport' => [
|
revert sf version check
|
diff --git a/src/test/java/fr/pilato/elasticsearch/crawler/fs/test/FSCrawlerReproduceInfoPrinter.java b/src/test/java/fr/pilato/elasticsearch/crawler/fs/test/FSCrawlerReproduceInfoPrinter.java
index <HASH>..<HASH> 100644
--- a/src/test/java/fr/pilato/elasticsearch/crawler/fs/test/FSCrawlerReproduceInfoPrinter.java
+++ b/src/test/java/fr/pilato/elasticsearch/crawler/fs/test/FSCrawlerReproduceInfoPrinter.java
@@ -65,7 +65,7 @@ public class FSCrawlerReproduceInfoPrinter extends RunListener {
final StringBuilder b = new StringBuilder();
b.append("REPRODUCE WITH:\n");
- b.append("mvn test");
+ b.append("mvn integration-test");
MavenMessageBuilder mavenMessageBuilder = new MavenMessageBuilder(b);
mavenMessageBuilder.appendAllOpts(failure.getDescription());
|
Need to use integration-test instead of test for integration tests
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -11,7 +11,7 @@ module.exports._opts = function _opts(agent) {
return {
headers: {
'User-Agent': 'NRK%20TV/43 CFNetwork/711.5.6 Darwin/14.0.0',
- 'accept': '*/*',
+ accept: '*/*',
'app-version-ios': '43',
'Accept-Language:': 'en-us',
},
@@ -25,7 +25,7 @@ module.exports._opts = function _opts(agent) {
'AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0',
'Mobile/10A5376e Safari/8536.25',
].join(' '),
- 'accept': 'application/json, text/javascript, */*; q=0.01',
+ accept: 'application/json, text/javascript, */*; q=0.01',
'x-requested-with': 'XMLHttpRequest',
},
};
|
fix(eslint): unnecessarily quoted property `accept`
|
diff --git a/engarde/checks.py b/engarde/checks.py
index <HASH>..<HASH> 100644
--- a/engarde/checks.py
+++ b/engarde/checks.py
@@ -182,15 +182,15 @@ def within_n_std(df, n=3):
==========
df : DataFame
n : int
- number of standard devations from the mean
+ number of standard deviations from the mean
Returns
=======
- df : DatFrame
+ df : DataFrame
"""
means = df.mean()
stds = df.std()
- inliers = (np.abs(df - means) < n * stds)
+ inliers = (np.abs(df[means.index] - means) < n * stds)
if not np.all(inliers):
msg = generic.bad_locations(~inliers)
raise AssertionError(msg)
|
handle within_n_std with non-numerical columns
Let within_n_std handle df with non-numerical columns without failing
|
diff --git a/config.js b/config.js
index <HASH>..<HASH> 100644
--- a/config.js
+++ b/config.js
@@ -7,8 +7,9 @@ module.exports = {
realname: "http://github.com/erming/shout",
},
networks: [{
- host: "irc.freenode.org",
- port: 6667,
+ host: "chat.freenode.net",
+ port: 6697,
+ tls: true,
onConnect: {
commands: [""],
join: [
diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -5,6 +5,7 @@ var http = require("connect");
var io = require("socket.io");
var irc = require("slate-irc");
var net = require("net");
+var tls = require("tls");
// Models
@@ -92,11 +93,12 @@ function connect(params) {
var host = params.host;
var port = params.port || 6667;
-
- var stream = net.connect({
- port: port,
+ var options = {
host: host,
- });
+ port: port,
+ };
+
+ var stream = params.tls ? tls.connect(options) : net.connect(options);
stream.on("error", function(e) {
console.log(e);
|
Add TLS connection support
Also update the example config to be safe by default.
|
diff --git a/scripts/release.js b/scripts/release.js
index <HASH>..<HASH> 100644
--- a/scripts/release.js
+++ b/scripts/release.js
@@ -4,7 +4,7 @@ const semver = require('semver');
const fs = require('fs');
const _ = require('lodash');
-const ONLY_ON_BRANCH = 'master';
+const ONLY_ON_BRANCH = 'origin/master';
const VERSION_TAG = 'latest';
const VERSION_INC = 'patch';
|
Change branch to origin/master for release
|
diff --git a/cache/cache.go b/cache/cache.go
index <HASH>..<HASH> 100644
--- a/cache/cache.go
+++ b/cache/cache.go
@@ -90,6 +90,8 @@ func (r *RowCache) Row(uuid string) model.Model {
// RowByModel searches the cache using a the indexes for a provided model
func (r *RowCache) RowByModel(m model.Model) model.Model {
+ r.mutex.RLock()
+ defer r.mutex.RUnlock()
if reflect.TypeOf(m) != r.dataType {
return nil
}
|
cache: rlock row by model
|
diff --git a/examples/multiple-choice/utils_multiple_choice.py b/examples/multiple-choice/utils_multiple_choice.py
index <HASH>..<HASH> 100644
--- a/examples/multiple-choice/utils_multiple_choice.py
+++ b/examples/multiple-choice/utils_multiple_choice.py
@@ -535,7 +535,12 @@ def convert_examples_to_features(
text_b = example.question + " " + ending
inputs = tokenizer.encode_plus(
- text_a, text_b, add_special_tokens=True, max_length=max_length, pad_to_max_length=True,
+ text_a,
+ text_b,
+ add_special_tokens=True,
+ max_length=max_length,
+ pad_to_max_length=True,
+ return_overflowing_tokens=True,
)
if "num_truncated_tokens" in inputs and inputs["num_truncated_tokens"] > 0:
logger.info(
|
Should return overflowing information for the log (#<I>)
|
diff --git a/chess/__init__.py b/chess/__init__.py
index <HASH>..<HASH> 100644
--- a/chess/__init__.py
+++ b/chess/__init__.py
@@ -478,12 +478,6 @@ class Move:
return "0000"
def xboard(self):
- """
- Gets an XBoard string for the move.
-
- Same as :func:`~chess.Move.uci()`, except that the notation for null
- moves is ``@@@@``.
- """
return self.uci() if self else "@@@@"
def __bool__(self):
|
xboard is undocumented for now
|
diff --git a/spec/rest_api_spec.rb b/spec/rest_api_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rest_api_spec.rb
+++ b/spec/rest_api_spec.rb
@@ -317,7 +317,7 @@ RSpec.describe Shodanz::API::REST do
end
expect(resp).to be_a(Hash)
expect(resp[ip]).to be_a(Array)
- expect(resp[ip].first).to eq('google-public-dns-a.google.com')
+ # expect(resp[ip].first).to eq('google-public-dns-a.google.com')
end
describe 'resolves ip addresses to domains' do
|
Update rest_api_spec.rb
|
diff --git a/lib/fixed.js b/lib/fixed.js
index <HASH>..<HASH> 100644
--- a/lib/fixed.js
+++ b/lib/fixed.js
@@ -49,7 +49,7 @@ module.exports=function(statpath,def){
type='application/json';
break;
case '.js':
- type='text/javascript';
+ type='text/javascript;charset=UTF-8';
break;
case '.ico':
bin=true;
|
javascript should always be utf8
|
diff --git a/impl/src/main/java/org/jboss/seam/faces/rewrite/RewriteConfiguration.java b/impl/src/main/java/org/jboss/seam/faces/rewrite/RewriteConfiguration.java
index <HASH>..<HASH> 100644
--- a/impl/src/main/java/org/jboss/seam/faces/rewrite/RewriteConfiguration.java
+++ b/impl/src/main/java/org/jboss/seam/faces/rewrite/RewriteConfiguration.java
@@ -51,8 +51,10 @@ public class RewriteConfiguration implements ConfigurationProvider {
private List<UrlMapping> loadUrlMappings(ViewConfigStore store, String facesMapping) {
List<UrlMapping> mappings = new ArrayList<UrlMapping>();
Map<String, Annotation> map = store.getAllAnnotationViewMap(org.jboss.seam.faces.rewrite.UrlMapping.class);
- for (Map.Entry<String, Annotation> entry : map.entrySet()) {
- mappings.add(buildPrettyFacesUrlMapping(entry.getKey(), entry.getValue(), facesMapping));
+ if (map != null) {
+ for (Map.Entry<String, Annotation> entry : map.entrySet()) {
+ mappings.add(buildPrettyFacesUrlMapping(entry.getKey(), entry.getValue(), facesMapping));
+ }
}
return mappings;
}
|
Avoided a NPE when no @UrlMapping annoations are present in the view config
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -9,7 +9,7 @@ var BBY = {
init: function(options) {
this.options = {
key: process.env.BBY_API_KEY,
- url: 'https://api.bestbuy.com/v1',
+ url: 'https://api.bestbuy.com/v1',
debug: false,
headers: {
'User-Agent': 'bestbuy-sdk-js'
|
Recommendations and Smart Lists
|
diff --git a/lib/apiary/command/publish.rb b/lib/apiary/command/publish.rb
index <HASH>..<HASH> 100644
--- a/lib/apiary/command/publish.rb
+++ b/lib/apiary/command/publish.rb
@@ -25,6 +25,7 @@ module Apiary
:content_type => "text/plain",
:authentication => "Token #{@options.api_key}"
}
+ @options.message_to_save||= "Saved with apiary-client"
end
def self.execute(args)
@@ -57,7 +58,8 @@ module Apiary
def query_apiary(host, path)
url = "https://#{host}/blueprint/publish/#{@options.api_name}"
data = {
- :code => File.read(path)
+ :code => File.read(path),
+ :messageToSave => @options.messageToSave
}
RestClient.proxy = @options.proxy
|
Manage messageToSave option in publish command.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ def read(fname):
setup(
name='django-angular',
- version='0.1.4',
+ version='0.2.0',
author='Jacob Rief',
author_email='jacob.rief@gmail.com',
description=DESCRIPTION,
@@ -30,6 +30,6 @@ setup(
platforms=['OS Independent'],
classifiers=CLASSIFIERS,
install_requires=['Django>=1.4'],
- packages=find_packages(exclude=["tests", "docs"]),
+ packages=find_packages(exclude=['unittests', 'docs']),
include_package_data=True,
)
|
Bumped to version <I>
|
diff --git a/core/packet.go b/core/packet.go
index <HASH>..<HASH> 100644
--- a/core/packet.go
+++ b/core/packet.go
@@ -133,11 +133,35 @@ func (p *Packet) UnmarshalJSON(raw []byte) error {
if err != nil {
return err
}
- payload := new(lorawan.PHYPayload)
+
+ // Try first to unmarshal as an uplink payload
+ payload := lorawan.NewPHYPayload(true)
if err := payload.UnmarshalBinary(rawPayload); err != nil {
return err
}
- p.Payload = *payload
+
+ switch payload.MHDR.MType.String() {
+ case "JoinAccept":
+ fallthrough
+ case "UnconfirmedDataDown":
+ fallthrough
+ case "ConfirmedDataDown":
+ payload = lorawan.NewPHYPayload(false)
+ if err := payload.UnmarshalBinary(rawPayload); err != nil {
+ return err
+ }
+ case "JoinRequest":
+ fallthrough
+ case "UnconfirmedDataUp":
+ fallthrough
+ case "ConfirmedDataUp":
+ // Nothing, we handle them by default
+
+ case "Proprietary":
+ return fmt.Errorf("Unsupported MType Proprietary")
+ }
+
+ p.Payload = payload
p.Metadata = proxy.Metadata
return nil
}
|
[packet.unmarshal] Fix packet unmarshalling issues. Use of MType to distinguish packet type
|
diff --git a/jax/lax.py b/jax/lax.py
index <HASH>..<HASH> 100644
--- a/jax/lax.py
+++ b/jax/lax.py
@@ -427,7 +427,7 @@ def while_loop(cond_fun, body_fun, init_val):
Returns:
The output from the final iteration of body_fun, of type `T`.
- The semantics of `while_loop` are given by this Python implementation:
+ The semantics of `while_loop` are given by this Python implementation::
def while_loop(cond_fun, body_fun, init_val):
val = init_val
@@ -648,7 +648,7 @@ def fori_loop(lower, upper, body_fun, init_val):
Returns:
Loop value from the final iteration, of type T.
- The semantics of `fori_loop` are given by this Python implementation:
+ The semantics of `fori_loop` are given by this Python implementation::
def fori_loop(lower, upper, body_fun, init_val):
val = init_val
|
Fix formatting of lax.while_loop and lax.fori_loop doc comments.
|
diff --git a/command/common/install_plugin_command_test.go b/command/common/install_plugin_command_test.go
index <HASH>..<HASH> 100644
--- a/command/common/install_plugin_command_test.go
+++ b/command/common/install_plugin_command_test.go
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"math/rand"
+ "os"
"strconv"
"code.cloudfoundry.org/cli/actor/pluginaction"
@@ -29,6 +30,7 @@ var _ = Describe("install-plugin command", func() {
fakeActor *commonfakes.FakeInstallPluginActor
executeErr error
expectedErr error
+ pluginHome string
)
BeforeEach(func() {
@@ -44,11 +46,16 @@ var _ = Describe("install-plugin command", func() {
}
tmpDirectorySeed := strconv.Itoa(int(rand.Int63()))
- fakeConfig.PluginHomeReturns(fmt.Sprintf("some-pluginhome-%s", tmpDirectorySeed))
+ pluginHome = fmt.Sprintf("some-pluginhome-%s", tmpDirectorySeed)
+ fakeConfig.PluginHomeReturns(pluginHome)
fakeConfig.ExperimentalReturns(true)
fakeConfig.BinaryNameReturns("faceman")
})
+ AfterEach(func() {
+ os.RemoveAll(pluginHome)
+ })
+
JustBeforeEach(func() {
executeErr = cmd.Execute(nil)
})
|
delete temp directories created by install-plugin tests
|
diff --git a/twitter_ads/campaign.py b/twitter_ads/campaign.py
index <HASH>..<HASH> 100644
--- a/twitter_ads/campaign.py
+++ b/twitter_ads/campaign.py
@@ -65,6 +65,13 @@ resource_property(FundingInstrument, 'type', readonly=True)
resource_property(FundingInstrument, 'created_at', readonly=True, transform=TRANSFORM.TIME)
resource_property(FundingInstrument, 'updated_at', readonly=True, transform=TRANSFORM.TIME)
resource_property(FundingInstrument, 'deleted', readonly=True, transform=TRANSFORM.BOOL)
+resource_property(FundingInstrument, 'able_to_fund', readonly=True, transform=TRANSFORM.BOOL)
+resource_property(FundingInstrument, 'paused', readonly=True, transform=TRANSFORM.BOOL)
+resource_property(FundingInstrument, 'io_header', readonly=True)
+resource_property(FundingInstrument, 'reasons_not_able_to_fund', readonly=True)
+resource_property(FundingInstrument, 'start_time', readonly=True)
+resource_property(FundingInstrument, 'end_time', readonly=True)
+resource_property(FundingInstrument, 'credit_remaining_local_micro', readonly=True)
class PromotableUser(Resource):
|
Funding instrument properties (#<I>)
* parity with Ruby SDK
* additional FI properties
|
diff --git a/lib/Models/ImageryLayerCatalogItem.js b/lib/Models/ImageryLayerCatalogItem.js
index <HASH>..<HASH> 100644
--- a/lib/Models/ImageryLayerCatalogItem.js
+++ b/lib/Models/ImageryLayerCatalogItem.js
@@ -490,11 +490,13 @@ ImageryLayerCatalogItem.prototype._show = function() {
ImageryLayerCatalogItem.showLayer(this, this._imageryLayer);
ImageryLayerCatalogItem.showLayer(this, this._nextLayer);
+ ImageryLayerCatalogItem.addTimesToChart(this);
};
ImageryLayerCatalogItem.prototype._hide = function() {
ImageryLayerCatalogItem.hideLayer(this, this._imageryLayer);
ImageryLayerCatalogItem.hideLayer(this, this._nextLayer);
+ this.terria.catalog.removeChartableItem(this);
};
ImageryLayerCatalogItem.prototype.showOnSeparateMap = function(globeOrMap) {
|
Add and remove imagery layer as chartable item.
|
diff --git a/vespa/kepler.py b/vespa/kepler.py
index <HASH>..<HASH> 100644
--- a/vespa/kepler.py
+++ b/vespa/kepler.py
@@ -79,7 +79,7 @@ def kepler_starfield_file(koi):
chips,ras,decs = np.loadtxt(CHIPLOC_FILE,unpack=True)
ds = ((c.ra.deg-ras)**2 + (c.dec.deg-decs)**2)
chip = chips[np.argmin(ds)]
- return '{}/kepler_starfield_{}'.format(STARFIELD_DIR,chip)
+ return '{}/kepler_starfield_{}.h5'.format(STARFIELD_DIR,chip)
def pipeline_weaksec(koi):
|
added h5 filename to kepler_starfield_file
|
diff --git a/spec/graphql/schema/traversal_spec.rb b/spec/graphql/schema/traversal_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/graphql/schema/traversal_spec.rb
+++ b/spec/graphql/schema/traversal_spec.rb
@@ -20,6 +20,7 @@ describe GraphQL::Schema::Traversal do
it "finds types from a single type and its fields" do
expected = {
+ "Boolean" => GraphQL::BOOLEAN_TYPE,
"Cheese" => Dummy::CheeseType,
"Float" => GraphQL::FLOAT_TYPE,
"String" => GraphQL::STRING_TYPE,
@@ -67,9 +68,10 @@ describe GraphQL::Schema::Traversal do
result = reduce_types([type_parent])
expected = {
+ "Boolean" => GraphQL::BOOLEAN_TYPE,
+ "String" => GraphQL::STRING_TYPE,
"InputTypeParent" => type_parent,
"InputTypeChild" => type_child,
- "String" => GraphQL::STRING_TYPE
}
assert_equal(expected, result.to_h)
end
|
Fix broken tests from visiting directive arguments in Traversal
|
diff --git a/lib/ransack_ui/ransack_overrides/helpers/form_builder.rb b/lib/ransack_ui/ransack_overrides/helpers/form_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/ransack_ui/ransack_overrides/helpers/form_builder.rb
+++ b/lib/ransack_ui/ransack_overrides/helpers/form_builder.rb
@@ -16,7 +16,7 @@ module Ransack
if bases.size > 1
@template.select(
@object_name, :name,
- @template.grouped_options_for_select(attribute_collection_for_bases(bases)),
+ @template.grouped_options_for_select(attribute_collection_for_bases(bases), object.name),
objectify_options(options), @default_options.merge(html_options)
)
else
|
Set value on attribute select in grouped_options_for_select method
|
diff --git a/lib/send.js b/lib/send.js
index <HASH>..<HASH> 100644
--- a/lib/send.js
+++ b/lib/send.js
@@ -90,7 +90,7 @@ function send(path, options, req, res, next) {
// vary
if (!res.getHeader('Vary')) {
res.setHeader('Vary', 'Accept-Encoding');
- } else if (!~vary.indexOf('Accept-Encoding')) {
+ } else if (!~res.getHeader('Vary').indexOf('Accept-Encoding')) {
res.setHeader('Vary', res.getHeader('Vary') + ', Accept-Encoding');
}
|
fixed bug. `vary` undefined
|
diff --git a/ArgParser.php b/ArgParser.php
index <HASH>..<HASH> 100644
--- a/ArgParser.php
+++ b/ArgParser.php
@@ -23,7 +23,9 @@ class ArgParser
$args = [$primary => $args];
}
- $this->setNameConverter($nameConverter);
+ if ($nameConverter instanceof NameConverterInterface) {
+ $this->setNameConverter($nameConverter);
+ }
$this->setArgs($args);
}
|
Add check to see if nameconverter has been passed in
|
diff --git a/src/collectors/userscripts/userscripts.py b/src/collectors/userscripts/userscripts.py
index <HASH>..<HASH> 100644
--- a/src/collectors/userscripts/userscripts.py
+++ b/src/collectors/userscripts/userscripts.py
@@ -54,11 +54,19 @@ class UserScriptsCollector(diamond.collector.Collector):
if not os.access(scripts_path, os.R_OK):
return None
for script in os.listdir(scripts_path):
- if not os.access(os.path.join(scripts_path, script), os.X_OK):
+ absolutescriptpath = os.path.join(scripts_path, script)
+ if not os.access(absolutescriptpath, os.X_OK):
+ self.log.info("%s is not executable" % absolutescriptpath)
continue
- stat, out = commands.getstatusoutput(os.path.join(scripts_path,
- script))
+ out = None
+ self.log.debug("Executing %s" % absolutescriptpath)
+ stat, out = commands.getstatusoutput(absolutescriptpath)
if stat != 0:
+ self.log.error("%s return exit value %s; skipping" %
+ (absolutescriptpath, stat))
+ continue
+ if not out:
+ self.log.info("%s return no output" % absolutescriptpath)
continue
for line in out.split('\n'):
name, value = line.split()
|
Added logging and some tests for misbehaving scripts to userscripts collector
|
diff --git a/instabot/bot/bot_stats.py b/instabot/bot/bot_stats.py
index <HASH>..<HASH> 100644
--- a/instabot/bot/bot_stats.py
+++ b/instabot/bot/bot_stats.py
@@ -38,7 +38,7 @@ def save_user_stats(self, username, path=""):
infodict = self.get_user_info(user_id)
if infodict:
data_to_save = {
- "date": str(datetime.datetime.now()),
+ "date": str(datetime.datetime.now().replace(microsecond=0)),
"followers": int(infodict["follower_count"]),
"following": int(infodict["following_count"]),
"medias": int(infodict["media_count"])
|
From date in save_stats removed microseconds.
|
diff --git a/jOOU/src/main/java/org/joou/UByte.java b/jOOU/src/main/java/org/joou/UByte.java
index <HASH>..<HASH> 100644
--- a/jOOU/src/main/java/org/joou/UByte.java
+++ b/jOOU/src/main/java/org/joou/UByte.java
@@ -308,18 +308,18 @@ public final class UByte extends UNumber implements Comparable<UByte> {
}
public UByte add(UByte val) throws NumberFormatException {
- return valueOf(intValue() + val.intValue());
+ return valueOf(value + val.value);
}
public UByte add(int val) throws NumberFormatException {
- return valueOf(intValue() + val);
+ return valueOf(value + val);
}
public UByte subtract(final UByte val) {
- return valueOf(intValue() - val.intValue());
+ return valueOf(value - val.value);
}
public UByte subtract(final int val) {
- return valueOf(intValue() - val);
+ return valueOf(value - val);
}
}
|
smplified add and subtract implementation
|
diff --git a/src/blob.js b/src/blob.js
index <HASH>..<HASH> 100644
--- a/src/blob.js
+++ b/src/blob.js
@@ -1,7 +1,10 @@
// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
// (MIT licensed)
-import { Readable } from 'stream';
+import Stream from 'stream';
+
+// fix for "Readable" isn't a named export issue
+const Readable = Stream.Readable;
export const BUFFER = Symbol('buffer');
const TYPE = Symbol('type');
|
Fix Blob for older node versions and webpack. (#<I>)
`Readable` isn't a named export
|
diff --git a/src/menu/InjectItem.php b/src/menu/InjectItem.php
index <HASH>..<HASH> 100644
--- a/src/menu/InjectItem.php
+++ b/src/menu/InjectItem.php
@@ -443,10 +443,10 @@ class InjectItem extends BaseObject implements InjectItemInterface
'nav_id' => $this->getNavId(),
'lang' => $this->getLang(),
'link' => $this->getLink(),
- 'title' => $this->title,
- 'title_tag' => $this->title,
+ 'title' => Yii::$app->menu->encodeValue($this->title),
+ 'title_tag' => Yii::$app->menu->encodeValue($this->title),
'alias' => $this->getAlias(),
- 'description' => $this->description,
+ 'description' => Yii::$app->menu->encodeValue($this->description),
'keywords' => null,
'create_user_id' => $this->createUserId,
'update_user_id' => $this->updateUserId,
|
fix xss issue with page previews #<I>
|
diff --git a/cmd/data-usage-cache.go b/cmd/data-usage-cache.go
index <HASH>..<HASH> 100644
--- a/cmd/data-usage-cache.go
+++ b/cmd/data-usage-cache.go
@@ -549,7 +549,7 @@ func (d *dataUsageCache) deserialize(r io.Reader) error {
return io.ErrUnexpectedEOF
}
switch b[0] {
- case 1:
+ case 1, 2:
return errors.New("cache version deprecated (will autoupdate)")
case dataUsageCacheVer:
default:
|
fix: auto update crawler meta version
PR <I>bcd<I>c2a9a5f<I>ceb<I>e9fe<I>cdc9 introduced
version '3', we need to make sure that we do not
print an unexpected error instead log a message to
indicate we will auto update the version.
|
diff --git a/littlechef/runner.py b/littlechef/runner.py
index <HASH>..<HASH> 100644
--- a/littlechef/runner.py
+++ b/littlechef/runner.py
@@ -121,7 +121,6 @@ def nodes_with_tag(tag):
return node(*nodes)
-@hosts('setup')
def node(*nodes):
"""Selects and configures a list of nodes. 'all' configures all nodes"""
chef.build_node_data_bag()
|
Remove hosts decorator from main 'node' fabric task, it broke parallel execution. Fixes #<I>
|
diff --git a/load-image.js b/load-image.js
index <HASH>..<HASH> 100644
--- a/load-image.js
+++ b/load-image.js
@@ -24,7 +24,7 @@
oUrl;
img.onerror = callback;
img.onload = function () {
- if (oUrl) {
+ if (oUrl && !options.nounload) {
loadImage.revokeObjectURL(oUrl);
}
callback(loadImage.scale(img, options));
|
Added the option 'nounload'
If the image data was loaded into an object URL, this option prevents it from
being unloaded once the image is ready.
|
diff --git a/worker/uniter/uniter.go b/worker/uniter/uniter.go
index <HASH>..<HASH> 100644
--- a/worker/uniter/uniter.go
+++ b/worker/uniter/uniter.go
@@ -325,7 +325,10 @@ func (u *Uniter) loop(unitTag names.UnitTag) (err error) {
case resolver.ErrTerminate:
err = u.terminate()
case resolver.ErrRestart:
+ // make sure we update the two values used above in
+ // creating LocalState.
charmURL = localState.CharmURL
+ charmModifiedVersion = localState.CharmModifiedVersion
// leave err assigned, causing loop to break
default:
// We need to set conflicted from here, because error
|
save both values we use in creating local state when we get the restart error
|
diff --git a/lib/jabe.rb b/lib/jabe.rb
index <HASH>..<HASH> 100644
--- a/lib/jabe.rb
+++ b/lib/jabe.rb
@@ -12,3 +12,4 @@ module Jabe
end
end
end
+
|
fix initializer. wtf
|
diff --git a/etrago/cluster/disaggregation.py b/etrago/cluster/disaggregation.py
index <HASH>..<HASH> 100644
--- a/etrago/cluster/disaggregation.py
+++ b/etrago/cluster/disaggregation.py
@@ -336,8 +336,11 @@ class UniformDisaggregation(Disaggregation):
"Cluster {} has {} buses for group {}.\n"
.format(cluster, len(clb), group) +
"Should be exactly one.")
- # Remove "cluster_id carrier" buses
- pnb = pn_buses.select(lambda ix: " " not in ix)
+ # Remove cluster buses from partial network
+ cluster_bus_names = [r[0] for r in cl_buses.iterrows()]
+ pnb = pn_buses.iloc[
+ [r[0] for r in enumerate(pn_buses.iterrows())
+ if r[1][0] not in cluster_bus_names]]
pnb = pnb.query(query)
column = (" ".join([cluster] +
[axis['value'] for axis in group])
|
Stop using `select`
It's deprecated and I had to find a different way of doing it. The way
proposed in the pandas documentation didn't work and the way it's done
now has the benefit of generating a view into the original dataframe
instead of a copy.
|
diff --git a/peyotl/phylesystem/__init__.py b/peyotl/phylesystem/__init__.py
index <HASH>..<HASH> 100644
--- a/peyotl/phylesystem/__init__.py
+++ b/peyotl/phylesystem/__init__.py
@@ -537,6 +537,10 @@ class _Phylesystem(object):
def get_version_history_for_study_id(self, study_id):
ga = self.create_git_action(study_id)
studypath = ga.path_for_study(study_id)
+ from pprint import pprint
+ pprint('```````````````````````````````````')
+ pprint( ga.get_version_history_for_file(studypath) )
+ pprint('```````````````````````````````````')
return ga.get_version_history_for_file(studypath)
def push_study_to_remote(self, remote_name, study_id=None):
|
Diagnostic aid for multi-line commit messages.
|
diff --git a/drivers/macvlan/macvlan_network.go b/drivers/macvlan/macvlan_network.go
index <HASH>..<HASH> 100644
--- a/drivers/macvlan/macvlan_network.go
+++ b/drivers/macvlan/macvlan_network.go
@@ -186,10 +186,12 @@ func parseNetworkOptions(id string, option options.Generic) (*configuration, err
}
}
// setting the parent to "" will trigger an isolated network dummy parent link
- if _, ok := option[netlabel.Internal]; ok {
- config.Internal = true
- // empty --parent= and --internal are handled the same.
- config.Parent = ""
+ if val, ok := option[netlabel.Internal]; ok {
+ if internal, ok := val.(bool); ok && internal {
+ config.Internal = true
+ // empty --parent= and --internal are handled the same.
+ config.Parent = ""
+ }
}
return config, nil
|
Macvlan network handles netlabel.Internal wrong
check value of netlabel.Internal not just it's existence
|
diff --git a/mesh.js b/mesh.js
index <HASH>..<HASH> 100644
--- a/mesh.js
+++ b/mesh.js
@@ -293,7 +293,7 @@ fill_loop:
uv = vertexUVs[v]
} else if(vertexIntensity) {
uv = [
- (vertexIntensity[i] - intensityLo) /
+ (vertexIntensity[v] - intensityLo) /
(intensityHi - intensityLo), 0]
} else if(cellUVs) {
uv = cellUVs[i]
@@ -357,7 +357,7 @@ fill_loop:
uv = vertexUVs[v]
} else if(vertexIntensity) {
uv = [
- (vertexIntensity[i] - intensityLo) /
+ (vertexIntensity[v] - intensityLo) /
(intensityHi - intensityLo), 0]
} else if(cellUVs) {
uv = cellUVs[i]
@@ -414,7 +414,7 @@ fill_loop:
uv = vertexUVs[v]
} else if(vertexIntensity) {
uv = [
- (vertexIntensity[i] - intensityLo) /
+ (vertexIntensity[v] - intensityLo) /
(intensityHi - intensityLo), 0]
} else if(cellUVs) {
uv = cellUVs[i]
|
fixed bug with vertexIntensity
|
diff --git a/concentration/settings.py b/concentration/settings.py
index <HASH>..<HASH> 100644
--- a/concentration/settings.py
+++ b/concentration/settings.py
@@ -28,7 +28,9 @@ for config_file_path in ('/etc/concentration.distractors', os.path.expanduser('~
for config_file_path in ('/etc/concentration.safe', os.path.expanduser('~/.concentration.safe')):
if os.path.isfile(config_file_path):
with open(config_file_path) as config_file:
- DISTRACTORS.update(config_file.read().splitlines())
+ # Convert the whitelist into a set of domains and then remove that
+ # set from DISTRACTORS
+ DISTRACTORS -= set(config_file.read().splitlines())
DISTRACTORS.discard('')
|
Fixed a bug where the whitelist domains were being added to the list of DISTRACTORS instead of being removed
|
diff --git a/src/Illuminate/Console/Scheduling/Event.php b/src/Illuminate/Console/Scheduling/Event.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Console/Scheduling/Event.php
+++ b/src/Illuminate/Console/Scheduling/Event.php
@@ -4,7 +4,6 @@ namespace Illuminate\Console\Scheduling;
use Closure;
use Carbon\Carbon;
-use LogicException;
use Cron\CronExpression;
use GuzzleHttp\Client as HttpClient;
use Illuminate\Contracts\Mail\Mailer;
|
Apply fixes from StyleCI (#<I>)
|
diff --git a/config/conf.js b/config/conf.js
index <HASH>..<HASH> 100644
--- a/config/conf.js
+++ b/config/conf.js
@@ -17,7 +17,7 @@ exports.debug = false;
/**
* for pow
*/
-exports.POW_BOMB_EXPLODING_ROUND_INDEX = 50;
+exports.POW_BOMB_EXPLODING_ROUND_INDEX = 10000;
// catchup
exports.CATCHUP_MAX_CHAIN_BALLS = 1000;
|
Update conf.js
update difficulty bomb index
|
diff --git a/tools/lxdclient/client_raw.go b/tools/lxdclient/client_raw.go
index <HASH>..<HASH> 100644
--- a/tools/lxdclient/client_raw.go
+++ b/tools/lxdclient/client_raw.go
@@ -62,6 +62,7 @@ type rawImageMethods interface {
//PutImageProperties(name string, p shared.ImageProperties) error
// image data (create, upload, download, destroy)
+ CopyImage(image string, dest *lxd.Client, copy_aliases bool, aliases []string, public bool, autoUpdate bool, progresHandler func(string)) error
ImageFromContainer(cname string, public bool, aliases []string, properties map[string]string) (string, error)
DeleteImage(image string) error
}
|
lxd: re-add CopyImage to client_raw.go
|
diff --git a/src/basics.php b/src/basics.php
index <HASH>..<HASH> 100644
--- a/src/basics.php
+++ b/src/basics.php
@@ -15,9 +15,9 @@
use Cake\Core\Configure;
use Cake\Error\Debugger;
-/**
- * Basic defines for timing functions.
- */
+ /**
+ * Basic defines for timing functions.
+ */
define('SECOND', 1);
define('MINUTE', 60);
define('HOUR', 3600);
|
Fix docblock indentation in basics.php
|
diff --git a/pybozocrack.py b/pybozocrack.py
index <HASH>..<HASH> 100644
--- a/pybozocrack.py
+++ b/pybozocrack.py
@@ -77,7 +77,7 @@ class BozoCrack(object):
c.write(format_it(hash=h, plaintext=plaintext)+"\n")
-def main():
+def main(): # pragma: no cover
parser = OptionParser()
parser.add_option('-s', '--single', metavar='MD5HASH',
help='cracks a single hash', dest='single', default=False)
|
Updated coverage
Removed main from coverage
|
diff --git a/app/models/shipit/deploy.rb b/app/models/shipit/deploy.rb
index <HASH>..<HASH> 100644
--- a/app/models/shipit/deploy.rb
+++ b/app/models/shipit/deploy.rb
@@ -32,7 +32,8 @@ module Shipit
reload.each do |deployment|
Rails.logger.info(
"Creating #{github_status} deploy status for deployment #{deployment.id}. "\
- "Commit: #{deployment.sha}, Github id: #{deployment.github_id}",
+ "Commit: #{deployment.sha}, Github id: #{deployment.github_id}, "\
+ "Repo: #{deployment.stack.repo_name}, Environment: #{deployment.stack.environment}",
)
deployment.statuses.create!(status: github_status)
end
@@ -40,7 +41,8 @@ module Shipit
each do |deployment|
Rails.logger.warn(
"No GitHub status for task status #{task_status}. "\
- "Commit: #{deployment.sha}, Github id: #{deployment.github_id}",
+ "Commit: #{deployment.sha}, Github id: #{deployment.github_id}, "\
+ "Repo: #{deployment.stack.repo_name}, Environment: #{deployment.stack.environment}",
)
end
end
|
Added stack env. and repo name to logging.
|
diff --git a/java/client/test/org/openqa/selenium/AlertsTest.java b/java/client/test/org/openqa/selenium/AlertsTest.java
index <HASH>..<HASH> 100644
--- a/java/client/test/org/openqa/selenium/AlertsTest.java
+++ b/java/client/test/org/openqa/selenium/AlertsTest.java
@@ -523,7 +523,7 @@ public class AlertsTest extends JUnit4TestBase {
@Test
@NotYetImplemented(SAFARI)
- //@Ignore(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1487705")
+ @NotYetImplemented(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1487705")
public void shouldHandleAlertOnFormSubmit() {
driver.get(appServer.create(new Page().withTitle("Testing Alerts").withBody(
"<form id='theForm' action='javascript:alert(\"Tasty cheese\");'>",
|
[java] Ignoring a Firefox test back because the corresponding fix in the browser was reverted
|
diff --git a/search/collectors/collector_heap.go b/search/collectors/collector_heap.go
index <HASH>..<HASH> 100644
--- a/search/collectors/collector_heap.go
+++ b/search/collectors/collector_heap.go
@@ -110,6 +110,8 @@ func (hc *HeapCollector) Collect(ctx context.Context, searcher search.Searcher,
return nil
}
+var sortByScoreOpt = []string{"_score"}
+
func (hc *HeapCollector) collectSingle(ctx *search.SearchContext, reader index.IndexReader, d *search.DocumentMatch) error {
// increment total hits
hc.total++
@@ -146,7 +148,9 @@ func (hc *HeapCollector) collectSingle(ctx *search.SearchContext, reader index.I
}
// compute this hits sort value
- if len(hc.sort) > 1 || len(hc.sort) == 1 && !hc.cachedScoring[0] {
+ if len(hc.sort) == 1 && hc.cachedScoring[0] {
+ d.Sort = sortByScoreOpt
+ } else {
hc.sort.Value(d)
}
|
slight fixup to last change to set the sort value
i'd like the sort value to be correct even with the optimizations
not using it
|
diff --git a/src/shapes/draw.js b/src/shapes/draw.js
index <HASH>..<HASH> 100644
--- a/src/shapes/draw.js
+++ b/src/shapes/draw.js
@@ -459,8 +459,6 @@ d3plus.shape.draw = function(vars) {
if (!vars.frozen && (!d.d3plus || !d.d3plus.static)) {
- edge_update()
-
var depth_delta = vars.zoom_direction(),
previous = vars.id.solo.value,
title = d3plus.variable.value(vars,d,vars.text.key),
@@ -539,12 +537,6 @@ d3plus.shape.draw = function(vars) {
}
else {
- var tooltip_data = d.data ? d.data : d
-
- d3plus.tooltip.app({
- "vars": vars,
- "data": tooltip_data
- })
if (typeof vars.mouse == "function") {
vars.mouse(d)
@@ -552,6 +544,18 @@ d3plus.shape.draw = function(vars) {
else if (vars.mouse[d3plus.evt.click]) {
vars.mouse[d3plus.evt.click](d)
}
+ else {
+
+ edge_update()
+
+ var tooltip_data = d.data ? d.data : d
+
+ d3plus.tooltip.app({
+ "vars": vars,
+ "data": tooltip_data
+ })
+
+ }
}
|
app click behavior now overrides global fallback click behavior
|
diff --git a/framework/core/src/Assets/JsCompiler.php b/framework/core/src/Assets/JsCompiler.php
index <HASH>..<HASH> 100644
--- a/framework/core/src/Assets/JsCompiler.php
+++ b/framework/core/src/Assets/JsCompiler.php
@@ -4,6 +4,6 @@ class JsCompiler extends RevisionCompiler
{
public function format($string)
{
- return $string.';';
+ return $string.";\n";
}
}
|
Add newline in-between JS files, in case last line is a comment
|
diff --git a/src/pubsub.js b/src/pubsub.js
index <HASH>..<HASH> 100644
--- a/src/pubsub.js
+++ b/src/pubsub.js
@@ -448,7 +448,7 @@ module.exports = (common) => {
)
})
- it('send/receive 10k messages', function (done) {
+ it('send/receive 10k messages', (done) => {
this.timeout(2 * 60 * 1000)
const msgBase = 'msg - '
@@ -459,9 +459,12 @@ module.exports = (common) => {
let counter = 0
const sub1 = (msg) => {
- const expectedMsg = msgBase + receivedCount
- const receivedMsg = msg.data.toString()
- expect(receivedMsg).to.eql(expectedMsg)
+ // go-ipfs can't send messages in order when there are
+ // only two nodes in the same machine ¯\_(ツ)_/¯
+ // https://github.com/ipfs/js-ipfs-api/pull/493#issuecomment-289499943
+ // const expectedMsg = msgBase + receivedCount
+ // const receivedMsg = msg.data.toString()
+ // expect(receivedMsg).to.eql(expectedMsg)
receivedCount++
|
feat: make tests go-ipfs friendly
|
diff --git a/config.go b/config.go
index <HASH>..<HASH> 100644
--- a/config.go
+++ b/config.go
@@ -391,6 +391,7 @@ func loadConfig() (*config, error) {
Allocation: 0.6,
MinChannelSize: int64(minChanFundingSize),
MaxChannelSize: int64(MaxFundingAmount),
+ MinConfs: 1,
ConfTarget: autopilot.DefaultConfTarget,
Heuristic: map[string]float64{
"preferential": 1.0,
|
config: default autopilot min confs to 1
This prevents spending unconfirmed funds by default. Users will have to
explicitly set this to 0 in order to do so.
|
diff --git a/spec/jira/base_spec.rb b/spec/jira/base_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/jira/base_spec.rb
+++ b/spec/jira/base_spec.rb
@@ -358,7 +358,7 @@ describe JIRA::Base do
subject.attrs['foo'] = 'bar'
subject.attrs['dead'] = 'beef'
- subject.to_s.should match(/#<JIRA::Resource::Deadbeef:\d+ @attrs=#{attrs.inspect}>/)
+ subject.to_s.should match(/#<JIRA::Resource::Deadbeef:\d+ @attrs=#{Regexp.quote(attrs.inspect)}>/)
end
it "returns the key attribute" do
|
Fix unquoted '{' warning
|
diff --git a/lib/deps/md5.js b/lib/deps/md5.js
index <HASH>..<HASH> 100644
--- a/lib/deps/md5.js
+++ b/lib/deps/md5.js
@@ -95,9 +95,6 @@ module.exports = function (data, callback) {
function loadNextChunk() {
var start = currentChunk * chunkSize;
var end = start + chunkSize;
- if ((start + chunkSize) >= data.size) {
- end = data.size;
- }
currentChunk++;
if (currentChunk < chunks) {
append(buffer, data, start, end);
|
(#<I>) - remove useless md5 code
Two things:
* `size` isn't correct; it's `length` or `byteLength`
* both `slice` and `substring` are clamped anyway, so
this is useless
|
diff --git a/cloudformation/ci.template.js b/cloudformation/ci.template.js
index <HASH>..<HASH> 100644
--- a/cloudformation/ci.template.js
+++ b/cloudformation/ci.template.js
@@ -33,7 +33,7 @@ module.exports = {
{
Action: ['s3:DeleteObject', 's3:GetObject', 's3:GetObjectAcl', 's3:PutObject', 's3:PutObjectAcl'],
Effect: 'Allow',
- Resource: 'arn:aws:s3:::mapbox-node-binary/@mapbox/' + package_json.name + '/*'
+ Resource: 'arn:aws:s3:::mapbox-node-binary/' + package_json.name + '/*'
}
]
}
|
rm @mapbox [publish binary]
|
diff --git a/actionpack/lib/action_controller/metal/renderers.rb b/actionpack/lib/action_controller/metal/renderers.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_controller/metal/renderers.rb
+++ b/actionpack/lib/action_controller/metal/renderers.rb
@@ -71,8 +71,6 @@ module ActionController
# format.csv { render csv: @csvable, filename: @csvable.name }
# end
# end
- # To use renderers and their mime types in more concise ways, see
- # <tt>ActionController::MimeResponds::ClassMethods.respond_to</tt>
def self.add(key, &block)
define_method(_render_with_renderer_method_name(key), &block)
RENDERERS << key.to_sym
|
Remove obsolete comment about class-level respond_to
The class-level respond_to was extracted in ee<I> to responders gem
[ci skip]
|
diff --git a/eventsourcing/infrastructure/sequenceditemmapper.py b/eventsourcing/infrastructure/sequenceditemmapper.py
index <HASH>..<HASH> 100644
--- a/eventsourcing/infrastructure/sequenceditemmapper.py
+++ b/eventsourcing/infrastructure/sequenceditemmapper.py
@@ -126,7 +126,6 @@ class SequencedItemMapper(AbstractSequencedItemMapper[T_ev]):
def get_event_class_and_attrs(self, topic, state) -> Tuple[Type[T_ev], Dict]:
# Resolve topic to event class.
domain_event_class: Type[T_ev] = resolve_topic(topic)
- assert issubclass(domain_event_class, AbstractDomainEvent)
# Decrypt and decompress state.
if self.cipher:
|
Removed call to isinstance().
|
diff --git a/pymongo/connection.py b/pymongo/connection.py
index <HASH>..<HASH> 100644
--- a/pymongo/connection.py
+++ b/pymongo/connection.py
@@ -200,12 +200,12 @@ class Connection(object):
"%r claims master is %r, but that's not configured" %
((host, port), master))
_logger.debug("not master, master is (%r, %r)" % master)
- except socket.error:
+ except socket.error, e:
exctype, value = sys.exc_info()[:2]
_logger.debug("could not connect, got: %s %s" %
(exctype, value))
- if len( self.__nodes ) == 1:
- raise
+ if len(self.__nodes) == 1:
+ raise ConnectionFailure(e)
continue
finally:
if sock is not None:
|
still raise a ConnectionFailure, just more detailed
|
diff --git a/src/Illuminate/Routing/UrlGenerator.php b/src/Illuminate/Routing/UrlGenerator.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Routing/UrlGenerator.php
+++ b/src/Illuminate/Routing/UrlGenerator.php
@@ -241,11 +241,11 @@ class UrlGenerator implements UrlGeneratorContract {
* Get the URL for a given route instance.
*
* @param \Illuminate\Routing\Route $route
- * @param array $parameters
- * @param bool $absolute
+ * @param mixed $parameters
+ * @param bool $absolute
* @return string
*/
- protected function toRoute($route, array $parameters, $absolute)
+ protected function toRoute($route, $parameters, $absolute)
{
$parameters = $this->formatParameters($parameters);
|
Remove type hinting in toRoute
`toRoute()` used in `action()` and `route()` which can accept simple value __or__ array. Thus the
```php
link_to_route('resource.edit', 'Edit', 1);
```
will throw an exception `Argument 2 passed to Illuminate\Routing\UrlGenerator::toRoute() must be of the type array, integer given`.
|
diff --git a/foundations/parsers.py b/foundations/parsers.py
index <HASH>..<HASH> 100644
--- a/foundations/parsers.py
+++ b/foundations/parsers.py
@@ -879,6 +879,8 @@ class SectionsFileParser(foundations.io.File):
if not self.__sections:
return False
+ self.uncache()
+
LOGGER.debug("> Setting '{0}' file content.".format(self.path))
attributeTemplate = "{{0}} {0} {{1}}\n".format(splitter) if spacesAroundSplitter else \
"{{0}}{0}{{1}}\n".format(splitter)
|
Ensure cache is empty before writing in "foundations.parsers.SectionsFileParser.write" method.
|
diff --git a/lib/template.js b/lib/template.js
index <HASH>..<HASH> 100644
--- a/lib/template.js
+++ b/lib/template.js
@@ -228,7 +228,7 @@ module.exports = function(options) {
Value: cf.getAtt(prefixed('DeadLetterQueue'), 'QueueName')
}
],
- ComparisonOperator: 'GreaterThanThreshold'
+ ComparisonOperator: 'GreaterThanOrEqualToThreshold'
}
};
|
change deadletter comparison op to >= 1
|
diff --git a/cli/Valet/Brew.php b/cli/Valet/Brew.php
index <HASH>..<HASH> 100644
--- a/cli/Valet/Brew.php
+++ b/cli/Valet/Brew.php
@@ -46,6 +46,17 @@ class Brew
}
/**
+ * Determine if a compatible nginx version is Homebrewed.
+ *
+ * @return bool
+ */
+ function hasInstalledNginx()
+ {
+ return $this->installed('nginx')
+ || $this->installed('nginx-full');
+ }
+
+ /**
* Ensure that the given formula is installed.
*
* @param string $formula
diff --git a/cli/Valet/Nginx.php b/cli/Valet/Nginx.php
index <HASH>..<HASH> 100644
--- a/cli/Valet/Nginx.php
+++ b/cli/Valet/Nginx.php
@@ -37,7 +37,9 @@ class Nginx
*/
function install()
{
- $this->brew->ensureInstalled('nginx', ['--with-http2']);
+ if (!$this->brew->hasInstalledNginx()) {
+ $this->brew->installOrFail('nginx', ['--with-http2']);
+ }
$this->installConfiguration();
$this->installServer();
|
Fix for issue #<I> - brew package nginx-full not properly recognized as a valid nginx installation
|
diff --git a/src/main/java/ch/ralscha/extdirectspring/util/MethodInfo.java b/src/main/java/ch/ralscha/extdirectspring/util/MethodInfo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/ch/ralscha/extdirectspring/util/MethodInfo.java
+++ b/src/main/java/ch/ralscha/extdirectspring/util/MethodInfo.java
@@ -153,11 +153,13 @@ public final class MethodInfo {
case POLL:
this.pollingProvider = new PollingProvider(beanName, method.getName(), extDirectMethodAnnotation.event());
break;
+ default:
+ throw new IllegalStateException("ExtDirectMethodType: " + type + " does not exists");
}
}
- private boolean hasValue(RequestMapping requestMapping) {
+ private static boolean hasValue(RequestMapping requestMapping) {
return (requestMapping != null && requestMapping.value() != null && requestMapping.value().length > 0 && StringUtils
.hasText(requestMapping.value()[0]));
}
|
Add default case and make methods static where possible
|
diff --git a/src/admin/Module.php b/src/admin/Module.php
index <HASH>..<HASH> 100644
--- a/src/admin/Module.php
+++ b/src/admin/Module.php
@@ -191,7 +191,7 @@ final class Module extends \luya\admin\base\Module implements CoreModuleInterfac
public function getMenu()
{
return (new AdminMenuBuilder($this))
- ->nodeRoute('menu_node_cms', 'art_track', 'cmsadmin/default/index', 'luya\cms\models\NavItem')
+ ->nodeRoute('menu_node_cms', 'note_add', 'cmsadmin/default/index', 'luya\cms\models\NavItem')
->node('menu_node_cmssettings', 'settings')
->group('menu_group_env')
->itemRoute('menu_group_item_env_permission', "cmsadmin/permission/index", 'gavel')
|
Ng wig (#<I>)
* reenable wysiwig styles; change pages icon in mainnav
* try to get icons working
|
diff --git a/examples/expression/boolean.py b/examples/expression/boolean.py
index <HASH>..<HASH> 100644
--- a/examples/expression/boolean.py
+++ b/examples/expression/boolean.py
@@ -85,14 +85,14 @@ class Operand(ExpressionElement):
def main(debug=False):
- calc_mm = metamodel_from_str(grammar,
+ bool_mm = metamodel_from_str(grammar,
classes=[Bool, Or, And, Not, Operand],
ignore_case=True,
debug=debug)
this_folder = dirname(__file__)
if debug:
- metamodel_export(calc_mm, join(this_folder, 'bool_metamodel.dot'))
+ metamodel_export(bool_mm, join(this_folder, 'bool_metamodel.dot'))
input_expr = '''
a = true;
@@ -100,7 +100,7 @@ def main(debug=False):
a and false or not b
'''
- model = calc_mm.model_from_str(input_expr)
+ model = bool_mm.model_from_str(input_expr)
if debug:
model_export(model, join(this_folder, 'bool_model.dot'))
|
Small fix in boolean example.
|
diff --git a/packages/swagger2openapi/common.js b/packages/swagger2openapi/common.js
index <HASH>..<HASH> 100644
--- a/packages/swagger2openapi/common.js
+++ b/packages/swagger2openapi/common.js
@@ -36,10 +36,10 @@ function recurse(object, state, callback) {
state.parent = {};
state.payload = {};
}
+ var oPath = state.path;
for (var key in object) {
var escKey = '/' + jptr.jpescape(key);
state.key = key;
- var oPath = state.path;
state.path = (state.path ? state.path : '#') + escKey;
callback(object, key, state);
if (typeof object[key] === 'object') {
|
recurse; tiny perf fix from reftools
|
diff --git a/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java b/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java
index <HASH>..<HASH> 100755
--- a/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java
+++ b/src/com/mebigfatguy/fbcontrib/detect/DeletingWhileIterating.java
@@ -20,6 +20,7 @@ package com.mebigfatguy.fbcontrib.detect;
import java.util.ArrayList;
import java.util.BitSet;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -43,7 +44,6 @@ import com.mebigfatguy.fbcontrib.utils.TernaryPatcher;
import com.mebigfatguy.fbcontrib.utils.ToString;
import com.mebigfatguy.fbcontrib.utils.Values;
-import edu.emory.mathcs.backport.java.util.Collections;
import edu.umd.cs.findbugs.BugInstance;
import edu.umd.cs.findbugs.BugReporter;
import edu.umd.cs.findbugs.BytecodeScanningDetector;
|
backport bug again, you'd think i'd learn
|
diff --git a/mappings/document.js b/mappings/document.js
index <HASH>..<HASH> 100644
--- a/mappings/document.js
+++ b/mappings/document.js
@@ -22,7 +22,7 @@ var schema = {
search_analyzer: 'keyword'
},
number: {
- type: 'integer',
+ type: 'string',
index_analyzer: 'peliasHousenumber',
search_analyzer: 'peliasHousenumber',
},
|
changed peliasHousenumber to string, see PR notes on #<I>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.