diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/openquake/calculators/hazard/disagg/core.py b/openquake/calculators/hazard/disagg/core.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/hazard/disagg/core.py
+++ b/openquake/calculators/hazard/disagg/core.py
@@ -92,7 +92,7 @@ def compute_disagg(job_id, sites, lt_rlz_id):
for more info).
:param int job_id:
- pass
+ ID of the currently running :class:`openquake.db.models.OqJob`
:param list sites:
`list` of :class:`nhlib.site.Site` objects, which indicate the
locations (and associated soil parameters) for which we need to compute
|
calcs/hazard/disagg/core:
Fixed a stupid comment.
|
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -233,6 +233,15 @@ module ActiveRecord #:nodoc:
# the companies table with type = "Firm". You can then fetch this row again using
# <tt>Company.where(name: '37signals').first</tt> and it will return a Firm object.
#
+ # Be aware that because the type column is an attribute on the record every new
+ # subclass will instantly be marked as dirty and the type column will be included
+ # in the list of changed attributes on the record. This is different from non
+ # STI classes:
+ #
+ # Company.new.changed? # => false
+ # Firm.new.changed? # => true
+ # Firm.new.changes # => {"type"=>["","Firm"]}
+ #
# If you don't have a type column defined in your table, single-table inheritance won't
# be triggered. In that case, it'll work just like normal subclasses with no special magic
# for differentiating between them or reloading the right type with find.
|
Update documentation on STI change handling
Documenting a potential source of confusion about how STI classes handle changes.
|
diff --git a/ghost/admin/mobile-interactions.js b/ghost/admin/mobile-interactions.js
index <HASH>..<HASH> 100644
--- a/ghost/admin/mobile-interactions.js
+++ b/ghost/admin/mobile-interactions.js
@@ -1,6 +1,6 @@
// # Ghost Mobile Interactions
-/*global window, document, $ */
+/*global window, document, $, FastClick */
(function () {
"use strict";
|
Added FastClick to assumed globals for tests
|
diff --git a/accounts/models.py b/accounts/models.py
index <HASH>..<HASH> 100644
--- a/accounts/models.py
+++ b/accounts/models.py
@@ -6,7 +6,18 @@ from django.utils.translation import ugettext_lazy as _
from accounts.managers import AccountManager
-class Account(models.Model):
+class AccountsBase(models.Model):
+ """
+ Just a little helper
+ """
+ created = models.DateTimeField(auto_now_add=True)
+ modified = models.DateTimeField(auto_now=True)
+
+ class Meta:
+ abstract = True
+
+
+class Account(AccountsBase):
"""
This is the umbrella object under which all account users fall.
@@ -42,7 +53,7 @@ class Account(models.Model):
return True if self.objects.users.filter(user=user) else False
-class AccountUser(models.Model):
+class AccountUser(AccountsBase):
"""
This relates a User object to the account group. It is possible for a User
to be a member of multiple accounts, so this class relates the AccountUser
@@ -87,8 +98,7 @@ class AccountUser(models.Model):
return u"%s %s" % (self.user.first_name, self.user.last_name)
-
-class AccountOwner(models.Model):
+class AccountOwner(AccountsBase):
"""
Each account must have one and only one account owner.
"""
@@ -111,4 +121,3 @@ class AccountOwner(models.Model):
raise AccountMismatch
else:
super(AccountOwner, self).save(*args, **kwargs)
-
|
Use a baseform with created/modified tracking
|
diff --git a/src/Deployer/Recipe/Magento2Recipe.php b/src/Deployer/Recipe/Magento2Recipe.php
index <HASH>..<HASH> 100644
--- a/src/Deployer/Recipe/Magento2Recipe.php
+++ b/src/Deployer/Recipe/Magento2Recipe.php
@@ -21,6 +21,10 @@ class Magento2Recipe
{
public static function configuration()
{
+ $appDir = '';
+
+ \Deployer\set('app_dir', $appDir);
+
$sharedFiles = [
'app/etc/env.php',
];
|
[TASK] set app_dir to empty in Magento2Recipe
|
diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php
index <HASH>..<HASH> 100644
--- a/src/Utils/Formatter.php
+++ b/src/Utils/Formatter.php
@@ -340,6 +340,10 @@ class Formatter
$curr = $list->tokens[$list->idx];
if ($curr->type === Token::TYPE_WHITESPACE) {
+ // Keep linebreaks after comments
+ if (strpos($curr->token, "\n") !== false && $prev !== null && $prev->type === Token::TYPE_COMMENT) {
+ $lineEnded = true;
+ }
// Whitespaces are skipped because the formatter adds its own.
continue;
}
|
Keep linebreaks after comments
Concatenating line terminated comments will change the query.
|
diff --git a/cmd/tendermint/commands/root.go b/cmd/tendermint/commands/root.go
index <HASH>..<HASH> 100644
--- a/cmd/tendermint/commands/root.go
+++ b/cmd/tendermint/commands/root.go
@@ -38,6 +38,9 @@ var RootCmd = &cobra.Command{
Use: "tendermint",
Short: "Tendermint Core (BFT Consensus) in Go",
PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
+ if cmd.Name() == versionCmd.Name() {
+ return nil
+ }
config, err = ParseConfig()
if err != nil {
return err
|
cmd: don't load config for version command. closes #<I>
|
diff --git a/app/controllers/mr_video/mr_video_controller.rb b/app/controllers/mr_video/mr_video_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/mr_video/mr_video_controller.rb
+++ b/app/controllers/mr_video/mr_video_controller.rb
@@ -1,6 +1,6 @@
module MrVideo
- class MrVideoController < ApplicationController
+ class MrVideoController < ActionController::Base
layout 'mr_video'
|
Changed ApplicationController to ActionController::Base
|
diff --git a/cli.js b/cli.js
index <HASH>..<HASH> 100755
--- a/cli.js
+++ b/cli.js
@@ -52,10 +52,16 @@ function runFastify (opts) {
return module.exports.stop(e)
}
- if (file.length !== 3) {
+ console.log(file.constructor.name)
+
+ if (file.length !== 3 && file.constructor.name === 'Function') {
return module.exports.stop(new Error('Plugin function should contain 3 arguments. Refer to ' +
'documentation for more information.'))
}
+ if (file.length !== 2 && file.constructor.name === 'AsyncFunction') {
+ return module.exports.stop(new Error('Async/Await plugin function should contain 2 arguments.' +
+ 'Refer to documentation for more information.'))
+ }
const options = {
logger: {
|
Rewrote the arity check upon the plugin signature to support async/await plugins
|
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index <HASH>..<HASH> 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -55,7 +55,6 @@ class PackageManager(object):
"""
query_command = None
- timeout = 30
chroot = None
def __init__(self, query_command=None, chroot=None):
@@ -99,7 +98,7 @@ class PackageManager(object):
if self.query_command:
cmd = self.query_command
pkg_list = shell_out(
- cmd, timeout=self.timeout, chroot=self.chroot
+ cmd, timeout=0, chroot=self.chroot
).splitlines()
for pkg in pkg_list:
|
[policies] get package list without a timeout
Package list shall never timeout, otherwise pkgs gets empty, causing
KeyError later on.
Resolves: #<I>
|
diff --git a/lib/client.js b/lib/client.js
index <HASH>..<HASH> 100644
--- a/lib/client.js
+++ b/lib/client.js
@@ -36,7 +36,7 @@ var Client = function (options) {
this.exceptionsAreCritical = 'exceptionsAreCritical' in options ? !!options.exceptionsAreCritical : true;
this.dsn = {
protocol: 'https', // Opbeat currently only supports HTTPS. Future options might include HTTP and UDP
- host: 'opbeat.com',
+ host: options.server || 'opbeat.com',
path: '/api/v1/organizations/' + this.organization_id + '/apps/' + this.app_id + '/errors/'
};
|
Allow override of remote Opbeat host.
Useful for testing against other environments (e.g. staging etc)
|
diff --git a/guava/src/com/google/common/net/MediaType.java b/guava/src/com/google/common/net/MediaType.java
index <HASH>..<HASH> 100644
--- a/guava/src/com/google/common/net/MediaType.java
+++ b/guava/src/com/google/common/net/MediaType.java
@@ -182,6 +182,7 @@ public final class MediaType {
public static final MediaType BZIP2 = createConstant(APPLICATION_TYPE, "x-bzip2");
public static final MediaType FORM_DATA = createConstant(APPLICATION_TYPE,
"x-www-form-urlencoded");
+ public static final MediaType APPLICATION_BINARY = createConstant(APPLICATION_TYPE, "binary");
public static final MediaType GZIP = createConstant(APPLICATION_TYPE, "x-gzip");
/**
* <a href="http://www.rfc-editor.org/rfc/rfc4329.txt">RFC 4329</a> declares this to be the
@@ -278,6 +279,7 @@ public final class MediaType {
.put(ATOM_UTF_8, ATOM_UTF_8)
.put(BZIP2, BZIP2)
.put(FORM_DATA, FORM_DATA)
+ .put(APPLICATION_BINARY, APPLICATION_BINARY)
.put(GZIP, GZIP)
.put(JAVASCRIPT_UTF_8, JAVASCRIPT_UTF_8)
.put(JSON_UTF_8, JSON_UTF_8)
|
Add "application/binary" media type.
-------------
Created by MOE: <URL>
|
diff --git a/resize2.js b/resize2.js
index <HASH>..<HASH> 100644
--- a/resize2.js
+++ b/resize2.js
@@ -37,8 +37,8 @@ module.exports = {
for (let j = 0; j < wDst; j++) {
var posDst = (i * wDst + j) * 4;
- var iSrc = Math.round(i * hSrc / hDst);
- var jSrc = Math.round(j * wSrc / wDst);
+ var iSrc = Math.floor(i * hSrc / hDst);
+ var jSrc = Math.floor(j * wSrc / wDst);
var posSrc = (iSrc * wSrc + jSrc) * 4;
bufDst[posDst++] = bufSrc[posSrc++];
|
Fix a small rounding error in Nearest Neighbor algorithm
|
diff --git a/app/js/directives/form.js b/app/js/directives/form.js
index <HASH>..<HASH> 100644
--- a/app/js/directives/form.js
+++ b/app/js/directives/form.js
@@ -174,7 +174,7 @@ formsAngular
if (angular.isArray(fieldInfo.options)) {
angular.forEach(fieldInfo.options, function (optValue) {
if(_.isObject(optValue)){
- value += '<option value="'+optValue.val+'">' + optValue.lable + '</option>';
+ value += '<option value="'+optValue.val || optValue.id+'">' + optValue.lable || optValue.text + '</option>';
}else{
value += '<option>' + optValue + '</option>';
}
|
select supports object with val and lable
|
diff --git a/src/DataTables/AbstractDataTable.php b/src/DataTables/AbstractDataTable.php
index <HASH>..<HASH> 100644
--- a/src/DataTables/AbstractDataTable.php
+++ b/src/DataTables/AbstractDataTable.php
@@ -67,8 +67,8 @@ abstract class AbstractDataTable extends DataTable
*/
public function __construct()
{
- $this->options = array_merge(config('cortex.foundation.datatables.options'), (array) $this->options);
- $this->buttons = array_merge(config('cortex.foundation.datatables.buttons'), (array) $this->buttons);
+ $this->options = array_merge(config('cortex.foundation.datatables.options'), (array) $this->options);
+ $this->buttons = array_merge(config('cortex.foundation.datatables.buttons'), (array) $this->buttons);
}
/**
|
Apply fixes from StyleCI (#<I>)
|
diff --git a/app/assets/javascripts/streamrules.js b/app/assets/javascripts/streamrules.js
index <HASH>..<HASH> 100644
--- a/app/assets/javascripts/streamrules.js
+++ b/app/assets/javascripts/streamrules.js
@@ -13,11 +13,9 @@ $(document).ready(function() {
if ($(this).attr("id") == "sr-type") {
if (parseInt(value) == 5) {
$("#sr-value", modalBody).hide();
- $("#sr-value", modalBody).val("placeholder");
$("#sr-label-value", modalBody).hide();
$("#sr-result-value", modalBody).hide();
} else {
- $("#sr-value", modalBody).val("");
$("#sr-value", modalBody).show();
$("#sr-label-value", modalBody).show();
$("#sr-result-value", modalBody).show();
|
Fixing special handling of presence type in the model instead of darn JS
Fixes #<I>
Conflicts:
app/models/StreamRule.java
|
diff --git a/library/src/main/java/com/doctoror/particlesdrawable/renderer/GlSceneRenderer.java b/library/src/main/java/com/doctoror/particlesdrawable/renderer/GlSceneRenderer.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/doctoror/particlesdrawable/renderer/GlSceneRenderer.java
+++ b/library/src/main/java/com/doctoror/particlesdrawable/renderer/GlSceneRenderer.java
@@ -204,7 +204,6 @@ public final class GlSceneRenderer implements SceneRenderer {
@Override
public void drawScene(
@NonNull final ParticlesScene scene) {
- gl.glPointSize(scene.getMaxDotRadius() * 2f);
gl.glLineWidth(scene.getLineThickness());
initBuffers(scene.getParticlesCount());
|
Do not set glPointSize
|
diff --git a/phy/cluster/manual/gui_component.py b/phy/cluster/manual/gui_component.py
index <HASH>..<HASH> 100644
--- a/phy/cluster/manual/gui_component.py
+++ b/phy/cluster/manual/gui_component.py
@@ -398,7 +398,6 @@ class ManualClustering(object):
# Add the cluster views.
gui.add_view(self.cluster_view, name='ClusterView')
- gui.add_view(self.similarity_view, name='SimilarityView')
# Add the quality column in the cluster view.
cs = gui.request('cluster_store')
@@ -411,6 +410,7 @@ class ManualClustering(object):
self.set_default_sort(quality)
if similarity:
self.set_similarity_func(cs.get(similarity))
+ gui.add_view(self.similarity_view, name='SimilarityView')
# Update the cluster views and selection when a cluster event occurs.
self.gui.connect_(self.on_cluster)
|
Remove similarity view if there is no similarity function
|
diff --git a/lib/deterministic/result.rb b/lib/deterministic/result.rb
index <HASH>..<HASH> 100644
--- a/lib/deterministic/result.rb
+++ b/lib/deterministic/result.rb
@@ -90,8 +90,8 @@ module Deterministic
def +(other)
raise Deterministic::Monad::NotMonadError, "Expected #{other.inspect} to be an Result" unless other.is_a? Result
match {
- success -> (_) { other.success? } { |s| Result::Success.new(s + other.value)}
- failure -> (_) { other.failure? } { |f| Result::Failure.new(f + other.value)}
+ success ->(_) { other.success? } { |s| Result::Success.new(s + other.value)}
+ failure ->(_) { other.failure? } { |f| Result::Failure.new(f + other.value)}
success { other } # implied other.failure?
failure { self } # implied other.success?
}
|
Remove space in lambda expression revert support for ruby <I>
|
diff --git a/johnny/cache.py b/johnny/cache.py
index <HASH>..<HASH> 100644
--- a/johnny/cache.py
+++ b/johnny/cache.py
@@ -19,6 +19,14 @@ import localstore
import signals
from transaction import TransactionManager
+try:
+ any
+except NameError:
+ def any(iterable):
+ for i in iterable:
+ if i: return True
+ return False
+
local = localstore.LocalStore()
blacklist = getattr(settings, 'MAN_IN_BLACKLIST',
getattr(settings, 'JOHNNY_TABLE_BLACKLIST', []))
diff --git a/johnny/tests/cache.py b/johnny/tests/cache.py
index <HASH>..<HASH> 100644
--- a/johnny/tests/cache.py
+++ b/johnny/tests/cache.py
@@ -8,6 +8,14 @@ from django.db import connection
from johnny import middleware
import base
+try:
+ any
+except NameError:
+ def any(iterable):
+ for i in iterable:
+ if i: return True
+ return False
+
# put tests in here to be included in the testing suite
__all__ = ['MultiDbTest', 'SingleModelTest', 'MultiModelTest', 'TransactionSupportTest', 'BlackListTest']
|
#<I> fix python<I> compatibility by providing an implementation of <I> builtin 'any'
|
diff --git a/txn.go b/txn.go
index <HASH>..<HASH> 100644
--- a/txn.go
+++ b/txn.go
@@ -70,11 +70,12 @@ func (txn *Txn) writableIndex(table, index string) *iradix.Txn {
raw, _ := txn.rootTxn.Get(path)
indexTxn := raw.(*iradix.Tree).Txn()
- // If we are the primary DB, enable mutation notification
+ // If we are the primary DB, enable mutation tracking.
// Snapshots should not notify, otherwise we will trigger watches
// on the primary DB when the writes will not be visible.
if txn.db.primary {
- indexTxn.NotifyMutate(true)
+ indexTxn.TrackMutate(true)
+ txn.Defer(indexTxn.Notify)
}
// Keep this open for the duration of the txn
|
Defer notification of mutate until after transaction is complete
|
diff --git a/pkg/network/node/networkpolicy.go b/pkg/network/node/networkpolicy.go
index <HASH>..<HASH> 100644
--- a/pkg/network/node/networkpolicy.go
+++ b/pkg/network/node/networkpolicy.go
@@ -186,7 +186,15 @@ func (np *networkPolicyPlugin) DeleteNetNamespace(netns *networkapi.NetNamespace
np.lock.Lock()
defer np.lock.Unlock()
- delete(np.namespaces, netns.NetID)
+ if npns, exists := np.namespaces[netns.NetID]; exists {
+ if npns.inUse {
+ npns.inUse = false
+ // We call syncNamespaceFlows() not syncNamespace() because it
+ // needs to happen before we forget about the namespace.
+ np.syncNamespaceFlows(npns)
+ }
+ delete(np.namespaces, netns.NetID)
+ }
}
func (np *networkPolicyPlugin) GetVNID(namespace string) (uint32, error) {
|
Clean up NetworkPolicies on NetNamespace deletion
|
diff --git a/lib/model/generic_folder.rb b/lib/model/generic_folder.rb
index <HASH>..<HASH> 100644
--- a/lib/model/generic_folder.rb
+++ b/lib/model/generic_folder.rb
@@ -70,7 +70,7 @@ module Viewpoint
resp = (Viewpoint::EWS::EWS.instance).ews.find_folder( [normalize_id(root)], traversal, {:base_shape => shape} )
else
restr = {:restriction =>
- {:is_equal_to => {:field_uRI => {:field_uRI=>'folder:FolderClass'},:field_uRI_or_constant=>{:constant => {:value => folder_type}}}}
+ {:is_equal_to => [{:field_uRI => {:field_uRI=>'folder:FolderClass'}}, {:field_uRI_or_constant=>{:constant => {:value => folder_type}}}]}
}
resp = (Viewpoint::EWS::EWS.instance).ews.find_folder( [normalize_id(root)], traversal, {:base_shape => shape}, restr)
end
|
issue <I>. GenericFolder.find_folders fix for Ruby <I>.x Hash ordering.
|
diff --git a/classes/PHPTAL/Dom/PHP5DOMDocumentBuilder.php b/classes/PHPTAL/Dom/PHP5DOMDocumentBuilder.php
index <HASH>..<HASH> 100644
--- a/classes/PHPTAL/Dom/PHP5DOMDocumentBuilder.php
+++ b/classes/PHPTAL/Dom/PHP5DOMDocumentBuilder.php
@@ -224,7 +224,8 @@ class PHPTAL_Dom_PHP5DOMDocumentBuilder extends PHPTAL_Dom_DocumentBuilder
private function getQName(DOMElement $element)
{
- if ($element->prefix !== '') return $element->prefix.':'.$element->localName;
+ // PHP bug: DOMElement's namespace unexpectedly changed to 'default' from '' after appending to some namespaced parent. (5.3 only?)
+ if ($element->prefix !== '' && $element->prefix !== 'default') { return $element->prefix.':'.$element->localName; }
return $element->localName;
}
|
Avoiding PHP-DomElement's problem:
DOMElement's namespace unexpectedly changed to 'default' from '' after appending to some namespaced parent. (<I> only?)
|
diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py
index <HASH>..<HASH> 100644
--- a/parsedmarc/__init__.py
+++ b/parsedmarc/__init__.py
@@ -792,8 +792,12 @@ def parse_forensic_report(feedback_report, sample, sample_headers_only,
else:
parsed_sample["reply_to"] = []
- parsed_sample["to"] = list(map(lambda x: convert_address(x),
- parsed_sample["to"]))
+ if "to" in parsed_sample:
+ parsed_sample["to"] = list(map(lambda x: convert_address(x),
+ parsed_sample["to"]))
+ else:
+ parsed_sample["to"] = []
+
if "cc" in parsed_sample:
parsed_sample["cc"] = list(map(lambda x: convert_address(x),
parsed_sample["cc"]))
|
<I> - Allow forensic to header to be missing
|
diff --git a/java/client/src/org/openqa/selenium/Beta.java b/java/client/src/org/openqa/selenium/Beta.java
index <HASH>..<HASH> 100644
--- a/java/client/src/org/openqa/selenium/Beta.java
+++ b/java/client/src/org/openqa/selenium/Beta.java
@@ -33,7 +33,7 @@ import java.lang.annotation.Target;
* IDE. We don't live in the ideal world. We'll find out the hard way whether
* reading docs is the same thing.
*/
-@Retention(RetentionPolicy.CLASS)
+@Retention(RetentionPolicy.RUNTIME)
@Target({
ElementType.ANNOTATION_TYPE,
ElementType.CONSTRUCTOR,
|
AjayKemparaj: Changing the RetentionPolicy so the build is not brohen, dawagner please take alook at this
r<I>
|
diff --git a/cloudmesh/common/variables.py b/cloudmesh/common/variables.py
index <HASH>..<HASH> 100644
--- a/cloudmesh/common/variables.py
+++ b/cloudmesh/common/variables.py
@@ -21,7 +21,8 @@ class Variables(object):
self.data[str(key)] = value
def __delitem__(self, key):
- del self.data[str(key)]
+ if key in self.data:
+ del self.data[str(key)]
def __contains__(self, item):
return str(item) in self.data
|
ignor delete variable if it is not defined
|
diff --git a/flask_peewee/tests/admin.py b/flask_peewee/tests/admin.py
index <HASH>..<HASH> 100644
--- a/flask_peewee/tests/admin.py
+++ b/flask_peewee/tests/admin.py
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
import datetime
from flask import request, session, url_for
diff --git a/flask_peewee/tests/auth.py b/flask_peewee/tests/auth.py
index <HASH>..<HASH> 100644
--- a/flask_peewee/tests/auth.py
+++ b/flask_peewee/tests/auth.py
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
import datetime
from flask import request, session, url_for, get_flashed_messages
diff --git a/flask_peewee/tests/rest.py b/flask_peewee/tests/rest.py
index <HASH>..<HASH> 100644
--- a/flask_peewee/tests/rest.py
+++ b/flask_peewee/tests/rest.py
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
try:
import simplejson as json
except ImportError:
|
Python <I> fixes for the test suite, which uses with statements
|
diff --git a/lib/active_fulfillment.rb b/lib/active_fulfillment.rb
index <HASH>..<HASH> 100644
--- a/lib/active_fulfillment.rb
+++ b/lib/active_fulfillment.rb
@@ -36,7 +36,6 @@ end
require 'builder'
require 'cgi'
require 'net/https'
-require 'rexml/document'
require 'nokogiri'
require 'active_utils'
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
@@ -5,6 +5,7 @@ require 'active_fulfillment'
require 'minitest/autorun'
require 'mocha/setup'
require 'timecop'
+require 'rexml/document'
require 'logger'
ActiveFulfillment::Service.logger = Logger.new(nil)
|
Remove REXML Require from Runtime
|
diff --git a/src/EoC/Adapter/CurlAdapter.php b/src/EoC/Adapter/CurlAdapter.php
index <HASH>..<HASH> 100644
--- a/src/EoC/Adapter/CurlAdapter.php
+++ b/src/EoC/Adapter/CurlAdapter.php
@@ -59,6 +59,7 @@ class CurlAdapter extends AbstractAdapter {
/**
* @copydoc AbstractAdapter::send()
+ * @bug https://github.com/dedalozzo/eoc-client/issues/2
*/
public function send(Request $request, Hook\IChunkHook $chunkHook = NULL) {
$opts = [];
|
added the bug reference in the CurlAdapter
|
diff --git a/packages/babel-node/src/babel-node.js b/packages/babel-node/src/babel-node.js
index <HASH>..<HASH> 100755
--- a/packages/babel-node/src/babel-node.js
+++ b/packages/babel-node/src/babel-node.js
@@ -95,5 +95,9 @@ getV8Flags(function(err, v8Flags) {
}
});
});
+ process.on("SIGINT", () => {
+ proc.kill("SIGINT");
+ process.exit(1);
+ });
}
});
|
Restore passing SIGINT signals to spawned child processes (#<I>)
|
diff --git a/src/Http/RestClient.php b/src/Http/RestClient.php
index <HASH>..<HASH> 100644
--- a/src/Http/RestClient.php
+++ b/src/Http/RestClient.php
@@ -158,7 +158,7 @@ class RestClient
private function encodeEntity(Extractable $entity): string
{
- return json_encode($entity->extract());
+ return json_encode($entity->extract(), JSON_THROW_ON_ERROR);
}
/**
|
Issues encoding json now throw exceptions
|
diff --git a/src/Panels/DatabasePanel.php b/src/Panels/DatabasePanel.php
index <HASH>..<HASH> 100644
--- a/src/Panels/DatabasePanel.php
+++ b/src/Panels/DatabasePanel.php
@@ -174,7 +174,7 @@ class DatabasePanel extends AbstractPanel
*/
public static function explain(PDO $pdo, $sql, $bindings = [])
{
- if (preg_match('#\s*\(?\s*SELECT\s#iA', $sql) == true) {
+ if (preg_match('#\s*\(?\s*SELECT\s#iA', $sql)) {
$statement = $pdo->prepare('EXPLAIN '.$sql);
$statement->execute($bindings);
|
preg_match_all will return int
|
diff --git a/webhook.go b/webhook.go
index <HASH>..<HASH> 100644
--- a/webhook.go
+++ b/webhook.go
@@ -295,7 +295,7 @@ func hookHandler(w http.ResponseWriter, r *http.Request) {
} else {
// Check if a success return code is configured for the hook
if matchedHook.SuccessHttpResponseCode != 0 {
- writeHttpResponseCode(w, rid, matchedHook.ID, matchedHook.HttpResponseCode)
+ writeHttpResponseCode(w, rid, matchedHook.ID, matchedHook.SuccessHttpResponseCode)
}
fmt.Fprintf(w, response)
}
|
Forgot a rename in previous refactoring.
|
diff --git a/test/runner_test.rb b/test/runner_test.rb
index <HASH>..<HASH> 100644
--- a/test/runner_test.rb
+++ b/test/runner_test.rb
@@ -70,11 +70,15 @@ STR
end
end
- it "call command with options correctly" do
+ it "handles command with default arguments correctly" do
+ my_command('medium').chomp.should == '[nil, {}]'
+ end
+
+ it "calls command with options correctly" do
my_command('medium 1 --spicy').chomp.should == '["1", {:spicy=>true}]'
end
- it "call optionless command correctly" do
+ it "calls optionless command correctly" do
my_command('small 1 2').chomp.should == '["1", "2"]'
end
|
test explicitly for command's file_parsed_args
|
diff --git a/examples/server2.py b/examples/server2.py
index <HASH>..<HASH> 100644
--- a/examples/server2.py
+++ b/examples/server2.py
@@ -534,7 +534,7 @@ def main(host, port, data_path):
else:
server_url = 'http://%s:%s/openidserver' % (host, port)
store = FileOpenIDStore(data_path)
- oidserver = server.Server2(store)
+ oidserver = server.OpenIDServer2(store)
addr = (host, port)
httpserver = OpenIDHTTPServer(oidserver, addr, ServerHandler)
|
[project @ examples/server2: fix Server2 class name]
|
diff --git a/tests/test_bugs.py b/tests/test_bugs.py
index <HASH>..<HASH> 100644
--- a/tests/test_bugs.py
+++ b/tests/test_bugs.py
@@ -76,11 +76,11 @@ def test_we_cant_set_status_unless_there_is_a_bug_id():
def test_we_can_get_OS_set_from_default():
bug = Bug()
- assert bug.OS == "All"
+ assert bug.op_sys == "All"
def test_we_can_get_OS_we_set():
bug = Bug(op_sys="Linux")
- assert bug.OS == "Linux"
+ assert bug.op_sys == "Linux"
def test_we_can_get_Product_set_from_default():
bug = Bug()
|
Use op_sys field instead of dropped OS getter
|
diff --git a/structr-ui/src/main/resources/structr/js/pages.js b/structr-ui/src/main/resources/structr/js/pages.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/pages.js
+++ b/structr-ui/src/main/resources/structr/js/pages.js
@@ -372,7 +372,7 @@ var _Pages = {
e.stopPropagation();
var self = $(this);
var link = $.trim(self.parent().children('b.name_').attr('title'));
- var url = viewRootUrl + link + (LSWrapper.getItem(detailsObjectId + entity.id) ? '/' + LSWrapper.getItem(detailsObjectId + entity.id) : '');
+ var url = (entity.site && entity.site.hostname ? '//' + entity.site.hostname + (entity.site.port ? ':' + entity.site.port : '') + '/' : viewRootUrl) + link + (LSWrapper.getItem(detailsObjectId + entity.id) ? '/' + LSWrapper.getItem(detailsObjectId + entity.id) : '');
window.open(url);
});
|
Minor: Take site hostname (and optional port) into account when opening a preview page which is connected to a site.
|
diff --git a/ella/core/models/publishable.py b/ella/core/models/publishable.py
index <HASH>..<HASH> 100644
--- a/ella/core/models/publishable.py
+++ b/ella/core/models/publishable.py
@@ -150,9 +150,14 @@ class Publishable(models.Model):
def save(self, **kwargs):
self.content_type = ContentType.objects.get_for_model(self)
send_signal = None
+ old_self = None
if self.pk:
- old_self = Publishable.objects.get(pk=self.pk)
+ try:
+ old_self = Publishable.objects.get(pk=self.pk)
+ except Publishable.DoesNotExist:
+ pass
+ if old_self:
old_path = old_self.get_absolute_url()
new_path = self.get_absolute_url()
|
sometmes you want to create Publishable with a given PK
|
diff --git a/dispatch/static/manager/webpack.config.js b/dispatch/static/manager/webpack.config.js
index <HASH>..<HASH> 100644
--- a/dispatch/static/manager/webpack.config.js
+++ b/dispatch/static/manager/webpack.config.js
@@ -9,6 +9,7 @@ module.exports = {
path: __dirname + '/dist/js',
filename: '[name]-' + version + '.js'
},
+ devtool: 'source-map',
module: {
loaders: [
{test: /\.jsx|.js$/, include: __dirname + '/src/js', loader: 'babel-loader'},
|
Enable source maps (yay!)
|
diff --git a/core/lib/torquebox/version.rb b/core/lib/torquebox/version.rb
index <HASH>..<HASH> 100644
--- a/core/lib/torquebox/version.rb
+++ b/core/lib/torquebox/version.rb
@@ -17,7 +17,7 @@
module TorqueBox
VERSION = '4.0.0.alpha1.dev'
- WUNDERBOSS_VERSION = '1.x.incremental.76'
+ WUNDERBOSS_VERSION = '1.x.incremental.78'
#WUNDERBOSS_VERSION = '0.1.0-SNAPSHOT'
WILDFLY_VERSION = '8.1.0.Final'
end
|
Bump to wunderboss incr<I> to pick up the scheduling race condition fix
|
diff --git a/src/Cli.php b/src/Cli.php
index <HASH>..<HASH> 100755
--- a/src/Cli.php
+++ b/src/Cli.php
@@ -80,12 +80,14 @@ class Cli
*
* @return string
*/
- static public function readInput($prompt, array $validInputs = [], $default = '')
+ static public function readInput($prompt = '', array $validInputs = [], $default = '')
{
while (!isset($input) || (!empty($validInputs) && !in_array($input, $validInputs))) {
- echo $prompt;
+ if (!empty($prompt)) {
+ echo $prompt;
+ }
- $input = strtolower(trim(fgets(STDIN)));
+ $input = trim(fgets(STDIN));
if (empty($input) && !empty($default)) {
$input = $default;
|
Changed Cli::readInput to optionally accept prompt text and not lower the inputted data
|
diff --git a/src/main/com/mongodb/MongoOptions.java b/src/main/com/mongodb/MongoOptions.java
index <HASH>..<HASH> 100644
--- a/src/main/com/mongodb/MongoOptions.java
+++ b/src/main/com/mongodb/MongoOptions.java
@@ -111,8 +111,8 @@ public class MongoOptions {
public int threadsAllowedToBlockForConnectionMultiplier;
/**
- * The maximum wait time in ms that a thread may wait for a connection to become available.
- * Default is 120,000.
+ * The maximum wait time in milliseconds that a thread may wait for a connection to become available.
+ * Default is 120,000. A value of 0 means that it will not wait. A negative value means to wait indefinitely.
*/
public int maxWaitTime;
|
Improved specification for MongoOptions.maxWaitTime
|
diff --git a/lib/sprockets/utils.rb b/lib/sprockets/utils.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/utils.rb
+++ b/lib/sprockets/utils.rb
@@ -8,15 +8,15 @@ module Sprockets
# encoding and we want to avoid syntax errors in other interpreters.
UTF8_BOM_PATTERN = Regexp.new("\\A\uFEFF".encode('utf-8'))
- def self.read_unicode(pathname, external_encoding = Encoding.default_external)
- Pathname.new(pathname).open("r:#{external_encoding}") do |f|
+ def self.read_unicode(filename, external_encoding = Encoding.default_external)
+ Pathname.new(filename).open("r:#{external_encoding}") do |f|
f.read.tap do |data|
# Eager validate the file's encoding. In most cases we
# expect it to be UTF-8 unless `default_external` is set to
# something else. An error is usually raised if the file is
# saved as UTF-16 when we expected UTF-8.
if !data.valid_encoding?
- raise EncodingError, "#{pathname} has a invalid " +
+ raise EncodingError, "#{filename} has a invalid " +
"#{data.encoding} byte sequence"
# If the file is UTF-8 and theres a BOM, strip it for safe concatenation.
|
Allow non-pathnames into read_unicode
|
diff --git a/test/server/data_adapter/rest_adapter.test.js b/test/server/data_adapter/rest_adapter.test.js
index <HASH>..<HASH> 100644
--- a/test/server/data_adapter/rest_adapter.test.js
+++ b/test/server/data_adapter/rest_adapter.test.js
@@ -217,6 +217,16 @@ describe('RestAdapter', function() {
'http://example.com/v1/cats?q[]=1&q[]=3');
});
+ it('should not add an extra ? if the query is an empty object', function () {
+ restAdapter.options.default = {
+ host: 'example.com',
+ protocol: 'https',
+ query: {}
+ };
+
+ restAdapter.apiDefaults({body: {}}).should.have.property('url', 'https://example.com');
+ });
+
it('should use a custom user agent', function () {
var api = { headers: { 'User-Agent': 'custom user agent' }, body: {} };
|
test to make sure it doesn't add a ? if there is an empty object for the query parameter
|
diff --git a/app/controllers/api/zotero_controller.rb b/app/controllers/api/zotero_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/api/zotero_controller.rb
+++ b/app/controllers/api/zotero_controller.rb
@@ -34,7 +34,7 @@ module API
private
def authorize_user!
- authorize! :create, ::GenericWork
+ authorize! :create, Sufia.primary_work_type
rescue CanCan::AccessDenied
return redirect_to root_url, alert: 'You are not authorized to perform this operation'
end
|
Don't hardcode GenericWork into ZoteroController
|
diff --git a/src/components/obj-model.js b/src/components/obj-model.js
index <HASH>..<HASH> 100644
--- a/src/components/obj-model.js
+++ b/src/components/obj-model.js
@@ -48,13 +48,14 @@ module.exports.Component = registerComponent('obj-model', {
var mtlLoader = this.mtlLoader;
var objLoader = this.objLoader;
var rendererSystem = this.el.sceneEl.systems.renderer;
+ var BASE_PATH = mtlUrl.substr(0, mtlUrl.lastIndexOf('/') + 1);
if (mtlUrl) {
// .OBJ with an .MTL.
if (el.hasAttribute('material')) {
warn('Material component properties are ignored when a .MTL is provided');
}
- mtlLoader.setTexturePath(mtlUrl.substr(0, mtlUrl.lastIndexOf('/') + 1));
+ mtlLoader.setResourcePath(BASE_PATH);
mtlLoader.load(mtlUrl, function (materials) {
materials.preload();
objLoader.setMaterials(materials);
|
Fixes #<I>: Replace .setTexturePath() call with .setResourcePath() (#<I>)
Also add meaningful variable name for basePath for improved readability.
|
diff --git a/src/main/java/com/simpligility/maven/plugins/android/AndroidNdk.java b/src/main/java/com/simpligility/maven/plugins/android/AndroidNdk.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/simpligility/maven/plugins/android/AndroidNdk.java
+++ b/src/main/java/com/simpligility/maven/plugins/android/AndroidNdk.java
@@ -38,7 +38,8 @@ public class AndroidNdk
+ "alternative, you may add the parameter to commandline: -Dandroid.ndk.path=... or set environment "
+ "variable " + NdkBuildMojo.ENV_ANDROID_NDK_HOME + ".";
- public static final String[] NDK_ARCHITECTURES = { "armeabi", "armeabi-v7a", "mips", "mips64", "x86", "x86_64" };
+ public static final String[] NDK_ARCHITECTURES = { "armeabi", "armeabi-v7a", "arm64-v8a", "mips", "mips64",
+ "x86", "x86_64" };
/**
* Arm toolchain implementations.
|
#<I>: arm<I>-v8a native lib missing from final apk - added missing ABI to list of architectures
|
diff --git a/src/org/opencms/security/CmsRole.java b/src/org/opencms/security/CmsRole.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/security/CmsRole.java
+++ b/src/org/opencms/security/CmsRole.java
@@ -1,7 +1,7 @@
/*
* File : $Source: /alkacon/cvs/opencms/src/org/opencms/security/CmsRole.java,v $
- * Date : $Date: 2007/08/31 13:23:02 $
- * Version: $Revision: 1.16 $
+ * Date : $Date: 2008/02/01 09:39:12 $
+ * Version: $Revision: 1.17 $
*
* This library is part of OpenCms -
* the Open Source Content Management System
@@ -73,7 +73,7 @@ import java.util.Set;
*
* @author Alexander Kandzior
*
- * @version $Revision: 1.16 $
+ * @version $Revision: 1.17 $
*
* @since 6.0.0
*/
@@ -336,7 +336,7 @@ public final class CmsRole {
}
if (!role.isOrganizationalUnitIndependent()) {
// the role name does not start with "/", but the given role fqn does
- if (roleName.endsWith(CmsOrganizationalUnit.SEPARATOR + role.getGroupName())) {
+ if (roleName.endsWith(CmsOrganizationalUnit.SEPARATOR + role.getRoleName())) {
return role.forOrgUnit(roleOu);
}
}
|
fixed bug with parsing role names
|
diff --git a/lib/av.js b/lib/av.js
index <HASH>..<HASH> 100644
--- a/lib/av.js
+++ b/lib/av.js
@@ -1603,7 +1603,7 @@
if (url.charAt(url.length - 1) !== "/") {
url += "/";
}
- url += "1/" + route;
+ url += "1.1/" + route;
if (className) {
url += "/" + className;
}
@@ -5800,7 +5800,7 @@
var json = object._getSaveJSON();
var method = "POST";
- var path = "/1/classes/" + object.className;
+ var path = "/1.1/classes/" + object.className;
if (object.id) {
path = path + "/" + object.id;
method = "PUT";
|
Upgrade rest api version to <I>
|
diff --git a/core-bundle/contao/pages/PageRegular.php b/core-bundle/contao/pages/PageRegular.php
index <HASH>..<HASH> 100644
--- a/core-bundle/contao/pages/PageRegular.php
+++ b/core-bundle/contao/pages/PageRegular.php
@@ -282,9 +282,6 @@ class PageRegular extends \Frontend
// Add the layout specific CSS
if ($strFramework != '')
{
- // Do not apply on mobile devices
- $strFramework = "\n@media (min-width:768px) {\n $strFramework\n}\n"; // FIXME: do not hard code this
-
if ($objPage->outputFormat == 'xhtml')
{
$this->Template->framework .= '<style type="text/css">' . "\n";
|
[Core] Do not wrap the CSS code of the layout builder, so it can be customized
|
diff --git a/closure/goog/debug/logger.js b/closure/goog/debug/logger.js
index <HASH>..<HASH> 100644
--- a/closure/goog/debug/logger.js
+++ b/closure/goog/debug/logger.js
@@ -626,11 +626,25 @@ goog.debug.Logger.prototype.logRecord = function(logRecord) {
/**
+ * Logs the message to speed tracer, if it is available.
+ * {@see http://code.google.com/webtoolkit/speedtracer/logging-api.html}
+ * @param {string} msg The message to log.
+ * @private
+ */
+goog.debug.Logger.prototype.logToSpeedTracer_ = function(msg) {
+ if (goog.global['console'] && goog.global['console']['markTimeline']) {
+ goog.global['console']['markTimeline'](msg);
+ }
+};
+
+
+/**
* Log a LogRecord.
* @param {goog.debug.LogRecord} logRecord A log record to log.
* @private
*/
goog.debug.Logger.prototype.doLogRecord_ = function(logRecord) {
+ this.logToSpeedTracer_('log:' + logRecord.getMessage());
if (goog.debug.Logger.ENABLE_HIERARCHY) {
var target = this;
while (target) {
|
add logging to speedtracer
R=eae
DELTA=<I> (<I> added, 0 deleted, 0 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=<I>
git-svn-id: <URL>
|
diff --git a/src/util/vdom.js b/src/util/vdom.js
index <HASH>..<HASH> 100644
--- a/src/util/vdom.js
+++ b/src/util/vdom.js
@@ -62,10 +62,11 @@ const createElement = function(type, val, props, meta, children) {
const createFunctionalComponent = function(props, children, functionalComponent) {
const options = functionalComponent.options;
const attrs = props.attrs;
- let data = options.data;
+ let data = {};
+ let getData = options.data;
- if(data === undefined) {
- data = {};
+ if(getData !== undefined) {
+ data = getData();
}
// Merge data with provided props
@@ -73,7 +74,7 @@ const createFunctionalComponent = function(props, children, functionalComponent)
if(propNames === undefined) {
data = attrs;
} else {
- for(var i = 0; i < propNames.length; i++) {
+ for(let i = 0; i < propNames.length; i++) {
const prop = propNames[i];
data[prop] = attrs[prop];
}
|
fix: require data to be a function for functional components
|
diff --git a/samples/DocumentManagement/Program.py b/samples/DocumentManagement/Program.py
index <HASH>..<HASH> 100644
--- a/samples/DocumentManagement/Program.py
+++ b/samples/DocumentManagement/Program.py
@@ -84,7 +84,7 @@ class DocumentManagement:
# NOTE: Use MaxItemCount on Options to control how many documents come back per trip to the server
# Important to handle throttles whenever you are doing operations such as this that might
# result in a 429 (throttled request)
- documentlist = list(client.ReadDocuments(collection_link), {'maxItemCount':10})
+ documentlist = list(client.ReadDocuments(collection_link, {'maxItemCount':10}))
print('Found {0} documents'.format(documentlist.__len__()))
@@ -181,4 +181,4 @@ if __name__ == '__main__':
run_sample()
except Exception as e:
- print("Top level Error: args:{0}, message:N/A".format(e.args))
\ No newline at end of file
+ print("Top level Error: args:{0}, message:N/A".format(e.args))
|
Fix the misplaced feed_options
|
diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go
index <HASH>..<HASH> 100644
--- a/cmd/evm/runner.go
+++ b/cmd/evm/runner.go
@@ -206,6 +206,7 @@ func runCmd(ctx *cli.Context) error {
execTime := time.Since(tstart)
if ctx.GlobalBool(DumpFlag.Name) {
+ statedb.Commit(true)
statedb.IntermediateRoot(true)
fmt.Println(string(statedb.Dump()))
}
|
cmd/evm: commit statedb if dump is requested (#<I>)
Add a call `statedb.Commit(true)` if the `Dump` flag is on, as otherwise the `storage` output in the dump is always empty.
|
diff --git a/services/changes/models/CheckResponse.php b/services/changes/models/CheckResponse.php
index <HASH>..<HASH> 100644
--- a/services/changes/models/CheckResponse.php
+++ b/services/changes/models/CheckResponse.php
@@ -8,17 +8,17 @@ use directapi\components\Model;
class CheckResponse extends Model
{
/**
- * @var CheckResponseModified[]
+ * @var CheckResponseModified
*/
public $Modified;
/**
- * @var CheckResponseIds[]
+ * @var CheckResponseIds
*/
public $NotFound;
/**
- * @var CheckResponseIds[]
+ * @var CheckResponseIds
*/
public $Unprocessed;
|
Fix phpdoc, should be object, not array
|
diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb
index <HASH>..<HASH> 100644
--- a/lib/stripe/resources/payment_intent.rb
+++ b/lib/stripe/resources/payment_intent.rb
@@ -10,11 +10,21 @@ module Stripe
OBJECT_NAME = "payment_intent"
+ custom_method :apply_customer_balance, http_verb: :post
custom_method :cancel, http_verb: :post
custom_method :capture, http_verb: :post
custom_method :confirm, http_verb: :post
custom_method :verify_microdeposits, http_verb: :post
+ def apply_customer_balance(params = {}, opts = {})
+ request_stripe_object(
+ method: :post,
+ path: resource_url + "/apply_customer_balance",
+ params: params,
+ opts: opts
+ )
+ end
+
def cancel(params = {}, opts = {})
request_stripe_object(
method: :post,
|
API Updates (#<I>)
* Codegen for openapi fc5a2b9
* Reformat code
|
diff --git a/tests/cartesian_coordinates/Cartesian/test_core.py b/tests/cartesian_coordinates/Cartesian/test_core.py
index <HASH>..<HASH> 100644
--- a/tests/cartesian_coordinates/Cartesian/test_core.py
+++ b/tests/cartesian_coordinates/Cartesian/test_core.py
@@ -255,7 +255,7 @@ def test_align_and_make_similar():
m2 = cartesians[-1]
rotation_matrix = cc.utilities.algebra_utilities.rotation_matrix
- m2_shuffled = rotation_matrix([1, 1, 1], 1.2) @ m2 + 8
+ m2_shuffled = m2.move(matrix=rotation_matrix([1, 1, 1], 1.2)) + 8
np.random.seed(77)
m2_shuffled.index = np.random.permutation(m2.index)
|
BUG: No @ operator in python<I>
|
diff --git a/shap/maskers/_fixed_composite.py b/shap/maskers/_fixed_composite.py
index <HASH>..<HASH> 100644
--- a/shap/maskers/_fixed_composite.py
+++ b/shap/maskers/_fixed_composite.py
@@ -4,9 +4,23 @@ from ..utils import invariants, variants, shape, data_transform, clustering
class FixedComposite(Masker):
def __init__(self, masker):
+ """ Creates a Composite masker from an underlying masker and returns the original args along with the masked output.
+
+ Parameters
+ ----------
+ masker: object
+ An object of the shap.maskers.Masker base class (eg. Text/Image masker).
+
+ Returns
+ -------
+ list
+ A wrapped tuple consisting of the masked input using the underlying masker appended with the original args in a list.
+ """
self.masker = masker
def __call__(self, mask, *args):
+ """ Computes mask on the args using the masker data attribute and returns list having a wrapped tuple containing masked input with args.
+ """
masked_X = self.masker(mask, *args)
wrapped_args = []
for item in args:
|
Added docstrings for _fixed_composite.py
|
diff --git a/danceschool/door/urls.py b/danceschool/door/urls.py
index <HASH>..<HASH> 100644
--- a/danceschool/door/urls.py
+++ b/danceschool/door/urls.py
@@ -4,7 +4,7 @@ from .views import DoorRegisterView
from .autocomplete_light_registry import DoorRegisterAutoComplete
urlpatterns = [
+ path('register/autocomplete/', DoorRegisterAutoComplete.as_view(), name='doorRegisterAutocomplete'),
path('register/<slug:slug>/<int:year>/<int:month>/<int:day>/', DoorRegisterView.as_view(), name='doorRegister'),
path('register/<slug:slug>/', DoorRegisterView.as_view(today=True), name='doorRegister'),
- path('register/autocomplete/', DoorRegisterAutoComplete.as_view(), name='doorRegisterAutocomplete'),
]
|
Fixed path inheritance issue that broke the customer autocomplete
|
diff --git a/src/sap.m/src/sap/m/P13nFilterPanel.js b/src/sap.m/src/sap/m/P13nFilterPanel.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/src/sap/m/P13nFilterPanel.js
+++ b/src/sap.m/src/sap/m/P13nFilterPanel.js
@@ -403,7 +403,7 @@ sap.ui.define([
if (!this._aIncludeOperations["default"]) {
this.setIncludeOperations([
- sap.m.P13nConditionOperation.Contains, sap.m.P13nConditionOperation.EQ, sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.StartsWith, sap.m.P13nConditionOperation.EndsWith, sap.m.P13nConditionOperation.LT, sap.m.P13nConditionOperation.LE, sap.m.P13nConditionOperation.GT, sap.m.P13nConditionOperation.GE
+ sap.m.P13nConditionOperation.EQ, sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.LT, sap.m.P13nConditionOperation.LE, sap.m.P13nConditionOperation.GT, sap.m.P13nConditionOperation.GE
]);
}
|
[INTERNAL] P<I>nFilterPanel.js: contains, start-, endswith operations
removed for default operations
Change-Id: I0ed6d8c3f<I>e<I>cc4b<I>acd<I>ffe<I>e3
|
diff --git a/src/Lemonblast/Cbor4Php/Cbor.php b/src/Lemonblast/Cbor4Php/Cbor.php
index <HASH>..<HASH> 100644
--- a/src/Lemonblast/Cbor4Php/Cbor.php
+++ b/src/Lemonblast/Cbor4Php/Cbor.php
@@ -260,6 +260,8 @@ class Cbor {
*/
private static function encodeDouble($double)
{
+ // TODO: Encode with the smallest possible format
+
$major = MajorType::SIMPLE_AND_FLOAT;
// If the encode doubles in 64 bit flag is set
|
Added a TODO to encodeDouble, can remove the need for the flag
|
diff --git a/src/main/ruby/naether.rb b/src/main/ruby/naether.rb
index <HASH>..<HASH> 100644
--- a/src/main/ruby/naether.rb
+++ b/src/main/ruby/naether.rb
@@ -93,7 +93,7 @@ class Naether
end
# Get dependencies
- def dependencies
+ def dependencies()
if Naether.platform == 'java'
return @resolver.getDependenciesNotation().to_a
else
@@ -102,8 +102,8 @@ class Naether
end
# Resolve dependencies, finding related additional dependencies
- def resolve_dependencies
- @resolver.resolveDependencies();
+ def resolve_dependencies( download_artifacts = true )
+ @resolver.resolveDependencies( download_artifacts );
dependencies
end
end
\ No newline at end of file
|
add param to determine if artifacts should be downloaded
|
diff --git a/cmd/policies.go b/cmd/policies.go
index <HASH>..<HASH> 100644
--- a/cmd/policies.go
+++ b/cmd/policies.go
@@ -328,6 +328,11 @@ func viewPolicyCmd(ctx *cli.Context) error {
const policyTestFailed = "Could not test policy."
+var permissionString = map[bool]string{
+ true: "yes",
+ false: "no",
+}
+
func testPolicies(ctx *cli.Context) error {
cfg, err := config.LoadConfig()
if err != nil {
@@ -383,7 +388,7 @@ func testPolicies(ctx *cli.Context) error {
policies = filterPolicies(policies, predicate)
allowed := policiesAllowAccess(policies)
- fmt.Printf("User %s has access to %v %v: %v\n", *userName, action.String(), path, false)
+ fmt.Println(permissionString[allowed])
return nil
}
|
cmd: policies: test: Update the output message to match the specification
In his email Ian mentioned the command should output yes/no. This seems
a little terse to me but I'll stick to the spec, for now...
|
diff --git a/src/http/write.js b/src/http/write.js
index <HASH>..<HASH> 100644
--- a/src/http/write.js
+++ b/src/http/write.js
@@ -30,23 +30,14 @@ const mfsWrite = {
const fileStream = await new Promise((resolve, reject) => {
const parser = multipart.reqParser(request.payload)
- let fileStream
parser.on('file', (_, stream) => {
- if (fileStream) {
- return reject(Boom.badRequest('Please only send one file'))
- }
-
- fileStream = stream
+ resolve(stream)
})
parser.on('error', (error) => {
reject(error)
})
-
- parser.on('end', () => {
- resolve(fileStream)
- })
})
await ipfs.files.write(arg, fileStream, {
|
fix: parser does not end until file data is consumed
License: MIT
|
diff --git a/tormysql/pool.py b/tormysql/pool.py
index <HASH>..<HASH> 100644
--- a/tormysql/pool.py
+++ b/tormysql/pool.py
@@ -266,8 +266,7 @@ class ConnectionPool(object):
if self._closed:
raise ConnectionPoolClosedError("Connection pool closed.")
self._closed = True
- if not self._connections_count:
- return None
+
self._close_future = close_future = Future()
if self._used_connections:
@@ -293,6 +292,11 @@ class ConnectionPool(object):
connection = self._connections.popleft()
self._used_connections[id(connection)] = connection
connection.do_close()
+
+ if not self._connections_count:
+ close_future.set_result(None)
+ self._close_future = None
+
return close_future
def check_idle_connections(self):
|
fix pool close when all connection is closeed
|
diff --git a/bin/metrics-http-json-deep.rb b/bin/metrics-http-json-deep.rb
index <HASH>..<HASH> 100755
--- a/bin/metrics-http-json-deep.rb
+++ b/bin/metrics-http-json-deep.rb
@@ -85,7 +85,7 @@ class JsonDeepMetrics < Sensu::Plugin::Metric::CLI::Graphite
if value.is_a?(Hash)
deep_value(value, "#{scheme}.#{ekey}")
else
- output "#{scheme}.#{ekey}", value unless config[:numonly] && !value.is_a?(Integer)
+ output "#{scheme}.#{ekey}", value unless config[:numonly] && !value.is_a?(Numeric)
end
end
end
|
Update numonly filter to output all Numeric values
|
diff --git a/mwtab/cli.py b/mwtab/cli.py
index <HASH>..<HASH> 100755
--- a/mwtab/cli.py
+++ b/mwtab/cli.py
@@ -103,7 +103,6 @@ def cli(cmdargs):
print(json.dumps(metabolites_dict, indent=4, cls=mwextract.SetEncoder))
elif cmdargs["metadata"]:
- print(cmdargs)
metadata = dict()
for mwtabfile in mwfile_generator:
extracted_values = mwextract.extract_metadata(mwtabfile, cmdargs)
|
Removes print statement used during debugging.
|
diff --git a/lib/ohai/plugins/linux/network.rb b/lib/ohai/plugins/linux/network.rb
index <HASH>..<HASH> 100644
--- a/lib/ohai/plugins/linux/network.rb
+++ b/lib/ohai/plugins/linux/network.rb
@@ -104,7 +104,8 @@ Ohai.plugin(:Network) do
route_entry = Mash.new(:destination => route_dest,
:family => family[:name])
%w{via scope metric proto src}.each do |k|
- route_entry[k] = $1 if route_ending =~ /\b#{k}\s+([^\s]+)\b/
+ # http://rubular.com/r/pwTNp65VFf
+ route_entry[k] = $1 if route_ending =~ /\b#{k}\s+([^\s]+)/
end
# a sanity check, especially for Linux-VServer, OpenVZ and LXC:
|
Fix the route support for IPV6 routes ending in ::
Removing the ending word boundary in the regex allows is to capture the
:: endings while still properly parsing other routes. I added a rubular
comment as well so we know what this regex is actually trying to
capture.
|
diff --git a/openquake/engine/calculators/hazard/event_based/core.py b/openquake/engine/calculators/hazard/event_based/core.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/calculators/hazard/event_based/core.py
+++ b/openquake/engine/calculators/hazard/event_based/core.py
@@ -293,9 +293,10 @@ class GmfCalculator(object):
computer = gmf.GmfComputer(
rupture, r_sites, self.sorted_imts, self.sorted_gsims,
self.truncation_level, self.correl_model)
+ gnames = map(str, computer.gsims)
rupids, seeds = zip(*rupid_seed_pairs)
for rupid, gmfa in zip(rupids, computer.compute(seeds)):
- for gname in gmfa.dtype.fields:
+ for gname in gnames:
gmf_by_imt = gmfa[gname]
for imt in self.sorted_imts:
for site_id, gmv in zip(r_sites.sids, gmf_by_imt[imt]):
|
Fixed the event based calculator
Former-commit-id: <I>aea<I>de<I>fb9aa7e<I>d<I>c3b<I>de<I>
|
diff --git a/lib/gir_ffi/arg_helper.rb b/lib/gir_ffi/arg_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/gir_ffi/arg_helper.rb
+++ b/lib/gir_ffi/arg_helper.rb
@@ -219,6 +219,7 @@ module GirFFI
end
if FFI::Pointer === arg
+ return nil if arg.null?
begin
ObjectSpace._id2ref arg.address
rescue RangeError
diff --git a/test/gtk_test.rb b/test/gtk_test.rb
index <HASH>..<HASH> 100644
--- a/test/gtk_test.rb
+++ b/test/gtk_test.rb
@@ -27,6 +27,7 @@ class GtkTest < Test::Unit::TestCase
assert_instance_of Gtk::Button, o
end
end
+
context "its #connect_signals_full method" do
setup do
@builder.add_from_string @spec, @spec.length
@@ -39,6 +40,10 @@ class GtkTest < Test::Unit::TestCase
assert_equal b.to_ptr, @builder.to_ptr
assert_instance_of Gtk::Button, o
assert_equal "clicked", sn
+ assert_equal "on_button_clicked", hn
+ assert_equal nil, co
+ assert_equal :after, f
+ assert_equal nil, ud
end
end
end
|
If user data is null, pass nil to callback.
|
diff --git a/src/org/parosproxy/paros/network/HttpHeader.java b/src/org/parosproxy/paros/network/HttpHeader.java
index <HASH>..<HASH> 100644
--- a/src/org/parosproxy/paros/network/HttpHeader.java
+++ b/src/org/parosproxy/paros/network/HttpHeader.java
@@ -57,7 +57,8 @@ abstract public class HttpHeader implements java.io.Serializable{
public static final String COOKIE = "Cookie";
public static final String SET_COOKIE = "Set-Cookie";
public static final String SET_COOKIE2 = "Set-Cookie2";
-
+ public static final String X_XSS_PROTECTION = "X-XSS-Protection";
+
public static final String HTTP09 = "HTTP/0.9";
public static final String HTTP10 = "HTTP/1.0";
public static final String HTTP11 = "HTTP/1.1";
|
Vitor:
- Added X-XSS-Protection on the static variables
|
diff --git a/test/src/test/java/hudson/model/AsynchPeopleTest.java b/test/src/test/java/hudson/model/AsynchPeopleTest.java
index <HASH>..<HASH> 100644
--- a/test/src/test/java/hudson/model/AsynchPeopleTest.java
+++ b/test/src/test/java/hudson/model/AsynchPeopleTest.java
@@ -25,7 +25,7 @@
package hudson.model;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.DomElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import static org.junit.Assert.*;
import org.junit.Rule;
@@ -53,7 +53,7 @@ public class AsynchPeopleTest {
}
assertEquals(0, wc.waitForBackgroundJavaScript(120000));
boolean found = false;
- for (HtmlElement table : page.getElementsByTagName("table")) {
+ for (DomElement table : page.getElementsByTagName("table")) {
if (table.getAttribute("class").contains("progress-bar")) {
found = true;
assertEquals("display: none;", table.getAttribute("style"));
|
AsynchPeopleTest compiling against HtmlUnit <I>
|
diff --git a/lib/friendly_id/base.rb b/lib/friendly_id/base.rb
index <HASH>..<HASH> 100644
--- a/lib/friendly_id/base.rb
+++ b/lib/friendly_id/base.rb
@@ -161,9 +161,9 @@ often better and easier to use {FriendlyId::Slugged slugs}.
#
# @yieldparam config The model class's {FriendlyId::Configuration friendly_id_config}.
def friendly_id(base = nil, options = {}, &block)
- yield @friendly_id_config if block_given?
- @friendly_id_config.use options.delete :use
- @friendly_id_config.send :set, base ? options.merge(:base => base) : options
+ yield friendly_id_config if block_given?
+ friendly_id_config.use options.delete :use
+ friendly_id_config.send :set, base ? options.merge(:base => base) : options
before_save {|rec| rec.instance_eval {@current_friendly_id = friendly_id}}
include Model
end
|
Ensure friendly_id_config is initialized in STI classes
|
diff --git a/graphics/base.py b/graphics/base.py
index <HASH>..<HASH> 100644
--- a/graphics/base.py
+++ b/graphics/base.py
@@ -40,7 +40,7 @@ def set_format(instance, default="pdf"):
allowed_format = ("emf", "eps", "pdf", "png", "ps", \
"raw", "rgba", "svg", "svgz")
- instance.add_option("--format", default=default,
+ instance.add_option("--format", default=default, choices=allowed_format,
help="Generate image of format, must be one of {0}".\
format("|".join(allowed_format)) + " [default: %default]")
|
missing choices option in graphics.base.set_format()
|
diff --git a/liquibase-core/src/main/java/liquibase/executor/Executor.java b/liquibase-core/src/main/java/liquibase/executor/Executor.java
index <HASH>..<HASH> 100644
--- a/liquibase-core/src/main/java/liquibase/executor/Executor.java
+++ b/liquibase-core/src/main/java/liquibase/executor/Executor.java
@@ -14,7 +14,7 @@ import java.util.Map;
/**
* Interface for a class that is capable of executing statements/queries against a DBMS.
*/
-public interface Executor extends PrioritizedService {
+public interface Executor {
/**
*
* Return the name of the Executor
|
Remove PrioritizedService from Executor interface.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ with open(os.path.join(os.path.dirname(__file__), "README.md")) as f:
setup(
name="pyinstrument",
- packages=find_packages(),
+ packages=find_packages(include=("pyinstrument", "pyinstrument.*")),
version="4.0.3",
ext_modules=[
Extension(
|
Ensure test/ is not installed in site-packages
|
diff --git a/openquake/parser/vulnerability.py b/openquake/parser/vulnerability.py
index <HASH>..<HASH> 100644
--- a/openquake/parser/vulnerability.py
+++ b/openquake/parser/vulnerability.py
@@ -115,7 +115,7 @@ class VulnerabilityModelFile(producer.FileProducer):
# TODO (ac): These two functions should be probably moved elsewhere
-def load_vulnerability_model(job_id, path):
+def load_vulnerability_model(job_id, path, retrofitted=False):
"""Load and store the vulnerability model defined in the
given NRML file in the underlying kvs system."""
@@ -129,15 +129,15 @@ def load_vulnerability_model(job_id, path):
vulnerability_model[vuln_curve["ID"]] = vuln_func.to_json()
- kvs.set_value_json_encoded(kvs.tokens.vuln_key(job_id),
+ kvs.set_value_json_encoded(kvs.tokens.vuln_key(job_id, retrofitted),
vulnerability_model)
-def load_vuln_model_from_kvs(job_id):
+def load_vuln_model_from_kvs(job_id, retrofitted=False):
"""Load the vulnerability model from kvs for the given job."""
vulnerability_model = kvs.get_value_json_decoded(
- kvs.tokens.vuln_key(job_id))
+ kvs.tokens.vuln_key(job_id, retrofitted))
vulnerability_curves = {}
|
parser/vulnerability: support for reading retrofitted models
Former-commit-id: <I>a<I>d7a0fff1e3e<I>e<I>a<I>cc2f8f<I>fe
|
diff --git a/beatrix/src/main/java/com/ning/billing/beatrix/extbus/BeatrixListener.java b/beatrix/src/main/java/com/ning/billing/beatrix/extbus/BeatrixListener.java
index <HASH>..<HASH> 100644
--- a/beatrix/src/main/java/com/ning/billing/beatrix/extbus/BeatrixListener.java
+++ b/beatrix/src/main/java/com/ning/billing/beatrix/extbus/BeatrixListener.java
@@ -189,8 +189,7 @@ public class
case OVERDUE_CHANGE:
OverdueChangeInternalEvent realEventOC = (OverdueChangeInternalEvent) event;
- // TODO When Killbil supports more than overdue for bundle, this will break...
- objectType = ObjectType.BUNDLE;
+ objectType = ObjectType.ACCOUNT;
objectId = realEventOC.getOverdueObjectId();
eventBusType = ExtBusEventType.OVERDUE_CHANGE;
break;
|
Fix bug in external event for overdue
|
diff --git a/dom/MemoryDOMElement.js b/dom/MemoryDOMElement.js
index <HASH>..<HASH> 100644
--- a/dom/MemoryDOMElement.js
+++ b/dom/MemoryDOMElement.js
@@ -579,10 +579,11 @@ export default class MemoryDOMElement extends DOMElement {
_propagateEvent (event) {
let listeners = this.eventListeners
if (listeners) {
- let listener = listeners.find((l) => {
- return l.eventName === event.type
+ listeners.forEach(l => {
+ if (l.eventName === event.type) {
+ l.handler(event)
+ }
})
- if (listener) listener.handler(event)
if (event.stopped) return
let p = this.parentNode
if (p) p._propagateEvent(event)
|
Let MemoryDOMEvent.emit() trigger all registered handlers on an element.
|
diff --git a/plugin.php b/plugin.php
index <HASH>..<HASH> 100644
--- a/plugin.php
+++ b/plugin.php
@@ -457,7 +457,11 @@ function json_handle_options_request( $response, $handler ) {
$response = new WP_JSON_Response();
$accept = array();
- $map = $handler::$method_map;
+
+ $handler_class = get_class( $handler );
+ $class_vars = get_class_vars( $handler_class );
+ $map = $class_vars['method_map'];
+
foreach ( $handler->get_routes() as $route => $endpoints ) {
$match = preg_match( '@^' . $route . '$@i', $handler->path, $args );
var_dump(array($route, $match));
|
Access method map in PHP <I>-compatible way
|
diff --git a/beaver/worker.py b/beaver/worker.py
index <HASH>..<HASH> 100644
--- a/beaver/worker.py
+++ b/beaver/worker.py
@@ -9,7 +9,7 @@ from ssh_tunnel import BeaverSshTunnel
from transport import TransportException
from utils import eglob
-REOPEN_FILES = platform.platform() != 'Linux'
+REOPEN_FILES = 'linux' not in platform.platform().lower()
class Worker(object):
@@ -262,6 +262,9 @@ def run_worker(file_config, beaver_config, logger, ssh_tunnel=None):
logger.info("Logging using the {0} transport".format(beaver_config.get('transport')))
transport = create_transport(file_config, beaver_config)
+ if REOPEN_FILES:
+ logger.info("Detected non-linux platform. Files will be reopened for tailing")
+
try:
logger.info("Starting worker...")
l = Worker(file_config, beaver_config, transport.callback, logger, ssh_tunnel=ssh_tunnel)
|
Properly detect non-linux platforms
|
diff --git a/init.go b/init.go
index <HASH>..<HASH> 100644
--- a/init.go
+++ b/init.go
@@ -28,10 +28,9 @@ var (
func init() {
apid.RegisterPlugin(initPlugin)
- apid.RegisterPostPlugin(postinitPlugin)
}
-func postinitPlugin(services apid.Services) error {
+func postInitPlugins() {
log.Debug("start post plugin init")
/* call to Download Snapshot info */
@@ -43,8 +42,6 @@ func postinitPlugin(services apid.Services) error {
events.Listen(ApigeeSyncEventSelector, &handler{})
log.Debug("Done post plugin init")
- return nil
-
}
func initPlugin(services apid.Services) error {
@@ -55,6 +52,8 @@ func initPlugin(services apid.Services) error {
data = services.Data()
events = services.Events()
+ events.Listen(apid.PluginsInitializedEvent, postInitPlugins)
+
config.SetDefault(configPollInterval, 120)
db, err := data.DB()
|
Fix initialization to use apid events instead of a new plugin callback
|
diff --git a/staff/views.py b/staff/views.py
index <HASH>..<HASH> 100644
--- a/staff/views.py
+++ b/staff/views.py
@@ -6,6 +6,7 @@ from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from django.template.loader import render_to_string
from django.utils import simplejson
+from django.core.mail import EmailMessage
from staff.models import StaffMember
from staff.forms import ContactForm
@@ -54,8 +55,6 @@ def contact(request, slug, template_name='staffmembers/contact.html',
if request.method == 'POST':
form = ContactForm(request.POST)
if form.is_valid():
- from django.core.mail import send_mail
-
subject = render_to_string(
email_subject_template,
{'member': member}
@@ -69,8 +68,9 @@ def contact(request, slug, template_name='staffmembers/contact.html',
'message': form.cleaned_data['message']}
)
- send_mail(subject, message,
- settings.DEFAULT_FROM_EMAIL, [member.email])
+ EmailMessage(subject, message, settings.DEFAULT_FROM_EMAIL, [member.email],
+ headers = {'Reply-To': form.cleaned_data['email']}).send()
+
return HttpResponseRedirect(success_url)
else:
initial = {}
|
send email with proper Reply-To header
|
diff --git a/interp/arith.go b/interp/arith.go
index <HASH>..<HASH> 100644
--- a/interp/arith.go
+++ b/interp/arith.go
@@ -59,15 +59,9 @@ func (r *Runner) arithm(expr syntax.ArithmExpr) int {
syntax.AndAssgn, syntax.OrAssgn, syntax.XorAssgn,
syntax.ShlAssgn, syntax.ShrAssgn:
return r.assgnArit(x)
- case syntax.Colon:
- // TODO: error
- case syntax.Quest:
+ case syntax.Quest: // Colon can't happen here
cond := r.arithm(x.X)
- b2, ok := x.Y.(*syntax.BinaryArithm)
- if !ok || b2.Op != syntax.Colon {
- // TODO: error
- return 0
- }
+ b2 := x.Y.(*syntax.BinaryArithm) // must have Op==Colon
if cond == 1 {
return r.arithm(b2.X)
}
|
interp: ternary operator structure is now strict
We rely on syntax enforcing this, so panicking and undefined behaviour
is fine if the contract is broken.
|
diff --git a/transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java b/transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java
index <HASH>..<HASH> 100644
--- a/transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java
+++ b/transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java
@@ -484,7 +484,9 @@ class NioWorker implements Runnable {
} catch (AsynchronousCloseException e) {
// Doesn't need a user attention - ignore.
} catch (Throwable t) {
- buf.release();
+ if (buf != null) {
+ buf.release();
+ }
channel.currentWriteEvent = null;
channel.currentWriteBuffer = null;
buf = null;
|
Fix possible NPE which will be thrown if the Buffer was set to null and after that Exception was thrown. See #<I>
|
diff --git a/hamper/plugins/whatwasthat.py b/hamper/plugins/whatwasthat.py
index <HASH>..<HASH> 100644
--- a/hamper/plugins/whatwasthat.py
+++ b/hamper/plugins/whatwasthat.py
@@ -9,7 +9,7 @@ class WhatWasThat(ChatCommandPlugin):
'''
name = 'whatwasthat'
- priority = 0
+ priority = 2
class WhatWasThat(Command):
regex = r'^what\s*was\s*that\??$'
|
Bump whatwasthat's priority.
|
diff --git a/html.php b/html.php
index <HASH>..<HASH> 100644
--- a/html.php
+++ b/html.php
@@ -12,7 +12,7 @@ class html
static::$config = new \Lucid\Component\Container\Container();
} else {
if (is_object($config) === false || in_array('Lucid\\Component\\Container\\ContainerInterface', class_implements($config)) === false) {
- throw new \Exception('Factory contructor parameter $config must either be null, or implement Lucid\\$config\\Container\\ContainerInterface (https://github.com/Dev-Lucid/container). If null is passed, then an instance of Lucid\\Component\\Container\\Container will be instantiated instead.');
+ throw new \Exception('Html contructor parameter $config must either be null, or implement Lucid\\Component\\Container\\ContainerInterface (https://github.com/Dev-Lucid/container). If null is passed, then an instance of Lucid\\Component\\Container\\Container will be instantiated instead.');
}
# if a config object has been passed in, decorate it so that internally all indexes are prefixed with html:
|
fixing typo from copy/paste in init
|
diff --git a/api/models/index.js b/api/models/index.js
index <HASH>..<HASH> 100644
--- a/api/models/index.js
+++ b/api/models/index.js
@@ -1,8 +1,10 @@
-var customModels = module.exports = {
+var CustomModelPrototype = require('./CustomModel')
+
+module.exports = {
process: process
}
-var CustomModelPrototype = require('./CustomModel')
+var customModels = module.exports
function process(modelDescriptions) {
for (var modelName in modelDescriptions) {
|
Organize the imports, exports and state declarations as usual
|
diff --git a/lib/postal/smtp_server/client.rb b/lib/postal/smtp_server/client.rb
index <HASH>..<HASH> 100644
--- a/lib/postal/smtp_server/client.rb
+++ b/lib/postal/smtp_server/client.rb
@@ -236,7 +236,14 @@ module Postal
@state = :mail_from_received
transaction_reset
- @mail_from = data.gsub(/MAIL FROM\s*:\s*/i, '').gsub(/.*</, '').gsub(/>.*/, '').strip
+ if data =~ /AUTH=/
+ # Discard AUTH= parameter and anything that follows.
+ # We don't need this parameter as we don't trust any client to set it
+ mail_from_line = data.sub(/ *AUTH=.*/, '')
+ else
+ mail_from_line = data
+ end
+ @mail_from = mail_from_line.gsub(/MAIL FROM\s*:\s*/i, '').gsub(/.*</, '').gsub(/>.*/, '').strip
'250 OK'
end
|
remove AUTH= paramater from "MAIL FROM" before processing
|
diff --git a/mod/forum/lib.php b/mod/forum/lib.php
index <HASH>..<HASH> 100644
--- a/mod/forum/lib.php
+++ b/mod/forum/lib.php
@@ -3078,9 +3078,12 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
// String cache
static $str;
- // As we should only have one element with the id of unread we keep track of whether this post is the first
- // unread post.
- static $firstunread = true;
+ // This is an extremely hacky way to ensure we only print the 'unread' anchor
+ // the first time we encounter an unread post on a page. Ideally this would
+ // be moved into the caller somehow, and be better testable. But at the time
+ // of dealing with this bug, this static workaround was the most surgical and
+ // it fits together with only printing th unread anchor id once on a given page.
+ static $firstunreadanchorprinted = false;
$modcontext = context_module::instance($cm->id);
@@ -3296,10 +3299,10 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
$forumpostclass = ' read';
} else {
$forumpostclass = ' unread';
- // If this is the first unread post then give it an anchor and id of unread.
- if ($firstunread) {
+ // If this is the first unread post printed then give it an anchor and id of unread.
+ if (!$firstunreadanchorprinted) {
$output .= html_writer::tag('a', '', array('id' => 'unread'));
- $firstunread = false;
+ $firstunreadanchorprinted = true;
}
}
} else {
|
MDL-<I> mod_forum: clarify static variable usage
After some time discussing with integrators, we decided that this
slightly yukky solution probably fits safely, so just making its usage
better explained and speciifc.
|
diff --git a/lib/boot/module.js b/lib/boot/module.js
index <HASH>..<HASH> 100644
--- a/lib/boot/module.js
+++ b/lib/boot/module.js
@@ -40,5 +40,9 @@ function loadDefinitionsFromDir(dir, phases) {
if (fs.existsSync(modelsPath)) {
phases.push(require('./definitions')(modelsPath));
}
+ modelsPath = path.join(dir, 'common', 'models');
+ if (fs.existsSync(modelsPath)) {
+ phases.push(require('./definitions')(modelsPath));
+ }
}
\ No newline at end of file
|
support common/models path in boot module
|
diff --git a/src/tools/mountainchart/mountainchart-component.js b/src/tools/mountainchart/mountainchart-component.js
index <HASH>..<HASH> 100644
--- a/src/tools/mountainchart/mountainchart-component.js
+++ b/src/tools/mountainchart/mountainchart-component.js
@@ -476,6 +476,7 @@
return {
_mousemove: function (d, i) {
+ if (_this.model.time.dragging)return;
_this.model.entities.highlightEntity(d);
@@ -488,6 +489,8 @@
},
_mouseout: function (d, i) {
+ if (_this.model.time.dragging)return;
+
_this.tooltip.classed('vzb-hidden', true);
_this.model.entities.clearHighlighted();
},
|
Block hovering of mountains when dragging time slider
|
diff --git a/metrics-core/src/main/java/com/codahale/metrics/InstrumentedThreadFactory.java b/metrics-core/src/main/java/com/codahale/metrics/InstrumentedThreadFactory.java
index <HASH>..<HASH> 100644
--- a/metrics-core/src/main/java/com/codahale/metrics/InstrumentedThreadFactory.java
+++ b/metrics-core/src/main/java/com/codahale/metrics/InstrumentedThreadFactory.java
@@ -36,10 +36,10 @@ public class InstrumentedThreadFactory implements ThreadFactory
private class InstrumentedRunnable implements Runnable
{
- private final Runnable wrapee;
- InstrumentedRunnable(Runnable wrapee)
+ private final Runnable task;
+ InstrumentedRunnable(Runnable task)
{
- this.wrapee = wrapee;
+ this.task = task;
}
@Override
@@ -48,7 +48,7 @@ public class InstrumentedThreadFactory implements ThreadFactory
running.inc();
try
{
- wrapee.run();
+ task.run();
}
finally
{
|
'wrappee' sounds silly, renaming
|
diff --git a/.eslintrc.js b/.eslintrc.js
index <HASH>..<HASH> 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -31,7 +31,7 @@ module.exports = {
message: 'Invalid require of core/server from core/shared.'
},
{
- name: path.resolve(__dirname, 'core/server/**'),
+ name: path.resolve(__dirname, 'core/frontend/**'),
message: 'Invalid require of core/frontend from core/shared.'
}
]]
|
Fixed incorrect eslint rule config
|
diff --git a/grakn-graql/src/main/java/ai/grakn/graql/internal/analytics/DegreeDistributionMapReduce.java b/grakn-graql/src/main/java/ai/grakn/graql/internal/analytics/DegreeDistributionMapReduce.java
index <HASH>..<HASH> 100644
--- a/grakn-graql/src/main/java/ai/grakn/graql/internal/analytics/DegreeDistributionMapReduce.java
+++ b/grakn-graql/src/main/java/ai/grakn/graql/internal/analytics/DegreeDistributionMapReduce.java
@@ -43,7 +43,9 @@ public class DegreeDistributionMapReduce extends GraknMapReduce<Set<String>> {
if (selectedTypes.contains(Utility.getVertexType(vertex))) {
emitter.emit(vertex.value(DegreeVertexProgram.DEGREE),
Collections.singleton(vertex.id().toString()));
+ return;
}
+ emitter.emit(NullObject.instance(), Collections.emptySet());
}
@Override
|
Fix a bug causing StackOverflowError due to poor implementation of MapIterator of Tinkerpop (#<I>)
|
diff --git a/lib/reality/zapwhite.rb b/lib/reality/zapwhite.rb
index <HASH>..<HASH> 100644
--- a/lib/reality/zapwhite.rb
+++ b/lib/reality/zapwhite.rb
@@ -295,6 +295,11 @@ module Reality
attributes.text_rule('*.wat')
attributes.binary_rule('*.wasm')
+ # WebGL Shader files
+ attributes.text_rule('*.frag')
+ attributes.text_rule('*.vert')
+ attributes.text_rule('*.shader')
+
# Rust defaults
attributes.text_rule('*.rs')
|
Add WebGL shaders to files processed
|
diff --git a/lib/passes/index.js b/lib/passes/index.js
index <HASH>..<HASH> 100644
--- a/lib/passes/index.js
+++ b/lib/passes/index.js
@@ -1,11 +1,11 @@
(function(){
module.exports = {
- 'ClearMaskPass': './clear-mask',
- 'MaskPass': './mask',
- 'RenderPass': './render',
- 'ShaderPass': './shader',
- 'ShaderRenderPass': './shader-render'
+ 'ClearMaskPass': require('./clear-mask'),
+ 'MaskPass': require('./mask'),
+ 'RenderPass': require('./render'),
+ 'ShaderPass': require('./shader'),
+ 'ShaderRenderPass': require('./shader-render')
};
})();
\ No newline at end of file
|
Derrrrrrrp.
|
diff --git a/src/Console/SupervisorCommand.php b/src/Console/SupervisorCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/SupervisorCommand.php
+++ b/src/Console/SupervisorCommand.php
@@ -23,7 +23,7 @@ class SupervisorCommand extends Command
{--max-processes=1 : The maximum number of total workers to start}
{--min-processes=1 : The minimum number of workers to assign per queue}
{--memory=128 : The memory limit in megabytes}
- {--nice=0 : The process niceness}
+ {--nice=0 : Increment to the process niceness}
{--paused : Start the supervisor in a paused state}
{--queue= : The names of the queues to work}
{--sleep=3 : Number of seconds to sleep when no job is available}
@@ -75,7 +75,7 @@ class SupervisorCommand extends Command
*/
protected function start($supervisor)
{
- if ($supervisor->options->nice > 0) {
+ if ($supervisor->options->nice) {
proc_nice($supervisor->options->nice);
}
diff --git a/src/SupervisorOptions.php b/src/SupervisorOptions.php
index <HASH>..<HASH> 100644
--- a/src/SupervisorOptions.php
+++ b/src/SupervisorOptions.php
@@ -49,7 +49,7 @@ class SupervisorOptions extends WorkerOptions
public $minProcesses = 1;
/**
- * The process niceness.
+ * Increment to the process niceness.
*
* @var int
*/
|
allow negative nice (for sudo user); better comments about the meaning of nice option
|
diff --git a/salt/modules/philips_hue.py b/salt/modules/philips_hue.py
index <HASH>..<HASH> 100644
--- a/salt/modules/philips_hue.py
+++ b/salt/modules/philips_hue.py
@@ -29,20 +29,20 @@ def _proxy():
'''
Get proxy.
'''
- return __opts__.get('proxymodule')
+ return __proxy__
def __virtual__():
'''
Start the Philips HUE only for proxies.
'''
-
if not _proxy():
return False
def _mkf(cmd_name, doc):
def _cmd(*args, **kw):
- return _proxy()[_proxy().loaded_base_name + "." + cmd_name](*args, **kw)
+ proxyfn = 'philips_hue.'+cmd_name
+ return __proxy__[proxyfn](*args, **kw)
return _cmd
import salt.proxy.philips_hue as hue
|
Update philips Hue proxy to support __proxy__ variable.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.