diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/hancock-client.rb b/lib/hancock-client.rb
index <HASH>..<HASH> 100644
--- a/lib/hancock-client.rb
+++ b/lib/hancock-client.rb
@@ -13,13 +13,9 @@ module Hancock
module Client
class Default < ::Sinatra::Default
enable :sessions
- cattr_accessor :sso_url
+ set :sso_url, nil
register Sinatra::Hancock::SSO
-
- def self.sso_configure(&block)
- yield self
- end
end
end
end
|
move from a cattr_accessor to the built in sinatra configuration options
|
diff --git a/msm/util.py b/msm/util.py
index <HASH>..<HASH> 100644
--- a/msm/util.py
+++ b/msm/util.py
@@ -97,7 +97,7 @@ class cached_property(object):
return self
def __get__(self, inst, owner):
- now = time.time()
+ now = time.monotonic()
try:
value, last_update = inst._cache[self.__name__]
if self.ttl > 0 and now - last_update > self.ttl:
|
changed cached property recipe to use time.monotonic instead of time.time
|
diff --git a/lib/natural/classifiers/classifier.js b/lib/natural/classifiers/classifier.js
index <HASH>..<HASH> 100644
--- a/lib/natural/classifiers/classifier.js
+++ b/lib/natural/classifiers/classifier.js
@@ -34,6 +34,15 @@ var Classifier = function(classifier, stemmer) {
};
function addDocument(text, classification) {
+
+ // Ignore further processing if classification is undefined
+ if(typeof classification === 'undefined') return;
+
+ // If classification is type of string then make sure it's dosen't have blank space at both end
+ if(typeof classification === 'sytring'){
+ classification = classification.trim();
+ }
+
if(typeof text === 'string')
text = this.stemmer.tokenizeAndStem(text);
|
Checked for undefined and blank spaces in label
Added check for undefined and blank spaces at in string (beginning and end) in classification label
|
diff --git a/productmd/composeinfo.py b/productmd/composeinfo.py
index <HASH>..<HASH> 100644
--- a/productmd/composeinfo.py
+++ b/productmd/composeinfo.py
@@ -22,6 +22,12 @@
This module provides classes for manipulating composeinfo.json files.
composeinfo.json files provide details about composes which includes
product information, variants, architectures and paths.
+
+Example::
+
+ import productmd.compose
+ compose = productmd.compose.Compose("/path/to/compose")
+ print(compose.info.compose.id) # prints "Fedora-Rawhide-20180616.n.0"
"""
@@ -238,6 +244,12 @@ def cmp_label(label1, label2):
class Compose(productmd.common.MetadataBase):
+ """
+ This class represents the top level of metadata for a compose.
+
+ It provides access to general information about the compose (ID, type,
+ date, etc.) and structures with RPMs and images.
+ """
def __init__(self, metadata):
super(Compose, self).__init__()
|
composeinfo: add docs for Compose class
Document what the composeinfo.Compose class is and how to use it.
|
diff --git a/kafka/protocol/types.py b/kafka/protocol/types.py
index <HASH>..<HASH> 100644
--- a/kafka/protocol/types.py
+++ b/kafka/protocol/types.py
@@ -155,6 +155,8 @@ class Array(AbstractType):
raise ValueError('Array instantiated with no array_of type')
def encode(self, items):
+ if items is None:
+ return Int32.encode(-1)
return b''.join(
[Int32.encode(len(items))] +
[self.array_of.encode(item) for item in items]
@@ -162,7 +164,11 @@ class Array(AbstractType):
def decode(self, data):
length = Int32.decode(data)
+ if length == -1:
+ return None
return [self.array_of.decode(data) for _ in range(length)]
def repr(self, list_of_items):
+ if list_of_items is None:
+ return 'NULL'
return '[' + ', '.join([self.array_of.repr(item) for item in list_of_items]) + ']'
|
Add protocol support for null Arrays
|
diff --git a/core/Version.php b/core/Version.php
index <HASH>..<HASH> 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -21,5 +21,5 @@ final class Version
* The current Piwik version.
* @var string
*/
- const VERSION = '2.8.2';
+ const VERSION = '2.8.3';
}
|
<I> - so much progress
|
diff --git a/py/setup.py b/py/setup.py
index <HASH>..<HASH> 100755
--- a/py/setup.py
+++ b/py/setup.py
@@ -32,7 +32,7 @@ setup_args = {
'description': 'Python bindings for Selenium',
'long_description': open(join(abspath(dirname(__file__)), "README.rst")).read(),
'url': 'https://github.com/SeleniumHQ/selenium/',
- 'python_requires': '~=3.7.*',
+ 'python_requires': '~=3.7',
'classifiers': ['Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
|
[py] Fix flake8 error on setup.py
|
diff --git a/cerberus/platform.py b/cerberus/platform.py
index <HASH>..<HASH> 100644
--- a/cerberus/platform.py
+++ b/cerberus/platform.py
@@ -3,9 +3,9 @@
import sys
-if sys.version_info[0] == 3:
- _str_type = str
- _int_types = (int,)
-else:
+if sys.version_info[0] == 2:
_str_type = basestring # noqa
_int_types = (int, long) # noqa
+else:
+ _str_type = str
+ _int_types = (int,)
|
Makes the software ready for Python 4
|
diff --git a/lib/Buzz/Message/FormUpload.php b/lib/Buzz/Message/FormUpload.php
index <HASH>..<HASH> 100644
--- a/lib/Buzz/Message/FormUpload.php
+++ b/lib/Buzz/Message/FormUpload.php
@@ -105,6 +105,10 @@ class FormUpload extends AbstractMessage
private function detectContentType()
{
+ if (!class_exists('finfo')) {
+ return false;
+ }
+
$finfo = new \finfo(FILEINFO_MIME_TYPE);
return $this->file ? $finfo->file($this->file) : $finfo->buffer(parent::getContent());
|
Added a check as fileinfo is not enabled by default on Windows
|
diff --git a/src/app/panels/graph/graph.js b/src/app/panels/graph/graph.js
index <HASH>..<HASH> 100755
--- a/src/app/panels/graph/graph.js
+++ b/src/app/panels/graph/graph.js
@@ -115,7 +115,12 @@ function (angular, $, kbn, moment, _, GraphTooltip) {
var series = data[i];
var axis = yaxis[series.yaxis - 1];
var formater = kbn.valueFormats[scope.panel.y_formats[series.yaxis - 1]];
- series.updateLegendValues(formater, axis.tickDecimals, axis.scaledDecimals + 2);
+
+ // legend and tooltip gets one more decimal precision
+ // than graph legend ticks
+ var tickDecimals = (axis.tickDecimals || -1) + 1;
+
+ series.updateLegendValues(formater, tickDecimals, axis.scaledDecimals + 2);
if(!scope.$$phase) { scope.$digest(); }
}
}
|
Graph: improved decimal precision in legend and graph hover when graph ticks use single decimal point, now graph legend and tooltip always use one more decimal precision than axis ticks (if axis ticks has decimals), Fixes #<I>
|
diff --git a/app/models/content.rb b/app/models/content.rb
index <HASH>..<HASH> 100644
--- a/app/models/content.rb
+++ b/app/models/content.rb
@@ -360,6 +360,7 @@ class Object
end
class ContentTextHelpers
+ include ActionView::Helpers::UrlHelper
include ActionView::Helpers::TagHelper
include ActionView::Helpers::SanitizeHelper
include ActionView::Helpers::TextHelper
|
after upgrading a Typo <I> blog to <I>.x the blog was "getting ActionView::TemplateError: undefined method `mail_to' for ContentTextHelpers" errors for any rss request, mail_to is in ActionView::Helpers::UrlHelper
|
diff --git a/demo/src/demos/SMAADemo.js b/demo/src/demos/SMAADemo.js
index <HASH>..<HASH> 100644
--- a/demo/src/demos/SMAADemo.js
+++ b/demo/src/demos/SMAADemo.js
@@ -244,11 +244,11 @@ export class SMAADemo extends Demo {
controls.settings.translation.enabled = false;
controls.settings.sensitivity.zoom = 1.0;
controls.lookAt(scene.position);
- controls.setEnabled(false);
this.controls = controls;
const controls2 = controls.clone();
controls2.setDom(rendererAA.domElement);
+ controls2.setEnabled(false);
this.controls2 = controls2;
// Sky.
|
Fixed a minor control state issue.
|
diff --git a/src/nwmatcher.js b/src/nwmatcher.js
index <HASH>..<HASH> 100644
--- a/src/nwmatcher.js
+++ b/src/nwmatcher.js
@@ -482,7 +482,7 @@ NW.Dom = (function(global) {
var i = -1, element, elements, node;
from || (from = doc);
id = id.replace(/\\/g, '');
- if (from.getElementById) {
+ if (!isXMLDocument && from.getElementById) {
if ((element = from.getElementById(id)) &&
id != getAttribute(element, 'id') && from.getElementsByName) {
elements = from.getElementsByName(id);
|
avoid querying XML documents by id also if they seems to exposes an usable GEBID method
|
diff --git a/cellpy/cli.py b/cellpy/cli.py
index <HASH>..<HASH> 100644
--- a/cellpy/cli.py
+++ b/cellpy/cli.py
@@ -352,6 +352,7 @@ def _check_import_pyodbc():
print(" checking existence of mdb-export")
import subprocess
sub_process_path = "mdb-export"
+
try:
x = subprocess.check_output(["command", "-v", sub_process_path])
if x:
@@ -364,6 +365,7 @@ def _check_import_pyodbc():
print(" - but cannot find it!")
return False
return True
+
except AssertionError:
print(" - not found")
return False
@@ -455,7 +457,10 @@ def _check():
check_funcs = [_check_import_cellpy, _check_import_pyodbc]
for ct, cf in zip(check_types, check_funcs):
- failed_checks += sub_check(ct, cf)
+ try:
+ failed_checks += sub_check(ct, cf)
+ except Exception as e:
+ click.echo(f"[cellpy] check raised an exception ({e})")
number_of_checks += 1
click.echo(
|
Travis did not like my check - so surrounded it with a try except clause
|
diff --git a/lib/ui/dropdown/dropdown.js b/lib/ui/dropdown/dropdown.js
index <HASH>..<HASH> 100644
--- a/lib/ui/dropdown/dropdown.js
+++ b/lib/ui/dropdown/dropdown.js
@@ -113,7 +113,10 @@
return result.id;
};
+ // Wrapper around the query function for Select2. When the promise resolves
+ // the callback
this.query = function(options) {
+
self.queryFn(options).then(function(response) {
// Callback function that should be called with the result object. The result object:
@@ -124,7 +127,8 @@
// key if hierarchical data is displayed. The object may also contain a disabled
// boolean property indicating whether this result can be selected.
//
- // result.more (boolean) - true if more results are available for the current search term.
+ // result.more (boolean) - true if more results are available for the current
+ // search term.
//
// results.context (object) - A user-defined object that should be made available
// as the context parameter to the query function on subsequent queries to load
|
more docs for select2 remote data integration
|
diff --git a/lib/fog/google/requests/storage/get_bucket_acl.rb b/lib/fog/google/requests/storage/get_bucket_acl.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/google/requests/storage/get_bucket_acl.rb
+++ b/lib/fog/google/requests/storage/get_bucket_acl.rb
@@ -1,6 +1,6 @@
module Fog
- module Google
- class Storage
+ module Storage
+ class Google
class Real
require 'fog/google/parsers/storage/access_control_list'
|
fix get_bucket_acl request method in Google Cloud Storage
|
diff --git a/lib/linguist/generated.rb b/lib/linguist/generated.rb
index <HASH>..<HASH> 100644
--- a/lib/linguist/generated.rb
+++ b/lib/linguist/generated.rb
@@ -302,7 +302,7 @@ module Linguist
return false unless extname == '.go'
return false unless lines.count > 1
- return lines.first(10).any? { |l| l.include? "Code generated by" }
+ return lines.first(40).any? { |l| l.include? "Code generated by" }
end
PROTOBUF_EXTENSIONS = ['.py', '.java', '.h', '.cc', '.cpp', '.m', '.rb', '.php']
|
Bump line limit for generated_go (#<I>)
In some cases (e.g. the Cilium project) the `Code generated by` comment
appears after a license header. This header might be longer than <I>
lines which generated_go currently searches for this comment.
Bump the limit to <I> lines (roughly corresponding to the length of the
BSD 4-clause header + some slack) to detect these cases.
Suggested by Paul Chaignon in
<URL>
|
diff --git a/packages/dai-plugin-governance/src/GovQueryApiService.js b/packages/dai-plugin-governance/src/GovQueryApiService.js
index <HASH>..<HASH> 100644
--- a/packages/dai-plugin-governance/src/GovQueryApiService.js
+++ b/packages/dai-plugin-governance/src/GovQueryApiService.js
@@ -119,8 +119,8 @@ export default class QueryApi extends PublicService {
}
}`;
const response = await this.getQueryResponse(this.serverUrl, query);
- if (!response.currentVote.nodes[0]) return null;
- return response.currentVote.nodes[0].optionIdRaw;
+ if (!response.currentVoteRankedChoice.nodes[0]) return null;
+ return response.currentVoteRankedChoice.nodes[0].optionIdRaw;
}
async getBlockNumber(unixTime) {
|
check currentVoteRankedChoice in current vote ranked choice response
|
diff --git a/hazelcast/src/main/java/com/hazelcast/map/mapstore/writebehind/SynchronizedWriteBehindQueue.java b/hazelcast/src/main/java/com/hazelcast/map/mapstore/writebehind/SynchronizedWriteBehindQueue.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/map/mapstore/writebehind/SynchronizedWriteBehindQueue.java
+++ b/hazelcast/src/main/java/com/hazelcast/map/mapstore/writebehind/SynchronizedWriteBehindQueue.java
@@ -20,9 +20,11 @@ import java.util.Collection;
import java.util.List;
/**
- * Thread safe write behind queue.
+ * Wrapper for a not thread safe {@link WriteBehindQueue},
+ * only provides thread-safe access, if all accesses to the underlying wrapped {@link WriteBehindQueue}
+ * are from an instance of this wrapper sync queue.
*
- * @param <E>
+ * @param <E> Type of entry to be stored.
*/
class SynchronizedWriteBehindQueue<E> implements WriteBehindQueue<E> {
|
fix javadoc to clarify thread safe access guarantees to wrapped write-behind-queue
|
diff --git a/script/publish-to-npm.js b/script/publish-to-npm.js
index <HASH>..<HASH> 100644
--- a/script/publish-to-npm.js
+++ b/script/publish-to-npm.js
@@ -121,8 +121,8 @@ new Promise((resolve, reject) => {
}
const currentJson = JSON.stringify(fs.readFileSync(path.join(tempDir, 'package.json'), 'utf8'))
- currentJson.name = '@electron/nightly'
- rootPackageJson.name = '@electron/nightly'
+ currentJson.name = 'electron-nightly'
+ rootPackageJson.name = 'electron-nightly'
fs.writeFileSync(
path.join(tempDir, 'package.json'),
|
chore: @electron/nightly => electron-nightly (#<I>)
|
diff --git a/metricdef/metricdef_es.go b/metricdef/metricdef_es.go
index <HASH>..<HASH> 100644
--- a/metricdef/metricdef_es.go
+++ b/metricdef/metricdef_es.go
@@ -200,7 +200,7 @@ func (d *DefsEs) processEsResponse(body []byte) error {
return err
}
if response.Errors {
- log.Warn("ES: Bulk Insertion: some operations failed. to be retried.")
+ log.Debug("ES: Bulk Insertion: some operations failed. to be retried.")
} else {
log.Debug("ES: Bulk Insertion: all operations succeeded")
}
|
only need to see this in debug mode. we have metrics to report these
- very common - types of issues
|
diff --git a/sportsreference/nfl/schedule.py b/sportsreference/nfl/schedule.py
index <HASH>..<HASH> 100644
--- a/sportsreference/nfl/schedule.py
+++ b/sportsreference/nfl/schedule.py
@@ -104,8 +104,9 @@ class Game(object):
The boxscore is embedded within the HTML tag and needs a special
parsing scheme in order to be extracted.
"""
- boxscore = game_data('td[data-stat="box_score_text"]:first')
+ boxscore = game_data('td[data-stat="boxscore_word"]:first')
boxscore = re.sub(r'.*/boxscores/', '', str(boxscore))
+ boxscore = re.sub(r'\.htm.*', '', str(boxscore))
setattr(self, '_boxscore', boxscore)
def _parse_game_data(self, game_data):
|
Fix issue parsing NFL boxscores
|
diff --git a/sklearn_porter/utils/Environment.py b/sklearn_porter/utils/Environment.py
index <HASH>..<HASH> 100644
--- a/sklearn_porter/utils/Environment.py
+++ b/sklearn_porter/utils/Environment.py
@@ -58,8 +58,13 @@ class Environment(object):
"""Get information from the system and local environment."""
@staticmethod
+ def read_python_version():
+ """Return the local Python version."""
+ return sys.version_info[:3]
+
+ @staticmethod
def read_sklearn_version():
- """Determine the installed version of scikit-learn."""
+ """Return the local scikit-learn version."""
from sklearn import __version__ as sklearn_ver
sklearn_ver = str(sklearn_ver).split('.')
sklearn_ver = [int(v) for v in sklearn_ver]
|
release/<I>: Move 'read_python_version' to Environment class
|
diff --git a/blocks/recent_activity/block_recent_activity.php b/blocks/recent_activity/block_recent_activity.php
index <HASH>..<HASH> 100644
--- a/blocks/recent_activity/block_recent_activity.php
+++ b/blocks/recent_activity/block_recent_activity.php
@@ -31,6 +31,10 @@ class block_recent_activity extends block_base {
return $this->content;
}
-}
+ function applicable_formats() {
+ require_once($GLOBALS['CFG']->dirroot.'/my/pagelib.php');
+ return array('all' => true, MY_MOODLE_FORMAT => false);
+ }
+}
?>
|
Recent activity block shouldn't go into my moode
|
diff --git a/samplers/parser.go b/samplers/parser.go
index <HASH>..<HASH> 100644
--- a/samplers/parser.go
+++ b/samplers/parser.go
@@ -162,16 +162,14 @@ func ParseMetricSSF(metric *ssf.SSFSample) (UDPMetric, error) {
tempTags := make([]string, 0)
for key, value := range metric.Tags {
if key == "veneurlocalonly" {
- // delete the tag from the list
ret.Scope = LocalOnly
- break
- } else if key == "veneurglobalonly" {
- // delete the tag from the list
+ continue
+ }
+ if key == "veneurglobalonly" {
ret.Scope = GlobalOnly
- break
- } else {
- tempTags = append(tempTags, fmt.Sprintf("%s:%s", key, value))
+ continue
}
+ tempTags = append(tempTags, fmt.Sprintf("%s:%s", key, value))
}
sort.Strings(tempTags)
ret.Tags = tempTags
|
In translating tags, don't break on veneur meta tags
This should make veneur not truncate the list of tags translated from
SSF samples as soon as it hits (at some arbitrary point) the tags
"veneurglobalonly" and "veneurlocalonly".
|
diff --git a/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java b/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java
+++ b/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java
@@ -43,8 +43,10 @@ import org.hamcrest.TypeSafeMatcher;
* @since 2.0
*
* @todo #794:30min Implement describeMismatchSafely and cover mismatch
- * descriptions with relevant test cases. It should show, what was
- * expected and what was actually in the body for clear understanding.
+ * descriptions with relevant test cases. Update describeTo implementation
+ * to be more informative and add relevant test cases for that. Both should
+ * show, what was expected, what was actually in the body and text description
+ * for clear understanding.
*/
public abstract class AbstractHmTextBody<T> extends TypeSafeMatcher<T> {
|
#<I> Modify puzzle to update the describeTo as well
|
diff --git a/plugins/Goals/Archiver.php b/plugins/Goals/Archiver.php
index <HASH>..<HASH> 100644
--- a/plugins/Goals/Archiver.php
+++ b/plugins/Goals/Archiver.php
@@ -13,6 +13,7 @@ use Piwik\DataAccess\LogAggregator;
use Piwik\DataArray;
use Piwik\DataTable;
use Piwik\Metrics;
+use Piwik\Plugin\Manager;
use Piwik\Tracker\GoalManager;
use Piwik\Plugins\VisitFrequency\API as VisitFrequencyAPI;
@@ -96,7 +97,10 @@ class Archiver extends \Piwik\Plugin\Archiver
public function aggregateDayReport()
{
$this->aggregateGeneralGoalMetrics();
- $this->aggregateEcommerceItems();
+
+ if (Manager::getInstance()->isPluginActivated('Ecommerce')) {
+ $this->aggregateEcommerceItems();
+ }
$this->getProcessor()->processDependentArchive('Goals', VisitFrequencyAPI::NEW_VISITOR_SEGMENT);
$this->getProcessor()->processDependentArchive('Goals', VisitFrequencyAPI::RETURNING_VISITOR_SEGMENT);
|
Archive ecommerce items only if Ecommerce plugin is enabled (#<I>)
|
diff --git a/gems/__init__.py b/gems/__init__.py
index <HASH>..<HASH> 100644
--- a/gems/__init__.py
+++ b/gems/__init__.py
@@ -2,7 +2,7 @@
__author__ = 'Blake Printy'
__email__ = 'bprinty@gmail.com'
-__version__ = '0.3.2'
+__version__ = '0.3.3'
from .datatypes import composite
|
incremented patch version for new methods
|
diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/Configuration.php
+++ b/DependencyInjection/Configuration.php
@@ -34,7 +34,7 @@ class Configuration implements ConfigurationInterface
->ifNotInArray(array('object', 'array'))
->thenInvalid('Invalid return_type "%s"')
->end()
- ->info('Whether to return mailchimp API return values as object (default) or as array')
+ ->info('Whether to return MailChimp API return values as object (default) or as array')
->end()
->end();
|
fixed typo - MailChimp vs. mailchimp
|
diff --git a/udiskie/mount.py b/udiskie/mount.py
index <HASH>..<HASH> 100644
--- a/udiskie/mount.py
+++ b/udiskie/mount.py
@@ -727,7 +727,8 @@ class DeviceActions(object):
"""Return an iterable over all available methods the device has."""
if device.is_filesystem:
if device.is_mounted:
- yield 'browse'
+ if self._mounter._browser:
+ yield 'browse'
yield 'unmount'
else:
yield 'mount'
|
Don't report 'browse' action if unavailable
This influences the tray icon and can potentially fix the behaviour of
shown actions in the device_added notification.
|
diff --git a/examples/index.js b/examples/index.js
index <HASH>..<HASH> 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -44,4 +44,6 @@ async function init() {
});
}
-init().catch(logger.error);
+if (require.main === module) {
+ init().catch(logger.error);
+}
|
fix: run the examples as a module, or as a main entry point
|
diff --git a/lib/amq/protocol/version.rb b/lib/amq/protocol/version.rb
index <HASH>..<HASH> 100644
--- a/lib/amq/protocol/version.rb
+++ b/lib/amq/protocol/version.rb
@@ -1,5 +1,5 @@
module AMQ
module Protocol
- VERSION = "1.1.0"
+ VERSION = "1.2.0.pre1"
end # Protocol
end # AMQ
|
Now working on <I>.pre1
|
diff --git a/database/migrations/2016_09_02_153301_create_love_likes_table.php b/database/migrations/2016_09_02_153301_create_love_likes_table.php
index <HASH>..<HASH> 100644
--- a/database/migrations/2016_09_02_153301_create_love_likes_table.php
+++ b/database/migrations/2016_09_02_153301_create_love_likes_table.php
@@ -38,8 +38,8 @@ class CreateLoveLikesTable extends Migration
$table->timestamps();
$table->unique([
- 'likeable_id',
'likeable_type',
+ 'likeable_id',
'user_id',
], 'like_user_unique');
|
Change migration since Laravel morph creates type as first one
|
diff --git a/lib/Field/Reference.php b/lib/Field/Reference.php
index <HASH>..<HASH> 100644
--- a/lib/Field/Reference.php
+++ b/lib/Field/Reference.php
@@ -97,7 +97,9 @@ class Field_Reference extends Field {
return $f;
}
function destroy(){
- $this->owner->getElement($this->getDereferenced())->destroy();
+ if($e=$this->owner->hasElement($this->getDereferenced())){
+ $e->destroy();
+ }
return parent::destroy();
}
function calculateSubQuery($model,$select){
|
don't destroy dereferenced field if it was ommitted
|
diff --git a/squad/frontend/views.py b/squad/frontend/views.py
index <HASH>..<HASH> 100644
--- a/squad/frontend/views.py
+++ b/squad/frontend/views.py
@@ -44,7 +44,7 @@ def project(request, group_slug, project_slug):
def builds(request, group_slug, project_slug):
group = Group.objects.get(slug=group_slug)
project = group.projects.get(slug=project_slug)
- builds = project.builds.prefetch_related('test_runs').order_by('-datetime').all()
+ builds = project.builds.prefetch_related('test_runs').reverse().all()
context = {
'project': project,
'builds': builds,
|
frontend: use default ordering for builds
|
diff --git a/lib/commands/submit.js b/lib/commands/submit.js
index <HASH>..<HASH> 100644
--- a/lib/commands/submit.js
+++ b/lib/commands/submit.js
@@ -16,7 +16,10 @@ var cmd = {
var INDENT = ' ';
cmd.handler = function(argv) {
- var keyword = h.getFilename(argv.filename);
+ // use the 1st section in filename as keyword
+ // e.g. two-sum.cpp, or two-sum.78502271.ac.cpp
+ var keyword = h.getFilename(argv.filename).split('.')[0];
+
core.getProblem(keyword, function(e, problem) {
if (e) return log.fail(e);
diff --git a/lib/commands/test.js b/lib/commands/test.js
index <HASH>..<HASH> 100644
--- a/lib/commands/test.js
+++ b/lib/commands/test.js
@@ -55,7 +55,10 @@ cmd.handler = function(argv) {
testcase = h.readStdin();
}
- var keyword = h.getFilename(argv.filename);
+ // use the 1st section in filename as keyword
+ // e.g. two-sum.cpp, or two-sum.78502271.ac.cpp
+ var keyword = h.getFilename(argv.filename).split('.')[0];
+
core.getProblem(keyword, function(e, problem) {
if (e) return log.fail(e);
|
Support test/submit with complex filename.
|
diff --git a/src/Sylius/Bundle/ResourceBundle/spec/Sylius/Bundle/ResourceBundle/Twig/SyliusResourceExtensionSpec.php b/src/Sylius/Bundle/ResourceBundle/spec/Sylius/Bundle/ResourceBundle/Twig/SyliusResourceExtensionSpec.php
index <HASH>..<HASH> 100644
--- a/src/Sylius/Bundle/ResourceBundle/spec/Sylius/Bundle/ResourceBundle/Twig/SyliusResourceExtensionSpec.php
+++ b/src/Sylius/Bundle/ResourceBundle/spec/Sylius/Bundle/ResourceBundle/Twig/SyliusResourceExtensionSpec.php
@@ -28,7 +28,7 @@ use Symfony\Component\Routing\RouterInterface;
* @author Paweł Jędrzejewski <pjedrzejewski@diweb.pl>
* @author Arnaud Langlade <arn0d.dev@gmail.com>
*/
-class BaseExtensionSpec extends ObjectBehavior
+class SyliusResourceExtensionSpec extends ObjectBehavior
{
function let(ContainerInterface $container, RouterInterface $router, TwigEngine $templating)
{
@@ -44,7 +44,7 @@ class BaseExtensionSpec extends ObjectBehavior
function it_is_initializable()
{
- $this->shouldHaveType('Sylius\Bundle\ResourceBundle\Twig\BaseExtension');
+ $this->shouldHaveType('Sylius\Bundle\ResourceBundle\Twig\SyliusResourceExtension');
}
function it_is_a_Twig_extension()
|
[ResourceBundle] Fix broken spec for Twig extension
|
diff --git a/lib/pkgr/distributions/debian.rb b/lib/pkgr/distributions/debian.rb
index <HASH>..<HASH> 100644
--- a/lib/pkgr/distributions/debian.rb
+++ b/lib/pkgr/distributions/debian.rb
@@ -66,7 +66,7 @@ module Pkgr
end
unless missing_packages.empty?
- package_install_command = "sudo apt-get install -y #{missing_packages.map{|package| "\"#{package}\""}.join(" ")}"
+ package_install_command = "sudo apt-get install --force-yes -y #{missing_packages.map{|package| "\"#{package}\""}.join(" ")}"
if config.auto
package_install = Mixlib::ShellOut.new(package_install_command)
package_install.logger = Pkgr.logger
|
force-yes when installing (build) dependencies.
|
diff --git a/lib/class.pdf.php b/lib/class.pdf.php
index <HASH>..<HASH> 100644
--- a/lib/class.pdf.php
+++ b/lib/class.pdf.php
@@ -749,7 +749,7 @@ end
EOT;
$res = "<</Length " . mb_strlen($stream, '8bit') . " >>\n";
- $res .= "stream\n" . $stream . "endstream";
+ $res .= "stream\n" . $stream . "\nendstream";
$this->objects[$toUnicodeId]['c'] = $res;
@@ -1875,7 +1875,7 @@ EOT;
$tmp = 'o_'.$v['t'];
$cont = $this->$tmp($k, 'out');
$content.= $cont;
- $xref[] = $pos;
+ $xref[] = $pos+1; //+1 to account for \n at the start of each object
$pos+= mb_strlen($cont, '8bit');
}
@@ -2426,7 +2426,7 @@ EOT;
$flags+= pow(2, 5); // assume non-sybolic
$list = array(
'Ascent' => 'Ascender',
- 'CapHeight' => 'CapHeight',
+ 'CapHeight' => 'Ascender', //FIXME: php-font-lib is not grabbing this value, so we'll fake it and use the Ascender value // 'CapHeight'
'MissingWidth' => 'MissingWidth',
'Descent' => 'Descender',
'FontBBox' => 'FontBBox',
|
Fix structural errors in PDF produced by CPDF (#<I>)
|
diff --git a/Document API/tableaudocumentapi/workbook.py b/Document API/tableaudocumentapi/workbook.py
index <HASH>..<HASH> 100644
--- a/Document API/tableaudocumentapi/workbook.py
+++ b/Document API/tableaudocumentapi/workbook.py
@@ -115,10 +115,6 @@ class Workbook(object):
@staticmethod
def _is_valid_file(filename):
- valid = 0
fileExtension = os.path.splitext(filename)[-1].lower()
- if fileExtension == ".twb":
- valid = 1
- elif fileExtension == ".tds":
- valid = 1
- return valid
+ return fileExtension in ('.twb', '.tds')
+
|
Refactor _is_valid_file to be mroe pythonic and extensible if we add more filetypes in the future. No more C++ code in the python :)
|
diff --git a/symphony/lib/toolkit/class.entrymanager.php b/symphony/lib/toolkit/class.entrymanager.php
index <HASH>..<HASH> 100644
--- a/symphony/lib/toolkit/class.entrymanager.php
+++ b/symphony/lib/toolkit/class.entrymanager.php
@@ -369,6 +369,7 @@ class EntryManager
public static function fetch($entry_id = null, $section_id = null, $limit = null, $start = null, $where = null, $joins = null, $group = false, $buildentries = true, $element_names = null, $enable_sort = true)
{
$sort = null;
+ $select = null;
if (!$entry_id && !$section_id) {
return false;
|
Declare the $select variable
Re <I>bc<I>f2a<I>ce0d7ad0e<I>ab4a9e6b<I>
We should always declare variables to prevent PHP warnings.
Picked from 9d<I>de<I>
|
diff --git a/src/structures/DMChannel.js b/src/structures/DMChannel.js
index <HASH>..<HASH> 100644
--- a/src/structures/DMChannel.js
+++ b/src/structures/DMChannel.js
@@ -37,8 +37,8 @@ class DMChannel extends Channel {
}
// These are here only for documentation purposes - they are implemented by TextBasedChannel
+ send() { return; }
sendMessage() { return; }
- sendTTSMessage() { return; }
sendEmbed() { return; }
sendFile() { return; }
sendCode() { return; }
diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js
index <HASH>..<HASH> 100644
--- a/src/structures/GroupDMChannel.js
+++ b/src/structures/GroupDMChannel.js
@@ -121,8 +121,8 @@ class GroupDMChannel extends Channel {
}
// These are here only for documentation purposes - they are implemented by TextBasedChannel
+ send() { return; }
sendMessage() { return; }
- sendTTSMessage() { return; }
sendEmbed() { return; }
sendFile() { return; }
sendCode() { return; }
|
Update DMChannel, GroupDMChannel for docs (#<I>)
|
diff --git a/pyinfra/api/operations.py b/pyinfra/api/operations.py
index <HASH>..<HASH> 100644
--- a/pyinfra/api/operations.py
+++ b/pyinfra/api/operations.py
@@ -329,7 +329,7 @@ def _run_single_op(state, op_hash):
]
for batch in batches:
- with progress_spinner(state.inventory) as progress:
+ with progress_spinner(batch) as progress:
# Spawn greenlet for each host
greenlet_to_host = {
state.pool.spawn(_run_server_op, state, host, op_hash): host
|
Correct bug in spinner call when running operations in batches (parallel kwarg).
|
diff --git a/views/js/qtiCommonRenderer/renderers/interactions/PortableCustomInteraction.js b/views/js/qtiCommonRenderer/renderers/interactions/PortableCustomInteraction.js
index <HASH>..<HASH> 100644
--- a/views/js/qtiCommonRenderer/renderers/interactions/PortableCustomInteraction.js
+++ b/views/js/qtiCommonRenderer/renderers/interactions/PortableCustomInteraction.js
@@ -178,7 +178,7 @@ define([
assetManager : pciAssetManager
};
- pci.getInstance($dom[0], config, state);
+ pci.getInstance(containerHelper.get(interaction).get(0), config, state);
}else{
//call pci initialize() to render the pci
pci.initialize(id, $dom[0], properties, pciAssetManager);
|
fixed given the root dom element given to the IMS PCI
|
diff --git a/routing.go b/routing.go
index <HASH>..<HASH> 100644
--- a/routing.go
+++ b/routing.go
@@ -222,30 +222,24 @@ func (dht *IpfsDHT) SearchValue(ctx context.Context, key string, opts ...ropts.O
}
// Select best value
if best != nil {
+ if bytes.Equal(best.Val, v.Val) {
+ continue
+ }
sel, err := dht.Validator.Select(key, [][]byte{best.Val, v.Val})
if err != nil {
log.Warning("Failed to select dht key: ", err)
continue
}
- if sel == 1 && !bytes.Equal(v.Val, best.Val) {
- best = &v
- select {
- case out <- v.Val:
- case <-ctx.Done():
- return
- }
- }
- } else {
- // Output first valid value
- if err := dht.Validator.Validate(key, v.Val); err == nil {
- best = &v
- select {
- case out <- v.Val:
- case <-ctx.Done():
- return
- }
+ if sel != 1 {
+ continue
}
}
+ best = &v
+ select {
+ case out <- v.Val:
+ case <-ctx.Done():
+ return
+ }
case <-ctx.Done():
return
}
|
don't double-validate values
Also, de-duplicate some logic.
|
diff --git a/src/frontend/org/voltdb/utils/PBDRegularSegment.java b/src/frontend/org/voltdb/utils/PBDRegularSegment.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/utils/PBDRegularSegment.java
+++ b/src/frontend/org/voltdb/utils/PBDRegularSegment.java
@@ -92,7 +92,7 @@ public class PBDRegularSegment extends PBDSegment {
if (m_fc.size() >= SEGMENT_HEADER_BYTES) {
m_tmpHeaderBuf.b().clear();
PBDUtils.readBufferFully(m_fc, m_tmpHeaderBuf.b(), 0);
- m_numOfEntries = m_tmpHeaderBuf.b().getInt(COUNT_OFFSET);
+ m_numOfEntries = m_tmpHeaderBuf.b().getInt();
m_size = m_tmpHeaderBuf.b().getInt();
} else {
m_numOfEntries = 0;
|
OP-<I>:
A corner case of the file truncation causes the PBD Segment size counter to be read incorrectly from the entry count field. This is now fixed.
|
diff --git a/exp/audio/audio.go b/exp/audio/audio.go
index <HASH>..<HASH> 100644
--- a/exp/audio/audio.go
+++ b/exp/audio/audio.go
@@ -147,8 +147,10 @@ func (p *Player) Play() error {
}
// TODO: IsPlaying
+// TODO: Stop
+// TODO: Seek
-func (p *Player) Stop() error {
+func (p *Player) Pause() error {
p.context.Lock()
defer p.context.Unlock()
|
audio: Rename Stop -> Pause
|
diff --git a/tests/unit/Command/CheckerTest.php b/tests/unit/Command/CheckerTest.php
index <HASH>..<HASH> 100644
--- a/tests/unit/Command/CheckerTest.php
+++ b/tests/unit/Command/CheckerTest.php
@@ -21,11 +21,10 @@ declare(strict_types=1);
namespace DocHeaderTest\Command;
use DocHeader\Command\Checker;
+use org\bovigo\vfs\vfsStream;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\StreamOutput;
-use function microtime;
-use function sys_get_temp_dir;
use function tmpfile;
/**
@@ -63,7 +62,7 @@ DOCHEADER;
*/
protected function setUp() : void
{
- $this->checker = new Checker('test', $this->expectedDocHeader);
+ $this->checker = new Checker('test');
}
/**
@@ -71,8 +70,10 @@ DOCHEADER;
*/
public function it_should_not_fail_when_cant_find_files_to_validate() : void
{
- $directory = sys_get_temp_dir() . '/' . microtime(true);
+ $fileSystem = vfsStream::setup();
+
$outputResource = tmpfile();
+ $directory = $fileSystem->path();
$input = new StringInput($directory);
$output = new StreamOutput($outputResource);
|
Fix permission error with tempfiles on test
|
diff --git a/pyang/translators/dsdl.py b/pyang/translators/dsdl.py
index <HASH>..<HASH> 100644
--- a/pyang/translators/dsdl.py
+++ b/pyang/translators/dsdl.py
@@ -357,7 +357,10 @@ class HybridDSDLSchema(object):
else:
result += c
elif state == 1: # inside name
- if c.isalnum() or c in "_-.:":
+ if c.isalnum() or c in "_-.":
+ name += c
+ elif c == ":":
+ state = 4
name += c
elif c == "(": # function
state = 0
@@ -378,6 +381,13 @@ class HybridDSDLSchema(object):
result += c
else:
result += c
+ elif state == 4: # axis
+ if c == ":":
+ state = 0
+ result += name + c
+ else:
+ state = 1
+ name += c
if state == 1:
if ":" not in name: result += prefix()
result += name
|
Proper handling of axes during XSLT translation.
|
diff --git a/src/main.js b/src/main.js
index <HASH>..<HASH> 100644
--- a/src/main.js
+++ b/src/main.js
@@ -7,9 +7,9 @@ export default function lazyReq(req, modules) {
configurable: true,
get() {
let mod;
- if(typeof mVal === 'function') {
+ if (typeof mVal === 'function') {
mod = mVal(mKey);
- } else if(typeof mVal === 'string') {
+ } else if (typeof mVal === 'string') {
mod = req(mVal);
} else {
throw new Error(`Invalid module type of ${mKey}`);
@@ -21,7 +21,7 @@ export default function lazyReq(req, modules) {
});
return mod;
- }
+ },
});
});
|
fix code style in src
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -84,6 +84,7 @@ const config = {
if(process.env.NODE_ENV === 'production') {
config.plugins.push(new webpack.optimize.ModuleConcatenationPlugin())
config.plugins.push(new BabiliPlugin())
+ config.output.publicPath = 'https://slupjs.github.io/'
} else {
config.output.publicPath = 'http://localhost:8080/'
config.plugins.push(new webpack.HotModuleReplacementPlugin())
|
:ambulance: Support github pages in production mode
|
diff --git a/lib/controller/error_controller.js b/lib/controller/error_controller.js
index <HASH>..<HASH> 100644
--- a/lib/controller/error_controller.js
+++ b/lib/controller/error_controller.js
@@ -32,6 +32,9 @@ utils.mixin(ErrorController.prototype, new (function () {
if (err.statusCode == 404) {
err.message = 'Could not find page "' + this.request.url + '"'
}
+ if (parseInt(err.statusCode, 10) > 499) {
+ this.response.resp._stack = err.stack || err.message;
+ }
this._respond(err, opts);
};
|
Get stack-traces back in request logs, custom-error code
|
diff --git a/src/cli.js b/src/cli.js
index <HASH>..<HASH> 100755
--- a/src/cli.js
+++ b/src/cli.js
@@ -22,7 +22,14 @@ const cli = createCli(`
Examples
$ kode lint
$ kode test --watch
-`);
+`, {
+ boolean: [
+ 'any-branch',
+ 'skip-cleanup',
+ 'skip-test',
+ 'watch',
+ ],
+});
/**
|
fix: Force parsing arguments as boolean
|
diff --git a/server/kiwi.js b/server/kiwi.js
index <HASH>..<HASH> 100755
--- a/server/kiwi.js
+++ b/server/kiwi.js
@@ -215,9 +215,9 @@ this.kiwi_mod.printMods();
// Make sure Kiwi doesn't simply quit on an exception
-//process.on('uncaughtException', function (e) {
-// console.log('[Uncaught exception] ' + e);
-//});
+process.on('uncaughtException', function (e) {
+ console.log('[Uncaught exception] ' + e);
+});
// Start the server up
this.websocketListen(this.config.servers, this.httpHandler);
|
UncaughtException handler in server re-enabled
|
diff --git a/search/action-builder.js b/search/action-builder.js
index <HASH>..<HASH> 100644
--- a/search/action-builder.js
+++ b/search/action-builder.js
@@ -19,25 +19,9 @@ module.exports = function(config){
* @param {string} value - The query value
* @return {function} The update query function for the given identifier.
*/
- updateQuery(value){
+ updateProperties(value){
return dispatcher.handleViewAction({
- data: {
- query: value
- },
- type: 'update',
- identifier: config.identifier
- });
- },
- /**
- * Update the scope for the identifier scope.
- * @param {string} value - The scope value
- * @return {function} The update scope function for the given identifier.
- */
- updateScope(value){
- return dispatcher.handleViewAction({
- data: {
- scope: value
- },
+ data: value,
type: 'update',
identifier: config.identifier
});
|
[action-builder] Add update properties.
|
diff --git a/telepot/helper.py b/telepot/helper.py
index <HASH>..<HASH> 100644
--- a/telepot/helper.py
+++ b/telepot/helper.py
@@ -1,5 +1,6 @@
import time
import traceback
+import threading
import telepot
import telepot.filter
from functools import partial
@@ -13,20 +14,29 @@ except ImportError:
class Microphone(object):
def __init__(self):
self._queues = set()
+ self._lock = threading.Lock()
+ def _locked(func):
+ def k(self, *args, **kwargs):
+ with self._lock:
+ func(self, *args, **kwargs)
+ return k
+
+ @_locked
def add(self, q):
self._queues.add(q)
+ @_locked
def remove(self, q):
self._queues.remove(q)
+ @_locked
def send(self, msg):
for q in self._queues:
try:
q.put_nowait(msg)
except queue.Full:
traceback.print_exc()
- pass
class WaitTooLong(telepot.TelepotException):
|
Microphone added lock, thread-safe
|
diff --git a/lib/rasn1/model.rb b/lib/rasn1/model.rb
index <HASH>..<HASH> 100644
--- a/lib/rasn1/model.rb
+++ b/lib/rasn1/model.rb
@@ -206,9 +206,7 @@ module RASN1
when Proc
proc_or_class.call
when Class
- options = {}
- options[:root] = name unless name.nil?
- proc_or_class.new(options)
+ proc_or_class.new
end
end
@@ -234,13 +232,6 @@ module RASN1
end
def initialize_elements(obj, args)
- if args[:root]
- rootname = args.delete(:root)
- @elements[rootname] = @elements.delete(@root)
- @elements[rootname].name = rootname
- @root = rootname
- end
-
args.each do |name, value|
if obj[name]
if value.is_a? Hash
@@ -264,7 +255,7 @@ module RASN1
when Types::Sequence, Types::Set
h[subel.name] = private_to_h(subel)
when Model
- h[subel.name] = subel.to_h[subel.name]
+ h[@elements.key(subel)] = subel.to_h[subel.name]
when Hash
# Array of Hash for SequenceOf and SetOf
return element.value
|
Model: always keep given name to access element, but for a model, access its
root element trhough it defined name in this model.
|
diff --git a/Client.php b/Client.php
index <HASH>..<HASH> 100644
--- a/Client.php
+++ b/Client.php
@@ -17,10 +17,10 @@ class Client extends Elastica_Client
$this->logger = $logger;
}
- public function request($path, $method, $data = array())
+ public function request($path, $method, $data = array(), array $query = array())
{
$start = microtime(true);
- $response = parent::request($path, $method, $data);
+ $response = parent::request($path, $method, $data, $query);
if (null !== $this->logger) {
$time = microtime(true) - $start;
|
Updating break from `<I>`
|
diff --git a/lib/sshkit/command_map.rb b/lib/sshkit/command_map.rb
index <HASH>..<HASH> 100644
--- a/lib/sshkit/command_map.rb
+++ b/lib/sshkit/command_map.rb
@@ -39,7 +39,8 @@ module SSHKit
def [](command)
if prefix[command].any?
- prefixes = prefix[command].join(" ")
+ prefixes = prefix[command].map{ |prefix| prefix.respond_to?(:call) ? prefix.call : prefix }
+ prefixes = prefixes.join(" ")
"#{prefixes} #{command}"
else
diff --git a/test/unit/test_command_map.rb b/test/unit/test_command_map.rb
index <HASH>..<HASH> 100644
--- a/test/unit/test_command_map.rb
+++ b/test/unit/test_command_map.rb
@@ -28,6 +28,14 @@ module SSHKit
assert_equal map[:rake], "/home/vagrant/.rbenv/bin/rbenv exec bundle exec rake"
end
+ def test_prefix_procs
+ map = CommandMap.new
+ map.prefix[:rake].push("/home/vagrant/.rbenv/bin/rbenv exec")
+ map.prefix[:rake].push(proc{ "bundle exec" })
+
+ assert_equal map[:rake], "/home/vagrant/.rbenv/bin/rbenv exec bundle exec rake"
+ end
+
def test_prefix_unshift
map = CommandMap.new
map.prefix[:rake].push("bundle exec")
|
Added support for procs to command prefixes
|
diff --git a/client/cmd/swarming/lib/common.go b/client/cmd/swarming/lib/common.go
index <HASH>..<HASH> 100644
--- a/client/cmd/swarming/lib/common.go
+++ b/client/cmd/swarming/lib/common.go
@@ -176,7 +176,7 @@ func (s *swarmingServiceImpl) GetTaskOutputs(ctx context.Context, taskID, output
return nil, errors.Annotate(err, "failed to remove directory: %s", dir).Err()
}
- if err := os.Mkdir(dir, os.ModePerm); err != nil {
+ if err := os.MkdirAll(dir, os.ModePerm); err != nil {
return nil, err
}
|
[swarming] create output directory if not exists
I think it is useful if directory is created automatically.
Change-Id: Ie<I>d<I>b9e<I>dfede<I>a<I>bc<I>ba<I>b2d<I>
Reviewed-on: <URL>
|
diff --git a/datatableview/utils.py b/datatableview/utils.py
index <HASH>..<HASH> 100644
--- a/datatableview/utils.py
+++ b/datatableview/utils.py
@@ -129,7 +129,12 @@ def contains_plural_field(model, fields):
model = source_model
bits = orm_path.lstrip('+-').split('__')
for bit in bits[:-1]:
- field, _, direct, m2m = model._meta.get_field_by_name(bit)
+ # Use the new Model _meta API
+ # https://docs.djangoproject.com/en/1.9/ref/models/meta/
+ if hasattr(model._meta, 'get_field_by_name'):
+ field, _, direct, m2m = model._meta.get_field_by_name(bit)
+ else:
+ field = model._meta.get_field(bit)
if isinstance(field, models.ManyToManyField) \
or (USE_RELATED_OBJECT and isinstance(field, RelatedObject) and field.field.rel.multiple) \
or (not USE_RELATED_OBJECT and isinstance(field, RelatedField) and field.one_to_many):
|
fixes the contains_plural_field function in utils.py which did not include the correct api for model._meta for django <I> and above.
|
diff --git a/core/src/main/java/org/infinispan/loaders/file/FileCacheStoreConfig.java b/core/src/main/java/org/infinispan/loaders/file/FileCacheStoreConfig.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/org/infinispan/loaders/file/FileCacheStoreConfig.java
+++ b/core/src/main/java/org/infinispan/loaders/file/FileCacheStoreConfig.java
@@ -108,7 +108,7 @@ public class FileCacheStoreConfig extends LockSupportCacheStoreConfig {
*/
@Deprecated
public void setStreamBufferSize(int streamBufferSize) {
- testImmutability("steamBufferSize");
+ testImmutability("streamBufferSize");
this.streamBufferSize = streamBufferSize;
}
|
ISPN-<I> Typo in testing immutability of streamBufferSize in FileCacheStoreConfig
|
diff --git a/salt/state.py b/salt/state.py
index <HASH>..<HASH> 100644
--- a/salt/state.py
+++ b/salt/state.py
@@ -2434,7 +2434,6 @@ class BaseHighState(object):
'''
Render a state file and retrieve all of the include states
'''
- err = ''
errors = []
if not local:
state_data = self.client.get_state(sls, saltenv)
@@ -2449,7 +2448,8 @@ class BaseHighState(object):
if not fn_:
errors.append(
'Specified SLS {0} in saltenv {1} is not '
- 'available on the salt master'.format(sls, saltenv)
+ 'available on the salt master or through a configured '
+ 'fileserver'.format(sls, saltenv)
)
state = None
try:
|
Clarify that an sls is not available on a fileserver
Instead of just assuming that it should be looking to the master only.
Refs #<I>
|
diff --git a/test/future_execution_test.rb b/test/future_execution_test.rb
index <HASH>..<HASH> 100644
--- a/test/future_execution_test.rb
+++ b/test/future_execution_test.rb
@@ -58,7 +58,7 @@ module Dynflow
it 'delays the action' do
_(execution_plan.steps.count).must_equal 1
- _(delayed_plan.start_at).must_be_within_delta(@start_at, 0.5)
+ _(delayed_plan.start_at.to_i).must_equal(@start_at.to_i)
_(history_names.call(execution_plan)).must_equal ['delay']
end
|
Fix future execution test
Apparently MySQL stores timestamps with seconds precision, which often broke
tests which checked for sub-second precision.
|
diff --git a/app/lib/ServerNodesRefreshService.java b/app/lib/ServerNodesRefreshService.java
index <HASH>..<HASH> 100644
--- a/app/lib/ServerNodesRefreshService.java
+++ b/app/lib/ServerNodesRefreshService.java
@@ -24,8 +24,8 @@ import com.google.inject.Inject;
import com.google.inject.Singleton;
import lib.security.Graylog2ServerUnavailableException;
import models.Node;
-import models.api.responses.cluster.NodesResponse;
import models.api.responses.cluster.NodeSummaryResponse;
+import models.api.responses.cluster.NodesResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -92,6 +92,10 @@ public class ServerNodesRefreshService {
api.get(NodeSummaryResponse.class).path("/system/cluster/node").nodes(configuredNodes).timeout(2, TimeUnit.SECONDS).executeOnAll();
List<Node> resolvedNodes = Lists.newArrayList();
for (Map.Entry<Node, NodeSummaryResponse> nsr : responses.entrySet()) {
+ if (nsr.getValue() == null) {
+ //skip empty responses, they indicate an error
+ continue;
+ }
final Node resolvedNode = nodeFactory.fromSummaryResponse(nsr.getValue());
resolvedNode.setActive(true);
resolvedNodes.add(resolvedNode);
|
guard against failure in the node discovery api
|
diff --git a/consul/base.py b/consul/base.py
index <HASH>..<HASH> 100644
--- a/consul/base.py
+++ b/consul/base.py
@@ -703,7 +703,8 @@ class Consul(object):
interval=None,
ttl=None,
http=None,
- timeout=None):
+ timeout=None,
+ enable_tag_override=False):
"""
Add a new service to the local agent. There is more
documentation on services
@@ -728,8 +729,18 @@ class Consul(object):
*script*, *interval*, *ttl*, *http*, and *timeout* arguments
are deprecated. use *check* instead.
+
+ *enable_tag_override* is an optional bool that enable you
+ to modify a service tags from servers(consul agent role server)
+ Default is set to False.
+ This option is only for >=v0.6.0 version on both agent and
+ servers.
+ for more information
+ https://www.consul.io/docs/agent/services.html
"""
- payload = {'name': name}
+ payload = {}
+ payload['name'] = name
+ payload['enabletagoverride'] = enable_tag_override
if service_id:
payload['id'] = service_id
if address:
|
Added EnableTagOverride option to service registration method.
|
diff --git a/pyphi/models/__init__.py b/pyphi/models/__init__.py
index <HASH>..<HASH> 100644
--- a/pyphi/models/__init__.py
+++ b/pyphi/models/__init__.py
@@ -1,4 +1,3 @@
-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# models/__init__.py
diff --git a/pyphi/models/fmt.py b/pyphi/models/fmt.py
index <HASH>..<HASH> 100644
--- a/pyphi/models/fmt.py
+++ b/pyphi/models/fmt.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# fmt.py
+# models/fmt.py
"""
Helper functions for formatting pretty representations of PyPhi models.
|
Fix `models.fmt` file path
|
diff --git a/giotto/programs.py b/giotto/programs.py
index <HASH>..<HASH> 100644
--- a/giotto/programs.py
+++ b/giotto/programs.py
@@ -139,15 +139,20 @@ class ProgramManifest(object):
try:
program = self[program_name]
except KeyError:
- # program is not in name, drop down to root...
+ # program name is not in keys, drop down to root...
if '' in self.manifest:
- return {
- 'program': self[''],
- 'name': '',
- 'superformat': None,
- 'superformat_mime': None,
- 'args': [program_name] + args,
- }
+
+ result = self['']
+ if type(result) == ProgramManifest:
+ return result._parse(program_name, args)
+ else:
+ return {
+ 'program': result,
+ 'name': '',
+ 'superformat': None,
+ 'superformat_mime': None,
+ 'args': [program_name] + args,
+ }
else:
raise ProgramNotFound('Program %s Does Not Exist' % program_name)
else:
|
fixed some manifest parsing testcases
|
diff --git a/web/concrete/models/users_friends.php b/web/concrete/models/users_friends.php
index <HASH>..<HASH> 100644
--- a/web/concrete/models/users_friends.php
+++ b/web/concrete/models/users_friends.php
@@ -64,6 +64,7 @@ class UsersFriends extends Object {
$sql = 'INSERT INTO UsersFriends ( friendUID, uID, status, uDateAdded ) values (?, ?, ?, ?)';
}
$db->query($sql,$vals);
+ Events::fire('on_user_friend_add', $uID, $friendUID);
return true;
}
@@ -74,9 +75,14 @@ class UsersFriends extends Object {
if(!$u || !intval($u->uID)) return false;
$uID=$u->uID;
}
+ Events::fire('on_before_user_friend_remove', $uID, $friendUID);
$db = Loader::db();
$vals = array( $friendUID, $uID);
$sql = 'DELETE FROM UsersFriends WHERE friendUID=? AND uID=?';
+ $ret = Events::fire('on_user_friend_remove', $uID, $friendUID);
+ if($ret < 0) {
+ return;
+ }
$db->query($sql,$vals);
return true;
}
|
friend events
Former-commit-id: dc<I>ed<I>a<I>db1e7d<I>cd<I>a<I>d
|
diff --git a/tests/suite.php b/tests/suite.php
index <HASH>..<HASH> 100644
--- a/tests/suite.php
+++ b/tests/suite.php
@@ -28,5 +28,10 @@ class eZTestSuite extends ezpTestSuite
{
return new self();
}
+
+ public function setUp()
+ {
+ eZDir::recursiveDelete( eZINI::instance()->variable( 'FileSettings', 'VarDir' ) );
+ }
}
?>
|
Added a cleanup of the tests var folder in the global suite.php
|
diff --git a/src/sandbox.js b/src/sandbox.js
index <HASH>..<HASH> 100644
--- a/src/sandbox.js
+++ b/src/sandbox.js
@@ -19,3 +19,6 @@ afterEach(function() {
this.sandbox.restore();
});
+process.on('unhandledRejection', (err) => {
+ throw err;
+});
|
Throw unhandled rejections in mocha tests
Only works under >= 3.x, but will still help us potentially catch issues in test.
|
diff --git a/src/Sag.php b/src/Sag.php
index <HASH>..<HASH> 100644
--- a/src/Sag.php
+++ b/src/Sag.php
@@ -130,6 +130,15 @@ class Sag {
}
/**
+ * Get current session information on the server with /_session.
+ *
+ * @return stdClass
+ */
+ public function getSession() {
+ return $this->procPacket('GET', '/_session');
+ }
+
+ /**
* Sets whether Sag will decode CouchDB's JSON responses with json_decode()
* or to simply return the JSON as a string. Defaults to true.
*
|
Added getSession method, needed to grab the _session for finding current user when authenticating with cookie auth
|
diff --git a/tests/unit/core/oxcategoryTest.php b/tests/unit/core/oxcategoryTest.php
index <HASH>..<HASH> 100644
--- a/tests/unit/core/oxcategoryTest.php
+++ b/tests/unit/core/oxcategoryTest.php
@@ -416,6 +416,7 @@ class Unit_Core_oxCategoryTest extends OxidTestCase
public function testUpdate()
{
+ $this->markTestSkippedUntil('2014-04-23', 'Shop relations with categories not implemented yet.');
$this->_oCategoryB->oxcategories__oxparentid = new oxField("oxrootid", oxField::T_RAW);
$this->_oCategoryB->save(); // call update
$this->reload();
@@ -703,6 +704,7 @@ class Unit_Core_oxCategoryTest extends OxidTestCase
// #M291: unassigning categories
public function testUnassignWithSubCat()
{
+ $this->markTestSkippedUntil('2014-04-23', 'Shop relations with categories not implemented yet.');
}
public function testUnassignIdNotSet()
|
ESDEV-<I> Mark test related with categories skipped until next sprint.
|
diff --git a/lib/liebre/publisher.rb b/lib/liebre/publisher.rb
index <HASH>..<HASH> 100644
--- a/lib/liebre/publisher.rb
+++ b/lib/liebre/publisher.rb
@@ -33,12 +33,6 @@ module Liebre
end
rescue Timeout::Error
#do nothing
- ensure
- begin
- reply_queue.delete
- rescue Timeout::Error
- logger.error "error while trying to delete RPC exclusive queue"
- end
end
end
result
@@ -61,7 +55,7 @@ module Liebre
def reply_queue correlation_id
queue_name = "#{publisher_name}_callback_#{correlation_id}"
- channel.queue queue_name, :exclusive => true
+ channel.queue queue_name, :exclusive => true, :auto_delete => true
end
def exchange
|
rpc queues are now auto_delete
|
diff --git a/tool.go b/tool.go
index <HASH>..<HASH> 100644
--- a/tool.go
+++ b/tool.go
@@ -563,10 +563,7 @@ type serveCommandFileSystem struct {
}
func (fs serveCommandFileSystem) Open(requestName string) (http.File, error) {
- name := requestName[1:] // requestName[0] == '/'
- if !strings.HasSuffix(requestName, ".go") {
- name = path.Join(fs.serveRoot, name)
- }
+ name := path.Join(fs.serveRoot, requestName[1:]) // requestName[0] == '/'
dir, file := path.Split(name)
base := path.Base(dir) // base is parent folder name, which becomes the output file name.
@@ -627,7 +624,15 @@ func (fs serveCommandFileSystem) Open(requestName string) (http.File, error) {
}
for _, d := range fs.dirs {
- f, err := http.Dir(filepath.Join(d, "src")).Open(name)
+ dir := http.Dir(filepath.Join(d, "src"))
+
+ f, err := dir.Open(name)
+ if err == nil {
+ return f, nil
+ }
+
+ // source maps are served outside of serveRoot
+ f, err = dir.Open(requestName)
if err == nil {
return f, nil
}
|
Serve files outside of serveRoot to handle files referenced by sourcemaps
|
diff --git a/lib/classes/cache/databox.php b/lib/classes/cache/databox.php
index <HASH>..<HASH> 100644
--- a/lib/classes/cache/databox.php
+++ b/lib/classes/cache/databox.php
@@ -78,8 +78,7 @@ class cache_databox
$key = 'record_' . $sbas_id . '_' . $row['value'] . '_' . \record_adapter::CACHE_TECHNICAL_DATA;
$databox->delete_data_from_cache($key);
- $sql = 'DELETE FROM memcached
- WHERE site_id = :site_id AND type="record" AND value = :value';
+ $sql = 'DELETE FROM memcached WHERE site_id = :site_id AND type="record" AND value = :value';
$params = [
':site_id' => $app['conf']->get('servername')
@@ -101,8 +100,7 @@ class cache_databox
case 'structure':
$app->getApplicationBox()->delete_data_from_cache(\appbox::CACHE_LIST_BASES);
- $sql = 'DELETE FROM memcached
- WHERE site_id = :site_id AND type="structure" AND value = :value';
+ $sql = 'DELETE FROM memcached WHERE site_id = :site_id AND type="structure" AND value = :value';
$params = [
':site_id' => $app['conf']->get('servername')
|
PHRAS-<I>_remove_back_slash_n (#<I>)
removing \n into SQL requests causing memcached content deletion issues.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name='django-sniplates',
- version='0.2.0',
+ version='0.2.1',
description='Efficient template macro sets for Django',
author='Curtis Maloney',
author_email='curtis@tinbrain.net',
|
Bumped version to <I>
|
diff --git a/library/CM/Model/Language.php b/library/CM/Model/Language.php
index <HASH>..<HASH> 100644
--- a/library/CM/Model/Language.php
+++ b/library/CM/Model/Language.php
@@ -2,9 +2,6 @@
class CM_Model_Language extends CM_Model_Abstract {
- /** @var CM_Model_Language|null $_backup */
- private $_backup;
-
/**
* @return string
*/
@@ -48,7 +45,7 @@ class CM_Model_Language extends CM_Model_Abstract {
}
/**
- * @param string $phrase
+ * @param string $phrase
* @param array|null $variableNames
* @param bool|null $skipCacheLocal
* @return string
@@ -74,7 +71,6 @@ class CM_Model_Language extends CM_Model_Abstract {
if ($variableNames !== $translations[$phrase]['variables']) {
$languageKey = CM_Model_LanguageKey::findByName($phrase);
$languageKey->setVariables($variableNames);
- $languageKey->commit();
return $this->getTranslation($phrase, $variableNames, $skipCacheLocal);
}
}
@@ -89,7 +85,7 @@ class CM_Model_Language extends CM_Model_Abstract {
}
/**
- * @param string $phrase
+ * @param string $phrase
* @param string|null $value
* @param array|null $variables
*/
|
Remove unsued backup, remove unnecessary commit
|
diff --git a/test/test_crystal.rb b/test/test_crystal.rb
index <HASH>..<HASH> 100644
--- a/test/test_crystal.rb
+++ b/test/test_crystal.rb
@@ -12,7 +12,7 @@ class TestAsm < MiniTest::Test
assert_equal :mov , m.opcode
binary = @generator.assemble
assert_equal 4 , binary.length
- should = [5,0,160,227]
+ should = [0x05,0x00,0xa0,0xe3]
index = 0
binary.each_byte do |byte |
assert_equal byte , should[index]
|
change result to hex because that is what objectdump disasemles
|
diff --git a/framework/core/js/lib/models/post.js b/framework/core/js/lib/models/post.js
index <HASH>..<HASH> 100644
--- a/framework/core/js/lib/models/post.js
+++ b/framework/core/js/lib/models/post.js
@@ -7,7 +7,7 @@ Post.prototype.id = Model.prop('id');
Post.prototype.number = Model.prop('number');
Post.prototype.discussion = Model.one('discussion');
-Post.prototype.time = Model.prop('time');
+Post.prototype.time = Model.prop('time', Model.date);
Post.prototype.user = Model.one('user');
Post.prototype.contentType = Model.prop('contentType');
Post.prototype.content = Model.prop('content');
|
Transform post time into a date
|
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index <HASH>..<HASH> 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -563,7 +563,8 @@ class Mastodon:
included.
If `only_media` is set, return only statuses with media attachments.
- If `pinned` is set, return only statuses that have been pinned.
+ If `pinned` is set, return only statuses that have been pinned. Note that
+ as of Mastodon 2.1.0, this only works properly for instance-local users.
If `exclude_replies` is set, filter out all statuses that are replies.
Returns a list of `toot dicts`_.
@@ -574,8 +575,15 @@ class Mastodon:
if since_id != None:
since_id = self.__unpack_id(since_id)
-
+
params = self.__generate_params(locals(), ['id'])
+ if pinned == False:
+ del params["pinned"]
+ if only_media == False:
+ del params["only_media"]
+ if exclude_replies == False:
+ del params["exclude_replies"]
+
url = '/api/v1/accounts/{0}/statuses'.format(str(id))
return self.__api_request('GET', url, params)
|
Fix account_statuses breakage
|
diff --git a/imgaug/augmenters/meta.py b/imgaug/augmenters/meta.py
index <HASH>..<HASH> 100644
--- a/imgaug/augmenters/meta.py
+++ b/imgaug/augmenters/meta.py
@@ -2149,6 +2149,14 @@ class WithChannels(Augmenter):
hooks=hooks
)
+ ia.do_assert(
+ all([img_out.shape[0:2] == img_in.shape[0:2] for img_out, img_in in zip(result_then_list, result)]),
+ "Heights/widths of images changed in WithChannels from %s to %s, but expected to be the same." % (
+ str([img_in.shape[0:2] for img_in in result]),
+ str([img_out.shape[0:2] for img_out in result_then_list]),
+ )
+ )
+
if ia.is_np_array(images):
result[..., self.channels] = result_then_list
else:
|
Add check in WithChannels that heights/widths of images remain unchanged
|
diff --git a/src/github.com/otoolep/rqlite/server/server.go b/src/github.com/otoolep/rqlite/server/server.go
index <HASH>..<HASH> 100644
--- a/src/github.com/otoolep/rqlite/server/server.go
+++ b/src/github.com/otoolep/rqlite/server/server.go
@@ -19,18 +19,29 @@ import (
"github.com/otoolep/rqlite/db"
)
-// isPretty returns whether the HTTP response body should be pretty-printed.
-func isPretty(req *http.Request) (bool, error) {
+// queryParam returns whether the given query param is set to true.
+func queryParam(req *http.Request, param string) (bool, error) {
err := req.ParseForm()
if err != nil {
return false, err
}
- if _, ok := req.Form["pretty"]; ok {
+ if _, ok := req.Form[param]; ok {
return true, nil
}
return false, nil
}
+// isPretty returns whether the HTTP response body should be pretty-printed.
+func isPretty(req *http.Request) (bool, error) {
+ return queryParam(req, "pretty")
+}
+
+// transactionRequested returns whether the client requested an explicit
+// transaction for the request.
+func transactionRequested(req *http.Request) (bool, error) {
+ return queryParam(req, "transaction")
+}
+
// The raftd server is a combination of the Raft server and an HTTP
// server which acts as the transport.
type Server struct {
|
Factor out detection of URL query params
|
diff --git a/src/SAML2/Assertion.php b/src/SAML2/Assertion.php
index <HASH>..<HASH> 100644
--- a/src/SAML2/Assertion.php
+++ b/src/SAML2/Assertion.php
@@ -153,10 +153,21 @@ class Assertion implements SignedElement
private $AuthenticatingAuthority;
/**
- * The attributes, as an associative array.
+ * The attributes, as an associative array, indexed by attribute name
*
- * @var array multi-dimensional array, indexed by attribute name with each value representing the attribute value
- * of that attribute. This value is an array of \DOMNodeList|string|int
+ * To ease handling, all attribute values are represented as an array of values, also for values with a multiplicity
+ * of single. There are 4 possible variants of datatypes for the values: a string, an integer, an array or
+ * a DOMNodeList
+ *
+ * If the attribute is an eduPersonTargetedID, the values will be arrays that are created by @see Utils::parseNameId
+ * and compatible with @see Utils::addNameID
+ * If the attribute value has an type-definition (xsi:string or xsi:int), the values will be of that type.
+ * If the attribute value contains a nested XML structure, the values will be a DOMNodeList
+ * In all other cases the values are treated as strings
+ *
+ * **WARNING** a DOMNodeList cannot be serialized without data-loss and should be handled explicitly
+ *
+ * @var array multi-dimensional array of \DOMNodeList|string|int|array
*/
private $attributes;
|
Documentation of attribute value representation is complete
|
diff --git a/ReText/tab.py b/ReText/tab.py
index <HASH>..<HASH> 100644
--- a/ReText/tab.py
+++ b/ReText/tab.py
@@ -365,6 +365,7 @@ class ReTextTab(QSplitter):
self.editBox.setPlainText(text)
self.editBox.document().setModified(False)
+ self.handleModificationChanged()
cssFileName = self.getBaseName() + '.css'
self.cssFileExists = QFile.exists(cssFileName)
|
tab: Do not treat empty files as modified after opening them
|
diff --git a/test/helpers/console_runner.js b/test/helpers/console_runner.js
index <HASH>..<HASH> 100644
--- a/test/helpers/console_runner.js
+++ b/test/helpers/console_runner.js
@@ -121,6 +121,27 @@
}
};
+ function isExplorerConsole() {
+ if (!window || !window.console) {
+ return;
+ }
+ return window.console.clear;
+ }
+ function logTypes(str, color) {
+ if (color === undefined) {
+ console.log(str);
+ }
+ if (color === 'green') {
+ console.info(str);
+ }
+ if (color === 'red') {
+ console.error(str);
+ }
+ }
+ if (isExplorerConsole()) {
+ proto.log = logTypes;
+ }
+
function isChromeConsole() {
if (!window) {
return;
|
Internet Explorer console color support
As setting the colors on IE's console is not an option, we can use
console.info for good messages, and console.error for errors.
As Internet Explorer only returns info about its console when the dev
tools are active, it can be helpful to have the console open before
loading the page. Either that, or you can reload the page after opening
the console.
|
diff --git a/tests/ApiTest.php b/tests/ApiTest.php
index <HASH>..<HASH> 100644
--- a/tests/ApiTest.php
+++ b/tests/ApiTest.php
@@ -28,9 +28,7 @@ class ApiTest extends TestCase
$api->go()->respond();
- $output = json_decode(ob_get_contents());
-
- ob_clean();
+ $output = json_decode(ob_get_clean());
// Children
|
Get and clean and hopefully not break tests.
|
diff --git a/src/Handler/CloudWatch.php b/src/Handler/CloudWatch.php
index <HASH>..<HASH> 100644
--- a/src/Handler/CloudWatch.php
+++ b/src/Handler/CloudWatch.php
@@ -72,7 +72,7 @@ class CloudWatch extends AbstractProcessingHandler
// update sequence token
$this->uploadSequenceToken = $response->get('nextSequenceToken');
}
-
+
private function initialize()
{
// fetch existing groups
@@ -120,7 +120,7 @@ class CloudWatch extends AbstractProcessingHandler
$existingStreamsNames = array_map(function ($stream) {
// set sequence token
- if ($stream['logStreamName'] === $this->logStreamName) {
+ if ($stream['logStreamName'] === $this->logStreamName && isset($stream['uploadSequenceToken'])) {
$this->uploadSequenceToken = $stream['uploadSequenceToken'];
}
|
Using stream uploadSequenceToken only if it was defined
|
diff --git a/tests/Fixtures/TestBundle/Entity/DummyTableInheritanceRelated.php b/tests/Fixtures/TestBundle/Entity/DummyTableInheritanceRelated.php
index <HASH>..<HASH> 100644
--- a/tests/Fixtures/TestBundle/Entity/DummyTableInheritanceRelated.php
+++ b/tests/Fixtures/TestBundle/Entity/DummyTableInheritanceRelated.php
@@ -78,5 +78,4 @@ class DummyTableInheritanceRelated
return $this;
}
-
}
|
PHP CS Fixer changes to conform with requirements
|
diff --git a/bugwarrior/services/githubutils.py b/bugwarrior/services/githubutils.py
index <HASH>..<HASH> 100644
--- a/bugwarrior/services/githubutils.py
+++ b/bugwarrior/services/githubutils.py
@@ -45,8 +45,12 @@ def get_issues(username, repo, auth):
def get_directly_assigned_issues(auth):
- """ username and repo should be strings
- auth should be a tuple of username and password.
+ """ Returns all issues assigned to authenticated user.
+
+ This will return all issues assigned to the authenticated user
+ regardless of whether the user owns the repositories in which the
+ issues exist.
+
"""
url = "https://api.github.com/user/issues?per_page=100"
return _getter(url, auth)
|
Updating an inaccurate docstring.
|
diff --git a/src/server/pkg/worker/master.go b/src/server/pkg/worker/master.go
index <HASH>..<HASH> 100644
--- a/src/server/pkg/worker/master.go
+++ b/src/server/pkg/worker/master.go
@@ -42,6 +42,9 @@ const (
maximumRetriesPerDatum = 3
masterLockPath = "_master_worker_lock"
+
+ // The number of datums that will be enqueued on each worker.
+ queueSize = 10
)
func (a *APIServer) getMasterLogger() *taggedLogger {
@@ -386,7 +389,7 @@ func (a *APIServer) runJob(ctx context.Context, jobInfo *pps.JobInfo, pool *pool
}
failed := false
- limiter := limit.New(a.numWorkers * 10)
+ limiter := limit.New(a.numWorkers * queueSize)
// process all datums
df, err := newDatumFactory(ctx, pfsClient, jobInfo.Input)
if err != nil {
|
Add a constant for queue size.
|
diff --git a/media/boom/js/boom/helpers.js b/media/boom/js/boom/helpers.js
index <HASH>..<HASH> 100755
--- a/media/boom/js/boom/helpers.js
+++ b/media/boom/js/boom/helpers.js
@@ -2,17 +2,6 @@
@fileOverview Helper functions
*/
/**
-strip all tags, return plain text
-@function
-*/
-String.prototype.text = function(){
- var str = this;
- try { str = decodeURIComponent(str); } catch(e) {}
- str = str && str.length ? $.trim(str.replace(/<\S[^><]*>/g, '')) : '';
- return str;
-};
-
-/**
convert 8 bit characters to their 7 bit equivalent
@function
*/
|
Removed possibly unused function String.prototype.text()
|
diff --git a/lib/claide/command.rb b/lib/claide/command.rb
index <HASH>..<HASH> 100644
--- a/lib/claide/command.rb
+++ b/lib/claide/command.rb
@@ -466,7 +466,7 @@ module CLAide
# @todo Remove deprecated format support
#
def self.arguments_array=(arguments)
- warn '[!] The signature of CLAide#arguments as changed. ' \
+ warn '[!] The signature of CLAide#arguments has changed. ' \
"Use CLAide::Argument (#{self}: `#{arguments}`)".ansi.yellow
@arguments = arguments.map do |(name_str, type)|
names = name_str.split('|')
|
Fixed typo spotted by @segiddins
|
diff --git a/src/SxBootstrap/View/Helper/Bootstrap/FlashMessenger.php b/src/SxBootstrap/View/Helper/Bootstrap/FlashMessenger.php
index <HASH>..<HASH> 100644
--- a/src/SxBootstrap/View/Helper/Bootstrap/FlashMessenger.php
+++ b/src/SxBootstrap/View/Helper/Bootstrap/FlashMessenger.php
@@ -28,7 +28,7 @@ class FlashMessenger extends AbstractHelper
* @param bool $isBlock
* @return string
*/
- public function render($namespace = null, $isBlock = false)
+ public function __invoke($namespace = null, $isBlock = false)
{
if($namespace) {
$messagesToPrint = $this->view->flashMessenger()->render($namespace);
|
change render to invoke method in flashmessenger view helper
|
diff --git a/recipe-server/normandy/settings.py b/recipe-server/normandy/settings.py
index <HASH>..<HASH> 100644
--- a/recipe-server/normandy/settings.py
+++ b/recipe-server/normandy/settings.py
@@ -280,7 +280,7 @@ class Base(Core):
SECURE_PROXY_SSL_HEADER = values.TupleValue()
SECURE_HSTS_SECONDS = values.IntegerValue(3600)
SECURE_HSTS_INCLUDE_SUBDOMAINS = values.BooleanValue(True)
- CSRF_COOKIE_HTTPONLY = values.BooleanValue(True)
+ CSRF_COOKIE_HTTPONLY = values.BooleanValue(False)
CSRF_COOKIE_SECURE = values.BooleanValue(True)
SECURE_SSL_REDIRECT = values.BooleanValue(True)
SECURE_REDIRECT_EXEMPT = values.ListValue([])
|
Set CSRF_COOKIE_HTTPONLY to False by default
|
diff --git a/lxd/instance/drivers/driver_qemu.go b/lxd/instance/drivers/driver_qemu.go
index <HASH>..<HASH> 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -422,8 +422,15 @@ func (d *qemu) getMonitorEventHandler() func(event string, data map[string]inter
inst, err := instance.LoadByProjectAndName(state, projectName, instanceName)
if err != nil {
- logger.Error("Failed to load instance", log.Ctx{"err": err})
- return
+ // If DB not available, try loading from backup file.
+ logger.Warn("Failed loading instance from database, trying backup file", log.Ctx{"err": err})
+
+ instancePath := filepath.Join(shared.VarPath("virtual-machines"), project.Instance(projectName, instanceName))
+ inst, err = instance.LoadFromBackup(state, projectName, instancePath, false)
+ if err != nil {
+ logger.Error("Failed loading instance", log.Ctx{"err": err})
+ return
+ }
}
if event == "RESET" {
|
lxd/instance/drivers/driver/qemu: Update getMonitorEventHandler to try and load instance from backup if DB not available
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -184,10 +184,11 @@ class SendFeedback extends HTMLElement {
throw new Error('Reporter is not set yet!');
}
+ const appName = 'name' in app ? app.name : app.getName();
body += [
'\n',
'------------------------------------',
- `App: ${app.getName()} ${app.getVersion()}`,
+ `App: ${appName} ${app.getVersion()}`,
`Electron: ${process.versions.electron} (Node ${process.version})`,
`Operating System: ${process.platform} ${process.arch} ${os.release()}`
].join('\n');
|
send-feedback: Use app.name in newer electron versions.
app.getName() is depereacted and will throw exeception in electron v9.
|
diff --git a/cyclops/src/main/java/cyclops/function/Memoize.java b/cyclops/src/main/java/cyclops/function/Memoize.java
index <HASH>..<HASH> 100644
--- a/cyclops/src/main/java/cyclops/function/Memoize.java
+++ b/cyclops/src/main/java/cyclops/function/Memoize.java
@@ -23,7 +23,7 @@ import com.oath.cyclops.util.ExceptionSoftener;
import lombok.val;
public class Memoize {
-
+ private final static Object UNSET = new Object();
/**
* Convert a Supplier into one that caches it's result
*
@@ -31,8 +31,22 @@ public class Memoize {
* @return Memoised Supplier
*/
public static <T> Function0<T> memoizeSupplier(final Supplier<T> s) {
- final LazyImmutable<T> lazy = LazyImmutable.def();
- return () -> lazy.computeIfAbsent( s);
+ AtomicReference value = new AtomicReference<>(
+ UNSET);
+ return ()->{
+ Object val = value.get();
+ if (val == UNSET) {
+ synchronized (UNSET){
+ if(value.get()==UNSET) {
+ val = s.get();
+ value.set(val);
+ }
+ }
+ }
+
+ return (T)val;
+ };
+
}
/**
|
more direct impl for memoizeSupplier
|
diff --git a/app/scripts/Widget/plugins/PressureWidget/Widget.js b/app/scripts/Widget/plugins/PressureWidget/Widget.js
index <HASH>..<HASH> 100644
--- a/app/scripts/Widget/plugins/PressureWidget/Widget.js
+++ b/app/scripts/Widget/plugins/PressureWidget/Widget.js
@@ -39,7 +39,7 @@ export class PressureWidget extends Component {
firstname: data.name,
lastname: data.lastname,
email: data.email,
- city: data.city
+ city: !!data.city ? data.city : null
},
mail: {
cc: this.getTargetList().map(target => this.getEmailTarget(target)),
|
[#<I>] Fix if it is an empty string, put null to city. #<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -8,6 +8,6 @@ setup(name='chess_py',
author='Aubhro Sengupta',
author_email='aubhrosengupta@gmail.com',
url='https://github.com/LordDarkula/chess_py',
- packages=['chess_py'],
- package_data=['README.md']
+ packages=['chess_py', 'chess_py.core', 'chess_py.core.algebraic', 'chess_py.game', 'chess_py.pieces',
+ 'chess_py.players'],
)
|
Updated setup.py so this project is an installable package
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.