diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/html/pipeline/sanitization_filter.rb b/lib/html/pipeline/sanitization_filter.rb
index <HASH>..<HASH> 100644
--- a/lib/html/pipeline/sanitization_filter.rb
+++ b/lib/html/pipeline/sanitization_filter.rb
@@ -1,8 +1,4 @@
-begin
- require "sanitize"
-rescue LoadError => _
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'sanitize' for SanitizationFilter. See README.md for details."
-end
+HTML::Pipeline.require_dependency("sanitize", "SanitizationFilter")
module HTML
class Pipeline
|
require dependency for SanitizationFilter
|
diff --git a/lib/Widget/Validator/File.php b/lib/Widget/Validator/File.php
index <HASH>..<HASH> 100644
--- a/lib/Widget/Validator/File.php
+++ b/lib/Widget/Validator/File.php
@@ -433,7 +433,7 @@ class File extends AbstractValidator
$file = basename($this->originFile);
// Use substr instead of pathinfo, because pathinfo may return error value in unicode
if (false !== $pos = strrpos($file, '.')) {
- $this->ext = substr($file, $pos + 1);
+ $this->ext = strtolower(substr($file, $pos + 1));
} else {
$this->ext = '';
}
|
fixed file extension is case insensitive in file validtor and upload widget, close #<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ license: GNU-GPL2
from setuptools import setup
setup(name='pyprofiler',
- version='62',
+ version='63',
description='Profiler utility for python, graphical and textual, whole program or segments',
url='https://github.com/erikdejonge/pyprofiler',
author='Erik de Jonge',
|
Monday <I> August <I> (week:<I> day:<I>), <I>:<I>:<I>
|
diff --git a/JSAT/test/jsat/clustering/kmeans/XMeansTest.java b/JSAT/test/jsat/clustering/kmeans/XMeansTest.java
index <HASH>..<HASH> 100644
--- a/JSAT/test/jsat/clustering/kmeans/XMeansTest.java
+++ b/JSAT/test/jsat/clustering/kmeans/XMeansTest.java
@@ -8,6 +8,8 @@ import java.util.concurrent.Executors;
import jsat.SimpleDataSet;
import jsat.classifiers.DataPoint;
import jsat.clustering.SeedSelectionMethods;
+import jsat.distributions.Normal;
+import jsat.distributions.TruncatedDistribution;
import jsat.distributions.Uniform;
import jsat.linear.distancemetrics.EuclideanDistance;
import jsat.utils.GridDataGenerator;
@@ -39,8 +41,8 @@ public class XMeansTest
@BeforeClass
public static void setUpClass()
{
- GridDataGenerator gdg = new GridDataGenerator(new Uniform(0.0, 0.10), new XORWOW(), 2, 2);
- easyData10 = gdg.generateData(50);
+ GridDataGenerator gdg = new GridDataGenerator(new TruncatedDistribution(new Normal(0, 0.05), -.15, .15), new XORWOW(), 2, 2);
+ easyData10 = gdg.generateData(100);
ex = Executors.newFixedThreadPool(SystemInfo.LogicalCores);
}
|
Improved test reliability by making the distribution better behaved and match what XMeans assumes
|
diff --git a/django_webmap_corpus/tests/south_settings.py b/django_webmap_corpus/tests/south_settings.py
index <HASH>..<HASH> 100644
--- a/django_webmap_corpus/tests/south_settings.py
+++ b/django_webmap_corpus/tests/south_settings.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
"""
These settings are used by the ``manage.py`` command.
|
add unicode to south_settings
|
diff --git a/lib/verku/version.rb b/lib/verku/version.rb
index <HASH>..<HASH> 100644
--- a/lib/verku/version.rb
+++ b/lib/verku/version.rb
@@ -1,5 +1,5 @@
module Verku
- VERSION = '0.9.0.pre41'
+ VERSION = '0.9.0.pre42'
# module Version
# MAJOR = 0
# MINOR = 9
|
Bump to <I>.pre<I>
|
diff --git a/src/validator.js b/src/validator.js
index <HASH>..<HASH> 100644
--- a/src/validator.js
+++ b/src/validator.js
@@ -54,7 +54,8 @@ function checkAnchor(dom, sourcefile, destinationPath, files) {
function checkStatics(dom, sourcefile, destinationPath, files) {
const validatableImage = image =>
!image.attribs.src.startsWith('http://') &&
- !image.attribs.src.startsWith('https://');
+ !image.attribs.src.startsWith('https://') &&
+ !image.attribs.src.startsWith('//');
const images = select(dom, 'img[src]');
images
|
fix: ignore images with protocol relative src
|
diff --git a/cli.js b/cli.js
index <HASH>..<HASH> 100755
--- a/cli.js
+++ b/cli.js
@@ -6,11 +6,12 @@ var path = require('path')
var prog = path.resolve(process.argv[2])
console.log('probing program', prog)
-console.log('kill -SIGUSR1', process.pid, 'for logging')
var nodeArgs = [
'-r',
path.join(__dirname, 'include.js')
]
var nodeOpts = { stdio: 'inherit' }
-spawn('node', nodeArgs.concat(prog), nodeOpts)
+var child = spawn('node', nodeArgs.concat(prog), nodeOpts)
+
+console.log('kill -SIGUSR1', child.pid, 'for logging')
diff --git a/include.js b/include.js
index <HASH>..<HASH> 100644
--- a/include.js
+++ b/include.js
@@ -1,3 +1,3 @@
var why = require('./')
-process.on('SIGUSR1', why)
+process.on('SIGUSR1', function() { why() })
|
Fix CLI reporting the wrong PID and causing logging to fail on SIGUSR1 (#<I>)
* Fix not reporting the child process PID
* Fix 'SIGUSR1' being passed as the logger
|
diff --git a/lib/xcresources/builder/resources_builder.rb b/lib/xcresources/builder/resources_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/xcresources/builder/resources_builder.rb
+++ b/lib/xcresources/builder/resources_builder.rb
@@ -103,9 +103,9 @@ class XCResources::ResourcesBuilder < XCResources::FileBuilder
struct.section do |section_struct|
enumerate_keys.call do |key, value, comment|
if documented?
- section_struct.writeln "/// %s" % (comment || value) #unless comment.nil?
+ section_struct.writeln '/// %s' % (comment || value) #unless comment.nil?
end
- section_struct.writeln "__unsafe_unretained NSString *%s;" % key
+ section_struct.writeln '__unsafe_unretained NSString *%s;' % key
end
end
struct.writeln '} %s;' % section_key
|
[CodeStyle] Use single quotes instead of double quotes
|
diff --git a/tasks/lib/hooks/notify-fail.js b/tasks/lib/hooks/notify-fail.js
index <HASH>..<HASH> 100644
--- a/tasks/lib/hooks/notify-fail.js
+++ b/tasks/lib/hooks/notify-fail.js
@@ -9,6 +9,8 @@
module.exports = function(grunt, options) {
+ var message_count = 0;
+
var StackParser = require('stack-parser');
var notify = require('../notify-lib');
@@ -45,6 +47,8 @@ module.exports = function(grunt, options) {
*/
function notifyHook(e) {
+ message_count++;
+
var message;
if (!options.enabled) {
@@ -67,7 +71,10 @@ module.exports = function(grunt, options) {
message = e;
}
- //grunt.log.ok('!!!!!!', message);
+ if (message_count > 0 && message === 'Aborted due to warnings.') {
+ // skip unhelpful message because there was probably another one that was more helpful
+ return;
+ }
return notify({
title: options.title + (grunt.task.current.nameArgs ? ' ' + grunt.task.current.nameArgs : ''),
|
don't show 'Aborted due to warnings.' when a more helpful message was displayed.
|
diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Repository/ComposerRepository.php
+++ b/src/Composer/Repository/ComposerRepository.php
@@ -584,6 +584,11 @@ class ComposerRepository extends ArrayRepository
$filename = $this->baseUrl.'/'.$filename;
}
+ // url-encode $ signs in URLs as bad proxies choke on them
+ if ($pos = strpos($filename, '$')) {
+ $filename = substr($filename, 0, $pos) . '%24' . substr($filename, $pos+1);
+ }
+
$retries = 3;
while ($retries--) {
try {
|
URL-encode dollar signs to work around bad proxy failures
|
diff --git a/lib/global_id/uri/gid.rb b/lib/global_id/uri/gid.rb
index <HASH>..<HASH> 100644
--- a/lib/global_id/uri/gid.rb
+++ b/lib/global_id/uri/gid.rb
@@ -89,7 +89,7 @@ module URI
def to_s
# Implement #to_s to avoid no implicit conversion of nil into string when path is nil
- "gid://#{app}#{path_query}"
+ "gid://#{app}#{path}#{'?' + query if query}"
end
protected
|
Avoid using internal path_query method.
|
diff --git a/src/Popover/components/ContentWrapper.js b/src/Popover/components/ContentWrapper.js
index <HASH>..<HASH> 100644
--- a/src/Popover/components/ContentWrapper.js
+++ b/src/Popover/components/ContentWrapper.js
@@ -48,6 +48,7 @@ const StyledPopoverParent = styled.div`
padding-top: ${({ theme, noPadding }) => (noPadding ? 0 : theme.orbit.spaceMedium)};
box-shadow: ${({ theme }) => theme.orbit.boxShadowElevatedLevel1};
overflow: hidden;
+ z-index: 1000;
&:focus {
outline: 0;
@@ -82,6 +83,7 @@ const StyledOverlay = styled.div`
height: 100%;
background-color: rgba(23, 27, 30, 0.6); // TODO: token
animation: ${opacityAnimation} ${({ theme }) => theme.orbit.durationFast} ease-in;
+ z-index: 999;
${media.largeMobile(css`
background-color: transparent;
|
FIX: Popover z-index (#<I>)
|
diff --git a/lib/virtualbox/vm.rb b/lib/virtualbox/vm.rb
index <HASH>..<HASH> 100644
--- a/lib/virtualbox/vm.rb
+++ b/lib/virtualbox/vm.rb
@@ -578,9 +578,10 @@ module VirtualBox
media = interface.unregister(:full)
if !media.empty?
- if Platform.windows? && !Platform.jruby?
+ if Platform.windows?
# The MSCOM interface in CRuby to delete media is broken,
- # so we do this ghettoness.
+ # so we do this ghettoness. Also, in JRuby, passing an array
+ # to objects is broken. So once again, we do this.
path = interface.settings_file_path
# A simple sanity check to make sure we don't attempt to delete
@@ -589,8 +590,6 @@ module VirtualBox
Pathname.new(path).parent.rmtree
end
else
- # NOTE: This doesn't work on JRuby because passing an array as
- # an argument to a method doesn't work...
interface.delete(media)
# TODO: This sleep is silly. The progress object returned by the media
|
Fix longstanding JRuby stack trace issue
|
diff --git a/test/unexpectedMitm.js b/test/unexpectedMitm.js
index <HASH>..<HASH> 100644
--- a/test/unexpectedMitm.js
+++ b/test/unexpectedMitm.js
@@ -2126,6 +2126,13 @@ describe('unexpectedMitm', () => {
);
}
));
+
+ it('should not break when the assertion being delegated to throws synchronously', () =>
+ expect(
+ expect('http://www.google.com/', 'with http recorded', 'to foobarquux'),
+ 'to be rejected with',
+ /^Unknown assertion 'to foobarquux'/
+ ));
});
describe('in injecting mode against a local HTTP server', () => {
|
Add a test case for sync throw in "with http recorded".
|
diff --git a/concrete/controllers/single_page/dashboard/users/attributes.php b/concrete/controllers/single_page/dashboard/users/attributes.php
index <HASH>..<HASH> 100644
--- a/concrete/controllers/single_page/dashboard/users/attributes.php
+++ b/concrete/controllers/single_page/dashboard/users/attributes.php
@@ -39,7 +39,7 @@ class Attributes extends DashboardAttributesPageController
{
$type = Type::getByID($type);
$this->renderAdd($type,
- \URL::to('/dashboard/users/attributes', 'view', $id)
+ \URL::to('/dashboard/users/attributes', 'view')
);
}
|
Don't use an undefined var in users/attributes dashboard page controller
|
diff --git a/lib/oxidized/api/rest.rb b/lib/oxidized/api/rest.rb
index <HASH>..<HASH> 100644
--- a/lib/oxidized/api/rest.rb
+++ b/lib/oxidized/api/rest.rb
@@ -50,7 +50,7 @@ module Oxidized
if $1.include? '/'
group, node = $1.split("/")[1..2]
else
- group, node = 0, $1
+ group, node = nil, $1
end
ascii = if node[-4..-1] == '.txt'
node = node[0..-5]
|
set group to nil if no group is defined
|
diff --git a/lib/processImage.js b/lib/processImage.js
index <HASH>..<HASH> 100644
--- a/lib/processImage.js
+++ b/lib/processImage.js
@@ -175,15 +175,14 @@ module.exports = options => {
function startProcessing(optionalFirstChunk) {
let hasEnded = false;
-
let cleanedUp = false;
function cleanUp(doNotDestroyHijacked) {
- if (!doNotDestroyHijacked) {
- res.destroyHijacked();
- }
-
if (!cleanedUp) {
+ if (!doNotDestroyHijacked) {
+ res.destroyHijacked();
+ }
+
cleanedUp = true;
res.removeAllListeners();
|
Protect everything in the cleanUp() function with the flag.
|
diff --git a/lib/spout/version.rb b/lib/spout/version.rb
index <HASH>..<HASH> 100644
--- a/lib/spout/version.rb
+++ b/lib/spout/version.rb
@@ -3,7 +3,7 @@ module Spout
MAJOR = 0
MINOR = 8
TINY = 0
- BUILD = "beta8" # nil, "pre", "rc", "rc2"
+ BUILD = "beta9" # nil, "pre", "rc", "rc2"
STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
end
|
Version bump to <I>.beta9
|
diff --git a/zap/src/main/java/org/zaproxy/zap/view/TabbedPanel2.java b/zap/src/main/java/org/zaproxy/zap/view/TabbedPanel2.java
index <HASH>..<HASH> 100644
--- a/zap/src/main/java/org/zaproxy/zap/view/TabbedPanel2.java
+++ b/zap/src/main/java/org/zaproxy/zap/view/TabbedPanel2.java
@@ -386,6 +386,18 @@ public class TabbedPanel2 extends TabbedPanel {
addTab(title, icon, c, hideable, visible, index, true);
}
+ @Override
+ public void insertTab(String title, Icon icon, Component component, String tip, int index) {
+ super.insertTab(title, icon, component, tip, index);
+ if (!isPlusTab(icon) && !this.fullTabList.contains(component)) {
+ this.fullTabList.add(component);
+ }
+ }
+
+ private boolean isPlusTab(Icon icon) {
+ return icon == PLUS_ICON;
+ }
+
/**
* Adds a tab with the given component.
*
|
Keep track of inserted tabs
Change `TabbedPanel2` to track also tabs inserted, not all of them are
added (e.g. Response tab might be inserted when changing the layout of
the Request/Response panels).
Fix #<I>.
|
diff --git a/test/Test/Staq/ApplicationTest.php b/test/Test/Staq/ApplicationTest.php
index <HASH>..<HASH> 100755
--- a/test/Test/Staq/ApplicationTest.php
+++ b/test/Test/Staq/ApplicationTest.php
@@ -94,7 +94,7 @@ class ApplicationTest extends StaqTestCase
public function test_error_reporting__none()
{
$app = \Staq\App::create();
- $this->assertEquals(0, ini_get('error_reporting'));
+ $this->assertEquals(0, ini_get('display_errors'));
}
public function test_error_reporting__display()
@@ -102,7 +102,7 @@ class ApplicationTest extends StaqTestCase
$this->setExpectedException('PHPUnit_Framework_Error');
$app = \Staq\App::create()
->setPlatform('local');
- $this->assertEquals(30719, ini_get('error_reporting'));
+ $this->assertEquals(1, ini_get('display_errors'));
trigger_error('Test of warnings', E_USER_ERROR);
}
}
\ No newline at end of file
|
Do not prevent error bubbling in production
|
diff --git a/h2o-core/src/main/java/water/rapids/ASTFunc.java b/h2o-core/src/main/java/water/rapids/ASTFunc.java
index <HASH>..<HASH> 100644
--- a/h2o-core/src/main/java/water/rapids/ASTFunc.java
+++ b/h2o-core/src/main/java/water/rapids/ASTFunc.java
@@ -185,6 +185,7 @@ class ASTFuncDef extends ASTOp {
// parse the function args: these are just arg names -> will do _local.put(name, Env.NULL, null) (local ST put)
Env.SymbolTable table = E._env.newTable(); // grab a new SymbolTable
String[] args = E.skipWS().peek() == '{' ? E.xpeek('{').parseString('}').split(";") : null;
+ for (int i = 0; i < args.length;++i) args[i] = args[i].replaceAll("\\s+","");
_arg_names = args;
if (args == null) table.put(null, Env.NULL, null);
else for (String arg : args) table.put(arg, Env.NULL, null);
|
fix ws issue around var names
|
diff --git a/cmd/gateway/gcs/gateway-gcs.go b/cmd/gateway/gcs/gateway-gcs.go
index <HASH>..<HASH> 100644
--- a/cmd/gateway/gcs/gateway-gcs.go
+++ b/cmd/gateway/gcs/gateway-gcs.go
@@ -19,6 +19,7 @@ package gcs
import (
"context"
"encoding/base64"
+ "encoding/hex"
"encoding/json"
"errors"
"fmt"
@@ -830,12 +831,17 @@ func fromGCSAttrsToObjectInfo(attrs *storage.ObjectAttrs) minio.ObjectInfo {
if attrs.ContentLanguage != "" {
metadata["Content-Language"] = attrs.ContentLanguage
}
+
+ etag := hex.EncodeToString(attrs.MD5)
+ if etag == "" {
+ etag = minio.ToS3ETag(fmt.Sprintf("%d", attrs.CRC32C))
+ }
return minio.ObjectInfo{
Name: attrs.Name,
Bucket: attrs.Bucket,
ModTime: attrs.Updated,
Size: attrs.Size,
- ETag: minio.ToS3ETag(fmt.Sprintf("%d", attrs.CRC32C)),
+ ETag: etag,
UserDefined: metadata,
ContentType: attrs.ContentType,
ContentEncoding: attrs.ContentEncoding,
|
gcs: use MD5Sum as ETag if present in object attrs (#<I>)
Fixes: <I>
|
diff --git a/java/tests/com/google/template/soy/jbcsrc/TemplateAnalysisTest.java b/java/tests/com/google/template/soy/jbcsrc/TemplateAnalysisTest.java
index <HASH>..<HASH> 100644
--- a/java/tests/com/google/template/soy/jbcsrc/TemplateAnalysisTest.java
+++ b/java/tests/com/google/template/soy/jbcsrc/TemplateAnalysisTest.java
@@ -266,25 +266,6 @@ public final class TemplateAnalysisTest {
@Test
public void testForeach_literalList() {
// test literal lists
- // empty list
- runTest(
- "{call .loop data=\"all\"}",
- " {param list: [] /}",
- "{/call}",
- "{/template}",
- "",
- "{template .loop}",
- "{@param list: list<?>}",
- "{@param p: ?}",
- "{@param p2: ?}",
- "{for $item in $list}",
- " {$p}",
- "{ifempty}",
- " {$p2}",
- "{/for}",
- "{notrefed($p)}",
- "{refed($p2)}");
-
// nonempty list
runTest(
"{@param p: ?}",
|
Delete incorrect test. The first template only is searched for refed/notrefed. In this case it looks like neither $p or $p2 are actually marked as refed at the end of the method. I'm not sure how to iterate over an empty list as I get a soy compilation error ("Can't iterate over empty list").
-------------
Created by MOE: <URL>
|
diff --git a/container_daemon/spawn.go b/container_daemon/spawn.go
index <HASH>..<HASH> 100644
--- a/container_daemon/spawn.go
+++ b/container_daemon/spawn.go
@@ -111,7 +111,9 @@ func wireExit(cmd *exec.Cmd, runner Runner) (*os.File, error) {
func handleCompletion(runner Runner, cmd *exec.Cmd, exitW *os.File, stdout, stderr io.Writer) {
defer exitW.Close()
defer tryClose(stdout)
- defer tryClose(stderr)
+ if stderr != stdout {
+ defer tryClose(stderr)
+ }
status := runner.Wait(cmd)
exitW.Write([]byte{status})
}
|
Avoid closing the same stream twice.
[#<I>]
|
diff --git a/salt/fileclient.py b/salt/fileclient.py
index <HASH>..<HASH> 100644
--- a/salt/fileclient.py
+++ b/salt/fileclient.py
@@ -167,6 +167,16 @@ class Client(object):
'''
Download and cache all files on a master in a specified environment
'''
+ if env is not None:
+ salt.utils.warn_until(
+ 'Boron',
+ 'Passing a salt environment should be done using \'saltenv\' '
+ 'not \'env\'. This functionality will be removed in Salt '
+ 'Boron.'
+ )
+ # Backwards compatibility
+ saltenv = env
+
ret = []
for path in self.file_list(saltenv):
ret.append(self.cache_file('salt://{0}'.format(path), saltenv))
@@ -1103,6 +1113,16 @@ class RemoteClient(Client):
'''
Return a list of the files in the file server's specified environment
'''
+ if env is not None:
+ salt.utils.warn_until(
+ 'Boron',
+ 'Passing a salt environment should be done using \'saltenv\' '
+ 'not \'env\'. This functionality will be removed in Salt '
+ 'Boron.'
+ )
+ # Backwards compatibility
+ saltenv = env
+
load = {'saltenv': saltenv,
'cmd': '_file_list'}
try:
|
add some apparently-missing env/saltenv compatibility code to fileclient
|
diff --git a/lib/Teepee.js b/lib/Teepee.js
index <HASH>..<HASH> 100644
--- a/lib/Teepee.js
+++ b/lib/Teepee.js
@@ -369,7 +369,7 @@ Teepee.prototype.request = function (options, cb) {
var requestTimeoutId;
if (typeof timeout === 'number') {
- currentRequest.setTimeout(options.timeout);
+ currentRequest.setTimeout(timeout);
requestTimeoutId = setTimeout(function () {
handleRequestError(new socketErrors.ETIMEDOUT());
}, timeout);
|
Get the timeout from the right place.
|
diff --git a/src/WellCommerce/Bundle/MultiStoreBundle/EventListener/ShopSubscriber.php b/src/WellCommerce/Bundle/MultiStoreBundle/EventListener/ShopSubscriber.php
index <HASH>..<HASH> 100644
--- a/src/WellCommerce/Bundle/MultiStoreBundle/EventListener/ShopSubscriber.php
+++ b/src/WellCommerce/Bundle/MultiStoreBundle/EventListener/ShopSubscriber.php
@@ -29,11 +29,22 @@ class ShopSubscriber extends AbstractEventSubscriber
public static function getSubscribedEvents()
{
return [
- KernelEvents::CONTROLLER => ['onKernelController', -256]
+ KernelEvents::CONTROLLER => ['onKernelController', -256],
+ 'shop.post_update' => 'onShopListModified',
+ 'shop.post_create' => 'onShopListModified',
+ 'shop.post_remove' => 'onShopListModified',
];
}
/**
+ * Clears session data after shop list was changed
+ */
+ public function onShopListModified()
+ {
+ $this->container->get('session')->remove('admin/shops');
+ }
+
+ /**
* Registers all available shops in admin session
*
* @param FilterControllerEvent $event
|
Session clear after add/update/delete of shop
|
diff --git a/src/main/java/com/couchbase/lite/replicator/Replication.java b/src/main/java/com/couchbase/lite/replicator/Replication.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/couchbase/lite/replicator/Replication.java
+++ b/src/main/java/com/couchbase/lite/replicator/Replication.java
@@ -104,7 +104,7 @@ public abstract class Replication {
* @exclude
*/
@InterfaceAudience.Private
- /* package */ public Replication(Database db, URL remote, boolean continuous, ScheduledExecutorService workExecutor) {
+ /* package */ Replication(Database db, URL remote, boolean continuous, ScheduledExecutorService workExecutor) {
this(db, remote, continuous, null, workExecutor);
}
@@ -113,7 +113,7 @@ public abstract class Replication {
* @exclude
*/
@InterfaceAudience.Private
- /* package */ public Replication(Database db, URL remote, boolean continuous, HttpClientFactory clientFactory, ScheduledExecutorService workExecutor) {
+ /* package */ Replication(Database db, URL remote, boolean continuous, HttpClientFactory clientFactory, ScheduledExecutorService workExecutor) {
this.db = db;
this.continuous = continuous;
|
Noticed these constructors were not actually package private and should be.
|
diff --git a/live_tests/helpers/configuration.py b/live_tests/helpers/configuration.py
index <HASH>..<HASH> 100644
--- a/live_tests/helpers/configuration.py
+++ b/live_tests/helpers/configuration.py
@@ -1,5 +1,4 @@
import os
-import sys
# Default settings for testing.
LOCATION = os.getenv('PROFITBRICKS_LOCATION', 'us/lasdev')
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -52,7 +52,7 @@ setup(
author_email='baldwin@stackpointcloud.com',
url='https://github.com/profitbricks/profitbricks-sdk-python',
download_url='https://github.com/profitbricks/profitbricks-sdk-python/tarball/2.3.1',
- install_requires=['requests>=2.0.0','six>=1.10.0'],
+ install_requires=['requests>=2.0.0', 'six>=1.10.0'],
packages=['profitbricks'],
platforms='any',
test_suite='profitbricks.test.test_profitbricks',
|
Applied flake8 rules to:
* live_tests/helpers/configuration.py
* setup.py
|
diff --git a/views/show.blade.php b/views/show.blade.php
index <HASH>..<HASH> 100644
--- a/views/show.blade.php
+++ b/views/show.blade.php
@@ -75,7 +75,7 @@ LogViewer
<p>Are you sure you wish to continue?</p>
</div>
<div class="modal-footer">
- {!! HTML::link($url.'/'.$date.'/delete', 'Yes', array('class' => 'btn btn-success')) !!}
+ <a class="btn btn-success" href="{{ $url.'/'.$date.'/delete' }}">Yes</a>
<button class="btn btn-danger" data-dismiss="modal">No</button>
</div>
</div>
|
Removed remaining usage of the html component
|
diff --git a/polyfills/Event/hashchange/polyfill.js b/polyfills/Event/hashchange/polyfill.js
index <HASH>..<HASH> 100644
--- a/polyfills/Event/hashchange/polyfill.js
+++ b/polyfills/Event/hashchange/polyfill.js
@@ -1,18 +1,18 @@
(function (global) {
- var
- hash = global.location.hash,
- func = function () {
+ var hash = global.location.hash;
+
+ function poll () {
if (hash !== global.location.hash) {
hash = global.location.hash;
global.dispatchEvent(new Event('hashchange'));
}
- setTimeout(func, 200);
+ setTimeout(poll, 500);
};
// Make sure a check for 'onhashchange' in window will pass (note: setting to undefined IE<9 causes 'Not implemented' error)
global.onhashchange = function() {};
- func();
+ poll();
})(this);
|
Tidy up hashchange a bit
|
diff --git a/examples/full-event-client-example.py b/examples/full-event-client-example.py
index <HASH>..<HASH> 100644
--- a/examples/full-event-client-example.py
+++ b/examples/full-event-client-example.py
@@ -16,7 +16,7 @@ Implement the API found here for code/token exchange:
https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-exchange-example
(NOTE: Redirect URI is needed and should be what's set in your Dev Application's OAuth2 screen)
'''
-token = exchange_code(code_grant)
+token = exchange_code(code_grant) # noqa: F821 undefined name 'exchange_code' See PR #110
# Now authenticate with the token we got (Save to skip authorization later)
c.authenticate(token['access_token'])
|
Update full-event-client-example.py
|
diff --git a/lib/picasa/client.rb b/lib/picasa/client.rb
index <HASH>..<HASH> 100644
--- a/lib/picasa/client.rb
+++ b/lib/picasa/client.rb
@@ -74,7 +74,7 @@ module Picasa
end
def credentials
- {user_id: user_id}.tap do |credentials|
+ {:user_id => user_id}.tap do |credentials|
credentials[:authorization_header] = authorization_header if authorization_header
end
end
|
changed to <I> hash style
|
diff --git a/piplicenses.py b/piplicenses.py
index <HASH>..<HASH> 100644
--- a/piplicenses.py
+++ b/piplicenses.py
@@ -31,6 +31,7 @@ from __future__ import (division, print_function,
import sys
import glob
import os
+import codecs
import argparse
from functools import partial
from email.parser import FeedParser
@@ -124,7 +125,9 @@ def get_packages(args):
for test_file in glob.glob(license_file_base):
if os.path.exists(test_file):
license_file = test_file
- with open(test_file) as license_file_handle:
+ with codecs.open(test_file,
+ encoding='utf-8',
+ errors='replace') as license_file_handle:
file_lines = license_file_handle.readlines()
try:
# python 3 is happy with maybe-Unicode files
|
Open license file works well with Windows and Python <I> #<I>
|
diff --git a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
index <HASH>..<HASH> 100644
--- a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
+++ b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
@@ -361,14 +361,12 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> implements Groov
this.sourceUnit = sourceUnit;
this.moduleNode = new ModuleNode(sourceUnit);
- CharStream charStream = createCharStream(sourceUnit);
-
- this.lexer = new GroovyLangLexer(charStream);
+ this.lexer = new GroovyLangLexer(createCharStream(sourceUnit));
this.parser =
new GroovyLangParser(
new CommonTokenStream(this.lexer));
- this.parser.setErrorHandler(new DescriptiveErrorStrategy(charStream));
+ this.parser.setErrorHandler(new DescriptiveErrorStrategy(this.lexer.getInputStream()));
this.tryWithResourcesASTTransformation = new TryWithResourcesASTTransformation(this);
this.groovydocManager = GroovydocManager.getInstance();
|
Trivial refactoring: use the char stream of lexer instead
|
diff --git a/src/article/editor/EditorPackage.js b/src/article/editor/EditorPackage.js
index <HASH>..<HASH> 100644
--- a/src/article/editor/EditorPackage.js
+++ b/src/article/editor/EditorPackage.js
@@ -90,6 +90,7 @@ import EditReferenceWorkflow from './EditReferenceWorkflow'
// FIXME: this should be shared
import CollectionEditor from '../metadata/CollectionEditor'
+import ModelPreviewComponent from '../shared/ModelPreviewComponent'
export default {
name: 'ManscruptEditor',
@@ -119,6 +120,7 @@ export default {
// HACK: to get components working taken from metadata editor
config.addComponent('entity', NodeModelEditor)
+ config.addComponent('model-preview', ModelPreviewComponent)
config.addComponent('front-matter', FrontMatterComponent)
config.addComponent('back-matter', CompositeModelComponent)
|
Bring back reference header for edit reference workflow.
|
diff --git a/leaflet.snap.js b/leaflet.snap.js
index <HASH>..<HASH> 100644
--- a/leaflet.snap.js
+++ b/leaflet.snap.js
@@ -178,7 +178,10 @@ L.Draw.Feature.SnapMixin = {
}
if (!this._mouseMarker) {
+ this._map.on('layeradd', this._snap_on_enabled, this);
return;
+ }else{
+ this._map.off('layeradd', this._snap_on_enabled, this);
}
if (!this._snapper) {
|
Fixed issue #<I> (second version)
|
diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go
index <HASH>..<HASH> 100644
--- a/builder/amazon/ebs/builder.go
+++ b/builder/amazon/ebs/builder.go
@@ -46,6 +46,8 @@ func (b *Builder) Prepare(raws ...interface{}) error {
// Accumulate any errors
errs := common.CheckUnusedConfig(md)
+ errs = packer.MultiErrorAppend(errs, b.config.AccessConfig.Prepare()...)
+ errs = packer.MultiErrorAppend(errs, b.config.RunConfig.Prepare()...)
// Accumulate any errors
if b.config.AMIName == "" {
|
builder/amazon/ebs: validate access config
|
diff --git a/integration/lifecycle/lifecycle_test.go b/integration/lifecycle/lifecycle_test.go
index <HASH>..<HASH> 100644
--- a/integration/lifecycle/lifecycle_test.go
+++ b/integration/lifecycle/lifecycle_test.go
@@ -573,6 +573,23 @@ var _ = Describe("Creating a container", func() {
Expect(stdout).To(gbytes.Say(" root "))
})
+ if os.Getenv("BTRFS_SUPPORTED") != "" { // VFS driver does not support this feature`
+ It("sees the root directory as owned by the container's root user", func() {
+ stdout := gbytes.NewBuffer()
+ process, err := container.Run(garden.ProcessSpec{
+ User: "root",
+ Path: "sh",
+ Args: []string{"-c", "ls -al / | head -n 2"},
+ }, garden.ProcessIO{Stdout: stdout, Stderr: GinkgoWriter})
+ Expect(err).ToNot(HaveOccurred())
+
+ Expect(process.Wait()).To(Equal(0))
+ Expect(stdout).NotTo(gbytes.Say("nobody"))
+ Expect(stdout).NotTo(gbytes.Say("65534"))
+ Expect(stdout).To(gbytes.Say(" root "))
+ })
+ }
+
It("sees alice-owned files as owned by alice", func() {
stdout := gbytes.NewBuffer()
process, err := container.Run(garden.ProcessSpec{
|
Test that / directory is owned by correct uid in unprivileged containers
[finishes #<I>]
|
diff --git a/extension/sample-template/lib/sample.js b/extension/sample-template/lib/sample.js
index <HASH>..<HASH> 100644
--- a/extension/sample-template/lib/sample.js
+++ b/extension/sample-template/lib/sample.js
@@ -4,20 +4,16 @@
* Sample report used in standard and multitenant version
*/
-var winston = require("winston"),
- util = require("util"),
+var util = require("util"),
async = require("async"),
_ = require("underscore"),
join = require("path").join,
fs = require("fs"),
Q = require("q");
-
-var logger = winston.loggers.get('jsreport');
-
module.exports = function (reporter, definition) {
- this.reporter.initializeListener.add(definition.name, this, function () {
+ reporter.initializeListener.add(definition.name, this, function () {
if (!reporter.settings.get("sample-created")) {
var dataObj = {
|
refactoring - bootstrapper
|
diff --git a/MAVProxy/modules/lib/rline.py b/MAVProxy/modules/lib/rline.py
index <HASH>..<HASH> 100644
--- a/MAVProxy/modules/lib/rline.py
+++ b/MAVProxy/modules/lib/rline.py
@@ -2,7 +2,7 @@
readline handling for mavproxy
'''
-import sys, glob
+import sys, glob, os
rline_mpstate = None
@@ -41,7 +41,14 @@ def complete_command(text):
def complete_filename(text):
'''complete a filename'''
- return glob.glob(text+'*')
+
+ #ensure directories have trailing slashes:
+ list = glob.glob(text+'*')
+ for idx, val in enumerate(list):
+ if os.path.isdir(val):
+ list[idx] = (val + os.path.sep)
+
+ return list
def complete_parameter(text):
'''complete a parameter'''
|
rline: Tab completed files distinguish directories with trailing slash.
|
diff --git a/duct.py b/duct.py
index <HASH>..<HASH> 100644
--- a/duct.py
+++ b/duct.py
@@ -193,7 +193,7 @@ class Then(Expression):
return right_status
def __repr__(self):
- return "{}.then({})".format(repr(self._left), repr(self._right))
+ return "{0}.then({1})".format(repr(self._left), repr(self._right))
# Pipe uses another thread to run the left side of the pipe in parallel with
@@ -242,7 +242,7 @@ class Pipe(Expression):
return left_status
def __repr__(self):
- return "{}.pipe({})".format(repr(self._left), repr(self._right))
+ return "{0}.pipe({1})".format(repr(self._left), repr(self._right))
def trim_if_string(x):
|
zero length field names in format broke Python <I>
|
diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index <HASH>..<HASH> 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -742,6 +742,7 @@ theme_param="themevalue2"
b := newB(c)
b.WithEnviron(
+ "HUGO_ENABLEGITINFO", "false",
// imaging.anchor is a string, and it's not possible
// to set a child attribute.
"HUGO_IMAGING_ANCHOR_FOO", "top",
|
config: Set HUGO_ENABLEGITINFO=false override in Set_in_string
This allows TestLoadConfigWithOsEnvOverrides/Set_in_string to PASS
even if there is no .git directory, e.g. during Debian package build.
|
diff --git a/processor.js b/processor.js
index <HASH>..<HASH> 100644
--- a/processor.js
+++ b/processor.js
@@ -80,6 +80,14 @@ module.exports = function(signaller) {
// extract the metadata from the input data
srcData = parts[1];
+
+ // if we got data from ourself, then this is pretty dumb
+ // but if we have then throw it away
+ if (srcData && srcData.id === signaller.id) {
+ return console.warn('got data from ourself, discarding');
+ }
+
+ // get the source state
srcState = signaller.peers.get(srcData && srcData.id) || srcData;
if (typeof handler == 'function') {
|
Added console.warn line when we receive a message from ourself (faulty signaling server)
|
diff --git a/packages/babel-register/src/node.js b/packages/babel-register/src/node.js
index <HASH>..<HASH> 100644
--- a/packages/babel-register/src/node.js
+++ b/packages/babel-register/src/node.js
@@ -111,9 +111,11 @@ function hookExtensions(_exts) {
});
}
-hookExtensions(DEFAULT_EXTENSIONS);
+register({
+ extensions: DEFAULT_EXTENSIONS,
+});
-export default function (opts?: Object = {}) {
+export default function register(opts?: Object = {}) {
if (opts.extensions) hookExtensions(opts.extensions);
if (opts.cache === false) cache = null;
@@ -128,8 +130,8 @@ export default function (opts?: Object = {}) {
transformOpts.ignore = [
new RegExp(
"^" +
- escapeRegExp(process.cwd() + path.sep) +
- ".*" +
+ escapeRegExp(process.cwd()) +
+ "(?:" + path.sep + ".*)?" +
escapeRegExp(path.sep + "node_modules" + path.sep)
, "i"),
];
|
Ensure the ignore regex is consistent and initialized fully. (#<I>)
|
diff --git a/src/Vector.php b/src/Vector.php
index <HASH>..<HASH> 100644
--- a/src/Vector.php
+++ b/src/Vector.php
@@ -37,7 +37,7 @@ final class Vector extends Matrix
*/
public function getSize(): int
{
- return count($this->internal[0]);
+ return $this->getColumnCount();
}
/**
|
Make `getSize()` more explicitly an alias of `getColumnCount()`.
|
diff --git a/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb b/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb
index <HASH>..<HASH> 100644
--- a/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb
+++ b/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb
@@ -36,6 +36,7 @@ module Decidim
def create
enforce_permission_to :create, :newsletter
@form = form(NewsletterForm).from_params(params)
+ @form.images = images_block_context unless has_images_block_context?
CreateNewsletter.call(@form, content_block, current_user) do
on(:ok) do |newsletter|
@@ -59,6 +60,7 @@ module Decidim
def update
enforce_permission_to :update, :newsletter, newsletter: newsletter
@form = form(NewsletterForm).from_params(params)
+ @form.images = images_block_context unless has_images_block_context?
UpdateNewsletter.call(newsletter, @form, current_user) do
on(:ok) do |newsletter|
@@ -156,6 +158,14 @@ module Decidim
@content_block_for_newsletter ||= @newsletter.template
end
+
+ def images_block_context
+ form(NewsletterForm).from_model(content_block).images
+ end
+
+ def has_images_block_context?
+ @form.images && @form.valid?
+ end
end
end
end
|
Fix newsletter create and update actions (#<I>)
* Add images block context when creating and editing a newsletter
* Remove trailing whitespace
|
diff --git a/lib/apprepo/upload_descriptor.rb b/lib/apprepo/upload_descriptor.rb
index <HASH>..<HASH> 100644
--- a/lib/apprepo/upload_descriptor.rb
+++ b/lib/apprepo/upload_descriptor.rb
@@ -1,10 +1,13 @@
module AppRepo
class UploadDescriptor
- attr_accessor :appcode
+
+ attr_accessor :appcode # required
+ attr_accessor :ipa # can be inferred anyway (glob or metadata)
+ attr_accessor :metadata # optional, allows re-uploading same binary without metadata change
def initialize(appcode)
self.appcode = appcode
- puts 'Initializing "AppRepo:UploadDescriptor with appcode "' + self.appcode + '"'
+ UI.message('Initializing "AppRepo:UploadDescriptor with appcode "' + self.appcode + '"')
end
end
end
|
upload descriptor should have all required data now
|
diff --git a/fstream-npm.js b/fstream-npm.js
index <HASH>..<HASH> 100644
--- a/fstream-npm.js
+++ b/fstream-npm.js
@@ -151,7 +151,9 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
entry.match(/^\..*\.swp$/) ||
entry === '.DS_Store' ||
entry.match(/^\._/) ||
- entry.match(/^.*\.orig$/)
+ entry.match(/^.*\.orig$/) ||
+ // Package locks are never allowed in tarballs -- use shrinkwrap instead
+ entry === 'package-lock.json'
) {
return false
}
|
ignores: always ignore package-lock.json (#<I>)
|
diff --git a/pkg/sockops/sockops.go b/pkg/sockops/sockops.go
index <HASH>..<HASH> 100644
--- a/pkg/sockops/sockops.go
+++ b/pkg/sockops/sockops.go
@@ -306,13 +306,11 @@ func bpfLoadMapProg(object string, load string) error {
func SkmsgEnable() error {
err := bpfCompileProg(cIPC, oIPC)
if err != nil {
- log.Error(err)
return err
}
err = bpfLoadMapProg(oIPC, eIPC)
if err != nil {
- log.Error(err)
return err
}
log.Info("Sockmsg Enabled, bpf_redir loaded")
@@ -360,12 +358,10 @@ func bpfLoadAttachProg(object string, load string, mapName string) (int, int, er
func SockmapEnable() error {
err := bpfCompileProg(cSockops, oSockops)
if err != nil {
- log.Error(err)
return err
}
progID, mapID, err := bpfLoadAttachProg(oSockops, eSockops, sockMap)
if err != nil {
- log.Error(err)
return err
}
log.Infof("Sockmap Enabled: bpf_sockops prog_id %d and map_id %d loaded", progID, mapID)
|
sockops: Remove duplicate error logging
If the compilation or loading of the sock_ops programs fail, we log the
error twice, first in the XXXEnable functions, then in the calling
function. This commit keeps only the error logging in Daemon.init().
|
diff --git a/gns3server/version.py b/gns3server/version.py
index <HASH>..<HASH> 100644
--- a/gns3server/version.py
+++ b/gns3server/version.py
@@ -23,7 +23,7 @@
# or negative for a release candidate or beta (after the base version
# number has been incremented)
-__version__ = "2.1.0rc3"
+__version__ = "2.1.0dev9"
__version_info__ = (2, 1, 0, -99)
# If it's a git checkout try to add the commit
|
Development on <I>dev9
|
diff --git a/core/src/main/java/hudson/model/FullDuplexHttpChannel.java b/core/src/main/java/hudson/model/FullDuplexHttpChannel.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/model/FullDuplexHttpChannel.java
+++ b/core/src/main/java/hudson/model/FullDuplexHttpChannel.java
@@ -38,7 +38,9 @@ import jenkins.util.FullDuplexHttpService;
* Builds a {@link Channel} on top of two HTTP streams (one used for each direction.)
*
* @author Kohsuke Kawaguchi
+ * @deprecated Unused.
*/
+@Deprecated
abstract public class FullDuplexHttpChannel extends FullDuplexHttpService {
private Channel channel;
private final boolean restricted;
|
Also deprecating FullDuplexHttpChannel as it is now unused.
|
diff --git a/test/ext/function/gate.js b/test/ext/function/gate.js
index <HASH>..<HASH> 100644
--- a/test/ext/function/gate.js
+++ b/test/ext/function/gate.js
@@ -1,6 +1,6 @@
'use strict';
-var toArray = require('es5-ext/lib/Object/to-array')
+var toArray = require('es5-ext/lib/Array/from')
, deferred = require('../../../lib/deferred');
module.exports = function (t, a) {
diff --git a/test/extend.js b/test/extend.js
index <HASH>..<HASH> 100644
--- a/test/extend.js
+++ b/test/extend.js
@@ -1,6 +1,6 @@
'use strict';
-var toArray = require('es5-ext/lib/Object/to-array')
+var toArray = require('es5-ext/lib/Array/from')
, isPromise = require('../lib/is-promise');
module.exports = function (t, a) {
|
Keep up to date with es5-ext
|
diff --git a/tomlv/main.go b/tomlv/main.go
index <HASH>..<HASH> 100644
--- a/tomlv/main.go
+++ b/tomlv/main.go
@@ -20,6 +20,8 @@ func usage() {
log.Printf("Usage: %s toml-file [ toml-file ... ]\n",
path.Base(os.Args[0]))
flag.PrintDefaults()
+
+ os.Exit(1)
}
func main() {
|
It's probably a good idea to quit when showing usage.
|
diff --git a/lionengine-core/src/main/java/com/b3dgs/lionengine/core/PlayerAbstract.java b/lionengine-core/src/main/java/com/b3dgs/lionengine/core/PlayerAbstract.java
index <HASH>..<HASH> 100644
--- a/lionengine-core/src/main/java/com/b3dgs/lionengine/core/PlayerAbstract.java
+++ b/lionengine-core/src/main/java/com/b3dgs/lionengine/core/PlayerAbstract.java
@@ -104,7 +104,7 @@ public abstract class PlayerAbstract implements Audio
public void play()
{
final String name = media.getPath();
- if (Medias.getResourcesLoader() != null)
+ if (Medias.getResourcesLoader().isPresent())
{
if (cache == null)
{
|
#<I>: null check replaced by ifPresent.
|
diff --git a/php/commands/plugin.php b/php/commands/plugin.php
index <HASH>..<HASH> 100644
--- a/php/commands/plugin.php
+++ b/php/commands/plugin.php
@@ -220,7 +220,7 @@ class Plugin_Command extends \WP_CLI\CommandWithUpgrade {
*
* ## EXAMPLES
*
- * cd $(wp theme path)
+ * cd $(wp plugin path)
*/
function path( $args, $assoc_args ) {
$path = untrailingslashit( WP_PLUGIN_DIR );
|
Change cd $(wp theme path) is cd $(wp plugin path) in plugin.php
|
diff --git a/keanu-python/tests/test_coal_mining.py b/keanu-python/tests/test_coal_mining.py
index <HASH>..<HASH> 100644
--- a/keanu-python/tests/test_coal_mining.py
+++ b/keanu-python/tests/test_coal_mining.py
@@ -19,7 +19,7 @@ def test_coalmining():
m.late_rate = kn.Exponential(1.0)
m.years = np.array(data.index)
- m.beforeSwitch = m.switchpoint > m.years
+ # m.beforeSwitch = m.switchpoint > m.years
# m.rates = kn.DoubleIf([1, 1], beforeSwitch, m.early_rate, m.late_rate)
# m.disasters = kn.Poisson(m.rates)
|
sanity check that I've identified the offending line that hangs AppVeyor
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -576,7 +576,7 @@ if __name__ == "__main__":
},
name = "Shinken",
- version = "0.8",
+ version = "1.0",
packages = find_packages(),
package_data = {'' : package_data},
description = "Shinken is a monitoring tool compatible with Nagios configuration and plugins",
|
setup.py: bump the version to <I>
|
diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py
index <HASH>..<HASH> 100644
--- a/tests/unit/utils/test_utils.py
+++ b/tests/unit/utils/test_utils.py
@@ -33,3 +33,14 @@ class UtilsTestCase(TestCase):
out = salt.utils.get_module_environment({})
assert out == {}
assert isinstance(out, dict)
+
+ def test_get_module_environment_opts(self):
+ '''
+ Test for salt.utils.get_module_environment
+
+ :return:
+ '''
+ expectation = {'message': 'Melting hard drives'}
+ _globals = {'__opts__': {'system-environment': {'salt.in.system': expectation}},
+ '__file__': '/daemons/loose/in/system.py'}
+ assert salt.utils.get_module_environment(_globals) == expectation
|
Add unit test to get opts from the environment
|
diff --git a/Rule/Validator.php b/Rule/Validator.php
index <HASH>..<HASH> 100644
--- a/Rule/Validator.php
+++ b/Rule/Validator.php
@@ -92,7 +92,6 @@ class Validator
*/
public function validateRule(Rule $rule, array $restrictions = array())
{
- $isValid = true;
/** @var \Claroline\CoreBundle\Rule\Constraints\AbstractConstraint[] $usedConstraints */
$usedConstraints = array();
/** @var \Claroline\CoreBundle\Rule\Constraints\AbstractConstraint[] $existedConstraints */
@@ -112,15 +111,20 @@ class Validator
}
}
+ $validatedConstraints = 0;
+ $nbConstraints = count($usedConstraints);
+
$associatedLogs = $this->getAssociatedLogs($usedConstraints, $restrictions);
foreach ($usedConstraints as $usedConstraint) {
$usedConstraint->setAssociatedLogs($associatedLogs);
- $isValid = $isValid && $usedConstraint->validate();
+ if ($usedConstraint->validate()) {
+ $validatedConstraints++;
+ }
}
- return ($isValid) ? $associatedLogs : $isValid;
+ return ($validatedConstraints === $nbConstraints) ? $associatedLogs : false;
}
/**
|
[CoreBundle] Count validated constraint on a rule to know validation status
|
diff --git a/cmd/ebitenmobile/main.go b/cmd/ebitenmobile/main.go
index <HASH>..<HASH> 100644
--- a/cmd/ebitenmobile/main.go
+++ b/cmd/ebitenmobile/main.go
@@ -92,6 +92,10 @@ func main() {
flag.Usage()
}
+ if args[0] != "bind" {
+ flag.Usage()
+ }
+
var flagset flag.FlagSet
flagset.StringVar(&buildO, "o", "", "")
flagset.StringVar(&buildGcflags, "gcflags", "", "")
@@ -139,13 +143,8 @@ func main() {
log.Fatal(err)
}
- switch args[0] {
- case "bind":
- if err := doBind(args, &flagset, buildTarget); err != nil {
- log.Fatal(err)
- }
- default:
- flag.Usage()
+ if err := doBind(args, &flagset, buildTarget); err != nil {
+ log.Fatal(err)
}
}
|
cmd/ebitenmobile: fail earlier when a wrong subcommand is specified
Updates #<I>
|
diff --git a/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/actions/ProjectActions.java b/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/actions/ProjectActions.java
index <HASH>..<HASH> 100644
--- a/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/actions/ProjectActions.java
+++ b/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/actions/ProjectActions.java
@@ -50,7 +50,11 @@ public class ProjectActions extends TransientProjectActionFactory {
}
public void doRun(StaplerRequest req, StaplerResponse res) throws IOException, ServletException {
- project.doBuildWithParameters(req, res, null);
+ if (project.isParameterized()) {
+ project.doBuildWithParameters(req, res, null);
+ } else {
+ project.doBuild(req, res, null);
+ }
}
}
|
fixing the tests for the paremetrization support
|
diff --git a/src/Illuminate/Http/Request.php b/src/Illuminate/Http/Request.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Http/Request.php
+++ b/src/Illuminate/Http/Request.php
@@ -30,6 +30,16 @@ class Request extends SymfonyRequest {
}
/**
+ * Get the request method.
+ *
+ * @return string
+ */
+ public function method()
+ {
+ return $this->getMethod();
+ }
+
+ /**
* Get the root URL for the application.
*
* @return string
|
Added method short-cut to request.
|
diff --git a/zinnia/ping.py b/zinnia/ping.py
index <HASH>..<HASH> 100644
--- a/zinnia/ping.py
+++ b/zinnia/ping.py
@@ -82,7 +82,7 @@ class ExternalUrlsPinger(threading.Thread):
external_urls = self.find_external_urls(self.entry)
external_urls_pingable = self.find_pingback_urls(external_urls)
- for url, server_name in external_urls_pingable:
+ for url, server_name in external_urls_pingable.items():
reply = self.pingback_url(server_name, url)
self.results.append(reply)
|
fixing iteration in ping external urls
|
diff --git a/rows/cli.py b/rows/cli.py
index <HASH>..<HASH> 100755
--- a/rows/cli.py
+++ b/rows/cli.py
@@ -1216,12 +1216,15 @@ def csv_clean(
empty_columns.remove(key)
if not empty_columns:
break
- field_indexes = [
- header.index(field_name)
- for field_name in header
- if field_name not in empty_columns
- ]
- create_new_row = lambda row: [row[index].strip() for index in field_indexes]
+ if empty_columns:
+ field_indexes = [
+ header.index(field_name)
+ for field_name in header
+ if field_name not in empty_columns
+ ]
+ create_new_row = lambda row: [row[index].strip() for index in field_indexes]
+ else:
+ create_new_row = lambda row: [value.strip() for value in row]
if in_place:
temp_path = Path(tempfile.mkdtemp())
@@ -1233,7 +1236,7 @@ def csv_clean(
output_fobj = open_compressed(
destination, mode="w", encoding=output_encoding, buffering=buffer_size
)
- writer = csv.writer(output_fobj)
+ writer = csv.writer(output_fobj, dialect=csv.excel)
writer.writerow(create_new_row(header))
for row in tqdm(reader, desc="Converting file"):
row = create_new_row(row)
|
Optimize csv-clean
|
diff --git a/Classes/Domain/Model/AbstractType.php b/Classes/Domain/Model/AbstractType.php
index <HASH>..<HASH> 100644
--- a/Classes/Domain/Model/AbstractType.php
+++ b/Classes/Domain/Model/AbstractType.php
@@ -114,7 +114,7 @@ abstract class AbstractType
*/
public function deleteDocumentById(string $id): bool
{
- $response = $this->request('DELETE', '/' . $id);
+ $response = $this->request('DELETE', '/_doc/' . $id);
$treatedContent = $response->getTreatedContent();
return $response->getStatusCode() === 200 && $treatedContent['result'] === 'deleted';
|
BUGFIX: Use correct path when deleting a document by id (#<I>)
BUGFIX: Use correct path to delete a document via id
|
diff --git a/lib/google_places/request.rb b/lib/google_places/request.rb
index <HASH>..<HASH> 100644
--- a/lib/google_places/request.rb
+++ b/lib/google_places/request.rb
@@ -9,13 +9,13 @@ module GooglePlaces
SPOT_URL = 'https://maps.googleapis.com/maps/api/place/details/json'
def self.spots(options = {})
- pp options
+ # pp options
request = new(SPOTS_LIST_URL, options)
request.parsed_response
end
def self.spot(options = {})
- pp options
+ # pp options
request = new(SPOT_URL, options)
request.parsed_response
end
|
Update lib/google_places/request.rb
|
diff --git a/src/FamilySearch.js b/src/FamilySearch.js
index <HASH>..<HASH> 100644
--- a/src/FamilySearch.js
+++ b/src/FamilySearch.js
@@ -116,9 +116,6 @@ var FS = module.exports = function(opts){
};
}
- if(!opts['redirect_uri'] && !opts['auth_callback']) {
- throw 'redirect_uri must be set';
- }
self.settings.redirectUri = opts['redirect_uri'] || opts['auth_callback']; // auth_callback is deprecated
self.settings.autoSignin = opts['auto_signin'];
diff --git a/test/unit/helpers.js b/test/unit/helpers.js
index <HASH>..<HASH> 100644
--- a/test/unit/helpers.js
+++ b/test/unit/helpers.js
@@ -134,7 +134,6 @@ beforeEach(function() {
global.FS = new FamilySearch({
'client_id': 'mock',
'environment': 'sandbox',
- 'redirect_uri': 'mock',
'http_function': httpMock,
'deferred_function': q.defer,
'access_token': 'mock'
|
remove requirement on redirect_uri; closes #<I>
|
diff --git a/src/dedicatedProcessStrategy.js b/src/dedicatedProcessStrategy.js
index <HASH>..<HASH> 100644
--- a/src/dedicatedProcessStrategy.js
+++ b/src/dedicatedProcessStrategy.js
@@ -46,14 +46,15 @@ export default function(options, requestOptions, converterPath, id, cb) {
const {
tmpDir,
timeout,
- pathToElectron
+ pathToElectron,
+ allowLocalFilesAccess
} = options;
const settingsFilePath = path.resolve(path.join(tmpDir, id + 'settings.html'));
debugStrategy('saving settings in temporal file..');
- saveFile(tmpDir, settingsFilePath, JSON.stringify({ ...requestOptions, converterPath }), (saveFileErr) => {
+ saveFile(tmpDir, settingsFilePath, JSON.stringify({ ...requestOptions, converterPath, allowLocalFilesAccess }), (saveFileErr) => {
const childArgs = [];
let debugMode = false,
|
[update] allowLocalFilesAccess as a global option
|
diff --git a/app/Library/Twig/Front.php b/app/Library/Twig/Front.php
index <HASH>..<HASH> 100644
--- a/app/Library/Twig/Front.php
+++ b/app/Library/Twig/Front.php
@@ -86,7 +86,7 @@ class Front extends Base
throw new Exception("Missing page element template");
}
- return $this->container->view->fetch("elements/{$element->template}", ['data' => $element]);
+ return $this->container->view->fetch("elements/{$element->template}", ['element' => $element]);
}
/**
|
Changed element "data" key to "element"
|
diff --git a/src/core/widget/widget.js b/src/core/widget/widget.js
index <HASH>..<HASH> 100644
--- a/src/core/widget/widget.js
+++ b/src/core/widget/widget.js
@@ -202,6 +202,10 @@
this.eventNamespace = `.swns-${this.guid}`;
+ /* LOCKS */
+
+ this._locks = {};
+
/* CALLBACKS */
if ( this._variables () === false ) return this.destroy ();
@@ -412,21 +416,21 @@
/* LOCKING */
- lock () {
+ lock ( namespace ) {
- this._lock = true;
+ this._locks[namespace] = true;
}
- unlock () {
+ unlock ( namespace ) {
- this._lock = false;
+ delete this._locks[namespace];
}
- isLocked () {
+ isLocked ( namespace ) {
- return !!this._lock;
+ return !!this._locks[namespace];
}
|
Widget: added support for multiple locks
|
diff --git a/test/WorkaroundSpec.js b/test/WorkaroundSpec.js
index <HASH>..<HASH> 100644
--- a/test/WorkaroundSpec.js
+++ b/test/WorkaroundSpec.js
@@ -64,6 +64,20 @@ describe("working around on Firefox and Webkit to fix resources not being render
});
});
+ it("should remove the workaround div before the callback has been called", function () {
+ var renderFinished = false,
+ svg = '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"></svg>';
+
+ rasterizeHTML.renderSvg(svg, null, function () {
+ expect($(".rasterizeHTML_js_FirefoxWorkaround")).not.toExist();
+ renderFinished = true;
+ });
+
+ waitsFor(function () {
+ return renderFinished;
+ }, "rasterizeHTML.renderSvg", 2000);
+ });
+
it("should remove the workaround div once the canvas has been rendered even if an error occurs when drawing on the canvas", function () {
var canvas = jasmine.createSpyObj("canvas", ["getContext"]),
context = jasmine.createSpyObj("context", ["drawImage"]);
|
Add test for preceding fix, better late than never
|
diff --git a/lib/deployer.js b/lib/deployer.js
index <HASH>..<HASH> 100644
--- a/lib/deployer.js
+++ b/lib/deployer.js
@@ -252,7 +252,9 @@ async function _updateSite(siteId, tree, manifest, content) {
* @return {Object} content
*/
async function _content(Section) {
- const contentSections = await Section.scope('content').findAll({ include: 'records' });
+ const { Record } = Section.sequelize.models;
+ const order = Utils.map(Record.DEFAULT_ORDER, (o) => { o.unshift('records'); return o; });
+ const contentSections = await Section.scope('content').findAll({ include: 'records', order });
return Utils.reduce(contentSections, (memo, section) => {
/* eslint-disable-next-line no-param-reassign */
memo[section.name] = Utils.map(section.records, record => record.get('content'));
|
Deploy ordered records (#<I>)
So the hosting platform can import them in the right order.
|
diff --git a/framework/db/Connection.php b/framework/db/Connection.php
index <HASH>..<HASH> 100644
--- a/framework/db/Connection.php
+++ b/framework/db/Connection.php
@@ -249,6 +249,11 @@ class Connection extends Component
*/
public $pdoClass;
/**
+ * @var boolean whether to enable [savepoint](http://en.wikipedia.org/wiki/Savepoint).
+ * Note that if the underlying DBMS does not support savepoint, setting this property to be true will have no effect.
+ */
+ public $enableSavepoint = true;
+ /**
* @var Transaction the currently active transaction
*/
private $_transaction;
diff --git a/framework/db/Schema.php b/framework/db/Schema.php
index <HASH>..<HASH> 100644
--- a/framework/db/Schema.php
+++ b/framework/db/Schema.php
@@ -294,7 +294,7 @@ abstract class Schema extends Object
*/
public function supportsSavepoint()
{
- return true;
+ return $this->db->enableSavepoint;
}
/**
|
Added Connection::enableSavepoint.
|
diff --git a/examples/py/bybit-positions.py b/examples/py/bybit-positions.py
index <HASH>..<HASH> 100644
--- a/examples/py/bybit-positions.py
+++ b/examples/py/bybit-positions.py
@@ -23,7 +23,7 @@ exchange.verbose = True # uncomment for debugging
# -----------------------------------------------------------------------------
-symbol = 'BTC/USDT:USDT'
+symbol = 'BTC/USDT:USDT' # https://docs.ccxt.com/en/latest/manual.html#contract-naming-conventions
market = exchange.market(symbol)
params = {'subType':'linear' if market['linear'] else 'inverse'}
linear_positions = exchange.fetch_positions([ symbol ], params)
|
examples/py/bybit-positions.py upgrade and fix #<I>
|
diff --git a/master/buildbot/db/model.py b/master/buildbot/db/model.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/db/model.py
+++ b/master/buildbot/db/model.py
@@ -21,10 +21,14 @@ import sqlalchemy as sa
import migrate
import migrate.versioning.schema
import migrate.versioning.repository
-import migrate.versioning.exceptions
from twisted.python import util, log
from buildbot.db import base
+try:
+ from migrate import exceptions
+except ImportError:
+ from migrate.versioning import exceptions
+
class Model(base.DBConnectorComponent):
"""
DBConnector component to handle the database model; an instance is available
@@ -345,7 +349,7 @@ class Model(base.DBConnectorComponent):
# migrate.api doesn't let us hand in an engine
schema = migrate.versioning.schema.ControlledSchema(engine, self.repo_path)
db_version = schema.version
- except migrate.versioning.exceptions.DatabaseNotControlledError:
+ except exceptions.DatabaseNotControlledError:
return False
return db_version == repo_version
|
Fix integration with SQLAlchemy-migrate-<I>.
SQLAlchemy-migrate moved all exceptions to migrate.exceptions.
|
diff --git a/test/phantom-html2pdf.test.js b/test/phantom-html2pdf.test.js
index <HASH>..<HASH> 100644
--- a/test/phantom-html2pdf.test.js
+++ b/test/phantom-html2pdf.test.js
@@ -14,7 +14,8 @@ describe('phantom-html2pdf.js', function() {
'papersize': {format: 'A4', orientation: 'portrait', border: '1cm'}
};
- pdf.convert(pdfOptions, function (result) {
+ pdf.convert(pdfOptions, function (err, result) {
+ assert(!err, "Error is empty");
result.toBuffer(function (buffer) {
assert(buffer, 'A buffer is returned');
assert(buffer.length > 0, 'The generated buffer is not empty');
|
fixes tests failing due to convert method arguments change
|
diff --git a/mackup.py b/mackup.py
index <HASH>..<HASH> 100755
--- a/mackup.py
+++ b/mackup.py
@@ -914,11 +914,16 @@ def is_process_running(process_name):
Returns:
(bool): True if the process is running
"""
- DEVNULL = open(os.devnull, 'wb')
- returncode = subprocess.call(['/usr/bin/pgrep', process_name],
- stdout=DEVNULL)
+ is_running = False
- return bool(returncode == 0)
+ # On systems with pgrep, check if the given process is running
+ if os.path.isfile('/usr/bin/pgrep'):
+ DEVNULL = open(os.devnull, 'wb')
+ returncode = subprocess.call(['/usr/bin/pgrep', process_name],
+ stdout=DEVNULL)
+ is_running = bool(returncode == 0)
+
+ return is_running
def remove_acl(path):
|
On systems with pgrep, check if the given process is running
|
diff --git a/src/feat/models/applicationjson.py b/src/feat/models/applicationjson.py
index <HASH>..<HASH> 100644
--- a/src/feat/models/applicationjson.py
+++ b/src/feat/models/applicationjson.py
@@ -265,17 +265,27 @@ def _parse_meta(meta_items):
return [i.strip() for i in meta_items.value.split(",")]
-def render_inline(meta):
+def get_parsed_meta(meta):
if not IMetadata.providedBy(meta):
return []
parsed = [_parse_meta(i) for i in meta.get_meta('json')]
+ return parsed
+
+
+def render_inline(meta):
+ parsed = get_parsed_meta(meta)
return ['render-inline'] in parsed
+def prevent_inline(meta):
+ parsed = get_parsed_meta(meta)
+ return ['prevent-inline'] in parsed
+
+
def render_compact_submodel(submodel, item, context):
if render_inline(item):
pass
- elif not IAttribute.providedBy(submodel):
+ elif not IAttribute.providedBy(submodel) or prevent_inline(item):
if item.reference is not None:
return item.reference.resolve(context)
else:
|
Implement meta data preventing application/json writer of inlining the attribute values.
|
diff --git a/Processor/ZipProcessor.php b/Processor/ZipProcessor.php
index <HASH>..<HASH> 100644
--- a/Processor/ZipProcessor.php
+++ b/Processor/ZipProcessor.php
@@ -20,7 +20,7 @@ class ZipProcessor extends BaseProcessor implements ProcessorInterface
$params = array('-r');
if (isset($this->options['password']) && $this->options['password']) {
- $params[] = '-P '.$this->options['password'];
+ $params[] = '-P "'.$this->options['password'].'"';
}
if (isset($this->options['compression_ratio']) && $this->options['compression_ratio'] >= 0) {
|
add apostrophe to allow special characters in password
Surround password in parameter option with " to allow passwords like "password:)"
|
diff --git a/src/java/com/threerings/admin/client/ConfigEditorPanel.java b/src/java/com/threerings/admin/client/ConfigEditorPanel.java
index <HASH>..<HASH> 100644
--- a/src/java/com/threerings/admin/client/ConfigEditorPanel.java
+++ b/src/java/com/threerings/admin/client/ConfigEditorPanel.java
@@ -66,11 +66,14 @@ public class ConfigEditorPanel extends JPanel
// create our objects tabbed pane
add(_oeditors = new JTabbedPane(JTabbedPane.LEFT));
+ // If they don't fit, make them scroll, since wrapped vertical tabs eats insane sceen space
+ _oeditors.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
+
// add a handy label at the bottom
- add(new JLabel("Fields outline in red have been modified " +
- "but not yet committed."), VGroupLayout.FIXED);
- add(new JLabel("Press return in a modified field to commit " +
- "the change."), VGroupLayout.FIXED);
+ add(new JLabel("Fields outline in red have been modified but not yet committed."),
+ VGroupLayout.FIXED);
+ add(new JLabel("Press return in a modified field to commit the change."),
+ VGroupLayout.FIXED);
}
@Override
|
We've got enough of these in yohoho now that with some
text settings, you get two columns of tabs, which is...Bad.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@<I> <I>f4-<I>e9-<I>-aa3c-eee0fc<I>fb1
|
diff --git a/tests/user-switching-test.php b/tests/user-switching-test.php
index <HASH>..<HASH> 100644
--- a/tests/user-switching-test.php
+++ b/tests/user-switching-test.php
@@ -9,6 +9,12 @@ abstract class User_Switching_Test extends WP_UnitTestCase {
parent::setUp();
+ // Hide deprecated warnings on PHP 7 so the use of deprecated constructors in WordPress
+ // don't cause our tests to fail
+ if ( version_compare( PHP_VERSION, 7, '>=' ) ) {
+ error_reporting( E_ALL & ~E_DEPRECATED );
+ }
+
$roles = array(
'admin' => 'administrator',
'editor' => 'editor',
|
Hide deprecated warnings on PHP 7 so the use of deprecated constructors in WordPress don't cause our tests to fail.
|
diff --git a/www/javascript/swat-date-entry.js b/www/javascript/swat-date-entry.js
index <HASH>..<HASH> 100644
--- a/www/javascript/swat-date-entry.js
+++ b/www/javascript/swat-date-entry.js
@@ -87,7 +87,11 @@ SwatDateEntry.prototype.lookup = function(table_name, key)
SwatDateEntry.prototype.reverseLookup = function(table_name, key)
{
- return this.reverse_lookup_table[table_name][key];
+ var value = this.reverse_lookup_table[table_name][key];
+ if (value === undefined) {
+ value = null;
+ }
+ return value;
};
SwatDateEntry.prototype.setCalendar = function(calendar)
diff --git a/www/javascript/swat-time-entry.js b/www/javascript/swat-time-entry.js
index <HASH>..<HASH> 100644
--- a/www/javascript/swat-time-entry.js
+++ b/www/javascript/swat-time-entry.js
@@ -95,7 +95,11 @@ SwatTimeEntry.prototype.lookup = function(table_name, key)
SwatTimeEntry.prototype.reverseLookup = function(table_name, key)
{
- return this.reverse_lookup_table[table_name][key];
+ var value = this.reverse_lookup_table[table_name][key];
+ if (value === undefined) {
+ value = null;
+ }
+ return value;
};
SwatTimeEntry.prototype.setDateEntry = function(date_entry)
|
Return null instead of undefined when value is not in lookup table.
|
diff --git a/test/pipeline-test-2.js b/test/pipeline-test-2.js
index <HASH>..<HASH> 100644
--- a/test/pipeline-test-2.js
+++ b/test/pipeline-test-2.js
@@ -64,7 +64,6 @@ test('make the search index, removing the pipeline stage that bumps text to lowe
new docProc.RemoveStopWords(si.options),
new docProc.CalculateTermFrequency(si.options),
new docProc.CreateCompositeVector(si.options),
- new docProc.CreateSortVectors(si.options),
new docProc.FieldedSearch(si.options)
)).on('data', function (data) {
t.looseEqual(
|
test(tests): fix pipeline test
The new docproc doesnt create sort vectors, so remover sort vector stage from pipeline test
|
diff --git a/lib/i18n/tasks/output/terminal.rb b/lib/i18n/tasks/output/terminal.rb
index <HASH>..<HASH> 100644
--- a/lib/i18n/tasks/output/terminal.rb
+++ b/lib/i18n/tasks/output/terminal.rb
@@ -7,9 +7,11 @@ module I18n
def missing(missing)
$stderr.puts bold cyan "Missing keys and translations (#{missing.length})"
- $stderr.puts "#{bold 'Legend:'} #{red '✗'} key missing, #{yellow bold '∅'} translation blank, #{blue bold '='} value equal to base locale; #{cyan 'value in base locale'}"
- key_col_width = missing.map { |x| x[:key] }.max_by(&:length).length + 2
- missing.each { |m| print_missing_translation m, key_col_width: key_col_width }
+ unless missing.empty? then
+ $stderr.puts "#{bold 'Legend:'} #{red '✗'} key missing, #{yellow bold '∅'} translation blank, #{blue bold '='} value equal to base locale; #{cyan 'value in base locale'}"
+ key_col_width = missing.map { |x| x[:key] }.max_by(&:length).length + 2
+ missing.each { |m| print_missing_translation m, key_col_width: key_col_width }
+ end
end
def unused(unused)
|
Fix undefined method `length' for nil:NilClass if no missing found
|
diff --git a/src/AbstractResult.php b/src/AbstractResult.php
index <HASH>..<HASH> 100644
--- a/src/AbstractResult.php
+++ b/src/AbstractResult.php
@@ -168,7 +168,9 @@ abstract class AbstractResult implements \SeekableIterator, \Countable
*/
final public function rewind()
{
- $this->seek(0);
+ if ($this->position > 0) {
+ $this->seek(0);
+ }
}
|
Only reset the result set if we have advanced into it
|
diff --git a/google-cloud-pubsub/acceptance/pubsub_helper.rb b/google-cloud-pubsub/acceptance/pubsub_helper.rb
index <HASH>..<HASH> 100644
--- a/google-cloud-pubsub/acceptance/pubsub_helper.rb
+++ b/google-cloud-pubsub/acceptance/pubsub_helper.rb
@@ -91,9 +91,8 @@ end
def clean_up_pubsub_snapshots
puts "Cleaning up pubsub snapshots after tests."
- snapshots = $pubsub.snapshots
- $snapshot_names.each do |snapshot_name|
- if snapshot = (snapshots.detect { |s| s.name.split("/").last == snapshot_name })
+ $pubsub.snapshots.all do |snapshot|
+ if snapshot.name.include? $snapshot_prefix
snapshot.delete
end
end
|
Update Pub/Sub cleanup
We continue to see Pub/Sub snapshots reach the limit. Update the cleanup
so that it calls #all so the records are returned so they can be deleted.
|
diff --git a/lib/phusion_passenger/railz/application_spawner.rb b/lib/phusion_passenger/railz/application_spawner.rb
index <HASH>..<HASH> 100644
--- a/lib/phusion_passenger/railz/application_spawner.rb
+++ b/lib/phusion_passenger/railz/application_spawner.rb
@@ -321,7 +321,7 @@ private
# isn't copy-on-write friendly.
# - Rails >= 2.2 already preloads application sources by default, so no need
# to do that again.
- if GC.copy_on_write_friendly? && !::Rails::Initializer.respond_to?(:load_application_classes)
+ if GC.copy_on_write_friendly? && !::Rails::Initializer.method_defined?(:load_application_classes)
Dir.glob('app/{models,controllers,helpers}/*.rb').each do |file|
require_dependency canonicalize_path(file)
end
|
Fix Rails app preloading: load_application_classes is an instance method of Rails::Initializer. Partially fixes issue #<I>.
|
diff --git a/aiosqlite/core.py b/aiosqlite/core.py
index <HASH>..<HASH> 100644
--- a/aiosqlite/core.py
+++ b/aiosqlite/core.py
@@ -149,9 +149,11 @@ class Connection(Thread):
try:
await self._execute(self._conn.close)
except Exception:
- LOG.exception("exception occurred while closing connection")
- self._running = False
- self._connection = None
+ LOG.info("exception occurred while closing connection")
+ raise
+ finally:
+ self._running = False
+ self._connection = None
@contextmanager
async def execute(self, sql: str, parameters: Iterable[Any] = None) -> Cursor:
|
Allow caller to handle close() exception, reduce logger to "info"
|
diff --git a/JSAT/src/jsat/datatransform/DataModelPipeline.java b/JSAT/src/jsat/datatransform/DataModelPipeline.java
index <HASH>..<HASH> 100644
--- a/JSAT/src/jsat/datatransform/DataModelPipeline.java
+++ b/JSAT/src/jsat/datatransform/DataModelPipeline.java
@@ -36,11 +36,8 @@ public class DataModelPipeline implements Classifier, Regressor, Parameterized
@ParameterHolder(skipSelfNamePrefix = true)
private Regressor baseRegressor;
- @ParameterHolder(skipSelfNamePrefix = true)
private DataTransformProcess learnedDtp;
- @ParameterHolder(skipSelfNamePrefix = true)
private Classifier learnedClassifier;
- @ParameterHolder(skipSelfNamePrefix = true)
private Regressor learnedRegressor;
/**
|
removed ParamterHolder annotations that I added over zealously
|
diff --git a/app/bootstrap.php b/app/bootstrap.php
index <HASH>..<HASH> 100644
--- a/app/bootstrap.php
+++ b/app/bootstrap.php
@@ -117,7 +117,7 @@ return call_user_func(function () {
// Create the 'Bolt application'
$appClass = Application::class;
- if ($config['application'] !== null && is_a($config['application'], Silex\Application::class)) {
+ if ($config['application'] !== null && is_a($config['application'], Silex\Application::class, true)) {
$appClass = $config['application'];
}
$app = new $appClass(['resources' => $resources]);
|
.bolt files should be allowed to specify application as string. This fixes the check to ensure the string is a class name that extends Silex\Application.
|
diff --git a/flask_ask/core.py b/flask_ask/core.py
index <HASH>..<HASH> 100644
--- a/flask_ask/core.py
+++ b/flask_ask/core.py
@@ -505,15 +505,25 @@ class Ask(object):
@property
def current_stream(self):
#return getattr(_app_ctx_stack.top, '_ask_current_stream', models._Field())
- stream = top_stream(self.context['System']['user'])
- if stream:
- return stream
+ user = self._get_user()
+ if user:
+ stream = top_stream(user)
+ if stream:
+ return stream
return models._Field()
@current_stream.setter
def current_stream(self, value):
#_app_ctx_stack.top._ask_current_stream = value
- push_stream(self.context['System']['user'], value)
+ user = self._get_user()
+ if user:
+ push_stream(user, value)
+
+ def _get_user(self):
+ if self.context:
+ return self.context.get('System', {}).get('user', None)
+ return None
+
def _alexa_request(self, verify=True):
raw_body = flask_request.data
|
wrapping lookup of user in a method call ensuring a valid context exists.
|
diff --git a/src/org/opencms/ui/apps/user/CmsUserEditDialog.java b/src/org/opencms/ui/apps/user/CmsUserEditDialog.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/ui/apps/user/CmsUserEditDialog.java
+++ b/src/org/opencms/ui/apps/user/CmsUserEditDialog.java
@@ -960,7 +960,7 @@ public class CmsUserEditDialog extends CmsBasicDialog implements I_CmsPasswordFe
if (CmsStringUtil.isEmptyOrWhitespaceOnly(site.getSiteRoot())) {
if (hasRole(CmsRole.VFS_MANAGER)
| ((m_user == null)
- & Arrays.asList(
+ && Arrays.asList(
CmsRole.ACCOUNT_MANAGER.forOrgUnit(m_ou.getValue()),
CmsRole.ADMINISTRATOR.forOrgUnit(m_ou.getValue()),
CmsRole.WORKPLACE_MANAGER.forOrgUnit(m_ou.getValue()),
|
Fix null pointer exception in user edit dialog
|
diff --git a/oauthlib/oauth2/rfc6749/request_validator.py b/oauthlib/oauth2/rfc6749/request_validator.py
index <HASH>..<HASH> 100644
--- a/oauthlib/oauth2/rfc6749/request_validator.py
+++ b/oauthlib/oauth2/rfc6749/request_validator.py
@@ -89,7 +89,7 @@ class RequestValidator(object):
raise NotImplementedError('Subclasses must implement this method.')
def confirm_redirect_uri(self, client_id, code, redirect_uri, client,
- request, *args, **kwargs):
+ *args, **kwargs):
"""Ensure client is authorized to redirect to the redirect_uri requested.
If the client specifies a redirect_uri when obtaining code then
|
Correct interface of RequestValidator.confirm_redirect_uri() to make it consistent with the call in AuthorizationCodeGrant.validate_token_request().
|
diff --git a/test/test_task.py b/test/test_task.py
index <HASH>..<HASH> 100644
--- a/test/test_task.py
+++ b/test/test_task.py
@@ -522,9 +522,9 @@ rng = random.randint(1, 1000)
self.assertTrue(isinstance(env.sos_dict['step_rng'], list))
self.assertEqual(env.sos_dict['step_rng'][-1], var)
# run it again, should get from signature
- Base_Executor(wf).run()
- self.assertEqual(var, env.sos_dict['rng'])
#
+ #Base_Executor(wf).run()
+ #self.assertEqual(var, env.sos_dict['rng'])
|
Temporarily disable part of a signature test
|
diff --git a/testsuite/run_cim_operations.py b/testsuite/run_cim_operations.py
index <HASH>..<HASH> 100755
--- a/testsuite/run_cim_operations.py
+++ b/testsuite/run_cim_operations.py
@@ -12,6 +12,7 @@ from __future__ import absolute_import
# pylint: disable=missing-docstring,superfluous-parens,no-self-use
import sys
+import os.path
import threading
from datetime import timedelta
import unittest
@@ -3863,6 +3864,15 @@ if __name__ == '__main__':
if args['long_running'] is True:
SKIP_LONGRUNNING_TEST = False
+ # if yamlfile exists rename it to yamlfile.bak
+ if args['yamlfile']:
+ yamlfile_name = args['yamlfile']
+ if os.path.isfile(yamlfile_name):
+ backupfile_name = '%s.bak' % yamlfile_name
+ if os.path.isfile(backupfile_name):
+ os.remove(backupfile_name)
+ os.rename(yamlfile_name, backupfile_name)
+
# Note: unittest options are defined in separate args after
# the url argument.
|
Modify run-cimOperations to rename yaml file before each test
Previously we just appended to an existing file making the tests messy.
|
diff --git a/test/json_client_test.rb b/test/json_client_test.rb
index <HASH>..<HASH> 100644
--- a/test/json_client_test.rb
+++ b/test/json_client_test.rb
@@ -35,7 +35,8 @@ class JsonClientTest < MiniTest::Spec
def test_long_connections_timeout
url = "http://www.example.com/timeout.json"
- stub_request(:get, url).to_raise(Net::OpenTimeout)
+ exception = defined?(Net::OpenTimeout) ? Net::OpenTimeout : TimeoutError
+ stub_request(:get, url).to_raise(exception)
assert_raises GdsApi::TimedOutException do
@client.get_json(url)
end
|
Ruby <I> test compatibility
The actual code compatibility is handled within RestClient
|
diff --git a/lib/juici/controllers/builds.rb b/lib/juici/controllers/builds.rb
index <HASH>..<HASH> 100644
--- a/lib/juici/controllers/builds.rb
+++ b/lib/juici/controllers/builds.rb
@@ -19,6 +19,7 @@ module Juici::Controllers
project = ::Juici::Project.where(name: params[:project]).first
builds = ::Juici::Build.where(parent: project.name).
+ asc(:_id).
limit(::Juici::Config.builds_per_page).
skip(params[:page].to_i * ::Juici::Config.builds_per_page)
|
Make sure that we get builds in increasing order
(by doc id)
|
diff --git a/lib/ruby_scribe/version.rb b/lib/ruby_scribe/version.rb
index <HASH>..<HASH> 100644
--- a/lib/ruby_scribe/version.rb
+++ b/lib/ruby_scribe/version.rb
@@ -1,3 +1,3 @@
module RubyScribe
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
\ No newline at end of file
|
Bumped version to <I>.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.