diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/SearchableTrait.php b/src/SearchableTrait.php
index <HASH>..<HASH> 100644
--- a/src/SearchableTrait.php
+++ b/src/SearchableTrait.php
@@ -87,7 +87,11 @@ trait SearchableTrait
$this->makeGroupBy($query);
+ $clone_bindings = $query->getBindings();
+ $query->setBindings([]);
+
$this->addBindingsToQuery($query, $this->search_bindings);
+ $this->addBindingsToQuery($query, $clone_bindings);
if(is_callable($restriction)) {
$query = $restriction($query);
@@ -337,6 +341,12 @@ trait SearchableTrait
} else {
$original->from(DB::connection($this->connection)->raw("({$clone->toSql()}) as `{$tableName}`"));
}
- $original->mergeBindings($clone->getQuery());
+
+ $original->setBindings(
+ array_merge_recursive(
+ $clone->getBindings(),
+ $original->getBindings()
+ )
+ );
}
}
|
fix for bindings order when using where clause
Bindings order were wrong.
|
diff --git a/src/mesh.js b/src/mesh.js
index <HASH>..<HASH> 100644
--- a/src/mesh.js
+++ b/src/mesh.js
@@ -528,7 +528,7 @@ export default class Mesh {
break;
case Layout.UV.key:
dataView.setFloat32(offset, this.textures[i * 2], true);
- dataView.setFloat32(offset + 4, this.vertices[i * 2 + 1], true);
+ dataView.setFloat32(offset + 4, this.textures[i * 2 + 1], true);
break;
case Layout.NORMAL.key:
dataView.setFloat32(offset, this.vertexNormals[i * 3], true);
|
Fix bug in Layout buffer data for UV textures.
|
diff --git a/scripts/updateLicense.py b/scripts/updateLicense.py
index <HASH>..<HASH> 100644
--- a/scripts/updateLicense.py
+++ b/scripts/updateLicense.py
@@ -50,10 +50,12 @@ def update_go_license(name, force=False):
if year == CURRENT_YEAR:
break
- new_line = COPYRIGHT_RE.sub('Copyright (c) %d' % CURRENT_YEAR, line)
- assert line != new_line, ('Could not change year in: %s' % line)
- lines[i] = new_line
- changed = True
+ # Avoid updating the copyright year.
+ #
+ # new_line = COPYRIGHT_RE.sub('Copyright (c) %d' % CURRENT_YEAR, line)
+ # assert line != new_line, ('Could not change year in: %s' % line)
+ # lines[i] = new_line
+ # changed = True
break
if not found:
|
Do not update year for copyright in license (#<I>)
|
diff --git a/jbpm-designer-client/src/main/java/org/jbpm/designer/client/DesignerPresenter.java b/jbpm-designer-client/src/main/java/org/jbpm/designer/client/DesignerPresenter.java
index <HASH>..<HASH> 100644
--- a/jbpm-designer-client/src/main/java/org/jbpm/designer/client/DesignerPresenter.java
+++ b/jbpm-designer-client/src/main/java/org/jbpm/designer/client/DesignerPresenter.java
@@ -306,4 +306,4 @@ public class DesignerPresenter {
placeRequestImpl.addParameter("profile", "jbpm");
this.placeManager.goTo(placeRequestImpl);
}
-}
\ No newline at end of file
+}
|
- adding to more modifications regarding:
- adapted to recent URIEncoder->URIUtil refactoring on uberfire
|
diff --git a/IndexedRedis/__init__.py b/IndexedRedis/__init__.py
index <HASH>..<HASH> 100644
--- a/IndexedRedis/__init__.py
+++ b/IndexedRedis/__init__.py
@@ -549,13 +549,17 @@ class IndexedRedisModel(object):
key = None
for key, value in myDict.items():
- if key not in self.BINARY_FIELDS:
+ if key not in self.BINARY_FIELDS and (bytes == str or not isinstance(value, bytes)):
if value != None:
val = convertMethods[key](value)
if isinstance(val, IRNullType):
val = 'IRNullType()'
- elif isinstance(val, (str, bytes, unicode)):
- val = "'%s'" %(to_unicode(val),)
+ elif isinstance(val, (str, unicode)):
+ try:
+ val = "'%s'" %(to_unicode(val),)
+ except:
+ # Python 2....
+ val = repr(val)
else:
val = to_unicode(val)
ret += [key, '=', val, ', ']
|
Fix repr and bytes fields on python2 and 3
|
diff --git a/gtk_mock/combo_box_text.go b/gtk_mock/combo_box_text.go
index <HASH>..<HASH> 100644
--- a/gtk_mock/combo_box_text.go
+++ b/gtk_mock/combo_box_text.go
@@ -10,3 +10,6 @@ func (*MockComboBoxText) AppendText(v1 string) {
func (*MockComboBoxText) GetActiveText() string {
return ""
}
+
+func (*MockComboBoxText) RemoveAll() {
+}
diff --git a/gtka/combo_box_text.go b/gtka/combo_box_text.go
index <HASH>..<HASH> 100644
--- a/gtka/combo_box_text.go
+++ b/gtka/combo_box_text.go
@@ -35,3 +35,7 @@ func (v *comboBoxText) AppendText(v1 string) {
func (v *comboBoxText) GetActiveText() string {
return v.internal.GetActiveText()
}
+
+func (v *comboBoxText) RemoveAll() {
+ return v.internal.RemoveAll()
+}
diff --git a/gtki/combo_box_text.go b/gtki/combo_box_text.go
index <HASH>..<HASH> 100644
--- a/gtki/combo_box_text.go
+++ b/gtki/combo_box_text.go
@@ -5,6 +5,7 @@ type ComboBoxText interface {
AppendText(string)
GetActiveText() string
+ RemoveAll()
}
func AssertComboBoxText(_ ComboBoxText) {}
|
Add support for removing all elements in a combobox text
|
diff --git a/app/models/activation_key.rb b/app/models/activation_key.rb
index <HASH>..<HASH> 100644
--- a/app/models/activation_key.rb
+++ b/app/models/activation_key.rb
@@ -33,11 +33,16 @@ class ActivationKey < ActiveRecord::Base
validates :description, :katello_description_format => true
validates :environment, :presence => true
validate :environment_exists
+ validate :environment_not_locker
def environment_exists
errors.add(:environment, _("id: #{environment_id} doesn't exist ")) if environment.nil?
end
+ def environment_not_locker
+ errors.add(:base, _("Cannot create activation keys in Locker environment ")) if environment and environment.locker?
+ end
+
# set's up system when registering with this activation key
def apply_to_system(system)
system.environment_id = self.environment_id if self.environment_id
|
<I> - validation in activation key model, can't be created for Locker env
|
diff --git a/plugins/blackbox/index.js b/plugins/blackbox/index.js
index <HASH>..<HASH> 100644
--- a/plugins/blackbox/index.js
+++ b/plugins/blackbox/index.js
@@ -39,7 +39,12 @@ function blackbox(name, deps) {
parser.on('data', function(data) {
_writeVideo(data);
})
- client.getVideoStream().pipe(parser);
+ var video = client.getVideoStream();
+ video.pipe(parser);
+ video.on('close', function() {
+ video = client.getVideoStream();
+ video.pipe(parser);
+ });
};
|
The video stream can sometimes break during flight. We have to try to reconnect it so the blackbox keeps recording.
|
diff --git a/html2asketch/nodeToSketchLayers.js b/html2asketch/nodeToSketchLayers.js
index <HASH>..<HASH> 100644
--- a/html2asketch/nodeToSketchLayers.js
+++ b/html2asketch/nodeToSketchLayers.js
@@ -113,7 +113,8 @@ export default async function nodeToSketchLayers(node) {
opacity,
overflowX,
overflowY,
- position
+ position,
+ clip
} = styles;
// Skip node when display is set to none for itself or an ancestor
@@ -130,6 +131,10 @@ export default async function nodeToSketchLayers(node) {
return layers;
}
+ if (clip === 'rect(0px 0px 0px 0px)' && position === 'absolute') {
+ return layers;
+ }
+
const leaf = new ShapeGroup({x, y, width, height});
const isImage = node.nodeName === 'IMG' && node.attributes.src;
|
Skip node that has 'rect (0 0 0 0)' on clip and 'absolute' on positon (#<I>)
|
diff --git a/lib/acts_as_enum.rb b/lib/acts_as_enum.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_enum.rb
+++ b/lib/acts_as_enum.rb
@@ -80,7 +80,7 @@ module ActsAsEnum
const_set(method_name.upcase, attr_value)
- if Rails.version =~ /^[34]/
+ if Rails.version =~ /^[345]/
scope method_name.to_sym, -> { where(attr => attr_value) }
else
named_scope method_name.to_sym, :conditions => { attr.to_sym => attr_value }
|
rails 5 support
it does not work in rails 5, adding 5 support
|
diff --git a/src/Entity/Ranking.php b/src/Entity/Ranking.php
index <HASH>..<HASH> 100644
--- a/src/Entity/Ranking.php
+++ b/src/Entity/Ranking.php
@@ -9,7 +9,7 @@ use Drupal\mespronos\RankingInterface;
use Drupal\mespronos\MPNEntityInterface;
use Drupal\mespronos_group\Entity\Group;
-abstract class Ranking extends MPNContentEntityBase implements MPNEntityInterface,RankingInterface {
+abstract class Ranking extends MPNContentEntityBase implements MPNEntityInterface, RankingInterface {
public static function preCreate(EntityStorageInterface $storage_controller, array &$values) {
parent::preCreate($storage_controller, $values);
|
refactoring - clean Ranking
|
diff --git a/lib/chef/knife/azure_server_create.rb b/lib/chef/knife/azure_server_create.rb
index <HASH>..<HASH> 100755
--- a/lib/chef/knife/azure_server_create.rb
+++ b/lib/chef/knife/azure_server_create.rb
@@ -1090,4 +1090,4 @@ class Chef
end
end
end
-end
+end
\ No newline at end of file
|
Removed extra line for travis pass
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -558,6 +558,9 @@ async function activate() {
let CHANGELOG = await askForChangelog( VERSION_TYPE, NEXT_VERSION );
+ if ( CHANGELOG )
+ fs.writeFileSync( 'CHANGELOG.md.draft', CHANGELOG, 'UTF-8' );
+
//
// ----------------------------------------------------
// Confirm section
@@ -608,6 +611,7 @@ async function activate() {
await execute( `git checkout -b ${ RELEASE_BRANCH }` );
await execute( `git add CHANGELOG.md` );
await execute( `git commit -m "Updated changelog for v${ NEXT_VERSION }"` );
+ await execute( `rm CHANGELOG.md.draft` );
} else {
await execute( `git checkout -b ${ RELEASE_BRANCH }` );
}
|
A draft changelog will be saved for future use when the user writes an entry and then aborts the update
|
diff --git a/php/Element.php b/php/Element.php
index <HASH>..<HASH> 100644
--- a/php/Element.php
+++ b/php/Element.php
@@ -247,7 +247,8 @@ class Element extends Tag {
};
array_walk_recursive( $config, $replaceElements );
// Set '_' last to ensure that subclasses can't accidentally step on it.
- $config['_'] = preg_replace( '/^OOUI\\\\/', '', get_class( $this ) );
+ // Strip all namespaces from the class name
+ $config['_'] = end( explode( '\\', get_class( $this ) ) );
return $config;
}
diff --git a/tests/phpunit/ElementTest.php b/tests/phpunit/ElementTest.php
index <HASH>..<HASH> 100644
--- a/tests/phpunit/ElementTest.php
+++ b/tests/phpunit/ElementTest.php
@@ -14,7 +14,7 @@ class ElementTest extends TestCase {
),
array(
new \FooBarBaz\MockWidget( array( 'infusable' => true ) ),
- '"_":"FooBarBaz\\\\MockWidget"'
+ '"_":"MockWidget"'
),
);
}
|
Strip all namespaces from infused PHP widgets
This will allow us to put custom MediaWiki specific widgets in their own
namespace, but still be able to infuse them.
Change-Id: I5d<I>e<I>efc<I>ad<I>c<I>e2b<I>dc
|
diff --git a/examples/notifications.rb b/examples/notifications.rb
index <HASH>..<HASH> 100644
--- a/examples/notifications.rb
+++ b/examples/notifications.rb
@@ -13,3 +13,6 @@ client.category_set_user_notification_level(1, notification_level: 3)
# mute a topic
client.topic_set_user_notification_level(1, notification_level: 0)
+
+# get user notifications
+client.notifications(username: 'discourse')
diff --git a/lib/discourse_api/api/notifications.rb b/lib/discourse_api/api/notifications.rb
index <HASH>..<HASH> 100644
--- a/lib/discourse_api/api/notifications.rb
+++ b/lib/discourse_api/api/notifications.rb
@@ -2,8 +2,11 @@
module DiscourseApi
module API
module Notifications
- def notifications
- response = get('/notifications.json')
+ def notifications(params = {})
+ params = API.params(params)
+ .optional(:username, :recent, :limit, :offset, :filter)
+
+ response = get('/notifications.json', params)
response[:body]
end
end
|
Pass params to get notifications API (#<I>)
|
diff --git a/src/Ukey1/ApiClient/Request.php b/src/Ukey1/ApiClient/Request.php
index <HASH>..<HASH> 100644
--- a/src/Ukey1/ApiClient/Request.php
+++ b/src/Ukey1/ApiClient/Request.php
@@ -222,8 +222,7 @@ class Request
$this->httpClient = new Client(
[
"base_uri" => $this->host,
- "timeout" => self::TIMEOUT,
- "allow_redirects" => false
+ "timeout" => self::TIMEOUT
]
);
@@ -316,4 +315,4 @@ class Request
{
return self::USER_AGENT . App::SDK_VERSION . " " . GuzzleHttp\default_user_agent();
}
-}
\ No newline at end of file
+}
|
Redirects allowed
In near future we may change API URL, so it's necessary to allow redirects by default.
|
diff --git a/src/host/browser.js b/src/host/browser.js
index <HASH>..<HASH> 100644
--- a/src/host/browser.js
+++ b/src/host/browser.js
@@ -5,8 +5,8 @@
/*#ifndef(UMD)*/
"use strict";
/*global _GPF_HOST*/ // Host types
+/*global _gpfBootImplByHost*/ // Boot host specific implementation per host
/*global _gpfExit:true*/ // Exit function
-/*global _gpfHost*/ // Host type
/*global _gpfWebDocument:true*/ // Browser document object
/*global _gpfWebWindow:true*/ // Browser window object
/*#endif*/
@@ -14,9 +14,9 @@
/*jshint browser: true*/
/*eslint-env browser*/
-/* istanbul ignore next */ // Tested with NodeJS
-if (_GPF_HOST.BROWSER === _gpfHost) {
+_gpfBootImplByHost[_GPF_HOST.BROWSER] = function () {
+ /* istanbul ignore next */ // Not testable
_gpfExit = function (code) {
window.location = "https://arnaudbuchholz.github.io/gpf/exit.html?" + (code || 0);
};
@@ -24,4 +24,4 @@ if (_GPF_HOST.BROWSER === _gpfHost) {
_gpfWebWindow = window;
_gpfWebDocument = document;
-}
+};
|
Uses switch pattern to improve coverage / simplify code
|
diff --git a/src/scripts/hubot-phrases.js b/src/scripts/hubot-phrases.js
index <HASH>..<HASH> 100644
--- a/src/scripts/hubot-phrases.js
+++ b/src/scripts/hubot-phrases.js
@@ -38,9 +38,9 @@ module.exports = function Plugin (robot) {
this.name = name;
this.tidbits = [];
this.alias = false;
- this.readonly = true;
- if ((data.readonly != null) && data.readonly === false) {
- this.readonly = false;
+ this.readonly = false;
+ if (data.readonly === true) {
+ this.readonly = data.readonly;
}
if (data.alias) {
this.alias = data.alias;
|
fix(*): make new facts open by default
Since the canEdit stuff doesn't really work without user roles, figured locking down by default
doesn't make much sense
|
diff --git a/pybar/daq/fifo_readout.py b/pybar/daq/fifo_readout.py
index <HASH>..<HASH> 100644
--- a/pybar/daq/fifo_readout.py
+++ b/pybar/daq/fifo_readout.py
@@ -100,9 +100,8 @@ class FifoReadout(object):
else:
fifo_size = self.dut['SRAM']['FIFO_SIZE']
data = self.read_data()
- event_selector = logical_or(is_data_record, is_data_header)
- events = data[event_selector(data)]
- if events.shape[0] != 0:
+ dh_sr_select = logical_and(is_fe_word, logical_or(is_data_record, is_data_header))
+ if np.count_nonzero(dh_sr_select) != 0:
logging.warning('SRAM FIFO containing events when starting FIFO readout: FIFO_SIZE = %i', fifo_size)
self._words_per_read.clear()
if clear_buffer:
|
ENH: optimize check, reduce memory, check for FE data word
|
diff --git a/bingo/image.py b/bingo/image.py
index <HASH>..<HASH> 100644
--- a/bingo/image.py
+++ b/bingo/image.py
@@ -66,7 +66,7 @@ def get_texts(bingo_fields, font):
if bingo_field.is_middle():
text += _("\n{time}\nBingo #{board_id}").format(
time=bingo_field.board.get_created(),
- board_id=bingo_field.board.id)
+ board_id=bingo_field.board.board_id)
texts.append(Text(draw, font, text))
return texts
|
fix: show the correct board_id on the images.
The correct id is board.board_id and not board.id,
as "id" is the internal id assigned by django,
and "board_id" is the board number on the current site.
|
diff --git a/moco-core/src/main/java/com/github/dreamhead/moco/UnexpectedRequestMatcher.java b/moco-core/src/main/java/com/github/dreamhead/moco/UnexpectedRequestMatcher.java
index <HASH>..<HASH> 100644
--- a/moco-core/src/main/java/com/github/dreamhead/moco/UnexpectedRequestMatcher.java
+++ b/moco-core/src/main/java/com/github/dreamhead/moco/UnexpectedRequestMatcher.java
@@ -1,6 +1,6 @@
package com.github.dreamhead.moco;
-public class UnexpectedRequestMatcher implements RequestMatcher {
+public final class UnexpectedRequestMatcher implements RequestMatcher {
@Override
public boolean match(final Request request) {
return true;
|
added missing final to unexpected request matcher
|
diff --git a/src/Sculpin/Core/Permalink/SourcePermalinkFactory.php b/src/Sculpin/Core/Permalink/SourcePermalinkFactory.php
index <HASH>..<HASH> 100644
--- a/src/Sculpin/Core/Permalink/SourcePermalinkFactory.php
+++ b/src/Sculpin/Core/Permalink/SourcePermalinkFactory.php
@@ -116,7 +116,11 @@ class SourcePermalinkFactory
}
$permalink = preg_replace('/:filename/', $filename, $permalink);
$permalink = preg_replace('/:slug_filename/', $this->normalize($slug ?: $filename), $permalink);
- $basename = substr($filename, strrpos($filename, '/')+1);
+ if (strrpos($filename, '/') !== -1) {
+ $basename = substr($filename, strrpos($filename, '/')+1);
+ } else {
+ $basename = $filename;
+ }
$prettyBasename = substr($basename, 0, strrpos($basename, '.'));
$permalink = preg_replace('/:basename/', $basename, $permalink);
$permalink = preg_replace('/:pretty_basename/', $prettyBasename, $permalink);
|
Fixes bug with :basename tag in permalinks
When :basename was used for files in the root source directory, one character was removed from the beginning. This fixes this.
|
diff --git a/app/patients/edit/controller.js b/app/patients/edit/controller.js
index <HASH>..<HASH> 100644
--- a/app/patients/edit/controller.js
+++ b/app/patients/edit/controller.js
@@ -520,7 +520,13 @@ export default AbstractEditController.extend(BloodTypes, DOBDays, GenderList, Po
},
afterUpdate: function(record) {
- this.transitionToRoute('/patients/search/'+record.get('id'));
+ this.send('openModal', 'dialog', Ember.Object.create({
+ title: 'Patient Saved',
+ message: 'The patient record for %@ has been saved.'.fmt(record.get('displayName')),
+ hideCancelButton: true,
+ updateButtonAction: 'ok',
+ updateButtonText: 'Ok'
+ }));
}
});
diff --git a/app/patients/route.js b/app/patients/route.js
index <HASH>..<HASH> 100644
--- a/app/patients/route.js
+++ b/app/patients/route.js
@@ -15,6 +15,9 @@ export default AbstractModuleRoute.extend(PatientId, {
modelName: 'patient',
moduleName: 'patients',
newButtonText: '+ new patient',
- sectionTitle: 'Patients'
-
+ sectionTitle: 'Patients',
+ subActions: [{
+ text: 'Patient listing',
+ linkTo: 'patients.index'
+ }]
});
\ No newline at end of file
|
Changed patient save workflow
Changed to display modal on save instead of redirect to search.
|
diff --git a/src/mouse.support.js b/src/mouse.support.js
index <HASH>..<HASH> 100644
--- a/src/mouse.support.js
+++ b/src/mouse.support.js
@@ -1,8 +1,8 @@
steal('src/synthetic.js', 'src/mouse.js', function checkSupport(Syn) {
if (!document.body) {
- Syn.schedule(function() {
- checkSupport(Syn);
+ Syn.schedule(function () {
+ checkSupport(Syn);
}, 1);
return;
}
|
Remove extra trailing spaces in mouse.support.js
|
diff --git a/src/pubsub.js b/src/pubsub.js
index <HASH>..<HASH> 100644
--- a/src/pubsub.js
+++ b/src/pubsub.js
@@ -63,7 +63,9 @@ module.exports = (common) => {
const getTopic = () => 'pubsub-tests-' + Math.random()
- describe('callback API', () => {
+ describe('callback API', function () {
+ this.timeout(80 * 1000)
+
let ipfs1
let ipfs2
let ipfs3
@@ -599,7 +601,9 @@ module.exports = (common) => {
})
})
- describe('promise API', () => {
+ describe('promise API', function () {
+ this.timeout(80 * 1000)
+
let ipfs1
before((done) => {
|
chore: increase timeout for CI
|
diff --git a/haversine/__init__.py b/haversine/__init__.py
index <HASH>..<HASH> 100644
--- a/haversine/__init__.py
+++ b/haversine/__init__.py
@@ -21,7 +21,7 @@ def haversine(point1, point2, miles=False):
lat2, lng2 = point2
# convert all latitudes/longitudes from decimal degrees to radians
- lat1, lng1, lat2, lng2 = list(map(radians, [lat1, lng1, lat2, lng2]))
+ lat1, lng1, lat2, lng2 = map(radians, (lat1, lng1, lat2, lng2))
# calculate haversine
lat = lat2 - lat1
|
unpack coordinates without building a list
|
diff --git a/routes/index.js b/routes/index.js
index <HASH>..<HASH> 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -32,6 +32,10 @@ var TEST_AND_DEPLOY = "TEST_AND_DEPLOY";
*/
exports.index = function(req, res){
+ // Work-around for Safari/Express etags bug on cookie logout.
+ // Without it, Safari will cache the logged-in version despite logout!
+ // See https://github.com/Strider-CD/strider/issues/284
+ req.headers['if-none-match'] = 'no-match-for-this';
if (req.session.return_to) {
var return_to = req.session.return_to
req.session.return_to=null
|
work-around Safari caching logged-in page after logout.
this is due to etag weirdness.
fixes #<I>.
|
diff --git a/src/utils/mixins.js b/src/utils/mixins.js
index <HASH>..<HASH> 100644
--- a/src/utils/mixins.js
+++ b/src/utils/mixins.js
@@ -83,7 +83,7 @@ const on = (el, ev, fn, opts) => {
el = el instanceof Array ? el : [el];
for (let i = 0; i < ev.length; ++i) {
- el.forEach(elem => elem.addEventListener(ev[i], fn, opts));
+ el.forEach(elem => elem && elem.addEventListener(ev[i], fn, opts));
}
};
@@ -92,7 +92,7 @@ const off = (el, ev, fn, opts) => {
el = el instanceof Array ? el : [el];
for (let i = 0; i < ev.length; ++i) {
- el.forEach(elem => elem.removeEventListener(ev[i], fn, opts));
+ el.forEach(elem => elem && elem.removeEventListener(ev[i], fn, opts));
}
};
|
Add checks in on/off mixins
|
diff --git a/website/config.rb b/website/config.rb
index <HASH>..<HASH> 100644
--- a/website/config.rb
+++ b/website/config.rb
@@ -2,7 +2,7 @@ set :base_url, "https://www.consul.io/"
activate :hashicorp do |h|
h.name = "consul"
- h.version = "1.7.0"
+ h.version = "1.7.1"
h.github_slug = "hashicorp/consul"
end
|
Update Consul version on website to <I>
|
diff --git a/services/github/auth/admin.js b/services/github/auth/admin.js
index <HASH>..<HASH> 100644
--- a/services/github/auth/admin.js
+++ b/services/github/auth/admin.js
@@ -24,6 +24,7 @@ function setRoutes({ shieldsSecret }, { apiProvider, server }) {
end('Invalid secret.')
}, 10000)
}
+ ask.res.setHeader('Cache-Control', 'private')
end(apiProvider.serializeDebugInfo({ sanitize: false }))
})
}
|
set 'Cache-Control: private' on token auth endpoint (#<I>)
|
diff --git a/src/test/java/javax/time/calendar/format/TestCharLiteralPrinter.java b/src/test/java/javax/time/calendar/format/TestCharLiteralPrinter.java
index <HASH>..<HASH> 100644
--- a/src/test/java/javax/time/calendar/format/TestCharLiteralPrinter.java
+++ b/src/test/java/javax/time/calendar/format/TestCharLiteralPrinter.java
@@ -40,7 +40,7 @@ import org.testng.annotations.Test;
*
* @author Stephen Colebourne
*/
-@Test
+@Test(groups={"implementation"})
public class TestCharLiteralPrinter extends AbstractTestPrinterParser {
//-----------------------------------------------------------------------
|
CharLiteralPrinterParser is package scoped
|
diff --git a/schema_salad/tests/test_examples.py b/schema_salad/tests/test_examples.py
index <HASH>..<HASH> 100644
--- a/schema_salad/tests/test_examples.py
+++ b/schema_salad/tests/test_examples.py
@@ -332,7 +332,7 @@ class TestSchemas(unittest.TestCase):
print(g.serialize(format="n3"))
def test_mixin(self):
- base_url = schema_salad.ref_resolver.file_uri(os.path.join(os.getcwd(), os.path.normpath("/tests/")))
+ base_url = schema_salad.ref_resolver.file_uri(os.path.join(os.getcwd(), "tests"))
ldr = schema_salad.ref_resolver.Loader({})
ra = ldr.resolve_ref(cmap({"$mixin": get_data("tests/mixin.yml"), "one": "five"}),
base_url=base_url)
|
modified test mixin for correct base path
|
diff --git a/lib/easyzpl/label.rb b/lib/easyzpl/label.rb
index <HASH>..<HASH> 100644
--- a/lib/easyzpl/label.rb
+++ b/lib/easyzpl/label.rb
@@ -88,6 +88,13 @@ module Easyzpl
y = 0 unless numeric?(y)
label_data.push('^FO' + x.to_s + ',' + y.to_s + '^B3N,Y,20,N,N^FD' +
bar_code_string + '^FS')
+
+ return unless label_height && label_width
+ pdf.bounding_box [x, Integer(label_height) - y -
+ 50 - 1], width: 100 do
+ barcode = Barby::Code39.new(bar_code_string)
+ barcode.annotate_pdf(pdf)
+ end
end
# Renders the ZPL code as a string
|
Prints barcode into the PDF if generated.
|
diff --git a/src/utils/helper.js b/src/utils/helper.js
index <HASH>..<HASH> 100644
--- a/src/utils/helper.js
+++ b/src/utils/helper.js
@@ -273,6 +273,7 @@ export const parseHits = (hits) => {
_id: data._id,
_index: data._index,
_type: data._type,
+ _score: data._score,
highlight: data.highlight || {},
...data._source,
...streamProps,
|
feat: Expose _score in hits (#<I>)
|
diff --git a/Kwf/Assets/Provider/Components.php b/Kwf/Assets/Provider/Components.php
index <HASH>..<HASH> 100644
--- a/Kwf/Assets/Provider/Components.php
+++ b/Kwf/Assets/Provider/Components.php
@@ -99,6 +99,9 @@ class Kwf_Assets_Provider_Components extends Kwf_Assets_Provider_Abstract
{
$ret = array();
$assets = Kwc_Abstract::getSetting($class, $setting);
+ if (!is_array($assets['dep'])) {
+ throw new Kwf_Exception("Invalid dep dependency for '$class'");
+ }
foreach ($assets['dep'] as $i) {
$d = $this->_providerList->findDependency(trim($i));
if (!$d) {
|
add exception if invalid settings are returned
|
diff --git a/src/main/java/com/zaxxer/hikari/HikariConfig.java b/src/main/java/com/zaxxer/hikari/HikariConfig.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/zaxxer/hikari/HikariConfig.java
+++ b/src/main/java/com/zaxxer/hikari/HikariConfig.java
@@ -767,6 +767,8 @@ public class HikariConfig implements HikariConfigMXBean
else if (dataSourceClassName != null) {
if (driverClassName != null) {
LOGGER.error("{} - cannot use driverClassName and dataSourceClassName together.", poolName);
+ // NOTE: This exception text is referenced by a Spring Boot FailureAnalyzer, it should not be
+ // changed without first notifying the Spring Boot developers.
throw new IllegalArgumentException("cannot use driverClassName and dataSourceClassName together.");
}
else if (jdbcUrl != null) {
|
Add comment re: issue #<I> to prevent accidental breakage of Spring Boot's FailureAnalyzer.
|
diff --git a/lib/sup/modes/line-cursor-mode.rb b/lib/sup/modes/line-cursor-mode.rb
index <HASH>..<HASH> 100644
--- a/lib/sup/modes/line-cursor-mode.rb
+++ b/lib/sup/modes/line-cursor-mode.rb
@@ -66,6 +66,7 @@ protected
return if @curpos == p
@curpos = p.clamp @cursor_top, lines
buffer.mark_dirty
+ set_status
end
## override search behavior to be cursor-based. this is a stupid
|
Update status on jump on line in line-cursor-mode
The line number isn't updated in the status field when you jump to the
end or beginning, or do page up or down before the next redraw is done.
Updating the status manually in set_cursor_pos.
|
diff --git a/lib/test-utils.js b/lib/test-utils.js
index <HASH>..<HASH> 100644
--- a/lib/test-utils.js
+++ b/lib/test-utils.js
@@ -8,13 +8,16 @@ const fileUtils = require('./file-utils');
module.exports = {
defaults() {
+ const opts = {
+ framework: 'react',
+ modules: 'webpack',
+ js: 'js',
+ css: 'css',
+ router: 'router'
+ };
return {
- options: {
- framework: 'react',
- modules: 'webpack',
- js: 'js',
- css: 'css'
- }
+ options: opts,
+ props: opts
};
},
mock(generator) {
|
Add props to this.context (#<I>)
|
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js
index <HASH>..<HASH> 100644
--- a/lib/determine-basal/determine-basal.js
+++ b/lib/determine-basal/determine-basal.js
@@ -294,9 +294,9 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
// stop adding remainingCI after 4h
if (COBpredBGs.length > 4 * 60 / 5) { remainingCI = 0; }
aCOBpredBG = aCOBpredBGs[aCOBpredBGs.length-1] + predBGI + Math.min(0,predDev) + predACI;
- // for UAMpredBGs, predicted carb impact drops at minDeviationSlope/2
- // calculate predicted CI from UAM based on minDeviationSlope/2
- predUCIslope = Math.max(0, uci + ( UAMpredBGs.length*minDeviationSlope/2 ) );
+ // for UAMpredBGs, predicted carb impact drops at minDeviationSlope
+ // calculate predicted CI from UAM based on minDeviationSlope
+ predUCIslope = Math.max(0, uci + ( UAMpredBGs.length*minDeviationSlope ) );
// if minDeviationSlope is too flat, predicted deviation impact drops linearly from
// current deviation down to zero over DIA (data points every 5m)
predUCIdia = Math.max(0, uci * ( 1 - UAMpredBGs.length/Math.max(profile.dia*60/5,1) ) );
|
go back to using minDeviationSlope to decay UAM CI
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ def read(fname):
setup(
name='unleash',
- version='0.3.4.dev1',
+ version='0.3.5.dev1',
description=('Creates release commits directly in git, unleashes them on '
'PyPI and pushes tags to github.'),
long_description=read('README.rst'),
diff --git a/unleash/__init__.py b/unleash/__init__.py
index <HASH>..<HASH> 100644
--- a/unleash/__init__.py
+++ b/unleash/__init__.py
@@ -1 +1 @@
-__version__ = '0.3.4.dev1'
+__version__ = '0.3.5.dev1'
|
Increased version to <I>.dev1 after release of <I>.
(commit by unleash <I>.dev1)
|
diff --git a/lib/dragonfly/s3_data_store.rb b/lib/dragonfly/s3_data_store.rb
index <HASH>..<HASH> 100644
--- a/lib/dragonfly/s3_data_store.rb
+++ b/lib/dragonfly/s3_data_store.rb
@@ -1,6 +1,8 @@
require 'fog'
require 'dragonfly'
+Dragonfly::App.register_datastore(:s3){ Dragonfly::S3DataStore }
+
module Dragonfly
class S3DataStore
diff --git a/spec/s3_data_store_spec.rb b/spec/s3_data_store_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/s3_data_store_spec.rb
+++ b/spec/s3_data_store_spec.rb
@@ -54,6 +54,15 @@ describe Dragonfly::S3DataStore do
let (:content) { Dragonfly::Content.new(app, "eggheads") }
let (:new_content) { Dragonfly::Content.new(app) }
+ describe "registering with a symbol" do
+ it "registers a symbol for configuring" do
+ app.configure do
+ datastore :s3
+ end
+ app.datastore.should be_a(Dragonfly::S3DataStore)
+ end
+ end
+
describe "write" do
it "should use the name from the content if set" do
content.name = 'doobie.doo'
|
register :s3 symbol with Dragonfly::App
|
diff --git a/lib/heroku/plugin.rb b/lib/heroku/plugin.rb
index <HASH>..<HASH> 100644
--- a/lib/heroku/plugin.rb
+++ b/lib/heroku/plugin.rb
@@ -13,7 +13,7 @@ module Heroku
end
def self.list
- Dir["#{directory}/*"].map do |folder|
+ Dir["#{directory}/*"].sort.map do |folder|
File.basename(folder)
end
end
|
sort the output of Plugin.list so that plugins are always loaded in the same order
|
diff --git a/examples/tesselation.py b/examples/tesselation.py
index <HASH>..<HASH> 100755
--- a/examples/tesselation.py
+++ b/examples/tesselation.py
@@ -13,6 +13,8 @@ def main():
glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 4)
glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 0)
+ glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)
+ glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, True)
win = glfw.create_window(640, 480, 'bezier', None, None)
if not win:
print('Failed to create glfw window!')
|
Ensure the creating of forward compat core context
backwards compat non-core is default and somthing that will not work on a lot of setups.
|
diff --git a/awesomplete.js b/awesomplete.js
index <HASH>..<HASH> 100644
--- a/awesomplete.js
+++ b/awesomplete.js
@@ -147,6 +147,10 @@ _.prototype = {
},
close: function () {
+ if (!this.opened) {
+ return;
+ }
+
this.ul.setAttribute("hidden", "");
this.index = -1;
diff --git a/test/api/closeSpec.js b/test/api/closeSpec.js
index <HASH>..<HASH> 100644
--- a/test/api/closeSpec.js
+++ b/test/api/closeSpec.js
@@ -26,4 +26,12 @@ describe("awesomplete.close", function () {
expect(handler).toHaveBeenCalled();
});
+
+ it("returns early if already closed", function () {
+ var handler = $.spyOnEvent(this.subject.input, "awesomplete-close");
+ this.subject.close();
+ this.subject.close();
+
+ expect(handler.calls.count()).toBe(1);
+ });
});
|
Return early from close if not open
If the popup is already in a closed state, return early from
`Awesomplete.prototype.close` so as to guarantee that when
`awesomplete-close` events get triggered, the popup *was* actually
closed.
|
diff --git a/cmd/minikube/cmd/start_flags.go b/cmd/minikube/cmd/start_flags.go
index <HASH>..<HASH> 100644
--- a/cmd/minikube/cmd/start_flags.go
+++ b/cmd/minikube/cmd/start_flags.go
@@ -575,7 +575,7 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, rtime str
exit.Message(reason.Usage, "Using rootless driver was required, but the current driver does not seem rootless")
}
}
- out.Styled(style.Notice, "Using {{.driver_name}} driver with the root privilege", out.V{"driver_name": driver.FullName(drvName)})
+ out.Styled(style.Notice, "Using {{.driver_name}} driver with root privileges", out.V{"driver_name": driver.FullName(drvName)})
}
if si.StorageDriver == "btrfs" {
klog.Info("auto-setting LocalStorageCapacityIsolation to false because using btrfs storage driver")
|
fix grammar for common minikube start output
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ install_requires = [
]
mysqlbinlog_requires = [
- "mysql-replication>=0.4.1,<0.5.0",
+ "mysql-replication>=0.5,<0.6.0",
]
# nanomsg is still in beta
|
mysql replication ready to use <I>
|
diff --git a/reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java b/reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java
index <HASH>..<HASH> 100644
--- a/reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java
+++ b/reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java
@@ -1008,7 +1008,10 @@ final class FluxWindowTimeout<T> extends InternalFluxOperator<T, Flux<T>> {
}
boolean sendNext(T t) {
- int received = this.received + 1 ;
+ final int received = this.received + 1 ;
+ if (received > this.max) {
+ return false;
+ }
this.received = received;
this.queue.offer(t);
@@ -1399,10 +1402,6 @@ final class FluxWindowTimeout<T> extends InternalFluxOperator<T, Flux<T>> {
}
}
- static boolean isCancelledBySubscriberOrByParent(long state) {
- return (state & CANCELLED_STATE) == CANCELLED_STATE || (state & PARENT_CANCELLED_STATE) == PARENT_CANCELLED_STATE;
- }
-
static boolean isCancelled(long state) {
return (state & CANCELLED_STATE) == CANCELLED_STATE;
}
|
Add windowTimeout sendNext early guard against maxSize overflow (#<I>)
This commit improves the InnerWindow.sendNext method to guard against
attempts at sending more than the window's maxSize elements, earlier in
the codepath.
It also removes an unused method that was left-in during iterations on
the backpressure-aware new implementation from #<I>.
|
diff --git a/app/models/alchemy/picture/transformations.rb b/app/models/alchemy/picture/transformations.rb
index <HASH>..<HASH> 100644
--- a/app/models/alchemy/picture/transformations.rb
+++ b/app/models/alchemy/picture/transformations.rb
@@ -75,21 +75,30 @@ module Alchemy
def landscape_format?
image_file.landscape?
end
+
alias_method :landscape?, :landscape_format?
+ deprecate landscape_format?: "Use image_file.landscape? instead", deprecator: Alchemy::Deprecation
+ deprecate landscape?: "Use image_file.landscape? instead", deprecator: Alchemy::Deprecation
# Returns true if picture's width is smaller than it's height
#
def portrait_format?
image_file.portrait?
end
+
alias_method :portrait?, :portrait_format?
+ deprecate portrait_format?: "Use image_file.portrait? instead", deprecator: Alchemy::Deprecation
+ deprecate portrait?: "Use image_file.portrait? instead", deprecator: Alchemy::Deprecation
# Returns true if picture's width and height is equal
#
def square_format?
image_file.aspect_ratio == 1.0
end
+
alias_method :square?, :square_format?
+ deprecate square_format?: "Use image_file.aspect_ratio instead", deprecator: Alchemy::Deprecation
+ deprecate square?: "Use image_file.aspect_ratio instead", deprecator: Alchemy::Deprecation
# Returns true if the class we're included in has a meaningful render_size attribute
#
|
Deprecate image format methods
This deprecates `landscape_format?`, `portrait_format?` and
`square_format` as well as their aliases `landscape?`, `portrait?`
and `square?` in favor of the same methods on the `image_file`
object Dragonfly provides us.
|
diff --git a/graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java b/graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java
index <HASH>..<HASH> 100644
--- a/graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java
+++ b/graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java
@@ -144,7 +144,12 @@ public class ClusterEventPeriodical extends Periodical {
public void doRun() {
try {
LOG.debug("Opening MongoDB cursor on \"{}\"", COLLECTION_NAME);
+
final DBCursor<ClusterEvent> cursor = eventCursor(nodeId);
+ if(LOG.isTraceEnabled()) {
+ LOG.trace("MongoDB query plan: {}", cursor.explain());
+ }
+
while (cursor.hasNext()) {
ClusterEvent clusterEvent = cursor.next();
LOG.trace("Processing cluster event: {}", clusterEvent);
|
Log MongoDB query plan on TRACE level in ClusterEventPeriodical
|
diff --git a/src/MakeJsonCommand.php b/src/MakeJsonCommand.php
index <HASH>..<HASH> 100644
--- a/src/MakeJsonCommand.php
+++ b/src/MakeJsonCommand.php
@@ -107,8 +107,7 @@ class MakeJsonCommand extends WP_CLI_Command {
}
}
-
- WP_CLI::success( sprintf( 'Created %d %s.', $result_count, Utils\pluralize( 'file', $result_count) ), 'make-json' );
+ WP_CLI::success( sprintf( 'Created %d %s.', $result_count, Utils\pluralize( 'file', $result_count) ) );
}
/**
|
Remove second arg to WP_CLI::success()
|
diff --git a/src/main/java/org/elasticsearch/plugin/mapper/attachments/tika/LocaleChecker.java b/src/main/java/org/elasticsearch/plugin/mapper/attachments/tika/LocaleChecker.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/elasticsearch/plugin/mapper/attachments/tika/LocaleChecker.java
+++ b/src/main/java/org/elasticsearch/plugin/mapper/attachments/tika/LocaleChecker.java
@@ -33,7 +33,7 @@ public class LocaleChecker {
public static int JVM_PATCH_MINOR_VERSION = 0;
static {
- StringTokenizer st = new StringTokenizer(Constants.JAVA_VERSION, ".");
+ StringTokenizer st = new StringTokenizer(Constants.JVM_SPEC_VERSION, ".");
JVM_MAJOR_VERSION = parseInt(st.nextToken());
if(st.hasMoreTokens()) {
JVM_MINOR_VERSION = parseInt(st.nextToken());
|
parse java.specification.version not java.version, so that it is robust
|
diff --git a/sorl/thumbnail/engines/pgmagick.py b/sorl/thumbnail/engines/pgmagick.py
index <HASH>..<HASH> 100644
--- a/sorl/thumbnail/engines/pgmagick.py
+++ b/sorl/thumbnail/engines/pgmagick.py
@@ -3,7 +3,7 @@ from ..pgmagick import Image
from sorl.thumbnail.engines.base import EngineBase
try:
- from ..pgmagick._pgmagick import get_blob_datae
+ from ..pgmagick._pgmagick import get_blob_data
except ImportError:
from base64 import b64decode
def get_blob_data(blob):
|
adding simpler way to access blob data, thanks dotsbb. Since its not part of the public pgmagick, provide fallback
|
diff --git a/glances/glances.py b/glances/glances.py
index <HASH>..<HASH> 100755
--- a/glances/glances.py
+++ b/glances/glances.py
@@ -44,7 +44,7 @@ import json
import collections
# Somes libs depends of OS
-is_Bsd = sys.platform.endswith('bsd')
+is_Bsd = sys.platform.find('bsd') != -1
is_Linux = sys.platform.startswith('linux')
is_Mac = sys.platform.startswith('darwin')
is_Windows = sys.platform.startswith('win')
|
Correct #Issue #<I>
|
diff --git a/src/RoboFileBase.php b/src/RoboFileBase.php
index <HASH>..<HASH> 100644
--- a/src/RoboFileBase.php
+++ b/src/RoboFileBase.php
@@ -166,7 +166,7 @@ class RoboFileBase extends AbstractRoboFile
. ($extra['config-import'] ? ' --config-import' : '');
if (!$force && $this->siteInstalledTested) {
- $install = '[[ $(vendor/bin/drush sql-query "SHOW TABLES" | wc --lines) > 10 ]] || ' . $install;
+ $install = '[[ $(vendor/bin/drush sql-query "SHOW TABLES" | wc --lines) -gt 10 ]] || ' . $install;
}
return $this->taskSsh($worker, $auth)
|
#<I> Fixed comparison in bash command to check for siteInstalled
|
diff --git a/plugins/rcpt_to.qmail_deliverable.js b/plugins/rcpt_to.qmail_deliverable.js
index <HASH>..<HASH> 100644
--- a/plugins/rcpt_to.qmail_deliverable.js
+++ b/plugins/rcpt_to.qmail_deliverable.js
@@ -9,9 +9,16 @@ var options = {
port: 8898,
};
+exports.register = function () {
+ var plugin = this;
+ var load_config = function () {
+ plugin.cfg = plugin.config.get('rcpt_to.qmail_deliverable.ini', load_config);
+ };
+ load_config();
+};
+
exports.hook_mail = function(next, connection, params) {
var plugin = this;
- plugin.cfg = plugin.config.get('rcpt_to.qmail_deliverable.ini');
if (!plugin.cfg.main.check_outbound) { return next(); }
|
qmd: load config at register, with cb
|
diff --git a/packages/onesignal/index.js b/packages/onesignal/index.js
index <HASH>..<HASH> 100755
--- a/packages/onesignal/index.js
+++ b/packages/onesignal/index.js
@@ -33,7 +33,7 @@ function addOneSignal (moduleOptions) {
cdn: true,
GcmSenderId: '482941778795',
importScripts: [
- '/sw.js'
+ '/sw.js?' + Date.now()
],
init: {
allowLocalhostAsSecureOrigin: true,
|
fix(onesignal): add cache query to sw.js
|
diff --git a/lib/pork/context.rb b/lib/pork/context.rb
index <HASH>..<HASH> 100644
--- a/lib/pork/context.rb
+++ b/lib/pork/context.rb
@@ -1,12 +1,18 @@
+require 'pork/expect'
require 'pork/error'
module Pork
module Context
+ private
def initialize desc
@__pork__desc__ = desc
end
+ def expect *args, &block
+ Expect.new(self.class.stat, *args, &block)
+ end
+
def skip
raise Skip.new("Skipping #{@__pork__desc__}")
end
diff --git a/lib/pork/expect.rb b/lib/pork/expect.rb
index <HASH>..<HASH> 100644
--- a/lib/pork/expect.rb
+++ b/lib/pork/expect.rb
@@ -4,7 +4,7 @@ require 'pork/inspect'
module Pork
class Expect < BasicObject
instance_methods.each{ |m| undef_method(m) unless m =~ /^__|^object_id$/ }
- def initialize stat, object, message=nil, message_lazy=nil, &checker
+ def initialize stat, object=nil, message=nil, message_lazy=nil, &checker
@stat, @object, @negate = stat, object, false
@message, @message_lazy = message, message_lazy
satisfy(&checker) if checker
|
context api should be private and expect api should work
|
diff --git a/db/sql.php b/db/sql.php
index <HASH>..<HASH> 100644
--- a/db/sql.php
+++ b/db/sql.php
@@ -297,6 +297,13 @@ class SQL {
* @param $ttl int|array
**/
function schema($table,$fields=NULL,$ttl=0) {
+ $fw=\Base::instance();
+ $cache=\Cache::instance();
+ if ($fw->get('CACHE') && $ttl &&
+ ($cached=$cache->exists(
+ $hash=$fw->hash($this->dsn.$table).'.schema',$result)) &&
+ $cached[0]+$ttl>microtime(TRUE))
+ return $result;
if (strpos($table,'.'))
list($schema,$table)=explode('.',$table);
// Supported engines
@@ -380,6 +387,9 @@ class SQL {
'pkey'=>$row[$val[6]]==$val[7]
];
}
+ if ($fw->get('CACHE') && $ttl)
+ // Save to cache backend
+ $cache->set($hash,$rows,$ttl);
return $rows;
}
user_error(sprintf(self::E_PKey,$table),E_USER_ERROR);
|
Cache parsed schema for the TTL duration
|
diff --git a/firefly-common/src/main/java/com/fireflysource/common/lifecycle/AbstractLifeCycle.java b/firefly-common/src/main/java/com/fireflysource/common/lifecycle/AbstractLifeCycle.java
index <HASH>..<HASH> 100644
--- a/firefly-common/src/main/java/com/fireflysource/common/lifecycle/AbstractLifeCycle.java
+++ b/firefly-common/src/main/java/com/fireflysource/common/lifecycle/AbstractLifeCycle.java
@@ -28,7 +28,7 @@ public abstract class AbstractLifeCycle implements LifeCycle {
}
}
- protected AtomicBoolean start;
+ protected AtomicBoolean start = new AtomicBoolean(false);
public AbstractLifeCycle() {
stopActions.add(this::stop);
|
[fix]: the start flag is null
|
diff --git a/src/saml2/client_base.py b/src/saml2/client_base.py
index <HASH>..<HASH> 100644
--- a/src/saml2/client_base.py
+++ b/src/saml2/client_base.py
@@ -371,13 +371,12 @@ class Base(Entity):
except KeyError:
nsprefix = None
- try:
- force_authn = kwargs['force_authn']
- except KeyError:
- force_authn = self.config.getattr('force_authn', 'sp')
- finally:
- if force_authn:
- args['force_authn'] = 'true'
+ force_authn = (
+ kwargs.get("force_authn")
+ or self.config.getattr('force_authn', 'sp')
+ )
+ if str(force_authn).lower() == 'true':
+ args['force_authn'] = 'true'
conf_sp_type = self.config.getattr('sp_type', 'sp')
conf_sp_type_in_md = self.config.getattr('sp_type_in_metadata', 'sp')
|
Set force_authn only when the value is "true"
|
diff --git a/web-server.js b/web-server.js
index <HASH>..<HASH> 100755
--- a/web-server.js
+++ b/web-server.js
@@ -40,8 +40,12 @@ function HttpServer(handlers) {
HttpServer.prototype.start = function(port) {
this.port = port;
- this.server.listen(port);
- util.puts('Http Server running at http://localhost:' + port + '/');
+ console.log("Starting web server at http://localhost:" + port + "/");
+ this.server.listen(port).on('error', function(err) {
+ if (err.code === "EADDRINUSE") {
+ console.error("\033[31mPort %d is already in use, can't start web server.", port);
+ }
+ });
};
HttpServer.prototype.parseUrl_ = function(urlString) {
|
Bug <I> - Print a friendly error message when port is already in use when web-server.js is run.
Adds a simple 'error' event listener to HttpServer.start. If
error code is "EADDRINUSE", the port is already in use, so prints
a message saying the port is in use, instead of just throwing out
the error.
|
diff --git a/kayvee.go b/kayvee.go
index <HASH>..<HASH> 100644
--- a/kayvee.go
+++ b/kayvee.go
@@ -5,12 +5,15 @@ import (
)
// Log Levels:
-const Unknown = "unknown"
-const Critical = "critical"
-const Error = "error"
-const Warning = "warning"
-const Info = "info"
-const Trace = "trace"
+
+type LogLevel string
+
+const Unknown LogLevel = "unknown"
+const Critical LogLevel = "critical"
+const Error LogLevel = "error"
+const Warning LogLevel = "warning"
+const Info LogLevel = "info"
+const Trace LogLevel = "trace"
// Format converts a map to a string of space-delimited key=val pairs
func Format(data map[string]interface{}) string {
@@ -19,7 +22,7 @@ func Format(data map[string]interface{}) string {
}
// FormatLog is similar to Format, but takes additional reserved params to promote logging best-practices
-func FormatLog(source string, level string, title string, data map[string]interface{}) string {
+func FormatLog(source string, level LogLevel, title string, data map[string]interface{}) string {
if data == nil {
data = make(map[string]interface{})
}
|
use LogLevel type for log level constants
|
diff --git a/src/XML2Array.php b/src/XML2Array.php
index <HASH>..<HASH> 100644
--- a/src/XML2Array.php
+++ b/src/XML2Array.php
@@ -32,7 +32,8 @@ class XML2Array
*
* @param string $inputXml - xml to convert
*
- * @return \DOMDocument
+ * @return array
+ *
* @throws \InvalidArgumentException
*/
public static function createArray($inputXml)
|
fix #1 - Return type of createArray is wrong
|
diff --git a/lib/ariane.rb b/lib/ariane.rb
index <HASH>..<HASH> 100644
--- a/lib/ariane.rb
+++ b/lib/ariane.rb
@@ -53,7 +53,7 @@ module Ariane
@session = session
end
- # Internal: Gets the request environment.
+ # Internal: Gets the user session hash
#
# Returns the session object
def session
@@ -140,7 +140,11 @@ module Ariane
#
# Returns the current or default option.
def use_session_stack
- @use_session_stack ||= false
+ if defined? @use_session_stack
+ return @user_session_stack
+ else
+ return false
+ end
end
# Public: Returns session stack setting
|
Removed ||= for boolean value check in @use_session_stack
|
diff --git a/ssbio/core/protein.py b/ssbio/core/protein.py
index <HASH>..<HASH> 100644
--- a/ssbio/core/protein.py
+++ b/ssbio/core/protein.py
@@ -2111,8 +2111,6 @@ class Protein(Object):
structprop = self.representative_structure
chain_id = self.representative_chain
- chain = structprop.chains.get_by_id(chain_id)
-
log.debug('Using sequence: {}, structure: {}, chain: {}'.format(seqprop.id, structprop.id, chain_id))
# Create a new SeqFeature
@@ -2129,6 +2127,8 @@ class Protein(Object):
all_info['seq_residue'] = str(seq_features.seq)
if structprop:
+ chain = structprop.chains.get_by_id(chain_id)
+
# Get structure properties
mapping_to_structure_resnum = self.map_seqprop_resnums_to_structprop_resnums(resnums=seq_resnum,
seqprop=seqprop,
|
Move chain retrieval in get_residue_annotations to after structure check
|
diff --git a/src/Routing/Route.php b/src/Routing/Route.php
index <HASH>..<HASH> 100644
--- a/src/Routing/Route.php
+++ b/src/Routing/Route.php
@@ -229,7 +229,7 @@ class Route
*/
public function isPartCountSame($url)
{
- return count(explode('/', $url)) === count(explode('/', $this->url));
+ return count(explode('/', rtrim($url, '/'))) === count(explode('/', rtrim($this->url, '/')));
}
/**
|
Removed trailing slashes in URLs in isPartCountSame
The isPartCountSame method made a difference between a URL with and without trailing slash. This occurred on a route like `/something/{parameter}`. `/something/<I>` matched but `/something/<I>/` did not. Now it does.
|
diff --git a/mod/data/edit.php b/mod/data/edit.php
index <HASH>..<HASH> 100755
--- a/mod/data/edit.php
+++ b/mod/data/edit.php
@@ -310,7 +310,9 @@ if ($data->addtemplate){
$newtext = '';
}
-echo $newtext;
+$formatoptions = (object)array('noclean'=>true, 'para'=>false, 'filter'=>true);
+echo format_text($newtext, FORMAT_HTML, $formatoptions);
+
echo '<div class="mdl-align"><input type="submit" name="saveandview" value="'.get_string('saveandview','data').'" />';
if ($rid) {
echo ' <input type="submit" name="cancel" value="'.get_string('cancel').'" onclick="javascript:history.go(-1)" />';
|
filters MDL-<I> added filtering for when adding a database activity entry
|
diff --git a/core/state/statedb.go b/core/state/statedb.go
index <HASH>..<HASH> 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -517,7 +517,17 @@ func (self *StateDB) GetRefund() uint64 {
// and clears the journal as well as the refunds.
func (s *StateDB) Finalise(deleteEmptyObjects bool) {
for addr := range s.journal.dirties {
- stateObject := s.stateObjects[addr]
+ stateObject, exist := s.stateObjects[addr]
+ if !exist {
+ // ripeMD is 'touched' at block 1714175, in tx 0x1237f737031e40bcde4a8b7e717b2d15e3ecadfe49bb1bbc71ee9deb09c6fcf2
+ // That tx goes out of gas, and although the notion of 'touched' does not exist there, the
+ // touch-event will still be recorded in the journal. Since ripeMD is a special snowflake,
+ // it will persist in the journal even though the journal is reverted. In this special circumstance,
+ // it may exist in `s.journal.dirties` but not in `s.stateObjects`.
+ // Thus, we can safely ignore it here
+ continue
+ }
+
if stateObject.suicided || (deleteEmptyObjects && stateObject.empty()) {
s.deleteStateObject(stateObject)
} else {
|
state: handle nil in journal dirties
|
diff --git a/src/filters/BasePSRFilter.php b/src/filters/BasePSRFilter.php
index <HASH>..<HASH> 100644
--- a/src/filters/BasePSRFilter.php
+++ b/src/filters/BasePSRFilter.php
@@ -52,7 +52,7 @@ abstract class BasePSRFilter implements Builder {
$classes =
(new Map($this->source->getAutoloadMap()['class']))->filterWithKey(
function(string $class_name, string $file): bool {
- if (\stripos($class_name, $this->prefix) !== 0) {
+ if ($this->prefix !== '' && \stripos($class_name, $this->prefix) !== 0) {
return false;
}
$expected = static::getExpectedPathWithoutExtension(
|
Supporting PSR-{0,4} autoloading without a prefix
This is what Composer considers the "fallback" syntax.
<URL>
|
diff --git a/astrocats/supernovae/tasks/general_data.py b/astrocats/supernovae/tasks/general_data.py
index <HASH>..<HASH> 100644
--- a/astrocats/supernovae/tasks/general_data.py
+++ b/astrocats/supernovae/tasks/general_data.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
"""General data import tasks.
"""
import os
|
MAINT: added coding for sphinx
|
diff --git a/lib/models/room-state.js b/lib/models/room-state.js
index <HASH>..<HASH> 100644
--- a/lib/models/room-state.js
+++ b/lib/models/room-state.js
@@ -156,6 +156,7 @@ RoomState.prototype.setStateEvents = function(stateEvents) {
var members = utils.values(self.members);
utils.forEach(members, function(member) {
member.setPowerLevelEvent(event);
+ self.emit("RoomState.members", event, self, member);
});
}
});
|
Also emit a 'RoomState.members' event for m.room.power_levels
|
diff --git a/src/Kiczort/PolishValidatorBundle/Validator/Constraints/PeselValidator.php b/src/Kiczort/PolishValidatorBundle/Validator/Constraints/PeselValidator.php
index <HASH>..<HASH> 100644
--- a/src/Kiczort/PolishValidatorBundle/Validator/Constraints/PeselValidator.php
+++ b/src/Kiczort/PolishValidatorBundle/Validator/Constraints/PeselValidator.php
@@ -33,7 +33,7 @@ class PeselValidator extends ValidatorAbstract
*/
public function getValidationOptions(Constraint $constraint)
{
- return array('strict' => (bool)$constraint->strict);
+ return array('strict' => (bool) $constraint->strict);
}
/**
|
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on <URL>
|
diff --git a/scenarios/api.github.com/paginate-issues/test.js b/scenarios/api.github.com/paginate-issues/test.js
index <HASH>..<HASH> 100644
--- a/scenarios/api.github.com/paginate-issues/test.js
+++ b/scenarios/api.github.com/paginate-issues/test.js
@@ -18,7 +18,7 @@ test('paginate issues', async (t) => {
}
await axios.request(Object.assign(options, {
- url: baseUrl
+ url: `${baseUrl}&page=1`
})).catch(mock.explain)
for (let i = 2; i <= 5; i++) {
|
test: pass ?page=1 to first request of paginate issues
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,7 @@ import shutil
import glob
import multiprocessing
from distutils.command.build import build as st_build
+from distutils.util import get_platform
from setuptools import setup
from setuptools.command.develop import develop as st_develop
@@ -122,6 +123,10 @@ cmdclass = {
'sdist': sdist,
}
+if "bdist_wheel" in sys.argv and "--plat-name" not in sys.argv:
+ sys.argv.append("--plat-name")
+ sys.argv.append(get_platform())
+
setup(
cmdclass=cmdclass,
)
|
Re-add platform tag to setup.py
|
diff --git a/command/seal_migration_test.go b/command/seal_migration_test.go
index <HASH>..<HASH> 100644
--- a/command/seal_migration_test.go
+++ b/command/seal_migration_test.go
@@ -1,3 +1,5 @@
+// +build !enterprise
+
package command
import (
diff --git a/vault/core.go b/vault/core.go
index <HASH>..<HASH> 100644
--- a/vault/core.go
+++ b/vault/core.go
@@ -1146,8 +1146,6 @@ func (c *Core) sealInitCommon(ctx context.Context, req *logical.Request) (retErr
return retErr
}
- req.SetTokenEntry(te)
-
// Audit-log the request before going any further
auth := &logical.Auth{
ClientToken: req.ClientToken,
diff --git a/vault/request_handling.go b/vault/request_handling.go
index <HASH>..<HASH> 100644
--- a/vault/request_handling.go
+++ b/vault/request_handling.go
@@ -136,6 +136,8 @@ func (c *Core) fetchACLTokenEntryAndEntity(ctx context.Context, req *logical.Req
c.logger.Error("failed to lookup token", "error", err)
return nil, nil, nil, nil, ErrInternalError
}
+ // Set the token entry here since it has not been cached yet
+ req.SetTokenEntry(te)
default:
te = req.TokenEntry()
}
|
Set request token entry within fetchACLTokenEntryAndEntity (#<I>)
|
diff --git a/src/components/networked.js b/src/components/networked.js
index <HASH>..<HASH> 100644
--- a/src/components/networked.js
+++ b/src/components/networked.js
@@ -3,7 +3,7 @@ var deepEqual = require('fast-deep-equal');
var InterpolationBuffer = require('buffered-interpolation');
var DEG2RAD = THREE.Math.DEG2RAD;
-function defaultNetworkUpdatePredicate() {
+function defaultRequiresUpdate() {
let cachedData = null;
return (newData) => {
@@ -54,13 +54,7 @@ AFRAME.registerComponent('networked', {
this.syncData = {};
this.componentSchemas = NAF.schemas.getComponents(this.data.template);
this.cachedElements = new Array(this.componentSchemas.length);
- this.networkUpdatePredicates = this.componentSchemas.map((componentSchema) => {
- if (componentSchema.requiresNetworkUpdate) {
- return componentSchema.requiresNetworkUpdate();
- }
-
- return defaultNetworkUpdatePredicate();
- });
+ this.networkUpdatePredicates = this.componentSchemas.map(x => x.requiresNetworkUpdate || defaultRequiresUpdate());
// Fill cachedElements array with null elements
this.invalidateCachedElements();
|
Small refactoring to network update predicates
|
diff --git a/multiqc/modules/picard/picard.py b/multiqc/modules/picard/picard.py
index <HASH>..<HASH> 100755
--- a/multiqc/modules/picard/picard.py
+++ b/multiqc/modules/picard/picard.py
@@ -123,7 +123,8 @@ class MultiqcModule(BaseMultiqcModule):
config = {
'title': 'Picard Deduplication Stats',
'ylab': '# Reads',
- 'cpswitch_counts_label': 'Number of Reads'
+ 'cpswitch_counts_label': 'Number of Reads',
+ 'cpswitch_c_active': False
}
return self.plot_bargraph(self.picard_dupMetrics_data, keys, config)
|
Picard MarkDups percent plot by default. Closes #<I>.
|
diff --git a/lib/browser/element.js b/lib/browser/element.js
index <HASH>..<HASH> 100644
--- a/lib/browser/element.js
+++ b/lib/browser/element.js
@@ -93,7 +93,8 @@ exports.assertElement = function assertElement(selector, asserter) {
default:
throw new Error(
- 'Selector .message has 3 hits on the page, assertions require unique elements');
+ 'Selector ' + selector + ' has ' + elements.length +
+ ' hits on the page, assertions require unique elements');
}
});
return element.then(asserter.assert).then(_.constant(element));
|
Properly generate the too many elements error
|
diff --git a/core/src/main/java/com/aspectran/core/component/bean/annotation/Transform.java b/core/src/main/java/com/aspectran/core/component/bean/annotation/Transform.java
index <HASH>..<HASH> 100755
--- a/core/src/main/java/com/aspectran/core/component/bean/annotation/Transform.java
+++ b/core/src/main/java/com/aspectran/core/component/bean/annotation/Transform.java
@@ -32,7 +32,7 @@ public @interface Transform {
String contentType() default "";
- String templateId() default "";
+ String template() default "";
String encoding() default "";
|
Renamed annotation element transformId() to transform()
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -48,9 +48,3 @@ module Kernel
puts "can't use KeyValue backend because: #{e.message}"
end
end
-
-Object.class_eval do
- def meta_class
- class << self; self; end
- end
-end unless Object.method_defined?(:meta_class)
|
Get rid of unused method on test helper
|
diff --git a/chef/lib/chef/knife/bootstrap.rb b/chef/lib/chef/knife/bootstrap.rb
index <HASH>..<HASH> 100644
--- a/chef/lib/chef/knife/bootstrap.rb
+++ b/chef/lib/chef/knife/bootstrap.rb
@@ -120,13 +120,13 @@ class Chef
:boolean => true,
:default => true
- Chef::Config[:knife][:hints] ||= Hash.new
option :hint,
:long => "--hint HINT_NAME[=HINT_FILE]",
:description => "Specify Ohai Hint to be set on the bootstrap target. Use multiple --hint options to specify multiple hints.",
:proc => Proc.new { |h|
- name, path = h.split("=")
- Chef::Config[:knife][:hints][name] = path ? JSON.parse(::File.read(path)) : Hash.new }
+ Chef::Config[:knife][:hints] ||= Hash.new
+ name, path = h.split("=")
+ Chef::Config[:knife][:hints][name] = path ? JSON.parse(::File.read(path)) : Hash.new }
def load_template(template=nil)
# Are we bootstrapping using an already shipped template?
|
Ensure Chef::Config[:knife][:hints] in proc
Unit tests for the hint system can fail if the entire bootstrap class isn't
loaded because the creation of the hints attribute was outside of the block.
|
diff --git a/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java b/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java
index <HASH>..<HASH> 100644
--- a/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java
+++ b/languagetool-language-modules/de/src/main/java/org/languagetool/tokenizers/de/GermanCompoundTokenizer.java
@@ -99,6 +99,8 @@ public class GermanCompoundTokenizer implements Tokenizer {
wordSplitter.addException("Erziehungstrick", asList("Erziehungs", "trick"));
wordSplitter.addException("Erziehungstricks", asList("Erziehungs", "tricks"));
wordSplitter.addException("karamelligen", asList("karamelligen")); // != Karamel+Ligen
+ wordSplitter.addException("Häkelnadel", asList("Häkel", "nadel"));
+ wordSplitter.addException("Häkelnadeln", asList("Häkel", "nadeln"));
wordSplitter.setStrictMode(strictMode);
wordSplitter.setMinimumWordLength(3);
}
|
[de] fix "Häkelnadel" split (#<I>)
|
diff --git a/openTSNE/initialization.py b/openTSNE/initialization.py
index <HASH>..<HASH> 100644
--- a/openTSNE/initialization.py
+++ b/openTSNE/initialization.py
@@ -98,7 +98,7 @@ def pca(X, n_components=2, svd_solver="auto", random_state=None, verbose=False):
return np.ascontiguousarray(embedding)
-def spectral(A, n_components=2, tol=1e-4, max_iter=None, verbose=False):
+def spectral(A, n_components=2, tol=1e-4, max_iter=None, random_state=None, verbose=False):
"""Initialize an embedding using the spectral embedding of the KNN graph.
Specifically, we initialize data points by computing the diffusion map on
@@ -119,6 +119,9 @@ def spectral(A, n_components=2, tol=1e-4, max_iter=None, verbose=False):
max_iter: float
See scipy.sparse.linalg.eigsh documentation.
+ random_state: Any
+ Unused, but kept for consistency between initialization schemes.
+
verbose: bool
Returns
|
Reintroduce random_state to spectral init for consistency
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -273,13 +273,19 @@ describe('InfluxDB', function () {
})
describe('#dropDatabase', function () {
- this.timeout(25000)
+ beforeEach(function (done) {
+ client.createDatabase(info.db.name, done)
+ })
it('should delete the database without error', function (done) {
client.dropDatabase(info.db.name, done)
})
- it('should not error if database didn\'t exist', function (done) {
+ it('should error if database didn\'t exist', function (done) {
client.dropDatabase(info.db.name, function (err) {
- done(err)
+ if (err) return done(err)
+ client.dropDatabase(info.db.name, function (err) {
+ assert(err instanceof Error)
+ done()
+ })
})
})
})
|
test: dropping a non-existant database should err
|
diff --git a/pydsl/Interaction/Shell.py b/pydsl/Interaction/Shell.py
index <HASH>..<HASH> 100644
--- a/pydsl/Interaction/Shell.py
+++ b/pydsl/Interaction/Shell.py
@@ -111,7 +111,10 @@ class CommandLineToTransformerInteraction:
resultdic[key] = str(resultdic[key])
except UnicodeDecodeError:
resultdic[key] = "Unprintable"
- print(str(resultdic) + "\n")
+ if len(resultdic) == 1:
+ print(str(list(resultdic.values())[0]) + "\n")
+ else:
+ print(str(resultdic) + "\n")
value = self._getInput()
print("Bye Bye")
|
prints only value if the output has length 1
|
diff --git a/plugin.php b/plugin.php
index <HASH>..<HASH> 100755
--- a/plugin.php
+++ b/plugin.php
@@ -83,7 +83,10 @@ if ( ! class_exists( 'WP_REST_Comments_Controller' ) ) {
* WP_REST_Settings_Controller class.
*/
if ( ! class_exists( 'WP_REST_Settings_Controller' ) ) {
- require_once dirname( __FILE__ ) . '/lib/endpoints/class-wp-rest-settings-controller.php';
+ global $wp_version;
+ if ( version_compare( $wp_version, '4.7-alpha', '>=' ) ) {
+ require_once dirname( __FILE__ ) . '/lib/endpoints/class-wp-rest-settings-controller.php';
+ }
}
/**
|
Only include the settings controller on <I>
|
diff --git a/acceptancetests/assess_persistent_storage.py b/acceptancetests/assess_persistent_storage.py
index <HASH>..<HASH> 100755
--- a/acceptancetests/assess_persistent_storage.py
+++ b/acceptancetests/assess_persistent_storage.py
@@ -335,7 +335,7 @@ def assess_charm_removal_single_block_and_filesystem_storage(client):
# storage status change after remove-application takes some time.
# from experiments even 30 seconds is not enough.
wait_for_storage_status_update(
- client, storage_id=single_fs_id, interval=15, timeout=90)
+ client, storage_id=single_fs_id, interval=15, timeout=180)
storage_list = get_storage_list(client)[0]
assert_storage_count(storage_list=storage_list, expected=1)
if single_fs_id in storage_list:
|
Increase the wait time for the storage to be detached in CI test
I haven't been able to directly reproduce the failure locally, but if
I take the wait time right down I can get the test to fail in the same
way. Doubling the wait time should get it to pass more reliably.
|
diff --git a/config/environments/test.rb b/config/environments/test.rb
index <HASH>..<HASH> 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -30,6 +30,6 @@ config.action_controller.allow_forgery_protection = false
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
-config.gem "rspec-rails", :version => ">=1.2.6", :lib => false
-config.gem "webrat", :version => ">=0.4.4", :lib => false
-config.gem "cucumber", :version => ">=0.3.9", :lib => false
\ No newline at end of file
+config.gem "rspec-rails", :version => ">=1.2.9", :lib => false
+config.gem "webrat", :version => ">=0.5.3", :lib => false
+config.gem "cucumber", :version => ">=0.4.4", :lib => false
\ No newline at end of file
|
update rspec-rails, webrat, and cucumber dependencies
|
diff --git a/spec/support/test_model.rb b/spec/support/test_model.rb
index <HASH>..<HASH> 100644
--- a/spec/support/test_model.rb
+++ b/spec/support/test_model.rb
@@ -48,7 +48,7 @@ module TestModel
end
def method_missing(method_id, *args, &block)
- if attribute_method?(method_id.to_s)
+ if !matched_attribute_method(method_id.to_s).nil?
self.class.define_attribute_methods self.class.model_attributes.keys
send(method_id, *args, &block)
else
|
Update TextModel method_missing with current ActiveModel methods
|
diff --git a/lib/moan.js b/lib/moan.js
index <HASH>..<HASH> 100644
--- a/lib/moan.js
+++ b/lib/moan.js
@@ -598,10 +598,10 @@ class Moan extends EventEmitter {
task
.on('completed', (value) => {
- this.emit('completed', value, task.name)
+ this.emit('completed', task.name, value)
})
.on('failed', (error) => {
- this.emit('failed', error, task.name)
+ this.emit('failed', task.name, error)
})
return this
diff --git a/test/moan.spec.js b/test/moan.spec.js
index <HASH>..<HASH> 100644
--- a/test/moan.spec.js
+++ b/test/moan.spec.js
@@ -541,7 +541,14 @@ describe('Moan', () => {
})
describe('#task', () => {
- // TODO: Complete unit tests
+ it('should create and register a task with the name', () => {
+ let dependencies = [ 'fu', 'baz' ]
+ function runnable() {}
+
+ expect(moan.task('foo', dependencies, runnable)).to.be(moan)
+
+ expect(moan.tasks).to.eql([ 'foo' ])
+ })
})
describe('#tasks', () => {
|
added tests to cover moan#task
|
diff --git a/lib/puppet/status.rb b/lib/puppet/status.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/status.rb
+++ b/lib/puppet/status.rb
@@ -17,4 +17,12 @@ class Puppet::Status
def self.from_pson( pson )
self.new( pson )
end
+
+ def name
+ "status"
+ end
+
+ def name=(name)
+ # NOOP
+ end
end
diff --git a/spec/unit/status.rb b/spec/unit/status.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/status.rb
+++ b/spec/unit/status.rb
@@ -20,4 +20,12 @@ describe Puppet::Status do
status = Puppet::Status.new( { "is_alive" => false } )
status.status.should == { "is_alive" => false }
end
+
+ it "should have a name" do
+ Puppet::Status.new.name
+ end
+
+ it "should allow a name to be set" do
+ Puppet::Status.new.name = "status"
+ end
end
|
Fix a failing test in #<I>
|
diff --git a/code/cart/CartForm.php b/code/cart/CartForm.php
index <HASH>..<HASH> 100644
--- a/code/cart/CartForm.php
+++ b/code/cart/CartForm.php
@@ -57,7 +57,7 @@ class CartForm extends Form{
continue;
}
//delete lines
- if(isset($fields['Remove'])){
+ if(isset($fields['Remove']) || (isset($fields['Quantity']) && (int)$fields['Quantity'] <= 0)){
$items->remove($item);
$removecount++;
continue;
@@ -68,7 +68,9 @@ class CartForm extends Form{
}
//update variations
if(isset($fields['ProductVariationID']) && $id = Convert::raw2sql($fields['ProductVariationID'])){
- $item->ProductVariationID = $id;
+ if($item->ProductVariationID != $id){
+ $item->ProductVariationID = $id;
+ }
}
//TODO: make updates through ShoppingCart class
//TODO: combine with items that now match exactly
@@ -78,9 +80,10 @@ class CartForm extends Form{
$updatecount++;
}
}
+
}
if($removecount){
- $messages['remove'] = "Removed ".$updatecount." items.";
+ $messages['remove'] = "Removed ".$removecount." items.";
}
if($updatecount){
$messages['updatecount'] = "Updated ".$updatecount." items.";
|
FIX: allow removing items via CartForm by entering 0 or less for quantity.
FIX: VaraitionField was always causing a ‘change’, even though nothing changed.
|
diff --git a/tests/TestCase/Console/Command/Task/TestTaskTest.php b/tests/TestCase/Console/Command/Task/TestTaskTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/Console/Command/Task/TestTaskTest.php
+++ b/tests/TestCase/Console/Command/Task/TestTaskTest.php
@@ -216,6 +216,7 @@ class TestTaskTest extends TestCase {
* @return void
*/
public function testFilePathGenerationModelRepeated() {
+ $this->markTestIncomplete('Not working for some reason');
$this->Task->expects($this->never())->method('err');
$this->Task->expects($this->never())->method('_stop');
|
Skip failing tests.
I'll revisit this when updating the test generator.
|
diff --git a/bin/codecept.js b/bin/codecept.js
index <HASH>..<HASH> 100755
--- a/bin/codecept.js
+++ b/bin/codecept.js
@@ -24,7 +24,7 @@ program.command('list [path]')
.action(require('../lib/command/list'));
program.command('def [path]')
- .description('List all actions for I.')
+ .description('Generates TypeScript definitions for all I actions.')
.option('-c, --config [file]', 'configuration file to be used')
.action(require('../lib/command/definitions'));
|
Use proper def command description (#<I>)
|
diff --git a/app/scripts/services/tile-proxy.js b/app/scripts/services/tile-proxy.js
index <HASH>..<HASH> 100644
--- a/app/scripts/services/tile-proxy.js
+++ b/app/scripts/services/tile-proxy.js
@@ -17,7 +17,12 @@ import {
const MAX_FETCH_TILES = 20;
+const str = document.currentScript.src
+const pathName = str.substring(0, str.lastIndexOf("/"));
+const workerPath = `${pathName}/worker.js`;
+
const setPixPool = new Pool(1);
+
setPixPool.run(function(params, done) {
try {
const array = new Float32Array(params.data);
@@ -36,7 +41,8 @@ setPixPool.run(function(params, done) {
} catch (err) {
console.log('err:', err);
}
-}, ['http://localhost:8080/worker.js']);
+}, [workerPath]);
+
const fetchTilesPool = new Pool(10);
fetchTilesPool.run(function(params, done) {
@@ -50,7 +56,7 @@ fetchTilesPool.run(function(params, done) {
} catch (err) {
console.log('err:', err);
}
-}, ['http://localhost:8080/worker.js']);
+}, [workerPath]);
import pubSub from './pub-sub';
|
Specify worker as an absolute path
|
diff --git a/aegea/iam.py b/aegea/iam.py
index <HASH>..<HASH> 100644
--- a/aegea/iam.py
+++ b/aegea/iam.py
@@ -6,6 +6,8 @@ from __future__ import absolute_import, division, print_function, unicode_litera
import os, sys, argparse, collections, random, string
+import botocore
+
from . import config, logger
from .ls import register_parser, register_listing_parser
from .util import Timestamp, paginate, hashabledict
@@ -37,7 +39,10 @@ def users(args):
return ">>>" if row.user_id == current_user.user_id else ""
def describe_mfa(cell, row):
- return "Enabled" if list(row.mfa_devices.all()) else "Disabled"
+ try:
+ return "Enabled" if list(row.mfa_devices.all()) else "Disabled"
+ except botocore.exceptions.ClientError:
+ return "Unknown"
users = list(resources.iam.users.all())
for user in users:
user.cur, user.mfa = "", ""
|
Avoid crashing when no access is given to MFA status
|
diff --git a/src/HexBoard.js b/src/HexBoard.js
index <HASH>..<HASH> 100644
--- a/src/HexBoard.js
+++ b/src/HexBoard.js
@@ -59,7 +59,7 @@ module.exports = function HexBoard(canvas, window, backgroundColor) {
board.scene
);
//Set up anti-aliasing (required in babylon.js 3.0+)
- //board.postProcess = new babylon.FxaaPostProcess("fxaa", 1.0, board.camera);
+ board.postProcess = new babylon.FxaaPostProcess("fxaa", 1.0, board.camera);
board.camera.upVector = new babylon.Vector3(0, 0, 1);
board.camera.upperBetaLimit = Math.PI;
|
Anti-aliasing makes the svg images look nicer
|
diff --git a/packages/react/src/components/DatePicker/DatePicker.js b/packages/react/src/components/DatePicker/DatePicker.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/DatePicker/DatePicker.js
+++ b/packages/react/src/components/DatePicker/DatePicker.js
@@ -382,7 +382,7 @@ function DatePicker({
// Flatpickr's calendar dialog is not rendered in a landmark causing an
// error with IBM Equal Access Accessibility Checker so we add an aria
// role to the container div.
- calendar.calendarContainer.setAttribute('role', 'region');
+ calendar.calendarContainer.setAttribute('role', 'application');
// IBM EAAC requires an aria-label on a role='region'
calendar.calendarContainer.setAttribute(
'aria-label',
|
fix(Datepicker): change role on calendar container to 'application' (#<I>)
|
diff --git a/fsdb/config.py b/fsdb/config.py
index <HASH>..<HASH> 100644
--- a/fsdb/config.py
+++ b/fsdb/config.py
@@ -2,7 +2,7 @@ import json
from utils import calc_dir_mode
-ACCEPTED_HASH_ALG = ['md5', 'sha', 'sha1', 'sha224', 'sha2', 'sha256', 'sha384', 'sha512']
+ACCEPTED_HASH_ALG = ['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512']
TAG = "fsdb_config"
DEFAULT_FMODE = "0660"
|
removed `sha` and `sha2`
sha and sha2 are no more suported as hash_alg config value
|
diff --git a/src/Bkwld/Decoy/Fields/Listing.php b/src/Bkwld/Decoy/Fields/Listing.php
index <HASH>..<HASH> 100644
--- a/src/Bkwld/Decoy/Fields/Listing.php
+++ b/src/Bkwld/Decoy/Fields/Listing.php
@@ -223,6 +223,9 @@ class Listing extends Field {
*/
public function wrapAndRender() {
+ // Don't set an id
+ $this->setAttribute('id', false);
+
// Because it's a field, Former will add this. But it's not really
// appropriate for a listing
$this->removeClass('form-control');
@@ -240,7 +243,6 @@ class Listing extends Field {
protected function wrapInControlGroup() {
// Add generic stuff
- $this->setAttribute('id', false);
$this->addGroupClass('list-control-group');
// Use the controller description for blockhelp
|
No longer setting an id on listings
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.