diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/code/model/FilesystemPublisher.php b/code/model/FilesystemPublisher.php
index <HASH>..<HASH> 100644
--- a/code/model/FilesystemPublisher.php
+++ b/code/model/FilesystemPublisher.php
@@ -230,7 +230,7 @@ class FilesystemPublisher extends DataExtension {
if($url == "") $url = "/";
if(Director::is_relative_url($url)) $url = Director::absoluteURL($url);
- $sanitizedURL = URLArrayObject::sanitizeUrl($url);
+ $sanitizedURL = URLArrayObject::sanitize_url($url);
$response = Director::test(str_replace('+', ' ', $sanitizedURL));
if (!$response) continue;
diff --git a/code/model/URLArrayObject.php b/code/model/URLArrayObject.php
index <HASH>..<HASH> 100644
--- a/code/model/URLArrayObject.php
+++ b/code/model/URLArrayObject.php
@@ -177,7 +177,7 @@ class URLArrayObject extends ArrayObject {
}
// removes the injected _ID and _ClassName get parameters
- public static function sanitizeUrl($url) {
+ public static function sanitize_url($url) {
list($urlPart, $query) = array_pad(explode('?', $url), 2, '');
parse_str($query, $getVars);
unset($getVars['_ID'], $getVars['_ClassName']); | Renamed sanitize_url to follow coding convention |
diff --git a/python/ray/tune/ray_trial_executor.py b/python/ray/tune/ray_trial_executor.py
index <HASH>..<HASH> 100644
--- a/python/ray/tune/ray_trial_executor.py
+++ b/python/ray/tune/ray_trial_executor.py
@@ -771,7 +771,7 @@ class RayTrialExecutor(TrialExecutor):
self._last_nontrivial_wait = time.time()
return self._running[result_id]
- def fetch_result(self, trial) -> List[Trial]:
+ def fetch_result(self, trial) -> List[Dict]:
"""Fetches result list of the running trials.
Returns: | [tune] Fix type error (#<I>) |
diff --git a/lib/github_changelog_generator/version.rb b/lib/github_changelog_generator/version.rb
index <HASH>..<HASH> 100644
--- a/lib/github_changelog_generator/version.rb
+++ b/lib/github_changelog_generator/version.rb
@@ -1,3 +1,3 @@
module GitHubChangelogGenerator
- VERSION = "1.10.2"
+ VERSION = "1.10.3"
end | Update gemspec to version <I> |
diff --git a/src/OptimizedPathMappingRepository.php b/src/OptimizedPathMappingRepository.php
index <HASH>..<HASH> 100644
--- a/src/OptimizedPathMappingRepository.php
+++ b/src/OptimizedPathMappingRepository.php
@@ -78,7 +78,7 @@ class OptimizedPathMappingRepository implements EditableRepository
$path = Path::canonicalize($path);
- if (! $this->store->exists($path)) {
+ if (!$this->store->exists($path)) {
throw ResourceNotFoundException::forPath($path);
}
@@ -263,7 +263,7 @@ class OptimizedPathMappingRepository implements EditableRepository
$path = $resource->getPath();
// Ignore non-existing resources
- if (! $this->store->exists($path)) {
+ if (!$this->store->exists($path)) {
return;
}
@@ -320,7 +320,7 @@ class OptimizedPathMappingRepository implements EditableRepository
*/
private function ensureDirectoryExists($path)
{
- if (! $this->store->exists($path)) {
+ if (!$this->store->exists($path)) {
// Recursively initialize parent directories
if ($path !== '/') {
$this->ensureDirectoryExists(Path::getDirectory($path)); | Fix code convention in optimized PathMapping repository |
diff --git a/spyder/plugins/editor/widgets/codeeditor.py b/spyder/plugins/editor/widgets/codeeditor.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/editor/widgets/codeeditor.py
+++ b/spyder/plugins/editor/widgets/codeeditor.py
@@ -1479,7 +1479,7 @@ class CodeEditor(TextEditBaseWidget):
# ------------- LSP: Document/Selection formatting --------------------
def format_document_or_range(self):
- if self.has_selected_text():
+ if self.has_selected_text() and self.range_formatting_enabled:
self.format_document_range()
else:
self.format_document()
@@ -1549,6 +1549,9 @@ class CodeEditor(TextEditBaseWidget):
def _apply_document_edits(self, edits):
edits = edits['params']
+ if edits is None:
+ return
+
texts = []
diffs = []
text = self.toPlainText() | Format whole document when range formatting is not available |
diff --git a/source/Application/translations/en/lang.php b/source/Application/translations/en/lang.php
index <HASH>..<HASH> 100644
--- a/source/Application/translations/en/lang.php
+++ b/source/Application/translations/en/lang.php
@@ -683,8 +683,8 @@ $aLang = array(
'_UNIT_CM' => 'cm',
'_UNIT_MM' => 'mm',
'_UNIT_M' => 'm',
-'_UNIT_M2' => 'm�',
-'_UNIT_M3' => 'm�',
+'_UNIT_M2' => 'm²',
+'_UNIT_M3' => 'm³',
'_UNIT_PIECE' => 'piece',
'_UNIT_ITEM' => 'item',
'DOWNLOADS_EMPTY' => 'You have not ordered any files yet.', | Fix encoding issue in lang file
Related #<I>. |
diff --git a/ring.go b/ring.go
index <HASH>..<HASH> 100644
--- a/ring.go
+++ b/ring.go
@@ -24,7 +24,8 @@ type Ring interface {
ReplicaCount() int
// LocalNodeID is the identifier of the local node; determines which ring
// partitions/replicas the local node is responsible for as well as being
- // used to direct message delivery.
+ // used to direct message delivery. If this instance of the ring has no
+ // local node information, 0 will be returned.
LocalNodeID() uint64
// Responsible will return true if the local node is considered responsible
// for a replica of the partition given.
@@ -56,14 +57,14 @@ func (ring *ringImpl) ReplicaCount() int {
}
func (ring *ringImpl) LocalNodeID() uint64 {
- if ring.localNodeIndex == 0 {
+ if ring.localNodeIndex == -1 {
return 0
}
return ring.nodeIDs[ring.localNodeIndex]
}
func (ring *ringImpl) Responsible(partition uint32) bool {
- if ring.localNodeIndex == 0 {
+ if ring.localNodeIndex == -1 {
return false
}
for _, partitionToNodeIndex := range ring.replicaToPartitionToNodeIndex { | index should have been -1 for none |
diff --git a/script/minitest_runner.rb b/script/minitest_runner.rb
index <HASH>..<HASH> 100755
--- a/script/minitest_runner.rb
+++ b/script/minitest_runner.rb
@@ -74,4 +74,4 @@ class MinitestRunner
end
end
-MinitestRunner.new.run if $PROGRAM_NAME == __FILE__
+exit(MinitestRunner.new.run) if $PROGRAM_NAME == __FILE__ | Return proper exit status from test runner
Otherwise bisecting can't work. |
diff --git a/O365/__init__.py b/O365/__init__.py
index <HASH>..<HASH> 100644
--- a/O365/__init__.py
+++ b/O365/__init__.py
@@ -1,6 +1,8 @@
"""
A simple python library to interact with Microsoft Graph and Office 365 API
"""
+import warnings
+
from .__version__ import __version__
from .account import Account
from .address_book import AddressBook, Contact, RecipientType
@@ -17,3 +19,7 @@ from .planner import Planner, Task
from .utils import ImportanceLevel, Query, Recipient
from .utils import OneDriveWellKnowFolderNames, OutlookWellKnowFolderNames
from .utils import FileSystemTokenBackend, FirestoreBackend
+
+
+# allow Deprecation warnings to appear
+warnings.simplefilter('always', DeprecationWarning)
diff --git a/O365/connection.py b/O365/connection.py
index <HASH>..<HASH> 100644
--- a/O365/connection.py
+++ b/O365/connection.py
@@ -384,6 +384,13 @@ class Connection:
:rtype: str
"""
+ # TODO: remove this warning in future releases
+ if redirect_uri == OAUTH_REDIRECT_URL:
+ warnings.warn('The default redirect uri was changed in version 1.1.4. to'
+ ' "https://login.microsoftonline.com/common/oauth2/nativeclient".'
+ ' You may have to change the registered app "redirect uri" or pass here the old "redirect_uri"',
+ DeprecationWarning)
+
client_id, client_secret = self.auth
if requested_scopes: | DeprecationWarnings should now be printed out |
diff --git a/lib/mongo/server/description.rb b/lib/mongo/server/description.rb
index <HASH>..<HASH> 100644
--- a/lib/mongo/server/description.rb
+++ b/lib/mongo/server/description.rb
@@ -465,7 +465,7 @@ module Mongo
#
# @since 2.0.0
def primary?
- !!config[PRIMARY] && !replica_set_name.nil?
+ !!config[PRIMARY] && hosts.include?(address.to_s) && !replica_set_name.nil?
end
# Get the name of the replica set the server belongs to, returns nil if | RUBY-<I> Check that server's hostname is included in its config hosts list to be considered a primary |
diff --git a/server/webapp/WEB-INF/rails.new/spec/javascripts/vsm_analytics_spec.js b/server/webapp/WEB-INF/rails.new/spec/javascripts/vsm_analytics_spec.js
index <HASH>..<HASH> 100644
--- a/server/webapp/WEB-INF/rails.new/spec/javascripts/vsm_analytics_spec.js
+++ b/server/webapp/WEB-INF/rails.new/spec/javascripts/vsm_analytics_spec.js
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-xdescribe("vsm_analytics", function () {
+describe("vsm_analytics", function () {
function VSMRenderer() {}
@@ -249,4 +249,4 @@ xdescribe("vsm_analytics", function () {
}]
};
};
-});
\ No newline at end of file
+}); | Do not ignore vsm_analytics specs |
diff --git a/test/integration/scheduler_perf/scheduler_perf_test.go b/test/integration/scheduler_perf/scheduler_perf_test.go
index <HASH>..<HASH> 100644
--- a/test/integration/scheduler_perf/scheduler_perf_test.go
+++ b/test/integration/scheduler_perf/scheduler_perf_test.go
@@ -77,8 +77,8 @@ var (
label: extensionPointsLabelName,
values: []string{"Filter", "Score"},
},
- "scheduler_e2e_scheduling_duration_seconds": nil,
- "scheduler_pod_scheduling_duration_seconds": nil,
+ "scheduler_scheduling_attempt_duration_seconds": nil,
+ "scheduler_pod_scheduling_duration_seconds": nil,
},
}
) | Replace scheduler_e2e_scheduling_duration_seconds with scheduler_scheduling_attempt_duration_seconds in scheduler_perf |
diff --git a/test/hccrawler/index.test.js b/test/hccrawler/index.test.js
index <HASH>..<HASH> 100644
--- a/test/hccrawler/index.test.js
+++ b/test/hccrawler/index.test.js
@@ -619,7 +619,7 @@ describe('HCCrawler', () => {
describe('when an image is responded after the timeout option', () => {
beforeEach(() => {
- this.server.setContent('/', `<body><img src="${PREFIX}/empty.png"></body>`);
+ this.server.setContent('/', `<body><div style="background-image: url('${PREFIX}/empty.png');"></body>`);
this.server.setContent('/empty.png', '');
this.server.setResponseDelay('/empty.png', 200);
}); | test(hccrawler): use background image for domcontentloaded tests |
diff --git a/lib/mtgox/configuration.rb b/lib/mtgox/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/mtgox/configuration.rb
+++ b/lib/mtgox/configuration.rb
@@ -23,13 +23,6 @@ module MtGox
yield self
end
- # Create a hash of options and their values
- def options
- options = {}
- VALID_OPTIONS_KEYS.each{|k| options[k] = send(k)}
- options
- end
-
# Reset all configuration options to defaults
def reset
self.commission = DEFAULT_COMMISSION | Remove seemingly unused options hash. |
diff --git a/awss/__init__.py b/awss/__init__.py
index <HASH>..<HASH> 100755
--- a/awss/__init__.py
+++ b/awss/__init__.py
@@ -234,6 +234,7 @@ def queryCreate(options):
outputEnd = ""
qryStr = qryStr + FiltEnd + ")"
outputTitle = outputTitle + outputEnd
+ debg.dprintx("\nQuery String")
debg.dprintx(qryStr, True)
debg.dprint("outputTitle: ", outputTitle)
return(qryStr, outputTitle) | Tweak to queryCreate for testing |
diff --git a/molgenis-data-mapper/src/main/java/org/molgenis/data/mapper/controller/MappingServiceController.java b/molgenis-data-mapper/src/main/java/org/molgenis/data/mapper/controller/MappingServiceController.java
index <HASH>..<HASH> 100644
--- a/molgenis-data-mapper/src/main/java/org/molgenis/data/mapper/controller/MappingServiceController.java
+++ b/molgenis-data-mapper/src/main/java/org/molgenis/data/mapper/controller/MappingServiceController.java
@@ -358,8 +358,7 @@ public class MappingServiceController extends MolgenisPluginController
@RequestMapping("/attributeMapping")
public String viewAttributeMapping(@RequestParam(required = true) String mappingProjectId,
@RequestParam(required = true) String target, @RequestParam(required = true) String source,
- @RequestParam(required = true) String targetAttribute,
- @RequestParam(required = true) boolean showSuggestedAttributes, Model model)
+ @RequestParam(required = true) String targetAttribute, Model model)
{
MappingProject project = mappingService.getMappingProject(mappingProjectId);
MappingTarget mappingTarget = project.getMappingTarget(target); | Remove showSuggestedAttributes from the controller method to fix a broken page |
diff --git a/djstripe/models/api.py b/djstripe/models/api.py
index <HASH>..<HASH> 100644
--- a/djstripe/models/api.py
+++ b/djstripe/models/api.py
@@ -4,6 +4,7 @@ from uuid import uuid4
from django.core.validators import RegexValidator
from django.db import models
+from django.forms import ValidationError
from ..enums import APIKeyType
from ..exceptions import InvalidStripeAPIKey
@@ -79,7 +80,10 @@ class APIKey(StripeModel):
def _clean_livemode_and_type(self):
if self.livemode is None or self.type is None:
- self.type, self.livemode = get_api_key_details_by_prefix(self.secret)
+ try:
+ self.type, self.livemode = get_api_key_details_by_prefix(self.secret)
+ except InvalidStripeAPIKey as e:
+ raise ValidationError(str(e))
def clean(self):
self._clean_livemode_and_type() | Catch InvalidStripeAPIKey and re-raise as ValidationError |
diff --git a/lib/bson/regexp.rb b/lib/bson/regexp.rb
index <HASH>..<HASH> 100644
--- a/lib/bson/regexp.rb
+++ b/lib/bson/regexp.rb
@@ -135,7 +135,7 @@ module BSON
def method_missing(method, *arguments)
return super unless respond_to?(method)
- compile.send(method)
+ compile.send(method, *arguments)
end
end
diff --git a/spec/bson/regexp_spec.rb b/spec/bson/regexp_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/bson/regexp_spec.rb
+++ b/spec/bson/regexp_spec.rb
@@ -40,8 +40,12 @@ describe Regexp do
StringIO.new(bson)
end
+ let(:regex) do
+ described_class.from_bson(io)
+ end
+
let(:result) do
- described_class.from_bson(io).compile
+ regex.compile
end
it_behaves_like "a bson element"
@@ -58,7 +62,7 @@ describe Regexp do
it_behaves_like "a serializable bson element"
it "runs the method on the Regexp object" do
- expect(result.match('6')).not_to be_nil
+ expect(regex.match('6')).not_to be_nil
end
end | Fix ArgumentError in BSON::Regexp::Ruby
When a user attempts to call a method on BSON::Regexp::Ruby with
arguments, an ArgumentError will be thrown. This change will actually
pass down the arguments so that such errors will not get raised. |
diff --git a/lib/phut/syntax.rb b/lib/phut/syntax.rb
index <HASH>..<HASH> 100644
--- a/lib/phut/syntax.rb
+++ b/lib/phut/syntax.rb
@@ -60,17 +60,17 @@ module Phut
end
def vswitch(alias_name = nil, &block)
- if block
- attrs = VswitchDirective.new.tap { |vsw| vsw.instance_eval(&block) }
- @config.add_vswitch(alias_name || attrs[:dpid], attrs)
- else
- @config.add_vswitch(alias_name, VswitchDirective.new)
- end
+ attrs = VswitchDirective.new.tap { |vsw| vsw.instance_eval(&block) }
+ @config.add_vswitch(alias_name || attrs[:dpid], attrs)
end
def vhost(alias_name = nil, &block)
- attrs = VhostDirective.new.tap { |vh| vh.instance_eval(&block) }
- @config.add_vhost(alias_name || attrs[:ip], attrs)
+ if block
+ attrs = VhostDirective.new.tap { |vh| vh.instance_eval(&block) }
+ @config.add_vhost(alias_name || attrs[:ip], attrs)
+ else
+ @config.add_vhost(alias_name, VhostDirective.new)
+ end
end
def link(name_a, name_b) | Support the vswitch(name) directive (no block given). |
diff --git a/tests/integration/test_crunch_cube.py b/tests/integration/test_crunch_cube.py
index <HASH>..<HASH> 100644
--- a/tests/integration/test_crunch_cube.py
+++ b/tests/integration/test_crunch_cube.py
@@ -2032,3 +2032,10 @@ class TestCrunchCube(TestCase):
# dimension of the cube).
actual = cube.margin(axis=2)
np.testing.assert_array_equal(actual, expected)
+
+ def test_ca_x_single_cat_cell_margins(test):
+ cube = CrunchCube(FIXT_CA_X_SINGLE_CAT)
+ expected = np.array([25, 28, 23])
+ # Axis equals to (1, 2), because the total is calculated for each slice.
+ actual = cube.margin(axis=(1, 2))
+ np.testing.assert_array_equal(actual, expected) | Add test for 3D cube (CA x (single) CAT) proportions by cell |
diff --git a/src/main/java/org/imgscalr/op/PadOp.java b/src/main/java/org/imgscalr/op/PadOp.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/imgscalr/op/PadOp.java
+++ b/src/main/java/org/imgscalr/op/PadOp.java
@@ -9,11 +9,13 @@ import java.awt.image.BufferedImage;
import java.awt.image.ImagingOpException;
public class PadOp implements IOp {
+ public static final Color DEFAULT_COLOR = Color.BLACK;
+
protected int padding;
protected Color color;
public PadOp(int padding) throws IllegalArgumentException {
- this(padding, Color.BLACK);
+ this(padding, DEFAULT_COLOR);
}
public PadOp(int padding, Color color) throws IllegalArgumentException { | Clarified the declaration of the default color used for padding when one
isn't specified. |
diff --git a/tasks/hash.js b/tasks/hash.js
index <HASH>..<HASH> 100644
--- a/tasks/hash.js
+++ b/tasks/hash.js
@@ -51,7 +51,7 @@ module.exports = function(grunt) {
var dest = file.dest || path.dirname(src);
var newFile = basename + (hash ? options.hashSeparator + hash : '') + ext;
- var outputPath = path.join(dest, newFile);
+ var outputPath = path.join(path.dirname(dest), newFile);
// Determine if the key should be flatten or not. Also normalize the output path
var key = path.join(rootDir, path.basename(src)); | Allow expanded destinations
When `expand` is set to `true`, `file.dest` is actually a full file path rather than a directory. This patch fixes it so that grunt-hash maintains the directory structure but renames the file with the hash in the filename. |
diff --git a/runners/vr/runners/base.py b/runners/vr/runners/base.py
index <HASH>..<HASH> 100644
--- a/runners/vr/runners/base.py
+++ b/runners/vr/runners/base.py
@@ -44,15 +44,16 @@ class BaseRunner(object):
try:
cmd = self.commands[args.command]
- # Commands that have a lock=False attribute won't try to lock the
- # proc.yaml file. 'uptest' and 'shell' are in this category.
- if getattr(cmd, 'lock', True):
- lock_file(self.file)
- else:
- self.file.close()
except KeyError:
raise SystemExit("Command must be one of: %s" %
', '.join(self.commands.keys()))
+
+ # Commands that have a lock=False attribute won't try to lock the
+ # proc.yaml file. 'uptest' and 'shell' are in this category.
+ if getattr(cmd, 'lock', True):
+ lock_file(self.file)
+ else:
+ self.file.close()
cmd()
def setup(self): | Don't feign to trap KeyErrors for file locking operations. |
diff --git a/router.js b/router.js
index <HASH>..<HASH> 100644
--- a/router.js
+++ b/router.js
@@ -48,7 +48,7 @@ module.exports = Router.extend({
// load templates here so they are ready before any change event is triggered
_.each(resp && resp.compiled, dust.loadSource);
- return _.has(resp, 'data') ? resp.data : _.omit(resp, 'compiled', 'navigation', 'site', 'organization');
+ return _.has(resp, 'data') ? resp.data : _.omit(resp, 'compiled', 'navigation', 'site');
}
})
}),
@@ -91,7 +91,7 @@ module.exports = Router.extend({
this.params = _.extend({}, args);
if (Backbone.history._usePushState)
_.defaults(this.params, window.history.state);
- this.query = query;
+ this.query = query || {};
this.search = search;
args.push(query); | Allow organization in page state, and set query to empty object if there is none. |
diff --git a/test/passify.js b/test/passify.js
index <HASH>..<HASH> 100644
--- a/test/passify.js
+++ b/test/passify.js
@@ -1,4 +1,4 @@
-var passify = require('passify');
+var passify = require('../lib/passify');
describe('Passify', function() {
describe('Create', function() { | Require the lib, not the npm install version. |
diff --git a/utils.py b/utils.py
index <HASH>..<HASH> 100644
--- a/utils.py
+++ b/utils.py
@@ -13,7 +13,7 @@ def nodeText(node):
parsing and original xml formatting. This function should strip such
artifacts.
"""
- return u''.format(node.firstChild.data.strip())
+ return u'{0}'.format(node.firstChild.data.strip())
def makeEPUBBase(location, css_location):
'''Contains the functionality to create the ePub directory hierarchy from | Fixed issue where nodeText() had no valid string to format into |
diff --git a/includes/class-freemius.php b/includes/class-freemius.php
index <HASH>..<HASH> 100755
--- a/includes/class-freemius.php
+++ b/includes/class-freemius.php
@@ -15113,9 +15113,12 @@
if ( ! $is_uninstall ) {
$fs_user = Freemius::_get_user_by_email( $email );
if ( is_object( $fs_user ) && ! $this->is_pending_activation() ) {
- return $this->install_with_current_user(
+ return $this->install_with_user(
+ $fs_user,
false,
$trial_plan_id,
+ true,
+ true,
$sites
);
} | [opt-in] [bug-fix] When the opt-in was called programmatically with an empty license key, the install was always with the current admin's user instead of taking the $email param into account and opting in with the selected user. |
diff --git a/xmantissa/webadmin.py b/xmantissa/webadmin.py
index <HASH>..<HASH> 100644
--- a/xmantissa/webadmin.py
+++ b/xmantissa/webadmin.py
@@ -31,8 +31,8 @@ class DeveloperSite(Item, PrefixURLMixin):
prefixURL = 'static/webadmin'
# Counts of each kind of user
- developers = integer()
- administrators = integer()
+ developers = integer(default=0)
+ administrators = integer(default=0)
def install(self):
self.store.powerUp(self, ISessionlessSiteRootPlugin) | Set reasonable defaults for administrator and developer counts |
diff --git a/example/index.js b/example/index.js
index <HASH>..<HASH> 100644
--- a/example/index.js
+++ b/example/index.js
@@ -10,6 +10,12 @@ app.set('view engine', 'html');
app.set('views', require('path').join(__dirname, '/view'));
app.engine('html', hogan);
+// A normal un-protected public URL.
+
+app.get('/', function (req, res) {
+ res.render('index');
+});
+
// Create a session-store to be used by both the express-session
// middleware and the keycloak middleware.
@@ -46,12 +52,6 @@ app.use(keycloak.middleware({
admin: '/'
}));
-// A normal un-protected public URL.
-
-app.get('/', function (req, res) {
- res.render('index');
-});
-
app.get('/login', keycloak.protect(), function (req, res) {
res.render('index', {
result: JSON.stringify(JSON.parse(req.session['keycloak-token']), null, 4), | registering the unprotected endpoint before registering the KC middleware |
diff --git a/lib/networkOut.js b/lib/networkOut.js
index <HASH>..<HASH> 100644
--- a/lib/networkOut.js
+++ b/lib/networkOut.js
@@ -25,10 +25,11 @@ module.exports = function(connection, request) {
if (cb) { cb(); };
},
- stdout: function(str) {
+ stdout: function(str, level) {
var result = {request: request,
responseType: 'stdout',
- stdout: str};
+ stdout: str,
+ level: level || 'debug'};
connection.write(JSON.stringify(result) + '\n');
}, | improving build output with level (debug, info, warn, error) |
diff --git a/lib/ProMotion/tabs/tabs.rb b/lib/ProMotion/tabs/tabs.rb
index <HASH>..<HASH> 100644
--- a/lib/ProMotion/tabs/tabs.rb
+++ b/lib/ProMotion/tabs/tabs.rb
@@ -41,7 +41,8 @@ module ProMotion
item = UITabBarItem.alloc.initWithTitle(title, image: item_image, tag: tag)
if item_selected || item_unselected
- item.setFinishedSelectedImage(item_selected, withFinishedUnselectedImage: item_unselected)
+ item.image = item_unselected
+ item.selectedImage = item_selected
end
item | As per apple docs, setFinishedSelectedImage:withFinishedUnselectedImage: is deprecated as of <I> |
diff --git a/core/components/broker/brokerManager.go b/core/components/broker/brokerManager.go
index <HASH>..<HASH> 100644
--- a/core/components/broker/brokerManager.go
+++ b/core/components/broker/brokerManager.go
@@ -62,7 +62,7 @@ func (b component) ValidateOTAA(bctx context.Context, req *core.ValidateOTAABrok
// UpsertABP implements the core.BrokerManager interface
func (b component) UpsertABP(bctx context.Context, req *core.UpsertABPBrokerReq) (*core.UpsertABPBrokerRes, error) {
- b.Ctx.Debug("Handle ValidateOTAA request")
+ b.Ctx.Debug("Handle UpsertABP request")
// 1. Validate the request
re := regexp.MustCompile("^([-\\w]+\\.?)+:\\d+$") | [log] Fix copy/paste mistake |
diff --git a/neuron/lang.js b/neuron/lang.js
index <HASH>..<HASH> 100755
--- a/neuron/lang.js
+++ b/neuron/lang.js
@@ -163,25 +163,20 @@ K.mix(K, {
* method to encapsulate the delayed function
*/
delay: function(fn, delay, isInterval){
- var timer;
-
- return {
+ var ret = {
start: function(){
- this.cancel();
- return timer = isInterval ? setInterval(fn, delay) : setTimeout(fn, delay);
+ ret.cancel();
+ return ret.id = isInterval ? setInterval(fn, delay) : setTimeout(fn, delay);
},
cancel: function(){
- isInterval ? clearInterval(timer) : clearTimeout(timer);
- return this;
+ var timer = ret.id;
+
+ ret.id = isInterval ? clearInterval(timer) : clearTimeout(timer);
+ return ret;
}
- }
- },
-
- /**
- *
- */
- each: function(obj, fn, stop){
+ };
+ return ret;
},
makeArray: function(obj){ | adjust KM.delay method, setting timer id as a public member |
diff --git a/rosetta/views.py b/rosetta/views.py
index <HASH>..<HASH> 100644
--- a/rosetta/views.py
+++ b/rosetta/views.py
@@ -219,6 +219,8 @@ def home(request):
if ref_entry is not None and ref_entry.msgstr:
o.ref_txt = ref_entry.msgstr
LANGUAGES = list(settings.LANGUAGES) + [('msgid', 'MSGID')]
+ else:
+ LANGUAGES = settings.LANGUAGES
if 'page' in request.GET and int(request.GET.get('page')) <= paginator.num_pages and int(request.GET.get('page')) > 0:
page = int(request.GET.get('page')) | Fixed a crash when reflang wouldn't be enabled.
This crash was introduced by the merge with mbi/develop. |
diff --git a/src/main/java/org/minimalj/frontend/impl/swing/toolkit/SwingFrontend.java b/src/main/java/org/minimalj/frontend/impl/swing/toolkit/SwingFrontend.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/minimalj/frontend/impl/swing/toolkit/SwingFrontend.java
+++ b/src/main/java/org/minimalj/frontend/impl/swing/toolkit/SwingFrontend.java
@@ -140,11 +140,7 @@ public class SwingFrontend extends Frontend {
@Override
public IComponent createVerticalGroup(IComponent... components) {
- if (components.length == 1) {
- return components[0];
- } else {
- return new SwingVerticalGroup(components);
- }
+ return new SwingVerticalGroup(components);
}
@Override | SwingFrontend: don't optimize vertical group
Layouting is different for a vertical group. |
diff --git a/sedge/cli.py b/sedge/cli.py
index <HASH>..<HASH> 100644
--- a/sedge/cli.py
+++ b/sedge/cli.py
@@ -81,7 +81,7 @@ def command_update(args):
# do not edit this file manually, edit the source file and re-run `sedge'
#
-''' % (args.output_file))
+''' % (args.config_file))
write_to(ConfigOutput(tmpf.file))
tmpf.close()
if args.verbose: | fix path sedge config path in generated SSH config |
diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py
index <HASH>..<HASH> 100644
--- a/pythonforandroid/bootstraps/common/build/build.py
+++ b/pythonforandroid/bootstraps/common/build/build.py
@@ -616,6 +616,10 @@ tools directory of the Android SDK.
default=default_min_api, type=int,
help=('Minimum Android SDK version that the app supports. '
'Defaults to {}.'.format(default_min_api)))
+ ap.add_argument('--allow-minsdk-ndkapi-mismatch', default=False,
+ action='store_true',
+ help=('Allow the --minsdk argument to be different from '
+ 'the discovered ndk_api in the dist'))
ap.add_argument('--intent-filters', dest='intent_filters',
help=('Add intent-filters xml rules to the '
'AndroidManifest.xml file. The argument is a ' | Re-added argument that was lost during build.py merge |
diff --git a/polyfills/Array/from/tests.js b/polyfills/Array/from/tests.js
index <HASH>..<HASH> 100644
--- a/polyfills/Array/from/tests.js
+++ b/polyfills/Array/from/tests.js
@@ -92,27 +92,6 @@ describe('returns an array with', function () {
}
}
- it('can convert from a user-defined iterator', function () {
- function iterator(cnt) {
- return {
- next: function () {
- return cnt === 0
- ? {
- done: true
- }
- : {
- value: cnt--,
- done: false
- };
- }
- };
- }
- proclaim.deepEqual(Array.from(iterator(0)), []);
- proclaim.deepEqual(Array.from(iterator(1)), [1]);
- proclaim.deepEqual(Array.from(iterator(2)), [2, 1]);
- proclaim.deepEqual(Array.from(iterator(3)), [3, 2, 1]);
- });
-
if ('Symbol' in window && 'iterator' in Symbol) {
it('can understand objects which have a property named Symbol.iterator', function () {
var o = {}; | Remove incorrect test for userland defined iterator on Array.from (#<I>)
This is not a user defined iterator |
diff --git a/repository.go b/repository.go
index <HASH>..<HASH> 100644
--- a/repository.go
+++ b/repository.go
@@ -268,8 +268,12 @@ func (r *Repository) ListTags(rbo *RepositoryTagOptions) (*RepositoryTags, error
if err != nil {
return nil, err
}
-
- return decodeRepositoryTags(response)
+ bodyBytes, err := ioutil.ReadAll(response)
+ if err != nil {
+ return nil, err
+ }
+ bodyString := string(bodyBytes)
+ return decodeRepositoryTags(bodyString)
}
func (r *Repository) Delete(ro *RepositoryOptions) (interface{}, error) {
@@ -575,10 +579,10 @@ func decodeRepositoryBranch(branchResponseStr string) (*RepositoryBranch, error)
return &repositoryBranch, nil
}
-func decodeRepositoryTags(tagResponse interface{}) (*RepositoryTags, error) {
+func decodeRepositoryTags(tagResponseStr string) (*RepositoryTags, error) {
var tagResponseMap map[string]interface{}
- err := json.Unmarshal(tagResponse.([]byte), &tagResponseMap)
+ err := json.Unmarshal([]byte(tagResponseStr), &tagResponseMap)
if err != nil {
return nil, err
} | Fix ListTags (#<I>) (#<I>) |
diff --git a/Tests/TestCase.php b/Tests/TestCase.php
index <HASH>..<HASH> 100755
--- a/Tests/TestCase.php
+++ b/Tests/TestCase.php
@@ -16,7 +16,7 @@
*/
namespace AlphaLemon\AlphaLemonCmsBundle\Tests;
-class TestCase extends \PHPUnit_Framework_TestCase
+abstract class TestCase extends \PHPUnit_Framework_TestCase
{
protected $connection = null;
diff --git a/Tests/WebTestCaseFunctional.php b/Tests/WebTestCaseFunctional.php
index <HASH>..<HASH> 100644
--- a/Tests/WebTestCaseFunctional.php
+++ b/Tests/WebTestCaseFunctional.php
@@ -34,7 +34,7 @@ use AlphaLemon\AlphaLemonCmsBundle\Core\Repository\Factory\AlFactoryRepository;
*
* @author alphalemon <webmaster@alphalemon.com>
*/
-class WebTestCaseFunctional extends WebTestCase
+abstract class WebTestCaseFunctional extends WebTestCase
{
protected $client;
protected static $languages; | made base class for unit and functional tests abstract |
diff --git a/config/generators.php b/config/generators.php
index <HASH>..<HASH> 100644
--- a/config/generators.php
+++ b/config/generators.php
@@ -14,6 +14,7 @@ return [
'component' => '.component.js',
'componentView' => '.component.html',
'dialog' => '.dialog.js',
+ 'dialogView' => '.dialog.html',
'service' => '.service.js',
'config' => '.config.js',
'filter' => '.filter.js',
diff --git a/src/Console/Commands/AngularDialog.php b/src/Console/Commands/AngularDialog.php
index <HASH>..<HASH> 100644
--- a/src/Console/Commands/AngularDialog.php
+++ b/src/Console/Commands/AngularDialog.php
@@ -61,7 +61,7 @@ class AngularDialog extends Command
File::makeDirectory($folder, 0775, true);
//create view (.html)
- File::put($folder.'/'.$name.'.html', $html);
+ File::put($folder.'/'.$name.config('generators.prefix.dialogView', '.html'), $html);
//create controller (.js)
File::put($folder.'/'.$name.config('generators.prefix.dialog'), $js); | dialog view is now .dialog.html |
diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php
index <HASH>..<HASH> 100644
--- a/cake/libs/controller/components/auth.php
+++ b/cake/libs/controller/components/auth.php
@@ -209,12 +209,6 @@ class AuthComponent extends Component {
*/
public $logoutRedirect = null;
-/**
- * The name of model or model object, or any other object has an isAuthorized method.
- *
- * @var string
- */
- public $object = null;
/**
* Error to display when user login fails. For security purposes, only one error is used for all | Removing a dead property. |
diff --git a/lib/listen/adapter/linux.rb b/lib/listen/adapter/linux.rb
index <HASH>..<HASH> 100644
--- a/lib/listen/adapter/linux.rb
+++ b/lib/listen/adapter/linux.rb
@@ -12,7 +12,8 @@ module Listen
:delete,
:move,
:close_write
- ]
+ ],
+ wait_for_delay: 0.1
}
private
diff --git a/lib/listen/adapter/polling.rb b/lib/listen/adapter/polling.rb
index <HASH>..<HASH> 100644
--- a/lib/listen/adapter/polling.rb
+++ b/lib/listen/adapter/polling.rb
@@ -8,7 +8,7 @@ module Listen
class Polling < Base
OS_REGEXP = // # match every OS
- DEFAULTS = { latency: 1.0 }
+ DEFAULTS = { latency: 1.0, wait_for_delay: 0.01 }
private
diff --git a/spec/acceptance/listen_spec.rb b/spec/acceptance/listen_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/acceptance/listen_spec.rb
+++ b/spec/acceptance/listen_spec.rb
@@ -1,7 +1,7 @@
# encoding: UTF-8
RSpec.describe 'Listen', acceptance: true do
- let(:base_options) { { wait_for_delay: 0.1, latency: 0.1 } }
+ let(:base_options) { { latency: 0.1 } }
let(:polling_options) { {} }
let(:options) { {} }
let(:all_options) { base_options.merge(polling_options).merge(options) } | make wait_for_delay default adapter specific |
diff --git a/runcommands/command.py b/runcommands/command.py
index <HASH>..<HASH> 100644
--- a/runcommands/command.py
+++ b/runcommands/command.py
@@ -12,7 +12,7 @@ from .exc import CommandError, RunCommandsError
from .util import cached_property, camel_to_underscore, get_hr, printer
-__all__ = ['command', 'Command']
+__all__ = ['command', 'subcommand', 'Command']
class Command: | Add subcommand to command.__all__
Amends b<I>a7da6bee4 |
diff --git a/spec/unit/application/inspect_spec.rb b/spec/unit/application/inspect_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/application/inspect_spec.rb
+++ b/spec/unit/application/inspect_spec.rb
@@ -246,9 +246,9 @@ describe Puppet::Application::Inspect do
@inspect.run_command
@report.status.should == "failed"
- @report.logs.select{|log| log.message =~ /Could not inspect/}.count.should == 1
- @report.resource_statuses.count.should == 1
- @report.resource_statuses['Stub_type[foo]'].events.count.should == 1
+ @report.logs.select{|log| log.message =~ /Could not inspect/}.size.should == 1
+ @report.resource_statuses.size.should == 1
+ @report.resource_statuses['Stub_type[foo]'].events.size.should == 1
event = @report.resource_statuses['Stub_type[foo]'].events.first
event.property.should == "content"
@@ -265,7 +265,7 @@ describe Puppet::Application::Inspect do
@inspect.run_command
- @report.resource_statuses.count.should == 2
+ @report.resource_statuses.size.should == 2
@report.resource_statuses.keys.should =~ ['Stub_type[foo]', 'Stub_type[bar]']
end
end | maint: Ruby < <I> knows size but not count
Reviewd-by: Nick Lewis |
diff --git a/lib/Fakturoid.php b/lib/Fakturoid.php
index <HASH>..<HASH> 100644
--- a/lib/Fakturoid.php
+++ b/lib/Fakturoid.php
@@ -279,4 +279,3 @@ class Fakturoid {
}
}
-?> | Omit closing `?>`.
It's considered as a best-practice (<URL>)
to avoid issue with whitespace being sent as a response before headers
are sent. |
diff --git a/tests/TestCase.php b/tests/TestCase.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -20,4 +20,16 @@ abstract class TestCase extends PHPUnitTestCase
parent::expectExceptionMessageRegExp($regularExpression);
}
}
+
+ /**
+ * Backwards compatibility for PHPUnit 7.5.
+ */
+ public static function assertDirectoryDoesNotExist(string $directory, string $message = ''): void
+ {
+ if (method_exists(PHPUnitTestCase::class, 'expectExceptionMessageMatches')) {
+ parent::assertDirectoryDoesNotExist($directory, $message);
+ } else {
+ static::assertFalse(is_dir($directory), $message);
+ }
+ }
} | Add backwards compatibility for assertDirectoryDoesNotExist |
diff --git a/pypelogs.py b/pypelogs.py
index <HASH>..<HASH> 100644
--- a/pypelogs.py
+++ b/pypelogs.py
@@ -5,10 +5,6 @@ import pypein
import pypef
import pypeout
from g11pyutils import StopWatch
-# Execfile doesn't seem to do anything with imports,
-# So add some common ones here
-import hashlib
-import base64
LOG = logging.getLogger("pypelogs")
@@ -26,7 +22,7 @@ def main():
if args.config:
LOG.info("Running config file %s" % args.config)
- execfile(args.config)
+ execfile(args.config, globals())
process(args.specs) | Pass globals to execfile so imports are available. |
diff --git a/lib/generamba/version.rb b/lib/generamba/version.rb
index <HASH>..<HASH> 100644
--- a/lib/generamba/version.rb
+++ b/lib/generamba/version.rb
@@ -1,3 +1,3 @@
module Generamba
- VERSION = '0.7.4'
+ VERSION = '0.7.5'
end | Increased version number to <I> |
diff --git a/lib/dialect/postgres.js b/lib/dialect/postgres.js
index <HASH>..<HASH> 100644
--- a/lib/dialect/postgres.js
+++ b/lib/dialect/postgres.js
@@ -1061,7 +1061,7 @@ Postgres.prototype.handleDistinct = function(actions,filters) {
*/
function dontParenthesizeSubQuery(parentQuery){
if (!parentQuery) return false;
- if (parentQuery.nodes.length == 0) return false;
+ if (parentQuery.nodes.length === 0) return false;
if (parentQuery.nodes[0].type != 'INSERT') return false;
return true;
} | jshint-fix: fix for jshint error |
diff --git a/utilitybelt.py b/utilitybelt.py
index <HASH>..<HASH> 100644
--- a/utilitybelt.py
+++ b/utilitybelt.py
@@ -283,11 +283,7 @@ def ipvoid_check(ip):
detect_site = each.parent.parent.td.text.lstrip()
detect_url = each.parent.a['href']
return_dict[detect_site] = detect_url
- else:
- return None
- if len(return_dict) == 0:
- return None
return return_dict
@@ -309,8 +305,6 @@ def urlvoid_check(name):
detect_url = each.parent.a['href']
return_dict[detect_site] = detect_url
- if len(return_dict) == 0:
- return None
return return_dict
@@ -334,9 +328,5 @@ def urlvoid_ip_check(ip):
return_dict['bad_names'].append(each.parent.text.strip())
for each in data.findAll('img', alt='Valid'):
return_dict['other_names'].append(each.parent.text.strip())
- else:
- return None
- if len(return_dict) == 0:
- return None
return return_dict | Remove branches we should not reach that would fail silently if we did |
diff --git a/lib/deep_cover/node/mixin/has_child.rb b/lib/deep_cover/node/mixin/has_child.rb
index <HASH>..<HASH> 100644
--- a/lib/deep_cover/node/mixin/has_child.rb
+++ b/lib/deep_cover/node/mixin/has_child.rb
@@ -73,8 +73,8 @@ module DeepCover
if remap.is_a? Hash
type_map = remap
remap = -> (child) do
- klass = type_map[child.class]
- klass ||= type_map[child.type] if child.respond_to? :type
+ klass = type_map[child.type] if child.respond_to? :type
+ klass ||= type_map[child.class]
klass
end
types.concat(type_map.values).uniq! | Remap based on type first, then on Class |
diff --git a/static/slidey/js/slidey.js b/static/slidey/js/slidey.js
index <HASH>..<HASH> 100644
--- a/static/slidey/js/slidey.js
+++ b/static/slidey/js/slidey.js
@@ -383,10 +383,12 @@ function Slidey()
}
switch (e.keyCode) {
+ case 33: // Page up
case 37: // Left
e.preventDefault();
slidey.precDiscover();
break;
+ case 34: // Page down
case 39: // Right
e.preventDefault();
slidey.nextDiscover(); | Adding pg down/up support |
diff --git a/src/serialization/sb2.js b/src/serialization/sb2.js
index <HASH>..<HASH> 100644
--- a/src/serialization/sb2.js
+++ b/src/serialization/sb2.js
@@ -215,7 +215,7 @@ const parseScratchObject = function (object, runtime, extensions, topLevel, zip)
const sprite = new Sprite(blocks, runtime);
// Sprite/stage name from JSON.
if (object.hasOwnProperty('objName')) {
- sprite.name = object.objName;
+ sprite.name = topLevel ? 'Stage' : object.objName;
}
// Costumes from JSON.
const costumePromises = []; | The stage should always be called 'Stage'. |
diff --git a/server/fsm.go b/server/fsm.go
index <HASH>..<HASH> 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -541,8 +541,12 @@ func (h *FSMHandler) recvMessageWithError() error {
if len(h.holdTimerResetCh) == 0 {
h.holdTimerResetCh <- true
}
+ if m.Header.Type == bgp.BGP_MSG_KEEPALIVE {
+ return nil
+ }
case bgp.BGP_MSG_NOTIFICATION:
h.reason = "Notification received"
+ return nil
}
}
} | server: don't put keepalive & notification to incoming ch
these msgs are garbage for server's main loop and just wasting channel
buffer. |
diff --git a/src/Commands/CrudCommand.php b/src/Commands/CrudCommand.php
index <HASH>..<HASH> 100644
--- a/src/Commands/CrudCommand.php
+++ b/src/Commands/CrudCommand.php
@@ -20,7 +20,7 @@ class CrudCommand extends Command
{--view-path= : The name of the view path.}
{--namespace= : Namespace of the controller.}
{--route-group= : Prefix of the route group.}
- {--pagination=15 : The amount of models per page for index pages.}
+ {--pagination=25 : The amount of models per page for index pages.}
{--indexes= : The fields to add an index to.}
{--foreign-keys= : Any foreign keys for the table.}
{--relationships= : The relationships for the model}
diff --git a/src/Commands/CrudControllerCommand.php b/src/Commands/CrudControllerCommand.php
index <HASH>..<HASH> 100644
--- a/src/Commands/CrudControllerCommand.php
+++ b/src/Commands/CrudControllerCommand.php
@@ -18,7 +18,7 @@ class CrudControllerCommand extends GeneratorCommand
{--view-path= : The name of the view path.}
{--required-fields= : Required fields for validations.}
{--route-group= : Prefix of the route group.}
- {--pagination=15 : The amount of models per page for index pages.}';
+ {--pagination=25 : The amount of models per page for index pages.}';
/**
* The console command description. | changed default items per page from <I> to <I> |
diff --git a/richtextfx/src/integrationTest/java/org/fxmisc/richtext/api/HitTests.java b/richtextfx/src/integrationTest/java/org/fxmisc/richtext/api/HitTests.java
index <HASH>..<HASH> 100644
--- a/richtextfx/src/integrationTest/java/org/fxmisc/richtext/api/HitTests.java
+++ b/richtextfx/src/integrationTest/java/org/fxmisc/richtext/api/HitTests.java
@@ -5,6 +5,7 @@ import javafx.geometry.Bounds;
import javafx.geometry.Insets;
import javafx.geometry.Point2D;
import javafx.geometry.Pos;
+import javafx.stage.Stage;
import org.fxmisc.richtext.InlineCssTextAreaAppTest;
import org.fxmisc.richtext.model.NavigationActions;
import org.junit.Before;
@@ -19,6 +20,15 @@ import static org.junit.Assert.assertEquals;
@RunWith(NestedRunner.class)
public class HitTests extends InlineCssTextAreaAppTest {
+ @Override
+ public void start(Stage stage) throws Exception {
+ super.start(stage);
+
+ // insure stage width doesn't change irregardless of changes in superclass' start method
+ stage.setWidth(400);
+ stage.setHeight(400);
+ }
+
private void moveCaretToAreaEnd() {
area.moveTo(area.getLength());
} | Prevent super class stage dimension changes from messing up assertions |
diff --git a/MediaBundle/DisplayBlock/Strategies/DisplayMediaStrategy.php b/MediaBundle/DisplayBlock/Strategies/DisplayMediaStrategy.php
index <HASH>..<HASH> 100644
--- a/MediaBundle/DisplayBlock/Strategies/DisplayMediaStrategy.php
+++ b/MediaBundle/DisplayBlock/Strategies/DisplayMediaStrategy.php
@@ -46,10 +46,10 @@ class DisplayMediaStrategy extends AbstractStrategy
public function show(ReadBlockInterface $block)
{
$linkUrl = null;
- $nodeName = $block->getAttribute('linkUrl');
+ $nodeToLink = $block->getAttribute('nodeToLink');
- if (!empty($nodeName)) {
- $linkUrl = $this->nodeRepository->findOneByNodeIdAndLanguageWithPublishedAndLastVersionAndSiteId($nodeName);
+ if (!empty($nodeToLink)) {
+ $linkUrl = $this->nodeRepository->findOneByNodeIdAndLanguageWithPublishedAndLastVersionAndSiteId($nodeToLink);
}
$parameters = array( | rename linkUrl into nodeToLink |
diff --git a/src/KeenIO/Service/KeenIO.php b/src/KeenIO/Service/KeenIO.php
index <HASH>..<HASH> 100644
--- a/src/KeenIO/Service/KeenIO.php
+++ b/src/KeenIO/Service/KeenIO.php
@@ -140,7 +140,7 @@ final class KeenIO
* @param $allowed_operations - what operations the generated scoped key will allow
* @return string
*/
- public static function getScopedKey($apiKey, $filters, $allowed_operations)
+ public static function getScopedKey($apiKey, $filters, $allowed_operations, $source = MCRYPT_DEV_RANDOM)
{
self::validateConfiguration();
@@ -153,7 +153,7 @@ final class KeenIO
$optionsJson = self::padString(json_encode($options));
$ivLength = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
- $iv = mcrypt_create_iv($ivLength);
+ $iv = mcrypt_create_iv($ivLength, $source);
$encrypted = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $apiKey, $optionsJson, MCRYPT_MODE_CBC, $iv); | allow to choose the "random source" when generating scoped keys |
diff --git a/installation-bundle/src/Database/Installer.php b/installation-bundle/src/Database/Installer.php
index <HASH>..<HASH> 100644
--- a/installation-bundle/src/Database/Installer.php
+++ b/installation-bundle/src/Database/Installer.php
@@ -104,7 +104,7 @@ class Installer
{
$return = ['CREATE' => [], 'ALTER_CHANGE' => [], 'ALTER_ADD' => [], 'DROP' => [], 'ALTER_DROP' => []];
$fromSchema = $this->connection->getSchemaManager()->createSchema();
- $toSchema = System::getContainer()->get('contao.migrations.schema_provider')->createSchema();
+ $toSchema = System::getContainer()->get('contao.doctrine.schema_provider')->createSchema();
$diff = $fromSchema->getMigrateToSql($toSchema, $this->connection->getDatabasePlatform()); | [Installation] Changed service name of schema provider |
diff --git a/outline/wsgi.py b/outline/wsgi.py
index <HASH>..<HASH> 100644
--- a/outline/wsgi.py
+++ b/outline/wsgi.py
@@ -9,6 +9,8 @@ https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "replan.settings")
+os.environ.setdefault('DJANGO_CONFIGURATION', 'Dev')
+
+from configurations.wsgi import get_wsgi_application
-from django.core.wsgi import get_wsgi_application
application = get_wsgi_application() | Adding django-configurations hook up for wsgi file. |
diff --git a/src/Symfony/Component/Yaml/Tests/ParserTest.php b/src/Symfony/Component/Yaml/Tests/ParserTest.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Yaml/Tests/ParserTest.php
+++ b/src/Symfony/Component/Yaml/Tests/ParserTest.php
@@ -25,12 +25,12 @@ class ParserTest extends TestCase
/** @var Parser */
protected $parser;
- protected function setUp()
+ private function doSetUp()
{
$this->parser = new Parser();
}
- protected function tearDown()
+ private function doTearDown()
{
$this->parser = null; | [Yaml] fix test for PHP <I> |
diff --git a/src/routes.php b/src/routes.php
index <HASH>..<HASH> 100644
--- a/src/routes.php
+++ b/src/routes.php
@@ -10,7 +10,9 @@
|
*/
-Route::get($this->app['lazy-strings']->getStringsRoute(), function () {
+$stringsRoute = (is_array($this->app['lazy-strings']->getStringsRoute())) ? 'lazy/build-copy' : $this->app['lazy-strings']->getStringsRoute();
+
+Route::get($stringsRoute, function () {
$lazyStrings = $this->app['lazy-strings'];
$lazyStrings->generateStrings();
}); | Give a default hardcoded value to lazy route.
Add this value when LazyStrings is initialized with no configuration. |
diff --git a/demos/single_song_demo/js/player.js b/demos/single_song_demo/js/player.js
index <HASH>..<HASH> 100644
--- a/demos/single_song_demo/js/player.js
+++ b/demos/single_song_demo/js/player.js
@@ -1,8 +1,6 @@
(function () {
var
- //AUDIO_FILE = '../songs/Fire Hive (Krewella fuck on me remix).ogg',
- //AUDIO_FILE = '../songs/One Minute.ogg',
AUDIO_FILE = '../songs/zircon_devils_spirit.ogg',
PARTICLE_COUNT = 250,
MAX_PARTICLE_SIZE = 12, | Woops, that shouldn't be there |
diff --git a/certificate/certificate.go b/certificate/certificate.go
index <HASH>..<HASH> 100644
--- a/certificate/certificate.go
+++ b/certificate/certificate.go
@@ -88,7 +88,7 @@ func FromPemBytes(bytes []byte, password string) (tls.Certificate, error) {
if block.Type == "CERTIFICATE" {
cert.Certificate = append(cert.Certificate, block.Bytes)
}
- if block.Type == "PRIVATE KEY" || strings.HasSuffix(block.Type, "PRIVATE KEY") {
+ if strings.HasSuffix(block.Type, "PRIVATE KEY") {
key, err := unencryptPrivateKey(block, password)
if err != nil {
return tls.Certificate{}, err | Simplify FromPemBytes conditional (#<I>)
- Simplify logic. strings.HasSuffix can check both for suffix and for equality |
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -98,13 +98,13 @@ exports['Test on and off'] = function (test) {
count++;
};
- orange.once('test', cb1);
- orange.once('test2', cb2);
+ orange.on('test', cb1);
+ orange.on('test2', cb2);
orange.test();
test.equal(count, 1);
- orange.off(cb1);
+ orange.off('test', cb1);
orange.test();
test.equal(count, 1); | Fix test to actually test on and off. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@ setup(
'developed by Kenneth O. Stanley for evolving arbitrary neural networks.',
packages=['neat', 'neat/iznn', 'neat/nn', 'neat/ctrnn'],
classifiers=[
- 'Development Status :: 3 - Alpha',
+ 'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research', | This revision was uploaded to PyPI as release <I>. |
diff --git a/examples/index.php b/examples/index.php
index <HASH>..<HASH> 100644
--- a/examples/index.php
+++ b/examples/index.php
@@ -14,8 +14,6 @@ use Zend\Expressive\Application;
use Zend\Expressive\Router\FastRouteRouter;
require_once __DIR__ . '/vendor/autoload.php';
-require_once __DIR__ . '/../src/PSR7Csrf/Factory.php';
-require_once __DIR__ . '/../src/PSR7Csrf/CSRFCheckerMiddleware.php';
$app = new Application(new FastRouteRouter()); | Removing manual requires (incorrect) |
diff --git a/src/frontend/org/voltdb/SnapshotDaemon.java b/src/frontend/org/voltdb/SnapshotDaemon.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/SnapshotDaemon.java
+++ b/src/frontend/org/voltdb/SnapshotDaemon.java
@@ -709,6 +709,15 @@ public class SnapshotDaemon implements SnapshotCompletionInterest {
success = false;
}
+ if ( result.getColumnCount() == 2
+ && "RESULT".equals(result.getColumnName(0))
+ && "ERR_MSG".equals(result.getColumnName(1))) {
+ boolean advanced = result.advanceRow();
+ assert(advanced);
+ loggingLog.error("Snapshot failed with failure response: " + result.getString("ERR_MSG"));
+ success = false;
+ }
+
//assert(result.getColumnName(1).equals("TABLE"));
if (success) {
while (result.advanceRow()) { | ENG-<I> handle better client response in snapshot save callbacks |
diff --git a/test/test.backbone_db.js b/test/test.backbone_db.js
index <HASH>..<HASH> 100644
--- a/test/test.backbone_db.js
+++ b/test/test.backbone_db.js
@@ -4,7 +4,7 @@ var MyModel = setup.MyModel;
var MyCollection = setup.MyCollection;
var shared = require('backbone-db/test');
-describe('backbone-db-mongodb', function () {
+describe('backbone-db tests', function () {
before(function (next) {
var self = this;
setup.setupDb(function () {
@@ -23,4 +23,4 @@ describe('backbone-db-mongodb', function () {
});
-});
\ No newline at end of file
+}); | rename to backbone-db tests |
diff --git a/paypal/standard/models.py b/paypal/standard/models.py
index <HASH>..<HASH> 100644
--- a/paypal/standard/models.py
+++ b/paypal/standard/models.py
@@ -176,8 +176,8 @@ class PayPalStandardBase(Model):
flag = models.BooleanField(default=False, blank=True)
flag_code = models.CharField(max_length=16, blank=True)
flag_info = models.TextField(blank=True)
- query = models.TextField(blank=True) # What we sent to PayPal.
- response = models.TextField(blank=True) # What we got back.
+ query = models.TextField(blank=True) # What Paypal sent to us initially
+ response = models.TextField(blank=True) # What we got back from our request
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True) | Corrected comments on some fields on standard model |
diff --git a/tests/test_section.py b/tests/test_section.py
index <HASH>..<HASH> 100644
--- a/tests/test_section.py
+++ b/tests/test_section.py
@@ -5,6 +5,7 @@ import requests_mock
from util import register_uris
from pycanvas.enrollment import Enrollment
from pycanvas import Canvas
+from pycanvas import Section
class TestSection(unittest.TestCase):
@@ -15,7 +16,7 @@ class TestSection(unittest.TestCase):
def setUpClass(self):
requires = {
'generic': ['not_found'],
- 'section': ['get_by_id', 'list_enrollments', 'list_enrollments_2']
+ 'section': ['decross_section', 'get_by_id', 'list_enrollments', 'list_enrollments_2']
}
adapter = requests_mock.Adapter()
@@ -36,3 +37,8 @@ class TestSection(unittest.TestCase):
assert len(enrollment_list) == 4
assert isinstance(enrollment_list[0], Enrollment)
+
+ def test_decross_list_section(self):
+ section = self.section.test_decross_list_section()
+
+ assert isinstance(section, Section) | Added tests for decross list section |
diff --git a/shared/validate/validate.go b/shared/validate/validate.go
index <HASH>..<HASH> 100644
--- a/shared/validate/validate.go
+++ b/shared/validate/validate.go
@@ -107,12 +107,14 @@ func IsBool(value string) error {
}
// IsOneOf checks whether the string is present in the supplied slice of strings.
-func IsOneOf(value string, valid []string) error {
- if !stringInSlice(value, valid) {
- return fmt.Errorf("Invalid value %q (not one of %s)", value, valid)
- }
+func IsOneOf(valid ...string) func(value string) error {
+ return func(value string) error {
+ if !stringInSlice(value, valid) {
+ return fmt.Errorf("Invalid value %q (not one of %s)", value, valid)
+ }
- return nil
+ return nil
+ }
}
// IsAny accepts all strings as valid.
@@ -605,7 +607,7 @@ func IsCompressionAlgorithm(value string) error {
// IsArchitecture validates whether the value is a valid LXD architecture name.
func IsArchitecture(value string) error {
- return IsOneOf(value, osarch.SupportedArchitectures())
+ return IsOneOf(osarch.SupportedArchitectures()...)(value)
}
// IsCron checks that it's a valid cron pattern or alias. | shared/validate: Change IsOneOf to return validator |
diff --git a/jpype/__init__.py b/jpype/__init__.py
index <HASH>..<HASH> 100644
--- a/jpype/__init__.py
+++ b/jpype/__init__.py
@@ -49,6 +49,7 @@ __all__.extend(_jcustomizer.__all__)
__all__.extend(_gui.__all__)
__version__ = "0.7.5"
+__version_info__ = __version__.split('.')
@_core.deprecated | added missing version_info tuple |
diff --git a/src/main/java/fr/univnantes/termsuite/engines/gatherer/TermMerger.java b/src/main/java/fr/univnantes/termsuite/engines/gatherer/TermMerger.java
index <HASH>..<HASH> 100644
--- a/src/main/java/fr/univnantes/termsuite/engines/gatherer/TermMerger.java
+++ b/src/main/java/fr/univnantes/termsuite/engines/gatherer/TermMerger.java
@@ -64,7 +64,8 @@ public class TermMerger extends SimpleEngine {
logger.debug("Merging {} relations", relationsToMerge.size());
relationsToMerge.forEach(rel -> {
- logger.trace("Merging variant {} into variant {}", rel.getTo(), rel.getFrom());
+ if(logger.isTraceEnabled())
+ logger.trace("Merging variant {} into variant {}", rel.getTo(), rel.getFrom());
watch(rel.getRelation());
Collection<TermOccurrence> occurrences = occStore.getOccurrences(rel.getTo().getTerm()); | Prevent logger.trace from tracing when not enabled |
diff --git a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php b/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
+++ b/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -267,7 +267,9 @@ class BelongsToMany extends Relation {
{
$query->select(new \Illuminate\Database\Query\Expression('count(*)'));
- $query->from($this->table.' as '.$hash = $this->getRelationCountHash());
+ $tablePrefix = $this->query->getQuery()->getConnection()->getTablePrefix();
+
+ $query->from($this->table.' as '.$tablePrefix.$hash = $this->getRelationCountHash());
$key = $this->wrap($this->getQualifiedParentKeyName()); | Table prefix was missing in BelongsToMany@getRelationCountQueryForSelfJoin
Table prefix was missing in
BelongsToMany@getRelationCountQueryForSelfJoin |
diff --git a/src/Passport/Client.php b/src/Passport/Client.php
index <HASH>..<HASH> 100644
--- a/src/Passport/Client.php
+++ b/src/Passport/Client.php
@@ -69,4 +69,14 @@ class Client extends Model
{
return $this->personal_access_client || $this->password_client;
}
+
+ /**
+ * Determine if the client should skip the authorization prompt.
+ *
+ * @return bool
+ */
+ public function skipsAuthorization()
+ {
+ return false;
+ }
} | fix: for designmynight/dmn#<I> fix issue with missing function |
diff --git a/py3status/modules/window_title.py b/py3status/modules/window_title.py
index <HASH>..<HASH> 100644
--- a/py3status/modules/window_title.py
+++ b/py3status/modules/window_title.py
@@ -6,8 +6,6 @@ Configuration parameters:
cache_timeout: How often we refresh this module in seconds (default 0.5)
max_width: If width of title is greater, shrink it and add '...'
(default 120)
- empty_title: string that will be shown instead of the title when
- the title is hidden. (default "")
Requires:
i3-py: (https://github.com/ziberna/i3-py)
@@ -44,7 +42,6 @@ class Py3status:
# available configuration parameters
cache_timeout = 0.5
max_width = 120
- empty_title = ""
def __init__(self):
self.text = ''
@@ -55,7 +52,7 @@ class Py3status:
transformed = False
if window and 'name' in window and window['name'] != self.text:
if window['name'] is None:
- window['name'] = self.empty_title
+ window['name'] = ''
self.text = (len(window['name']) > self.max_width and
"..." + window['name'][-(self.max_width - 3):] or | Do not use empty_title config value in window_title (maybe now travis test will success) |
diff --git a/lib/magnum-pi/api/consumer.rb b/lib/magnum-pi/api/consumer.rb
index <HASH>..<HASH> 100644
--- a/lib/magnum-pi/api/consumer.rb
+++ b/lib/magnum-pi/api/consumer.rb
@@ -49,7 +49,10 @@ module MagnumPI
def request(method, url, params)
puts "#{method.upcase} #{url} #{"(#{params.inspect[1..-2]})" if params && params.size > 0}" if MagnumPI.debug_output?
- agent.send method, url, params, nil, request_headers(method, url, params)
+ args = [method, url, params]
+ args << nil if method.to_s.upcase == "GET"
+ args << request_headers(method, url, params)
+ agent.send *args
rescue Mechanize::ResponseCodeError => e
raise Error, e.message, e.backtrace
end | Fixed sending request headers for non-GET requests |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -120,8 +120,8 @@ function getTouch (touches, id) {
function listeners (e, enabled) {
return function (data) {
- if (enabled) e.addEventListener(data.type, data.listener)
- else e.removeEventListener(data.type, data.listener)
+ if (enabled) e.addEventListener(data.type, data.listener, { passive: false })
+ else e.removeEventListener(data.type, data.listener, { passive: false })
}
} | Disable "passive" event listening.
Upcoming change in Chrome/Android:
<URL> will no longer work.
This commit passes { passive: false } into event listeners,
ensuring that the current behaviour is maintained in newer
versions of Android and Chrome.
Note that there are cases where { passive: true } will improve
performance, and that you may want to expose this as an option
in "touches"' public API:
<URL> |
diff --git a/src/utils/merge.js b/src/utils/merge.js
index <HASH>..<HASH> 100644
--- a/src/utils/merge.js
+++ b/src/utils/merge.js
@@ -11,7 +11,12 @@ export default function mergeObjects (dest, ...sources) {
// (e.g. don't merge arrays, those are treated as scalar values; null values will overwrite/erase
// the previous destination value)
if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
- dest[key] = mergeObjects(dest[key] || {}, value);
+ if (dest[key] !== null && typeof dest[key] === 'object' && !Array.isArray(dest[key])) {
+ dest[key] = mergeObjects(dest[key], value);
+ }
+ else {
+ dest[key] = mergeObjects({}, value); // destination not an object, overwrite
+ }
}
// Overwrite the previous destination value if the source property is: a scalar (number/string),
// an array, or a null value | merge: source object should replace destination scalar/array |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
+from setuptools.command.sdist import sdist
+import subprocess
with open('README.md', 'r', encoding='utf-8') as f:
readme = f.read()
@@ -8,6 +10,13 @@ with open('README.md', 'r', encoding='utf-8') as f:
with open('requirements.txt') as f:
required = f.read().splitlines()
+
+class chainerui_sdist(sdist):
+ def run(self):
+ subprocess.call('cd frontend && npm run build', shell=True)
+ sdist.run(self)
+
+
setup(
name='chainerui',
version='0.0.9',
@@ -30,4 +39,7 @@ setup(
]
},
tests_require=['pytest'],
+ cmdclass={
+ 'sdist': chainerui_sdist
+ },
) | Add `npm run build` executer when run `python setup.py sdist` |
diff --git a/concrete/src/Url/Resolver/RouteUrlResolver.php b/concrete/src/Url/Resolver/RouteUrlResolver.php
index <HASH>..<HASH> 100644
--- a/concrete/src/Url/Resolver/RouteUrlResolver.php
+++ b/concrete/src/Url/Resolver/RouteUrlResolver.php
@@ -81,7 +81,7 @@ class RouteUrlResolver implements UrlResolverInterface
strtolower(substr($route_handle, 0, 6)) == 'route/' &&
is_array($route_parameters)) {
$route_handle = substr($route_handle, 6);
- if ($route = $this->getRouteList()->get($route_handle)) {
+ if ($this->getRouteList()->get($route_handle)) {
if ($path = $this->getGenerator()->generate($route_handle, $route_parameters, UrlGeneratorInterface::ABSOLUTE_PATH)) {
return $this->pathUrlResolver->resolve(array($path));
} | Remove unused variable in RouteUrlResolver::resolve() |
diff --git a/files/api/user/models/User.js b/files/api/user/models/User.js
index <HASH>..<HASH> 100755
--- a/files/api/user/models/User.js
+++ b/files/api/user/models/User.js
@@ -10,6 +10,7 @@ const path = require('path');
// Public node modules.
const _ = require('lodash');
const anchor = require('anchor');
+const bcrypt = require('bcryptjs');
// Model settings
const settings = require('./User.settings.json'); | Add bcrypt dependency in user model |
diff --git a/spec/unpacker_spec.rb b/spec/unpacker_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unpacker_spec.rb
+++ b/spec/unpacker_spec.rb
@@ -635,7 +635,7 @@ describe MessagePack::Unpacker do
MessagePack.unpack(MessagePack.pack(array)).size.should == 10_000
end
- it 'preserve string encoding (issue #200)' do
+ it 'preserves string encoding (issue #200)' do
string = 'a'.force_encoding(Encoding::UTF_8)
MessagePack.unpack(MessagePack.pack(string)).encoding.should == string.encoding | spec description: Grammar fix preserve->preserves |
diff --git a/src/GameQ/GameQ.php b/src/GameQ/GameQ.php
index <HASH>..<HASH> 100644
--- a/src/GameQ/GameQ.php
+++ b/src/GameQ/GameQ.php
@@ -517,7 +517,7 @@ class GameQ
throw new \Exception($e->getMessage(), $e->getCode(), $e);
}
- break;
+ continue;
}
// Clean up the sockets, if any left over | Changed break to continue when QueryException is caught
Change the QueryException to a continue to allow the loop to continue. See #<I> for more information. |
diff --git a/uploadservice/src/main/java/net/gotev/uploadservice/UploadTask.java b/uploadservice/src/main/java/net/gotev/uploadservice/UploadTask.java
index <HASH>..<HASH> 100644
--- a/uploadservice/src/main/java/net/gotev/uploadservice/UploadTask.java
+++ b/uploadservice/src/main/java/net/gotev/uploadservice/UploadTask.java
@@ -47,7 +47,7 @@ public abstract class UploadTask implements Runnable {
/**
* Contains the absolute local path of the successfully uploaded files.
*/
- private List<String> successfullyUploadedFiles = new ArrayList<>();
+ private final List<String> successfullyUploadedFiles = new ArrayList<>();
/**
* Flag indicating if the operation should continue or is cancelled. You should never | successfullyUploadedFiles list is now final, as it's created only once and never re-assigned. |
diff --git a/src/Symfony/Component/VarDumper/Caster/Caster.php b/src/Symfony/Component/VarDumper/Caster/Caster.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/VarDumper/Caster/Caster.php
+++ b/src/Symfony/Component/VarDumper/Caster/Caster.php
@@ -53,13 +53,9 @@ class Caster
$hasDebugInfo = $class->hasMethod('__debugInfo');
$class = $class->name;
}
- if ($hasDebugInfo) {
- $a = $obj->__debugInfo();
- } elseif ($obj instanceof \Closure) {
- $a = [];
- } else {
- $a = (array) $obj;
- }
+
+ $a = $obj instanceof \Closure ? [] : (array) $obj;
+
if ($obj instanceof \__PHP_Incomplete_Class) {
return $a;
}
@@ -93,6 +89,17 @@ class Caster
}
}
+ if ($hasDebugInfo && \is_array($debugInfo = $obj->__debugInfo())) {
+ foreach ($debugInfo as $k => $v) {
+ if (!isset($k[0]) || "\0" !== $k[0]) {
+ $k = self::PREFIX_VIRTUAL.$k;
+ }
+
+ unset($a[$k]);
+ $a[$k] = $v;
+ }
+ }
+
return $a;
} | [VarDumper] fix dumping objects that implement __debugInfo() |
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index <HASH>..<HASH> 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -346,6 +346,7 @@ def runs_per_test_type(arg_str):
try:
n = int(arg_str)
if n <= 0: raise ValueError
+ return n
except:
msg = "'{}' isn't a positive integer or 'inf'".format(arg_str)
raise argparse.ArgumentTypeError(msg) | Fix bug with finite runs per test |
diff --git a/scoop/launcher.py b/scoop/launcher.py
index <HASH>..<HASH> 100644
--- a/scoop/launcher.py
+++ b/scoop/launcher.py
@@ -186,7 +186,7 @@ class ScoopApp(object):
def showHostDivision(self, headless):
"""Show the worker distribution over the hosts."""
- scoop.logger.info('Worker d--istribution: ')
+ scoop.logger.info('Worker distribution: ')
for worker, number in self.worker_hosts:
first_worker = (worker == self.worker_hosts[0][0])
scoop.logger.info(' {0}:\t{1} {2}'.format( | * launcher.py (ScoopApp.showHostDivision): Fix typo in log output. |
diff --git a/src/components/tables/DataTable.js b/src/components/tables/DataTable.js
index <HASH>..<HASH> 100644
--- a/src/components/tables/DataTable.js
+++ b/src/components/tables/DataTable.js
@@ -74,6 +74,8 @@ export default {
customSort: {
type: Function,
default: (items, index, descending) => {
+ if (index === null) return items
+
return items.sort((a, b) => {
let sortA = getObjectValueByPath(a, index)
let sortB = getObjectValueByPath(b, index) | Fix for #<I> (#<I>) |
diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/RecordIndexer.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/RecordIndexer.php
index <HASH>..<HASH> 100644
--- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/RecordIndexer.php
+++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/RecordIndexer.php
@@ -112,7 +112,8 @@ class RecordIndexer
public function populateIndex(BulkOperation $bulk, array $databoxes)
{
foreach ($databoxes as $databox) {
- $submitted_records = [];
+
+ $submited_records = [];
$this->logger->info(sprintf('Indexing database %s...', $databox->get_viewname())); | #PHRAS-<I> time 5m
removed filter on dbox, must be done only in task |
diff --git a/allennlp/service/db.py b/allennlp/service/db.py
index <HASH>..<HASH> 100644
--- a/allennlp/service/db.py
+++ b/allennlp/service/db.py
@@ -90,6 +90,7 @@ class PostgresDemoDatabase(DemoDatabase):
password=self.password,
dbname=self.dbname,
connect_timeout=5)
+ self.conn.set_session(autocommit=True)
logger.info("successfully initialized database connection")
except psycopg2.Error as error:
logger.exception("unable to connect to database") | Autocommit database modifications (#<I>) |
diff --git a/test/all.js b/test/all.js
index <HASH>..<HASH> 100644
--- a/test/all.js
+++ b/test/all.js
@@ -17,7 +17,7 @@ vows.describe("block.io node.js api wrapper").addBatch({
assert.isObject(res.data);
assert.isArray(res.data.addresses);
assert.isString(res.data.addresses[0].address);
- assert.isString(res.data.addresses[0].address_label);
+ assert.isString(res.data.addresses[0].label);
}
})
}).addBatch({ | Address#address_label -> Address#label |
diff --git a/test/aes-test.js b/test/aes-test.js
index <HASH>..<HASH> 100644
--- a/test/aes-test.js
+++ b/test/aes-test.js
@@ -27,5 +27,23 @@ describe("aes", () => {
});
});
+ describe("encrypt(str, key)", () => {
+
+ it("should throw error on invalid key", () => {
+ assert.throws(() => aes.encrypt("data", "1515"), Error, "invalid key length");
+ });
+
+ it("should encrypt string of any length with given key that will decryptable by decrypt() function", () => {
+ function test(str, key) {
+ let encrypted = aes.encrypt(str, key);
+ let decrypted = aes.decrypt(encrypted, key);
+ expect(decrypted).to.be.equal(str);
+ }
+ test("1337");
+ test("русские буквы");
+ test("•ݹmÙO_‼|s¬¹Íе£—I♠f⌂5▓");
+ test("aaaaaaaa$aaaaaaaaaaaaa3abbbbbbt59bbbbbbbbbbbbbbb5)bbbbccccccc_ccccccc");
+ });
+ });
});
\ No newline at end of file | Updates aes-test.js
* Adds test to check encryption/decryptoin. |
diff --git a/lib/jpmobile/util.rb b/lib/jpmobile/util.rb
index <HASH>..<HASH> 100644
--- a/lib/jpmobile/util.rb
+++ b/lib/jpmobile/util.rb
@@ -297,7 +297,7 @@ module Jpmobile
def invert_table(hash)
result = {}
- hash.keys.each do |key|
+ hash.each_key do |key|
if result[hash[key]]
if !key.is_a?(Array) && !result[hash[key]].is_a?(Array) && result[hash[key]] > key
result[hash[key]] = key | Apply Style/HashEachMethods |
diff --git a/ontobio/golr/golr_query.py b/ontobio/golr/golr_query.py
index <HASH>..<HASH> 100644
--- a/ontobio/golr/golr_query.py
+++ b/ontobio/golr/golr_query.py
@@ -455,7 +455,7 @@ class GolrSearchQuery(GolrAbstractQuery):
if results.highlighting:
for doc in results.docs:
hl = self._process_highlight(results, doc)
- highlighting[doc['id']] = hl
+ highlighting[doc['id']] = hl._asdict()
payload = SearchResults(
facet_counts=translate_facet_field(results.facets), | return tuple as dict |
diff --git a/jooby/src/main/java/io/jooby/internal/ValueInjector.java b/jooby/src/main/java/io/jooby/internal/ValueInjector.java
index <HASH>..<HASH> 100644
--- a/jooby/src/main/java/io/jooby/internal/ValueInjector.java
+++ b/jooby/src/main/java/io/jooby/internal/ValueInjector.java
@@ -250,6 +250,9 @@ public final class ValueInjector {
if (FileUpload.class == rawType) {
return true;
}
+ if (rawType.isEnum()) {
+ return true;
+ }
/**********************************************************************************************
* Static method: valueOf
* ********************************************************************************************
@@ -337,6 +340,9 @@ public final class ValueInjector {
}
throw new TypeMismatchException(value.name(), FileUpload.class);
}
+ if (rawType.isEnum()) {
+ return Enum.valueOf(rawType, value.get(0).value());
+ }
/**********************************************************************************************
* Static method: valueOf
* ******************************************************************************************** | First fix enums from using reflection |
diff --git a/addons/Dexie.Observable/src/Dexie.Observable.js b/addons/Dexie.Observable/src/Dexie.Observable.js
index <HASH>..<HASH> 100644
--- a/addons/Dexie.Observable/src/Dexie.Observable.js
+++ b/addons/Dexie.Observable/src/Dexie.Observable.js
@@ -242,7 +242,7 @@ function Observable(db) {
});
}
// Add new sync node or if this is a reopening of the database after a close() call, update it.
- return db.transaction('rw', '_syncNodes', () => {
+ return Dexie.ignoreTransaction(() => {
return db._syncNodes
.where('isMaster').equals(1)
.first(currentMaster => { | Do not re-use current transaction when observation begins
Resolves #<I> |
diff --git a/src/main/java/org/gitlab4j/api/Constants.java b/src/main/java/org/gitlab4j/api/Constants.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/gitlab4j/api/Constants.java
+++ b/src/main/java/org/gitlab4j/api/Constants.java
@@ -156,7 +156,7 @@ public interface Constants {
/** Enum to use for ordering the results of getPipelines(). */
public enum PipelineOrderBy {
- ID, STATUS, REF, USER_ID;
+ ID, STATUS, REF, UPDATED_AT, USER_ID;
private static JacksonJsonEnumHelper<PipelineOrderBy> enumHelper = new JacksonJsonEnumHelper<>(PipelineOrderBy.class); | Added UPDATED_AT to PipelineOrderBy (#<I>) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.