diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/Illuminate/Support/Str.php b/src/Illuminate/Support/Str.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Support/Str.php
+++ b/src/Illuminate/Support/Str.php
@@ -123,7 +123,7 @@ class Str {
{
if (mb_strlen($value) <= $limit) return $value;
- return mb_substr($value, 0, $limit, 'UTF-8').$end;
+ return rtrim(mb_substr($value, 0, $limit, 'UTF-8')).$end;
}
/**
|
Update Str.php
Added rtrim() to remove whitespace between the truncated string and the $end string which is appended.
|
diff --git a/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java b/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
+++ b/src/main/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepExecution.java
@@ -621,9 +621,6 @@ public class WithMavenStepExecution extends AbstractStepExecutionImpl {
throw new AbortException("No such computer " + node);
}
- if (computer.isOffline()) {
- throw new AbortException(node + " is offline");
- }
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "Computer: {0}", computer.getName());
try {
|
Don't check if computer is online.
|
diff --git a/spyderlib/plugins/__init__.py b/spyderlib/plugins/__init__.py
index <HASH>..<HASH> 100644
--- a/spyderlib/plugins/__init__.py
+++ b/spyderlib/plugins/__init__.py
@@ -32,7 +32,7 @@ from spyderlib.qt.QtGui import (QDockWidget, QWidget, QShortcut, QCursor,
# Local imports
from spyderlib.utils.qthelpers import create_action, toggle_actions
from spyderlib.config.base import _
-from spyderlib.config.gui import get_font
+from spyderlib.config.gui import get_color_scheme, get_font
from spyderlib.config.main import CONF
from spyderlib.config.user import NoDefault
from spyderlib.plugins.configdialog import SpyderConfigPage
@@ -516,7 +516,11 @@ class SpyderPluginMixin(object):
if name not in names:
name = names[0]
self.set_option('color_scheme_name', name)
-
+
+ def get_color_scheme(self):
+ """Get current color scheme"""
+ return get_color_scheme(CONF.get('color_schemes', 'selected'))
+
def create_toggle_view_action(self):
"""Associate a toggle view action with each plugin"""
title = self.get_plugin_title()
|
Add a method to get the current color scheme to SpyderPluginMixin
|
diff --git a/test/unit/index.js b/test/unit/index.js
index <HASH>..<HASH> 100644
--- a/test/unit/index.js
+++ b/test/unit/index.js
@@ -14,6 +14,12 @@ describe('StorageService', function() {
expect(record).to.be.an.instanceof(RecordService);
expect(record.getType()).to.equal('Cat');
});
+ it('should create records with ids', function() {
+ var storage = new StorageService(mockStorageProvider);
+ var record = storage.createRecord('Cat', '1');
+ expect(record).to.be.an.instanceof(RecordService);
+ expect(record.getType()).to.equal('Cat');
+ });
it('should create collections', function() {
var storage = new StorageService(mockStorageProvider);
var collection = storage.createCollection('Cat');
|
test(StorageService): case new record with id
|
diff --git a/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/VariantAnnotationCommandExecutor.java b/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/VariantAnnotationCommandExecutor.java
index <HASH>..<HASH> 100644
--- a/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/VariantAnnotationCommandExecutor.java
+++ b/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/VariantAnnotationCommandExecutor.java
@@ -558,7 +558,8 @@ public class VariantAnnotationCommandExecutor extends CommandExecutor {
// Use cache
- queryOptions.put("useCache", variantAnnotationCommandOptions.noCache ? "false" : "true");
+// queryOptions.put("useCache", variantAnnotationCommandOptions.noCache ? "false" : "true");
+ queryOptions.put("useCache", !variantAnnotationCommandOptions.noCache);
// input file
if (variantAnnotationCommandOptions.input != null) {
|
feature/vacache: minor bug fixed at VarianAnnotationCommandExecutor
|
diff --git a/holoviews/plotting/mpl/renderer.py b/holoviews/plotting/mpl/renderer.py
index <HASH>..<HASH> 100644
--- a/holoviews/plotting/mpl/renderer.py
+++ b/holoviews/plotting/mpl/renderer.py
@@ -5,12 +5,13 @@ from tempfile import NamedTemporaryFile
from ...core import HoloMap, AdjointLayout
-from ...core.options import Store
+from ...core.options import Store, StoreOptions
from ...core.io import Exporter
from .plot import MPLPlot
from .. import MIME_TYPES
+from matplotlib import pyplot as plt
from matplotlib import animation
import matplotlib.tight_bbox as tight_bbox
from matplotlib.transforms import Bbox, TransformedBbox, Affine2D
|
Fixed missing imports required by MPLPlotRenderer
|
diff --git a/src/Printer.php b/src/Printer.php
index <HASH>..<HASH> 100644
--- a/src/Printer.php
+++ b/src/Printer.php
@@ -52,7 +52,7 @@ class Printer extends \PHPUnit_TextUI_ResultPrinter
}
/**
- * @param string $progress Result of the Test Case => . F S I
+ * @param string $progress Result of the Test Case => . F S I R
* @throws Exception\InvalidArgumentException
*/
private function printTestCaseStatus($progress)
@@ -71,6 +71,9 @@ class Printer extends \PHPUnit_TextUI_ResultPrinter
case 'S':
echo "\033[01;31m" . mb_convert_encoding("\x27\x16", 'UTF-8', 'UTF-16BE') . "\033[0m";
return;
+ case 'R':
+ echo "\033[01;31m" . mb_convert_encoding("\x27\x12", 'UTF-8', 'UTF-16BE') . "\033[0m";
+ return;
default:
throw new InvalidArgumentException(sprintf(
'Can not print status for "%s" in %s',
|
Added display case for Risky Tests
|
diff --git a/lib/gcloud/datastore/errors.rb b/lib/gcloud/datastore/errors.rb
index <HASH>..<HASH> 100644
--- a/lib/gcloud/datastore/errors.rb
+++ b/lib/gcloud/datastore/errors.rb
@@ -32,27 +32,6 @@ module Gcloud
end
##
- # # ApiError
- #
- # Raised when an API call is not successful.
- class ApiError < Gcloud::Datastore::Error
- ##
- # The API method of the failed HTTP request.
- attr_reader :method
-
- ##
- # The response object of the failed HTTP request.
- attr_reader :response
-
- # @private
- def initialize method, response = nil
- super("API call to #{method} was not successful")
- @method = method
- @response = response
- end
- end
-
- ##
# # PropertyError
#
# Raised when a property is not correct.
|
Remove Datastore ApiError
This error is no longer needed since the GRPC errors are handled differently.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -73,6 +73,7 @@ var startPlayback = function(pos) {
player.playedQueue.push(player.queue[0]);
+ player.playbackPosition = null;
player.playbackStart = null;
player.queue[0] = null;
player.songEndTimeout = null;
@@ -250,6 +251,7 @@ var removeFromQueue = function(pos, cnt) {
if(pos <= 0) {
// now playing was deleted
+ player.playbackPosition = null;
player.playbackStart = null;
clearTimeout(player.songEndTimeout);
player.songEndTimeout = null;
diff --git a/plugins/rest.js b/plugins/rest.js
index <HASH>..<HASH> 100644
--- a/plugins/rest.js
+++ b/plugins/rest.js
@@ -69,6 +69,8 @@ rest.init = function(_player, callback, errCallback) {
break;
}
+ player.playbackPosition = null;
+ player.playbackStart = null;
clearTimeout(player.songEndTimeout);
player.songEndTimeout = null;
player.onQueueModify();
|
set playbackPosition and playbackStart to null at song end
|
diff --git a/lib/flowlink_data/objectbase.rb b/lib/flowlink_data/objectbase.rb
index <HASH>..<HASH> 100644
--- a/lib/flowlink_data/objectbase.rb
+++ b/lib/flowlink_data/objectbase.rb
@@ -40,7 +40,7 @@ module Flowlink
Hash[f_methods.map { |f| [f.method_name.to_s, send(*f.to_a)] }]
end
- alias_method to_message to_hash
+ alias to_message to_hash
def self.fields
# A list of fields that the object should have.
|
alias_method -> alias. alias_method wasn't working
|
diff --git a/java/src/com/google/template/soy/AbstractSoyCompiler.java b/java/src/com/google/template/soy/AbstractSoyCompiler.java
index <HASH>..<HASH> 100644
--- a/java/src/com/google/template/soy/AbstractSoyCompiler.java
+++ b/java/src/com/google/template/soy/AbstractSoyCompiler.java
@@ -15,7 +15,6 @@
*/
package com.google.template.soy;
-
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Joiner;
import com.google.common.base.Stopwatch;
@@ -158,6 +157,15 @@ public abstract class AbstractSoyCompiler {
private List<File> cssSummaries = new ArrayList<>();
@Option(
+ name = "--cssMetadata",
+ aliases = "--cssMetadata",
+ usage =
+ "List of css metadata files used to check strict deps against css dependencies and css()"
+ + " calls. This will eventually replace --cssSummaries",
+ handler = SoyCmdLineParser.FileListOptionHandler.class)
+ private List<File> cssMetadata = new ArrayList<>();
+
+ @Option(
name = "--enableExperimentalFeatures",
usage =
"Enable experimental features that are not generally available. "
|
Add the ability to read in CssMetadata protos from []. When they are passed in (the build wiring doesn't exist yet), it takes over what cssRegistry is supposed to do, but otherwise does the same thing functionally. Verifying css() calls is next
GITHUB_BREAKING_CHANGES=n/a
-------------
Created by MOE: <URL>
|
diff --git a/lib/cql/version.rb b/lib/cql/version.rb
index <HASH>..<HASH> 100644
--- a/lib/cql/version.rb
+++ b/lib/cql/version.rb
@@ -1,3 +1,3 @@
module CQL
- VERSION = '1.3.0'
+ VERSION = '1.4.0'
end
|
Version bump.
Increased the gem version to <I> in preparation for the upcoming
release.
|
diff --git a/suds/cache.py b/suds/cache.py
index <HASH>..<HASH> 100644
--- a/suds/cache.py
+++ b/suds/cache.py
@@ -167,16 +167,6 @@ class FileCache(Cache):
log.debug(id, exc_info=1)
return data
- def setlocation(self, location):
- """
- Set the cached file location (folder).
-
- @param location: The cached file folder.
- @type location: str
-
- """
- self.location = location
-
def _getf(self, id):
"""Open a cached file with the given id for reading."""
try:
|
remove FileCache.setlocation()
This method was never used inside suds and if used externally would have caused
the cache to use a specific folder but without making sure that the data already
stored in it has been prepared for the correct suds version, as done when
passing a location parameter to the FileCache constructor.
|
diff --git a/Kwf/Acl.php b/Kwf/Acl.php
index <HASH>..<HASH> 100644
--- a/Kwf/Acl.php
+++ b/Kwf/Acl.php
@@ -291,6 +291,8 @@ class Kwf_Acl extends Zend_Acl
*/
public function loadKwcResources()
{
+ if (!Kwf_Registry::get('db')) return; //if we don't have a db configured yet skip kwc resources. required to be able to build assets without db
+
if ($this->_kwcResourcesLoaded) return;
$this->_kwcResourcesLoaded = true;
|
if we don't have a db configured yet skip kwc resources
required to be able to build assets without db
|
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java b/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
+++ b/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
@@ -373,6 +373,18 @@ public class Drawer {
}
/**
+ * sets the gravity for this drawer.
+ *
+ * @param gravity the gravity which is defined for the drawer
+ */
+ public void setGravity(int gravity) {
+ DrawerLayout.LayoutParams params = (DrawerLayout.LayoutParams) getSlider().getLayoutParams();
+ params.gravity = gravity;
+ getSlider().setLayoutParams(params);
+ mDrawerBuilder.mDrawerGravity = gravity;
+ }
+
+ /**
* calculates the position of an drawerItem. searching by it's identifier
*
* @param drawerItem
|
* add new method to update the gravity of the drawer programatically
* FIX #<I>
|
diff --git a/aioworkers/cli.py b/aioworkers/cli.py
index <HASH>..<HASH> 100644
--- a/aioworkers/cli.py
+++ b/aioworkers/cli.py
@@ -66,6 +66,7 @@ def main(*config_files, args=None, config_dirs=(),
context.config.search_dirs.extend(config_dirs)
plugins = plugin.search_plugins()
+ plugins.extend(plugin.search_plugins(*commands, force=True))
for i in plugins:
i.add_arguments(parser)
|
Force search plugins from cli.main param
|
diff --git a/lib/protocol/READ_WRITE_MULTIPLE_REGISTERS.js b/lib/protocol/READ_WRITE_MULTIPLE_REGISTERS.js
index <HASH>..<HASH> 100644
--- a/lib/protocol/READ_WRITE_MULTIPLE_REGISTERS.js
+++ b/lib/protocol/READ_WRITE_MULTIPLE_REGISTERS.js
@@ -1,7 +1,7 @@
var Helpers = require("../Helpers");
var Buff = require("../Buffer");
-exports.code = 0x10;
+exports.code = 0x17;
exports.buildRequest = function (read_address, read_quantity, write_address, values) {
var buffer = Buff.alloc(9 + (values.length * 2));
|
fixes function code for read-write-multiple-registers :(
|
diff --git a/web/concrete/core/controllers/single_pages/dashboard/system/backup_restore/backup.php b/web/concrete/core/controllers/single_pages/dashboard/system/backup_restore/backup.php
index <HASH>..<HASH> 100644
--- a/web/concrete/core/controllers/single_pages/dashboard/system/backup_restore/backup.php
+++ b/web/concrete/core/controllers/single_pages/dashboard/system/backup_restore/backup.php
@@ -74,8 +74,8 @@ class Concrete5_Controller_Dashboard_System_BackupRestore_Backup extends Dashboa
if (!is_null($str_fname) && trim($str_fname) != "" && !preg_match('/\.\./',$str_fname)) {
$fullFilename = DIR_FILES_BACKUPS . "/$str_fname";
if(is_file($fullFilename)) {
- @chmod(DIR_FILES_BACKUPS . "/$str_fname", 666);
- @unlink(DIR_FILES_BACKUPS . "/$str_fname");
+ @chmod($fullFilename, 666);
+ @unlink($fullFilename);
if(is_file($fullFilename)) {
$this->error->add(t('Error deleting the file %s.', $str_fname) . ' ' . t('Please check the permissions of the folder %s', DIR_FILES_BACKUPS));
}
|
Let's simplify the code a bit
Those lines didn't found a way from my head to my hands... ;)
Former-commit-id: 6d5aa<I>b<I>af<I>ea<I>cede8e9fc5e
|
diff --git a/system/Debug/Exceptions.php b/system/Debug/Exceptions.php
index <HASH>..<HASH> 100644
--- a/system/Debug/Exceptions.php
+++ b/system/Debug/Exceptions.php
@@ -461,7 +461,7 @@ class Exceptions
$source = array_splice($source, $start, $lines, true);
// Used to format the line number in the source
- $format = '% ' . strlen(sprintf('%sd', $start + $lines));
+ $format = '% ' . strlen(sprintf('%s', $start + $lines)) . 'd';
$out = '';
// Because the highlighting may have an uneven number
|
[ci skip] Fix line numbering in Debug/Exceptions
|
diff --git a/lib/commands/external.js b/lib/commands/external.js
index <HASH>..<HASH> 100644
--- a/lib/commands/external.js
+++ b/lib/commands/external.js
@@ -39,7 +39,7 @@ class ExternalCommand {
const commandToBeRun = `${packageManager} ${options.join(' ')}`;
process.cliLogger.error(`The command moved into a separate package: ${chalk.keyword('orange')(name)}\n`);
const question = `Would you like to install ${name}? (That will run ${chalk.green(commandToBeRun)})`;
- const answer = await prompt([
+ const { installConfirm } = await prompt([
{
type: 'confirm',
name: 'installConfirm',
@@ -48,7 +48,7 @@ class ExternalCommand {
choices: ['Yes', 'No', 'Y', 'N', 'y', 'n'],
},
]);
- if (answer.installConfirm === true) {
+ if (installConfirm === true) {
await ExternalCommand.runCommand(commandToBeRun);
return ExternalCommand.validateEnv(name);
}
|
chore: Minor code refactor adhering to ES6 semantics (#<I>)
* chore: use object destructuring
* chore: remove unwanted explicit boolean check
* chore: use object destructuring assignment
* chore: minor refactor
* chore: revert
* chore: revert
* chore: minor tweak
* chore: revert
|
diff --git a/visidata/editor.py b/visidata/editor.py
index <HASH>..<HASH> 100644
--- a/visidata/editor.py
+++ b/visidata/editor.py
@@ -18,7 +18,7 @@ class SuspendCurses:
curses.doupdate()
-@visidata.VisiData.api
+@visidata.VisiData.global_api
def launchEditor(vd, *args):
editor = os.environ.get('EDITOR') or fail('$EDITOR not set')
args = [editor] + list(args)
@@ -26,7 +26,7 @@ def launchEditor(vd, *args):
return subprocess.call(args)
-@visidata.VisiData.api
+@visidata.VisiData.global_api
def launchExternalEditor(vd, v, linenum=0):
import tempfile
with tempfile.NamedTemporaryFile() as temp:
|
[editor-] launchEditor is part of global_api
|
diff --git a/spec/ooor_spec.rb b/spec/ooor_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/ooor_spec.rb
+++ b/spec/ooor_spec.rb
@@ -112,7 +112,7 @@ describe Ooor do
end
it "should load required models on the fly" do
- SaleOrder.find(1).shop_id.should be_kind_of(SaleShop)
+ ProductProduct.find(:first).categ_id.should be_kind_of(ProductCategory)
end
it "should be able to specify the fields to read" do
|
test fix: no more sale shop model since Odoo <I>
|
diff --git a/src/Pho/Compiler/Inspector.php b/src/Pho/Compiler/Inspector.php
index <HASH>..<HASH> 100644
--- a/src/Pho/Compiler/Inspector.php
+++ b/src/Pho/Compiler/Inspector.php
@@ -41,34 +41,14 @@ class Inspector
/**
* Documents all available objects and their methods.
+ *
+ * @todo incomplete
*
* @return string
*/
public function document(): string
{
- $locator = new ClassFileLocator($this->folder);
- foreach ($locator as $file) {
- $filename = str_replace($this->folder . DIRECTORY_SEPARATOR, '', $file->getRealPath());
- foreach ($file->getClasses() as $class) {
- $reflector = new \ReflectionClass($class);
- $parent = $reflector->getParentClass()->getName();
- $class_name = $reflector->getShortName();
- switch($parent) {
- case "Pho\Framework\Object":
- break;
- case "Pho\Framework\Actor":
- break;
- case "Pho\Framework\Frame":
- break;
- default:
- $ignored_classes[] = [
- "filename" => $filename,
- "classname" => $class_name
- ];
- break;
- }
- }
- }
+ // this will use an outside library
}
/**
|
documentor will be handled by an ext lib. but the arch changes are good to merge
|
diff --git a/rails/init.rb b/rails/init.rb
index <HASH>..<HASH> 100644
--- a/rails/init.rb
+++ b/rails/init.rb
@@ -1,5 +1,9 @@
-# to_prepare is called before each request in development mode and the first request in production
# See http://groups.google.com/group/mongomapper/browse_thread/thread/68f62e8eda43b43a/4841dba76938290c
+#
+# This is only for development mode. You will still want to clear the identity map before each request in production.
+# See examples/identity_map for more on this.
+#
+# to_prepare is called before each request in development mode and the first request in production.
Rails.configuration.to_prepare do
if Rails.configuration.cache_classes
MongoMapper::Plugins::IdentityMap.clear
|
Add more notes for rails/init.rb
|
diff --git a/tests/supervisors/test_statreload.py b/tests/supervisors/test_statreload.py
index <HASH>..<HASH> 100644
--- a/tests/supervisors/test_statreload.py
+++ b/tests/supervisors/test_statreload.py
@@ -1,6 +1,6 @@
import os
import signal
-import sys
+import time
from pathlib import Path
import pytest
@@ -26,10 +26,6 @@ def test_statreload():
reloader.run()
-@pytest.mark.skipif(
- sys.platform.startswith("win"),
- reason="Skipping reload test on Windows, due to low mtime resolution.",
-)
def test_should_reload(tmpdir):
update_file = Path(os.path.join(str(tmpdir), "example.py"))
update_file.touch()
@@ -43,6 +39,7 @@ def test_should_reload(tmpdir):
reloader.startup()
assert not reloader.should_restart()
+ time.sleep(0.1)
update_file.touch()
assert reloader.should_restart()
|
More resiliant reload test (#<I>)
|
diff --git a/server/sonar-main/src/test/java/org/sonar/application/cluster/HazelcastClusterTest.java b/server/sonar-main/src/test/java/org/sonar/application/cluster/HazelcastClusterTest.java
index <HASH>..<HASH> 100644
--- a/server/sonar-main/src/test/java/org/sonar/application/cluster/HazelcastClusterTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/cluster/HazelcastClusterTest.java
@@ -33,7 +33,7 @@ import java.util.List;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import org.junit.AfterClass;
+import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.DisableOnDebug;
@@ -70,8 +70,8 @@ public class HazelcastClusterTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
- @AfterClass
- public static void closeHazelcastClients() {
+ @After
+ public void closeHazelcastClients() {
closeAllHazelcastClients();
}
|
Make HazelcastClusterTest more robust.
|
diff --git a/irclib.py b/irclib.py
index <HASH>..<HASH> 100644
--- a/irclib.py
+++ b/irclib.py
@@ -1358,7 +1358,7 @@ def parse_nick_modes(mode_string):
Example:
- >>> irclib.parse_nick_modes(\"+ab-c\")
+ >>> parse_nick_modes(\"+ab-c\")
[['+', 'a', None], ['+', 'b', None], ['-', 'c', None]]
"""
@@ -1373,7 +1373,7 @@ def parse_channel_modes(mode_string):
Example:
- >>> irclib.parse_channel_modes(\"+ab-c foo\")
+ >>> parse_channel_modes(\"+ab-c foo\")
[['+', 'a', None], ['+', 'b', 'foo'], ['-', 'c', None]]
"""
|
Updated doctests to run
|
diff --git a/application/tests/_ci_phpunit_test/CIPHPUnitTest.php b/application/tests/_ci_phpunit_test/CIPHPUnitTest.php
index <HASH>..<HASH> 100644
--- a/application/tests/_ci_phpunit_test/CIPHPUnitTest.php
+++ b/application/tests/_ci_phpunit_test/CIPHPUnitTest.php
@@ -57,7 +57,13 @@ class CIPHPUnitTest
require_once BASEPATH . 'core/CodeIgniter.php';
} catch (CIPHPUnitTestShow404Exception $e) {
// Catch 404 exception
- ob_end_clean();
+ // if statement below is needed. If there is not, following error
+ // ocurrs when you use `@runInSeparateProcess`
+ // ob_end_clean(): failed to delete buffer. No buffer to deleteF
+ if (ob_get_length() > 0 )
+ {
+ ob_end_clean();
+ }
new CI_Controller();
}
|
Fix bug that "ob_end_clean(): failed to delete buffer" error occurs when you use @runInSeparateProcess
|
diff --git a/lib/splitters/s3StreamSplitter.js b/lib/splitters/s3StreamSplitter.js
index <HASH>..<HASH> 100644
--- a/lib/splitters/s3StreamSplitter.js
+++ b/lib/splitters/s3StreamSplitter.js
@@ -35,7 +35,7 @@ class s3StreamSplitter extends StreamSplitter {
if (error) {
return this._ctx.parent.emit('error', error)
}
- return this._ctx.parent.emit('log', jsonParser.stringify({ event: 'File Uploaded!', ...data }, this._ctx.parent))
+ return this._ctx.parent.emit('debug', jsonParser.stringify({ event: 'File Uploaded!', ...data }, this._ctx.parent))
})
return _throughStream
diff --git a/lib/transports/s3.js b/lib/transports/s3.js
index <HASH>..<HASH> 100644
--- a/lib/transports/s3.js
+++ b/lib/transports/s3.js
@@ -120,7 +120,7 @@ class s3 extends base {
if (error) {
return this.parent.emit('error', error)
}
- return this.parent.emit('log', jsonParser.stringify({ event: 'File Uploaded!', ...data }, this.parent))
+ return this.parent.emit('debug', jsonParser.stringify({ event: 'File Uploaded!', ...data }, this.parent))
})
this.stream.pipe(_throughStream)
|
switch upload trace log level to debug
|
diff --git a/lib/Core/Site/QueryType/CriteriaBuilder.php b/lib/Core/Site/QueryType/CriteriaBuilder.php
index <HASH>..<HASH> 100644
--- a/lib/Core/Site/QueryType/CriteriaBuilder.php
+++ b/lib/Core/Site/QueryType/CriteriaBuilder.php
@@ -167,14 +167,18 @@ final class CriteriaBuilder
private function buildLogicalNot(CriterionDefinition $definition): LogicalNot
{
$criteria = $this->build($definition->value);
+ $criterion = $this->reduceCriteria($criteria);
+ return new LogicalNot($criterion);
+ }
+
+ private function reduceCriteria(array $criteria): Criterion
+ {
if (count($criteria) === 1) {
- $criteria = reset($criteria);
- } else {
- $criteria = new LogicalAnd($criteria);
+ return reset($criteria);
}
- return new LogicalNot($criteria);
+ return new LogicalAnd($criteria);
}
/**
|
Extract method to get rid of else block
|
diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100644
--- a/manifest.php
+++ b/manifest.php
@@ -32,7 +32,7 @@ return array(
'label' => 'Delivery core extension',
'description' => 'TAO delivery extension manges the administration of the tests',
'license' => 'GPL-2.0',
- 'version' => '8.5.0',
+ 'version' => '8.5.1',
'author' => 'Open Assessment Technologies, CRP Henri Tudor',
'requires' => array(
'tao' => '>=15.2.0',
diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php
index <HASH>..<HASH> 100644
--- a/scripts/update/Updater.php
+++ b/scripts/update/Updater.php
@@ -345,7 +345,7 @@ class Updater extends \common_ext_ExtensionUpdater {
$this->setVersion('7.1.0');
}
- $this->skip('7.1.0', '8.5.0');
+ $this->skip('7.1.0', '8.5.1');
}
}
|
Bump to version <I>
|
diff --git a/lib/http-api.js b/lib/http-api.js
index <HASH>..<HASH> 100644
--- a/lib/http-api.js
+++ b/lib/http-api.js
@@ -117,13 +117,17 @@ module.exports.MatrixHttpApi.prototype = {
clearTimeout(xhr.timeout_timer);
if (!xhr.responseText) {
- cb(new Error('No response body.'));
+ var err = new Error('No response body.');
+ err.http_status = xhr.status;
+ cb(err);
return;
}
var resp = JSON.parse(xhr.responseText);
if (resp.content_uri === undefined) {
- cb(new Error('Bad response'));
+ var err = Error('Bad response');
+ err.http_status = xhr.status;
+ cb(err);
return;
}
|
Pass the http status out with the error so upper level can can see what went wrong.
|
diff --git a/tango/test_context.py b/tango/test_context.py
index <HASH>..<HASH> 100644
--- a/tango/test_context.py
+++ b/tango/test_context.py
@@ -94,7 +94,7 @@ class DeviceTestContext(object):
nodb = "dbase=no"
command = "{0} {1} -ORBendPoint giop:tcp:{2}:{3} -file={4}"
- connect_timeout = 1.
+ connect_timeout = 3.
disconnect_timeout = connect_timeout
def __init__(self, device, device_cls=None, server_name=None,
diff --git a/tests/test_event.py b/tests/test_event.py
index <HASH>..<HASH> 100644
--- a/tests/test_event.py
+++ b/tests/test_event.py
@@ -78,7 +78,7 @@ def test_subscribe_event(event_device):
"attr", EventType.CHANGE_EVENT, callback, wait=True)
event_device.command_inout("send_event", wait=True)
# Wait for tango event
- retries = 10
+ retries = 20
for _ in range(retries):
event_device.read_attribute("state", wait=True)
if len(results) > 1:
|
Increase timeouts for unit-testing
|
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index <HASH>..<HASH> 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -2627,6 +2627,17 @@ function authenticate_user_login($username, $password) {
}
}
}
+
+ /// Log in to a second system if necessary
+ if (!empty($CFG->sso)) {
+ include_once($CFG->dirroot .'/sso/'. $CFG->sso .'/lib.php');
+ if (function_exists('sso_user_login')) {
+ if (!sso_user_login($username, $password)) { // Perform the signon process
+ notify('Second sign-on failed');
+ }
+ }
+ }
+
return $user;
} else {
|
Added hooks for new SSO capability (Single-Sign-On or Second-Sign-On)
|
diff --git a/tftp_test.go b/tftp_test.go
index <HASH>..<HASH> 100644
--- a/tftp_test.go
+++ b/tftp_test.go
@@ -202,9 +202,6 @@ func testSendReceive(t *testing.T, client *Client, length int64) {
if err != nil {
t.Fatalf("requesting write %s: %v", filename, err)
}
- if ot, ok := writeTransfer.(OutgoingTransfer); ok {
- ot.SetSize(length)
- }
r := io.LimitReader(newRandReader(rand.NewSource(42)), length)
n, err := writeTransfer.ReadFrom(r)
if err != nil {
|
cleanup: SetSize does not work on client side
|
diff --git a/views/v3/partials/sidebar.blade.php b/views/v3/partials/sidebar.blade.php
index <HASH>..<HASH> 100644
--- a/views/v3/partials/sidebar.blade.php
+++ b/views/v3/partials/sidebar.blade.php
@@ -1,9 +1,11 @@
@if(isset($id) && $id)
@php do_action('Municipio/sidebar/beforeSidebar', $id); @endphp
+ @section('sidebar.' . $id . '.before')@show
@if (is_active_sidebar($id))
<div id="sidebar-{{$id}}" class="sidebar-{{$id}} {{isset($classes) ? is_array($classes) ? implode(' ', $classes) : $classes : ''}}">
@php dynamic_sidebar($id); @endphp {{-- TODO: Move functions to Controller --}}
</div>
@endif
+ @section('sidebar.' . $id . '.after')@show
@php do_action('Municipio/sidebar/afterSidebar', $id); @endphp
@endif
\ No newline at end of file
|
Add before / after section to all sidebars
|
diff --git a/protocols/raft/src/main/java/io/atomix/protocols/raft/roles/LeaderAppender.java b/protocols/raft/src/main/java/io/atomix/protocols/raft/roles/LeaderAppender.java
index <HASH>..<HASH> 100644
--- a/protocols/raft/src/main/java/io/atomix/protocols/raft/roles/LeaderAppender.java
+++ b/protocols/raft/src/main/java/io/atomix/protocols/raft/roles/LeaderAppender.java
@@ -450,7 +450,7 @@ final class LeaderAppender extends AbstractAppender {
// Verify that the leader has contacted a majority of the cluster within the last two election timeouts.
// If the leader is not able to contact a majority of the cluster within two election timeouts, assume
// that a partition occurred and transition back to the FOLLOWER state.
- if (System.currentTimeMillis() - Math.max(getHeartbeatTime(), leaderTime) > raft.getElectionTimeout().toMillis() * 2) {
+ if (member.getFailureCount() >= 3 && System.currentTimeMillis() - Math.max(getHeartbeatTime(), leaderTime) > raft.getElectionTimeout().toMillis() * 2) {
log.warn("Suspected network partition. Stepping down");
raft.setLeader(null);
raft.transition(RaftServer.Role.FOLLOWER);
|
Wait minimum number of AppendRequest failures before detecting network partition to account for single request timeouts that are longer than the election timeout.
|
diff --git a/server/const.go b/server/const.go
index <HASH>..<HASH> 100644
--- a/server/const.go
+++ b/server/const.go
@@ -41,7 +41,7 @@ var (
const (
// VERSION is the current version for the server.
- VERSION = "2.9.0-RC.6"
+ VERSION = "2.9.0-RC.7"
// PROTO is the currently supported protocol.
// 0 was the original
|
Bump to <I>-RC<I>
|
diff --git a/bundles/BlockManagerBundle/EventListener/LayoutResolverListener.php b/bundles/BlockManagerBundle/EventListener/LayoutResolverListener.php
index <HASH>..<HASH> 100644
--- a/bundles/BlockManagerBundle/EventListener/LayoutResolverListener.php
+++ b/bundles/BlockManagerBundle/EventListener/LayoutResolverListener.php
@@ -50,7 +50,7 @@ class LayoutResolverListener implements EventSubscriberInterface
*/
public static function getSubscribedEvents()
{
- return array(KernelEvents::REQUEST => 'onKernelRequest');
+ return array(KernelEvents::REQUEST => array('onKernelRequest', -255));
}
/**
|
Make sure layout resolver listener runs last
|
diff --git a/builder/vmware/common/driver_config.go b/builder/vmware/common/driver_config.go
index <HASH>..<HASH> 100644
--- a/builder/vmware/common/driver_config.go
+++ b/builder/vmware/common/driver_config.go
@@ -2,6 +2,7 @@ package common
import (
"fmt"
+ "os"
"github.com/mitchellh/packer/packer"
)
|
builder/vmware: fix compilation issues
|
diff --git a/lfs/credentials.go b/lfs/credentials.go
index <HASH>..<HASH> 100644
--- a/lfs/credentials.go
+++ b/lfs/credentials.go
@@ -105,6 +105,9 @@ func getCredURLForAPI(req *http.Request) (*url.URL, error) {
func fillCredentials(u *url.URL) (Creds, error) {
path := strings.TrimPrefix(u.Path, "/")
creds := Creds{"protocol": u.Scheme, "host": u.Host, "path": path}
+ if u.User != nil && u.User.Username() != "" {
+ creds["username"] = u.User.Username()
+ }
return execCreds(creds, "fill")
}
|
Include the username in the creds call if present
This is needed to disambiguate cases where a user has multiple usernames
on the same host. Without this the first item will be silently used
which might be wrong & cause a loop of incorrect password prompts (&
possibly a lockout on the server)
|
diff --git a/broqer/hub.py b/broqer/hub.py
index <HASH>..<HASH> 100644
--- a/broqer/hub.py
+++ b/broqer/hub.py
@@ -108,7 +108,7 @@ True
import asyncio
from collections import OrderedDict
from types import MappingProxyType
-from typing import Any, Optional
+from typing import Any, Optional, Dict # noqa: F401
from broqer import Publisher, Subscriber, SubscriptionDisposable
@@ -118,6 +118,7 @@ class Topic(Publisher, Subscriber):
Publisher.__init__(self)
self._subject = None # type: Publisher
self._path = path
+ self._meta = dict() # type: Dict[str, Any]
def subscribe(self, subscriber: 'Subscriber') -> SubscriptionDisposable:
disposable = Publisher.subscribe(self, subscriber)
@@ -169,7 +170,7 @@ class Topic(Publisher, Subscriber):
@property
def meta(self) -> dict:
- return getattr(self, '_meta', None)
+ return self._meta
@property
def path(self) -> str:
@@ -231,7 +232,7 @@ class Hub:
non_keys = set(meta.keys()) - self._permitted_meta_keys
if non_keys:
raise KeyError('Not permitted meta keys: %r' % non_keys)
- setattr(topic, '_meta', meta) # ._meta is not yet existing
+ topic._meta.update(meta)
if hasattr(topic, '_assignment_future'):
topic._assignment_future.set_result(None)
|
add .meta to every Topic
|
diff --git a/src/Illuminate/Database/Connection.php b/src/Illuminate/Database/Connection.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Database/Connection.php
+++ b/src/Illuminate/Database/Connection.php
@@ -658,7 +658,11 @@ class Connection implements ConnectionInterface {
{
$message = $e->getPrevious()->getMessage();
- return str_contains($message, ['server has gone away', 'no connection to the server']);
+ return str_contains($message, [
+ 'server has gone away',
+ 'no connection to the server',
+ 'Lost connection'
+ ]);
}
/**
|
retry on 'Lost connection' also
|
diff --git a/tests/changelog.py b/tests/changelog.py
index <HASH>..<HASH> 100644
--- a/tests/changelog.py
+++ b/tests/changelog.py
@@ -108,6 +108,16 @@ class releases(Spec):
assert isinstance(entries[0], issue)
eq_(entries[0].number, None)
+ def unreleased_items_go_in_unreleased_release(self):
+ issues = [
+ _release('1.0.2'), _entry(self.f), _entry(self.b), _release('1.0.0')
+ ]
+ releases = construct_releases(issues, self.app)
+ entries = releases[-1]['entries']
+ eq_(len(entries), 1)
+ assert self.f in entries
+ eq_(releases[-1]['obj'].number, 'unreleased')
+
class nodes(Spec):
"""
|
Test for 'unreleased' entry
|
diff --git a/gcloud/datastore/test_key.py b/gcloud/datastore/test_key.py
index <HASH>..<HASH> 100644
--- a/gcloud/datastore/test_key.py
+++ b/gcloud/datastore/test_key.py
@@ -19,8 +19,7 @@ class TestKey(unittest2.TestCase):
pb.partition_id.namespace = namespace
for elem in path:
added = pb.path_element.add()
- if 'kind' in elem:
- added.kind = elem['kind']
+ added.kind = elem['kind']
if 'id' in elem:
added.id = elem['id']
if 'name' in elem:
|
<I>% branch coverage for gcloud.datastore.test_key.
Don't worry about path elem w/o kind.
|
diff --git a/dask_ml/model_selection/utils.py b/dask_ml/model_selection/utils.py
index <HASH>..<HASH> 100644
--- a/dask_ml/model_selection/utils.py
+++ b/dask_ml/model_selection/utils.py
@@ -4,6 +4,7 @@ from distutils.version import LooseVersion
import dask
import dask.array as da
+import dask.dataframe as dd
import scipy.sparse as sp
from dask.base import tokenize
from dask.delayed import Delayed, delayed
@@ -45,7 +46,7 @@ def to_indexable(*args, **kwargs):
else:
indexable = _indexable
for x in args:
- if x is None or isinstance(x, da.Array):
+ if x is None or isinstance(x, (da.Array, dd.DataFrame)):
yield x
elif is_dask_collection(x):
yield delayed(indexable, pure=True)(x)
|
update indexable() to just yield dask dataframes (issue #<I>) (#<I>)
* update indexable() to just yield dask dataframes, as mentioned in issue #<I>
|
diff --git a/elasticsearch_dsl/filter.py b/elasticsearch_dsl/filter.py
index <HASH>..<HASH> 100644
--- a/elasticsearch_dsl/filter.py
+++ b/elasticsearch_dsl/filter.py
@@ -80,12 +80,9 @@ class Bool(BoolMixin, Filter):
if self.should and other.should:
selfshould, othershould = self.should[:], other.should[:]
# required subfilter, move to must
- if len(selfshould) == 1:
- f.must.append(selfshould.pop())
-
- # required subfilter, move to must
- if len(othershould) == 1:
- f.must.append(othershould.pop())
+ for s in (selfshould, othershould):
+ if len(s) == 1:
+ f.must.append(s.pop())
# we have leftover lists, nothing to do but add to must as bool(should)
if selfshould and othershould:
|
Cleaner code for filter __and__
|
diff --git a/src/AbstractContainer.php b/src/AbstractContainer.php
index <HASH>..<HASH> 100644
--- a/src/AbstractContainer.php
+++ b/src/AbstractContainer.php
@@ -456,6 +456,8 @@ abstract class AbstractContainer implements ContainerInterface
"Missing required parameter \"$name\" when instantiating \"$class\"."
);
}
+ } if ($dependency instanceof Closure) {
+ $dependencies[$index] = call_user_func($dependency, $this);
}
}
|
Added resolving `Closure` dependency
|
diff --git a/broqer/op/_operator.py b/broqer/op/_operator.py
index <HASH>..<HASH> 100644
--- a/broqer/op/_operator.py
+++ b/broqer/op/_operator.py
@@ -1,3 +1,5 @@
+from abc import ABCMeta, abstractmethod
+
from broqer import Publisher, Subscriber, SubscriptionDisposable
@@ -23,6 +25,10 @@ class Operator(Publisher, Subscriber): # pylint: disable=abstract-method
subscriber.emit(*args, who=self) # pylint: disable=E1133
return disposable
+ @abstractmethod
+ def get(self):
+ return None
+
def unsubscribe(self, subscriber: Subscriber) -> None:
Publisher.unsubscribe(self, subscriber)
if not self._subscriptions:
@@ -57,6 +63,9 @@ class MultiOperator(Publisher, Subscriber): # pylint: disable=abstract-method
for _publisher in self._publishers:
_publisher.unsubscribe(self)
+ @abstractmethod
+ def get(self):
+ return None
def build_operator(operator_cls):
""" This function is taking an operator class and is returning a function
|
make get() of Operator and MultiOperator an abstractmethod to prevent wrong usage
|
diff --git a/src/adapters/pouch.idb.js b/src/adapters/pouch.idb.js
index <HASH>..<HASH> 100644
--- a/src/adapters/pouch.idb.js
+++ b/src/adapters/pouch.idb.js
@@ -354,6 +354,11 @@ var IdbPouch = function(opts, callback) {
});
});
} else {
+ if (doc._attachments){
+ for (var key in doc._attachments) {
+ doc._attachments[key].stub = true;
+ }
+ }
callback(null, doc);
}
};
diff --git a/tests/test.attachments.js b/tests/test.attachments.js
index <HASH>..<HASH> 100644
--- a/tests/test.attachments.js
+++ b/tests/test.attachments.js
@@ -74,4 +74,19 @@
});
});
+ asyncTest("Test remove doc with attachment", function() {
+ initTestDB(this.name, function(err, db) {
+ db.put({ _id: 'mydoc' }, function(err, resp) {
+ db.putAttachment('mydoc/mytext', resp.rev, 'Mytext', 'text/plain', function(err, res) {
+ db.get('mydoc',{attachments:false},function(err,doc){
+ db.remove(doc, function(err, resp){
+ ok(res.ok);
+ start();
+ });
+ });
+ });
+ });
+ });
+ });
+
});
|
Test and fix for removing doc with attachments (via @chendricks)
|
diff --git a/lib/runner.js b/lib/runner.js
index <HASH>..<HASH> 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -169,14 +169,14 @@ Object.assign(Runner.prototype, {
this.builder.emit(
'query-response',
postProcessedResponse,
- Object.assign({ __knexUid: this.connection.__knexUid }, obj),
+ Object.assign({ __knexUid, __knexTxId }, obj),
this.builder
);
this.client.emit(
'query-response',
postProcessedResponse,
- Object.assign({ __knexUid: this.connection.__knexUid }, obj),
+ Object.assign({ __knexUid, __knexTxId }, obj),
this.builder
);
@@ -230,7 +230,7 @@ Object.assign(Runner.prototype, {
this.builder.emit(
'query-error',
error,
- Object.assign({ __knexUid: this.connection.__knexUid }, obj)
+ Object.assign({ __knexUid, __knexTxId }, obj)
);
throw error;
});
|
Make sure query-response and query-error events contain _knexTxId (#<I>)
|
diff --git a/tests/integration/test_model.py b/tests/integration/test_model.py
index <HASH>..<HASH> 100644
--- a/tests/integration/test_model.py
+++ b/tests/integration/test_model.py
@@ -298,7 +298,7 @@ async def test_add_manual_machine_ssh(event_loop):
'name': test_name,
'source': {
'type': 'image',
- 'alias': 'xenial',
+ 'alias': 'bionic',
'mode': 'pull',
'protocol': 'simplestreams',
'server': 'https://cloud-images.ubuntu.com/releases',
@@ -354,7 +354,6 @@ async def test_add_manual_machine_ssh(event_loop):
container.stop(wait=True)
container.delete(wait=True)
-
profile.delete()
@@ -415,7 +414,7 @@ async def test_add_manual_machine_ssh_root(event_loop):
'name': test_name,
'source': {
'type': 'image',
- 'alias': 'xenial',
+ 'alias': 'bionic',
'mode': 'pull',
'protocol': 'simplestreams',
'server': 'https://cloud-images.ubuntu.com/releases',
|
use bionic instead of xenial on the added container
Fixes #<I>
|
diff --git a/lib/parser_block.js b/lib/parser_block.js
index <HASH>..<HASH> 100644
--- a/lib/parser_block.js
+++ b/lib/parser_block.js
@@ -109,17 +109,13 @@ ParserBlock.prototype.parse = function (src, options, env) {
if (!src) { return ''; }
- if (src.indexOf('\r') >= 0) {
- src = src.replace(/\r/, '');
- }
-
- if (src.indexOf('\u00a0') >= 0) {
- src = src.replace(/\u00a0/g, ' ');
- }
+ // Normalize spaces
+ src = src.replace(/\u00a0/g, ' ');
- if (src.indexOf('\u2424') >= 0) {
- src = src.replace(/\u2424/g, '\n');
- }
+ // Normalize newlines
+ src = src.replace(/\r\n/, '\n');
+ src = src.replace(/\r\u0085/, '\n');
+ src = src.replace(/[\u2424\u2028\u0085]/g, '\n');
// Replace tabs with proper number of spaces (1..4)
if (src.indexOf('\t') >= 0) {
|
Extended spaces & line breaks normalization
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -387,6 +387,7 @@ function ApostropheSchemas(options, callback) {
var results = [];
return async.eachSeries(data, function(datum, callback) {
var result = {};
+ result.id = self._apos.sanitizeId(datum.id) || self._apos.generateId();
return self.convertFields(req, schema, 'form', datum, result, function(err) {
if (err) {
return callback(err);
diff --git a/public/js/editor.js b/public/js/editor.js
index <HASH>..<HASH> 100644
--- a/public/js/editor.js
+++ b/public/js/editor.js
@@ -198,6 +198,7 @@ function AposSchemas() {
}
var result = {};
var $element = $($elements[i]);
+ result.id = $element.attr('data-id');
return self.convertFields($element, field.schema, result, function(_err) {
if (_err) {
err = _err;
@@ -381,6 +382,8 @@ function AposSchemas() {
addRemoveHandler($element);
addMoveHandler($element);
+ $element.attr('data-id', data[i].id);
+
$elements.append($element);
return self.populateFields($element, field.schema, data[i], function() {
i++;
|
schema properties now have a globally unique id field
|
diff --git a/src/Mouf/Composer/ComposerService.php b/src/Mouf/Composer/ComposerService.php
index <HASH>..<HASH> 100644
--- a/src/Mouf/Composer/ComposerService.php
+++ b/src/Mouf/Composer/ComposerService.php
@@ -530,6 +530,15 @@ class ComposerService {
$moufUiFileWriter = new MoufUIFileWritter($composer);
$moufUiFileWriter->writeMoufUI();
}
+
+ /**
+ * Returns the Composer config object
+ * @param string $param
+ * @return string
+ */
+ public function getComposerConfig() {
+ return $this->getComposer()->getConfig();
+ }
}
?>
\ No newline at end of file
|
Adding method to fetch Composer's config in Composer service.
|
diff --git a/lib/extract.js b/lib/extract.js
index <HASH>..<HASH> 100644
--- a/lib/extract.js
+++ b/lib/extract.js
@@ -31,16 +31,9 @@ module.exports = function (archive, dest, optionspath, options) {
// When a stdout is emitted, parse each line and search for a pattern. When
// the pattern is found, extract the file (or directory) name from it and
// pass it to an array. Finally returns this array.
- // Also check if a file is extracted using an Unsupported Method of 7-Zip.
.progress(function (data) {
var entries = [];
- var isUnsupportedMethod = (data.search('Unsupported Method'))
- ? true
- : false;
- if (isUnsupportedMethod) {
- return reject(new Error('Unsupported Method'))
- }
data.split('\n').forEach(function (line) {
if (line.substr(0, 12) === 'Extracting ') {
|
removed unsupported method check, give error on valid archives created on same host using same binary, seems like a bug to me
|
diff --git a/lnwallet/channel.go b/lnwallet/channel.go
index <HASH>..<HASH> 100644
--- a/lnwallet/channel.go
+++ b/lnwallet/channel.go
@@ -589,9 +589,6 @@ func createCommitTx(fundingOutput *wire.TxIn, selfKey, theirKey *btcec.PublicKey
commitTx := wire.NewMsgTx()
commitTx.Version = 2
commitTx.AddTxIn(fundingOutput)
- // TODO(roasbeef): we default to blocks, make configurable as part of
- // channel reservation.
- commitTx.TxIn[0].Sequence = lockTimeToSequence(false, csvTimeout)
commitTx.AddTxOut(wire.NewTxOut(int64(amountToSelf), payToUsScriptHash))
commitTx.AddTxOut(wire.NewTxOut(int64(amountToThem), payToThemScriptHash))
|
lnwallet: commit tx should have final sequence num
|
diff --git a/sirmordred/_version.py b/sirmordred/_version.py
index <HASH>..<HASH> 100644
--- a/sirmordred/_version.py
+++ b/sirmordred/_version.py
@@ -1,2 +1,2 @@
# Versions compliant with PEP 440 https://www.python.org/dev/peps/pep-0440
-__version__ = "0.1.31"
+__version__ = "0.1.32"
|
[release] Update version number to <I>
|
diff --git a/src/lokijs.js b/src/lokijs.js
index <HASH>..<HASH> 100644
--- a/src/lokijs.js
+++ b/src/lokijs.js
@@ -1472,12 +1472,13 @@
* @memberof LokiFsAdapter
*/
LokiFsAdapter.prototype.saveDatabase = function saveDatabase(dbname, dbstring, callback) {
+ var self = this;
var tmpdbname = dbname + '~';
this.fs.writeFile(tmpdbname, dbstring, function writeFileCallback(err) {
if (err) {
callback(new Error(err));
} else {
- this.fs.rename(tmpdbname,dbname,callback);
+ self.fs.rename(tmpdbname,dbname,callback);
}
});
};
|
Fixed 'this' scoping in saveDatabase
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -85,7 +85,9 @@ export default function prepareAxios(pageResponse, axiosInstance = null) {
return targetAxios.request(newConfig);
} else {
// return an empty promise instead of making the call from the server side
- return new Promise(() => {});
+ const emptyPromise = new Promise(() => {});
+ emptyPromise.empty = true;
+ return emptyPromise;
}
}
|
leave a way to tell if a promise is an empty promise, just in case
|
diff --git a/contrib/sacrebleu/sacrebleu.py b/contrib/sacrebleu/sacrebleu.py
index <HASH>..<HASH> 100755
--- a/contrib/sacrebleu/sacrebleu.py
+++ b/contrib/sacrebleu/sacrebleu.py
@@ -165,7 +165,7 @@ from collections import Counter, namedtuple
from itertools import zip_longest
from typing import List, Iterable, Tuple
-VERSION = '1.2'
+VERSION = '1.2.1'
try:
# SIGPIPE is not available on Windows machines, throwing an exception.
@@ -1340,7 +1340,6 @@ def main():
if args.score_only:
print('{:.2f}'.format(chrf))
else:
- version_str = build_signature_chrf(args, len(refs))
print('CHRF = {:.2f}'.format(chrf))
if __name__ == '__main__':
|
small bugfix (#<I>)
|
diff --git a/src/cloudant/design_document.py b/src/cloudant/design_document.py
index <HASH>..<HASH> 100644
--- a/src/cloudant/design_document.py
+++ b/src/cloudant/design_document.py
@@ -19,11 +19,12 @@ class DesignDocument(Document):
"""
def __init__(self, cloudant_database, document_id=None):
super(DesignDocument, self).__init__(cloudant_database, document_id)
+ self.setdefault('views', {})
@property
def views(self):
"""accessor property for views dictionary"""
- return self['views']
+ return self.get('views')
def add_view(self, view_name, map_func, reduce_func=None):
"""
|
Fix view manipulation in DesignDocument
- Initialize views sub dict
|
diff --git a/lib/rb-inotify/notifier.rb b/lib/rb-inotify/notifier.rb
index <HASH>..<HASH> 100644
--- a/lib/rb-inotify/notifier.rb
+++ b/lib/rb-inotify/notifier.rb
@@ -270,11 +270,11 @@ module INotify
events = []
cookies = {}
- while ev = Event.consume(data, self)
- events << ev
- next if ev.cookie == 0
- cookies[ev.cookie] ||= []
- cookies[ev.cookie] << ev
+ while event = Event.consume(data, self)
+ events << event
+ next if event.cookie == 0
+ cookies[event.cookie] ||= []
+ cookies[event.cookie] << event
end
cookies.each {|c, evs| evs.each {|ev| ev.related.replace(evs - [ev]).freeze}}
events
|
Rename conflict variable with the following block
This commit removes below interpreter warning.
* warning: shadowing outer local variable
|
diff --git a/benchexec/tools/witness2test.py b/benchexec/tools/witness2test.py
index <HASH>..<HASH> 100644
--- a/benchexec/tools/witness2test.py
+++ b/benchexec/tools/witness2test.py
@@ -30,7 +30,7 @@ class Tool(benchexec.tools.template.BaseTool):
(https://github.com/diffblue/cprover-sv-comp/pull/14).
"""
- REQUIRED_PATHS = ['test-gen.sh', 'process_witness.py', 'TestEnvGenerator.pl']
+ REQUIRED_PATHS = ['test-gen.sh', 'process_witness.py', 'TestEnvGenerator.pl', 'pycparser-master']
def executable(self):
"""
|
witness2test uses pycparser
Although test-gen.sh would take care of downloading it, the container-based set up requires preparation beforehand.
|
diff --git a/slave/buildslave/bot.py b/slave/buildslave/bot.py
index <HASH>..<HASH> 100644
--- a/slave/buildslave/bot.py
+++ b/slave/buildslave/bot.py
@@ -526,6 +526,7 @@ class BuildSlave(service.MultiService):
if not self.bf.perspective:
log.msg("No active connection, shutting down NOW")
reactor.stop()
+ return
log.msg("Telling the master we want to shutdown after any running builds are finished")
d = self.bf.perspective.callRemote("shutdown")
|
don't assume that reactor.stop doesn't return (it does)
|
diff --git a/lib/caruby/csv/csvio.rb b/lib/caruby/csv/csvio.rb
index <HASH>..<HASH> 100644
--- a/lib/caruby/csv/csvio.rb
+++ b/lib/caruby/csv/csvio.rb
@@ -1,6 +1,3 @@
-require 'rubygems'
-gem 'fastercsv'
-
require 'fileutils'
require 'faster_csv'
require 'caruby/util/options'
|
Don't need gem requires with bundle.
|
diff --git a/classes/Pods.php b/classes/Pods.php
index <HASH>..<HASH> 100644
--- a/classes/Pods.php
+++ b/classes/Pods.php
@@ -3739,10 +3739,13 @@ class Pods implements Iterator {
$field['name'] = trim( $name );
}
- $to_merge = pods_v( $field['name'], $all_fields );
+ $to_merge = $this->pod_data->get_field( $field['name'] );
if ( $to_merge ) {
$field = pods_config_merge_data( $to_merge, $field );
+
+ // Override the name field as the alias should not be used.
+ $field['name'] = $to_merge['name'];
}
// Never show the ID field.
@@ -3881,10 +3884,13 @@ class Pods implements Iterator {
$field['name'] = trim( $name );
}
- $to_merge = pods_v( $field['name'], $all_fields );
+ $to_merge = $this->pod_data->get_field( $field['name'] );
if ( $to_merge ) {
$field = pods_config_merge_data( $to_merge, $field );
+
+ // Override the name field as the alias should not be used.
+ $field['name'] = $to_merge['name'];
}
if ( pods_v( 'hidden', $field, false, true ) || 'hidden' === $field['type'] ) {
|
Support field aliases in form() and view()
|
diff --git a/app/services/action_trigger_factory.rb b/app/services/action_trigger_factory.rb
index <HASH>..<HASH> 100644
--- a/app/services/action_trigger_factory.rb
+++ b/app/services/action_trigger_factory.rb
@@ -238,9 +238,10 @@ class ActionTriggerFactory
path_messages << c.message(text: "Hi, #{app.name} will reply as soon as they can.", uuid: 1)
end
- path_messages << route_support
-
- path_messages.flatten!
+ if user.email.blank?
+ path_messages << route_support
+ path_messages.flatten!
+ end
routing = app.lead_tasks_settings["routing"]
|
Update action_trigger_factory.rb
skip route support if there is an email
|
diff --git a/src/Jaspersoft/Service/ReportService.php b/src/Jaspersoft/Service/ReportService.php
index <HASH>..<HASH> 100644
--- a/src/Jaspersoft/Service/ReportService.php
+++ b/src/Jaspersoft/Service/ReportService.php
@@ -89,7 +89,12 @@ class ReportService extends JRSService
*/
public function getInputControlStructure($uri) {
$url = $this->service_url . '/reports' . $uri . '/inputControls';
- $data = $this->service->prepAndSend($url, array(200), 'GET', null, true);
+ $data = $this->service->prepAndSend($url, array(200, 204), 'GET', null, true);
+
+ if(!$data) {
+ return [];
+ }
+
$json_obj = json_decode($data);
$result = array();
|
Fix for the case of no parameters.
|
diff --git a/ucms_site/src/Access.php b/ucms_site/src/Access.php
index <HASH>..<HASH> 100644
--- a/ucms_site/src/Access.php
+++ b/ucms_site/src/Access.php
@@ -53,24 +53,29 @@ final class Access
const OP_DELETE = 'delete';
/**
+ * Request new site permission
+ */
+ const PERM_SITE_REQUEST = 'site request';
+
+ /**
* User can view global labeled content permission.
*/
- const PERM_GLOBAL_LABELED_VIEW = 'view global labeled content';
+ const PERM_GLOBAL_LABELED_VIEW = 'site content labeled view';
/**
* User can view global content permission.
*/
- const PERM_GLOBAL_VIEW = 'view global content';
+ const PERM_GLOBAL_VIEW = 'site content global view';
/**
* User can edit global labeled content permission.
*/
- const PERM_GLOBAL_LABELED_EDIT = 'edit global labeled content';
+ const PERM_GLOBAL_LABELED_EDIT = 'site content labeled edit';
/**
* User can edit global content permission.
*/
- const PERM_GLOBAL_EDIT = 'edit global content';
+ const PERM_GLOBAL_EDIT = 'site content global edit';
/**
* Functional administrator role.
|
site: renamed permissions
|
diff --git a/builtin/providers/aws/resource_aws_db_subnet_group.go b/builtin/providers/aws/resource_aws_db_subnet_group.go
index <HASH>..<HASH> 100644
--- a/builtin/providers/aws/resource_aws_db_subnet_group.go
+++ b/builtin/providers/aws/resource_aws_db_subnet_group.go
@@ -165,8 +165,9 @@ func resourceAwsDbSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) er
}
_, err := conn.ModifyDBSubnetGroup(&rds.ModifyDBSubnetGroupInput{
- DBSubnetGroupName: aws.String(d.Id()),
- SubnetIds: sIds,
+ DBSubnetGroupName: aws.String(d.Id()),
+ DBSubnetGroupDescription: aws.String(d.Get("description").(string)),
+ SubnetIds: sIds,
})
if err != nil {
|
Add the description as a part of the update request
|
diff --git a/lib/vcoworkflows/vcosession.rb b/lib/vcoworkflows/vcosession.rb
index <HASH>..<HASH> 100644
--- a/lib/vcoworkflows/vcosession.rb
+++ b/lib/vcoworkflows/vcosession.rb
@@ -7,6 +7,9 @@ require 'rest_client'
module VcoWorkflows
# VcoSession
class VcoSession
+
+ attr_reader :rest_resource
+
# Initialize the session
#
# @param [String] uri URI for the vCenter Orchestrator API endpoint
|
Added accessor to aid unit testing
|
diff --git a/src/hamster/db.py b/src/hamster/db.py
index <HASH>..<HASH> 100644
--- a/src/hamster/db.py
+++ b/src/hamster/db.py
@@ -479,6 +479,8 @@ class Storage(storage.Storage):
WHERE fact_id = ?"""
self.execute(tag_update, (new_fact_id, fact["id"])) #clone tags
+ trophies.unlock("split")
+
# overlap start
elif start_time < fact["start_time"] < end_time:
logging.info("Overlapping start of %s" % fact["name"])
@@ -526,6 +528,8 @@ class Storage(storage.Storage):
if not category_id:
category_id = self.__add_category(fact.category)
+ trophies.unlock("no_hands")
+
# try to find activity, resurrect if not temporary
activity_id = self.__get_activity_by_name(fact.activity,
category_id,
|
split and no-hands trophies
|
diff --git a/pydivert/__init__.py b/pydivert/__init__.py
index <HASH>..<HASH> 100644
--- a/pydivert/__init__.py
+++ b/pydivert/__init__.py
@@ -20,7 +20,7 @@ from .packet import Packet
from .windivert import WinDivert
__author__ = 'fabio'
-__version__ = '2.0.7'
+__version__ = '2.0.8'
if _sys.version_info < (3, 4):
# add socket.inet_pton on Python < 3.4
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@ workdir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(workdir, "pydivert", "__init__.py")) as fp:
__version__ = fp.read().split("__version__ = '", 1)[1].split("'", 1)[0]
-with open(os.path.join(workdir, 'README.rst'), encoding='utf-8') as f:
+with open(os.path.join(workdir, 'README.rst')) as f:
long_description = f.read()
setup(
|
Something goes wrong on PKG-INFO when encoding is set to UTF-8
|
diff --git a/test/ReadabilityTest.php b/test/ReadabilityTest.php
index <HASH>..<HASH> 100644
--- a/test/ReadabilityTest.php
+++ b/test/ReadabilityTest.php
@@ -115,6 +115,6 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
$parser = new Readability(new Configuration());
$this->expectException(ParseException::class);
$this->expectExceptionMessage('Could not parse text.');
- $parser->parse('<html><body><p>hello</p></body></html>');
+ $parser->parse('<html><body><p></p></body></html>');
}
}
|
Fix "unable to parse" test case
|
diff --git a/db/doc.go b/db/doc.go
index <HASH>..<HASH> 100644
--- a/db/doc.go
+++ b/db/doc.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package db defines common Data Broker types, and it the parent package
-// containing Data Broker client implementations for various key-value and
-// SQL data stores.
+// Package db defines the common Data Broker types, and it is the parent
+// package for Data Broker client implementations for various key-value
+// and SQL data stores.
package db
diff --git a/httpmux/doc.go b/httpmux/doc.go
index <HASH>..<HASH> 100644
--- a/httpmux/doc.go
+++ b/httpmux/doc.go
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package httpmux provides a plugin that allows app plugins to
-// register and afterwords handle http requests (usually REST based).
+// Package httpmux provides an HTTP server to app plugins, where a plugin
+// can register at specified URLs one or more HTTP request handlers that
+// will handle HTTP requests at run time.
package httpmux
|
Editorial changes to docs.go
|
diff --git a/test/map/NearCachedMapStressTest.js b/test/map/NearCachedMapStressTest.js
index <HASH>..<HASH> 100644
--- a/test/map/NearCachedMapStressTest.js
+++ b/test/map/NearCachedMapStressTest.js
@@ -57,7 +57,7 @@ describe('NearCachedMapStress', function () {
}
it('stress test with put, get and remove', function (done) {
- this.timeout(20000);
+ this.timeout(120000);
var map = client1.getMap(mapName);
(function innerOperation() {
if (completedOperations >= totalNumOperations) {
|
increases timeout for near cache stress test
|
diff --git a/modules/social_features/social_group/src/Controller/SocialGroupController.php b/modules/social_features/social_group/src/Controller/SocialGroupController.php
index <HASH>..<HASH> 100644
--- a/modules/social_features/social_group/src/Controller/SocialGroupController.php
+++ b/modules/social_features/social_group/src/Controller/SocialGroupController.php
@@ -3,6 +3,7 @@
namespace Drupal\social_group\Controller;
use Drupal\Core\Controller\ControllerBase;
+use Drupal\group\Entity\Group;
/**
* Returns responses for Social Group routes.
@@ -21,15 +22,11 @@ class SocialGroupController extends ControllerBase {
* The page title.
*/
public function groupMembersTitle($group) {
- if (is_object($group)) {
- $group_label = $group->label();
+ // If it's not a group then it's a gid.
+ if (!$group instanceof Group) {
+ $group = Group::load($group);
}
- else {
- $storage = \Drupal::entityTypeManager()->getStorage('group');
- $group_entity = $storage->load($group);
- $group_label = empty($group_entity) ? 'group' : $group_entity->label();
- }
- return $this->t('Members of @name', ['@name' => $group_label]);
+ return $this->t('Members of @name', ['@name' => $group->label()]);
}
/**
|
SHN-<I> by jochemvn: Simplify function
|
diff --git a/immutable-history/src/Controller/ChangeLogListController.php b/immutable-history/src/Controller/ChangeLogListController.php
index <HASH>..<HASH> 100644
--- a/immutable-history/src/Controller/ChangeLogListController.php
+++ b/immutable-history/src/Controller/ChangeLogListController.php
@@ -71,7 +71,8 @@ class ChangeLogListController implements MiddlewareInterface
$humanReadableEvents = $this->getHumanReadableChangeLogByDateRange->__invoke($greaterThanYear, $lessThanYear);
$description = 'Content change log events for ' . $days . ' days'
- . ' from ' . $greaterThanYear->format('c') . ' to ' . $lessThanYear->format('c');
+ . ' from ' . $greaterThanYear->format('c') . ' to ' . $lessThanYear->format('c')
+ . '. Text in parentheses is from current lookups and is not guaranteed to be historically accurate.';
$contentType = isset($queryParams['content-type'])
? html_entity_decode($queryParams['content-type'])
|
work on immutable history proof of concept by cleaning up code
|
diff --git a/fake-timers.js b/fake-timers.js
index <HASH>..<HASH> 100644
--- a/fake-timers.js
+++ b/fake-timers.js
@@ -105,7 +105,6 @@ module.exports = function every(obj, fn) {
var pass = true;
try {
- /* eslint-disable-next-line local-rules/no-prototype-methods */
obj.forEach(function() {
if (!fn.apply(this, arguments)) {
// Throwing an error is the only way to break `forEach`
@@ -205,7 +204,6 @@ module.exports = copyPrototype(Array.prototype);
var call = Function.call;
module.exports = function copyPrototypeMethods(prototype) {
- /* eslint-disable local-rules/no-prototype-methods */
return Object.getOwnPropertyNames(prototype).reduce(function(result, name) {
// ignore size because it throws from Map
if (
@@ -283,7 +281,6 @@ module.exports = function typeOf(value) {
function valueToString(value) {
if (value && value.toString) {
- /* eslint-disable-next-line local-rules/no-prototype-methods */
return value.toString();
}
return String(value);
|
Remove misleading comment
This repository doesn't use the `no-prototype-methods` rule that is
managed with `local-rules` plugin, so the comments make no sense.
ESLint should really throw an error here...
|
diff --git a/core/lib/engine_util.js b/core/lib/engine_util.js
index <HASH>..<HASH> 100644
--- a/core/lib/engine_util.js
+++ b/core/lib/engine_util.js
@@ -213,6 +213,21 @@ function renderVariables (str, vars) {
let rxmatch;
let result = str.substring(0, str.length);
+
+ // Special case for handling integer/boolean/object substitution:
+ //
+ // Does the template string contain one variable and nothing else?
+ // e.g.: "{{ myvar }" or "{{ myvar }", but NOT " {{ myvar }"
+ // If so, we treat it as a special case.
+ const matches = str.match(RX);
+ if (matches && matches.length === 1) {
+ if (matches[0] === str) {
+ // there's nothing else in the template but the variable
+ const varName = str.replace(/{/g, '').replace(/}/g, '').trim();
+ return vars[varName] || '';
+ }
+ }
+
while (result.search(RX) > -1) {
let templateStr = result.match(RX)[0];
const varName = templateStr.replace(/{/g, '').replace(/}/g, '').trim();
|
fix: Using a template with exactly one variable keeps its type
|
diff --git a/pymatgen/electronic_structure/tests/test_plotter.py b/pymatgen/electronic_structure/tests/test_plotter.py
index <HASH>..<HASH> 100644
--- a/pymatgen/electronic_structure/tests/test_plotter.py
+++ b/pymatgen/electronic_structure/tests/test_plotter.py
@@ -190,8 +190,13 @@ class BoltztrapPlotterTest(unittest.TestCase):
os.path.join(test_dir, "boltztrap/transp/"))
plotter = BoltztrapPlotter(bz)
plotter.plot_seebeck_eff_mass_mu()
- plotter.plot_seebeck_temp()
- plotter.plot_seebeck_dop()
+
+ # TODO: These two tests fail. Whoever is responsible for the
+ # BoltztrapPlotter needs to fix these. The fact that there are not tests
+ # for the plotter is atrocious. I will reject all future additions to
+ # the plotter until these are fixed.
+ # plotter.plot_seebeck_temp()
+ # plotter.plot_seebeck_dop()
plotter.plot_complexity_factor_mu()
plotter.plot_conductivity_dop()
|
Comment out tests with an angry message at the person who coded the
BzTPlotter.
|
diff --git a/src/javascript/xhr/XMLHttpRequest.js b/src/javascript/xhr/XMLHttpRequest.js
index <HASH>..<HASH> 100644
--- a/src/javascript/xhr/XMLHttpRequest.js
+++ b/src/javascript/xhr/XMLHttpRequest.js
@@ -913,6 +913,7 @@ define("moxie/xhr/XMLHttpRequest", [
_p('responseText', _xhr.responseText);
_p('responseXML', _getDocument(_xhr));
_p('response', (_p('responseType') === 'document' ? _p('responseXML') : _p('responseText')));
+ _responseHeaders = _xhr.getAllResponseHeaders();
self.dispatchEvent('load');
}
|
XHR: Populate response headers in native mode as well.
|
diff --git a/docs/src/vendor/doc-components/editor/editor.js b/docs/src/vendor/doc-components/editor/editor.js
index <HASH>..<HASH> 100644
--- a/docs/src/vendor/doc-components/editor/editor.js
+++ b/docs/src/vendor/doc-components/editor/editor.js
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+import _ from 'lodash';
let CodeMirror;
if (typeof document !== 'undefined') {
@@ -25,6 +26,12 @@ class Editor extends React.Component {
theme: 'oceanic-next',
};
+ constructor(props) {
+ super(props);
+
+ this.debouncedOnChange = _.debounce(props.onChange, 500);
+ }
+
componentDidMount() {
if (!CodeMirror) {
return;
@@ -51,15 +58,10 @@ class Editor extends React.Component {
handleChange = () => {
if (!this.props.readOnly && this.props.onChange) {
- this.props.onChange(this.editor.getValue());
+ this.debouncedOnChange(this.editor.getValue());
}
};
- setCode(code) {
- this.editor.getDoc().setValue(code);
- this.handleChange();
- }
-
render() {
const { className, style } = this.props;
|
Debounce updates to the example code block
|
diff --git a/salt/modules/zfs.py b/salt/modules/zfs.py
index <HASH>..<HASH> 100644
--- a/salt/modules/zfs.py
+++ b/salt/modules/zfs.py
@@ -39,20 +39,22 @@ def _available_commands():
if not zfs_path:
return False
- _return = {}
+ ret = {}
# Note that we append '|| :' as a unix hack to force return code to be 0.
- res = salt_cmd.run_all('{0} help || :'.format(zfs_path))
+ res = salt_cmd.run_stderr(
+ '{0} help || :'.format(zfs_path), output_loglevel='debug'
+ )
# This bit is dependent on specific output from `zfs help` - any major changes
# in how this works upstream will require a change.
- for line in res['stderr'].splitlines():
+ for line in res.splitlines():
if re.match(' [a-zA-Z]', line):
cmds = line.split(' ')[0].split('|')
doc = ' '.join(line.split(' ')[1:])
for cmd in [cmd.strip() for cmd in cmds]:
- if cmd not in _return:
- _return[cmd] = doc
- return _return
+ if cmd not in ret:
+ ret[cmd] = doc
+ return ret
def _exit_status(retcode):
|
Log 'zfs help' output at debug
This suppresses the output from this command unless the minion is
running in debug mode.
|
diff --git a/lib/sass/environment.rb b/lib/sass/environment.rb
index <HASH>..<HASH> 100644
--- a/lib/sass/environment.rb
+++ b/lib/sass/environment.rb
@@ -68,7 +68,7 @@ module Sass
# Pop a stack frame from the mixin/include stack.
def pop_frame
- stack.pop if stack.last[:prepared]
+ stack.pop if stack.last && stack.last[:prepared]
stack.pop
end
|
[Sass] Don't raise odd errors about #[] for stack overflows.
|
diff --git a/src/ol-ext/format.js b/src/ol-ext/format.js
index <HASH>..<HASH> 100644
--- a/src/ol-ext/format.js
+++ b/src/ol-ext/format.js
@@ -1,7 +1,9 @@
import BaseGeoJSON from 'ol/format/geojson'
import TopoJSON from 'ol/format/topojson'
import { isEmpty } from '../util/minilo'
+import { EPSG_4326 } from './consts'
import { createCircularPolygon } from './geom'
+import { transformPoint } from './proj'
import { isCircle } from './util'
/**
@@ -23,7 +25,15 @@ export function createTopoJsonFmt (options) {
class GeoJSON extends BaseGeoJSON {
writeGeometryObject (geometry, options) {
if (isCircle(geometry)) {
- geometry = createCircularPolygon(geometry.getCenter(), geometry.getRadius())
+ geometry = createCircularPolygon(
+ transformPoint(
+ geometry.getCenter(),
+ options.featureProjection || this.defaultFeatureProjection,
+ EPSG_4326,
+ ),
+ geometry.getRadius(),
+ )
+ options.featureProjection = EPSG_4326
}
return super.writeGeometryObject(geometry, options)
}
|
custom geojson fmt: replace projection after circle to polygon conversion
|
diff --git a/src/main/java/com/axibase/tsd/driver/jdbc/DriverConstants.java b/src/main/java/com/axibase/tsd/driver/jdbc/DriverConstants.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/axibase/tsd/driver/jdbc/DriverConstants.java
+++ b/src/main/java/com/axibase/tsd/driver/jdbc/DriverConstants.java
@@ -38,7 +38,7 @@ public final class DriverConstants {
public static final String TABLES_PARAM_NAME = "tables";
public static final String DEFAULT_TABLES_VALUE = null;
public static final String EXPAND_TAGS_PARAM_NAME = "expandTags";
- public static final boolean DEFAULT_EXPAND_TAGS_VALUE = true;
+ public static final boolean DEFAULT_EXPAND_TAGS_VALUE = false;
public static final String META_COLUMNS_PARAM_NAME = "metaColumns";
public static final boolean DEFAULT_META_COLUMNS_VALUE = false;
public static final String ASSIGN_INNER_COLUMN_NAMES_PARAM = "assignColumnNames";
|
set expandTags value to false by default
|
diff --git a/svtyper/singlesample.py b/svtyper/singlesample.py
index <HASH>..<HASH> 100644
--- a/svtyper/singlesample.py
+++ b/svtyper/singlesample.py
@@ -711,6 +711,7 @@ def genotype_parallel(src_vcf, out_vcf, sample, z, split_slop, min_aligned, sum_
# 1st pass through input vcf -- collect all the relevant breakpoints
logit("Collecting breakpoints")
breakpoints = collect_breakpoints(src_vcf)
+ logit("Collected {} breakpoints".format(len(breakpoints)))
logit("Collecting regions")
regions = [ get_breakpoint_regions(b, sample, z) for b in breakpoints ]
logit("Batch breakpoints into groups of {}".format(breakpoint_batch_size))
|
+ add message on how many breakpoints we're going to process
|
diff --git a/lib/rack/www.rb b/lib/rack/www.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/www.rb
+++ b/lib/rack/www.rb
@@ -15,12 +15,8 @@ module Rack
host = URI(req.host).to_s
if (already_www?(host) && @www == true) || (!already_www?(host) && @www == false)
[status, headers, body]
- elsif !already_www?(host) && @www == true
- url = URI(req.url).scheme + "://www." + host + URI(req.path).to_s
- headers = headers.merge('Location' => url)
- [301, headers, body]
else
- url = URI(req.url).scheme + "://" + host.gsub("www.", "") + URI(req.path).to_s
+ url = prepare_url(req)
headers = headers.merge('Location' => url)
[301, headers, body]
end
@@ -30,5 +26,17 @@ module Rack
def already_www?(host)
host.downcase =~ /^(www.)/
end
+
+ def prepare_url(req)
+ scheme = URI(req.url).scheme
+ host = URI(req.host).to_s.gsub(/^(www.)/, "")
+ path = URI(req.path).to_s
+ if @www == true
+ host = "://www." + host
+ else
+ host = "://" + host
+ end
+ scheme + host + path
+ end
end
end
|
Removed duplicated code, refactored a bit
|
diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js
index <HASH>..<HASH> 100644
--- a/lib/OpenLayers/Layer/Vector.js
+++ b/lib/OpenLayers/Layer/Vector.js
@@ -271,6 +271,10 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
if (!dragging) {
this.renderer.root.style.visibility = "hidden";
+ // force a reflow on gecko based browsers to actually hide the svg
+ if (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) {
+ this.div.scrollLeft = this.div.scrollLeft;
+ }
this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + "px";
this.div.style.top = -parseInt(this.map.layerContainerDiv.style.top) + "px";
|
"svg flicker at end of pan". Gecko-based browsers might not reflow svg if only style properties of dom elements are changed. Fixed by setting the scrollLeft property. r=pgiraud,tschaub (closes #<I>)
git-svn-id: <URL>
|
diff --git a/src/js/chosen.js b/src/js/chosen.js
index <HASH>..<HASH> 100644
--- a/src/js/chosen.js
+++ b/src/js/chosen.js
@@ -1113,12 +1113,18 @@ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
};
Chosen.prototype.results_reset = function() {
+ var oldValue = this.form_field_jq.val();
this.reset_single_select_options();
this.form_field.options[0].selected = true;
this.single_set_selected_text();
this.show_search_field_default();
this.results_reset_cleanup();
- this.form_field_jq.trigger("change");
+ var newValue = this.form_field_jq.val();
+ var changeData = {selected: newValue};
+ if (oldValue !== newValue && !newValue.length) {
+ changeData.deselected = oldValue;
+ }
+ this.form_field_jq.trigger("change", changeData);
if(this.active_field) {
return this.results_hide();
}
|
* add deselected param to change event for chosen single select control.
|
diff --git a/internal/states/statefile/version4.go b/internal/states/statefile/version4.go
index <HASH>..<HASH> 100644
--- a/internal/states/statefile/version4.go
+++ b/internal/states/statefile/version4.go
@@ -539,7 +539,7 @@ type instanceObjectStateV4 struct {
SchemaVersion uint64 `json:"schema_version"`
AttributesRaw json.RawMessage `json:"attributes,omitempty"`
AttributesFlat map[string]string `json:"attributes_flat,omitempty"`
- AttributeSensitivePaths json.RawMessage `json:"sensitive_attributes,omitempty,"`
+ AttributeSensitivePaths json.RawMessage `json:"sensitive_attributes,omitempty"`
PrivateRaw []byte `json:"private,omitempty"`
|
fix typo in struct tag (#<I>)
typo found by [`revive`](<URL>)
|
diff --git a/Builder/FormContractor.php b/Builder/FormContractor.php
index <HASH>..<HASH> 100644
--- a/Builder/FormContractor.php
+++ b/Builder/FormContractor.php
@@ -104,6 +104,7 @@ class FormContractor implements FormContractorInterface
'Sonata\AdminBundle\Form\Type\ModelType',
'sonata_type_model_list',
'Sonata\AdminBundle\Form\Type\ModelTypeList',
+ 'Sonata\AdminBundle\Form\Type\ModelListType',
'sonata_type_model_hidden',
'Sonata\AdminBundle\Form\Type\ModelHiddenType',
'sonata_type_model_autocomplete',
|
Fixed FormContractor for new ModelListType
|
diff --git a/lib/dotenv.rb b/lib/dotenv.rb
index <HASH>..<HASH> 100644
--- a/lib/dotenv.rb
+++ b/lib/dotenv.rb
@@ -16,8 +16,7 @@ module Dotenv
with(*filenames) { |f| Environment.new(f).apply! if File.exist?(f) }
end
-protected
-
+ # Internal: Helper to expand list of filenames.
def self.with(*filenames, &block)
filenames << '.env' if filenames.empty?
|
Use comment instead of "protected" to denote internal method
|
diff --git a/pysat/__init__.py b/pysat/__init__.py
index <HASH>..<HASH> 100644
--- a/pysat/__init__.py
+++ b/pysat/__init__.py
@@ -2,6 +2,7 @@
from __future__ import print_function
from __future__ import absolute_import
import os
+import pysatCDF
# get home directory
home_dir = os.path.expanduser('~')
|
Testing build of pysatCDF on travis
|
diff --git a/pandas/tests/frame/test_alter_axes.py b/pandas/tests/frame/test_alter_axes.py
index <HASH>..<HASH> 100644
--- a/pandas/tests/frame/test_alter_axes.py
+++ b/pandas/tests/frame/test_alter_axes.py
@@ -234,9 +234,16 @@ class TestDataFrameAlterAxes:
# need to adapt first drop for case that both keys are 'A' --
# cannot drop the same column twice;
- # use "is" because == would give ambiguous Boolean error for containers
+ # plain == would give ambiguous Boolean error for containers
first_drop = (
- False if (keys[0] is "A" and keys[1] is "A") else drop # noqa: F632
+ False
+ if (
+ isinstance(keys[0], str)
+ and keys[0] == "A"
+ and isinstance(keys[1], str)
+ and keys[1] == "A"
+ )
+ else drop
)
# to test against already-tested behaviour, we add sequentially,
# hence second append always True; must wrap keys in list, otherwise
|
TST: Don't use 'is' on strings to avoid SyntaxWarning (#<I>)
|
diff --git a/lib/pagelib.php b/lib/pagelib.php
index <HASH>..<HASH> 100644
--- a/lib/pagelib.php
+++ b/lib/pagelib.php
@@ -49,9 +49,15 @@ function page_create_object($type, $id = NULL) {
*/
function page_map_class($type, $classname = NULL) {
- static $mappings = array(
- MOODLE_PAGE_COURSE => 'page_course'
- );
+ static $mappings = NULL;
+
+ if($mappings === NULL) {
+ $mappings = array(
+ MOODLE_PAGE_COURSE => 'page_course'
+ );
+ print_object('Debug info - initial mappings:');
+ var_dump($mappings);
+ }
if(!empty($type) && !empty($classname)) {
$mappings[$type] = $classname;
|
A small change for the static initialization in page_map_class,
and more debug added just before init is done.
|
diff --git a/lib/zookeeper/common.rb b/lib/zookeeper/common.rb
index <HASH>..<HASH> 100644
--- a/lib/zookeeper/common.rb
+++ b/lib/zookeeper/common.rb
@@ -37,7 +37,7 @@ protected
def get_watcher(req_id)
@req_mutex.synchronize {
- req_id != ZKRB_GLOBAL_CB_REQ ? @watcher_reqs.delete(req_id) : @watcher_reqs[req_id]
+ (req_id == ZKRB_GLOBAL_CB_REQ) ? @watcher_reqs[req_id] : @watcher_reqs.delete(req_id)
}
end
|
improve logic in ternary to read more sanely
|
diff --git a/docs_src/assets/js/src/application.js b/docs_src/assets/js/src/application.js
index <HASH>..<HASH> 100644
--- a/docs_src/assets/js/src/application.js
+++ b/docs_src/assets/js/src/application.js
@@ -134,7 +134,9 @@
htmlBridge
.data('placement', 'top')
.attr('title', 'Copy to clipboard')
- .tooltip()
+ .tooltip();
+
+ htmlBridge.find('object').text("flash object for zero clipboard");
})
// Copy to clipboard
|
Add text to copy object to resovle error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.