diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/Behat/Behat/Console/BehatApplication.php b/src/Behat/Behat/Console/BehatApplication.php
index <HASH>..<HASH> 100644
--- a/src/Behat/Behat/Console/BehatApplication.php
+++ b/src/Behat/Behat/Console/BehatApplication.php
@@ -108,12 +108,17 @@ class BehatApplication extends Application
$profile = $input->getParameterOption(array('--profile', '-p')) ?: 'default';
$configs = array();
- // check for config file in FS if no provided
+ // if config file is not provided
if (!$configFile) {
+ // then use behat.yml
if (is_file($cwd.DIRECTORY_SEPARATOR.'behat.yml')) {
$configFile = $cwd.DIRECTORY_SEPARATOR.'behat.yml';
+ // or behat.yml.dist
} elseif (is_file($cwd.DIRECTORY_SEPARATOR.'behat.yml.dist')) {
$configFile = $cwd.DIRECTORY_SEPARATOR.'behat.yml.dist';
+ // or config/behat.yml
+ } elseif (is_file($cwd.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'behat.yml')) {
+ $configFile = $cwd.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'behat.yml';
}
}
|
added back support for config/behat.yml
|
diff --git a/salt/version.py b/salt/version.py
index <HASH>..<HASH> 100644
--- a/salt/version.py
+++ b/salt/version.py
@@ -32,4 +32,4 @@ def versions_report():
if __name__ == '__main__':
- print '\n'.join(versions_report())
+ print(__version__)
|
Don't break RPM building.
|
diff --git a/mod/chat/gui_header_js/chatinput.php b/mod/chat/gui_header_js/chatinput.php
index <HASH>..<HASH> 100644
--- a/mod/chat/gui_header_js/chatinput.php
+++ b/mod/chat/gui_header_js/chatinput.php
@@ -5,6 +5,7 @@ require("../lib.php");
require_variable($chat_sid);
optional_variable($groupid);
+optional_variable($chat_pretext, '');
if (!$chatuser = get_record("chat_users", "sid", $chat_sid)) {
echo "Not logged in!";
|
Fix for bug <I>:
One notice in debug mode removed.
|
diff --git a/core/src/main/java/com/github/phantomthief/util/MoreReflection.java b/core/src/main/java/com/github/phantomthief/util/MoreReflection.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/github/phantomthief/util/MoreReflection.java
+++ b/core/src/main/java/com/github/phantomthief/util/MoreReflection.java
@@ -34,9 +34,10 @@ public class MoreReflection {
if (iterator.hasNext()) {
temp = iterator.next();
}
+ } catch (UnsupportedClassVersionError e) {
+ logger.info("failed to use jdk9's [JEP 259: Stack-Walking API] as caller tracker.");
} catch (Throwable e) {
- logger.warn("failed to use jdk9's [JEP 259: Stack-Walking API] as caller tracker. exception:{}",
- e.toString());
+ logger.warn("failed to use jdk9's [JEP 259: Stack-Walking API] as caller tracker.", e);
}
if (temp == null) {
temp = new StackTraceProviderJdk8();
|
[code healthy] change log to info level.
|
diff --git a/WrightTools/_dataset.py b/WrightTools/_dataset.py
index <HASH>..<HASH> 100644
--- a/WrightTools/_dataset.py
+++ b/WrightTools/_dataset.py
@@ -117,9 +117,12 @@ class Dataset(h5py.Dataset):
@property
def _leaf(self):
out = self.natural_name
+ if self.size == 1:
+ out += f" = {self.points}"
if self.units is not None:
out += " ({0})".format(self.units)
- out += " {0}".format(self.shape)
+ if self.size != 1:
+ out += " {0}".format(self.shape)
return out
@property
|
print_tree with values for scalars (#<I>)
|
diff --git a/Rakefile.rb b/Rakefile.rb
index <HASH>..<HASH> 100644
--- a/Rakefile.rb
+++ b/Rakefile.rb
@@ -34,14 +34,24 @@ rescue LoadError # don't bail out when people do not have roodi installed!
end
end
+use_rcov = true
desc "Run all examples"
begin
+ gem "rcov"
+rescue LoadError
+ warn "rcov not installed...code coverage will not be measured!"
+ sleep 1
+ use_rcov = false
+end
+begin
SPEC_PATTERN ='spec/**/*_spec.rb'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new() do |t|
t.pattern = SPEC_PATTERN
- t.rcov = true
- t.rcov_opts = ['--exclude', '.*/gems/.*']
+ if use_rcov
+ t.rcov = true
+ t.rcov_opts = ['--exclude', '.*/gems/.*']
+ end
end
rescue LoadError
begin
@@ -51,7 +61,7 @@ rescue LoadError
end
rescue LoadError
task 'spec' do
- puts 'rspec not installed...will not be checked! please install gem install rspec'
+ puts 'rspec not installed...! please install with "gem install rspec"'
end
end
end
|
closes #<I> - gcov in not needed to execute specs
there was a load error when gcov gem was not installed
|
diff --git a/edisgo/flex_opt/storage_integration.py b/edisgo/flex_opt/storage_integration.py
index <HASH>..<HASH> 100644
--- a/edisgo/flex_opt/storage_integration.py
+++ b/edisgo/flex_opt/storage_integration.py
@@ -93,21 +93,22 @@ def connect_storage(storage, node):
"""
# add storage itself to graph
- node.grid.graph.add_node(storage, type='storage')
+ storage.grid.graph.add_node(storage, type='storage')
# add 1m connecting line to node the storage is connected to
- if isinstance(node.grid, MVGrid):
+ if isinstance(storage.grid, MVGrid):
voltage_level = 'mv'
else:
voltage_level = 'lv'
- line_type, line_count = select_cable(node.grid.network, voltage_level,
+ # ToDo: nominal_capacity is not quite right here
+ line_type, line_count = select_cable(storage.grid.network, voltage_level,
storage.nominal_capacity)
line = Line(
id=storage.id,
type=line_type,
kind='cable',
length=1e-3,
- grid=node.grid,
+ grid=storage.grid,
quantity=line_count)
- node.grid.graph.add_edge(node, storage, line=line, type='line')
+ storage.grid.graph.add_edge(node, storage, line=line, type='line')
|
Bug fix use grid of storage instead node
|
diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -105,10 +105,17 @@ func main() {
logger.Info("mariadb_ctrl started")
- err = <-process.Wait()
- //TODO: remove pidfile
+ processErr := <-process.Wait()
+
+ err = deletePidFile(config, logger)
if err != nil {
- logger.Fatal("Error starting mariadb_ctrl", err)
+ logger.Error("Error deleting pidfile", err, lager.Data{
+ "pidfile": config.PidFile,
+ })
+ }
+
+ if processErr != nil {
+ logger.Fatal("Error starting mariadb_ctrl", processErr)
}
logger.Info("Process exited without error.")
@@ -118,3 +125,8 @@ func writePidFile(config Config, logger lager.Logger) error {
logger.Info(fmt.Sprintf("Writing pid to %s", config.PidFile))
return ioutil.WriteFile(config.PidFile, []byte(strconv.Itoa(os.Getpid())), 0644)
}
+
+func deletePidFile(config Config, logger lager.Logger) error {
+ logger.Info(fmt.Sprintf("Deleting pidfile: %s", config.PidFile))
+ return os.Remove(config.PidFile)
+}
|
Remove pid file on shutting down the process.
[#<I>]
|
diff --git a/intranet/apps/events/models.py b/intranet/apps/events/models.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/events/models.py
+++ b/intranet/apps/events/models.py
@@ -162,7 +162,7 @@ class Event(models.Model):
def is_this_year(self):
"""Return whether the event was created after September 1st of this school year."""
now = datetime.now().date()
- ann = self.created_time.date()
+ ann = self.added.date()
if now.month < 9:
return ((ann.year == now.year and ann.month < 9) or (ann.year == now.year - 1 and ann.month >= 9))
else:
|
fix #<I>, events typo
|
diff --git a/src/Interfaces/StandardInterface.php b/src/Interfaces/StandardInterface.php
index <HASH>..<HASH> 100644
--- a/src/Interfaces/StandardInterface.php
+++ b/src/Interfaces/StandardInterface.php
@@ -22,6 +22,11 @@ namespace Benkle\FeedParser\Interfaces;
use Benkle\FeedParser\Parser;
use Benkle\FeedParser\RuleSet;
+/**
+ * Interface StandardInterface
+ * A Standard is a combination of rule set, feed class factory and feed identification.
+ * @package Benkle\FeedParser\Interfaces
+ */
interface StandardInterface
{
/**
@@ -47,4 +52,11 @@ interface StandardInterface
* @return Parser
*/
public function getParser();
+
+ /**
+ * Check if a dom document is a feed this standard handles.
+ * @param \DOMDocument $dom
+ * @return bool
+ */
+ public function canHandle(\DOMDocument $dom);
}
|
Added some comments to StandardInterface and a canHandle method
|
diff --git a/warrant/tests/tests.py b/warrant/tests/tests.py
index <HASH>..<HASH> 100644
--- a/warrant/tests/tests.py
+++ b/warrant/tests/tests.py
@@ -90,15 +90,16 @@ class CognitoAuthTestCase(unittest.TestCase):
# self.assertEqual(self.user.access_token,None)
@patch('warrant.Cognito', autospec=True)
- def test_register(self,cognito_user):
+ def test_register(self, cognito_user):
u = cognito_user(self.cognito_user_pool_id, self.app_id,
username=self.username)
- res = u.register('sampleuser','sample4#Password',
- given_name='Brian',family_name='Jones',
- name='Brian Jones',
- email='bjones39@capless.io',
- phone_number='+19194894555',gender='Male',
- preferred_username='billyocean')
+ u.add_base_attributes(
+ given_name='Brian', family_name='Jones',
+ name='Brian Jones', email='bjones39@capless.io',
+ phone_number='+19194894555', gender='Male',
+ preferred_username='billyocean')
+ res = u.register('sampleuser', 'sample4#Password')
+
#TODO: Write assumptions
|
Fixed a test, applied a new style of adding attributes
|
diff --git a/lib/tty/prompt/keypress.rb b/lib/tty/prompt/keypress.rb
index <HASH>..<HASH> 100644
--- a/lib/tty/prompt/keypress.rb
+++ b/lib/tty/prompt/keypress.rb
@@ -96,7 +96,6 @@ module TTY
else
job.()
end
- rescue Timeout::Error
end
end # Keypress
end # Prompt
|
Change to stop rescuing error as no longer raised
|
diff --git a/src/EchoIt/JsonApi/Handler.php b/src/EchoIt/JsonApi/Handler.php
index <HASH>..<HASH> 100644
--- a/src/EchoIt/JsonApi/Handler.php
+++ b/src/EchoIt/JsonApi/Handler.php
@@ -136,7 +136,7 @@ abstract class Handler
foreach ($value as $obj) {
// Check whether the object is already included in the response on it's ID
- if (in_array ($obj->getKey (), $links->lists ($obj->primaryKey))) continue;
+ if (in_array($obj->getKey (), $links->lists($obj->primaryKey))) continue;
$links->push($obj);
}
|
PSR-2 style fixed on Handler.php
|
diff --git a/pymbar/mbar.py b/pymbar/mbar.py
index <HASH>..<HASH> 100644
--- a/pymbar/mbar.py
+++ b/pymbar/mbar.py
@@ -1940,6 +1940,8 @@ class MBAR:
# Initialize all f_k to zero.
if f_k_init is None:
f_k_init = np.zeros(len(self.f_k))
+
+ starting_f_k_init = f_k_init.copy()
for index in range(0, np.size(initialization_order) - 1):
k = initialization_order[index]
l = initialization_order[index + 1]
@@ -1959,7 +1961,8 @@ class MBAR:
+ bar(
w_F,
w_R,
- DeltaF=f_k_init[l] - f_k_init[k],
+ method="bisection",
+ DeltaF=starting_f_k_init[l] - starting_f_k_init[k],
relative_tolerance=0.000001,
verbose=False,
compute_uncertainty=False,
|
Improved handling of BAR
For boostrapping, used bisection to be more sure of converging.
|
diff --git a/packages/ra-data-simple-rest/src/index.js b/packages/ra-data-simple-rest/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/ra-data-simple-rest/src/index.js
+++ b/packages/ra-data-simple-rest/src/index.js
@@ -127,7 +127,7 @@ export default (apiUrl, httpClient = fetchUtils.fetchJson) => {
case CREATE:
return { data: { ...params.data, id: json.id } };
case DELETE_MANY: {
- return { data: json ? json : [] };
+ return { data: json || [] };
}
default:
return { data: json };
|
Update packages/ra-data-simple-rest/src/index.js
|
diff --git a/providers/facebook/facebook.go b/providers/facebook/facebook.go
index <HASH>..<HASH> 100644
--- a/providers/facebook/facebook.go
+++ b/providers/facebook/facebook.go
@@ -133,11 +133,19 @@ func newConfig(provider *Provider, scopes []string) *oauth2.Config {
AuthURL: authURL,
TokenURL: tokenURL,
},
- Scopes: []string{},
+ Scopes: []string{
+ "email",
+ },
+ }
+
+ defaultScopes := map[string]struct{}{
+ "email": {},
}
for _, scope := range scopes {
- c.Scopes = append(c.Scopes, scope)
+ if _, exists := defaultScopes[scope]; !exists {
+ c.Scopes = append(c.Scopes, scope)
+ }
}
return c
|
Set "email" scope in facebook auth
Fix #<I>
|
diff --git a/admin.go b/admin.go
index <HASH>..<HASH> 100644
--- a/admin.go
+++ b/admin.go
@@ -81,7 +81,15 @@ func StartAdmin(initialConfigJSON []byte) error {
}
}
- ln, err := net.Listen("tcp", adminConfig.Listen)
+ // extract a singular listener address
+ netw, listenAddrs, err := ParseNetworkAddress(adminConfig.Listen)
+ if err != nil {
+ return fmt.Errorf("parsing admin listener address: %v", err)
+ }
+ if len(listenAddrs) != 1 {
+ return fmt.Errorf("admin endpoint must have exactly one listener; cannot listen on %v", listenAddrs)
+ }
+ ln, err := net.Listen(netw, listenAddrs[0])
if err != nil {
return err
}
|
admin: Allow listening on unix socket (closes #<I>)
|
diff --git a/lxd/daemon.go b/lxd/daemon.go
index <HASH>..<HASH> 100644
--- a/lxd/daemon.go
+++ b/lxd/daemon.go
@@ -1468,20 +1468,16 @@ func (d *Daemon) Ready() error {
return nil
}
-func (d *Daemon) numRunningInstances() (int, error) {
- results, err := instance.LoadNodeAll(d.State(), instancetype.Any)
- if err != nil {
- return 0, err
- }
-
+// numRunningInstances returns the number of running instances.
+func (d *Daemon) numRunningInstances(instances []instance.Instance) int {
count := 0
- for _, instance := range results {
+ for _, instance := range instances {
if instance.IsRunning() {
count = count + 1
}
}
- return count, nil
+ return count
}
// Stop stops the shared daemon.
|
lxd/daemon: Updates numRunningInstances to accept a list of instances to check
|
diff --git a/pyseleniumjs/__init__.py b/pyseleniumjs/__init__.py
index <HASH>..<HASH> 100644
--- a/pyseleniumjs/__init__.py
+++ b/pyseleniumjs/__init__.py
@@ -0,0 +1 @@
+from e2ejs import E2EJS
\ No newline at end of file
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup(
name='pyseleniumjs',
description='Small library with javascript utilities for official Python selenium bindings.',
- version='1.0.2b2',
+ version='1.0.2b5',
url='https://github.com/neetVeritas/pyselenium-js',
author='John Nolette',
author_email='john@neetgroup.net',
|
Updated package version, finished pypi export.
|
diff --git a/paxtools-core/src/main/java/org/biopax/paxtools/controller/Integrator.java b/paxtools-core/src/main/java/org/biopax/paxtools/controller/Integrator.java
index <HASH>..<HASH> 100644
--- a/paxtools-core/src/main/java/org/biopax/paxtools/controller/Integrator.java
+++ b/paxtools-core/src/main/java/org/biopax/paxtools/controller/Integrator.java
@@ -11,7 +11,7 @@ import java.util.*;
/**
*
- * This class is intended to merge and to integrate biopax models
+ * This class is intended to merge and to integrate <em>BioPAX Level2</em> models
* not necessarily from the same resource - if models allow such a
* thing. This class has very similar functionality to the controller.Merger
* but it differs in means of merging/integrating methodology.
|
Comment: the ..controller.Integrator is for BioPAX Level2 models (an is old, needs testing...)
|
diff --git a/eZ/Publish/Core/Repository/UserService.php b/eZ/Publish/Core/Repository/UserService.php
index <HASH>..<HASH> 100644
--- a/eZ/Publish/Core/Repository/UserService.php
+++ b/eZ/Publish/Core/Repository/UserService.php
@@ -32,6 +32,7 @@ use eZ\Publish\Core\Repository\Values\User\UserCreateStruct,
eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue,
eZ\Publish\Core\Base\Exceptions\BadStateException,
eZ\Publish\Core\Base\Exceptions\InvalidArgumentException,
+ eZ\Publish\Core\Base\Exceptions\NotFoundException,
ezcMailTools;
@@ -444,6 +445,10 @@ class UserService implements UserServiceInterface
throw new InvalidArgumentValue( "password", $password );
$spiUsers = $this->persistenceHandler->userHandler()->loadByLogin( $login );
+
+ if ( empty( $spiUsers ) )
+ throw new NotFoundException( "user", $login );
+
if ( count( $spiUsers ) > 1 )
{
// something went wrong, we should not have more than one
@@ -459,7 +464,7 @@ class UserService implements UserServiceInterface
);
if ( $spiUsers[0]->passwordHash !== $passwordHash )
- throw new InvalidArgumentValue( "password", $password );
+ throw new NotFoundException( "user", $login );
return $this->buildDomainUserObject( $spiUsers[0] );
}
|
Throw NotFoundException if no users are found and if password is wrong in UserService::loadUserByCredentials
|
diff --git a/ethlog/loggers_test.go b/ethlog/loggers_test.go
index <HASH>..<HASH> 100644
--- a/ethlog/loggers_test.go
+++ b/ethlog/loggers_test.go
@@ -107,11 +107,11 @@ func TestLoggerPrintf(t *testing.T) {
testLogSystem := &TestLogSystem{level: WarnLevel}
AddLogSystem(testLogSystem)
logger.Errorf("error to %v\n", []int{1, 2, 3})
- logger.Warnf("warn")
+ logger.Warnf("warn %%d %d", 5)
logger.Infof("info")
logger.Debugf("debug")
Flush()
- testLogSystem.CheckOutput(t, "[TEST] error to [1 2 3]\n[TEST] warn")
+ testLogSystem.CheckOutput(t, "[TEST] error to [1 2 3]\n[TEST] warn %d 5")
}
func TestMultipleLogSystems(t *testing.T) {
|
ethlog: add test for '%' in log message
This test fails because the log message is formatted twice.
|
diff --git a/pyamg/util/tests/test_utils.py b/pyamg/util/tests/test_utils.py
index <HASH>..<HASH> 100644
--- a/pyamg/util/tests/test_utils.py
+++ b/pyamg/util/tests/test_utils.py
@@ -1313,13 +1313,13 @@ class TestLevelize(TestCase):
assert_equal(max_coarse, 5)
# test 5
max_levels, max_coarse, result = levelize_strength_or_aggregation(('predefined',{'C' : A}), 5, 5)
- assert_equal(result, [('predefined',{'C' : A})])
+ assert_array_equal(result, [('predefined',{'C' : A})])
assert_equal(max_levels, 2)
assert_equal(max_coarse, 0)
# test 6
max_levels, max_coarse, result = levelize_strength_or_aggregation([('predefined',{'C' : A}), \
('predefined',{'C' : A})], 5, 5)
- assert_equal(result, [('predefined',{'C' : A}), ('predefined',{'C' : A})])
+ assert_array_equal(result, [('predefined',{'C' : A}), ('predefined',{'C' : A})])
assert_equal(max_levels, 3)
assert_equal(max_coarse, 0)
# test 7
|
changed unit test to assert_array_equal for levelize
|
diff --git a/lib/spidr/settings/proxy.rb b/lib/spidr/settings/proxy.rb
index <HASH>..<HASH> 100644
--- a/lib/spidr/settings/proxy.rb
+++ b/lib/spidr/settings/proxy.rb
@@ -15,7 +15,7 @@ module Spidr
# The Spidr proxy information.
#
def proxy
- @proxy || Spidr::Proxy.new
+ @proxy ||= Spidr::Proxy.new
end
#
|
Set @proxy to a default proxy to avoid creating too many objects.
|
diff --git a/lib/Wave/Http/Response.php b/lib/Wave/Http/Response.php
index <HASH>..<HASH> 100644
--- a/lib/Wave/Http/Response.php
+++ b/lib/Wave/Http/Response.php
@@ -55,12 +55,16 @@ class Response
public function send()
{
+
if (headers_sent()) {
return false;
}
+ // @codeCoverageIgnoreStart
foreach ($this->headers as $header => $status) {
header($header, true, $status);
}
+
}
}
+// @codeCoverageIgnoreEnd
diff --git a/lib/tests/Http/ResponseTest.php b/lib/tests/Http/ResponseTest.php
index <HASH>..<HASH> 100644
--- a/lib/tests/Http/ResponseTest.php
+++ b/lib/tests/Http/ResponseTest.php
@@ -103,6 +103,6 @@ class ResponseTest extends PHPUnit_Framework_TestCase
/*
* This is expected as command line is headerless context
*/
- $this->assertFalse($this->response->send());
+ $this->assertFalse($this->response->send(true));
}
}
\ No newline at end of file
|
Removed second part of the method from coverage reports. Output starts from phpunit.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -140,8 +140,27 @@ if (fs.lchmod) wrap(fs, 'lchmod', activator);
if (fs.ftruncate) wrap(fs, 'ftruncate', activator);
// Wrap zlib streams
-var zProto = Object.getPrototypeOf(require('zlib').Deflate.prototype);
-wrap(zProto, "_transform", activator);
+var zlib;
+try { zlib = require('zlib'); } catch (err) { }
+if (zlib && zlib.Deflate && zlib.Deflate.prototype) {
+ var proto = Object.getPrototypeOf(zlib.Deflate.prototype);
+ if (proto._transform) {
+ // streams2
+ wrap(proto, "_transform", activator);
+ }
+ else if (proto.write && proto.flush && proto.end) {
+ // plain ol' streams
+ massWrap(
+ proto,
+ [
+ 'write',
+ 'flush',
+ 'end'
+ ],
+ activator
+ );
+ }
+}
// Wrap Crypto
var crypto;
|
polyfill: extend support for zlib to node <I>.x
zlib in <I>.x is based on streams1, and in <I>.x it uses streams2. Also
note that the monkeypunching done here operates on the Zlib proto in
both cases (i.e. Deflate's prototype's prototype), so it catches all of
the zlib methods. Clever clever creationix!
|
diff --git a/tests/Fixture/ProductAttributeFixturesTest.php b/tests/Fixture/ProductAttributeFixturesTest.php
index <HASH>..<HASH> 100644
--- a/tests/Fixture/ProductAttributeFixturesTest.php
+++ b/tests/Fixture/ProductAttributeFixturesTest.php
@@ -32,7 +32,7 @@ final class ProductAttributeFixturesTest extends KernelTestCase
$suite = new Suite('test');
$suite->addListener($listenerRegistry->getListener('orm_purger'), ['mode' => 'delete', 'exclude' => [], 'managers' => [null]]);
- $suite->addFixture($fixtureRegistry->getFixture('locale'), ['locales' => ['en_US'], 'load_default_locale' => false]);
+ $suite->addFixture($fixtureRegistry->getFixture('locale'), ['locales' => [], 'load_default_locale' => true]);
$suite->addFixture($fixtureRegistry->getFixture('taxon'), ['custom' => ['books' => ['name' => 'Books', 'code' => 'BOOKS']]]);
$suite->addFixture($fixtureRegistry->getFixture('product_attribute'), ['custom' => [
'book_author' => ['name' => 'Author', 'code' => 'AUTHOR', 'type' => 'text'],
|
Downport changes from <I> to <I>
|
diff --git a/pkg/model/iam/iam_builder.go b/pkg/model/iam/iam_builder.go
index <HASH>..<HASH> 100644
--- a/pkg/model/iam/iam_builder.go
+++ b/pkg/model/iam/iam_builder.go
@@ -66,6 +66,13 @@ func (b *IAMPolicyBuilder) BuildAWSIAMPolicy() (*IAMPolicy, error) {
// Don't give bastions any permissions (yet)
if b.Role == api.InstanceGroupRoleBastion {
+ p.Statement = append(p.Statement, &IAMStatement{
+ // We grant a trivial (?) permission (DescribeRegions), because empty policies are not allowed
+ Effect: IAMStatementEffectAllow,
+ Action: []string{"ec2:DescribeRegions"},
+ Resource: []string{"*"},
+ })
+
return p, nil
}
|
Create stub IAM policy for bastions
|
diff --git a/volatildap/control.py b/volatildap/control.py
index <HASH>..<HASH> 100644
--- a/volatildap/control.py
+++ b/volatildap/control.py
@@ -25,6 +25,7 @@ class ControlServer(http.server.ThreadingHTTPServer):
def start(self):
if self._thread is not None:
+ # Already started
return
self._thread = threading.Thread(
target=self.serve_forever,
@@ -33,7 +34,10 @@ class ControlServer(http.server.ThreadingHTTPServer):
self._thread.start()
def stop(self):
+ if self._thread is None:
+ return
self.shutdown()
+ self.server_close()
self._thread.join()
self._thread = None
|
Properly stop the control server.
Including cleaning up the resources.
|
diff --git a/cmd/global-heal.go b/cmd/global-heal.go
index <HASH>..<HASH> 100644
--- a/cmd/global-heal.go
+++ b/cmd/global-heal.go
@@ -68,6 +68,9 @@ func newBgHealSequence() *healSequence {
}
func getLocalBackgroundHealStatus() (madmin.BgHealState, bool) {
+ if globalBackgroundHealState == nil {
+ return madmin.BgHealState{}, false
+ }
bgSeq, ok := globalBackgroundHealState.getHealSequenceByToken(bgHealingUUID)
if !ok {
return madmin.BgHealState{}, false
|
fix: server panic in FS mode (#<I>)
fixes #<I>
|
diff --git a/Event/DoctrineToEAVEventConverter.php b/Event/DoctrineToEAVEventConverter.php
index <HASH>..<HASH> 100644
--- a/Event/DoctrineToEAVEventConverter.php
+++ b/Event/DoctrineToEAVEventConverter.php
@@ -100,7 +100,7 @@ class DoctrineToEAVEventConverter implements EventSubscriber
$data = $valueChangeset['data'][0];
}
}
- if (null === $data) {
+ if (!$data instanceof DataInterface) {
$this->logger->error(
"Unable to find any previous data associated to Value: {$changedValue->getIdentifier()}"
);
|
Fixing error where EAVEvent is triggered with a non-EAV data
|
diff --git a/src/AnimeDb/Bundle/CatalogBundle/Controller/NoticeController.php b/src/AnimeDb/Bundle/CatalogBundle/Controller/NoticeController.php
index <HASH>..<HASH> 100644
--- a/src/AnimeDb/Bundle/CatalogBundle/Controller/NoticeController.php
+++ b/src/AnimeDb/Bundle/CatalogBundle/Controller/NoticeController.php
@@ -64,7 +64,7 @@ class NoticeController extends Controller
}
$em->flush();
}
- return $this->redirect($this->generateUrl('notice_list'));
+ return $this->redirect($this->generateUrl('notice_list', $current_page ? ['page' => $current_page] : []));
}
// get count all items
|
after remove notice save current page in redirect
|
diff --git a/Controller/AdminController.php b/Controller/AdminController.php
index <HASH>..<HASH> 100644
--- a/Controller/AdminController.php
+++ b/Controller/AdminController.php
@@ -117,8 +117,20 @@ class AdminController extends Controller
{
$accelerators = '';
- if (function_exists('apc_store') && ini_get('apc.enabled')) {
- $accelerators = 'APC';
+ if (function_exists('apc_store')) {
+ if (ini_get('apc.enabled')) {
+ $accelerators = 'APC';
+ } else {
+ $accelerators = 'APC (disabled)';
+ }
+ }
+
+ if (function_exists('apcu_store')) {
+ if (ini_get('apc.enabled')) {
+ $accelerators = 'APCu';
+ } else {
+ $accelerators = 'APCu (disabled)';
+ }
}
if (extension_loaded('wincache') and ini_get('wincache.ocenabled')) {
|
apcu in sysinfo
|
diff --git a/hazelcast-jet-core/src/main/java/com/hazelcast/jet/impl/connector/IListWriter.java b/hazelcast-jet-core/src/main/java/com/hazelcast/jet/impl/connector/IListWriter.java
index <HASH>..<HASH> 100644
--- a/hazelcast-jet-core/src/main/java/com/hazelcast/jet/impl/connector/IListWriter.java
+++ b/hazelcast-jet-core/src/main/java/com/hazelcast/jet/impl/connector/IListWriter.java
@@ -24,6 +24,7 @@ import com.hazelcast.jet.Processor;
import com.hazelcast.jet.ProcessorSupplier;
import javax.annotation.Nonnull;
+import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
@@ -32,7 +33,8 @@ import static java.util.stream.Collectors.toList;
public final class IListWriter implements Processor {
- private List list;
+ private final List list;
+ private final ArrayList<Object> buffer = new ArrayList<>();
IListWriter(List list) {
this.list = list;
@@ -40,7 +42,9 @@ public final class IListWriter implements Processor {
@Override
public void process(int ordinal, @Nonnull Inbox inbox) {
- inbox.drainTo(list);
+ inbox.drainTo(buffer);
+ list.addAll(buffer);
+ buffer.clear();
}
@Override
|
Speed up writes to IList by writing in bulk
|
diff --git a/classes/ezgmaplocation.php b/classes/ezgmaplocation.php
index <HASH>..<HASH> 100644
--- a/classes/ezgmaplocation.php
+++ b/classes/ezgmaplocation.php
@@ -55,7 +55,10 @@ class eZGmapLocation extends eZPersistentObject
'name' => 'contentobject_attribute_id',
'datatype' => 'integer',
'default' => 0,
- 'required' => true ),
+ 'required' => true,
+ 'foreign_class' => 'eZContentObjectAttribute',
+ 'foreign_attribute' => 'id',
+ 'multiplicity' => '1..*' ),
'contentobject_version' => array(
'name' => 'contentobject_version',
'datatype' => 'integer',
|
- Added foreign key meta data to contentobject_attribute_id's field definition
|
diff --git a/test/robots/can-crawl.js b/test/robots/can-crawl.js
index <HASH>..<HASH> 100644
--- a/test/robots/can-crawl.js
+++ b/test/robots/can-crawl.js
@@ -58,10 +58,6 @@ describe('can-crawl-async', () => {
expect(robotsParser.canCrawl('test.com')).to.be.an.instanceOf(Promise);
});
- it('Should call the callback (uncached).', (done) => {
- expect(robotsParser.canCrawl('http://bbc.co.uk', done));
- });
-
it('Should call the callback (cached).', (done) => {
robotsParser.parseRobots('http://example.com', exampleRobotsShort);
expect(robotsParser.canCrawl('http://example.com', done));
|
Removed test that fails due to github coveralls script timeout.
|
diff --git a/PLYBinaryExporter.js b/PLYBinaryExporter.js
index <HASH>..<HASH> 100644
--- a/PLYBinaryExporter.js
+++ b/PLYBinaryExporter.js
@@ -132,8 +132,8 @@ THREE.PLYBinaryExporter.prototype = {
var vertexListLength = vertexCount * ( 4 * 3 + ( includeNormals ? 4 * 3 : 0 ) + ( includeColors ? 3 : 0 ) + ( includeUVs ? 4 * 2 : 0 ) );
// 1 byte shape desciptor
- // 3 vertex indices at 4 bytes
- var faceListLength = faceCount * ( 4 * 3 + 1 );
+ // 3 vertex indices at ${indexByteCount} bytes
+ var faceListLength = faceCount * ( indexByteCount * 3 + 1 );
var output = new DataView( new ArrayBuffer( headerBin.length + vertexListLength + faceListLength ) );
new Uint8Array( output.buffer ).set( headerBin, 0 );
|
Account for the face index size in the initial array buffer
|
diff --git a/lib/chef/resource/windows_share.rb b/lib/chef/resource/windows_share.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/resource/windows_share.rb
+++ b/lib/chef/resource/windows_share.rb
@@ -241,6 +241,10 @@ class Chef
Chef::Log.debug("Running '#{share_cmd}' to create the share")
powershell_out!(share_cmd)
+
+ # New-SmbShare adds the "Everyone" user with read access no matter what so we need to remove it
+ # before we add our permissions
+ revoke_user_permissions(["Everyone"])
end
# determine what users in the current state don't exist in the desired state
@@ -296,6 +300,8 @@ class Chef
false
end
+ # revoke user permissions from a share
+ # @param [Array] users
def revoke_user_permissions(users)
revoke_command = "Revoke-SmbShareAccess -Name '#{new_resource.share_name}' -AccountName \"#{users.join(',')}\" -Force"
Chef::Log.debug("Running '#{revoke_command}' to revoke share permissions")
|
windows_share: Fix idempotency by removing the "everyone" access
This resource uses powershell under the hood and calls new-smbshare,
which defaults to adding read only access to the everyone group. With
this change when we create the share we'll remove that permission. Once
that's done we'll go about adding our desired permissions. This only
runs once so the overhead is pretty low and fixes idempotency.
|
diff --git a/test/unit/GetDepthCapableTraitTest.php b/test/unit/GetDepthCapableTraitTest.php
index <HASH>..<HASH> 100644
--- a/test/unit/GetDepthCapableTraitTest.php
+++ b/test/unit/GetDepthCapableTraitTest.php
@@ -130,12 +130,15 @@ class GetDepthCapableTraitTest extends TestCase
public function testGetDepth()
{
$segments = [uniqid('segment'), uniqid('segment')];
- $subject = $this->createInstance(['_getPathSegments']);
+ $subject = $this->createInstance(['_getPathSegments', '_countIterable']);
$_subject = $this->reflect($subject);
$subject->expects($this->exactly(1))
->method('_getPathSegments')
->will($this->returnValue($segments));
+ $subject->expects($this->exactly(1))
+ ->method('_countIterable')
+ ->will($this->returnValue(count($segments)));
$result = $_subject->_getDepth();
$this->assertEquals(count($segments) - 1, $result, 'Retrieved depth is wrong');
|
Changed expectations for `GetDepthCapableTrait`
Now must abstract counting of the path segments
|
diff --git a/titan-cassandra/src/main/java/com/thinkaurelius/titan/diskstorage/cassandra/astyanax/AstyanaxStoreManager.java b/titan-cassandra/src/main/java/com/thinkaurelius/titan/diskstorage/cassandra/astyanax/AstyanaxStoreManager.java
index <HASH>..<HASH> 100644
--- a/titan-cassandra/src/main/java/com/thinkaurelius/titan/diskstorage/cassandra/astyanax/AstyanaxStoreManager.java
+++ b/titan-cassandra/src/main/java/com/thinkaurelius/titan/diskstorage/cassandra/astyanax/AstyanaxStoreManager.java
@@ -163,8 +163,7 @@ public class AstyanaxStoreManager extends AbstractCassandraStoreManager {
@Override
public Deployment getDeployment() {
- //return Deployment.REMOTE;
- //return LOCAL if over localhost else REMOTE
+ return Deployment.REMOTE; // TODO
}
@Override
|
Make Astyanax always assume Deployment.REMOTE
This is a slight improvement over returning nothing and causing a
compile error.
|
diff --git a/holoviews/core/data/grid.py b/holoviews/core/data/grid.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/data/grid.py
+++ b/holoviews/core/data/grid.py
@@ -548,6 +548,9 @@ class GridInterface(DictInterface):
@classmethod
def select(cls, dataset, selection_mask=None, **selection):
+ if selection_mask is not None:
+ raise ValueError("Masked selections currently not supported for {0}.".format(cls.__name__))
+
dimensions = dataset.kdims
val_dims = [vdim for vdim in dataset.vdims if vdim in selection]
if val_dims:
diff --git a/holoviews/core/data/xarray.py b/holoviews/core/data/xarray.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/data/xarray.py
+++ b/holoviews/core/data/xarray.py
@@ -537,6 +537,9 @@ class XArrayInterface(GridInterface):
@classmethod
def select(cls, dataset, selection_mask=None, **selection):
+ if selection_mask is not None:
+ return dataset.data.where(selection_mask, drop=True)
+
validated = {}
for k, v in selection.items():
dim = dataset.get_dimension(k, strict=True)
|
Support selection masks and expressions on gridded data (#<I>)
|
diff --git a/src/Command/Humbug.php b/src/Command/Humbug.php
index <HASH>..<HASH> 100644
--- a/src/Command/Humbug.php
+++ b/src/Command/Humbug.php
@@ -539,6 +539,10 @@ class Humbug extends Command
AdapterAbstract $testFrameworkAdapter,
ProgressBar $progressBar
) {
+ $onProgress = function ($count) use ($progressBar) {
+ $progressBar->setProgress($count);
+ };
+
$hasFailure = false;
$process->start();
@@ -546,7 +550,7 @@ class Humbug extends Command
while ($process->isRunning()) {
usleep(2500);
if (($count = $testFrameworkAdapter->hasOks($process->getOutput()))) {
- $progressBar->setProgress($count);
+ $onProgress($count);
$process->clearOutput();
} elseif (!$testFrameworkAdapter->ok($process->getOutput())) {
sleep(1);
@@ -555,7 +559,7 @@ class Humbug extends Command
}
}
$process->stop();
-
+
return $hasFailure;
}
}
|
Some code rearrange - onProgress callback introduced
|
diff --git a/lib/container.js b/lib/container.js
index <HASH>..<HASH> 100644
--- a/lib/container.js
+++ b/lib/container.js
@@ -28,11 +28,15 @@ module.exports = function(config, logger) {
* out - ouput stream
* cb - complete callback
*/
+ /*
+ * commented out as it the blank-container does not need any
+ * specific building.
var build = function build(mode, system, cdef, out, cb) {
logger.info('building');
out.stdout('building');
cb(null, {});
};
+ */
@@ -127,7 +131,6 @@ module.exports = function(config, logger) {
return {
- build: build,
deploy: deploy,
start: start,
stop: stop,
|
Do not expose build, as it does nothing.
|
diff --git a/ospd/ospd.py b/ospd/ospd.py
index <HASH>..<HASH> 100644
--- a/ospd/ospd.py
+++ b/ospd/ospd.py
@@ -1497,10 +1497,11 @@ class OSPDaemon:
return count
def get_count_running_scans(self) -> int:
- """ Get the amount of scans with RUNNING status """
+ """ Get the amount of scans with INIT/RUNNING status """
count = 0
for scan_id in self.scan_collection.ids_iterator():
- if self.get_scan_status(scan_id) == ScanStatus.RUNNING:
+ status = self.get_scan_status(scan_id)
+ if status == ScanStatus.RUNNING or status == ScanStatus.INIT:
count += 1
return count
|
Consider INIT and RUNNING status for running scans, since an INIT scan is not in the queue anymore
(cherry picked from commit 2acd<I>fbb<I>a<I>cc<I>a<I>e<I>eee<I>)
|
diff --git a/railties/test/rails_info_controller_test.rb b/railties/test/rails_info_controller_test.rb
index <HASH>..<HASH> 100644
--- a/railties/test/rails_info_controller_test.rb
+++ b/railties/test/rails_info_controller_test.rb
@@ -50,7 +50,6 @@ class InfoControllerTest < ActionController::TestCase
test "info controller renders with routes" do
get :routes
- assert_select 'pre'
+ assert_select 'table#routeTable'
end
-
end
|
Fix failing test in railties
Related to the HTML route inspector changes:
ae<I>fc<I>e<I>ab<I>c<I>fd<I>e<I>f6b<I>
|
diff --git a/system/HTTP/Files/FileCollection.php b/system/HTTP/Files/FileCollection.php
index <HASH>..<HASH> 100644
--- a/system/HTTP/Files/FileCollection.php
+++ b/system/HTTP/Files/FileCollection.php
@@ -310,7 +310,7 @@ class FileCollection
*/
protected function getValueDotNotationSyntax(array $index, array $value)
{
- if (is_array($index) && ! empty($index))
+ if (! empty($index))
{
$current_index = array_shift($index);
}
|
Remove pointless check from conditional
Because the argument $index has a type declaration of 'array' there is no point in using is_array($index) in the conditional.
|
diff --git a/manticore/ethereum.py b/manticore/ethereum.py
index <HASH>..<HASH> 100644
--- a/manticore/ethereum.py
+++ b/manticore/ethereum.py
@@ -1163,7 +1163,7 @@ class ManticoreEVM(Manticore):
tx_summary.write('\n')
tx_summary.write( "Function call:\n")
tx_summary.write("%s(" % state.solve_one(function_name ))
- tx_summary.write(','.join(map(str, map(state.solve_one, arguments))))
+ tx_summary.write(','.join(map(repr, map(state.solve_one, arguments))))
is_argument_symbolic = any(map(issymbolic, arguments))
is_something_symbolic = is_something_symbolic or is_argument_symbolic
tx_summary.write(') -> %s %s\n' % ( tx.result, flagged(is_argument_symbolic)))
|
Improved readability of .tx files using repr to print function call arguments (#<I>)
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -56,7 +56,7 @@ class Service extends AdapterService {
if (!this.options.Model) {
throw new Error('The Model getter was called with no Model provided in options!');
}
-
+
return this.options.Model;
}
@@ -256,7 +256,7 @@ class Service extends AdapterService {
// By default we will just query for the one id. For multi patch
// we create a list of the ids of all items that will be changed
// to re-query them after the update
- const ids = id === null ? this._find(params)
+ const ids = id === null ? this._getOrFind(null, params)
.then(mapIds) : Promise.resolve([ id ]);
return ids.then(idList => {
|
Fix issue with patch when using pagination by default (#<I>)
|
diff --git a/raiden/utils/migrations/v17_to_v18.py b/raiden/utils/migrations/v17_to_v18.py
index <HASH>..<HASH> 100644
--- a/raiden/utils/migrations/v17_to_v18.py
+++ b/raiden/utils/migrations/v17_to_v18.py
@@ -5,6 +5,9 @@ from raiden.exceptions import RaidenDBUpgradeError
from raiden.transfer.state import RouteState
from raiden.utils.typing import Any, Dict
+SOURCE_VERSION = 17
+TARGET_VERSION = 18
+
def get_snapshots(cursor: sqlite3.Cursor):
cursor.execute('SELECT identifier, data FROM state_snapshot')
@@ -97,5 +100,7 @@ def upgrade_mediators_with_waiting_transfer(
old_version: int,
current_version: int,
):
- if current_version > 17:
+ if old_version == SOURCE_VERSION:
_add_routes_to_mediator(cursor)
+
+ return TARGET_VERSION
|
Only run migration if old_version is <I>
|
diff --git a/src/Orders/OrdersStatus.php b/src/Orders/OrdersStatus.php
index <HASH>..<HASH> 100644
--- a/src/Orders/OrdersStatus.php
+++ b/src/Orders/OrdersStatus.php
@@ -104,6 +104,11 @@ class OrdersStatus {
return $result;
}
+ /**
+ * [RO] Preluare lista de statusuri ale comenzilor (https://github.com/celdotro/marketplace/wiki/Preluare-lista-de-statusuri-pentru-comenzi)
+ * [EN] Retrieves the list of statuses for orders (https://github.com/celdotro/marketplace/wiki/Get-status-list-for-orders)
+ * @return mixed
+ */
public function getOrderStatusList(){
// Set method and action
$method = 'orders';
|
Added comments for order status list retrieval
|
diff --git a/lib/escher/auth.rb b/lib/escher/auth.rb
index <HASH>..<HASH> 100644
--- a/lib/escher/auth.rb
+++ b/lib/escher/auth.rb
@@ -9,7 +9,7 @@ module Escher
@current_time = options[:current_time] || Time.now
@auth_header_name = options[:auth_header_name] || 'X-Escher-Auth'
@date_header_name = options[:date_header_name] || 'X-Escher-Date'
- @clock_skew = options[:clock_skew] || 900
+ @clock_skew = options[:clock_skew] || 300
@algo = create_algo
@algo_id = @algo_prefix + '-HMAC-' + @hash_algo
end
|
SUITEDEV-<I> Reduce clockSkew to <I>
|
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java
index <HASH>..<HASH> 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/File.java
@@ -39,18 +39,8 @@ public class File extends Resource {
private Directory parent;
private String qualifier = Qualifiers.FILE;
- private final String relativePathFromSourceDir;
-
- private File() {
+ protected File() {
// Used by factory method
- this.relativePathFromSourceDir = null;
- }
-
- /**
- * Internal.
- */
- public String relativePathFromSourceDir() {
- return relativePathFromSourceDir;
}
/**
|
Relax visibility of File constructor to allow hacking in SonarLint
|
diff --git a/lib/pry-byebug/commands.rb b/lib/pry-byebug/commands.rb
index <HASH>..<HASH> 100644
--- a/lib/pry-byebug/commands.rb
+++ b/lib/pry-byebug/commands.rb
@@ -122,6 +122,8 @@ module PryByebug
end
def process
+ Byebug.start unless Byebug.started?
+
{ :delete => :delete,
:disable => :disable,
:enable => :enable,
|
Make sure byebug's started when setting breakpoint
|
diff --git a/cpu6809.py b/cpu6809.py
index <HASH>..<HASH> 100755
--- a/cpu6809.py
+++ b/cpu6809.py
@@ -355,14 +355,6 @@ class Instruction(object):
mnemonic1, mnemonic2
))
- cc1 = msg[98:106]
- if cc1 != xroar_cc:
- log.info("trace: %s" , ref_line)
- log.info("own..: %s" , msg)
- log.error("CC (%r != %r) not the same as trace reference!\n" % (
- cc1, xroar_cc
- ))
-
registers1 = msg[52:95]
registers2 = ref_line[52:95]
if registers1 != registers2:
@@ -371,6 +363,14 @@ class Instruction(object):
log.error("registers (%r != %r) not the same as trace reference!\n" % (
registers1, registers2
))
+ else:
+ cc1 = msg[98:106]
+ if cc1 != xroar_cc:
+ log.info("trace: %s" , ref_line)
+ log.info("own..: %s" , msg)
+ log.error("CC (%r != %r) not the same as trace reference!\n" % (
+ cc1, xroar_cc
+ ))
log.debug("\t%s", repr(self.data))
log.debug("-"*79)
|
conmpare first the registers than CC
|
diff --git a/lib/active_record_survey/node_map.rb b/lib/active_record_survey/node_map.rb
index <HASH>..<HASH> 100644
--- a/lib/active_record_survey/node_map.rb
+++ b/lib/active_record_survey/node_map.rb
@@ -37,6 +37,21 @@ module ActiveRecordSurvey
result
end
+ # Whether decendant of a particular node_map
+ def is_decendant_of?(node_map)
+ # Hit ourselves
+ if node_map == self
+ return true
+ end
+
+ # Recurse
+ if self.parent
+ return self.parent.is_decendant_of?(node_map)
+ end
+
+ false
+ end
+
# Gets all the ancestor nodes until one is not an ancestor of klass
def ancestors_until_node_not_ancestor_of(klass)
if !self.parent || !self.node.class.ancestors.include?(klass)
diff --git a/lib/active_record_survey/version.rb b/lib/active_record_survey/version.rb
index <HASH>..<HASH> 100644
--- a/lib/active_record_survey/version.rb
+++ b/lib/active_record_survey/version.rb
@@ -1,3 +1,3 @@
module ActiveRecordSurvey
- VERSION = "0.1.38"
+ VERSION = "0.1.39"
end
|
Version <I>
Added is_decendent_of? method to node_maps
|
diff --git a/tchannel-core/src/main/java/com/uber/tchannel/schemes/JSONSerializer.java b/tchannel-core/src/main/java/com/uber/tchannel/schemes/JSONSerializer.java
index <HASH>..<HASH> 100644
--- a/tchannel-core/src/main/java/com/uber/tchannel/schemes/JSONSerializer.java
+++ b/tchannel-core/src/main/java/com/uber/tchannel/schemes/JSONSerializer.java
@@ -50,6 +50,10 @@ public final class JSONSerializer implements Serializer.SerializerInterface {
public Map<String, String> decodeHeaders(ByteBuf arg2) {
String headerJSON = arg2.toString(CharsetUtil.UTF_8);
arg2.release();
+ if (headerJSON == null || headerJSON.isEmpty() || headerJSON.equals("\"\"")) {
+ headerJSON = "{}";
+ }
+
Map<String, String> headers = new Gson().fromJson(headerJSON, HEADER_TYPE);
return (headers == null) ? new HashMap<String, String>() : headers;
}
|
compatible with other languages when application header is empty
|
diff --git a/dockerpty/io.py b/dockerpty/io.py
index <HASH>..<HASH> 100644
--- a/dockerpty/io.py
+++ b/dockerpty/io.py
@@ -111,13 +111,15 @@ class Stream(object):
Return `n` bytes of data from the Stream, or None at end of stream.
"""
- try:
- if hasattr(self.fd, 'recv'):
- return self.fd.recv(n)
- return os.read(self.fd.fileno(), n)
- except EnvironmentError as e:
- if e.errno not in Stream.ERRNO_RECOVERABLE:
- raise e
+ while True:
+ try:
+ if hasattr(self.fd, 'recv'):
+ return self.fd.recv(n)
+ return os.read(self.fd.fileno(), n)
+ except EnvironmentError as e:
+ if e.errno not in Stream.ERRNO_RECOVERABLE:
+ raise e
+
def write(self, data):
"""
|
Retry after encountering a recoverable error when reading.
Addresses d<I>wtq/dockerpty#<I>.
|
diff --git a/Component/RepositoryRegistry.php b/Component/RepositoryRegistry.php
index <HASH>..<HASH> 100644
--- a/Component/RepositoryRegistry.php
+++ b/Component/RepositoryRegistry.php
@@ -19,7 +19,7 @@ class RepositoryRegistry
/** @var mixed[][] */
protected $repositoryConfigs;
/** @var DataStore[] */
- protected $repositories;
+ protected $repositories = array();
/**
* @param DataStoreFactory $factory
|
Fix error in first invocation of getDataStoreByName
|
diff --git a/codec/rpc.go b/codec/rpc.go
index <HASH>..<HASH> 100644
--- a/codec/rpc.go
+++ b/codec/rpc.go
@@ -8,7 +8,6 @@ import (
"errors"
"io"
"net/rpc"
- "sync"
)
var errRpcJsonNeedsTermWhitespace = errors.New("rpc requires a JsonHandle with TermWhitespace set to true")
@@ -40,8 +39,7 @@ type rpcCodec struct {
enc *Encoder
// bw *bufio.Writer
// br *bufio.Reader
- mu sync.Mutex
- h Handle
+ h Handle
cls atomicClsErr
}
@@ -160,15 +158,10 @@ type goRpcCodec struct {
}
func (c *goRpcCodec) WriteRequest(r *rpc.Request, body interface{}) error {
- // Must protect for concurrent access as per API
- c.mu.Lock()
- defer c.mu.Unlock()
return c.write(r, body, true)
}
func (c *goRpcCodec) WriteResponse(r *rpc.Response, body interface{}) error {
- c.mu.Lock()
- defer c.mu.Unlock()
return c.write(r, body, true)
}
|
codec: rpc: remove unnecessary mutex Lock/Unlock during WriteXXX methods of codec
The net/rpc package states that the io.ReadWriteCloser should handle
concurrency if desired. This means that any required lock/unlock should be at the
implementation of io.ReadWriteCloser, not the codec.
Updates #<I>
|
diff --git a/test/full_tst.py b/test/full_tst.py
index <HASH>..<HASH> 100644
--- a/test/full_tst.py
+++ b/test/full_tst.py
@@ -66,7 +66,7 @@ class fullTest(unittest.TestCase):
files = ['cfg/full/daemons/brokerd.ini', 'cfg/full/daemons/pollerd.ini',
'cfg/full/daemons/reactionnerd.ini', 'cfg/full/daemons/receiverd.ini',
'cfg/full/daemons/schedulerd.ini', 'cfg/full/alignak.cfg']
- replacements = {'/var/run/alignak': '/tmp', '/var/log/alignak': '/tmp'}
+ replacements = {'/usr/local/var/run/alignak': '/tmp', '/usr/local/var/log/alignak': '/tmp'}
for filename in files:
lines = []
with open(filename) as infile:
|
Update full_tst to comply with the new default configuration (/usr/local/ prefixed directories
|
diff --git a/dallinger/command_line.py b/dallinger/command_line.py
index <HASH>..<HASH> 100755
--- a/dallinger/command_line.py
+++ b/dallinger/command_line.py
@@ -858,9 +858,7 @@ def export(app, local, no_scrub):
@click.option('--app', default=None, callback=verify_id, help='Experiment id')
def logs(app):
"""Show the logs."""
- subprocess.check_call([
- "heroku", "addons:open", "papertrail", "--app", app_name(app)
- ])
+ heroku.open_logs(app)
@dallinger.command()
|
Use new tool in CLI log command
|
diff --git a/lib/wechat/responder.rb b/lib/wechat/responder.rb
index <HASH>..<HASH> 100644
--- a/lib/wechat/responder.rb
+++ b/lib/wechat/responder.rb
@@ -166,7 +166,7 @@ module Wechat
self.class.wechat # Make sure user can continue access wechat at instance level similar to class level
end
- def wechat_oauth2_url(page_url = nil)
+ def wechat_oauth2_url(scope = 'snsapi_base', page_url = nil)
appid = self.class.corpid || self.class.appid
page_url ||= if self.class.trusted_domain_fullname
"#{self.class.trusted_domain_fullname}#{request.original_fullpath}"
@@ -174,7 +174,7 @@ module Wechat
request.original_url
end
redirect_uri = CGI.escape(page_url)
- "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{appid}&redirect_uri=#{redirect_uri}&response_type=code&scope=snsapi_base#wechat_redirect"
+ "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{appid}&redirect_uri=#{redirect_uri}&response_type=code&scope=#{scope}#wechat_redirect"
end
def show
|
Enable user using snsapi_userinfo as well.
|
diff --git a/test/rules/helpers.js b/test/rules/helpers.js
index <HASH>..<HASH> 100644
--- a/test/rules/helpers.js
+++ b/test/rules/helpers.js
@@ -8,8 +8,8 @@ const onWarn = function (rule, el, needCall, cb) {
let called = false
const a11y = new A11y(React, ReactDOM, {
reporter (info) {
+ console.log(info)
called = true
- a11y.restoreAll()
cb(info)
}
, rules: {
@@ -28,6 +28,8 @@ const onWarn = function (rule, el, needCall, cb) {
if ( needCall ) {
expect(called).to.be.true
}
+
+ a11y.restoreAll()
done()
}
}
|
fix bug where rule tests interfered with each other
|
diff --git a/app/suite_test.go b/app/suite_test.go
index <HASH>..<HASH> 100644
--- a/app/suite_test.go
+++ b/app/suite_test.go
@@ -105,7 +105,7 @@ func (s *S) TearDownSuite(c *C) {
}
func (s *S) SetUpTest(c *C) {
- cleanQueue()
+ ttesting.CleanQueues(queueName, QueueName)
}
func (s *S) TearDownTest(c *C) {
@@ -189,15 +189,3 @@ func (h *testHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h.header = append(h.header, r.Header)
w.Write([]byte(h.content))
}
-
-func cleanQueue() {
- var (
- err error
- msg *queue.Message
- )
- for err == nil {
- if msg, err = queue.Get(queueName, 1e6); err == nil {
- err = msg.Delete()
- }
- }
-}
|
app: use testing.CleanQueues to clean queues
|
diff --git a/src/main/java/com/algorithmia/data/DataFile.java b/src/main/java/com/algorithmia/data/DataFile.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/algorithmia/data/DataFile.java
+++ b/src/main/java/com/algorithmia/data/DataFile.java
@@ -48,7 +48,7 @@ public class DataFile extends DataObject {
* @throws IOException if there were any problems consuming the response content
*/
public File getFile() throws APIException, IOException {
- File tempFile = File.createTempFile(getName(), null);
+ File tempFile = File.createTempFile("algodata", null);
FileOutputStream outputStream = new FileOutputStream(tempFile);
IOUtils.copy(getInputStream(), outputStream);
return tempFile;
|
Fix #4: ensure temp file prefix length is always valid
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -2,7 +2,7 @@ var koa = require('koa');
var request = require('supertest');
var assert = require('assert');
-var koajwt = require('./index.js');
+var koajwt = require('./index');
describe('failure tests', function () {
|
Removing the unnecessary '.js' extension from the index require
|
diff --git a/Git.php b/Git.php
index <HASH>..<HASH> 100644
--- a/Git.php
+++ b/Git.php
@@ -196,14 +196,15 @@ class Git
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->_classHash['repos_url']);
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
+ curl_setopt($ch, CURLOPT_USERAGENT, 'seagoj@gmail.com');
$raw = curl_exec($ch);
curl_close($ch);
$this->_log->write($raw);
-
/* $postdata = http_build_query(
array(
'user'=>'seagoj',
|
Adds USERAGENT to curl call
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,9 +12,9 @@ def read_file(filename):
setup(
name = "calloway",
version = __import__('calloway').get_version().replace(' ', '-'),
- url = 'http://opensource.washingtontimes.com/projects/calloway/',
- author = 'The Washington Times Web Devs',
- author_email = 'webdev@washingtontimes.com',
+ url = 'https://github.com/callowayproject/Calloway',
+ author = 'Calloway Project Devs',
+ author_email = 'webmaster@callowayproject.com',
description = 'A builder of boring stuff for opinionated developers',
long_description = read_file('README'),
packages = find_packages(),
|
Updated the url, author and author email
|
diff --git a/src/main/java/net/finmath/marketdata/calibration/Solver.java b/src/main/java/net/finmath/marketdata/calibration/Solver.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/finmath/marketdata/calibration/Solver.java
+++ b/src/main/java/net/finmath/marketdata/calibration/Solver.java
@@ -174,7 +174,7 @@ public class Solver {
double error = calibrationProducts.get(i).getValue(evaluationTime, calibratedModel);
accuracy += error * error;
}
- accuracy = Math.sqrt(accuracy);
+ accuracy = Math.sqrt(accuracy/calibrationProducts.size());
return calibratedModel;
}
diff --git a/src/main/java6/net/finmath/marketdata/calibration/Solver.java b/src/main/java6/net/finmath/marketdata/calibration/Solver.java
index <HASH>..<HASH> 100644
--- a/src/main/java6/net/finmath/marketdata/calibration/Solver.java
+++ b/src/main/java6/net/finmath/marketdata/calibration/Solver.java
@@ -174,7 +174,7 @@ public class Solver {
double error = calibrationProducts.get(i).getValue(evaluationTime, calibratedModel);
accuracy += error * error;
}
- accuracy = Math.sqrt(accuracy);
+ accuracy = Math.sqrt(accuracy/calibrationProducts.size());
return calibratedModel;
}
|
Reported accuracy is now a rms.
git-svn-id: <URL>
|
diff --git a/faker/providers/ssn/fi_FI/__init__.py b/faker/providers/ssn/fi_FI/__init__.py
index <HASH>..<HASH> 100644
--- a/faker/providers/ssn/fi_FI/__init__.py
+++ b/faker/providers/ssn/fi_FI/__init__.py
@@ -39,7 +39,7 @@ class Provider(SsnProvider):
if birthday.year < 2000:
separator = '-'
else:
- separator += 'A'
+ separator = 'A'
suffix = str(random.randrange(2, 899)).zfill(3)
checksum = _checksum(hetu_date + suffix)
hetu = "".join([hetu_date, separator, suffix, checksum])
|
Correct UnboundLocalError in Finnish SSN generator.
|
diff --git a/Element/PhpFile.php b/Element/PhpFile.php
index <HASH>..<HASH> 100755
--- a/Element/PhpFile.php
+++ b/Element/PhpFile.php
@@ -17,6 +17,15 @@ class PhpFile extends AbstractElement
return self::START_FILE;
}
/**
+ * @see \WsdlToPhp\PhpGenerator\Element\AbstractElement::toString()
+ * @param int $indentation
+ * @return string
+ */
+ public function toString($indentation = null)
+ {
+ return sprintf('%s%s', parent::toString($indentation), self::BREAK_LINE_CHAR);
+ }
+ /**
* @see \WsdlToPhp\PhpGenerator\Element\AbstractElement::getChildrenTypes()
* @return string[]
*/
|
ensure generated file contains one line at end of file (PSR-2)
|
diff --git a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/serializer/analysis/GrammarConstraintProvider.java b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/serializer/analysis/GrammarConstraintProvider.java
index <HASH>..<HASH> 100644
--- a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/serializer/analysis/GrammarConstraintProvider.java
+++ b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/serializer/analysis/GrammarConstraintProvider.java
@@ -176,10 +176,11 @@ public class GrammarConstraintProvider implements IGrammarConstraintProvider {
case ASSIGNED_PARSER_RULE_CALL:
case ASSIGNED_TERMINAL_RULE_CALL:
EClass type = ele.getContainingConstraint().getType();
- if (type.getEStructuralFeature(ele.getFeatureName()) == null)
+ EStructuralFeature feature = type.getEStructuralFeature(ele.getFeatureName());
+ if (feature == null)
throw new RuntimeException("Feature " + ele.getFeatureName() + " not found in "
+ type.getName());
- int featureID = type.getEStructuralFeature(ele.getFeatureName()).getFeatureID();
+ int featureID = type.getFeatureID(feature);
List<IConstraintElement> assignmentByFeature = assignmentsByFeature[featureID];
if (assignmentByFeature == null)
assignmentsByFeature[featureID] = assignmentByFeature = Lists.newArrayList();
|
[serializer] bugfix: wrong EStruturalFeatureIDs were used in case of multiple inheritance
|
diff --git a/omgeo/tests/tests.py b/omgeo/tests/tests.py
index <HASH>..<HASH> 100755
--- a/omgeo/tests/tests.py
+++ b/omgeo/tests/tests.py
@@ -75,8 +75,8 @@ class GeocoderTest(OmgeoTestCase):
if MAPQUEST_API_KEY is not None:
mapquest_settings = dict(api_key=MAPQUEST_API_KEY)
- self.g_mapquest = Geocoder(['omgeo.services.MapQuest', {'settings': mapquest_settings}])
- self.g_mapquest_ssl = Geocoder(['omgeo.services.MapQuestSSL', {'settings': mapquest_settings}])
+ self.g_mapquest = Geocoder([['omgeo.services.MapQuest', {'settings': mapquest_settings}]])
+ self.g_mapquest_ssl = Geocoder([['omgeo.services.MapQuestSSL', {'settings': mapquest_settings}]])
#: main geocoder used for tests, using default APIs
self.g = Geocoder()
|
fix mapquest list nesting issue in tests
|
diff --git a/framework/yii/base/Controller.php b/framework/yii/base/Controller.php
index <HASH>..<HASH> 100644
--- a/framework/yii/base/Controller.php
+++ b/framework/yii/base/Controller.php
@@ -18,6 +18,15 @@ use Yii;
class Controller extends Component
{
/**
+ * @event ActionEvent an event raised right before executing a controller action.
+ * You may set [[ActionEvent::isValid]] to be false to cancel the action execution.
+ */
+ const EVENT_BEFORE_ACTION = 'beforeAction';
+ /**
+ * @event ActionEvent an event raised right after executing a controller action.
+ */
+ const EVENT_AFTER_ACTION = 'afterAction';
+ /**
* @var string the ID of this controller
*/
public $id;
@@ -192,7 +201,9 @@ class Controller extends Component
*/
public function beforeAction($action)
{
- return true;
+ $event = new ActionEvent($action);
+ $this->trigger(self::EVENT_BEFORE_ACTION, $event);
+ return $event->isValid;
}
/**
@@ -203,6 +214,9 @@ class Controller extends Component
*/
public function afterAction($action, &$result)
{
+ $event = new ActionEvent($action);
+ $event->result = & $result;
+ $this->trigger(self::EVENT_AFTER_ACTION, $event);
}
/**
|
Added back the events for Controller.
|
diff --git a/packages/create-quip-app/bin/create-quip-app.py b/packages/create-quip-app/bin/create-quip-app.py
index <HASH>..<HASH> 100755
--- a/packages/create-quip-app/bin/create-quip-app.py
+++ b/packages/create-quip-app/bin/create-quip-app.py
@@ -132,7 +132,8 @@ def create_package(app_dir, package_path=None):
# make sure the package_path exists even if its in a non-existent subdir
package_dir = os.path.dirname(package_path)
try:
- os.makedirs(package_dir)
+ if package_dir:
+ os.makedirs(package_dir)
except OSError:
if not os.path.isdir(package_dir):
raise
|
don't attempt to create package_dir when it is empty
|
diff --git a/src/lib/sys-proc.rb b/src/lib/sys-proc.rb
index <HASH>..<HASH> 100644
--- a/src/lib/sys-proc.rb
+++ b/src/lib/sys-proc.rb
@@ -1,8 +1,18 @@
+# rubocop:disable Style/FileName
# frozen_string_literal: true
+# rubocop:enable Style/FileName
-require 'active_support/inflector'
require 'pathname'
-
$LOAD_PATH.unshift Pathname.new(__dir__)
+if 'development' == ENV['PROJECT_MODE']
+ require 'pp'
+ require 'coderay'
+ require 'pry/color_printer'
+
+ def pp(obj, out=STDOUT, width=79)
+ (out.isatty ? Pry::ColorPrinter : PP).pp(obj, out, width)
+ end
+end
+
require 'sys/proc'
|
loader provides a better pp (development)
|
diff --git a/lib/jsduck/ast.rb b/lib/jsduck/ast.rb
index <HASH>..<HASH> 100644
--- a/lib/jsduck/ast.rb
+++ b/lib/jsduck/ast.rb
@@ -1,7 +1,6 @@
require "jsduck/serializer"
require "jsduck/evaluator"
require "jsduck/function_ast"
-require "jsduck/ext_patterns"
require "jsduck/ast_node"
module JsDuck
@@ -142,15 +141,11 @@ module JsDuck
private
def function?(ast)
- ast["type"] == "FunctionDeclaration" || ast["type"] == "FunctionExpression" || empty_fn?(ast)
+ AstNode.new(ast).function?
end
def empty_fn?(ast)
- ast["type"] == "MemberExpression" && ext_pattern?("Ext.emptyFn", ast)
- end
-
- def ext_pattern?(pattern, ast)
- ExtPatterns.matches?(pattern, to_s(ast))
+ AstNode.new(ast).ext_empty_fn?
end
def object?(ast)
|
Eliminate use of ExtPatterns class from Ast.
|
diff --git a/library/src/main/java/com/prolificinteractive/materialcalendarview/MaterialCalendarView.java b/library/src/main/java/com/prolificinteractive/materialcalendarview/MaterialCalendarView.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/prolificinteractive/materialcalendarview/MaterialCalendarView.java
+++ b/library/src/main/java/com/prolificinteractive/materialcalendarview/MaterialCalendarView.java
@@ -12,6 +12,7 @@ import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -43,7 +44,7 @@ import java.util.Locale;
* @attr ref R.styleable.MaterialCalendarView_weekDayTextAppearance
* @attr ref R.styleable.MaterialCalendarView_showOtherMonths
*/
-public class MaterialCalendarView extends LinearLayout {
+public class MaterialCalendarView extends FrameLayout {
private final TextView title;
private final DirectionButton buttonPast;
@@ -123,7 +124,6 @@ public class MaterialCalendarView extends LinearLayout {
public MaterialCalendarView(Context context, AttributeSet attrs) {
super(context, attrs);
- setOrientation(VERTICAL);
setClipChildren(false);
setClipToPadding(false);
|
Changed super class to be FrameLayout
|
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
@@ -242,6 +242,7 @@ module INotify
#
# @raise [SystemCallError] if closing the underlying file descriptor fails.
def close
+ stop
if Native.close(@fd) == 0
@watchers.clear
return
@@ -292,7 +293,11 @@ module INotify
# Same as IO#readpartial, or as close as we need.
def readpartial(size)
# Use Ruby's readpartial if possible, to avoid blocking other threads.
- return to_io.readpartial(size) if self.class.supports_ruby_io?
+ begin
+ return to_io.readpartial(size) if self.class.supports_ruby_io?
+ rescue Errno::EBADF
+ return []
+ end
tries = 0
begin
|
Avoid exception in case of closing a file watched by notifier, like trapping SIGINT to close the file without exception.
|
diff --git a/lib/achoo/ui/date_chooser.rb b/lib/achoo/ui/date_chooser.rb
index <HASH>..<HASH> 100644
--- a/lib/achoo/ui/date_chooser.rb
+++ b/lib/achoo/ui/date_chooser.rb
@@ -67,7 +67,7 @@ module Achoo
puts "Accepted formats:"
puts date_format_help_string
puts
- system 'cal -3m'
+ system 'cal -3'
end
def date_format_help_string
|
The -m option to cal seems to have changed its definition. Remove it
|
diff --git a/src/Propel/Generator/Builder/Om/ObjectBuilder.php b/src/Propel/Generator/Builder/Om/ObjectBuilder.php
index <HASH>..<HASH> 100644
--- a/src/Propel/Generator/Builder/Om/ObjectBuilder.php
+++ b/src/Propel/Generator/Builder/Om/ObjectBuilder.php
@@ -4046,7 +4046,7 @@ abstract class ".$this->getClassname()." extends ".$parentClass." ";
* @param " . $crossObjectClassName . " " . $crossObjectName . " The $className object to relate
* @return void
*/
- public function add{$relatedObjectClassName}($crossObjectName)
+ public function add{$relatedObjectClassName}($crossObjectClassName $crossObjectName)
{
if (\$this->" . $collName . " === null) {
\$this->init" . $relCol . "();
|
Fixed missing typehint on crossFK methods
|
diff --git a/fsevents.py b/fsevents.py
index <HASH>..<HASH> 100644
--- a/fsevents.py
+++ b/fsevents.py
@@ -194,4 +194,7 @@ class FileEventCallback(object):
if os.path.isdir(path):
refs[os.path.join(root, path)] = {}
for name in os.listdir(os.path.join(root, path)):
- refs[path][name] = os.stat(os.path.join(path, name))
+ try:
+ refs[path][name] = os.stat(os.path.join(path, name))
+ except OSError:
+ pass
|
ignore files that don't exist while recursing.
Specifically this avoids the problem where we explode when trying to
stat a symlink that has a nonexistent target
|
diff --git a/src/services/ModelByHandle.php b/src/services/ModelByHandle.php
index <HASH>..<HASH> 100644
--- a/src/services/ModelByHandle.php
+++ b/src/services/ModelByHandle.php
@@ -289,7 +289,7 @@ abstract class ModelByHandle extends Model
// Get existing record
if ($model instanceof ModelWithHandle) {
- if ($record = $this->getRecordByCondition([
+ if ($record = $this->findRecordByCondition([
'handle' => $model->handle
])
) {
|
removing forceful check for record when finding via handle
|
diff --git a/lib/model/type/index.js b/lib/model/type/index.js
index <HASH>..<HASH> 100644
--- a/lib/model/type/index.js
+++ b/lib/model/type/index.js
@@ -35,6 +35,8 @@ const files = [
"./string",
"./integer",
"./boolean",
+ "./number",
+ "./date",
];
|
fixing attribute type handlers for numbers and dates not exposed commonly
|
diff --git a/src/TextFormatter/Parser.php b/src/TextFormatter/Parser.php
index <HASH>..<HASH> 100644
--- a/src/TextFormatter/Parser.php
+++ b/src/TextFormatter/Parser.php
@@ -155,15 +155,17 @@ class Parser
}
/**
- * Clear this instance's properties
+ * Reset this instance's properties
*
* Used internally at the beginning of a new parsing. I suppose some memory-obsessive users will
* appreciate to be able to do it whenever they feel like it
*
* @return void
*/
- public function clear()
+ public function reset($text)
{
+ $this->text = $text;
+
$this->log = array();
$this->unprocessedTags = array();
$this->processedTags = array();
@@ -172,7 +174,7 @@ class Parser
$this->cntOpen = array();
$this->cntTotal = array();
- unset($this->text, $this->currentTag, $this->currentAttribute);
+ unset($this->currentTag, $this->currentAttribute);
}
/**
@@ -183,8 +185,7 @@ class Parser
*/
public function parse($text)
{
- $this->clear();
- $this->text = $text;
+ $this->reset($text);
/**
* Capture all tags
|
TextFormatter: small change in code
|
diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go
index <HASH>..<HASH> 100644
--- a/pkg/features/kube_features.go
+++ b/pkg/features/kube_features.go
@@ -577,7 +577,7 @@ const (
DisableCloudProviders featuregate.Feature = "DisableCloudProviders"
// owner: @andrewsykim
- // alpha: v1.22
+ // alpha: v1.23
//
// Disable in-tree functionality in kubelet to authenticate to cloud provider container registries for image pull credentials.
DisableKubeletCloudCredentialProviders featuregate.Feature = "DisableKubeletCloudCredentialProviders"
|
Fix documented version for DisableKubeletCloudCredentialProviders feature gate
|
diff --git a/safe/utilities/metadata.py b/safe/utilities/metadata.py
index <HASH>..<HASH> 100644
--- a/safe/utilities/metadata.py
+++ b/safe/utilities/metadata.py
@@ -60,8 +60,8 @@ def write_iso19115_metadata(layer_uri, keywords):
metadata = GenericLayerMetadata(layer_uri)
metadata.update_from_dict(keywords)
- if 'keyword_version' not in metadata.dict.keys():
- metadata.update_from_dict({'keyword_version': inasafe_keyword_version})
+ # Always set keyword_version to the latest one.
+ metadata.update_from_dict({'keyword_version': inasafe_keyword_version})
if metadata.layer_is_file_based:
xml_file_path = os.path.splitext(layer_uri)[0] + '.xml'
|
Alway set keyword version to the latest version.
|
diff --git a/lib/Item/ValueConverter/EntryValueConverter.php b/lib/Item/ValueConverter/EntryValueConverter.php
index <HASH>..<HASH> 100644
--- a/lib/Item/ValueConverter/EntryValueConverter.php
+++ b/lib/Item/ValueConverter/EntryValueConverter.php
@@ -36,4 +36,9 @@ final class EntryValueConverter implements ValueConverterInterface
{
return $object->getIsPublished();
}
+
+ public function getObject($object)
+ {
+ return $object;
+ }
}
diff --git a/tests/lib/Item/ValueConverter/EntryValueConverterTest.php b/tests/lib/Item/ValueConverter/EntryValueConverterTest.php
index <HASH>..<HASH> 100644
--- a/tests/lib/Item/ValueConverter/EntryValueConverterTest.php
+++ b/tests/lib/Item/ValueConverter/EntryValueConverterTest.php
@@ -84,4 +84,14 @@ class EntryValueConverterTest extends TestCase
$this->assertTrue($this->valueConverter->getIsVisible($entry));
}
+
+ /**
+ * @covers \Netgen\BlockManager\Contentful\Item\ValueConverter\EntryValueConverter::getObject
+ */
+ public function testGetObject()
+ {
+ $entry = new ContentfulEntry();
+
+ $this->assertEquals($entry, $this->valueConverter->getObject($entry));
+ }
}
|
Add ValueConverterInterface::getObject method to be able to enrich the object from CMS
|
diff --git a/client/layout/guided-tours/config-elements/step.js b/client/layout/guided-tours/config-elements/step.js
index <HASH>..<HASH> 100644
--- a/client/layout/guided-tours/config-elements/step.js
+++ b/client/layout/guided-tours/config-elements/step.js
@@ -182,7 +182,7 @@ export default class Step extends Component {
this.setAnalyticsTimestamp( context );
if ( when && ! isValid( when ) ) {
- const nextStepName = anyFrom( branching[ step ] );
+ const nextStepName = props.next || anyFrom( branching[ step ] );
const skipping = this.shouldSkipAnalytics();
next( { tour, tourVersion, step, nextStepName, skipping } );
}
|
Guided Tours: actually use `Step`'s `next` prop as claimed in the docs :)
|
diff --git a/lib/editor/tinymce/plugins/managefiles/tinymce/editor_plugin.js b/lib/editor/tinymce/plugins/managefiles/tinymce/editor_plugin.js
index <HASH>..<HASH> 100644
--- a/lib/editor/tinymce/plugins/managefiles/tinymce/editor_plugin.js
+++ b/lib/editor/tinymce/plugins/managefiles/tinymce/editor_plugin.js
@@ -93,9 +93,10 @@
var managefiles = ed.getParam('managefiles', {});
// Get draft area id from filepicker options.
- if (!managefiles.itemid && M.editor_tinymce.filepicker_options
- && M.editor_tinymce.filepicker_options[ed.id]
- && M.editor_tinymce.filepicker_options[ed.id].image) {
+ if (!managefiles.itemid && M.editor_tinymce.filepicker_options
+ && M.editor_tinymce.filepicker_options[ed.id]
+ && M.editor_tinymce.filepicker_options[ed.id].image
+ && M.editor_tinymce.filepicker_options[ed.id].image.itemid) {
managefiles.itemid = M.editor_tinymce.filepicker_options[ed.id].image.itemid;
ed.settings['managefiles'].itemid = managefiles.itemid;
}
|
MDL-<I> Additional check to be extra sure that no JS error occurs
|
diff --git a/git.go b/git.go
index <HASH>..<HASH> 100644
--- a/git.go
+++ b/git.go
@@ -139,6 +139,16 @@ func init() {
C.git_openssl_set_locking()
}
+// Shutdown frees all the resources acquired by libgit2. Make sure no
+// references to any git2go objects are live before calling this.
+// After this is called, invoking any function from this library will result in
+// undefined behavior, so make sure this is called carefully.
+func Shutdown() {
+ pointerHandles.Clear()
+
+ C.git_libgit2_shutdown()
+}
+
// Oid represents the id for a Git object.
type Oid [20]byte
diff --git a/handles.go b/handles.go
index <HASH>..<HASH> 100644
--- a/handles.go
+++ b/handles.go
@@ -43,6 +43,16 @@ func (v *HandleList) Untrack(handle unsafe.Pointer) {
v.Unlock()
}
+// Clear stops tracking all the managed pointers.
+func (v *HandleList) Clear() {
+ v.Lock()
+ for handle := range v.handles {
+ delete(v.handles, handle)
+ C.free(handle)
+ }
+ v.Unlock()
+}
+
// Get retrieves the pointer from the given handle
func (v *HandleList) Get(handle unsafe.Pointer) interface{} {
v.RLock()
|
Add a way to cleanly shut down the library (#<I>)
This change adds the Shutdown() method, so that the library can be
cleanly shut down. This helps significanly reduce the amount of noise in
the leak detector.
|
diff --git a/model/qti/Service.php b/model/qti/Service.php
index <HASH>..<HASH> 100755
--- a/model/qti/Service.php
+++ b/model/qti/Service.php
@@ -112,14 +112,7 @@ class Service extends tao_models_classes_Service
throw new common_Exception('Non QTI item('.$item->getUri().') opened via QTI Service');
}
-// common_Logger::i(print_r($itemService->getItemDirectory($item, $language), true));
-
$file = $itemService->getItemDirectory($item, $language)->getFile(self::QTI_ITEM_FILE);
-
- if (! $file->exists()) {
- return '';
- }
-// common_Logger::i(print_r($file->getPrefix(), true));
return $file->read();
}
|
Get xml data throw file not found as expected
|
diff --git a/gitlab_registry_usage/_version.py b/gitlab_registry_usage/_version.py
index <HASH>..<HASH> 100644
--- a/gitlab_registry_usage/_version.py
+++ b/gitlab_registry_usage/_version.py
@@ -1,2 +1,2 @@
-__version_info__ = (0, 2, 5)
+__version_info__ = (0, 2, 6)
__version__ = '.'.join(map(str, __version_info__))
|
Increase the version number to <I>
|
diff --git a/cloudmesh/common/ConfigDict.py b/cloudmesh/common/ConfigDict.py
index <HASH>..<HASH> 100644
--- a/cloudmesh/common/ConfigDict.py
+++ b/cloudmesh/common/ConfigDict.py
@@ -92,7 +92,8 @@ class Config(object):
"""
filename = path_expand(filename)
file_contains_tabs = False
- with file(filename) as f:
+
+ with open(filename, 'r') as f:
lines = f.read().split("\n")
line_no = 1
|
chg:usr: replace file() with open() to make it portable between <I> and <I>
|
diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/validator.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/validator.js
index <HASH>..<HASH> 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/javascript/validator.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/validator.js
@@ -258,6 +258,15 @@ define([
}
if(token) {
error.node = token;
+ if(token.value) {
+ if(!error.args) {
+ error.args = Object.create(null);
+ }
+ if(!error.args.data) {
+ error.args.data = Object.create(null);
+ }
+ error.args.data.tokenValue = token.value;
+ }
}
errors.push(error);
}
|
Bug <I> - Need a way to check if a problem returned from js validation has a token saying "return".
|
diff --git a/lib/features/context-pad/ContextPad.js b/lib/features/context-pad/ContextPad.js
index <HASH>..<HASH> 100644
--- a/lib/features/context-pad/ContextPad.js
+++ b/lib/features/context-pad/ContextPad.js
@@ -138,12 +138,13 @@ ContextPad.prototype.trigger = function(action, event, autoActivate) {
* Open the context pad for the given element
*
* @param {djs.model.Base} element
+ * @param {Boolean} force if true, force reopening the context pad
*/
-ContextPad.prototype.open = function(element) {
+ContextPad.prototype.open = function(element, force) {
if (this._current && this._current.open) {
- if (this._current.element === element) {
+ if (force !== true && this._current.element === element) {
// no change needed
return;
}
|
feat(context-pad): add ability to force reopening it
Related to bpmn-io/bpmn-js#<I>
|
diff --git a/src/main/org/openscience/cdk/io/RssWriter.java b/src/main/org/openscience/cdk/io/RssWriter.java
index <HASH>..<HASH> 100644
--- a/src/main/org/openscience/cdk/io/RssWriter.java
+++ b/src/main/org/openscience/cdk/io/RssWriter.java
@@ -241,7 +241,7 @@ public class RssWriter extends DefaultChemObjectWriter {
writer.write(doc.toXML());
writer.flush();
}catch(IOException ex){
- throw new CDKException(ex.getMessage());
+ throw new CDKException(ex.getMessage(), ex);
}
}
|
calls to CDKException constructor made within a catch block now include the root exception to preserve stack trace
git-svn-id: <URL>
|
diff --git a/src/main.js b/src/main.js
index <HASH>..<HASH> 100644
--- a/src/main.js
+++ b/src/main.js
@@ -20,17 +20,22 @@ $.fn.fullCalendar = function(options) {
// a method call
if (typeof options === 'string') {
- if (calendar && $.isFunction(calendar[options])) {
- singleRes = calendar[options].apply(calendar, args);
- if (!i) {
- res = singleRes; // record the first method call result
+ if (calendar) {
+ if ($.isFunction(calendar[options])) {
+ singleRes = calendar[options].apply(calendar, args);
+ if (!i) {
+ res = singleRes; // record the first method call result
+ }
+ if (options === 'destroy') { // for the destroy method, must remove Calendar object data
+ element.removeData('fullCalendar');
+ }
}
- if (options === 'destroy') { // for the destroy method, must remove Calendar object data
- element.removeData('fullCalendar');
+ else {
+ FC.warn("'" + options + "' is an unknown FullCalendar method.");
}
}
else {
- console.error("'" + options +"' is an unknown FullCalendar method.");
+ FC.warn("Attempting to call a FullCalendar method on an element with no calendar.");
}
}
// a new calendar initialization
|
adjust warnings for lack of fullcalendar object and method
|
diff --git a/concrete/src/Package/PackageService.php b/concrete/src/Package/PackageService.php
index <HASH>..<HASH> 100644
--- a/concrete/src/Package/PackageService.php
+++ b/concrete/src/Package/PackageService.php
@@ -159,12 +159,16 @@ class PackageService
}
}
- public function bootPackageEntityManager(Package $p)
+ public function bootPackageEntityManager(Package $p, $clearCache = false)
{
$configUpdater = new EntityManagerConfigUpdater($this->entityManager);
$providerFactory = new PackageProviderFactory($this->application, $p);
$provider = $providerFactory->getEntityManagerProvider();
$configUpdater->addProvider($provider);
+ if ($clearCache) {
+ $cache = $this->entityManager->getConfiguration()->getMetadataCacheImpl();
+ $cache->flushAll();
+ }
}
public function uninstall(Package $p)
@@ -188,7 +192,7 @@ class PackageService
return $response;
}
- $this->bootPackageEntityManager($p);
+ $this->bootPackageEntityManager($p, true);
$p->install($data);
$u = new \User();
|
Fixing package installation when packages contain attributes that are immediately used in installation'
|
diff --git a/Library/Console/Application.php b/Library/Console/Application.php
index <HASH>..<HASH> 100644
--- a/Library/Console/Application.php
+++ b/Library/Console/Application.php
@@ -12,6 +12,7 @@
namespace Zephir\Console;
use Symfony\Component\Console\Application as BaseApplication;
+use Symfony\Component\Console\Exception\CommandNotFoundException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputInterface;
@@ -90,7 +91,14 @@ final class Application extends BaseApplication
return 0;
}
- return parent::doRun($input, $output);
+ try {
+ return parent::doRun($input, $output);
+ } catch (CommandNotFoundException $e) {
+ $this->setCatchExceptions(false);
+ fprintf(STDERR, $e->getMessage().PHP_EOL);
+
+ return 1;
+ }
}
/**
|
Do not print exception backtrace when command not found
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.