diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/devassistant/cli/cli_runner.py b/devassistant/cli/cli_runner.py
index <HASH>..<HASH> 100644
--- a/devassistant/cli/cli_runner.py
+++ b/devassistant/cli/cli_runner.py
@@ -26,4 +26,4 @@ class CliRunner(object):
pr.run()
except exceptions.ExecutionException as ex:
# error is already logged, just catch it and silently exit here
- pass
+ sys.exit(1) | Return non-zero exit code on assistant failure. Fixes #<I> |
diff --git a/blocks.js b/blocks.js
index <HASH>..<HASH> 100644
--- a/blocks.js
+++ b/blocks.js
@@ -176,7 +176,8 @@ module.exports = function (file, block_size, cache) {
},
/**
* Writes a buffer directly to a position in the file.
- * This wraps `file.write()` and removes the block cache.
+ * This wraps `file.write()` and removes the block cache after the file
+ * write finishes to avoid having the item re-cached during the write.
*
* @param {buffer} buf - the data to write to the file
* @param {number} pos - position in the file to write the buffer
@@ -184,8 +185,10 @@ module.exports = function (file, block_size, cache) {
*/
write: (buf, pos, cb) => {
const i = Math.floor(pos/block_size)
- cache.remove(i)
- file.write(buf, pos, cb)
+ file.write(buf, pos, (err) => {
+ cache.remove(i)
+ cb(err)
+ })
},
//we arn't specifically clearing the buffers,
//but they should get updated anyway. | Clear cache *after* file write is finished |
diff --git a/spec/controllers/spree/adyen_redirect_controller_spec.rb b/spec/controllers/spree/adyen_redirect_controller_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controllers/spree/adyen_redirect_controller_spec.rb
+++ b/spec/controllers/spree/adyen_redirect_controller_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe Spree::AdyenRedirectController, type: :controller do
)
end
- let!(:store) { Spree::Store.default }
+ let!(:store) { create :store }
let!(:gateway) { create :hpp_gateway }
before do | Create store in spec
This was a work around to a bad spree factory that was automatically
creating stores, which has now been patched. |
diff --git a/src/javascripts/ng-admin/Crud/delete/DeleteController.js b/src/javascripts/ng-admin/Crud/delete/DeleteController.js
index <HASH>..<HASH> 100644
--- a/src/javascripts/ng-admin/Crud/delete/DeleteController.js
+++ b/src/javascripts/ng-admin/Crud/delete/DeleteController.js
@@ -26,7 +26,7 @@ define(function () {
$window = this.$window;
this.WriteQueries.deleteOne(this.view, this.entityId).then(function () {
- $window.history.back();
+ this.back();
notification.log('Element successfully deleted.', { addnCls: 'humane-flatty-success' });
}.bind(this), function (response) {
// @TODO: share this method when splitting controllers
@@ -40,9 +40,7 @@ define(function () {
};
DeleteController.prototype.back = function () {
- var $window = this.$window;
-
- $window.history.back();
+ this.$window.history.back();
};
DeleteController.prototype.destroy = function () { | Fixes from jpetitcolas's comments |
diff --git a/lib/sensu-plugin/utils.rb b/lib/sensu-plugin/utils.rb
index <HASH>..<HASH> 100644
--- a/lib/sensu-plugin/utils.rb
+++ b/lib/sensu-plugin/utils.rb
@@ -115,7 +115,11 @@ module Sensu
unknown("Non-OK response from API query: #{get_uri(query_path)}")
end
data = JSON.parse(response.body)
+ # when the data is empty, we have hit the end
break if data.empty?
+ # If API lacks pagination support, it will
+ # return same data on subsequent iterations
+ break if results.any? { |r| r == data }
results << data
offset += limit
end | update paginated_get method to avoid blocking infinitely on older API versions |
diff --git a/spec/unit/form_builder_spec.rb b/spec/unit/form_builder_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/form_builder_spec.rb
+++ b/spec/unit/form_builder_spec.rb
@@ -563,8 +563,11 @@ describe ActiveAdmin::FormBuilder do
describe "with allow destroy" do
context "with an existing post" do
let :body do
+ s = self
build_form({url: '/categories'}, Category.new) do |f|
- allow(f.object.posts.build).to receive(:new_record?).and_return(false)
+ s.instance_exec do
+ allow(f.object.posts.build).to receive(:new_record?).and_return(false)
+ end
f.has_many :posts, allow_destroy: true do |p|
p.input :title
end | RSpec methods are no longer available globally |
diff --git a/tests/test_api.py b/tests/test_api.py
index <HASH>..<HASH> 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -266,7 +266,7 @@ class TweepyAPITests(TweepyTestCase):
def testcreatedestroyblock(self):
self.api.create_block('twitter')
self.api.destroy_block('twitter')
- self.api.create_friendship('twitter') # restore
+ self.api.create_friendship('twitter') # restore
@tape.use_cassette('testblocks.json')
def testblocks(self):
@@ -385,7 +385,7 @@ class TweepyAPITests(TweepyTestCase):
# Test various API functions using Austin, TX, USA
self.assertEqual(self.api.geo_id(id='1ffd3558f2e98349').full_name, 'Dogpatch, San Francisco')
self.assertTrue(place_name_in_list('Austin, TX',
- self.api.reverse_geocode(lat=30.2673701685, long= -97.7426147461))) # Austin, TX, USA
+ self.api.reverse_geocode(lat=30.2673701685, long= -97.7426147461))) # Austin, TX, USA
@tape.use_cassette('testsupportedlanguages.json')
def testsupportedlanguages(self): | Standardize inline comment spacing in API tests |
diff --git a/cobra/core/model.py b/cobra/core/model.py
index <HASH>..<HASH> 100644
--- a/cobra/core/model.py
+++ b/cobra/core/model.py
@@ -334,6 +334,12 @@ class Model(Object):
# First check whether the metabolites exist in the model
metabolite_list = [x for x in metabolite_list
if x.id not in self.metabolites]
+
+ bad_ids = [m for m in metabolite_list
+ if not isinstance(m.id, string_types) or len(m.id) < 1]
+ if len(bad_ids) != 0:
+ raise ValueError('invalid identifiers in {}'.format(repr(bad_ids)))
+
for x in metabolite_list:
x._model = self
self.metabolites += metabolite_list
diff --git a/cobra/test/test_model.py b/cobra/test/test_model.py
index <HASH>..<HASH> 100644
--- a/cobra/test/test_model.py
+++ b/cobra/test/test_model.py
@@ -118,6 +118,8 @@ class TestReactions:
benchmark(add_remove_metabolite)
def test_add_metabolite(self, model):
+ with pytest.raises(ValueError):
+ model.add_metabolites(Metabolite())
with model:
with model:
reaction = model.reactions.get_by_id("PGI") | fix: check valid metabolite id
Ensure that metabolites to add have valid identifiers. Failure to do so
triggers confusing errors when populating solver. |
diff --git a/gkeepapi/__init__.py b/gkeepapi/__init__.py
index <HASH>..<HASH> 100644
--- a/gkeepapi/__init__.py
+++ b/gkeepapi/__init__.py
@@ -3,7 +3,7 @@
.. moduleauthor:: Kai <z@kwi.li>
"""
-__version__ = '0.11.14'
+__version__ = '0.11.15'
import logging
import re
diff --git a/gkeepapi/node.py b/gkeepapi/node.py
index <HASH>..<HASH> 100644
--- a/gkeepapi/node.py
+++ b/gkeepapi/node.py
@@ -619,7 +619,8 @@ class NodeTimestamps(Element):
def _load(self, raw):
super(NodeTimestamps, self)._load(raw)
- self._created = self.str_to_dt(raw['created'])
+ if 'created' in raw:
+ self._created = self.str_to_dt(raw['created'])
self._deleted = self.str_to_dt(raw['deleted']) \
if 'deleted' in raw else None
self._trashed = self.str_to_dt(raw['trashed']) \ | Issue #<I>: Allow for missing created timestamp |
diff --git a/lib/ircb.js b/lib/ircb.js
index <HASH>..<HASH> 100644
--- a/lib/ircb.js
+++ b/lib/ircb.js
@@ -224,10 +224,10 @@ IRCb.prototype.names = function (channel, cb) {
});
};
-IRCb.prototype.whois = function (nickname, cb) {
+IRCb.prototype.whois = function (nick, cb) {
var self = this;
- self.write('WHOIS ' + nickname, function (err) {
+ self.write('WHOIS ' + nick, function (err) {
if (err) {
return cb(err);
}
@@ -237,8 +237,10 @@ IRCb.prototype.whois = function (nickname, cb) {
return cb(err);
}
- cb(null, whois);
- self.removeListener('whois', onWhois);
+ if (nick === whois.nick) {
+ cb(null, whois);
+ self.removeListener('whois', onWhois);
+ }
});
});
}; | [fix] Filter by nickname to avoid confusing replies |
diff --git a/pages/subscribers.js b/pages/subscribers.js
index <HASH>..<HASH> 100644
--- a/pages/subscribers.js
+++ b/pages/subscribers.js
@@ -6,6 +6,7 @@ import commonMenu from '@shopgate/pwa-common/subscriptions/menu';
import commonRouter from '@shopgate/pwa-common/subscriptions/router';
// PWA Common Commerce
import commerceCart from '@shopgate/pwa-common-commerce/cart/subscriptions';
+import commerceCheckout from '@shopgate/pwa-common-commerce/checkout/subscriptions';
import commerceFavorites from '@shopgate/pwa-common-commerce/favorites/subscriptions';
import commerceFilter from '@shopgate/pwa-common-commerce/filter/subscriptions';
import commerceProduct from '@shopgate/pwa-common-commerce/product/subscriptions';
@@ -55,6 +56,7 @@ const subscriptions = [
trackingDeeplinkPush,
// Common Commerce subscribers.
commerceCart,
+ commerceCheckout,
commerceFavorites,
commerceFilter,
commerceProduct, | PWA-<I>: Changed checkout success event to be processed via an own stream. Clear expiration times on all ordered products by dispatching checkout success action within the new subscription. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,6 +20,7 @@ setup(
"Operating System :: OS Independent",
"Topic :: Software Development"
],
+ zip_safe=False,
packages=[
'userlog',
], | Sets zip_safe=False in the setup.py file. |
diff --git a/src/virtual.js b/src/virtual.js
index <HASH>..<HASH> 100644
--- a/src/virtual.js
+++ b/src/virtual.js
@@ -75,6 +75,14 @@ export default class Virtual {
updateParam (key, value) {
if (this.param && (key in this.param)) {
+ // if uniqueIds reducing, find out deleted id and remove from size map
+ if (key === 'uniqueIds' && (value.length < this.param[key].length)) {
+ this.sizes.forEach((v, key) => {
+ if (!value.includes(key)) {
+ this.sizes.delete(key)
+ }
+ })
+ }
this.param[key] = value
}
} | Delete size map when items reducing |
diff --git a/lib/salt/page.rb b/lib/salt/page.rb
index <HASH>..<HASH> 100644
--- a/lib/salt/page.rb
+++ b/lib/salt/page.rb
@@ -17,8 +17,9 @@ module Salt
end
end
- def render
- Site.instance.render_template(@layout, @contents, self)
+ def render(context = {})
+ context[:this] = self
+ Site.instance.render_template(@layout, @contents, context)
end
def output_file(extension = nil)
@@ -26,15 +27,15 @@ module Salt
end
def output_path(parent_path)
+ return parent_path if @path.nil?
File.join(parent_path, File.dirname(@path).gsub(Site.instance.path(:pages), ''))
end
- def write(path, extension = nil)
- contents = self.render
+ def write(path, context = {}, extension = nil)
+ contents = self.render(context)
output_path = self.output_path(path)
FileUtils.mkdir_p(output_path) unless Dir.exists?(output_path)
-
full_path = File.join(output_path, self.output_file(extension))
if @path && File.exists?(full_path) | Updated render and write to take a context hash. Updated output_path to work if no @path is set. |
diff --git a/app/scripts/configs/tracks-info.js b/app/scripts/configs/tracks-info.js
index <HASH>..<HASH> 100644
--- a/app/scripts/configs/tracks-info.js
+++ b/app/scripts/configs/tracks-info.js
@@ -604,7 +604,8 @@ export const TRACKS_INFO = [
'rectangleDomainFillColor',
'rectangleDomainStrokeColor',
'rectangleDomainOpacity',
- 'minSquareSize'
+ 'rectanlgeMinSize',
+ 'polygonMinBoundingSize',
],
defaultOptions: {
projecton: 'mercator',
@@ -615,7 +616,8 @@ export const TRACKS_INFO = [
rectangleDomainFillColor: 'grey',
rectangleDomainStrokeColor: 'black',
rectangleDomainOpacity: 0.6,
- minSquareSize: 'none',
+ rectanlgeMinSize: 1,
+ polygonMinBoundingSize: 4
},
}, | Adjust and add an option for geoJson track |
diff --git a/lib/gclitest/suite.js b/lib/gclitest/suite.js
index <HASH>..<HASH> 100644
--- a/lib/gclitest/suite.js
+++ b/lib/gclitest/suite.js
@@ -22,5 +22,7 @@ define(function(require, exports, module) {
examiner.addSuite('gclitest/testJs', require('gclitest/testJs'));
examiner.run();
+ console.log('Completed test suite');
+ // examiner.log();
});
diff --git a/lib/test/examiner.js b/lib/test/examiner.js
index <HASH>..<HASH> 100644
--- a/lib/test/examiner.js
+++ b/lib/test/examiner.js
@@ -92,6 +92,19 @@ examiner.toRemote = function() {
};
/**
+ * Output a test summary to console.log
+ */
+examiner.log = function() {
+ var remote = this.toRemote();
+ remote.suites.forEach(function(suite) {
+ console.log(suite.name);
+ suite.tests.forEach(function(test) {
+ console.log('- ' + test.name, test.status.name, test.message || '');
+ });
+ });
+};
+
+/**
* Used by assert to record a failure against the current test
*/
examiner.recordError = function(message) { | Bug <I> (tests): Additional logging
When tests are run from the cli you want a summary |
diff --git a/src/_legacy.js b/src/_legacy.js
index <HASH>..<HASH> 100644
--- a/src/_legacy.js
+++ b/src/_legacy.js
@@ -16,20 +16,6 @@
};
}
- if ( !Element.prototype.contains ) {
- Element.prototype.contains = function ( el ) {
- while ( el.parentNode ) {
- if ( el.parentNode === this ) {
- return true;
- }
-
- el = el.parentNode;
- }
-
- return false;
- };
- }
-
if ( !String.prototype.trim ) {
String.prototype.trim = function () {
return this.replace(/^\s+/, '').replace(/\s+$/, ''); | removed newly redundant element.contains shim |
diff --git a/src/client/pfs.go b/src/client/pfs.go
index <HASH>..<HASH> 100644
--- a/src/client/pfs.go
+++ b/src/client/pfs.go
@@ -597,6 +597,26 @@ func (c APIClient) ListFileFast(repoName string, commitID string, path string, f
return fileInfos.FileInfo, nil
}
+type WalkFn func(*pfs.FileInfo) error
+
+func (c APIClient) Walk(repoName string, commitID string, path string, fromCommitID string, fullFile bool, shard *pfs.Shard, walkFn WalkFn) error {
+ fileInfos, err := c.ListFileFast(repoName, commitID, path, fromCommitID, fullFile, shard)
+ if err != nil {
+ return err
+ }
+ for _, fileInfo := range fileInfos {
+ if err := walkFn(fileInfo); err != nil {
+ return err
+ }
+ if fileInfo.FileType == pfs.FileType_FILE_TYPE_DIR {
+ if err := c.Walk(repoName, commitID, fileInfo.Path, fromCommitID, fullFile, shard, walkFn); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
// DeleteFile deletes a file from a Commit.
// DeleteFile leaves a tombstone in the Commit, assuming the file isn't written
// to later attempting to get the file from the finished commit will result in | Adds a Walk function to pfs client. |
diff --git a/peer.go b/peer.go
index <HASH>..<HASH> 100644
--- a/peer.go
+++ b/peer.go
@@ -314,7 +314,6 @@ func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {
p.server.cc.signer, p.server.witnessBeacon, dbChan,
)
if err != nil {
- lnChan.Stop()
return err
} | peer: don't stop nil channel |
diff --git a/tools/git-remove-branches-script.py b/tools/git-remove-branches-script.py
index <HASH>..<HASH> 100755
--- a/tools/git-remove-branches-script.py
+++ b/tools/git-remove-branches-script.py
@@ -289,7 +289,8 @@ if __name__ == "__main__":
format_string = DELIMITER.join([gitshowmap[key] for key in sorted(gitshowmap)])
#Iterate over it and get a bunch of commit information using git log
- print "branch_names is %s" % branch_names
+ print "##branch_names is %s" % branch_names
+
branch_infos = []
for b in branch_names:
if b.find("/refs/tags/") != -1: | update to fix delete branches in different repos (#<I>) |
diff --git a/yaswfp/swfparser.py b/yaswfp/swfparser.py
index <HASH>..<HASH> 100644
--- a/yaswfp/swfparser.py
+++ b/yaswfp/swfparser.py
@@ -442,12 +442,13 @@ class SWFParser:
color = self._get_struct_rgba
else:
raise ValueError("unknown version: {}".format(version))
- obj.ColorTableRGB = [color() for _ in range(obj.BitmapColorTableSize + 1)]
+ obj.ColorTableRGB = [
+ color() for _ in range(obj.BitmapColorTableSize + 1)]
obj.ColormapPixelData = self._get_raw_bytes(-len(BitmapData))
elif obj.BitmapFormat in (4, 5):
obj.BitmapPixelData = BitmapData
else:
- raise ValueError("unknown BitmapFormat: {}".format(obj.BitmapFormat))
+ raise ValueError("BitmapFormat: {}".format(obj.BitmapFormat))
finally:
self._src = _src | fix flake8 E<I> line too long |
diff --git a/config/jsdoc/api/template/static/scripts/main.js b/config/jsdoc/api/template/static/scripts/main.js
index <HASH>..<HASH> 100644
--- a/config/jsdoc/api/template/static/scripts/main.js
+++ b/config/jsdoc/api/template/static/scripts/main.js
@@ -233,18 +233,8 @@ $(function () {
return;
}
const clsItem = $(this).closest('.item');
- let show;
- if (clsItem.hasClass('toggle-manual-show')) {
- show = false;
- } else if (clsItem.hasClass('toggle-manual-hide')) {
- show = true;
- } else {
- clsItem.find('.member-list li').each(function (i, v) {
- show = $(v).is(':hidden');
- return !show;
- });
- }
- search.manualToggle(clsItem, !!show);
+ const show = !clsItem.hasClass('toggle-manual-show');
+ search.manualToggle(clsItem, show);
});
// Auto resizing on navigation | Fix toggle state when there are no hidden members |
diff --git a/maven-plugin/src/main/java/net/revelc/code/formatter/AbstractCacheableFormatter.java b/maven-plugin/src/main/java/net/revelc/code/formatter/AbstractCacheableFormatter.java
index <HASH>..<HASH> 100755
--- a/maven-plugin/src/main/java/net/revelc/code/formatter/AbstractCacheableFormatter.java
+++ b/maven-plugin/src/main/java/net/revelc/code/formatter/AbstractCacheableFormatter.java
@@ -45,7 +45,7 @@ public abstract class AbstractCacheableFormatter {
public Result formatFile(File file, LineEnding ending, boolean dryRun) {
try {
- this.log.debug("Processing file: " + file);
+ this.log.debug("Processing file: " + file + " with line ending: " + ending);
String code = FileUtils.fileRead(file, this.encoding.name());
String formattedCode = doFormat(code, ending); | [ci] Add line ending being used to process file logging |
diff --git a/src/font/bitmapfont.js b/src/font/bitmapfont.js
index <HASH>..<HASH> 100644
--- a/src/font/bitmapfont.js
+++ b/src/font/bitmapfont.js
@@ -200,7 +200,8 @@
renderer.drawImage(this.fontImage,
glyph.src.x, glyph.src.y,
glyph.width, glyph.height,
- ~~x, ~~(y + glyph.offset.y * this.fontScale.y),
+ ~~(x + glyph.offset.x),
+ ~~(y + glyph.offset.y * this.fontScale.y),
glyph.width * this.fontScale.x, glyph.height * this.fontScale.y);
x += (glyph.xadvance + kerning) * this.fontScale.x;
lastGlyph = glyph; | [#<I>][<I>] is this not supposed to be used ?
@agmcleod does not really change anything in terms of rendering, but
looks like it was missing |
diff --git a/src/test/java/integration/ImageTest.java b/src/test/java/integration/ImageTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/integration/ImageTest.java
+++ b/src/test/java/integration/ImageTest.java
@@ -4,8 +4,10 @@ import org.junit.Before;
import org.junit.Test;
import static com.codeborne.selenide.Selenide.$;
+import static com.codeborne.selenide.WebDriverRunner.isHtmlUnit;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeFalse;
public class ImageTest extends IntegrationTest {
@Before
@@ -15,6 +17,8 @@ public class ImageTest extends IntegrationTest {
@Test
public void userCanCheckIfImageIsLoadedCorrectly() {
+ assumeFalse(isHtmlUnit());
+
assertTrue($("#valid-image img").isImage());
assertFalse($("#invalid-image img").isImage());
} | image check does not work in htmlunit |
diff --git a/mingus/midi/pyfluidsynth.py b/mingus/midi/pyfluidsynth.py
index <HASH>..<HASH> 100644
--- a/mingus/midi/pyfluidsynth.py
+++ b/mingus/midi/pyfluidsynth.py
@@ -29,12 +29,17 @@ from __future__ import absolute_import
from ctypes import *
from ctypes.util import find_library
-
+import os
import six
+if hasattr(os, 'add_dll_directory'):
+ os.add_dll_directory(os.getcwd())
+
lib = (
find_library("fluidsynth")
or find_library("libfluidsynth")
+ or find_library('libfluidsynth-3')
+ or find_library('libfluidsynth-2')
or find_library("libfluidsynth-1")
)
if lib is None: | Adding new code to match with recent changes in FluidSynth library |
diff --git a/public/js/vendor/jquery.radio.js b/public/js/vendor/jquery.radio.js
index <HASH>..<HASH> 100644
--- a/public/js/vendor/jquery.radio.js
+++ b/public/js/vendor/jquery.radio.js
@@ -16,7 +16,15 @@
return $els.filter(':checked').val();
} else {
$.each($els, function() {
- $(this).attr('checked', $(this).attr('value') === value);
+ var checked = ($(this).attr('value') === value);
+ // The attribute should be set or unset...
+ if (checked) {
+ this.setAttribute('checked', 'checked');
+ } else {
+ this.removeAttribute('checked');
+ }
+ // And also the property
+ this.checked = checked;
});
}
}; | jquery radio <I>, corrects a bug in snippet widgets |
diff --git a/bin/hydra.js b/bin/hydra.js
index <HASH>..<HASH> 100755
--- a/bin/hydra.js
+++ b/bin/hydra.js
@@ -39,7 +39,7 @@ if (! hydraConfig.plugins)
var hydra = new Hydra();
hydraConfig.plugins.forEach(function(pluginDef) {
- var plugin = hydra.loadPlugin(pluginDef.name);
+ var plugin = hydra.loadPlugin(pluginDef.name, pluginDef.config);
var pluginObject = summonHydraBodyParts(plugin.module.getBodyParts(plugin.config));
pluginObject.name = pluginDef.name; | Pass around the plugin configuration from the hydra conf |
diff --git a/docs/gensidebar.py b/docs/gensidebar.py
index <HASH>..<HASH> 100644
--- a/docs/gensidebar.py
+++ b/docs/gensidebar.py
@@ -43,7 +43,7 @@ def generate_sidebar(conf, conf_api):
elif not do_gen:
return
else:
- args = desc, 'http://robotpy.readthedocs.io/en/%s/%s.html' % (version, link)
+ args = desc, 'https://robotpy.readthedocs.io/en/%s/%s.html' % (version, link)
lines.append(' %s <%s>' % args)
@@ -51,7 +51,7 @@ def generate_sidebar(conf, conf_api):
if project != conf_api:
if do_gen:
args = desc, project, version
- lines.append(' %s API <http://robotpy.readthedocs.io/projects/%s/en/%s/api.html>' % args)
+ lines.append(' %s API <https://robotpy.readthedocs.io/projects/%s/en/%s/api.html>' % args)
else:
lines.append(' %s API <api>' % desc)
@@ -74,6 +74,7 @@ def generate_sidebar(conf, conf_api):
write_api('utilities', 'Utilities')
write_api('pyfrc', 'PyFRC')
write_api('ctre', 'CTRE Libraries')
+ write_api('navx', 'NavX Library')
endl()
toctree('Additional Info') | Update doc sidebar to include NavX + https |
diff --git a/lib/audio_monster/monster.rb b/lib/audio_monster/monster.rb
index <HASH>..<HASH> 100644
--- a/lib/audio_monster/monster.rb
+++ b/lib/audio_monster/monster.rb
@@ -10,6 +10,7 @@ require 'nu_wav'
require 'tempfile'
require 'mimemagic'
require 'active_support/all'
+require 'digest'
module AudioMonster
@@ -745,7 +746,8 @@ module AudioMonster
file_name = File.basename(base_file_name)
file_ext = File.extname(base_file_name)
FileUtils.mkdir_p(tmp_dir) unless File.exists?(tmp_dir)
- tmp = Tempfile.new([file_name, file_ext], tmp_dir)
+ safe_file_name = Digest::SHA256.hexdigest(file_name)
+ tmp = Tempfile.new([safe_file_name, file_ext], tmp_dir)
tmp.binmode if bin_mode
tmp
end | avoid "File name too long" errors from Tempfile by hashing file_name before construction |
diff --git a/QueryBuilder/MongodbQueryBuilder.php b/QueryBuilder/MongodbQueryBuilder.php
index <HASH>..<HASH> 100644
--- a/QueryBuilder/MongodbQueryBuilder.php
+++ b/QueryBuilder/MongodbQueryBuilder.php
@@ -46,12 +46,17 @@ class MongodbQueryBuilder extends AbstractQueryBuilder {
if (isset($this->config['joinWhere'])) {
foreach($this->config['joinWhere'] as $where) {
list($name, $values, $subSelectField) = $where;
- // @todo test it
- if ($subSelectField == 'id') {
+ if ($subSelectField === 'id') {
$queryBuilder->field($name)->in($values);
} else {
$founds = array();
- $tmp = $this->service->getRepository($name)->findBy(array($subSelectField=>$values));
+ $className = explode('\\', $this->or->getClassName());
+ unset($className[count($className) - 1]);
+ $tmp = $this->service->getRepository(implode('\\', $className).'\\'.ucfirst($name))
+ ->createQueryBuilder()
+ ->field($subSelectField)->in($values)
+ ->getQuery()
+ ->execute();
foreach($tmp as $t)
$founds[] = $t->getId();
if (count($founds)) { | Fix joinWhere with subselect in MongodbQueryBuilder |
diff --git a/tests/test_extensions/test_redis.py b/tests/test_extensions/test_redis.py
index <HASH>..<HASH> 100644
--- a/tests/test_extensions/test_redis.py
+++ b/tests/test_extensions/test_redis.py
@@ -2,7 +2,9 @@
from __future__ import unicode_literals, division, print_function, absolute_import
from nose.tools import eq_
+from nose.plugins.skip import SkipTest
from marrow.wsgi.objects.request import LocalRequest
+from redis.exceptions import ConnectionError
from redis import StrictRedis
from web.core.application import Application
@@ -12,9 +14,14 @@ def insert_data_controller(context):
context.redis.set('bar', 'baz')
-class TestMongoDBExtension(object):
+class TestRedisExtension(object):
def setup(self):
self.connection = StrictRedis(db='testdb')
+ try:
+ self.connection.ping()
+ except ConnectionError:
+ raise SkipTest('No Redis server available')
+
self.config = {
'extensions': {
'redis': { | Fixed test class name and made the test skippable if no Redis server is
present. |
diff --git a/classes/Gems/Tracker.php b/classes/Gems/Tracker.php
index <HASH>..<HASH> 100644
--- a/classes/Gems/Tracker.php
+++ b/classes/Gems/Tracker.php
@@ -719,7 +719,7 @@ class Gems_Tracker extends \Gems_Loader_TargetLoaderAbstract implements \Gems_Tr
$trackData['gtr_track_class'] = 'AnyStepEngine';
}
- $this->_trackEngines[$trackId] = $this->_loadClass('engine_' . $trackData['gtr_track_class'], true, array($trackData));
+ $this->_trackEngines[$trackId] = $this->_loadClass('Engine_' . $trackData['gtr_track_class'], true, array($trackData));
}
return $this->_trackEngines[$trackId]; | Track Engine directory is with capital E. When using ProjectOverloader as loader, case sensitive matters on linux |
diff --git a/grid_frame.py b/grid_frame.py
index <HASH>..<HASH> 100755
--- a/grid_frame.py
+++ b/grid_frame.py
@@ -412,6 +412,7 @@ class GridFrame(wx.Frame):
# remove unneeded headers
pmag_items = sorted(builder.remove_list_headers(pmag_items))
dia = pw.HeaderDialog(self, 'columns to add', er_items, pmag_items)
+ dia.Centre()
result = dia.ShowModal()
new_headers = []
if result == 5100:
@@ -430,6 +431,7 @@ class GridFrame(wx.Frame):
self.grid.SetWindowStyle(wx.DOUBLE_BORDER)
self.main_sizer.Fit(self)
self.grid.SetWindowStyle(wx.NO_BORDER)
+ self.Centre()
self.main_sizer.Fit(self)
#
self.grid.changes = set(range(self.grid.GetNumberRows())) | UI fixes based on running through tutorials on Windows |
diff --git a/src/Symfony/Component/Serializer/Serializer.php b/src/Symfony/Component/Serializer/Serializer.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Serializer/Serializer.php
+++ b/src/Symfony/Component/Serializer/Serializer.php
@@ -28,8 +28,8 @@ use Symfony\Component\Serializer\Encoder\EncoderInterface;
*/
class Serializer implements SerializerInterface
{
- protected $normalizers = array();
- protected $encoders = array();
+ private $normalizers = array();
+ private $encoders = array();
private $normalizerCache = array();
/** | [Serializer] Some more privates |
diff --git a/src/config/hisite.php b/src/config/hisite.php
index <HASH>..<HASH> 100644
--- a/src/config/hisite.php
+++ b/src/config/hisite.php
@@ -80,13 +80,6 @@ return [
'hisite' => 'hisite.php',
],
],
- 'hisite/page' => [
- 'class' => \yii\i18n\PhpMessageSource::class,
- 'basePath' => '@hisite/messages',
- 'fileMap' => [
- 'page' => 'page.php',
- ],
- ],
],
],
], | removed `hisite/page` translation |
diff --git a/lib/spice/version.rb b/lib/spice/version.rb
index <HASH>..<HASH> 100755
--- a/lib/spice/version.rb
+++ b/lib/spice/version.rb
@@ -1,3 +1,3 @@
module Spice
- VERSION = "0.4.0"
+ VERSION = "0.4.1"
end | bump to <I> to fix platform support |
diff --git a/lib/cancan/model_adapters/data_mapper_adapter.rb b/lib/cancan/model_adapters/data_mapper_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/cancan/model_adapters/data_mapper_adapter.rb
+++ b/lib/cancan/model_adapters/data_mapper_adapter.rb
@@ -10,7 +10,8 @@ module CanCan
end
def self.matches_conditions_hash?(subject, conditions)
- subject.class.all(:conditions => conditions).include?(subject) # TODO don't use a database query here for performance and other instances
+ collection = DataMapper::Collection.new(subject.query, [ subject ])
+ !!collection.first(conditions)
end
def database_records | Use dkubb's suggestion for evaluating conditions against a Resource. |
diff --git a/pysnmp/entity/rfc3413/config.py b/pysnmp/entity/rfc3413/config.py
index <HASH>..<HASH> 100644
--- a/pysnmp/entity/rfc3413/config.py
+++ b/pysnmp/entity/rfc3413/config.py
@@ -38,6 +38,8 @@ def getTargetAddr(snmpEngine, snmpTargetAddrName):
snmpTargetAddrTAddress = tuple(
TransportAddressIPv6(snmpTargetAddrTAddress)
)
+ elif snmpTargetAddrTDomain[:len(config.snmpLocalDomain)] == config.snmpLocalDomain:
+ snmpTargetAddrTAddress = str(snmpTargetAddrTAddress)
return ( snmpTargetAddrTDomain,
snmpTargetAddrTAddress, | cast snmpLocalDomain-typed address object into a string to make it
compatible with BSD socket API |
diff --git a/src/ol-ext/interaction/measure.js b/src/ol-ext/interaction/measure.js
index <HASH>..<HASH> 100644
--- a/src/ol-ext/interaction/measure.js
+++ b/src/ol-ext/interaction/measure.js
@@ -1,5 +1,5 @@
goog.provide('ngeo.MeasureEvent');
-goog.provide('ngeo.interaction');
+goog.provide('ngeo.MeasureEventType');
goog.provide('ngeo.interaction.Measure');
goog.require('goog.dom'); | Fix goog.provides in measure.js |
diff --git a/tornado/netutil.py b/tornado/netutil.py
index <HASH>..<HASH> 100644
--- a/tornado/netutil.py
+++ b/tornado/netutil.py
@@ -362,7 +362,7 @@ else:
# than one wildcard per fragment. A survery of established
# policy among SSL implementations showed it to be a
# reasonable choice.
- raise CertificateError(
+ raise SSLCertificateError(
"too many wildcards in certificate DNS name: " + repr(dn))
if frag == '*':
# When '*' is a fragment by itself, it matches a non-empty dotless | Fix exception name in backported ssl fix. |
diff --git a/lib/puppet/provider/maillist/mailman.rb b/lib/puppet/provider/maillist/mailman.rb
index <HASH>..<HASH> 100755
--- a/lib/puppet/provider/maillist/mailman.rb
+++ b/lib/puppet/provider/maillist/mailman.rb
@@ -101,9 +101,9 @@ Puppet::Type.type(:maillist).provide(:mailman) do
# Pull the current state of the list from the full list. We're
# getting some double entendre here....
def query
- provider.class.instances.each do |list|
+ self.class.instances.each do |list|
if list.name == self.name or list.name.downcase == self.name
- return list.property_hash
+ return list.properties
end
end
nil | Fixing a small problem with the mailman type |
diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php
index <HASH>..<HASH> 100644
--- a/mod/assignment/lib.php
+++ b/mod/assignment/lib.php
@@ -1018,7 +1018,7 @@ class assignment_base {
$table->define_headers($tableheaders);
$table->define_baseurl($CFG->wwwroot.'/mod/assignment/submissions.php?id='.$this->cm->id.'&currentgroup='.$currentgroup);
- $table->sortable(true);
+ $table->sortable(true, 'lastname');//sorted by lastname by default
$table->collapsible(true);
$table->initialbars(true); | Bug #<I> - Assigment listing shows duplicate names with paged display; merged from MOODLE_<I>_STABLE |
diff --git a/server.go b/server.go
index <HASH>..<HASH> 100644
--- a/server.go
+++ b/server.go
@@ -206,7 +206,8 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
debugPre[:], debugHash[:])
}
- s.htlcSwitch = htlcswitch.New(htlcswitch.Config{
+ htlcSwitch, err := htlcswitch.New(htlcswitch.Config{
+ DB: chanDB,
SelfKey: s.identityPriv.PubKey(),
LocalChannelClose: func(pubKey []byte,
request *htlcswitch.ChanClose) {
@@ -230,8 +231,13 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
pubKey[:], err)
}
},
- FwdingLog: chanDB.ForwardingLog(),
+ FwdingLog: chanDB.ForwardingLog(),
+ SwitchPackager: channeldb.NewSwitchPackager(),
})
+ if err != nil {
+ return nil, err
+ }
+ s.htlcSwitch = htlcSwitch
// If external IP addresses have been specified, add those to the list
// of this server's addresses. We need to use the cfg.net.ResolveTCPAddr | server: initialize switch with circuit db |
diff --git a/core/DataAccess/Model.php b/core/DataAccess/Model.php
index <HASH>..<HASH> 100644
--- a/core/DataAccess/Model.php
+++ b/core/DataAccess/Model.php
@@ -282,8 +282,10 @@ class Model
public function deletePreviousArchiveStatus($numericTable, $archiveId, $doneFlag)
{
$tableWithoutLeadingPrefix = $numericTable;
- if (strlen($numericTable) >= 23) {
- $tableWithoutLeadingPrefix = substr($numericTable, strlen($numericTable) - 23);
+ $lenNumericTableWithoutPrefix = strlen('archive_numeric_MM_YYYY');
+
+ if (strlen($numericTable) >= $lenNumericTableWithoutPrefix) {
+ $tableWithoutLeadingPrefix = substr($numericTable, strlen($numericTable) - $lenNumericTableWithoutPrefix);
// we need to make sure lock name is less than 64 characters see https://github.com/piwik/piwik/issues/9131
}
$dbLockName = "rmPrevArchiveStatus.$tableWithoutLeadingPrefix.$archiveId"; | removed the hardcoded <I> and instead calculate lenght dynamically |
diff --git a/src/Util/Arr.php b/src/Util/Arr.php
index <HASH>..<HASH> 100644
--- a/src/Util/Arr.php
+++ b/src/Util/Arr.php
@@ -70,7 +70,7 @@ class Arr
}
/**
- * Get specified collection item.
+ * Get specified value in array path.
*
* @param array $data The data.
* @param array|string $path The path of array keys.
@@ -96,7 +96,22 @@ class Arr
}
/**
- * Get specified collection item.
+ * Increment specified value in array path.
+ *
+ * @param array $data The data.
+ * @param array|string $path The path of array keys.
+ * @param mixed $value The value to increment.
+ * @param string $glue [optional]
+ *
+ * @return mixed The new array.
+ */
+ public static function incrementPath(array $data, $path, $value, $glue = '.')
+ {
+ return self::setPath($data, $path, self::path($data, $path, 0, $glue) + $value, $glue);
+ }
+
+ /**
+ * Set specified value in array path.
*
* @param array $data The data.
* @param array|string $path The path of array keys. | Added Util/Arr::incrementPath() |
diff --git a/server.js b/server.js
index <HASH>..<HASH> 100644
--- a/server.js
+++ b/server.js
@@ -603,8 +603,7 @@ cache(function(data, match, sendBadge) {
try {
var data = JSON.parse(buffer);
var downloads = data.version_downloads;
- badgeData.text[1] = metric(downloads);
- badgeData.text[1] = badgeData.text[1] + ' latest version';
+ badgeData.text[1] = metric(downloads) + ' latest version';
badgeData.colorscheme = downloadCountColor(downloads);
sendBadge(format, badgeData);
} catch(e) {
@@ -630,8 +629,7 @@ cache(function(data, match, sendBadge) {
try {
var data = JSON.parse(buffer);
var downloads = data.downloads;
- badgeData.text[1] = metric(downloads);
- badgeData.text[1] = badgeData.text[1] + ' total';
+ badgeData.text[1] = metric(downloads) + ' total';
badgeData.colorscheme = downloadCountColor(downloads);
sendBadge(format, badgeData);
} catch(e) { | Gem downloads: omit needless space & code lines. |
diff --git a/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/StubServer.java b/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/StubServer.java
index <HASH>..<HASH> 100644
--- a/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/StubServer.java
+++ b/spring-cloud-contract-stub-runner/src/main/java/org/springframework/cloud/contract/stubrunner/StubServer.java
@@ -53,10 +53,15 @@ class StubServer {
}
private StubServer stubServer() {
+ this.httpServerStub.registerMappings(this.mappings);
log.info("Started stub server for project ["
+ this.stubConfiguration.toColonSeparatedDependencyNotation()
- + "] on port " + this.httpServerStub.port());
- this.httpServerStub.registerMappings(this.mappings);
+ + "] on port " + this.httpServerStub.port() + " with ["
+ + this.mappings.size() + "] mappings");
+ if (this.mappings.isEmpty() && getPort() != -1) {
+ log.warn(
+ "There are no HTTP mappings registered, if your contracts are not messaging based then something went wrong");
+ }
return this;
} | Added more logging if there are no HTTP stubs in the attached JAR. Fixes gh-<I> |
diff --git a/Tests/Controller/Admin/ReviewControllerTest.php b/Tests/Controller/Admin/ReviewControllerTest.php
index <HASH>..<HASH> 100755
--- a/Tests/Controller/Admin/ReviewControllerTest.php
+++ b/Tests/Controller/Admin/ReviewControllerTest.php
@@ -51,7 +51,10 @@ class ReviewControllerTest extends AbstractAdminControllerTestCase
public function testGridAction()
{
- $this->client->request('GET', $this->generateUrl('admin.review.grid'));
- $this->assertTrue($this->client->getResponse()->isRedirect($this->generateUrl('admin.review.index', [], true)));
+ $this->client->request('GET', $this->generateUrl('admin.review.grid'), [], [], [
+ 'HTTP_X-Requested-With' => 'XMLHttpRequest',
+ ]);
+
+ $this->assertTrue($this->client->getResponse()->isSuccessful());
}
} | Factory fixes, fixed repositories, tests, entities |
diff --git a/Fitter.py b/Fitter.py
index <HASH>..<HASH> 100644
--- a/Fitter.py
+++ b/Fitter.py
@@ -113,7 +113,7 @@ class ExtractTrack():
dz = z1 - z0
dx = x1 - x0
- # Compute distance and compare to best
+ # Compute distance and compare to best: reject x1?
if math.hypot(dz, dx) < math.hypot(z1 - z0, best_x - x0):
# The previous best was rejected, so add it to the unextracted list
leftovers.append((z1, best_x))
@@ -121,7 +121,7 @@ class ExtractTrack():
best_x = x1
else:
# Distance too far compared to best, so unextracted
- leftovers.append((z1, best_x))
+ leftovers.append((z1, x1))
# Make sure we aren't jumping too far. If we are, throw the best
# and leftovers into the unextracted bin | Found bug, need to fix: logic of unextracted points broken |
diff --git a/s3direct/views.py b/s3direct/views.py
index <HASH>..<HASH> 100644
--- a/s3direct/views.py
+++ b/s3direct/views.py
@@ -1,5 +1,4 @@
import json
-from inspect import isfunction
from django.http import HttpResponse
from django.views.decorators.http import require_POST
@@ -43,7 +42,7 @@ def get_upload_params(request):
data = json.dumps({'error': 'Invalid file type (%s).' % content_type})
return HttpResponse(data, content_type="application/json", status=400)
- if isfunction(key):
+ if hasattr(key, '__call__'):
key = key(filename)
else:
key = '%s/${filename}' % key | Add support for functool.partials in filename generation |
diff --git a/Mixtape/commands/pullmeans.py b/Mixtape/commands/pullmeans.py
index <HASH>..<HASH> 100644
--- a/Mixtape/commands/pullmeans.py
+++ b/Mixtape/commands/pullmeans.py
@@ -87,8 +87,11 @@ class PullMeansGHMM(SampleGHMM):
if len(p) > 0:
data['index'].extend(sorted_indices[-self.args.n_per_state:])
+ index_length = len(sorted_indices[-self.args.n_per_state:])
data['filename'].extend(sorted_filenms[-self.args.n_per_state:])
- data['state'].extend([k]*self.args.n_per_state)
+ filename_length = len(sorted_filenms[-self.args.n_per_state:])
+ assert len(index_length) == len(filename_length)
+ data['state'].extend([k]*index_length)
else:
print('WARNING: NO STRUCTURES ASSIGNED TO STATE=%d' % k) | prevent ValueError when trying to pull too many structures |
diff --git a/activesupport/lib/active_support/notifications/instrumenter.rb b/activesupport/lib/active_support/notifications/instrumenter.rb
index <HASH>..<HASH> 100644
--- a/activesupport/lib/active_support/notifications/instrumenter.rb
+++ b/activesupport/lib/active_support/notifications/instrumenter.rb
@@ -81,14 +81,20 @@ module ActiveSupport
@allocation_count_finish = now_allocations
end
+ # Returns the CPU time (in milliseconds) passed since the call to
+ # +start!+ and the call to +finish!+
def cpu_time
- @cpu_time_finish - @cpu_time_start
+ (@cpu_time_finish - @cpu_time_start) * 1000
end
+ # Returns the idle time time (in milliseconds) passed since the call to
+ # +start!+ and the call to +finish!+
def idle_time
duration - cpu_time
end
+ # Returns the number of allocations made since the call to +start!+ and
+ # the call to +finish!+
def allocations
@allocation_count_finish - @allocation_count_start
end | Match the units in `duration` (milliseconds) |
diff --git a/lib/danger/ci_source/gitlab_ci.rb b/lib/danger/ci_source/gitlab_ci.rb
index <HASH>..<HASH> 100644
--- a/lib/danger/ci_source/gitlab_ci.rb
+++ b/lib/danger/ci_source/gitlab_ci.rb
@@ -54,6 +54,7 @@ module Danger
if (client_version >= Gem::Version.new("13.8"))
# Gitlab 13.8.0 started returning merge requests for merge commits and squashed commits
# By checking for merge_request.state, we can ensure danger only comments on MRs which are open
+ return 0 if merge_request.nil?
return 0 unless merge_request.state == "opened"
end
else | Check for nil, before accessing merge_request |
diff --git a/stack.go b/stack.go
index <HASH>..<HASH> 100644
--- a/stack.go
+++ b/stack.go
@@ -20,7 +20,7 @@ var (
type Frame struct {
Filename string `json:"filename"`
Method string `json:"method"`
- Line int `json: "line"`
+ Line int `json:"lineno"`
}
type Stack []Frame | Fix line numbers in the payload. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -48,10 +48,9 @@ if sys.platform == 'darwin':
import setup_helper
setup_helper.install_custom_make_tarball()
-import paramiko
setup(name = "paramiko",
- version = paramiko.__version__,
+ version = "1.7.10"
description = "SSH2 protocol library",
author = "Jeff Forcier",
author_email = "jeff@bitprophet.org", | Partially revert centralized version stuff
(cherry picked from commit d9ba7a<I>c<I>b<I>ae<I>e<I>d2d9fe<I>ba<I>)
Conflicts:
setup.py |
diff --git a/pysat/_instrument.py b/pysat/_instrument.py
index <HASH>..<HASH> 100644
--- a/pysat/_instrument.py
+++ b/pysat/_instrument.py
@@ -1402,19 +1402,13 @@ class Instrument(object):
# ensure data is unique and monotonic
# check occurs after all the data padding loads, or individual load
# thus it can potentially check issues with padding or with raw data
- if (not self.index.is_monotonic_increasing):
+ if (not self.index.is_monotonic_increasing) or (not self.index.is_unique):
if self.strict_time_flag:
- raise ValueError('Loaded data is not monotonic increasing')
- else:
- # warn about changes coming in the future
- warnings.warn(' '.join(('Strict times will eventually be',
- 'enforced upon all instruments.',
- '(strict_time_flag)')),
- DeprecationWarning,
- stacklevel=2)
- if (not self.index.is_unique):
- if self.strict_time_flag:
- raise ValueError('Loaded data is not unique')
+ raise ValueError('Loaded data is not unique (',
+ not self.index.is_unique,
+ ') or not monotonic increasing (',
+ not self.index.is_monotonic_increasing,
+ ')')
else:
# warn about changes coming in the future
warnings.warn(' '.join(('Strict times will eventually be', | STY: revert to original error message |
diff --git a/bytecode/tests/__init__.py b/bytecode/tests/__init__.py
index <HASH>..<HASH> 100644
--- a/bytecode/tests/__init__.py
+++ b/bytecode/tests/__init__.py
@@ -36,7 +36,7 @@ def _format_instr_list(block, labels, lineno):
instr_list.append(text)
return '[%s]' % ',\n '.join(instr_list)
-def dump_code(code, lineno=True):
+def dump_bytecode(code, lineno=True):
"""
Use this function to write unit tests: copy/paste its output to
write a self.assertBlocksEqual() check. | tests: rename dump_code to dump_bytecode |
diff --git a/plex/objects/library/container.py b/plex/objects/library/container.py
index <HASH>..<HASH> 100644
--- a/plex/objects/library/container.py
+++ b/plex/objects/library/container.py
@@ -33,3 +33,9 @@ class MediaContainer(Container):
}
return Section.construct(client, node, attribute_map, child=True)
+
+ def __iter__(self):
+ for item in super(MediaContainer, self).__iter__():
+ item.section = self.section
+
+ yield item | Update [MediaContainer] children with the correct `section` object |
diff --git a/lib/releaf/rspec/helpers.rb b/lib/releaf/rspec/helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/releaf/rspec/helpers.rb
+++ b/lib/releaf/rspec/helpers.rb
@@ -22,6 +22,12 @@ module Releaf
return user
end
+ def within_dialog &block
+ find(".dialog") do
+ yield
+ end
+ end
+
def save_and_check_response status_text
click_button 'Save'
expect(page).to have_css('body > .notifications .notification[data-id="resource_status"][data-type="success"]', text: status_text) | "within_dialog" matcher scope added |
diff --git a/ipywidgets/static/widgets/js/manager.js b/ipywidgets/static/widgets/js/manager.js
index <HASH>..<HASH> 100644
--- a/ipywidgets/static/widgets/js/manager.js
+++ b/ipywidgets/static/widgets/js/manager.js
@@ -169,17 +169,17 @@ define([
* @return {Promise<WidgetModel>}
*/
ManagerBase.prototype.new_widget = function(options) {
- var comm;
- if (!options.comm) {
- comm = Promise.resolve(options.comm);
+ var commPromise;
+ if (options.comm) {
+ commPromise = Promise.resolve(options.comm);
} else {
- comm = this._create_comm('ipython.widget', options.model_id,
+ commPromise = this._create_comm('ipython.widget', options.model_id,
{'widget_class': options.widget_class});
}
var options_clone = _.clone(options);
var that = this;
- return comm.then(function(comm) {
+ return commPromise.then(function(comm) {
options_clone.comm = comm;
return that.new_model(options_clone).then(function(model) {
// Requesting the state to populate default values. | fix typo in comm creation conditional |
diff --git a/client/client.go b/client/client.go
index <HASH>..<HASH> 100644
--- a/client/client.go
+++ b/client/client.go
@@ -299,13 +299,14 @@ type redirectFollowingHTTPClient struct {
}
func (r *redirectFollowingHTTPClient) Do(ctx context.Context, act httpAction) (*http.Response, []byte, error) {
+ next := act
for i := 0; i < 100; i++ {
if i > 0 {
if err := r.checkRedirect(i); err != nil {
return nil, nil, err
}
}
- resp, body, err := r.client.Do(ctx, act)
+ resp, body, err := r.client.Do(ctx, next)
if err != nil {
return nil, nil, err
}
@@ -318,7 +319,7 @@ func (r *redirectFollowingHTTPClient) Do(ctx context.Context, act httpAction) (*
if err != nil {
return nil, nil, fmt.Errorf("Location header not valid URL: %s", hdr)
}
- act = &redirectedHTTPAction{
+ next = &redirectedHTTPAction{
action: act,
location: *loc,
} | client: don't use nested actions |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,7 @@ setup(
data_files=[(
(BASE_DIR, ['data/nssm_original.exe'])
)],
- install_requires=['indy-plenum-dev==1.6.552',
+ install_requires=['indy-plenum-dev==1.6.553',
'indy-anoncreds-dev==1.0.32',
'python-dateutil',
'timeout-decorator==0.4.0'], | INDY-<I>: Updated indy-plenum dependency |
diff --git a/lib/dragonfly/configurable.rb b/lib/dragonfly/configurable.rb
index <HASH>..<HASH> 100644
--- a/lib/dragonfly/configurable.rb
+++ b/lib/dragonfly/configurable.rb
@@ -49,7 +49,6 @@ module Dragonfly
@obj = obj
instance_eval(&block)
@obj = nil
- obj
end
def configure_with_plugin(obj, plugin, *args, &block)
@@ -86,10 +85,12 @@ module Dragonfly
class_eval do
def configure(&block)
self.class.configurer.configure(self, &block)
+ self
end
def configure_with(plugin, *args, &block)
self.class.configurer.configure_with_plugin(self, plugin, *args, &block)
+ self
end
end
end | return self from configure and configure_with |
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
@@ -802,7 +802,8 @@ class Firewall(object):
vid = match.get(REST_DL_VLAN, VLANID_NONE)
rule_id = Firewall._cookie_to_ruleid(cookie)
delete_ids.setdefault(vid, '')
- delete_ids[vid] += '%d,' % rule_id
+ delete_ids[vid] += (('%d' if delete_ids[vid] == ''
+ else ',%d') % rule_id)
msg = []
for vid, rule_ids in delete_ids.items(): | rest_firewall: remove of an unnecessary comma of json response |
diff --git a/tests/test_slsb.py b/tests/test_slsb.py
index <HASH>..<HASH> 100644
--- a/tests/test_slsb.py
+++ b/tests/test_slsb.py
@@ -57,6 +57,10 @@ class TestSLSB(unittest.TestCase):
with open("./examples/lorem_ipsum.txt") as f:
message = f.read()
secret = slsb.hide("./examples/pictures/Lenna.png", message)
+ secret.save("./image.png")
+
+ clear_message = slsb.reveal("./image.png")
+ self.assertEqual(message, clear_message)
def test_with_too_long_message(self):
with open("./examples/lorem_ipsum.txt") as f: | Bug fix: forgot to write the results in a file. |
diff --git a/Tests/DependencyInjection/NetgenContentBrowserExtensionTest.php b/Tests/DependencyInjection/NetgenContentBrowserExtensionTest.php
index <HASH>..<HASH> 100644
--- a/Tests/DependencyInjection/NetgenContentBrowserExtensionTest.php
+++ b/Tests/DependencyInjection/NetgenContentBrowserExtensionTest.php
@@ -85,6 +85,7 @@ class NetgenContentBrowserExtensionTest extends AbstractExtensionTestCase
$this->load();
$this->assertContainerBuilderHasService('netgen_content_browser.controller.api.tree');
+ $this->assertContainerBuilderHasService('netgen_content_browser.ezpublish.thumbnail_loader.variation');
$this->assertContainerBuilderHasService('netgen_content_browser.ezpublish.location_builder');
$this->assertContainerBuilderHasService('netgen_content_browser.ezpublish.adapter');
$this->assertContainerBuilderHasService('netgen_content_browser.repository');
@@ -93,5 +94,10 @@ class NetgenContentBrowserExtensionTest extends AbstractExtensionTestCase
'netgen_content_browser.adapter',
'netgen_content_browser.ezpublish.adapter'
);
+
+ $this->assertContainerBuilderHasAlias(
+ 'netgen_content_browser.ezpublish.thumbnail_loader',
+ 'netgen_content_browser.ezpublish.thumbnail_loader.variation'
+ );
}
} | Refactor thumbnail loader into separate service |
diff --git a/src/Handler/GuzzleV5/GuzzleHandler.php b/src/Handler/GuzzleV5/GuzzleHandler.php
index <HASH>..<HASH> 100644
--- a/src/Handler/GuzzleV5/GuzzleHandler.php
+++ b/src/Handler/GuzzleV5/GuzzleHandler.php
@@ -26,14 +26,15 @@ use Psr\Http\Message\StreamInterface as Psr7StreamInterface;
class GuzzleHandler
{
private static $validOptions = [
- 'proxy' => true,
- 'verify' => true,
- 'timeout' => true,
- 'debug' => true,
- 'connect_timeout' => true,
- 'stream' => true,
- 'delay' => true,
- 'sink' => true,
+ 'proxy' => true,
+ 'expect' => true,
+ 'verify' => true,
+ 'timeout' => true,
+ 'debug' => true,
+ 'connect_timeout' => true,
+ 'stream' => true,
+ 'delay' => true,
+ 'sink' => true,
];
/** @var ClientInterface */ | Pass Expect http config in GuzzleV5 handler (#<I>) |
diff --git a/service_configuration_lib/__init__.py b/service_configuration_lib/__init__.py
index <HASH>..<HASH> 100644
--- a/service_configuration_lib/__init__.py
+++ b/service_configuration_lib/__init__.py
@@ -84,11 +84,11 @@ def read_services_configuration(soa_dir=DEFAULT_SOA_DIR):
# Not all services have all fields. Who knows what might be in there
# You can't depend on every service having a vip, for example
all_services = {}
- for rootdir, dirs, _ in os.walk(soa_dir):
- for service_dirname in dirs:
- service_name = service_dirname
- service_info = read_service_configuration_from_dir(rootdir, service_dirname)
- all_services.update( { service_name: service_info } )
+ rootdir = os.path.abspath(soa_dir)
+ for service_dirname in os.listdir(rootdir):
+ service_name = service_dirname
+ service_info = read_service_configuration_from_dir(rootdir, service_dirname)
+ all_services.update( { service_name: service_info } )
return all_services
def services_that_run_here(): | cleaning up read_services_configuration a bit |
diff --git a/src/Creative/InLine/Linear.php b/src/Creative/InLine/Linear.php
index <HASH>..<HASH> 100644
--- a/src/Creative/InLine/Linear.php
+++ b/src/Creative/InLine/Linear.php
@@ -81,6 +81,7 @@ class Linear extends AbstractLinearCreative
// object
$adParams = new AdParameters($this->adParametersDomElement);
+
return $adParams->setParams($params);
}
diff --git a/src/Creative/InLine/Linear/MediaFile.php b/src/Creative/InLine/Linear/MediaFile.php
index <HASH>..<HASH> 100644
--- a/src/Creative/InLine/Linear/MediaFile.php
+++ b/src/Creative/InLine/Linear/MediaFile.php
@@ -79,6 +79,8 @@ class MediaFile
}
/**
+ * Please note that this attribute is deprecated since VAST 4.1 along with VPAID
+ *
* @param string $value
* @return $this
*/ | Added comment about attribute deprecation in VAST <I>. |
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -394,7 +394,7 @@ module.exports = S => {
} catch (err) {
return this._reply500(response, `Error while parsing template "${contentType}" for ${funName}`, err, requestId);
}
- } else if (typeof request.payload === 'object') {
+ } else if (request.payload && typeof request.payload === 'object') {
event = request.payload;
} | Handle requests without payload or mapping template |
diff --git a/packages/@vue/cli-service/lib/commands/build/index.js b/packages/@vue/cli-service/lib/commands/build/index.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-service/lib/commands/build/index.js
+++ b/packages/@vue/cli-service/lib/commands/build/index.js
@@ -226,7 +226,7 @@ async function build (args, api, options) {
isFreshBuild
) {
console.log(
- chalk.gray(`Tip: the direcotry is meant to be served by an HTTP server, and will not work if\n` +
+ chalk.gray(`Tip: the directory is meant to be served by an HTTP server, and will not work if\n` +
`you open it directly over file:// protocol. To preview it locally, use an HTTP\n` +
`server like the ${chalk.yellow(`serve`)} package on npm.\n`)
) | fix: typo (#<I>)
Fixes typo in console.log output when the build is the first build
(direcotry => directory) |
diff --git a/qunit/qunit.js b/qunit/qunit.js
index <HASH>..<HASH> 100644
--- a/qunit/qunit.js
+++ b/qunit/qunit.js
@@ -544,7 +544,7 @@ extend(QUnit, {
var qunit = id( "qunit" );
if ( qunit ) {
qunit.innerHTML =
- '<h1 id="qunit-header">' + document.title + '</h1>' +
+ '<h1 id="qunit-header">' + escapeInnerText( document.title ) + '</h1>' +
'<h2 id="qunit-banner"></h2>' +
'<div id="qunit-testrunner-toolbar"></div>' +
'<h2 id="qunit-userAgent"></h2>' + | Escape document.title before inserting into markup. Extends fix for #<I> |
diff --git a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java
+++ b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java
@@ -693,7 +693,7 @@ public class AboutJenkins extends Component {
for (PluginWrapper w : plugins) {
if (w.isActive()) {
- out.println("RUN curl -L $JENKINS_UC/plugins/"+w.getShortName()+"/"+w.getVersion()+"/"+w.getShortName()+".hpi"
+ out.println("RUN curl -L $JENKINS_UC/download/plugins/"+w.getShortName()+"/"+w.getVersion()+"/"+w.getShortName()+".hpi"
+ " -o /usr/share/jenkins/ref/plugins/"+w.getShortName()+".jpi");
}
} | Fix download url to plugins
The url missed the "download" part of the url to access the plugins. The
curl command didn't output error but the plugins downloaded were html
files containing the <I> message. |
diff --git a/src/exporters/file.js b/src/exporters/file.js
index <HASH>..<HASH> 100644
--- a/src/exporters/file.js
+++ b/src/exporters/file.js
@@ -3,28 +3,33 @@
const UnixFS = require('ipfs-unixfs')
const pull = require('pull-stream')
-function extractContent (node) {
- return UnixFS.unmarshal(node.data).data
-}
-
// Logic to export a single (possibly chunked) unixfs file.
module.exports = (node, name, ds) => {
+ const file = UnixFS.unmarshal(node.data)
let content
if (node.links.length === 0) {
- const c = extractContent(node)
- content = pull.values([c])
+ content = pull.values([file.data])
} else {
content = pull(
pull.values(node.links),
pull.map((link) => ds.getStream(link.hash)),
pull.flatten(),
- pull.map(extractContent)
+ pull.map((node) => {
+ try {
+ const ex = UnixFS.unmarshal(node.data)
+ return ex.data
+ } catch (err) {
+ console.error(node)
+ throw new Error('Failed to unmarshal node')
+ }
+ })
)
}
return pull.values([{
content: content,
- path: name
+ path: name,
+ size: file.fileSize()
}])
} | feat(exporter): return file sizes |
diff --git a/lib/spatial_features/has_spatial_features.rb b/lib/spatial_features/has_spatial_features.rb
index <HASH>..<HASH> 100644
--- a/lib/spatial_features/has_spatial_features.rb
+++ b/lib/spatial_features/has_spatial_features.rb
@@ -5,7 +5,9 @@ module SpatialFeatures
scope :with_features, lambda { where(:id => Feature.select(:spatial_model_id).where(:spatial_model_type => name)) }
scope :without_features, lambda { where.not(:id => Feature.select(:spatial_model_id).where(:spatial_model_type => name)) }
- has_many :spatial_cache, :as => :spatial_model
+ has_many :spatial_cache, :as => :spatial_model, :dependent => :delete_all
+ has_many :model_a_spatial_proximities, :as => :model_a, :class_name => 'SpatialProximity', :dependent => :delete_all
+ has_many :model_b_spatial_proximities, :as => :model_b, :class_name => 'SpatialProximity', :dependent => :delete_all
extend SpatialFeatures::ClassMethods
include SpatialFeatures::InstanceMethods | Destroy cache when model is destroyed. |
diff --git a/app/src/Bolt/YamlUpdater.php b/app/src/Bolt/YamlUpdater.php
index <HASH>..<HASH> 100644
--- a/app/src/Bolt/YamlUpdater.php
+++ b/app/src/Bolt/YamlUpdater.php
@@ -62,7 +62,7 @@ class YamlUpdater
/**
* Get a value from the yml. return an array with info
*
- * @param string $key
+ * @param string $key
* @return bool|array
*/
public function get($key)
@@ -86,8 +86,8 @@ class YamlUpdater
/**
* Find a specific part of the key, starting from $this->pointer
*
- * @param $keypart
- * @param int $indent
+ * @param string $keypart
+ * @param int $indent
* @return bool|int
*/
private function find($keypart, $indent = 0)
@@ -171,7 +171,6 @@ class YamlUpdater
return $value;
}
-
/**
* Verify if the modified yaml is still a valid .yml file, and if we
* are actually allowed to write and update the current file.
@@ -183,7 +182,7 @@ class YamlUpdater
/**
* Save our modified .yml file.
- * @param bool $makebackup
+ * @param bool $makebackup
* @return bool true if save was successful
*/
public function save($makebackup = true) | PSR-2 clean up of YamlUpdater.php |
diff --git a/bindings/py/nupic/bindings/regions/PyRegion.py b/bindings/py/nupic/bindings/regions/PyRegion.py
index <HASH>..<HASH> 100644
--- a/bindings/py/nupic/bindings/regions/PyRegion.py
+++ b/bindings/py/nupic/bindings/regions/PyRegion.py
@@ -292,6 +292,27 @@ class PyRegion(object):
def write(self, proto):
+ """Calls writeToProto on subclass after converting proto to specific type
+ using getProtoType().
+
+ proto: PyRegionProto capnproto object
+ """
+ regionImpl = proto.regionImpl.as_struct(self.getProtoType())
+ self.writeToProto(regionImpl)
+
+
+ @classmethod
+ def read(cls, proto):
+ """Calls readFromProto on subclass after converting proto to specific type
+ using getProtoType().
+
+ proto: PyRegionProto capnproto object
+ """
+ regionImpl = proto.regionImpl.as_struct(cls.getProtoType())
+ return cls.readFromProto(regionImpl)
+
+
+ def writeToProto(self, proto):
"""Write state to proto object.
The type of proto is determined by getProtoType().
@@ -300,7 +321,7 @@ class PyRegion(object):
@classmethod
- def read(cls, proto):
+ def readFromProto(cls, proto):
"""Read state from proto object.
The type of proto is determined by getProtoType(). | Refactor PyRegion subclasses to take specific proto object in read |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -111,7 +111,6 @@ setup(
"matplotlib",
"gammapy>=0.18",
"healpy",
- "astropy-healpix",
- "fermitools"
+ "astropy-healpix"
],
) | fermitools not in pip |
diff --git a/config/config.go b/config/config.go
index <HASH>..<HASH> 100644
--- a/config/config.go
+++ b/config/config.go
@@ -6,6 +6,7 @@ import (
steno "github.com/cloudfoundry/gosteno"
"io/ioutil"
+ "runtime"
"strconv"
"time"
)
@@ -90,7 +91,7 @@ var defaultConfig = Config{
Port: 8081,
Index: 0,
- GoMaxProcs: 8,
+ GoMaxProcs: -1,
EndpointTimeoutInSeconds: 60,
@@ -112,6 +113,10 @@ func DefaultConfig() *Config {
func (c *Config) Process() {
var err error
+ if c.GoMaxProcs == -1 {
+ c.GoMaxProcs = runtime.NumCPU()
+ }
+
c.PruneStaleDropletsInterval = time.Duration(c.PruneStaleDropletsIntervalInSeconds) * time.Second
c.DropletStaleThreshold = time.Duration(c.DropletStaleThresholdInSeconds) * time.Second
c.PublishActiveAppsInterval = time.Duration(c.PublishActiveAppsIntervalInSeconds) * time.Second | Default GOMAXPROCS to the number of available CPUs
[#<I>] |
diff --git a/bika/lims/browser/dashboard.py b/bika/lims/browser/dashboard.py
index <HASH>..<HASH> 100644
--- a/bika/lims/browser/dashboard.py
+++ b/bika/lims/browser/dashboard.py
@@ -110,9 +110,9 @@ class DashboardView(BrowserView):
'title': <section_title>,
'panels': <array of panels>}
"""
- sections = [self.get_analysisrequests_section(),
- self.get_worksheets_section(),
- self.get_analyses_section()]
+ sections = [self.get_analyses_section(),
+ self.get_analysisrequests_section(),
+ self.get_worksheets_section()]
return sections
def get_analysisrequests_section(self): | Panels in dashboard. Display Analyses before Analysis Requests |
diff --git a/.travis.yml b/.travis.yml
index <HASH>..<HASH> 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,7 @@ language: python
cache: pip
sudo: false
env:
-- APISPEC_VERSION="==1.0.0b5"
+- APISPEC_VERSION="==1.0.0rc1"
- APISPEC_VERSION=""
- MARSHMALLOW_VERSION="==2.13.0"
- MARSHMALLOW_VERSION=""
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ REQUIRES = [
'flask>=0.10.1',
'marshmallow>=2.0.0',
'webargs>=0.18.0',
- 'apispec==1.0.0b5',
+ 'apispec==1.0.0rc1',
]
def find_version(fname):
diff --git a/tests/test_openapi.py b/tests/test_openapi.py
index <HASH>..<HASH> 100644
--- a/tests/test_openapi.py
+++ b/tests/test_openapi.py
@@ -13,7 +13,7 @@ from flask_apispec.apidoc import ViewConverter, ResourceConverter
@pytest.fixture()
def marshmallow_plugin():
- return MarshmallowPlugin()
+ return MarshmallowPlugin(schema_name_resolver=lambda x: None)
@pytest.fixture
def spec(marshmallow_plugin): | Compatibility with openapi <I>rc1 |
diff --git a/api/client/commands.go b/api/client/commands.go
index <HASH>..<HASH> 100644
--- a/api/client/commands.go
+++ b/api/client/commands.go
@@ -1161,7 +1161,7 @@ func (cli *DockerCli) CmdImport(args ...string) error {
v.Set("repo", repository)
if cmd.NArg() == 3 {
- fmt.Fprintf(cli.err, "[DEPRECATED] The format 'URL|- [REPOSITORY [TAG]]' as been deprecated. Please use URL|- [REPOSITORY[:TAG]]\n")
+ fmt.Fprintf(cli.err, "[DEPRECATED] The format 'URL|- [REPOSITORY [TAG]]' has been deprecated. Please use URL|- [REPOSITORY[:TAG]]\n")
v.Set("tag", cmd.Arg(2))
} | Fix typo in deprecation message.
Because the doc maintainers don't like Cockney. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ setup(
author='Philipp Adelt',
author_email='autosort-github@philipp.adelt.net ',
url='https://github.com/padelt/temper-python',
- version='1.2.3',
+ version='1.2.4',
description='Reads temperature from TEMPerV1 devices (USB 0c45:7401)',
long_description=open('README.md').read(),
packages=['temperusb'], | Bump PyPI version to <I> |
diff --git a/python/dllib/src/bigdl/dllib/keras/utils.py b/python/dllib/src/bigdl/dllib/keras/utils.py
index <HASH>..<HASH> 100644
--- a/python/dllib/src/bigdl/dllib/keras/utils.py
+++ b/python/dllib/src/bigdl/dllib/keras/utils.py
@@ -74,7 +74,7 @@ def to_bigdl_metric(metric):
elif metric == "mae":
return MAE()
elif metric == "auc":
- return AUC(1000)
+ return AUC()
elif metric == "loss":
return Loss()
elif metric == "treennaccuracy": | Update default value of AUC to <I> (#<I>)
* update
* typo |
diff --git a/src/server/server.go b/src/server/server.go
index <HASH>..<HASH> 100644
--- a/src/server/server.go
+++ b/src/server/server.go
@@ -144,9 +144,11 @@ func (self *Server) ListenAndServe() error {
port := udpInput.Port
database := udpInput.Database
- if port <= 0 || database == "" {
- log.Warn("Cannot start udp server. please check your configuration")
+ if port <= 0 {
+ log.Warn("Cannot start udp server on port %d. please check your configuration", port)
continue
+ } else if database == "" {
+ log.Warn("Cannot start udp server for database=\"\". please check your configuration")
}
log.Info("Starting UDP Listener on port %d to database %s", port, database) | Make start udp server log message more detailed.
Originally it logged the same message when either the port or database
config settings were wrong. Now it logs which setting was wrong. |
diff --git a/lib/migrate.js b/lib/migrate.js
index <HASH>..<HASH> 100644
--- a/lib/migrate.js
+++ b/lib/migrate.js
@@ -5,7 +5,7 @@ var loader = require('./loader')
var level1props = ['amd', 'bail', 'cache', 'context', 'dependencies',
'devServer', 'devtool', 'entry', 'externals', 'loader', 'module', 'name',
- 'node', 'output', 'plugins', 'profile', 'recordsInputPath',
+ 'node', 'output', 'performance', 'plugins', 'profile', 'recordsInputPath',
'recordsOutputPath', 'recordsPath', 'resolve', 'resolveLoader', 'stats',
'target', 'watch', 'watchOptions'] | compatible webpack beta <I> |
diff --git a/lib/grabber.js b/lib/grabber.js
index <HASH>..<HASH> 100644
--- a/lib/grabber.js
+++ b/lib/grabber.js
@@ -29,6 +29,8 @@ Grabber.prototype.download = function(remoteImagePath, callback) {
tmp.file({dir: this.tmp_dir, postfix: "." + extension}, function(err, localImagePath, fd) {
+ tmp.closeSync(fd); // close immediately, we do not use this file handle.
+
console.log('downloading', remoteImagePath, 'from s3 to local file', localImagePath);
if (err) {
diff --git a/lib/thumbnailer.js b/lib/thumbnailer.js
index <HASH>..<HASH> 100644
--- a/lib/thumbnailer.js
+++ b/lib/thumbnailer.js
@@ -44,6 +44,7 @@ Thumbnailer.prototype.createConversionPath = function(callback) {
var _this = this;
tmp.file({dir: this.tmp_dir, postfix: ".jpg"}, function(err, convertedPath, fd) {
+ fs.closeSync(fd); // close immediately, we do not use this file handle.
_this.convertedPath = convertedPath;
callback(err);
}); | Fixing leaking file descriptors. |
diff --git a/art/test.py b/art/test.py
index <HASH>..<HASH> 100644
--- a/art/test.py
+++ b/art/test.py
@@ -1003,6 +1003,7 @@ art.art.artError: number should have int type
>>> aprint("love_you",number=1,text="")
»-(¯`·.·´¯)-><-(¯`·.·´¯)-«
>>> cov.stop()
+>>> cov.report()
>>> cov.save()
''' | fix : report added to test file |
diff --git a/libraries/botframework-connector/microsoft/botframework/connector/auth/jwt_token_validation.py b/libraries/botframework-connector/microsoft/botframework/connector/auth/jwt_token_validation.py
index <HASH>..<HASH> 100644
--- a/libraries/botframework-connector/microsoft/botframework/connector/auth/jwt_token_validation.py
+++ b/libraries/botframework-connector/microsoft/botframework/connector/auth/jwt_token_validation.py
@@ -7,7 +7,9 @@ from .channel_validation import ChannelValidation
from .microsoft_app_credentials import MicrosoftAppCredentials
class JwtTokenValidation:
- async def assertValidActivity(self, activity, authHeader, credentials):
+
+ @staticmethod
+ async def assertValidActivity(activity, authHeader, credentials):
"""Validates the security tokens required by the Bot Framework Protocol. Throws on any exceptions.
activity: The incoming Activity from the Bot Framework or the Emulator
authHeader:The Bearer token included as part of the request | Converted assertValidActivity method to static method |
diff --git a/bundles/EzPublishBlockManagerBundle/DependencyInjection/NetgenEzPublishBlockManagerExtension.php b/bundles/EzPublishBlockManagerBundle/DependencyInjection/NetgenEzPublishBlockManagerExtension.php
index <HASH>..<HASH> 100644
--- a/bundles/EzPublishBlockManagerBundle/DependencyInjection/NetgenEzPublishBlockManagerExtension.php
+++ b/bundles/EzPublishBlockManagerBundle/DependencyInjection/NetgenEzPublishBlockManagerExtension.php
@@ -119,8 +119,6 @@ class NetgenEzPublishBlockManagerExtension extends Extension
}
}
- unset($config['system']);
-
return $config;
};
} | Do not remove system key from processed semantic config, we are just not going to use it |
diff --git a/test/test_environment.py b/test/test_environment.py
index <HASH>..<HASH> 100644
--- a/test/test_environment.py
+++ b/test/test_environment.py
@@ -114,8 +114,11 @@ class TestEnvironment(object):
db_user, db_password, host, port)
# TODO: use PyMongo's add_user once that's fixed.
- self.sync_cx.admin.command(
- 'createUser', db_user, pwd=db_password, roles=['root'])
+ try:
+ self.sync_cx.admin.command(
+ 'createUser', db_user, pwd=db_password, roles=['root'])
+ except pymongo.errors.OperationFailure:
+ print("Couldn't create root user, prior test didn't clean up?")
self.sync_cx.admin.authenticate(db_user, db_password) | Let tests proceed with auth even if previous run didn't clean up. |
diff --git a/salt/returners/mysql.py b/salt/returners/mysql.py
index <HASH>..<HASH> 100644
--- a/salt/returners/mysql.py
+++ b/salt/returners/mysql.py
@@ -70,6 +70,7 @@ Use the following mysql database schema::
DROP TABLE IF EXISTS `salt_events`;
CREATE TABLE `salt_events` (
+ `id` BIGINT NOT NULL AUTO_INCREMENT,
`tag` varchar(255) NOT NULL,
`data` varchar(1024) NOT NULL,
`alter_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | Let's create an id field and make it large |
diff --git a/contentbank/contenttype/h5p/classes/content.php b/contentbank/contenttype/h5p/classes/content.php
index <HASH>..<HASH> 100644
--- a/contentbank/contenttype/h5p/classes/content.php
+++ b/contentbank/contenttype/h5p/classes/content.php
@@ -42,6 +42,12 @@ class content extends \core_contentbank\content {
public function is_view_allowed(): bool {
// Force H5P content to be deployed.
$fileurl = $this->get_file_url();
+ if (empty($fileurl)) {
+ // This should never happen because H5P contents should have always a file. However, this extra-checked has been added
+ // to avoid the contentbank stop working if, for any unkonwn/weird reason, the file doesn't exist.
+ return false;
+ }
+
// Skip capability check when creating the H5P content (because it has been created by trusted users).
$h5pplayer = new \core_h5p\player($fileurl, new \stdClass(), true, '', true);
// Flush error messages. | MDL-<I> contenttype_h5p: Improve error handling
In MoodleCloud it was raised that, in some cases, loading the content
bank, from a course page, gives an "Invalid H5P content URL", not
offering any way to delete the offending content or create new one.
An extra-check has been added to the "is_view_allowed" method to
guarantee the H5P API is called only if the H5P content has a file. |
diff --git a/app/public/js/nodes.js b/app/public/js/nodes.js
index <HASH>..<HASH> 100644
--- a/app/public/js/nodes.js
+++ b/app/public/js/nodes.js
@@ -35,7 +35,6 @@ ready( () => {
}
}
-
function build_line(top, file, key, value, overriden) {
if (overriden === true) {
rowclass = "row overriden";
diff --git a/app/web.rb b/app/web.rb
index <HASH>..<HASH> 100644
--- a/app/web.rb
+++ b/app/web.rb
@@ -29,6 +29,24 @@ module HieravizApp
end
case settings.configdata['auth_method']
+ when 'dummy'
+
+ get '/logout' do
+ erb :logout, layout: :_layout
+ end
+
+ helpers do
+ def get_username
+ 'Dummy'
+ end
+ def get_userinfo
+ { 'username' => 'Dummy' }
+ end
+ def check_authorization
+ true
+ end
+ end
+
when 'http'
use Rack::Auth::Basic, "Puppet Private Access" do |username, password| | add dummy auth for development offline |
diff --git a/lib/procodile/instance.rb b/lib/procodile/instance.rb
index <HASH>..<HASH> 100644
--- a/lib/procodile/instance.rb
+++ b/lib/procodile/instance.rb
@@ -1,3 +1,4 @@
+require 'fileutils'
require 'procodile/logger'
require 'procodile/rbenv'
@@ -135,6 +136,7 @@ module Procodile
end
if self.process.log_path && @supervisor.run_options[:force_single_log] != true
+ FileUtils.mkdir_p(File.dirname(self.process.log_path))
log_destination = File.open(self.process.log_path, 'a')
io = nil
else | fix: create the log directory if it doesn't exist |
diff --git a/visidata/errors.py b/visidata/errors.py
index <HASH>..<HASH> 100644
--- a/visidata/errors.py
+++ b/visidata/errors.py
@@ -4,9 +4,6 @@ from visidata import vd, VisiData, options
__all__ = ['stacktrace', 'ExpectedException']
-import warnings
-warnings.simplefilter('error')
-
class ExpectedException(Exception):
'an expected exception'
pass
diff --git a/visidata/main.py b/visidata/main.py
index <HASH>..<HASH> 100755
--- a/visidata/main.py
+++ b/visidata/main.py
@@ -10,6 +10,7 @@ import os
import io
import sys
import locale
+import warnings
from visidata import vd, option, options, status, run, BaseSheet, AttrDict
from visidata import Path, openSource, saveSheets, domotd
@@ -76,6 +77,7 @@ optalias('c', 'config')
def main_vd():
'Open the given sources using the VisiData interface.'
locale.setlocale(locale.LC_ALL, '')
+ warnings.showwarning = vd.warning
flPipedInput = not sys.stdin.isatty()
flPipedOutput = not sys.stdout.isatty() | [warnings] instead of filtering, output warnings to status |
diff --git a/lib/git-process/github_service.rb b/lib/git-process/github_service.rb
index <HASH>..<HASH> 100644
--- a/lib/git-process/github_service.rb
+++ b/lib/git-process/github_service.rb
@@ -122,7 +122,7 @@ module GitHubService
def create_authorization
- logger.info("Authorizing this to work with your repos.")
+ logger.info("Authorizing #{user} to work with #{site}.")
auth = pw_client.create_authorization(:scopes => ['repo', 'user', 'gist'],
:note => 'Git-Process',
:note_url => 'http://jdigger.github.com/git-process') | Improved GH auth logging. |
diff --git a/actstream/tests.py b/actstream/tests.py
index <HASH>..<HASH> 100644
--- a/actstream/tests.py
+++ b/actstream/tests.py
@@ -163,10 +163,15 @@ class ActivityTestCase(ActivityBaseTestCase):
self.assertEquals(f1, f2, "Should have received the same Follow "
"object that I first submitted")
- def test_zzzz_no_orphaned_actions(self):
+ def test_y_no_orphaned_follows(self):
+ follows = Follow.objects.count()
+ self.user2.delete()
+ self.assertEqual(follows - 1, Follow.objects.count())
+
+ def test_z_no_orphaned_actions(self):
actions = self.user1.actor_actions.count()
self.user2.delete()
- self.assertEqual(actions, self.user1.actor_actions.count() + 1)
+ self.assertEqual(actions - 1, self.user1.actor_actions.count())
def test_generic_relation_accessors(self):
self.assertEqual(self.user2.actor_actions.count(), 2) | make maths more readable, added test for orphaned follows |
diff --git a/src/Controller/ConfigurableBase.php b/src/Controller/ConfigurableBase.php
index <HASH>..<HASH> 100644
--- a/src/Controller/ConfigurableBase.php
+++ b/src/Controller/ConfigurableBase.php
@@ -152,8 +152,9 @@ abstract class ConfigurableBase extends Base
$callbackResolver = $this->callbackResolver;
return function (Request $request) use ($callback, $callbackResolver) {
if (!substr($callback, 0, 2) === '::') {
- return $callback;
+ return $callbackResolver->resolveCallback($callback);
}
+
$controller = $callbackResolver->resolveCallback($request->attributes->get('_controller'));
if (is_array($controller)) {
list($cls, $_) = $controller;
@@ -163,6 +164,7 @@ abstract class ConfigurableBase extends Base
return null;
}
$callback = array($cls, substr($callback, 2));
+ $callback = $callbackResolver->resolveCallback($callback);
return $callback;
};
} | Resolving callbacks for good measure |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.