diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/spec/runner.rb b/spec/runner.rb
index <HASH>..<HASH> 100755
--- a/spec/runner.rb
+++ b/spec/runner.rb
@@ -41,7 +41,7 @@ at_exit {
}
begin
- Selenium::WebDriver::Wait.new(timeout: 600, interval: 1) \
+ Selenium::WebDriver::Wait.new(timeout: 540, interval: 1) \
.until { not browser.find_element(:css, 'p#totals').text.strip.empty? }
totals = browser.find_element(:css, 'p#totals').text
|
spec: set the timeout at 9 minutes
|
diff --git a/spout/outputs.py b/spout/outputs.py
index <HASH>..<HASH> 100644
--- a/spout/outputs.py
+++ b/spout/outputs.py
@@ -8,3 +8,18 @@ class PrintOperation(Operation):
"""
def perform(self, obj):
print obj
+
+
+class FileOutputOperation(Operation):
+ """
+ Operation that writes each input item onto a separate line in a file.
+ """
+ def __init__(self, filename):
+ self.output = open(filename, 'w')
+
+ def perform(self, obj):
+ self.output.write(obj)
+
+ def __del__(self):
+ self.output.flush()
+ self.output.close()
|
Created operation to output plain text to a file.
|
diff --git a/payout.go b/payout.go
index <HASH>..<HASH> 100644
--- a/payout.go
+++ b/payout.go
@@ -108,7 +108,7 @@ type Payout struct {
Card *Card `json:"card"`
Created int64 `json:"created"`
Currency Currency `json:"currency"`
- Destination string `json:"destination"`
+ Destination *PayoutDestination `json:"destination"`
FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"`
FailureCode PayoutFailureCode `json:"failure_code"`
FailureMessage string `json:"failure_message"`
|
Changed the type of Payout.Destination from string to *PayoutDestination
to support expanding
|
diff --git a/js/html/DomElement.js b/js/html/DomElement.js
index <HASH>..<HASH> 100644
--- a/js/html/DomElement.js
+++ b/js/html/DomElement.js
@@ -13,7 +13,7 @@ define(["require","js/core/Component", "js/core/Content", "js/core/Binding", "in
},
$behavesAsDomElement: true,
ctor: function (attributes, descriptor, systemManager, parentScope, rootScope) {
- ContentPlaceHolder = require("js/ui/ContentPlaceHolder");
+ ContentPlaceHolder = ContentPlaceHolder || require("js/ui/ContentPlaceHolder");
this.$renderMap = {};
this.$childViews = [];
this.$contentChildren = [];
|
optimized late requireing of ContentPlaceHolder
|
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py
index <HASH>..<HASH> 100644
--- a/paramiko/sftp_client.py
+++ b/paramiko/sftp_client.py
@@ -23,6 +23,7 @@ Client-mode SFTP support.
from binascii import hexlify
import errno
import os
+import stat
import threading
import time
import weakref
@@ -507,6 +508,8 @@ class SFTPClient (BaseSFTP):
@since: 1.4
"""
+ if not S_ISDIR(self.stat(path).st_mode):
+ raise SFTPError(errno.ENOTDIR, "%s: %s" % (os.strerror(errno.ENOTDIR), path))
self._cwd = self.normalize(path)
def getcwd(self):
|
patch from jim wilcoxson: raise an error early if chdir will fail.
|
diff --git a/qtpylib/tools.py b/qtpylib/tools.py
index <HASH>..<HASH> 100644
--- a/qtpylib/tools.py
+++ b/qtpylib/tools.py
@@ -695,10 +695,15 @@ def resample(data, resolution="1T", tz=None, ffill=True, dropna=False,
['_idx_']].min().max().values[-1]).replace('T', ' ')
end_date = str(data.groupby(["symbol"])[
['_idx_']].max().min().values[-1]).replace('T', ' ')
- data = data[(data.index >= start_date) & (data.index <= end_date)
- ].drop_duplicates(subset=['_idx_', 'symbol',
- 'symbol_group', 'asset_class'],
- keep='first')
+
+ data = data[(data.index <= end_date)].drop_duplicates(
+ subset=['_idx_', 'symbol', 'symbol_group', 'asset_class'],
+ keep='first')
+
+ # try also sync start date
+ trimmed = data[data.index >= start_date]
+ if not trimmed.empty:
+ data = trimmed
# ---------------------------------------------
# resample
|
fixed issue with resample's sync_last_timestamp
|
diff --git a/findbugs/src/java/edu/umd/cs/findbugs/detect/FindOpenStream.java b/findbugs/src/java/edu/umd/cs/findbugs/detect/FindOpenStream.java
index <HASH>..<HASH> 100644
--- a/findbugs/src/java/edu/umd/cs/findbugs/detect/FindOpenStream.java
+++ b/findbugs/src/java/edu/umd/cs/findbugs/detect/FindOpenStream.java
@@ -433,9 +433,17 @@ public class FindOpenStream extends ResourceTrackingDetector<Stream, FindOpenStr
return new StreamResourceTracker(bugReporter);
}
+ public static boolean isMainMethod(Method method) {
+ return method.isStatic()
+ && method.getName().equals("main")
+ && method.getSignature().equals("([Ljava/lang/String;)V");
+ }
+
public void analyzeMethod(ClassContext classContext, Method method, StreamResourceTracker resourceTracker)
throws CFGBuilderException, DataflowAnalysisException {
+ if (isMainMethod(method)) return;
+
potentialOpenStreamList.clear();
super.analyzeMethod(classContext, method, resourceTracker);
|
Don't warn about open streams not being closed in main methods
git-svn-id: <URL>
|
diff --git a/src/provider/AbstractBsdProvider.php b/src/provider/AbstractBsdProvider.php
index <HASH>..<HASH> 100644
--- a/src/provider/AbstractBsdProvider.php
+++ b/src/provider/AbstractBsdProvider.php
@@ -127,10 +127,8 @@ abstract class AbstractBsdProvider extends AbstractUnixProvider
*/
public function getUptime()
{
- $uptime = shell_exec("sysctl -n kern.boottime | awk '{print $4}' | sed 's/,//'");
- if ($uptime) {
- return (int)(time() - $uptime);
- }
+ $sysctl = $this->getSysctlInfo();
+ return (int)substr($sysctl['kern.boottime'], 8, 10);
}
/**
|
fix getUptime in bsd
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -39,6 +39,7 @@ function addAssetsToStream(paths, files) {
name = paths.name,
basePath = paths.basePath,
filepaths = files[name].assets,
+ type = paths.type,
options = pluginOptions,
gulpConcatOptions = {};
@@ -74,7 +75,7 @@ function addAssetsToStream(paths, files) {
});
// option for newLine in gulp-concat
- if (options.hasOwnProperty('newLine')) {
+ if (options.hasOwnProperty('newLine') || type === 'js') {
gulpConcatOptions.newLine = options.newLine;
}
@@ -121,7 +122,8 @@ function processAssets(file, basePath, data) {
basePath: basePath,
searchPath: pluginOptions.searchPath,
cwd: file.cwd,
- transformPath: pluginOptions.transformPath
+ transformPath: pluginOptions.transformPath,
+ type: type
}, files);
}
});
|
Apply newline to js files only.
|
diff --git a/daemon/execdriver/native/seccomp_default.go b/daemon/execdriver/native/seccomp_default.go
index <HASH>..<HASH> 100644
--- a/daemon/execdriver/native/seccomp_default.go
+++ b/daemon/execdriver/native/seccomp_default.go
@@ -316,5 +316,17 @@ var defaultSeccompProfile = &configs.Seccomp{
Action: configs.Errno,
Args: []*configs.Arg{},
},
+ {
+ // In kernel x86 real mode virtual machine
+ Name: "vm86",
+ Action: configs.Errno,
+ Args: []*configs.Arg{},
+ },
+ {
+ // In kernel x86 real mode virtual machine
+ Name: "vm86old",
+ Action: configs.Errno,
+ Args: []*configs.Arg{},
+ },
},
}
|
Block vm<I> syscalls in default seccomp profile
These provide an in kernel virtual machine for x<I> real mode on x<I>
used by one very early DOS emulator. Not required for any normal use.
|
diff --git a/lib/rack/ssl-enforcer.rb b/lib/rack/ssl-enforcer.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/ssl-enforcer.rb
+++ b/lib/rack/ssl-enforcer.rb
@@ -44,7 +44,7 @@ module Rack
end
if redirect_required?
- call_before_redirect @options[:before_redirect]
+ call_before_redirect
modify_location_and_redirect
elsif ssl_request?
status, headers, body = @app.call(env)
@@ -81,8 +81,8 @@ module Rack
destination_host && destination_host != @request.host
end
- def call_before_redirect(before_redirect)
- before_redirect.call unless before_redirect.nil?
+ def call_before_redirect
+ @options[:before_redirect].call unless @options[:before_redirect].nil?
end
def modify_location_and_redirect
|
#<I> refactoring to not pass parameter to call_before_redirect, to make consistent iwth rest of code
|
diff --git a/arthur/_version.py b/arthur/_version.py
index <HASH>..<HASH> 100644
--- a/arthur/_version.py
+++ b/arthur/_version.py
@@ -1,2 +1,2 @@
# Versions compliant with PEP 440 https://www.python.org/dev/peps/pep-0440
-__version__ = "0.1.7"
+__version__ = "0.1.8"
|
Update version number to <I>
|
diff --git a/nameko/context.py b/nameko/context.py
index <HASH>..<HASH> 100644
--- a/nameko/context.py
+++ b/nameko/context.py
@@ -34,6 +34,7 @@ class Context(object):
'auth_token': self.auth_token,
'project_id': None,
}
+ res.update(self.extra_kwargs)
return res
def add_to_message(self, message):
|
pass through extra kwargs when formatting context to_dict
|
diff --git a/validation/features/steps/veewee_steps.rb b/validation/features/steps/veewee_steps.rb
index <HASH>..<HASH> 100644
--- a/validation/features/steps/veewee_steps.rb
+++ b/validation/features/steps/veewee_steps.rb
@@ -9,7 +9,7 @@ Given /^a veeweebox was build$/ do
end
When /^I sudorun "([^\"]*)" over ssh$/ do |command|
- @box.exec("echo '#{command}' > /tmp/validation.sh")
+ @box.exec("echo '#{command}' > /tmp/validation.sh && chmod a+x /tmp/validation.sh")
@sshresult=@box.exec(@box.sudo("/tmp/validation.sh"))
end
|
Prevent "validate" error on sudo
Validate prints "unexpected exit code" and a stacktrace on the "sudo whoami" step.
This is caused by insufficient permissions on /tmp/validation.sh - when it is written, the "execute" flag is not set.
I added a chmod after file creation to fix the permissions.
|
diff --git a/facade/src/main/java/org/jboss/pnc/facade/providers/UserProviderImpl.java b/facade/src/main/java/org/jboss/pnc/facade/providers/UserProviderImpl.java
index <HASH>..<HASH> 100644
--- a/facade/src/main/java/org/jboss/pnc/facade/providers/UserProviderImpl.java
+++ b/facade/src/main/java/org/jboss/pnc/facade/providers/UserProviderImpl.java
@@ -52,7 +52,8 @@ public class UserProviderImpl
log.debug("Adding new user '{}' in database", username);
currentUser = User.builder().username(username).build();
- store(currentUser);
+ // get the updated currentUser DTO with id
+ currentUser = store(currentUser);
}
return currentUser;
|
[NCL-<I>] Get the updated user with id on new user store
|
diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js
index <HASH>..<HASH> 100644
--- a/src/core/textures/BaseTexture.js
+++ b/src/core/textures/BaseTexture.js
@@ -321,7 +321,7 @@ BaseTexture.prototype.updateSourceImage = function (newSrc) {
BaseTexture.fromImage = function (imageUrl, crossorigin, scaleMode) {
var baseTexture = utils.BaseTextureCache[imageUrl];
- if (crossorigin === undefined && imageUrl.indexOf('data:') === 0) {
+ if (crossorigin === undefined && imageUrl.indexOf('data:') !== 0) {
crossorigin = true;
}
|
Fix typo in fromImage logic
This bug was introduced in 1a<I>f<I>f9ebaa<I>b<I>fb<I>b2bd<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -9,13 +9,12 @@ with open('README.md', encoding='utf-8') as readme_file:
requirements = [
'binaryornot>=0.4.4',
- 'Jinja2<4.0.0',
+ 'Jinja2>=2.7,<4.0.0',
'click>=7.0',
'pyyaml>=5.3.1',
'jinja2-time>=0.2.0',
'python-slugify>=4.0.0',
'requests>=2.23.0',
- 'MarkupSafe<2.0.0',
]
setup(
|
Remove direct dependency on markupsafe
This sorts potential dependency conflicts with jinja2 which is the
only place where markupsafe is used (since version <I>)
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -13,7 +13,7 @@ exports.getPropertyInfo = function(address, callback) {
],
function generateResponse(error, body) {
if(!error) {
- callback(error, JSON.parse(body));
+ callback(null, JSON.parse(body));
}
else {
callback({ error: error.message });
|
Modified error handling in main callback
|
diff --git a/src/main/java/javascalautils/TryCompanion.java b/src/main/java/javascalautils/TryCompanion.java
index <HASH>..<HASH> 100644
--- a/src/main/java/javascalautils/TryCompanion.java
+++ b/src/main/java/javascalautils/TryCompanion.java
@@ -41,7 +41,10 @@ package javascalautils;
* @author Peter Nerg
* @since 1.3
*/
-public class TryCompanion {
+public final class TryCompanion {
+
+ private TryCompanion() {
+ }
/**
* Creates an instance of {@link Try} wrapping the result of the provided function. <br>
|
Adde private constructor to TryCompanion
|
diff --git a/db/sql/session.php b/db/sql/session.php
index <HASH>..<HASH> 100644
--- a/db/sql/session.php
+++ b/db/sql/session.php
@@ -143,8 +143,9 @@ class Session extends Mapper {
* @param $db object
* @param $table string
* @param $force bool
+ * @param $onsuspect callback
**/
- function __construct(\DB\SQL $db,$table='sessions',$force=TRUE) {
+ function __construct(\DB\SQL $db,$table='sessions',$force=TRUE,$onsuspect=NULL) {
if ($force) {
$eol="\n";
$tab="\t";
@@ -184,8 +185,12 @@ class Session extends Mapper {
($agent=$this->agent()) &&
(!isset($headers['User-Agent']) ||
$agent!=$headers['User-Agent'])) {
- session_destroy();
- $fw->error(403);
+ if (isset($onsuspect))
+ $fw->call($onsuspect,array($this));
+ else {
+ session_destroy();
+ $fw->error(403);
+ }
}
$csrf=$fw->hash($fw->get('ROOT').$fw->get('BASE')).'.'.
$fw->hash(mt_rand());
|
SQL Session: custom callback for suspect sessions
|
diff --git a/hyperid.js b/hyperid.js
index <HASH>..<HASH> 100644
--- a/hyperid.js
+++ b/hyperid.js
@@ -62,10 +62,17 @@ function pad (count) {
function baseId (id, urlSafe) {
var base64Id = Buffer.from(parser.parse(id)).toString('base64')
+ var l = base64Id.length
if (urlSafe) {
- return base64Id.replace(/\+/g, '_').replace(/\//g, '-').replace(/==$/, '-')
+ if (base64Id[l - 2] === '=' && base64Id[l - 1] === '=') {
+ base64Id = base64Id.substr(0, l - 2) + '-'
+ }
+ return base64Id.replace(/\+/g, '_').replace(/\//g, '-')
+ }
+ if (base64Id[l - 2] === '=' && base64Id[l - 1] === '=') {
+ return base64Id.substr(0, l - 2) + '/'
}
- return base64Id.replace(/==$/, '/')
+ return base64Id
}
function decode (id, opts) {
|
feat: avoid regex for end of id (#<I>)
|
diff --git a/lib/Controller/ADForm.php b/lib/Controller/ADForm.php
index <HASH>..<HASH> 100644
--- a/lib/Controller/ADForm.php
+++ b/lib/Controller/ADForm.php
@@ -193,7 +193,7 @@ class Controller_ADForm extends AbstractController
$list = isset($field->ui['valueList'])
? $field->ui['valueList']
- : $field->enum;
+ : array_combine($field->enum, $field->enum);
if($form_field instanceof Form_Field_Checkbox) {
$list = array_reverse($list);
|
lets fix enum() proprely, it should use values as keys
|
diff --git a/term2048/ui.py b/term2048/ui.py
index <HASH>..<HASH> 100644
--- a/term2048/ui.py
+++ b/term2048/ui.py
@@ -28,10 +28,14 @@ def print_version_and_exit():
print("term2048 v%s" % __version__)
sys.exit(0)
+
def print_rules_and_exit():
- print("Use your arrow keys to move the tiles. When two tiles with the same number touch they merge into one! Try to reach 2048 to win.")
+ print("""Use your arrow keys to move the tiles.
+When two tiles with the same value touch they merge into one with the sum of
+their value! Try to reach 2048 to win.""")
sys.exit(0)
+
def parse_cli_args():
"""parse args from the CLI and return a dict"""
parser = argparse.ArgumentParser(description='2048 in your terminal')
@@ -54,7 +58,7 @@ def start_game():
if args['version']:
print_version_and_exit()
-
+
if args['rules']:
print_rules_and_exit()
|
PEP8 compliance in ui.py
|
diff --git a/packages/@uppy/react/src/useUppy.js b/packages/@uppy/react/src/useUppy.js
index <HASH>..<HASH> 100644
--- a/packages/@uppy/react/src/useUppy.js
+++ b/packages/@uppy/react/src/useUppy.js
@@ -18,8 +18,9 @@ module.exports = function useUppy (factory) {
useEffect(() => {
return () => {
uppy.current.close({ reason: 'unmount' })
+ uppy.current = undefined
}
- }, [])
+ }, [uppy])
return uppy.current
}
|
Reset uppy instance when React component is unmounted (#<I>)
|
diff --git a/lenses/ui/base.py b/lenses/ui/base.py
index <HASH>..<HASH> 100644
--- a/lenses/ui/base.py
+++ b/lenses/ui/base.py
@@ -314,7 +314,7 @@ class BaseUiLens(Generic[S, T, A, B]):
'''
return self._compose_optic(optics.GetitemLens(key))
- def getter_setter_(self, getter, setter):
+ def lens_(self, getter, setter):
# type: (Callable[[A], X], Callable[[A, Y], B]) -> BaseUiLens[S, T, X, Y]
'''An optic that wraps a pair of getter and setter functions. A
getter function is one that takes a state and returns a value
@@ -332,7 +332,7 @@ class BaseUiLens(Generic[S, T, A, B]):
... prefix = old_state[:-1]
... return prefix + [target_sum - sum(prefix)]
...
- >>> average_lens = lens.getter_setter_(getter, setter)
+ >>> average_lens = lens.lens_(getter, setter)
>>> average_lens
UnboundLens(Lens(<function getter...>, <function setter...>))
>>> average_lens.get()([1, 2, 4, 5])
|
renamed getter_setter_ method to lens_
lets break everything while we're at it
a much better name
|
diff --git a/git/diff.py b/git/diff.py
index <HASH>..<HASH> 100644
--- a/git/diff.py
+++ b/git/diff.py
@@ -108,6 +108,7 @@ class Diffable(object):
args.append("-p")
else:
args.append("--raw")
+ args.append("-z")
# in any way, assure we don't see colored output,
# fixes https://github.com/gitpython-developers/GitPython/issues/172
@@ -483,7 +484,7 @@ class Diff(object):
if not line.startswith(":"):
return
- meta, _, path = line[1:].partition('\t')
+ meta, _, path = line[1:].partition('\x00')
old_mode, new_mode, a_blob_id, b_blob_id, _change_type = meta.split(None, 4)
# Change type can be R100
# R: status letter
|
Add '-z' on top of '--raw' to avoid path name mangling
Authored based on
<URL>
|
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java
index <HASH>..<HASH> 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java
@@ -197,7 +197,7 @@ public class RedisAutoConfigurationTests {
this.contextRunner
.withPropertyValues("spring.redis.database:1",
"spring.redis.sentinel.master:mymaster",
- "spring.redis.sentinel.nodes:127.0.0.1:26379, 127.0.0.1:26380")
+ "spring.redis.sentinel.nodes:127.0.0.1:26379, 127.0.0.1:26380")
.run((context) -> {
LettuceConnectionFactory connectionFactory = context
.getBean(LettuceConnectionFactory.class);
|
Polish "Add Redis Sentinel database support"
Closes gh-<I>
|
diff --git a/lib/email.js b/lib/email.js
index <HASH>..<HASH> 100644
--- a/lib/email.js
+++ b/lib/email.js
@@ -118,10 +118,7 @@ var send = exports.send = function(to, subject, text_body, html_body, from, doma
smtpTransport.sendMail(mailOptions, function(error, response){
if(error){
console.log("Error sending email:",error);
- }else{
- console.log("Email sent: " + response.message);
}
-
});
}
|
don't log successful email send message
|
diff --git a/Model/Service/TransactionHandlerService.php b/Model/Service/TransactionHandlerService.php
index <HASH>..<HASH> 100755
--- a/Model/Service/TransactionHandlerService.php
+++ b/Model/Service/TransactionHandlerService.php
@@ -574,7 +574,9 @@ class TransactionHandlerService
if ($transactionType && !empty($transactions)) {
$filteredResult = [];
foreach ($transactions as $transaction) {
- if ($transaction->getTxnType() == $transactionType && $transaction->getIsClosed() == $isClosed) {
+ $condition = $transaction->getTxnType() == $transactionType
+ && $transaction->getIsClosed() == $isClosed;
+ if ($condition) {
$filteredResult[] = $transaction;
}
}
|
Added code improvements in transaction handler service
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@ tests_require = [
"Contexts",
"fakeredis",
"freezegun",
- "HTTPretty",
+ "HTTPretty==0.8.10",
]
extras = {
|
repin httpretty
lost it after the merge
|
diff --git a/js/coinex.js b/js/coinex.js
index <HASH>..<HASH> 100644
--- a/js/coinex.js
+++ b/js/coinex.js
@@ -3870,9 +3870,9 @@ module.exports = class coinex extends Exchange {
path = this.implodeParams (path, params);
let url = this.urls['api'][api] + '/' + this.version + '/' + path;
let query = this.omit (params, this.extractParams (path));
- this.checkRequiredCredentials ();
const nonce = this.nonce ().toString ();
if (api === 'perpetualPrivate' || url === 'https://api.coinex.com/perpetual/v1/market/user_deals') {
+ this.checkRequiredCredentials ();
query = this.extend ({
'access_id': this.apiKey,
'timestamp': nonce,
@@ -3895,6 +3895,7 @@ module.exports = class coinex extends Exchange {
url += '?' + this.urlencode (query);
}
} else {
+ this.checkRequiredCredentials ();
query = this.extend ({
'access_id': this.apiKey,
'tonce': nonce,
|
check credentials only private #<I>
|
diff --git a/sos/plugins/rpm.py b/sos/plugins/rpm.py
index <HASH>..<HASH> 100644
--- a/sos/plugins/rpm.py
+++ b/sos/plugins/rpm.py
@@ -23,7 +23,13 @@ class Rpm(Plugin, RedHatPlugin):
option_list = [("rpmq", "queries for package information via rpm -q", "fast", True),
("rpmva", "runs a verify on all packages", "slow", False)]
- verify_list = [ 'kernel', 'glibc', 'pam_.*' ]
+ verify_list = [
+ 'kernel', 'glibc', 'initscripts',
+ 'pam_.*',
+ 'java.*', 'perl.*',
+ 'rpm', 'yum',
+ 'spacewalk.*',
+ ]
def setup(self):
self.add_copy_spec("/var/log/rpmpkgs")
|
Add new patterns to the RPM plug-in verify list
|
diff --git a/src/Repository.php b/src/Repository.php
index <HASH>..<HASH> 100644
--- a/src/Repository.php
+++ b/src/Repository.php
@@ -105,12 +105,10 @@ class Repository implements NamespacableInterface, \ArrayAccess
*/
protected function load($group, $namespace, $collection)
{
- $mode = $this->mode;
-
// Is it already loaded? If so, just return it.
if (isset($this->items[$collection])) return $this->items[$collection];
- $items = $this->loader->load($mode, $group, $namespace);
+ $items = $this->loader->load($this->mode, $group, $namespace);
return $this->items[$collection] = $items;
}
|
No need to assign mode to a variable in as we only really use it once
|
diff --git a/src/org/mozilla/javascript/ScriptRuntime.java b/src/org/mozilla/javascript/ScriptRuntime.java
index <HASH>..<HASH> 100644
--- a/src/org/mozilla/javascript/ScriptRuntime.java
+++ b/src/org/mozilla/javascript/ScriptRuntime.java
@@ -640,19 +640,6 @@ public class ScriptRuntime {
// A non-hexadecimal, non-infinity number:
// just try a normal floating point conversion
String sub = s.substring(start, end+1);
- if (MSJVM_BUG_WORKAROUNDS) {
- // The MS JVM will accept non-conformant strings
- // rather than throwing a NumberFormatException
- // as it should.
- for (int i=sub.length()-1; i >= 0; i--) {
- char c = sub.charAt(i);
- if (('0' <= c && c <= '9') || c == '.' ||
- c == 'e' || c == 'E' ||
- c == '+' || c == '-')
- continue;
- return NaN;
- }
- }
try {
return Double.valueOf(sub).doubleValue();
} catch (NumberFormatException ex) {
@@ -683,9 +670,6 @@ public class ScriptRuntime {
return result;
}
- /* Work around Microsoft Java VM bugs. */
- private final static boolean MSJVM_BUG_WORKAROUNDS = true;
-
public static String escapeString(String s)
{
return escapeString(s, '"');
|
Remove ancient workaround for MS JVM bug
|
diff --git a/pygal/test/test_graph.py b/pygal/test/test_graph.py
index <HASH>..<HASH> 100644
--- a/pygal/test/test_graph.py
+++ b/pygal/test/test_graph.py
@@ -19,6 +19,7 @@
import os
from pygal import Line
import pygal
+import uuid
def test_multi_render():
@@ -35,7 +36,7 @@ def test_multi_render():
def test_render_to_file():
- file_name = '/tmp/test_graph.svg'
+ file_name = '/tmp/test_graph-%s.svg' % uuid.uuid4()
if os.path.exists(file_name):
os.remove(file_name)
@@ -53,7 +54,7 @@ def test_render_to_png():
except ImportError:
return
- file_name = '/tmp/test_graph.png'
+ file_name = '/tmp/test_graph-%s.png' % uuid.uuid4()
if os.path.exists(file_name):
os.remove(file_name)
|
Add uuid to temp
|
diff --git a/sdk/src/com/socialize/util/DefaultAppUtils.java b/sdk/src/com/socialize/util/DefaultAppUtils.java
index <HASH>..<HASH> 100644
--- a/sdk/src/com/socialize/util/DefaultAppUtils.java
+++ b/sdk/src/com/socialize/util/DefaultAppUtils.java
@@ -32,7 +32,6 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
-import android.content.res.Resources;
import android.telephony.TelephonyManager;
import com.socialize.Socialize;
import com.socialize.SocializeService;
@@ -65,12 +64,11 @@ public class DefaultAppUtils implements AppUtils {
// Try to get the app name
try {
- Resources appR = context.getResources();
- CharSequence txt = appR.getText(appR.getIdentifier("app_name", "string", packageName));
- appName = txt.toString();
- }
+ PackageManager pkgManager = context.getPackageManager();
+ appName = pkgManager.getApplicationLabel(pkgManager.getApplicationInfo(packageName, 0)).toString();
+ }
catch (Exception e) {
- String msg = "Failed to locate app_name String from resources. Make sure this is specified in your AndroidManifest.xml";
+ String msg = "Failed to lookup application label. Make sure this is specified in your AndroidManifest.xml";
if(logger != null) {
logger.error(msg, e);
|
Fixed lookup of application name so that it gets it from the
PackageManager, instead of assuming it is stored in a String
resource called "app_name"
|
diff --git a/lib/transforms/subsetGoogleFonts.js b/lib/transforms/subsetGoogleFonts.js
index <HASH>..<HASH> 100644
--- a/lib/transforms/subsetGoogleFonts.js
+++ b/lib/transforms/subsetGoogleFonts.js
@@ -472,20 +472,16 @@ module.exports = function (options) {
});
}
- // Remove references to google font subset CSS files. Now replaced by local bundle
- fontStyleSheetRelations.forEach(function (relation) {
- if (relation.to.assetGraph) {
- assetGraph.removeAsset(relation.to, true);
- }
- });
-
});
- // assetGraph.findAssets({ type: 'Css', url: /subfont\/fonts-/ }).forEach(function (CssBundle) {
- // CssBundle.outgoingRelations.forEach(function (fontFaceSrc) {
- // fontFaceSrc.hrefType = 'relative';
- // });
- // });
+ // Remove references to google font subset CSS files. Now replaced by local bundle
+ googleFontSubsetCssRelations.forEach(function (deprecatedRelation) {
+ deprecatedRelation.detach();
+
+ if (deprecatedRelation.to.assetGraph) {
+ assetGraph.removeAsset(deprecatedRelation.to);
+ }
+ });
})
.queue(function asyncLoadOriginalGoogleFontCss(assetGraph) {
var googleFontStylesheets = assetGraph.findAssets({
|
Only remove relations to original google subset CSS once all work on them has been done
|
diff --git a/lib/acts_as_paranoid/validations.rb b/lib/acts_as_paranoid/validations.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_paranoid/validations.rb
+++ b/lib/acts_as_paranoid/validations.rb
@@ -18,7 +18,11 @@ module ActsAsParanoid
end
relation = build_relation(finder_class, table, attribute, value)
- relation = relation.and(table[finder_class.primary_key.to_sym].not_eq(record.send(:id))) if record.persisted?
+ if record.persisted?
+ [Array(finder_class.primary_key),Array(record.send(:id))].transpose.each do |pk_key, pk_value|
+ relation = relation.and(table[pk_key.to_sym].not_eq(pk_value))
+ end
+ end
Array.wrap(options[:scope]).each do |scope_item|
scope_value = record.send(scope_item)
|
corrected the uniqueness validation for models with composite primary keys
|
diff --git a/lib/themes_for_rails/version.rb b/lib/themes_for_rails/version.rb
index <HASH>..<HASH> 100644
--- a/lib/themes_for_rails/version.rb
+++ b/lib/themes_for_rails/version.rb
@@ -1,4 +1,4 @@
# encoding: utf-8
module ThemesForRails
- VERSION = "0.4.3"
+ VERSION = "0.5.0.pre"
end
\ No newline at end of file
|
Bumping version to <I>.pre
|
diff --git a/Swat/SwatTableView.php b/Swat/SwatTableView.php
index <HASH>..<HASH> 100644
--- a/Swat/SwatTableView.php
+++ b/Swat/SwatTableView.php
@@ -899,8 +899,22 @@ class SwatTableView extends SwatControl implements SwatUIParent
$tr_tag->close();
// display the row columns
- foreach ($this->row_columns as $column)
- $column->display($row);
+ $tr_tag = new SwatHtmlTag('tr');
+ $tr_tag->class = $this->getRowClass($row, $count);
+
+ if ($has_message)
+ $tr_tag->class = $tr_tag->class.' swat-error';
+
+ $tr_tag->class =
+ $tr_tag->class.' swat-table-view-row-column';
+
+ foreach ($this->row_columns as $column) {
+ if ($column->visible && $column->hasVisibleRenderer($row)) {
+ $tr_tag->open();
+ $column->display($row);
+ $tr_tag->close();
+ }
+ }
$this->displayRowMessages($row);
|
Table view is now responsible for displaying tr tags on table-view row columns.
svn commit r<I>
|
diff --git a/tests/config_test.py b/tests/config_test.py
index <HASH>..<HASH> 100644
--- a/tests/config_test.py
+++ b/tests/config_test.py
@@ -104,19 +104,25 @@ class TestConfigurationNamespace(object):
def test_get_config_dict(self):
self.namespace['one.two.three.four'] = 5
- self.namespace['a.b'] = 'c'
+ self.namespace['one.two.three.five'] = 'six'
+ self.namespace['one.b.cats'] = [1, 2, 3]
+ self.namespace['a.two'] = 'c'
self.namespace['first'] = True
d = self.namespace.get_config_dict()
assert_equal(d, {
'one': {
+ 'b': {
+ 'cats': [1, 2, 3],
+ },
'two': {
'three': {
'four': 5,
+ 'five': 'six',
},
},
},
'a': {
- 'b': 'c',
+ 'two': 'c',
},
'first': True,
})
|
Add overlapping keys to config_test.py::TestConfigurationNamespace::test_get_config_dict to ensure non-clobbery
|
diff --git a/jaraco/itertools.py b/jaraco/itertools.py
index <HASH>..<HASH> 100644
--- a/jaraco/itertools.py
+++ b/jaraco/itertools.py
@@ -711,9 +711,12 @@ def takewhile_peek(predicate, iterable):
[4]
"""
while True:
- if not predicate(iterable.peek()):
+ try:
+ if not predicate(iterable.peek()):
+ break
+ yield next(iterable)
+ except StopIteration:
break
- yield next(iterable)
def first(iterable, *args):
|
Fix error about StopIteration raised in generator.
|
diff --git a/lib/slather/coverage_file.rb b/lib/slather/coverage_file.rb
index <HASH>..<HASH> 100644
--- a/lib/slather/coverage_file.rb
+++ b/lib/slather/coverage_file.rb
@@ -31,7 +31,7 @@ module Slather
def gcov_data
@gcov_data ||= begin
- gcov_output = `gcov #{source_file_pathname} --object-directory #{gcno_file_pathname.parent}`
+ gcov_output = `gcov "#{source_file_pathname}" --object-directory "#{gcno_file_pathname.parent}"`
# Sometimes gcov makes gcov files for Cocoa Touch classes, like NSRange. Ignore and delete later.
gcov_files_created = gcov_output.scan(/creating '(.+\..+\.gcov)'/)
|
Wrap paths in quotes incase they contain spaces
|
diff --git a/wkhtmltopdf/__init__.py b/wkhtmltopdf/__init__.py
index <HASH>..<HASH> 100644
--- a/wkhtmltopdf/__init__.py
+++ b/wkhtmltopdf/__init__.py
@@ -3,5 +3,4 @@ if 'DJANGO_SETTINGS_MODULE' in os.environ:
from .utils import *
__author__ = 'Incuna Ltd'
-__version__ = '0.3'
-
+__version__ = '1.0-rc1'
|
Update version to <I>-rc1.
|
diff --git a/packages/ember-routing/lib/system/route.js b/packages/ember-routing/lib/system/route.js
index <HASH>..<HASH> 100644
--- a/packages/ember-routing/lib/system/route.js
+++ b/packages/ember-routing/lib/system/route.js
@@ -1878,7 +1878,8 @@ let Route = EmberObject.extend(ActionHandler, Evented, {
The string values provided for the template name, and controller
will eventually pass through to the resolver for lookup. See
Ember.Resolver for how these are mapped to JavaScript objects in your
- application.
+ application. The template to render into needs to be related to either the
+ current route or one of its ancestors.
Not all options need to be passed to `render`. Default values will be used
based on the name of the route specified in the router or the Route's
|
[DOC beta] Improve `Route#render` documentation
This PR makes explicit that render only accepts a live template
as its `into` option.
Fix #<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@ setup(
author='Blockstack.org',
author_email='support@blockstack.org',
description='Name registrations on the Bitcoin blockchain with external storage',
- long_description=README,
+ # long_description=README,
keywords='blockchain bitcoin btc cryptocurrency name key value store data',
packages=find_packages(),
scripts=['bin/blockstack-server', 'bin/blockstack-core', 'bin/blockstack-snapshots'],
|
disable long_description in setup.py since it inteferes with twine
|
diff --git a/plugin/kubernetes/kubernetes.go b/plugin/kubernetes/kubernetes.go
index <HASH>..<HASH> 100644
--- a/plugin/kubernetes/kubernetes.go
+++ b/plugin/kubernetes/kubernetes.go
@@ -284,8 +284,6 @@ func (k *Kubernetes) InitKubeCache(ctx context.Context) (onStart func() error, o
checkSyncTicker := time.NewTicker(100 * time.Millisecond)
defer checkSyncTicker.Stop()
for {
- timeoutTicker.Reset(timeout)
- logTicker.Reset(logDelay)
select {
case <-checkSyncTicker.C:
if k.APIConn.HasSynced() {
|
fix k8s start up timeout ticker (#<I>)
|
diff --git a/src/html/js/sg.js b/src/html/js/sg.js
index <HASH>..<HASH> 100644
--- a/src/html/js/sg.js
+++ b/src/html/js/sg.js
@@ -39,20 +39,18 @@
* ==================================================== */
let toggleSgMenuBar = function() {
- const navCookie = 'sgNavActive=false;path=/';
-
if (sgNavActive) {
this.classList.add('is-active');
sgNav.classList.add('is-hidden');
sgNavActive = false;
- document.cookie = navCookie;
+ document.cookie = 'sgNavActive=false;path=/';
} else {
this.classList.remove('is-active');
sgNav.classList.remove('is-hidden');
sgNavActive = true;
- document.cookie = navCookie;
+ document.cookie = 'sgNavActive=true;path=/';
}
for (let i = 0; i < sgNavBtn.length; i++) {
|
Constant for cookie name was a fail D:
|
diff --git a/tests/unit/states/boto_elb_test.py b/tests/unit/states/boto_elb_test.py
index <HASH>..<HASH> 100644
--- a/tests/unit/states/boto_elb_test.py
+++ b/tests/unit/states/boto_elb_test.py
@@ -97,21 +97,13 @@ class BotoElbTestCase(TestCase):
self.assertDictEqual(boto_elb.present
(name, listeners), ret)
- with patch.object(boto_elb, '_cnames_present',
+ with patch.object(boto_elb, '_alarms_present',
mock_elb_present):
- comt = (' ')
- ret.update({'comment': comt})
+ ret.update({'result': True})
self.assertDictEqual(boto_elb.present
(name, listeners,
alarms=alarms), ret)
- with patch.object(boto_elb, '_alarms_present',
- mock_elb_present):
- ret.update({'result': True})
- self.assertDictEqual(boto_elb.present
- (name, listeners,
- alarms=alarms), ret)
-
# 'absent' function tests: 1
def test_absent(self):
|
Remove cnames_present test
|
diff --git a/decl.go b/decl.go
index <HASH>..<HASH> 100644
--- a/decl.go
+++ b/decl.go
@@ -441,6 +441,8 @@ func checkForBuiltinFuncs(typ *ast.Ident, c *ast.CallExpr, scope *Scope) (ast.Ex
return e, scope
case "make":
return c.Args[0], scope
+ case "append":
+ return c.Args[0], scope
case "cmplx":
return ast.NewIdent("complex"), universeScope
case "closed":
@@ -1270,6 +1272,7 @@ func init() {
u.addNamedDecl(NewDeclTyped("iota", DECL_CONST, t, u))
u.addNamedDecl(NewDeclTyped("nil", DECL_CONST, t, u))
+ u.addNamedDecl(NewDeclTypedNamed("append", DECL_FUNC, "func([]type, ...type) []type", u))
u.addNamedDecl(NewDeclTypedNamed("cap", DECL_FUNC, "func(container) int", u))
u.addNamedDecl(NewDeclTypedNamed("close", DECL_FUNC, "func(channel)", u))
u.addNamedDecl(NewDeclTypedNamed("closed", DECL_FUNC, "func(channel) bool", u))
|
Add support for built-in 'append'.
|
diff --git a/src/components/SurveyForm/SurveyForm.js b/src/components/SurveyForm/SurveyForm.js
index <HASH>..<HASH> 100755
--- a/src/components/SurveyForm/SurveyForm.js
+++ b/src/components/SurveyForm/SurveyForm.js
@@ -29,7 +29,7 @@ function asyncValidate(data) {
export default
class SurveyForm extends Component {
static propTypes = {
- active: PropTypes.bool.isRequired,
+ active: PropTypes.string,
asyncValidating: PropTypes.bool.isRequired,
fields: PropTypes.object.isRequired,
dirty: PropTypes.bool.isRequired,
|
Fix Survey Form (active prop type)
The active propType should be a string a not required
|
diff --git a/src/main/java/org/graylog2/indexer/EmbeddedElasticSearchClient.java b/src/main/java/org/graylog2/indexer/EmbeddedElasticSearchClient.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/graylog2/indexer/EmbeddedElasticSearchClient.java
+++ b/src/main/java/org/graylog2/indexer/EmbeddedElasticSearchClient.java
@@ -340,6 +340,7 @@ public class EmbeddedElasticSearchClient {
// Sorry if this should ever go mad. Delete the index!
deleteIndex(indexName);
+ server.getMongoBridge().removeIndexDateRange(indexName);
}
}
|
Also update index ranges after retention cleaning
|
diff --git a/apitools/gen/client_generation_test.py b/apitools/gen/client_generation_test.py
index <HASH>..<HASH> 100644
--- a/apitools/gen/client_generation_test.py
+++ b/apitools/gen/client_generation_test.py
@@ -7,8 +7,7 @@ import shutil
import subprocess
import sys
import tempfile
-
-from google.apputils import basetest as googletest
+import unittest
from apitools.gen import util
@@ -31,7 +30,7 @@ def TempDir():
shutil.rmtree(path)
-class ClientGenerationTest(googletest.TestCase):
+class ClientGenerationTest(unittest.TestCase):
def setUp(self):
super(ClientGenerationTest, self).setUp()
@@ -73,4 +72,4 @@ class ClientGenerationTest(googletest.TestCase):
if __name__ == '__main__':
- googletest.main()
+ unittest.main()
|
Update one test to use unittest.
I'm likely to do this for all tests, but this one's a start.
|
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index <HASH>..<HASH> 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -9,7 +9,7 @@ import WebpackDevServer from 'webpack-dev-server';
gulp.task('default', ['webpack']);
gulp.task('babel', () => {
- return gulp.src(['src/*.js','src/*/*.js','example/*.js'])
+ return gulp.src(['src/*.js','src/*/*.js'])
.pipe(babel())
.pipe(gulp.dest('target'));
});
diff --git a/webpack.config.babel.js b/webpack.config.babel.js
index <HASH>..<HASH> 100644
--- a/webpack.config.babel.js
+++ b/webpack.config.babel.js
@@ -2,7 +2,7 @@ import path from 'path';
module.exports = {
entry: {
- index: './example/index.js'
+ index: './src/index.js'
},
module: {
loaders: [
|
Updated webpack and gulp config files
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -2,6 +2,8 @@ const webpack = require("webpack");
const path = require("path");
const env = require("yargs").argv.env; // use --env with webpack 2
const ClosureCompilerPlugin = require("webpack-closure-compiler");
+const pkg = require('./package.json');
+const year = new Date().getFullYear();
let libraryName = "luminous";
@@ -45,7 +47,12 @@ function buildWithEnv(mode, outputFile) {
},
test: /^(?!.*tests\.webpack).*$/,
concurrency: 3
- })
+ }),
+ new webpack.BannerPlugin({
+ banner:`Luminous v${pkg.version}
+Copyright 2015-${year}, Zebrafish Labs
+Licensed under BSD-2 (https://github.com/imgix/luminous/blob/main/LICENSE.md)`
+ }),
]
};
|
build(webpack): prepend license banner in minified JS files
|
diff --git a/intranet/settings/__init__.py b/intranet/settings/__init__.py
index <HASH>..<HASH> 100644
--- a/intranet/settings/__init__.py
+++ b/intranet/settings/__init__.py
@@ -469,7 +469,7 @@ REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
"PAGE_SIZE": 50,
"DEFAULT_AUTHENTICATION_CLASSES":
- ("intranet.apps.api.authentication.ApiBasicAuthentication", "rest_framework.authentication.SessionAuthentication",
+ ("intranet.apps.api.authentication.ApiBasicAuthentication",
"oauth2_provider.ext.rest_framework.OAuth2Authentication"),
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",)
}
|
Temporary Fix: Disable Session Auth for API
|
diff --git a/tests/test_websocket.py b/tests/test_websocket.py
index <HASH>..<HASH> 100644
--- a/tests/test_websocket.py
+++ b/tests/test_websocket.py
@@ -127,7 +127,6 @@ class TestWebsocketClient(unittest.TestCase):
self.assertEqual('Ontology Network ONT Token', response['Description'])
hex_contract_address = '1ddbb682743e9d9e2b71ff419e97a9358c5c4ee9'
response = await sdk.websocket.get_contract(hex_contract_address)
- self.assertEqual(True, response['NeedStorage'])
self.assertEqual('DINGXIN', response['Author'])
self.assertEqual('A sample of OEP4', response['Description'])
await sdk.websocket.close_connect()
|
remove unsed keyword (#<I>)
* fix bug
* remove unsed keyword
|
diff --git a/p2p/host/peerstore/addr_manager_ds.go b/p2p/host/peerstore/addr_manager_ds.go
index <HASH>..<HASH> 100644
--- a/p2p/host/peerstore/addr_manager_ds.go
+++ b/p2p/host/peerstore/addr_manager_ds.go
@@ -272,8 +272,8 @@ func newTTLManager(parent context.Context, d ds.Datastore, tick time.Duration) *
// To be called by TTL manager's coroutine only.
func (mgr *ttlmanager) tick() {
- mgr.RLock()
- defer mgr.RUnlock()
+ mgr.Lock()
+ defer mgr.Unlock()
now := time.Now()
batch, err := mgr.ds.Batch()
|
Acquire full lock when ticking ttlmanager
|
diff --git a/mutagen/musepack.py b/mutagen/musepack.py
index <HASH>..<HASH> 100644
--- a/mutagen/musepack.py
+++ b/mutagen/musepack.py
@@ -188,7 +188,7 @@ class MusepackInfo(StreamInfo):
remaining_size -= l1 + l2
data = fileobj.read(remaining_size)
- if len(data) != remaining_size:
+ if len(data) != remaining_size or len(data) < 2:
raise MusepackHeaderError("SH packet ended unexpectedly.")
self.sample_rate = RATES[bytearray(data)[0] >> 5]
self.channels = (bytearray(data)[1] >> 4) + 1
|
musepack: handle truncated stream header
|
diff --git a/lib/ErrorHandler.js b/lib/ErrorHandler.js
index <HASH>..<HASH> 100644
--- a/lib/ErrorHandler.js
+++ b/lib/ErrorHandler.js
@@ -1,7 +1,8 @@
module.exports = (error, req, res, next) => {
const details = reason(error);
+ console.error(details);
- if (error.code && error.code >= 300 && error.code <= 500)
+ if (error.code)
return res.status(error.code).send(details);
if (process.env.NODE_ENV !== 'production') {
|
fixed error handler where standard wasn't use properly
|
diff --git a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/ResultCache.java b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/ResultCache.java
index <HASH>..<HASH> 100644
--- a/languagetool-office-extension/src/main/java/org/languagetool/openoffice/ResultCache.java
+++ b/languagetool-office-extension/src/main/java/org/languagetool/openoffice/ResultCache.java
@@ -82,11 +82,11 @@ class ResultCache {
Map<Integer, CacheSentenceEntries> tmpEntries = entries;
entries = new HashMap<>();
- for(int i : entries.keySet()) {
+ for(int i : tmpEntries.keySet()) {
if(i > lastParagraph) {
- entries.put(i + shift, entries.get(i));
+ entries.put(i + shift, tmpEntries.get(i));
} else {
- entries.put(i, entries.get(i));
+ entries.put(i, tmpEntries.get(i));
}
}
}
|
[LO extension] fixed bug in cache management
|
diff --git a/examples/with-redux-saga/store.js b/examples/with-redux-saga/store.js
index <HASH>..<HASH> 100644
--- a/examples/with-redux-saga/store.js
+++ b/examples/with-redux-saga/store.js
@@ -1,11 +1,9 @@
-import { createStore, applyMiddleware } from 'redux'
+import { applyMiddleware, createStore } from 'redux'
import createSagaMiddleware from 'redux-saga'
import rootReducer, { exampleInitialState } from './reducer'
import rootSaga from './saga'
-const sagaMiddleware = createSagaMiddleware()
-
const bindMiddleware = middleware => {
if (process.env.NODE_ENV !== 'production') {
const { composeWithDevTools } = require('redux-devtools-extension')
@@ -15,17 +13,15 @@ const bindMiddleware = middleware => {
}
function configureStore (initialState = exampleInitialState) {
+ const sagaMiddleware = createSagaMiddleware()
const store = createStore(
rootReducer,
initialState,
bindMiddleware([sagaMiddleware])
)
- store.runSagaTask = () => {
- store.sagaTask = sagaMiddleware.run(rootSaga)
- }
+ store.sagaTask = sagaMiddleware.run(rootSaga)
- store.runSagaTask()
return store
}
|
recreate stdChannel (or saga middleware). (#<I>)
|
diff --git a/tornado/httpserver.py b/tornado/httpserver.py
index <HASH>..<HASH> 100644
--- a/tornado/httpserver.py
+++ b/tornado/httpserver.py
@@ -113,6 +113,7 @@ class HTTPServer(object):
self.xheaders = xheaders
self.ssl_options = ssl_options
self._socket = None
+ self._started = False
def listen(self, port, address=""):
"""Binds to the given port and starts the server in a single process.
@@ -156,6 +157,8 @@ class HTTPServer(object):
Since we run use processes and not threads, there is no shared memory
between any server code.
"""
+ assert not self._started
+ self._started = True
if num_processes is None:
# Use sysconf to detect the number of CPUs (cores)
try:
|
Add basic error checking so you can't add a server to the IOLoop twice
|
diff --git a/client/state/sites/actions.js b/client/state/sites/actions.js
index <HASH>..<HASH> 100644
--- a/client/state/sites/actions.js
+++ b/client/state/sites/actions.js
@@ -15,6 +15,10 @@ import {
SITES_REQUEST_SUCCESS,
SITES_REQUEST_FAILURE
} from 'state/action-types';
+import {
+ bumpStat,
+ recordTracksEvent,
+} from 'state/analytics/actions';
import { omit } from 'lodash';
/**
@@ -112,12 +116,18 @@ export function setFrontPage( siteId, pageId ) {
};
return wpcom.undocumented().setSiteHomepageSettings( siteId, requestData ).then( () => {
+ dispatch( recordTracksEvent( 'calypso_front_page_set', {
+ siteId,
+ pageId,
+ } ) );
+ dispatch( bumpStat( 'calypso_front_page_set', 'success' ) );
dispatch( {
type: SITE_FRONT_PAGE_SET_SUCCESS,
siteId,
pageId
} );
} ).catch( ( error ) => {
+ dispatch( bumpStat( 'calypso_front_page_set', 'failure' ) );
dispatch( {
type: SITE_FRONT_PAGE_SET_FAILURE,
siteId,
|
Pages: record Tracks and bump stat on homepage change (#<I>)
|
diff --git a/codec-stomp/src/main/java/io/netty/handler/codec/stomp/DefaultStompFrame.java b/codec-stomp/src/main/java/io/netty/handler/codec/stomp/DefaultStompFrame.java
index <HASH>..<HASH> 100644
--- a/codec-stomp/src/main/java/io/netty/handler/codec/stomp/DefaultStompFrame.java
+++ b/codec-stomp/src/main/java/io/netty/handler/codec/stomp/DefaultStompFrame.java
@@ -94,7 +94,7 @@ public class DefaultStompFrame extends DefaultStompHeadersSubframe implements St
@Override
public String toString() {
- return "DefaultFullStompFrame{" +
+ return "DefaultStompFrame{" +
"command=" + command +
", headers=" + headers +
", content=" + content.toString(CharsetUtil.UTF_8) +
|
[#<I>] Fix typo in DefaultStompFrame.toString() method.
Motivation:
DefaultStompFrame.toString() implementations returned a String that contained DefaultFullStompFrame.
Modifications:
Replace DefaultFullStompFrame with DefaultStompFrame.
Result:
Less confusing and more correct return value of toString()
|
diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go
index <HASH>..<HASH> 100644
--- a/lnwallet/wallet.go
+++ b/lnwallet/wallet.go
@@ -189,7 +189,7 @@ type addCounterPartySigsMsg struct {
type LightningWallet struct {
// This mutex is to be held when generating external keys to be used
// as multi-sig, and commitment keys within the channel.
- keyGenMtx sync.RWMutex
+ KeyGenMtx sync.RWMutex
// This mutex MUST be held when performing coin selection in order to
// avoid inadvertently creating multiple funding transaction which
@@ -940,8 +940,8 @@ func (l *LightningWallet) handleFundingCounterPartySigs(msg *addCounterPartySigs
// transaction's outputs.
// TODO(roasbeef): on shutdown, write state of pending keys, then read back?
func (l *LightningWallet) getNextRawKey() (*btcec.PrivateKey, error) {
- l.keyGenMtx.Lock()
- defer l.keyGenMtx.Unlock()
+ l.KeyGenMtx.Lock()
+ defer l.KeyGenMtx.Unlock()
nextAddr, err := l.Manager.NextExternalAddresses(waddrmgr.DefaultAccountNum, 1)
if err != nil {
|
lnwallet: make KeyGenMtx public, roc server needs to synchronize
|
diff --git a/fcrepo-http-api/src/main/java/org/fcrepo/http/api/ViewAssets.java b/fcrepo-http-api/src/main/java/org/fcrepo/http/api/ViewAssets.java
index <HASH>..<HASH> 100644
--- a/fcrepo-http-api/src/main/java/org/fcrepo/http/api/ViewAssets.java
+++ b/fcrepo-http-api/src/main/java/org/fcrepo/http/api/ViewAssets.java
@@ -39,7 +39,7 @@ public class ViewAssets {
*/
@GET
@Path("common.css")
- @Produces("text/css")
+ @Produces({"text/css", "*/*"})
public Response getViewCss() {
return ok().entity(this.getClass().getResourceAsStream(StreamingBaseHtmlProvider.commonCssLocation)).build();
}
@@ -50,7 +50,7 @@ public class ViewAssets {
*/
@GET
@Path("common.js")
- @Produces("text/javascript")
+ @Produces({"text/javascript", "*/*"})
public Response getViewJs() {
return ok().entity(this.getClass().getResourceAsStream(StreamingBaseHtmlProvider.commonJsLocation)).build();
}
|
Added support for wildcard accept headers to accomodate deficiencies in HtmlUnit web client.
|
diff --git a/xchange-bitbay/src/main/java/org/knowm/xchange/bitbay/BitbayExchange.java b/xchange-bitbay/src/main/java/org/knowm/xchange/bitbay/BitbayExchange.java
index <HASH>..<HASH> 100644
--- a/xchange-bitbay/src/main/java/org/knowm/xchange/bitbay/BitbayExchange.java
+++ b/xchange-bitbay/src/main/java/org/knowm/xchange/bitbay/BitbayExchange.java
@@ -16,8 +16,8 @@ public class BitbayExchange extends BaseExchange implements Exchange {
public ExchangeSpecification getDefaultExchangeSpecification() {
ExchangeSpecification exchangeSpecification = new ExchangeSpecification(this.getClass().getCanonicalName());
- exchangeSpecification.setSslUri("https://market.bitbay.pl/API/Public");
- exchangeSpecification.setHost("bitbay.pl");
+ exchangeSpecification.setSslUri("https://bitbay.net/API/Public");
+ exchangeSpecification.setHost("bitbay.net");
exchangeSpecification.setPort(80);
exchangeSpecification.setExchangeName("Bitbay");
exchangeSpecification.setExchangeDescription("Bitbay is a Bitcoin exchange based in Katowice, Poland.");
|
BitBay API host name changed from <URL>
|
diff --git a/lib/rails_sortable/version.rb b/lib/rails_sortable/version.rb
index <HASH>..<HASH> 100644
--- a/lib/rails_sortable/version.rb
+++ b/lib/rails_sortable/version.rb
@@ -1,3 +1,3 @@
module RailsSortable
- VERSION = '1.1.1'
+ VERSION = '1.1.2'
end
|
Bump up version to <I>
|
diff --git a/src/network/index.js b/src/network/index.js
index <HASH>..<HASH> 100644
--- a/src/network/index.js
+++ b/src/network/index.js
@@ -47,14 +47,12 @@ module.exports = class Network {
}
_onConnection (conn) {
+ log('connected')
pull(
conn,
lp.decode(),
- pull.collect((err, msgs) => msgs.forEach((data) => {
+ pull.through((data) => {
log('raw message', data)
- if (err) {
- return this.bitswap._receiveError(err)
- }
let msg
try {
msg = Message.fromProto(data)
@@ -67,7 +65,12 @@ module.exports = class Network {
}
this.bitswap._receiveMessage(peerInfo.id, msg)
})
- }))
+ }),
+ pull.onEnd((err) => {
+ if (err) {
+ return this.bitswap._receiveError(err)
+ }
+ })
)
}
@@ -105,6 +108,7 @@ module.exports = class Network {
}
this.libp2p.dialByPeerInfo(peerInfo, PROTOCOL_IDENTIFIER, (err, conn) => {
+ log('dialed %s', peerInfo.id.toB58String(), err)
if (err) {
return cb(err)
}
|
fix(network): correct msg processing
|
diff --git a/test/AbstractContextTest.php b/test/AbstractContextTest.php
index <HASH>..<HASH> 100644
--- a/test/AbstractContextTest.php
+++ b/test/AbstractContextTest.php
@@ -39,7 +39,7 @@ abstract class AbstractContextTest extends TestCase {
$context->start();
- $this->assertRunTimeLessThan([$context, 'kill'], 100);
+ $this->assertRunTimeLessThan([$context, 'kill'], 250);
$this->assertFalse($context->isRunning());
}
diff --git a/test/Worker/AbstractWorkerTest.php b/test/Worker/AbstractWorkerTest.php
index <HASH>..<HASH> 100644
--- a/test/Worker/AbstractWorkerTest.php
+++ b/test/Worker/AbstractWorkerTest.php
@@ -81,7 +81,7 @@ abstract class AbstractWorkerTest extends TestCase {
$worker = $this->createWorker();
$worker->start();
- $this->assertRunTimeLessThan([$worker, 'kill'], 200);
+ $this->assertRunTimeLessThan([$worker, 'kill'], 250);
$this->assertFalse($worker->isRunning());
}
}
|
Allow more time for kill
Threads only check once every <I> ms.
|
diff --git a/Eloquent/Builder.php b/Eloquent/Builder.php
index <HASH>..<HASH> 100755
--- a/Eloquent/Builder.php
+++ b/Eloquent/Builder.php
@@ -1237,6 +1237,19 @@ class Builder
}
/**
+ * Set the relationships that should be eager loaded while removing any previously added eager loading specifications.
+ *
+ * @param mixed $relations
+ * @return $this
+ */
+ public function withOnly($relations)
+ {
+ $this->eagerLoad = [];
+
+ return $this->with($relations);
+ }
+
+ /**
* Create a new instance of the model being queried.
*
* @param array $attributes
|
[8.x] Add withOnly method (#<I>)
* Added in new withOnly method + tests
* Refactored function
* Update Builder.php
|
diff --git a/src/connection.js b/src/connection.js
index <HASH>..<HASH> 100644
--- a/src/connection.js
+++ b/src/connection.js
@@ -1542,7 +1542,7 @@ export class Connection {
const id = ++this._slotSubscriptionCounter;
this._slotSubscriptions[id] = {
callback,
- subscriptionId: id,
+ subscriptionId: null,
};
this._updateSubscriptions();
return id;
|
fix: broken rpc slot change subscription
|
diff --git a/spec/mongoid/criteria_spec.rb b/spec/mongoid/criteria_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/mongoid/criteria_spec.rb
+++ b/spec/mongoid/criteria_spec.rb
@@ -2222,7 +2222,7 @@ describe Mongoid::Criteria do
context "when the criteria has limiting options" do
let!(:criteria) do
- Game.includes(:person).asc(:_id).limit(1).entries
+ Game.where(id: game_one.id).includes(:person).asc(:_id).limit(1).entries
end
it "returns the correct documents" do
|
Ensure we get back the exact game
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -33,6 +33,14 @@ setup(
'jinja2',
'arrow'
],
+ entry_points={
+ 'cookiecutter_ext': [
+ 'TimeExtension = jinja2_time:TimeExtension',
+ ],
+ 'cookiecutter_filter': [
+ 'year = jinja2_time:year',
+ ],
+ },
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
|
Set up entry_points for cookiecutter
|
diff --git a/etc/config.php b/etc/config.php
index <HASH>..<HASH> 100644
--- a/etc/config.php
+++ b/etc/config.php
@@ -14,7 +14,7 @@ $conf['db']['default']['charset'] = 'utf8';
$conf['db']['tests'] = $conf['db']['default'];
$conf['db']['tests']['database'] = 'psc-cms_tests';
-if (\Psc\PSC::isTravis()) {
+if (getenv('TRAVIS') === 'true') {
$conf['db']['default']['user'] = $conf['db']['tests']['user'] = 'root';
$conf['db']['default']['password'] = $conf['db']['tests']['password'] = '';
}
|
make config loadable by webforge
|
diff --git a/mixins/sync.js b/mixins/sync.js
index <HASH>..<HASH> 100644
--- a/mixins/sync.js
+++ b/mixins/sync.js
@@ -41,7 +41,7 @@ function sync(local, remote, ref, depth, callback) {
if (typeof type !== "string") throw new TypeError("type must be string");
if (typeof hash !== "string") throw new TypeError("hash must be string");
if (hasCache[hash]) return callback(null, true);
- local.hasHash(type, hash, function (err, has) {
+ local.hasHash(hash, function (err, has) {
if (err) return callback(err);
hasCache[hash] = has;
callback(null, has);
|
hasHash no longer has type argument
|
diff --git a/embed_video/backends.py b/embed_video/backends.py
index <HASH>..<HASH> 100644
--- a/embed_video/backends.py
+++ b/embed_video/backends.py
@@ -356,7 +356,7 @@ class VimeoBackend(VideoBackend):
re_detect = re.compile(r"^((http(s)?:)?//)?(www\.)?(player\.)?vimeo\.com/.*", re.I)
re_code = re.compile(
- r"""vimeo\.com/(video/)?(channels/(.*/)?)?((.+)/review/?)?(?P<code>[0-9]+)""", re.I
+ r"""vimeo\.com/(video/)?(channels/(.*/)?)?((.+)/review/)?(?P<code>[0-9]+)""", re.I
)
pattern_url = "{protocol}://player.vimeo.com/video/{code}"
pattern_info = "{protocol}://vimeo.com/api/v2/video/{code}.json"
|
Make trailing slash after 'review' in Vimeo URL pattern required.
|
diff --git a/support/test-runner/public/javascript/runner.js b/support/test-runner/public/javascript/runner.js
index <HASH>..<HASH> 100644
--- a/support/test-runner/public/javascript/runner.js
+++ b/support/test-runner/public/javascript/runner.js
@@ -1,6 +1,6 @@
// useful globals
-var currentSuite, currentCase;
+var currentSuite, currentCase, testsList;
// loads common.js module
function load (test, fn) {
@@ -21,7 +21,8 @@ function run () {
if (tests.length) {
// load dom
- $('body').append('<ul class="test-list">');
+ testsList = $('<ul class="test-list">');
+ $('body').append(testsList)
// run suites
suite(tests[i], function check (res) {
@@ -64,7 +65,7 @@ function suite (file, fn) {
$('<span class="name">').append(
$('<a>').attr('href', '/test/' + file).text(file)
)
- ).appendTo('.test-list');
+ ).appendTo(testsList);
// dynamically load module
load(file, function (suite) {
|
Fixed test runner on IE6/7. Odd jquery bug
|
diff --git a/test/macros/net.js b/test/macros/net.js
index <HASH>..<HASH> 100644
--- a/test/macros/net.js
+++ b/test/macros/net.js
@@ -61,6 +61,9 @@ exports.shouldSendData = function (options, nested) {
if (nested) {
Object.keys(nested).forEach(function (vow) {
+ if(!context.hasOwnProperty('after data is sent')) {
+ context['after data is sent'] = {};
+ }
context['after data is sent'][vow] = nested[vow];
});
}
@@ -201,4 +204,4 @@ exports.shouldDuplexBoth = function (options, nested) {
producers: options.producers
}, nested)
};
-};
\ No newline at end of file
+};
|
[fix] Ensure key exists before attempting to add methods to object in should send data macro
|
diff --git a/src/OpenSSL/_util.py b/src/OpenSSL/_util.py
index <HASH>..<HASH> 100644
--- a/src/OpenSSL/_util.py
+++ b/src/OpenSSL/_util.py
@@ -1,3 +1,4 @@
+import os
import sys
import warnings
@@ -89,19 +90,19 @@ def native(s):
def path_string(s):
"""
- Convert a Python string to a :py:class:`bytes` string identifying the same
+ Convert a Python path to a :py:class:`bytes` string identifying the same
path and which can be passed into an OpenSSL API accepting a filename.
- :param s: An instance of :py:class:`bytes` or :py:class:`unicode`.
+ :param s: A path (valid for os.fspath).
:return: An instance of :py:class:`bytes`.
"""
- if isinstance(s, bytes):
- return s
- elif isinstance(s, str):
- return s.encode(sys.getfilesystemencoding())
+ strpath = os.fspath(s) # returns str or bytes
+
+ if isinstance(strpath, str):
+ return strpath.encode(sys.getfilesystemencoding())
else:
- raise TypeError("Path must be represented as bytes or unicode string")
+ return strpath
def byte_string(s):
|
Accept pathlib.Path as a valid path (#<I>)
And also whatever supports the protocol.
Way more pythonic now!
|
diff --git a/opal/action_pack/action_controller.rb b/opal/action_pack/action_controller.rb
index <HASH>..<HASH> 100644
--- a/opal/action_pack/action_controller.rb
+++ b/opal/action_pack/action_controller.rb
@@ -82,6 +82,7 @@ class ActionController
@__locals = name_or_options[:locals]
@renderer.locals = name_or_options[:locals]
build_render_path(top_level)
+ # Application.instance.render_is_done(false)
else
# puts "in render: is NOT top_level"
build_render_path("dummy")
@@ -121,7 +122,12 @@ class ActionController
end
def build_render_path(name)
- @render_path = @application.view_root + "/" + view_path + "/" + name
+ if name =~ /^layouts\//
+ @render_path = @application.view_root + "/" + name
+ else
+ @render_path = @application.view_root + "/" + view_path + "/" + name
+ end
+ logger.debug "render path = #{@render_path}, #{@application.view_root} / #{view_path} / #{name}"
end
def view_path
|
handle views that start with layouts for non-relative paths
|
diff --git a/src/ArrowDirectionMixin.js b/src/ArrowDirectionMixin.js
index <HASH>..<HASH> 100644
--- a/src/ArrowDirectionMixin.js
+++ b/src/ArrowDirectionMixin.js
@@ -198,8 +198,12 @@ function ArrowDirectionMixin(Base) {
rightToLeft ?
'rotateZ(180deg)' :
'';
- this[internal.ids].arrowIconPrevious.style.transform = transform;
- this[internal.ids].arrowIconNext.style.transform = transform;
+ if (this[internal.ids].arrowIconPrevious) {
+ this[internal.ids].arrowIconPrevious.style.transform = transform;
+ }
+ if (this[internal.ids].arrowIconNext) {
+ this[internal.ids].arrowIconNext.style.transform = transform;
+ }
}
// Disable the previous/next buttons if we can't go in those directions.
|
Check to see if arrow icons are actually being used before trying to style them.
|
diff --git a/type_map.go b/type_map.go
index <HASH>..<HASH> 100644
--- a/type_map.go
+++ b/type_map.go
@@ -1,3 +1,5 @@
+// +build !gccgo
+
package reflect2
import (
|
#6, #9: TypeByName/TypeByPackageName use a hack that only works with gcgo and doesn't work with gccgo. Disabling compilation of type_map.go for gccgo.
|
diff --git a/slave/setup.py b/slave/setup.py
index <HASH>..<HASH> 100755
--- a/slave/setup.py
+++ b/slave/setup.py
@@ -133,9 +133,10 @@ else:
'pyflakes',
],
}
- setup_args['setup_requires'] = [
- 'setuptools_trial',
- ]
+ if '--help-commands' in sys.argv or 'trial' in sys.argv or 'test' in sys.argv:
+ setup_args['setup_requires'] = [
+ 'setuptools_trial',
+ ]
if os.getenv('NO_INSTALL_REQS'):
setup_args['install_requires'] = None
|
require setuptools_trial on slave only if tests/help command requested
|
diff --git a/lspreader/flds.py b/lspreader/flds.py
index <HASH>..<HASH> 100644
--- a/lspreader/flds.py
+++ b/lspreader/flds.py
@@ -9,7 +9,7 @@ def rect(d,s=None):
if key not in dims ];
shape = [ len( np.unique(d[l]) )
for l in dims ];
- if not s:
+ if s is not None:
s = np.lexsort((d['z'],d['y'],d['x']));
for l in labels:
d[l] = d[l][s].reshape(shape);
|
flds.py fix, we need testing
|
diff --git a/safe/storage/test_io.py b/safe/storage/test_io.py
index <HASH>..<HASH> 100644
--- a/safe/storage/test_io.py
+++ b/safe/storage/test_io.py
@@ -677,7 +677,7 @@ class Test_IO(unittest.TestCase):
V_ref = V.get_topN('FLOOR_AREA', 5)
geometry = V_ref.get_geometry()
- data = V_ref.get_data()
+ #data = V_ref.get_data()
projection = V_ref.get_projection()
# Create new attributes with a range of types
@@ -698,7 +698,6 @@ class Test_IO(unittest.TestCase):
D[key] = values[j]
else:
D[key] = values[j]
-
data.append(D)
# Create new object from test data
@@ -710,9 +709,13 @@ class Test_IO(unittest.TestCase):
V_tmp = read_layer(tmp_filename)
- #print V_new.get_data()
- #print V_tmp.get_data()
+ #print V_new.get_data()[1]
+ #print V_tmp.get_data()[1]
+ assert V_tmp.projection == V_new.projection
+ assert numpy.allclose(V_tmp.geometry, V_new.geometry)
+ assert V_tmp.data == V_new.data
+ assert V_tmp.get_data() == V_new.get_data()
assert V_tmp == V_new
assert not V_tmp != V_new
|
Debugging test that failed at GEM code sprint
|
diff --git a/src/main/resources/META-INF/resources/primefaces/schedule/1-schedule.js b/src/main/resources/META-INF/resources/primefaces/schedule/1-schedule.js
index <HASH>..<HASH> 100644
--- a/src/main/resources/META-INF/resources/primefaces/schedule/1-schedule.js
+++ b/src/main/resources/META-INF/resources/primefaces/schedule/1-schedule.js
@@ -78,7 +78,9 @@ PrimeFaces.widget.Schedule = PrimeFaces.widget.DeferredWidget.extend({
this.cfg.eventClick = function(calEvent, jsEvent, view) {
if (calEvent.url) {
- window.open(calEvent.url, $this.cfg.urlTarget);
+ var targetWindow = window.open('', $this.cfg.urlTarget);
+ targetWindow.opener = null;
+ targetWindow.location = calEvent.url;
return false;
}
|
fix: schedule: URL events enable phishing attacks (#<I>)
|
diff --git a/state/testing/suite.go b/state/testing/suite.go
index <HASH>..<HASH> 100644
--- a/state/testing/suite.go
+++ b/state/testing/suite.go
@@ -27,6 +27,7 @@ type StateSuite struct {
NewPolicy state.NewPolicyFunc
Controller *state.Controller
State *state.State
+ StatePool *state.StatePool
IAASModel *state.IAASModel
Owner names.UserTag
Factory *factory.Factory
@@ -65,6 +66,10 @@ func (s *StateSuite) SetUpTest(c *gc.C) {
s.State.Close()
s.Controller.Close()
})
+
+ s.StatePool = state.NewStatePool(s.State)
+ s.AddCleanup(func(*gc.C) { s.StatePool.Close() })
+
im, err := s.State.IAASModel()
c.Assert(err, jc.ErrorIsNil)
s.IAASModel = im
|
state/testing: Add a StatePool to StateSuite
This will be useful in a number of tests.
|
diff --git a/source/DatePicker.js b/source/DatePicker.js
index <HASH>..<HASH> 100644
--- a/source/DatePicker.js
+++ b/source/DatePicker.js
@@ -167,9 +167,9 @@ enyo.kind({
this.refresh();
},
disabledChanged: function() {
- this.yearPickerButton.setDisabled(this.disabled);
- this.monthPickerButton.setDisabled(this.disabled);
- this.dayPickerButton.setDisabled(this.disabled);
+ this.$.yearPickerButton.setDisabled(this.disabled);
+ this.$.monthPickerButton.setDisabled(this.disabled);
+ this.$.dayPickerButton.setDisabled(this.disabled);
},
updateDay: function(inSender, inEvent){
var date = this.calcDate(this.value.getFullYear(),
|
Update source/DatePicker.js
Fix problem where disabledChanged didn't use $ to find items in the hash, reported on forums at <URL>
|
diff --git a/test/httpstress_test.go b/test/httpstress_test.go
index <HASH>..<HASH> 100644
--- a/test/httpstress_test.go
+++ b/test/httpstress_test.go
@@ -51,7 +51,10 @@ func TestStressHTTP(t *testing.T) {
tc := &tls.Config{InsecureSkipVerify: true}
tr := &http.Transport{
- TLSClientConfig: tc,
+ TLSClientConfig: tc,
+ DisableKeepAlives: true,
+ ResponseHeaderTimeout: time.Second,
+ TLSHandshakeTimeout: time.Second,
}
client := &http.Client{
Transport: tr,
|
Slightly more robust HTTP stress test
|
diff --git a/prow/plugins/cla/cla.go b/prow/plugins/cla/cla.go
index <HASH>..<HASH> 100644
--- a/prow/plugins/cla/cla.go
+++ b/prow/plugins/cla/cla.go
@@ -43,7 +43,8 @@ It may take a couple minutes for the CLA signature to be fully registered; after
- If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your [email is set on your git commits](https://help.github.com/articles/setting-your-email-in-git/).
- If you signed the CLA as a corporation, please sign in with your organization's credentials at <https://identity.linuxfoundation.org/projects/cncf> to be authorized.
-- If you have done the above and are still having issues with the CLA being reported as unsigned, please email the CNCF helpdesk: helpdesk@rt.linuxfoundation.org
+- If you have done the above and are still having issues with the CLA being reported as unsigned, please log a ticket with the Linux Foundation Helpdesk: <https://support.linuxfoundation.org/>
+- Should you encounter any issues with the Linux Foundation Helpdesk, send a message to the backup e-mail support address at: login-issues@jira.linuxfoundation.org
<!-- need_sender_cla -->
|
Update CLA message with LF helpdesk information.
|
diff --git a/gitconsensus/repository.py b/gitconsensus/repository.py
index <HASH>..<HASH> 100644
--- a/gitconsensus/repository.py
+++ b/gitconsensus/repository.py
@@ -228,7 +228,7 @@ class PullRequest:
def shouldClose(self):
if 'timeout' in self.repository.rules:
- if self.hoursSinceLastCommit() >= self.repository.rules['timeout']:
+ if self.hoursSinceLastUpdate() >= self.repository.rules['timeout']:
return True
return False
|
Fix `shouldClose` to use time since last update, not last commit
|
diff --git a/client/src/main/java/io/pravega/client/batch/impl/BatchClientImpl.java b/client/src/main/java/io/pravega/client/batch/impl/BatchClientImpl.java
index <HASH>..<HASH> 100644
--- a/client/src/main/java/io/pravega/client/batch/impl/BatchClientImpl.java
+++ b/client/src/main/java/io/pravega/client/batch/impl/BatchClientImpl.java
@@ -113,12 +113,7 @@ public class BatchClientImpl implements BatchClient {
private CompletableFuture<StreamCut> fetchHeadStreamCut(final Stream stream) {
//Fetch segments pointing to the current HEAD of the stream.
return controller.getSegmentsAtTime(new StreamImpl(stream.getScope(), stream.getStreamName()), 0L)
- .thenApply( s -> {
- //fetch the correct start offset from Segment store.
- Map<Segment, Long> pos = s.keySet().stream().map(this::segmentToInfo)
- .collect(Collectors.toMap(SegmentInfo::getSegment, SegmentInfo::getStartingOffset));
- return new StreamCutImpl(stream, pos);
- });
+ .thenApply( s -> new StreamCutImpl(stream, s));
}
private CompletableFuture<StreamCut> fetchTailStreamCut(final Stream stream) {
|
Issue <I>: Remove duplicative logic of fetching offsets for a stream head. (#<I>)
* Remove duplicate logic of fetching offsets for a Stream Head.
|
diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/HttpFoundation/Request.php
+++ b/src/Symfony/Component/HttpFoundation/Request.php
@@ -757,12 +757,11 @@ class Request
$clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP])));
$clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from
- $trustedProxies = !self::$trustedProxies ? array($ip) : self::$trustedProxies;
$ip = $clientIps[0]; // Fallback to this when the client IP falls into the range of trusted proxies
// Eliminate all IPs from the forwarded IP chain which are trusted proxies
foreach ($clientIps as $key => $clientIp) {
- if (IpUtils::checkIp($clientIp, $trustedProxies)) {
+ if (IpUtils::checkIp($clientIp, self::$trustedProxies)) {
unset($clientIps[$key]);
}
}
|
Removed useless check if self::$trustProxies is set
In Request::getClientIps() on line <I> there is a check if self::$trustedProxies is not set. If this condition evaluates to true the method will return.
Because of this the second identical check on line <I> will never evaluate to true, as when reaching this position self::$trustedProxies must be set.
|
diff --git a/pmxbot/storage.py b/pmxbot/storage.py
index <HASH>..<HASH> 100644
--- a/pmxbot/storage.py
+++ b/pmxbot/storage.py
@@ -35,7 +35,7 @@ class SelectableStorage(object):
@classmethod
def from_URI(cls, URI):
- candidates = itersubclasses(cls)
+ candidates = reversed(list(itersubclasses(cls)))
if hasattr(cls, 'scheme'):
candidates = itertools.chain([cls], candidates)
matches = (cls for cls in candidates if cls.uri_matches(URI))
|
Prefer the most specialized implementation for which uri_matches passes.
|
diff --git a/lib/fog/bin/aws.rb b/lib/fog/bin/aws.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/bin/aws.rb
+++ b/lib/fog/bin/aws.rb
@@ -29,6 +29,8 @@ class AWS < Fog::Bin
Fog::Storage::AWS
when :rds
Fog::AWS::RDS
+ when :sns
+ Fog::AWS::SNS
else
# @todo Replace most instances of ArgumentError with NotImplementedError
# @todo For a list of widely supported Exceptions, see:
@@ -72,6 +74,8 @@ class AWS < Fog::Bin
when :storage
Formatador.display_line("[yellow][WARN] AWS[:storage] is deprecated, use Storage[:aws] instead[/]")
Fog::Storage.new(:provider => 'AWS')
+ when :sns
+ Fog::AWS::SNS.new
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"
end
|
Add sns to fog bin.
|
diff --git a/experiments/concurrency/stub.rb b/experiments/concurrency/stub.rb
index <HASH>..<HASH> 100644
--- a/experiments/concurrency/stub.rb
+++ b/experiments/concurrency/stub.rb
@@ -10,13 +10,12 @@ class Listener
@socket = socket
@cache = cache
@app = Rack::HelloWorld.new
- @block = true
- @observe = true
+ @options = David::AppConfig.new
end
def run
loop do
- if defined?(JRuby) || @mode == :prefork || @mode == :threaded
+ if defined?(JRuby) || defined?(Rubinius) || @mode == :prefork || @mode == :threaded
data, sender = @socket.recvfrom(1152)
port, _, host = sender[1..3]
else
@@ -73,15 +72,16 @@ case ARGV[0]
socket.bind('::', 5683)
4.times { fork { Listener.new(:prefork, socket, cache).run } }
when 'threaded'
- # ~16000
+ # ~17500
socket = UDPSocket.new(Socket::AF_INET6)
socket.bind('::', 5683)
Listener.send(:include, Celluloid)
Listener.pool(size: 8, args: [:threaded, socket, cache]).run
else
- # ~14000
+ # ~17000
socket = Celluloid::IO::UDPSocket.new(Socket::AF_INET6)
socket.bind('::', 5683)
+ Listener.send(:include, Celluloid::IO)
Listener.new(:sped, socket, cache).run
end
|
Updated stub.rb to debug problem with benchmarking in Rubinius.
|
diff --git a/src/Logging/MonologBase.php b/src/Logging/MonologBase.php
index <HASH>..<HASH> 100755
--- a/src/Logging/MonologBase.php
+++ b/src/Logging/MonologBase.php
@@ -2,6 +2,7 @@
namespace Modulus\Hibernate\Logging;
+use Monolog\Logger;
use Modulus\Support\Config;
use Modulus\Hibernate\Logging\Driver;
use Modulus\Hibernate\Exceptions\InvalidLogDriverException;
@@ -30,6 +31,7 @@ class MonologBase
* Init monolog
*
* @param null|string $channel
+ * @throws InvalidLogDriverException
* @return void
*/
public function __construct(string $channel = null)
@@ -39,6 +41,9 @@ class MonologBase
$this->driver = (new self::$supported[$this->getDriver($driver) ?? 'single']);
+ if (!$this->driver instanceof Driver)
+ throw new InvalidLogDriverException;
+
$this->driver = $channel ? $this->driver->setDefault($channel)->get() : $this->driver->get();
}
@@ -67,13 +72,10 @@ class MonologBase
/**
* Get log
*
- * @throws InvalidLogDriverException
- * @return Driver
+ * @return Logger
*/
- public function log()
+ public function log() : Logger
{
- if ($this->driver instanceof Driver) return $this->driver;
-
- throw new InvalidLogDriverException;
+ return $this->driver;
}
}
|
fix: throw exception on __construct if driver is not a valid driver
also, expect a logger instance on log function
|
diff --git a/tasks/nodemon.js b/tasks/nodemon.js
index <HASH>..<HASH> 100644
--- a/tasks/nodemon.js
+++ b/tasks/nodemon.js
@@ -12,7 +12,7 @@ module.exports = function (grunt) {
var options = this.options();
var done = this.async();
- var args = [__dirname + '/../node_modules/nodemon/nodemon'];
+ var args = [require.resolve('nodemon')];
var nodemonignoreMessage = '# Generated by grunt-nodemon';
if (options.nodeArgs) {
@@ -101,13 +101,7 @@ module.exports = function (grunt) {
},
function (error) {
if (error) {
- grunt.fail.fatal('nodemon must be installed as a local dependency of grunt-nodemon.\n\n' +
-
- 'Run the following command:\n' +
- 'rm -rf node_modules/nodemon\n\n' +
-
- 'Then run:\n' +
- 'npm install grunt-nodemon --save-dev');
+ grunt.fail.fatal(error);
}
done();
});
|
Use require.resolve to determine nodemon location instead of hard-coding
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.