diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/main/docs/resources/js/multi-language-sample.js b/src/main/docs/resources/js/multi-language-sample.js
index <HASH>..<HASH> 100644
--- a/src/main/docs/resources/js/multi-language-sample.js
+++ b/src/main/docs/resources/js/multi-language-sample.js
@@ -171,7 +171,23 @@ function createCopyToClipboardElement() {
return copyToClipboardDiv;
}
+function postProcessCodeCallouts() {
+ var calloutClass = "conum";
+ var matches = document.querySelectorAll("b."+calloutClass);
+ if (matches != null) {
+ matches.forEach(function(item) {
+ var number = item.textContent.replace("(", "").replace(")", "");
+ var i = document.createElement('i');
+ i.setAttribute("class","conum");
+ i.setAttribute("data-value", number);
+ item.parentNode.insertBefore(i, item);
+ item.removeAttribute("class");
+ });
+ }
+}
+
document.addEventListener("DOMContentLoaded", function(event) {
addCopyToClipboardButtons();
postProcessCodeBlocks();
+ postProcessCodeCallouts();
});
\ No newline at end of file
|
Fix code callouts not being highlighted
|
diff --git a/lib/ronin/installation.rb b/lib/ronin/installation.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/installation.rb
+++ b/lib/ronin/installation.rb
@@ -118,7 +118,7 @@ module Ronin
# @since 0.4.0
#
def Installation.each_file_in(directory,&block)
- directory = File.join(File.expand_path(directory),'')
+ directory = File.join(directory,'')
Installation.each_file do |file,gem|
if file[0..directory.length] == directory
|
Don't expand the directory path given to Installation.each_file_in.
|
diff --git a/test/test_capture_output.py b/test/test_capture_output.py
index <HASH>..<HASH> 100644
--- a/test/test_capture_output.py
+++ b/test/test_capture_output.py
@@ -1,13 +1,25 @@
+import pytest
+
from noodles import run_process, schedule, serial
+try:
+ import msgpack # noqa
+ has_msgpack = True
+except ImportError:
+ has_msgpack = False
@schedule
def writes_to_stdout():
print("Hello Noodles!")
return 42
-
+@pytest.mark.skipif(not has_msgpack, reason="msgpack needed.")
def test_capture_output():
a = writes_to_stdout()
result = run_process(a, n_processes=1, registry=serial.base, use_msgpack=True)
assert result == 42
+
+def test_capture_output_nomsgpack():
+ a = writes_to_stdout()
+ result = run_process(a, n_processes=1, registry=serial.base, use_msgpack=False)
+ assert result == 42
|
add skiptest when msgpack not installed and test without it
|
diff --git a/anharmonic/phonon3/__init__.py b/anharmonic/phonon3/__init__.py
index <HASH>..<HASH> 100644
--- a/anharmonic/phonon3/__init__.py
+++ b/anharmonic/phonon3/__init__.py
@@ -787,22 +787,3 @@ class Phono3pyJointDos:
temperatures=self._temperatures,
filename=self._filename,
is_nosym=self._is_nosym)
-
-def get_gruneisen_parameters(fc2,
- fc3,
- supercell,
- primitive,
- nac_params=None,
- nac_q_direction=None,
- ion_clamped=False,
- factor=None,
- symprec=1e-5):
- return Gruneisen(fc2,
- fc3,
- supercell,
- primitive,
- nac_params=nac_params,
- nac_q_direction=nac_q_direction,
- ion_clamped=ion_clamped,
- factor=factor,
- symprec=symprec)
|
get_gruneisen_parameters is moved to newly created gruneisen.py.
|
diff --git a/troposphere/imagebuilder.py b/troposphere/imagebuilder.py
index <HASH>..<HASH> 100644
--- a/troposphere/imagebuilder.py
+++ b/troposphere/imagebuilder.py
@@ -144,3 +144,15 @@ class Component(AWSObject):
'Uri': (basestring, False),
'Version': (basestring, True),
}
+
+
+class Image(AWSObject):
+ resource_type = "AWS::ImageBuilder::Image"
+
+ props = {
+ 'DistributionConfigurationArn': (basestring, False),
+ 'ImageRecipeArn': (basestring, True),
+ 'ImageTestsConfiguration': (ImageTestsConfiguration, True),
+ 'InfrastructureConfigurationArn': (basestring, True),
+ 'Tags': (json_checker, False),
+ }
|
Adding AWS::ImageBuilder::Image object, per May 7, <I> update
|
diff --git a/src/Matcher.php b/src/Matcher.php
index <HASH>..<HASH> 100644
--- a/src/Matcher.php
+++ b/src/Matcher.php
@@ -7,7 +7,7 @@ class Matcher
private static $rules = [
"/^(true|false)$/i" => '_parseBooleanConstant',
"/^(['\"])(?:(?!\\1).)*\\1$/" => '_parseStringConstant',
- "/^[a-zA-Z+]$/" => '_parseIdentifier',
+ "/^[a-zA-Z]+$/" => '_parseIdentifier',
"/^_$/" => '_parseWildcard',
"/^\\[.*\\]$/" => '_parseArray',
];
diff --git a/tests/PHPFunctional/PatternMatching/Matcher.php b/tests/PHPFunctional/PatternMatching/Matcher.php
index <HASH>..<HASH> 100644
--- a/tests/PHPFunctional/PatternMatching/Matcher.php
+++ b/tests/PHPFunctional/PatternMatching/Matcher.php
@@ -72,6 +72,7 @@ class Matcher extends atoum
$function = function($a) { return $a; };
$this->variable(M::match($value, ['a' => $function]))->isEqualTo($value);
+ $this->variable(M::match($value, ['longIdentifier' => $function]))->isEqualTo($value);
}
public function identifierDataProvider()
|
fix: identifiers can be more than one char long
|
diff --git a/src/utils/reducer-store.js b/src/utils/reducer-store.js
index <HASH>..<HASH> 100644
--- a/src/utils/reducer-store.js
+++ b/src/utils/reducer-store.js
@@ -27,11 +27,13 @@ class ReducerStore {
* name lookup. If no name is found then it takes `sum` as the default reducer.
* @return {ReducerStore} Returns instance of the singleton store in page.
*/
- defaultReducer (reducer) {
- if (!reducer) {
+ defaultReducer (...params) {
+ if (!params.length) {
return this.store.get('defReducer');
}
+ let reducer = params[0];
+
if (typeof reducer === 'function') {
this.store.set('defReducer', reducer);
} else {
|
Check params length in defaultReducer function to identify getter and setter behaviour
|
diff --git a/lib/active_admin/application.rb b/lib/active_admin/application.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin/application.rb
+++ b/lib/active_admin/application.rb
@@ -131,7 +131,6 @@ module ActiveAdmin
# to allow for changes without having to restart the server.
def unload!
namespaces.values.each{|namespace| namespace.unload! }
- #self.namespaces = {}
@@loaded = false
end
diff --git a/lib/active_admin/comments.rb b/lib/active_admin/comments.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin/comments.rb
+++ b/lib/active_admin/comments.rb
@@ -18,9 +18,8 @@ ActiveAdmin::Resource.send :include, ActiveAdmin::Comments::ResourceHelper
ActiveAdmin.application.view_factory.show_page.send :include, ActiveAdmin::Comments::ShowPageHelper
# Generate a Comment resource when namespaces are registered
-ActiveAdmin::Event.subscribe ActiveAdmin::Application::LoadEvent,
- ActiveAdmin::Namespace::RegisterEvent do |_|
- ActiveAdmin.application.namespaces.values.each do |namespace|
+ActiveAdmin::Event.subscribe ActiveAdmin::Application::LoadEvent do |app|
+ app.namespaces.values.each do |namespace|
if namespace.comments?
namespace.register ActiveAdmin::Comment, :as => 'Comment' do
actions :index, :show, :create
|
Reload the comments when the application reloads
|
diff --git a/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java b/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java
index <HASH>..<HASH> 100644
--- a/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java
+++ b/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/web/WebUtils.java
@@ -25,6 +25,7 @@ import javax.servlet.http.HttpServletRequestWrapper;
import com.ibm.websphere.ras.Tr;
import com.ibm.websphere.ras.TraceComponent;
import com.ibm.websphere.ras.annotation.Trivial;
+import com.ibm.ws.ffdc.annotation.FFDCIgnore;
import com.ibm.ws.security.common.TraceConstants;
import com.ibm.ws.webcontainer.internalRuntimeExport.srt.IPrivateRequestAttributes;
|
Update WebUtils to resolve conflict
|
diff --git a/source/OrderProcessor.php b/source/OrderProcessor.php
index <HASH>..<HASH> 100644
--- a/source/OrderProcessor.php
+++ b/source/OrderProcessor.php
@@ -112,14 +112,17 @@ class OrderProcessor
* @param array $workflowConfig Payment workflow config
* @param OrderInterface $order Order for processing
* @param array $callbackData Paynet callback data (optional)
- *
- * @return Response Current workflow query response
*/
public function executeWorkflow( $workflowName,
array $workflowConfig,
OrderInterface $order,
array $callbackData = array())
{
+ if ($order->getState() == OrderInterface::STATE_END)
+ {
+ return;
+ }
+
try
{
$response = $this->getWorkflow($workflowName, $workflowConfig)
@@ -146,8 +149,6 @@ class OrderProcessor
$this->fireEvent(self::EVENT_REDIRECT_RECEIVED, $order, $response);
break;
}
-
- return $response;
}
/**
|
ExecuteWorkflow now returns void but check the status of order to avoid exception throwing if order is ended.
|
diff --git a/lib/Doctrine/ODM/PHPCR/UnitOfWork.php b/lib/Doctrine/ODM/PHPCR/UnitOfWork.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/ODM/PHPCR/UnitOfWork.php
+++ b/lib/Doctrine/ODM/PHPCR/UnitOfWork.php
@@ -1957,6 +1957,7 @@ class UnitOfWork
empty($this->scheduledMoves)) {
$this->invokeGlobalEvent(Event::onFlush, new ManagerEventArgs($this->dm));
$this->invokeGlobalEvent(Event::postFlush, new ManagerEventArgs($this->dm));
+ $this->changesetComputed = array();
// @deprecated This is to maintain BC with the old behavior, where users may call
// flush instead of PHPCR\SessionInterface#save
|
Fixed early exit changeset computation
- For updates to be taken into account (e.g. after binding translations)
the changeset needs to be reset when exiting the commit function when
there is nothing to do.
- Otherwise after calling flush, the changeset is still computed and the
next flush that is called envokes "computeChangeset" but as there are
still changesets from the previous flush, it doesn't bother
recalulating them.
- Before the "early exit" code flush would always reset the changeset.
|
diff --git a/lib/recaptcha.rb b/lib/recaptcha.rb
index <HASH>..<HASH> 100644
--- a/lib/recaptcha.rb
+++ b/lib/recaptcha.rb
@@ -33,7 +33,7 @@ module Ambethia
:height => options[:iframe_height] ||= 300,
:width => options[:iframe_width] ||= 500,
:frameborder => 0) {}; xhtml.br
- xhtml.textarea(:name => "recaptcha_challenge_field", :rows => 3, :cols => 40) {}
+ xhtml.textarea(nil, :name => "recaptcha_challenge_field", :rows => 3, :cols => 40)
xhtml.input :name => "recaptcha_response_field",
:type => "hidden", :value => "manual_challenge"
end
|
Fixed a usability bug for users without javascript. Since the indent option was set, and the block form of the textarea method was used, and textareas treat anything between <textarea> and </textarea> as something that goes inside the textarea, it was adding two spaces inside the textarea. If you didn't notice those, which I didn't the first time I used it, then you'll get an invalid CAPTCHa response.
|
diff --git a/views/js/layout/actions.js b/views/js/layout/actions.js
index <HASH>..<HASH> 100644
--- a/views/js/layout/actions.js
+++ b/views/js/layout/actions.js
@@ -311,6 +311,14 @@ define([
action = _.find(actions, {name : actionName});
}
return action;
+ },
+
+ /**
+ * Returns the current ResourceContext so can be used outside
+ * the context of common actions executions
+ */
+ getResourceContext: function() {
+ return resourceContext;
}
});
|
chore(action-manager): add method to get resourceContext
|
diff --git a/openquake/hazardlib/geo/surface/multi.py b/openquake/hazardlib/geo/surface/multi.py
index <HASH>..<HASH> 100755
--- a/openquake/hazardlib/geo/surface/multi.py
+++ b/openquake/hazardlib/geo/surface/multi.py
@@ -27,9 +27,9 @@ from openquake.hazardlib.geo.surface.base import (BaseSurface,
downsample_trace)
from openquake.hazardlib.geo.mesh import Mesh
from openquake.hazardlib.geo import utils
-from openquake.hazardlib.geo.surface import (PlanarSurface,
- SimpleFaultSurface,
- ComplexFaultSurface)
+from openquake.hazardlib.geo.surface import (
+ PlanarSurface, SimpleFaultSurface, ComplexFaultSurface)
+from openquake.hazardlib.geo.surface.gridded import GriddedSurface
class MultiSurface(BaseSurface):
@@ -131,7 +131,9 @@ class MultiSurface(BaseSurface):
"""
edges = []
for surface in self.surfaces:
- if isinstance(surface, PlanarSurface):
+ if isinstance(surface, GriddedSurface):
+ return edges.append(surface.mesh)
+ elif isinstance(surface, PlanarSurface):
# Top edge determined from two end points
edge = []
for pnt in [surface.top_left, surface.top_right]:
|
Fixed management of GriddedSurface in MultiSurface
|
diff --git a/extension/rsb/com/src/main/java/de/citec/jul/extension/rsb/com/RPCHelper.java b/extension/rsb/com/src/main/java/de/citec/jul/extension/rsb/com/RPCHelper.java
index <HASH>..<HASH> 100644
--- a/extension/rsb/com/src/main/java/de/citec/jul/extension/rsb/com/RPCHelper.java
+++ b/extension/rsb/com/src/main/java/de/citec/jul/extension/rsb/com/RPCHelper.java
@@ -78,10 +78,18 @@ public class RPCHelper {
}
}
+ public static <RETURN> Future<RETURN> callRemoteMethod(final Class<? extends RETURN> returnClass, final RSBRemoteService remote) throws CouldNotPerformException {
+ return (Future<RETURN>) callRemoteMethod(remote);
+ }
+
public static <RETURN> Future<RETURN> callRemoteMethod(final Object argument, final Class<? extends RETURN> returnClass, final RSBRemoteService remote) throws CouldNotPerformException {
return (Future<RETURN>) callRemoteMethod(argument, remote);
}
+ public static Future callRemoteMethod(final RSBRemoteService remote) throws CouldNotPerformException {
+ return callRemoteMethod(null, remote);
+ }
+
public static Future callRemoteMethod(final Object argument, final RSBRemoteService remote) throws CouldNotPerformException {
try {
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
|
Fix read only interface for all registries.
|
diff --git a/src/Illuminate/Support/Testing/Fakes/BusFake.php b/src/Illuminate/Support/Testing/Fakes/BusFake.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Support/Testing/Fakes/BusFake.php
+++ b/src/Illuminate/Support/Testing/Fakes/BusFake.php
@@ -200,6 +200,8 @@ class BusFake implements QueueingDispatcher
if ($command instanceof Closure) {
[$command, $callback] = [$this->firstClosureParameterType($command), $command];
+ } elseif (! is_string($command)) {
+ $command = get_class($command);
}
PHPUnit::assertTrue(
|
accept a command in object form in Bus::assertChained (#<I>)
|
diff --git a/family.php b/family.php
index <HASH>..<HASH> 100644
--- a/family.php
+++ b/family.php
@@ -85,7 +85,7 @@ if ($controller->record && $controller->record->canShow()) {
<table id="family-table" align="center" width="95%">
<tr valign="top">
- <td valign="top" style="width: <?php echo $pbwidth + 30; ?>px;"><!--//List of children//-->
+ <td valign="top" style="width: <?php echo Theme::theme()->parameter('chart-box-x') + 30; ?>px;"><!--//List of children//-->
<?php print_family_children($controller->record); ?>
</td>
<td> <!--//parents pedigree chart and Family Details//-->
|
Fix <I> - undefined variable in family.php
|
diff --git a/channel.js b/channel.js
index <HASH>..<HASH> 100644
--- a/channel.js
+++ b/channel.js
@@ -122,7 +122,8 @@ function TChannel(options) {
this.emitConnectionMetrics =
typeof this.options.emitConnectionMetrics === 'boolean' ?
this.options.emitConnectionMetrics : false;
- this.choosePeerWithHeap = this.options.choosePeerWithHeap || false;
+ this.choosePeerWithHeap = typeof this.options.choosePeerWithHeap === 'boolean' ?
+ this.options.choosePeerWithHeap : true;
this.setObservePeerScoreEvents(this.options.observePeerScoreEvents);
|
channel: default choose peer with heap to true
|
diff --git a/player/player.js b/player/player.js
index <HASH>..<HASH> 100644
--- a/player/player.js
+++ b/player/player.js
@@ -68,9 +68,11 @@ $(function()
{
var input = $('#input').val();
var delim = $('#delimiter').val();
+ var header = $('#header').prop('checked');
var results = Papa.unparse(input, {
- delimiter: delim
+ delimiter: delim,
+ header: header,
});
console.log("Unparse complete!");
|
Add header to config in unparse in player.js.
|
diff --git a/salt/modules/zypper.py b/salt/modules/zypper.py
index <HASH>..<HASH> 100644
--- a/salt/modules/zypper.py
+++ b/salt/modules/zypper.py
@@ -202,7 +202,7 @@ def info_available(*names, **kwargs):
names = sorted(list(set(names)))
# Refresh db before extracting the latest package
- if kwargs.pop('refresh', True):
+ if kwargs.get('refresh', True):
refresh_db()
pkg_info = []
|
do not change kwargs in refresh while checking a value
|
diff --git a/src/Thinktomorrow/Locale/Locale.php b/src/Thinktomorrow/Locale/Locale.php
index <HASH>..<HASH> 100644
--- a/src/Thinktomorrow/Locale/Locale.php
+++ b/src/Thinktomorrow/Locale/Locale.php
@@ -44,6 +44,12 @@ class Locale
return app()->getLocale();
}
+ /**
+ * Retrieve the url slug for current or passed locale.
+ *
+ * @param null $locale
+ * @return null|string
+ */
public function getSlug($locale = null)
{
$locale = $this->validateLocale($locale) ? $locale : $this->get();
@@ -53,9 +59,17 @@ class Locale
return $locale;
}
- public function isHidden()
+ /**
+ * Check if current or passed locale is set as hidden
+ *
+ * @param null $locale
+ * @return bool
+ */
+ public function isHidden($locale = null)
{
- return ($this->hidden_locale == $this->get());
+ $locale = $this->validateLocale($locale) ? $locale : $this->get();
+
+ return ($this->hidden_locale == $locale);
}
/**
|
Allow to check if locale other than current is hidden
|
diff --git a/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java b/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java
+++ b/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java
@@ -49,6 +49,7 @@ public class JedisSentinelTest {
assertEquals("6379", masterHostAndPort.get(1));
List<Map<String, String>> slaves = j.sentinelSlaves(masterName);
+ assertEquals(1, slaves.size());
assertEquals("6379", slaves.get(0).get("master-port"));
List<? extends Object> isMasterDownByAddr = j
|
Fail if the Sentinel does not return the slave.
|
diff --git a/src/Token/AccessToken.php b/src/Token/AccessToken.php
index <HASH>..<HASH> 100644
--- a/src/Token/AccessToken.php
+++ b/src/Token/AccessToken.php
@@ -186,7 +186,7 @@ class AccessToken implements JsonSerializable
}
if ($this->expires) {
- $parameters['expires_in'] = $this->expires - time();
+ $parameters['expires'] = $this->expires;
}
return $parameters;
diff --git a/test/src/Token/AccessTokenTest.php b/test/src/Token/AccessTokenTest.php
index <HASH>..<HASH> 100644
--- a/test/src/Token/AccessTokenTest.php
+++ b/test/src/Token/AccessTokenTest.php
@@ -106,7 +106,7 @@ class AccessTokenTest extends \PHPUnit_Framework_TestCase
$options = [
'access_token' => 'mock_access_token',
'refresh_token' => 'mock_refresh_token',
- 'expires_in' => 100,
+ 'expires' => time(),
];
$token = $this->getAccessToken($options);
|
Use expires to serialize access tokens
Resolves: #<I>
See also: #<I>
|
diff --git a/cmd/common-main.go b/cmd/common-main.go
index <HASH>..<HASH> 100644
--- a/cmd/common-main.go
+++ b/cmd/common-main.go
@@ -235,7 +235,7 @@ func handleCommonEnvVars() {
// In place update is true by default if the MINIO_UPDATE is not set
// or is not set to 'off', if MINIO_UPDATE is set to 'off' then
// in-place update is off.
- globalInplaceUpdateDisabled = strings.EqualFold(env.Get(config.EnvUpdate, "off"), "off")
+ globalInplaceUpdateDisabled = strings.EqualFold(env.Get(config.EnvUpdate, "on"), "off")
// Get WORM environment variable.
if worm := env.Get(config.EnvWorm, "off"); worm != "" {
|
Remote update should be on by default (#<I>)
Fixes a regression introduced in PR #<I>
|
diff --git a/dockerclient/container.go b/dockerclient/container.go
index <HASH>..<HASH> 100644
--- a/dockerclient/container.go
+++ b/dockerclient/container.go
@@ -78,6 +78,12 @@ func (dh *DockerHost) CreateContainer(options *docker.ContainerConfig, name stri
}
}
+ imgDetails, err := dh.ImageDetails(imageId)
+ if err != nil {
+ return "", err
+ }
+ options.Env = append(options.Env, "DOCKER_IMAGE="+imgDetails.Id)
+
container := &docker.Container{}
u := dh.url() + "/containers/create"
|
added docker image info to container environment
|
diff --git a/jenkins/release.rb b/jenkins/release.rb
index <HASH>..<HASH> 100755
--- a/jenkins/release.rb
+++ b/jenkins/release.rb
@@ -285,11 +285,19 @@ class ShipIt
{:timeout => 1200, :live_stream => STDOUT}
end
+ def progress
+ if STDOUT.tty?
+ "--progress"
+ else
+ "--no-progress"
+ end
+ end
+
def upload_package(local_path, s3_path)
s3_cmd = ["s3cmd",
"-c #{options[:package_s3_config_file]}",
"put",
- "--progress",
+ progress,
"--acl-public",
local_path,
"s3://#{options[:bucket]}#{s3_path}"].join(" ")
|
only show progress if stdout is a tty
It's nice to see progess via the mixlib-shellout live stream when
running release.rb by hand, but it's a big hassle when looking at the
jenkins logs. Test if STDOUT is a tty to turn progress on or off.
|
diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go
index <HASH>..<HASH> 100644
--- a/pkg/kubelet/rkt/rkt.go
+++ b/pkg/kubelet/rkt/rkt.go
@@ -62,9 +62,9 @@ const (
RktType = "rkt"
DefaultRktAPIServiceEndpoint = "localhost:15441"
- minimumAppcVersion = "0.7.4"
- minimumRktBinVersion = "1.2.1"
- recommendedRktBinVersion = "1.2.1"
+ minimumAppcVersion = "0.8.1"
+ minimumRktBinVersion = "1.6.0"
+ recommendedRktBinVersion = "1.6.0"
minimumRktApiVersion = "1.0.0-alpha"
minimumSystemdVersion = "219"
|
Update rkt container runtime min versions
|
diff --git a/stabilizer/src/main/java/com/hazelcast/stabilizer/tests/utils/ExceptionReporter.java b/stabilizer/src/main/java/com/hazelcast/stabilizer/tests/utils/ExceptionReporter.java
index <HASH>..<HASH> 100644
--- a/stabilizer/src/main/java/com/hazelcast/stabilizer/tests/utils/ExceptionReporter.java
+++ b/stabilizer/src/main/java/com/hazelcast/stabilizer/tests/utils/ExceptionReporter.java
@@ -62,19 +62,6 @@ public class ExceptionReporter {
writeText(text, file);
}
- private static File createTmpFile() {
- //we need to write to a temp file before and then rename the file so that the worker will not see
- //a partially written failure.
- final File tmpFile;
- try {
- tmpFile = File.createTempFile("worker", "exception");
- } catch (IOException e) {
- log.severe("Failed to create temp file", e);
- return null;
- }
- return tmpFile;
- }
-
private ExceptionReporter() {
}
}
|
Removed unused method in ExceptionReporter
|
diff --git a/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js
index <HASH>..<HASH> 100644
--- a/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js
+++ b/packages/react-bootstrap-table2/test/row-selection/wrapper.test.js
@@ -68,7 +68,18 @@ describe('RowSelectionWrapper', () => {
expect(wrapper.props().onAllRowsSelect).toBeDefined();
});
- describe('when selectRow.selected is defiend', () => {
+ describe('componentWillReceiveProps', () => {
+ const nextSelected = [0];
+ const nextProps = { store: { selected: nextSelected } };
+
+ it('should update state.selectedRowKeys with next selected rows', () => {
+ wrapper.instance().componentWillReceiveProps(nextProps);
+
+ expect(wrapper.state('selectedRowKeys')).toEqual(nextSelected);
+ });
+ });
+
+ describe('when selectRow.selected is defined', () => {
beforeEach(() => {
selectRow.mode = 'checkbox';
selectRow.selected = [1, 3];
|
[test] test for RowSelectionWrapper#componentWillReceiveProps
|
diff --git a/spec/webview-spec.js b/spec/webview-spec.js
index <HASH>..<HASH> 100644
--- a/spec/webview-spec.js
+++ b/spec/webview-spec.js
@@ -4,7 +4,7 @@ const http = require('http')
const url = require('url')
const {remote} = require('electron')
-const {BrowserWindow} = remote
+const {app} = remote
describe('<webview> tag', function () {
this.timeout(10000)
@@ -79,14 +79,8 @@ describe('<webview> tag', function () {
it('disables node integration on child windows when it is disabled on the webview', function (done) {
- webview.addEventListener('console-message', function (e) {
- assert.equal(e.message, 'window opened')
- const sourceId = remote.getCurrentWindow().id
- const windows = BrowserWindow.getAllWindows().filter(function (window) {
- return window.id !== sourceId
- })
- assert.equal(windows.length, 1)
- assert.equal(windows[0].webContents.getWebPreferences().nodeIntegration, false)
+ app.once('browser-window-created', function (event, window) {
+ assert.equal(window.webContents.getWebPreferences().nodeIntegration, false)
done()
})
|
Listen for browser-window-created event for asserts
|
diff --git a/feature/deps.go b/feature/deps.go
index <HASH>..<HASH> 100644
--- a/feature/deps.go
+++ b/feature/deps.go
@@ -72,9 +72,6 @@ var deps = depDesc{
lnwire.KeysendOptional: {
lnwire.TLVOnionPayloadOptional: {},
},
- lnwire.ScidAliasOptional: {
- lnwire.ExplicitChannelTypeOptional: {},
- },
lnwire.ZeroConfOptional: {
lnwire.ScidAliasOptional: {},
},
|
feature: remove `ScidAliasOptional` dependency on `ExplicitChannelTypeOptional`
The [spec](<URL>)
does not specify a dependency between `ScidAliasOptional` (<I>) and
`ExplicitChannelTypeOptional` (<I>).
This bug lead to some connectivity issues with peers not setting the
<I> feature bit while setting the <I>.
The issue [<I>](<URL>) is
an example of this.
|
diff --git a/pyemma/_base/serialization/serialization.py b/pyemma/_base/serialization/serialization.py
index <HASH>..<HASH> 100644
--- a/pyemma/_base/serialization/serialization.py
+++ b/pyemma/_base/serialization/serialization.py
@@ -92,8 +92,8 @@ class SerializableMixIn(object):
flattened = jsonpickle.dumps(self)
except Exception as e:
if isinstance(self, Loggable):
- self.logger.exception('During saving the object ("%s") '
- 'the following error occured' % e)
+ self.logger.exception('During saving the object ("{error}") '
+ 'the following error occurred'.format(error=e))
raise
if six.PY3:
@@ -253,6 +253,10 @@ class SerializableMixIn(object):
state = self.get_model_params()
res.update(state)
+ # store the current software version
+ from pyemma import version
+ state['_pyemma_version'] = version
+
return res
def __setstate__(self, state):
@@ -281,3 +285,6 @@ class SerializableMixIn(object):
names = self._get_param_names()
new_state = {key: state[key] for key in names if key in state}
self.set_params(**new_state)
+
+ if hasattr(state, '_pyemma_version'):
+ self._pyemma_version = state['_pyemma_version']
|
[serialization] save pyemma version
|
diff --git a/salt/modules/file.py b/salt/modules/file.py
index <HASH>..<HASH> 100644
--- a/salt/modules/file.py
+++ b/salt/modules/file.py
@@ -3480,7 +3480,12 @@ def open_files(by_pid=False):
fd_.append('{0}/fd/{1}'.format(ppath, fpath))
for tid in tids:
- fd_.append(os.path.realpath('{0}/task/{1}/exe'.format(ppath, tid)))
+ try:
+ fd_.append(
+ os.path.realpath('{0}/task/{1}/exe'.format(ppath, tid))
+ )
+ except OSError:
+ continue
for tpath in os.listdir('{0}/task/{1}/fd'.format(ppath, tid)):
fd_.append('{0}/task/{1}/fd/{2}'.format(ppath, tid, tpath))
|
Add back in try/except for checking files
|
diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -14,6 +14,21 @@ import (
// https://developer.mozilla.org/en-US/docs/Web/API/WebSocket#Ready_state_constants
type ReadyState uint16
+func (rs ReadyState) String() string {
+ switch rs {
+ case Connecting:
+ return "Connecting"
+ case Open:
+ return "Open"
+ case Closing:
+ return "Closing"
+ case Closed:
+ return "Closed"
+ default:
+ return "Unknown"
+ }
+}
+
// Ready state constants from
// https://developer.mozilla.org/en-US/docs/Web/API/WebSocket#Ready_state_constants
const (
|
Add ReadyState.String()
|
diff --git a/src/org/mozilla/javascript/serialize/ScriptableOutputStream.java b/src/org/mozilla/javascript/serialize/ScriptableOutputStream.java
index <HASH>..<HASH> 100644
--- a/src/org/mozilla/javascript/serialize/ScriptableOutputStream.java
+++ b/src/org/mozilla/javascript/serialize/ScriptableOutputStream.java
@@ -123,7 +123,9 @@ public class ScriptableOutputStream extends ObjectOutputStream {
"Date", "Date.prototype",
"RegExp", "RegExp.prototype",
"Script", "Script.prototype",
- "Continuation", "Continuation.prototype"
+ "Continuation", "Continuation.prototype",
+ "XML", "XML.prototype",
+ "XMLList", "XMLList.prototype",
};
for (int i=0; i < names.length; i++) {
addExcludedName(names[i]);
|
Added XML and XMLList to the exclusion list
|
diff --git a/openquake/calculators/scenario_risk.py b/openquake/calculators/scenario_risk.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/scenario_risk.py
+++ b/openquake/calculators/scenario_risk.py
@@ -48,12 +48,12 @@ def scenario_risk(riskinputs, riskmodel, rlzs_assoc, monitor):
:class:`openquake.baselib.performance.PerformanceMonitor` instance
:returns:
a dictionary {
- 'agg': array of shape (E, R, 2),
- 'avg': list of tuples (rlz_ids, asset_idx, statistics)
+ 'agg': array of shape (E, L, R, 2),
+ 'avg': list of tuples (lt_idx, rlz_idx, asset_idx, statistics)
}
- where E is the number of simulated events, R the number of realizations
- and statistics is an array of shape (n, R, 4), being n the number of
- assets in the current riskinput object.
+ where E is the number of simulated events, L the number of loss types,
+ R the number of realizations and statistics is an array of shape
+ (n, R, 4), with n the number of assets in the current riskinput object
"""
E = monitor.oqparam.number_of_ground_motion_fields
logging.info('Process %d, considering %d risk input(s) of weight %d',
|
Fixed docstring (again)
|
diff --git a/bin/kong-dashboard.js b/bin/kong-dashboard.js
index <HASH>..<HASH> 100755
--- a/bin/kong-dashboard.js
+++ b/bin/kong-dashboard.js
@@ -125,7 +125,7 @@ function start(argv) {
argv.kongRequestOpts.headers['Authorization'] = 'Basic ' + base64;
}
- if (argv.apiKey !== '') {
+ if (argv.apiKey !== '' && typeof argv.apiKey !== 'undefined') {
argv.kongRequestOpts.headers[argv.apiKeyName.toLowerCase()] = argv.apiKey;
}
|
do not send null apikey header if it wasn't provided
|
diff --git a/filter/tex/texed.php b/filter/tex/texed.php
index <HASH>..<HASH> 100644
--- a/filter/tex/texed.php
+++ b/filter/tex/texed.php
@@ -31,10 +31,12 @@
$texexp = str_replace('<','<',$texexp);
$texexp = str_replace('>','>',$texexp);
$texexp = preg_replace('!\r\n?!',' ',$texexp);
+ $pathname = "$CFG->dataroot/filter/tex/$image";
$cmd = tex_filter_get_cmd($pathname, $texexp);
system($cmd, $status);
if (file_exists($pathname)) {
+ require_once($CFG->libdir . '/filelib.php');
send_file($pathname, $image);
} else {
echo "Image not found!";
|
MDL-<I> filter/tex reverting removal of $pathname in
<URL>
|
diff --git a/tests/pytests/unit/modules/test_iptables.py b/tests/pytests/unit/modules/test_iptables.py
index <HASH>..<HASH> 100644
--- a/tests/pytests/unit/modules/test_iptables.py
+++ b/tests/pytests/unit/modules/test_iptables.py
@@ -218,9 +218,10 @@ def test_build_rule():
)
# Should allow the --save jump option to CONNSECMARK
- # self.assertEqual(iptables.build_rule(jump='CONNSECMARK',
- # **{'save': ''}),
- # '--jump CONNSECMARK --save ')
+ # assert (
+ # iptables.build_rule(jump='CONNSECMARK', **{'save': ''})
+ # == '--jump CONNSECMARK --save '
+ # )
ret = "/sbin/iptables --wait -t salt -I INPUT 3 -m state --jump ACCEPT"
with patch.object(
|
make comment in iptables module test file align with pytest
|
diff --git a/Makefile b/Makefile
index <HASH>..<HASH> 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ GOFILES=\
mmap.go
GOFILES_freebsd=\
- mmap_linux.go\
+ mmap_darwin.go\
mmap_unix.go
GOFILES_darwin=\
diff --git a/mmap_darwin.go b/mmap_darwin.go
index <HASH>..<HASH> 100644
--- a/mmap_darwin.go
+++ b/mmap_darwin.go
@@ -12,6 +12,3 @@ import (
const (
MAP_ANONYMOUS = syscall.MAP_ANON
)
-
-
-
diff --git a/mmap_linux.go b/mmap_linux.go
index <HASH>..<HASH> 100644
--- a/mmap_linux.go
+++ b/mmap_linux.go
@@ -11,5 +11,3 @@ import (
const (
MAP_ANONYMOUS = syscall.MAP_ANONYMOUS
)
-
-
|
Use MAP_ANON with FreeBSD
Untested, but the documentation makes it seem like this will work.
|
diff --git a/addon/internal-model.js b/addon/internal-model.js
index <HASH>..<HASH> 100644
--- a/addon/internal-model.js
+++ b/addon/internal-model.js
@@ -77,7 +77,7 @@ export default class InternalModel {
model.beginPropertyChanges();
}
- let props = [];
+ let props = Ember.A();
let changed = key => {
if(notifyModel) {
diff --git a/addon/properties/relations/belongs-to.js b/addon/properties/relations/belongs-to.js
index <HASH>..<HASH> 100644
--- a/addon/properties/relations/belongs-to.js
+++ b/addon/properties/relations/belongs-to.js
@@ -56,7 +56,7 @@ export default class BelongsToRelation extends Relation {
}
internalModelDidChange(internal, props) {
- if(props.indexOf('isDeleted') !== -1) {
+ if(internal.state.isDeleted && props.includes('isDeleted')) {
this.onValueDeleted();
}
}
|
actually check for isDeleted value not only isDeleted change
--HG--
branch : feature/belongs-to-persisted
|
diff --git a/scripts/Roots/Bedrock/Installer.php b/scripts/Roots/Bedrock/Installer.php
index <HASH>..<HASH> 100644
--- a/scripts/Roots/Bedrock/Installer.php
+++ b/scripts/Roots/Bedrock/Installer.php
@@ -32,7 +32,7 @@ class Installer {
}
$salts = array_map(function ($key) {
- return sprintf("%s='%s'", $key, Installer::generate_salt());
+ return sprintf("%s='%s'", $key, Installer::generateSalt());
}, self::$KEYS);
$env_file = "{$root}/.env";
@@ -49,7 +49,7 @@ class Installer {
* Slightly modified/simpler version of wp_generate_password
* https://github.com/WordPress/WordPress/blob/cd8cedc40d768e9e1d5a5f5a08f1bd677c804cb9/wp-includes/pluggable.php#L1575
*/
- public static function generate_salt($length = 64) {
+ public static function generateSalt($length = 64) {
$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$chars .= '!@#$%^&*()';
$chars .= '-_ []{}<>~`+=,.;:/?|';
|
Fixing PSR-1 issues in installer
|
diff --git a/app/models/has_vcards/concerns/has_vcards.rb b/app/models/has_vcards/concerns/has_vcards.rb
index <HASH>..<HASH> 100644
--- a/app/models/has_vcards/concerns/has_vcards.rb
+++ b/app/models/has_vcards/concerns/has_vcards.rb
@@ -27,7 +27,8 @@ module HasVcards
def vcard_with_autobuild
vcard_without_autobuild || build_vcard
end
- alias_method_chain :vcard, :autobuild
+ alias_method :vcard_without_autobuild, :vcard
+ alias_method :vcard, :vcard_with_autobuild
# Access restrictions
if defined?(ActiveModel::MassAssignmentSecurity)
diff --git a/app/models/has_vcards/vcard.rb b/app/models/has_vcards/vcard.rb
index <HASH>..<HASH> 100644
--- a/app/models/has_vcards/vcard.rb
+++ b/app/models/has_vcards/vcard.rb
@@ -28,7 +28,9 @@ module HasVcards
def address_with_autobuild
address_without_autobuild || build_address
end
- alias_method_chain :address, :autobuild
+ alias_method :address_without_autobuild, :address
+ alias_method :address, :address_with_autobuild
+
# Contacts
has_many :contacts, class_name: 'PhoneNumber', inverse_of: :vcard do
|
fix: alias_method_chain is deprecated, replaced with alias_method
|
diff --git a/lib/sassc/rails/railtie.rb b/lib/sassc/rails/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/sassc/rails/railtie.rb
+++ b/lib/sassc/rails/railtie.rb
@@ -53,9 +53,7 @@ module SassC::Rails
end
initializer :setup_compression, group: :all do |app|
- app.config.assets.css_compressor = nil
-
- if !Rails.env.development?
+ unless Rails.env.development?
app.config.assets.css_compressor ||= :sass
else
# Use expanded output instead of the sass default of :nested unless specified
diff --git a/test/sassc_rails_test.rb b/test/sassc_rails_test.rb
index <HASH>..<HASH> 100644
--- a/test/sassc_rails_test.rb
+++ b/test/sassc_rails_test.rb
@@ -13,6 +13,7 @@ class SassRailsTest < MiniTest::Unit::TestCase
@app.config.log_level = :debug
# reset config back to default
+ @app.config.assets.css_compressor = nil
@app.config.sass = ActiveSupport::OrderedOptions.new
@app.config.sass.preferred_syntax = :scss
@app.config.sass.load_paths = []
|
Stop overriding the app css_compressor setting
|
diff --git a/pyaxo.py b/pyaxo.py
index <HASH>..<HASH> 100644
--- a/pyaxo.py
+++ b/pyaxo.py
@@ -23,23 +23,23 @@ For more information, see https://github.com/rxcomm/pyaxo
"""
import errno
-import sqlite3
-import binascii
-import hmac
import os
+import sqlite3
import sys
-import nacl.utils
-import nacl.secret
from binascii import a2b_base64 as a2b
from binascii import b2a_base64 as b2a
from collections import namedtuple
from getpass import getpass
-from time import time
from threading import Lock
-from passlib.utils.pbkdf2 import pbkdf2
-from nacl.public import PrivateKey, PublicKey, Box
+from time import time
+
+import nacl.secret
+import nacl.utils
from nacl.exceptions import CryptoError
from nacl.hash import sha256
+from nacl.public import PrivateKey, PublicKey, Box
+from passlib.utils.pbkdf2 import pbkdf2
+
ALICE_MODE = True
BOB_MODE = False
|
Organize imports
Remove unused (`binascii` and `hmac`), separate standard from
third-party and sort.
|
diff --git a/src/main/java/net/kyori/adventure/text/minimessage/parser/TokenParser.java b/src/main/java/net/kyori/adventure/text/minimessage/parser/TokenParser.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/kyori/adventure/text/minimessage/parser/TokenParser.java
+++ b/src/main/java/net/kyori/adventure/text/minimessage/parser/TokenParser.java
@@ -490,7 +490,6 @@ public final class TokenParser {
final @NotNull String message,
final @NotNull TemplateResolver templateResolver
) {
- final RootNode dummy = new RootNode(message);
final List<Token> tokens = tokenize(message);
final StringBuilder sb = new StringBuilder();
@@ -502,8 +501,7 @@ public final class TokenParser {
break;
case OPEN_TAG:
- final TagNode tagNode = new TagNode(dummy, token, message, templateResolver);
- final Template template = templateResolver.resolve(tagNode.name());
+ final Template template = templateResolver.resolve(token.get(message).toString());
if (template instanceof Template.StringTemplate) {
sb.append(((Template.StringTemplate) template).value());
} else {
|
Directly resolve token content instead of creating a node
And also an extra test because i was paranoid about this actually working
|
diff --git a/chainlet/chainlink.py b/chainlet/chainlink.py
index <HASH>..<HASH> 100644
--- a/chainlet/chainlink.py
+++ b/chainlet/chainlink.py
@@ -338,6 +338,11 @@ class NeutralLink(ChainLink):
__nonzero__ = __bool__
+ def __eq__(self, other):
+ if isinstance(other, self.__class__):
+ return bool(self) == bool(other)
+ return NotImplemented
+
def __str__(self):
return self.__class__.__name__
|
NeutralLink now compares equal by boolean value
|
diff --git a/app/controllers/pbw/commands_controller.rb b/app/controllers/pbw/commands_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/pbw/commands_controller.rb
+++ b/app/controllers/pbw/commands_controller.rb
@@ -7,5 +7,10 @@ module Pbw
def update_model_before_create(model)
model.user = current_user
end
+
+ def index_scope
+ scope = super
+ scope.where(user: current_user)
+ end
end
end
\ No newline at end of file
diff --git a/app/controllers/pbw/tokens_controller.rb b/app/controllers/pbw/tokens_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/pbw/tokens_controller.rb
+++ b/app/controllers/pbw/tokens_controller.rb
@@ -7,5 +7,10 @@ module Pbw
def update_model_before_create(model)
model.user = current_user
end
+
+ def index_scope
+ scope = super
+ scope.where(user: current_user)
+ end
end
end
\ No newline at end of file
|
Filter tokens and commands by current user
|
diff --git a/modules/web/src/main/java/org/torquebox/web/servlet/RackFilter.java b/modules/web/src/main/java/org/torquebox/web/servlet/RackFilter.java
index <HASH>..<HASH> 100644
--- a/modules/web/src/main/java/org/torquebox/web/servlet/RackFilter.java
+++ b/modules/web/src/main/java/org/torquebox/web/servlet/RackFilter.java
@@ -88,7 +88,14 @@ public class RackFilter implements Filter {
return;
}
- String servletName = ((ApplicationFilterChain) chain).getServlet().getServletConfig().getServletName();
+ String servletName = "";
+
+ try {
+ servletName = ((ApplicationFilterChain) chain).getServlet().getServletConfig().getServletName();
+ } catch (Exception e) {
+ log.error(e);
+ }
+
if (servletName == RackWebApplicationInstaller.FIVE_HUNDRED_SERVLET_NAME ||
servletName == RackWebApplicationInstaller.STATIC_RESROUCE_SERVLET_NAME) {
// Only hand off requests to Rack if they're handled by one of the
|
Log if we can't fetch a servlet name, but don't error out.
|
diff --git a/db/sql.php b/db/sql.php
index <HASH>..<HASH> 100644
--- a/db/sql.php
+++ b/db/sql.php
@@ -148,8 +148,8 @@ class SQL extends \PDO {
$this->rollback();
user_error('PDOStatement: '.$error[2]);
}
- if (preg_match(
- '/\b(?:CALL|EXPLAIN|SELECT|PRAGMA|SHOW|RETURNING)\b/i',
+ if (preg_match('/^\s*'.
+ '(?:CALL|EXPLAIN|SELECT|PRAGMA|SHOW|RETURNING)\b/is',
$cmd)) {
$result=$query->fetchall(\PDO::FETCH_ASSOC);
$this->rows=count($result);
|
Bug fix: DB Exec does not return affected row if query contain subselect (Issue #<I>)
|
diff --git a/O365/account.py b/O365/account.py
index <HASH>..<HASH> 100644
--- a/O365/account.py
+++ b/O365/account.py
@@ -157,9 +157,9 @@ class Account(object):
def planner(self, *, resource=''):
""" Get an instance to read information from Microsoft planner """
-
- if not isinstance(self.protocol , MSGraphProtocol):
- # TODO: Custom protocol accessing OneDrive/Sharepoint Api fails here
+
+ if not isinstance(self.protocol, MSGraphProtocol):
+ # TODO: Custom protocol accessing OneDrive/Sharepoint Api fails here
raise RuntimeError(
'planner api only works on Microsoft Graph API')
diff --git a/O365/connection.py b/O365/connection.py
index <HASH>..<HASH> 100644
--- a/O365/connection.py
+++ b/O365/connection.py
@@ -152,7 +152,7 @@ class Protocol:
scopes = set()
for app_part in user_provided_scopes:
- for scope in self._oauth_scopes.get(app_part, [app_part]):
+ for scope in self._oauth_scopes.get(app_part, [(app_part,)]):
scopes.add(self._prefix_scope(scope))
return list(scopes)
|
"protocol.get_scopes_for" now won't prefix scopes that are not scope_helpers
|
diff --git a/src/OutputFilter.php b/src/OutputFilter.php
index <HASH>..<HASH> 100644
--- a/src/OutputFilter.php
+++ b/src/OutputFilter.php
@@ -154,18 +154,10 @@ class OutputFilter
* @return string Processed string.
*
* @since 1.0
- * @todo There must be a better way???
*/
public static function ampReplace($text)
{
- $text = str_replace('&&', '*--*', $text);
- $text = str_replace('&#', '*-*', $text);
- $text = str_replace('&', '&', $text);
- $text = preg_replace('|&(?![\w]+;)|', '&', $text);
- $text = str_replace('*-*', '&#', $text);
- $text = str_replace('*--*', '&&', $text);
-
- return $text;
+ return preg_replace('/(?<!&)&(?!&|#|[\w]+;)/', '&', $text);
}
/**
|
use negative lookbehind/lookahed instead of a lot of str_replaces
|
diff --git a/src/main/java/org/fit/layout/api/AreaTreeOperator.java b/src/main/java/org/fit/layout/api/AreaTreeOperator.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/fit/layout/api/AreaTreeOperator.java
+++ b/src/main/java/org/fit/layout/api/AreaTreeOperator.java
@@ -16,6 +16,12 @@ public interface AreaTreeOperator extends Service, ParametrizedOperation
{
/**
+ * Returns the operator category that allows to group similar operators in the GUI.
+ * @return The category name
+ */
+ public String getCategory();
+
+ /**
* Applies the operation to the given tree.
* @param atree the area tree to be modified.
*/
|
Add a category to each visual area tree operator
In order to provide categorization in the GUI
|
diff --git a/tests/openwrt/test_default.py b/tests/openwrt/test_default.py
index <HASH>..<HASH> 100644
--- a/tests/openwrt/test_default.py
+++ b/tests/openwrt/test_default.py
@@ -1,5 +1,7 @@
import unittest
+from openwisp_utils.tests import capture_stdout
+
from netjsonconfig import OpenWrt
from netjsonconfig.utils import _TabsMixin
@@ -176,6 +178,7 @@ config custom 'custom'
o = OpenWrt({"skipme": {"enabled": True}})
self.assertEqual(o.render(), '')
+ @capture_stdout()
def test_warning(self):
o = OpenWrt({"luci": [{"unrecognized": True}]})
self.assertEqual(o.render(), '')
|
[tests] Avoided noisy output during tests #<I>
Applied `capture_stdout` decorator on noisy tests.
Closes #<I>
|
diff --git a/pkg/kvstore/allocator/allocator.go b/pkg/kvstore/allocator/allocator.go
index <HASH>..<HASH> 100644
--- a/pkg/kvstore/allocator/allocator.go
+++ b/pkg/kvstore/allocator/allocator.go
@@ -488,17 +488,6 @@ func (a *Allocator) lockedAllocate(ctx context.Context, key AllocatorKey) (idpoo
return 0, false, fmt.Errorf("another writer has allocated this key")
}
- value, err = a.GetNoCache(ctx, key)
- if err != nil {
- releaseKeyAndID()
- return 0, false, err
- }
-
- if value != 0 {
- releaseKeyAndID()
- return 0, false, fmt.Errorf("master key already exists")
- }
-
// create /id/<ID> and fail if it already exists
keyPath := path.Join(a.idPrefix, strID)
success, err := kvstore.CreateOnly(ctx, keyPath, []byte(k), false)
|
kvstore/allocator: do not re-get slave key on allocation
As the slave key is protected by the kvstore global lock it is not
really necessary to do another Get of the slave key as the key will not
be created by any other agent due the lock is still being held.
|
diff --git a/tests/Container/ConnectionFactoryTest.php b/tests/Container/ConnectionFactoryTest.php
index <HASH>..<HASH> 100644
--- a/tests/Container/ConnectionFactoryTest.php
+++ b/tests/Container/ConnectionFactoryTest.php
@@ -313,6 +313,10 @@ class ConnectionFactoryTest extends TestCase
$this->markTestSkipped('php pcntl extension not loaded');
}
+ if (! class_exists('PhpAmqpLib\Connection\Heartbeat\PCNTLHeartbeatSender')) {
+ $this->markTestSkipped('PCNTLHeartbeatSender requires phpamqplib >= 2.12.0');
+ }
+
$container = $this->prophesize(ContainerInterface::class);
$heartbeat = 4;
|
add conditional so we can still test lowest dependencies as is
|
diff --git a/src/Client/InternalClient.js b/src/Client/InternalClient.js
index <HASH>..<HASH> 100644
--- a/src/Client/InternalClient.js
+++ b/src/Client/InternalClient.js
@@ -1097,10 +1097,9 @@ export default class InternalClient {
self.messageAwaits[channel.id + msg.author.id].map( fn => fn(msg) );
self.messageAwaits[channel.id + msg.author.id] = null;
client.emit("message", msg, true); //2nd param is isAwaitedMessage
- }else{
+ } else {
client.emit("message", msg);
}
- self.ack(msg);
} else {
client.emit("warn", "message created but channel is not cached");
}
|
Don't acknowledge messages, fixes #<I>
|
diff --git a/src/macroresolver.py b/src/macroresolver.py
index <HASH>..<HASH> 100644
--- a/src/macroresolver.py
+++ b/src/macroresolver.py
@@ -122,7 +122,7 @@ class MacroResolver(Borg):
if callable(value):
return str(value())
else:
- return (value)
+ return str(value)
except AttributeError as exp:
return str(exp)
|
* fixed a typo in the last commit
|
diff --git a/src/Console/Commands/SeedCommand.php b/src/Console/Commands/SeedCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/Commands/SeedCommand.php
+++ b/src/Console/Commands/SeedCommand.php
@@ -35,6 +35,8 @@ class SeedCommand extends Command
*/
public function handle()
{
+ $this->warn('Seed cortex/contacts:');
+
if ($this->ensureExistingContactsTables()) {
// No seed data at the moment!
}
|
Tweak seeder's output
|
diff --git a/Components/FileManager.php b/Components/FileManager.php
index <HASH>..<HASH> 100644
--- a/Components/FileManager.php
+++ b/Components/FileManager.php
@@ -311,6 +311,11 @@ class FileManager
if (is_file($fullpath) ) {
Splash::Log()->Deb("MsgFileExists",__FUNCTION__,$file);
//====================================================================//
+ // Check if file is different
+ if ( $md5 === md5_file ($fullpath) ) {
+ return True;
+ }
+ //====================================================================//
// Check if file is writable
if (!is_writable($file)) {
return Splash::Log()->Err("ErrFileWriteable",__FUNCTION__,$file);
|
Improve : We don't care of unwritable file if similar => skip writing
|
diff --git a/src/core/graphics/webgl/utils/buildRoundedRectangle.js b/src/core/graphics/webgl/utils/buildRoundedRectangle.js
index <HASH>..<HASH> 100644
--- a/src/core/graphics/webgl/utils/buildRoundedRectangle.js
+++ b/src/core/graphics/webgl/utils/buildRoundedRectangle.js
@@ -76,6 +76,21 @@ export default function buildRoundedRectangle(graphicsData, webGLData)
}
}
+/**
+ * Calculate a single point for a quadratic bezier curve.
+ * Utility function used by quadraticBezierCurve.
+ * Ignored from docs since it is not directly exposed.
+ *
+ * @ignore
+ * @private
+ */
+function getPt(n1, n2, perc)
+{
+ const diff = n2 - n1;
+
+ return n1 + (diff * perc);
+}
+
/**
* Calculate the points for a quadratic bezier curve. (helper function..)
* Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c
@@ -105,13 +120,6 @@ function quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY, out = [])
let x = 0;
let y = 0;
- function getPt(n1, n2, perc)
- {
- const diff = n2 - n1;
-
- return n1 + (diff * perc);
- }
-
for (let i = 0, j = 0; i <= n; ++i)
{
j = i / n;
|
minor optimisation of quadratic bezier curve calculation. (#<I>)
|
diff --git a/soccer/writers.py b/soccer/writers.py
index <HASH>..<HASH> 100644
--- a/soccer/writers.py
+++ b/soccer/writers.py
@@ -85,7 +85,7 @@ class Stdout(BaseWriter):
self.league_header(league)
for game in games:
self.scores(self.parse_result(game), add_new_line=False)
- click.secho(' %s' % self.convert_utc_to_local_time(game["time"]), fg=self.colors.TIME)
+ click.secho(' %s' % Stdout.convert_utc_to_local_time(game["time"]), fg=self.colors.TIME)
click.echo()
def team_scores(self, team_scores, time):
@@ -212,7 +212,8 @@ class Stdout(BaseWriter):
return result
- def convert_utc_to_local_time(self, time_str):
+ @staticmethod
+ def convert_utc_to_local_time(time_str):
"""Converts the API UTC time string to the local user time."""
if not time_str.endswith(" UTC"):
return time_str
|
Move utc-to-local function into a static method.
|
diff --git a/lib/rubycritic/core/analysed_file.rb b/lib/rubycritic/core/analysed_file.rb
index <HASH>..<HASH> 100644
--- a/lib/rubycritic/core/analysed_file.rb
+++ b/lib/rubycritic/core/analysed_file.rb
@@ -31,9 +31,11 @@ module Rubycritic
end
def complexity_per_method
- complexity.fdiv(methods_count).round(1)
- rescue ZeroDivisionError
- "N/A"
+ if methods_count == 0
+ "N/A"
+ else
+ complexity.fdiv(methods_count).round(1)
+ end
end
def has_smells?
|
Fix dividing by zero
(Never thought I'd ever write this aha)
|
diff --git a/prettyprinter/extras/django.py b/prettyprinter/extras/django.py
index <HASH>..<HASH> 100644
--- a/prettyprinter/extras/django.py
+++ b/prettyprinter/extras/django.py
@@ -213,7 +213,7 @@ def pretty_queryset(queryset, ctx):
else:
truncated = False
- element_ctx = ctx.set(ModelVerbosity, ModelVerbosity.SHORT)
+ element_ctx = ctx.assoc(ModelVerbosity, ModelVerbosity.SHORT)
return pretty_call(
element_ctx,
|
Use assoc instead of set in Django definitions
|
diff --git a/src/codegeneration/BlockBindingTransformer.js b/src/codegeneration/BlockBindingTransformer.js
index <HASH>..<HASH> 100644
--- a/src/codegeneration/BlockBindingTransformer.js
+++ b/src/codegeneration/BlockBindingTransformer.js
@@ -686,8 +686,7 @@ traceur.define('codegeneration', function() {
/**
* Transforms the variable statement. Inside a block const and let
* are transformed into block-scoped variables.
- * Outside of the block, const stays the same, let becomes regular
- * variable.
+ * Outside of the block, const and let becomes regular variables.
* @param {VariableStatement} tree
* @return {ParseTree}
*/
@@ -796,9 +795,9 @@ traceur.define('codegeneration', function() {
}
// Package up in the declaration list.
- if (transformed != null || tree.declarationType == TokenType.LET) {
+ if (transformed != null || tree.declarationType != TokenType.VAR) {
var declarations = transformed != null ? transformed : tree.declarations;
- var declarationType = tree.declarationType == TokenType.LET ?
+ var declarationType = tree.declarationType != TokenType.VAR ?
TokenType.VAR :
tree.declarationType;
|
Transform const to var outside blocks
BUG=
TEST=
Review URL: <URL>
|
diff --git a/platform/nativescript/runtime/components/frame.js b/platform/nativescript/runtime/components/frame.js
index <HASH>..<HASH> 100644
--- a/platform/nativescript/runtime/components/frame.js
+++ b/platform/nativescript/runtime/components/frame.js
@@ -22,6 +22,16 @@ export default {
required: false,
default: null
},
+ clearHistory: {
+ type: Boolean,
+ required: false,
+ default: false
+ },
+ backstackVisible: {
+ type: Boolean,
+ required: false,
+ default: true
+ },
// injected by the template compiler
hasRouterView: {
default: false
@@ -88,6 +98,8 @@ export default {
notifyPageMounted(pageVm) {
let options = {
+ backstackVisible: this.backstackVisible,
+ clearHistory: this.clearHistory,
create: () => pageVm.$el.nativeView
}
|
feat(frame): allow setting clearHistory and backstackVisible options for default pages. (#<I>)
|
diff --git a/bokeh/server/views/main.py b/bokeh/server/views/main.py
index <HASH>..<HASH> 100644
--- a/bokeh/server/views/main.py
+++ b/bokeh/server/views/main.py
@@ -213,7 +213,7 @@ def make_plot():
from bokeh.objects import (
Plot, DataRange1d, LinearAxis,
- ColumnDataSource, GlyphRenderer,
+ ColumnDataSource, Glyph,
PanTool, PreviewSaveTool)
from bokeh.glyphs import Circle
@@ -233,7 +233,7 @@ def make_plot():
circle = Circle(x="x", y="y", fill="red", radius=5, line_color="black")
- glyph_renderer = GlyphRenderer(
+ glyph_renderer = Glyph(
data_source = source,
xdata_range = xdr,
ydata_range = ydr,
|
GlyphRenderer -> Glyhp rename
|
diff --git a/client/js/util.js b/client/js/util.js
index <HASH>..<HASH> 100644
--- a/client/js/util.js
+++ b/client/js/util.js
@@ -416,6 +416,10 @@ qq.android = function(){
"use strict";
return navigator.userAgent.toLowerCase().indexOf('android') !== -1;
};
+qq.ios7 = function() {
+ "use strict";
+ return qq.ios() && navigator.userAgent.indexOf(" OS 7_") !== -1;
+};
qq.ios = function() {
"use strict";
return navigator.userAgent.indexOf("iPad") !== -1
|
fix(client/js/util.js): #<I>, closes #<I> - provide a workaround for the MOV file size bug in iOS7
|
diff --git a/estnltk/layer/layer.py b/estnltk/layer/layer.py
index <HASH>..<HASH> 100644
--- a/estnltk/layer/layer.py
+++ b/estnltk/layer/layer.py
@@ -59,6 +59,9 @@ class Layer:
as database serialisation does not work for other types. See [estnltk.storage.postgres] for further documentation.
"""
+ __slots__ = ['default_values', 'attributes', 'name', 'parent', '_base', 'enveloping', '_span_list', 'ambiguous',
+ 'text_object', 'meta', '_is_frozen', '_bound']
+
def __init__(self,
name: str,
attributes: Sequence[str] = (),
@@ -371,8 +374,6 @@ class Layer:
def __getattr__(self, item):
if item in {'_ipython_canary_method_should_not_exist_', '__getstate__', '__setstate__'}:
raise AttributeError
- if item in self.__getattribute__('__dict__'):
- return self.__getattribute__('__dict__')[item]
if item in self.__getattribute__('attributes'):
return self.__getitem__(item)
|
added __slots__ for Layer (to be shortened in the future)
|
diff --git a/examples/server/generator.js b/examples/server/generator.js
index <HASH>..<HASH> 100644
--- a/examples/server/generator.js
+++ b/examples/server/generator.js
@@ -384,7 +384,7 @@ var Generator = {
//setInterval(randomActivity, 10000);
},
- listen: function (handler) {
+ listen: function () {
//listener = handler;
}
};
diff --git a/examples/server/server.js b/examples/server/server.js
index <HASH>..<HASH> 100644
--- a/examples/server/server.js
+++ b/examples/server/server.js
@@ -30,7 +30,7 @@ router.get('/', function (req, res) {
res.redirect('/docs');
});
-app.use('/tour/', function (req, res, next) {
+app.use('/tour/', function (req, res) {
res.redirect('/medium-app');
});
|
Removing used vars from the code.
|
diff --git a/system_tests/language.py b/system_tests/language.py
index <HASH>..<HASH> 100644
--- a/system_tests/language.py
+++ b/system_tests/language.py
@@ -115,3 +115,10 @@ class TestLanguage(unittest.TestCase):
document = Config.CLIENT.document_from_url(gcs_url)
entities = document.analyze_entities()
self._check_analyze_entities_result(entities)
+
+ def test_analyze_sentiment(self):
+ positive_msg = 'Jogging is fun'
+ document = Config.CLIENT.document_from_text(positive_msg)
+ sentiment = document.analyze_sentiment()
+ self.assertEqual(sentiment.polarity, 1)
+ self.assertTrue(0.5 < sentiment.magnitude < 1.5)
|
Adding system test for analyze_sentiment() in language.
|
diff --git a/src/test/java/org/javamoney/moneta/PerformanceTest.java b/src/test/java/org/javamoney/moneta/PerformanceTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/javamoney/moneta/PerformanceTest.java
+++ b/src/test/java/org/javamoney/moneta/PerformanceTest.java
@@ -98,7 +98,7 @@ public class PerformanceTest {
b.setLength(0);
Money money1 = Money.of(BigDecimal.ONE,EURO);
long start = System.currentTimeMillis();
- final int NUM = 100000;
+ final int NUM = 10000;
MonetaryAmount adding = Money.of( 1234567.3444,EURO);
MonetaryAmount subtracting = Money.of( 232323,EURO);
for (int i = 0; i < NUM; i++) {
|
Reduced loop size of test by factor <I>.
|
diff --git a/lib/analyzeMultipleSites.js b/lib/analyzeMultipleSites.js
index <HASH>..<HASH> 100644
--- a/lib/analyzeMultipleSites.js
+++ b/lib/analyzeMultipleSites.js
@@ -96,6 +96,7 @@ AnalyzeMultipleSites.prototype._setupConfigurationForSite = function(args, cb) {
var urls = data.toString().split(EOL).filter(function(l) {
return l.length > 0;
});
+ config.urls = urls;
config.url = urls[0];
config.urlObject = urlParser.parse(urls[0]);
}
|
fix for fetching site urls from file
|
diff --git a/lib/middleware/pre_fetch.js b/lib/middleware/pre_fetch.js
index <HASH>..<HASH> 100644
--- a/lib/middleware/pre_fetch.js
+++ b/lib/middleware/pre_fetch.js
@@ -36,6 +36,8 @@ function createRemoteReadStream(request, urlPath) {
URL = url.resolve(server, urlPath),
protocol = protocolOf(options.server);
+ if (options.verbose.remote || options.verbose['local:error']) console.log(URL);
+
var opt = url.parse(URL);
opt.headers = request.headers;
delete opt.headers['accept-encoding'];
@@ -68,8 +70,11 @@ function readFromStream(options, request, fileName, urlPath) {
.then(
() =>
createRemoteReadStream(request, urlPath)
- .catch((err) => options.verbose.proxy ? console.error(urlPath, err) : ''),
- (localFile) => fs.createReadStream(localFile)
+ .catch((err) => options.verbose.remote ? console.error(urlPath, err) : ''),
+ function (localFile) {
+ if (options.verbose.local) console.log(localFile);
+ return fs.createReadStream(localFile);
+ }
)
]);
}
|
add more logging according to README documentation
|
diff --git a/js/tooltip.js b/js/tooltip.js
index <HASH>..<HASH> 100644
--- a/js/tooltip.js
+++ b/js/tooltip.js
@@ -281,11 +281,11 @@
var $tip = this.tip()
var e = $.Event('hide.bs.' + this.type)
- this.$element.removeAttr('aria-describedby')
-
function complete() {
if (that.hoverState != 'in') $tip.detach()
- that.$element.trigger('hidden.bs.' + that.type)
+ that.$element
+ .removeAttr('aria-describedby')
+ .trigger('hidden.bs.' + that.type)
}
this.$element.trigger(e)
|
Remove `aria-describedby` attribute later
Fixes #<I>
|
diff --git a/bambou/nurest_object.py b/bambou/nurest_object.py
index <HASH>..<HASH> 100644
--- a/bambou/nurest_object.py
+++ b/bambou/nurest_object.py
@@ -771,7 +771,7 @@ class NURESTObject(object):
request = NURESTRequest(method=HTTP_METHOD_GET, url=self.get_resource_url())
if async:
- return self.send_request(request=request, async=async, local_callback=self._did_fetch, remote_callback=callback)
+ return self.send_request(request=request, async=async, local_callback=self._did_retrieve, remote_callback=callback)
else:
connection = self.send_request(request=request)
return self._did_retrieve(connection)
|
Fixed missing _did_fetch method
|
diff --git a/openquake/calculators/hazard/classical/core.py b/openquake/calculators/hazard/classical/core.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/hazard/classical/core.py
+++ b/openquake/calculators/hazard/classical/core.py
@@ -240,7 +240,6 @@ class ClassicalHazardCalculator(haz_general.BaseHazardCalculatorNext):
#: The core calculation Celery task function, which accepts the arguments
#: generated by :func:`task_arg_gen`.
core_calc_task = hazard_curves
- task_arg_gen = classical_task_arg_gen
def initialize_hazard_curve_progress(self, lt_rlz):
"""
|
calcs/hazard/classical/core:
Missed one line.
|
diff --git a/lib/ttb-cache.js b/lib/ttb-cache.js
index <HASH>..<HASH> 100644
--- a/lib/ttb-cache.js
+++ b/lib/ttb-cache.js
@@ -49,8 +49,11 @@ function getModuleVersionFromConfig(cfg) {
// This check is specific to the Cordova module
if (tu.fileExistsSync(path.join(cfg.projectPath, 'taco.json'))) {
var version = require(path.join(cfg.projectPath, 'taco.json'))['cordova-cli'];
- console.log('Cordova version set to ' + version + ' based on the contents of taco.json');
- return version;
+
+ if (version) {
+ console.log('Cordova version set to ' + version + ' based on the contents of taco.json');
+ return version;
+ }
}
}
|
Fix taco.json version handling
Prior to this change, if taco.json did not contain a 'cordova-cli' entry, then we would default to edge. We now default to edge unless the user has configured the CORDOVA_DEFAULT_VERSION environment variable, which will be used if available.
|
diff --git a/bcbio/bam/trim.py b/bcbio/bam/trim.py
index <HASH>..<HASH> 100644
--- a/bcbio/bam/trim.py
+++ b/bcbio/bam/trim.py
@@ -51,7 +51,7 @@ def _cutadapt_trim(fastq_files, quality_format, adapters, out_files, config):
do.run(cmd.format(**locals()), message)
else:
with file_transaction(config, out_files) as tx_out_files:
- of1_tx, of2_tx = out_files
+ of1_tx, of2_tx = tx_out_files
tmp_fq1 = append_stem(of1_tx, ".tmp")
tmp_fq2 = append_stem(of2_tx, ".tmp")
singles_file = of1_tx + ".single"
|
use trasanction files for trimming steps
|
diff --git a/pyperform/timer.py b/pyperform/timer.py
index <HASH>..<HASH> 100644
--- a/pyperform/timer.py
+++ b/pyperform/timer.py
@@ -4,16 +4,23 @@ from time import time
from .tools import convert_time_units
-timer_format = "{name}: {time}"
+timer_format = "{name}: recent: {recent_time} average: {avg_time}"
+
def timer(func):
def _timed_function(*args, **kwargs):
t1 = time()
result = func(*args, **kwargs)
t2 = time()
- print(timer_format.format(name=func.__name__, time=convert_time_units(t2-t1)))
+ delta = t2-t1
+ _timed_function._total_time += delta
+ _timed_function._call_count += 1
+ _timed_function._average_time = convert_time_units(_timed_function._total_time / _timed_function._call_count)
+ print(timer_format.format(name=func.__name__, recent_time=convert_time_units(delta), avg_time=_timed_function._average_time))
return result
+ _timed_function._total_time = 0
+ _timed_function._call_count = 0
_timed_function.__name__ = "_timed_{}".format(func.__name__)
return _timed_function
|
added calculation of average time to @timer
|
diff --git a/numeric.ly.js b/numeric.ly.js
index <HASH>..<HASH> 100644
--- a/numeric.ly.js
+++ b/numeric.ly.js
@@ -106,7 +106,7 @@ var numeric = {
if(Math.abs(left + right - whole) <= 15 * eps){
return left + right + (left + right - whole) / 15;
}else{
- return simpsonRecursive(func, a, c, eps/2, left) + simpsonRecursive(f, c, b, eps/2, right);
+ return simpsonRecursive(func, a, c, eps/2, left) + simpsonRecursive(func, c, b, eps/2, right);
}
},
//execute this
@@ -191,12 +191,13 @@ var numeric = {
//transpose array
transpose: function(arr){
var result = new Array(arr[0].length);
- for (var i = 0; i < arr.length; i++) {
- arr[i] = new Array(arr.length);
- for(var j = 0 ; j < arr[i].length){
- arr[j][i] = arr[i][j];
+ for (var i = 0; i < arr[0].length; i++) {
+ result[i] = new Array(arr.length);
+ for(var j = 0; j < arr.length; j++){
+ result[i][j] = arr[j][i];
}
}
+ return result;
},
//return identity matrix of dimension n x n
|
Fix transpose, simpsonRecursive
Transpose wasn't returning anything and was overwriting the data as it attempted to move it. My new implementation probably isn't that fast, but it works.
SimpsonRecursive, I think, just had a typo.
|
diff --git a/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb b/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb
+++ b/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb
@@ -75,7 +75,7 @@ module Fog
xml.Protocol service_profile[:Protocol]
xml.Port service_profile[:Port]
xml.Persistence {
- xml.Method service_profile[:Persistence][:method]
+ xml.Method service_profile[:Persistence][:Method]
if service_profile[:Persistence][:Method] == 'COOKIE'
xml.CookieName service_profile[:Persistence][:CookieName]
xml.CookieMode service_profile[:Persistence][:CookieMode]
|
[vcloud_director] fix typo as per #<I>
|
diff --git a/src/Services/MediaManager.php b/src/Services/MediaManager.php
index <HASH>..<HASH> 100644
--- a/src/Services/MediaManager.php
+++ b/src/Services/MediaManager.php
@@ -212,7 +212,8 @@ class MediaManager implements FileUploaderInterface, FileMoverInterface
}
/**
- * Return the last modified time.
+ * Return the last modified time. If a timestamp can not be found fall back
+ * to today's date and time...
*
* @param $path
*
@@ -220,7 +221,12 @@ class MediaManager implements FileUploaderInterface, FileMoverInterface
*/
public function fileModified($path)
{
- return Carbon::createFromTimestamp($this->disk->lastModified($path));
+ try {
+ return Carbon::createFromTimestamp($this->disk->lastModified($path));
+ }catch (\Exception $e)
+ {
+ return Carbon::now();
+ }
}
/**
|
Fallback to today for filesystems that dont give a timestamp value eg dropbox
|
diff --git a/detox/src/index.js b/detox/src/index.js
index <HASH>..<HASH> 100644
--- a/detox/src/index.js
+++ b/detox/src/index.js
@@ -6,7 +6,7 @@ const argparse = require('./utils/argparse');
const InvocationManager = require('./invoke').InvocationManager;
const configuration = require('./configuration');
-log.level = loglevel = argparse.getArgValue('loglevel') || 'info';
+log.level = argparse.getArgValue('loglevel') || 'info';
log.heading = 'detox';
let websocket;
|
fix: ReferenceError: loglevel is not defined
|
diff --git a/src/Ems/Testing/LoggingCallable.php b/src/Ems/Testing/LoggingCallable.php
index <HASH>..<HASH> 100644
--- a/src/Ems/Testing/LoggingCallable.php
+++ b/src/Ems/Testing/LoggingCallable.php
@@ -18,6 +18,21 @@ class LoggingCallable implements Countable
protected $calls = [];
/**
+ * @var callable
+ **/
+ protected $handler;
+
+ /**
+ * Optionally pass a callable to process the actual call
+ *
+ * @param callable $handler (optional)
+ **/
+ public function __construct(callable $handler=null)
+ {
+ $this->handler = $handler;
+ }
+
+ /**
* The fake callable
*
* @return void
@@ -25,6 +40,9 @@ class LoggingCallable implements Countable
public function __invoke()
{
$this->calls[] = func_get_args();
+ if ($this->handler) {
+ return call_user_func_array($this->handler, func_get_args());
+ }
}
/**
@@ -63,4 +81,4 @@ class LoggingCallable implements Countable
{
return count($this->calls);
}
-}
\ No newline at end of file
+}
|
Allow a custom handler in LoggingCallable
|
diff --git a/Controller/SecurityFOSUser1Controller.php b/Controller/SecurityFOSUser1Controller.php
index <HASH>..<HASH> 100644
--- a/Controller/SecurityFOSUser1Controller.php
+++ b/Controller/SecurityFOSUser1Controller.php
@@ -28,9 +28,9 @@ class SecurityFOSUser1Controller extends SecurityController
*/
public function loginAction()
{
- $user = $this->container->get('security.context')->getToken()->getUser();
+ $token = $this->container->get('security.context')->getToken();
- if ($user instanceof UserInterface) {
+ if ($token && $token->getUser() instanceof UserInterface) {
$this->container->get('session')->getFlashBag()->set('sonata_user_error', 'sonata_user_already_authenticated');
$url = $this->container->get('router')->generate('sonata_user_profile_show');
|
Security token can be null in login form on <I>
|
diff --git a/restcomm/restcomm.rvd/src/main/java/org/mobicents/servlet/restcomm/rvd/interpreter/Interpreter.java b/restcomm/restcomm.rvd/src/main/java/org/mobicents/servlet/restcomm/rvd/interpreter/Interpreter.java
index <HASH>..<HASH> 100644
--- a/restcomm/restcomm.rvd/src/main/java/org/mobicents/servlet/restcomm/rvd/interpreter/Interpreter.java
+++ b/restcomm/restcomm.rvd/src/main/java/org/mobicents/servlet/restcomm/rvd/interpreter/Interpreter.java
@@ -330,13 +330,13 @@ public class Interpreter {
}
if ( esStep.getDoRouting() ) {
- String nextLabel = "";
+ String next = "";
if ( "fixed".equals( esStep.getNextType() ) )
- nextLabel = esStep.getNext();
+ next = esStep.getNext();
else
if ( "variable".equals( esStep.getNextType() ))
- nextLabel = variables.get( esStep.getNextVariable() );
- return getNodeNameByLabel(nextLabel);
+ next = getNodeNameByLabel( variables.get( esStep.getNextVariable() ) );
+ return next;
}
}
return null;
|
RESTCOMM-<I> #Resolve-Issue Fixed #time 1h #comment made 'fixed' option rely on module name instead of the label
|
diff --git a/vagrant_box_defaults.rb b/vagrant_box_defaults.rb
index <HASH>..<HASH> 100644
--- a/vagrant_box_defaults.rb
+++ b/vagrant_box_defaults.rb
@@ -3,12 +3,12 @@
Vagrant.require_version ">= 2.2.0"
$SERVER_BOX = "cilium/ubuntu-dev"
-$SERVER_VERSION= "227"
+$SERVER_VERSION= "228"
$NETNEXT_SERVER_BOX= "cilium/ubuntu-next"
-$NETNEXT_SERVER_VERSION= "145"
+$NETNEXT_SERVER_VERSION= "146"
@v54_SERVER_BOX= "cilium/ubuntu-5-4"
-@v54_SERVER_VERSION= "31"
+@v54_SERVER_VERSION= "32"
@v419_SERVER_BOX= "cilium/ubuntu-4-19"
-@v419_SERVER_VERSION= "65"
+@v419_SERVER_VERSION= "66"
@v49_SERVER_BOX= "cilium/ubuntu"
-@v49_SERVER_VERSION= "227"
+@v49_SERVER_VERSION= "228"
|
vagrant: Bump Vagrant box versions
|
diff --git a/vyper/cli/vyper_compile.py b/vyper/cli/vyper_compile.py
index <HASH>..<HASH> 100755
--- a/vyper/cli/vyper_compile.py
+++ b/vyper/cli/vyper_compile.py
@@ -35,7 +35,7 @@ opcodes - List of opcodes as a string
opcodes_runtime - List of runtime opcodes as a string
ir - Intermediate representation in list format
ir_json - Intermediate representation in JSON format
-ir-hex - Output IR and assembly constants in hex instead of decimal
+hex-ir - Output IR and assembly constants in hex instead of decimal
no-optimize - Do not optimize (don't use this for production code)
"""
@@ -137,7 +137,7 @@ def _parse_args(argv):
action="store_true",
)
parser.add_argument(
- "--ir-hex",
+ "--hex-ir",
action="store_true",
)
parser.add_argument(
@@ -159,7 +159,7 @@ def _parse_args(argv):
# an error occurred in a Vyper source file.
sys.tracebacklimit = 0
- if args.ir_hex:
+ if args.hex_ir:
ir_node.AS_HEX_DEFAULT = True
output_formats = tuple(uniq(args.format.split(",")))
|
rename CLI option --ir-hex to --hex-ir (#<I>)
it's easier to remember this way
|
diff --git a/module_dtleds.go b/module_dtleds.go
index <HASH>..<HASH> 100644
--- a/module_dtleds.go
+++ b/module_dtleds.go
@@ -55,7 +55,7 @@ func (m *DTLEDModule) SetOptions(options map[string]interface{}) error {
}
// Get a LED to manipulate. 'led' must be 0 to 3.
-func (m *DTLEDModule) GetLED(led string) (*DTLEDModuleLED, error) {
+func (m *DTLEDModule) GetLED(led string) (LEDModuleLED, error) {
led = strings.ToLower(led)
if ol := m.leds[led]; ol != nil {
|
Fix #<I>, GetLED has wrong signature leading to runtime error
|
diff --git a/tests/models.py b/tests/models.py
index <HASH>..<HASH> 100644
--- a/tests/models.py
+++ b/tests/models.py
@@ -18,3 +18,6 @@ class EmailUser(AbstractBaseUser):
def get_username(self):
return self.email
+
+ class Meta:
+ app_label = 'sudo_tests'
|
Give test model an app_label for Django <I>
|
diff --git a/doc/source/examples/dierickx_eccentricities.py b/doc/source/examples/dierickx_eccentricities.py
index <HASH>..<HASH> 100644
--- a/doc/source/examples/dierickx_eccentricities.py
+++ b/doc/source/examples/dierickx_eccentricities.py
@@ -1,5 +1,4 @@
import os, os.path
-import pexpect
import subprocess
from astropy.io import fits, ascii
from astropy import units
diff --git a/tests/test_actionAngle.py b/tests/test_actionAngle.py
index <HASH>..<HASH> 100644
--- a/tests/test_actionAngle.py
+++ b/tests/test_actionAngle.py
@@ -1274,7 +1274,7 @@ def test_estimateDeltaStaeckel_no_median():
#and the individual ones
indiv = numpy.array([estimateDeltaStaeckel(MWPotential2014, o.R(ts[i]), o.z(ts[i])) for i in range(10)])
#check that values agree
- assert (numpy.fabs(nomed-indiv) < 1e10).all(), 'no_median option returns different values to individual Delta estimation'
+ assert (numpy.fabs(nomed-indiv) < 1e-10).all(), 'no_median option returns different values to individual Delta estimation'
return None
def test_actionAngleStaeckel_indivdelta_actions_c():
|
modifications to tests for estimateDeltaStaeckel and removed import statement from dierickx_eccentricities
|
diff --git a/lib/flatiron/plugins/resourceful.js b/lib/flatiron/plugins/resourceful.js
index <HASH>..<HASH> 100644
--- a/lib/flatiron/plugins/resourceful.js
+++ b/lib/flatiron/plugins/resourceful.js
@@ -94,6 +94,8 @@ exports.init = function (done) {
app.config.get('resourceful') || {}
);
+ app.config.set('resourceful', options);
+
//
// Remark: Should we accept the autoMigrate option?
//
|
[fix] Set the `resourceful` config value in the app from provided options
|
diff --git a/core/src/main/java/com/orientechnologies/orient/core/record/impl/ODocument.java b/core/src/main/java/com/orientechnologies/orient/core/record/impl/ODocument.java
index <HASH>..<HASH> 100755
--- a/core/src/main/java/com/orientechnologies/orient/core/record/impl/ODocument.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/record/impl/ODocument.java
@@ -691,6 +691,9 @@ public class ODocument extends ORecordSchemaAwareAbstract<Object> implements Ite
if ("@class".equals(iFieldName)) {
setClassName(iPropertyValue.toString());
return this;
+ } else if ("@rid".equals(iFieldName)) {
+ _recordId.fromString(iPropertyValue.toString());
+ return this;
}
final int lastSep = _allowChainedAccess ? iFieldName.lastIndexOf('.') : -1;
|
Fixed issue #<I> about batch HTTP
|
diff --git a/tests/spec_test.py b/tests/spec_test.py
index <HASH>..<HASH> 100644
--- a/tests/spec_test.py
+++ b/tests/spec_test.py
@@ -19,6 +19,8 @@ builtins_path = '__builtin__'
if sys.version_info > (3,):
builtins_path = 'builtins'
long = int
+else:
+ builtins_path = 'yapconf.spec'
original_env = None
original_yaml_flag = yapconf.yaml_support
diff --git a/yapconf/spec.py b/yapconf/spec.py
index <HASH>..<HASH> 100644
--- a/yapconf/spec.py
+++ b/yapconf/spec.py
@@ -3,6 +3,7 @@ import logging
import json
import six
import os
+import sys
from box import Box
@@ -11,6 +12,9 @@ from yapconf.exceptions import YapconfSpecError, YapconfLoadError, \
YapconfItemNotFound
from yapconf.items import from_specification
+if sys.version_info.major < 3:
+ from io import open
+
class YapconfSpec(object):
"""Object which holds your configuration's specification.
|
Importing `open` from io package in Python 2
|
diff --git a/packages/webiny-app-cms/src/editor/plugins/defaultBar/components/PublishPageButton.js b/packages/webiny-app-cms/src/editor/plugins/defaultBar/components/PublishPageButton.js
index <HASH>..<HASH> 100644
--- a/packages/webiny-app-cms/src/editor/plugins/defaultBar/components/PublishPageButton.js
+++ b/packages/webiny-app-cms/src/editor/plugins/defaultBar/components/PublishPageButton.js
@@ -46,7 +46,7 @@ const PublishPageButton = ({ page, showSnackbar, router }) => {
});
}}
>
- Publish
+ {page.version > 1 ? "Publish changes" : "Publish"}
</ButtonPrimary>
)}
</Mutation>
|
fix: show "publish changes" instead of just "publish" when editing a new revision (#<I>)
|
diff --git a/djcelery/utils.py b/djcelery/utils.py
index <HASH>..<HASH> 100644
--- a/djcelery/utils.py
+++ b/djcelery/utils.py
@@ -7,7 +7,7 @@ from datetime import datetime
from django.conf import settings
# Database-related exceptions.
-from django.db.utils import DatabaseError
+from django.db import DatabaseError
try:
import MySQLdb as mysql
_my_database_errors = (mysql.DatabaseError, )
|
Fixes compatibility with Django < <I>
|
diff --git a/metal/end_model/loss.py b/metal/end_model/loss.py
index <HASH>..<HASH> 100644
--- a/metal/end_model/loss.py
+++ b/metal/end_model/loss.py
@@ -20,10 +20,9 @@ class SoftCrossEntropyLoss(nn.Module):
def __init__(self, weight=None, reduction="elementwise_mean"):
super().__init__()
- self.weight = weight
- if self.weight is not None:
- self.weight = torch.Tensor(self.weight)
- assert self.weight is None or isinstance(self.weight, torch.FloatTensor)
+ self.weight = None
+ if weight is not None:
+ self.weight = torch.FloatTensor(weight)
self.reduction = reduction
def forward(self, input, target):
|
Remove unnecessary assert and convert weight to FloatTensor
|
diff --git a/dask_kubernetes/core.py b/dask_kubernetes/core.py
index <HASH>..<HASH> 100644
--- a/dask_kubernetes/core.py
+++ b/dask_kubernetes/core.py
@@ -87,8 +87,8 @@ class Pod(ProcessInterface):
raise e
async def close(self, **kwargs):
- name, namespace = self._pod.metadata.name, self.namespace
if self._pod:
+ name, namespace = self._pod.metadata.name, self.namespace
try:
await self.core_api.delete_namespaced_pod(name, namespace)
except ApiException as e:
|
ensure Pod.close() succeeds when pod has already been removed (#<I>)
|
diff --git a/Tests/Controller/WikiControllerTest.php b/Tests/Controller/WikiControllerTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Controller/WikiControllerTest.php
+++ b/Tests/Controller/WikiControllerTest.php
@@ -46,6 +46,13 @@ final class WikiControllerTest extends AbstractBootstrapWebTestCase {
$client->request("GET", $url);
$this->assertEquals(200, $client->getResponse()->getStatusCode());
}
+
+ // Create a client.
+ $client = static::createClient();
+
+ // Make a GET request.
+ $client->request("GET", "/wiki/category/package/page");
+ $this->assertEquals(200, $client->getResponse()->getStatusCode());
}
}
|
Add a test for a unknown Wiki page
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.