diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/Parser/Top/TopListItemParser.php b/src/Parser/Top/TopListItemParser.php
index <HASH>..<HASH> 100644
--- a/src/Parser/Top/TopListItemParser.php
+++ b/src/Parser/Top/TopListItemParser.php
@@ -102,7 +102,7 @@ class TopListItemParser
*/
public function getType(): string
{
- return preg_replace('/^(\w+).*$/', '$1', $this->getTextArray()[0]);
+ return preg_replace('~(.*)\s\(.*~', '$1', $this->getTextArray()[0]);
}
/**
|
fix parsing of type light novel
|
diff --git a/lib/mini_fb.rb b/lib/mini_fb.rb
index <HASH>..<HASH> 100644
--- a/lib/mini_fb.rb
+++ b/lib/mini_fb.rb
@@ -643,7 +643,7 @@ module MiniFB
resp = RestClient.get url
end
- @@log.debug 'resp=' + resp.to_s
+ @@log.debug 'resp=' + resp.to_s if @@log.debug?
if options[:response_type] == :params
# Some methods return a param like string, for example: access_token=11935261234123|rW9JMxbN65v_pFWQl5LmHHABC
|
Checks log level before inspecting a debug log
|
diff --git a/src/fury.js b/src/fury.js
index <HASH>..<HASH> 100644
--- a/src/fury.js
+++ b/src/fury.js
@@ -61,12 +61,12 @@ class Fury {
if (adapter) {
try {
adapter.parse({generateSourceMap, minim, source}, (err, elements) => {
- if (err) { return done(err, elements); }
-
- if (elements instanceof minim.BaseElement) {
- done(null, elements);
+ if (!elements) {
+ done(err);
+ } else if (elements instanceof minim.BaseElement) {
+ done(err, elements);
} else {
- done(null, this.load(elements));
+ done(err, this.load(elements));
}
});
} catch (err) {
diff --git a/test/fury.js b/test/fury.js
index <HASH>..<HASH> 100644
--- a/test/fury.js
+++ b/test/fury.js
@@ -278,7 +278,7 @@ describe('Parser', () => {
fury.parse({source: 'dummy'}, (err, elements) => {
assert.equal(err, expectedError);
- assert.equal(elements, expectedElements);
+ assert.deepEqual(elements, fury.load(expectedElements));
done();
});
});
|
Process API Elements by minim on error as well.
|
diff --git a/tests/test_utils.py b/tests/test_utils.py
index <HASH>..<HASH> 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -1,4 +1,5 @@
""" Tests for jtime utils module """
+import datetime
import mock
import sys
if sys.version_info < (2, 7):
@@ -23,3 +24,13 @@ class JtimeUtilsTestCase(unittest.TestCase):
def test_get_input_bad_input(self):
input_func = mock.Mock(side_effect=["", None, "input!"])
utils.get_input(input_func, "Test to get input!")
+
+ def test_timedelta_total_seconds(self):
+ one_day = datetime.timedelta(1) # 1 day
+ one_day_sec = 60 * 60 * 24
+
+ one_hr = datetime.timedelta(hours=1)
+ one_hr_sec = 60 * 60
+
+ self.assertEquals(utils.timedelta_total_seconds(one_day), one_day_sec)
+ self.assertEquals(utils.timedelta_total_seconds(one_hr), one_hr_sec)
|
Adding tests around timedelta to total seconds method.
|
diff --git a/app/controllers/content_items_controller.rb b/app/controllers/content_items_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/content_items_controller.rb
+++ b/app/controllers/content_items_controller.rb
@@ -24,8 +24,8 @@ class ContentItemsController < AdminController
title = @content_item.field_items.find { |field_item| field_item.field.name == 'Title' }.data['text']
add_breadcrumb content_type.name.pluralize, :content_type_content_items_path
- add_breadcrumb 'Edit'
add_breadcrumb title
+ add_breadcrumb 'Edit'
end
def update
|
Flip order of title/edit breadcrumbs in ContentItem.edit
|
diff --git a/addon/components/as-sidebar.js b/addon/components/as-sidebar.js
index <HASH>..<HASH> 100644
--- a/addon/components/as-sidebar.js
+++ b/addon/components/as-sidebar.js
@@ -28,10 +28,14 @@ export default Ember.Component.extend(TransitionDurationMixin, {
Ember.run.later(function() {
cancelAnimationFrame(calculationId);
- }, this.get('transitionDuration'));
+ }, this.get('_recalculationDuration'));
}
}),
+ _recalculationDuration: Ember.computed('transitionDuration', function() {
+ return this.get('transitionDuration') + 100;
+ }),
+
actions: {
toggleCollapse: function() {
this.toggleProperty('isCollapsed');
|
Allow duration to complete before stopping sidebar recalculation
|
diff --git a/scraper.rb b/scraper.rb
index <HASH>..<HASH> 100644
--- a/scraper.rb
+++ b/scraper.rb
@@ -35,8 +35,8 @@ class Scraper
@doc.search(selector).each do |node|
send(target) << parse_result(node, delegate)
end
- elsif node = @doc.at(selector)
- send("#{target}=", parse_result(node, delegate))
+ else
+ send("#{target}=", parse_result(@doc.at(selector), delegate))
end
end
self
@@ -52,7 +52,7 @@ class Scraper
node.inner_text
else
node.to_s
- end
+ end unless node.nil?
end
private
@@ -195,6 +195,14 @@ if __FILE__ == $0
article.published.should == 'Sep 5'
article.link.should == 'http://mislav.uniqpath.com'
end
+
+ it "should override singular properties when re-parsing" do
+ blog = @blog.dup
+ blog.instance_variable_set('@doc', Nokogiri::HTML(''))
+ blog.parse
+ blog.title.should be_nil
+ blog.should have(2).articles
+ end
end
describe SpecialArticle do
|
`Scraper#parse` overrides any value that singular properties might have had
|
diff --git a/experiment/flakedetector.py b/experiment/flakedetector.py
index <HASH>..<HASH> 100755
--- a/experiment/flakedetector.py
+++ b/experiment/flakedetector.py
@@ -41,7 +41,7 @@ data = r.json()
jobs = {}
for job in data:
- if job['type'] != 'pr':
+ if job['type'] != 'presubmit':
continue
if job['repo'] != 'kubernetes/kubernetes':
continue
|
Fix pr->presubmit in flakedetector.py.
|
diff --git a/lib/electron-browser.js b/lib/electron-browser.js
index <HASH>..<HASH> 100644
--- a/lib/electron-browser.js
+++ b/lib/electron-browser.js
@@ -75,6 +75,8 @@ Electron.prototype.start = function () {
var split = Split()
split.on('data', function (line) {
+ if (line === '') return
+
var msg
try {
msg = JSON.parse(line)
|
fix electron on windows by ignoring empty output lines
|
diff --git a/electron/main.js b/electron/main.js
index <HASH>..<HASH> 100644
--- a/electron/main.js
+++ b/electron/main.js
@@ -32,8 +32,7 @@ function createWindow () {
win = new BrowserWindow({
width: 1280,
height: 800,
- titleBarStyle: 'hidden-inset',
- fullscreen: true
+ titleBarStyle: 'hidden-inset'
});
// Populate the application menu
|
Removed fullScreen option when creating browser window.
|
diff --git a/broqer/hub.py b/broqer/hub.py
index <HASH>..<HASH> 100644
--- a/broqer/hub.py
+++ b/broqer/hub.py
@@ -161,6 +161,8 @@ class Topic(Publisher, Subscriber):
return self._subject.emit(value, who=self)
def assign(self, subject):
+ assert isinstance(subject, (Publisher, Subscriber))
+
if self._subject is not None:
raise SubscriptionError('Topic is already assigned')
self._subject = subject
|
added assert for hub.assign
|
diff --git a/intranet/static/js/common.js b/intranet/static/js/common.js
index <HASH>..<HASH> 100644
--- a/intranet/static/js/common.js
+++ b/intranet/static/js/common.js
@@ -76,7 +76,7 @@ try {
udlr.input = "";
e.preventDefault();
return false;
- } else if (udlr.input === udlr.pattern.substr(0, udlr.input.length)) e.preventDefault();
+ }
else udlr.input = "";
}, this);
this.iphone.load(link);
|
If the konami code is being entered, don't preventDefault
|
diff --git a/lib/create-runner.js b/lib/create-runner.js
index <HASH>..<HASH> 100644
--- a/lib/create-runner.js
+++ b/lib/create-runner.js
@@ -104,8 +104,8 @@ export default function createRunner(options = {}, configFunc) {
const atomHome = temp.mkdirSync({ prefix: "atom-test-home-" });
if (options.testPackages.length > 0) {
let { testPackages } = options;
- if (typeof options.testPackages === "string") {
- testPackages = options.testPackage.split(/\s+/);
+ if (typeof testPackages === "string") {
+ testPackages = testPackages.split(/\s+/);
}
// eslint-disable-next-line no-sync
fs.makeTreeSync(path.join(atomHome, "packages"));
|
fix(testPackages): Fix `testPackages` as string
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -204,7 +204,7 @@
};
}
- return function (req, res, next) {
+ return function corsMiddleware(req, res, next) {
optionsCallback(req, function (err, options) {
if (err) {
next(err);
|
Name currently anonymous middleware function
- providing a name makes debugging & memory inspection much easier :)
|
diff --git a/vyper/ast/nodes.py b/vyper/ast/nodes.py
index <HASH>..<HASH> 100644
--- a/vyper/ast/nodes.py
+++ b/vyper/ast/nodes.py
@@ -802,10 +802,7 @@ class NameConstant(Constant):
class Name(VyperNode):
- __slots__ = (
- "id",
- "_type",
- )
+ __slots__ = ("id",)
class Expr(VyperNode):
diff --git a/vyper/parser/stmt.py b/vyper/parser/stmt.py
index <HASH>..<HASH> 100644
--- a/vyper/parser/stmt.py
+++ b/vyper/parser/stmt.py
@@ -234,7 +234,9 @@ class Stmt:
# attempt to use the type specified by type checking, fall back to `int128`
# this is a stopgap solution to allow uint256 - it will be properly solved
# once we refactor `vyper.parser`
- iter_typ = self.stmt.target.get("_type") or "int128"
+ iter_typ = "int128"
+ if "type" in self.stmt.target._metadata:
+ iter_typ = self.stmt.target._metadata["type"]._id
# Get arg0
arg0 = self.stmt.iter.args[0]
|
refactor: use metadata for iterator type
|
diff --git a/packages/cozy-jobs-cli/src/manifest.js b/packages/cozy-jobs-cli/src/manifest.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-jobs-cli/src/manifest.js
+++ b/packages/cozy-jobs-cli/src/manifest.js
@@ -21,5 +21,13 @@ module.exports = {
}
function getManifest (manifestPath) {
- return JSON.parse(fs.readFileSync(manifestPath))
+ let manifest
+ try {
+ manifest = JSON.parse(fs.readFileSync(manifestPath))
+ } catch (err) {
+ log('error', `Error while parsing ${manifestPath}`)
+ log('error', err.message)
+ process.exit()
+ }
+ return manifest
}
|
fix: handle manifest parsing errors
|
diff --git a/src/EntityRepository.php b/src/EntityRepository.php
index <HASH>..<HASH> 100644
--- a/src/EntityRepository.php
+++ b/src/EntityRepository.php
@@ -42,6 +42,10 @@ class EntityRepository extends Doctrine\ORM\EntityRepository
*/
public function build(Array $terms = NULL, $order = array(), $limit = NULL, $page = 1)
{
+ if (!$order) {
+ $order = array();
+ }
+
$builder = $this->createQueryBuilder(static::ALIAS_NAME);
if ($limit) {
|
Fix cases where NULL is passed as order
|
diff --git a/src/GeoDataCollection.js b/src/GeoDataCollection.js
index <HASH>..<HASH> 100644
--- a/src/GeoDataCollection.js
+++ b/src/GeoDataCollection.js
@@ -905,9 +905,10 @@ GeoDataCollection.prototype._viewMap = function(request, layer) {
url: url,
layers : encodeURIComponent(layerName),
parameters: {
- 'format':'image/png',
- 'transparent':'true',
- 'styles': ''
+ format: 'image/png',
+ transparent: true,
+ styles: '',
+ exceptions: 'application/vnd.ogc.se_xml'
},
proxy: proxy
});
@@ -928,7 +929,8 @@ GeoDataCollection.prototype._viewMap = function(request, layer) {
provider = new L.tileLayer.wms(server, {
layers: layerName,
format: 'image/png',
- transparent: true
+ transparent: true,
+ exceptions: 'application/vnd.ogc.se_xml'
});
}
provider.setOpacity(0.6);
|
Ask WMS servers to provide errors as XML.
Instead of returning a "no data" image.
|
diff --git a/framework/src/play-json/src/main/java/play/libs/Json.java b/framework/src/play-json/src/main/java/play/libs/Json.java
index <HASH>..<HASH> 100644
--- a/framework/src/play-json/src/main/java/play/libs/Json.java
+++ b/framework/src/play-json/src/main/java/play/libs/Json.java
@@ -160,7 +160,7 @@ public class Json {
* Inject the object mapper to use.
*
* This is intended to be used when Play starts up. By default, Play will inject its own object mapper here,
- * but this mapper can be overridden either by a custom plugin or from Global.onStart.
+ * but this mapper can be overridden either by a custom module.
*/
public static void setObjectMapper(ObjectMapper mapper) {
objectMapper = mapper;
|
Change comment to not include reference to GlobalSettings
|
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
@@ -867,15 +867,4 @@ public class PdfBoxGraphics2D extends Graphics2D {
return calcGfx.getFontRenderContext();
}
- // In case a single 2D graphic object has to be written (one or more times)
- // into a PDF document, this method isn't needed.
- // If, instead, several 2D graphic objects have to be written (one or more
- // times)
- // into a PDF document, the graphic state has to be saved after a graphic
- // object
- // has been written for the last time and a new graphic object has to be
- // created
- public void saveGraphicsState() throws IOException {
- contentStream.saveGraphicsState();
- }
}
|
Removed the dirty workaround method, this should really not be needed.
|
diff --git a/Parsedown.php b/Parsedown.php
index <HASH>..<HASH> 100755
--- a/Parsedown.php
+++ b/Parsedown.php
@@ -78,7 +78,7 @@ class Parsedown
# ~
$text = preg_replace('/\n\s*\n/', "\n\n", $text);
- $text = trim($text, "\n");
+ $text = trim($text, "\n ");
$lines = explode("\n", $text);
|
error when last line consists of 1-3 spaces
|
diff --git a/mutant/models/field.py b/mutant/models/field.py
index <HASH>..<HASH> 100644
--- a/mutant/models/field.py
+++ b/mutant/models/field.py
@@ -425,7 +425,7 @@ class FieldDefinitionChoice(OrderableModel):
objects = FieldDefinitionChoiceManager()
- class Meta:
+ class Meta(OrderableModel.Meta):
app_label = 'mutant'
verbose_name = _(u'field definition choice')
verbose_name_plural = _(u'field definition choices')
|
Added an ordering to `FieldDefinition`.
|
diff --git a/mysql/toolkit/components/manipulate.py b/mysql/toolkit/components/manipulate.py
index <HASH>..<HASH> 100644
--- a/mysql/toolkit/components/manipulate.py
+++ b/mysql/toolkit/components/manipulate.py
@@ -91,7 +91,7 @@ class Select:
@staticmethod
def _select_limit_statement(table, cols='*', offset=0, limit=MAX_ROWS_PER_QUERY):
"""Concatenate a select with offset and limit statement."""
- return 'SELECT {0} FROM {1} LIMIT {2}, {3}'.format(cols, wrap(table), offset, limit)
+ return 'SELECT {0} FROM {1} LIMIT {2}, {3}'.format(join_cols(cols), wrap(table), offset, limit)
class Insert:
|
Fixed issue with columns in _select_limit_statement method
|
diff --git a/rb/lib/selenium/webdriver/common/service.rb b/rb/lib/selenium/webdriver/common/service.rb
index <HASH>..<HASH> 100644
--- a/rb/lib/selenium/webdriver/common/service.rb
+++ b/rb/lib/selenium/webdriver/common/service.rb
@@ -92,7 +92,12 @@ module Selenium
def build_process(*command)
WebDriver.logger.debug("Executing Process #{command}")
@process = ChildProcess.build(*command)
- @process.io.stdout = @process.io.stderr = WebDriver.logger.io if WebDriver.logger.debug?
+ if WebDriver.logger.debug?
+ @process.io.stdout = @process.io.stderr = WebDriver.logger.io
+ elsif Platform.jruby?
+ # Apparently we need to read the output of drivers on JRuby.
+ @process.io.stdout = @process.io.stderr = File.new(Platform.null_device, 'w')
+ end
@process
end
@@ -117,6 +122,7 @@ module Selenium
def stop_process
return if process_exited?
@process.stop STOP_TIMEOUT
+ @process.io.stdout.close if Platform.jruby? && !WebDriver.logger.debug?
end
def stop_server
|
Read stdout/stderr of child process on JRuby
Closes #<I>
|
diff --git a/src/qtism/runtime/rendering/markup/xhtml/ChoiceInteractionRenderer.php b/src/qtism/runtime/rendering/markup/xhtml/ChoiceInteractionRenderer.php
index <HASH>..<HASH> 100644
--- a/src/qtism/runtime/rendering/markup/xhtml/ChoiceInteractionRenderer.php
+++ b/src/qtism/runtime/rendering/markup/xhtml/ChoiceInteractionRenderer.php
@@ -65,6 +65,7 @@ class ChoiceInteractionRenderer extends InteractionRenderer
parent::appendAttributes($fragment, $component, $base);
$this->additionalClass('qti-blockInteraction');
$this->additionalClass('qti-choiceInteraction');
+ $this->additionalUserClass(($component->getOrientation() === Orientation::VERTICAL) ? 'qti-vertical' : 'qti-horizontal');
$fragment->firstChild->setAttribute('data-shuffle', ($component->mustShuffle() === true) ? 'true' : 'false');
$fragment->firstChild->setAttribute('data-max-choices', $component->getMaxChoices());
|
missing additional user CSS class 'qti-vertical'/'qti-horinzontal'.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -42,8 +42,7 @@ function indentOf(line, opts) {
return count;
}
-// Precondition: lines.length > 0
-function getPadLength(lines, opts) {
+function commonIndentFromLines(lines, opts) {
let pad = -1;
lines.forEach(l => {
if (l.length === 0) {
@@ -96,7 +95,7 @@ function heredoc(strings, ...args) {
}
const newline = this.outputNewline !== undefined ? this.outputNewline : this.inputNewline;
- const pad = getPadLength(lines, this);
+ const pad = commonIndentFromLines(lines, this);
if (pad <= 0) {
return lines.join(newline);
}
@@ -119,6 +118,7 @@ function heredoc(strings, ...args) {
const exported = heredoc.bind(DEFAULT_OPTIONS);
exported.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
+exported.commonIndentFromLines = commonIndentFromLines;
if (typeof module !== 'undefined') {
exported.default = exported;
|
rename getPadLength to commonIndentFromLines and export it
|
diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
+++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
@@ -182,10 +182,7 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer
$attribute = $this->nameConverter->denormalize($attribute);
}
- $allowed = $allowedAttributes === false || in_array($attribute, $allowedAttributes);
- $ignored = in_array($attribute, $this->ignoredAttributes);
-
- if (!$allowed || $ignored) {
+ if (($allowedAttributes !== false && !in_array($attribute, $allowedAttributes)) || !$this->isAllowedAttribute($class, $attribute, $format, $context)) {
continue;
}
|
[Serializer] AbstractObjectNormalizer: be sure that isAllowedAttribute is called
|
diff --git a/tests/ObjectManager/ObjectManagerAwareTraitTest.php b/tests/ObjectManager/ObjectManagerAwareTraitTest.php
index <HASH>..<HASH> 100644
--- a/tests/ObjectManager/ObjectManagerAwareTraitTest.php
+++ b/tests/ObjectManager/ObjectManagerAwareTraitTest.php
@@ -5,10 +5,19 @@
namespace Thorr\Persistence\Doctrine\Test\ObjectManager;
+use Doctrine\Common\Persistence\ObjectManager;
use PHPUnit_Framework_TestCase as TestCase;
+use Thorr\Persistence\Doctrine\ObjectManager\ObjectManagerAwareTrait;
-class ObjectManagerAwareTraitTest extends
- TestCase
+class ObjectManagerAwareTraitTest extends TestCase
{
+ public function testAccessors()
+ {
+ $sut = $this->getMockForTrait(ObjectManagerAwareTrait::class);
+ $objectManager = $this->getMock(ObjectManager::class);
+ $sut->setObjectManager($objectManager);
+
+ $this->assertSame($objectManager, $sut->getObjectManager());
+ }
}
|
test trait for the sake of more coverage
|
diff --git a/traffic/core/traffic.py b/traffic/core/traffic.py
index <HASH>..<HASH> 100644
--- a/traffic/core/traffic.py
+++ b/traffic/core/traffic.py
@@ -916,7 +916,7 @@ class Traffic(HBoxMixin, GeographyMixin):
>>> t_dbscan = traffic.clustering(
... nb_samples=15,
... projection=EuroPP(),
- ... method=DBSCAN(eps=1.5, min_samples=10),
+ ... clustering=DBSCAN(eps=1.5, min_samples=10),
... transform=StandardScaler(),
... ).fit_predict()
>>> t_dbscan.groupby(["cluster"]).agg({"flight_id": "nunique"})
|
Wrong method signature in clustering example (#<I>)
* Wrong method signature in clustering example
* Update traffic.py
|
diff --git a/src/LiveProperty.php b/src/LiveProperty.php
index <HASH>..<HASH> 100644
--- a/src/LiveProperty.php
+++ b/src/LiveProperty.php
@@ -23,7 +23,8 @@ trait LiveProperty {
return $this->$methodName();
}
- if(isset(self::PROPERTY_ATTRIBUTE_MAP[$name])) {
+ if(defined("static::PROPERTY_ATTRIBUTE_MAP")
+ && isset(self::PROPERTY_ATTRIBUTE_MAP[$name])) {
$attribute = self::PROPERTY_ATTRIBUTE_MAP[$name];
if($attribute === true) {
return $this->hasAttribute($name);
|
Check property attribute map (#<I>)
* Update fixes for CssXPath
* Use get/set attribute for value elements
* Check for property map, allowing for non-html documents
|
diff --git a/stream-listener.js b/stream-listener.js
index <HASH>..<HASH> 100644
--- a/stream-listener.js
+++ b/stream-listener.js
@@ -18,7 +18,7 @@ var StreamListener = function() {
Events.EventEmitter.call(this);
this.subscriptions = {};
- this.resetStream();
+ this.stream = null;
}
Util.inherits(StreamListener, Events.EventEmitter);
@@ -76,7 +76,10 @@ StreamListener.prototype.resetStream = function() {
this.stream.on('tweet', function(tweet) {
this.onTweet(tweet);
});
- oldStream.stop();
+
+ if(oldStream) {
+ oldStream.stop();
+ }
}
};
|
Watch out when stream == null
|
diff --git a/src/Object.php b/src/Object.php
index <HASH>..<HASH> 100644
--- a/src/Object.php
+++ b/src/Object.php
@@ -44,6 +44,11 @@ abstract class Object implements ObjectInterface
protected $auto_increment = 'id';
/**
+ * @var string[]
+ */
+ protected $order_by = ['id'];
+
+ /**
* Array of field names
*
* @var array
|
Order by always needs to be set (and it is by ID by default)
|
diff --git a/lib/unidom/visitor/version.rb b/lib/unidom/visitor/version.rb
index <HASH>..<HASH> 100644
--- a/lib/unidom/visitor/version.rb
+++ b/lib/unidom/visitor/version.rb
@@ -1,5 +1,5 @@
module Unidom
module Visitor
- VERSION = '1.10'.freeze
+ VERSION = '1.11'.freeze
end
end
|
1, Migrate the version from <I> to <I>.
|
diff --git a/pymatgen/analysis/structure_analyzer.py b/pymatgen/analysis/structure_analyzer.py
index <HASH>..<HASH> 100644
--- a/pymatgen/analysis/structure_analyzer.py
+++ b/pymatgen/analysis/structure_analyzer.py
@@ -28,7 +28,7 @@ from pymatgen import PeriodicSite
from pymatgen import Element, Specie, Composition
from pymatgen.util.num_utils import abs_cap
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
-
+from pymatgen.core.surface import Slab
class VoronoiCoordFinder(object):
"""
@@ -78,8 +78,9 @@ class VoronoiCoordFinder(object):
for nn, vind in voro.ridge_dict.items():
if 0 in nn:
if -1 in vind:
- # TODO: This is not acceptable
- continue
+ # Ignore infinite vertex if structure is a slab
+ if isinstance(self._structure, Slab):
+ continue
raise RuntimeError("This structure is pathological,"
" infinite vertex in the voronoi "
"construction")
|
cleanup structure_analyzer to allow infinite vertices in voronoi construction for slabs
|
diff --git a/can/interfaces/pcan.py b/can/interfaces/pcan.py
index <HASH>..<HASH> 100644
--- a/can/interfaces/pcan.py
+++ b/can/interfaces/pcan.py
@@ -117,6 +117,16 @@ class PcanBus(BusABC):
return complete_text
+ def StatusOk(self):
+ status = self.m_objPCANBasic.GetStatus(self.channel_info)
+
+ return status == PCAN_ERROR_OK
+
+ def Reset(self):
+ status = self.m_objPCANBasic.Reset(self.channel_info)
+
+ return status == PCAN_ERROR_OK
+
def recv(self, timeout=None):
start_time = timeout_clock()
|
Add PcanBus.StatusOk() and .Reset()
Would be nice to implement functions like these for all interfaces but
this will do for now.
|
diff --git a/eng/common/docgeneration/templates/matthews/styles/main.js b/eng/common/docgeneration/templates/matthews/styles/main.js
index <HASH>..<HASH> 100644
--- a/eng/common/docgeneration/templates/matthews/styles/main.js
+++ b/eng/common/docgeneration/templates/matthews/styles/main.js
@@ -76,7 +76,7 @@ $(function () {
// Add text to empty links
$("p > a").each(function () {
var link = $(this).attr('href')
- if ($(this).text() === "") {
+ if ($(this).text() === "" && $(this).children().attr("src") === "") {
$(this).html(link)
}
});
|
Fixed the bug of replacing img src with href text (#<I>)
|
diff --git a/speclev.py b/speclev.py
index <HASH>..<HASH> 100644
--- a/speclev.py
+++ b/speclev.py
@@ -104,7 +104,6 @@ def speclev(x, nfft=512, fs=1, w=None, nov=None):
import numpy
import scipy.signal
- buffer(x, n, p=0, opt=None)
if w == None:
w = nfft
@@ -115,8 +114,8 @@ def speclev(x, nfft=512, fs=1, w=None, nov=None):
w = hanning(w)
P = numpy.zeros((nfft / 2, x.shape[1]))
-=`=jedi=0, =`= (*_**_*) =`=jedi=`=
- for k in range(len(x.shape[1]):
+
+ for k in range(len(x.shape[1])):
X, z = buffer(x[:, k], len(w), nov, 'nodelay', z_out=True)
X = scipy.signal.detrend(X) * w
|
fixed small errors in speclev.py
|
diff --git a/Kwf/Controller/Action/Component/PagesController.php b/Kwf/Controller/Action/Component/PagesController.php
index <HASH>..<HASH> 100644
--- a/Kwf/Controller/Action/Component/PagesController.php
+++ b/Kwf/Controller/Action/Component/PagesController.php
@@ -258,7 +258,7 @@ class Kwf_Controller_Action_Component_PagesController extends Kwf_Controller_Act
$component = $root->getComponentById($oldRow->id, array('ignoreVisible' => true));
while ($component) {
if (Kwc_Abstract::getFlag($component->componentClass, 'hasHome')) {
- if ($component == $homeComponent) {
+ if ($component === $homeComponent) {
$oldId = $oldRow->id;
$oldVisible = $oldRow->visible;
if (!$this->_hasPermissions($oldRow, 'makeHome')) {
|
Check if components are equal with object compare
Else it's running into infinite loop
|
diff --git a/lib/shopify_api.rb b/lib/shopify_api.rb
index <HASH>..<HASH> 100644
--- a/lib/shopify_api.rb
+++ b/lib/shopify_api.rb
@@ -98,7 +98,7 @@ module ShopifyAPI
self.url, self.token = url, token
if params && params[:signature]
- unless self.class.validate_signature(params) && params[:timestamp] > 24.hours.ago.utc.to_i
+ unless self.class.validate_signature(params) && params[:timestamp].to_i > 24.hours.ago.utc.to_i
raise "Invalid Signature: Possible malicious login"
end
end
|
Ensure that we are comparing numbers, not strings.
|
diff --git a/quark/test/test_emit.py b/quark/test/test_emit.py
index <HASH>..<HASH> 100644
--- a/quark/test/test_emit.py
+++ b/quark/test/test_emit.py
@@ -53,6 +53,8 @@ def test_emit(path):
comp.emit(backend)
extbase = os.path.join(base, backend.ext)
if not os.path.exists(extbase):
+ if Backend == JavaScript:
+ continue
os.makedirs(extbase)
srcs = []
@@ -117,7 +119,7 @@ def build_js(comp, base, srcs):
except IOError:
expected = None
convoluted_way_to_get_test_name = os.path.basename(os.path.dirname(base))
- script = convoluted_way_to_get_test_name + ".js.cmp"
+ script = convoluted_way_to_get_test_name + ".js"
actual = subprocess.check_output(["node", "-e", "m = require('./%s'); m.main();" % script], cwd=base)
if expected != actual:
open(out + ".cmp", "write").write(actual)
|
Add test-passing hack for JavaScript known failures
|
diff --git a/lib/NormalModuleFactory.js b/lib/NormalModuleFactory.js
index <HASH>..<HASH> 100644
--- a/lib/NormalModuleFactory.js
+++ b/lib/NormalModuleFactory.js
@@ -217,7 +217,7 @@ NormalModuleFactory.prototype.resolveRequestArray = function resolveRequestArray
return resolver.resolve(contextInfo, context, item.loader + "-loader", function(err2) {
if(!err2) {
err.message = err.message + "\n" +
- "BREAKING CHANGE: It's no longer allowed to omit the '-loader' prefix when using loaders.\n" +
+ "BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.\n" +
" You need to specify '" + item.loader + "-loader' instead of '" + item.loader + "'.";
}
callback(err);
|
Update `-loader`error message
`-loader` is a suffix, not a prefix. A prefix goes at the beginning of a word, and a suffix goes at the end.
|
diff --git a/src/angular-zeroclipboard.js b/src/angular-zeroclipboard.js
index <HASH>..<HASH> 100644
--- a/src/angular-zeroclipboard.js
+++ b/src/angular-zeroclipboard.js
@@ -41,9 +41,12 @@ angular.module('zeroclipboard', [])
text: '@zeroclipText'
},
link: function(scope, element, attrs) {
+
+ var btn = element[0];
+ var _completeHnd;
+
// config
ZeroClipboard.config(zeroclipConfig);
- var btn = element[0];
if (angular.isFunction(ZeroClipboard)) {
scope.client = new ZeroClipboard(btn);
|
fixed "_completeHnd is undefined" issue
|
diff --git a/test/Model.js b/test/Model.js
index <HASH>..<HASH> 100644
--- a/test/Model.js
+++ b/test/Model.js
@@ -17,7 +17,6 @@ describe("Model", () => {
describe("Initalization", () => {
const options = [
- // TODO: Mongoose supports using the `new` keyword when creating a model with no error
{"name": "Using new keyword", "func": (...args) => new dynamoose.model(...args)},
{"name": "Without new keyword", "func": (...args) => dynamoose.model(...args)}
];
|
Removing old todo that was already fixed
|
diff --git a/ryu/app/rest_firewall.py b/ryu/app/rest_firewall.py
index <HASH>..<HASH> 100644
--- a/ryu/app/rest_firewall.py
+++ b/ryu/app/rest_firewall.py
@@ -870,7 +870,7 @@ class Firewall(object):
rule = {REST_RULE_ID: ruleid}
rule.update({REST_PRIORITY: flow[REST_PRIORITY]})
rule.update(Match.to_rest(flow))
- rule.update(Action.to_rest(flow))
+ rule.update(Action.to_rest(self.dp, flow))
return rule
@@ -988,9 +988,10 @@ class Action(object):
return action
@staticmethod
- def to_rest(openflow):
+ def to_rest(dp, openflow):
if REST_ACTION in openflow:
- if len(openflow[REST_ACTION]) > 0:
+ action_allow = 'OUTPUT:%d' % dp.ofproto.OFPP_NORMAL
+ if openflow[REST_ACTION] == [action_allow]:
action = {REST_ACTION: REST_ACTION_ALLOW}
else:
action = {REST_ACTION: REST_ACTION_DENY}
|
firewall: correct acquisition result of DENY rule
When blocked packet logging is enabled,
GET rest command shows DENY rules as 'ALLOW' before.
This patch improves it.
|
diff --git a/nptdms/writer.py b/nptdms/writer.py
index <HASH>..<HASH> 100644
--- a/nptdms/writer.py
+++ b/nptdms/writer.py
@@ -6,7 +6,7 @@ try:
except ImportError:
OrderedDict = dict
from datetime import datetime
-from io import BytesIO
+from io import UnsupportedOperation
import logging
import numpy as np
from nptdms.common import toc_properties
@@ -276,10 +276,10 @@ def _map_property_value(value):
def to_file(file, array):
- """Wrapper around ndarray.tofile to support BytesIO
- """
- if isinstance(file, BytesIO):
+ """Wrapper around ndarray.tofile to support any file-like object"""
+
+ try:
+ array.tofile(file)
+ except (TypeError, UnsupportedOperation):
# tostring actually returns bytes
file.write(array.tostring())
- else:
- array.tofile(file)
|
added write support for file-like objects
|
diff --git a/lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb b/lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb
+++ b/lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb
@@ -26,7 +26,7 @@ module Ddr
private
def command(path)
- `clamdscan --no-summary #{path}`.strip
+ `clamdscan --no-summary "#{path}"`.strip
end
end
|
Surrounds file path with quotes in clamdscan command.
Fixes #<I>
This is a quick fix! The long term solution should escape
special shell characters also.
|
diff --git a/test/nightwatch.conf.js b/test/nightwatch.conf.js
index <HASH>..<HASH> 100644
--- a/test/nightwatch.conf.js
+++ b/test/nightwatch.conf.js
@@ -25,25 +25,25 @@ module.exports = {
test_settings: {
default: {
- // launch_url: 'http://localhost',
- // selenium_port: 4444,
- // selenium_host: 'localhost',
- // silent: true,
- // screenshots: {
- // enabled: true,
- // on_failure: true,
- // on_error: false,
- // path: 'screenshots/default'
- // },
- // desiredCapabilities: {
- // browserName: 'phantomjs',
- // javascriptEnabled: true,
- // acceptSslCerts: true,
- // 'phantomjs.binary.path' : phantomjs.path
- // }
- // },
- //
- // chrome: {
+ launch_url: 'http://localhost',
+ selenium_port: 4444,
+ selenium_host: 'localhost',
+ silent: true,
+ screenshots: {
+ enabled: true,
+ on_failure: true,
+ on_error: false,
+ path: 'screenshots/default'
+ },
+ desiredCapabilities: {
+ browserName: 'phantomjs',
+ javascriptEnabled: true,
+ acceptSslCerts: true,
+ 'phantomjs.binary.path' : phantomjs.path
+ }
+ },
+
+ chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
|
Run tests on phantomjs
|
diff --git a/osbs/cli/main.py b/osbs/cli/main.py
index <HASH>..<HASH> 100644
--- a/osbs/cli/main.py
+++ b/osbs/cli/main.py
@@ -6,7 +6,7 @@ This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, absolute_import, unicode_literals
-import collections
+import collections.abc
import json
import logging
@@ -35,7 +35,7 @@ def _print_pipeline_run_logs(pipeline_run, user_warnings_store):
pipeline_run_name = pipeline_run.pipeline_run_name
pipeline_run_logs = pipeline_run.get_logs(follow=True, wait=True)
- if not isinstance(pipeline_run_logs, collections.Iterable):
+ if not isinstance(pipeline_run_logs, collections.abc.Iterable):
logger.error("'%s' is not iterable; can't display logs", pipeline_run_name)
return
print(f"Pipeline run created ({pipeline_run_name}), watching logs (feel free to interrupt)")
|
Fix deprecated usage of collections module
Fixing:
DeprecationWarning: Using or importing the ABCs from 'collections'
instead of from 'collections.abc' is deprecated since Python <I>,
and in <I> it will stop working
|
diff --git a/Model/Behavior/BreadCrumbBehavior.php b/Model/Behavior/BreadCrumbBehavior.php
index <HASH>..<HASH> 100644
--- a/Model/Behavior/BreadCrumbBehavior.php
+++ b/Model/Behavior/BreadCrumbBehavior.php
@@ -5,7 +5,7 @@
*
* CakeTheme: Set theme for application.
* @copyright Copyright 2018, Andrey Klimov.
- * @package plugin.Controller.Component
+ * @package plugin.Model.Behavior
*/
App::uses('ModelBehavior', 'Model');
diff --git a/Model/Behavior/MoveBehavior.php b/Model/Behavior/MoveBehavior.php
index <HASH>..<HASH> 100644
--- a/Model/Behavior/MoveBehavior.php
+++ b/Model/Behavior/MoveBehavior.php
@@ -5,7 +5,7 @@
*
* CakeTheme: Set theme for application.
* @copyright Copyright 2016, Andrey Klimov.
- * @package plugin.Controller.Component
+ * @package plugin.Model.Behavior
*/
App::uses('ModelBehavior', 'Model');
|
Fix tag @package in doc block of Behaviors
|
diff --git a/src/File.php b/src/File.php
index <HASH>..<HASH> 100644
--- a/src/File.php
+++ b/src/File.php
@@ -63,7 +63,7 @@ class File extends Object
}
$id = new \MongoDB\BSON\ObjectID;
- $this->_id = $id;
+ $this->__data['_id'] = $id;
$this->__filter = array('_id' => $id);
// Append uploadDate if not provided
|
Avoid to rewrite _id (Mongo 2.x issue only)
|
diff --git a/lib/nmap/service.rb b/lib/nmap/service.rb
index <HASH>..<HASH> 100644
--- a/lib/nmap/service.rb
+++ b/lib/nmap/service.rb
@@ -136,6 +136,8 @@ module Nmap
# @return [String]
# The fingerprint
#
+ # @since 0.7.0
+ #
def fingerprint
@fingerprint ||= @node.get_attribute('servicefp')
end
|
Service#fingerprint was added in <I>.
|
diff --git a/ciscosparkapi/exceptions.py b/ciscosparkapi/exceptions.py
index <HASH>..<HASH> 100644
--- a/ciscosparkapi/exceptions.py
+++ b/ciscosparkapi/exceptions.py
@@ -145,7 +145,7 @@ class SparkRateLimitError(SparkApiError):
super(SparkRateLimitError, self).__init__(response)
# Extended exception data attributes
- self.retry_after = response.headers.get('Retry-After', 200)
+ self.retry_after = int(response.headers.get('Retry-After', 200))
"""The `Retry-After` time period (in seconds) provided by Cisco Spark.
Defaults to 200 seconds if the response `Retry-After` header isn't
|
Ensure that the SparkRateLimitError.retry_after attribute is always an int
Fix for issue #<I>. The retry-after header (when provided) is a string and should be cast to an integer for obvious reasons. 😄
|
diff --git a/lib/echonest-ruby-api/artist.rb b/lib/echonest-ruby-api/artist.rb
index <HASH>..<HASH> 100644
--- a/lib/echonest-ruby-api/artist.rb
+++ b/lib/echonest-ruby-api/artist.rb
@@ -19,20 +19,18 @@ module Echonest
def biographies(options = { results: 1 })
response = get_response(results: options[:results], name: @name)
- biographies = []
- response[:biographies].each do |b|
- biographies << Biography.new(text: b[:text], site: b[:site], url: b[:url])
+
+ response[:biographies].collect do |b|
+ Biography.new(text: b[:text], site: b[:site], url: b[:url])
end
- biographies
end
def blogs(options = { results: 1 })
response = get_response(results: options[:results], name: @name)
- blogs = []
- response[:blogs].each do |b|
- blogs << Blog.new(name: b[:name], site: b[:site], url: b[:url])
+
+ response[:blogs].collect do |b|
+ Blog.new(name: b[:name], site: b[:site], url: b[:url])
end
- blogs
end
def familiarity
|
Refactor collection of blogs and biographies
|
diff --git a/state/state.go b/state/state.go
index <HASH>..<HASH> 100644
--- a/state/state.go
+++ b/state/state.go
@@ -1322,16 +1322,18 @@ func (st *State) AddService(args AddServiceArgs) (service *Service, err error) {
}
ops = append(ops, peerOps...)
- // Collect pending resource resolution operations.
- resources, err := st.Resources()
- if err != nil {
- return nil, errors.Trace(err)
- }
- resOps, err := resources.NewResolvePendingResourcesOps(args.Name, args.Resources)
- if err != nil {
- return nil, errors.Trace(err)
+ if len(args.Resources) > 0 {
+ // Collect pending resource resolution operations.
+ resources, err := st.Resources()
+ if err != nil {
+ return nil, errors.Trace(err)
+ }
+ resOps, err := resources.NewResolvePendingResourcesOps(args.Name, args.Resources)
+ if err != nil {
+ return nil, errors.Trace(err)
+ }
+ ops = append(ops, resOps...)
}
- ops = append(ops, resOps...)
// Collect unit-adding operations.
for x := 0; x < args.NumUnits; x++ {
|
Do not handle resources if none were requested.
|
diff --git a/ckanext/oauth2/oauth2.py b/ckanext/oauth2/oauth2.py
index <HASH>..<HASH> 100644
--- a/ckanext/oauth2/oauth2.py
+++ b/ckanext/oauth2/oauth2.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid
+# Copyright (c) 2018 Future Internet Consulting and Development Solutions S.L.
# This file is part of OAuth2 CKAN Extension.
@@ -114,9 +115,8 @@ class OAuth2Helper(object):
return token
def identify(self, token):
- oauth = OAuth2Session(self.client_id, token=token)
try:
- profile_response = oauth.get(self.profile_api_url + '?access_token=%s' % token['access_token'], verify=self.verify_https)
+ profile_response = requests.get(self.profile_api_url + '?access_token=%s' % token['access_token'], verify=self.verify_https)
except requests.exceptions.SSLError as e:
# TODO search a better way to detect invalid certificates
if "verify failed" in six.text_type(e):
|
Fix double authentication mechanism error returned by KeyRock 7.x
|
diff --git a/Classes/Report/SolrConfigurationStatus.php b/Classes/Report/SolrConfigurationStatus.php
index <HASH>..<HASH> 100644
--- a/Classes/Report/SolrConfigurationStatus.php
+++ b/Classes/Report/SolrConfigurationStatus.php
@@ -28,6 +28,7 @@ use ApacheSolrForTypo3\Solr\FrontendEnvironment;
use ApacheSolrForTypo3\Solr\System\Configuration\ExtensionConfiguration;
use ApacheSolrForTypo3\Solr\System\Records\Pages\PagesRepository;
use TYPO3\CMS\Core\Error\Http\ServiceUnavailableException;
+use TYPO3\CMS\Core\Exception\SiteNotFoundException;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Reports\Status;
@@ -160,6 +161,12 @@ class SolrConfigurationStatus extends AbstractSolrStatus
$rootPagesWithIndexingOff[] = $rootPage;
continue;
}
+ } catch (SiteNotFoundException $sue) {
+ if ($sue->getCode() == 1521716622) {
+ // No site found, continue with next site
+ $rootPagesWithIndexingOff[] = $rootPage;
+ continue;
+ }
}
}
|
[BUGFIX] Prevent SiteNotFoundException in reports module
Fixes: #<I>
|
diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb
index <HASH>..<HASH> 100644
--- a/actionpack/test/dispatch/mapper_test.rb
+++ b/actionpack/test/dispatch/mapper_test.rb
@@ -38,7 +38,7 @@ module ActionDispatch
def test_mapping_requirements
options = { :controller => 'foo', :action => 'bar', :via => :get }
- m = Mapper::Mapping.new({}, '/store/:name(*rest)', options)
+ m = Mapper::Mapping.build({}, '/store/:name(*rest)', options)
_, _, requirements, _ = m.to_route
assert_equal(/.+?/, requirements[:rest])
end
|
use the factory method to construct the mapping
|
diff --git a/restygwt/src/main/java/org/fusesource/restygwt/client/AbstractJsonEncoderDecoder.java b/restygwt/src/main/java/org/fusesource/restygwt/client/AbstractJsonEncoderDecoder.java
index <HASH>..<HASH> 100644
--- a/restygwt/src/main/java/org/fusesource/restygwt/client/AbstractJsonEncoderDecoder.java
+++ b/restygwt/src/main/java/org/fusesource/restygwt/client/AbstractJsonEncoderDecoder.java
@@ -382,7 +382,7 @@ abstract public class AbstractJsonEncoderDecoder<T> implements JsonEncoderDecode
JSONString string = value.isString();
if (string != null) {
try {
- return new BigDecimal(value.toString());
+ return new BigDecimal(string.stringValue());
} catch (NumberFormatException e) {
}
}
|
Fix to my previous BigDecimal deserialization fix
Previous fix didn't work as expected - instead of JSONString.stringValue I used toString which escapes string and in the end BigDecimal was not able to properly read a number.
|
diff --git a/sonar-core/src/test/java/org/sonar/core/source/DecorationDataHolderTest.java b/sonar-core/src/test/java/org/sonar/core/source/DecorationDataHolderTest.java
index <HASH>..<HASH> 100644
--- a/sonar-core/src/test/java/org/sonar/core/source/DecorationDataHolderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/source/DecorationDataHolderTest.java
@@ -51,7 +51,7 @@ public class DecorationDataHolderTest {
assertThat(lowerBoundsDefinitions.containsEntry(0, "cppd"));
assertThat(lowerBoundsDefinitions.containsEntry(54, "a"));
assertThat(lowerBoundsDefinitions.containsEntry(69, "k"));
- assertThat(lowerBoundsDefinitions.containsEntry(80, "symbol-80"));
+ assertThat(lowerBoundsDefinitions.containsEntry(80, "symbol-ππ80"));
assertThat(lowerBoundsDefinitions.containsEntry(90, "symbol-90"));
assertThat(lowerBoundsDefinitions.containsEntry(106, "cppd"));
assertThat(lowerBoundsDefinitions.containsEntry(114, "k"));
|
SONAR-<I> Changed symbols css class separator from period to hyphen
|
diff --git a/website/siteConfig.js b/website/siteConfig.js
index <HASH>..<HASH> 100644
--- a/website/siteConfig.js
+++ b/website/siteConfig.js
@@ -3,8 +3,8 @@
module.exports = {
title: "Serviceberry",
tagline: "A simple HTTP service framework for Node.js",
- url: "https://serviceberry.js.org",
- baseUrl: "/",
+ url: "https://bob-gray.github.io",
+ baseUrl: "/serviceberry/",
headerLinks: [{
label: "Guides",
doc: "getting-started"
|
fixing url and baseUrl in website/siteConfig.js
|
diff --git a/master/buildbot/util/service.py b/master/buildbot/util/service.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/util/service.py
+++ b/master/buildbot/util/service.py
@@ -309,7 +309,13 @@ class ClusteredBuildbotService(BuildbotService):
# this service is half-active, and noted as such in the db..
log.err(_why='WARNING: ClusteredService(%s) is only partially active' % self.name)
finally:
- yield self._stopActivityPolling()
+ # cannot wait for its deactivation
+ # with yield self._stopActivityPolling
+ # as we're currently executing the
+ # _activityPollCall callback
+ # we just call it without waiting its stop
+ # (that may open race conditions)
+ self._stopActivityPolling()
self._startServiceDeferred.callback(None)
except Exception:
# don't pass exceptions into LoopingCall, which can cause it to fail
|
service: clusteredService activityPoll does not wait for its stop
the previous version had a bug as the callback (_activityPoll)
of the object
_activityPollCall = task.LoopingCall(_activityPoll)
waited the activityPollCall to stop during its execution
thus creating a deadlock.
This commit just say the activityPollCall to stop
during the method, and exits without waiting for its end.
|
diff --git a/lib/her/model/attributes.rb b/lib/her/model/attributes.rb
index <HASH>..<HASH> 100644
--- a/lib/her/model/attributes.rb
+++ b/lib/her/model/attributes.rb
@@ -162,7 +162,7 @@ module Her
attributes = klass.parse(record).merge(_metadata: parsed_data[:metadata],
_errors: parsed_data[:errors])
klass.new(attributes).tap do |record|
- record.instance_variable_set(:@changed_attributes, {})
+ record.send :clear_changes_information
record.run_callbacks :find
end
end
|
use clear_changes_information on activemodel
|
diff --git a/src/geshi/powershell.php b/src/geshi/powershell.php
index <HASH>..<HASH> 100644
--- a/src/geshi/powershell.php
+++ b/src/geshi/powershell.php
@@ -47,7 +47,7 @@
************************************************************************************/
$language_data = array (
- 'LANG_NAME' => 'posh',
+ 'LANG_NAME' => 'PowerShell',
'COMMENT_SINGLE' => array(1 => '#'),
'COMMENT_MULTI' => array(),
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
|
fix: Internally renameed language powershell from 'posh' to 'PowerShell'
|
diff --git a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php
index <HASH>..<HASH> 100644
--- a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php
+++ b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php
@@ -31,12 +31,12 @@ use Webmozart\Assert\Assert;
class Kernel extends HttpKernel
{
- public const VERSION = '1.2.14';
- public const VERSION_ID = '10214';
+ public const VERSION = '1.2.15-DEV';
+ public const VERSION_ID = '10215';
public const MAJOR_VERSION = '1';
public const MINOR_VERSION = '2';
- public const RELEASE_VERSION = '14';
- public const EXTRA_VERSION = '';
+ public const RELEASE_VERSION = '15';
+ public const EXTRA_VERSION = 'DEV';
/**
* {@inheritdoc}
|
Change application's version to <I>-DEV
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ tests_requires = [
install_requires = [
'Celery>=3.1.15,<3.2',
'croniter>=0.3.4,<0.3.6',
- 'Django>=1.6.5,<1.7',
+ 'Django>=1.7.1,<1.8',
'django-auth-ldap==1.2.0',
'django-filter==0.7',
'django-fsm==2.2.0',
|
Bump Django version to <I>
NC-<I>
|
diff --git a/ui/src/admin/components/chronograf/Organization.js b/ui/src/admin/components/chronograf/Organization.js
index <HASH>..<HASH> 100644
--- a/ui/src/admin/components/chronograf/Organization.js
+++ b/ui/src/admin/components/chronograf/Organization.js
@@ -88,6 +88,7 @@ class Organization extends Component {
item={organization}
onCancel={this.handleDismissDeleteConfirmation}
onConfirm={this.handleDeleteOrg}
+ onClickOutside={this.handleDismissDeleteConfirmation}
/>
: <button
className="btn btn-sm btn-default btn-square"
|
Dismiss organization row delete/confirm buttons on click outside
|
diff --git a/testing/models/test_epic.py b/testing/models/test_epic.py
index <HASH>..<HASH> 100644
--- a/testing/models/test_epic.py
+++ b/testing/models/test_epic.py
@@ -6,6 +6,7 @@ except ImportError:
import mock
from k2catalogue import models
+from k2catalogue import detail_object
@pytest.fixture
@@ -22,3 +23,11 @@ def test_simbad_query(epic):
with mock.patch('k2catalogue.models.Simbad') as Simbad:
epic.simbad_query(radius=2.)
Simbad.return_value.open.assert_called_once_with(radius=2.)
+
+
+def test_detail_object_query(epic):
+ with mock.patch('k2catalogue.detail_object.webbrowser.open') as mock_open:
+ detail_object.DetailObject(epic).open()
+ mock_open.assert_called_once_with(
+ 'http://deneb.astro.warwick.ac.uk/phrlbj/k2varcat/objects/12345.html'
+ )
|
Add test for integration of DetailObject and EPIC
|
diff --git a/grepfunc/grepfunc.py b/grepfunc/grepfunc.py
index <HASH>..<HASH> 100644
--- a/grepfunc/grepfunc.py
+++ b/grepfunc/grepfunc.py
@@ -231,9 +231,6 @@ def grep_iter(target, pattern, **kwargs):
if value is not None:
yield value
- # done iteration
- raise StopIteration
-
def __process_line(line, strip_eol, strip):
"""
|
Fixed bug coming from change in python<I> via PEP <I>.
|
diff --git a/domain-management/src/test/java/org/jboss/as/domain/management/security/AssertConsoleBuilder.java b/domain-management/src/test/java/org/jboss/as/domain/management/security/AssertConsoleBuilder.java
index <HASH>..<HASH> 100644
--- a/domain-management/src/test/java/org/jboss/as/domain/management/security/AssertConsoleBuilder.java
+++ b/domain-management/src/test/java/org/jboss/as/domain/management/security/AssertConsoleBuilder.java
@@ -54,7 +54,7 @@ import static org.junit.Assert.*;
* @author <a href="mailto:flemming.harms@gmail.com">Flemming Harms</a>
*/
public class AssertConsoleBuilder {
- private static String NEW_LINE = "\n";
+ private static String NEW_LINE = String.format("%n");
private enum Type {
DISPLAY, INPUT
|
fix for failed tests on windows
was: 3d<I>e<I>dc7ea<I>da<I>b<I>a<I>c3cea<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ version = '0.2'
install_requires = [
'babel',
'deskapi',
- 'txlib',
+ 'txlib-too',
]
|
EB-<I> Update the library being used
Summary: I created a new PyPi package with the updated info <URL>
|
diff --git a/src/utils/cli.js b/src/utils/cli.js
index <HASH>..<HASH> 100644
--- a/src/utils/cli.js
+++ b/src/utils/cli.js
@@ -26,7 +26,6 @@ export const themes = {
aruba: 'grommet/scss/aruba/index',
hpinc: 'grommet/scss/hpinc/index',
dxc: 'grommet/scss/dxc/index'
-
};
export function capitalize(str) {
|
Cleaned up extra blank line from cli.js
|
diff --git a/lib/ruby2d/color.rb b/lib/ruby2d/color.rb
index <HASH>..<HASH> 100644
--- a/lib/ruby2d/color.rb
+++ b/lib/ruby2d/color.rb
@@ -67,6 +67,20 @@ module Ruby2D
end
return b
end
+ #convert from "#FFF000" to Float (0.0..1.0)
+ def hex_to_f(a)
+ c=[]
+ b=a.delete("#")
+ n=(b.length)
+ #n1=n/3
+ j=0
+ for i in (0..n-1).step(n/3)
+ c[j]=Integer("0x".concat(b[i,n/3]))
+ j=j+1
+ end
+ f = to_f(c)
+ return f
+ end
end
end
|
Implemented rgb hex to float conversion
|
diff --git a/smap-control-tutorial/zoneControllerService.py b/smap-control-tutorial/zoneControllerService.py
index <HASH>..<HASH> 100644
--- a/smap-control-tutorial/zoneControllerService.py
+++ b/smap-control-tutorial/zoneControllerService.py
@@ -98,14 +98,12 @@ class ZoneController(driver.SmapDriver):
def tempcb(self, _, data):
# list of arrays of [time, val]
print "ZoneController tempcb: ", data
- mostrecent = data[-1][-1]
- self.coolSP = mostrecent[1]
+
def thermcb(self, _, data):
# list of arrays of [time, val]
print "ZoneController thermcb: ", data
- mostrecent = data[-1][-1]
- self.coolSP = mostrecent[1]
+
class setpointActuator(actuate.ContinuousActuator):
|
tempcb and thermcb should not change coolSP
|
diff --git a/src/test/java/org/math/R/Issues.java b/src/test/java/org/math/R/Issues.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/math/R/Issues.java
+++ b/src/test/java/org/math/R/Issues.java
@@ -59,8 +59,7 @@ public class Issues {
System.out.println(txt);
//...
- System.out.println(s.installPackage("sensitivity", true)); //install and load R package
- System.out.println(s.installPackage("wavelets", true));
+ System.out.println(s.installPackage("booty", true)); //install and load R package
s.end();
}
|
remove dep to sensitivity. Use more standard package instead
Use more standard package instead
|
diff --git a/lib/transport.js b/lib/transport.js
index <HASH>..<HASH> 100644
--- a/lib/transport.js
+++ b/lib/transport.js
@@ -172,9 +172,11 @@ Transport.prototype.onSocketDrain = function () {
*/
Transport.prototype.onForcedDisconnect = function () {
- if (!this.disconnected && this.open) {
+ if (!this.disconnected) {
this.log.info('transport end by forced client disconnection');
- this.packet({ type: 'disconnect' });
+ if (this.open) {
+ this.packet({ type: 'disconnect' });
+ }
this.end(true);
}
};
|
Fixed; force disconnection can still happen even with temporarily closed transports.
|
diff --git a/src/queueState.js b/src/queueState.js
index <HASH>..<HASH> 100644
--- a/src/queueState.js
+++ b/src/queueState.js
@@ -14,7 +14,7 @@ export function queueState(reactComponent, newState) {
}
if (!reactComponent.updater.isMounted(reactComponent)) {
- reactComponent.setState(Object.assign(newState, reactComponent.state));
+ reactComponent.state = Object.assign(newState, reactComponent.state);
return;
}
|
Reverting previous update since it caused issues
|
diff --git a/Controller/ZoneController.php b/Controller/ZoneController.php
index <HASH>..<HASH> 100644
--- a/Controller/ZoneController.php
+++ b/Controller/ZoneController.php
@@ -269,7 +269,7 @@ class ZoneController extends Controller
if ($zonePublish instanceof ZonePublish) {
$zonePublishData = $zonePublish->getData();
if (!isset($zonePublishData['blockPublishList'][$renderer])) {
- return new Response('This zone is not published');
+ return new Response('');
}
$blockList = $zonePublishData['blockPublishList'][$renderer];
if ($reverseOrder) {
|
if a zone in a page is not published although the page is published
|
diff --git a/openquake/hazardlib/__init__.py b/openquake/hazardlib/__init__.py
index <HASH>..<HASH> 100644
--- a/openquake/hazardlib/__init__.py
+++ b/openquake/hazardlib/__init__.py
@@ -23,5 +23,5 @@ from openquake.hazardlib import (
tom, near_fault)
# the version is managed by packager.sh with a sed
-__version__ = '0.16.0'
+__version__ = '0.17.0'
__version__ += git_suffix(__file__)
|
update devel version to <I>
|
diff --git a/openfisca_survey_manager/scenarios.py b/openfisca_survey_manager/scenarios.py
index <HASH>..<HASH> 100644
--- a/openfisca_survey_manager/scenarios.py
+++ b/openfisca_survey_manager/scenarios.py
@@ -635,10 +635,15 @@ class AbstractSurveyScenario(object):
if holder.variable.definition_period == YEAR and period.unit == MONTH:
# Some variables defined for a year are present in month/quarter dataframes
# Cleaning the dataframe would probably be better in the long run
+ log.warn('Trying to set a monthly value for variable {}, which is defined on a year. The montly values you provided will be summed.'
+ .format(column_name).encode('utf-8'))
+
if holder.get_array(period.this_year) is not None:
- assert holder.get_array(period.this_year) == np_array, "Inconsistency: yearly variable {} has already been declared with a different value.".format(column_name)
- holder.set_input(period.this_year, np_array)
- return
+ sum = holder.get_array(period.this_year) + np_array
+ holder.put_in_cache(sum, period.this_year)
+ else:
+ holder.put_in_cache(np_array, period.this_year)
+ continue
holder.set_input(period, np_array)
# @property
# def input_data_frame(self):
|
Fix adaptation to core <I>
|
diff --git a/src/modules/google.js b/src/modules/google.js
index <HASH>..<HASH> 100644
--- a/src/modules/google.js
+++ b/src/modules/google.js
@@ -47,7 +47,7 @@
// Reauthenticate
// https://developers.google.com/identity/protocols/
if (p.options.force) {
- p.qs.approval_prompt = 'force';
+ p.qs.prompt = 'consent';
}
},
|
Updating Google prompt property name and value when forcing a reauthentication
- updating for the new property to force a re-authentication
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -248,7 +248,7 @@ describe('tyranid', function() {
describe('dynamic schemas', () => {
it( 'should support matching fieldsFor()', async () => {
- const fields = await Person.fieldsFor({ organizationId: 1 });
+ const fields = await Person.fieldsFor({ organization: 1 });
expect(Object.values(fields).length).to.be.eql(16);
});
|
fix a typo in a test
|
diff --git a/mu-plugins/base/base.php b/mu-plugins/base/base.php
index <HASH>..<HASH> 100644
--- a/mu-plugins/base/base.php
+++ b/mu-plugins/base/base.php
@@ -4,6 +4,6 @@ Plugin Name: Site Specific Functionality
Description: Custom post types, taxonomies, metaboxes and shortcodes
*/
-require_once(dirname(__FILE__) . '/lib/post-types.php');
-require_once(dirname(__FILE__) . '/lib/meta-boxes.php');
-require_once(dirname(__FILE__) . '/lib/shortcodes.php');
+// require_once(dirname(__FILE__) . '/lib/post-types.php');
+// require_once(dirname(__FILE__) . '/lib/meta-boxes.php');
+// require_once(dirname(__FILE__) . '/lib/shortcodes.php');
|
Comment out site specific functionality by default
Post types, meta boxes, and shortcodes can be uncommented after
they've been customized for first use
|
diff --git a/zipline/data/loader.py b/zipline/data/loader.py
index <HASH>..<HASH> 100644
--- a/zipline/data/loader.py
+++ b/zipline/data/loader.py
@@ -156,10 +156,10 @@ def load_market_data(bm_symbol='^GSPC'):
try:
fp_bm = get_datafile(get_benchmark_filename(bm_symbol), "rb")
except IOError:
- print """
+ print("""
data msgpacks aren't distributed with source.
Fetching data from Yahoo Finance.
-""".strip()
+""").strip()
dump_benchmarks(bm_symbol)
fp_bm = get_datafile(get_benchmark_filename(bm_symbol), "rb")
@@ -192,10 +192,10 @@ Fetching data from Yahoo Finance.
try:
fp_tr = get_datafile('treasury_curves.msgpack', "rb")
except IOError:
- print """
+ print("""
data msgpacks aren't distributed with source.
Fetching data from data.treasury.gov
-""".strip()
+""").strip()
dump_treasury_curves()
fp_tr = get_datafile('treasury_curves.msgpack', "rb")
|
MAINT: Use print function instead of print statement.
The loader module printed some warning messages, these could
be changed to use a logger, but for now convert to use the print
function for compatibility with Python 3.
|
diff --git a/src/main/java/org/thymeleaf/aurora/text/LimitedSizeCacheTextRepository.java b/src/main/java/org/thymeleaf/aurora/text/LimitedSizeCacheTextRepository.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/thymeleaf/aurora/text/LimitedSizeCacheTextRepository.java
+++ b/src/main/java/org/thymeleaf/aurora/text/LimitedSizeCacheTextRepository.java
@@ -119,7 +119,7 @@ public final class LimitedSizeCacheTextRepository implements ITextRepository {
return null;
}
- final int hashCode = text.hashCode();
+ final int hashCode = TextUtil.hashCode(text);
this.readLock.lock();
|
Fixed use of hashCode on potentially-non-String CharSequences
|
diff --git a/tests/check-rules.js b/tests/check-rules.js
index <HASH>..<HASH> 100644
--- a/tests/check-rules.js
+++ b/tests/check-rules.js
@@ -16,4 +16,15 @@ describe('smoke tests', () => {
const files = new Set(fs.readdirSync('./lib/configs').map(f => path.basename(f, path.extname(f))))
assert.deepEqual(files, exportedConfigs)
})
+
+ it('exports valid rules in each config', () => {
+ const exportedRules = new Set(Object.keys(config.rules))
+ for (const flavour in config.configs) {
+ for (const rule in config.configs[flavour].rules) {
+ if (rule.startsWith('github/')) {
+ assert(exportedRules.has(rule.replace(/^github\//, '')), `rule ${rule} is not a valid rule`)
+ }
+ }
+ }
+ })
})
|
test: add smoke test ensuring every config rule is one that is exported
|
diff --git a/ciscosparkapi/restsession.py b/ciscosparkapi/restsession.py
index <HASH>..<HASH> 100644
--- a/ciscosparkapi/restsession.py
+++ b/ciscosparkapi/restsession.py
@@ -37,8 +37,8 @@ __license__ = "MIT"
# Module Constants
-DEFAULT_SINGLE_REQUEST_TIMEOUT = 20
-DEFAULT_RATE_LIMIT_TIMEOUT = 60
+DEFAULT_SINGLE_REQUEST_TIMEOUT = 20.0
+DEFAULT_RATE_LIMIT_TIMEOUT = 60.0
RATE_LIMIT_EXCEEDED_RESPONSE_CODE = 429
@@ -96,9 +96,9 @@ class RestSession(object):
# Initialize attributes and properties
self._base_url = str(validate_base_url(base_url))
- self._access_token = access_token
- self._single_request_timeout = single_request_timeout
- self._rate_limit_timeout = rate_limit_timeout
+ self._access_token = str(access_token)
+ self._single_request_timeout = float(single_request_timeout)
+ self._rate_limit_timeout = float(rate_limit_timeout)
if timeout:
self.timeout = timeout
@@ -144,7 +144,7 @@ class RestSession(object):
"the 'single_request_timeout' instead.",
DeprecationWarning)
assert value is None or value > 0
- self._single_request_timeout = value
+ self._single_request_timeout = float(value)
@property
def single_request_timeout(self):
|
Ensure consistent types on RestSession variables
Add conversion functions to ensure the types of RestSession’s
attributes are consistent.
|
diff --git a/tests/tests.py b/tests/tests.py
index <HASH>..<HASH> 100755
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -2123,8 +2123,8 @@ class JiraServiceDeskTests(unittest.TestCase):
request_type = self.jira.request_types(service_desk)[0]
request = self.jira.create_customer_request(dict(
- serviceDeskId=service_desk,
- requestTypeId=request_type,
+ serviceDeskId=service_desk.id,
+ requestTypeId=request_type.id,
requestFieldValues=dict(
summary='Ticket title here',
description='Ticket body here'
|
Pass ids when creating a customer request
|
diff --git a/example/components/Rainbow.js b/example/components/Rainbow.js
index <HASH>..<HASH> 100644
--- a/example/components/Rainbow.js
+++ b/example/components/Rainbow.js
@@ -1,10 +1,6 @@
Mast.define('Rainbow', function () {
return {
-
- '#test': function () {
- alert('#test');
- },
events: {
'click .add-thing': function addThing () {
diff --git a/lib/raise.js b/lib/raise.js
index <HASH>..<HASH> 100644
--- a/lib/raise.js
+++ b/lib/raise.js
@@ -259,13 +259,13 @@ Framework.raise = function (options, cb) {
};
}
// Method do add the specified class
- else if ( matches = value.match(/^\+\s\.*(.+)/) && matches[1] ) {
+ else if ( (matches = value.match(/^\+\s\.*(.+)/)) && matches[1] ) {
return function addClass () {
this.$el.addClass(matches[1]);
};
}
// Method to remove the specified class
- else if ( matches = value.match(/^\+\s*\.(.+)/) && matches[1] ) {
+ else if ( (matches = value.match(/^\-\s*\.(.+)/)) && matches[1] ) {
return function removeClass () {
this.$el.removeClass(matches[1]);
};
|
Fixed bugs in add/remove class shorthand.
|
diff --git a/code/code.go b/code/code.go
index <HASH>..<HASH> 100644
--- a/code/code.go
+++ b/code/code.go
@@ -2,11 +2,12 @@ package code
import (
"fmt"
- "gentests/models"
"go/ast"
"go/parser"
"go/token"
"log"
+
+ "github.com/cweill/go-gentests/models"
)
func Parse(path string) *models.Info {
diff --git a/gentests.go b/gentests.go
index <HASH>..<HASH> 100644
--- a/gentests.go
+++ b/gentests.go
@@ -2,12 +2,13 @@ package main
import (
"fmt"
- "gentests/code"
- "gentests/render"
"os"
"os/exec"
"path/filepath"
"strings"
+
+ "github.com/cweill/go-gentests/code"
+ "github.com/cweill/go-gentests/render"
)
func generateTestCases(f *os.File, path string) {
diff --git a/render/render.go b/render/render.go
index <HASH>..<HASH> 100644
--- a/render/render.go
+++ b/render/render.go
@@ -1,9 +1,10 @@
package render
import (
- "gentests/models"
"io"
"text/template"
+
+ "github.com/cweill/go-gentests/models"
)
var tmpls = template.Must(template.ParseGlob("render/templates/*.tmpl"))
|
Update imports to point to github.com dir.
|
diff --git a/src/dialog/index.js b/src/dialog/index.js
index <HASH>..<HASH> 100644
--- a/src/dialog/index.js
+++ b/src/dialog/index.js
@@ -96,7 +96,7 @@ Dialog.confirm = (options) =>
Dialog.close = () => {
if (instance) {
- instance.value = false;
+ instance.toggle(false);
}
};
|
fix(Dialog): Dialog.close not work
|
diff --git a/registry/cache/warming.go b/registry/cache/warming.go
index <HASH>..<HASH> 100644
--- a/registry/cache/warming.go
+++ b/registry/cache/warming.go
@@ -46,8 +46,8 @@ type backlogItem struct {
registry.Credentials
}
-// Continuously get the images to populate the cache with, and
-// populate the cache with them.
+// Loop continuously gets the images to populate the cache with,
+// and populate the cache with them.
func (w *Warmer) Loop(logger log.Logger, stop <-chan struct{}, wg *sync.WaitGroup, imagesToFetchFunc func() registry.ImageCreds) {
defer wg.Done()
|
Please Go's linter about comments on exported methods.
|
diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py
index <HASH>..<HASH> 100644
--- a/tests/test_wrapper.py
+++ b/tests/test_wrapper.py
@@ -54,3 +54,15 @@ def test_inventory_with_ssid(cicowrapper, inventory_mock):
def test_inventory_with_nonexisting_ssid(cicowrapper, inventory_mock):
inventory = cicowrapper.inventory(ssid='deaddead')
assert inventory == {}
+
+def test_node_get(cicowrapper, requests_mock, inventory_mock):
+ requests_mock.get('http://api.example.com/Node/get?key=dummy_key&arch=x86_64', json={'hosts':['n1.hufty'], 'ssid': 'deadtest'})
+ inventory, ssid = cicowrapper.node_get(arch='x86_64')
+ assert ssid == 'deadtest'
+ assert inventory
+ assert 'n1.hufty' in inventory
+ assert inventory['n1.hufty']['ip_address'] == "172.19.3.1"
+
+def test_node_done(cicowrapper, requests_mock, inventory_mock):
+ requests_mock.get('http://api.example.com/Node/done?key=dummy_key&ssid=deadtest')
+ cicowrapper.node_done(ssid='deadtest')
|
add tests for node_get and node_done
|
diff --git a/phypno/attr/anat.py b/phypno/attr/anat.py
index <HASH>..<HASH> 100644
--- a/phypno/attr/anat.py
+++ b/phypno/attr/anat.py
@@ -174,9 +174,10 @@ class Surf:
self.surf_file = args[0]
elif len(args) == 3:
- hemi = args[1]
- surf_type = args[2]
- self.surf_file = join(args[0], 'surf', hemi + '.' + surf_type)
+ self.hemi = args[1]
+ self.surf_type = args[2]
+ self.surf_file = join(args[0], 'surf',
+ self.hemi + '.' + self.surf_type)
surf_vert, surf_tri = _read_geometry(self.surf_file)
self.vert = surf_vert
@@ -332,6 +333,5 @@ class Freesurfer:
instance of Surf
"""
- surf_file = join(self.dir, 'surf', hemi + '.' + surf_type)
- surf = Surf(surf_file)
+ surf = Surf(self.dir, hemi, surf_type)
return surf
|
use hemi info again in surf
|
diff --git a/scoop/_types.py b/scoop/_types.py
index <HASH>..<HASH> 100644
--- a/scoop/_types.py
+++ b/scoop/_types.py
@@ -75,8 +75,8 @@ class Future(object):
self.creationTime = time.ctime() # future creation time
self.stopWatch = StopWatch() # stop watch for measuring time
self.greenlet = None # cooperative thread for running future
- self.resultValue = None # future result
- self.exceptionValue = None # exception raised by callable
+ self.resultValue = None # future result
+ self.exceptionValue = None # exception raised by callable
self.callback = [] # set callback
# insert future into global dictionary
scoop._control.futureDict[self.id] = self
|
Tidied up a bit the code.
|
diff --git a/src/editor/EditorManager.js b/src/editor/EditorManager.js
index <HASH>..<HASH> 100644
--- a/src/editor/EditorManager.js
+++ b/src/editor/EditorManager.js
@@ -419,13 +419,6 @@ define(function (require, exports, module) {
}
if (viewState.scrollPos) {
editor.setScrollPos(viewState.scrollPos.x, viewState.scrollPos.y);
-
- // Force CM.onScroll() to run now, in case refresh() gets called synchronously after this
- // (as often happens when switching editors, due to JSLint panel)
- // TODO: why doesn't CM.scrollTo() do this automatically?
- var event = window.document.createEvent("HTMLEvents");
- event.initEvent("scroll", true, false);
- editor._codeMirror.getScrollerElement().dispatchEvent(event);
}
}
}
|
Remove hacky workaround that is unneeded in CMv3
|
diff --git a/lib/http/index.js b/lib/http/index.js
index <HASH>..<HASH> 100644
--- a/lib/http/index.js
+++ b/lib/http/index.js
@@ -1,4 +1,3 @@
-
/*!
* q - http
* Copyright (c) 2011 LearnBoost <tj@learnboost.com>
@@ -65,7 +64,9 @@ app.post('/job', provides('json'), express.bodyParser(), json.createJob);
// routes
-app.get('/', routes.jobs('active'));
+app.get('/', function (req, res) {
+ res.redirect('active')
+});
app.get('/active', routes.jobs('active'));
app.get('/inactive', routes.jobs('inactive'));
app.get('/failed', routes.jobs('failed'));
|
Support express path mounting
Redirect away from / so /path won't point assets to /asset rather than /path/asset
|
diff --git a/annis-visualizers/src/main/java/annis/visualizers/component/grid/EventExtractor.java b/annis-visualizers/src/main/java/annis/visualizers/component/grid/EventExtractor.java
index <HASH>..<HASH> 100644
--- a/annis-visualizers/src/main/java/annis/visualizers/component/grid/EventExtractor.java
+++ b/annis-visualizers/src/main/java/annis/visualizers/component/grid/EventExtractor.java
@@ -530,7 +530,7 @@ public class EventExtractor {
if (showNamespaceConfig != null)
{
- SDocumentGraph graph = input.getDocument().getSDocumentGraph();
+ SDocumentGraph graph = input.getDocument().getDocumentGraph();
Set<String> annoPool = new LinkedHashSet<>();
for(Class<? extends SNode> t : types)
|
removed "S" from getSDocumentGraph
|
diff --git a/headless/tasks/inasafe_wrapper.py b/headless/tasks/inasafe_wrapper.py
index <HASH>..<HASH> 100644
--- a/headless/tasks/inasafe_wrapper.py
+++ b/headless/tasks/inasafe_wrapper.py
@@ -46,7 +46,11 @@ def filter_impact_function(hazard=None, exposure=None):
arguments.hazard = None
arguments.exposure = None
ifs = get_impact_function_list(arguments)
- result = [f.metadata().as_dict()['id'] for f in ifs]
+ result = [
+ {
+ 'id': f.metadata().as_dict()['id'],
+ 'name': f.metadata().as_dict()['name']
+ } for f in ifs]
LOGGER.debug(result)
return result
|
InaSAFE Headless: Add more information for filter_impact_function
|
diff --git a/src/google-maps.js b/src/google-maps.js
index <HASH>..<HASH> 100644
--- a/src/google-maps.js
+++ b/src/google-maps.js
@@ -39,13 +39,20 @@ export class GoogleMaps {
});
this._scriptPromise.then(() => {
+ let latLng = new google.maps.LatLng(parseFloat(this.latitude), parseFloat(this.longitude));
+
let options = {
- center: {lat: this.latitude, lng: this.longitude},
+ center: latLng,
zoom: parseInt(this.zoom, 10),
disableDefaultUI: this.disableDefaultUI
}
this.map = new google.maps.Map(this.element, options);
+
+ this.createMarker({
+ map: this.map,
+ position: latLng
+ });
});
}
|
feat(maps): when coordinates are supplied, convert them to a well-formed object and then create a marker
|
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
index <HASH>..<HASH> 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
@@ -1039,12 +1039,12 @@ public class Task
newState);
} else {
LOG.warn(
- "{} ({}) switched from {} to {}.",
+ "{} ({}) switched from {} to {} with failure cause: {}",
taskNameWithSubtask,
executionId,
currentState,
newState,
- cause);
+ ExceptionUtils.stringifyException(cause));
}
return true;
|
[hotfix][runtime] Adds failure cause to log message
The log message when transitioning to an exeuctionState having a failure cause
didn't print the cause itself. This is fixed now.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.