diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/Format/Json.php b/src/Format/Json.php
index <HASH>..<HASH> 100644
--- a/src/Format/Json.php
+++ b/src/Format/Json.php
@@ -59,6 +59,12 @@ class Json extends AbstractRegistryFormat
{
$data = trim($data);
+ // Because developers are clearly not validating their data before pushing it into a Registry, we'll do it for them
+ if (empty($data))
+ {
+ return new \stdClass;
+ }
+
if ($data !== '' && $data[0] !== '{')
{
return AbstractRegistryFormat::getInstance('Ini')->stringToObject($data, $options);
|
Validate data for developers because they won't
|
diff --git a/shoebot/__init__.py b/shoebot/__init__.py
index <HASH>..<HASH> 100644
--- a/shoebot/__init__.py
+++ b/shoebot/__init__.py
@@ -754,7 +754,6 @@ class CairoCanvas:
self.transform_stack = Stack()
if not gtkmode:
# image output mode, we need to make a surface
- print target
self.setsurface(target, width, height)
self.font_size = 12
diff --git a/shoebot/data.py b/shoebot/data.py
index <HASH>..<HASH> 100644
--- a/shoebot/data.py
+++ b/shoebot/data.py
@@ -559,7 +559,6 @@ class Transform():
a = deg2rad(degrees)
else:
a = radians
- print a
self._matrix.rotate(a)
def scale(self, x=1, y=None):
|
removed leftover print statements from debugging
|
diff --git a/filer/admin/folderadmin.py b/filer/admin/folderadmin.py
index <HASH>..<HASH> 100644
--- a/filer/admin/folderadmin.py
+++ b/filer/admin/folderadmin.py
@@ -44,6 +44,7 @@ from filer.utils.filer_easy_thumbnails import FilerActionThumbnailer
from filer.thumbnail_processors import normalize_subject_location
from django.conf import settings as django_settings
import os
+import re
import itertools
@@ -288,8 +289,9 @@ class FolderAdmin(PrimitivePermissionAwareModelAdmin):
if order_by is not None:
order_by = order_by.split(',')
order_by = [field for field in order_by
- if field.replace('-', '') in self.order_by_file_fields]
- file_qs = file_qs.order_by(*order_by)
+ if re.sub(r'^-', '', field) in self.order_by_file_fields]
+ if len(order_by) > 0:
+ file_qs = file_qs.order_by(*order_by)
folder_children = []
folder_files = []
@@ -319,7 +321,7 @@ class FolderAdmin(PrimitivePermissionAwareModelAdmin):
except:
permissions = {}
- if order_by is None:
+ if order_by is None or len(order_by) == 0:
folder_files.sort()
items = folder_children + folder_files
|
Check if order_by field is in whitelist with regexp
|
diff --git a/backend/scrapers/employees/matchEmployees.js b/backend/scrapers/employees/matchEmployees.js
index <HASH>..<HASH> 100644
--- a/backend/scrapers/employees/matchEmployees.js
+++ b/backend/scrapers/employees/matchEmployees.js
@@ -104,7 +104,7 @@ class CombineCCISandEmployees {
async main(peopleLists) {
- peopleLists = await Promise.all([neuEmployees.main(), ccisFaculty.main(), coeFaculty.main(), csshFaculty.main(), camdFaculty.main()]);
+ peopleLists = await Promise.all([neuEmployees.main(), ccisFaculty.main(), csshFaculty.main(), camdFaculty.main()]);
const mergedPeopleList = [];
|
removed coe because it doesnt work anymore
|
diff --git a/src/main/java/org/elasticsearch/hadoop/cascading/ESHadoopScheme.java b/src/main/java/org/elasticsearch/hadoop/cascading/ESHadoopScheme.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/elasticsearch/hadoop/cascading/ESHadoopScheme.java
+++ b/src/main/java/org/elasticsearch/hadoop/cascading/ESHadoopScheme.java
@@ -17,6 +17,7 @@ package org.elasticsearch.hadoop.cascading;
import java.io.IOException;
import java.util.Collection;
+import java.util.List;
import java.util.Map;
import org.apache.commons.logging.LogFactory;
@@ -149,7 +150,10 @@ class ESHadoopScheme extends Scheme<JobConf, RecordReader, OutputCollector, Obje
}
}
else {
- Tuple.elements(entry.getTuple()).addAll(data.values());
+ // no definition means no coercion
+ List<Object> elements = Tuple.elements(entry.getTuple());
+ elements.clear();
+ elements.addAll(data.values());
}
return true;
|
fix bug causing the tuple to spill over when no fields are defined
|
diff --git a/lib/pullr.rb b/lib/pullr.rb
index <HASH>..<HASH> 100644
--- a/lib/pullr.rb
+++ b/lib/pullr.rb
@@ -1 +1,3 @@
+require 'pullr/remote_repository'
+require 'pullr/local_repository'
require 'pullr/version'
|
Updated the top-level pullr.rb file.
|
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -596,14 +596,14 @@ module ActionDispatch
if route.segment_keys.include?(:controller)
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Using a dynamic :controller segment in a route is deprecated and
- will be removed in Rails 7.0.
+ will be removed in Rails 7.1.
MSG
end
if route.segment_keys.include?(:action)
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Using a dynamic :action segment in a route is deprecated and
- will be removed in Rails 7.0.
+ will be removed in Rails 7.1.
MSG
end
|
dump the dynamic route segments deprication horizon as it was not removed for rails <I>
|
diff --git a/lib/less/functions.js b/lib/less/functions.js
index <HASH>..<HASH> 100644
--- a/lib/less/functions.js
+++ b/lib/less/functions.js
@@ -222,8 +222,7 @@ tree.functions = {
var str = subject.value;
str = str.replace(new RegExp(pattern.value, flags ? flags.value : ""), replacement.value);
-
- return new(tree.Quoted)('"' + str + '"', str);
+ return new(tree.Quoted)(subject.quote || '', str, subject.escaped);
},
'%': function (quoted /* arg, arg, ...*/) {
var args = Array.prototype.slice.call(arguments, 1),
|
minor `replace` func improvement: preserve quote char and escaped flag.
|
diff --git a/lib/modules/at-rules.js b/lib/modules/at-rules.js
index <HASH>..<HASH> 100644
--- a/lib/modules/at-rules.js
+++ b/lib/modules/at-rules.js
@@ -9,7 +9,7 @@ module.exports = {
try {
ast = css.parse(string, options);
} catch (err) {
- console.log('An error occurred when extracting at-rules:', err.toString());
+ console.error('An error occurred when extracting at-rules:', err.toString());
}
ast.stylesheet.rules = ast.stylesheet.rules.filter(function(rule) {
|
Output at-rules parsing errors to stderr
|
diff --git a/examples/spec/prelude_lambda_spec.rb b/examples/spec/prelude_lambda_spec.rb
index <HASH>..<HASH> 100644
--- a/examples/spec/prelude_lambda_spec.rb
+++ b/examples/spec/prelude_lambda_spec.rb
@@ -24,8 +24,8 @@ describe PreludeLambdaUsage, "basic lambda prelude usage" do
it "knows about GCD alternatives" do
# test variant implementations
- expect(Gcd1.(4,8)).to == 4
- expect(Gcd2.(4,8)).to == 4
+ expect(Gcd1.(4,8)).to eq(4)
+ expect(Gcd2.(4,8)).to eq(4)
expect(GcdA1.([4,8,2])).to eq(2)
expect(GcdA2.([4,8,2])).to eq(2)
expect(GcdA3.([4,8,2])).to eq(2)
|
upgrade rspec should notation to expect notation
|
diff --git a/test/unit/query/query.findOrCreate.js b/test/unit/query/query.findOrCreate.js
index <HASH>..<HASH> 100644
--- a/test/unit/query/query.findOrCreate.js
+++ b/test/unit/query/query.findOrCreate.js
@@ -25,7 +25,7 @@ describe('Collection Query', function() {
// Fixture Adapter Def
var adapterDef = {
- find: function(col, criteria, cb) { return cb(null, null); },
+ find: function(col, criteria, cb) { return cb(null, []); },
create: function(col, values, cb) { return cb(null, values); }
};
@@ -102,7 +102,7 @@ describe('Collection Query', function() {
// Fixture Adapter Def
var adapterDef = {
- find: function(col, criteria, cb) { return cb(null, null); },
+ find: function(col, criteria, cb) { return cb(null, []); },
create: function(col, values, cb) { return cb(null, values); }
};
|
pass tests for findOrCreate query
|
diff --git a/packages/vx-demo/components/gallery.js b/packages/vx-demo/components/gallery.js
index <HASH>..<HASH> 100644
--- a/packages/vx-demo/components/gallery.js
+++ b/packages/vx-demo/components/gallery.js
@@ -468,6 +468,9 @@ export default class Gallery extends React.Component {
<div
className="gallery-item"
ref={d => this.nodes.add(d)}
+ style={{
+ boxShadow: 'rgba(0, 0, 0, 0.1) 0px 1px 6px',
+ }}
>
<div
className="image"
diff --git a/packages/vx-demo/components/tiles/voronoi.js b/packages/vx-demo/components/tiles/voronoi.js
index <HASH>..<HASH> 100644
--- a/packages/vx-demo/components/tiles/voronoi.js
+++ b/packages/vx-demo/components/tiles/voronoi.js
@@ -12,7 +12,7 @@ export default ({
top: 0,
left: 0,
right: 0,
- bottom: 70,
+ bottom: 76,
},
}) => {
if (width < 10) return <div />;
|
[gallery] polish voronoi
|
diff --git a/semantic_release/history/logs.py b/semantic_release/history/logs.py
index <HASH>..<HASH> 100644
--- a/semantic_release/history/logs.py
+++ b/semantic_release/history/logs.py
@@ -109,7 +109,8 @@ def generate_changelog(from_version: str, to_version: str = None) -> dict:
changes[message[1]].append((
_hash,
# Capitalize the first letter of the message
- message[3][0][0].upper() + message[3][0][1:]
+ message[3][0].capitalize()
+
))
# Handle breaking change message
|
refactor(history): use capitalize method for readability
|
diff --git a/hazelcast/src/main/java/com/hazelcast/security/permission/ActionConstants.java b/hazelcast/src/main/java/com/hazelcast/security/permission/ActionConstants.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/security/permission/ActionConstants.java
+++ b/hazelcast/src/main/java/com/hazelcast/security/permission/ActionConstants.java
@@ -27,6 +27,7 @@ import com.hazelcast.concurrent.countdownlatch.CountDownLatchService;
import com.hazelcast.concurrent.idgen.IdGeneratorService;
import com.hazelcast.concurrent.lock.LockService;
import com.hazelcast.concurrent.semaphore.SemaphoreService;
+import com.hazelcast.crdt.pncounter.PNCounterService;
import com.hazelcast.durableexecutor.impl.DistributedDurableExecutorService;
import com.hazelcast.executor.impl.DistributedExecutorService;
import com.hazelcast.flakeidgen.impl.FlakeIdGeneratorService;
@@ -197,6 +198,12 @@ public final class ActionConstants {
return new UserCodeDeploymentPermission(actions);
}
});
+ PERMISSION_FACTORY_MAP.put(PNCounterService.SERVICE_NAME, new PermissionFactory() {
+ @Override
+ public Permission create(String name, String... actions) {
+ return new PNCounterPermission(name, actions);
+ }
+ });
}
private ActionConstants() {
|
Register PN counter service in permission factory (#<I>)
Fixes: <URL>
|
diff --git a/mob_rotation.rb b/mob_rotation.rb
index <HASH>..<HASH> 100644
--- a/mob_rotation.rb
+++ b/mob_rotation.rb
@@ -106,18 +106,28 @@ class MobRotation
show_help
end
- def rotate
- @real_mobsters << @real_mobsters.shift
+ def rotate_mobsters(&rotation_algorithm)
+ rotation_algorithm.call
+
git_config_update
sync
end
+ def rotate
+ puts ""
+
+ rotate_mobsters do
+ @real_mobsters << @real_mobsters.shift
+ end
+ end
+
def random(seed=nil)
puts "Randomized Output"
- srand(seed.to_i) if seed
- @real_mobsters.shuffle!
- git_config_update
- sync
+
+ rotate_mobsters do
+ srand(seed.to_i) if seed
+ @real_mobsters.shuffle!
+ end
end
def extract_next_mobster_email
|
extract a rotate_mobsters method
|
diff --git a/pygerduty/__init__.py b/pygerduty/__init__.py
index <HASH>..<HASH> 100755
--- a/pygerduty/__init__.py
+++ b/pygerduty/__init__.py
@@ -557,7 +557,7 @@ class PagerDuty(object):
"incident_key": incident_key,
"client": client,
"client_url": client_url,
- "contexts": contexts
+ "contexts": contexts,
}
request = urllib.request.Request(PagerDuty.INTEGRATION_API_URL,
|
Adding trailing comma to make future diffs cleaner
|
diff --git a/src/deep-resource/lib/Resource/Request.js b/src/deep-resource/lib/Resource/Request.js
index <HASH>..<HASH> 100644
--- a/src/deep-resource/lib/Resource/Request.js
+++ b/src/deep-resource/lib/Resource/Request.js
@@ -923,7 +923,8 @@ export class Request {
case 'post':
case 'put':
case 'patch':
- opsToSign.body = JSON.stringify(payload);
+ payload = JSON.stringify(payload);
+ opsToSign.body = payload;
break;
}
|
#ATM<I>: Make sure signed body == request data
|
diff --git a/lib/picasa/api/tag.rb b/lib/picasa/api/tag.rb
index <HASH>..<HASH> 100644
--- a/lib/picasa/api/tag.rb
+++ b/lib/picasa/api/tag.rb
@@ -45,7 +45,7 @@ module Picasa
path << "/albumid/#{album_id}" if album_id
path << "/photoid/#{photo_id}" if photo_id
- template = Template.new("adding_tag" {:tag_name => tag_name})
+ template = Template.new("adding_tag", {:tag_name => tag_name})
uri = URI.parse(path)
parsed_body = Connection.new(credentials).post(uri.path, template.render)
|
add wrose comma
|
diff --git a/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterTest.java b/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterTest.java
index <HASH>..<HASH> 100644
--- a/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterTest.java
@@ -39,7 +39,7 @@ import org.apache.cassandra.utils.ByteBufferUtil;
import org.apache.cassandra.utils.FBUtilities;
import org.apache.cassandra.utils.OutputHandler;
-public class CQLSSTableWriterTest extends SchemaLoader
+public class CQLSSTableWriterTest
{
@BeforeClass
public static void setup() throws Exception
@@ -78,7 +78,7 @@ public class CQLSSTableWriterTest extends SchemaLoader
{
public void init(String keyspace)
{
- for (Range<Token> range : StorageService.instance.getLocalRanges("Keyspace1"))
+ for (Range<Token> range : StorageService.instance.getLocalRanges("cql_keyspace"))
addRangeForEndpoint(range, FBUtilities.getBroadcastAddress());
setPartitioner(StorageService.getPartitioner());
}
|
Fix CQLSSTableWriterTest
|
diff --git a/pysat/instruments/sw_f107.py b/pysat/instruments/sw_f107.py
index <HASH>..<HASH> 100644
--- a/pysat/instruments/sw_f107.py
+++ b/pysat/instruments/sw_f107.py
@@ -382,14 +382,8 @@ def download(date_array, tag, sat_id, data_path, user=None, password=None):
if data.empty:
warnings.warn("no data for {:}".format(date), UserWarning)
else:
- try:
- # This is the new data format
- times = [pysat.datetime.strptime(time, '%Y%m%d')
- for time in data.pop('time')]
- except ValueError:
- # Accepts old file formats
- times = [pysat.datetime.strptime(time, '%Y %m %d')
- for time in data.pop('time')]
+ times = [pysat.datetime.strptime(time, '%Y%m%d')
+ for time in data.pop('time')]
data.index = times
# replace fill with NaNs
idx, = np.where(data['f107'] == -99999.0)
|
ENH: Updated download timehandling for LASP F<I>
Removed the try/except catch for the old format, since this is only used in the download routine and thus only needs to know the new format.
|
diff --git a/tests/django_project/setup.py b/tests/django_project/setup.py
index <HASH>..<HASH> 100755
--- a/tests/django_project/setup.py
+++ b/tests/django_project/setup.py
@@ -3,7 +3,7 @@
from setuptools import setup, find_packages
-setup(
+__name__ == '__main__' and setup(
name='django-project',
packages=find_packages(),
)
|
Fix dist setup in django test project
|
diff --git a/mutagen/_vorbis.py b/mutagen/_vorbis.py
index <HASH>..<HASH> 100644
--- a/mutagen/_vorbis.py
+++ b/mutagen/_vorbis.py
@@ -1,6 +1,7 @@
-# Vorbis comment support for Mutagen
-# Copyright 2005-2006 Joe Wreschnig
-# 2013 Christoph Reiter
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2005-2006 Joe Wreschnig
+# 2013 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
@@ -127,6 +128,7 @@ class VComment(mutagen.Metadata, list):
tag = tag.decode("ascii")
if is_valid_key(tag):
self.append((tag, value))
+
if framing and not bytearray(fileobj.read(1))[0] & 0x01:
raise VorbisUnsetFrameError("framing bit was unset")
except (cdata.error, TypeError):
|
_vorbis.py: consistent headers/pep<I>, readability improvements
|
diff --git a/Eloquent/Relations/Concerns/AsPivot.php b/Eloquent/Relations/Concerns/AsPivot.php
index <HASH>..<HASH> 100644
--- a/Eloquent/Relations/Concerns/AsPivot.php
+++ b/Eloquent/Relations/Concerns/AsPivot.php
@@ -125,11 +125,11 @@ trait AsPivot
$this->touchOwners();
- $this->getDeleteQuery()->delete();
+ $affectedRows = $this->getDeleteQuery()->delete();
$this->fireModelEvent('deleted', false);
- return 1;
+ return $affectedRows;
}
/**
|
altered AsPivot::delete() to return affected rows from builder
|
diff --git a/shell/src/main/java/alluxio/cli/ConfigurationDocGenerator.java b/shell/src/main/java/alluxio/cli/ConfigurationDocGenerator.java
index <HASH>..<HASH> 100644
--- a/shell/src/main/java/alluxio/cli/ConfigurationDocGenerator.java
+++ b/shell/src/main/java/alluxio/cli/ConfigurationDocGenerator.java
@@ -195,8 +195,8 @@ public final class ConfigurationDocGenerator {
try {
closer.close();
} catch (IOException e) {
- LOG.error("Error while flushing/closing YML files for description of Property Keys " +
- "FileWriter", e);
+ LOG.error("Error while flushing/closing YML files for description of Property Keys "
+ + "FileWriter", e);
}
}
}
|
[ALLUXIO-<I>] 2nd task small fix
|
diff --git a/webapps/ui/tasklist/plugins/tasklistSorting/app/tasklistHeader/cam-tasklist-sorting-choices.js b/webapps/ui/tasklist/plugins/tasklistSorting/app/tasklistHeader/cam-tasklist-sorting-choices.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/tasklist/plugins/tasklistSorting/app/tasklistHeader/cam-tasklist-sorting-choices.js
+++ b/webapps/ui/tasklist/plugins/tasklistSorting/app/tasklistHeader/cam-tasklist-sorting-choices.js
@@ -296,6 +296,8 @@ module.exports = [
element.focus();
}
});
+
+ scope.openDropdownNew = false;
};
/**
|
fix(tasklist): close dropdown after adding filter
related to CAM-<I>
|
diff --git a/src/Plugins/Litedown/Parser.js b/src/Plugins/Litedown/Parser.js
index <HASH>..<HASH> 100644
--- a/src/Plugins/Litedown/Parser.js
+++ b/src/Plugins/Litedown/Parser.js
@@ -508,7 +508,7 @@ function matchBlockLevelMarkup()
tagPos = matchPos + ignoreLen;
tagLen = lfPos - tagPos;
- if (m[5].charAt(0) === codeFence)
+ if (codeTag && m[5].charAt(0) === codeFence)
{
endTag = addEndTag('CODE', tagPos, tagLen);
endTag.pairWith(codeTag);
diff --git a/src/Plugins/Litedown/Parser.php b/src/Plugins/Litedown/Parser.php
index <HASH>..<HASH> 100644
--- a/src/Plugins/Litedown/Parser.php
+++ b/src/Plugins/Litedown/Parser.php
@@ -509,7 +509,7 @@ class Parser extends ParserBase
$tagPos = $matchPos + $ignoreLen;
$tagLen = $lfPos - $tagPos;
- if ($m[5][0][0] === $codeFence)
+ if (isset($codeTag) && $m[5][0][0] === $codeFence)
{
$endTag = $this->parser->addEndTag('CODE', $tagPos, $tagLen);
|
Litedown: added isset() check. No functional change intended
|
diff --git a/src/core/errorBag.js b/src/core/errorBag.js
index <HASH>..<HASH> 100644
--- a/src/core/errorBag.js
+++ b/src/core/errorBag.js
@@ -47,6 +47,7 @@ export default class ErrorBag {
}
error.scope = !isNullOrUndefined(error.scope) ? error.scope : null;
+ error.vmId = !isNullOrUndefined(error.vmId) ? error.vmId : (this.vmId || null);
return [error];
}
|
fix: error bag not adding the vmId on manually added errors closes #<I>
|
diff --git a/node-binance-api.js b/node-binance-api.js
index <HASH>..<HASH> 100644
--- a/node-binance-api.js
+++ b/node-binance-api.js
@@ -94,7 +94,7 @@ module.exports = function() {
quantity: quantity
};
if ( typeof flags.type !== "undefined" ) opt.type = flags.type;
- if ( opt.type == "LIMIT" ) {
+ if ( opt.type.includes("LIMIT") ) {
opt.price = price;
opt.timeInForce = "GTC";
}
|
Set the price in any kind of *LIMIT* order (fix stop loss order)
|
diff --git a/src/main/java/de/rototor/pdfbox/graphics2d/PdfBoxGraphics2D.java b/src/main/java/de/rototor/pdfbox/graphics2d/PdfBoxGraphics2D.java
index <HASH>..<HASH> 100644
--- a/src/main/java/de/rototor/pdfbox/graphics2d/PdfBoxGraphics2D.java
+++ b/src/main/java/de/rototor/pdfbox/graphics2d/PdfBoxGraphics2D.java
@@ -745,13 +745,13 @@ public class PdfBoxGraphics2D extends Graphics2D {
/**
* Creates a copy of this graphics object. Please call {@link #dispose()} always
- * on the copy after you have finished drawing with it. <br/>
- * <br/>
+ * on the copy after you have finished drawing with it. <br>
+ * <br>
* Never draw both in this copy and its parent graphics at the same time, as
* they all write to the same content stream. This will create a broken PDF
* content stream. You should get an {@link IllegalStateException} if you do so,
- * but better just don't try. <br/>
- * <br/>
+ * but better just don't try. <br>
+ * <br>
* The copy allows you to have different transforms, paints, etc. than the
* parent graphics context without affecting the parent. You may also call
* create() on a copy, but always remember to call {@link #dispose()} in reverse
|
#<I> Fix to make javadoc happy again...
|
diff --git a/src/Plugin.php b/src/Plugin.php
index <HASH>..<HASH> 100644
--- a/src/Plugin.php
+++ b/src/Plugin.php
@@ -83,8 +83,19 @@ class Plugin implements PluginInterface, EventSubscriberInterface
$this->composer = $composer;
if (null === $this->runonceManager) {
+ $rootDir = getcwd() . '/';
+ $extras = $composer->getPackage()->getExtra();
+
+ if (isset($extras['symfony-var-dir']) && is_dir($extras['symfony-var-dir'])) {
+ $rootDir .= trim($extras['symfony-var-dir'], '/');
+ } elseif (isset($extras['symfony-app-dir']) && is_dir($extras['symfony-app-dir'])) {
+ $rootDir .= trim($extras['symfony-app-dir'], '/');
+ } else {
+ $rootDir .= '/app';
+ }
+
$this->runonceManager = new RunonceManager(
- dirname($composer->getConfig()->get('vendor-dir')) . '/app/Resources/contao/config/runonce.php'
+ $rootDir . '/Resources/contao/config/runonce.php'
);
}
|
Respect override of the kernel directory in composer.json
|
diff --git a/modularity.php b/modularity.php
index <HASH>..<HASH> 100644
--- a/modularity.php
+++ b/modularity.php
@@ -80,6 +80,7 @@ add_action('plugins_loaded', function () {
'mod-social' => 'group_56dedc26e5327',
'mod-wpwidget' => 'group_5729f4d3e7c7a',
'mod-sites' => 'group_58ecb6b6330f4',
+ 'mod-table-block' => 'group_60b8bf5bbc4d7'
));
$acfExportManager->import();
|
Add field group to AcfExportManager
|
diff --git a/src/ElephantOnCouch/Info/DbInfo.php b/src/ElephantOnCouch/Info/DbInfo.php
index <HASH>..<HASH> 100755
--- a/src/ElephantOnCouch/Info/DbInfo.php
+++ b/src/ElephantOnCouch/Info/DbInfo.php
@@ -10,6 +10,7 @@ namespace ElephantOnCouch\Info;
use ElephantOnCouch\Extension;
+use ElephantOnCouch\Helper;
//! @brief This is an information only purpose class. It's used by Couch.getDbInfo() method.
|
added Helper to the namespaces list
|
diff --git a/src/Directory.php b/src/Directory.php
index <HASH>..<HASH> 100644
--- a/src/Directory.php
+++ b/src/Directory.php
@@ -85,6 +85,16 @@ class Directory extends FSObject {
return $this->recurseOn()->cata($trans);
}
+ /**
+ * Get an recursor over the content of this directory.
+ *
+ * @return DirectoryRecursor
+ */
+ public function recurseOn() {
+ return new DirectoryRecursor($this);
+ }
+
+
// Maybe remove these? Certainly reimplement them...
/**
@@ -97,15 +107,6 @@ class Directory extends FSObject {
}
/**
- * Get an recursor over the content of this directory.
- *
- * @return DirectoryRecursor
- */
- public function recurseOn() {
- return $this->withContents()->recurseOn();
- }
-
- /**
* Get an object that can perform a fold operation on all files in this
* iterator.
*
@@ -114,6 +115,4 @@ class Directory extends FSObject {
public function foldFiles() {
return $this->withContents()->foldFiles();
}
-
-
}
|
reimplemented Directory::recurseOn
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@ setup(name='whereami',
url='https://github.com/kootenpv/whereami',
author_email='kootenpv@gmail.com',
install_requires=[
- 'scikit-learn', 'tqdm', 'access_points'
+ 'scipy', 'numpy', 'scikit-learn', 'tqdm', 'access_points'
],
entry_points={
'console_scripts': ['whereami = whereami.__main__:main']
|
missing dependencies in setup.py
|
diff --git a/plugins/vega/Histogram/test/histogram.image.js b/plugins/vega/Histogram/test/histogram.image.js
index <HASH>..<HASH> 100644
--- a/plugins/vega/Histogram/test/histogram.image.js
+++ b/plugins/vega/Histogram/test/histogram.image.js
@@ -5,5 +5,5 @@ imageTest({
url: 'http://localhost:28000/examples/histogram',
selector: '#vis-element',
delay: 1000,
- threshold: 0.001
+ threshold: 0.005
});
|
test: allow bigger margin of error to account for pixelwise rendering differences
|
diff --git a/core-bundle/src/Resources/contao/classes/StyleSheets.php b/core-bundle/src/Resources/contao/classes/StyleSheets.php
index <HASH>..<HASH> 100644
--- a/core-bundle/src/Resources/contao/classes/StyleSheets.php
+++ b/core-bundle/src/Resources/contao/classes/StyleSheets.php
@@ -961,7 +961,7 @@ class StyleSheets extends \Backend
}
// Optimize floating-point numbers (see #6634)
- $return = preg_replace('/(?<!\-)0\.([0-9]+)/', '.$1', $return);
+ $return = preg_replace('/([^0-9\.\-])0\.([0-9]+)/', '$1.$2', $return);
// Replace insert tags (see #5512)
return $this->replaceInsertTags($return, false);
|
[Core] Correctly optimize floating-point numbers in style sheets (see #<I>)
|
diff --git a/src/utils/polyfillEnvironment.js b/src/utils/polyfillEnvironment.js
index <HASH>..<HASH> 100644
--- a/src/utils/polyfillEnvironment.js
+++ b/src/utils/polyfillEnvironment.js
@@ -42,7 +42,9 @@ const scriptURL = require('react-native').NativeModules.SourceCode.scriptURL; //
// or Android device it will be `localhost:<port>` but when using real iOS device
// it will be `<ip>.xip.io:<port>`. Thus the code below ensure we connect and download
// manifest/hot-update from a valid origin.
-global.DEV_SERVER_ORIGIN = scriptURL.match(/(^.+)\/index/)[1];
+const match = scriptURL && scriptURL.match(/(^.+)\/index/);
+
+global.DEV_SERVER_ORIGIN = match ? match[1] : null;
// Webpack's `publicPath` needs to be overwritten with `DEV_SERVER_ORIGIN` otherwise,
// it would still make requests to (usually) `localhost`.
__webpack_require__.p = `${global.DEV_SERVER_ORIGIN}/`; // eslint-disable-line no-undef
|
Fix scriptUrl match for production build (#<I>)
|
diff --git a/src/blockchain.js b/src/blockchain.js
index <HASH>..<HASH> 100644
--- a/src/blockchain.js
+++ b/src/blockchain.js
@@ -90,7 +90,7 @@ Blockchain.connect = function(connectionList, opts, doneCb) {
Blockchain.execWhenReady = function(cb) {
if (this.done) {
- return cb(this.err);
+ return cb(this.err, this.web3);
}
if (!this.list) {
this.list = [];
@@ -104,7 +104,7 @@ Blockchain.doFirst = function(todo) {
self.done = true;
self.err = err;
if (self.list) {
- self.list.map((x) => x.apply(x, [self.err]));
+ self.list.map((x) => x.apply(x, [self.err, self.web3]));
}
})
};
@@ -133,7 +133,7 @@ let Contract = function (options) {
let originalMethods = Object.keys(ContractClass);
- Blockchain.execWhenReady(function() {
+ Blockchain.execWhenReady(function(err, web3) {
if(!ContractClass.currentProvider){
ContractClass.setProvider(web3.currentProvider);
}
|
feature: pass network info to onReady
|
diff --git a/lib/puppet/file_serving/fileset.rb b/lib/puppet/file_serving/fileset.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/file_serving/fileset.rb
+++ b/lib/puppet/file_serving/fileset.rb
@@ -59,6 +59,7 @@ class Puppet::FileServing::Fileset
end
def initialize(path, options = {})
+ path = path.chomp(File::SEPARATOR)
raise ArgumentError.new("Fileset paths must be fully qualified") unless File.expand_path(path) == path
@path = path
|
(#<I>) Fix fileset path absoluteness checking with trailing slash
Reviewed-By: Nick Lewis
Reviewed-By: Pieter van de Bruggen
|
diff --git a/lib/models/turkee_task.rb b/lib/models/turkee_task.rb
index <HASH>..<HASH> 100644
--- a/lib/models/turkee_task.rb
+++ b/lib/models/turkee_task.rb
@@ -244,7 +244,7 @@ module Turkee
# Returns the default url of the model's :new route
def self.form_url(host, typ, params = {})
- @app ||= ActionController::Integration::Session.new(Rails.application)
+ @app ||= ActionDispatch::Integration::Session.new(Rails.application)
url = (host + @app.send("new_#{typ.to_s.underscore}_path"))
full_url(url, params)
end
|
updated deprecated class
this removes:
DEPRECATION WARNING: cl is deprecated and will be removed, use ActionDispatch::Integration instead.
(called from form_url at ~/.rvm/gems/ruby-<I>-p<I>/bundler/gems/turkee-8c<I>e0/lib/models/turkee_task.rb:<I>)
|
diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go
index <HASH>..<HASH> 100644
--- a/cmd/helm/installer/install.go
+++ b/cmd/helm/installer/install.go
@@ -166,6 +166,9 @@ func generateDeployment(opts *Options) *extensions.Deployment {
},
},
},
+ NodeSelector: map[string]string{
+ "beta.kubernetes.io/os": "linux",
+ },
SecurityContext: &api.PodSecurityContext{
HostNetwork: opts.EnableHostNetwork,
},
|
fix(helm): Ensures tiller pod lands on a linux node
Without a node selector to ensure that tiller deploys on a linux node,
the tiller pod can have issues starting in a mixed cluster.
Fixes #<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,7 @@ try:
import Cython
from Cython.Distutils import build_ext
- if Cython.__version__ < '0.18':
+ if Cython.__version__ < '0.28':
raise ImportError()
except ImportError:
print(
|
Bump minimum cython to <I>
|
diff --git a/install.rb b/install.rb
index <HASH>..<HASH> 100755
--- a/install.rb
+++ b/install.rb
@@ -122,12 +122,12 @@ def check_prereqs
facter_version = Facter.version.to_f
if facter_version < MIN_FACTER_VERSION
puts "Facter version: #{facter_version}; minimum required: #{MIN_FACTER_VERSION}; cannot install"
- exit (-1)
+ exit(-1)
end
end
rescue LoadError
puts "Could not load #{pre}; cannot install"
- exit (-1)
+ exit(-1)
end
}
end
@@ -248,7 +248,7 @@ def prepare_installation
require 'win32/dir'
rescue LoadError => e
puts "Cannot run on Microsoft Windows without the win32-process, win32-dir & win32-service gems: #{e}"
- exit (-1)
+ exit(-1)
end
end
|
(maint) Resolve ruby -wc warnings
Remove space between method name and parentheses.
|
diff --git a/green/test/test_plugin.py b/green/test/test_plugin.py
index <HASH>..<HASH> 100644
--- a/green/test/test_plugin.py
+++ b/green/test/test_plugin.py
@@ -18,7 +18,7 @@ class TestPlugin(PluginTester, unittest.TestCase):
def test_NOSE_GREEN_setsEnabled(self):
parser = MagicMock()
self.assertEqual(self.g.enabled, False)
- self.g.options(parser, env={'NOSE_GREEN':'1'})
+ self.g.options(parser, env={'NOSE_WITH_GREEN':'1'})
self.assertEqual(self.g.enabled, True)
|
Updated the options test to match with the updated environment variable.
|
diff --git a/lib/downloadr/version.rb b/lib/downloadr/version.rb
index <HASH>..<HASH> 100644
--- a/lib/downloadr/version.rb
+++ b/lib/downloadr/version.rb
@@ -1,3 +1,3 @@
module Downloadr
- VERSION='0.0.17'
+ VERSION='0.0.18'
end
|
Bumped Gem version to <I>
|
diff --git a/src/ReportService/ReportService.php b/src/ReportService/ReportService.php
index <HASH>..<HASH> 100644
--- a/src/ReportService/ReportService.php
+++ b/src/ReportService/ReportService.php
@@ -1070,7 +1070,7 @@ class ReportService
array_push($uriParameterList, array("item", $this->getItem()));
}
if (!is_null($this->classid)) {
- array_push($uriParameterList, array("classid", $this->getClassid()));
+ array_push($uriParameterList, array("class", $this->getClassid()));
}
if (!is_null($this->appaid)) {
array_push($uriParameterList, array("appaid", $this->getAppaid()));
|
the Quickbooks API expects the lass paramater to be named 'class' instead of 'classid'
|
diff --git a/CHANGES.txt b/CHANGES.txt
index <HASH>..<HASH> 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,8 @@
+0.8.10
+------
+
+ - Strip '/' from end of urls when crawling
+
0.8.9
------
diff --git a/scrape/__init__.py b/scrape/__init__.py
index <HASH>..<HASH> 100644
--- a/scrape/__init__.py
+++ b/scrape/__init__.py
@@ -1,3 +1,3 @@
"""scrape is a rule-based web crawler and information extraction tool capable of manipulating and merging new and existing documents. XML Path Language (XPath) and regular expressions are used to define rules for filtering content and web traversal. Output can be any one of text, CSV, PDF, and/or HTML formats.
"""
-__version__ = '0.8.9'
+__version__ = '0.8.10'
diff --git a/scrape/utils.py b/scrape/utils.py
index <HASH>..<HASH> 100644
--- a/scrape/utils.py
+++ b/scrape/utils.py
@@ -296,7 +296,7 @@ def add_scheme(url):
def remove_scheme(url):
"""Remove scheme from URL"""
- return url.replace('http://', '').replace('https://', '')
+ return url.replace('http://', '').replace('https://', '').rstrip('/')
def check_scheme(url):
|
Strip '/' from end of urls when crawling
|
diff --git a/src/structures/Guild.js b/src/structures/Guild.js
index <HASH>..<HASH> 100644
--- a/src/structures/Guild.js
+++ b/src/structures/Guild.js
@@ -266,7 +266,7 @@ class Guild extends Base {
*/
this.emojis = new GuildEmojiStore(this);
if (data.emojis) for (const emoji of data.emojis) this.emojis.add(emoji);
- } else {
+ } else if (data.emojis) {
this.client.actions.GuildEmojisUpdate.handle({
guild_id: this.id,
emojis: data.emojis,
|
fix(Guild): only update emojis when they are present in the payload
|
diff --git a/fauxflake-core/src/main/java/com/github/rholder/fauxflake/provider/MacMachineIdProvider.java b/fauxflake-core/src/main/java/com/github/rholder/fauxflake/provider/MacMachineIdProvider.java
index <HASH>..<HASH> 100644
--- a/fauxflake-core/src/main/java/com/github/rholder/fauxflake/provider/MacMachineIdProvider.java
+++ b/fauxflake-core/src/main/java/com/github/rholder/fauxflake/provider/MacMachineIdProvider.java
@@ -40,12 +40,14 @@ public class MacMachineIdProvider implements MachineIdProvider {
static {
long value = 0L;
- byte[] raw = Arrays.copyOf(macAddress(), 8);
try {
// first 6 bytes are MAC
+ byte[] raw = Arrays.copyOf(macAddress(), 8);
value = new DataInputStream(new ByteArrayInputStream(raw)).readLong();
} catch (IOException e) {
e.printStackTrace();
+ } catch (UnsupportedOperationException e) {
+ e.printStackTrace();
}
MACHINE_ID = value;
}
|
more gracefully handle UnsupportedOperationException when the MAC cannot be retrieved
|
diff --git a/saltcloud/config.py b/saltcloud/config.py
index <HASH>..<HASH> 100644
--- a/saltcloud/config.py
+++ b/saltcloud/config.py
@@ -161,7 +161,8 @@ def cloud_config(path, env_var='SALT_CLOUD_CONFIG', defaults=None,
opts = apply_cloud_config(overrides, defaults)
# 3rd - Include Cloud Providers
- if 'providers' in opts and (providers_config or providers_config_path):
+ if 'providers' in opts and (providers_config is not None or (
+ providers_config and os.path.isfile(providers_config_path))):
raise saltcloud.exceptions.SaltCloudConfigError(
'Do not mix the old cloud providers configuration with '
'the new one. The providers configuration should now go in '
@@ -170,8 +171,15 @@ def cloud_config(path, env_var='SALT_CLOUD_CONFIG', defaults=None,
'`/etc/salt/cloud.providers`.'
)
elif 'providers' not in opts and providers_config is None:
+ # Load from configuration file, even if that files does not exist since
+ # it will be populated with defaults.
providers_config = cloud_providers_config(providers_config_path)
- opts['providers'] = providers_config
+ elif 'providers' not in opts and providers_config is not None:
+ # We're being passed a configuration dictionary
+ opts['providers'] = providers_config
+ else:
+ # Old style config
+ providers_config = opts['providers']
# 4th - Include VM profiles config
if vm_config is None:
|
Fix providers config loading logic and also handle old configs properly.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -24,7 +24,7 @@ module.exports = function(opts, callback){
return callback(error, null);
}
- var data = opts.format == 'json' ? JSON.parse(body.toString()) : body.toString();
+ var data = opts.format == 'json' ? JSON.parse(body) : body;
return callback(null, data);
|
Removes unnecessary .toString() from body
|
diff --git a/lib/omnibus/config.rb b/lib/omnibus/config.rb
index <HASH>..<HASH> 100644
--- a/lib/omnibus/config.rb
+++ b/lib/omnibus/config.rb
@@ -159,6 +159,15 @@ module Omnibus
# @!endgroup
+ # @!group Build Version Parameters
+
+ # @!attribute [rw] append_timestamp
+ #
+ # @return [Boolean]
+ append_timestamp true
+
+ # # @!endgroup
+
# @!group Validation Methods
# Asserts that the Config object is in a valid state. If invalid
|
add an `append_timestamp` configuration value
This value will be used to indicate whether a timestamp should be
appended to the build version.
|
diff --git a/js/wee.data.js b/js/wee.data.js
index <HASH>..<HASH> 100644
--- a/js/wee.data.js
+++ b/js/wee.data.js
@@ -193,7 +193,7 @@
}
// Add POST content type
- if (method == 'POST') {
+ if (method == 'POST' && ! conf.json) {
headers[contentTypeHeader] =
'application/x-www-form-urlencoded; charset=UTF-8';
}
|
Don't override JSON content type header if json is set to true
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -44,11 +44,11 @@ except(IOError, ImportError):
setup(
name='esgfpid',
- version='0.7.1',
+ version='0.7.2-dev',
author='Merret Buurman, German Climate Computing Centre (DKRZ)',
author_email='buurman@dkrz.de',
url='https://github.com/IS-ENES-Data/esgf-pid',
- download_url='https://github.com/IS-ENES-Data/esgf-pid/archive/0.7.1.tar.gz',
+ download_url='https://github.com/IS-ENES-Data/esgf-pid/archive/0.7.2-dev.tar.gz',
description='Library for sending PID requests to a rabbit messaging queue during ESGF publication.',
long_description=long_description,
packages=packages + test_packages,
|
Incremented version number to <I>-dev.
|
diff --git a/config/environment.rb b/config/environment.rb
index <HASH>..<HASH> 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -39,6 +39,7 @@ require 'lib/rubygems'
require 'lib/rubygems/format'
require 'lib/rubygems/indexer'
require 'lib/rubygems/source_index'
+require 'lib/rubygems/version'
require 'lib/indexer'
require 'lib/core_ext/string'
|
I guess we need version.rb too
|
diff --git a/person-directory-impl/src/main/java/org/jasig/services/persondir/support/merger/IAttributeMerger.java b/person-directory-impl/src/main/java/org/jasig/services/persondir/support/merger/IAttributeMerger.java
index <HASH>..<HASH> 100644
--- a/person-directory-impl/src/main/java/org/jasig/services/persondir/support/merger/IAttributeMerger.java
+++ b/person-directory-impl/src/main/java/org/jasig/services/persondir/support/merger/IAttributeMerger.java
@@ -68,8 +68,6 @@ public interface IAttributeMerger {
* @param toConsider - in consideration of this map
* @return the modified Map
* @throws IllegalArgumentException if either toModify or toConsider is null
- * @deprecated Merging individual result sets is no longer needed by client code. This method will be removed in 1.6
*/
- @Deprecated
public Map<String, List<Object>> mergeAttributes(Map<String, List<Object>> toModify, Map<String, List<Object>> toConsider);
}
\ No newline at end of file
|
NOJIRA don't deprecate merge attributes method as client code may need it
git-svn-id: <URL>
|
diff --git a/productmd/composeinfo.py b/productmd/composeinfo.py
index <HASH>..<HASH> 100644
--- a/productmd/composeinfo.py
+++ b/productmd/composeinfo.py
@@ -744,6 +744,7 @@ class Variant(VariantBase):
variant_uids = ["%s-%s" % (self.uid, i) for i in variant_ids]
for variant_uid in variant_uids:
variant = Variant(self._metadata)
+ variant.parent = self
variant.deserialize(full_data, variant_uid)
self.add(variant)
@@ -782,4 +783,3 @@ class Variant(VariantBase):
def add(self, variant):
VariantBase.add(self, variant)
- variant.parent = self
|
Set parent for child variant before deserializing
When variant is deserialized, validations are run on it. Some of these
validations require that parent is set, otherwise an error is raised. It
is therefore too late to set the parent after the deserialization.
|
diff --git a/src/main/java/hex/glm/GLM2.java b/src/main/java/hex/glm/GLM2.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hex/glm/GLM2.java
+++ b/src/main/java/hex/glm/GLM2.java
@@ -462,7 +462,8 @@ public class GLM2 extends Job.ModelJobWithoutClassificationField {
//pass
}
toEnum = family == Family.binomial && (!response.isEnum() && (response.min() < 0 || response.max() > 1));
-
+ if(source2.numCols() <= 1 && !intercept)
+ throw new IllegalArgumentException("There are no predictors left after ignoring constant columns in the dataset and no intercept => No parameters to estimate.");
Frame fr = DataInfo.prepareFrame(source2, response, new int[0], toEnum, true, true);
if(offset != null){ // now put the offset just in front of response
int id = source.find(offset);
|
GLM fix: throw IAE in case there are no predictor columns and no intercept.
|
diff --git a/src/directives/mwlDraggable.js b/src/directives/mwlDraggable.js
index <HASH>..<HASH> 100644
--- a/src/directives/mwlDraggable.js
+++ b/src/directives/mwlDraggable.js
@@ -77,7 +77,7 @@ angular
default:
}
- if (!$window.getComputedStyle(elm[0]).position) {
+ if ($window.getComputedStyle(elm[0]).position === 'static') {
elm.css('position', 'relative');
}
|
Fix z-index of events being dragged on the year and month views
|
diff --git a/chef-server-api/spec/spec_model_helper.rb b/chef-server-api/spec/spec_model_helper.rb
index <HASH>..<HASH> 100644
--- a/chef-server-api/spec/spec_model_helper.rb
+++ b/chef-server-api/spec/spec_model_helper.rb
@@ -53,6 +53,13 @@ def make_runlist(*items)
res
end
+def make_client(name,admin=false)
+ res = Chef::ApiClient.new
+ res.name(name)
+ res.admin(admin)
+ res
+end
+
def stub_checksum(checksum, present = true)
Chef::Checksum.should_receive(:new).with(checksum).and_return do
obj = stub(Chef::Checksum)
|
make_client model helper for testing ApiClient objects
|
diff --git a/spacy/pt/stop_words.py b/spacy/pt/stop_words.py
index <HASH>..<HASH> 100644
--- a/spacy/pt/stop_words.py
+++ b/spacy/pt/stop_words.py
@@ -27,7 +27,7 @@ geral grande grandes grupo
hoje horas há
-iniciar inicio ir irá isso ista isto já
+iniciar inicio ir irá isso isto já
lado ligado local logo longe lugar lá
|
Remove "ista" from portuguese stop words
|
diff --git a/app/class-element.php b/app/class-element.php
index <HASH>..<HASH> 100644
--- a/app/class-element.php
+++ b/app/class-element.php
@@ -52,6 +52,33 @@ class Element {
public $attr = null;
/**
+ * Array of self-closing tags (i.e., void elements) that have
+ * no content.
+ *
+ * @since 5.0.0
+ * @access protected
+ * @var array
+ */
+ protected $self_closing = [
+ 'base',
+ 'br',
+ 'col',
+ 'command',
+ 'embed',
+ 'hr',
+ 'img',
+ 'input',
+ 'keygen',
+ 'link',
+ 'menuitem',
+ 'meta',
+ 'param',
+ 'source',
+ 'track',
+ 'wbr'
+ ];
+
+ /**
* Set up the object.
*
* @since 5.0.0
@@ -79,6 +106,11 @@ class Element {
$attr = $this->attr instanceof Attributes ? $this->attr->fetch() : '';
+ if ( in_array( $this->tag, $this->self_closing ) ) {
+
+ return sprintf( '<%1$s %2$s />', tag_escape( $this->tag ), $attr );
+ }
+
return sprintf(
'<%1$s %2$s>%3$s</%1$s>',
tag_escape( $this->tag ),
|
Add support for self-closing tags to the `Element` class.
|
diff --git a/lib/core.js b/lib/core.js
index <HASH>..<HASH> 100644
--- a/lib/core.js
+++ b/lib/core.js
@@ -373,9 +373,8 @@ function keyObj(key) {
return obj;
}
-function normalizeList(arr) {
- if (!Array.isArray(arr)) arr = arr.split(',');
- return arr.map(function(str) {return str.trim();}).sort().join(',');
+function normalizeList(strlist) {
+ return strlist.split(',').map(function(str) {return str.trim();}).sort().join(',');
}
function dataEqual(a, b) {
|
Don't let express manage a http header list
|
diff --git a/controller/src/main/java/org/jboss/as/controller/registry/AbstractResourceRegistration.java b/controller/src/main/java/org/jboss/as/controller/registry/AbstractResourceRegistration.java
index <HASH>..<HASH> 100644
--- a/controller/src/main/java/org/jboss/as/controller/registry/AbstractResourceRegistration.java
+++ b/controller/src/main/java/org/jboss/as/controller/registry/AbstractResourceRegistration.java
@@ -509,7 +509,7 @@ abstract class AbstractResourceRegistration implements ManagementResourceRegistr
for (Map.Entry<String, ModelNode> entry : overrideDescriptionProvider.getAttributeOverrideDescriptions(locale).entrySet()) {
attrs.get(entry.getKey()).set(entry.getValue());
}
- ModelNode children = result.get(ModelDescriptionConstants.ATTRIBUTES);
+ ModelNode children = result.get(ModelDescriptionConstants.CHILDREN);
for (Map.Entry<String, ModelNode> entry : overrideDescriptionProvider.getChildTypeOverrideDescriptions(locale).entrySet()) {
children.get(entry.getKey()).set(entry.getValue());
}
|
[WFLY-<I>] OverrideDescriptionCombiner should add overridden children to the children and not to the attributes
was: <I>bb<I>baa<I>dcf<I>b3ca<I>dd<I>c<I>dc1
|
diff --git a/lib/db.js b/lib/db.js
index <HASH>..<HASH> 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -22,6 +22,7 @@ mkdirp.sync(path.join(DB_PATH, '/cache'))
============================================================================== */
let loaded = false
+let loadError = null
const onLoads = []
var db = (module.exports = {
@@ -35,7 +36,7 @@ var db = (module.exports = {
instances: ['users', 'connections', 'queries', 'cache', 'config'],
onLoad: function(fn) {
if (loaded) {
- return fn
+ return fn(loadError)
}
onLoads.push(fn)
}
@@ -73,6 +74,7 @@ async.series(
],
function finishedLoading(err) {
loaded = true
+ loadError = err
onLoads.forEach(fn => fn(err))
}
)
|
Fix and enhance db.onLoad (#<I>)
|
diff --git a/js/huobipro.js b/js/huobipro.js
index <HASH>..<HASH> 100644
--- a/js/huobipro.js
+++ b/js/huobipro.js
@@ -27,6 +27,7 @@ module.exports = class huobipro extends Exchange {
'fetchOpenOrders': true,
'fetchDepositAddress': true,
'withdraw': true,
+ 'loadLimits': true,
},
'timeframes': {
'1m': '1min',
@@ -62,6 +63,7 @@ module.exports = class huobipro extends Exchange {
'common/symbols', // 查询系统支持的所有交易对
'common/currencys', // 查询系统支持的所有币种
'common/timestamp', // 查询系统当前时间
+ 'common/exchange', // order limits
],
},
'private': {
@@ -154,6 +156,13 @@ module.exports = class huobipro extends Exchange {
return result;
}
+
+ async loadLimits (market, params = {}) {
+ return await this.publicGetCommonExchange (this.extend ({
+ 'symbol': market['id'];
+ }))
+ }
+
async fetchMarkets () {
let response = await this.publicGetCommonSymbols ();
return this.parseMarkets (response['data']);
|
added loadMarkets to huobipro
|
diff --git a/src/test/moment/create.js b/src/test/moment/create.js
index <HASH>..<HASH> 100644
--- a/src/test/moment/create.js
+++ b/src/test/moment/create.js
@@ -578,7 +578,12 @@ test('parsing iso', function (assert) {
['2011281 180420,111' + tz2, '2011-10-08T18:04:20.111' + tz]
], i;
for (i = 0; i < formats.length; i++) {
- assert.equal(moment(formats[i][0]).format('YYYY-MM-DDTHH:mm:ss.SSSZ'), formats[i][1], 'moment should be able to parse ISO ' + formats[i][0]);
+ assert.equal(moment(formats[i][0]).format('YYYY-MM-DDTHH:mm:ss.SSSZ'),
+ formats[i][1], 'moment should be able to parse ISO ' + formats[i][0]);
+ assert.equal(moment(formats[i][0], moment.ISO_8601).format('YYYY-MM-DDTHH:mm:ss.SSSZ'),
+ formats[i][1], 'moment should be able to parse specified ISO ' + formats[i][0]);
+ assert.equal(moment(formats[i][0], moment.ISO_8601, true).format('YYYY-MM-DDTHH:mm:ss.SSSZ'),
+ formats[i][1], 'moment should be able to parse specified strict ISO ' + formats[i][0]);
}
});
|
Add more iso tests variations (strict and non-strict ISO_<I>)
|
diff --git a/fuseops/convert.go b/fuseops/convert.go
index <HASH>..<HASH> 100644
--- a/fuseops/convert.go
+++ b/fuseops/convert.go
@@ -197,15 +197,17 @@ func Convert(
case *bazilfuse.FsyncRequest:
// We don't currently support this for directories.
if typed.Dir {
- return
- }
-
- to := &SyncFileOp{
- Inode: InodeID(typed.Header.Node),
- Handle: HandleID(typed.Handle),
+ to := &unknownOp{}
+ io = to
+ co = &to.commonOp
+ } else {
+ to := &SyncFileOp{
+ Inode: InodeID(typed.Header.Node),
+ Handle: HandleID(typed.Handle),
+ }
+ io = to
+ co = &to.commonOp
}
- io = to
- co = &to.commonOp
case *bazilfuse.FlushRequest:
to := &FlushFileOp{
|
Fixed a bug in handling of an unknown op type.
|
diff --git a/falafel/mappers/tests/test_interrupts.py b/falafel/mappers/tests/test_interrupts.py
index <HASH>..<HASH> 100644
--- a/falafel/mappers/tests/test_interrupts.py
+++ b/falafel/mappers/tests/test_interrupts.py
@@ -68,6 +68,10 @@ INT_INVALID_2 = """
""".strip()
+INT_NO_INTERRUPTS = """
+ CPU0
+"""
+
def test_interrupts():
all_ints = Interrupts(context_wrap(INT_MULTI))
@@ -92,3 +96,6 @@ def test_interrupts():
with pytest.raises(ParseException):
Interrupts(context_wrap(INT_INVALID_2))
+
+ with pytest.raises(ParseException):
+ Interrupts(context_wrap(INT_NO_INTERRUPTS))
|
Interrupts tests at <I>% code coverage
Test the (unlikely) situation where the file shows a header but no interrupts.
|
diff --git a/app/libraries/Setups/Views/Header.php b/app/libraries/Setups/Views/Header.php
index <HASH>..<HASH> 100644
--- a/app/libraries/Setups/Views/Header.php
+++ b/app/libraries/Setups/Views/Header.php
@@ -86,9 +86,14 @@ final class Header extends AbstractSetup
public function renderMenu()
{
echo '<nav id="primary-menu" class="js-main-menu site-navigation '.
- $this->menuStatus().'">'.
- $this->menuSkipTo('main', \esc_html__('Skip to content', 'jentil'));
+ $this->menuStatus().'">';
\get_search_form();
+
+ echo $this->menuSkipTo(
+ 'main',
+ \esc_html__('Skip to content', 'jentil')
+ );
+
\wp_nav_menu(['theme_location' => 'primary-menu']);
echo '</nav>';
}
|
Move skip to content link to the immediate top of nav menu
|
diff --git a/thumbor/error_handlers/sentry.py b/thumbor/error_handlers/sentry.py
index <HASH>..<HASH> 100644
--- a/thumbor/error_handlers/sentry.py
+++ b/thumbor/error_handlers/sentry.py
@@ -36,9 +36,7 @@ class ErrorHandler(object):
res_mod = pkg_resources.get_distribution(module)
if res_mod is not None:
resolved[module] = res_mod.version
- except (pkg_resources.DistributionNotFound,
- pkg_resources._vendor.packaging.requirements.InvalidRequirement,
- pkg_resources.RequirementParseError):
+ except pkg_resources.DistributionNotFound:
pass
return resolved
|
Fix Sentry test error
It seems like Sentry has changed things around that error once again
|
diff --git a/src/cartodb.js b/src/cartodb.js
index <HASH>..<HASH> 100644
--- a/src/cartodb.js
+++ b/src/cartodb.js
@@ -93,7 +93,8 @@
'vis/layers.js',
// PUBLIC API
- 'api/layers.js'
+ 'api/layers.js',
+ 'api/sql.js'
];
cdb.init = function(ready) {
|
added sql.js to files
|
diff --git a/app/controllers/rails_admin/application_controller.rb b/app/controllers/rails_admin/application_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/rails_admin/application_controller.rb
+++ b/app/controllers/rails_admin/application_controller.rb
@@ -8,7 +8,7 @@ module RailsAdmin
end
class ApplicationController < ::ApplicationController
- newrelic_ignore if defined?(NewRelic)
+ newrelic_ignore if defined?(NewRelic) && respond_to?(:newrelic_ignore)
before_filter :_authenticate!
before_filter :_authorize!
|
Fix when newrelic_ignore is not present
If `newrelic_rpm` gem is included only in production environment, `newrelic_ignore` method is not available for development env.
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -156,10 +156,11 @@ export default class TimeAgo extends Component<DefaultProps, Props, void> {
? [Math.round(seconds / MONTH), 'month']
: [Math.round(seconds / YEAR), 'year']
- const passDownTitle = title
- || typeof date === 'string'
- ? date
- : (new Date(date)).toISOString().substr(0, 16).replace('T', ' ')
+ const passDownTitle = typeof title === 'undefined'
+ ? (typeof date === 'string'
+ ? date
+ : (new Date(date)).toISOString().substr(0, 16).replace('T', ' '))
+ : title
if (Komponent === 'time') {
passDownProps.dateTime = (new Date(date)).toISOString()
|
Pass down title verbatim when specified. Closes #<I>
|
diff --git a/core/Archive/ArchiveInvalidator.php b/core/Archive/ArchiveInvalidator.php
index <HASH>..<HASH> 100644
--- a/core/Archive/ArchiveInvalidator.php
+++ b/core/Archive/ArchiveInvalidator.php
@@ -566,9 +566,9 @@ class ArchiveInvalidator
$reArchiveList = new ReArchiveList($this->logger);
$items = $reArchiveList->getAll();
- foreach ($items as $entry) {
+ foreach ($items as $item) {
try {
- $entry = @json_decode($entry, true);
+ $entry = @json_decode($item, true);
if (empty($entry)) {
continue;
}
@@ -588,7 +588,7 @@ class ArchiveInvalidator
'ex' => $ex,
]);
} finally {
- $reArchiveList->remove([$entry]);
+ $reArchiveList->remove([$item]);
}
}
}
|
Fix removal of rearchiving records (#<I>)
|
diff --git a/marathon_acme/sse_protocol.py b/marathon_acme/sse_protocol.py
index <HASH>..<HASH> 100644
--- a/marathon_acme/sse_protocol.py
+++ b/marathon_acme/sse_protocol.py
@@ -1,6 +1,7 @@
from twisted.internet import error
from twisted.internet.defer import Deferred
from twisted.internet.protocol import connectionDone, Protocol
+from twisted.logger import Logger, LogLevel
class SseProtocol(Protocol):
@@ -11,6 +12,7 @@ class SseProtocol(Protocol):
_buffer = b''
MAX_LENGTH = 16384
+ log = Logger()
def __init__(self, handler):
"""
@@ -120,6 +122,7 @@ class SseProtocol(Protocol):
return '\n'.join(self.data_lines)
def connectionLost(self, reason=connectionDone):
+ self.log.failure('SSE connection lost', reason, LogLevel.warn)
for d in list(self._waiting):
d.callback(None)
self._waiting = []
|
SSE: Log the reason for the lost connection
|
diff --git a/tests/Keboola/StorageApi/FilesTest.php b/tests/Keboola/StorageApi/FilesTest.php
index <HASH>..<HASH> 100644
--- a/tests/Keboola/StorageApi/FilesTest.php
+++ b/tests/Keboola/StorageApi/FilesTest.php
@@ -49,6 +49,18 @@ class Keboola_StorageApi_FilesTest extends StorageApiTestCase
$this->assertEquals($fileId, $file['id']);
}
+ public function testFilesListFilterByInvalidValues()
+ {
+ try {
+ $this->_client->apiGet('storage/files?' . http_build_query([
+ 'tags' => 'tag',
+ ]));
+ $this->fail('Validation error should be thrown');
+ } catch (\Keboola\StorageApi\ClientException $e) {
+ $this->assertEquals('storage.validation', $e->getStringCode());
+ }
+ }
+
public function testSetTagsFromArrayWithGaps()
{
$file = $this->_client->prepareFileUpload((new FileUploadOptions())
|
tests(files): filter by invalid tags type
|
diff --git a/bin/methods/start.js b/bin/methods/start.js
index <HASH>..<HASH> 100644
--- a/bin/methods/start.js
+++ b/bin/methods/start.js
@@ -61,4 +61,9 @@ module.exports = class Cordlr {
this.getConfiguration()
this.start()
}
+
+ stop () {
+ this.bot.destroy()
+ process.exit(1)
+ }
}
diff --git a/loader/plugins/restart.js b/loader/plugins/restart.js
index <HASH>..<HASH> 100644
--- a/loader/plugins/restart.js
+++ b/loader/plugins/restart.js
@@ -15,14 +15,31 @@ module.exports = class RestartPlugin extends CordlrPlugin {
'permissions': [
'ADMINISTRATOR'
]
+ },
+ 'stop': {
+ 'usage': '',
+ 'function': 'stopBot',
+ 'description': 'Stops the current bot instance',
+ 'permissions': [
+ 'ADMINISTRATOR'
+ ]
}
}
}
restartBot (message) {
+ this.sendInfo(message, 'Restarting...', 'Cordlr', null, 'error')
message.delete()
.then(() => {
this.bot.bot.bin.restart()
})
}
+
+ stopBot (message) {
+ this.sendInfo(message, 'Stopping...', 'Cordlr', null, 'error')
+ message.delete()
+ .then(() => {
+ this.bot.bot.bin.stop()
+ })
+ }
}
|
feat(CORE:Restart): Implemented Stop and Restart functionality
|
diff --git a/lib/rest-ftp-daemon/constants.rb b/lib/rest-ftp-daemon/constants.rb
index <HASH>..<HASH> 100644
--- a/lib/rest-ftp-daemon/constants.rb
+++ b/lib/rest-ftp-daemon/constants.rb
@@ -57,7 +57,7 @@ LOG_PIPE_LEN = 10
LOG_COL_WID = 8
LOG_COL_JID = JOB_IDENT_LEN + 3 + 2
LOG_COL_ID = 6
-LOG_TRIM_LINE = 80
+LOG_TRIM_LINE = 200
LOG_DUMPS = File.dirname(__FILE__) + "/../../log/"
LOG_ROTATION = "daily"
LOG_FORMAT_TIME = "%Y-%m-%d %H:%M:%S"
|
don’t trim log lines too short: dangerous when we get backtraces with paths
|
diff --git a/haraka.js b/haraka.js
index <HASH>..<HASH> 100644
--- a/haraka.js
+++ b/haraka.js
@@ -46,6 +46,11 @@ process.on('uncaughtException', function (err) {
});
});
+process.on('SIGUSR1', function () {
+ logger.lognotice("Flushing the temp fail queue");
+ server.flushQueue();
+})
+
process.on('exit', function() {
process.title = path.basename(process.argv[1], '.js');
logger.lognotice('Shutting down');
diff --git a/server.js b/server.js
index <HASH>..<HASH> 100644
--- a/server.js
+++ b/server.js
@@ -66,6 +66,17 @@ Server.daemonize = function (config_data) {
}
}
+Server.flushQueue = function () {
+ if (Server.cluster) {
+ for (var id in cluster.workers) {
+ cluster.workers[id].send({event: 'flush_queue'});
+ }
+ }
+ else {
+ out.flush_queue();
+ }
+}
+
Server.createServer = function (params) {
var config_data = config.get('smtp.ini');
var param_key;
|
Flush the outbound temp fail queue with SIGUSR1
|
diff --git a/test/rdb_workloads/lots_of_tables.rb b/test/rdb_workloads/lots_of_tables.rb
index <HASH>..<HASH> 100755
--- a/test/rdb_workloads/lots_of_tables.rb
+++ b/test/rdb_workloads/lots_of_tables.rb
@@ -7,6 +7,9 @@ port = ENV['PORT'].to_i
raise RuntimeError,"Must specify HOST and PORT in environment." if
(!host || !port)
+raise RuntimeError,"Expected at most one argument" if ARGV.length > 1
+if ARGV.length == 1 then count = ARGV[0].to_i else count = 100 end
+
require 'rethinkdb.rb'
extend RethinkDB::Shortcuts_Mixin
@@ -23,7 +26,7 @@ datacenter_name = datacenters_json.to_a[0][1]["name"]
require 'time'
i = 0
-while i < 100 do
+while i < count do
tbl_name = rand().to_s
start_time = Time.now
r.db(ENV["DB_NAME"]).create_table(tbl_name, datacenter_name).run
|
Make number of tables configurable in lots_of_tables.rb. So you can only do a few tables instead of lots if you want.
|
diff --git a/api/src/main/java/com/capitalone/dashboard/service/CollectorServiceImpl.java b/api/src/main/java/com/capitalone/dashboard/service/CollectorServiceImpl.java
index <HASH>..<HASH> 100644
--- a/api/src/main/java/com/capitalone/dashboard/service/CollectorServiceImpl.java
+++ b/api/src/main/java/com/capitalone/dashboard/service/CollectorServiceImpl.java
@@ -191,7 +191,19 @@ public class CollectorServiceImpl implements CollectorService {
Collector existing = collectorRepository.findByName(collector.getName());
if (existing != null) {
collector.setId(existing.getId());
+ /*
+ * Since this is invoked by api it always needs to be enabled and online,
+ * additionally since this record is fetched from the database existing record
+ * needs to updated with these values.
+ * */
+ existing.setEnabled(true);
+ existing.setOnline(true);
+ existing.setLastExecuted(System.currentTimeMillis());
+ return collectorRepository.save(existing);
}
+ /*
+ * create a new collector record
+ * */
return collectorRepository.save(collector);
}
|
Update the collector record if already existing else create a new one. (#<I>)
|
diff --git a/Log/observer.php b/Log/observer.php
index <HASH>..<HASH> 100644
--- a/Log/observer.php
+++ b/Log/observer.php
@@ -72,6 +72,16 @@ class Log_observer
$type = strtolower($type);
$class = 'Log_observer_' . $type;
+ /*
+ * If the desired class already exists (because the caller has supplied
+ * it from some custom location), simply instantiate and return a new
+ * instance.
+ */
+ if (class_exist($class)) {
+ $object = new $class($priority, $conf);
+ return $object;
+ }
+
/* Support both the new-style and old-style file naming conventions. */
if (file_exists(dirname(__FILE__) . '/observer_' . $type . '.php')) {
$classfile = 'Log/observer_' . $type . '.php';
@@ -82,8 +92,7 @@ class Log_observer
}
/* Issue a warning if the old-style conventions are being used. */
- if (!$newstyle)
- {
+ if (!$newstyle) {
trigger_error('Using old-style Log_observer conventions',
E_USER_WARNING);
}
|
If the desired class already exists (because the caller has supplied it
from some custom location), simply instantiate and return a new instance.
Noticed by: Mads Danquah
|
diff --git a/lib/components/map/default-map.js b/lib/components/map/default-map.js
index <HASH>..<HASH> 100644
--- a/lib/components/map/default-map.js
+++ b/lib/components/map/default-map.js
@@ -13,7 +13,6 @@ import {
setMapPopupLocation,
setMapPopupLocationAndGeocode
} from '../../actions/map'
-
import BoundsUpdatingOverlay from './bounds-updating-overlay'
import EndpointsOverlay from './connected-endpoints-overlay'
import ParkAndRideOverlay from './connected-park-and-ride-overlay'
diff --git a/lib/components/narrative/line-itin/itin-summary.js b/lib/components/narrative/line-itin/itin-summary.js
index <HASH>..<HASH> 100644
--- a/lib/components/narrative/line-itin/itin-summary.js
+++ b/lib/components/narrative/line-itin/itin-summary.js
@@ -1,6 +1,6 @@
import TriMetModeIcon from '@opentripplanner/icons/lib/trimet-mode-icon'
-import React, { Component } from 'react'
import PropTypes from 'prop-types'
+import React, { Component } from 'react'
import { calculateFares, calculatePhysicalActivity, isTransit } from '../../../util/itinerary'
import { formatDuration, formatTime } from '../../../util/time'
|
style: Organize imports per PR comments.
|
diff --git a/core/server/master/src/main/java/alluxio/master/file/meta/MountTable.java b/core/server/master/src/main/java/alluxio/master/file/meta/MountTable.java
index <HASH>..<HASH> 100644
--- a/core/server/master/src/main/java/alluxio/master/file/meta/MountTable.java
+++ b/core/server/master/src/main/java/alluxio/master/file/meta/MountTable.java
@@ -42,6 +42,7 @@ import java.util.NoSuchElementException;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
+import javax.annotation.Nullable;
import javax.annotation.concurrent.GuardedBy;
import javax.annotation.concurrent.ThreadSafe;
@@ -329,6 +330,7 @@ public final class MountTable implements JournalEntryIterable {
* @param mountId the given ufs id
* @return the mount information with this id or null if this mount id is not found
*/
+ @Nullable
public MountInfo getMountInfo(long mountId) {
try (LockResource r = new LockResource(mReadLock)) {
for (Map.Entry<String, MountInfo> entry : mMountTable.entrySet()) {
|
add Nullable notation for MountTable.java
|
diff --git a/driver-compat/src/main/com/mongodb/DBCollection.java b/driver-compat/src/main/com/mongodb/DBCollection.java
index <HASH>..<HASH> 100644
--- a/driver-compat/src/main/com/mongodb/DBCollection.java
+++ b/driver-compat/src/main/com/mongodb/DBCollection.java
@@ -197,6 +197,10 @@ public class DBCollection {
return new WriteResult(result, writeConcernToUse);
}
+ public DBCursor find(final DBObject filter) {
+ return find(filter, null);
+ }
+
public DBCursor find(final DBObject filter, final DBObject fields) {
return new DBCursor(collection, new MongoFind().
where(DBObjects.toQueryFilterDocument(filter)).
|
Implemented another find method in DBCollection
|
diff --git a/nyt.js b/nyt.js
index <HASH>..<HASH> 100644
--- a/nyt.js
+++ b/nyt.js
@@ -48,16 +48,16 @@ function nyt (keys) {
community.recent(args, callback, myKeys, table);
},
random : function (args, callback) {
-
+ community.random(args, callback, myKeys, table);
},
byDate : function (args, callback) {
-
+ community.byDate(args, callback, myKeys, table);
},
byUser : function (args, callback) {
-
+ community.byUser(args, callback, myKeys, table);
},
byURL : function (args, callback) {
-
+ community.byURL(args, callback, myKeys, table);
}
}
|
added community outline in nyt
|
diff --git a/tests/mock_tests/test_sqlparsing.py b/tests/mock_tests/test_sqlparsing.py
index <HASH>..<HASH> 100644
--- a/tests/mock_tests/test_sqlparsing.py
+++ b/tests/mock_tests/test_sqlparsing.py
@@ -232,6 +232,7 @@ class VoidQuery(MockTest):
class TestCanvasVoidQuery(VoidQuery):
+ @skip
def test_query(self):
self.sql = 'CREATE TABLE "introspection_comment" ("id" int NOT NULL PRIMARY KEY AUTOINCREMENT, "ref" string NOT NULL UNIQUE, "article_id" int NOT NULL, "email" string NOT NULL, "pub_date" date NOT NULL, "up_votes" long NOT NULL, "body" string NOT NULL, CONSTRAINT "up_votes_gte_0_check" CHECK ("up_votes" >= 0), CONSTRAINT "article_email_pub_date_uniq" UNIQUE ("article_id", "email", "pub_date"))'
self.exe()
|
Support for Django <I>
|
diff --git a/src/Model/Behavior/SlugBehavior.php b/src/Model/Behavior/SlugBehavior.php
index <HASH>..<HASH> 100644
--- a/src/Model/Behavior/SlugBehavior.php
+++ b/src/Model/Behavior/SlugBehavior.php
@@ -182,7 +182,7 @@ class SlugBehavior extends Behavior
throw new InvalidArgumentException('The `slug` key is required by the `slugged` finder.');
}
- return $query->where([$this->config('field') => $options['slug']]);
+ return $query->where([$this->_table->alias() . '.' . $this->config('field') => $options['slug']]);
}
/**
|
Resolves #4. Add the table class alias to the field
|
diff --git a/conn.go b/conn.go
index <HASH>..<HASH> 100644
--- a/conn.go
+++ b/conn.go
@@ -232,7 +232,13 @@ func Connect(config ConnConfig) (c *Conn, err error) {
}
}
+// Close closes a connection. It is safe to call Close on a already closed
+// connection.
func (c *Conn) Close() (err error) {
+ if !c.IsAlive() {
+ return nil
+ }
+
err = c.txMsg('X', c.getBuf(), true)
c.die(errors.New("Closed"))
c.logger.Info("Closed connection")
@@ -1190,4 +1196,6 @@ func (c *Conn) getBuf() *bytes.Buffer {
func (c *Conn) die(err error) {
c.alive = false
c.causeOfDeath = err
+ c.writer.Flush()
+ c.conn.Close()
}
|
Make Conn Close idempotent
* die (which is called by Close) now closes underlying connection
|
diff --git a/user/tabs.php b/user/tabs.php
index <HASH>..<HASH> 100644
--- a/user/tabs.php
+++ b/user/tabs.php
@@ -231,9 +231,9 @@
$secondrow = array();
$secondrow[] = new tabobject('assign', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$usercontext->id.'&userid='.$user->id.'&courseid='.$course->id
- ,get_string('assignroles', 'role'));
+ ,get_string('localroles', 'role'));
$secondrow[] = new tabobject('override', $CFG->wwwroot.'/'.$CFG->admin.'/roles/override.php?contextid='.$usercontext->id.'&userid='.$user->id.'&courseid='.$course->id
- ,get_string('overrideroles', 'role'));
+ ,get_string('overridepermissions', 'role'));
}
}
|
MDL-<I>, keep roles tabs consistent, see tracker
|
diff --git a/lib/opal/parser.rb b/lib/opal/parser.rb
index <HASH>..<HASH> 100644
--- a/lib/opal/parser.rb
+++ b/lib/opal/parser.rb
@@ -652,7 +652,7 @@ module Opal
f("'local-variable'", sexp)
when :gvar
gvar_name = part[1].to_s[1..-1]
- f("($gvars.hasOwnProperty(#{gvar_name.inspect}) != null ? 'global-variable' : nil)", sexp)
+ f("(($gvars.hasOwnProperty(#{gvar_name.inspect}) != null) ? 'global-variable' : nil)", sexp)
when :yield
[f('( (', sexp), js_block_given(sexp, level), f(") != null ? 'yield' : nil)", sexp)]
when :super
|
It's lisp right?
|
diff --git a/holoviews/plotting/bokeh/plot.py b/holoviews/plotting/bokeh/plot.py
index <HASH>..<HASH> 100644
--- a/holoviews/plotting/bokeh/plot.py
+++ b/holoviews/plotting/bokeh/plot.py
@@ -23,14 +23,6 @@ class BokehPlot(Plot):
height = param.Integer(default=300)
renderer = BokehRenderer
-
- def update(self, key):
- """
- Update the internal state of the Plot to represent the given
- key tuple (where integers represent frames). Returns this
- state.
- """
- return self.state
@property
def state(self):
@@ -40,13 +32,13 @@ class BokehPlot(Plot):
"""
return self.handles['plot']
- def update(self, key):
+ def update(self, key, redraw=True):
"""
Update the internal state of the Plot to represent the given
key tuple (where integers represent frames). Returns this
state.
"""
- if not self.drawn:
+ if redraw:
self.initialize_plot()
return self.__getitem__(key)
|
BokehPlot.update now has redraw option
|
diff --git a/linguist/mixins.py b/linguist/mixins.py
index <HASH>..<HASH> 100644
--- a/linguist/mixins.py
+++ b/linguist/mixins.py
@@ -236,9 +236,7 @@ class QuerySetMixin(object):
grouped_translations[obj.object_id].append(obj)
for instance in self:
-
instance.clear_translations_cache()
-
for translation in grouped_translations[instance.pk]:
instance._linguist.set_cache(instance=instance, translation=translation)
@@ -272,11 +270,27 @@ class ManagerMixin(object):
"""
Proxy for ``QuerySetMixin.activate_language()`` method.
"""
- self.get_queryset().active_language(language)
+ self.get_queryset().activate_language(language)
class ModelMixin(object):
+ def prefetch_translations(self):
+ if not self.pk:
+ return
+
+ from .models import Translation
+
+ decider = self._meta.linguist.get('decider', Translation)
+ identifier = self._meta.linguist.get('identifier', None)
+
+ if identifier is None:
+ raise Exception('You must define Linguist "identifier" meta option')
+
+ translations = decider.objects.filter(identifier=identifier, object_id=self.pk)
+ for translation in translations:
+ self._linguist.set_cache(instance=self, translation=translation)
+
@property
def linguist_identifier(self):
"""
|
Add prefetch_translations() for single instance.
|
diff --git a/redis/client.py b/redis/client.py
index <HASH>..<HASH> 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -193,6 +193,19 @@ class Redis(object):
self.errors = errors
self.select(host, port, db, password)
+ #### Legacty accessors of connection information ####
+ def _get_host(self):
+ return self.connection.host
+ host = property(_get_host)
+
+ def _get_port(self):
+ return self.connection.port
+ port = property(_get_port)
+
+ def _get_db(self):
+ return self.connection.db
+ db = property(_get_db)
+
def pipeline(self):
return Pipeline(self.connection, self.encoding, self.errors)
|
added accessors for host/port/db information off the current connection
|
diff --git a/annis-gui/src/main/java/annis/gui/querybuilder/TigerQueryBuilderCanvas.java b/annis-gui/src/main/java/annis/gui/querybuilder/TigerQueryBuilderCanvas.java
index <HASH>..<HASH> 100644
--- a/annis-gui/src/main/java/annis/gui/querybuilder/TigerQueryBuilderCanvas.java
+++ b/annis-gui/src/main/java/annis/gui/querybuilder/TigerQueryBuilderCanvas.java
@@ -418,7 +418,7 @@ public class TigerQueryBuilderCanvas extends Panel
if (nodeComponentCount++ > 0)
{
nodeIdentityOperations.append("\n& #").append(componentCount).append(
- " = #").append(componentCount + 1);
+ " _=_ #").append(componentCount + 1);
query.append(" & ");
componentCount++;
}
|
fixed a small bug in qb identical coverage
"identical coverage" operator was = but should be _=_
|
diff --git a/src/Namespaces/ItemsNamespace.php b/src/Namespaces/ItemsNamespace.php
index <HASH>..<HASH> 100644
--- a/src/Namespaces/ItemsNamespace.php
+++ b/src/Namespaces/ItemsNamespace.php
@@ -42,18 +42,16 @@ class ItemsNamespace extends AbstractNamespace
/**
* @param string $ean
* @param array $embedded
- * @param int $limit
- * @param int $offset
- * @return Cursor|ItemWithEmbeddedTransfer[]
+ * @return ItemWithEmbeddedTransfer|null
*/
- public function findByEan($ean, $embedded = null, $limit = 30, $offset = 0)
+ public function findByEan($ean, array $embedded = null)
{
- return $this->buildFind()
+ $list = $this->buildFind()
->addParam('ean', $ean)
->addParam('embedded', $embedded)
- ->setLimit($limit)
- ->setOffset($offset)
->find();
+
+ return $list->total() ? $list->current() : null;
}
/**
|
Fix findByEan method so that it returns either Item or null
|
diff --git a/lib/websession_webinterface.py b/lib/websession_webinterface.py
index <HASH>..<HASH> 100644
--- a/lib/websession_webinterface.py
+++ b/lib/websession_webinterface.py
@@ -693,7 +693,7 @@ class WebInterfaceYourAccountPages(WebInterfaceDirectory):
# login successful!
if args['referer']:
- redirect_to_url(req, args['referer'])
+ redirect_to_url(req, args['referer'], apache.HTTP_MOVED_TEMPORARILY)
else:
return self.display(req, form)
else:
|
Using HTTP_MOVED_TEMPORARILY when successful login (otherwise FireFox complains
with HTTP_TEMPORARY_REDIRECT that it have to resend form information to a new
URL.
|
diff --git a/lib/govuk_app_config.rb b/lib/govuk_app_config.rb
index <HASH>..<HASH> 100644
--- a/lib/govuk_app_config.rb
+++ b/lib/govuk_app_config.rb
@@ -6,9 +6,9 @@ require "govuk_app_config/govuk_i18n"
# This require is deprecated and should be removed on next major version bump
# and should be required by applications directly.
require "govuk_app_config/govuk_unicorn"
-require "govuk_app_config/govuk_prometheus_exporter"
if defined?(Rails)
+ require "govuk_app_config/govuk_prometheus_exporter"
require "govuk_app_config/govuk_logging"
require "govuk_app_config/govuk_content_security_policy"
require "govuk_app_config/railtie"
|
Use GovukPrometheusExport for only Rails apps
The initialiser modules loads middleware into Rack and explicity depends
on Rails being present.
|
diff --git a/src/Core/Application.php b/src/Core/Application.php
index <HASH>..<HASH> 100644
--- a/src/Core/Application.php
+++ b/src/Core/Application.php
@@ -1397,14 +1397,37 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
return $this;
}
- $this['action']->add('admin_init', function () use ($kernel, $request) {
+ $this['action']->add('admin_init', $this->dispatchToAdmin($kernel, $request));
+
+ return $this;
+ }
+
+ /**
+ * Manage WordPress Admin Init.
+ * Handle incoming request and return a response.
+ *
+ * @param string $kernel
+ * @param $request
+ *
+ * @return Closure
+ */
+ protected function dispatchToAdmin(string $kernel, $request)
+ {
+ return function () use ($kernel, $request) {
$kernel = $this->make($kernel);
+ /** @var Response $response */
$response = $kernel->handle($request);
- $response->sendHeaders();
- });
- return $this;
+ if (500 <= $response->getStatusCode()) {
+ // In case of an internal server error, we stop the process
+ // and send full response back to the user.
+ $response->send();
+ } else {
+ // HTTP OK - Send only the response headers.s
+ $response->sendHeaders();
+ }
+ };
}
/**
|
Send error response if administration route failed.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.