diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/src/main/org/codehaus/groovy/vmplugin/v7/Selector.java b/src/main/org/codehaus/groovy/vmplugin/v7/Selector.java
index <HASH>..<HASH> 100644
--- a/src/main/org/codehaus/groovy/vmplugin/v7/Selector.java
+++ b/src/main/org/codehaus/groovy/vmplugin/v7/Selector.java
@@ -354,6 +354,7 @@ public abstract class Selector {
mc = ((MetaClassRegistryImpl) GroovySystem.getMetaClassRegistry()).getMetaClass(receiver);
this.cache &= !ClassInfo.getClassInfo(receiver.getClass()).hasPerInstanceMetaClasses();
}
+ mc.initialize();
}
/** | ensure meta class is initialized before doing a call or requesting class members |
diff --git a/src/main/java/org/jdbdt/Log.java b/src/main/java/org/jdbdt/Log.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jdbdt/Log.java
+++ b/src/main/java/org/jdbdt/Log.java
@@ -111,9 +111,9 @@ final class Log {
* @param data Data set.
*/
void write(CallInfo callInfo, DataSet data) {
- Element rootNode = root(),
- dsNode = createNode(rootNode, DATA_SET_TAG);
- write(rootNode, callInfo);
+ Element rootNode = root();
+ write(rootNode, callInfo);
+ Element dsNode = createNode(rootNode, DATA_SET_TAG);
write(dsNode, data.getSource().getMetaData());
write(dsNode, ROWS_TAG, data.getSource().getMetaData().columns(), data.getRows().iterator());
flush(rootNode); | Log: fixed position of <context> node for data set logging |
diff --git a/demo/src/main/java/com/liulishuo/filedownloader/demo/Constant.java b/demo/src/main/java/com/liulishuo/filedownloader/demo/Constant.java
index <HASH>..<HASH> 100644
--- a/demo/src/main/java/com/liulishuo/filedownloader/demo/Constant.java
+++ b/demo/src/main/java/com/liulishuo/filedownloader/demo/Constant.java
@@ -9,8 +9,8 @@ public interface Constant {
"http://www.httpwatch.com/httpgallery/chunked/chunkedimage.aspx?0.04400023248109086",
};
- String LIULISHUO_APK_URL = "http://cdn.llsapp.com/android/LLS-v3.6.2-584-20160808-111006.apk";
- String LIULISHUO_CONTENT_DISPOSITION_FILENAME = "LLS-v3.6.2-584-20160808-111006.apk";
+ String LIULISHUO_APK_URL = "http://cdn.llsapp.com/android/LLS-v4.0-595-20160908-143200.apk";
+ String LIULISHUO_CONTENT_DISPOSITION_FILENAME = "LLS-v4.0-595-20160908-143200.apk";
String[] BIG_FILE_URLS = {
// 5m | demo(Urls): replace the Urls for the single task test |
diff --git a/ucms_site/src/NodeManager.php b/ucms_site/src/NodeManager.php
index <HASH>..<HASH> 100644
--- a/ucms_site/src/NodeManager.php
+++ b/ucms_site/src/NodeManager.php
@@ -294,10 +294,12 @@ class NodeManager
/*
* The right and only working query for this.
*
- SELECT sa.site_id
+ SELECT DISTINCT(sa.site_id)
FROM ucms_site_access sa
+ JOIN ucms_site_node sn ON sn.site_id = sa.site_id
WHERE
sa.uid = 13 -- current user
+ AND sn.
AND sa.role = 1 -- webmaster
AND sa.site_id <> 2 -- node current site
AND NOT EXISTS (
@@ -330,6 +332,9 @@ class NodeManager
->condition('sa.role', Access::ROLE_WEBMASTER)
;
+ $q->join('ucms_site_node', 'sn', 'sn.site_id = sa.site_id');
+ $q->condition('sn.nid', $node->id());
+
// The node might not be attached to any site if it is a global content
if ($node->site_id) {
$q->condition('sa.site_id', $node->site_id, '<>'); | contrib: when cloning a node, site candidates should only be sites where references exist |
diff --git a/lib/terminal-table/import.rb b/lib/terminal-table/import.rb
index <HASH>..<HASH> 100644
--- a/lib/terminal-table/import.rb
+++ b/lib/terminal-table/import.rb
@@ -48,6 +48,6 @@ module Kernel
#
def table headings = [], *rows, &block
- Terminal::Table.new :headings => headings, :rows => rows, &block
+ Terminal::Table.new :headings => headings.to_a, :rows => rows, &block
end
end
\ No newline at end of file | Allowing nil to be passed to table for headings |
diff --git a/lib/grade/grade_item.php b/lib/grade/grade_item.php
index <HASH>..<HASH> 100644
--- a/lib/grade/grade_item.php
+++ b/lib/grade/grade_item.php
@@ -779,24 +779,6 @@ class grade_item extends grade_object {
}
/**
- * Returns an array of values (NOT objects) standardised from the final grades of this grade_item. They are indexed by userid.
- * @return array integers
- */
- function get_standardised_final() {
- $standardised_finals = array();
-
- $final_grades = $this->load_final();
-
- if (!empty($final_grades)) {
- foreach ($final_grades as $userid => $final) {
- $standardised_finals[$userid] = standardise_score($final->gradevalue, $this->grademin, $this->grademax, 0, 1);
- }
- }
-
- return $standardised_finals;
- }
-
- /**
* Returns the grade_category object this grade_item belongs to (if any).
* This category object may be the parent (referenced by categoryid) or the associated category
* (referenced by iteminstance). | MDL-<I> removing obsoleted function, finals now processed only by update_final_grade() |
diff --git a/synchro/synchrotest.py b/synchro/synchrotest.py
index <HASH>..<HASH> 100644
--- a/synchro/synchrotest.py
+++ b/synchro/synchrotest.py
@@ -22,7 +22,6 @@ of a larger test suite.
"""
import sys
-import synchro
import nose
from nose.config import Config
@@ -32,6 +31,7 @@ from nose.plugins.skip import Skip
from nose.plugins.xunit import Xunit
from nose.selector import Selector
+import synchro
from motor.motor_py3_compat import PY3
excluded_modules = [ | Order synchrotest's imports. |
diff --git a/code/Shortcodable.php b/code/Shortcodable.php
index <HASH>..<HASH> 100644
--- a/code/Shortcodable.php
+++ b/code/Shortcodable.php
@@ -24,7 +24,7 @@ class Shortcodable extends Object
if (!singleton($class)->hasMethod('parse_shortcode')) {
user_error("Failed to register \"$class\" with shortcodable. $class must have the method parse_shortcode(). See /shortcodable/README.md", E_USER_ERROR);
}
- ShortcodeParser::get('default')->register($class, array(singleton($class), 'parse_shortcode'));
+ ShortcodeParser::get('default')->register($class, array($class, 'parse_shortcode'));
singleton('ShortcodableParser')->register($class);
}
} | Tweak: Only class name needs to be registered |
diff --git a/tests/Commando/CommandTest.php b/tests/Commando/CommandTest.php
index <HASH>..<HASH> 100755
--- a/tests/Commando/CommandTest.php
+++ b/tests/Commando/CommandTest.php
@@ -152,4 +152,34 @@ class CommandTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(array('a' => 'v1', 'b' => 'v2'), $cmd->getFlagValues());
}
+ /**
+ * Ensure that requirements are resolved correctly
+ */
+ public function testRequirementsOnOptionsValid()
+ {
+ $tokens = array('filename', '-a', 'v1', '-b', 'v2');
+ $cmd = new Command($tokens);
+
+ $cmd->option('b');
+ $cmd->option('a')
+ ->requires('b');
+
+ $this->assertEquals($cmd['a'], 'v1');
+ }
+
+ /**
+ * Test that an exception is thrown when an option isn't set
+ * @expectedException \InvalidArgumentException
+ */
+ public function testRequirementsOnOptionsMissing()
+ {
+ $tokens = array('filename', '-a', 'v1');
+ $cmd = new Command($tokens);
+
+ $cmd->trapErrors(false)
+ ->beepOnError(false);
+ $cmd->option('a')
+ ->requires('b');
+ }
+
}
\ No newline at end of file | Adding tests for new "required" handling to Command class |
diff --git a/sdk/src/main/java/com/wonderpush/sdk/WonderPush.java b/sdk/src/main/java/com/wonderpush/sdk/WonderPush.java
index <HASH>..<HASH> 100644
--- a/sdk/src/main/java/com/wonderpush/sdk/WonderPush.java
+++ b/sdk/src/main/java/com/wonderpush/sdk/WonderPush.java
@@ -91,7 +91,7 @@ public class WonderPush {
protected static final int API_INT = 1; // reset SDK_VERSION when bumping this
protected static final String API_VERSION = "v" + API_INT;
- protected static final String SDK_SHORT_VERSION = "2.4.0"; // reset to .1.0.0 when bumping API_INT
+ protected static final String SDK_SHORT_VERSION = "2.4.1-SNAPSHOT"; // reset to .1.0.0 when bumping API_INT
protected static final String SDK_VERSION = "Android-" + API_INT + "." + SDK_SHORT_VERSION;
private static final String PRODUCTION_API_URL = "https://api.wonderpush.com/" + API_VERSION; | Bump to <I>-SNAPSHOT |
diff --git a/lib/volt/reactive/reactive_value.rb b/lib/volt/reactive/reactive_value.rb
index <HASH>..<HASH> 100644
--- a/lib/volt/reactive/reactive_value.rb
+++ b/lib/volt/reactive/reactive_value.rb
@@ -136,10 +136,6 @@ class ReactiveValue < BasicObject
end
end
end
- #
- # def respond_to?(name, include_private=false)
- # [:event_added, :event_removed].include?(name) || super
- # end
def respond_to_missing?(name, include_private=false)
cur.respond_to?(name)
@@ -428,5 +424,4 @@ class ReactiveManager
def setter!(setter=nil, &block)
@setter = setter || block
end
-
end | Some cleanup
1. No need to have respond_to when respond_to_missing is defined
2. Whitespace
I'll help you better once I get on my machine.
Cheers |
diff --git a/runtime-management/runtime-management-impl/src/main/resources/eval.py b/runtime-management/runtime-management-impl/src/main/resources/eval.py
index <HASH>..<HASH> 100644
--- a/runtime-management/runtime-management-impl/src/main/resources/eval.py
+++ b/runtime-management/runtime-management-impl/src/main/resources/eval.py
@@ -155,10 +155,13 @@ class PythonAgentExecutor(object):
'returnType': return_type}
finally:
self.__enable_standard_io(old_io)
+
+ final_result = json.dumps(final_result)
+
except Exception as e:
final_result = {'exception': str(e)}
- print(json.dumps(final_result))
+ print(final_result)
class AccessAwareDict(dict): | catch any exception which might occur when converting result to json |
diff --git a/client/js/button.js b/client/js/button.js
index <HASH>..<HASH> 100644
--- a/client/js/button.js
+++ b/client/js/button.js
@@ -119,13 +119,6 @@ qq.UploadButton = function(o) {
qq(options.element).removeClass(options.focusClass);
});
- // IE and Opera, unfortunately have 2 tab stops on file input
- // which is unacceptable in our case, disable keyboard access
- if (window.attachEvent) {
- // it is IE or Opera
- input.setAttribute("tabIndex", "-1");
- }
-
return input;
} | feat(a<I>y): allow tab to focus file input
Previously disabled in IE since two tabs are required to
navigate past the file input. I think disabling keyboard
access in IE is a more harmful solution, so I've removed this
condition.
#<I> |
diff --git a/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/CalendarTimer.java b/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/CalendarTimer.java
index <HASH>..<HASH> 100644
--- a/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/CalendarTimer.java
+++ b/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/CalendarTimer.java
@@ -365,4 +365,14 @@ public class CalendarTimer extends TimerImpl {
// no match found
return null;
}
+
+ /**
+ * {@inheritDoc}. For calendar-based timer, the string output also includes its schedule expression value.
+ *
+ * @return a string representation of calendar-based timer
+ */
+ @Override
+ public String toString() {
+ return super.toString() + " " + getScheduleExpression();
+ }
} | WFLY-<I> Need to include the schedule expression value in the toString() output of a calendar-based timer. |
diff --git a/lib/lolcommits/capturer/capture_linux_video.rb b/lib/lolcommits/capturer/capture_linux_video.rb
index <HASH>..<HASH> 100644
--- a/lib/lolcommits/capturer/capture_linux_video.rb
+++ b/lib/lolcommits/capturer/capture_linux_video.rb
@@ -3,7 +3,7 @@
module Lolcommits
class CaptureLinuxVideo < Capturer
def capture
- system_call "ffmpeg -nostats -v quiet -y -f video4linux2 -video_size 640x480 -i #{capture_device_string} -t #{capture_duration} \"#{capture_path}\" > /dev/null"
+ system_call "ffmpeg -nostats -v quiet -y -f video4linux2 -video_size 640x480 -i #{capture_device_string} -t #{capture_duration} -ss #{capture_delay || 0} \"#{capture_path}\" > /dev/null"
end
private | Support delays w/ Linux animated GIFs |
diff --git a/DependencyInjection/BazingaGeocoderExtension.php b/DependencyInjection/BazingaGeocoderExtension.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/BazingaGeocoderExtension.php
+++ b/DependencyInjection/BazingaGeocoderExtension.php
@@ -151,10 +151,6 @@ class BazingaGeocoderExtension extends Extension
$this->addProvider('maxmind', array($maxmindParams['api_key']));
}
- if (isset($config['provider']['cache'])) {
- $params = $config['provider']['cache'];
- }
-
if (isset($config['providers']['cache'])) {
$params = $config['providers']['cache'];
$cache = new Reference($params['adapter']); | [Extension] Remove duplicated cache lines |
diff --git a/lib/crabfarm/live/controller.rb b/lib/crabfarm/live/controller.rb
index <HASH>..<HASH> 100644
--- a/lib/crabfarm/live/controller.rb
+++ b/lib/crabfarm/live/controller.rb
@@ -105,11 +105,17 @@ module Crabfarm
end
def load_web_ui
- Helpers.inject_script @manager.primary_driver, 'https://www.crabtrap.io/selectorgadget_combined.js'
Helpers.inject_style @manager.primary_driver, 'https://www.crabtrap.io/selectorgadget_combined.css'
- Helpers.inject_script @manager.primary_driver, 'https://www.crabtrap.io/tools.js'
Helpers.inject_style @manager.primary_driver, 'https://www.crabtrap.io/tools.css'
+ Helpers.inject_script @manager.primary_driver, 'https://www.crabtrap.io/selectorgadget_combined.js'
+ Helpers.inject_script @manager.primary_driver, 'https://www.crabtrap.io/tools.js'
+ wait_for_injection
+ end
+ def wait_for_injection
+ while @manager.primary_driver.execute_script "return (typeof window.crabfarm === 'undefined');"
+ sleep 1.0
+ end
end
def memento_path(_name) | fix(live.controller): adds wait to script injection so it works with chrome |
diff --git a/app/controllers/user_import_files_controller.rb b/app/controllers/user_import_files_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/user_import_files_controller.rb
+++ b/app/controllers/user_import_files_controller.rb
@@ -57,6 +57,9 @@ class UserImportFilesController < ApplicationController
respond_to do |format|
if @user_import_file.save
+ if @user_import_file.mode == 'import'
+ Resque.enqueue(UserImportFileQueue, @user_import_file.id)
+ end
format.html { redirect_to @user_import_file, :notice => t('controller.successfully_created', :model => t('activerecord.models.user_import_file')) }
format.json { render :json => @user_import_file, :status => :created, :location => @user_import_file }
else | start import when a file is uploaded |
diff --git a/misc/cron/archive.php b/misc/cron/archive.php
index <HASH>..<HASH> 100644
--- a/misc/cron/archive.php
+++ b/misc/cron/archive.php
@@ -110,6 +110,8 @@ class CronArchive
// Since weeks are not used in yearly archives, we make sure that all possible weeks are processed
const DEFAULT_DATE_LAST_WEEKS = 520;
+ const DEFAULT_DATE_LAST_YEARS = 2;
+
// Flag to know when the archive cron is calling the API
const PREPEND_TO_API_REQUEST = '&trigger=archivephp';
@@ -447,7 +449,12 @@ class CronArchive
*/
private function getVisitsRequestUrl($idsite, $period, $lastTimestampWebsiteProcessed = false)
{
- $dateLastMax = $period == 'week' ? self::DEFAULT_DATE_LAST_WEEKS : self::DEFAULT_DATE_LAST;
+ $dateLastMax = self::DEFAULT_DATE_LAST;
+ if($period=='year') {
+ $dateLastMax = self::DEFAULT_DATE_LAST_YEARS;
+ } elseif($period == 'week') {
+ $dateLastMax = self::DEFAULT_DATE_LAST_WEEKS;
+ }
if (empty($lastTimestampWebsiteProcessed)) {
$dateLast = $dateLastMax;
} else { | Trying to make yearly archiving less intense which may help fix the travis failure... |
diff --git a/lib/rest-core/event_source.rb b/lib/rest-core/event_source.rb
index <HASH>..<HASH> 100644
--- a/lib/rest-core/event_source.rb
+++ b/lib/rest-core/event_source.rb
@@ -65,9 +65,10 @@ class RestCore::EventSource < Struct.new(:client, :path, :query, :opts,
else
begin
@onerror.call(error, sock) if @onerror
- onreconnect(error, sock) if closed?
- ensure
- condv.signal # should never deadlock someone
+ onreconnect(error, sock)
+ rescue
+ condv.signal # so we can't be reconnecting, need to try to unblock
+ raise
end
end
self
@@ -78,8 +79,10 @@ class RestCore::EventSource < Struct.new(:client, :path, :query, :opts,
def onreconnect error=nil, sock=nil, &cb
if block_given?
@onreconnect = cb
- elsif @onreconnect && @onreconnect.call(error, sock)
+ elsif closed? && @onreconnect && @onreconnect.call(error, sock)
reconnect
+ else
+ condv.signal # we could be closing, let's try to unblock it
end
self
end | properly signal so `wait' would work properly |
diff --git a/sigal/video.py b/sigal/video.py
index <HASH>..<HASH> 100644
--- a/sigal/video.py
+++ b/sigal/video.py
@@ -63,7 +63,7 @@ def check_subprocess(cmd, source, outname=None):
def video_size(source, converter='ffmpeg'):
"""Return the dimensions of the video."""
res = subprocess.run([converter, '-i', source], stderr=subprocess.PIPE)
- stderr = res.stderr.decode('utf8')
+ stderr = res.stderr.decode('utf8', errors='ignore')
pattern = re.compile(r'Stream.*Video.* ([0-9]+)x([0-9]+)')
match = pattern.search(stderr)
rot_pattern = re.compile(r'rotate\s*:\s*-?(90|270)') | Fix encoding issue with ffmpeg output (fix #<I>) |
diff --git a/packages/react/src/components/FileUploader/FileUploaderButton.js b/packages/react/src/components/FileUploader/FileUploaderButton.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/FileUploader/FileUploaderButton.js
+++ b/packages/react/src/components/FileUploader/FileUploaderButton.js
@@ -79,12 +79,13 @@ function FileUploaderButton({
{/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}
<label
tabIndex={disabled ? -1 : tabIndex || 0}
- aria-disabled={disabled}
className={classes}
onKeyDown={onKeyDown}
htmlFor={inputId}
{...other}>
- <span role={role}>{labelText}</span>
+ <span role={role} aria-disabled={disabled}>
+ {labelText}
+ </span>
</label>
<input
className={`${prefix}--visually-hidden`} | fix(FileUploader): aria disabled placed on button instead of label (#<I>)
* fix(FileUploader): button aria disabled
* fix: htmlfor placement |
diff --git a/example_project/urls.py b/example_project/urls.py
index <HASH>..<HASH> 100644
--- a/example_project/urls.py
+++ b/example_project/urls.py
@@ -4,7 +4,9 @@ from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
- (r'^activity/', include('actstream.urls')),
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
+ (r'^comments/', include('django.contrib.comments.urls')),
+ (r'^accounts/', include('registration.backends.default.urls')),
+ (r'', include('actstream.urls')),
) | activities at base, added comments and accounts |
diff --git a/gosu-core/src/main/java/gw/internal/gosu/parser/FileSystemGosuClassRepository.java b/gosu-core/src/main/java/gw/internal/gosu/parser/FileSystemGosuClassRepository.java
index <HASH>..<HASH> 100644
--- a/gosu-core/src/main/java/gw/internal/gosu/parser/FileSystemGosuClassRepository.java
+++ b/gosu-core/src/main/java/gw/internal/gosu/parser/FileSystemGosuClassRepository.java
@@ -759,7 +759,7 @@ public class FileSystemGosuClassRepository implements IFileSystemGosuClassReposi
if( content == null ) {
Stream<String> lines = null;
try {
- if( _file.isJavaFile() ) {
+ if( _file.isJavaFile() && _classType != ClassType.JavaClass ) {
lines = Files.lines( _file.toJavaFile().toPath() );
}
else {
@@ -779,7 +779,7 @@ public class FileSystemGosuClassRepository implements IFileSystemGosuClassReposi
finally {
lines.close();
}
- _content = new SoftReference<>( content );
+ _content = _classType == ClassType.JavaClass ? new SoftReference<>( null ) : new SoftReference<>(content);
}
return content;
} | Don't cache Java files and always read them through the BufferReader |
diff --git a/test/backend-connection.test.js b/test/backend-connection.test.js
index <HASH>..<HASH> 100644
--- a/test/backend-connection.test.js
+++ b/test/backend-connection.test.js
@@ -301,20 +301,14 @@ suite('Connection, basic features', function() {
callback.takes(Connection.ERROR_GATEWAY_TIMEOUT, null);
message = connection.emitMessage('testRequest', { command: 'foobar' }, callback, {
timeout: 1,
- delay: 1000
+ delay: 10
});
assert.envelopeEqual(message,
createExpectedEnvelope('testRequest', { command: 'foobar' }));
})
- .wait(0.01)
- .next(function() {
- assert.equal(backend.received.length, 1);
- assert.deepEqual(backend.received[0][2], message);
- assert.equal(connection.listeners('inReplyTo:' + message.id).length, 1);
-
- })
- .wait(0.01)
+ .wait(0.05)
.next(function() {
+ assert.equal(backend.received.length, 0);
assert.equal(connection.listeners('inReplyTo:' + message.id).length, 0);
callback.assert();
done(); | test: When the connection is timed out, no message should be sent |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -76,7 +76,7 @@ BaseError.prototype = Object.create(Error.prototype, {
// -------------------------------------------------------------------
function makeError (constructor, super_) {
- if (!super_ || super_ === Error) {
+ if (super_ == null || super_ === Error) {
super_ = BaseError
} else if (typeof super_ !== 'function') {
throw new TypeError('super_ should be a function')
diff --git a/index.spec.js b/index.spec.js
index <HASH>..<HASH> 100644
--- a/index.spec.js
+++ b/index.spec.js
@@ -43,6 +43,15 @@ function splitLines (str) {
// ===================================================================
describe('makeError()', function () {
+ it('throws on invalid arguments', function () {
+ expect(function () {
+ makeError(42)
+ }).to.throw(TypeError)
+ expect(function () {
+ makeError('MyError', 42)
+ }).to.throw(TypeError)
+ })
+
it('creates a new error class', function () {
var constructorCalled | Better UX: throws on invalid arguments. |
diff --git a/robotframework-faker/FakerLibrary/FakerLibrary.py b/robotframework-faker/FakerLibrary/FakerLibrary.py
index <HASH>..<HASH> 100644
--- a/robotframework-faker/FakerLibrary/FakerLibrary.py
+++ b/robotframework-faker/FakerLibrary/FakerLibrary.py
@@ -9,12 +9,14 @@ via FakerLibrary calls in Robot Framework.
class FakerLibrary(object):
- def __init__(self, **kwargs):
+
+ def __new__(cls, *args, **kwargs):
# create our faker
- self._fake = faker.Factory.create(**kwargs)
+ cls._fake = faker.Factory.create(**kwargs)
# set all of the faker's public methods to be our methods
- for method_name, method in self._fake.__dict__.items():
+ for method_name, method in cls._fake.__dict__.items():
if not method_name[0] == '_':
- setattr(self, method_name, method)
+ setattr(cls, method_name, method)
+ | Set up faker methods in __new__ instead of __init__ |
diff --git a/EventListener/LoginListener.php b/EventListener/LoginListener.php
index <HASH>..<HASH> 100755
--- a/EventListener/LoginListener.php
+++ b/EventListener/LoginListener.php
@@ -74,7 +74,7 @@ class LoginListener
public function setLocale(GetResponseEvent $event)
{
// Execute only if the user is logged in.
- if( $this->tokenStorage->getToken() && $this->authorizationChecker->isGranted('IS_AUTHENTICATED_REMEMBERED') ){
+ if( $this->tokenStorage->getToken() && $this->authorizationChecker->isGranted('IS_AUTHENTICATED_REMEMBERED') && $this->tokenStorage->getToken()->getUser() ){
// authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
return; | add the check for the user object, as for the API endpoints there are
no user contexts |
diff --git a/integration_test.go b/integration_test.go
index <HASH>..<HASH> 100644
--- a/integration_test.go
+++ b/integration_test.go
@@ -839,6 +839,25 @@ func TestIntegrationConfirm(t *testing.T) {
}
}
+// Declares a queue with the x-message-ttl extension to exercise integer
+// serialization.
+//
+// Relates to https://github.com/streadway/amqp/issues/60
+//
+func TestDeclareArgsXMessageTTL(t *testing.T) {
+ if conn := integrationConnection(t, "declareTTL"); conn != nil {
+ defer conn.Close()
+
+ ch, _ := conn.Channel()
+ args := Table{"x-message-ttl": int32(9000000)}
+
+ // should not drop the connection
+ if _, err := ch.QueueDeclare("declareWithTTL", false, true, false, false, args); err != nil {
+ t.Fatalf("cannot declare with TTL: got: %v", err)
+ }
+ }
+}
+
// Sets up the topology where rejected messages will be forwarded
// to a fanout exchange, with a single queue bound.
// | Show that int<I> for x-message-ttl arguments works
Declaring with uint<I> for the x-message-ttl argument will cause a
connection reset with rabbitmq-server <I>
Relates to #<I> |
diff --git a/Listener/TranslationListener.php b/Listener/TranslationListener.php
index <HASH>..<HASH> 100644
--- a/Listener/TranslationListener.php
+++ b/Listener/TranslationListener.php
@@ -35,9 +35,9 @@ class TranslationListener extends BaseTranslationListener
*/
public function onKernelRequest(GetResponseEvent $event)
{
- $session = $event->getRequest()->getSession();
- if (null !== $session) {
- $this->setTranslatableLocale($session->getLocale());
+ $request = $event->getRequest();
+ if (null !== $request) {
+ $this->setTranslatableLocale($request->getLocale());
}
}
} | adapted TranslationListener to symfony's locale movement from session to request |
diff --git a/porespy/export/__funcs__.py b/porespy/export/__funcs__.py
index <HASH>..<HASH> 100644
--- a/porespy/export/__funcs__.py
+++ b/porespy/export/__funcs__.py
@@ -54,10 +54,10 @@ def to_vtk(im, path='./voxvtk', divide=False, downsample=False, voxel_size=1, vo
elif downsample == True:
im = spim.interpolation.zoom(im, zoom=0.5, order=0)
bp.imageToVTK(path, cellData={'im': np.ascontiguousarray(im)},
- spacing=(vs, vs, vs))
+ spacing=(2*vs, 2*vs, 2*vs))
else:
bp.imageToVTK(path, cellData={'im': np.ascontiguousarray(im)},
- spacing=(2*vs, 2*vs, 2*vs))
+ spacing=(vs, vs, vs))
def to_palabos(im, filename, solid=0):
r""" | fixed spacing issue in vtk export |
diff --git a/kernel/content/copy.php b/kernel/content/copy.php
index <HASH>..<HASH> 100644
--- a/kernel/content/copy.php
+++ b/kernel/content/copy.php
@@ -145,7 +145,6 @@ function browse( &$Module, &$object )
{
$ignoreNodesSelect[] = $element['node_id'];
$ignoreNodesClick[] = $element['node_id'];
- $ignoreNodesSelect[] = $element['parent_node_id'];
}
$ignoreNodesSelect = array_unique( $ignoreNodesSelect );
$ignoreNodesClick = array_unique( $ignoreNodesClick ); | - Fixed bug: unable to put a copy of object into the same location.
git-svn-id: file:///home/patrick.allaert/svn-git/ezp-repo/ezpublish/trunk@<I> a<I>eee8c-daba-<I>-acae-fa<I>f<I> |
diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/provider/package/pkgutil.rb
+++ b/lib/puppet/provider/package/pkgutil.rb
@@ -37,6 +37,9 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
command = ["-c"]
if hash[:justme]
+ # The --single option speeds up the execution, because it queries
+ # the package managament system for one package only.
+ command << ["--single"]
command << hash[:justme]
end | pkgutil provider: Using the --single option which speeds up execution. |
diff --git a/packages/cozy-client/src/CozyClient.js b/packages/cozy-client/src/CozyClient.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-client/src/CozyClient.js
+++ b/packages/cozy-client/src/CozyClient.js
@@ -278,8 +278,7 @@ export default class CozyClient {
const definitions = pickBy(
mapValues(assocByName, assoc =>
this.queryDocumentAssociation(document, assoc)
- ),
- x => x
+ )
)
const requests = mapValues(definitions, definition => | refactor: pickBy's default predicate is identity |
diff --git a/tarbell/settings.py b/tarbell/settings.py
index <HASH>..<HASH> 100644
--- a/tarbell/settings.py
+++ b/tarbell/settings.py
@@ -51,5 +51,5 @@ class Settings:
Save settings.
"""
with open(self.path, "w") as f:
- self.config["project_templates"] = filter(lambda template: template.get("url"), self.config["project_templates"])
+ self.config["project_templates"] = list(filter(lambda template: template.get("url"), self.config["project_templates"]))
yaml.dump(self.config, f, default_flow_style=False) | Account for `filter` returning an iterable in Py3
Turns out PyYAML doesn't serialize a `filter` iterable so well. |
diff --git a/aws/structure.go b/aws/structure.go
index <HASH>..<HASH> 100644
--- a/aws/structure.go
+++ b/aws/structure.go
@@ -1206,7 +1206,7 @@ func expandESClusterConfig(m map[string]interface{}) *elasticsearch.Elasticsearc
}
if v, ok := m["zone_awareness_count"]; ok {
- config.ZoneAwarenessConfig.AvailabilityZoneCount = aws.Int64(v.(int64))
+ config.ZoneAwarenessConfig = &elasticsearch.ZoneAwarenessConfig{AvailabilityZoneCount: aws.Int64(int64(v.(int)))}
}
return &config | assign a ZoneAwarenessConfig struct to the ZAC parameter with AZ Count |
diff --git a/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java b/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java
+++ b/src/main/java/com/google/cloud/genomics/utils/GenomicsUtils.java
@@ -90,10 +90,14 @@ public class GenomicsUtils {
public static List<CoverageBucket> getCoverageBuckets(String readGroupSetId, GenomicsFactory.OfflineAuth auth)
throws IOException, GeneralSecurityException {
Genomics genomics = auth.getGenomics(auth.getDefaultFactory());
- // Not using a Paginator here because requests of this form return one result per
- // reference name, so therefore many fewer than the default page size.
ListCoverageBucketsResponse response =
genomics.readgroupsets().coveragebuckets().list(readGroupSetId).execute();
+ // Requests of this form return one result per reference name, so therefore many fewer than
+ // the default page size, but verify that the assumption holds true.
+ if(null != response.getNextPageToken()) {
+ throw new IllegalArgumentException("Read group set " + readGroupSetId
+ + " has more Coverage Buckets than the default page size for the CoverageBuckets list operation.");
+ }
return response.getCoverageBuckets();
} | Validate coverage bucket response size assumption. |
diff --git a/lib/html-to-text.js b/lib/html-to-text.js
index <HASH>..<HASH> 100644
--- a/lib/html-to-text.js
+++ b/lib/html-to-text.js
@@ -56,7 +56,7 @@ function filterBody(dom, options) {
if ((splitTag.classes.every(function (val) { return documentClasses.indexOf(val) >= 0 })) &&
(splitTag.ids.every(function (val) { return documentIds.indexOf(val) >= 0 }))) {
- result = elem.children;
+ result = [elem];
return;
}
} | Return the base element rather than the base element's children so that fancy table layouts work as expected. |
diff --git a/src/samples/java/ex/COM_Sample.java b/src/samples/java/ex/COM_Sample.java
index <HASH>..<HASH> 100755
--- a/src/samples/java/ex/COM_Sample.java
+++ b/src/samples/java/ex/COM_Sample.java
@@ -1,5 +1,6 @@
package ex;
+import java.io.ByteArrayOutputStream;
import java.util.HashSet;
import java.util.Set;
@@ -57,6 +58,14 @@ public class COM_Sample {
}
}
+class OS357 extends ByteArrayOutputStream {
+
+ @Override
+ public void close() {
+ // removes throws clause
+ }
+}
+
interface Inf {
void m1(); | add sample of COM where throws clause is removed for #<I> |
diff --git a/docker_daemon/check.py b/docker_daemon/check.py
index <HASH>..<HASH> 100644
--- a/docker_daemon/check.py
+++ b/docker_daemon/check.py
@@ -686,6 +686,8 @@ class DockerDaemon(AgentCheck):
cgroup_stat_file_failures += 1
if cgroup_stat_file_failures >= len(CGROUP_METRICS):
self.warning("Couldn't find the cgroup files. Skipping the CGROUP_METRICS for now.")
+ except IOError as e:
+ self.log.debug("Cannot read cgroup file, container likely raced to finish : %s", e)
else:
stats = self._parse_cgroup_file(stat_file)
if stats: | catch exception when container exits in the middle of a check run |
diff --git a/src/shared/js/ch.Popover.js b/src/shared/js/ch.Popover.js
index <HASH>..<HASH> 100644
--- a/src/shared/js/ch.Popover.js
+++ b/src/shared/js/ch.Popover.js
@@ -401,6 +401,7 @@
timeOut,
events;
+
function hide(event) {
if (event.target !== that._el && event.target !== that.$container[0]) {
that.hide(); | #<I> Move private functions inside the closable scope. |
diff --git a/src/gimpy/graph.py b/src/gimpy/graph.py
index <HASH>..<HASH> 100755
--- a/src/gimpy/graph.py
+++ b/src/gimpy/graph.py
@@ -1138,7 +1138,7 @@ class Graph(object):
neighbor_node.set_attr('depth', -priority)
else:
distance = self.get_node(current).get_attr('distance') + 1
- if (algo == 'UnweightedSPT' or algo == 'BFS' and
+ if ((algo == 'UnweightedSPT' or algo == 'BFS') and
neighbor_node.get_attr('distance') is not None):
return
neighbor_node.set_attr('distance', distance) | Fixing small bug in preflow push |
diff --git a/packages/@ember/-internals/glimmer/tests/integration/custom-modifier-manager-test.js b/packages/@ember/-internals/glimmer/tests/integration/custom-modifier-manager-test.js
index <HASH>..<HASH> 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/custom-modifier-manager-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/custom-modifier-manager-test.js
@@ -178,3 +178,38 @@ moduleFor(
}
}
);
+
+moduleFor(
+ 'Rendering test: non-interactive custom modifiers',
+ class extends RenderingTestCase {
+ getBootOptions() {
+ return { isInteractive: false };
+ }
+
+ [`@test doesn't trigger lifecycle hooks when non-interactive`](assert) {
+ let ModifierClass = setModifierManager(
+ owner => {
+ return new CustomModifierManager(owner);
+ },
+ EmberObject.extend({
+ didInsertElement() {
+ assert.ok(false);
+ },
+ didUpdate() {
+ assert.ok(false);
+ },
+ willDestroyElement() {
+ assert.ok(false);
+ },
+ })
+ );
+
+ this.registerModifier('foo-bar', ModifierClass);
+
+ this.render('<h1 {{foo-bar baz}}>hello world</h1>');
+ runTask(() => this.context.set('baz', 'Hello'));
+
+ this.assertHTML('<h1>hello world</h1>');
+ }
+ }
+); | Add test for non-interactive custom modifier lifecycle hooks
(cherry picked from commit ff<I>cf<I>a<I>c<I>f<I>cef2d<I>d<I>) |
diff --git a/src/marshalers.php b/src/marshalers.php
index <HASH>..<HASH> 100644
--- a/src/marshalers.php
+++ b/src/marshalers.php
@@ -123,7 +123,7 @@ function map($marshaler)
*/
function collection($acc, $marshalers)
{
- return function($data) use ($acc, $marshalers, $skip_null) {
+ return function($data) use ($acc, $marshalers) {
list($get, $has) = $acc;
$marshaled = [];
foreach ($marshalers as $key => $marshaler) { | fixing minor bug in collection marshaler |
diff --git a/src/Renderers/ErrorPopupRenderer.php b/src/Renderers/ErrorPopupRenderer.php
index <HASH>..<HASH> 100644
--- a/src/Renderers/ErrorPopupRenderer.php
+++ b/src/Renderers/ErrorPopupRenderer.php
@@ -45,7 +45,7 @@ class ErrorPopupRenderer
if ($title)
echo "<h3>$title</h3>";
echo "<div>" . ucfirst (ErrorHandler::processMessage ($exception->getMessage ())) . "</div>";
- if (isset ($exception->info)) echo "<div class='__info'>$exception->info</div>";
+ if (!empty ($exception->info)) echo "<div class='__info'>$exception->info</div>";
?>
</div>
<div class="error-location"> | FIX: show error info pane only when text is not empty |
diff --git a/app/models/alchemy/picture.rb b/app/models/alchemy/picture.rb
index <HASH>..<HASH> 100644
--- a/app/models/alchemy/picture.rb
+++ b/app/models/alchemy/picture.rb
@@ -36,7 +36,7 @@ module Alchemy
end
def self.last_upload
- last_picture = Picture.order('created_at DESC').first
+ last_picture = Picture.last
return Picture.scoped unless last_picture
Picture.where(:upload_hash => last_picture.upload_hash)
end | Fix for last_upload scope.
This hopefully fixes an issue with finding the last picture in mysql databases. |
diff --git a/metpy/calc/tests/test_indices.py b/metpy/calc/tests/test_indices.py
index <HASH>..<HASH> 100644
--- a/metpy/calc/tests/test_indices.py
+++ b/metpy/calc/tests/test_indices.py
@@ -13,7 +13,7 @@ from metpy.calc import (bulk_shear, bunkers_storm_motion, mean_pressure_weighted
from metpy.deprecation import MetpyDeprecationWarning
from metpy.io import get_upper_air_data
from metpy.io.upperair import UseSampleData
-from metpy.testing import assert_almost_equal, assert_array_equal
+from metpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
from metpy.units import concatenate, units
warnings.simplefilter('ignore', MetpyDeprecationWarning)
@@ -49,7 +49,7 @@ def test_precipitable_water_bound_error():
-86.5, -88.1]) * units.degC
pw = precipitable_water(dewpoint, pressure)
truth = 89.86955998646951 * units('millimeters')
- assert_array_equal(pw, truth)
+ assert_array_almost_equal(pw, truth)
def test_mean_pressure_weighted(): | Updates precipitable water test to use assert_array_almost_equal to account for machine precision |
diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/cache/OCachePointer.java b/core/src/main/java/com/orientechnologies/orient/core/storage/cache/OCachePointer.java
index <HASH>..<HASH> 100755
--- a/core/src/main/java/com/orientechnologies/orient/core/storage/cache/OCachePointer.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/storage/cache/OCachePointer.java
@@ -247,10 +247,8 @@ public class OCachePointer {
protected void finalize() throws Throwable {
super.finalize();
- if (referrersCount.get() > 0 && buffer != null) {
- OLogManager.instance().error(this, "OCachePointer.finalize: leak");
+ if (referrersCount.get() > 0 && buffer != null)
bufferPool.release(buffer);
- }
}
@Override | leaks debugging "reverted" |
diff --git a/spec/webview-spec.js b/spec/webview-spec.js
index <HASH>..<HASH> 100644
--- a/spec/webview-spec.js
+++ b/spec/webview-spec.js
@@ -524,7 +524,7 @@ describe('<webview> tag', function () {
webview.addEventListener('page-favicon-updated', function (e) {
assert.equal(e.favicons.length, 2)
if (process.platform === 'win32') {
- assert(/^file:\/\/\/[a-zA-Z]:\/favicon.png$/i.test(e.favicons[0]))
+ assert(/^file:\/\/\/[A-Z]:\/favicon.png$/i.test(e.favicons[0]))
} else {
assert.equal(e.favicons[0], 'file:///favicon.png')
} | Smaller regex now that it's case insensitive |
diff --git a/pymc/gp/gp.py b/pymc/gp/gp.py
index <HASH>..<HASH> 100644
--- a/pymc/gp/gp.py
+++ b/pymc/gp/gp.py
@@ -246,7 +246,7 @@ class TP(Latent):
.. math::
- f(X) \sim \mathcal{TP}\left( \mu(X), k(X, X'), \\nu \\right)
+ f(X) \sim \mathcal{TP}\left( \mu(X), k(X, X'), \nu \right)
Parameters | Fixing student-T process doc-string |
diff --git a/module/__init__.py b/module/__init__.py
index <HASH>..<HASH> 100644
--- a/module/__init__.py
+++ b/module/__init__.py
@@ -524,7 +524,9 @@ class Connection(object):
def send_request(self, flags, xcb_parts, xcb_req):
self.invalid()
- return C.xcb_send_request(self._conn, flags, xcb_parts, xcb_req)
+ ret = C.xcb_send_request(self._conn, flags, xcb_parts, xcb_req)
+ self.invalid()
+ return ret
# More backwards compatibility | Always die immediately when a request fails |
diff --git a/lib/epub/publication/fixed_layout.rb b/lib/epub/publication/fixed_layout.rb
index <HASH>..<HASH> 100644
--- a/lib/epub/publication/fixed_layout.rb
+++ b/lib/epub/publication/fixed_layout.rb
@@ -33,21 +33,21 @@ module EPUB
alias_method "#{property}=", "rendition_#{property}="
method_name_base = value.gsub('-', '_')
- method_name = "#{method_name_base}="
- define_method method_name do |new_value|
+ setter_name = "#{method_name_base}="
+ define_method setter_name do |new_value|
new_prop = new_value ? value : values.find {|l| l != value}
__send__ "rendition_#{property}=", new_prop
end
- method_name = "make_#{method_name_base}"
- define_method method_name do
+ maker_name = "make_#{method_name_base}"
+ define_method maker_name do
__send__ "rendition_#{property}=", value
end
destructive_method_name = "#{method_name_base}!"
- alias_method destructive_method_name, method_name
+ alias_method destructive_method_name, maker_name
- method_name = "#{method_name_base}?"
- define_method method_name do
+ predicate_name = "#{method_name_base}?"
+ define_method predicate_name do
__send__("rendition_#{property}") == value
end
end | Modify some variable names for readability |
diff --git a/lib/active_merchant/billing/gateways/authorize_net.rb b/lib/active_merchant/billing/gateways/authorize_net.rb
index <HASH>..<HASH> 100644
--- a/lib/active_merchant/billing/gateways/authorize_net.rb
+++ b/lib/active_merchant/billing/gateways/authorize_net.rb
@@ -340,7 +340,7 @@ module ActiveMerchant #:nodoc:
xml.settingValue("true")
end
end
- if options[:disable_partial_auth] == true
+ if options[:disable_partial_auth]
xml.setting do
xml.settingName("allowPartialAuth")
xml.settingValue("false") | Authorize.net: Truthiness for disable_partial_auth |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,5 +20,6 @@ setup(
],
keywords = 'postgresql database bindings sql',
packages = find_packages(exclude = ['build', 'dist']),
+ package_data = {'': ['README.md', 'requirements.txt']},
install_requires = open("requirements.txt").readlines(),
)
\ No newline at end of file | Including README and requirements.txt with module install |
diff --git a/lib/netsuite/records/base_ref_list.rb b/lib/netsuite/records/base_ref_list.rb
index <HASH>..<HASH> 100644
--- a/lib/netsuite/records/base_ref_list.rb
+++ b/lib/netsuite/records/base_ref_list.rb
@@ -2,31 +2,15 @@
module NetSuite
module Records
- class BaseRefList
- include Support::Fields
+ class BaseRefList < Support::Sublist
include Support::Actions
include Namespaces::PlatformCore
actions :get_select_value
- fields :base_ref
+ sublist :base_ref, RecordRef
- def initialize(attrs = {})
- initialize_from_attributes_hash(attrs)
- end
-
- def base_ref=(refs)
- case refs
- when Hash
- self.base_ref << RecordRef.new(refs)
- when Array
- refs.each { |ref| self.base_ref << RecordRef.new(ref) }
- end
- end
-
- def base_ref
- @base_ref ||= []
- end
+ alias :base_refs :base_ref
end
end | Refactor BaseRefList to use Support::Sublist |
diff --git a/bin/transformTests.js b/bin/transformTests.js
index <HASH>..<HASH> 100755
--- a/bin/transformTests.js
+++ b/bin/transformTests.js
@@ -243,7 +243,7 @@ MockTTM.prototype.ProcessTestFile = function(opts) {
var token = JSON.parse(line);
if (token.constructor !== String) { // cast object to token type
console.assert(defines[token.type] !== undefined, "Incorrect type [" + token.type + "] specified in test file\n");
- token.prototype = token.constructor = defines[token.type];
+ Object.setPrototypeOf(token, defines[token.type].prototype);
}
var s = process.hrtime();
var res;
@@ -367,7 +367,7 @@ MockTTM.prototype.ProcessWikitextFile = function(tokenTransformer, opts) {
var token = JSON.parse(line);
if (token.constructor !== String) { // cast object to token type
console.assert(defines[token.type] !== undefined, "Incorrect type [" + token.type + "] specified in test file\n");
- token.prototype = token.constructor = defines[token.type];
+ Object.setPrototypeOf(token, defines[token.type].prototype);
}
var s = process.hrtime();
var res; | Set the prototype of the token appropriately
It's probably a better idea to reconstruct the token but this will at
least get the desired methods in the chain.
Change-Id: I<I>dcad<I>f6c7df<I>e<I>fcbe<I>a0e<I> |
diff --git a/salt/states/saltmod.py b/salt/states/saltmod.py
index <HASH>..<HASH> 100644
--- a/salt/states/saltmod.py
+++ b/salt/states/saltmod.py
@@ -647,6 +647,16 @@ def runner(name, **kwargs):
'Unable to fire args event due to missing __orchestration_jid__'
)
jid = None
+
+ if __opts__.get('test', False):
+ ret = {
+ 'name': name,
+ 'result': True,
+ 'changes': {},
+ 'comment': "Runner function '{0}' would be executed.".format(name)
+ }
+ return ret
+
out = __salt__['saltutil.runner'](name,
__orchestration_jid__=jid,
__env__=__env__,
@@ -704,6 +714,12 @@ def wheel(name, **kwargs):
'Unable to fire args event due to missing __orchestration_jid__'
)
jid = None
+
+ if __opts__.get('test', False):
+ ret['result'] = True,
+ ret['comment'] = "Wheel function '{0}' would be executed.".format(name)
+ return ret
+
out = __salt__['saltutil.wheel'](name,
__orchestration_jid__=jid,
__env__=__env__, | Allowing test=True to be passed for salt.runner and salt.wheel when used with orchestration |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ import numpy as np
def read(fname):
import codecs
with codecs.open('README.md', 'r', 'utf-8') as f:
- print(f.read())
+ return f.read()
def read_to_rst(fname):
try: | [codecs] to read file |
diff --git a/source/net/fortuna/ical4j/model/property/DtEnd.java b/source/net/fortuna/ical4j/model/property/DtEnd.java
index <HASH>..<HASH> 100644
--- a/source/net/fortuna/ical4j/model/property/DtEnd.java
+++ b/source/net/fortuna/ical4j/model/property/DtEnd.java
@@ -122,6 +122,17 @@ public class DtEnd extends DateProperty {
}
/**
+ * Creates a new instance initialised with the parsed value.
+ * @param value the DTEND value string to parse
+ * @throws ParseException where the specified string is not a valid
+ * DTEND value representation
+ */
+ public DtEnd(final String value) throws ParseException {
+ super(DTEND);
+ setValue(value);
+ }
+
+ /**
* @param aList
* a list of parameters for this component
* @param aValue | Added constructor for consistency with DtStart |
diff --git a/src/Events/Transaction.php b/src/Events/Transaction.php
index <HASH>..<HASH> 100644
--- a/src/Events/Transaction.php
+++ b/src/Events/Transaction.php
@@ -3,7 +3,6 @@
namespace PhilKra\Events;
use PhilKra\Helper\Timer;
-use PhilKra\Helper\DistributedTracing;
/**
* | removed use DistributedTracing in Events\Transaction |
diff --git a/client.go b/client.go
index <HASH>..<HASH> 100644
--- a/client.go
+++ b/client.go
@@ -380,7 +380,7 @@ var (
},
}
- pendingClientMessages = make(chan *clientMessage)
+ pendingClientMessages = make(chan *clientMessage, 128*1024)
)
func acquireClientMessage(request interface{}) *clientMessage { | Buffer client messages pending for release |
diff --git a/src/main/java/de/thetaphi/forbiddenapis/Checker.java b/src/main/java/de/thetaphi/forbiddenapis/Checker.java
index <HASH>..<HASH> 100644
--- a/src/main/java/de/thetaphi/forbiddenapis/Checker.java
+++ b/src/main/java/de/thetaphi/forbiddenapis/Checker.java
@@ -384,10 +384,12 @@ public abstract class Checker implements RelatedClassLookup {
return forbiddenMethods.isEmpty() && forbiddenClasses.isEmpty() && forbiddenFields.isEmpty() && (!internalRuntimeForbidden);
}
+ /** Adds the given annotation class for suppressing errors. */
public final void addSuppressAnnotation(Class<? extends Annotation> anno) {
suppressAnnotations.add(Type.getDescriptor(anno));
}
+ /** Adds suppressing annotation name in binary form (dotted). The class name is not checked. */
public final void addSuppressAnnotation(String annoName) throws ParseException {
final Type type = Type.getObjectType(annoName.replace('.', '/'));
if (type.getSort() != Type.OBJECT) { | Issue #<I>: Add javadocs |
diff --git a/netjsonconfig/backends/openvpn/schema.py b/netjsonconfig/backends/openvpn/schema.py
index <HASH>..<HASH> 100644
--- a/netjsonconfig/backends/openvpn/schema.py
+++ b/netjsonconfig/backends/openvpn/schema.py
@@ -366,6 +366,14 @@ schema = {
"default": "udp",
"options": {"enum_titles": ["UDP", "TCP"]}
},
+ "nobind": {
+ "title": "nobind",
+ "description": "ports are dynamically selected",
+ "type": "boolean",
+ "default": True,
+ "format": "checkbox",
+ "propertyOrder": 4,
+ },
"remote": {
"title": "remote",
"type": "array",
@@ -398,14 +406,6 @@ schema = {
}
}
},
- "nobind": {
- "title": "nobind",
- "description": "ports are dynamically selected",
- "type": "boolean",
- "default": True,
- "format": "checkbox",
- "propertyOrder": 6,
- },
"port": {
"description": "Use specific local port, ignored if nobind is enabled",
}, | [openvpn] Moved nobind option up of few positions |
diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration_spec.rb
+++ b/spec/integration_spec.rb
@@ -170,23 +170,22 @@ describe Rehab do
# an file_provider is anything that responds to "call"
# it should return the contents of the file
-
- it "renders partials" do
+ it "renders partials using a file provider" do
src = <<-EOF
# include my_partial.html
<p>content</p>
EOF
- file = ->(ignore) {
- <<-EOF
+ file = double("File Provider", call: <<-EOF
<p>{{ message }}</p>
EOF
- }
+ )
out = <<-EOF
<p>Hello World!</p>
<p>content</p>
EOF
+ expect( file ).to receive(:call).with('my_partial.html')
expect(template(src, {file_provider: file})).to eq out
end | Make specs better document the file provider contract |
diff --git a/src/pouch.replicate.js b/src/pouch.replicate.js
index <HASH>..<HASH> 100644
--- a/src/pouch.replicate.js
+++ b/src/pouch.replicate.js
@@ -6,7 +6,7 @@
var results = [];
var completed = false;
var pending = 0;
- var last_seq = 0;
+ var last_seq = checkpoint;
var continuous = opts.continuous || false;
var result = {
ok: true,
@@ -104,4 +104,4 @@
return replicateRet;
};
-}).call(this);
\ No newline at end of file
+}).call(this); | initialize last_seq with fetch result |
diff --git a/ruby_event_store/spec/in_memory_repository_spec.rb b/ruby_event_store/spec/in_memory_repository_spec.rb
index <HASH>..<HASH> 100644
--- a/ruby_event_store/spec/in_memory_repository_spec.rb
+++ b/ruby_event_store/spec/in_memory_repository_spec.rb
@@ -5,9 +5,9 @@ module RubyEventStore
RSpec.describe InMemoryRepository do
# There is no way to use in-memory adapter in a
# lock-free, unlimited concurrency way
- let(:test_race_conditions_any) { false }
-
- let(:test_race_conditions_auto) { true }
+ let(:test_race_conditions_any) { false }
+ let(:test_race_conditions_auto) { true }
+ let(:test_expected_version_auto) { true }
it_behaves_like :event_repository, InMemoryRepository
@@ -20,4 +20,4 @@ module RubyEventStore
def additional_limited_concurrency_for_auto_check
end
end
-end
\ No newline at end of file
+end | Missing flag for in-memory repository |
diff --git a/lib/handlers/ReactNative.js b/lib/handlers/ReactNative.js
index <HASH>..<HASH> 100644
--- a/lib/handlers/ReactNative.js
+++ b/lib/handlers/ReactNative.js
@@ -66,6 +66,16 @@ class Handler extends EnhancedEventEmitter
try { this._pc.close(); }
catch (error) {}
}
+
+ remoteClosed()
+ {
+ logger.debug('remoteClosed()');
+
+ this._transportReady = false;
+
+ if (this._transportUpdated)
+ this._transportUpdated = false;
+ }
}
class SendHandler extends Handler | Add missing remoteClosed() method to lib/handlers/ReactNative.js |
diff --git a/mockery/generator.go b/mockery/generator.go
index <HASH>..<HASH> 100644
--- a/mockery/generator.go
+++ b/mockery/generator.go
@@ -249,10 +249,6 @@ func (g *Generator) GeneratePrologueNote(note string) {
}
}
-func (g *Generator) GenerateInterfaceAssertion() {
- g.printf("\nvar _ %s = (*%s)(nil)", g.renderType(g.iface.NamedType), g.mockName())
-}
-
// ErrNotInterface is returned when the given type is not an interface
// type.
var ErrNotInterface = errors.New("expression not an interface")
diff --git a/mockery/walker.go b/mockery/walker.go
index <HASH>..<HASH> 100644
--- a/mockery/walker.go
+++ b/mockery/walker.go
@@ -119,8 +119,6 @@ func (this *GeneratorVisitor) VisitWalk(iface *Interface) error {
return err
}
- gen.GenerateInterfaceAssertion()
-
err = gen.Write(out)
if err != nil {
return err | Remove interface assertion
Fixes #<I> |
diff --git a/resource_aws_ami.go b/resource_aws_ami.go
index <HASH>..<HASH> 100644
--- a/resource_aws_ami.go
+++ b/resource_aws_ami.go
@@ -18,8 +18,8 @@ import (
)
const (
- AWSAMIRetryTimeout = 20 * time.Minute
- AWSAMIDeleteRetryTimeout = 20 * time.Minute
+ AWSAMIRetryTimeout = 40 * time.Minute
+ AWSAMIDeleteRetryTimeout = 90 * time.Minute
AWSAMIRetryDelay = 5 * time.Second
AWSAMIRetryMinTimeout = 3 * time.Second
) | provider/aws: Increase AMI retry timeouts (#<I>) |
diff --git a/lib/active_remote/version.rb b/lib/active_remote/version.rb
index <HASH>..<HASH> 100644
--- a/lib/active_remote/version.rb
+++ b/lib/active_remote/version.rb
@@ -1,3 +1,3 @@
module ActiveRemote
- VERSION = "1.1.4"
+ VERSION = "1.2.0.dev`"
end | Bumped version to <I>.dev so we don't get confused. |
diff --git a/src/Illuminate/View/Concerns/ManagesComponents.php b/src/Illuminate/View/Concerns/ManagesComponents.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/View/Concerns/ManagesComponents.php
+++ b/src/Illuminate/View/Concerns/ManagesComponents.php
@@ -88,7 +88,7 @@ trait ManagesComponents
*/
public function slot($name, $content = null)
{
- if ($content !== null) {
+ if (count(func_get_args()) == 2) {
$this->slots[$this->currentComponent()][$name] = $content;
} else {
if (ob_start()) { | fix an issue with slots when content passed is equal to null (#<I>) |
diff --git a/project/library/CM/FormField/TreeSelect.php b/project/library/CM/FormField/TreeSelect.php
index <HASH>..<HASH> 100755
--- a/project/library/CM/FormField/TreeSelect.php
+++ b/project/library/CM/FormField/TreeSelect.php
@@ -15,7 +15,9 @@ class CM_FormField_TreeSelect extends CM_FormField_Abstract {
}
public function validate($userInput, CM_Response_Abstract $response) {
- //TODO: Validation
+ if (!$this->_tree->findNodeById($userInput)) {
+ throw new CM_Exception_FormFieldValidation('Invalid value');
+ }
return $userInput;
} | t<I>: Validation added |
diff --git a/lib/dm-migrations/version.rb b/lib/dm-migrations/version.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-migrations/version.rb
+++ b/lib/dm-migrations/version.rb
@@ -1,5 +1,5 @@
module DataMapper
class Migration
- VERSION = "0.9.3"
+ VERSION = "0.9.4"
end
end
\ No newline at end of file
diff --git a/lib/migration.rb b/lib/migration.rb
index <HASH>..<HASH> 100644
--- a/lib/migration.rb
+++ b/lib/migration.rb
@@ -1,5 +1,5 @@
require 'rubygems'
-gem 'dm-core', '=0.9.3'
+gem 'dm-core', '=0.9.4'
require 'dm-core'
require 'benchmark'
require File.dirname(__FILE__) + '/sql'
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
@@ -11,7 +11,7 @@ def load_driver(name, default_uri)
lib = "do_#{name}"
begin
- gem lib, '=0.9.3'
+ gem lib, '=0.9.4'
require lib
DataMapper.setup(name, default_uri)
DataMapper::Repository.adapters[:default] = DataMapper::Repository.adapters[name] | Updated Rakefile's CLEAN_GLOBS. Version Bump. |
diff --git a/slave/buildslave/commands/mtn.py b/slave/buildslave/commands/mtn.py
index <HASH>..<HASH> 100644
--- a/slave/buildslave/commands/mtn.py
+++ b/slave/buildslave/commands/mtn.py
@@ -182,4 +182,4 @@ class Monotone(SourceBaseCommand):
d = c.start()
d.addCallback(self._abandonOnFailure)
d.addCallback(_parse)
-
+ return d | Return the deferred from Mtn.parseGotRevision
Without this, any error in parseGotRevision is silently dropped. |
diff --git a/spec/database_rewinder_spec.rb b/spec/database_rewinder_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/database_rewinder_spec.rb
+++ b/spec/database_rewinder_spec.rb
@@ -61,7 +61,7 @@ describe DatabaseRewinder do
context 'Database accepts more than one dots in an object notation(exp: SQLServer)' do
context 'full joined' do
- let(:sql) { 'INSERT INTO server.database.schema.foos ("name") VALUES (?)' }
+ let(:sql) { 'INSERT INTO server.database.schema.foos ("name") VALUES (?)' }
its(:inserted_tables) { should == ['foos'] }
end
context 'missing one' do | Indent :arrow_right: :arrow_right: |
diff --git a/rets/__init__.py b/rets/__init__.py
index <HASH>..<HASH> 100644
--- a/rets/__init__.py
+++ b/rets/__init__.py
@@ -1,7 +1,7 @@
from .session import Session
__title__ = 'rets'
-__version__ = '0.0.8'
+__version__ = '0.0.9'
__author__ = 'REfindly'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016 REfindly' | pushing <I> because of the minor stuff |
diff --git a/src/Message/Response.php b/src/Message/Response.php
index <HASH>..<HASH> 100644
--- a/src/Message/Response.php
+++ b/src/Message/Response.php
@@ -11,6 +11,7 @@
namespace Bee4\Transport\Message;
+use Bee4\Transport\Handle\ExecutionInfos;
use Bee4\Transport\Exception\RuntimeException;
use Bee4\Transport\Message\Request\AbstractRequest;
@@ -29,6 +30,12 @@ class Response extends AbstractMessage
protected $request;
/**
+ * The execution details which helped to build the request
+ * @var ExecutionInfos
+ */
+ protected $infos;
+
+ /**
* HTTP Status code
* @var integer
*/
@@ -70,6 +77,25 @@ class Response extends AbstractMessage
}
/**
+ * Set the execution infos
+ * @param ExecutionInfos $infos
+ * @return Response
+ */
+ public function setExecutionInfos(ExecutionInfos $infos)
+ {
+ $this->infos = $infos;
+ return $this;
+ }
+
+ /**
+ * @return ExecutionInfos
+ */
+ public function getExecutionInfos()
+ {
+ return $this->infos;
+ }
+
+ /**
* @param int $code
* @return Response
*/ | Store executions infos in Response object
Help to access execution data more easily after result. |
diff --git a/lib/reporters/doc.js b/lib/reporters/doc.js
index <HASH>..<HASH> 100644
--- a/lib/reporters/doc.js
+++ b/lib/reporters/doc.js
@@ -49,7 +49,7 @@ function Doc(runner) {
runner.on('pass', function(test){
console.log('%s<dt>%s</dt>', indent(), test.title);
- var code = strip(test.fn.toString());
+ var code = clean(test.fn.toString());
console.log('%s<dd><pre><code>%s</code></pre></dd>', indent(), code);
});
@@ -59,11 +59,19 @@ function Doc(runner) {
}
/**
- * Strip the function definition from `str`.
+ * Strip the function definition from `str`,
+ * and re-indent for pre whitespace.
*/
-function strip(str) {
- return str
- .replace(/^function *\(.*\) *{\s*/, '')
+function clean(str) {
+ str = str
+ .replace(/^function *\(.*\) *{/, '')
.replace(/\s+\}$/, '');
+
+ var spaces = str.match(/^\n?( *)/)[1].length
+ , re = new RegExp('^ {' + spaces + '}', 'gm');
+
+ str = str.replace(re, '');
+
+ return str;
}
\ No newline at end of file | Fixed: strip leading indentation from doc for pre tags |
diff --git a/lib/sensu/api.rb b/lib/sensu/api.rb
index <HASH>..<HASH> 100644
--- a/lib/sensu/api.rb
+++ b/lib/sensu/api.rb
@@ -47,6 +47,7 @@ module Sensu
end
end
on_reactor_run
+ self
end
def start_server | [thin] have bootstrap() return self |
diff --git a/openquake/risk/classical_psha_based.py b/openquake/risk/classical_psha_based.py
index <HASH>..<HASH> 100644
--- a/openquake/risk/classical_psha_based.py
+++ b/openquake/risk/classical_psha_based.py
@@ -190,7 +190,7 @@ def _compute_pes_from_imls(hazard_curve, imls):
:type imls: list
"""
- return array([hazard_curve.ordinate_for(iml) for iml in imls])
+ return hazard_curve.ordinate_for(imls)
def _convert_pes_to_pos(hazard_curve, imls): | using ordinate_for on all imls in a single pass |
diff --git a/lib/Resolver.js b/lib/Resolver.js
index <HASH>..<HASH> 100644
--- a/lib/Resolver.js
+++ b/lib/Resolver.js
@@ -104,6 +104,7 @@ Resolver.prototype.isDirectory = function isDirectory(path) {
var absoluteWinRegExp = /^[A-Z]:[\\\/]/i;
var absoluteNixRegExp = /^\//i;
Resolver.prototype.join = function join(path, request) {
+ if(request == "") return this.normalize(path);
if(absoluteWinRegExp.test(request)) return this.normalize(request.replace(/\//g, "\\"));
if(absoluteNixRegExp.test(request)) return this.normalize(request);
if(path == "/") return this.normalize(path + request); | fixed obsolute / at end |
diff --git a/src/main/com/mongodb/gridfs/GridFSFile.java b/src/main/com/mongodb/gridfs/GridFSFile.java
index <HASH>..<HASH> 100644
--- a/src/main/com/mongodb/gridfs/GridFSFile.java
+++ b/src/main/com/mongodb/gridfs/GridFSFile.java
@@ -90,6 +90,9 @@ public abstract class GridFSFile implements DBObject {
return _uploadDate;
}
+ /**
+ * note: to set aliases, call put( "aliases" , List<String> )
+ */
public List<String> getAliases(){
return (List<String>)_metadata.get( "aliases" );
} | added a comment about aliases |
diff --git a/lib/prompts/rawlist.js b/lib/prompts/rawlist.js
index <HASH>..<HASH> 100644
--- a/lib/prompts/rawlist.js
+++ b/lib/prompts/rawlist.js
@@ -149,15 +149,13 @@ Prompt.prototype.onSubmit = function( input ) {
*/
Prompt.prototype.onKeypress = function( s, key ) {
- var input = this.rl.line.length ? Number(this.rl.line) : 1;
- var index = input - 1;
+ var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0;
if ( this.opt.choices[index] ) {
this.selected = index;
} else {
this.selected = undefined;
}
- this.down().clean(1).render();
- this.write( this.rl.line );
+ this.down().clean(1).render().write( this.rl.line );
}; | reduce length of rawlist onKeypress method |
diff --git a/src/nwmatcher.js b/src/nwmatcher.js
index <HASH>..<HASH> 100644
--- a/src/nwmatcher.js
+++ b/src/nwmatcher.js
@@ -874,7 +874,9 @@ NW.Dom = (function(global) {
if (snap && !snap.isExpired) {
if (snap.Results[selector] &&
snap.Roots[selector] == from) {
- return snap.Results[selector];
+ return callback ?
+ concat(data, snap.Results[selector], callback) :
+ snap.Results[selector];
}
} else {
// temporarily pause caching while we are getting hammered with dom mutations (jdalton)
@@ -898,6 +900,17 @@ NW.Dom = (function(global) {
// this block can be safely removed, it is a speed booster on big pages
// and still maintain the mandatory "document ordered" result set
+ if (simpleSelector.test(selector)) {
+ switch (selector.charAt(0)) {
+ case '.': data = concat(data, byClass(selector.slice(1), from), callback);
+ case '#': data = concat(data, [ byId(selector.slice(1), from) ], callback);
+ default: data = concat(data, byTag(selector, from), callback);
+ }
+ snap.Roots[selector] = from;
+ snap.Results[selector] = data;
+ return data;
+ }
+
// commas separators are treated
// sequentially to maintain order
if (selector.indexOf(',') < 0) { | invoke provided callbacks also when returning cached results, use a faster resolver for simple selectors in client_api |
diff --git a/Entity/Cursus.php b/Entity/Cursus.php
index <HASH>..<HASH> 100644
--- a/Entity/Cursus.php
+++ b/Entity/Cursus.php
@@ -78,6 +78,7 @@ class Cursus
/**
* @ORM\Column(type="json_array", nullable=true)
+ * @Groups({"api"})
*/
protected $details; | [CursusBundle] Add details to serialization |
diff --git a/lib/alchemy/mount_point.rb b/lib/alchemy/mount_point.rb
index <HASH>..<HASH> 100644
--- a/lib/alchemy/mount_point.rb
+++ b/lib/alchemy/mount_point.rb
@@ -1,10 +1,16 @@
module Alchemy
# Returns alchemys mount point in current rails app.
- def self.mount_point
+ # Pass false to not return a leading slash on empty mount point.
+ def self.mount_point(remove_leading_slash_if_blank = true)
alchemy_routes = Rails.application.routes.named_routes[:alchemy]
raise "Alchemy not mounted! Please mount Alchemy::Engine in your config/routes.rb file." if alchemy_routes.nil?
- alchemy_routes.path.spec.to_s.gsub(/^\/$/, '')
+ mount_point = alchemy_routes.path.spec.to_s
+ if remove_leading_slash_if_blank && mount_point == "/"
+ mount_point.gsub(/^\/$/, '')
+ else
+ mount_point
+ end
end
-end
\ No newline at end of file
+end | Adding remove_leading_slash_if_blank option to Alchemy.mount_point. |
diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php
index <HASH>..<HASH> 100755
--- a/scripts/update/Updater.php
+++ b/scripts/update/Updater.php
@@ -244,6 +244,17 @@ class Updater extends \common_ext_ExtensionUpdater
$this->setVersion('10.3.0');
}
- $this->skip('10.3.0', '10.5.3');
+ $this->skip('10.3.0', '10.5.2');
+
+ if ($this->isVersion('10.5.2')) {
+ $ltiUserService = $this->getServiceManager()->get(LtiUserService::SERVICE_ID);
+
+ if ($ltiUserService->hasOption(LtiUserService::OPTION_FACTORY_LTI_USER)) {
+ $ltiUserService->setOption(LtiUserService::OPTION_FACTORY_LTI_USER, LtiUserFactoryService::SERVICE_ID);
+ $this->getServiceManager()->register(LtiUserService::SERVICE_ID, $ltiUserService);
+ }
+ $this->setVersion('10.5.3');
+ }
+
}
} | Added re-setting the config in updater. |
diff --git a/raiden/ui/cli.py b/raiden/ui/cli.py
index <HASH>..<HASH> 100644
--- a/raiden/ui/cli.py
+++ b/raiden/ui/cli.py
@@ -175,10 +175,7 @@ OPTIONS = [
),
click.option(
'--console',
- help=(
- 'Start with or without the command line interface. Default is to '
- 'start with the CLI disabled'
- ),
+ help='Start the interactive raiden console',
is_flag=True
),
click.option(
@@ -555,7 +552,7 @@ def version(short, **kwargs):
@click.option(
'--debug',
is_flag=True,
- help='Drop into pdb on errors (default: False).'
+ help='Drop into pdb on errors.'
)
@click.pass_context
def smoketest(ctx, debug, **kwargs): | Better help text for some args |
diff --git a/tests/spec/LoadQueueSpec.js b/tests/spec/LoadQueueSpec.js
index <HASH>..<HASH> 100644
--- a/tests/spec/LoadQueueSpec.js
+++ b/tests/spec/LoadQueueSpec.js
@@ -402,4 +402,27 @@ describe("PreloadJS.LoadQueue", function () {
});
});
+ it("stopOnError should suppress events", function (done) {
+ var _this = this;
+
+ var func = {
+ complete: function () {
+
+ }
+ };
+
+ spyOn(func, 'complete');
+
+ setTimeout(function () {
+ expect(func.complete).not.toHaveBeenCalled();
+ done();
+ }, 750);
+
+ this.queue.addEventListener("complete", func.complete);
+ this.queue.stopOnError = true;
+ this.queue.setMaxConnections(2);
+ this.queue.loadManifest(['static/manifest.json', "FileWill404.html", "static/grant.xml", "static/grant.json"], true);
+
+ });
+
}); | Added test for stopOnError |
diff --git a/lojix/text_model/src/main/com/thesett/text/impl/model/TextTableImpl.java b/lojix/text_model/src/main/com/thesett/text/impl/model/TextTableImpl.java
index <HASH>..<HASH> 100644
--- a/lojix/text_model/src/main/com/thesett/text/impl/model/TextTableImpl.java
+++ b/lojix/text_model/src/main/com/thesett/text/impl/model/TextTableImpl.java
@@ -174,7 +174,9 @@ public class TextTableImpl implements TextTableModel
/** {@inheritDoc} */
public int getMaxColumnSize(int col)
{
- return maxColumnSizes.get(col);
+ Integer result = maxColumnSizes.get(col);
+
+ return (result == null) ? 0 : result;
}
/** {@inheritDoc} */
@@ -228,7 +230,7 @@ public class TextTableImpl implements TextTableModel
/** {@inheritDoc} */
public Map<String, String> withCellLabels()
{
- return null;
+ return new CellLabelView();
}
/** | Returning zero fo max size of uninitialized columns. |
diff --git a/src/NafIndex.js b/src/NafIndex.js
index <HASH>..<HASH> 100644
--- a/src/NafIndex.js
+++ b/src/NafIndex.js
@@ -14,7 +14,7 @@ naf.options = options;
naf.utils = utils;
naf.log = new NafLogger();
naf.schemas = new Schemas();
-naf.version = "0.6.1";
+naf.version = "0.7.1";
naf.adapters = new AdapterFactory();
var entities = new NetworkEntities(); | Update NafIndex.js |
diff --git a/packages/styled-components/src/utils/classNameUsageCheckInjector.js b/packages/styled-components/src/utils/classNameUsageCheckInjector.js
index <HASH>..<HASH> 100644
--- a/packages/styled-components/src/utils/classNameUsageCheckInjector.js
+++ b/packages/styled-components/src/utils/classNameUsageCheckInjector.js
@@ -28,7 +28,7 @@ export default (target: Object) => {
didWarnAboutClassNameUsage.add(forwardTarget);
const classNames = elementClassName
- .replace(/ +/g, ' ')
+ .replace(/\s+/g, ' ')
.trim()
.split(' ');
// eslint-disable-next-line react/no-find-dom-node | #<I> forgot to replace \n to '' in className (#<I>) |
diff --git a/source/internals/tasks.js b/source/internals/tasks.js
index <HASH>..<HASH> 100644
--- a/source/internals/tasks.js
+++ b/source/internals/tasks.js
@@ -51,18 +51,23 @@ const tasks = {
},
yarnCacheClean: {
name: 'yarn cache clean (if yarn is installed)',
- command: 'yarn cache clean || true',
+ command: 'test -f yarn.lock && yarn cache clean || true',
args: []
},
yarnInstall: {
name: 'yarn install (if yarn is installed)',
- command: 'yarn install || true',
+ command: 'test -f yarn.lock && yarn install || true',
args: []
},
npmCacheVerify: {
name: 'npm cache verify',
command: 'npm',
args: ['cache', 'verify']
+ },
+ npmInstall: {
+ name: 'npm ci',
+ command: 'package-lock.json && npm ci || true',
+ args: []
}
};
@@ -74,7 +79,8 @@ const autoTasks = [
tasks.wipeTempCaches,
tasks.wipeNodeModules,
tasks.yarnCacheClean,
- tasks.npmCacheVerify
+ tasks.npmCacheVerify,
+ tasks.npmInstall
];
module.exports = { | Update tasks.js
Added `npm ci` task and respect yarn |
diff --git a/scripts/install.js b/scripts/install.js
index <HASH>..<HASH> 100755
--- a/scripts/install.js
+++ b/scripts/install.js
@@ -165,6 +165,7 @@ if (process.env.SENTRYCLI_LOCAL_CDNURL) {
const contents = fs.readFileSync(path.join(__dirname, '../js/__mocks__/sentry-cli'));
response.writeHead(200, {
'Content-Type': 'application/octet-stream',
+ 'Content-Encoding': 'gzip',
'Content-Length': String(contents.byteLength),
});
response.end(contents); | fix: Add gzip header to mocked CDN server |
diff --git a/kubespawner/reflector.py b/kubespawner/reflector.py
index <HASH>..<HASH> 100644
--- a/kubespawner/reflector.py
+++ b/kubespawner/reflector.py
@@ -158,12 +158,7 @@ class ResourceReflector(LoggingConfigurable):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
- # Load kubernetes config here, since this is a Singleton and
- # so this __init__ will be run way before anything else gets run.
- try:
- config.load_incluster_config()
- except config.ConfigException:
- config.load_kube_config()
+ # client configuration for kubernetes has already taken place
self.api = shared_client(self.api_group_name)
# FIXME: Protect against malicious labels? | Move global kubernetes client config logic to spawner.py
Previously reflector.py was the first to call self.api = shared_client
that is not the case any longer, spawner.py calls it just before
kicking off reflector.py code. In my opinion, putting the global
config logic in spawner.py is more intuitive and clear than
in reflector.py, especially with new traitlet config options set
on the spawner.KubeSpawner object. |
diff --git a/lib/podio/models/contract.rb b/lib/podio/models/contract.rb
index <HASH>..<HASH> 100644
--- a/lib/podio/models/contract.rb
+++ b/lib/podio/models/contract.rb
@@ -19,6 +19,8 @@ class Podio::Contract < ActivePodio::Base
property :next_period_end, :datetime, :convert_timezone => false
property :invoice_interval, :integer
property :invoicing_mode, :string
+ property :ended_reason, :string
+ property :ended_comment, :string
has_one :org, :class => 'Organization'
has_one :user, :class => 'User' | Added ended info properties to Contract model |
diff --git a/cmd/ls.go b/cmd/ls.go
index <HASH>..<HASH> 100644
--- a/cmd/ls.go
+++ b/cmd/ls.go
@@ -16,7 +16,7 @@ func init() {
Name: "ls",
ArgsUsage: "[cpath]",
Usage: "Explore all objects your account has access to",
- Category: "CONTEXT",
+ Category: "SECRETS",
Flags: []cli.Flag{
orgFlag("Use this organization.", false),
projectFlag("Use this project.", false), | Change section of help that ls displays under |
diff --git a/lib/scss_lint/linter.rb b/lib/scss_lint/linter.rb
index <HASH>..<HASH> 100644
--- a/lib/scss_lint/linter.rb
+++ b/lib/scss_lint/linter.rb
@@ -68,7 +68,7 @@ module SCSSLint
actual_line = source_position.line - 1
actual_offset = source_position.offset + offset - 1
- engine.lines[actual_line][actual_offset]
+ engine.lines.size > actual_line && engine.lines[actual_line][actual_offset]
end
# Extracts the original source code given a range. | Harden #character_at against invalid source ranges |
diff --git a/ui/Component.js b/ui/Component.js
index <HASH>..<HASH> 100644
--- a/ui/Component.js
+++ b/ui/Component.js
@@ -464,10 +464,13 @@ Component.Prototype = function ComponentPrototype() {
var needRerender = this.shouldRerender(newProps, this.getState());
this.willReceiveProps(newProps);
this._setProps(newProps);
- this.didReceiveProps();
if (needRerender) {
this.rerender();
}
+ // Important to call this after rerender, so within the hook you can interact
+ // with the updated DOM. However we still observe that sometimes the DOM is
+ // not ready at that point.
+ this.didReceiveProps();
};
/** | Call didReceiveProps after the rerender. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,6 @@ setup(name=packageName,
packages=find_packages() + ['twisted.plugins'],
test_suite=packageName + ".test",
- setup_requires=['tox'],
cmdclass={'test': Tox},
zip_safe=True, | setup_requires + coffee shop wifi == bad |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.