diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/cli/cumulusci.py b/cli/cumulusci.py
index <HASH>..<HASH> 100644
--- a/cli/cumulusci.py
+++ b/cli/cumulusci.py
@@ -316,6 +316,7 @@ def beta_deploy(config, tag, commit, run_tests, retries):
raise e
if error.find('Error: Invalid Package, Details: This package is not yet available') == -1 and error.find('Error: InstalledPackage version number : %s does not exist!' % package_version) == -1:
+ click.echo("Not retrying because no log lines were found to trigger a retry")
raise e
click.echo("Retrying installation of %s due to package unavailable error. Sleeping for 1 minute before retrying installation. %s retries remain" % (package_version, retries - 1))
|
Add better output to show what is happening with beta_deploy retries
|
diff --git a/astrobase/varclass/recoverysim.py b/astrobase/varclass/recoverysim.py
index <HASH>..<HASH> 100644
--- a/astrobase/varclass/recoverysim.py
+++ b/astrobase/varclass/recoverysim.py
@@ -884,7 +884,7 @@ def make_fakelc_collection(lclist,
with open(dboutfname, 'wb') as outfd:
pickle.dump(fakedb, outfd)
- LOGINFO('wrote %s fake LCs to: %s' % simbasedir)
+ LOGINFO('wrote %s fake LCs to: %s' % (len(fakeresults), simbasedir))
LOGINFO('fake LC info written to: %s' % dboutfname)
return dboutfname
|
[WIP] working on recoverysim
|
diff --git a/packages/core/src/Core/Model/Response/CdrResponse.php b/packages/core/src/Core/Model/Response/CdrResponse.php
index <HASH>..<HASH> 100644
--- a/packages/core/src/Core/Model/Response/CdrResponse.php
+++ b/packages/core/src/Core/Model/Response/CdrResponse.php
@@ -34,6 +34,16 @@ class CdrResponse
protected $notes;
/**
+ * @return bool
+ */
+ public function isAccepted()
+ {
+ $code = intval($this->getCode());
+
+ return $code === 0 && $code >= 4000;
+ }
+
+ /**
* @return string
*/
public function getId()
|
add is accepted, close giansalex/greenter#<I>
|
diff --git a/pkg/services/sqlstore/migrator/mysql_dialect.go b/pkg/services/sqlstore/migrator/mysql_dialect.go
index <HASH>..<HASH> 100644
--- a/pkg/services/sqlstore/migrator/mysql_dialect.go
+++ b/pkg/services/sqlstore/migrator/mysql_dialect.go
@@ -30,7 +30,10 @@ func (db *Mysql) AutoIncrStr() string {
}
func (db *Mysql) BooleanStr(value bool) string {
- return strconv.FormatBool(value)
+ if value {
+ return "1"
+ }
+ return "0"
}
func (db *Mysql) SqlType(c *Column) string {
|
Fixed alerting bug for mysql (#<I>)
|
diff --git a/api-spec-testing/rspec_matchers.rb b/api-spec-testing/rspec_matchers.rb
index <HASH>..<HASH> 100644
--- a/api-spec-testing/rspec_matchers.rb
+++ b/api-spec-testing/rspec_matchers.rb
@@ -227,8 +227,12 @@ RSpec::Matchers.define :match_response do |pairs, test|
def compare_string(expected, actual_value, test, response)
# When you must match a regex. For example:
# match: {task: '/.+:\d+/'}
- if expected[0] == "/" && expected[-1] == "/"
- /#{expected.tr("/", "")}/ =~ actual_value
+ if expected[0] == '/' && expected[-1] == '/'
+ parsed = expected
+ expected.scan(/\$\{([a-z_0-9]+)\}/) do |match|
+ parsed = parsed.gsub(/\$\{?#{match.first}\}?/, test.cached_values[match.first])
+ end
+ /#{parsed.tr("/", "")}/ =~ actual_value
elsif !!(expected.match?(/[0-9]{1}\.[0-9]+E[0-9]+/))
# When the value in the yaml test is a big number, the format is
# different from what Ruby uses, so we transform X.XXXXEXX to X.XXXXXe+XX
|
Test Runner: Modify rspec_matcher to parse more than one regex in expected values
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,12 +1,6 @@
var parsers = require('./parsers')
var url = require('url')
-const CONTENT_TYPE_PARSERS = {
- 'application/json': parsers.json,
- 'text/plain': parsers.text,
- 'application/octet-stream': parsers.raw
-}
-
const CONTENT_TYPE_MAP = {
'object': 'application/json',
'string': 'text/plain'
@@ -55,8 +49,12 @@ function request (http, options, callback) {
callback(null, result)
}
- var parser = CONTENT_TYPE_PARSERS[response.headers['content-type']]
- if (parser) return parser(response, length, fin)
+ var contentType = response.headers['content-type']
+ if (contentType) {
+ if (/application\/json/.test(contentType)) return parsers.json(response, length, fin)
+ if (/text\/plain/.test(contentType)) return parsers.json(response, length, fin)
+ if (/application\/octet-stream/.test(contentType)) return parsers.json(response, length, fin)
+ }
fin()
})
|
use regex for content-types
|
diff --git a/resource_aws_efs_file_system_test.go b/resource_aws_efs_file_system_test.go
index <HASH>..<HASH> 100644
--- a/resource_aws_efs_file_system_test.go
+++ b/resource_aws_efs_file_system_test.go
@@ -317,7 +317,6 @@ resource "aws_efs_file_system" "foo" {
func testAccAWSEFSFileSystemConfigPagedTags(rInt int) string {
return fmt.Sprintf(`
resource "aws_efs_file_system" "foo" {
- creation_token = "radeksimko"
tags {
Name = "foo-efs-%d"
Another = "tag"
@@ -338,7 +337,6 @@ func testAccAWSEFSFileSystemConfigPagedTags(rInt int) string {
func testAccAWSEFSFileSystemConfigWithTags(rInt int) string {
return fmt.Sprintf(`
resource "aws_efs_file_system" "foo-with-tags" {
- creation_token = "yada_yada"
tags {
Name = "foo-efs-%d"
Another = "tag"
|
remove some manual names to allow the automatic random names, avoid some possible conflicts
|
diff --git a/src/transformers/models/wav2vec2/modeling_wav2vec2.py b/src/transformers/models/wav2vec2/modeling_wav2vec2.py
index <HASH>..<HASH> 100755
--- a/src/transformers/models/wav2vec2/modeling_wav2vec2.py
+++ b/src/transformers/models/wav2vec2/modeling_wav2vec2.py
@@ -1606,6 +1606,7 @@ class Wav2Vec2ForMaskedLM(Wav2Vec2PreTrainedModel):
>>> from transformers import Wav2Vec2Processor, Wav2Vec2ForMaskedLM
>>> from datasets import load_dataset
>>> import soundfile as sf
+ >>> import torch
>>> processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-base-960h")
>>> model = Wav2Vec2ForMaskedLM.from_pretrained("facebook/wav2vec2-base-960h")
|
fix missing import (#<I>)
|
diff --git a/lib/glimpse/views/active_record.rb b/lib/glimpse/views/active_record.rb
index <HASH>..<HASH> 100644
--- a/lib/glimpse/views/active_record.rb
+++ b/lib/glimpse/views/active_record.rb
@@ -21,7 +21,7 @@ module Glimpse
end
def formatted_duration
- "%.2f" % (duration * 1000)
+ "%.2fms" % (duration * 1000)
end
def results
|
Add ms after duration for ActiveRecord
|
diff --git a/src/console/ConsoleLogTarget.php b/src/console/ConsoleLogTarget.php
index <HASH>..<HASH> 100644
--- a/src/console/ConsoleLogTarget.php
+++ b/src/console/ConsoleLogTarget.php
@@ -6,6 +6,7 @@ use hidev\components\Log;
use Psr\Log\LogLevel;
use yii\helpers\Console;
use yii\helpers\VarDumper;
+use yii\log\Logger;
/**
* Class ConsoleLogTarget
@@ -31,12 +32,21 @@ class ConsoleLogTarget extends \yii\log\Target
LogLevel::CRITICAL => [Console::FG_RED],
LogLevel::WARNING => [Console::FG_YELLOW],
];
+
+ private $convertYiiToPSR = [
+ Logger::LEVEL_ERROR => LogLevel::ERROR,
+ Logger::LEVEL_WARNING => LogLevel::WARNING,
+ Logger::LEVEL_INFO => LogLevel::INFO,
+ Logger::LEVEL_TRACE => LogLevel::DEBUG,
+ ];
public function export()
{
foreach ($this->messages as $message) {
- $this->out($message[0], $message[1]);
- $this->outContext($message[0], $message[2]);
+ $level = $this->convertYiiToPSR[$message[1]] ?? $message[1];
+
+ $this->out($level, $message[0]);
+ $this->outContext($level, $message[2]);
}
}
|
Convert log levels from Yii to PSR
|
diff --git a/builder/vmware/common/driver_fusion6.go b/builder/vmware/common/driver_fusion6.go
index <HASH>..<HASH> 100644
--- a/builder/vmware/common/driver_fusion6.go
+++ b/builder/vmware/common/driver_fusion6.go
@@ -22,6 +22,12 @@ func (d *Fusion6Driver) Clone(dst, src string) error {
"clone", src, dst,
"full")
if _, _, err := runAndLog(cmd); err != nil {
+ if strings.Contains(err.Error(), "parameters was invalid") {
+ return fmt.Errorf(
+ "Clone is not supported with your version of Fusion. Packer " +
+ "only works with Fusion 6 Professional. Please verify your version.")
+ }
+
return err
}
|
builder/vmware: better error if clone not supported [GH-<I>]
|
diff --git a/lib/chef/resource/homebrew_tap.rb b/lib/chef/resource/homebrew_tap.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/resource/homebrew_tap.rb
+++ b/lib/chef/resource/homebrew_tap.rb
@@ -48,7 +48,7 @@ class Chef
description: "The path to the Homebrew binary.",
default: "/usr/local/bin/brew"
- property :owner, [String, Integer],
+ property :owner, String,
description: "The owner of the Homebrew installation.",
default: lazy { find_homebrew_username }
|
Revert homebrew_tap to using String for owner
It's using owner in an env variable and I'm not sure if that will
actually work. We should stick with a string here.
|
diff --git a/git/githistory/log/log.go b/git/githistory/log/log.go
index <HASH>..<HASH> 100644
--- a/git/githistory/log/log.go
+++ b/git/githistory/log/log.go
@@ -185,11 +185,7 @@ func (l *Logger) consume() {
func (l *Logger) logTask(task Task) {
defer l.wg.Done()
- var logAll bool
- if durable, ok := task.(DurableTask); ok {
- logAll = durable.Durable()
- }
-
+ logAll := task.Durable()
var last time.Time
var msg string
diff --git a/git/githistory/log/task.go b/git/githistory/log/task.go
index <HASH>..<HASH> 100644
--- a/git/githistory/log/task.go
+++ b/git/githistory/log/task.go
@@ -6,12 +6,6 @@ type Task interface {
// of the Task when an update is present. It is closed when the task is
// complete.
Updates() <-chan string
-}
-
-// DurableTask is a Task sub-interface which ensures that all activity is
-// logged by disabling throttling behavior in the logger.
-type DurableTask interface {
- Task
// Durable returns whether or not this task should be treated as
// Durable.
|
git/githistory/log: collapse DurableTask interface into Task
|
diff --git a/salt/modules/wordpress.py b/salt/modules/wordpress.py
index <HASH>..<HASH> 100644
--- a/salt/modules/wordpress.py
+++ b/salt/modules/wordpress.py
@@ -10,8 +10,8 @@ from __future__ import absolute_import
import collections
# Import Salt Modules
-from salt.ext.six.moves import map
import salt.utils.path
+from salt.ext.six.moves import map
Plugin = collections.namedtuple('Plugin', 'name status update versino')
|
Update reference to old salt.utils.which function
|
diff --git a/rocketchat_API/rocketchat.py b/rocketchat_API/rocketchat.py
index <HASH>..<HASH> 100644
--- a/rocketchat_API/rocketchat.py
+++ b/rocketchat_API/rocketchat.py
@@ -609,6 +609,10 @@ class RocketChat:
"""Removes the direct message from the user’s list of direct messages."""
return self.__call_api_post('im.close', roomId=room_id, kwargs=kwargs)
+ def im_messages(self, username, **kwargs):
+ """Retrieves direct messages from the server by username"""
+ return self.__call_api_get('im.messages', username=username, args=kwargs)
+
def im_messages_others(self, room_id, **kwargs):
"""Retrieves the messages from any direct message in the server"""
return self.__call_api_get('im.messages.others', roomId=room_id, kwargs=kwargs)
|
Added method to retrieve DMs by username.
|
diff --git a/src/goals/ReadmeGoal.php b/src/goals/ReadmeGoal.php
index <HASH>..<HASH> 100644
--- a/src/goals/ReadmeGoal.php
+++ b/src/goals/ReadmeGoal.php
@@ -42,6 +42,10 @@ class ReadmeGoal extends TemplateGoal
public function renderBadges()
{
+ $c = $this->config->get('composer.json');
+ if (!$c->has('require') && !$c->has('require-dev')) {
+ unset($this->badges['versioneye.status']);
+ }
$res = '';
foreach ($this->badges as $badge) {
$res .= $this->renderBadge($badge) . "\n";
|
fixed versioneye badge: don't show when no dependencies
|
diff --git a/src/widgets/editor/editor.js b/src/widgets/editor/editor.js
index <HASH>..<HASH> 100644
--- a/src/widgets/editor/editor.js
+++ b/src/widgets/editor/editor.js
@@ -5,7 +5,7 @@
* Copyright (c) 2015-2017 Fabio Spampinato
* Licensed under MIT (https://github.com/svelto/svelto/blob/master/LICENSE)
* =========================================================================
- * @require ./vendor/marked.js
+ * @before ./vendor/marked.js
* @require core/widget/widget.js
* ========================================================================= */
@@ -25,7 +25,7 @@
plugin: true,
selector: '.editor',
options: {
- parser: window.marked,
+ parser: window.marked || _.identity,
actions: {
bold () {
this._action ( '**', '**', 'bold' );
|
Editor: avoid errors if the parser has not been loaded
|
diff --git a/project_generator/yaml_parser.py b/project_generator/yaml_parser.py
index <HASH>..<HASH> 100644
--- a/project_generator/yaml_parser.py
+++ b/project_generator/yaml_parser.py
@@ -13,6 +13,8 @@
# limitations under the License.
import os
+from os import listdir
+from os.path import isfile, join
class YAML_parser:
@@ -82,10 +84,18 @@ class YAML_parser:
self.data['include_paths'] = include_paths
def find_source_files(self, common_attributes, group_name):
+ files = []
try:
for k, v in common_attributes.items():
if k == 'source_files':
- self.process_files(v, group_name)
+ # Source directory can be either a directory or files
+ for paths in v:
+ if os.path.isdir(paths):
+ files_in_dir = [ join(paths, f) for f in listdir(paths) if isfile(join(paths,f)) ]
+ files += files_in_dir
+ else:
+ files = v
+ self.process_files(files, group_name)
except KeyError:
pass
|
source_files can be folders, or separate files
|
diff --git a/static/manager/js/src/article.js b/static/manager/js/src/article.js
index <HASH>..<HASH> 100644
--- a/static/manager/js/src/article.js
+++ b/static/manager/js/src/article.js
@@ -10,11 +10,13 @@ var imageManager = React.render(
var articleId = $('#article-admin').data('id');
var articleId = articleId ? articleId : false;
-var section = $('#article-admin').data('section');
-var section = section ? section : false;
+var sectionId = $('#article-admin').data('section-id');
+var sectionId = sectionId ? sectionId : false;
+var sectionName = $('#article-admin').data('section-name');
+var sectionName = sectionName ? sectionName : false;
var articleAdmin = React.render(
- <ArticleAdmin imageManager={imageManager} articleId={articleId} section={section} />,
+ <ArticleAdmin imageManager={imageManager} articleId={articleId} sectionId={sectionId} sectionName={sectionName} />,
document.getElementById('article-admin')
);
|
pass section id and slug into ArticleAdmin component
|
diff --git a/src/Symfony/Console/Command/Command.php b/src/Symfony/Console/Command/Command.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Console/Command/Command.php
+++ b/src/Symfony/Console/Command/Command.php
@@ -21,9 +21,9 @@ abstract class Command extends Base
final protected static function tempnamCheck(OutputInterface $output) : ? string
{
- $tempnam = realpath(static::tempnam());
+ $tempnam = strval(realpath(static::tempnam()));
- if ( ! is_string($tempnam) || ! is_writable($tempnam) || is_dir($tempnam)) {
+ if (is_dir($tempnam) || ! is_file($tempnam) || ! is_writable($tempnam)) {
$output->writeln('could not get temporary filename!');
return null;
|
snagging scrutinizer issues is getting annoying now ¬_¬
|
diff --git a/client/sizes.go b/client/sizes.go
index <HASH>..<HASH> 100644
--- a/client/sizes.go
+++ b/client/sizes.go
@@ -36,11 +36,11 @@ func main() {
prot = t
}
- var wg sync.WaitGroup
+ wg := &sync.WaitGroup{}
wg.Add(f.NumWorkers)
for i := 0; i < f.NumWorkers; i++ {
- go func(prot common.Prot, wg sync.WaitGroup) {
+ go func(prot common.Prot, wg *sync.WaitGroup) {
conn, err := common.Connect("localhost", f.Port)
if err != nil {
panic("Couldn't connect")
|
Passing sync.WaitGroup by reference in client sizes testing program
Previously it was passed by value, meaning the program would never stop.
|
diff --git a/tests/test_isort.py b/tests/test_isort.py
index <HASH>..<HASH> 100644
--- a/tests/test_isort.py
+++ b/tests/test_isort.py
@@ -836,6 +836,15 @@ def test_remove_imports() -> None:
)
assert test_output == "import lib1\nimport lib5\n"
+ # From imports
+ test_input = "from x import y"
+ test_output = api.sort_code_string(test_input, remove_imports=["x"])
+ assert test_output == ""
+
+ test_input = "from x import y"
+ test_output = api.sort_code_string(test_input, remove_imports=["x.y"])
+ assert test_output == ""
+
def test_explicitly_local_import() -> None:
"""Ensure that explicitly local imports are separated."""
|
Add test for removing from imports
|
diff --git a/packages/fireplace/lib/utils/expand_path.js b/packages/fireplace/lib/utils/expand_path.js
index <HASH>..<HASH> 100644
--- a/packages/fireplace/lib/utils/expand_path.js
+++ b/packages/fireplace/lib/utils/expand_path.js
@@ -4,7 +4,7 @@ FP.Utils = FP.Utils || {};
FP.Utils.expandPath = function(path, opts) {
return path.replace(/{{([^}]+)}}/g, function(match, optName){
var value = get(opts, optName);
- Ember.assert("missing part for path generation ("+optName+")", value);
+ Ember.assert("Missing part for path expansion, looking for "+optName+" in "+Ember.inspect(opts) + " for "+path, value);
return value;
});
};
\ No newline at end of file
|
better assert message when path expansion is missing parts
|
diff --git a/src/client/pps.go b/src/client/pps.go
index <HASH>..<HASH> 100644
--- a/src/client/pps.go
+++ b/src/client/pps.go
@@ -240,7 +240,7 @@ func (c APIClient) ListJob(pipelineName string, inputCommit []*pfs.Commit, outpu
if err == io.EOF {
break
} else if err != nil {
- return nil, err
+ return nil, grpcutil.ScrubGRPC(err)
}
result = append(result, ji)
}
@@ -303,7 +303,7 @@ func (c APIClient) ListDatum(jobID string, pageSize int64, page int64) (*pps.Lis
if err == io.EOF {
break
} else if err != nil {
- return nil, err
+ return nil, grpcutil.ScrubGRPC(err)
}
if first {
resp.TotalPages = r.TotalPages
|
Scrub GRPC error text from streaming errors (so that they work with client-side error libraries)
|
diff --git a/TYPO3.Media/Classes/TYPO3/Media/Domain/Repository/AssetRepository.php b/TYPO3.Media/Classes/TYPO3/Media/Domain/Repository/AssetRepository.php
index <HASH>..<HASH> 100644
--- a/TYPO3.Media/Classes/TYPO3/Media/Domain/Repository/AssetRepository.php
+++ b/TYPO3.Media/Classes/TYPO3/Media/Domain/Repository/AssetRepository.php
@@ -35,7 +35,10 @@ class AssetRepository extends \TYPO3\Flow\Persistence\Repository {
public function findBySearchTermOrTags($searchTerm, array $tags = array()) {
$query = $this->createQuery();
- $constraints = array($query->like('title', '%' . $searchTerm . '%'));
+ $constraints = array(
+ $query->like('title', '%' . $searchTerm . '%'),
+ $query->like('resource.filename', '%' . $searchTerm . '%')
+ );
foreach ($tags as $tag) {
$constraints[] = $query->contains('tags', $tag);
}
|
[TASK] Match filenames in asset search
When searching for assets the filename is now included
in the search criteria allowing assets without titles
to be found.
Change-Id: I<I>ba<I>ead<I>e<I>b0cc<I>d8f1d4a<I>e8
Releases: master
Resolves: NEOS-<I>
Reviewed-on: <URL>
|
diff --git a/src/utils/network_utils.js b/src/utils/network_utils.js
index <HASH>..<HASH> 100644
--- a/src/utils/network_utils.js
+++ b/src/utils/network_utils.js
@@ -74,7 +74,7 @@ const NetworkUtils = {
},
getAddressAndPortFromUri(uriString) {
- let regexStr = /(?:http:\/\/|rosrpc:\/\/)?([a-zA-Z\d\-.:]+):(\d+)/;
+ let regexStr = /(?:http:\/\/|rosrpc:\/\/)?([a-zA-Z\d\-_.]+):(\d+)/;
let match = uriString.match(regexStr);
if (match === null) {
throw new Error ('Unable to find host and port from uri ' + uriString + ' with regex ' + regexStr);
|
Fix regex for parsing url. (#<I>)
Added `_` to the valid characters in the hostname and removed ':'.
Fixes #<I>.
|
diff --git a/bliss/core/dmc.py b/bliss/core/dmc.py
index <HASH>..<HASH> 100644
--- a/bliss/core/dmc.py
+++ b/bliss/core/dmc.py
@@ -42,6 +42,7 @@ TwoPi = 2 * math.pi
DOY_Format = '%Y-%jT%H:%M:%SZ'
ISO_8601_Format = '%Y-%m-%dT%H:%M:%SZ'
+_DEFAULT_FILE_NAME = 'leapseconds.dat'
LeapSeconds = None
def getTimestampUTC():
@@ -340,7 +341,7 @@ class UTCLeapSeconds(object):
def _load_leap_second_data(self):
ls_file = bliss.config.get(
'leapseconds.filename',
- os.path.join(bliss.config._directory, 'leapseconds.pkl')
+ os.path.join(bliss.config._directory, _DEFAULT_FILE_NAME)
)
try:
@@ -380,7 +381,7 @@ class UTCLeapSeconds(object):
ls_file = bliss.config.get(
'leapseconds.filename',
- os.path.join(bliss.config._directory, 'leapseconds.dat')
+ os.path.join(bliss.config._directory, _DEFAULT_FILE_NAME)
)
url = 'https://www.ietf.org/timezones/data/leap-seconds.list'
|
Issue #8 - Fix inconsistent default leap second file name
|
diff --git a/src/Listener/GenerateSitemap.php b/src/Listener/GenerateSitemap.php
index <HASH>..<HASH> 100644
--- a/src/Listener/GenerateSitemap.php
+++ b/src/Listener/GenerateSitemap.php
@@ -4,6 +4,7 @@ namespace Terabin\Sitemap\Listener;
use Illuminate\Contracts\Events\Dispatcher;
use Flarum\Event\DiscussionWasStarted;
+use Flarum\Event\DiscussionWasDeleted;
use Flarum\Core\Discussion;
use Flarum\Core\User;
use Flarum\Tags\Tag;
@@ -30,6 +31,7 @@ class GenerateSitemap
public function subscribe(Dispatcher $events)
{
$events->listen(DiscussionWasStarted::class, [$this, 'UpdateSitemap']);
+ $events->listen(DiscussionWasDeleted::class, [$this, 'UpdateSitemap']);
}
/**
|
add(): generate sitemap after discussion was deleted
|
diff --git a/test/stream-end.js b/test/stream-end.js
index <HASH>..<HASH> 100644
--- a/test/stream-end.js
+++ b/test/stream-end.js
@@ -173,9 +173,35 @@ tape('close after both sides of a duplex stream ends', function (t) {
})
A.close(function (err) {
- console.log('A CLOSE')
+ console.log('A CLOSE', err)
t.notOk(err, 'as is closed')
})
})
+
+tape('closed is emitted when stream disconnects', function (t) {
+ t.plan(2)
+ var A = mux(client, null) ()
+ A.on('closed', function (err) {
+ console.log('EMIT CLOSED')
+ t.notOk(err)
+ })
+ pull(pull.empty(), A.createStream(function (err) {
+ console.log(err)
+ t.notOk(err) //end of parent stream
+ }), pull.drain())
+})
+
+tape('closed is emitted with error when stream errors', function (t) {
+ t.plan(2)
+ var A = mux(client, null) ()
+ A.on('closed', function (err) {
+ t.notOk(err)
+ })
+ pull(pull.empty(), A.createStream(function (err) {
+ console.log(err)
+ t.notOk(err) //end of parent stream
+ }), pull.drain())
+})
+
|
test that "closed" is always emitted
|
diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100755
--- a/manifest.php
+++ b/manifest.php
@@ -32,7 +32,7 @@ return array(
'version' => '8.6.0',
'author' => 'Open Assessment Technologies SA',
'requires' => array(
- 'generis' => '>=6.14.0',
+ 'generis' => '>=12.5.0',
'tao' => '>=36.1.0',
'taoGroups' => '>=4.0.0',
'taoTests' => '>=12.1.0',
|
TTD-<I> Added\changed 'generis' version to '>=<I>' in `requires` secition
|
diff --git a/scenarios/kubernetes_verify.py b/scenarios/kubernetes_verify.py
index <HASH>..<HASH> 100755
--- a/scenarios/kubernetes_verify.py
+++ b/scenarios/kubernetes_verify.py
@@ -131,8 +131,7 @@ def main(branch, script, force, on_prow):
'-e', 'KUBE_FORCE_VERIFY_CHECKS=%s' % force,
'-e', 'KUBE_VERIFY_GIT_BRANCH=%s' % branch,
'-e', 'REPO_DIR=%s' % k8s, # hack/lib/swagger.sh depends on this
- '-e', 'TMPDIR=/tmp', # https://golang.org/src/os/file_unix.go
- '--tmpfs', '/tmp:exec,mode=777',
+ '--tmpfs', '/tmp:exec,mode=1777',
'gcr.io/k8s-testimages/kubekins-test:%s' % tag,
'bash', '-c', 'cd kubernetes && %s' % script,
])
|
don't set TMPDIR on prow verify scenario
|
diff --git a/packages/razzle/config/paths.js b/packages/razzle/config/paths.js
index <HASH>..<HASH> 100644
--- a/packages/razzle/config/paths.js
+++ b/packages/razzle/config/paths.js
@@ -36,7 +36,7 @@ module.exports = {
appPublic: resolveApp('public'),
appNodeModules: resolveApp('node_modules'),
appSrc: resolveApp('src'),
- appServerIndexJs: resolveApp('src/index.js'),
+ appServerIndexJs: resolveApp('src'),
appClientIndexJs: resolveApp('src/client'),
appBabelRc: resolveApp('.babelrc'),
appRazzleConfig: resolveApp('razzle.config.js'),
|
Make path to server more TS friendly by removing strict file type
|
diff --git a/kiner/producer.py b/kiner/producer.py
index <HASH>..<HASH> 100644
--- a/kiner/producer.py
+++ b/kiner/producer.py
@@ -43,12 +43,14 @@ class KinesisProducer:
def __init__(self, stream_name, batch_size=500,
batch_time=5, max_retries=5, threads=10,
- kinesis_client=boto3.client('kinesis')):
+ kinesis_client=None):
self.stream_name = stream_name
self.queue = Queue()
self.batch_size = batch_size
self.batch_time = batch_time
self.max_retries = max_retries
+ if kinesis_client is None:
+ kinesis_client = boto3.client('kinesis')
self.kinesis_client = kinesis_client
self.pool = ThreadPoolExecutor(threads)
self.last_flush = time.time()
|
Remove boto3 instantiation from constructor definition
|
diff --git a/salt/utils/templates.py b/salt/utils/templates.py
index <HASH>..<HASH> 100644
--- a/salt/utils/templates.py
+++ b/salt/utils/templates.py
@@ -85,11 +85,12 @@ def render_jinja_tmpl(tmplstr, context, tmplpath=None):
loader = jinja2.FileSystemLoader(context, os.path.dirname(tmplpath))
else:
loader = JinjaSaltCacheLoader(opts, context['env'])
+ env_args = {'extensions': ['jinja2.ext.with_'], 'loader': loader}
if opts.get('allow_undefined', False):
- jinja_env = jinja2.Environment(loader=loader)
+ jinja_env = jinja2.Environment(**env_args)
else:
jinja_env = jinja2.Environment(
- loader=loader, undefined=jinja2.StrictUndefined)
+ undefined=jinja2.StrictUndefined,**env_args)
try:
output = jinja_env.from_string(tmplstr).render(**context)
except jinja2.exceptions.TemplateSyntaxError, exc:
|
Enable with-tag extension in Jinja2 render.
Closes #<I>.
|
diff --git a/src/Command/Generate/ModuleCommand.php b/src/Command/Generate/ModuleCommand.php
index <HASH>..<HASH> 100644
--- a/src/Command/Generate/ModuleCommand.php
+++ b/src/Command/Generate/ModuleCommand.php
@@ -211,7 +211,7 @@ class ModuleCommand extends Command
'composer' => $composer,
'dependencies' => $dependencies,
'test' => $test,
- 'twigTemplate' => $twigTemplate,
+ 'twig_template' => $twigTemplate,
]);
return 0;
|
Fix the wrong param name (#<I>)
|
diff --git a/lib/editor/dialog.js b/lib/editor/dialog.js
index <HASH>..<HASH> 100644
--- a/lib/editor/dialog.js
+++ b/lib/editor/dialog.js
@@ -61,7 +61,9 @@ Dialog._geckoOpenModal = function(url, action, init) {
};
capwin(window);
// capture other frames
- for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));
+ if(document.all) {
+ for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));
+ }
// make up a function to be called when the Dialog ends.
Dialog._return = function (val) {
if (val && action) {
@@ -69,7 +71,9 @@ Dialog._geckoOpenModal = function(url, action, init) {
}
relwin(window);
// capture other frames
- for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));
+ if(document.all) {
+ for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));
+ }
Dialog._modal = null;
};
};
|
Not so nice fix for "Not allowed to write to dialogs" on FireFox!
|
diff --git a/tests/test_secrets.py b/tests/test_secrets.py
index <HASH>..<HASH> 100644
--- a/tests/test_secrets.py
+++ b/tests/test_secrets.py
@@ -92,18 +92,14 @@ def test_counterspell_wild_pyromancer():
def test_dart_trap():
- game = prepare_game(CardClass.WARRIOR, CardClass.WARRIOR)
+ game = prepare_game(CardClass.WARLOCK, CardClass.WARLOCK)
darttrap = game.player1.give("LOE_021")
darttrap.play()
game.end_turn()
- wisp = game.player2.give(WISP)
- wisp.play()
- assert darttrap in game.player1.secrets
assert game.player2.hero.health == 30
game.player2.hero.power.use()
- assert darttrap not in game.player1.secrets
- assert wisp.dead ^ (game.player2.hero.health == 25)
+ assert game.player2.hero.health == 30 - 5 - 2
def test_duplicate():
|
Make Dart Trap test more deterministic
|
diff --git a/apps/actor-web/src/app/components/common/MessageItem.react.js b/apps/actor-web/src/app/components/common/MessageItem.react.js
index <HASH>..<HASH> 100644
--- a/apps/actor-web/src/app/components/common/MessageItem.react.js
+++ b/apps/actor-web/src/app/components/common/MessageItem.react.js
@@ -112,9 +112,7 @@ const markedOptions = {
const processText = function(text) {
var markedText = marked(text, markedOptions);
// need hack with replace because of https://github.com/Ranks/emojify.js/issues/127
- console.log(markedText);
var emojifiedText = emojify.replace(markedText.replace(/<p>/g, '<p> '));
- console.log(emojifiedText);
return emojifiedText;
};
|
fix(web): removed unnessesary console.log
|
diff --git a/leeroy/base.py b/leeroy/base.py
index <HASH>..<HASH> 100644
--- a/leeroy/base.py
+++ b/leeroy/base.py
@@ -103,7 +103,7 @@ def github_notification():
"%s %s (%s): %s",
base_repo_name, number, html_url, action)
- if action not in ("opened", "synchronize"):
+ if action not in ("opened", "reopened", "synchronize"):
logging.debug("Ignored '%s' action." % action)
return Response(status=204)
|
Initiate build when PR is reopened.
When a PR has been reopened, kick off another build for the commit(s). This
also helps address issue #9 as you can close/reopen a PR to force a rebuild.
|
diff --git a/onecodex/lib/upload.py b/onecodex/lib/upload.py
index <HASH>..<HASH> 100644
--- a/onecodex/lib/upload.py
+++ b/onecodex/lib/upload.py
@@ -661,7 +661,11 @@ def upload_sequence_fileobj(file_obj, file_name, fields, retry_fields, session,
_direct_upload(file_obj, file_name, fields, session, samples_resource)
sample_id = fields["sample_id"]
except RetryableUploadException:
- # upload failed--retry direct upload to S3 intermediate
+ # upload failed -- retry direct upload to S3 intermediate; first try to cancel pending upload
+ try:
+ samples_resource.cancel_upload({"sample_id": sample_id})
+ except Exception as e:
+ logging.debug("Failed to cancel upload: {}".format(e))
logging.error("{}: Connectivity issue, trying direct upload...".format(file_name))
file_obj.seek(0) # reset file_obj back to start
diff --git a/onecodex/version.py b/onecodex/version.py
index <HASH>..<HASH> 100644
--- a/onecodex/version.py
+++ b/onecodex/version.py
@@ -1 +1 @@
-__version__ = "0.5.2"
+__version__ = "0.5.3"
|
Add additional cancelation check for failed proxy uploads. Release <I>.
|
diff --git a/phraseapp/config.go b/phraseapp/config.go
index <HASH>..<HASH> 100644
--- a/phraseapp/config.go
+++ b/phraseapp/config.go
@@ -231,8 +231,8 @@ func ParseYAMLToMap(unmarshal func(interface{}) error, keysToField map[string]in
*val, err = ValidateIsInt(k, v)
case *bool:
*val, err = ValidateIsBool(k, v)
- case map[string]interface{}:
- val, err = ValidateIsRawMap(k, v)
+ case *map[string]interface{}:
+ *val, err = ValidateIsRawMap(k, v)
default:
err = fmt.Errorf(cfgValueErrStr, k)
}
|
config: fix issue with map handling
The map must be given as reference.
|
diff --git a/spec/test_helper.rb b/spec/test_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/test_helper.rb
+++ b/spec/test_helper.rb
@@ -2,7 +2,7 @@
require 'rubygems'
# To get the specs to run on Ruby 1.9.x.
-gem 'test-unit', '= 2.0.2'
+gem 'test-unit', '= 1.2.3'
gem 'activesupport', '>= 2.3.3'
gem 'actionpack', '>= 2.3.3'
gem 'rspec', '>= 1.2.6'
|
Force test-unit <I> - test-unit <I>.x causes problems.
|
diff --git a/api/client.go b/api/client.go
index <HASH>..<HASH> 100644
--- a/api/client.go
+++ b/api/client.go
@@ -260,9 +260,9 @@ func NewClient(c *Config) (*Client, error) {
// but in e.g. http_test actual redirect handling is necessary
c.HttpClient.CheckRedirect = func(req *http.Request, via []*http.Request) error {
// Returning this value causes the Go net library to not close the
- // response body and nil out the error. Otherwise pester tries
+ // response body and to nil out the error. Otherwise pester tries
// three times on every redirect because it sees an error from this
- // function being passed through.
+ // function (to prevent redirects) passing through to it.
return http.ErrUseLastResponse
}
}
@@ -298,6 +298,11 @@ func (c *Client) Address() string {
return c.addr.String()
}
+// SetMaxRetries sets the number of retries that will be used in the case of certain errors
+func (c *Client) SetMaxRetries(retries int) {
+ c.config.MaxRetries = retries
+}
+
// SetWrappingLookupFunc sets a lookup function that returns desired wrap TTLs
// for a given operation and path
func (c *Client) SetWrappingLookupFunc(lookupFunc WrappingLookupFunc) {
|
Add ability to set max retries to API
|
diff --git a/bugtool/cmd/configuration.go b/bugtool/cmd/configuration.go
index <HASH>..<HASH> 100644
--- a/bugtool/cmd/configuration.go
+++ b/bugtool/cmd/configuration.go
@@ -77,7 +77,7 @@ func defaultCommands(confDir string, cmdDir string, k8sPods []string) []string {
"ip -6 route show table 200",
// xfrm
"ip xfrm policy",
- "ip -s xfrm state",
+ "ip -s xfrm state | awk '!/auth|enc/'",
// gops
fmt.Sprintf("gops memstats $(pidof %s)", components.CiliumAgentName),
fmt.Sprintf("gops stack $(pidof %s)", components.CiliumAgentName),
|
cilium: scrub keys from bugtool xfrm
Remove keys from xfrm debug output. We want the state output to
identify any issues with xfrm setup, the output has the stats.
We don't however want to record any keys.
Fixes: <I>b<I>ee<I> ("cilium: bugtool add xfrm details")
|
diff --git a/tests/TestCase/Console/Command/CommandListShellTest.php b/tests/TestCase/Console/Command/CommandListShellTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/Console/Command/CommandListShellTest.php
+++ b/tests/TestCase/Console/Command/CommandListShellTest.php
@@ -107,6 +107,7 @@ class CommandListShellTest extends TestCase {
* @return void
*/
public function testMainXml() {
+ $this->assertFalse(defined('HHVM_VERSION'), 'Remove when travis updates to hhvm 2.5');
$this->Shell->params['xml'] = true;
$this->Shell->main();
|
Skipping test that is broken in hhvm
|
diff --git a/generators/app/index.js b/generators/app/index.js
index <HASH>..<HASH> 100644
--- a/generators/app/index.js
+++ b/generators/app/index.js
@@ -466,6 +466,7 @@ module.exports = class extends BaseGenerator {
this.warning(
'The generated application could not be committed to Git, as a Git repository could not be initialized.'
);
+ done();
}
});
}
|
Need to call done() when the project is not a git repo otherwise other generator end() methods won't be called.
|
diff --git a/scoop/futures.py b/scoop/futures.py
index <HASH>..<HASH> 100644
--- a/scoop/futures.py
+++ b/scoop/futures.py
@@ -156,7 +156,6 @@ def mapScan(mapFunc, reductionOp, *iterables, **kargs):
"Be sure to start your program with the "
"'-m scoop' parameter. You can find further "
"information in the documentation.")
- child = Future(control.current.id, mapFunc, *args, **kargs)
child.add_done_callback(partial(reduction, operation=reductionOp),
inCallbackType=CallbackType.universal,
inCallbackGroup=thisCallbackGroupID)
@@ -204,7 +203,6 @@ def mapReduce(mapFunc, reductionOp, *iterables, **kargs):
"Be sure to start your program with the "
"'-m scoop' parameter. You can find further "
"information in the documentation.")
- child = Future(control.current.id, mapFunc, *args, **kargs)
child.add_done_callback(partial(reduction, operation=reductionOp),
inCallbackType=CallbackType.universal,
inCallbackGroup=thisCallbackGroupID)
|
- Removed extraneous statement.
|
diff --git a/tensorflow_probability/python/distributions/generalized_pareto.py b/tensorflow_probability/python/distributions/generalized_pareto.py
index <HASH>..<HASH> 100644
--- a/tensorflow_probability/python/distributions/generalized_pareto.py
+++ b/tensorflow_probability/python/distributions/generalized_pareto.py
@@ -175,9 +175,7 @@ class GeneralizedPareto(distribution.AutoCompositeTensorDistribution):
scale=parameter_properties.ParameterProperties(
default_constraining_bijector_fn=(
lambda: softplus_bijector.Softplus(low=dtype_util.eps(dtype)))),
- concentration=parameter_properties.ParameterProperties(
- default_constraining_bijector_fn=(
- lambda: softplus_bijector.Softplus(low=dtype_util.eps(dtype)))))
+ concentration=parameter_properties.ParameterProperties())
# pylint: enable=g-long-lambda
@property
|
GeneralizedPareto is not constrained to positive concentration.
PiperOrigin-RevId: <I>
|
diff --git a/soco.py b/soco.py
index <HASH>..<HASH> 100644
--- a/soco.py
+++ b/soco.py
@@ -689,7 +689,7 @@ class SoCo(object):
Returns:
A dictionary containing the following information about the speakers playing state
- CurrentTransportState (PLAYING or PAUSED_PLAYBACK), CurrentTrasnportStatus (OK, ?),
+ CurrentTransportState (PLAYING, PAUSED_PLAYBACK, STOPPED), CurrentTrasnportStatus (OK, ?),
CurrentSpeed(1,?)
This allows us to know if speaker is playing or not. Don't know other states of
|
Update soco.py
added stopped to currenttransportstate
|
diff --git a/lib/mincer/processor.js b/lib/mincer/processor.js
index <HASH>..<HASH> 100644
--- a/lib/mincer/processor.js
+++ b/lib/mincer/processor.js
@@ -55,15 +55,12 @@ inherits(Processor, Template);
// Run processor
-Processor.prototype.evaluate = function (context, locals, callback) {
+Processor.prototype.evaluate = function (context) {
if (Processor === this.constructor) {
- callback(new Error("Processor can't be used directly. Use `Processor.create()`."));
- return;
+ throw new Error("Processor can't be used directly. Use `Processor.create()`.");
}
- this.constructor.__func__(context, this.data, function (err, data) {
- callback(err, data);
- });
+ return this.constructor.__func__(context, this.data);
};
|
Make Processor#evaluate synchronous.
Resolves #<I>
Closes #<I>
|
diff --git a/tests/test_task_utils.py b/tests/test_task_utils.py
index <HASH>..<HASH> 100644
--- a/tests/test_task_utils.py
+++ b/tests/test_task_utils.py
@@ -1,4 +1,5 @@
import pytest
+import asyncio
from task_utils import pipe, Component
@@ -40,6 +41,35 @@ async def test_component_start_raise():
@pytest.mark.asyncio
+async def test_component_start_event():
+ EVENT = 'EVENT'
+
+ flag = False
+
+ async def component(x, *, commands, events):
+ nonlocal flag
+
+ # send WRONG event
+ events.send_nowait(EVENT)
+ await asyncio.sleep(0.05)
+ flag = True
+
+
+ comp = Component(component, 1)
+ with pytest.raises(Component.LifecycleError):
+ await comp.start()
+
+ await asyncio.sleep(0.1)
+ assert not flag
+
+ with pytest.raises(Component.Failure) as exc_info:
+ await comp.task
+ exc, = exc_info.value.args
+ with pytest.raises(asyncio.CancelledError):
+ raise exc
+
+
+@pytest.mark.asyncio
async def test_component_result_success():
async def component(x, *, commands, events):
events.send_nowait(Component.EVENT_START)
|
test that a wrong event on startup will cancel a component
|
diff --git a/ca/django_ca/tests/tests_extensions.py b/ca/django_ca/tests/tests_extensions.py
index <HASH>..<HASH> 100644
--- a/ca/django_ca/tests/tests_extensions.py
+++ b/ca/django_ca/tests/tests_extensions.py
@@ -44,6 +44,7 @@ from ..extensions import SubjectAlternativeName
from ..extensions import SubjectKeyIdentifier
from ..extensions import TLSFeature
from .base import DjangoCAWithCertTestCase
+from .base import cryptography_version
if ca_settings.CRYPTOGRAPHY_HAS_PRECERT_POISON: # pragma: only cryptography>=2.4
from ..extensions import PrecertPoison
@@ -909,7 +910,9 @@ class PrecertPoisonTestCase(TestCase):
PrecertPoison({'critical': False})
-class PrecertificateSignedCertificateTimestamps(DjangoCAWithCertTestCase):
+@unittest.skipIf(cryptography_version < (2, 4),
+ 'SCTs do not compare as equal in cryptography<2.4.')
+class PrecertificateSignedCertificateTimestamps(DjangoCAWithCertTestCase): # pragma: only cryptography>=2.4
def test_basic(self):
cert = self.cert_letsencrypt_jabber_at
ext = cert.x509.extensions.get_extension_for_oid(ExtensionOID.PRECERT_SIGNED_CERTIFICATE_TIMESTAMPS)
|
skip test in cryptography<<I>
|
diff --git a/src/main/docs/resources/js/multi-language-sample.js b/src/main/docs/resources/js/multi-language-sample.js
index <HASH>..<HASH> 100644
--- a/src/main/docs/resources/js/multi-language-sample.js
+++ b/src/main/docs/resources/js/multi-language-sample.js
@@ -102,6 +102,11 @@ function postProcessCodeBlocks() {
multiLanguageSelectorElement.classList.add("multi-language-selector");
languageSelectorFragment.appendChild(multiLanguageSelectorElement);
+ if (sampleCollection.every(function(element) {
+ return element.classList.contains("hidden");
+ })) {
+ sampleCollection[0].classList.remove("hidden");
+ }
sampleCollection.forEach(function (sampleEl) {
var optionEl = document.createElement("code");
|
Show the first sample in a multi language if none match the language choice
|
diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go
index <HASH>..<HASH> 100644
--- a/reposerver/repository/repository.go
+++ b/reposerver/repository/repository.go
@@ -1117,7 +1117,8 @@ func (s *Service) GetAppDetails(ctx context.Context, q *apiclient.RepoServerAppD
continue
}
fName := f.Name()
- if strings.Contains(fName, "values") && (filepath.Ext(fName) == ".yaml" || filepath.Ext(fName) == ".yml") {
+ fileNameExt := strings.ToLower(filepath.Ext(fName))
+ if strings.Contains(fName, "values") && (fileNameExt == ".yaml" || fileNameExt == ".yml") {
res.Helm.ValueFiles = append(res.Helm.ValueFiles, fName)
}
}
|
fix: file exention comparisons are case sensitive (#<I>)
|
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
@@ -619,7 +619,7 @@ class SecurityExtension extends Extension
->register($id, 'Symfony\Component\ExpressionLanguage\SerializedParsedExpression')
->setPublic(false)
->addArgument($expression)
- ->addArgument(serialize($this->getExpressionLanguage()->parse($expression, array('token', 'user', 'object', 'roles', 'request'))->getNodes()))
+ ->addArgument(serialize($this->getExpressionLanguage()->parse($expression, array('token', 'user', 'object', 'roles', 'request', 'trust_resolver'))->getNodes()))
;
return $this->expressions[$id] = new Reference($id);
|
[SecurityBundle] Add trust_resolver variable into expression
| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | [#<I>]
| License | MIT
| Doc PR | [-]
|
diff --git a/libraries/lithium/core/Libraries.php b/libraries/lithium/core/Libraries.php
index <HASH>..<HASH> 100644
--- a/libraries/lithium/core/Libraries.php
+++ b/libraries/lithium/core/Libraries.php
@@ -553,7 +553,7 @@ class Libraries {
* @return void
*/
protected static function _addPlugins($plugins) {
- $defaults = array('bootstrap' => true, 'route' => true);
+ $defaults = array('bootstrap' => null, 'route' => true);
$params = array('app' => LITHIUM_APP_PATH, 'root' => LITHIUM_LIBRARY_PATH);
$result = array();
@@ -572,6 +572,9 @@ class Libraries {
}
}
}
+ if (is_null($plugin['bootstrap'])) {
+ $options['bootstrap'] = file_exists($options['path'] . '/config/bootstrap.php');
+ }
$plugin = static::add($name, $options + $defaults);
if ($plugin['route']) {
|
By default, plugins now conditionally load bootstrap files, only if they exist.
|
diff --git a/src/Model/Behavior/DuplicatableBehavior.php b/src/Model/Behavior/DuplicatableBehavior.php
index <HASH>..<HASH> 100644
--- a/src/Model/Behavior/DuplicatableBehavior.php
+++ b/src/Model/Behavior/DuplicatableBehavior.php
@@ -292,7 +292,7 @@ class DuplicatableBehavior extends Behavior
break;
case 'set':
- if (is_callable($value) && !is_string($value)) {
+ if (!is_string($value) && is_callable($value)) {
$value = $value($entity);
}
$entity->set($prop, $value);
|
Check for a string first to pass the condition quicker
|
diff --git a/tests/PHPUnit/TestingEnvironment.php b/tests/PHPUnit/TestingEnvironment.php
index <HASH>..<HASH> 100644
--- a/tests/PHPUnit/TestingEnvironment.php
+++ b/tests/PHPUnit/TestingEnvironment.php
@@ -95,6 +95,12 @@ class Piwik_TestingEnvironment
}
}
+ if ($testingEnvironment->globalsOverride) {
+ foreach ($testingEnvironment->globalsOverride as $key => $value) {
+ $GLOBALS[$key] = $value;
+ }
+ }
+
Config::setSingletonInstance(new Config(
$testingEnvironment->configFileGlobal, $testingEnvironment->configFileLocal, $testingEnvironment->configFileCommon
));
@@ -139,7 +145,6 @@ class Piwik_TestingEnvironment
if ($testingEnvironment->configOverride) {
$cache = $testingEnvironment->arrayMergeRecursiveDistinct($cache, $testingEnvironment->configOverride);
}
-
});
}
Piwik::addAction('Request.dispatch', function() {
|
Allow global variables to be manipulated through TestingEnvironment class.
|
diff --git a/application/briefkasten/tests/test_settings.py b/application/briefkasten/tests/test_settings.py
index <HASH>..<HASH> 100644
--- a/application/briefkasten/tests/test_settings.py
+++ b/application/briefkasten/tests/test_settings.py
@@ -2,8 +2,8 @@ from py.test import fixture
size_values = {
'200': 200,
- '20M': 20971520,
- '1Gb': 1073741824
+ '20M': 20000000,
+ '1Gb': 1000000000
}
|
Adjust to new values
(probably due to updated library, not sure at this point, the change
seems innocent enough, though)
|
diff --git a/src/Auth/BaseAuthenticate.php b/src/Auth/BaseAuthenticate.php
index <HASH>..<HASH> 100644
--- a/src/Auth/BaseAuthenticate.php
+++ b/src/Auth/BaseAuthenticate.php
@@ -122,7 +122,7 @@ abstract class BaseAuthenticate implements EventListenerInterface
// null passwords as authentication systems
// like digest auth don't use passwords
// and hashing *could* create a timing side-channel.
- if (strlen($password) > 0) {
+ if ($password !== null) {
$hasher = $this->passwordHasher();
$hasher->hash($password);
}
|
Apply hashing to empty passwords as well.
Only when the password is null should hashing be skipped.
|
diff --git a/src/Form/Factory/MelisSiteSelectFactory.php b/src/Form/Factory/MelisSiteSelectFactory.php
index <HASH>..<HASH> 100644
--- a/src/Form/Factory/MelisSiteSelectFactory.php
+++ b/src/Form/Factory/MelisSiteSelectFactory.php
@@ -26,7 +26,7 @@ class MelisSiteSelectFactory extends MelisSelectFactory
for ($i = 0; $i < $max; $i++)
{
$site = $sites->current();
- $valueoptions[$site->site_id] = $site->site_name;
+ $valueoptions[$site->site_id] = $site->site_label;
$sites->next();
}
|
changed MelisSiteSelect options from site_name to site_label
|
diff --git a/src/test/java/com/jnape/palatable/lambda/io/IOTest.java b/src/test/java/com/jnape/palatable/lambda/io/IOTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/jnape/palatable/lambda/io/IOTest.java
+++ b/src/test/java/com/jnape/palatable/lambda/io/IOTest.java
@@ -352,7 +352,6 @@ public class IOTest {
IO<Unit> two = io(() -> {
oneStarted.await();
accesses.add("two entered");
- Thread.sleep(10);
accesses.add("two exited");
finishLine.countDown();
});
@@ -365,7 +364,7 @@ public class IOTest {
start();
}};
- if (!finishLine.await(1, SECONDS))
+ if (!finishLine.await(5, SECONDS))
fail("Expected threads to have completed by now");
assertEquals(asList("one entered", "one exited", "two entered", "two exited"), accesses);
}
|
travis is unable to run monitorSync in 1 second?
|
diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/ServiceProvider.php
+++ b/src/ServiceProvider.php
@@ -8,6 +8,8 @@ use Illuminate\Support\ServiceProvider as BaseServiceProvider;
class ServiceProvider extends BaseServiceProvider
{
+ protected $transKey = 'mailgun-email-validation::validation.mailgun_email';
+
public function boot()
{
$this->publishes([
@@ -16,7 +18,7 @@ class ServiceProvider extends BaseServiceProvider
$this->loadTranslationsFrom(__DIR__ . '/../lang/', 'mailgun-email-validation');
- $message = $this->app->translator->trans('mailgun-email-validation::validation.mailgun_email');
+ $message = $this->getMessage();
Validator::extend('mailgun_email', 'Kouz\LaravelMailgunValidation\EmailRule@validate', $message);
}
@@ -27,4 +29,13 @@ class ServiceProvider extends BaseServiceProvider
return new EmailRule(new Client(), $app['log'], config('mailgun-email-validation.key'));
});
}
+
+ protected function getMessage()
+ {
+ if (method_exists($this->app->translator, 'trans')) {
+ return $this->app->translator->trans($this->transKey);
+ }
+
+ return $this->app->translator->get($this->transKey);
+ }
}
|
Add support for laravel 6
|
diff --git a/src/phpDocumentor/Application.php b/src/phpDocumentor/Application.php
index <HASH>..<HASH> 100644
--- a/src/phpDocumentor/Application.php
+++ b/src/phpDocumentor/Application.php
@@ -63,17 +63,7 @@ final class Application
public function cacheFolder() : string
{
- if ($this->cacheFolder === null) {
- throw new \RuntimeException('Cache folder should be declared before first use');
- }
-
- return $this->cacheFolder;
- //return sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpdocumentor' . DIRECTORY_SEPARATOR . 'pools';
- }
-
- public function withCacheFolder(string $cacheFolder) : void
- {
- $this->cacheFolder = $cacheFolder;
+ return sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpdocumentor' . DIRECTORY_SEPARATOR . 'pools';
}
/**
|
Revert cache folder change
The cache folder is checked in the constructor and far before we can
actually determine one. As such we cannot pass our own, and perhaps need
to find another way to do caching.
|
diff --git a/packages/neos-ui/src/Containers/Modals/NodeCreationDialog/index.js b/packages/neos-ui/src/Containers/Modals/NodeCreationDialog/index.js
index <HASH>..<HASH> 100644
--- a/packages/neos-ui/src/Containers/Modals/NodeCreationDialog/index.js
+++ b/packages/neos-ui/src/Containers/Modals/NodeCreationDialog/index.js
@@ -145,10 +145,9 @@ export default class NodeCreationDialog extends PureComponent {
onRequestClose={this.handleCancel}
isOpen
isWide
- id="ddd"
>
<DisplayName name="NodeCreationDialogBody">
- <div className={style.body} id="ddd-d">
+ <div className={style.body}>
{Object.keys(configuration.elements).map((elementName, index) => {
//
// Only display errors after user input (isDirty)
|
CLEANUP: remove test id selectors
|
diff --git a/src/cells.js b/src/cells.js
index <HASH>..<HASH> 100644
--- a/src/cells.js
+++ b/src/cells.js
@@ -11,7 +11,7 @@ const appendDefaultCell = appendFromTemplate(
, appendRow = appendFromTemplate('<li class="zambezi-grid-row"></li>')
, changed = selectionChanged()
, firstLastChanged = selectionChanged().key(firstAndLast)
- , indexChanged = selectionChanged().key(d => d.index).debug(true)
+ , indexChanged = selectionChanged().key(d => d.index)
, id = property('id')
, isFirst = property('isFirst')
, isLast = property('isLast')
|
Turn off debug for cell top change.
|
diff --git a/test/unittest_checker_python3.py b/test/unittest_checker_python3.py
index <HASH>..<HASH> 100644
--- a/test/unittest_checker_python3.py
+++ b/test/unittest_checker_python3.py
@@ -28,6 +28,8 @@ def python2_only(test):
return unittest.skipIf(sys.version_info[0] > 2, 'Python 2 only')(test)
+# TODO(cpopa): Port these to the functional test framework instead.
+
class Python3CheckerTest(testutils.CheckerTestCase):
CHECKER_CLASS = checker.Python3Checker
|
Add a new TODO entry.
|
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index <HASH>..<HASH> 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -3246,6 +3246,12 @@ class Cmd(cmd.Cmd):
"""
expanded_filename = os.path.expanduser(filename)
+ if not expanded_filename.endswith('.py'):
+ self.pwarning("'{}' does not appear to be a Python file".format(expanded_filename))
+ selection = self.select('Yes No', 'Continue to try to run it as a Python script? ')
+ if selection != 'Yes':
+ return
+
# cmd_echo defaults to False for scripts. The user can always toggle this value in their script.
py_bridge.cmd_echo = False
@@ -3756,9 +3762,9 @@ class Cmd(cmd.Cmd):
self.perror("'{}' is not an ASCII or UTF-8 encoded text file".format(expanded_path))
return
- if expanded_path.endswith('.py') or expanded_path.endswith('.pyc'):
+ if expanded_path.endswith('.py'):
self.pwarning("'{}' appears to be a Python file".format(expanded_path))
- selection = self.select('Yes No', 'Continue to try to run it as a text file script? ')
+ selection = self.select('Yes No', 'Continue to try to run it as a text script? ')
if selection != 'Yes':
return
|
Print warning if a user tries to run something other than a *.py file with run_pyscript and ask them if they want to continue
|
diff --git a/tests/selenium_test.go b/tests/selenium_test.go
index <HASH>..<HASH> 100644
--- a/tests/selenium_test.go
+++ b/tests/selenium_test.go
@@ -1,3 +1,5 @@
+// +build selenium
+
/*
* Copyright (C) 2017 Red Hat, Inc.
*
|
test: restrict selenium tests runs only in selenium ci job
Change-Id: I<I>aa<I>ab<I>a<I>a<I>a<I>c5ce7bbc<I>
Reviewed-on: <URL>
|
diff --git a/core/src/main/java/com/google/errorprone/refaster/UTemplater.java b/core/src/main/java/com/google/errorprone/refaster/UTemplater.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/google/errorprone/refaster/UTemplater.java
+++ b/core/src/main/java/com/google/errorprone/refaster/UTemplater.java
@@ -930,7 +930,13 @@ public class UTemplater extends SimpleTreeVisitor<Tree, Void> {
(Class) annotationClazz,
AnnotationProxyMaker.generateAnnotation(compound, annotationClazz));
} catch (ClassNotFoundException e) {
- throw new IllegalArgumentException("Unrecognized annotation type", e);
+ String friendlyMessage =
+ "Tried to instantiate an instance of the annotation "
+ + annotationClassName
+ + " while processing "
+ + symbol.getSimpleName()
+ + ", but the annotation class file was not present on the classpath.";
+ throw new LinkageError(friendlyMessage, e);
}
}
return builder.build();
|
Expand on the error when a Refaster template is trying to be loaded, but the annotations required aren't on the classpath.
RELNOTES=n/a
PiperOrigin-RevId: <I>
|
diff --git a/openid/consumer/consumer.py b/openid/consumer/consumer.py
index <HASH>..<HASH> 100644
--- a/openid/consumer/consumer.py
+++ b/openid/consumer/consumer.py
@@ -1,7 +1,7 @@
# -*- test-case-name: openid.test.consumer -*-
"""
This module documents the main interface with the OpenID consumer
-libary. The only part of the library which has to be used and isn't
+library. The only part of the library which has to be used and isn't
documented in full here is the store required to create an
C{L{Consumer}} instance. More on the abstract store type and
concrete implementations of it that are provided in the documentation
|
[project @ consumer.consumer: doc typo]
|
diff --git a/holoviews/core/data/interface.py b/holoviews/core/data/interface.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/data/interface.py
+++ b/holoviews/core/data/interface.py
@@ -146,7 +146,7 @@ class Interface(param.Parameterized):
however if the type is expensive to import at load time the
method may be overridden.
"""
- return any(isinstance(obj, t) for t in cls.types)
+ return type(obj) in cls.types
@classmethod
def register(cls, interface):
|
Fixed bug in Interface.applies (#<I>)
|
diff --git a/spec/examples/spec_support/preparation_spec.rb b/spec/examples/spec_support/preparation_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/examples/spec_support/preparation_spec.rb
+++ b/spec/examples/spec_support/preparation_spec.rb
@@ -75,6 +75,7 @@ describe Cequel::SpecSupport::Preparation do
after(:each) do
begin
+ Cequel::Record.connection.clear_active_connections!
Cequel::Record.connection.schema.create!
rescue
nil
|
another attempt to harden the spec prep tests against intermittent failures
|
diff --git a/nsinit/nsinit/main.go b/nsinit/nsinit/main.go
index <HASH>..<HASH> 100644
--- a/nsinit/nsinit/main.go
+++ b/nsinit/nsinit/main.go
@@ -24,7 +24,7 @@ var (
ErrWrongArguments = errors.New("Wrong argument count")
)
-func init() {
+func registerFlags() {
flag.StringVar(&console, "console", "", "console (pty slave) path")
flag.StringVar(&logFile, "log", "none", "log options (none, stderr, or a file path)")
flag.IntVar(&pipeFd, "pipe", 0, "sync pipe fd")
@@ -33,6 +33,8 @@ func init() {
}
func main() {
+ registerFlags()
+
if flag.NArg() < 1 {
log.Fatal(ErrWrongArguments)
}
|
Fix tests with dockerinit lookup path
Docker-DCO-<I>-
|
diff --git a/arangodb/api.py b/arangodb/api.py
index <HASH>..<HASH> 100644
--- a/arangodb/api.py
+++ b/arangodb/api.py
@@ -326,6 +326,30 @@ class Database(object):
return db
+ @classmethod
+ def get_all(cls):
+ """
+ """
+
+ api = Client.instance().api
+
+ data = api.database.get()
+
+ database_names = data['result']
+
+ return database_names
+
+
+ @classmethod
+ def remove(cls, name):
+ """
+ """
+
+ api = Client.instance().api
+
+ api.database(name).delete()
+
+
def __init__(self, name, api, **kwargs):
"""
"""
|
Now the names of all databases can be retrieved and a database can be deleted
|
diff --git a/lib/mycroft.rb b/lib/mycroft.rb
index <HASH>..<HASH> 100644
--- a/lib/mycroft.rb
+++ b/lib/mycroft.rb
@@ -2,7 +2,6 @@ require 'mycroft/version'
require 'mycroft/cli'
require 'mycroft/helpers'
require 'mycroft/messages'
-require 'mycroft/logger'
require 'mycroft/client'
module Mycroft
|
Remove logger from mycroft.rb
|
diff --git a/src/codegeneration/ModuleTransformer.js b/src/codegeneration/ModuleTransformer.js
index <HASH>..<HASH> 100644
--- a/src/codegeneration/ModuleTransformer.js
+++ b/src/codegeneration/ModuleTransformer.js
@@ -42,7 +42,7 @@ import {assert} from '../util/assert.js';
import {
resolveUrl,
canonicalizeUrl
-} from '../../src/util/url.js';
+} from '../util/url.js';
import {
createArgumentList,
createExpressionStatement,
|
Fix import path
Towards #<I>. The extra `../src/` made this load the file in src
instead of dist.
|
diff --git a/tests/settings.py b/tests/settings.py
index <HASH>..<HASH> 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -18,3 +18,7 @@ INSTALLED_APPS = (
'django.contrib.admin',
'djangosaml2',
)
+
+AUTHENTICATION_BACKENDS = (
+ 'djangosaml2.backends.Saml2Backend',
+)
|
Add saml auth backend to settings in test project.
Now that this isn't being monkey patched in, our test project needs to have it.
|
diff --git a/core/src/main/java/net/kuujo/copycat/internal/cluster/coordinator/DefaultClusterCoordinator.java b/core/src/main/java/net/kuujo/copycat/internal/cluster/coordinator/DefaultClusterCoordinator.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/net/kuujo/copycat/internal/cluster/coordinator/DefaultClusterCoordinator.java
+++ b/core/src/main/java/net/kuujo/copycat/internal/cluster/coordinator/DefaultClusterCoordinator.java
@@ -201,7 +201,7 @@ public class DefaultClusterCoordinator implements ClusterCoordinator {
private synchronized CompletableFuture<Void> closeResources() {
List<CompletableFuture<Void>> futures = new ArrayList<>(resources.size());
for (ResourceHolder resource : resources.values()) {
- futures.add(resource.state.close().thenCompose(v -> resource.cluster.close()));
+ futures.add(resource.state.close().thenCompose(v -> resource.cluster.close()).thenRun(() -> resource.state.executor().shutdown()));
}
return CompletableFuture.allOf(futures.toArray(new CompletableFuture[futures.size()]));
}
|
Shut down resource executors when cluster is shut down.
|
diff --git a/Vps/Setup.php b/Vps/Setup.php
index <HASH>..<HASH> 100644
--- a/Vps/Setup.php
+++ b/Vps/Setup.php
@@ -26,7 +26,7 @@ class Vps_Setup
public static function setUpZend()
{
- error_reporting(E_ALL ^ E_STRICT);
+ error_reporting(E_ALL & ~E_STRICT);
if (file_exists(VPS_PATH.'/include_path')) {
$zendPath = trim(file_get_contents(VPS_PATH.'/include_path'));
@@ -112,10 +112,10 @@ class Vps_Setup
ini_set('memory_limit', '128M');
- error_reporting(E_ALL ^ E_STRICT);
+ error_reporting(E_ALL & ~E_STRICT);
date_default_timezone_set('Europe/Berlin');
mb_internal_encoding('UTF-8');
- set_error_handler(array('Vps_Debug', 'handleError'), E_ALL ^ E_STRICT);
+ set_error_handler(array('Vps_Debug', 'handleError'), E_ALL & ~E_STRICT);
set_exception_handler(array('Vps_Debug', 'handleException'));
umask(000); //nicht 002 weil wwwrun und vpcms in unterschiedlichen gruppen
|
use proper operator when removing strict from error reporting
|
diff --git a/fetcher.go b/fetcher.go
index <HASH>..<HASH> 100644
--- a/fetcher.go
+++ b/fetcher.go
@@ -253,7 +253,7 @@ func (f *consumerFetcherRoutine) start() {
Warnf(f, "Current offset %d for topic %s and partition %s is out of range.", offset, nextTopicPartition.Topic, nextTopicPartition.Partition)
f.handleOffsetOutOfRange(&nextTopicPartition)
} else {
- Warnf(f, "Got a fetch error: %s", err)
+ Warnf(f, "Got a fetch error for topic %s, partition %d: %s", nextTopicPartition.Topic, nextTopicPartition.Partition, err)
//TODO new backoff type?
time.Sleep(1 * time.Second)
}
|
Added topic-partition logging on fetch errors
|
diff --git a/lib/store.js b/lib/store.js
index <HASH>..<HASH> 100644
--- a/lib/store.js
+++ b/lib/store.js
@@ -81,8 +81,15 @@ Store.prototype.get = function(url, cb) {
}
this.Resource.one({url: url}, function(err, obj) {
if (obj) {
- // TODO populate obj.resources - needed if raja cache is not volatile
- this.lfu.set(url, this.raja.shallow(obj));
+ var lfuObj = this.raja.shallow(obj);
+ lfuObj.resources = {};
+ obj.getChildren(function(err, children) {
+ if (err) return cb(err);
+ children.forEach(function(child) {
+ lfuObj.resources[child.url] = true;
+ });
+ this.lfu.set(url, lfuObj);
+ }.bind(this));
}
cb(err, obj);
}.bind(this));
|
Populate lfuObj.resources from disk store
|
diff --git a/src/main/java/org/takes/facets/fallback/FbStatus.java b/src/main/java/org/takes/facets/fallback/FbStatus.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/takes/facets/fallback/FbStatus.java
+++ b/src/main/java/org/takes/facets/fallback/FbStatus.java
@@ -51,7 +51,7 @@ public final class FbStatus extends FbWrap {
/**
* Whitespace pattern, used for splitting.
*/
- private static final Pattern WHITESPACE_PATTERN = Pattern.compile("\\s");
+ private static final Pattern SPLIT_PATTERN = Pattern.compile("\\s");
/**
* Ctor.
@@ -82,7 +82,7 @@ public final class FbStatus extends FbWrap {
new RsWithBody(
res,
String.format(
- "%s: %s", WHITESPACE_PATTERN.split(
+ "%s: %s", SPLIT_PATTERN.split(
res.head().iterator().next(),
2
)[1], req.throwable().getLocalizedMessage()
|
Rename the WHITESPACE_PATTERN variable to SPLIT_PATTERN.
|
diff --git a/Command/WatchCommand.php b/Command/WatchCommand.php
index <HASH>..<HASH> 100644
--- a/Command/WatchCommand.php
+++ b/Command/WatchCommand.php
@@ -82,6 +82,10 @@ class WatchCommand extends AbstractAssetsCommand
$runCommand = new RunCommand();
$runCommand->setContainer($this->container);
$runCommand->run(new ArrayInput([]), $output);
+
+ // re-index the sources because they could have been changed during the previous build (for example,
+ // if the destination of a task is the source of an other task, it could lead to infinite build)
+ $indexer->index($sources);
$this
->io
|
fix infinite build if a destination of a task is the source of an other one (refs #4)
|
diff --git a/app/controllers/cfp/controller.rb b/app/controllers/cfp/controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/cfp/controller.rb
+++ b/app/controllers/cfp/controller.rb
@@ -1,11 +1,14 @@
class Cfp::Controller < ::ApplicationController
- before_filter :check_for_profile
+ before_filter :check_for_profile, :set_locale
layout 'cfp/application'
def check_for_profile
if current_user
redirect_to new_profile_path if current_user.should_create_profile?
- I18n.locale = current_user.profile.locale if current_user.profile
end
end
+
+ def set_locale
+ I18n.locale = current_user.profile.locale if current_user && current_user.profile
+ end
end
|
Separate the controller code that sets the locale
|
diff --git a/saltcloud/clouds/ec2.py b/saltcloud/clouds/ec2.py
index <HASH>..<HASH> 100644
--- a/saltcloud/clouds/ec2.py
+++ b/saltcloud/clouds/ec2.py
@@ -175,7 +175,7 @@ def get_configured_provider():
'''
return config.is_provider_configured(
__opts__,
- 'ec2',
+ __active_provider_name__ or 'ec2',
('id', 'key', 'keyname', 'private_key')
)
|
EC2 is now aware of the `__active_profile_name__` context variable. Refs #<I>
|
diff --git a/lark/load_grammar.py b/lark/load_grammar.py
index <HASH>..<HASH> 100644
--- a/lark/load_grammar.py
+++ b/lark/load_grammar.py
@@ -605,6 +605,7 @@ def import_from_grammar_into_namespace(grammar, namespace, aliases):
_, tree, _ = imported_rules[symbol]
except KeyError:
raise GrammarError("Missing symbol '%s' in grammar %s" % (symbol, namespace))
+ tree = next(tree.find_data("expansion")) # Skip "alias" or other annotations
return tree.scan_values(lambda x: x.type in ('RULE', 'TERMINAL'))
def get_namespace_name(name):
|
No longer confusing aliases and rules when importing (Issue #<I>)
|
diff --git a/www/src/py_exceptions.js b/www/src/py_exceptions.js
index <HASH>..<HASH> 100644
--- a/www/src/py_exceptions.js
+++ b/www/src/py_exceptions.js
@@ -74,14 +74,14 @@ $B.$syntax_err_line = function(exc, module, src, pos, line_num){
line = lines[line_num - 1],
lpos = pos - line_pos[line_num],
len = line.length
- exc.text = line
+ exc.text = line + '\n'
lpos -= len - line.length
if(lpos < 0){lpos = 0}
while(line.charAt(0) == ' '){
line = line.substr(1)
if(lpos > 0){lpos--}
}
- exc.offset = lpos
+ exc.offset = lpos + 1 // starts at column 1, not 0
exc.args = $B.fast_tuple([$B.$getitem(exc.args, 0),
$B.fast_tuple([module, line_num, lpos, line])])
}
|
Change in attribute offset of SyntaxError instances
|
diff --git a/pylint/checkers/logging.py b/pylint/checkers/logging.py
index <HASH>..<HASH> 100644
--- a/pylint/checkers/logging.py
+++ b/pylint/checkers/logging.py
@@ -49,7 +49,7 @@ MSGS = {
the end of a conversion specifier.'),
'E1205': ('Too many arguments for logging format string',
'logging-too-many-args',
- 'Used when a logging format string is given too many arguments'),
+ 'Used when a logging format string is given too many arguments.'),
'E1206': ('Not enough arguments for logging format string',
'logging-too-few-args',
'Used when a logging format string is given too few arguments.'),
|
Fix description of E<I>
Add full stop to E<I> to make it more consistent with other descriptions.
|
diff --git a/lib/mini_term/windows/win_32_api.rb b/lib/mini_term/windows/win_32_api.rb
index <HASH>..<HASH> 100644
--- a/lib/mini_term/windows/win_32_api.rb
+++ b/lib/mini_term/windows/win_32_api.rb
@@ -2,8 +2,6 @@
# Replacement support for deprecated win_32_api gem.
# With thanks to rb-readline gem from which this code comes.
-# This is the ugliest, smelliest Ruby code I've ever seen.
-# When the gem is up and running, clean up this crap.
module MiniTerm
require 'fiddle'
|
Got rid of snarky comments.
|
diff --git a/src/Router.php b/src/Router.php
index <HASH>..<HASH> 100644
--- a/src/Router.php
+++ b/src/Router.php
@@ -157,7 +157,7 @@ class Router {
return $response;
}
];
- register_rest_route( $this->_namespace, $route->get_path(), $args, true );
+ register_rest_route( $this->_namespace, $route->get_path(), $args );
}
}
|
set param in call of register_rest_route func to default (false) to prevent routes overriding
|
diff --git a/Resources/bundle-creator/skel/Installation/AdditionalInstaller.php b/Resources/bundle-creator/skel/Installation/AdditionalInstaller.php
index <HASH>..<HASH> 100644
--- a/Resources/bundle-creator/skel/Installation/AdditionalInstaller.php
+++ b/Resources/bundle-creator/skel/Installation/AdditionalInstaller.php
@@ -6,7 +6,7 @@ use Claroline\InstallationBundle\Additional\AdditionalInstaller as BaseInstaller
class AdditionalInsaller extends BaseInstaller
{
- private $logger;
+ protected $logger;
public function preUpdate($currentVersion, $targetVersion)
{
|
[CoreBundle] Update AdditionalInstaller.php
|
diff --git a/src/Event/Dispatcher.php b/src/Event/Dispatcher.php
index <HASH>..<HASH> 100644
--- a/src/Event/Dispatcher.php
+++ b/src/Event/Dispatcher.php
@@ -70,7 +70,7 @@ class Dispatcher implements EventDispatcherInterface
/**
* {@inheritdoc}
*/
- public function getListeners(string $eventName = null)
+ public function getListeners(string $eventName = null): array
{
throw new \Exception('Please use `Event::getListeners()`.');
}
@@ -78,7 +78,7 @@ class Dispatcher implements EventDispatcherInterface
/**
* {@inheritdoc}
*/
- public function getListenerPriority(string $eventName, $listener)
+ public function getListenerPriority(string $eventName, $listener): ?int
{
throw new \Exception('Event priority is not supported anymore in Laravel.');
}
@@ -86,7 +86,7 @@ class Dispatcher implements EventDispatcherInterface
/**
* {@inheritdoc}
*/
- public function hasListeners(string $eventName = null)
+ public function hasListeners(string $eventName = null): bool
{
throw new \Exception('Please use `Event::hasListeners()`.');
}
|
Add return types to event dispatcher
Fixes #<I>
|
diff --git a/src/main/java/com/basho/riak/client/raw/http/HTTPClientConfig.java b/src/main/java/com/basho/riak/client/raw/http/HTTPClientConfig.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/basho/riak/client/raw/http/HTTPClientConfig.java
+++ b/src/main/java/com/basho/riak/client/raw/http/HTTPClientConfig.java
@@ -199,7 +199,6 @@ public class HTTPClientConfig implements Configuration {
* @return a {@link HTTPClientConfig}
*/
public HTTPClientConfig build() {
-
String builderUrl = url;
if (builderUrl == null) {
StringBuilder sb = new StringBuilder(scheme).append("://").append(host).append(":").append(port);
@@ -236,16 +235,13 @@ public class HTTPClientConfig implements Configuration {
// In order to allow you to change the host or port through the
// the builder when we're starting from an existing config,
// we need to parse them out (and not copy the existing url).
- if (copyConfig.url != null)
- {
+ if (copyConfig.url != null) {
Pattern p = Pattern.compile("//(.*):(\\d+)/");
Matcher m = p.matcher(copyConfig.url);
- if (m.find())
- {
+ if (m.find()) {
b.host = m.group(1);
b.port = Integer.parseInt(m.group(2));
}
-
}
return b;
|
Fixed style, with apolgies to Russell
|
diff --git a/lib/datalib.php b/lib/datalib.php
index <HASH>..<HASH> 100644
--- a/lib/datalib.php
+++ b/lib/datalib.php
@@ -49,14 +49,9 @@ function setup_DB() {
$CFG->dboptions = array();
}
- if ($CFG->dblibrary == 'adodb') {
- $classname = $CFG->dbtype.'_adodb_moodle_database';
- require_once($CFG->libdir.'/dml/'.$classname.'.php');
- $DB = new $classname();
-
- } else {
- error('Not implemented db library yet: '.$CFG->dblibrary);
- }
+ $classname = $CFG->dbtype.'_'.$CFG->dblibrary.'_moodle_database';
+ require_once($CFG->libdir.'/dml/'.$classname.'.php');
+ $DB = new $classname();
$CFG->dbfamily = $DB->get_dbfamily(); // TODO: BC only for now
|
MDL-<I> support for other database driver types
|
diff --git a/tests/Aura/Intl/IntlFormatterTest.php b/tests/Aura/Intl/IntlFormatterTest.php
index <HASH>..<HASH> 100644
--- a/tests/Aura/Intl/IntlFormatterTest.php
+++ b/tests/Aura/Intl/IntlFormatterTest.php
@@ -26,7 +26,7 @@ class IntlFormatterTest extends BasicFormatterTest
$string = '{:pages,plural,'
. '=0{No pages.}'
. '=1{One page only.}'
- . 'other{Page {:page} of {:pages} pages.}'
+ . 'other{Page {:page} of # pages.}'
. '}';
$tokens_values = ['page' => 0, 'pages' => 0];
|
use # instead of {:pages} as the latter causes trouble in some cases
|
diff --git a/src/Convert/Converters/Gd.php b/src/Convert/Converters/Gd.php
index <HASH>..<HASH> 100644
--- a/src/Convert/Converters/Gd.php
+++ b/src/Convert/Converters/Gd.php
@@ -353,6 +353,8 @@ class Gd extends AbstractConverter
// I'm not certain that the error handler takes care of Throwable errors.
// and - sorry - was to lazy to find out right now. So for now: better safe than sorry. #320
$error = null;
+ $success = false;
+
try {
// Beware: This call can throw FATAL on windows (cannot be catched)
// This for example happens on palette images
|
make sure $success is defined
|
diff --git a/youtubemodal/index.js b/youtubemodal/index.js
index <HASH>..<HASH> 100644
--- a/youtubemodal/index.js
+++ b/youtubemodal/index.js
@@ -259,7 +259,10 @@ function dispose() {
}
singleton.dispose();
singleton = null;
- player = null;
+ if (player) {
+ player.destroy();
+ player = null;
+ }
}
/**
|
destroy() YT player in youtubemodal dispose
|
diff --git a/src/ResourceStorage.php b/src/ResourceStorage.php
index <HASH>..<HASH> 100644
--- a/src/ResourceStorage.php
+++ b/src/ResourceStorage.php
@@ -86,7 +86,7 @@ final class ResourceStorage implements ResourceStorageInterface
assert($pool instanceof AdapterInterface);
if ($etagPool instanceof AdapterInterface) {
- $this->roPool = new TagAwareAdapter($pool, $etagPool);
+ $this->roPool = new TagAwareAdapter($pool, $etagPool, 0);
$this->etagPool = new TagAwareAdapter($etagPool);
return;
|
Add red condition
Set $knownTagVersionsTtl 0
|
diff --git a/py3status/__init__.py b/py3status/__init__.py
index <HASH>..<HASH> 100755
--- a/py3status/__init__.py
+++ b/py3status/__init__.py
@@ -5,6 +5,7 @@ import os
import select
import sys
+from collections import OrderedDict
from contextlib import contextmanager
from copy import deepcopy
from datetime import datetime, timedelta
@@ -846,7 +847,7 @@ class Module(Thread):
self.i3status_thread = i3_thread
self.last_output = []
self.lock = lock
- self.methods = {}
+ self.methods = OrderedDict()
self.module_class = None
self.module_inst = ''.join(module.split(' ')[1:])
self.module_name = module.split(' ')[0]
|
fix issue #<I>, ensure modules methods are always iterated alphabetically thx to @shankargopal
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.