diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
---|---|
diff --git a/cairo/surface.go b/cairo/surface.go
index <HASH>..<HASH> 100644
--- a/cairo/surface.go
+++ b/cairo/surface.go
@@ -41,7 +41,7 @@ func NewSurfaceFromPNG(fileName string) (*Surface, error) {
// CreateImageSurfaceForData is a wrapper around cairo_image_surface_create_for_data().
func CreateImageSurfaceForData(data []byte, format Format, width, height, stride int) (*Surface, error) {
- surfaceNative := C.cairo_image_surface_create_for_data((*C.guchar)(unsafe.Pointer(&data[0])),
+ surfaceNative := C.cairo_image_surface_create_for_data((*C.uchar)(unsafe.Pointer(&data[0])),
C.cairo_format_t(format), C.int(width), C.int(height), C.int(stride))
status := Status(C.cairo_surface_status(surfaceNative))
|
change *C.guchar to *C.uchar for compatibility with Go <I> or earlier - tnx @founderio for the suggestion
|
diff --git a/lib/travis/model/build/config/dist.rb b/lib/travis/model/build/config/dist.rb
index <HASH>..<HASH> 100644
--- a/lib/travis/model/build/config/dist.rb
+++ b/lib/travis/model/build/config/dist.rb
@@ -20,10 +20,17 @@ class Build
end
def run
+ return config unless config_hashy?
+ return config if config.key?(:dist) || config.key?('dist')
+
config.dup.tap do |c|
- return c if c.key?(:dist) || c.key?('dist')
c.merge!(dist: dist_for_config)
- c.fetch(:matrix, {}).fetch(:include, []).each do |inc|
+
+ matrix = c.fetch(:matrix, {})
+ return c unless matrix.respond_to?(:fetch)
+
+ matrix.fetch(:include, []).each do |inc|
+ next unless inc.respond_to?(:key)
next if inc.key?(:dist) || inc.key?('dist')
inc.merge!(dist: dist_for_config(inc))
end
@@ -32,6 +39,10 @@ class Build
private
+ def config_hashy?
+ %w(key? dup merge! fetch).all? { |m| config.respond_to?(m) }
+ end
+
def dist_for_config(h = config)
return DIST_LANGUAGE_MAP[h[:language]] if
DIST_LANGUAGE_MAP.key?(h[:language])
|
Guard against bogus config and matrix values in dist normalization
|
diff --git a/nonebot/message.py b/nonebot/message.py
index <HASH>..<HASH> 100644
--- a/nonebot/message.py
+++ b/nonebot/message.py
@@ -80,16 +80,18 @@ async def handle_message(bot: NoneBot, event: CQEvent) -> None:
def _check_at_me(bot: NoneBot, event: CQEvent) -> None:
+ def is_at_me(seg):
+ return seg.type == 'at' and seg.data['qq'] == event.self_id
+
if event.detail_type == 'private':
event['to_me'] = True
else:
# group or discuss
event['to_me'] = False
- at_me_seg = MessageSegment.at(event.self_id)
# check the first segment
first_msg_seg = event.message[0]
- if first_msg_seg == at_me_seg:
+ if is_at_me(first_msg_seg):
event['to_me'] = True
del event.message[0]
@@ -103,7 +105,7 @@ def _check_at_me(bot: NoneBot, event: CQEvent) -> None:
i -= 1
last_msg_seg = event.message[i]
- if last_msg_seg == at_me_seg:
+ if is_at_me(last_msg_seg):
event['to_me'] = True
del event.message[i:]
|
fix check_at_me on node-onebot
|
diff --git a/moco-core/src/main/java/com/github/dreamhead/moco/extractor/FormRequestExtractor.java b/moco-core/src/main/java/com/github/dreamhead/moco/extractor/FormRequestExtractor.java
index <HASH>..<HASH> 100644
--- a/moco-core/src/main/java/com/github/dreamhead/moco/extractor/FormRequestExtractor.java
+++ b/moco-core/src/main/java/com/github/dreamhead/moco/extractor/FormRequestExtractor.java
@@ -6,8 +6,6 @@ import com.google.common.collect.ImmutableMap;
import java.util.Optional;
-import static java.util.Optional.empty;
-
public final class FormRequestExtractor extends HttpRequestExtractor<String> {
private final FormsRequestExtractor extractor = new FormsRequestExtractor();
private final String key;
@@ -19,10 +17,6 @@ public final class FormRequestExtractor extends HttpRequestExtractor<String> {
@Override
protected Optional<String> doExtract(final HttpRequest request) {
Optional<ImmutableMap<String, String>> forms = extractor.extract(request);
- if (forms.isPresent()) {
- return Optional.ofNullable(forms.get().get(key));
- }
-
- return empty();
+ return forms.map(formValues -> formValues.get(key));
}
}
|
applied optional map in form request extractor
|
diff --git a/src/DependencyFactory.php b/src/DependencyFactory.php
index <HASH>..<HASH> 100644
--- a/src/DependencyFactory.php
+++ b/src/DependencyFactory.php
@@ -91,7 +91,7 @@ final class DependencyFactory implements ProviderInterface
public function get()
{
// is singleton ?
- if ($this->instance) {
+ if($this->instance !== null) {
return $this->instance;
}
// constructor injection
|
[#<I>] explicit condition
|
diff --git a/v1/backends/redis/goredis.go b/v1/backends/redis/goredis.go
index <HASH>..<HASH> 100644
--- a/v1/backends/redis/goredis.go
+++ b/v1/backends/redis/goredis.go
@@ -3,10 +3,12 @@ package redis
import (
"bytes"
"encoding/json"
- "github.com/go-redis/redis"
+ "strings"
"sync"
"time"
+ "github.com/go-redis/redis"
+
"github.com/RichardKnop/machinery/v1/backends/iface"
"github.com/RichardKnop/machinery/v1/common"
"github.com/RichardKnop/machinery/v1/config"
@@ -33,10 +35,19 @@ func NewGR(cnf *config.Config, addrs []string, db int) iface.Backend {
b := &BackendGR{
Backend: common.NewBackend(cnf),
}
+ parts := strings.Split(addrs[0], "@")
+ if len(parts) == 2 {
+ // with passwrod
+ b.password = parts[0]
+ addrs[0] = parts[1]
+ }
+
ropt := &redis.UniversalOptions{
- Addrs: addrs,
- DB: db,
+ Addrs: addrs,
+ DB: db,
+ Password: b.password,
}
+
b.rclient = redis.NewUniversalClient(ropt)
return b
}
|
Feat: Support redis cluster with password
|
diff --git a/stdeb/util.py b/stdeb/util.py
index <HASH>..<HASH> 100644
--- a/stdeb/util.py
+++ b/stdeb/util.py
@@ -197,10 +197,10 @@ def get_deb_depends_from_setuptools_requires(requirements):
gooddebs |= (debs)
else:
log.info("I found Debian packages \"%s\" which provides "
- "Python package \"%s\", version \"%s\", which "
+ "Python package \"%s\" which "
"does not satisfy our version requirements: "
"\"%s\" -- ignoring."
- % (', '.join(debs), req.project_name, ver, req))
+ % (', '.join(debs), req.project_name, req))
if not gooddebs:
log.warn("I found no Debian package which provides the required "
"Python package \"%s\" with version requirements "
|
fix a crash with an undefined variable 'ver' (from Brett)
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -517,6 +517,7 @@ testCM("scrollSnap", function(cm) {
});
testCM("scrollIntoView", function(cm) {
+ if (phantom) return;
var outer = cm.getWrapperElement().getBoundingClientRect();
function test(line, ch) {
var pos = Pos(line, ch);
|
Another test that fails mysteriously on Travis' Phantom
(but not on my local one, or in a real browser)
|
diff --git a/packages/lib/PubSub.js b/packages/lib/PubSub.js
index <HASH>..<HASH> 100644
--- a/packages/lib/PubSub.js
+++ b/packages/lib/PubSub.js
@@ -8,7 +8,7 @@ exports = Class(function() {
var anyArgs = [signal].concat(args),
subs = this._subscribers.__any.slice(0);
for(var i = 0, sub; sub = subs[i]; ++i) {
- sub.apply(ctx, args);
+ sub.apply(ctx, anyArgs);
}
}
|
fix publish on __any signal to pass the signal name as the first argument
|
diff --git a/ezp/Content/FieldType/Image/AliasCollection.php b/ezp/Content/FieldType/Image/AliasCollection.php
index <HASH>..<HASH> 100644
--- a/ezp/Content/FieldType/Image/AliasCollection.php
+++ b/ezp/Content/FieldType/Image/AliasCollection.php
@@ -130,6 +130,7 @@ class AliasCollection extends TypeCollection
{
$alias = $this->imageManager->createOriginalAlias( $imageInfo, $originalImageInfo->getBasename() );
$alias->alternativeText = $this->imageValue->alternativeText;
+ $this->imageValue->originalFilename = $originalImageInfo->getBasename();
$this->exchangeArray( array( 'original' => $alias ) );
}
|
FieldType\Image\ImageCollection : original file name wasn't updated
|
diff --git a/lib/memcached/memcached.rb b/lib/memcached/memcached.rb
index <HASH>..<HASH> 100644
--- a/lib/memcached/memcached.rb
+++ b/lib/memcached/memcached.rb
@@ -1,4 +1,3 @@
-
=begin rdoc
The Memcached client class.
=end
@@ -44,6 +43,7 @@ class Memcached
Memcached::Failure,
Memcached::MemoryAllocationFailure,
Memcached::ReadFailure,
+ Memcached::ServerEnd,
Memcached::ServerError,
Memcached::SystemError,
Memcached::UnknownReadFailure,
|
Added Memcached::ServerEnd to the list of exceptions to retry
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -168,6 +168,8 @@ Linter.prototype.parseOpts = function (opts) {
configFile.parser = packageOpts.parser
var tmpFilename = path.join(os.tmpdir(), '.eslintrc-' + packageOpts.parser)
fs.writeFileSync(tmpFilename, JSON.stringify(configFile))
+
+ opts._config = opts._config || {} // default _config property if not present
opts._config.configFile = tmpFilename
}
}
|
Forgive not having _config property on opts
|
diff --git a/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java b/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java
index <HASH>..<HASH> 100644
--- a/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java
+++ b/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java
@@ -1937,13 +1937,18 @@ public final class MediaDriver implements AutoCloseable
countersValuesBuffer(createCountersValuesBuffer(cncByteBuffer, cncMetaDataBuffer));
}
- EpochClock counterEpochClock = () -> 0;
- long freeToReuseTimeoutMs = 0;
+ final EpochClock counterEpochClock;
+ final long freeToReuseTimeoutMs;
if (counterFreeToReuseTimeoutNs > 0)
{
counterEpochClock = epochClock;
freeToReuseTimeoutMs = Math.min(TimeUnit.NANOSECONDS.toMillis(counterFreeToReuseTimeoutNs), 1);
}
+ else
+ {
+ counterEpochClock = () -> 0;
+ freeToReuseTimeoutMs = 0;
+ }
final UnsafeBuffer metaDataBuffer = countersMetaDataBuffer();
final UnsafeBuffer valuesBuffer = countersValuesBuffer();
|
[Java] Avoid allocating lambda unless required.
|
diff --git a/lib/pass.js b/lib/pass.js
index <HASH>..<HASH> 100644
--- a/lib/pass.js
+++ b/lib/pass.js
@@ -32,8 +32,8 @@ var REQUIRED_IMAGES = [ "icon", "logo" ];
// Create a new pass.
//
-// tempplate - The template
-// fields - Pass fields (description, serialNumber, logoText)
+// template - The template
+// fields - Pass fields (description, serialNumber, logoText)
function Pass(template, fields, images) {
this.template = template;
this.fields = cloneObject(fields);
|
fixed a typo in pass.js
|
diff --git a/tests/framework/validators/DateValidatorTest.php b/tests/framework/validators/DateValidatorTest.php
index <HASH>..<HASH> 100644
--- a/tests/framework/validators/DateValidatorTest.php
+++ b/tests/framework/validators/DateValidatorTest.php
@@ -303,6 +303,7 @@ class DateValidatorTest extends TestCase
// prepare data for specific ICU version, see https://github.com/yiisoft/yii2/issues/15140
switch (true) {
case (version_compare(INTL_ICU_VERSION, '57.1', '>=')):
+ case (INTL_ICU_VERSION === '55.1'):
$enGB_dateTime_valid = '31/05/2017, 12:30';
$enGB_dateTime_invalid = '05/31/2017, 12:30';
$deDE_dateTime_valid = '31.05.2017, 12:30';
|
Fixed INTL version tests adaptation
Checked on my Ubuntu <I> LTS
|
diff --git a/Joomla/Sniffs/Classes/InstantiateNewClassesSniff.php b/Joomla/Sniffs/Classes/InstantiateNewClassesSniff.php
index <HASH>..<HASH> 100644
--- a/Joomla/Sniffs/Classes/InstantiateNewClassesSniff.php
+++ b/Joomla/Sniffs/Classes/InstantiateNewClassesSniff.php
@@ -14,6 +14,14 @@
*/
class Joomla_Sniffs_Classes_InstantiateNewClassesSniff implements PHP_CodeSniffer_Sniff
{
+ /**
+ * If true, short Array Syntax for php 5.4+ will be allow for Instantiating New Classes if they are found in the code.
+ * this should be removed when all Joomla projects no longer need to support php 5.3
+ *
+ * @var boolean
+ */
+ public shortArraySyntax = false;
+
/**
* Registers the token types that this sniff wishes to listen to.
*
@@ -90,6 +98,17 @@ class Joomla_Sniffs_Classes_InstantiateNewClassesSniff implements PHP_CodeSniffe
case T_WHITESPACE :
break;
+
+ case T_OPEN_SHORT_ARRAY :
+ if (shortArraySyntax === true)
+ {
+ if ($started === true)
+ {
+ $valid = true;
+ $running = false;
+ }
+ }
+ break;
}
$cnt++;
|
add conditionally controlled support for Short Array Syntax
Provides a method to allow Short Array Syntax for select projects that don't support php <I>
This change should be removed when all Joomla projects no longer need to support php <I> and the token `T_OPEN_SHORT_ARRAY` should be incorporated with the standard `T_ARRAY` case
|
diff --git a/includes/object-cache.php b/includes/object-cache.php
index <HASH>..<HASH> 100644
--- a/includes/object-cache.php
+++ b/includes/object-cache.php
@@ -627,15 +627,19 @@ class WP_Object_Cache {
if ( defined( 'WP_REDIS_SHARDS' ) ) {
$servers = WP_REDIS_SHARDS;
+ $parameters['shards'] = $servers;
} elseif ( defined( 'WP_REDIS_SENTINEL' ) ) {
$servers = WP_REDIS_SERVERS;
+ $parameters['servers'] = $servers;
$options['replication'] = 'sentinel';
$options['service'] = WP_REDIS_SENTINEL;
} elseif ( defined( 'WP_REDIS_SERVERS' ) ) {
$servers = WP_REDIS_SERVERS;
+ $parameters['servers'] = $servers;
$options['replication'] = true;
} elseif ( defined( 'WP_REDIS_CLUSTER' ) ) {
$servers = WP_REDIS_CLUSTER;
+ $parameters['cluster'] = $servers;
$options['cluster'] = 'redis';
}
|
add servers to diagnostics for settings display
|
diff --git a/dev/com.ibm.ws.logging.json_fat/fat/src/com/ibm/ws/logging/json/fat/JsonConfigTest.java b/dev/com.ibm.ws.logging.json_fat/fat/src/com/ibm/ws/logging/json/fat/JsonConfigTest.java
index <HASH>..<HASH> 100644
--- a/dev/com.ibm.ws.logging.json_fat/fat/src/com/ibm/ws/logging/json/fat/JsonConfigTest.java
+++ b/dev/com.ibm.ws.logging.json_fat/fat/src/com/ibm/ws/logging/json/fat/JsonConfigTest.java
@@ -323,7 +323,6 @@ public class JsonConfigTest {
}
private void runApplication(RemoteFile consoleLogFile) throws Exception {
- server.setMarkToEndOfLog();
server.setMarkToEndOfLog(consoleLogFile);
TestUtils.runApp(server, "logServlet");
}
|
remote setMarkToEndOfLog in runApp
|
diff --git a/enrol/lti/lib.php b/enrol/lti/lib.php
index <HASH>..<HASH> 100644
--- a/enrol/lti/lib.php
+++ b/enrol/lti/lib.php
@@ -174,11 +174,12 @@ class enrol_lti_plugin extends enrol_plugin {
public function unenrol_user(stdClass $instance, $userid) {
global $DB;
- // Get the tool associated with this instance.
- $tool = $DB->get_record('enrol_lti_tools', array('enrolid' => $instance->id), 'id', MUST_EXIST);
-
- // Need to remove the user from the users table.
- $DB->delete_records('enrol_lti_users', array('userid' => $userid, 'toolid' => $tool->id));
+ // Get the tool associated with this instance. Note - it may not exist if we have deleted
+ // the tool. This is fine because we have already cleaned the 'enrol_lti_users' table.
+ if ($tool = $DB->get_record('enrol_lti_tools', array('enrolid' => $instance->id), 'id')) {
+ // Need to remove the user from the users table.
+ $DB->delete_records('enrol_lti_users', array('userid' => $userid, 'toolid' => $tool->id));
+ }
parent::unenrol_user($instance, $userid);
}
|
MDL-<I> enrol_lti: confirm tool exists before deleting users
|
diff --git a/source/org/jasig/portal/utils/threading/Worker.java b/source/org/jasig/portal/utils/threading/Worker.java
index <HASH>..<HASH> 100644
--- a/source/org/jasig/portal/utils/threading/Worker.java
+++ b/source/org/jasig/portal/utils/threading/Worker.java
@@ -90,9 +90,7 @@ public final class Worker extends Thread {
*/
public void stopWorker() {
continueWorking = false;
- if ( !this.isInterrupted() )
- this.interrupt();
- pool.destroyThread(this);
+ pool.destroyThread(this);
}
private void cleanState() {
|
Removed interrupt() - this is called from ThreadPool
git-svn-id: <URL>
|
diff --git a/src/Nodes/Admin/Grid/Renderer.php b/src/Nodes/Admin/Grid/Renderer.php
index <HASH>..<HASH> 100644
--- a/src/Nodes/Admin/Grid/Renderer.php
+++ b/src/Nodes/Admin/Grid/Renderer.php
@@ -84,6 +84,8 @@ class Renderer
->addAttributes( [ 'type' => 'button' ] )
)->addClass( 'collapser-cell' );
+ $items = $items->sortBy('lft');
+
foreach( $items as $item )
{
$cookie = $this->getNodeCookie( $item->getKey() );
|
Fix nodes not being sorted in renderer
|
diff --git a/lib/crtomo/parManager.py b/lib/crtomo/parManager.py
index <HASH>..<HASH> 100644
--- a/lib/crtomo/parManager.py
+++ b/lib/crtomo/parManager.py
@@ -312,8 +312,19 @@ class ParMan(object):
# now determine elements in area
elements_in_area = []
for nr, element in enumerate(grid_polygons):
- if polygon.intersects(element):
+ if polygon.contains(element):
elements_in_area.append(nr)
+ elif polygon.equals(element):
+ elements_in_area.append(nr)
+ elif polygon.crosses(element):
+ elements_in_area.append(nr)
+ # only take crossed elements with at least A % overlap
+ # int_area = polygon.intersect(element).area
+ # print('overlap: ',
+ # int_area,
+ # element.area,
+ # element.area / int_area
+ # )
# change the values
pid_clean = self._clean_pid(pid)
|
fix some potential issues with modifying polygon areas of parameter sets
|
diff --git a/edx_lint/pylint/right_assert_check.py b/edx_lint/pylint/right_assert_check.py
index <HASH>..<HASH> 100644
--- a/edx_lint/pylint/right_assert_check.py
+++ b/edx_lint/pylint/right_assert_check.py
@@ -76,7 +76,7 @@ class AssertChecker(BaseChecker):
"""
Check that various assertTrue/False functions are not misused.
"""
- if not isinstance(node.func, astroid.Attribute):
+ if not isinstance(node.func, astroid.Getattr):
# If it isn't a getattr ignore this. All the assertMethods are attrs of self:
return
diff --git a/test/test_pylint_plugins.py b/test/test_pylint_plugins.py
index <HASH>..<HASH> 100644
--- a/test/test_pylint_plugins.py
+++ b/test/test_pylint_plugins.py
@@ -17,6 +17,7 @@ def load_tests(unused_loader, tests, unused_pattern):
# Load our plugin.
linter.load_plugin_modules(['edx_lint.pylint'])
+ linter.global_set_option('required-attributes', ())
here = os.path.dirname(os.path.abspath(__file__))
|
Make things work on py2 again. py<I> is broken now.
|
diff --git a/core/server/web/api/app.js b/core/server/web/api/app.js
index <HASH>..<HASH> 100644
--- a/core/server/web/api/app.js
+++ b/core/server/web/api/app.js
@@ -33,7 +33,7 @@ module.exports = function setupApiApp() {
// Error handling for requests to non-existent API versions
apiApp.use(errorHandler.resourceNotFound);
apiApp.use(versionMissmatchHandler(APIVersionCompatibilityServiceInstance));
- apiApp.use(errorHandler.handleJSONResponse(sentry));
+ apiApp.use(errorHandler.handleJSONResponseV2(sentry));
debug('Parent API setup end');
return apiApp;
|
Fixed inconsistent error response from the API
- we have two JSON error response formats one old, one new (v2)
- we couldn't use the new one everywhere before without changing the response from older versions
- that is totally irrelevant in Ghost <I> as there is only one API version
- therefore we can and should use the new response format everywhere
- eventually we should rename it so it doesn't have v2 in it
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -79,7 +79,7 @@ function getDefaultConfig(mainTemplate, templatesPath) {
// Parse securedBy and use scopes if they are defined
ramlObj.renderSecuredBy = function (securedBy) {
- if (typeof securedBy === 'object'){
+ if (typeof securedBy === 'object') {
var out = "";
for (key in securedBy) {
out += "<b>" + key + "</b>";
|
align coding style (again)
|
diff --git a/salt/cloud/clouds/vmware.py b/salt/cloud/clouds/vmware.py
index <HASH>..<HASH> 100644
--- a/salt/cloud/clouds/vmware.py
+++ b/salt/cloud/clouds/vmware.py
@@ -437,3 +437,40 @@ def list_nodes_min(kwargs=None, call=None):
ret[vm.name] = True
return ret
+
+
+def list_nodes(kwargs=None, call=None):
+ '''
+ Return a list of the VMs that are on the provider, with basic fields
+
+ .. note::
+
+ The list returned does not include templates.
+
+ CLI Example:
+
+ .. code-block:: bash
+
+ salt-cloud -f list_nodes my-vmware-config
+ '''
+ if call != 'function':
+ log.error(
+ 'The list_nodes function must be called with -f or --function.'
+ )
+ return False
+
+ ret = {}
+ vm_list = _get_vm_list()
+
+ for vm in vm_list:
+ if not vm.summary.config.template:
+ # It is not a template
+ vm_info = {
+ 'id': vm.name,
+ 'ip_address': vm.summary.guest.ipAddress,
+ 'cpus': vm.summary.config.numCpu,
+ 'ram': vm.summary.config.memorySizeMB,
+ }
+ ret[vm_info['id']] = vm_info
+
+ return ret
|
Adding list_nodes() to be able to display basic information about all vms
|
diff --git a/tests/Symfony/Tests/Component/Translation/Loader/XliffFileLoaderTest.php b/tests/Symfony/Tests/Component/Translation/Loader/XliffFileLoaderTest.php
index <HASH>..<HASH> 100644
--- a/tests/Symfony/Tests/Component/Translation/Loader/XliffFileLoaderTest.php
+++ b/tests/Symfony/Tests/Component/Translation/Loader/XliffFileLoaderTest.php
@@ -28,7 +28,7 @@ class XliffFileLoaderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Exception
+ * @expectedException \RuntimeException
*/
public function testLoadInvalidResource()
{
@@ -37,7 +37,7 @@ class XliffFileLoaderTest extends \PHPUnit_Framework_TestCase
}
/**
- * @expectedException Exception
+ * @expectedException \RuntimeException
*/
public function testLoadResourceDoesNotValidate()
{
|
[Translation] changed some unit tests for PHPUnit <I> compatibility
|
diff --git a/record.go b/record.go
index <HASH>..<HASH> 100644
--- a/record.go
+++ b/record.go
@@ -8,12 +8,12 @@ import (
type Record struct {
Id int `json:"id,omitempty"`
- Content string `json:"content,omitempty"`
+ DomainId int `json:"domain_id,omitempty"`
Name string `json:"name,omitempty"`
+ Content string `json:"content,omitempty"`
TTL int `json:"ttl,omitempty"`
- RecordType string `json:"record_type,omitempty"`
Priority int `json:"prio,omitempty"`
- DomainId int `json:"domain_id,omitempty"`
+ RecordType string `json:"record_type,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}
|
Sort the Record fields according to the official serializer
|
diff --git a/lib/rprogram/option.rb b/lib/rprogram/option.rb
index <HASH>..<HASH> 100644
--- a/lib/rprogram/option.rb
+++ b/lib/rprogram/option.rb
@@ -1,5 +1,3 @@
-require 'rprogram/extensions'
-
module RProgram
class Option
|
Don't require 'rprogram/extensions' any more.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,10 +20,14 @@ except pkg_resources.VersionConflict:
pkg_resources.require('Django >= 1.7')
django_bootstrap3 = 'django-bootstrap3 >= 5.4,<7.0.0'
django = 'Django >= 1.7,<1.8'
- except pkg_resources.VersionConflict:
+ except (pkg_resources.VersionConflict, pkg_resources.DistributionNotFound):
# Else we need to install Django, assume version will be >= 1.8
django_bootstrap3 = 'django-bootstrap3 >= 5.4'
django = 'Django >= 1.8,<1.10'
+# No version of django installed, assume version will be >= 1.8
+except pkg_resources.DistributionNotFound:
+ django_bootstrap3 = 'django-bootstrap3 >= 5.4'
+ django = 'Django >= 1.8,<1.10'
setup(
name='django-cas-server',
|
Case when django is not installed
|
diff --git a/lib/metamorpher/builders/ruby/uppercase_constant_rewriter.rb b/lib/metamorpher/builders/ruby/uppercase_constant_rewriter.rb
index <HASH>..<HASH> 100644
--- a/lib/metamorpher/builders/ruby/uppercase_constant_rewriter.rb
+++ b/lib/metamorpher/builders/ruby/uppercase_constant_rewriter.rb
@@ -1,29 +1,15 @@
require "metamorpher/builders/ast"
+require "metamorpher/builders/ruby/uppercase_rewriter"
module Metamorpher
module Builders
module Ruby
- class UppercaseConstantRewriter
+ class UppercaseConstantRewriter < UppercaseRewriter
include Metamorpher::Rewriter
include Metamorpher::Builders::AST
def pattern
- builder.const(
- builder.literal!(nil),
- builder.VARIABLE_TO_BE { |v| v.name && v.name.to_s[/^[A-Z_]*$/] }
- )
- end
-
- def replacement
- builder.derivation!(:variable_to_be) do |variable_to_be, builder|
- name = variable_to_be.name.to_s
-
- if name.end_with?("_")
- builder.greedy_variable! name.chomp("_").downcase.to_sym
- else
- builder.variable! name.downcase.to_sym
- end
- end
+ builder.const(builder.literal!(nil), super)
end
end
end
|
Reduce duplication in Ruby builder code.
|
diff --git a/utp.go b/utp.go
index <HASH>..<HASH> 100644
--- a/utp.go
+++ b/utp.go
@@ -179,6 +179,11 @@ func DialTimeout(addr string, timeout time.Duration) (nc net.Conn, err error) {
return s.DialTimeout(addr, timeout)
}
+// Listen creates listener Socket to accept incoming connections.
+func Listen(laddr string) (net.Listener, error) {
+ return NewSocket("udp", laddr)
+}
+
func nowTimestamp() uint32 {
return uint32(time.Now().UnixNano() / int64(time.Microsecond))
}
diff --git a/utp_test.go b/utp_test.go
index <HASH>..<HASH> 100644
--- a/utp_test.go
+++ b/utp_test.go
@@ -95,6 +95,15 @@ func TestDialTimeout(t *testing.T) {
t.Log(err)
}
+func TestListen(t *testing.T) {
+ defer goroutineLeakCheck(t)()
+ ln, err := NewSocket("udp", "localhost:0")
+ if err != nil {
+ t.Fatal(err)
+ }
+ ln.Close()
+}
+
func TestMinMaxHeaderType(t *testing.T) {
require.Equal(t, stSyn, stMax)
}
|
provide Listen method that returns net.Listener
|
diff --git a/holoviews/plotting/plot.py b/holoviews/plotting/plot.py
index <HASH>..<HASH> 100644
--- a/holoviews/plotting/plot.py
+++ b/holoviews/plotting/plot.py
@@ -426,7 +426,7 @@ class GenericElementPlot(DimensionedPlot):
keys = keys if keys else list(self.hmap.data.keys())
plot_opts = self.lookup_options(self.hmap.last, 'plot').options
- dynamic = element.mode if isinstance(element, DynamicMap) else False
+ dynamic = False if not isinstance(element, DynamicMap) or element.sampled else element.mode
super(GenericElementPlot, self).__init__(keys=keys, dimensions=dimensions,
dynamic=dynamic,
**dict(params, **plot_opts))
|
Fixed display of sampled DynamicMaps with items in cache
|
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index <HASH>..<HASH> 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -42,9 +42,6 @@ if(isset($_SERVER['argv'][2])) {
$_REQUEST = array_merge($_REQUEST, $_GET);
}
-// Always flush the manifest for phpunit test runs
-$_GET['flush'] = 1;
-
// Connect to database
require_once $frameworkPath . '/core/Core.php';
require_once $frameworkPath . '/tests/FakeController.php';
@@ -65,4 +62,4 @@ $controller = new FakeController();
TestRunner::use_test_manifest();
// Remove the error handler so that PHPUnit can add its own
-restore_error_handler();
+restore_error_handler();
\ No newline at end of file
|
Don't flush manifest in test bootstrap for performance reasons
Leave the decision to the phpunit.xml config (via <get> setting),
or to the individual run via "phpunit <folder> '' flush=1".
Flushing takes multiple seconds even on my fast SSD,
which greatly reduces the likelyhood of developers adopting TDD.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -17,7 +17,7 @@ function matchLicense(licenseString) {
return license.name
}
}
- return 'nomatch'
+ return null
}
// Read source licenses from license-files directory
@@ -30,7 +30,7 @@ fs.readdirSync(licenseDir).forEach(function(name) {
function getLicenseType(filename) {
var fileContents = fs.readFileSync(filename, "utf8")
- return matchLicense(fileContents)
+ return matchLicense(fileContents) || 'nomatch'
}
function getReadmeLicense(filename) {
|
don't complain about readme if license is not found in it
|
diff --git a/mode/markdown/markdown.js b/mode/markdown/markdown.js
index <HASH>..<HASH> 100644
--- a/mode/markdown/markdown.js
+++ b/mode/markdown/markdown.js
@@ -700,14 +700,15 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
state.formatting = false;
if (stream.sol()) {
- var forceBlankLine = stream.match(/^\s*$/, true) || state.header;
+ var forceBlankLine = !!state.header;
// Reset state.header
state.header = 0;
- if (forceBlankLine) {
+ if (stream.match(/^\s*$/, true) || forceBlankLine) {
state.prevLineHasContent = false;
- return blankLine(state);
+ blankLine(state);
+ return forceBlankLine ? this.token(stream, state) : null;
} else {
state.prevLineHasContent = state.thisLineHasContent;
state.thisLineHasContent = true;
|
[markdown] Fix handling of forced blank lines (after headers)
Closes #<I>
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -18,8 +18,9 @@ var rename = require('gulp-rename');
gulp.task('jshint', function() {
return gulp.src(['public/**/*.js', 'lib/**/*.js'])
.pipe(jshint())
- .pipe(jshint.reporter('jshint-stylish'));
- //.pipe(jshint.reporter('fail'));
+ .pipe(jshint.reporter('jshint-stylish'))
+ // fail (non-zero exit code) if there are any errors or warnings
+ .pipe(jshint.reporter('fail'));
});
gulp.task('csslint', function() {
|
Adding fail reporter to jshint.
This causes the linter to return a non-zero exit code, which means the travis build fails if there are any jshint warnings / errors. #<I>
|
diff --git a/views/build/grunt/sass.js b/views/build/grunt/sass.js
index <HASH>..<HASH> 100644
--- a/views/build/grunt/sass.js
+++ b/views/build/grunt/sass.js
@@ -8,9 +8,7 @@ module.exports = function (grunt) {
// Override include paths
sass.taoqtiitem = {
- options : {
- includePaths : [ '../scss', '../js/lib', root + 'scss/inc', root + 'scss/qti' ]
- },
+ options : {},
files : {}
};
|
Remove unneccessary include path sass options
tao-<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@ pkg_data = {
}
pkgs = ["branca"]
-LICENSE = read("LICENSE.txt")
+LICENSE = "MIT"
long_description = "{}".format(read("README.md"))
# Dependencies.
|
Update license in setup.py (#<I>)
|
diff --git a/lifelines/tests/test_suite.py b/lifelines/tests/test_suite.py
index <HASH>..<HASH> 100644
--- a/lifelines/tests/test_suite.py
+++ b/lifelines/tests/test_suite.py
@@ -321,6 +321,15 @@ class StatisticalTests(unittest.TestCase):
with_array = naf.fit(np.array(T),np.array(C)).cumulative_hazard_.values
npt.assert_array_equal(with_list,with_array)
+ def test_timeline_to_NelsonAalenFitter(self):
+ T = [2,3,1.,6,5.]
+ C = [1,0,0,1,1]
+ timeline = [2,3,4.,1.,6,5.]
+ naf = NelsonAalenFitter()
+ with_list = naf.fit(T,C,timeline=timeline).cumulative_hazard_.values
+ with_array = naf.fit(T,C,timeline=np.array(timeline)).cumulative_hazard_.values
+ npt.assert_array_equal(with_list,with_array)
+
def test_pairwise_allows_dataframes(self):
N = 100
df = pd.DataFrame(np.empty((N,3)), columns=["T", "C", "group"])
|
Update test_suite.py
adding unit test with timeline argument to fit
|
diff --git a/public/js/models/Image.js b/public/js/models/Image.js
index <HASH>..<HASH> 100755
--- a/public/js/models/Image.js
+++ b/public/js/models/Image.js
@@ -75,6 +75,8 @@ Garp.dataTypes.Image.on('init', function(){
// because images won't reload if their ID is
// still the same, we need to reload the page
this.refOwner.formcontent.on('loaddata', function(){
+ var lm = new Ext.LoadMask(Ext.getBody());
+ lm.show();
document.location.href = url;
});
this.refOwner.fireEvent('save-all');
|
Image changed? Reload, but *with* loadmask
|
diff --git a/fragman/apply.py b/fragman/apply.py
index <HASH>..<HASH> 100644
--- a/fragman/apply.py
+++ b/fragman/apply.py
@@ -10,10 +10,10 @@ def apply_changes(changed_path, config):
weave.add_revision(2, file(changed_path, 'r').readlines(), [1])
for i, other_key in enumerate(config['files']):
- revision = i + 3
other_path = os.path.join(config.root, other_key)
if other_path == changed_path:
continue # don't try to apply changes to ourself
+ revision = i + 3
weave.add_revision(revision, file(other_path, 'r').readlines(), [])
merge_result = weave.cherry_pick(2, revision) # Can I apply changes in revision 2 onto this other file?
if tuple in (type(mr) for mr in merge_result):
|
don't count current file when incrementing revisions
|
diff --git a/mstate/state.go b/mstate/state.go
index <HASH>..<HASH> 100644
--- a/mstate/state.go
+++ b/mstate/state.go
@@ -137,7 +137,13 @@ func (s *State) AddCharm(ch charm.Charm, curl *charm.URL, bundleURL *url.URL, bu
BundleURL: bundleURL,
BundleSha256: bundleSha256,
}
- err = s.charms.Insert(cdoc)
+ op := []txn.Operation{{
+ Collection: s.charms.Name,
+ DocId: curl,
+ Assert: txn.DocMissing,
+ Insert: cdoc,
+ }}
+ err = s.runner.Run(op, "", nil)
if err != nil {
return nil, fmt.Errorf("cannot add charm %q: %v", curl, err)
}
|
mstate: use txn for Add Charm
|
diff --git a/lnwallet/btcwallet/signer.go b/lnwallet/btcwallet/signer.go
index <HASH>..<HASH> 100644
--- a/lnwallet/btcwallet/signer.go
+++ b/lnwallet/btcwallet/signer.go
@@ -141,7 +141,7 @@ func (b *BtcWallet) SignOutputRaw(tx *wire.MsgTx,
amt := signDesc.Output.Value
sig, err := txscript.RawTxInWitnessSignature(tx, signDesc.SigHashes,
- signDesc.InputIndex, amt, witnessScript, txscript.SigHashAll,
+ signDesc.InputIndex, amt, witnessScript, signDesc.HashType,
privKey)
if err != nil {
return nil, err
@@ -227,7 +227,7 @@ func (b *BtcWallet) ComputeInputScript(tx *wire.MsgTx,
// TODO(roasbeef): adhere to passed HashType
witnessScript, err := txscript.WitnessSignature(tx, signDesc.SigHashes,
signDesc.InputIndex, signDesc.Output.Value, witnessProgram,
- txscript.SigHashAll, privKey, true)
+ signDesc.HashType, privKey, true)
if err != nil {
return nil, err
}
|
lnwallet/btcwallet: Use signDesc.HashType when signing
Tis commit makes the btcwallet signer implementation use
signDesc.HashType instead of SigHashAll when signing
transactions. This will allow the creator of the transaction
to specify the sighash policy when creating the accompanying
sign descriptior.
|
diff --git a/gffutils/test/test_biopython_integration.py b/gffutils/test/test_biopython_integration.py
index <HASH>..<HASH> 100644
--- a/gffutils/test/test_biopython_integration.py
+++ b/gffutils/test/test_biopython_integration.py
@@ -1,4 +1,4 @@
-from gffutils import example_filename, create, parser, feature
+from gffutils import example_filename
import gffutils
import gffutils.biopython_integration as bp
@@ -12,5 +12,7 @@ def test_roundtrip():
feature.keep_order = True
dialect = feature.dialect
s = bp.to_seqfeature(feature)
+ assert s.location.start.position == feature.start - 1
+ assert s.location.end.position == feature.stop
f = bp.from_seqfeature(s, dialect=dialect, keep_order=True)
assert feature == f
|
add test for 0- and 1-based indexing
|
diff --git a/model/execution/DeliveryExecutionManagerService.php b/model/execution/DeliveryExecutionManagerService.php
index <HASH>..<HASH> 100644
--- a/model/execution/DeliveryExecutionManagerService.php
+++ b/model/execution/DeliveryExecutionManagerService.php
@@ -71,7 +71,7 @@ class DeliveryExecutionManagerService extends ConfigurableService
/** @var TestSessionService $testSessionService */
$testSessionService = $this->getServiceLocator()->get(TestSessionService::SERVICE_ID);
- $testSession = $testSessionService->getTestSession($deliveryExecution);
+ $testSession = $testSessionService->getTestSession($deliveryExecution, true);
if ($testSession instanceof TestSession) {
$timer = $testSession->getTimer();
} else {
|
get test session in readonly mode in DeliveryExecutionManagerService::getDeliveryTimer
|
diff --git a/core_spec/language/fixtures/super.rb b/core_spec/language/fixtures/super.rb
index <HASH>..<HASH> 100644
--- a/core_spec/language/fixtures/super.rb
+++ b/core_spec/language/fixtures/super.rb
@@ -40,4 +40,22 @@ module Super
end
end
end
+
+ class S5
+ def here
+ :good
+ end
+ end
+
+ class S6 < S5
+ def under
+ yield
+ end
+
+ def here
+ under {
+ super
+ }
+ end
+ end
end
diff --git a/core_spec/language/super_spec.rb b/core_spec/language/super_spec.rb
index <HASH>..<HASH> 100644
--- a/core_spec/language/super_spec.rb
+++ b/core_spec/language/super_spec.rb
@@ -15,4 +15,8 @@ describe "The super keyword" do
Super::S2::C.new.foo([]).should == ["B#foo", "C#baz", "A#baz"]
Super::S2::C.new.baz([]).should == ["C#baz", "A#baz"]
end
+
+ it "calls the superclass method when in a block" do
+ Super::S6.new.here.should == :good
+ end
end
|
Add failing super() spec which tests super inside a block
|
diff --git a/version/version.go b/version/version.go
index <HASH>..<HASH> 100644
--- a/version/version.go
+++ b/version/version.go
@@ -6,12 +6,12 @@ const (
// VersionMajor is for an API incompatible changes
VersionMajor = 5
// VersionMinor is for functionality in a backwards-compatible manner
- VersionMinor = 5
+ VersionMinor = 6
// VersionPatch is for backwards-compatible bug fixes
- VersionPatch = 2
+ VersionPatch = 0
// VersionDev indicates development branch. Releases will be empty string.
- VersionDev = "-dev"
+ VersionDev = ""
)
// Version is the specification version that the package types support.
|
<I>
* When we can't store signatures, point the user at the destination.
* Update for <URL>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@ if sys.version_info < (2,6):
setup(
name = "backports.lzma",
- version = "0.0.1",
+ version = "0.0.1b",
description = descr,
author = "Peter Cock, based on work by Nadeem Vawda and Per Oyvind Karlsen",
author_email = "[email protected]",
@@ -46,6 +46,7 @@ setup(
long_description = long_descr,
classifiers = [
#'Development Status :: 5 - Production/Stable',
+ 'Development Status :: 4 - Beta',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
|
Call this a beta for first public release...
|
diff --git a/app_generators/ahn/ahn_generator.rb b/app_generators/ahn/ahn_generator.rb
index <HASH>..<HASH> 100644
--- a/app_generators/ahn/ahn_generator.rb
+++ b/app_generators/ahn/ahn_generator.rb
@@ -23,7 +23,6 @@ class AhnGenerator < RubiGen::Base
m.file *["config/environment.rb"]*2
m.file *["config/adhearsion.rb"]*2
- m.file *["dialplan.rb"]*2
m.file *["README"]*2
m.file *["Rakefile"]*2
m.file *["Gemfile"]*2
|
[BUGFIX] Remove the dialplan.rb reference from the generator manifest
|
diff --git a/runcommands/completion/__init__.py b/runcommands/completion/__init__.py
index <HASH>..<HASH> 100644
--- a/runcommands/completion/__init__.py
+++ b/runcommands/completion/__init__.py
@@ -32,12 +32,12 @@ def complete(config, command_line, current_token, position, shell: dict(choices=
run_args = read_run_args(run)
debug = run_args.get('debug', debug)
- module = run_args.get('commands-module')
+ module = run_args.get('commands_module')
module = extract_from_argv(run_argv, run.args['commands-module'].options) or module
module = module or DEFAULT_COMMANDS_MODULE
module = normalize_path(module)
- config_file = run_args.get('config-file')
+ config_file = run_args.get('config_file')
config_file = extract_from_argv(run_argv, run.args['config-file'].options) or config_file
if not config_file and os.path.exists(DEFAULT_CONFIG_FILE):
config_file = DEFAULT_CONFIG_FILE
|
Fix run arg names in complete command
|
diff --git a/http/service.go b/http/service.go
index <HASH>..<HASH> 100644
--- a/http/service.go
+++ b/http/service.go
@@ -103,7 +103,7 @@ const (
PermBackup = "backup"
// LoadBatchSz is the batch size for loading a dump file.
- LoadBatchSz = 100
+ LoadBatchSz = 1000
)
func init() {
diff --git a/store/store.go b/store/store.go
index <HASH>..<HASH> 100644
--- a/store/store.go
+++ b/store/store.go
@@ -479,7 +479,7 @@ func (s *Store) Load(r io.Reader, sz int) (int64, error) {
queries = append(queries, cmd)
if len(queries) == sz {
- _, err = s.Execute(queries, false, false)
+ _, err = s.Execute(queries, false, true)
if err != nil {
return n, err
}
@@ -490,7 +490,7 @@ func (s *Store) Load(r io.Reader, sz int) (int64, error) {
// Flush residual
if len(queries) > 0 {
- _, err = s.Execute(queries, false, false)
+ _, err = s.Execute(queries, false, true)
if err != nil {
return n, err
}
|
Use a transaction for loaded batch
Bump the batch size to <I> too.
|
diff --git a/_tests/integration/version_test.go b/_tests/integration/version_test.go
index <HASH>..<HASH> 100644
--- a/_tests/integration/version_test.go
+++ b/_tests/integration/version_test.go
@@ -10,7 +10,7 @@ import (
)
const (
- expectedCLIVersion = "1.45.0"
+ expectedCLIVersion = "1.45.1"
)
func Test_VersionOutput(t *testing.T) {
diff --git a/version/version.go b/version/version.go
index <HASH>..<HASH> 100644
--- a/version/version.go
+++ b/version/version.go
@@ -1,4 +1,4 @@
package version
// VERSION ...
-const VERSION = "1.45.0"
+const VERSION = "1.45.1"
|
Prepare for release <I> (#<I>) (#<I>)
* Prepare for release <I> (#<I>)
* Changed version too
|
diff --git a/lib/aequitas.rb b/lib/aequitas.rb
index <HASH>..<HASH> 100644
--- a/lib/aequitas.rb
+++ b/lib/aequitas.rb
@@ -1,6 +1,6 @@
# -*- encoding: utf-8 -*-
-if RUBY_VERSION < '1.9.1'
+if RUBY_VERSION < '1.9'
require 'backports'
end
diff --git a/spec/suite.rb b/spec/suite.rb
index <HASH>..<HASH> 100644
--- a/spec/suite.rb
+++ b/spec/suite.rb
@@ -3,6 +3,8 @@ spec_dir = File.expand_path('..', __FILE__)
$LOAD_PATH << spec_dir
$LOAD_PATH << File.join(spec_dir,'integration')
+require 'aequitas'
+
%w[unit integration].each do |spec_type|
Dir[File.join(spec_dir, spec_type, '**', '*.rb')].each { |spec| require spec }
end
|
Fix backport require conditional and require aequitas from spec_helper
|
diff --git a/spin.js b/spin.js
index <HASH>..<HASH> 100644
--- a/spin.js
+++ b/spin.js
@@ -186,10 +186,13 @@
var self = this
, o = self.opts
- , el = self.el = css(createEl(0, {className: o.className}), {position: o.position, width: 0, zIndex: o.zIndex})
+ , el = self.el = createEl(0, {className: o.className})
css(el, {
- left: o.left
+ position: o.position
+ , width: 0
+ , zIndex: o.zIndex
+ , left: o.left
, top: o.top
})
|
Deobfuscate some variable declaration
|
diff --git a/rpcserver.go b/rpcserver.go
index <HASH>..<HASH> 100644
--- a/rpcserver.go
+++ b/rpcserver.go
@@ -868,7 +868,7 @@ func handleGenerate(s *rpcServer, cmd interface{}, closeChan <-chan struct{}) (i
Code: btcjson.ErrRPCDifficulty,
Message: fmt.Sprintf("No support for `generate` on "+
"the current network, %s, as it's unlikely to "+
- "be possible to main a block with the CPU.",
+ "be possible to mine a block with the CPU.",
s.cfg.ChainParams.Net),
}
}
|
rpcserver: Fix typo in generate handler.
"mine a block" instead of "main a block".
|
diff --git a/jquery.floatThead.js b/jquery.floatThead.js
index <HASH>..<HASH> 100644
--- a/jquery.floatThead.js
+++ b/jquery.floatThead.js
@@ -684,6 +684,7 @@
if (wrappedContainer) {
$scrollContainer.unwrap();
}
+ $table.css('minWidth', '');
$floatContainer.remove();
$table.data('floatThead-attached', false);
@@ -710,4 +711,4 @@
});
return this;
};
-})(jQuery);
\ No newline at end of file
+})(jQuery);
|
Remove css min-width from table on destroy
|
diff --git a/liquibase-core/src/main/java/liquibase/change/core/LoadDataChange.java b/liquibase-core/src/main/java/liquibase/change/core/LoadDataChange.java
index <HASH>..<HASH> 100644
--- a/liquibase-core/src/main/java/liquibase/change/core/LoadDataChange.java
+++ b/liquibase-core/src/main/java/liquibase/change/core/LoadDataChange.java
@@ -479,8 +479,8 @@ public class LoadDataChange extends AbstractChange implements ChangeWithColumns<
// 2. The database supports batched statements (for improved performance) AND we are not in an
// "SQL" mode (i.e. we generate an SQL file instead of actually modifying the database).
if
- ((needsPreparedStatement || (databaseSupportsBatchUpdates && ! isLoggingExecutor(database) &&
- hasPreparedStatementsImplemented()))) {
+ ((needsPreparedStatement || (databaseSupportsBatchUpdates && ! isLoggingExecutor(database))) &&
+ hasPreparedStatementsImplemented()) {
anyPreparedStatements = true;
ExecutablePreparedStatementBase stmt =
this.createPreparedStatement(
|
Fix issue with loadUpdateData GH-<I>
|
diff --git a/lib/Tmdb/Model/Common/SpokenLanguage.php b/lib/Tmdb/Model/Common/SpokenLanguage.php
index <HASH>..<HASH> 100644
--- a/lib/Tmdb/Model/Common/SpokenLanguage.php
+++ b/lib/Tmdb/Model/Common/SpokenLanguage.php
@@ -25,7 +25,7 @@ class SpokenLanguage extends AbstractModel implements LanguageFilter
private $name;
public static $properties = [
- 'iso_369_1',
+ 'iso_639_1',
'name',
];
|
Update SpokenLanguage.php
Changed 'iso_<I>_1' on line <I> to 'iso_<I>_1'.
|
diff --git a/src/main/java/com/cloudbees/jenkins/support/impl/ThreadDumps.java b/src/main/java/com/cloudbees/jenkins/support/impl/ThreadDumps.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudbees/jenkins/support/impl/ThreadDumps.java
+++ b/src/main/java/com/cloudbees/jenkins/support/impl/ThreadDumps.java
@@ -222,6 +222,17 @@ public class ThreadDumps extends Component {
}
}
+ // Print any information about deadlocks.
+ long[] deadLocks = mbean.findDeadlockedThreads();
+ if (deadLocks != null && deadLocks.length != 0) {
+ writer.println(" Deadlock Found ");
+ ThreadInfo[] deadLockThreads = mbean.getThreadInfo(deadLocks);
+
+ for (ThreadInfo threadInfo : deadLockThreads) {
+ writer.println(threadInfo.getStackTrace());
+ }
+ }
+
writer.println();
writer.flush();
}
|
Add information about dead lock threads.
|
diff --git a/pypsa/linopt.py b/pypsa/linopt.py
index <HASH>..<HASH> 100644
--- a/pypsa/linopt.py
+++ b/pypsa/linopt.py
@@ -742,8 +742,8 @@ def run_and_read_gurobi(n, problem_fn, solution_fn, solver_logfile,
For more information on solver options:
https://www.gurobi.com/documentation/{gurobi_verion}/refman/parameter_descriptions.html
"""
- if find_spec('gurobi') is None:
- raise ModuleNotFoundError("Optional dependency 'gurobi' not found. "
+ if find_spec('gurobipy') is None:
+ raise ModuleNotFoundError("Optional dependency 'gurobipy' not found. "
"Install via 'conda install -c gurobi gurobi' or follow the "
"instructions on the documentation page "
"https://www.gurobi.com/documentation/")
|
search for gurobipy not gurobi (#<I>)
|
diff --git a/happymongo/__init__.py b/happymongo/__init__.py
index <HASH>..<HASH> 100644
--- a/happymongo/__init__.py
+++ b/happymongo/__init__.py
@@ -72,10 +72,12 @@ class HapPyMongo(object):
"""
config = {}
app_name = get_app_name()
+ is_flask = False
# If the object is a flask.app.Flask instance
if flask_app and isinstance(app_or_object_or_dict, flask_app.Flask):
config.update(app_or_object_or_dict.config)
app_name = app_or_object_or_dict.name
+ is_flask = True
# If the object is a dict
elif isinstance(app_or_object_or_dict, dict):
config.update(app_or_object_or_dict)
@@ -148,6 +150,11 @@ class HapPyMongo(object):
if any(auth):
db.authenticate(username, password)
+ if is_flask:
+ if not hasattr(app_or_object_or_dict, 'extensions'):
+ app_or_object_or_dict.extensions = {}
+ app_or_object_or_dict.extensions['happymongo'] = (mongo, db)
+
# Return the tuple
return mongo, db
|
If it is a flask app, register as an extension
|
diff --git a/src/api_data_fetcher.php b/src/api_data_fetcher.php
index <HASH>..<HASH> 100644
--- a/src/api_data_fetcher.php
+++ b/src/api_data_fetcher.php
@@ -214,7 +214,7 @@ class ApiDataFetcher{
$d = json_decode($u->getContent(),true);
if(is_null($d)){
- error_log("ApiDataFetcher:
+ trigger_error("ApiDataFetcher:
URL: $url
response code: ".$u->getStatusCode()."
invalid json:\n".$u->getContent()
|
error_log() replaced with trigger_error()
|
diff --git a/framer/protocol.py b/framer/protocol.py
index <HASH>..<HASH> 100644
--- a/framer/protocol.py
+++ b/framer/protocol.py
@@ -14,7 +14,10 @@
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
-import asyncio
+try:
+ import asyncio
+except ImportError:
+ import trollius as asyncio
class FramedProtocol(asyncio.BaseProtocol):
|
Fix asyncio import
The trollius library no longer installs as the 'asyncio' package, but
as 'trollius'. Change the one import we have to import trollius as
asyncio if asyncio is not present.
|
diff --git a/src/Datasource/EntityTrait.php b/src/Datasource/EntityTrait.php
index <HASH>..<HASH> 100644
--- a/src/Datasource/EntityTrait.php
+++ b/src/Datasource/EntityTrait.php
@@ -270,10 +270,10 @@ trait EntityTrait {
* ### Example:
*
* {{{
- * $entity = new Entity(['id' => 1, 'name' => null]);
- * $entity->has('id'); // true
- * $entity->has('name'); // false
- * $entity->has('last_name'); // false
+ * $entity = new Entity(['id' => 1, 'name' => null]);
+ * $entity->has('id'); // true
+ * $entity->has('name'); // false
+ * $entity->has('last_name'); // false
* }}}
*
* @param string $property The property to check.
@@ -288,9 +288,10 @@ trait EntityTrait {
*
* ### Examples:
*
- * ``$entity->unsetProperty('name');``
- *
- * ``$entity->unsetProperty(['name', 'last_name']);``
+ * {{{
+ * $entity->unsetProperty('name');
+ * $entity->unsetProperty(['name', 'last_name']);
+ * }}}
*
* @param string|array $property The property to unset.
* @return \Cake\DataSource\EntityInterface
|
Tidy up docblock.
|
diff --git a/app/controllers/katello/api/v2/host_collections_controller.rb b/app/controllers/katello/api/v2/host_collections_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/katello/api/v2/host_collections_controller.rb
+++ b/app/controllers/katello/api/v2/host_collections_controller.rb
@@ -26,7 +26,6 @@ module Katello
api :GET, "/host_collections", N_("List host collections")
api :GET, "/organizations/:organization_id/host_collections", N_("List host collections within an organization")
api :GET, "/activation_keys/:activation_key_id/host_collections", N_("List host collections in an activation key")
- api :GET, "/hosts/:host_id/host_collections", N_("List host collections containing a content host")
param_group :search, Api::V2::ApiController
param :organization_id, :number, :desc => N_("organization identifier"), :required => false
param :name, String, :desc => N_("host collection name to filter by")
|
Refs #<I> - update endpoint for host collections
|
diff --git a/lib/allscripts_unity_client/json_client_driver.rb b/lib/allscripts_unity_client/json_client_driver.rb
index <HASH>..<HASH> 100644
--- a/lib/allscripts_unity_client/json_client_driver.rb
+++ b/lib/allscripts_unity_client/json_client_driver.rb
@@ -117,7 +117,10 @@ module AllscriptsUnityClient
end
# Configure proxy
- options[:proxy] = @options.proxy
+ if @options.proxy?
+ options[:proxy] = @options.proxy
+ end
+
options
end
|
Don't set proxy unless an option has been set for JSON client.
|
diff --git a/post_office/tests/utils.py b/post_office/tests/utils.py
index <HASH>..<HASH> 100644
--- a/post_office/tests/utils.py
+++ b/post_office/tests/utils.py
@@ -102,7 +102,7 @@ class UtilsTest(TestCase):
self.assertIsInstance(attachments[0], Attachment)
self.assertTrue(attachments[0].pk)
self.assertEquals(attachments[0].file.read(), b'content')
- self.assertEquals(attachments[0].name, 'attachment_file1.txt')
+ self.assertTrue(attachments[0].name.startswith('attachment_file'))
def test_create_attachments_open_file(self):
attachments = create_attachments({
|
Fix tests failing because of dict sort order
|
diff --git a/scuba/scuba.py b/scuba/scuba.py
index <HASH>..<HASH> 100644
--- a/scuba/scuba.py
+++ b/scuba/scuba.py
@@ -15,11 +15,6 @@ from .dockerutil import make_vol_opt
from .utils import shell_quote_cmd, flatten_list
-def verbose_msg(fmt, *args):
- # TODO: remove
- pass
-
-
class ScubaError(Exception):
pass
@@ -227,11 +222,9 @@ class ScubaDive:
'''
if not self.context.script:
# No user-provided command; we want to run the image's default command
- verbose_msg('No user command; getting command from image')
default_cmd = get_image_command(self.context.image)
if not default_cmd:
raise ScubaError('No command given and no image-specified command')
- verbose_msg('{} Cmd: "{}"'.format(self.context.image, default_cmd))
self.context.script = [shell_quote_cmd(default_cmd)]
# Make scubainit the real entrypoint, and use the defined entrypoint as
|
scuba: Remove stub verbose_msg
These two calls don't add much information for the user. If we want this
level of detail, we should use the logging API.
|
diff --git a/core/lib/generators/refinery/cms/cms_generator.rb b/core/lib/generators/refinery/cms/cms_generator.rb
index <HASH>..<HASH> 100644
--- a/core/lib/generators/refinery/cms/cms_generator.rb
+++ b/core/lib/generators/refinery/cms/cms_generator.rb
@@ -39,7 +39,7 @@ module Refinery
# Refinery has set config.assets.initialize_on_precompile = false by default.
config.assets.initialize_on_precompile = false
-}, :after => "Application.configure do\n" if env == 'production'
+}, :after => "Application.configure do\n" if env =~ /production/
end
# Stop pretending
|
Use regular expression to detect if current env contains 'production'.
|
diff --git a/src/ProxyManager/Factory/AbstractBaseFactory.php b/src/ProxyManager/Factory/AbstractBaseFactory.php
index <HASH>..<HASH> 100644
--- a/src/ProxyManager/Factory/AbstractBaseFactory.php
+++ b/src/ProxyManager/Factory/AbstractBaseFactory.php
@@ -23,6 +23,8 @@ namespace ProxyManager\Factory;
use ProxyManager\Configuration;
use ProxyManager\Generator\ClassGenerator;
use ProxyManager\ProxyGenerator\ProxyGeneratorInterface;
+use ProxyManager\Signature\Exception\InvalidSignatureException;
+use ProxyManager\Signature\Exception\MissingSignatureException;
use ProxyManager\Version;
use ReflectionClass;
@@ -61,6 +63,9 @@ abstract class AbstractBaseFactory
* @param mixed[] $proxyOptions
*
* @return string proxy class name
+ *
+ * @throws InvalidSignatureException
+ * @throws MissingSignatureException
*/
protected function generateProxy(string $className, array $proxyOptions = []) : string
{
|
Documenting thrown exceptions in the base factory
|
diff --git a/Phrozn/Processor/Twig.php b/Phrozn/Processor/Twig.php
index <HASH>..<HASH> 100644
--- a/Phrozn/Processor/Twig.php
+++ b/Phrozn/Processor/Twig.php
@@ -58,11 +58,6 @@ class Twig
{
$path = Loader::getInstance()->getPath('library');
- // Twig uses perverted file naming (due to absense of NSs at a time it was written)
- // so fire up its own autoloader
- require_once $path . '/Vendor/Twig/Autoloader.php';
- \Twig_Autoloader::register();
-
if (count($options)) {
$this->setConfig($options)
->getEnvironment();
diff --git a/Phrozn/Twig/Loader/String.php b/Phrozn/Twig/Loader/String.php
index <HASH>..<HASH> 100644
--- a/Phrozn/Twig/Loader/String.php
+++ b/Phrozn/Twig/Loader/String.php
@@ -19,7 +19,6 @@
*/
namespace Phrozn\Twig\Loader;
-require_once(dirname(__FILE__) . '/../../Vendor/Twig/Loader/String.php');
/**
* Twig String Loader
|
Composer: Removed hardcoded Twig loaders.
|
diff --git a/lib/faraday/adapter/net_http.rb b/lib/faraday/adapter/net_http.rb
index <HASH>..<HASH> 100644
--- a/lib/faraday/adapter/net_http.rb
+++ b/lib/faraday/adapter/net_http.rb
@@ -17,6 +17,7 @@ module Faraday
Errno::EHOSTUNREACH,
Errno::EINVAL,
Errno::ENETUNREACH,
+ Errno::EPIPE,
Net::HTTPBadResponse,
Net::HTTPHeaderSyntaxError,
Net::ProtocolError,
|
Update net_http.rb (#<I>)
Add recognition of uncaught `Errno::EPIPE: Broken pipe` error to `NET_HTTP_EXCEPTIONS`
|
diff --git a/spec/Suite/Document.spec.php b/spec/Suite/Document.spec.php
index <HASH>..<HASH> 100644
--- a/spec/Suite/Document.spec.php
+++ b/spec/Suite/Document.spec.php
@@ -136,6 +136,26 @@ describe("Document", function() {
});
+ it("returns `null` for undefined field", function() {
+
+ $document = new Document();
+ expect($document->get('value'))->toBe(null);
+ expect($document->get('nested.value'))->toBe(null);
+
+ });
+
+ it("throws an error when the path is invalid", function() {
+
+ $closure = function() {
+ $document = new Document();
+ $document->set('value', 'Hello World');
+ $document->get('value.invalid');
+ };
+
+ expect($closure)->toThrow(new ORMException("The field: `value` is not a valid document or entity."));
+
+ });
+
});
describe("->set()", function() {
diff --git a/src/Document.php b/src/Document.php
index <HASH>..<HASH> 100644
--- a/src/Document.php
+++ b/src/Document.php
@@ -386,6 +386,9 @@ class Document implements DataStoreInterface, HasParentsInterface, \ArrayAccess,
if ($keys) {
$value = $this->get($name);
+ if (!$value) {
+ return;
+ }
if (!$value instanceof DataStoreInterface) {
throw new ORMException("The field: `" . $name . "` is not a valid document or entity.");
}
|
Change `Document.get()` to return the default value when present or `null` when a field doesn't exists.
|
diff --git a/suds/transport/http.py b/suds/transport/http.py
index <HASH>..<HASH> 100644
--- a/suds/transport/http.py
+++ b/suds/transport/http.py
@@ -56,8 +56,9 @@ class HttpTransport(Transport):
def open(self, request):
try:
url = request.url
+ headers = request.headers
log.debug('opening (%s)', url)
- u2request = u2.Request(url)
+ u2request = u2.Request(url, None, headers)
self.proxy = self.options.proxy
return self.u2open(u2request)
except HTTPError as e:
|
Added basic auth support for wsdl download also
|
diff --git a/test.py b/test.py
index <HASH>..<HASH> 100644
--- a/test.py
+++ b/test.py
@@ -1,7 +1,10 @@
+import os
+import arrow
+
from urllib import parse
from tfatool.info import Config, WifiMode, DriveMode
from tfatool.config import config
-from tfatool import command
+from tfatool import command, upload
def test_config_construction():
@@ -62,3 +65,18 @@ def test_command_cgi_url():
url, _ = parse.splitquery(req.url)
assert url == "http://192.168.0.1/command.cgi"
+
+def test_datetime_encode_decode():
+ ctime = os.stat("README.md").st_ctime
+ dtime = arrow.get(ctime)
+
+ # encode to FAT32 time
+ encoded = upload._encode_time(ctime)
+
+ # decode to arrow datetime
+ decoded = command._decode_time(encoded >> 16, encoded & 0xFFFF)
+
+ # accurate down to the second
+ for attr in "year month day hour minute second".split():
+ assert getattr(dtime, attr) == getattr(decoded, attr)
+
|
added unit test for FAT<I> time encode/decode
|
diff --git a/elastic-harvester.js b/elastic-harvester.js
index <HASH>..<HASH> 100644
--- a/elastic-harvester.js
+++ b/elastic-harvester.js
@@ -1046,7 +1046,7 @@ ElasticHarvest.prototype.enableAutoSync= function(){
var _this = this;
if(!!this.harvest_app.options.oplogConnectionString){
console.warn("[Elastic-Harvest] Will sync primary resource data via oplog");
- this.harvest_app.onChange(endpoint,{insert:resourceChanged,update:resourceChanged,delete: resourceDeleted});
+ this.harvest_app.onChange(endpoint,{insert:resourceChanged,update:resourceChanged,delete: resourceDeleted, asyncInMemory: _this.options.asyncInMemory});
function resourceDeleted(resourceId){
_this.delete(resourceId)
.catch(function(error){
|
fixed a but, there is another part in the code where an onChange handler is defined
didn't pass through the asyncInMemory option in that case
|
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,12 +31,12 @@ use Webmozart\Assert\Assert;
class Kernel extends HttpKernel
{
- public const VERSION = '1.4.6';
- public const VERSION_ID = '10406';
+ public const VERSION = '1.4.7-DEV';
+ public const VERSION_ID = '10407';
public const MAJOR_VERSION = '1';
public const MINOR_VERSION = '4';
- public const RELEASE_VERSION = '6';
- public const EXTRA_VERSION = '';
+ public const RELEASE_VERSION = '7';
+ public const EXTRA_VERSION = 'DEV';
public function __construct(string $environment, bool $debug)
{
|
Change application's version to <I>-DEV
|
diff --git a/src/SearchDrivers/BaseSearchDriver.php b/src/SearchDrivers/BaseSearchDriver.php
index <HASH>..<HASH> 100755
--- a/src/SearchDrivers/BaseSearchDriver.php
+++ b/src/SearchDrivers/BaseSearchDriver.php
@@ -72,7 +72,7 @@ abstract class BaseSearchDriver implements SearchDriverInterface
*/
public function query($searchString)
{
- $this->searchString = trim(\DB::connection()->getPdo()->quote($searchString), "'");
+ $this->searchString = substr(substr(\DB::connection()->getPdo()->quote($searchString), 1), 0, -1);
return $this;
}
|
Fix search query with quotes by replacing trim function to substr.
|
diff --git a/molgenis-data-elasticsearch/src/main/java/org/molgenis/data/elasticsearch/ElasticsearchService.java b/molgenis-data-elasticsearch/src/main/java/org/molgenis/data/elasticsearch/ElasticsearchService.java
index <HASH>..<HASH> 100644
--- a/molgenis-data-elasticsearch/src/main/java/org/molgenis/data/elasticsearch/ElasticsearchService.java
+++ b/molgenis-data-elasticsearch/src/main/java/org/molgenis/data/elasticsearch/ElasticsearchService.java
@@ -803,6 +803,10 @@ public class ElasticsearchService implements SearchService, MolgenisTransactionL
}
});
+ if( request.request().getItems().isEmpty() ){
+ return Stream.<Entity>empty();
+ }
+
MultiGetResponse response = request.get();
if (LOG.isDebugEnabled())
|
Fix #<I> Uploading a VCF will throw an error
|
diff --git a/src/extensions/renderer/base/coord-ele-math.js b/src/extensions/renderer/base/coord-ele-math.js
index <HASH>..<HASH> 100644
--- a/src/extensions/renderer/base/coord-ele-math.js
+++ b/src/extensions/renderer/base/coord-ele-math.js
@@ -590,7 +590,7 @@ BRp.getLabelText = function( ele ){
//console.log('wrap');
// save recalc if the label is the same as before
- if( rscratch.labelWrapKey !== undefined && rscratch.labelWrapKey === rscratch.labelKey ){
+ if( rscratch.labelWrapKey && rscratch.labelWrapKey === rscratch.labelKey ){
// console.log('wrap cache hit');
return rscratch.labelWrapCachedText;
}
|
Allow only truthy value instead of just defined
|
diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go
index <HASH>..<HASH> 100644
--- a/cmd/syncthing/gui.go
+++ b/cmd/syncthing/gui.go
@@ -119,12 +119,16 @@ type guiFile scanner.File
func (f guiFile) MarshalJSON() ([]byte, error) {
type t struct {
- Name string
- Size int64
+ Name string
+ Size int64
+ Modified int64
+ Flags uint32
}
return json.Marshal(t{
- Name: f.Name,
- Size: scanner.File(f).Size,
+ Name: f.Name,
+ Size: scanner.File(f).Size,
+ Modified: f.Modified,
+ Flags: f.Flags,
})
}
|
Expose a bit more information about needed file in REST interface
|
diff --git a/lib/Extension/LanguageServerRename/Adapter/ReferenceFinder/ClassMover/ClassRenamer.php b/lib/Extension/LanguageServerRename/Adapter/ReferenceFinder/ClassMover/ClassRenamer.php
index <HASH>..<HASH> 100644
--- a/lib/Extension/LanguageServerRename/Adapter/ReferenceFinder/ClassMover/ClassRenamer.php
+++ b/lib/Extension/LanguageServerRename/Adapter/ReferenceFinder/ClassMover/ClassRenamer.php
@@ -91,7 +91,7 @@ final class ClassRenamer implements Renamer
$oldUri = $this->oldNameToUriConverter->convert($originalName->getFullyQualifiedNameText());
$newUri = $this->newNameToUriConverter->convert($newName);
} catch (CouldNotConvertClassToUri $error) {
- throw new CouldNotRename($e->getMessage(), 0, $error);
+ throw new CouldNotRename($error->getMessage(), 0, $error);
}
if ($newName === $originalName->getFullyQualifiedNameText()) {
|
Fix error when renaming (#<I>)
|
diff --git a/spec/unit/request_spec.rb b/spec/unit/request_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/request_spec.rb
+++ b/spec/unit/request_spec.rb
@@ -660,4 +660,20 @@ describe RestClient::Request do
response.should_not be_nil
response.code.should eq 204
end
+
+ describe "raw response" do
+ it "should read the response into a binary-mode tempfile" do
+ @request = RestClient::Request.new(:method => "get", :url => "example.com", :raw_response => true)
+
+ tempfile = double("tempfile")
+ tempfile.should_receive(:binmode)
+ tempfile.stub(:open)
+ tempfile.stub(:close)
+ Tempfile.should_receive(:new).with("rest-client").and_return(tempfile)
+
+ net_http_res = Net::HTTPOK.new(nil, "200", "body")
+ net_http_res.stub(:read_body).and_return("body")
+ @request.fetch_body(net_http_res)
+ end
+ end
end
|
Test that raw responses are read into a binary-mode tempfile
Re: <URL>
|
diff --git a/pkg/cli/environment.go b/pkg/cli/environment.go
index <HASH>..<HASH> 100644
--- a/pkg/cli/environment.go
+++ b/pkg/cli/environment.go
@@ -95,12 +95,12 @@ func (s *EnvSettings) EnvVars() map[string]string {
"HELM_REGISTRY_CONFIG": s.RegistryConfig,
"HELM_REPOSITORY_CACHE": s.RepositoryCache,
"HELM_REPOSITORY_CONFIG": s.RepositoryConfig,
- "HELM_NAMESPACE": s.Namespace,
+ "HELM_NAMESPACE": s.Namespace(),
"HELM_KUBECONTEXT": s.KubeContext,
}
- if s.KubeConfig != "" {
- envvars["KUBECONFIG"] = s.KubeConfig
+ if s.kubeConfig != "" {
+ envvars["KUBECONFIG"] = s.kubeConfig
}
return envvars
|
fix(cli): Fixes incorrect variable reference
Because these were additions, git didn't pick up that the recent refactor of
env settings had changed some of the variables. This fixes those small changes
|
diff --git a/src/org/opencms/xml/A_CmsXmlDocument.java b/src/org/opencms/xml/A_CmsXmlDocument.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/xml/A_CmsXmlDocument.java
+++ b/src/org/opencms/xml/A_CmsXmlDocument.java
@@ -289,9 +289,17 @@ public abstract class A_CmsXmlDocument implements I_CmsXmlDocument {
// if it's a multiple choice element, the child elements must not be sorted into their types,
// but must keep their original order
if (isMultipleChoice) {
+ List<Element> nodeList = new ArrayList<Element>();
List<Element> elements = CmsXmlGenericWrapper.elements(root);
- checkMaxOccurs(elements, cd.getChoiceMaxOccurs(), cd.getTypeName());
- nodeLists.add(elements);
+ Set<String> typeNames = cd.getSchemaTypes();
+ for (Element element : elements) {
+ // check if the node type is still in the definition
+ if (typeNames.contains(element.getName())) {
+ nodeList.add(element);
+ }
+ }
+ checkMaxOccurs(nodeList, cd.getChoiceMaxOccurs(), cd.getTypeName());
+ nodeLists.add(nodeList);
}
// if it's a sequence, the children are sorted according to the sequence type definition
else {
|
Improved Fix for issue #<I>: Filter elements no longer contained in the choice definition
|
diff --git a/tests/Routing/RouteTest.php b/tests/Routing/RouteTest.php
index <HASH>..<HASH> 100644
--- a/tests/Routing/RouteTest.php
+++ b/tests/Routing/RouteTest.php
@@ -419,7 +419,7 @@ class RouteTest extends TestCase
$responseProphecy = $this->prophesize(ResponseInterface::class);
$callableResolverProphecy = $this->prophesize(CallableResolverInterface::class);
- $callable = 'callableWhatever';
+ $callable = 'callable';
$callableResolverProphecy
->resolve(Argument::is($callable))
|
Rename test callable to make it clear that Callable:toCall is not expected to be called
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,9 +2,9 @@
# Generated by jaraco.develop (https://bitbucket.org/jaraco/jaraco.develop)
import setuptools
-with open('README.txt') as readme:
+with open('README.txt', encoding='utf-8') as readme:
long_description = readme.read()
-with open('CHANGES.txt') as changes:
+with open('CHANGES.txt', encoding='utf-8') as changes:
long_description += '\n\n' + changes.read()
setup_params = dict(
|
Seems some platforms (*glares at Ubuntu*) have Python <I> default to ASCII. It's a sad, sad day for text.
|
diff --git a/helpers.py b/helpers.py
index <HASH>..<HASH> 100644
--- a/helpers.py
+++ b/helpers.py
@@ -362,7 +362,7 @@ def find_project_by_short_name(short_name, pbclient, all=None):
def check_api_error(api_response):
"""Check if returned API response contains an error."""
- if 'status' not in api_response:
+ if type(api_response) == dict and 'status' not in api_response:
msg = "Unable to find 'status' in server response; Misconfigured URL?"
print(msg)
print("Server response: %s" % api_response)
@@ -382,6 +382,7 @@ def check_api_error(api_response):
raise TaskNotFound(message='PyBossa Task not found',
error=api_response)
else:
+ print("Server response: %s" % api_response)
raise exceptions.HTTPError
|
Better robustness check; Force printing of HTTP response in case of general HTTPError
|
diff --git a/pymongo/bson.py b/pymongo/bson.py
index <HASH>..<HASH> 100644
--- a/pymongo/bson.py
+++ b/pymongo/bson.py
@@ -36,6 +36,12 @@ try:
except ImportError:
_use_c = False
+try:
+ import uuid
+ _use_uuid = True
+except ImportError:
+ _use_uuid = False
+
def _get_int(data):
try:
@@ -256,12 +262,8 @@ def _get_binary(data):
if length2 != length - 4:
raise InvalidBSON("invalid binary (st 2) - lengths don't match!")
length = length2
- if subtype == 3:
- try:
- import uuid
- return (uuid.UUID(bytes=data[:length]), data[length:])
- except ImportError:
- pass
+ if subtype == 3 and _use_uuid:
+ return (uuid.UUID(bytes=data[:length]), data[length:])
return (Binary(data[:length], subtype), data[length:])
|
only try importing uuid once
|
diff --git a/go/client/fork_server.go b/go/client/fork_server.go
index <HASH>..<HASH> 100644
--- a/go/client/fork_server.go
+++ b/go/client/fork_server.go
@@ -144,6 +144,7 @@ func makeServerCommandLine(g *libkb.GlobalContext, cl libkb.CommandLine,
"no-debug",
"api-dump-unsafe",
"plain-logging",
+ "disable-cert-pinning",
}
strings := []string{
@@ -166,7 +167,6 @@ func makeServerCommandLine(g *libkb.GlobalContext, cl libkb.CommandLine,
"tor-proxy",
"tor-hidden-address",
"proxy-type",
- "disable-cert-pinning",
}
args = append(args, arg0)
|
Use correct type for --disable-cert-pinning command line flag in server spawn (#<I>)
|
diff --git a/hotdoc/core/formatter.py b/hotdoc/core/formatter.py
index <HASH>..<HASH> 100644
--- a/hotdoc/core/formatter.py
+++ b/hotdoc/core/formatter.py
@@ -528,7 +528,8 @@ class Formatter(Configurable):
'link_title': title})
return out
- def _format_type_tokens(self, type_tokens):
+ # pylint: disable=unused-argument
+ def _format_type_tokens(self, symbol, type_tokens):
out = ''
link_before = False
@@ -556,7 +557,7 @@ class Formatter(Configurable):
out = ""
if isinstance(symbol, QualifiedSymbol):
- out += self._format_type_tokens(symbol.type_tokens)
+ out += self._format_type_tokens(symbol, symbol.type_tokens)
# FIXME : ugly
elif hasattr(symbol, "link") and type(symbol) != FieldSymbol:
@@ -568,7 +569,7 @@ class Formatter(Configurable):
out += ' ' + symbol.argname
elif type(symbol) == FieldSymbol and symbol.member_name:
- out += self._format_type_tokens(symbol.qtype.type_tokens)
+ out += self._format_type_tokens(symbol, symbol.qtype.type_tokens)
if symbol.is_function_pointer:
out = ""
|
Pass currenly formatting symbol to _format_type_token
To give some context to subclasses, as, for example in the GIFormatte
needs to know in what language it is formatting
|
diff --git a/troposphere/firehose.py b/troposphere/firehose.py
index <HASH>..<HASH> 100644
--- a/troposphere/firehose.py
+++ b/troposphere/firehose.py
@@ -136,13 +136,22 @@ class ExtendedS3DestinationConfiguration(AWSProperty):
}
+class KinesisStreamSourceConfiguration(AWSProperty):
+ props = {
+ 'KinesisStreamARN': (basestring, True),
+ 'RoleARN': (basestring, True)
+ }
+
+
class DeliveryStream(AWSObject):
resource_type = "AWS::KinesisFirehose::DeliveryStream"
props = {
'DeliveryStreamName': (basestring, False),
+ 'DeliveryStreamType': (basestring, False),
'ElasticsearchDestinationConfiguration': (ElasticsearchDestinationConfiguration, False), # noqa
'ExtendedS3DestinationConfiguration': (ExtendedS3DestinationConfiguration, False), # noqa
+ 'KinesisStreamSourceConfiguration': (KinesisStreamSourceConfiguration, False), # noqa
'RedshiftDestinationConfiguration': (RedshiftDestinationConfiguration, False), # noqa
'S3DestinationConfiguration': (S3DestinationConfiguration, False),
}
|
Adding kinesis stream source to firehose (#<I>)
|
diff --git a/bin/prettier.js b/bin/prettier.js
index <HASH>..<HASH> 100755
--- a/bin/prettier.js
+++ b/bin/prettier.js
@@ -33,6 +33,13 @@ if (!filenames.length && !stdin) {
process.exit(1);
}
+function formatWithShebang(input) {
+ const index = input.indexOf("\n");
+ const shebang = input.slice(0, index + 1);
+ const programInput = input.slice(index + 1);
+ return shebang + format(programInput);
+}
+
function format(input) {
return jscodefmt.format(input, {
printWidth: argv["print-width"],
@@ -70,7 +77,7 @@ if (stdin) {
let output;
try {
- output = format(input);
+ output = input.startsWith("#!") ? formatWithShebang(input) : format(input);
} catch (e) {
process.exitCode = 2;
console.error(e);
|
treat shebang outside of parsing (#<I>)
* treat shebang outside of parsing
* use less costly indexOf and reuse format function
* avoid reprinting new line and potential double space at start
* move options back to format function
|
diff --git a/src/Serializers/Entity.php b/src/Serializers/Entity.php
index <HASH>..<HASH> 100644
--- a/src/Serializers/Entity.php
+++ b/src/Serializers/Entity.php
@@ -31,7 +31,7 @@ class Entity {
*/
protected function getSkeleton() : array {
return [
- 'app' => [
+ 'service' => [
'name' => $this->config->get( 'appName' ),
'version' => $this->config->get( 'appVersion' ),
'pid' => getmypid(),
|
APM Server <I> now looks for a service key
|
diff --git a/src/Codeception/Lib/Connector/Lumen.php b/src/Codeception/Lib/Connector/Lumen.php
index <HASH>..<HASH> 100644
--- a/src/Codeception/Lib/Connector/Lumen.php
+++ b/src/Codeception/Lib/Connector/Lumen.php
@@ -106,7 +106,12 @@ class Lumen extends Client
}
$this->app = $this->kernel = require $this->module->config['bootstrap_file'];
-
+
+ // in version 5.6.*, lumen introduced the same design pattern like Laravel
+ // to load all service provider we need to call on Laravel\Lumen\Application::boot()
+ if (method_exists($this->app, 'boot')) {
+ $this->app->boot();
+ }
// Lumen registers necessary bindings on demand when calling $app->make(),
// so here we force the request binding before registering our own request object,
// otherwise Lumen will overwrite our request object.
|
[Lumen] add support for Laravel\Lumen\Application::boot
in version <I>.*, lumen introduced the same design pattern like Laravel
@see <URL>
|
diff --git a/lib/jekyll-admin/data_file.rb b/lib/jekyll-admin/data_file.rb
index <HASH>..<HASH> 100644
--- a/lib/jekyll-admin/data_file.rb
+++ b/lib/jekyll-admin/data_file.rb
@@ -30,7 +30,7 @@ module JekyllAdmin
# Returns unparsed content as it exists on disk
def raw_content
- @raw_content ||= File.read(absolute_path)
+ @raw_content ||= File.open(absolute_path, "r:UTF-8", &:read)
end
# Returnes (re)parsed content using Jekyll's native parsing mechanism
|
read raw_content in UTF-8
|
diff --git a/lib/sprockets/environment.rb b/lib/sprockets/environment.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/environment.rb
+++ b/lib/sprockets/environment.rb
@@ -24,8 +24,6 @@ module Sprockets
attr_accessor :logger
- attr_accessor :css_compressor, :js_compressor
-
def initialize(root = ".")
@trail = Hike::Trail.new(root)
engine_extensions.replace(DEFAULT_ENGINE_EXTENSIONS + CONCATENATABLE_EXTENSIONS)
@@ -33,14 +31,30 @@ module Sprockets
@logger = Logger.new($stderr)
@logger.level = Logger::FATAL
- @cache = {}
- @lock = nil
-
+ @lock = nil
@static_root = nil
+ expire_cache
+
@server = Server.new(self)
end
+ def expire_cache
+ @cache = {}
+ end
+
+ attr_reader :css_compressor, :js_compressor
+
+ def css_compressor=(compressor)
+ expire_cache
+ @css_compressor = compressor
+ end
+
+ def js_compressor=(compressor)
+ expire_cache
+ @js_compressor = compressor
+ end
+
def use_default_compressors
begin
require 'yui/compressor'
@@ -71,6 +85,7 @@ module Sprockets
end
def static_root=(root)
+ expire_cache
@static_root = root ? ::Pathname.new(root) : nil
end
|
Expire cache when static root or compressors are updated
|
diff --git a/urbansim/server/urbansimd.py b/urbansim/server/urbansimd.py
index <HASH>..<HASH> 100644
--- a/urbansim/server/urbansimd.py
+++ b/urbansim/server/urbansimd.py
@@ -1,3 +1,4 @@
+import inspect
import os
import sys
@@ -10,7 +11,7 @@ from bottle import route, run, response, hook, request
from cStringIO import StringIO
from urbansim.utils import misc, yamlio
-import inspect
+# should be a local file
import models
|
removing compile route
The model templates no longer exist so the compile route no longer exists.
|
diff --git a/aeron-samples/src/main/java/io/aeron/samples/archive/EmbeddedReplayThroughput.java b/aeron-samples/src/main/java/io/aeron/samples/archive/EmbeddedReplayThroughput.java
index <HASH>..<HASH> 100644
--- a/aeron-samples/src/main/java/io/aeron/samples/archive/EmbeddedReplayThroughput.java
+++ b/aeron-samples/src/main/java/io/aeron/samples/archive/EmbeddedReplayThroughput.java
@@ -50,7 +50,6 @@ public class EmbeddedReplayThroughput implements AutoCloseable
private static final String CHANNEL = SampleConfiguration.CHANNEL;
private static final FragmentHandler NOOP_FRAGMENT_HANDLER = (buffer, offset, length, header) -> {};
-
private MediaDriver driver;
private Archive archive;
private Aeron aeron;
@@ -75,7 +74,7 @@ public class EmbeddedReplayThroughput implements AutoCloseable
do
{
- System.out.println("Replaying " + NUMBER_OF_MESSAGES + " messages");
+ System.out.printf("Replaying %,d messages%n", NUMBER_OF_MESSAGES);
final long start = System.currentTimeMillis();
test.replayRecording(recordingLength, recordingId);
|
[Java] Output formatting.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.