diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/parser.rb b/lib/parser.rb
index <HASH>..<HASH> 100644
--- a/lib/parser.rb
+++ b/lib/parser.rb
@@ -1,8 +1,5 @@
module WebVTT
- class MalformedFile < RuntimeError; end
- class InputError < RuntimeError; end
-
def self.read(file)
File.new(file)
end
diff --git a/lib/segmenter.rb b/lib/segmenter.rb
index <HASH>..<HASH> 100644
--- a/lib/segmenter.rb
+++ b/lib/segmenter.rb
@@ -1,7 +1,5 @@
module WebVTT
- class InputError < RuntimeError; end
-
def self.segment(input, options={})
if input.is_a?(String)
input = File.new(input)
diff --git a/lib/webvtt.rb b/lib/webvtt.rb
index <HASH>..<HASH> 100644
--- a/lib/webvtt.rb
+++ b/lib/webvtt.rb
@@ -4,5 +4,10 @@ if defined?(Encoding)
Encoding.default_internal = Encoding.default_external = "UTF-8"
end
+module WebVTT
+ class MalformedFile < RuntimeError; end
+ class InputError < RuntimeError; end
+end
+
require "parser"
require "segmenter"
\ No newline at end of file
|
put exceptions class into webvtt.rb
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -32,7 +32,9 @@ module.exports = function(opts) {
compiled = handlebars.precompile(ast, compilerOptions).toString();
}
catch (err) {
- this.emit('error', new gutil.PluginError(PLUGIN_NAME, err));
+ this.emit('error', new gutil.PluginError(PLUGIN_NAME, err, {
+ fileName: file.path
+ }));
return callback();
}
diff --git a/test/main.js b/test/main.js
index <HASH>..<HASH> 100644
--- a/test/main.js
+++ b/test/main.js
@@ -33,6 +33,7 @@ describe('gulp-handlebars', function() {
var invalidTemplate = getFixture('Invalid.hbs');
stream.on('error', function(err) {
+ err.fileName.should.equal('test/fixtures/Invalid.hbs'),
err.should.be.an.instanceOf(Error);
err.message.should.equal(getExpectedString('Error.txt'));
done();
|
Include fileName in options to PluginError, closes #<I>
|
diff --git a/code/search/SearchUpdater.php b/code/search/SearchUpdater.php
index <HASH>..<HASH> 100644
--- a/code/search/SearchUpdater.php
+++ b/code/search/SearchUpdater.php
@@ -232,13 +232,13 @@ class SearchUpdater extends Object {
/**
* Internal function. Process the passed list of dirty ids. Split from flush_dirty_indexes so it can be called both
* directly and via messagequeue message.
- *
- * WARNING: Changes state (subsite, stage) and doesn't reset it. Should only be called after request has ended
*/
static function process_dirty_indexes($dirty) {
$indexes = FullTextSearch::get_indexes();
$dirtyindexes = array();
+ $originalState = SearchVariant::current_state();
+
foreach ($dirty as $base => $statefulids) {
if (!$statefulids) continue;
@@ -263,6 +263,8 @@ class SearchUpdater extends Object {
foreach ($dirtyindexes as $index) {
$indexes[$index]->commit();
}
+
+ SearchVariant::activate_state($originalState);
}
}
|
BUG Make process_dirty_indexes act cleanly
process_dirty_indexes wasnt saving variant state or restoring or exit, because
I thought it was only called at the end of a request and so didnt need to
But tests call it regularly throughout a request. So now its clean
and safe to call when-ever
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -5,5 +5,5 @@ export default function(Vue) {
}
export function timer(name, time, options) {
- return mixin.assign({ name: name, time: time }, options)
+ return Object.assign({ name: name, time: time }, options)
}
diff --git a/mixin.js b/mixin.js
index <HASH>..<HASH> 100644
--- a/mixin.js
+++ b/mixin.js
@@ -1,4 +1,3 @@
-// jshint esversion: 6, asi: true
import { set } from './utils'
function generateData(timers) {
@@ -141,7 +140,7 @@ export default {
/**
* Polyfill for Object.assign for IE11 support
*/
- assign: function (){
+ assign: function (to){
var assign = Object.assign || function assign(to) {
for (var s = 1; s < arguments.length; s += 1) {
var from = arguments[s]
diff --git a/utils.js b/utils.js
index <HASH>..<HASH> 100644
--- a/utils.js
+++ b/utils.js
@@ -1,5 +1,7 @@
+import mixin from './mixin'
+
export function set(key, value, obj) {
- const clone = Object.assign({}, obj)
+ const clone = mixin.assign({}, obj)
clone[key] = value
return clone
}
|
Replaced yet another Object.assign (#2)
utils.js also had a Object.assign
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -209,7 +209,7 @@ class QueSpec < Minitest::Spec
abort
end
- if ENV['CI'] && f = failure
+ if f = failure && !skipped? && ENV['CI']
e = f.exception
puts "\n\n#{e.class}: #{e.message}\n#{e.backtrace.join("\n")}\n\n"
end
|
Don't print skips on CircleCI.
|
diff --git a/cumulusci/tasks/salesforce/tests/test_UpdateAdminProfile.py b/cumulusci/tasks/salesforce/tests/test_UpdateAdminProfile.py
index <HASH>..<HASH> 100644
--- a/cumulusci/tasks/salesforce/tests/test_UpdateAdminProfile.py
+++ b/cumulusci/tasks/salesforce/tests/test_UpdateAdminProfile.py
@@ -143,7 +143,7 @@ def test_retrieve_unpackaged(ApiRetrieveUnpackaged):
def test_deploy_metadata(tmpdir):
task = create_task(UpdateAdminProfile)
task.retrieve_dir = Path(tmpdir, "retrieve", "profiles")
- task.deploy_dir = Path(tmpdir, "deploy", "profiles")
+ task.deploy_dir = Path(tmpdir, "deploy")
task.retrieve_dir.mkdir(parents=True)
task.deploy_dir.mkdir(parents=True)
task.retrieve_dir = task.retrieve_dir.parent
|
Don't create dir in updateAdminProf deployment
|
diff --git a/salt/minion.py b/salt/minion.py
index <HASH>..<HASH> 100644
--- a/salt/minion.py
+++ b/salt/minion.py
@@ -19,6 +19,7 @@ import signal
# Import third party libs
import zmq
+import yaml
HAS_RANGE = False
try:
@@ -394,7 +395,7 @@ class Minion(object):
ret = {}
for ind in range(0, len(data['arg'])):
try:
- arg = eval(data['arg'][ind])
+ arg = yaml.safe_load(data['arg'][ind])
if isinstance(arg, bool):
data['arg'][ind] = str(data['arg'][ind])
elif isinstance(arg, (dict, int, list, string_types)):
@@ -474,7 +475,7 @@ class Minion(object):
for ind in range(0, len(data['fun'])):
for index in range(0, len(data['arg'][ind])):
try:
- arg = eval(data['arg'][ind][index])
+ arg = yaml.safe_load(data['arg'][ind][index])
if isinstance(arg, bool):
data['arg'][ind][index] = str(data['arg'][ind][index])
elif isinstance(arg, (dict, int, list, string_types)):
|
Remove legacy eval and replace with safe yaml interp Fix #<I>
|
diff --git a/src/com/google/javascript/jscomp/FieldCleanupPass.java b/src/com/google/javascript/jscomp/FieldCleanupPass.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/FieldCleanupPass.java
+++ b/src/com/google/javascript/jscomp/FieldCleanupPass.java
@@ -16,6 +16,7 @@
package com.google.javascript.jscomp;
+import com.google.common.collect.ImmutableList;
import com.google.javascript.jscomp.NodeTraversal.AbstractShallowCallback;
import com.google.javascript.jscomp.NodeTraversal.Callback;
import com.google.javascript.rhino.Node;
@@ -92,8 +93,8 @@ public class FieldCleanupPass implements HotSwapCompilerPass {
// We are a root GetProp
if (NodeUtil.isGetProp(n) && !NodeUtil.isGetProp(p)) {
String propName = getFieldName(n);
- Iterable<ObjectType> types =
- typeRegistry.getEachReferenceTypeWithProperty(propName);
+ Iterable<ObjectType> types = ImmutableList.copyOf(
+ typeRegistry.getEachReferenceTypeWithProperty(propName));
for (ObjectType type : types) {
Node pNode = type.getPropertyNode(propName);
if (srcName.equals(pNode.getSourceFileName())) {
|
Copy list to avoid ConcurrentModificationExceptions resulting from changing membership of the list during for-each loop (since JSTypeRegistry does not copy the list it returns).
R=acleung
DELTA=3 (1 added, 0 deleted, 2 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=<I>
git-svn-id: <URL>
|
diff --git a/src/widget/geopoint/geopointpicker.js b/src/widget/geopoint/geopointpicker.js
index <HASH>..<HASH> 100644
--- a/src/widget/geopoint/geopointpicker.js
+++ b/src/widget/geopoint/geopointpicker.js
@@ -367,6 +367,17 @@ define( [ 'jquery', 'enketo-js/Widget', 'text!enketo-config' ],
this.$acc.val( Math.round( acc * 10 ) / 10 ).trigger( ev );
};
+ Geopointpicker.prototype.disable = function() {
+ this.$map.hide();
+ this.$widget.find( '.btn' ).addClass( 'disabled' );
+ };
+
+ Geopointpicker.prototype.enable = function() {
+ this.$map.show();
+ this.$widget.find( '.btn' ).removeClass( 'disabled' );
+ };
+
+
$.fn[ pluginName ] = function( options, event ) {
return this.each( function() {
|
properly disable map in irrelevant branches, closes #<I>
|
diff --git a/spec/MessengerSpec.php b/spec/MessengerSpec.php
index <HASH>..<HASH> 100644
--- a/spec/MessengerSpec.php
+++ b/spec/MessengerSpec.php
@@ -200,4 +200,24 @@ class MessengerSpec extends ObjectBehavior
->shouldHaveKeyWithValue('result', 'Successfully removed all new_thread\'s CTAs');
}
+
+ function it_subscribe_the_app($client, ResponseInterface $response)
+ {
+ $options = [
+ RequestOptions::QUERY => [
+ 'access_token' => 'token',
+ ],
+ ];
+
+ $response->getBody()->willReturn('
+ {
+ "success": true
+ }
+ ');
+
+ $client->request('POST', '/me/subscribed_apps', $options)
+ ->willReturn($response);
+
+ $this->subscribe()->shouldReturn(true);
+ }
}
diff --git a/src/Messenger.php b/src/Messenger.php
index <HASH>..<HASH> 100644
--- a/src/Messenger.php
+++ b/src/Messenger.php
@@ -100,6 +100,18 @@ class Messenger
}
/**
+ * Subscribe the app to the page
+ *
+ * @return bool
+ */
+ public function subscribe()
+ {
+ $response = $this->send('POST', '/me/subscribed_apps');
+
+ return $response['success'];
+ }
+
+ /**
* @param string $pageId
*
* @return array
|
Add Messenger::subscribe() method
|
diff --git a/views/helpers/clearance.php b/views/helpers/clearance.php
index <HASH>..<HASH> 100644
--- a/views/helpers/clearance.php
+++ b/views/helpers/clearance.php
@@ -60,7 +60,7 @@ class ClearanceHelper extends AppHelper {
* @access public
* @author Jose Diaz-Gonzalez
**/
- function __construct($config) {
+ function __construct($config = array()) {
$this->settings = array_merge($this->settings, $config);
}
|
Fixed merging of configuration for helper
|
diff --git a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php
index <HASH>..<HASH> 100644
--- a/src/Sylius/Bundle/CoreBundle/Application/Kernel.php
+++ b/src/Sylius/Bundle/CoreBundle/Application/Kernel.php
@@ -31,7 +31,7 @@ use Webmozart\Assert\Assert;
class Kernel extends HttpKernel
{
- public const VERSION = '1.9.0-DEV';
+ public const VERSION = '1.9.0-RC.1';
public const VERSION_ID = '10900';
@@ -41,7 +41,7 @@ class Kernel extends HttpKernel
public const RELEASE_VERSION = '0';
- public const EXTRA_VERSION = 'DEV';
+ public const EXTRA_VERSION = 'RC.1';
public function __construct(string $environment, bool $debug)
{
|
Change application's version to <I>-RC<I>
|
diff --git a/question/format/xml/format.php b/question/format/xml/format.php
index <HASH>..<HASH> 100755
--- a/question/format/xml/format.php
+++ b/question/format/xml/format.php
@@ -498,7 +498,7 @@ class qformat_xml extends qformat_default {
function import_category( $question ) {
$qo = new stdClass;
$qo->qtype = 'category';
- $qo->category = $question['#']['category'][0]['#'];
+ $qo->category = $this->import_text($question['#']['category'][0]['#']['text']);
return $qo;
}
|
MDL-<I>:
Read xml structure correctly to get category path.
Merged from STABLE_<I>
|
diff --git a/test/helper.rb b/test/helper.rb
index <HASH>..<HASH> 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -137,7 +137,7 @@ module Juno
def marshal_error
# HACK: Marshalling structs in rubinius without class name throws
# NoMethodError (to_sym). TODO: Create an issue for rubinius!
- RUBY_ENGINE == 'rbx' ? NoMethodError : TypeError
+ Object.const_defined?(:RUBY_ENGINE) && RUBY_ENGINE == 'rbx' ? NoMethodError : TypeError
end
it "refuses to #[] from keys that cannot be marshalled" do
|
RUBY_ENGINE is not defined on <I>
|
diff --git a/modules_v3/lightbox/functions/lightbox_print_media.php b/modules_v3/lightbox/functions/lightbox_print_media.php
index <HASH>..<HASH> 100644
--- a/modules_v3/lightbox/functions/lightbox_print_media.php
+++ b/modules_v3/lightbox/functions/lightbox_print_media.php
@@ -465,7 +465,7 @@ function lightbox_print_media_row($rtype, $rowm, $pid) {
if (WT_USER_CAN_EDIT) {
// Edit Media
$submenu = new WT_Menu(" " . WT_I18N::translate('Edit media') . " ");
- $submenu->addOnclick("return window.open('addmedia.php?action=editmedia&pid={$rowm['m_id']}}', '_blank', edit_window_specs);");
+ $submenu->addOnclick("return window.open('addmedia.php?action=editmedia&pid={$rowm['m_id']}', '_blank', edit_window_specs);");
$submenu->addClass("submenuitem");
$menu->addSubMenu($submenu);
if (WT_USER_IS_ADMIN) {
|
Fix: edit-media link on album tab is broken
|
diff --git a/spec/models/doorkeeper/access_token_spec.rb b/spec/models/doorkeeper/access_token_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/models/doorkeeper/access_token_spec.rb
+++ b/spec/models/doorkeeper/access_token_spec.rb
@@ -144,7 +144,7 @@ module Doorkeeper
expect(subject).to be_valid
end
- it 'is valid without resource_owner_id' do
+ it 'is valid without application_id' do
# For resource owner credentials flow
subject.application_id = nil
expect(subject).to be_valid
|
Fix application_id validation spec description
|
diff --git a/core/selection.js b/core/selection.js
index <HASH>..<HASH> 100644
--- a/core/selection.js
+++ b/core/selection.js
@@ -113,11 +113,7 @@ class Selection {
}
var rect = range.getBoundingClientRect();
} else {
- if (leaf instanceof BreakBlot) {
- var rect = leaf.parent.domNode.getBoundingClientRect();
- } else {
- var rect = leaf.domNode.getBoundingClientRect();
- }
+ var rect = leaf.domNode.getBoundingClientRect();
if (offset > 0) side = 'right';
}
bounds = {
|
getBoundingClientRect actually works on BR nodes
Fix #<I>
|
diff --git a/src/JSTACK.Murano.js b/src/JSTACK.Murano.js
index <HASH>..<HASH> 100644
--- a/src/JSTACK.Murano.js
+++ b/src/JSTACK.Murano.js
@@ -144,7 +144,7 @@ JSTACK.Murano = (function (JS, undefined) {
JS.Comm.get(url, JS.Keystone.params.token, onOK, onError);
};
- createTemplate = function (name, callback, error, region) {
+ createTemplate = function (name, description, callback, error, region) {
var url, onOk, onError, data;
if (!check(region)) {
return;
@@ -153,7 +153,8 @@ JSTACK.Murano = (function (JS, undefined) {
url = params.url + '/templates';
data = {
- "name": name
+ "name": name,
+ "description_text": description
};
onOk = function (result) {
|
Added description to Murano templates
|
diff --git a/core/server/data/schema/commands.js b/core/server/data/schema/commands.js
index <HASH>..<HASH> 100644
--- a/core/server/data/schema/commands.js
+++ b/core/server/data/schema/commands.js
@@ -5,9 +5,8 @@ var _ = require('lodash'),
schema = require('./schema'),
clients = require('./clients');
-function addTableColumn(tableName, table, columnName) {
- var column,
- columnSpec = schema[tableName][columnName];
+function addTableColumn(tableName, table, columnName, columnSpec = schema[tableName][columnName]) {
+ var column;
// creation distinguishes between text with fieldtype, string with maxlength and all others
if (columnSpec.type === 'text' && Object.prototype.hasOwnProperty.call(columnSpec, 'fieldtype')) {
@@ -48,9 +47,9 @@ function addTableColumn(tableName, table, columnName) {
}
}
-function addColumn(tableName, column, transaction) {
+function addColumn(tableName, column, transaction, columnSpec) {
return (transaction || db.knex).schema.table(tableName, function (table) {
- addTableColumn(tableName, table, column);
+ addTableColumn(tableName, table, column, columnSpec);
});
}
|
Added ability to pass columnSpec to addTableColumn
refs #<I>
This gives us the ability to add columns that have since been removed
from the schema, for example in a down migration.
|
diff --git a/extensions-core/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPusher.java b/extensions-core/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPusher.java
index <HASH>..<HASH> 100644
--- a/extensions-core/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPusher.java
+++ b/extensions-core/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPusher.java
@@ -125,8 +125,11 @@ public class HdfsDataSegmentPusher implements DataSegmentPusher
final long size;
final DataSegment dataSegment;
- try (FSDataOutputStream out = fs.create(tmpIndexFile)) {
- size = CompressionUtils.zip(inDir, out);
+ try {
+ try (FSDataOutputStream out = fs.create(tmpIndexFile)) {
+ size = CompressionUtils.zip(inDir, out);
+ }
+
final String uniquePrefix = useUniquePath ? DataSegmentPusher.generateUniquePath() + "_" : "";
final Path outIndexFile = new Path(StringUtils.format(
"%s/%s/%d_%sindex.zip",
|
HdfsDataSegmentPusher: Close tmpIndexFile before copying it. (#<I>)
It seems that copy-before-close works OK on HDFS, but it doesn't work
on all filesystems. In particular, we observed this not working properly
with Google Cloud Storage. And anyway, it's better hygiene to close files
before attempting to copy them somewhere else.
|
diff --git a/docs/source/conf.py b/docs/source/conf.py
index <HASH>..<HASH> 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -20,6 +20,16 @@ import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
+from mock import Mock as MagicMock
+
+class Mock(MagicMock):
+ @classmethod
+ def __getattr__(cls, name):
+ return Mock()
+
+MOCK_MODULES = ['tables, numpy']
+sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
+
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
|
Added mocking of dependencies so that read the docs can build the project.
|
diff --git a/navigation/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/camera/NavigationCamera.java b/navigation/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/camera/NavigationCamera.java
index <HASH>..<HASH> 100644
--- a/navigation/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/camera/NavigationCamera.java
+++ b/navigation/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/camera/NavigationCamera.java
@@ -27,7 +27,7 @@ import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
public class NavigationCamera implements ProgressChangeListener {
- private static final int CAMERA_TILT = 57;
+ private static final int CAMERA_TILT = 50;
private static int CAMERA_ZOOM = 17;
private MapboxMap mapboxMap;
|
Less camera tilt for NavigationCamera (#<I>)
|
diff --git a/library/SimplePie/Misc.php b/library/SimplePie/Misc.php
index <HASH>..<HASH> 100644
--- a/library/SimplePie/Misc.php
+++ b/library/SimplePie/Misc.php
@@ -124,7 +124,7 @@ class SimplePie_Misc
{
$attribs[$j][2] = $attribs[$j][1];
}
- $return[$i]['attribs'][strtolower($attribs[$j][1])]['data'] = SimplePie_Misc::entities_decode(end($attribs[$j]));
+ $return[$i]['attribs'][strtolower($attribs[$j][1])]['data'] = SimplePie_Misc::entities_decode(end($attribs[$j]), 'UTF-8');
}
}
}
@@ -138,7 +138,7 @@ class SimplePie_Misc
foreach ($element['attribs'] as $key => $value)
{
$key = strtolower($key);
- $full .= " $key=\"" . htmlspecialchars($value['data']) . '"';
+ $full .= " $key=\"" . htmlspecialchars($value['data'], ENT_COMPAT, 'UTF-8') . '"';
}
if ($element['self_closing'])
{
|
[FreshRSS] Explicit UTF-8
Use explicit UTF-8 in functions in which the default encoding may change
depending on PHP's version or setup.
`htmlspecialchars` was used in the whole SimplePie code with the
explicit parameters `(ENT_COMPAT, 'UTF-8')` except in one instance.
<URL>
|
diff --git a/lib/models/post.js b/lib/models/post.js
index <HASH>..<HASH> 100644
--- a/lib/models/post.js
+++ b/lib/models/post.js
@@ -55,9 +55,9 @@ module.exports = function(ctx) {
});
Post.virtual('permalink').get(function() {
- var url_for = ctx.extend.helper.get('url_for');
+ var self = _.assign({}, ctx.extend.helper.list(), ctx);
var config = ctx.config;
- var partial_url = url_for.call(ctx, this.path);
+ var partial_url = self.url_for(this.path);
return config.url + _.replace(partial_url, config.root, '/');
});
|
Update post.js (#<I>)
|
diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb
index <HASH>..<HASH> 100644
--- a/lib/oxidized/model/ironware.rb
+++ b/lib/oxidized/model/ironware.rb
@@ -2,14 +2,14 @@ class IronWare < Oxidized::Model
prompt /^.*(telnet|ssh)\@.+[>#]\s?$/i
comment '! '
-
+
#to handle pager without enable
#expect /^((.*)--More--(.*))$/ do |data, re|
# send ' '
# data.sub re, ''
#end
-
+
#to remove backspace (if handle pager without enable)
#expect /^((.*)[\b](.*))$/ do |data, re|
# data.sub re, ''
@@ -44,14 +44,14 @@ class IronWare < Oxidized::Model
out << sc.rest
cfg = out
end
-
+
comment cfg
end
-
+
cmd 'show flash' do |cfg|
comment cfg
end
-
+
cmd 'show module' do |cfg|
cfg.gsub! /^((Invalid input)|(Type \?)).*$/, '' # some ironware devices are fixed config
comment cfg
@@ -74,7 +74,7 @@ class IronWare < Oxidized::Model
if vars :enable
post_login do
send "enable\r\n"
- send vars(:enable) + "\r\n"
+ cmd vars(:enable)
end
end
post_login ''
|
prompt not captured after sending enabe PW
fixes #<I>
|
diff --git a/lib/halite/gem.rb b/lib/halite/gem.rb
index <HASH>..<HASH> 100644
--- a/lib/halite/gem.rb
+++ b/lib/halite/gem.rb
@@ -17,6 +17,7 @@
require 'chef/cookbook_version'
require 'halite/dependencies'
+require 'halite/error'
module Halite
@@ -32,7 +33,12 @@ module Halite
# name can be either a string name, Gem::Dependency, or Gem::Specification
# @param name [String, Gem::Dependency, Gem::Specification]
def initialize(name, version=nil)
- name = name.to_spec if name.is_a?(::Gem::Dependency) # Allow passing a Dependency by just grabbing its spec.
+ if name.is_a?(::Gem::Dependency)
+ # Allow passing a Dependency by just grabbing its spec.
+ dependency = name
+ name = dependency.to_spec || dependency.to_specs.last
+ raise Error.new("Cannot find a gem to satisfy #{dependency}") unless name
+ end
if name.is_a?(::Gem::Specification)
raise Error.new("Cannot pass version when using an explicit specficiation") if version
@spec = name
|
Fix handling of prerelease gems with Halite.
|
diff --git a/sprinter/formulas/ssh.py b/sprinter/formulas/ssh.py
index <HASH>..<HASH> 100644
--- a/sprinter/formulas/ssh.py
+++ b/sprinter/formulas/ssh.py
@@ -37,6 +37,8 @@ class SSHFormula(FormulaBase):
def update(self, feature_name, source_config, target_config):
ssh_key_path = self.__generate_key(feature_name, target_config)
self.__install_ssh_config(target_config, ssh_key_path)
+ if 'command' in config:
+ self.__call_command(config['command'], ssh_key_path)
#super(SSHFormula, self).update(feature_name, source_config, target_config)
def remove(self, feature_name, config):
|
update command works every time in ssh
|
diff --git a/runtime/mux.go b/runtime/mux.go
index <HASH>..<HASH> 100644
--- a/runtime/mux.go
+++ b/runtime/mux.go
@@ -254,7 +254,7 @@ func (s *ServeMux) HandlePath(meth string, pathPattern string, h HandlerFunc) er
return nil
}
-// ServeHTTP dispatches the request to the first handler whose pattern matches to r.Method and r.Path.
+// ServeHTTP dispatches the request to the first handler whose pattern matches to r.Method and r.URL.Path.
func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
|
typo in mux.go (#<I>)
|
diff --git a/flux_led/fluxled.py b/flux_led/fluxled.py
index <HASH>..<HASH> 100644
--- a/flux_led/fluxled.py
+++ b/flux_led/fluxled.py
@@ -755,7 +755,9 @@ def main(): # noqa: C901
)
if options.color is not None:
- print(f"Setting color RGB:{options.color}",)
+ print(
+ f"Setting color RGB:{options.color}",
+ )
name = utils.color_tuple_to_string(options.color)
if name is None:
print()
diff --git a/flux_led/models_db.py b/flux_led/models_db.py
index <HASH>..<HASH> 100755
--- a/flux_led/models_db.py
+++ b/flux_led/models_db.py
@@ -307,7 +307,7 @@ MODELS = [
always_writes_white_and_colors=False, # Formerly rgbwprotocol
nine_byte_read_protocol=False,
mode_to_color_mode={},
- color_modes={COLOR_MODE_RGBW}, # Formerly rgbwcapable
+ color_modes=COLOR_MODES_RGB_W, # Formerly rgbwcapable
channel_map={},
),
LEDENETModel(
|
Update models database for 0x<I> (#<I>)
|
diff --git a/rllib/rollout.py b/rllib/rollout.py
index <HASH>..<HASH> 100755
--- a/rllib/rollout.py
+++ b/rllib/rollout.py
@@ -506,7 +506,7 @@ def rollout(agent,
episodes += 1
-if __name__ == "__main__":
+def main():
parser = create_parser()
args = parser.parse_args()
@@ -522,3 +522,7 @@ if __name__ == "__main__":
"--out as well!")
run(args, parser)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/rllib/train.py b/rllib/train.py
index <HASH>..<HASH> 100755
--- a/rllib/train.py
+++ b/rllib/train.py
@@ -257,7 +257,11 @@ def run(args, parser):
ray.shutdown()
-if __name__ == "__main__":
+def main():
parser = create_parser()
args = parser.parse_args()
run(args, parser)
+
+
+if __name__ == "__main__":
+ main()
|
[RLlib] Refactor `if __name__ == "__main__"` into `main()` method in rollout/train.py for better reusability (#<I>)
|
diff --git a/salt/config.py b/salt/config.py
index <HASH>..<HASH> 100644
--- a/salt/config.py
+++ b/salt/config.py
@@ -1722,6 +1722,8 @@ def get_id(root_dir=None, minion_id=False, cache=True):
with salt.utils.fopen('/etc/hosts') as hfl:
for line in hfl:
names = line.split()
+ if not names:
+ continue # empty line in hosts
ip_ = names.pop(0)
if ip_.startswith('127.'):
for name in names:
|
Added /etc/host check for empty lines
|
diff --git a/libnetwork/drivers/overlay/encryption.go b/libnetwork/drivers/overlay/encryption.go
index <HASH>..<HASH> 100644
--- a/libnetwork/drivers/overlay/encryption.go
+++ b/libnetwork/drivers/overlay/encryption.go
@@ -488,7 +488,7 @@ func updateNodeKey(lIP, rIP net.IP, idxs []*spi, curKeys []*key, newIdx, priIdx,
if delIdx != -1 {
// -rSA0
- programSA(rIP, lIP, spis[delIdx], nil, reverse, false)
+ programSA(lIP, rIP, spis[delIdx], nil, reverse, false)
}
if newIdx > -1 {
|
Fix bug in ipsec key rotation
- which would leave a stale state behind
at each key rotation.
|
diff --git a/ph-commons/src/main/java/com/helger/commons/collection/ext/ICommonsList.java b/ph-commons/src/main/java/com/helger/commons/collection/ext/ICommonsList.java
index <HASH>..<HASH> 100644
--- a/ph-commons/src/main/java/com/helger/commons/collection/ext/ICommonsList.java
+++ b/ph-commons/src/main/java/com/helger/commons/collection/ext/ICommonsList.java
@@ -94,7 +94,7 @@ public interface ICommonsList <ELEMENTTYPE> extends
/**
* Special forEach that takes an {@link ObjIntConsumer} which is provided the
* value AND the index.
- *
+ *
* @param aConsumer
* The consumer to use. May not be <code>null</code>.
*/
@@ -205,7 +205,7 @@ public interface ICommonsList <ELEMENTTYPE> extends
}
@Nonnull
- default ICommonsList <ELEMENTTYPE> getSorted (@Nonnull final Comparator <? super ELEMENTTYPE> aComparator)
+ default ICommonsList <ELEMENTTYPE> getSortedInline (@Nonnull final Comparator <? super ELEMENTTYPE> aComparator)
{
sort (aComparator);
return this;
|
Changed to getSortedInline
|
diff --git a/Templating/LegacyEngine.php b/Templating/LegacyEngine.php
index <HASH>..<HASH> 100644
--- a/Templating/LegacyEngine.php
+++ b/Templating/LegacyEngine.php
@@ -68,6 +68,8 @@ class LegacyEngine implements EngineInterface
$tpl = eZTemplate::factory();
foreach ( $parameters as $varName => $param )
{
+ // If $param is an array, we recursively convert all objects contained in it (if any).
+ // Scalar parameters are passed as is
if ( is_array( $param ) )
{
array_walk_recursive(
|
Added comments in Templating\LegacyEngine
|
diff --git a/psamm/command.py b/psamm/command.py
index <HASH>..<HASH> 100644
--- a/psamm/command.py
+++ b/psamm/command.py
@@ -113,6 +113,31 @@ class MetabolicMixin(object):
self._mm = self._model.create_metabolic_model()
+class ObjectiveMixin(object):
+ """Mixin for commands that use biomass as objective.
+
+ Allows the user to override the default objective from the command line.
+ """
+
+ @classmethod
+ def init_parser(cls, parser):
+ parser.add_argument('--objective', help='Reaction to use as objective')
+ super(ObjectiveMixin, cls).init_parser(parser)
+
+ def _get_objective(self, log=True):
+ if self._args.objective is not None:
+ reaction = self._args.objective
+ else:
+ reaction = self._model.get_biomass_reaction()
+ if reaction is None:
+ self.argument_error('The objective reaction was not specified')
+
+ if log:
+ logger.info('Using {} as objective'.format(reaction))
+
+ return reaction
+
+
class LoopRemovalMixin(object):
"""Mixin for commands that perform loop removal."""
|
command: Add ObjectiveMixin for commands taking optional objective
|
diff --git a/share/previews.js b/share/previews.js
index <HASH>..<HASH> 100644
--- a/share/previews.js
+++ b/share/previews.js
@@ -49,7 +49,8 @@ var getContentHeight = (function() {
var els = bodyEl.getElementsByTagName('*');
var elHeights = [];
for (var i = 0, l = els.length; i < l; i++) {
- elHeights.push(els[i].offsetTop + els[i].offsetHeight);
+ elHeights.push(els[i].offsetTop + els[i].offsetHeight +
+ parseInt(window.getComputedStyle(els[i], null).getPropertyValue('margin-bottom')));
}
var height = Math.max.apply(Math, elHeights);
height += parseInt(bodyStyle.getPropertyValue('padding-bottom'), 10);
|
Include bottom margin of last element in document height calculation
|
diff --git a/ArgusCore/src/main/java/com/salesforce/dva/argus/service/alert/DefaultAlertService.java b/ArgusCore/src/main/java/com/salesforce/dva/argus/service/alert/DefaultAlertService.java
index <HASH>..<HASH> 100644
--- a/ArgusCore/src/main/java/com/salesforce/dva/argus/service/alert/DefaultAlertService.java
+++ b/ArgusCore/src/main/java/com/salesforce/dva/argus/service/alert/DefaultAlertService.java
@@ -301,6 +301,12 @@ public class DefaultAlertService extends DefaultJPAService implements AlertServi
_logger.warn(logMessage);
continue;
}
+
+ if(!alert.isEnabled()) {
+ logMessage = MessageFormat.format("Alert {0} has been disabled. Will not evaluate.", alertID);
+ _logger.warn(logMessage);
+ continue;
+ }
History history = _historyService.createHistory(addDateToMessage(JobStatus.STARTED.getDescription()), alert, JobStatus.STARTED, 0, 0);
|
Check if alert has been disabled before evaluation.
|
diff --git a/translator/src/main/java/com/google/devtools/j2objc/gen/StatementGenerator.java b/translator/src/main/java/com/google/devtools/j2objc/gen/StatementGenerator.java
index <HASH>..<HASH> 100644
--- a/translator/src/main/java/com/google/devtools/j2objc/gen/StatementGenerator.java
+++ b/translator/src/main/java/com/google/devtools/j2objc/gen/StatementGenerator.java
@@ -1279,12 +1279,13 @@ public class StatementGenerator extends TreeVisitor {
for (CatchClause cc : node.getCatchClauses()) {
if (cc.getException().getType() instanceof UnionType) {
printMultiCatch(cc);
+ } else {
+ buffer.append("@catch (");
+ cc.getException().accept(this);
+ buffer.append(") {\n");
+ printStatements(cc.getBody().getStatements());
+ buffer.append("}\n");
}
- buffer.append("@catch (");
- cc.getException().accept(this);
- buffer.append(") {\n");
- printStatements(cc.getBody().getStatements());
- buffer.append("}\n");
}
if (node.getFinally() != null) {
|
No Exception catch clause after a multi-catch
|
diff --git a/components/router.go b/components/router.go
index <HASH>..<HASH> 100644
--- a/components/router.go
+++ b/components/router.go
@@ -69,9 +69,11 @@ func (r *Router) HandleUp(p core.Packet, an core.AckNacker, upAdapter core.Adapt
return err
}
- // We don't handle downlink for now, so an is quite useless.
-
- return upAdapter.Send(p, brokers...)
+ response, err := upAdapter.Send(p, brokers...)
+ if err != nil {
+ return err
+ }
+ return an.Ack(response)
}
// ok ensure the router has been initialized by NewRouter()
|
[broker] Make router compliant to send signature
|
diff --git a/number/currency.js b/number/currency.js
index <HASH>..<HASH> 100644
--- a/number/currency.js
+++ b/number/currency.js
@@ -28,8 +28,7 @@ module.exports = memoize(function (db) {
}, {
toString: { value: function (descriptor) {
var num = 0, step, prefix;
- step = (descriptor && !isNaN(descriptor.step))
- ? Math.max(descriptor.step, this.constructor.step) : this.constructor.step;
+ step = (descriptor && !isNaN(descriptor.step)) ? descriptor.step : this.constructor.step;
if (step) {
while (step < 1) {
++num;
|
Issue #1. Always honour step from property descriptor.
|
diff --git a/tacl/catalogue.py b/tacl/catalogue.py
index <HASH>..<HASH> 100644
--- a/tacl/catalogue.py
+++ b/tacl/catalogue.py
@@ -49,4 +49,6 @@ class Catalogue (dict):
"""
with open(path, 'wb') as fh:
writer = csv.writer(fh, delimiter=' ')
- writer.writerows(self.items())
+ rows = self.items()
+ rows.sort(key=lambda x: x[0])
+ writer.writerows(rows)
|
Added sorting of catalogue entries when creating a new catalogue.
|
diff --git a/test/lib/tests.js b/test/lib/tests.js
index <HASH>..<HASH> 100644
--- a/test/lib/tests.js
+++ b/test/lib/tests.js
@@ -34,7 +34,7 @@ const tests = {
'read admin file': function (done) {
this.timeout(2000);
- request(process.env.TEST_PROTOCOL + '://localhost:' + process.env.TEST_PORT + '/adapter/web/index.html', function (error, response, body) {
+ request(process.env.TEST_PROTOCOL + '://localhost:' + process.env.TEST_PORT + '/adapter/web/index_m.html', function (error, response, body) {
expect(error).to.be.not.ok;
expect(response.headers['content-type'].split(';')[0]).to.be.equal('text/html');
expect(response.statusCode).to.be.equal(200);
|
#<I> read admin file loads index_m.html as index.html removed.
|
diff --git a/lib/scss_lint/linter/property_format_linter.rb b/lib/scss_lint/linter/property_format_linter.rb
index <HASH>..<HASH> 100644
--- a/lib/scss_lint/linter/property_format_linter.rb
+++ b/lib/scss_lint/linter/property_format_linter.rb
@@ -17,7 +17,8 @@ module SCSSLint
def description
'Property declarations should always be on one line of the form ' <<
- '`name: value;` or `name: [value] {`'
+ '`name: value;` or `name: [value] {` ' <<
+ '(are you missing a trailing semi-colon?)'
end
private
|
Improve message for property format linter
Changes the lint error description for the property format linter to
suggest that the user is missing a semi-colon, as that usually is the
reason they are seeing the lint, and the more general language of the
error can be confusing the read at times.
Change-Id: I<I>dcb<I>ba<I>e<I>de<I>ab<I>d8bd<I>
Reviewed-on: <URL>
|
diff --git a/gargoyle/media/js/gargoyle.js b/gargoyle/media/js/gargoyle.js
index <HASH>..<HASH> 100644
--- a/gargoyle/media/js/gargoyle.js
+++ b/gargoyle/media/js/gargoyle.js
@@ -80,6 +80,12 @@ $(document).ready(function () {
1: "(Disabled for everyone)"
};
+ if (status == 3) {
+ if (!confirm('Are you SURE you want to enable this switch globally?')) {
+ return;
+ }
+ }
+
api(GARGOYLE.updateStatus,
{
key: row.attr("data-switch-key"),
|
Add comfirmation dialog to enabling switches globally.
Summary: If a switch is going to the globally enabled for everyone state, make
the user confirm via a dialog box.
Test Plan: Fire up the app and observe that clicking every switch button other
than "Global" works as normal. When clicking "Global" a confirmation appears.
If you click cancel, the change does not go through. If you click okay they
change still occurs.
Reviewers: dcramer
Reviewed By: dcramer
CC: dcramer
Differential Revision: <URL>
|
diff --git a/test/hash-parity-with-go-ipfs.js b/test/hash-parity-with-go-ipfs.js
index <HASH>..<HASH> 100644
--- a/test/hash-parity-with-go-ipfs.js
+++ b/test/hash-parity-with-go-ipfs.js
@@ -38,7 +38,8 @@ module.exports = (repo) => {
ipldResolver = new IPLDResolver(bs)
})
- it('yields the same tree as go-ipfs', (done) => {
+ it('yields the same tree as go-ipfs', function (done) {
+ this.timeout(10 * 1000)
pull(
pull.values([
{
|
test: Increase timeout of a test
The test in `hash-parity-with-go-ipfs.js` timed out even locally,
hence increasing the timeout to <I> seconds.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -35,7 +35,7 @@ setup(
keywords=['django', 'admin', 'interface', 'responsive', 'flat', 'theme', 'custom', 'ui'],
requires=['django(>=1.7)'],
install_requires=[
- 'django-colorfield >= 0.1, < 1.0',
+ 'django-colorfield >= 0.2, < 1.0',
'django-flat-theme >= 1.0, < 2.0',
'django-flat-responsive >= 1.0, < 3.0',
'six >= 1.9.0, < 2.0.0',
|
Bumped django-colorfield version to <I>.
|
diff --git a/cobald/parasites/condor_limits/adapter.py b/cobald/parasites/condor_limits/adapter.py
index <HASH>..<HASH> 100644
--- a/cobald/parasites/condor_limits/adapter.py
+++ b/cobald/parasites/condor_limits/adapter.py
@@ -14,7 +14,10 @@ def query_limits(query_command, key_transform):
except ValueError:
continue
else:
- resource_limits[resource] = float(value)
+ try:
+ resource_limits[resource] = float(value)
+ except ValueError:
+ pass
return resource_limits
|
condor: invalid values are ignored during queries
|
diff --git a/lib/compiler/scope.js b/lib/compiler/scope.js
index <HASH>..<HASH> 100644
--- a/lib/compiler/scope.js
+++ b/lib/compiler/scope.js
@@ -19,9 +19,6 @@ class Scope {
this.arg_uid = uid++;
}
- level() {
- return this.next ? (this.next.level() + 1) : 0;
- }
get(name) {
if (this.symbols.hasOwnProperty(name)) {
return this.symbols[name];
@@ -69,7 +66,7 @@ class Scope {
return result;
}
alloc_var(sourcename) {
- var varName, suffix = uid++;// + '_' + this.level();
+ var varName, suffix = uid++;
if (sourcename) {
varName = sourcename + '_' + suffix;
} else {
|
Scope: Remove unused "level" method
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,6 +8,6 @@ setup(name='python-ipmi',
author='Jarrod Johnson',
author_email='jbjohnso@us.ibm.com',
url='http://xcat.sf.net/',
- requires=['pycrypto'],
+ install_requires=['pycrypto'],
packages=['ipmi'],
)
|
Change requires to install_requires
|
diff --git a/lib/subproviders/geth_api_double.js b/lib/subproviders/geth_api_double.js
index <HASH>..<HASH> 100644
--- a/lib/subproviders/geth_api_double.js
+++ b/lib/subproviders/geth_api_double.js
@@ -153,6 +153,16 @@ GethApiDouble.prototype.eth_getBlockByHash = function(tx_hash, include_full_tran
this.eth_getBlockByNumber.apply(this, arguments);
};
+GethApiDouble.prototype.eth_getBlockTransactionCountByNumber = function(block_number, callback) {
+ this.state.blockchain.getBlock(block_number, function(err, block) {
+ callback(null, block.transactions.length);
+ });
+}
+
+GethApiDouble.prototype.eth_getBlockTransactionCountByHash = function(block_hash, callback) {
+ this.eth_getBlockTransactionCountByNumber.apply(this, arguments);
+}
+
GethApiDouble.prototype.eth_getTransactionReceipt = function(hash, callback) {
this.state.getTransactionReceipt(hash, function(err, receipt) {
if (err) return callback(err);
|
added eth_getBlockTransactionCountByHash and eth_getBlockTransactionCountByNumber
|
diff --git a/encoding/encoding.go b/encoding/encoding.go
index <HASH>..<HASH> 100644
--- a/encoding/encoding.go
+++ b/encoding/encoding.go
@@ -108,7 +108,7 @@ var registeredCodecs = make(map[string]Codec)
// more details.
//
// NOTE: this function must only be called during initialization time (i.e. in
-// an init() function), and is not thread-safe. If multiple Compressors are
+// an init() function), and is not thread-safe. If multiple Codecs are
// registered with the same name, the one registered last will take effect.
func RegisterCodec(codec Codec) {
if codec == nil {
|
documentation: fix typo in RegisterCodec godoc (#<I>)
|
diff --git a/consul/server_manager/server_manager.go b/consul/server_manager/server_manager.go
index <HASH>..<HASH> 100644
--- a/consul/server_manager/server_manager.go
+++ b/consul/server_manager/server_manager.go
@@ -56,8 +56,8 @@ type ConsulClusterInfo interface {
NumNodes() int
}
-// serverCfg is the thread-safe configuration structure that is used to
-// maintain the list of consul servers in Client.
+// serverCfg is the thread-safe configuration struct used to maintain the
+// list of Consul servers in ServerManager.
//
// NOTE(sean@): We are explicitly relying on the fact that serverConfig will
// be copied onto the stack. Please keep this structure light.
|
Reword comment after moving code into new packages
|
diff --git a/databuild/adapters/locmem/models.py b/databuild/adapters/locmem/models.py
index <HASH>..<HASH> 100644
--- a/databuild/adapters/locmem/models.py
+++ b/databuild/adapters/locmem/models.py
@@ -18,6 +18,9 @@ class LocMemSheet(BaseWorkSheet):
def __getitem__(self, key):
return self._values_to_dict(self.data[key])
+ def __len__(self):
+ return self.data.__len__()
+
def _match(self, doc, where):
"""Return True if 'doc' matches the 'where' condition."""
assert isinstance(where, dict), "where is not a dictionary"
|
added __len__ method to sheets
|
diff --git a/test/busy.js b/test/busy.js
index <HASH>..<HASH> 100644
--- a/test/busy.js
+++ b/test/busy.js
@@ -48,6 +48,7 @@ allocCluster.test('request().send() to a busy server', 2, function t(cluster, as
one.listen(0, '127.0.0.1', listening);
var twoSubChan;
+ var called = 0;
function listening () {
twoSubChan = two.makeSubChannel({
@@ -58,6 +59,8 @@ allocCluster.test('request().send() to a busy server', 2, function t(cluster, as
one.makeSubChannel({
serviceName: 'server'
}).register('foo', function foo(req, res, arg2, arg3) {
+ called++;
+
assert.ok(Buffer.isBuffer(arg2), 'handler got an arg2 buffer');
assert.ok(Buffer.isBuffer(arg3), 'handler got an arg3 buffer');
res.headers.as = 'raw';
@@ -93,6 +96,7 @@ allocCluster.test('request().send() to a busy server', 2, function t(cluster, as
assert.equals(err.fullType, 'tchannel.busy');
one.close();
+ assert.equal(called, 1);
assert.end();
}
|
test/busy: verify handler only called once
|
diff --git a/test/test_autopep8.py b/test/test_autopep8.py
index <HASH>..<HASH> 100755
--- a/test/test_autopep8.py
+++ b/test/test_autopep8.py
@@ -1205,7 +1205,7 @@ foooo('',
foooo('',
scripts=[''],
classifiers=[
- 'Development Status :: 4 - Beta',
+ 'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
])
|
Update test to reflect fix in pep8
|
diff --git a/Core/Executor/ContentManager.php b/Core/Executor/ContentManager.php
index <HASH>..<HASH> 100644
--- a/Core/Executor/ContentManager.php
+++ b/Core/Executor/ContentManager.php
@@ -667,7 +667,7 @@ class ContentManager extends RepositoryExecutor implements MigrationGeneratorInt
}
foreach ($fieldData as $key => $data) {
- if (!in_array($key, $languageCodes)) {
+ if (!in_array($key, $languageCodes, true)) {
return false;
}
}
|
fixup 2 for commit d0c8b1a9f<I>
|
diff --git a/src/ol/renderer/canvas/ImageLayer.js b/src/ol/renderer/canvas/ImageLayer.js
index <HASH>..<HASH> 100644
--- a/src/ol/renderer/canvas/ImageLayer.js
+++ b/src/ol/renderer/canvas/ImageLayer.js
@@ -129,8 +129,9 @@ CanvasImageLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
const hints = frameState.viewHints;
+ const vectorRenderer = this.vectorRenderer_;
let renderedExtent = frameState.extent;
- if (layerState.extent !== undefined) {
+ if (!vectorRenderer && layerState.extent !== undefined) {
renderedExtent = getIntersection(renderedExtent, layerState.extent);
}
@@ -144,7 +145,6 @@ CanvasImageLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
}
}
let skippedFeatures = this.skippedFeatures_;
- const vectorRenderer = this.vectorRenderer_;
if (vectorRenderer) {
const context = vectorRenderer.context;
const imageFrameState = /** @type {module:ol/PluggableMap~FrameState} */ (assign({}, frameState, {
|
Do not clip the image for vector layers
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -27,8 +27,8 @@ module.exports = {
enforce: 'pre',
test: /\.tsx?$/,
use: "ts-loader",
- config: {
- project: "./tsconfig-loader.json"
+ options: {
+ configFileName: "./tsconfig-loader.json"
}
},
{
|
Fixing webpack ts-loader config
|
diff --git a/lib/generate.js b/lib/generate.js
index <HASH>..<HASH> 100644
--- a/lib/generate.js
+++ b/lib/generate.js
@@ -195,6 +195,9 @@ module.exports = function(options, callback){
process(files, next);
});
},
+ save: ['theme_source', 'process', function(next){
+ file.write(baseDir + 'db.json', JSON.stringify(hexo.db.export()), next);
+ }],
generate: ['theme_config', 'theme_layout', 'theme_i18n', 'process', function(next, results){
var themeConfig = freeze(results.theme_config),
themei18n = results.theme_i18n;
|
Generate: export database after process done
|
diff --git a/src/fancy-tools/wwwcTool.test.js b/src/fancy-tools/wwwcTool.test.js
index <HASH>..<HASH> 100644
--- a/src/fancy-tools/wwwcTool.test.js
+++ b/src/fancy-tools/wwwcTool.test.js
@@ -1,4 +1,11 @@
import WwwcTool from './wwwcTool.js';
+import external from './../externalModules.js';
+
+jest.mock('./../externalModules.js', () => ({
+ cornerstone: {
+ setViewport: jest.fn()
+ }
+}));
// TODO: Not sure if this is the best place to test the tool's strategies?
describe('wwwcTool.js', () => {
|
Fix wwwc tests (need mocked externals)
|
diff --git a/nonblock/__init__.py b/nonblock/__init__.py
index <HASH>..<HASH> 100644
--- a/nonblock/__init__.py
+++ b/nonblock/__init__.py
@@ -1,5 +1,5 @@
'''
- Copyright (c) 2015 Timothy Savannah under terms of LGPLv2. You should have received a copy of this LICENSE with this distribution.
+ Copyright (c) 2015-2016 Timothy Savannah under terms of LGPLv2. You should have received a copy of this LICENSE with this distribution.
Contains pure-python functions for non-blocking IO in python
'''
@@ -12,6 +12,6 @@ from .BackgroundWrite import bgwrite, bgwrite_chunk, BackgroundIOPriority
__all__ = ('nonblock_read', 'bgwrite', 'bgwrite_chunk', 'BackgroundIOPriority')
-__version__ = '2.0.0'
-__version_tuple = (2, 0, 0)
+__version__ = '3.0.0'
+__version_tuple = (3, 0, 0)
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ if __name__ == '__main__':
long_description = summary
setup(name='python-nonblock',
- version='2.0.0',
+ version='3.0.0',
packages=['nonblock'],
author='Tim Savannah',
author_email='kata198@gmail.com',
|
change version in <I> branch to <I>
|
diff --git a/lib/sshkit/command.rb b/lib/sshkit/command.rb
index <HASH>..<HASH> 100644
--- a/lib/sshkit/command.rb
+++ b/lib/sshkit/command.rb
@@ -63,7 +63,7 @@ module SSHKit
end
def clear_stdout_lines
- split_and_clear_stream(@stdout)
+ split_and_clear_stream(:@stdout)
end
def on_stderr(channel, data)
@@ -73,7 +73,7 @@ module SSHKit
end
def clear_stderr_lines
- split_and_clear_stream(@stderr)
+ split_and_clear_stream(:@stderr)
end
def exit_status=(new_exit_status)
@@ -220,8 +220,9 @@ module SSHKit
end
end
- def split_and_clear_stream(stream)
- stream.lines.to_a.tap { stream.clear } # Convert lines enumerable to an array for ruby 1.9
+ def split_and_clear_stream(stream_name)
+ # Convert lines enumerable to an array for ruby 1.9
+ instance_variable_get(stream_name).lines.to_a.tap { instance_variable_set(stream_name, '') }
end
def call_interaction_handler(channel, data, callback_name)
|
Do not mutate @stdout or @stderr strings
Calling @stdout.clear broke airbrussh, and was hard to debug. This commit restores the previous (better) behaviour of simply assigning a new blank string when clearing.
|
diff --git a/activerecord/lib/rails/generators/active_record/session_migration/templates/migration.rb b/activerecord/lib/rails/generators/active_record/session_migration/templates/migration.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/rails/generators/active_record/session_migration/templates/migration.rb
+++ b/activerecord/lib/rails/generators/active_record/session_migration/templates/migration.rb
@@ -1,5 +1,5 @@
class <%= migration_class_name %> < ActiveRecord::Migration
- def up
+ def change
create_table :<%= session_table_name %> do |t|
t.string :session_id, :null => false
t.text :data
@@ -9,8 +9,4 @@ class <%= migration_class_name %> < ActiveRecord::Migration
add_index :<%= session_table_name %>, :session_id
add_index :<%= session_table_name %>, :updated_at
end
-
- def down
- drop_table :<%= session_table_name %>
- end
end
|
Use change in place of up and down in sessions table migration
|
diff --git a/core/core.js b/core/core.js
index <HASH>..<HASH> 100644
--- a/core/core.js
+++ b/core/core.js
@@ -451,7 +451,7 @@ exports._setup = function() {
var tProperty = this.element.css(attr + '-property')
- if (tProperty.search(name) !== -1)
+ if (tProperty.search(' ' + name) !== -1)
return;
var tDelay = this.element.css(attr + '-delay')
|
a trick to handle properties with prefix
|
diff --git a/AssetBundle.php b/AssetBundle.php
index <HASH>..<HASH> 100644
--- a/AssetBundle.php
+++ b/AssetBundle.php
@@ -25,18 +25,21 @@ class AssetBundle extends \yii\web\AssetBundle
public $css = [
'css/font-awesome.min.css',
];
-
+
/**
- * Initializes the bundle.
- * Set publish options to copy only necessary files (in this case css and font folders)
- * @codeCoverageIgnore
+ * @inherit
*/
- public function init()
- {
- parent::init();
+ public $publishOptions = [
+ 'only' => [
+ "css/*",
+ "fonts/*",
+ ],
+ 'except' => [
+ "less",
+ "scss",
+ "src",
+ ],
+ ];
- $this->publishOptions['beforeCopy'] = function ($from, $to) {
- return preg_match('%(/|\\\\)(fonts|css)%', $from);
- };
- }
+
}
|
Removed closure as it cause serialization issues
Serialization issues on debug log
|
diff --git a/lib/form/filemanager.js b/lib/form/filemanager.js
index <HASH>..<HASH> 100644
--- a/lib/form/filemanager.js
+++ b/lib/form/filemanager.js
@@ -450,7 +450,7 @@ M.form_filemanager.init = function(Y, options) {
},
view_files: function(appendfiles) {
this.filemanager.removeClass('fm-updating').removeClass('fm-noitems');
- if ((appendfiles == null) && (!this.options.list || this.options.list.length == 0)) {
+ if ((appendfiles == null) && (!this.options.list || this.options.list.length == 0) && this.viewmode != 2) {
this.filemanager.addClass('fm-noitems');
return;
}
|
MDL-<I>: filemanger: fixed bug with switching to treeview in empty folder
|
diff --git a/src/locale/hy-am.js b/src/locale/hy-am.js
index <HASH>..<HASH> 100644
--- a/src/locale/hy-am.js
+++ b/src/locale/hy-am.js
@@ -8,8 +8,8 @@ var monthsFormat = 'հունվարի_փետրվարի_մարտի_ապրիլի_մ
monthsStandalone = 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_');
export default moment.defineLocale('hy-am', {
- months : function (m, format) {
- if (!m) {
+ months : function (m, format) {
+ if (!m) {
return monthsStandalone;
} else if (/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/.test(format)) {
return monthsFormat[m.month()];
|
I should probably run the code style tests locally...
|
diff --git a/logrus_test.go b/logrus_test.go
index <HASH>..<HASH> 100644
--- a/logrus_test.go
+++ b/logrus_test.go
@@ -539,7 +539,7 @@ func TestParseLevel(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, TraceLevel, l)
- l, err = ParseLevel("invalid")
+ _, err = ParseLevel("invalid")
assert.Equal(t, "not a valid logrus Level: \"invalid\"", err.Error())
}
|
Fixed ineffectual assignment in test
Don't assign l if it's not being checked/used afterwards.
|
diff --git a/spec/validation.rb b/spec/validation.rb
index <HASH>..<HASH> 100644
--- a/spec/validation.rb
+++ b/spec/validation.rb
@@ -82,6 +82,14 @@ describe 'validation' do
end
end
+ it 'ignores validation checks if debugging is set to true' do
+ @rmq.validation.valid?('taco loco', :digits).should == false
+ RubyMotionQuery::RMQ.debugging = true
+ @rmq.validation.valid?('taco loco', :digits).should == true
+ RubyMotionQuery::RMQ.debugging = false
+ @rmq.validation.valid?('taco loco', :digits).should == false
+ end
+
end
end
|
added tests for PR #<I>
|
diff --git a/lib/core/client_alchemy.js b/lib/core/client_alchemy.js
index <HASH>..<HASH> 100644
--- a/lib/core/client_alchemy.js
+++ b/lib/core/client_alchemy.js
@@ -339,6 +339,7 @@ Alchemy.setMethod(function markLinks(variables, render_data) {
elements,
element,
temp,
+ url,
i;
if (variables.__route) {
@@ -381,6 +382,20 @@ Alchemy.setMethod(function markLinks(variables, render_data) {
}
}
+ // Get all anchors without breadcrumbs
+ elements = document.querySelectorAll('a:not([data-breadcrumb]):not([data-breadcrumbs])');
+
+ for (i = 0; i < elements.length; i++) {
+ element = elements[i];
+ url = RURL.parse(element.href);
+
+ if (alchemy.current_url.pathname == url.pathname) {
+ markLinkElement(element, 1);
+ } else {
+ markLinkElement(element, false);
+ }
+ }
+
// Update breadcrumbs in case of ajax
if (render_data.request && render_data.request.ajax && variables.__breadcrumb_entries) {
|
Also mark anchors without data-breadcrumb attributes as active
|
diff --git a/app/models/staypuft/deployment.rb b/app/models/staypuft/deployment.rb
index <HASH>..<HASH> 100644
--- a/app/models/staypuft/deployment.rb
+++ b/app/models/staypuft/deployment.rb
@@ -68,13 +68,12 @@ module Staypuft
platform: Platform::RHEL6 }.merge(attributes),
options)
+ self.hostgroup = Hostgroup.new(name: name, parent: Hostgroup.get_base_hostgroup)
self.nova.nova_network = NovaService::NovaNetwork::FLAT
self.passwords.set_defaults
-
- self.hostgroup = Hostgroup.new(name: name, parent: Hostgroup.get_base_hostgroup)
- self.layout = Layout.where(:name => self.layout_name,
- :networking => self.networking).first
+ self.layout = Layout.where(:name => self.layout_name,
+ :networking => self.networking).first
end
extend AttributeParamStorage
|
Hostgroup of Deployment has to be created before param defaults
|
diff --git a/yt_array.py b/yt_array.py
index <HASH>..<HASH> 100644
--- a/yt_array.py
+++ b/yt_array.py
@@ -847,7 +847,7 @@ class YTArray(np.ndarray):
@return_arr
def prod(self, axis=None, dtype=None, out=None):
- if axis:
+ if axis is not None:
units = self.units**self.shape[axis]
else:
units = self.units**self.size
|
Fixing a big bug in the prod function. Truthiness hurts.
--HG--
branch : yt-<I>
|
diff --git a/lib/Wei.php b/lib/Wei.php
index <HASH>..<HASH> 100644
--- a/lib/Wei.php
+++ b/lib/Wei.php
@@ -848,10 +848,10 @@ namespace Wei
* Add a service to the service container
*
* @param string $name The name of service
- * @param Base $service The service service
+ * @param object $service The service service
* @return $this
*/
- public function __set($name, Base $service)
+ public function __set($name, $service)
{
return $this->set($name, $service);
}
diff --git a/tests/unit/WeiTest.php b/tests/unit/WeiTest.php
index <HASH>..<HASH> 100644
--- a/tests/unit/WeiTest.php
+++ b/tests/unit/WeiTest.php
@@ -491,7 +491,7 @@ class WeiTest extends TestCase
)
));
- // Instance weis
+ // service instances
$wei->request;
$wei->{'sub.request'};
@@ -528,5 +528,8 @@ class WeiTest extends TestCase
{
$this->wei->set('customService', new \stdClass());
$this->assertInstanceOf('stdClass', $this->wei->get('customService'));
+
+ $this->wei->customService2 = new \stdClass();
+ $this->assertInstanceOf('stdClass', $this->wei->customService2);
}
}
|
allows non \Wei\Base object as service through magic setter
|
diff --git a/src/main/java/org/jfrog/hudson/ArtifactoryServer.java b/src/main/java/org/jfrog/hudson/ArtifactoryServer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jfrog/hudson/ArtifactoryServer.java
+++ b/src/main/java/org/jfrog/hudson/ArtifactoryServer.java
@@ -284,11 +284,11 @@ public class ArtifactoryServer implements Serializable {
* @return Preferred credentials for repo resolving. Never null.
*/
public Credentials getResolvingCredentials() {
- if (getResolverCredentials() != null) {
+ if (StringUtils.isNotBlank(getResolverCredentialsId())) {
return getResolverCredentials();
}
- if (getDeployerCredentials() != null) {
+ if (StringUtils.isNotBlank(getDeployerCredentialsId())) {
return getDeployerCredentials();
}
|
HAP-<I> - Add support with Credentials plugin for Artifactory
|
diff --git a/kubetest/azure_helpers.go b/kubetest/azure_helpers.go
index <HASH>..<HASH> 100644
--- a/kubetest/azure_helpers.go
+++ b/kubetest/azure_helpers.go
@@ -19,6 +19,7 @@ package main
import (
"context"
"fmt"
+ "time"
resources "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources"
"github.com/Azure/go-autorest/autorest"
@@ -208,6 +209,7 @@ func getClient(env azure.Environment, subscriptionID, tenantID string, armSpt *a
authorizer := autorest.NewBearerAuthorizer(armSpt)
c.deploymentsClient.Authorizer = authorizer
+ c.deploymentsClient.PollingDuration = 60 * time.Minute
c.groupsClient.Authorizer = authorizer
return c
|
"Set deploymentsClient polling Duration to 1 hour"
|
diff --git a/account/middleware.py b/account/middleware.py
index <HASH>..<HASH> 100644
--- a/account/middleware.py
+++ b/account/middleware.py
@@ -43,7 +43,11 @@ class TimezoneMiddleware(object):
"""
def process_request(self, request):
- account = getattr(request.user, "account", None)
- if account:
- tz = settings.TIME_ZONE if not account.timezone else account.timezone
- timezone.activate(tz)
+ try:
+ account = getattr(request.user, "account", None)
+ except Account.DoesNotExist:
+ pass
+ else:
+ if account:
+ tz = settings.TIME_ZONE if not account.timezone else account.timezone
+ timezone.activate(tz)
|
Fixed missing account exception in TimezoneMiddleware
Fixes #<I> and #<I>.
|
diff --git a/src/python/bezier/triangle.py b/src/python/bezier/triangle.py
index <HASH>..<HASH> 100644
--- a/src/python/bezier/triangle.py
+++ b/src/python/bezier/triangle.py
@@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-"""Helper for B |eacute| zier Triangles / Triangles.
+"""Helper for B |eacute| zier Triangles.
.. |eacute| unicode:: U+000E9 .. LATIN SMALL LETTER E WITH ACUTE
:trim:
|
Removing redundant "Triangles" in `bezier.triangle` docstring.
|
diff --git a/maildir-deduplicate.py b/maildir-deduplicate.py
index <HASH>..<HASH> 100755
--- a/maildir-deduplicate.py
+++ b/maildir-deduplicate.py
@@ -27,8 +27,6 @@
You can give a list of mail headers to ignore when comparing mails between each others.
I used this script to clean up a messed maildir folder after I move several mails from a Lotus Notes database.
- Last update: 2010 jun 08
-
Tested on MacOS X 10.6 with python 2.6.2.
"""
|
Don't track last update time of scripts: let this task to Git.
|
diff --git a/src/Utility/Import.php b/src/Utility/Import.php
index <HASH>..<HASH> 100644
--- a/src/Utility/Import.php
+++ b/src/Utility/Import.php
@@ -34,31 +34,24 @@ class Import
];
/**
- * Supported field types.
+ * Ignored table columns, by name.
*
* @var array
*/
- private $__supportedFieldTypes = [
- 'string',
- 'email',
- 'text',
- 'url',
- 'reminder',
- 'datetime',
- 'date',
- 'time'
+ private $__ignoreColumns = [
+ 'id',
+ 'created',
+ 'modified',
+ 'trashed'
];
/**
- * Ignored fields, by name.
+ * Ignored table columns, by type.
*
* @var array
*/
- private $__ignoreFields = [
- 'id',
- 'created',
- 'modified',
- 'trashed'
+ private $__ignoreColumnTypes = [
+ 'uuid',
];
/**
|
Better property naming (task #<I>)
|
diff --git a/src/frontend/org/voltdb/PartitionDRGateway.java b/src/frontend/org/voltdb/PartitionDRGateway.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/PartitionDRGateway.java
+++ b/src/frontend/org/voltdb/PartitionDRGateway.java
@@ -167,18 +167,6 @@ public class PartitionDRGateway implements DurableUniqueIdListener {
public int processDRConflict(int partitionId, long remoteSequenceNumber, DRConflictType drConflictType,
String tableName, ByteBuffer existingTable, ByteBuffer expectedTable,
ByteBuffer newTable, ByteBuffer output) {
- BBContainer cont = DBBPool.wrapBB(existingTable);
- DBBPool.registerUnsafeMemory(cont.address());
- cont.discard();
-
- cont = DBBPool.wrapBB(expectedTable);
- DBBPool.registerUnsafeMemory(cont.address());
- cont.discard();
-
- cont = DBBPool.wrapBB(newTable);
- DBBPool.registerUnsafeMemory(cont.address());
- cont.discard();
-
return 0;
}
|
ENG-<I>, also remove the call of wrap and discard to direct byte buffer.
Change-Id: I<I>ad<I>a<I>afc<I>dc<I>d<I>f<I>e<I>
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -10,14 +10,10 @@ function escapeLuaString(content) {
.replace(/\\/g, '\\\\')
.replace(/'/g, "\\'")
.replace(/"/g, '\\"')
- .replace(/\[/g, '\\[')
- .replace(/\]/g, '\\]')
.replace(/\v/g, '\\v')
.replace(/\t/g, '\\t')
.replace(/\r/g, '\\r')
.replace(/\n/g, '\\n')
- // .replace(/\\b/g, '\\b')
- // .replace(/\a/g, '\\a')
.replace(/\f/g, '\\f');
}
|
Removed `[` and `]` escape
|
diff --git a/discord/gateway.py b/discord/gateway.py
index <HASH>..<HASH> 100644
--- a/discord/gateway.py
+++ b/discord/gateway.py
@@ -543,26 +543,14 @@ class DiscordWebSocket:
return
if event == 'READY':
- self._trace = trace = data.get('_trace', [])
self.sequence = msg['s']
self.session_id = data['session_id']
- _log.info(
- 'Shard ID %s has connected to Gateway: %s (Session ID: %s).',
- self.shard_id,
- ', '.join(trace),
- self.session_id,
- )
+ _log.info('Shard ID %s has connected to Gateway (Session ID: %s).', self.shard_id, self.session_id)
elif event == 'RESUMED':
- self._trace = trace = data.get('_trace', [])
# pass back the shard ID to the resumed handler
data['__shard_id__'] = self.shard_id
- _log.info(
- 'Shard ID %s has successfully RESUMED session %s under trace %s.',
- self.shard_id,
- self.session_id,
- ', '.join(trace),
- )
+ _log.info('Shard ID %s has successfully RESUMED session %s.', self.shard_id, self.session_id)
try:
func = self._discord_parsers[event]
|
Remove gateway trace information
This was unused anyway
|
diff --git a/core/src/test/java/org/hibernate/ogm/backendtck/compensation/CompensationSpiTest.java b/core/src/test/java/org/hibernate/ogm/backendtck/compensation/CompensationSpiTest.java
index <HASH>..<HASH> 100644
--- a/core/src/test/java/org/hibernate/ogm/backendtck/compensation/CompensationSpiTest.java
+++ b/core/src/test/java/org/hibernate/ogm/backendtck/compensation/CompensationSpiTest.java
@@ -478,7 +478,7 @@ public class CompensationSpiTest extends OgmTestCase {
private boolean currentDialectHasFacet(Class<? extends GridDialect> facet) {
GridDialect gridDialect = sfi().getServiceRegistry().getService( GridDialect.class );
- return GridDialects.hasFacet( gridDialect, OptimisticLockingAwareGridDialect.class );
+ return GridDialects.hasFacet( gridDialect, facet );
}
private boolean currentDialectUsesLookupDuplicatePreventionStrategy() {
|
OGM-<I> Testing for passed facet
|
diff --git a/classes/fields/datetime.php b/classes/fields/datetime.php
index <HASH>..<HASH> 100644
--- a/classes/fields/datetime.php
+++ b/classes/fields/datetime.php
@@ -322,7 +322,8 @@ class PodsField_DateTime extends PodsField {
* @since 2.0
*/
public function pre_save ( $value, $id = null, $name = null, $options = null, $fields = null, $pod = null, $params = null ) {
- $format = $this->format( $options );
+ $format = $this->format( $options, true );
+ $format = static::convert_format( $format, array( 'source' => 'jquery_ui' ) );
if ( ! empty( $value ) && ( 0 == pods_var( static::$type . '_allow_empty', $options, 1 ) || ! in_array( $value, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) ) )
$value = $this->convert_date( $value, static::$storage_format, $format );
|
pre_save() should use the JS format version and convert it to PHP format afterwards
|
diff --git a/lib/rack/cors.rb b/lib/rack/cors.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/cors.rb
+++ b/lib/rack/cors.rb
@@ -129,7 +129,7 @@ module Rack
def process_preflight(env)
return nil if invalid_method_request?(env) || invalid_headers_request?(env)
- to_preflight_headers(env)
+ {'Content-Type' => 'text/plain'}.merge(to_preflight_headers(env))
end
def to_headers(env)
diff --git a/test/cors_test.rb b/test/cors_test.rb
index <HASH>..<HASH> 100644
--- a/test/cors_test.rb
+++ b/test/cors_test.rb
@@ -61,6 +61,12 @@ class CorsTest < Test::Unit::TestCase
assert_preflight_success
assert_equal '*', last_response.headers['Access-Control-Allow-Origin']
end
+
+ should 'return a Content-Type' do
+ preflight_request('http://localhost:3000', '/')
+ assert_preflight_success
+ assert_not_nil last_response.headers['Content-Type']
+ end
end
protected
|
Should return a Content-Type, to comply with the Rack spec
|
diff --git a/mutant/__init__.py b/mutant/__init__.py
index <HASH>..<HASH> 100644
--- a/mutant/__init__.py
+++ b/mutant/__init__.py
@@ -4,7 +4,7 @@ import logging
from django.utils.version import get_version
-VERSION = (0, 2, 2, 'alpha', 0)
+VERSION = (0, 3, 0, 'alpha', 0)
__version__ = get_version(VERSION)
|
Started <I> alpha development.
|
diff --git a/lib/appenders/consoleappender.js b/lib/appenders/consoleappender.js
index <HASH>..<HASH> 100644
--- a/lib/appenders/consoleappender.js
+++ b/lib/appenders/consoleappender.js
@@ -19,6 +19,7 @@ if (typeof define !== 'function') {
define(function (require) {
var Appender = require('../appender');
+ var utils = require('../utils');
/**
* Definition of the Appender class
@@ -67,7 +68,9 @@ define(function (require) {
});
if (message) {
lastMsg = message[message.length-1];
- if (lastMsg && (lastMsg.lastIndexOf('\n') === lastMsg.length - 1)) {
+ if (lastMsg &&
+ utils.isString(lastMsg) &&
+ (lastMsg.lastIndexOf('\n') === lastMsg.length - 1)) {
message[message.length-1] = lastMsg.substring(0, lastMsg.length - 1);
}
}
|
Woodman crashed when message to log to console ended with an object
Same bug as in #<I>: the console appender also expected the final
bit to send to the console to be a string and not to be an object.
However, in browser environments, Woodman typically send objects
as-is to the console.
|
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
@@ -6355,6 +6355,8 @@
*/
function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
if ( $this->is_registered() ) {
+ $this->sync_user_beta_mode();
+
if ( $this->has_paid_plan() ) {
// Initiate background plan sync.
$this->_sync_license( true, false, $current_blog_id );
@@ -14157,6 +14159,19 @@
}
/**
+ * @author Leo Fajardo (@leorw)
+ * @since 2.2.4.7
+ */
+ private function sync_user_beta_mode() {
+ $user = $this->get_api_user_scope()->get( '/?plugin_id=' . $this->get_id() . '&fields=is_beta' );
+
+ if ( $this->is_api_result_entity( $user ) ) {
+ $this->_user->is_beta = $user->is_beta;
+ $this->_store_user();
+ }
+ }
+
+ /**
* @author Vova Feldman (@svovaf)
* @since 1.1.7.4
*
|
[beta-list] Included the syncing of user's beta mode in the data sync cron logic.
|
diff --git a/pkg/minikube/bootstrapper/bsutil/kverify/api_server.go b/pkg/minikube/bootstrapper/bsutil/kverify/api_server.go
index <HASH>..<HASH> 100644
--- a/pkg/minikube/bootstrapper/bsutil/kverify/api_server.go
+++ b/pkg/minikube/bootstrapper/bsutil/kverify/api_server.go
@@ -223,7 +223,7 @@ func apiServerHealthz(hostname string, port int) (state.State, error) {
return nil
}
- err = retry.Local(check, 5*time.Second)
+ err = retry.Local(check, 10*time.Second)
// Don't propagate 'Stopped' upwards as an error message, as clients may interpret the err
// as an inability to get status. We need it for retry.Local, however.
|
try to increase api healthz wait timeout
|
diff --git a/news-bundle/src/Resources/contao/dca/tl_news.php b/news-bundle/src/Resources/contao/dca/tl_news.php
index <HASH>..<HASH> 100644
--- a/news-bundle/src/Resources/contao/dca/tl_news.php
+++ b/news-bundle/src/Resources/contao/dca/tl_news.php
@@ -602,7 +602,7 @@ class tl_news extends Backend
return '
<div class="cte_type ' . $key . '"><strong>' . $arrRow['headline'] . '</strong> - ' . $date . '</div>
-<div class="limit_height' . (!$GLOBALS['TL_CONFIG']['doNotCollapse'] ? ' h64' : '') . ' block">
+<div class="limit_height' . (!$GLOBALS['TL_CONFIG']['doNotCollapse'] ? ' h64' : '') . '">
' . (($arrRow['text'] != '') ? $arrRow['text'] : $arrRow['teaser']) . '
</div>' . "\n";
}
|
[News] Added a "chosen" widget to the templates editor (see #<I>)
|
diff --git a/easybatch-core/src/test/java/org/easybatch/core/CoreTestsSuite.java b/easybatch-core/src/test/java/org/easybatch/core/CoreTestsSuite.java
index <HASH>..<HASH> 100755
--- a/easybatch-core/src/test/java/org/easybatch/core/CoreTestsSuite.java
+++ b/easybatch-core/src/test/java/org/easybatch/core/CoreTestsSuite.java
@@ -30,8 +30,7 @@ import org.easybatch.core.impl.EngineTest;
import org.easybatch.core.mapper.converter.*;
import org.easybatch.core.filter.*;
import org.easybatch.core.mapper.ObjectMapperTest;
-import org.easybatch.core.reader.FileRecordReaderTest;
-import org.easybatch.core.reader.ListRecordReaderTest;
+import org.easybatch.core.reader.*;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -45,6 +44,9 @@ import org.junit.runners.Suite;
// reader
FileRecordReaderTest.class,
ListRecordReaderTest.class,
+ QueueRecordReaderTest.class,
+ StringRecordReaderTest.class,
+ CliRecordReaderTest.class,
// mapper
ObjectMapperTest.class,
AtomicIntegerTypeConverterTest.class,
|
add new tests to the CoreTestsSuite
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -48,7 +48,7 @@ setup(
name="gdown",
version=version,
packages=find_packages(exclude=["github2pypi"]),
- install_requires=["filelock", "requests[socks]", "six", "tqdm"],
+ install_requires=["filelock", "requests[socks]>=2.12.0", "six", "tqdm"],
description="Google Drive direct download of big files.",
long_description=get_long_description(),
long_description_content_type="text/markdown",
|
Set requests version to <I> or higher.
|
diff --git a/core/src/main/java/org/cache2k/impl/threading/LimitedPooledExecutor.java b/core/src/main/java/org/cache2k/impl/threading/LimitedPooledExecutor.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/cache2k/impl/threading/LimitedPooledExecutor.java
+++ b/core/src/main/java/org/cache2k/impl/threading/LimitedPooledExecutor.java
@@ -369,7 +369,7 @@ public class LimitedPooledExecutor implements ExecutorService {
* This may have adverse effects, e.g. if a storage on hard disk is
* starting to many requests in parallel. See outer class documentation.
*/
- public int maxThreadCount = Runtime.getRuntime().availableProcessors() - 1;
+ public int maxThreadCount = Runtime.getRuntime().availableProcessors();
/**
* Enables yet untested code. Default false.
|
Fix LimitedPooledExecutor on single processor machine
|
diff --git a/bin/cli.js b/bin/cli.js
index <HASH>..<HASH> 100755
--- a/bin/cli.js
+++ b/bin/cli.js
@@ -13,9 +13,9 @@ var cliPkg = require('../package');
function exit(text) {
if (text instanceof Error) {
- chalk.red(console.error(text.stack));
+ console.error(chalk.red(text.stack));
} else {
- chalk.red(console.error(text));
+ console.error(chalk.red(text));
}
process.exit(1);
}
@@ -186,7 +186,8 @@ function invoke(env) {
commander.parse(process.argv);
Promise.resolve(pending).then(function() {
- commander.help();
+ commander.outputHelp();
+ exit('Unknown command-line options, exiting');
});
}
|
<I> CLI sets exit-code 1 if the command supplied was not parseable (#<I>)
* CLI Sets exit code to 1 if the command wasn't parseable
* Fix color output for errors in the cli
|
diff --git a/grab/grab.py b/grab/grab.py
index <HASH>..<HASH> 100644
--- a/grab/grab.py
+++ b/grab/grab.py
@@ -174,6 +174,7 @@ class Grab(object):
self.reset()
if kwargs:
self.setup(**kwargs)
+ self.clone_counter = 0
def reset(self):
"""
@@ -214,6 +215,7 @@ class Grab(object):
g.response = deepcopy(self.response)
for key in self.clonable_attributes:
setattr(g, key, getattr(self, key))
+ g.clone_counter = self.clone_counter + 1
return g
def setup(self, **kwargs):
|
New attribute: clone_counter
|
diff --git a/salt/grains/fx2.py b/salt/grains/fx2.py
index <HASH>..<HASH> 100644
--- a/salt/grains/fx2.py
+++ b/salt/grains/fx2.py
@@ -24,11 +24,8 @@ GRAINS_CACHE = {}
def __virtual__():
- try:
- if salt.utils.platform.is_proxy() and __opts__['proxy']['proxytype'] == 'fx2':
- return __virtualname__
- except KeyError:
- pass
+ if salt.utils.platform.is_proxy() and 'proxy' in __opts__ and __opts__['proxy'].get('proxytype') == 'fx2':
+ return __virtualname__
return False
diff --git a/salt/grains/marathon.py b/salt/grains/marathon.py
index <HASH>..<HASH> 100644
--- a/salt/grains/marathon.py
+++ b/salt/grains/marathon.py
@@ -14,10 +14,9 @@ __virtualname__ = 'marathon'
def __virtual__():
- if not salt.utils.platform.is_proxy() or 'proxy' not in __opts__:
- return False
- else:
+ if salt.utils.platform.is_proxy() and 'proxy' in __opts__ and __opts__['proxy'].get('proxytype') == 'marathon':
return __virtualname__
+ return False
def kernel():
|
fix proxy virtual checks for marathon and fx2
|
diff --git a/lib/core/seleniumRunner.js b/lib/core/seleniumRunner.js
index <HASH>..<HASH> 100644
--- a/lib/core/seleniumRunner.js
+++ b/lib/core/seleniumRunner.js
@@ -33,7 +33,7 @@ class SeleniumRunner {
this.driver = driver;
}))
.timeout(this.options.timeouts.browserStart,
- new Error(util.format('Failed to start browser in %d seconds.',
+ new UrlLoadError(util.format('Failed to start browser in %d seconds.',
this.options.timeouts.browserStart / 1000)));
}
|
always throw UrlLoadError for errors
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100755
--- a/index.js
+++ b/index.js
@@ -1,10 +1,14 @@
/**
* Created by XadillaX on 2014/8/5.
*/
-require("sugar");
+var _ = {
+ uniq: require("lodash.uniq")
+};
var escapist = require("node-escapist");
var CharBuffer = require("char-buffer");
+var AND_SHARP = /&#([x|X]{1}[\d|a-f|A-F]+?|\d+?);/g;
+
/**
* escape html
* @param html
@@ -24,8 +28,7 @@ exports.unescape = function(html) {
// with `�` or `ꯍ`
// (thanks to mcdong)
- var andSharp = /&#([x|X]{1}[\d|a-f|A-F]+?|\d+?);/g;
- var result = temp.match(andSharp);
+ var result = temp.match(AND_SHARP);
// no match
if(!Array.isArray(result)) {
@@ -33,7 +36,7 @@ exports.unescape = function(html) {
}
// reduce
- temp = result.unique().reduce(function(html, code) {
+ temp = _.uniq(result).reduce(function(html, code) {
var buffer = new CharBuffer();
var charCode = (code[2].toUpperCase() === 'X') ?
|
feat: use lodash to instead of sugar
|
diff --git a/lib/restclient.rb b/lib/restclient.rb
index <HASH>..<HASH> 100644
--- a/lib/restclient.rb
+++ b/lib/restclient.rb
@@ -107,7 +107,7 @@ module RestClient
# @return [Boolean]
#
def self.proxy_set?
- !!(@proxy_set ||= false)
+ @proxy_set ||= false
end
# Setup the log for RestClient calls.
|
Get rid of !! since it's not really adding value.
|
diff --git a/src/update.js b/src/update.js
index <HASH>..<HASH> 100644
--- a/src/update.js
+++ b/src/update.js
@@ -91,6 +91,9 @@ update.updatePo = function(poData, potData) {
po.translations[""][msgid] = pot.translations[""][msgid];
}
else {
+ if (!po.translations[""][msgid].comments) {
+ po.translations[""][msgid].comments = {};
+ }
po.translations[""][msgid].comments.reference = pot.translations[""][msgid].comments.reference;
}
}
|
Avoid crash if the merged po file does not contain references
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.