diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/spec/attribute_resolver_spec.rb b/spec/attribute_resolver_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/attribute_resolver_spec.rb
+++ b/spec/attribute_resolver_spec.rb
@@ -154,7 +154,7 @@ describe Attributor::AttributeResolver do
end
end
- context 'with a hash condition' do
+ pending 'with a hash condition' do
end
context 'with a proc condition' do
|
Mark hash condition spec as pending
|
diff --git a/javascript_client/subscriptions/PusherLink.js b/javascript_client/subscriptions/PusherLink.js
index <HASH>..<HASH> 100644
--- a/javascript_client/subscriptions/PusherLink.js
+++ b/javascript_client/subscriptions/PusherLink.js
@@ -34,7 +34,8 @@
// // Do something with `data` and/or `errors`
// }})
//
-import {ApolloLink, Observable} from "apollo-link"
+var ApolloLink = require("apollo-link").ApolloLink
+var Observable = require("apollo-link").Observable
class PusherLink extends ApolloLink {
constructor(options) {
@@ -88,4 +89,4 @@ class PusherLink extends ApolloLink {
}
}
-export default PusherLink
+module.exports = PusherLink
|
use require and module.exports instead of import/export for the Pusher client
|
diff --git a/code/pages/NewsHolderPage.php b/code/pages/NewsHolderPage.php
index <HASH>..<HASH> 100644
--- a/code/pages/NewsHolderPage.php
+++ b/code/pages/NewsHolderPage.php
@@ -58,11 +58,6 @@ class NewsHolderPage extends Page {
/** Backwards compatibility for upgraders. Update the PublishFrom field */
$sql = "UPDATE `News` SET `PublishFrom` = `Created` WHERE `PublishFrom` IS NULL";
DB::query($sql);
- /** If the Translatable is added lateron, update the locale to at least have some value */
- if(class_exists('Translatable')){
- $sqlLang = "UPDATE `News` SET `Locale` = '".Translatable::get_current_locale()."' WHERE Locale IS NULL";
- DB::query($sqlLang);
- }
}
/**
|
Bug: Don't try to set locale, since we don't use the locale-field anymore.
|
diff --git a/provision/juju/suite_test.go b/provision/juju/suite_test.go
index <HASH>..<HASH> 100644
--- a/provision/juju/suite_test.go
+++ b/provision/juju/suite_test.go
@@ -18,4 +18,11 @@ var _ = Suite(&S{})
func (s *S) SetUpSuite(c *C) {
config.Set("git:host", "tsuruhost.com")
+ err := handler.DryRun()
+ c.Assert(err, IsNil)
+}
+
+func (s *S) TearDownSuite(c *C) {
+ handler.Stop()
+ handler.Wait()
}
|
provision/juju: also start handler in dry-run mode in normal suite
|
diff --git a/spec/wings/attribute_transformer_spec.rb b/spec/wings/attribute_transformer_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/wings/attribute_transformer_spec.rb
+++ b/spec/wings/attribute_transformer_spec.rb
@@ -2,10 +2,8 @@
require 'wings/attribute_transformer'
RSpec.describe Wings::AttributeTransformer do
- let(:pcdm_object) { work }
- let(:id) { 'moomin123' }
- let(:work) { GenericWork.new(id: id, **attributes) }
- let(:keys) { attributes.keys }
+ let(:id) { 'moomin123' }
+ let(:work) { GenericWork.new(id: id, **attributes) }
let(:attributes) do
{
@@ -15,16 +13,10 @@ RSpec.describe Wings::AttributeTransformer do
}
end
- let(:uris) do
- [RDF::URI('http://example.com/fake1'),
- RDF::URI('http://example.com/fake2')]
- end
-
- subject { described_class.run(pcdm_object, keys) }
-
it "transform the attributes" do
- expect(subject).to include title: work.title,
- contributor: work.contributor.first,
- description: work.description.first
+ expect(described_class.run(work))
+ .to include title: work.title,
+ contributor: work.contributor.first,
+ description: work.description.first
end
end
|
wings: refactor AttributeTransformer specs
|
diff --git a/lib/transflow/publisher.rb b/lib/transflow/publisher.rb
index <HASH>..<HASH> 100644
--- a/lib/transflow/publisher.rb
+++ b/lib/transflow/publisher.rb
@@ -30,6 +30,10 @@ module Transflow
self.class.new(publisher, all_args)
end
end
+
+ def subscribe(*args)
+ publisher.subscribe(*args)
+ end
end
def initialize(name, op)
diff --git a/spec/unit/publisher_spec.rb b/spec/unit/publisher_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/publisher_spec.rb
+++ b/spec/unit/publisher_spec.rb
@@ -24,5 +24,17 @@ RSpec.describe Transflow::Publisher do
Transflow::Publisher.new(:step, op).curry
}.to raise_error(/arity is < 0/)
end
+
+ it 'triggers event listener' do
+ listener = spy(:listener)
+
+ op = -> i, j { i + j }
+ publisher = Transflow::Publisher.new(:step, op).curry
+
+ publisher.subscribe(listener)
+
+ expect(publisher.(1).(2)).to be(3)
+ expect(listener).to have_received(:step_success).with(3)
+ end
end
end
|
Add support for subscribing to a curried publisher
|
diff --git a/phonopy/interface/siesta.py b/phonopy/interface/siesta.py
index <HASH>..<HASH> 100644
--- a/phonopy/interface/siesta.py
+++ b/phonopy/interface/siesta.py
@@ -65,7 +65,7 @@ def read_siesta(filename):
lattice = siesta_in._tags["latticevectors"]
positions = siesta_in._tags["atomiccoordinates"]
atypes = siesta_in._tags["chemicalspecieslabel"]
- cell = Atoms(numbers=numbers, cell=lattice)
+ cell = Atoms(numbers=numbers, cell=lattice, scaled_positions=positions)
coordformat = siesta_in._tags["atomiccoordinatesformat"]
if coordformat == "fractional" or coordformat == "scaledbylatticevectors":
|
Fix siesta interface problem generated by the change of Atoms class
|
diff --git a/views/app.go b/views/app.go
index <HASH>..<HASH> 100644
--- a/views/app.go
+++ b/views/app.go
@@ -126,6 +126,7 @@ func (app *Application) run() {
app.wg.Done()
}()
screen.Init()
+ screen.EnableMouse()
screen.Clear()
widget.SetView(screen)
|
Enable mouse support in views.Application (#<I>)
|
diff --git a/src/Calendar.js b/src/Calendar.js
index <HASH>..<HASH> 100644
--- a/src/Calendar.js
+++ b/src/Calendar.js
@@ -518,15 +518,7 @@ let Calendar = React.createClass({
onNavigate(date, view)
if (action === navigate.DATE)
- this._viewNavigate(date)
- },
-
- _viewNavigate(nextDate) {
- let { view, date, culture } = this.props;
-
- if (dates.eq(date, nextDate, view, localizer.startOfWeek(culture))) {
this.handleViewChange(views.DAY)
- }
},
handleViewChange(view){
|
Always navigate to day view when action is navigate.DATE
|
diff --git a/src/main/java/com/j256/simplemagic/ContentInfoUtil.java b/src/main/java/com/j256/simplemagic/ContentInfoUtil.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/j256/simplemagic/ContentInfoUtil.java
+++ b/src/main/java/com/j256/simplemagic/ContentInfoUtil.java
@@ -316,7 +316,7 @@ public class ContentInfoUtil {
private MagicEntries readEntriesFromResource(String resource) throws IOException {
InputStream stream = getClass().getResourceAsStream(resource);
if (stream == null) {
- return null;
+ throw new IllegalStateException("Internal magic file was not found: " + resource);
}
Reader reader = null;
try {
|
Throw exception if resource not found.
|
diff --git a/enrol/ldap/enrol.php b/enrol/ldap/enrol.php
index <HASH>..<HASH> 100755
--- a/enrol/ldap/enrol.php
+++ b/enrol/ldap/enrol.php
@@ -103,7 +103,7 @@ function get_user_courses(&$user, $type) {
}
} else if ($type === 'teacher') {
error_log("Enrolling teacher $user->id ($user->username) in course $course_obj->id ($course_obj->shortname)");
- add_teacher($user->id, $course_obj->id, 1, 0, 0,'ldap');
+ add_teacher($user->id, $course_obj->id, 1, '', 0, 0,'ldap');
}
$CFG->debug=0;
}
|
Fixed a wrong call to add_teacher in LDAP plugin (Merged from MOODLE_<I>_STABLE)
|
diff --git a/code/dataobjects/CustomMenuBlock.php b/code/dataobjects/CustomMenuBlock.php
index <HASH>..<HASH> 100644
--- a/code/dataobjects/CustomMenuBlock.php
+++ b/code/dataobjects/CustomMenuBlock.php
@@ -1,4 +1,9 @@
<?php
+
+if (!class_exists('Block')) {
+ return;
+}
+
/**
* A block that allows end users to manually build a custom (flat or nested) menu
* @author Shea Dawson <shea@silverstripe.com.au>
|
fix(CustomMenuBlock): If not using Shea's Block module and you want to iterate over classes/get configs in an abstract way, you'll cause SS to load this class and throw an error.
|
diff --git a/client/allocdir/alloc_dir_unix.go b/client/allocdir/alloc_dir_unix.go
index <HASH>..<HASH> 100644
--- a/client/allocdir/alloc_dir_unix.go
+++ b/client/allocdir/alloc_dir_unix.go
@@ -28,6 +28,12 @@ var (
)
func (d *AllocDir) linkOrCopy(src, dst string, perm os.FileMode) error {
+ // Avoid link/copy if the file already exists in the chroot
+ // TODO 0.6 clean this up. This was needed because chroot creation fails
+ // when a process restarts.
+ if fileInfo, _ := os.Stat(dst); fileInfo != nil {
+ return nil
+ }
// Attempt to hardlink.
if err := os.Link(src, dst); err == nil {
return nil
|
Avoiding copying files if they are already present in chrootw (#<I>)
|
diff --git a/src/renderers/canvas.js b/src/renderers/canvas.js
index <HASH>..<HASH> 100644
--- a/src/renderers/canvas.js
+++ b/src/renderers/canvas.js
@@ -87,6 +87,9 @@ Physics.renderer('canvas', function( proto ){
viewport = document.createElement('canvas');
this.el.appendChild( viewport );
+ if (typeof this.options.el === 'string' && this.el === document.body){
+ viewport.id = this.options.el;
+ }
this.el = viewport;
}
|
canvas renderer creates canvas with specified id if not found in dom
|
diff --git a/gwpy/plotter/layer.py b/gwpy/plotter/layer.py
index <HASH>..<HASH> 100644
--- a/gwpy/plotter/layer.py
+++ b/gwpy/plotter/layer.py
@@ -10,6 +10,10 @@ from .. import version
__author__ = "Duncan Macleod <duncan.macleod@ligo.org>"
__version__ = version.version
+from matplotlib.lines import Line2D
+from matplotlib.collections import PathCollection
+from matplotlib.image import AxesImage
+
try:
from collections import OrderedDict
except ImportError:
@@ -19,7 +23,8 @@ except ImportError:
class LayerCollection(OrderedDict):
"""Object recording the plotting layers on a figure
"""
- LAYER_TYPES = ['Line2D', 'PathCollection']
+ LAYER_TYPES = [Line2D.__class__.__name__, PathCollection.__class__.__name__,
+ AxesImage.__class__.__name__]
def count(self, type_=None):
if type_:
if type_ not in self.LAYER_TYPES:
@@ -38,6 +43,7 @@ class LayerCollection(OrderedDict):
"""The first mappable layer available for use in a Colorbar
"""
for layer in self.viewvalues():
- if layer.__class__.__name__ in ['PathCollection']:
+ if (isinstance(layer, PathCollection) or
+ isinstance(layer, AxesImage)):
return layer
raise ValueError("No mappable layers in this Collection")
|
plotter.LayerCollection: added type to colors
- now recognises AxesImage for coloring
|
diff --git a/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product/SpecialAttribute/HasImage.php b/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product/SpecialAttribute/HasImage.php
index <HASH>..<HASH> 100644
--- a/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product/SpecialAttribute/HasImage.php
+++ b/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product/SpecialAttribute/HasImage.php
@@ -60,9 +60,7 @@ class HasImage implements SpecialAttributeInterface
*/
public function getSearchQuery()
{
- $query = $this->queryFactory->create(QueryInterface::TYPE_MISSING, ['field' => 'image']);
-
- return $this->queryFactory->create(QueryInterface::TYPE_NOT, ['query' => $query]);
+ return $this->queryFactory->create(QueryInterface::TYPE_EXISTS, ['field' => 'image']);
}
/**
@@ -102,7 +100,7 @@ class HasImage implements SpecialAttributeInterface
*/
public function getValue()
{
- return 1;
+ return true;
}
/**
|
has_image handling now use the exists query insteand of a not missing.
|
diff --git a/binding.go b/binding.go
index <HASH>..<HASH> 100644
--- a/binding.go
+++ b/binding.go
@@ -278,6 +278,10 @@ func (self *Binding) Evaluate(req *http.Request, header *TemplateHeader, data ma
default:
redirect := string(statusAction)
+ if !self.NoTemplate {
+ redirect = EvalInline(redirect, data, funcs)
+ }
+
// if a url or path was specified, redirect the parent request to it
if strings.HasPrefix(redirect, `http`) || strings.HasPrefix(redirect, `/`) {
return nil, RedirectTo(redirect)
diff --git a/util/util.go b/util/util.go
index <HASH>..<HASH> 100644
--- a/util/util.go
+++ b/util/util.go
@@ -2,4 +2,4 @@ package util
const ApplicationName = `diecast`
const ApplicationSummary = `a dynamic site generator that consumes REST services and renders static HTML output in realtime`
-const ApplicationVersion = `1.8.6`
+const ApplicationVersion = `1.8.7`
|
Allow binding status redirects to include templates
|
diff --git a/src/amsterdam.py b/src/amsterdam.py
index <HASH>..<HASH> 100755
--- a/src/amsterdam.py
+++ b/src/amsterdam.py
@@ -51,7 +51,7 @@ class Amsterdam:
return datadir
def create_data_dirs(self):
- for directory in ['scirius', 'suricata', 'elasticsearch']:
+ for directory in ['scirius', 'suricata', 'elasticsearch', 'backups']:
dir_path = os.path.join(self.basepath, directory)
if not os.path.exists(dir_path):
os.makedirs(dir_path)
|
scirius: make backups folder in $basepath
|
diff --git a/lib/commands/new.js b/lib/commands/new.js
index <HASH>..<HASH> 100644
--- a/lib/commands/new.js
+++ b/lib/commands/new.js
@@ -38,7 +38,7 @@ module.exports = Command.extend({
this.config = new Config(configPath, {
root: path.join(process.cwd(), this.options.dirName),
- name: this.args.name,
+ name: stringUtils.pascalize(this.args.name),
modulePrefix: stringUtils.dasherize(this.args.name),
id: this.args.id
});
diff --git a/lib/utils/string.js b/lib/utils/string.js
index <HASH>..<HASH> 100644
--- a/lib/utils/string.js
+++ b/lib/utils/string.js
@@ -11,5 +11,8 @@ module.exports = {
},
dasherize: function(str) {
return this.decamelize(str).replace(STRING_DASHERIZE_REGEXP, '-');
+ },
+ pascalize: function(str) {
+ return str ? str.replace(/(\w)(\w*)/g, function(g0,g1,g2){return g1.toUpperCase() + g2.toLowerCase();}) : '';
}
};
|
pascalize name so that ENV var is created correctly in generated templates
|
diff --git a/src/GenericSnippetKeyGenerator.php b/src/GenericSnippetKeyGenerator.php
index <HASH>..<HASH> 100644
--- a/src/GenericSnippetKeyGenerator.php
+++ b/src/GenericSnippetKeyGenerator.php
@@ -66,18 +66,14 @@ class GenericSnippetKeyGenerator implements SnippetKeyGenerator
*/
private function getSnippetKeyDataAsString(array $data)
{
- $dataString = '';
-
- foreach ($this->usedDataParts as $dataKey) {
+ return array_reduce($this->usedDataParts, function ($carry, $dataKey) use ($data) {
if (!isset($data[$dataKey])) {
throw new MissingSnippetKeyGenerationDataException(
sprintf('"%s" is missing in snippet generation data.', $dataKey)
);
}
- $dataString .= '_' . $data[$dataKey];
- }
-
- return $dataString;
+ return $carry . '_' . $data[$dataKey];
+ }, '');
}
}
|
Issue #<I>: Refactor GenericSnippetKeyGenerator::getSnippetKeyDataAsString
|
diff --git a/provider/openstack/init.go b/provider/openstack/init.go
index <HASH>..<HASH> 100644
--- a/provider/openstack/init.go
+++ b/provider/openstack/init.go
@@ -11,12 +11,17 @@ import (
const (
providerType = "openstack"
- rootDiskSourceVolume = "volume"
- rootDiskSourceLocal = "local"
// Default root disk size when root-disk-source is volume.
defaultRootDiskSize = 30 * 1024 // 30 GiB
)
+const (
+ // BlockDeviceMapping source volume type for cinder block device.
+ rootDiskSourceVolume = "volume"
+ // BlockDeviceMapping source volume type for local block device.
+ rootDiskSourceLocal = "local"
+)
+
func init() {
environs.RegisterProvider(providerType, providerInstance)
|
Add comments to constants for BlockDeviceMapping source types.
|
diff --git a/jawn-core/src/main/java/net/javapla/jawn/core/DeploymentInfo.java b/jawn-core/src/main/java/net/javapla/jawn/core/DeploymentInfo.java
index <HASH>..<HASH> 100644
--- a/jawn-core/src/main/java/net/javapla/jawn/core/DeploymentInfo.java
+++ b/jawn-core/src/main/java/net/javapla/jawn/core/DeploymentInfo.java
@@ -107,6 +107,7 @@ public class DeploymentInfo {
if (path == null) return null;
+ if (path.startsWith(webappPath)) return path;
String p = assertStartSlash(path);
|
if path is already real just return
|
diff --git a/nanoplot/NanoPlot.py b/nanoplot/NanoPlot.py
index <HASH>..<HASH> 100755
--- a/nanoplot/NanoPlot.py
+++ b/nanoplot/NanoPlot.py
@@ -76,6 +76,7 @@ def main():
plots.extend(
make_plots(dfbarc, settings)
)
+ settings["path"] = path.join(args.outdir, args.prefix)
else:
plots = make_plots(datadf, settings)
make_report(plots, settings["path"], logfile)
|
reset path after processing all barcodes
|
diff --git a/enocean/protocol/packet.py b/enocean/protocol/packet.py
index <HASH>..<HASH> 100644
--- a/enocean/protocol/packet.py
+++ b/enocean/protocol/packet.py
@@ -135,7 +135,8 @@ class Packet(object):
class RadioPacket(Packet):
- destination = ''
+ destination = 0
+ destination_hex = ''
dbm = 0
status = 0
sender = 0
@@ -143,8 +144,13 @@ class RadioPacket(Packet):
learn = True
contains_eep = False
+ def __str__(self):
+ packet_str = super(RadioPacket, self).__str__()
+ return '%s->%s (%d dBm): %s' % (self.sender_hex, self.destination_hex, self.dbm, packet_str)
+
def parse(self):
self.destination = self._combine_hex(self.optional[1:5])
+ self.destination_hex = ':'.join([('%02X' % o) for o in self.optional[1:5]])
self.dBm = -self.optional[5]
self.status = self.data[-1]
self.sender = self._combine_hex(self.data[-5:-1])
|
- add RSSI and sender/receiver addresses to RadioPacket logging
|
diff --git a/packages/types/src/core/records.js b/packages/types/src/core/records.js
index <HASH>..<HASH> 100644
--- a/packages/types/src/core/records.js
+++ b/packages/types/src/core/records.js
@@ -10,7 +10,8 @@ import type {
import { List, Map, Record, Set } from "immutable";
-export { makeLocalKernelRecord, makeDesktopHostRecord } from "./hosts";
+export { HostRef, makeLocalKernelRecord, makeDesktopHostRecord } from "./hosts";
+export { KernelspecsRef } from "./kernelspecs";
/*
|
refactor: export refs from `records`.
Didn't realize we could only import from `records` here. In the future,
it might make more sense to rename `records` to `index` or something? I
feel like that's the purpose of that file.
|
diff --git a/ext_emconf.php b/ext_emconf.php
index <HASH>..<HASH> 100644
--- a/ext_emconf.php
+++ b/ext_emconf.php
@@ -9,7 +9,7 @@ $EM_CONF[$_EXTKEY] = array (
'description' => 'Boostrap Package delivers a full configured frontend for TYPO3 CMS 6.2, based on the Bootstrap CSS Framework.',
'category' => 'templates',
'shy' => 0,
- 'version' => '6.2.5',
+ 'version' => '6.2.6-dev',
'dependencies' => '',
'conflicts' => '',
'priority' => 'top',
|
Set version to <I>-dev
|
diff --git a/examples/bottles.rb b/examples/bottles.rb
index <HASH>..<HASH> 100644
--- a/examples/bottles.rb
+++ b/examples/bottles.rb
@@ -88,7 +88,7 @@ class Countdown
end
def subtraction
- %{take #{number.pronoun} #{removal}}
+ %{take #{number.pronoun} #{removal_strategy}}
end
end
end
@@ -100,7 +100,7 @@ class Location
'on'
end
- def removal
+ def removal_strategy
'off'
end
@@ -110,7 +110,7 @@ class Location
end
class Wall < Location
- def removal
+ def removal_strategy
'down'
end
end
@@ -120,7 +120,7 @@ class Box < Location
'in'
end
- def removal
+ def removal_strategy
'out'
end
end
|
rename removal method in example to removal_strategy
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -42,6 +42,7 @@ setup(
'organizations.backends',
'organizations.migrations',
'organizations.templatetags',
+ 'organizations.views',
],
classifiers=[
'Development Status :: 2 - Pre-Alpha',
|
Add the `views` module to the Python package build
Look like when separating the views into a submodule, it wasn't added to the `setup.py` file. So all pre-release versions on PyPI are lacking the `organizations.views.*`.
|
diff --git a/src/main/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java b/src/main/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java
index <HASH>..<HASH> 100644
--- a/src/main/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java
+++ b/src/main/org/openscience/cdk/ringsearch/FiguerasSSSRFinder.java
@@ -218,10 +218,10 @@ public class FiguerasSSSRFinder {
List<List<IAtom>> path = new ArrayList<List<IAtom>>(OKatoms);
List<IAtom> intersection = new ArrayList<IAtom>();
List<IAtom> ring = new ArrayList<IAtom>();
- for (int f = 0; f < OKatoms; f++)
+ for (final IAtom atom : molecule.atoms())
{
- path.set(f, new ArrayList<IAtom>());
- ((List<IAtom>)molecule.getAtom(f).getProperty(PATH)).clear();
+ path.add(new ArrayList<IAtom>());
+ atom.getProperty(PATH, List.class).clear();
}
// Initialize the queue with nodes attached to rootNode
neighbors = molecule.getConnectedAtomsList(rootNode);
|
Correct addition of atoms to a list. Unlike Vector, a List does not let you use set(int, Obj) unless that index already has an item.
Change-Id: I<I>d<I>e<I>efebb<I>f<I>f<I>fb<I>
|
diff --git a/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/src/Symfony/Component/Translation/Tests/TranslatorTest.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Translation/Tests/TranslatorTest.php
+++ b/src/Symfony/Component/Translation/Tests/TranslatorTest.php
@@ -182,7 +182,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
array('mo', 'MoFileLoader'),
array('po', 'PoFileLoader'),
array('php', 'PhpFileLoader'),
- array('ts', 'QtTranslationsLoader'),
+ array('ts', 'QtFileLoader'),
array('xlf', 'XliffFileLoader'),
array('yml', 'YamlFileLoader'),
);
|
[Translation] fixed a unit test
|
diff --git a/host/logbuf/logbuf.go b/host/logbuf/logbuf.go
index <HASH>..<HASH> 100644
--- a/host/logbuf/logbuf.go
+++ b/host/logbuf/logbuf.go
@@ -51,16 +51,14 @@ func NewLog(l *lumberjack.Logger) *Log {
l.Rotate() // force creating a log file straight away
log := &Log{
l: l,
- buf: make(map[int]*Data),
- closed: false,
+ closed: make(chan struct{}),
}
return log
}
type Log struct {
l *lumberjack.Logger
- buf map[int]*Data
- closed bool
+ closed chan struct{}
}
// Watch stream for new log events and transmit them.
@@ -160,10 +158,7 @@ outer:
ch <- data
case <-done:
break outer
- case <-time.After(200 * time.Millisecond):
- if !l.closed {
- continue
- }
+ case <-l.closed:
break outer
}
}
@@ -172,6 +167,6 @@ outer:
}
func (l *Log) Close() error {
- l.closed = true
+ close(l.closed)
return l.l.Close()
}
|
host/logbuf: Fix race on closed flag
|
diff --git a/lib/yap/shell/evaluation.rb b/lib/yap/shell/evaluation.rb
index <HASH>..<HASH> 100644
--- a/lib/yap/shell/evaluation.rb
+++ b/lib/yap/shell/evaluation.rb
@@ -314,12 +314,14 @@ module Yap::Shell
def process_ArgumentNode(node)
if node.single_quoted?
- "'#{node.lvalue}'"
+ debug_visit(node, 'single quoted argument, performing no expansion')
+ ["'#{node.lvalue}'"]
elsif node.double_quoted?
- variable_expand(node.lvalue)
+ debug_visit(node, 'double quoted argument, performing variable expansion')
+ [variable_expand(node.lvalue)]
else
- # TODO: refactor so this doesn't require a call to join.
- shell_expand(node.lvalue, escape_directory_expansions: false).join(' ')
+ debug_visit(node, 'unquoted argument, performing shell expansion')
+ shell_expand(node.lvalue, escape_directory_expansions: false)
end
end
|
Consistently return an array for process_ArgumentNode.
This resolves an issue where "ls *.gem" was failing when "ls" was assigned as an alias, e.g.: "alias ls='ls -G'"
|
diff --git a/pylru.py b/pylru.py
index <HASH>..<HASH> 100644
--- a/pylru.py
+++ b/pylru.py
@@ -299,13 +299,9 @@ class WriteThroughCacheManager(object):
return False
def __getitem__(self, key):
- # First we try the cache. If successful we just return the value. If
- # not we catch KeyError and ignore it since that just means the key
- # was not in the cache.
- try:
+ # Try the cache first. If successful we can just return the value.
+ if key in self.cache:
return self.cache[key]
- except KeyError:
- pass
# It wasn't in the cache. Look it up in the store, add the entry to
# the cache, and return the value.
@@ -391,13 +387,9 @@ class WriteBackCacheManager(object):
return False
def __getitem__(self, key):
- # First we try the cache. If successful we just return the value. If
- # not we catch KeyError and ignore it since that just means the key
- # was not in the cache.
- try:
+ # Try the cache first. If successful we can just return the value.
+ if key in self.cache:
return self.cache[key]
- except KeyError:
- pass
# It wasn't in the cache. Look it up in the store, add the entry to
# the cache, and return the value.
|
Simplified logic of a couple __getitem__ implementations.
|
diff --git a/Neos.Flow/Classes/Validation/ValidatorResolver.php b/Neos.Flow/Classes/Validation/ValidatorResolver.php
index <HASH>..<HASH> 100644
--- a/Neos.Flow/Classes/Validation/ValidatorResolver.php
+++ b/Neos.Flow/Classes/Validation/ValidatorResolver.php
@@ -309,7 +309,10 @@ class ValidatorResolver
if ($this->reflectionService->isPropertyAnnotatedWith($targetClassName, $classPropertyName, Flow\IgnoreValidation::class)) {
continue;
}
- if ($classSchema !== null && $classSchema->isPropertyTransient($classPropertyName) && $validationGroups === ['Persistence', 'Default']) {
+ if ($classSchema !== null
+ && $classSchema->hasProperty($classPropertyName)
+ && $classSchema->isPropertyTransient($classPropertyName)
+ && $validationGroups === ['Persistence', 'Default']) {
continue;
}
|
BUGFIX: Only check properties existing in schema
|
diff --git a/fetch.js b/fetch.js
index <HASH>..<HASH> 100644
--- a/fetch.js
+++ b/fetch.js
@@ -547,9 +547,15 @@ export function fetch(input, init) {
}
}
- request.headers.forEach(function(value, name) {
- xhr.setRequestHeader(name, value)
- })
+ if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) {
+ Object.getOwnPropertyNames(init.headers).forEach(function(name) {
+ xhr.setRequestHeader(name, normalizeValue(init.headers[name]))
+ })
+ } else {
+ request.headers.forEach(function(value, name) {
+ xhr.setRequestHeader(name, value)
+ })
+ }
if (request.signal) {
request.signal.addEventListener('abort', abortXhr)
|
If headers are passed in via a Record then do not normalise the header names as part of the request
|
diff --git a/lib/openapi3_parser/node_factory/object.rb b/lib/openapi3_parser/node_factory/object.rb
index <HASH>..<HASH> 100644
--- a/lib/openapi3_parser/node_factory/object.rb
+++ b/lib/openapi3_parser/node_factory/object.rb
@@ -61,7 +61,7 @@ module Openapi3Parser
def validate_input(error_collection)
super(error_collection)
- validator = Validator.new(processed_input, self)
+ validator = Validator.new(context.input, self)
error_collection.tap { |ec| ec.append(*validator.errors) }
end
diff --git a/lib/openapi3_parser/node_factory/object/node_builder.rb b/lib/openapi3_parser/node_factory/object/node_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/openapi3_parser/node_factory/object/node_builder.rb
+++ b/lib/openapi3_parser/node_factory/object/node_builder.rb
@@ -65,7 +65,7 @@ module Openapi3Parser
def check_validation_errors(name, field_config)
field_context = context.next_namespace(name)
- errors = field_config.validation_errors(input[name], factory)
+ errors = field_config.validation_errors(field_context.input, factory)
return unless errors.any?
raise Openapi3Parser::Error,
|
Don't use processed_input for validation
It's much easier to validate with more primitive collections
|
diff --git a/pyinfra/modules/virtualenv.py b/pyinfra/modules/virtualenv.py
index <HASH>..<HASH> 100644
--- a/pyinfra/modules/virtualenv.py
+++ b/pyinfra/modules/virtualenv.py
@@ -30,8 +30,7 @@ def virtualenv(
if present is False and host.fact.directory(path):
# Ensure deletion of unwanted virtualenv
# no 'yield from' in python 2.7
- for cmd in files.directory(state, host, path, present=False):
- yield cmd
+ yield files.directory(state, host, path, present=False)
elif present and not host.fact.directory(path):
# Create missing virtualenv
|
Fix relying on pyinfra generator unroll
|
diff --git a/vendor/plugins/dataset/lib/dataset.rb b/vendor/plugins/dataset/lib/dataset.rb
index <HASH>..<HASH> 100644
--- a/vendor/plugins/dataset/lib/dataset.rb
+++ b/vendor/plugins/dataset/lib/dataset.rb
@@ -1,5 +1,5 @@
-require 'activesupport'
-require 'activerecord'
+require 'active_support'
+require 'active_record'
require 'dataset/version'
require 'dataset/instance_methods'
|
get rid of deprecation warnings when running specs
|
diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/LibraryBuilder.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/LibraryBuilder.java
index <HASH>..<HASH> 100644
--- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/LibraryBuilder.java
+++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/LibraryBuilder.java
@@ -1013,8 +1013,8 @@ public class LibraryBuilder {
fun = (FunctionRef)resolveCall(fun.getLibraryName(), fun.getName(), invocation, false, false);
if (fun != null) {
if ("System".equals(invocation.getResolution().getOperator().getLibraryName())) {
- fun = buildFunctionRef(libraryName, functionName, paramList); // Rebuild the fun from the original arguments, otherwise it will resolve with conversions in place
- Expression systemFunction = systemFunctionResolver.resolveSystemFunction(fun);
+ FunctionRef systemFun = buildFunctionRef(libraryName, functionName, paramList); // Rebuild the fun from the original arguments, otherwise it will resolve with conversions in place
+ Expression systemFunction = systemFunctionResolver.resolveSystemFunction(systemFun);
if (systemFunction != null) {
return systemFunction;
}
|
#<I>: Fixed an issue with ConvertsTo functions not resolving return type correctly.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -50,8 +50,10 @@ class NoisePeer extends stream.Duplex {
this._handshake.send(null, (err, buf) => {
if (err) return this.destroy(err)
+ this.rawStream.cork() // hack to put buf and header in the same packet
this.rawStream.write(this._frame(buf)) // @mafintosh
if (this._handshake.finished) return this._onhandshake()
+ this.rawStream.uncork()
this._read()
})
@@ -71,6 +73,7 @@ class NoisePeer extends stream.Duplex {
}
this.rawStream.write(this._frame(header)) // @mafintosh
+ this.rawStream.uncork()
if (this._writePending) {
this._write(this._writePending.data, null, this._writePending.cb)
|
Temporarily cork/uncork to force last handshake and header in same pack
|
diff --git a/allauth/socialaccount/views.py b/allauth/socialaccount/views.py
index <HASH>..<HASH> 100644
--- a/allauth/socialaccount/views.py
+++ b/allauth/socialaccount/views.py
@@ -22,7 +22,7 @@ def signup(request, **kwargs):
return HttpResponseRedirect(reverse(connections))
signup = request.session.get('socialaccount_signup')
if not signup:
- return HttpResponseRedirect(reverse(login))
+ return HttpResponseRedirect(reverse('account_login'))
form_class = kwargs.pop("form_class", SignupForm)
template_name = kwargs.pop("template_name",
'socialaccount/signup.html')
|
Properly redirect to normal login when session is lost
|
diff --git a/src/Symfony/Bundle/FrameworkBundle/RequestListener.php b/src/Symfony/Bundle/FrameworkBundle/RequestListener.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Bundle/FrameworkBundle/RequestListener.php
+++ b/src/Symfony/Bundle/FrameworkBundle/RequestListener.php
@@ -103,7 +103,7 @@ class RequestListener
$parameters = $this->router->match($request->getPathInfo());
if (null !== $this->logger) {
- $this->logger->info(sprintf('Matched route "%s" (parameters: %s)', $parameters['_route'], $this->parametersToString($parameters)));
+ $this->logger->debug(sprintf('Matched route "%s" (parameters: %s)', $parameters['_route'], $this->parametersToString($parameters)));
}
$request->attributes->add($parameters);
|
Changed log level of "Matched route ..." message from info to debug
|
diff --git a/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py b/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py
index <HASH>..<HASH> 100644
--- a/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py
+++ b/telemetry/telemetry/internal/backends/chrome/android_browser_backend.py
@@ -203,9 +203,9 @@ class AndroidBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
@exc_util.BestEffort
def Close(self):
- super(AndroidBrowserBackend, self).Close()
if os.getenv('CHROME_PGO_PROFILING'):
self.devtools_client.DumpProfilingDataOfAllProcesses(timeout=120)
+ super(AndroidBrowserBackend, self).Close()
self._StopBrowser()
if self._tmp_minidump_dir:
shutil.rmtree(self._tmp_minidump_dir, ignore_errors=True)
|
[PGO] Dump all profiles prior to Close()
Devtool client is closed prior to pgo profile dumping, causing a null
reference to the client. This swaps the order such that the client
remains active while dumping, before we close it off.
Bug: chromium:<I>
Change-Id: I7ee7ec3e6a<I>f<I>b<I>d<I>dd7c<I>eb<I>dc6
Reviewed-on: <URL>
|
diff --git a/src/FormObject/Field/SelectOneField.php b/src/FormObject/Field/SelectOneField.php
index <HASH>..<HASH> 100644
--- a/src/FormObject/Field/SelectOneField.php
+++ b/src/FormObject/Field/SelectOneField.php
@@ -64,6 +64,23 @@ class SelectOneField extends Field implements Selectable{
}
public function isItemSelected(SelectableProxy $item){
+
+ if ($item->getKey() === '' && $this->value === null) {
+ return true;
+ }
+
+ if ($item->getKey() === '0' && $this->value === null) {
+ return false;
+ }
+
+ if ($item->getKey() === 0 && $this->value === null) {
+ return false;
+ }
+
+ if ($item->getKey() === 0 && $this->value === '') {
+ return false;
+ }
+
return ($item->getKey() == $this->value);
}
|
Added better casting of falsish values
|
diff --git a/core/src/main/java/net/time4j/PlainTime.java b/core/src/main/java/net/time4j/PlainTime.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/net/time4j/PlainTime.java
+++ b/core/src/main/java/net/time4j/PlainTime.java
@@ -3415,7 +3415,7 @@ public final class PlainTime
}
@Override
- public ChronoEntity<?> preformat(
+ public ChronoValues preformat(
PlainTime context,
AttributeQuery attributes
) {
|
adjustment for changed ChronoMerger (3)
|
diff --git a/tile_generator/tile_metadata.py b/tile_generator/tile_metadata.py
index <HASH>..<HASH> 100644
--- a/tile_generator/tile_metadata.py
+++ b/tile_generator/tile_metadata.py
@@ -701,8 +701,16 @@ class TileMetadata(object):
errand = dict()
if job.get('lifecycle') == 'errand':
errand['name'] = job['name']
- if job.get('post_deploy'): post_deploy_errands.append(errand)
- if job.get('pre_delete'): pre_delete_errands.append(errand)
+ if job.get('post_deploy'):
+ if job.get('type') == 'deploy-all': # deploy-all should run first.
+ post_deploy_errands.insert(0, errand)
+ else:
+ post_deploy_errands.append(errand)
+ if job.get('pre_delete'): # delete-all should run last.
+ if job.get('type') == 'delete-all':
+ pre_delete_errands.append(errand)
+ else:
+ pre_delete_errands.insert(0, errand)
for template in job.get('templates', {}):
errand = {'colocated': True}
# TODO: This should all really be checked in Cerberus for validation!
|
Ensure ordering of deploy-all/delete-all errands.
deploy-all should be the first post-deploy errand.
delete-all should be the last pre-delete errand.
|
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index <HASH>..<HASH> 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 3.1.1
+current_version = 3.1.2
commit = True
tag = True
diff --git a/aquarius/__init__.py b/aquarius/__init__.py
index <HASH>..<HASH> 100644
--- a/aquarius/__init__.py
+++ b/aquarius/__init__.py
@@ -9,5 +9,5 @@
__author__ = """OceanProtocol"""
# fmt: off
# bumpversion needs single quotes
-__version__ = '3.1.1'
+__version__ = '3.1.2'
# fmt: on
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ install_requirements = [
"elasticsearch==7.15.0",
"PyYAML==5.4.1",
"pytz==2021.1",
- "ocean-contracts==0.6.7",
+ "ocean-contracts==0.6.9",
"web3==5.23.1",
"jsonschema==3.2.0",
"eciespy",
@@ -95,7 +95,7 @@ setup(
url="https://github.com/oceanprotocol/aquarius",
# fmt: off
# bumpversion needs single quotes
- version='3.1.1',
+ version='3.1.2',
# fmt: on
zip_safe=False,
)
|
Feature/support more networks (#<I>)
add more supported networks
|
diff --git a/src/test/java/com/googlecode/lanterna/tutorial/Tutorial03.java b/src/test/java/com/googlecode/lanterna/tutorial/Tutorial03.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/googlecode/lanterna/tutorial/Tutorial03.java
+++ b/src/test/java/com/googlecode/lanterna/tutorial/Tutorial03.java
@@ -9,7 +9,6 @@ import com.googlecode.lanterna.screen.TerminalScreen;
import com.googlecode.lanterna.terminal.DefaultTerminalFactory;
import com.googlecode.lanterna.terminal.Terminal;
-import javax.xml.soap.Text;
import java.io.IOException;
import java.util.Random;
|
Removing unused import (was put there by mistake)
|
diff --git a/spec/helper.rb b/spec/helper.rb
index <HASH>..<HASH> 100644
--- a/spec/helper.rb
+++ b/spec/helper.rb
@@ -11,46 +11,3 @@ end
require 'bacon'
puts "Ruby: #{ RUBY_VERSION }; Pry Theme: #{ PryTheme::VERSION }"
-
-class InputTester
- def initialize(*actions)
- @orig_actions = actions.dup
- @actions = actions
- end
-
- def readline(*)
- @actions.shift
- end
-
- def rewind
- @actions = @orig_actions.dup
- end
-end
-
-def mock_pry(*args)
- args.flatten!
- binding = args.first.is_a?(Binding) ? args.shift : binding()
-
- input = InputTester.new(*args)
- output = StringIO.new
-
- redirect_pry_io(input, output) do
- binding.pry
- end
-
- output.string
-end
-
-def redirect_pry_io(new_in, new_out = StringIO.new)
- old_in = Pry.input
- old_out = Pry.output
-
- Pry.input = new_in
- Pry.output = new_out
- begin
- yield
- ensure
- Pry.input = old_in
- Pry.output = old_out
- end
-end
|
Remove old crufty testing APIs
|
diff --git a/spec/network_interface_spec.rb b/spec/network_interface_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/network_interface_spec.rb
+++ b/spec/network_interface_spec.rb
@@ -215,6 +215,12 @@ IP_OUT
end
end
+ describe '#gateway6' do
+ it 'returns the correct default gateway for IPv6 routing' do
+ expect(subj.gateway6).to eq('d:e:a:d:b:e:e:f')
+ end
+ end
+
describe "#start" do
it "returns true on success" do
expect(AwesomeSpawn).to receive(:run).with(*IFUP_ARGS).and_return(result("", 0))
|
Added spec for new gateway6 method
|
diff --git a/src/main/groovy/org/ajoberstar/gradle/git/tasks/GitClone.java b/src/main/groovy/org/ajoberstar/gradle/git/tasks/GitClone.java
index <HASH>..<HASH> 100644
--- a/src/main/groovy/org/ajoberstar/gradle/git/tasks/GitClone.java
+++ b/src/main/groovy/org/ajoberstar/gradle/git/tasks/GitClone.java
@@ -57,8 +57,9 @@ public class GitClone extends DefaultTask implements AuthenticationSupported {
cmd.setCredentialsProvider(getCredentialsProvider());
cmd.setURI(getUri().toString());
cmd.setRemote(getRemote());
+ cmd.setBare(getBare());
cmd.setNoCheckout(!getCheckout());
- cmd.setBranch(getBranch());
+ cmd.setBranch("refs/heads/" + getBranch());
cmd.setBranchesToClone(getBranchesToClone());
cmd.setCloneAllBranches(getCloneAllBranches());
cmd.setDirectory(getDestinationDir());
|
Fixed branch specification for clone command.
|
diff --git a/sources/lib/Tester/FoundationSessionAtoum.php b/sources/lib/Tester/FoundationSessionAtoum.php
index <HASH>..<HASH> 100644
--- a/sources/lib/Tester/FoundationSessionAtoum.php
+++ b/sources/lib/Tester/FoundationSessionAtoum.php
@@ -28,7 +28,7 @@ use PommProject\Foundation\SessionBuilder;
*/
abstract class FoundationSessionAtoum extends VanillaSessionAtoum
{
- protected function createSessionBuilder($configuration)
+ protected function createSessionBuilder(array $configuration)
{
return new SessionBuilder($configuration);
}
diff --git a/sources/lib/Tester/VanillaSessionAtoum.php b/sources/lib/Tester/VanillaSessionAtoum.php
index <HASH>..<HASH> 100644
--- a/sources/lib/Tester/VanillaSessionAtoum.php
+++ b/sources/lib/Tester/VanillaSessionAtoum.php
@@ -77,7 +77,7 @@ abstract class VanillaSessionAtoum extends Atoum
* @param array $configuration
* @return SessionBuilder
*/
- protected function createSessionBuilder($configuration)
+ protected function createSessionBuilder(array $configuration)
{
return new SessionBuilder($configuration);
}
|
Session builder needs array in SessionAtoum classes.
|
diff --git a/holoviews/core/dimension.py b/holoviews/core/dimension.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/dimension.py
+++ b/holoviews/core/dimension.py
@@ -128,7 +128,8 @@ class LabelledData(param.Parameterized):
"""
LabelledData is a mix-in class designed to introduce the value and
label parameters (and corresponding methods) to any class
- containing data.
+ containing data. This class assumes that the core data contents
+ will be held in the attribute called 'data'.
Used together, value and label is designed to allow a simple and
flexible means of addressing data. For instance, if you are
|
Added clarification to LabelledData class docstring
|
diff --git a/packages/node-krl-compiler/src/c/RuleSelect.js b/packages/node-krl-compiler/src/c/RuleSelect.js
index <HASH>..<HASH> 100644
--- a/packages/node-krl-compiler/src/c/RuleSelect.js
+++ b/packages/node-krl-compiler/src/c/RuleSelect.js
@@ -145,26 +145,6 @@ module.exports = function(ast, comp, e){
var lisp = traverse(ast.event);
var state_machine = evalEELisp(lisp, "start", "end");
- //add all the loop-back conditions
- _.each(state_machine, function(arr, key){
- var away_paths = _.uniq(_.compact(_.map(arr, function(transition){
- var condition = transition[0];
- var next_state = transition[1];
- if(!_.isString(condition) && (next_state === key)){
- return;//ignore this
- }
- return condition;
- })));
-
- state_machine[key].push([
- [
- "not",
- wrapInOr(away_paths)
- ],
- key
- ]);
- });
-
return e("obj", {
graph: e("json", graph),
eventexprs: e("obj", eventexprs),
|
statemachine should remain on current state by default
|
diff --git a/tests/python/unittest/test_ndarray.py b/tests/python/unittest/test_ndarray.py
index <HASH>..<HASH> 100644
--- a/tests/python/unittest/test_ndarray.py
+++ b/tests/python/unittest/test_ndarray.py
@@ -56,9 +56,9 @@ def check_with_uniform(uf, arg_shapes, dim=None, npuf=None, rmin=-10, type_list=
if isinstance(out1, mx.nd.NDArray):
out1 = out1.asnumpy()
if dtype == np.float16:
- assert_almost_equal(out1, out2, rtol=2e-3)
+ assert_almost_equal(out1, out2, rtol=2e-3, atol=1e-5)
else:
- assert_almost_equal(out1, out2)
+ assert_almost_equal(out1, out2, atol=1e-5)
def random_ndarray(dim):
shape = tuple(np.random.randint(1, int(1000**(1.0/dim)), size=dim))
|
set proper atol for check_with_uniform (#<I>)
|
diff --git a/django_extensions/management/commands/runscript.py b/django_extensions/management/commands/runscript.py
index <HASH>..<HASH> 100644
--- a/django_extensions/management/commands/runscript.py
+++ b/django_extensions/management/commands/runscript.py
@@ -11,9 +11,6 @@ except NameError:
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
- make_option('--verbosity', action='store', dest='verbosity', default='0',
- type='choice', choices=['0', '1', '2'],
- help='Verbosity level; 0=no output, 1=minimal output, 2=all output'),
make_option('--fixtures', action='store_true', dest='infixtures', default=False,
help='Only look in app.fixtures subdir'),
make_option('--noscripts', action='store_true', dest='noscripts', default=False,
@@ -88,3 +85,11 @@ class Command(BaseCommand):
run_script(script)
+
+# Backwards compatibility for Django r9110
+if not [opt for opt in Command.option_list if opt.dest=='verbosity']:
+ Command.option_list += (
+ make_option('--verbosity', '-v', action="store", dest="verbosity",
+ default='1', type='choice', choices=['0', '1', '2'],
+ help="Verbosity level; 0=minimal output, 1=normal output, 2=all output"),
+ )
|
missed verbosity patch for runscript thanks clintecker! fixes ticket #<I>
|
diff --git a/lib/plugins/module-paths.js b/lib/plugins/module-paths.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/module-paths.js
+++ b/lib/plugins/module-paths.js
@@ -54,6 +54,14 @@ if (config.debugMode) {
addDebugPlugins(paths);
}
+var nvmBin = env.NVM_BIN;
+if (nvmBin && typeof nvmBin === 'string') {
+ nvmBin = formatPath(path.join(nvmBin, '../lib'));
+ if (paths.indexOf(nvmBin) == -1) {
+ paths.push(nvmBin);
+ }
+}
+
if (appDataDir && paths.indexOf(appDataDir) == -1) {
paths.push(appDataDir);
}
|
refactor: load plugins from nvm path
|
diff --git a/fireplace/__init__.py b/fireplace/__init__.py
index <HASH>..<HASH> 100644
--- a/fireplace/__init__.py
+++ b/fireplace/__init__.py
@@ -1,3 +1,5 @@
+import pkg_resources
+
__author__ = "Jerome Leclanche"
__email__ = "jerome@leclan.ch"
-__version__ = "0.1"
+__version__ = pkg_resources.require("fireplace")[0].version
|
Get version from pkg_resources
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -61,7 +61,7 @@ module.exports.SRC_USAFE_INLINE = "'unsafe-inline'";
/** Allows unsafe dynamic code evaluation such as JavaScript eval() */
module.exports.SRC_UNSAFE_EVAL = "'unsafe-eval'";
/** Allows loading resources via the data scheme (e.g. Base64 encoded images). */
-module.exports.SRC_DATA = "data";
+module.exports.SRC_DATA = "data:";
/** Wildcard, allows anything. */
module.exports.SRC_ANY = "*";
/** Allows loading resources only over HTTPS on any domain. */
|
fixed data uri constant
A ':' was missing
|
diff --git a/malcolm/modules/scanning/parts/scanrunnerpart.py b/malcolm/modules/scanning/parts/scanrunnerpart.py
index <HASH>..<HASH> 100644
--- a/malcolm/modules/scanning/parts/scanrunnerpart.py
+++ b/malcolm/modules/scanning/parts/scanrunnerpart.py
@@ -209,7 +209,8 @@ class ScanRunnerPart(builtin.parts.ChildPart):
entry['generators'] = generators
compound_generator = CompoundGenerator.from_dict(entry)
if compound_generator.duration <= 0.0:
- raise ValueError("Negative generator duration - is it missing from the YAML?")
+ raise ValueError(
+ "Negative generator duration - is it missing from the YAML?")
return compound_generator
def parse_scan(self, entry):
|
ScanRunnerPart: fixing line lengths
|
diff --git a/lib/relational-util.js b/lib/relational-util.js
index <HASH>..<HASH> 100644
--- a/lib/relational-util.js
+++ b/lib/relational-util.js
@@ -48,7 +48,7 @@ module.exports.makeentp = function (ent) {
}
else if (_.isArray(ent[field])) {
type[field] = ARRAY_TYPE;
- entp[field] = JSON.stringify(ent[field])
+ entp[field] = ent[field]
}
else if (_.isObject(ent[field])) {
type[field] = OBJECT_TYPE;
@@ -95,7 +95,7 @@ module.exports.makeent = function (ent, row) {
entp[field] = parseIfJSON(row[field])
}
else if (senecatype[field] == ARRAY_TYPE) {
- entp[field] = parseIfJSON(row[field])
+ entp[field] = row[field]
}
else if (senecatype[field] == DATE_TYPE) {
entp[field] = new Date(row[field])
@@ -122,4 +122,3 @@ module.exports.tablename = function (entity) {
return (canon.base ? canon.base + '_' : '') + canon.name
}
-
|
PostgreSQL supports arrays, this plugin should not stringily them.
|
diff --git a/lib/devpipeline_core/sanitizer.py b/lib/devpipeline_core/sanitizer.py
index <HASH>..<HASH> 100644
--- a/lib/devpipeline_core/sanitizer.py
+++ b/lib/devpipeline_core/sanitizer.py
@@ -8,19 +8,17 @@ import devpipeline_core.plugin
def _sanitize_empty_depends(configuration, error_fn):
- for component_name in configuration.components():
- component = configuration.get(component_name)
+ for name, component in configuration.items():
for dep in component.get_list("depends"):
if not dep:
- error_fn("Empty dependency in {}".format(component_name))
+ error_fn("Empty dependency in {}".format(name))
_IMPLICIT_PATTERN = re.compile(R'\$\{([a-z_\-0-9\.]+):.+\}')
def _sanitize_implicit_depends(configuration, error_fn):
- for component_name in configuration.components():
- component = configuration.get(component_name)
+ for name, component in configuration.items():
component_deps = component.get_list("depends")
for key in component:
val = component.get(key, raw=True)
@@ -30,7 +28,7 @@ def _sanitize_implicit_depends(configuration, error_fn):
if dep not in component_deps:
error_fn(
"{}:{} has an implicit dependency on {}".format(
- component_name, key, dep))
+ name, key, dep))
_SANITIZERS = devpipeline_core.plugin.query_plugins(
|
Fix #5 - Use dictionary-like interface to access component configurations
|
diff --git a/pysat/tests/test_instruments.py b/pysat/tests/test_instruments.py
index <HASH>..<HASH> 100644
--- a/pysat/tests/test_instruments.py
+++ b/pysat/tests/test_instruments.py
@@ -1,11 +1,18 @@
import pytest
+# Make sure to import your instrument library here
import pysat
+# Import the test classes from pysat
from pysat.tests.instrument_test_class import generate_instrument_list
from pysat.tests.instrument_test_class import InstTestClass
+# Developers for instrument libraries should update the following line to
+# point to their own library package
+# e.g.,
+# instruments = generate_instrument_list(package=mypackage.instruments)
instruments = generate_instrument_list(package=pysat.instruments)
+# The following lines apply the custom instrument lists to each type of test
method_list = [func for func in dir(InstTestClass)
if callable(getattr(InstTestClass, func))]
# Search tests for iteration via pytestmark, update instrument list
@@ -31,6 +38,10 @@ class TestInstruments(InstTestClass):
def setup(self):
"""Runs before every method to create a clean testing setup."""
+ # Developers for instrument libraries should update the following line
+ # to point to their own library package
+ # e.g.,
+ # self.package = mypackage.instruments
self.package = pysat.instruments
def teardown(self):
|
DOC: update comments in test scripts
|
diff --git a/src/com/google/javascript/jscomp/GlobalTypeInfo.java b/src/com/google/javascript/jscomp/GlobalTypeInfo.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/GlobalTypeInfo.java
+++ b/src/com/google/javascript/jscomp/GlobalTypeInfo.java
@@ -117,7 +117,9 @@ class GlobalTypeInfo implements CompilerPass, TypeIRegistry {
DiagnosticType.warning(
"JSC_NTI_COULD_NOT_INFER_CONST_TYPE",
"All constants must be typed. The compiler could not infer the type "
- + "of this constant. Please use an explicit type annotation.");
+ + "of this constant. Please use an explicit type annotation. "
+ + "For more information, see:\n"
+ + "https://github.com/google/closure-compiler/wiki/Using-NTI-(new-type-inference)#warnings-about-uninferred-constants");
static final DiagnosticType MISPLACED_CONST_ANNOTATION =
DiagnosticType.warning(
|
[NTI] Link to the explanation of uninferred-const warnings in the error message.
-------------
Created by MOE: <URL>
|
diff --git a/conway.py b/conway.py
index <HASH>..<HASH> 100755
--- a/conway.py
+++ b/conway.py
@@ -57,7 +57,11 @@ def colored_cells(term):
elif num_colors >= 8:
funcs = term.on_red, term.on_green, term.on_blue
else:
- funcs = (term.reverse,) * 3
+ # For black and white, use the checkerboard cursor from the vt100
+ # alternate charset:
+ return (term.reverse(' '),
+ term.smacs + term.reverse('a') + term.rmacs,
+ term.smacs + 'a' + term.rmacs)
# Wrap spaces in whatever pretty colors we chose:
return [f(' ') for f in funcs]
|
Demonstrate the use of the vt<I> alternate charset when in B&W mode.
|
diff --git a/drools-core/src/main/java/org/drools/rule/builder/dialect/asm/GeneratorHelper.java b/drools-core/src/main/java/org/drools/rule/builder/dialect/asm/GeneratorHelper.java
index <HASH>..<HASH> 100644
--- a/drools-core/src/main/java/org/drools/rule/builder/dialect/asm/GeneratorHelper.java
+++ b/drools-core/src/main/java/org/drools/rule/builder/dialect/asm/GeneratorHelper.java
@@ -112,7 +112,7 @@ public final class GeneratorHelper {
return createInvokerClassGenerator(className, stub, classLoader, getTypeResolver(stub, workingMemory, classLoader));
}
- static ClassGenerator createInvokerClassGenerator(final String className,
+ public static ClassGenerator createInvokerClassGenerator(final String className,
final InvokerDataProvider data,
final CompositeClassLoader classLoader,
final TypeResolver typeResolver) {
|
Resolve split-packages: Make methods/classes public to prevent compile errors
|
diff --git a/src/Illuminate/Support/Collection.php b/src/Illuminate/Support/Collection.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Support/Collection.php
+++ b/src/Illuminate/Support/Collection.php
@@ -195,7 +195,7 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator
*/
public function get($key, $default = null)
{
- if (array_key_exists($key, $this->items))
+ if ($this->offsetExists($key))
{
return $this->items[$key];
}
@@ -251,7 +251,7 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator
*/
public function has($key)
{
- return array_key_exists($key, $this->items);
+ return $this->offsetExists($key);
}
/**
|
[<I>] Collection - DDRYs up the code a little more
|
diff --git a/audio/audio.go b/audio/audio.go
index <HASH>..<HASH> 100644
--- a/audio/audio.go
+++ b/audio/audio.go
@@ -190,8 +190,8 @@ type Context struct {
players *players
driver *driver.Player
sampleRate int
- frames int
- writtenBytes int
+ frames int64
+ writtenBytes int64
}
var (
@@ -247,7 +247,7 @@ func (c *Context) Update() error {
}
c.frames++
bytesPerFrame := c.sampleRate * bytesPerSample * channelNum / ebiten.FPS
- l := (c.frames * bytesPerFrame) - c.writtenBytes
+ l := (c.frames * int64(bytesPerFrame)) - c.writtenBytes
l &= mask
c.writtenBytes += l
buf := make([]byte, l)
diff --git a/internal/loop/run.go b/internal/loop/run.go
index <HASH>..<HASH> 100644
--- a/internal/loop/run.go
+++ b/internal/loop/run.go
@@ -32,7 +32,7 @@ type runContext struct {
fps int
currentFPS float64
runningSlowly bool
- frames int
+ frames int64
lastUpdated int64
lastFPSUpdated int64
m sync.RWMutex
|
Fix frame counters to int<I> (#<I>)
|
diff --git a/tests/NavigationTest.php b/tests/NavigationTest.php
index <HASH>..<HASH> 100644
--- a/tests/NavigationTest.php
+++ b/tests/NavigationTest.php
@@ -19,6 +19,8 @@ class NavigationTest extends TestCase
$collection = (new Collection())->push($menu, 'main');
$this->assertEquals($navigation->getMenu('main'), $menu);
+ $this->assertEquals($navigation->get('main'), $menu);
+ $this->assertEquals($navigation->menu('main'), $menu);
$this->assertEquals($navigation->getMenus()->values(), $collection->values());
}
|
Test alias methods in a menu
|
diff --git a/src/MigrationTool/SqlMigrationTool.php b/src/MigrationTool/SqlMigrationTool.php
index <HASH>..<HASH> 100644
--- a/src/MigrationTool/SqlMigrationTool.php
+++ b/src/MigrationTool/SqlMigrationTool.php
@@ -47,7 +47,7 @@ abstract class SqlMigrationTool extends AbstractMigrationTool
protected function createMigrationTable()
{
/** @noinspection SqlNoDataSourceInspection,SqlDialectInspection */
- if (false === $this->phpDataObject()->exec("SELECT null FROM {$this->migrationTableName()} LIMIT 1")) {
+ if (false === $this->phpDataObject()->prepare("SELECT null FROM {$this->migrationTableName()} LIMIT 1")) {
/** @noinspection SqlNoDataSourceInspection,SqlDialectInspection */
$result = $this->phpDataObject()->exec(
"CREATE TABLE IF NOT EXISTS {$this->migrationTableName()}" .
|
Fixed general error: <I> Cannot execute queries while other unbuffered queries are active.
|
diff --git a/lib/scoped_search/rails_helper.rb b/lib/scoped_search/rails_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/scoped_search/rails_helper.rb
+++ b/lib/scoped_search/rails_helper.rb
@@ -219,5 +219,7 @@ module ScopedSearch
auto_complete_field_jquery(method, url, completion_options)
end
+ deprecate :auto_complete_field_tag_jquery, :auto_complete_field_tag, :auto_complete_result
+
end
end
|
depracating javascript in helper method used in pre-assets pipe-line code.
|
diff --git a/exchangelib/items.py b/exchangelib/items.py
index <HASH>..<HASH> 100644
--- a/exchangelib/items.py
+++ b/exchangelib/items.py
@@ -130,7 +130,7 @@ class Item(EWSElement):
EffectiveRightsField('effective_rights', field_uri='item:EffectiveRights', is_read_only=True),
CharField('last_modified_name', field_uri='item:LastModifiedName', is_read_only=True),
DateTimeField('last_modified_time', field_uri='item:LastModifiedTime', is_read_only=True),
- BooleanField('is_associated', field_uri='item:IsAssociated', is_read_only=True),
+ BooleanField('is_associated', field_uri='item:IsAssociated', is_read_only=True, supported_from=EXCHANGE_2010),
# These two URIFields throw ErrorInternalServerError
# URIField('web_client_read_form_query_string', field_uri='calendar:WebClientReadFormQueryString',
# is_read_only=True, supported_from=EXCHANGE_2010),
|
'is_associated' is not supported on Exchange<I>
|
diff --git a/scripts/performance/perf_processes.py b/scripts/performance/perf_processes.py
index <HASH>..<HASH> 100644
--- a/scripts/performance/perf_processes.py
+++ b/scripts/performance/perf_processes.py
@@ -639,7 +639,6 @@ class LoadClient:
except Exception as ex:
print("{} run_test error {}".format(self._name, ex))
self._loop.stop()
- raise ex
self.gen_reqs()
|
Remove raise ex to be able to exit
|
diff --git a/buzz/__init__.py b/buzz/__init__.py
index <HASH>..<HASH> 100644
--- a/buzz/__init__.py
+++ b/buzz/__init__.py
@@ -1,6 +1,7 @@
import contextlib
import inspect
import os
+import sys
import textwrap
@@ -79,7 +80,7 @@ class Buzz(Exception):
final_message = cls.sanitize_errstr(final_message)
if on_error is not None:
on_error(err, final_message)
- raise cls(final_message)
+ raise cls(final_message).with_traceback(sys.exc_info()[2])
finally:
if do_finally is not None:
do_finally()
|
Issue #<I>: Added traceback to handle_errors
|
diff --git a/lib/survey_gizmo/configuration.rb b/lib/survey_gizmo/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/survey_gizmo/configuration.rb
+++ b/lib/survey_gizmo/configuration.rb
@@ -65,7 +65,7 @@ module SurveyGizmo
tries: 4,
on: [
Errno::ETIMEDOUT,
- Faraday::Error::ClientError,
+ Faraday::ClientError,
Net::ReadTimeout,
SurveyGizmo::BadResponseError,
SurveyGizmo::RateLimitExceededError
|
Fix faraday_middleware deprecation error
Turns into an exception at <I>
|
diff --git a/src/Bkwld/Decoy/Input/Files.php b/src/Bkwld/Decoy/Input/Files.php
index <HASH>..<HASH> 100644
--- a/src/Bkwld/Decoy/Input/Files.php
+++ b/src/Bkwld/Decoy/Input/Files.php
@@ -109,7 +109,7 @@ class Files {
// If the validation rules include a request to encode a video, add it to the encoding queue
if (Str::contains($item::$rules[$field], 'video:encode')
&& method_exists($item, 'encodeOnSave')) {
- $item->encodeOnSave(app('decoy')->convertToArraySyntax($field));
+ $item->encodeOnSave($this->column($field));
}
}
|
Storing the model attribtue instead of the input field in the DB
I think this is more scalable and more relational
|
diff --git a/tasks/github_releaser.js b/tasks/github_releaser.js
index <HASH>..<HASH> 100644
--- a/tasks/github_releaser.js
+++ b/tasks/github_releaser.js
@@ -121,9 +121,10 @@ module.exports = function(grunt) {
});
async.map(src, uploadAsset, function(err, result){
- if(err) return showError('Some files are failed to upload');
+ if(err) return showError('Some files failed to upload');
- grunt.log.oklns('Uploade complete');
+ grunt.log.oklns('Upload complete');
+ done();
});
});
|
fix lack of a `done` function call and some typos
|
diff --git a/injector.py b/injector.py
index <HASH>..<HASH> 100644
--- a/injector.py
+++ b/injector.py
@@ -62,12 +62,7 @@ def reraise(original, exception, maximum_frames=1):
frames = inspect.getinnerframes(tb)
if len(frames) > maximum_frames:
exception = original
- try:
- raise exception.with_traceback(tb)
- except AttributeError:
- # This syntax is not a valid Python 3 syntax so we have
- # to work around that
- exec('raise exception.__class__, exception, tb')
+ raise exception.with_traceback(tb)
class Error(Exception):
|
Remove another Python 2 fallback, not needed anymore
|
diff --git a/packages/components/bolt-image/src/image.js b/packages/components/bolt-image/src/image.js
index <HASH>..<HASH> 100644
--- a/packages/components/bolt-image/src/image.js
+++ b/packages/components/bolt-image/src/image.js
@@ -15,7 +15,7 @@ import { ifDefined } from 'lit-html/directives/if-defined';
import Ajv from 'ajv';
import imageStyles from './image.scss';
-import ratioStyles from '../../bolt-ratio/src/ratio.scss';
+import ratioStyles from '@bolt/components-ratio/src/ratio.scss';
import schema from '../image.schema.yml';
|
refactor: update path to ratio styles
|
diff --git a/flask_cors.py b/flask_cors.py
index <HASH>..<HASH> 100644
--- a/flask_cors.py
+++ b/flask_cors.py
@@ -121,6 +121,8 @@ def cross_origin(*args, **kwargs):
resp = make_response(f(*args, **kwargs))
_set_cors_headers(resp, options)
+ resp._FLASK_CORS_EVALUATED = True # Mark response as evaluated
+
return resp
# If True, intercept OPTIONS requests by modifying the view function
@@ -224,6 +226,18 @@ class CORS(object):
def _set_cors_headers(resp, options):
+ '''
+ Performs the actual evaluation of Flas-CORS options and actually
+ modifies the response object.
+
+ This function is used both in the decorator and the after_request
+ callback
+ '''
+
+ # If CORS has already been evaluated via the decorator, skip
+ if hasattr(resp, '_FLASK_CORS_EVALUATED'):
+ return resp
+
request_origin = request.headers.get('Origin', None)
wildcard = options.get('origins') == '*'
# If the Origin header is not present terminate this set of steps.
|
Ensures CORS options are not evaluated twice
|
diff --git a/pkg/storage/etcd/etcd_helper_test.go b/pkg/storage/etcd/etcd_helper_test.go
index <HASH>..<HASH> 100644
--- a/pkg/storage/etcd/etcd_helper_test.go
+++ b/pkg/storage/etcd/etcd_helper_test.go
@@ -41,8 +41,6 @@ import (
storagetesting "k8s.io/kubernetes/pkg/storage/testing"
)
-const validEtcdVersion = "etcd 2.0.9"
-
func testScheme(t *testing.T) (*runtime.Scheme, runtime.Codec) {
scheme := runtime.NewScheme()
scheme.Log(t)
|
delete unused variable in etcd_help_test.go
|
diff --git a/lib/rbarman/backup.rb b/lib/rbarman/backup.rb
index <HASH>..<HASH> 100644
--- a/lib/rbarman/backup.rb
+++ b/lib/rbarman/backup.rb
@@ -237,7 +237,13 @@ module RBarman
def missing_wal_files
missing = Array.new
needed_wal_files.each do |needed|
- existing = @wal_files.select { |f| f == needed }.first
+ existing = nil
+ @wal_files.each do |f|
+ if f == needed
+ existing = f
+ break
+ end
+ end
missing << needed unless existing
end
WalFiles.new(missing)
diff --git a/lib/rbarman/version.rb b/lib/rbarman/version.rb
index <HASH>..<HASH> 100644
--- a/lib/rbarman/version.rb
+++ b/lib/rbarman/version.rb
@@ -1,3 +1,3 @@
module RBarman
- VERSION = "0.0.10"
+ VERSION = "0.0.11"
end
|
improve speed by replacing Array#select with iterating over existing wal files and break from loop if needed wal file is found
|
diff --git a/api/src/main/java/jakarta/enterprise/inject/build/compatible/spi/Enhancement.java b/api/src/main/java/jakarta/enterprise/inject/build/compatible/spi/Enhancement.java
index <HASH>..<HASH> 100644
--- a/api/src/main/java/jakarta/enterprise/inject/build/compatible/spi/Enhancement.java
+++ b/api/src/main/java/jakarta/enterprise/inject/build/compatible/spi/Enhancement.java
@@ -79,11 +79,12 @@ public @interface Enhancement {
* be used to narrow down the set of <em>expected types</em> to types that use
* any bean defining annotation.
* <p>
- * Defaults to the {@linkplain BeanDefiningAnnotations set of bean defining annotations}.
+ * Defaults to an empty array, so that the set of <em>expected types</em> is not
+ * narrowed down in any way.
*
* @return types of annotations that must be present on the <em>expected types</em>
*/
- Class<? extends Annotation>[] withAnnotations() default BeanDefiningAnnotations.class;
+ Class<? extends Annotation>[] withAnnotations() default {};
/**
* Marker annotation type that, for the purpose of {@link Enhancement#withAnnotations()},
|
Change @Enhancement#withAnnotations default value to empty array
Previously, the default value of `@Enhancement#withAnnotations` was
the `BeanDefiningAnnotations.class` marker type. To align with
Portable Extensions, which don't have any annotation restriction
by default, this commit changes the default value to an empty array.
|
diff --git a/src/phpFastCache/Core/DriverAbstract.php b/src/phpFastCache/Core/DriverAbstract.php
index <HASH>..<HASH> 100644
--- a/src/phpFastCache/Core/DriverAbstract.php
+++ b/src/phpFastCache/Core/DriverAbstract.php
@@ -33,6 +33,36 @@ abstract class DriverAbstract implements DriverInterface
public $instant;
/**
+ * Use for __destruct()
+ * @var array
+ */
+ public static $memory = array(
+
+ );
+
+
+ /**
+ * @return array
+ */
+ public static function getMemory()
+ {
+ return self::$memory;
+ }
+
+ /**
+ * @param array $memory
+ */
+ public static function setMemory($memory)
+ {
+ self::$memory = $memory;
+ }
+
+ public function __destruct() {
+ $storage = $this->config['storage'];
+
+ }
+
+ /**
* @param $keyword
* @return string
*/
|
Memory Static for __destruct
|
diff --git a/tests/Operation/AggregateFunctionalTest.php b/tests/Operation/AggregateFunctionalTest.php
index <HASH>..<HASH> 100644
--- a/tests/Operation/AggregateFunctionalTest.php
+++ b/tests/Operation/AggregateFunctionalTest.php
@@ -217,7 +217,17 @@ class AggregateFunctionalTest extends FunctionalTestCase
$results = iterator_to_array($operation->execute($this->getPrimaryServer()));
$this->assertCount(1, $results);
- $this->assertObjectHasAttribute('stages', current($results));
+ $result = current($results);
+
+ if ($this->isShardedCluster()) {
+ $this->assertObjectHasAttribute('shards', $result);
+
+ foreach ($result->shards as $shard) {
+ $this->assertObjectHasAttribute('stages', $shard);
+ }
+ } else {
+ $this->assertObjectHasAttribute('stages', $result);
+ }
},
function(array $event) {
$this->assertObjectNotHasAttribute('writeConcern', $event['started']->getCommand());
|
Adapt aggregate explain checks to new response format
|
diff --git a/application/modules/g/views/helpers/HtmlLink.php b/application/modules/g/views/helpers/HtmlLink.php
index <HASH>..<HASH> 100755
--- a/application/modules/g/views/helpers/HtmlLink.php
+++ b/application/modules/g/views/helpers/HtmlLink.php
@@ -24,7 +24,7 @@ class G_View_Helper_HtmlLink extends Zend_View_Helper_HtmlElement {
$url = call_user_func_array(array($this->view, 'url'), $url);
} else {
$urlAttribs = parse_url($url);
- if (empty($urlAttribs['scheme'])) {
+ if (empty($urlAttribs['scheme']) && substr($url, 0, 2) !== '//') {
$url = $this->view->baseUrl($url);
}
}
|
-n
Allow // for protocol-agnostic links
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -21,7 +21,6 @@ module.exports = function(config) {
//'bower_components/jquery/dist/jquery.js',
'node_modules/should/should.js',
'test/**/*.js',
- 'test/**/*.jsx',
],
@@ -34,11 +33,9 @@ module.exports = function(config) {
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'./test/**/*.js': ['webpack'],
- './test/**/*.jsx': ['webpack'],
},
webpack: {
- // cache: true,
module: {
loaders: [
{ loader: 'babel' },
@@ -63,7 +60,6 @@ module.exports = function(config) {
// hot: true,
quiet: true,
noInfo: true,
- watchDelay: 300,
},
// webpackPort: 8080, // Defaults to config.port + 1
|
removed warnings in karma warnings
|
diff --git a/enrol/manual/enrol.php b/enrol/manual/enrol.php
index <HASH>..<HASH> 100644
--- a/enrol/manual/enrol.php
+++ b/enrol/manual/enrol.php
@@ -353,6 +353,10 @@ function cron() {
// Notify teachers/students about students who's enrolment are going to expire
global $CFG;
+ if (empty($CFG->lastexpirynotify)) {
+ $CFG->lastexpirynotify = 0;
+ }
+
if ($CFG->lastexpirynotify < date('Ymd') && ($courses = get_records_select('course', 'enrolperiod > 0 AND expirynotify > 0 AND expirythreshold > 0'))) {
$site = get_site();
$admin = get_admin();
|
Fix for undefined property notice when cron.php is run.
|
diff --git a/lib/swag_dev/project/sham/tasks/doc/watch.rb b/lib/swag_dev/project/sham/tasks/doc/watch.rb
index <HASH>..<HASH> 100644
--- a/lib/swag_dev/project/sham/tasks/doc/watch.rb
+++ b/lib/swag_dev/project/sham/tasks/doc/watch.rb
@@ -1,5 +1,6 @@
# frozen_string_literal: true
+require 'swag_dev/project/sham'
require 'swag_dev/project/sham/tasks/doc'
SwagDev::Project::Sham.define('tasks/doc/watch') do |c|
@@ -7,10 +8,10 @@ SwagDev::Project::Sham.define('tasks/doc/watch') do |c|
{
listen_options: {
only: %r{\.rb$},
- ignore: SwagDev.project
- .sham!('tasks/doc')
- .ignored_patterns
- .map { |pattern| %r{#{pattern}} }
+ ignore: SwagDev::Project::Sham
+ .sham!('tasks/doc')
+ .ignored_patterns
+ .map { |pattern| %r{#{pattern}} }
}
}
end
|
tasks/doc/watch (sham) minor changes
|
diff --git a/lib/sensu/config.rb b/lib/sensu/config.rb
index <HASH>..<HASH> 100644
--- a/lib/sensu/config.rb
+++ b/lib/sensu/config.rb
@@ -55,8 +55,10 @@ module Sensu
end
@logger.subscribe(Cabin::Outputs::EmStdlibLogger.new(ruby_logger))
@logger.level = @options[:verbose] ? :debug : :info
- Signal.trap('USR1') do
- @logger.level = @logger.level == :info ? :debug : :info
+ if Signal.list.include?('USR1')
+ Signal.trap('USR1') do
+ @logger.level = @logger.level == :info ? :debug : :info
+ end
end
@logger
end
|
[fix-log-level-toggle] ensure ruby is aware of SIGUSR1, supporting windows ;)
|
diff --git a/lxd/db/operations.go b/lxd/db/operations.go
index <HASH>..<HASH> 100644
--- a/lxd/db/operations.go
+++ b/lxd/db/operations.go
@@ -30,8 +30,8 @@ func (c *ClusterTx) GetLocalOperationsUUIDs() ([]string, error) {
return query.SelectStrings(c.tx, stmt, c.nodeID)
}
-// OperationNodes returns a list of nodes that have running operations
-func (c *ClusterTx) OperationNodes(project string) ([]string, error) {
+// GetNodesWithRunningOperations returns a list of nodes that have running operations
+func (c *ClusterTx) GetNodesWithRunningOperations(project string) ([]string, error) {
stmt := `
SELECT DISTINCT nodes.address
FROM operations
diff --git a/lxd/operations.go b/lxd/operations.go
index <HASH>..<HASH> 100644
--- a/lxd/operations.go
+++ b/lxd/operations.go
@@ -247,7 +247,7 @@ func operationsGet(d *Daemon, r *http.Request) response.Response {
err = d.cluster.Transaction(func(tx *db.ClusterTx) error {
var err error
- nodes, err = tx.OperationNodes(project)
+ nodes, err = tx.GetNodesWithRunningOperations(project)
if err != nil {
return err
}
|
lxd/db: Rename OperationNodes to GetNodesWithRunningOperations
|
diff --git a/metrics.go b/metrics.go
index <HASH>..<HASH> 100644
--- a/metrics.go
+++ b/metrics.go
@@ -144,7 +144,7 @@ func (m *metrics) registerInstance() {
m.err(err)
return
}
- resp.Body.Close()
+ defer resp.Body.Close()
if resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusMultipleChoices {
m.warn(fmt.Errorf("%s return %d", u.String(), resp.StatusCode))
@@ -173,7 +173,7 @@ func (m *metrics) sendMetrics() {
m.err(err)
return
}
- resp.Body.Close()
+ defer resp.Body.Close()
if resp.StatusCode == http.StatusNotFound {
m.warn(fmt.Errorf("%s return 404, stopping metrics", u.String()))
|
metrics: defer closing http response bodies
In order to avoid potential surprises if the response bodies are read, defer the closing of the body.
|
diff --git a/test/functional/property-list.test.js b/test/functional/property-list.test.js
index <HASH>..<HASH> 100644
--- a/test/functional/property-list.test.js
+++ b/test/functional/property-list.test.js
@@ -1,5 +1,4 @@
var expect = require('expect.js'),
- fixtures = require('../fixtures'),
PropertyList = require('../../lib/index.js').PropertyList,
Item = require('../../lib/index.js').Item,
|
Fixed listing issue with PropertyList functional test spec
|
diff --git a/packages/metascraper-audio/index.js b/packages/metascraper-audio/index.js
index <HASH>..<HASH> 100644
--- a/packages/metascraper-audio/index.js
+++ b/packages/metascraper-audio/index.js
@@ -62,6 +62,7 @@ module.exports = () => ({
// Duplicated logic to the rule above
//TODO: figure out a way to apply ALL audio rules to an iframe instead of
// duplicating the rules in an iframe variant
+ if ($('iframe').length === 0) return
const dom = await loadIframe(url, $.html())
const $2 = cheerio.load(dom.document.body.innerHTML)
return $filter($2, $2('a'), el => audio(el.attr('href')))
|
fix: don't wait when there are no iframes
|
diff --git a/cmd/juju/storage/poollist_test.go b/cmd/juju/storage/poollist_test.go
index <HASH>..<HASH> 100644
--- a/cmd/juju/storage/poollist_test.go
+++ b/cmd/juju/storage/poollist_test.go
@@ -127,6 +127,9 @@ func (s *poolListSuite) assertUnmarshalledOutput(c *gc.C, unmarshall unmarshalle
expected := s.expect(c,
[]string{providerA, providerB},
[]string{nameABC, nameXYZ})
+ // This comparison cannot rely on gc.DeepEquals as
+ // json.Unmarshal unmarshalls the number as a float64,
+ // rather than an int
s.assertSamePoolInfos(c, result, expected)
}
@@ -138,6 +141,8 @@ func (s poolListSuite) assertSamePoolInfos(c *gc.C, one, two map[string]storage.
for ka, va := range a {
vb, okb := b[ka]
c.Assert(okb, jc.IsTrue)
+ // As some types may have been unmarshalled incorrectly, for example
+ // int versus float64, compare values' string representations
c.Assert(fmt.Sprintf("%v", va), jc.DeepEquals, fmt.Sprintf("%v", vb))
}
}
|
Added comment about the reasons for custom comparison because of the unmarhsalled types confusion.
|
diff --git a/decidim-core/app/jobs/decidim/data_portability_export_job.rb b/decidim-core/app/jobs/decidim/data_portability_export_job.rb
index <HASH>..<HASH> 100644
--- a/decidim-core/app/jobs/decidim/data_portability_export_job.rb
+++ b/decidim-core/app/jobs/decidim/data_portability_export_job.rb
@@ -10,7 +10,7 @@ module Decidim
password = SecureRandom.urlsafe_base64
generate_zip_file(user, path, password, export_format)
- save_or_upload_file(path)
+ save_or_upload_file(user, path)
ExportMailer.data_portability_export(user, filename, password).deliver_later
end
@@ -22,8 +22,8 @@ module Decidim
end
# Saves to file system or uploads to storage service depending on the configuration.
- def save_or_upload_file(path)
- DataPortabilityUploader.new.store!(File.open(path, "rb"))
+ def save_or_upload_file(user, path)
+ DataPortabilityUploader.new(user).store!(File.open(path, "rb"))
end
end
end
|
fixing error caused by Missing Organization (#<I>)
|
diff --git a/wtframework/wtf/_devtools_/filetemplates/_default_yaml_.py b/wtframework/wtf/_devtools_/filetemplates/_default_yaml_.py
index <HASH>..<HASH> 100644
--- a/wtframework/wtf/_devtools_/filetemplates/_default_yaml_.py
+++ b/wtframework/wtf/_devtools_/filetemplates/_default_yaml_.py
@@ -29,8 +29,9 @@ selenium:
shutdown_hook: true
# Set to true, to reuse the same browser. Set to false, to use a fresh browser
- # instance each time. If set to a number, this would determine whether the browser
- # session should be discarded after a certain time peroid.
+ # instance each time. Setting it to false is generally better for more consistent
+ # results, but will incur the startup time for the browser to start up for each
+ # test.
# Default is 'true'
reusebrowser: true
|
Fix comment describing the reuse browser setting.
Issue #<I>
|
diff --git a/tests/test_regression.py b/tests/test_regression.py
index <HASH>..<HASH> 100644
--- a/tests/test_regression.py
+++ b/tests/test_regression.py
@@ -17,6 +17,8 @@ and compares the output to the reference.
from __future__ import print_function
+from nose.tools import assert_equal, assert_raises
+
import contextlib
import difflib
import os
@@ -147,13 +149,10 @@ def compare(output, reference):
out_file = _open_if_needed(output)
ref_file = _open_if_needed(reference)
with out_file, ref_file:
- out_content = out_file.readlines()
- ref_content = ref_file.readlines()
- diff = list(difflib.context_diff(out_content, ref_content))
- if diff:
- #for line in diff:
- # print(line, end='')
- raise AssertionError('The two files are not identical.')
+ for out_line, ref_line in zip(out_file, ref_file):
+ assert_equal(out_line, ref_line)
+ assert_raises(StopIteration, next, out_file)
+ assert_raises(StopIteration, next, ref_file)
def run_and_compare(arguments, ref_gro, ref_stdout, ref_stderr):
|
Refactor file comparison in regression tests
The new way is faster as it fails at the first different line between
the file of interest and the reference. It also allows easier debugging
as it now displays the first different line in both files.
The tests now rely on nosetests.
|
diff --git a/gtfspy/networks.py b/gtfspy/networks.py
index <HASH>..<HASH> 100644
--- a/gtfspy/networks.py
+++ b/gtfspy/networks.py
@@ -274,7 +274,7 @@ def temporal_network(gtfs,
},
inplace=True
)
- events_df.drop('seq', 1, inplace=True)
+ # events_df.drop('seq', 1, inplace=True)
return events_df
# def cluster_network_stops(stop_to_stop_net, distance):
|
Add stop sequence number (seq) to temporal network extracts
|
diff --git a/notes/delete.php b/notes/delete.php
index <HASH>..<HASH> 100644
--- a/notes/delete.php
+++ b/notes/delete.php
@@ -41,7 +41,7 @@ if (empty($CFG->enablenotes)) {
if (data_submitted() && confirm_sesskey()) {
//if data was submitted and is valid, then delete note
$returnurl = $CFG->wwwroot . '/notes/index.php?course=' . $course->id . '&user=' . $note->userid;
- if (!note_delete($noteid)) {
+ if (!note_delete($note)) {
print_error('cannotdeletepost', 'notes', $returnurl);
}
redirect($returnurl);
|
MDL-<I> notes: passing an object rather than an id to avoid debugging message
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.