diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/main/java/com/cloudera/data/filesystem/FileSystemMetadataProvider.java b/src/main/java/com/cloudera/data/filesystem/FileSystemMetadataProvider.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudera/data/filesystem/FileSystemMetadataProvider.java
+++ b/src/main/java/com/cloudera/data/filesystem/FileSystemMetadataProvider.java
@@ -38,6 +38,21 @@ import com.google.common.base.Preconditions;
import com.google.common.io.Closeables;
import com.google.common.io.Resources;
+/**
+ * <p>
+ * A {@link MetadataProvider} that stores dataset metadata in a Hadoop
+ * {@link FileSystem}.
+ * </p>
+ * <p>
+ * When configured with a root directory, this implementation serializes the
+ * information within a {@link DatasetDescriptor} on the provided
+ * {@link FileSystem}. The descriptor is serialized as an Avro object and stored
+ * in a directory named after the dataset name. For example, if the dataset name
+ * is {@code logs}, the directory {@code rootDirectory/logs/} will be created,
+ * if it doesn't exist, and the serialized descriptor will be stored in the file
+ * {@code descriptor.avro}.
+ * </p>
+ */
public class FileSystemMetadataProvider implements MetadataProvider {
private static final Logger logger = LoggerFactory
|
Added class-level javadoc to FileSystemMetadataProvider.
|
diff --git a/health/statuscheck/plugin_impl_statuscheck.go b/health/statuscheck/plugin_impl_statuscheck.go
index <HASH>..<HASH> 100644
--- a/health/statuscheck/plugin_impl_statuscheck.go
+++ b/health/statuscheck/plugin_impl_statuscheck.go
@@ -303,6 +303,7 @@ func (p *Plugin) GetPluginStatus(pluginName string) status.PluginStatus {
return *(p.pluginStat[string(pluginName)])
}
+// GetAllPluginStatus returns a map containing status of each plugin
func (p *Plugin) GetAllPluginStatus() map[string]status.PluginStatus {
p.access.Lock()
defer p.access.Unlock()
|
SPOPT-<I> - Prometheus Telemetry/Health for all plugins
|
diff --git a/salt/utils/s3.py b/salt/utils/s3.py
index <HASH>..<HASH> 100644
--- a/salt/utils/s3.py
+++ b/salt/utils/s3.py
@@ -106,6 +106,9 @@ def query(key, keyid, method='GET', params=None, headers=None,
if local_file:
payload_hash = salt.utils.get_hash(local_file, form='sha256')
+ if path is None:
+ path = ''
+
if not requesturl:
requesturl = 'https://{0}/{1}'.format(endpoint, path)
headers, requesturl = salt.utils.aws.sig4(
@@ -132,13 +135,13 @@ def query(key, keyid, method='GET', params=None, headers=None,
if method == 'PUT':
if local_file:
- with salt.utils.fopen(local_file, 'r') as data:
- result = requests.request(method,
- requesturl,
- headers=headers,
- data=data,
- verify=verify_ssl,
- stream=True)
+ data = salt.utils.fopen(local_file, 'r')
+ result = requests.request(method,
+ requesturl,
+ headers=headers,
+ data=data,
+ verify=verify_ssl,
+ stream=True)
response = result.content
elif method == 'GET' and local_file and not return_bin:
result = requests.request(method,
|
Back-port #<I> to <I> (#<I>)
* Fix: local variable result referenced before assignment
* Fix: if 'path' variable is None convert it into an empty string
|
diff --git a/phoxy.js b/phoxy.js
index <HASH>..<HASH> 100755
--- a/phoxy.js
+++ b/phoxy.js
@@ -1,5 +1,8 @@
if (typeof phoxy == 'undefined')
phoxy = {};
+if (typeof phoxy.state !== 'undefined')
+ if (phoxy.state.loaded == true)
+ throw "Phoxy already loaded. Dont mess with this";
var phoxy =
@@ -218,6 +221,10 @@ phoxy._RenderSubsystem =
if (result != undefined && result != '')
$("#" + result).replaceWith(html);
+
+ if (typeof phoxy == 'undefined' || typeof phoxy.state == 'undefined')
+ throw "EJS render failed. Phoxy is missing. Is .ejs file exsists? Is your .htacess right? Check last AJAX request.";
+
return obj;
}
,
|
Cathing unexpected phoxy rewrite
When you rendering something like <script>phoxy= an so on #<I>
|
diff --git a/cmd/test.go b/cmd/test.go
index <HASH>..<HASH> 100644
--- a/cmd/test.go
+++ b/cmd/test.go
@@ -62,6 +62,12 @@ func testPackage(targets map[string]gb.PkgTarget, pkg *gb.Package) gb.Target {
TestGoFiles: pkg.TestGoFiles, // passed directly to buildTestMain
XTestGoFiles: pkg.XTestGoFiles, // passed directly to buildTestMain
+ CgoCFLAGS: pkg.CgoCFLAGS,
+ CgoCPPFLAGS: pkg.CgoCPPFLAGS,
+ CgoCXXFLAGS: pkg.CgoCXXFLAGS,
+ CgoLDFLAGS: pkg.CgoLDFLAGS,
+ CgoPkgConfig: pkg.CgoPkgConfig,
+
Imports: imports,
})
|
cmd/test: build test binaries with cgo* flags
|
diff --git a/playem-audiofile.js b/playem-audiofile.js
index <HASH>..<HASH> 100644
--- a/playem-audiofile.js
+++ b/playem-audiofile.js
@@ -107,7 +107,7 @@ function AudioFilePlayer(){
};
Player.prototype.setTrackPosition = function(pos) {
- this.widget && this.widget.setPosition(pos * 1000);
+ this.widget && this.widget.setPosition(Math.floor(Math.min(this.widget.duration, pos * 1000) - 2000));
};
Player.prototype.embed = function(vars) {
|
in order to avoid receiving onEnd event too early: can only seek 2 seconds before end of loaded stream
|
diff --git a/modelx/core/model.py b/modelx/core/model.py
index <HASH>..<HASH> 100644
--- a/modelx/core/model.py
+++ b/modelx/core/model.py
@@ -116,8 +116,8 @@ class Model(SpaceContainer):
def __getitem__(self, space):
return self._impl.space[space]
- def __repr__(self):
- return self._impl.repr_
+ # def __repr__(self):
+ # return self._impl.repr_
@property
def spaces(self):
|
removed Model.__repr__ to revert to a default repr
|
diff --git a/error.go b/error.go
index <HASH>..<HASH> 100644
--- a/error.go
+++ b/error.go
@@ -129,7 +129,7 @@ type ActiveEndpointsError struct {
}
func (aee *ActiveEndpointsError) Error() string {
- return fmt.Sprintf("network %s has active endpoints", aee.name)
+ return fmt.Sprintf("network %s id %s has active endpoints", aee.name, aee.id)
}
// Forbidden denotes the type of this error
|
print name and id infomation when has active endpoints
|
diff --git a/salt/modules/ps.py b/salt/modules/ps.py
index <HASH>..<HASH> 100644
--- a/salt/modules/ps.py
+++ b/salt/modules/ps.py
@@ -4,8 +4,23 @@ See http://code.google.com/p/psutil.
'''
import time
-import psutil
-
+try:
+ import psutil
+ has_psutil = True
+except ImportError:
+ has_psutil = False
+
+def __virtual__():
+ if not has_psutil:
+ return False
+
+ # The python 2.6 version of psutil lacks several functions
+ # used in this salt module so instead of spaghetti string
+ # code to try to bring sanity to everything, disable it.
+ if sys.version_info[0] == 2 and sys.version_info[1] < 7:
+ return False
+
+ return "ps"
def top(num_processes=5, interval=3):
'''
|
Disable the ps salt module on python <I>
There are too many issues with it. Fixes #<I>
|
diff --git a/nipap-cli/nipap_cli/nipap_cli.py b/nipap-cli/nipap_cli/nipap_cli.py
index <HASH>..<HASH> 100755
--- a/nipap-cli/nipap_cli/nipap_cli.py
+++ b/nipap-cli/nipap_cli/nipap_cli.py
@@ -467,6 +467,7 @@ def view_prefix(arg, opts):
print " %-15s : %s" % ("VRF", vrf)
print " %-15s : %s" % ("Description", p.description)
print " %-15s : %s" % ("Node", p.node)
+ print " %-15s : %s" % ("Country", p.country)
print " %-15s : %s" % ("Order", p.order_id)
print " %-15s : %s" % ("Alarm priority", p.alarm_priority)
print " %-15s : %s" % ("Monitor", p.monitor)
|
Show country in address view function
The nipap CLI command now also displays the 'country' attribute of a
prefix.
|
diff --git a/lib/devices/gateway.js b/lib/devices/gateway.js
index <HASH>..<HASH> 100644
--- a/lib/devices/gateway.js
+++ b/lib/devices/gateway.js
@@ -164,7 +164,7 @@ const Gateway = Thing.type(Parent => class Gateway extends Parent.with(MiioApi,
});
}
- this.syncer.update(defs);
+ return this.syncer.update(defs);
});
}
|
Return promise of child syncer to wait for sync
|
diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/cli_spec.rb
+++ b/spec/cli_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Minicron::CLI do
it 'should run a simple command and print the output to stdout' do
output = capture_stdout do
- Minicron::CLI.new(['run', 'echo hello']).run
+ Minicron::CLI.new(['run', 'echo hello', '--trace']).run
end
output.clean == 'hello'
@@ -11,7 +11,7 @@ describe Minicron::CLI do
it 'should run a simple multi-line command and print the output to stdout' do
output = capture_stdout do
- Minicron::CLI.new(['run', 'ls -l']).run
+ Minicron::CLI.new(['run', 'ls -l', '--trace']).run
end
output.clean == `ls -l`.clean
|
Not sure this will work but it's worth a shot
|
diff --git a/tests/Sniffs/ControlStructures/data/earlyExitNoErrors.php b/tests/Sniffs/ControlStructures/data/earlyExitNoErrors.php
index <HASH>..<HASH> 100644
--- a/tests/Sniffs/ControlStructures/data/earlyExitNoErrors.php
+++ b/tests/Sniffs/ControlStructures/data/earlyExitNoErrors.php
@@ -63,3 +63,11 @@ function () {
// Something
};
+
+function () {
+ if (true) {
+ $variable = 'a';
+ } else {
+ $variable = 'b';
+ }
+};
|
More tests for EarlyExitSniff
|
diff --git a/app/src/Bolt/Content.php b/app/src/Bolt/Content.php
index <HASH>..<HASH> 100644
--- a/app/src/Bolt/Content.php
+++ b/app/src/Bolt/Content.php
@@ -6,7 +6,7 @@ use Silex;
class Content implements \ArrayAccess
{
- private $app;
+ protected $app;
public $id;
public $values;
public $taxonomy;
|
Setting $app variable to protected, which may be useful for 0c<I>c
|
diff --git a/src/components/IntlTelInput.js b/src/components/IntlTelInput.js
index <HASH>..<HASH> 100644
--- a/src/components/IntlTelInput.js
+++ b/src/components/IntlTelInput.js
@@ -375,8 +375,6 @@ export default React.createClass({
outerHeight: this.state.telInput.outerHeight
}
});
-
- this.notifyPhoneNumberChange(formatted);
},
// replace any existing dial code with the new one (if not in nationalMode)
@@ -596,6 +594,9 @@ export default React.createClass({
document.removeEventListener('keydown', this.handleDocumentKeyDown);
document.querySelector('html').removeEventListener('click', this.handleDocumentClick);
}
+ if (this.state.telInput.value !== nextState.telInput.value) {
+ this.notifyPhoneNumberChange(nextState.telInput.value);
+ }
},
// prepare all of the country data, including onlyCountries and preferredCountries options
@@ -959,8 +960,6 @@ export default React.createClass({
// if no autoFormat, just update flag
this.updateFlagFromNumber(React.findDOMNode(this.refs.telInput).value);
}
-
- this.notifyPhoneNumberChange(e.target.value);
},
handleInputChange (e) {
|
Prevent infinite loop when phone number has changed
|
diff --git a/samples/automl/automlVisionPredict.js b/samples/automl/automlVisionPredict.js
index <HASH>..<HASH> 100755
--- a/samples/automl/automlVisionPredict.js
+++ b/samples/automl/automlVisionPredict.js
@@ -55,7 +55,7 @@ async function predict(
const params = {};
if (scoreThreshold) {
- params.scoreThreshold = scoreThreshold;
+ params.score_threshold = scoreThreshold;
}
// Set the payload by giving the content and type of the file.
|
fix: Param "scoreThreshold" should be "score_threshold" (#<I>)
Sine <I> Oct <I>, I found that the scoreThreshold param won't work and encounter "Error: 3 INVALID_ARGUMENT: Request contains an invalid argument." during prediction call. I compared the doc below and the params should be score_threshold instead of scoreThreshold.
<URL>
|
diff --git a/openquake/calculators/event_based.py b/openquake/calculators/event_based.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/event_based.py
+++ b/openquake/calculators/event_based.py
@@ -229,6 +229,7 @@ class EventBasedCalculator(base.HazardCalculator):
fake = logictree.FullLogicTree.fake(gsim_lt)
self.realizations = fake.get_realizations()
self.datastore['full_lt'] = fake
+ self.store_rlz_info({}) # store weights
self.save_params()
calc.RuptureImporter(self.datastore).import_array(rup_array)
mesh = surface_to_array(self.rup.surface).transpose(1, 2, 0).flatten()
@@ -253,7 +254,6 @@ class EventBasedCalculator(base.HazardCalculator):
return {}
else: # scenario
self._read_scenario_ruptures()
- self.store_rlz_info({}) # store full_lt, weights
if not oq.imtls:
raise InvalidFile('There are no intensity measure types in %s' %
oq.inputs['job_ini'])
|
Small cleanup [skip CI]
|
diff --git a/src/Propel/Generator/Model/Table.php b/src/Propel/Generator/Model/Table.php
index <HASH>..<HASH> 100644
--- a/src/Propel/Generator/Model/Table.php
+++ b/src/Propel/Generator/Model/Table.php
@@ -12,6 +12,7 @@ namespace Propel\Generator\Model;
use DOMNode;
use DOMDocument;
+use Propel\Generator\Exception\BuildException;
use Propel\Generator\Exception\EngineException;
use Propel\Generator\Platform\MysqlPlatform;
@@ -547,7 +548,7 @@ class Table extends ScopedElement implements IdMethod
* Names composing objects which haven't yet been named. This
* currently consists of foreign-key and index entities.
*/
- public function doNaming()
+ public function doNaming()
{
// Assure names are unique across all databases.
try {
@@ -1900,7 +1901,7 @@ class Table extends ScopedElement implements IdMethod
* @return A CSV list.
* @deprecated Use the Platform::getColumnListDDL() method.
*/
- private function printList($list)
+ private function printList($list)
{
$result = "";
$comma = 0;
|
[Generator] Added missing use statement
|
diff --git a/Model/ExtendedFieldModel.php b/Model/ExtendedFieldModel.php
index <HASH>..<HASH> 100644
--- a/Model/ExtendedFieldModel.php
+++ b/Model/ExtendedFieldModel.php
@@ -357,9 +357,9 @@ class ExtendedFieldModel extends FieldModel
public function deleteEntity($entity)
{
if ($this->isExtendedField($entity)) {
- $secure = 'extendedFieldSecure' === $entity->getType() ? '_secure' : '';
$dataType = $this->getSchemaDefinition($entity->getName(), $entity->getType());
$dataType = $dataType['type'];
+ $secure = 'extendedFieldSecure' === $entity->getObject() ? '_secure' : '';
$extendedTable = MAUTIC_TABLE_PREFIX.'lead_fields_leads_'.$dataType.$secure.'_xref';
$column = [
'lead_field_id' => $entity->getId(),
|
Resolve a bug that prevented the deletion of secure fields.
|
diff --git a/lib/acts_as_having_string_id/railtie.rb b/lib/acts_as_having_string_id/railtie.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_having_string_id/railtie.rb
+++ b/lib/acts_as_having_string_id/railtie.rb
@@ -1,13 +1,13 @@
module ActsAsHavingStringId
class Railtie < Rails::Railtie
initializer "railtie.include_in_application_record" do
+ ApplicationRecord.include(ActsAsHavingStringId)
+
if defined?(Spring)
Spring.after_fork do
# This needs to happen every time Spring reloads
ApplicationRecord.include(ActsAsHavingStringId)
end
- else
- ApplicationRecord.include(ActsAsHavingStringId)
end
end
end
|
Include module direclty even if spring is present
|
diff --git a/controller.go b/controller.go
index <HASH>..<HASH> 100644
--- a/controller.go
+++ b/controller.go
@@ -440,11 +440,13 @@ func (c *Controller) getRelatedResources(w http.ResponseWriter, ctx *Context) {
},
}
- if len(models) > 0 {
+ // add if model is found
+ if len(models) > 1 {
+ stack.Abort(fmt.Errorf("has one relationship returned more than one result"))
+ } else if len(models) == 1 {
newCtx.Response.Data.One = relatedController.resourceForModel(newCtx, models[0])
}
-
// run notifiers
c.runCallbacks(c.Notifiers, newCtx, http.StatusInternalServerError)
@@ -932,7 +934,9 @@ func (c *Controller) resourceForModel(ctx *Context, model coal.Model) *jsonapi.R
var reference *jsonapi.Resource
// set all references
- if len(ids) > 0 {
+ if len(ids) > 1 {
+ stack.Abort(fmt.Errorf("has one relationship returned more than one result"))
+ } else if len(ids) == 1 {
reference = &jsonapi.Resource{
Type: relatedController.Model.Meta().PluralName,
ID: ids[0].Hex(),
|
return error if relationship is ambiguous
|
diff --git a/src/main/java/com/github/noraui/selenium/NoraUiExpectedConditions.java b/src/main/java/com/github/noraui/selenium/NoraUiExpectedConditions.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/noraui/selenium/NoraUiExpectedConditions.java
+++ b/src/main/java/com/github/noraui/selenium/NoraUiExpectedConditions.java
@@ -84,8 +84,12 @@ public class NoraUiExpectedConditions {
*/
public static ExpectedCondition<List<WebElement>> presenceOfNbElementsLocatedBy(final By locator, final int nb) {
return (WebDriver driver) -> {
- final List<WebElement> elements = driver.findElements(locator);
- return elements.size() == nb ? elements : null;
+ try {
+ final List<WebElement> elements = driver.findElements(locator);
+ return elements.size() == nb ? elements : null;
+ } catch (final Exception e) {
+ return null;
+ }
};
}
|
add catch on presenceOfNbElementsLocatedBy expected condition
|
diff --git a/amqp_client.js b/amqp_client.js
index <HASH>..<HASH> 100644
--- a/amqp_client.js
+++ b/amqp_client.js
@@ -150,7 +150,8 @@ AMQPClient.prototype.send = function(msg, target, annotations, cb) {
target: { address: target }
} }, this.policy.senderLinkPolicy);
this._session.on(Session.LinkAttached, function (l) {
- if (l.name === linkName && l.isSender()) {
+ if (l.name === linkName) {
+ debug('Sender link ' + linkName + ' attached');
self._sendLinks[target] = l;
if (l.canSend()) {
sender(l);
@@ -195,6 +196,7 @@ AMQPClient.prototype.receive = function(source, filter, cb) {
} }, this.policy.receiverLinkPolicy);
this._session.on(Session.LinkAttached, function (l) {
if (l.name === linkName) {
+ debug('Receiver link ' + linkName + ' attached');
self._receiveLinks[source] = l;
l.on(Link.MessageReceived, function (m) {
var payload = m.body[0];
|
Add some debugging for when send/receive links are attached. Modify EH example to receive against all partitions (send still commented out, but it works).
|
diff --git a/shutit.py b/shutit.py
index <HASH>..<HASH> 100755
--- a/shutit.py
+++ b/shutit.py
@@ -63,8 +63,8 @@ def main():
"""
# Create base shutit object.
shutit = shutit_global.shutit_global_object.shutit_objects[0]
- if sys.version_info.major == 2:
- if sys.version_info.minor < 7:
+ if sys.version_info[0] == 2:
+ if sys.version_info[1] < 7:
shutit.fail('Python version must be 2.7+') # pragma: no cover
shutit.setup_shutit_obj()
|
Moved from using sys.version_info.major and minor to use [0] and [1]
|
diff --git a/interpreter/main.go b/interpreter/main.go
index <HASH>..<HASH> 100644
--- a/interpreter/main.go
+++ b/interpreter/main.go
@@ -21,6 +21,7 @@ import (
"os"
"runtime"
"strings"
+ "time"
"github.com/juju/errors"
"github.com/ngaut/log"
@@ -54,6 +55,7 @@ func saveHistory() {
}
func executeLine(tx *sql.Tx, txnLine string) error {
+ start := time.Now()
if tidb.IsQuery(txnLine) {
rows, err := tx.Query(txnLine)
if err != nil {
@@ -95,6 +97,17 @@ func executeLine(tx *sql.Tx, txnLine string) error {
result, _ := printer.GetPrintResult(cols, datas)
fmt.Printf("%s", result)
+ // report elapsed time and rows in set
+ elapsed := time.Since(start).Seconds()
+ switch len(datas) {
+ case 0:
+ fmt.Printf("Empty set (%.2f sec)\n", elapsed)
+ case 1:
+ fmt.Printf("1 row in set (%.2f sec)\n", elapsed)
+ default:
+ fmt.Printf("%v rows in set (%.2f sec)\n", len(datas), elapsed)
+ }
+
if err := rows.Err(); err != nil {
return errors.Trace(err)
}
|
report time and rows in set for query
|
diff --git a/model/execution/DeliveryExecutionList.php b/model/execution/DeliveryExecutionList.php
index <HASH>..<HASH> 100644
--- a/model/execution/DeliveryExecutionList.php
+++ b/model/execution/DeliveryExecutionList.php
@@ -295,12 +295,10 @@ class DeliveryExecutionList extends ConfigurableService
private function getLastActivity(array $cachedData, ?bool $online)
{
if ($online && isset($cachedData[DeliveryMonitoringService::LAST_TEST_TAKER_ACTIVITY])) {
- $lastActivity = $cachedData[DeliveryMonitoringService::LAST_TEST_TAKER_ACTIVITY];
- } else {
- $lastActivity = null;
+ return $cachedData[DeliveryMonitoringService::LAST_TEST_TAKER_ACTIVITY];
}
- return $lastActivity;
+ return null;
}
/**
|
refactor getLastActivity
|
diff --git a/src/a_attributes.js b/src/a_attributes.js
index <HASH>..<HASH> 100644
--- a/src/a_attributes.js
+++ b/src/a_attributes.js
@@ -10,6 +10,8 @@
_gpfErrorDeclare("a_attributes", {
OnlyForAttributeClass:
"The attribute {attributeName} can be used only on an Attribute class",
+ OnlyOnClassForAttributeClass:
+ "The attribute {attributeName} must be used on Class",
ClassOnlyAttribute:
"The attribute {attributeName} can be used only for Class",
MemberOnlyAttribute:
@@ -41,6 +43,12 @@ var
.name()
});
}
+ if (this._member !== "Class") {
+ throw gpf.Error.OnlyOnClassForAttributeClass({
+ attributeName: _gpfGetClassDefinition(this.constructor)
+ .name()
+ });
+ }
}
}
|
Added control on [Class] for AttributeClass
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -13,10 +13,11 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys
import os
-import shlex
+import sys
+
import sphinx_rtd_theme
+from enumchoicefield.version import version as module_version
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -52,17 +53,12 @@ master_doc = 'index'
# General information about the project.
project = 'Django EnumChoiceField'
-copyright = '2015, Tim Heap'
+copyright = '2016, Tim Heap'
author = 'Tim Heap'
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '0.1.0'
+version = '.'.join(module_version.split('.')[:2])
# The full version, including alpha/beta/rc tags.
-release = '0.1.0'
+release = module_version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
|
Pull version for docs from package
|
diff --git a/lib/mongo_mapper/document.rb b/lib/mongo_mapper/document.rb
index <HASH>..<HASH> 100644
--- a/lib/mongo_mapper/document.rb
+++ b/lib/mongo_mapper/document.rb
@@ -90,6 +90,10 @@ module MongoMapper
collection.find(FinderOptions.to_mongo_criteria(conditions)).count
end
+ def exist?(conditions={})
+ !count(conditions).zero?
+ end
+
def create(*docs)
instances = []
docs = [{}] if docs.blank?
diff --git a/test/functional/test_document.rb b/test/functional/test_document.rb
index <HASH>..<HASH> 100644
--- a/test/functional/test_document.rb
+++ b/test/functional/test_document.rb
@@ -961,4 +961,27 @@ class DocumentTest < Test::Unit::TestCase
from_db.updated_at.to_i.should_not == old_updated_at.to_i
end
end
+
+ context "#exist?" do
+ setup do
+ @doc = @document.create(:first_name => "James", :age => 27)
+ end
+
+ should "be true when at least one document exists" do
+ @document.exist?.should == true
+ end
+
+ should "be false when no documents exist" do
+ @doc.destroy
+ @document.exist?.should == false
+ end
+
+ should "be true when at least one document exists that matches the conditions" do
+ @document.exist?(:first_name => "James").should == true
+ end
+
+ should "be false when no documents exist with the provided conditions" do
+ @document.exist?(:first_name => "Jean").should == false
+ end
+ end
end
|
Add the ability to check for the existence of a record. A sometimes
handy method that only returns a boolean.
|
diff --git a/lib/liquid/document.rb b/lib/liquid/document.rb
index <HASH>..<HASH> 100644
--- a/lib/liquid/document.rb
+++ b/lib/liquid/document.rb
@@ -1,8 +1,12 @@
module Liquid
class Document < BlockBody
+ DEFAULT_OPTIONS = {
+ locale: I18n.new
+ }
+
def self.parse(tokens, options)
doc = new
- doc.parse(tokens, options)
+ doc.parse(tokens, DEFAULT_OPTIONS.merge(options))
doc
end
diff --git a/lib/liquid/template.rb b/lib/liquid/template.rb
index <HASH>..<HASH> 100644
--- a/lib/liquid/template.rb
+++ b/lib/liquid/template.rb
@@ -13,10 +13,6 @@ module Liquid
# template.render('user_name' => 'bob')
#
class Template
- DEFAULT_OPTIONS = {
- locale: I18n.new
- }
-
attr_accessor :root
attr_reader :resource_limits
@@ -120,7 +116,7 @@ module Liquid
@options = options
@profiling = options[:profile]
@line_numbers = options[:line_numbers] || @profiling
- @root = Document.parse(tokenize(source), DEFAULT_OPTIONS.merge(options))
+ @root = Document.parse(tokenize(source), options)
@warnings = nil
self
end
|
Move DEFAULT_OPTIONS related logic to Document
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -26,8 +26,6 @@ install_requires = ['Django',
tests_require = ['Django',
'requests',
'tox',
- 'sphinx',
- 'sphinx-autobuild',
'six']
|
remove sphinx from reqs
|
diff --git a/src/Core/Error/ApiException.php b/src/Core/Error/ApiException.php
index <HASH>..<HASH> 100644
--- a/src/Core/Error/ApiException.php
+++ b/src/Core/Error/ApiException.php
@@ -72,7 +72,9 @@ class ApiException extends Exception
}
return new ErrorResponseException($message, $request, $response, $previous);
case 401:
- if (strpos((string)$response->getBody(), 'invalid_token') !== false) {
+ $body = $response->getBody()->getContents();
+ $response = $response->withBody(stream_for($body));
+ if (strpos($body, 'invalid_token') !== false) {
return new InvalidTokenException($message, $request, $response, $previous);
}
return new InvalidClientCredentialsException($message, $request, $response, $previous);
|
WIP: restore response body stream for invalid token error
|
diff --git a/src/main/java/hu/kazocsaba/imageviewer/DefaultStatusBar.java b/src/main/java/hu/kazocsaba/imageviewer/DefaultStatusBar.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hu/kazocsaba/imageviewer/DefaultStatusBar.java
+++ b/src/main/java/hu/kazocsaba/imageviewer/DefaultStatusBar.java
@@ -5,7 +5,7 @@ package hu.kazocsaba.imageviewer;
* coordinates) and the colour of the pixel under the cursor.
* @author Kazó Csaba
*/
-final class DefaultStatusBar extends PixelInfoStatusBar implements ImageMouseMotionListener {
+public class DefaultStatusBar extends PixelInfoStatusBar implements ImageMouseMotionListener {
@Override
public void mouseMoved(ImageMouseEvent e) {
|
Make DefaultStatusBar public and non-final.
|
diff --git a/ruby/test-integration/authorizable_keystore_spec.rb b/ruby/test-integration/authorizable_keystore_spec.rb
index <HASH>..<HASH> 100644
--- a/ruby/test-integration/authorizable_keystore_spec.rb
+++ b/ruby/test-integration/authorizable_keystore_spec.rb
@@ -130,10 +130,10 @@ describe 'Authorizable Keystore' do
intermediate_path = '/home/users/system',
authorizable_id = 'authentication-service',
{
- :new_alias => 'somealias',
+ :new_alias => 'somekeystorealias',
:key_store => file,
:key_store_pass => 'somekeystorepassword',
- :_alias => 'somealias',
+ :_alias => 'somecertchainalias',
:key_password => 'someprivatekeypassword'
}
)
|
[ruby] Update keystore and certchain alias on keystore upload test.
|
diff --git a/lib/rails_email_preview.rb b/lib/rails_email_preview.rb
index <HASH>..<HASH> 100644
--- a/lib/rails_email_preview.rb
+++ b/lib/rails_email_preview.rb
@@ -38,12 +38,12 @@ module RailsEmailPreview
class << self
def layout=(layout)
- [RailsEmailPreview::ApplicationController, RailsEmailPreview::EmailsController].each { |ctrl| ctrl.layout layout }
- if layout && layout !~ %r(^rails_email_preview/)
- # inline application routes if using an app layout
- Rails.application.config.to_prepare {
+ Rails.application.config.to_prepare do
+ [RailsEmailPreview::ApplicationController, RailsEmailPreview::EmailsController].each { |ctrl| ctrl.layout layout }
+ if layout && layout !~ %r(^rails_email_preview/)
+ # inline application routes if using an app layout
RailsEmailPreview.inline_main_app_routes!
- }
+ end
end
end
|
do not lose layout on source reloads in dev
|
diff --git a/aagent/watchers/execwatcher/exec.go b/aagent/watchers/execwatcher/exec.go
index <HASH>..<HASH> 100644
--- a/aagent/watchers/execwatcher/exec.go
+++ b/aagent/watchers/execwatcher/exec.go
@@ -165,6 +165,10 @@ func (w *Watcher) intervalWatcher(ctx context.Context, wg *sync.WaitGroup) {
if w.properties.GatherInitialState {
splay := time.Duration(rand.Intn(30)) * time.Second
w.Infof("Performing initial execution after %v", splay)
+ if splay < 1 {
+ splay = 1
+ }
+
tick.Reset(splay)
}
|
(#<I>) guard against negative splays
|
diff --git a/notification-portlet-webapp/src/main/java/org/jasig/portlet/notice/service/jpa/JpaEntry.java b/notification-portlet-webapp/src/main/java/org/jasig/portlet/notice/service/jpa/JpaEntry.java
index <HASH>..<HASH> 100644
--- a/notification-portlet-webapp/src/main/java/org/jasig/portlet/notice/service/jpa/JpaEntry.java
+++ b/notification-portlet-webapp/src/main/java/org/jasig/portlet/notice/service/jpa/JpaEntry.java
@@ -86,7 +86,7 @@ import javax.persistence.Table;
@JoinColumn(name = "ENTRY_ID")
private Set<JpaAction> actions = new HashSet<>();
- @OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL)
+ @OneToMany(fetch=FetchType.EAGER, cascade=CascadeType.ALL)
@JoinColumn(name = "ENTRY_ID")
private Set<JpaAddressee> addressees = new HashSet<>();
|
fix: correct fetch type from LAZY to EAGER
|
diff --git a/helper/communicator/config.go b/helper/communicator/config.go
index <HASH>..<HASH> 100644
--- a/helper/communicator/config.go
+++ b/helper/communicator/config.go
@@ -86,6 +86,10 @@ func (c *Config) prepareSSH(ctx *interpolate.Context) []error {
if c.SSHBastionPort == 0 {
c.SSHBastionPort = 22
}
+
+ if c.SSHBastionPrivateKey == "" && c.SSHPrivateKey != "" {
+ c.SSHBastionPrivateKey = c.SSHPrivateKey
+ }
}
// Validation
|
helper/communicator: default bastion PK to normal PK
|
diff --git a/src/utils/helper.js b/src/utils/helper.js
index <HASH>..<HASH> 100644
--- a/src/utils/helper.js
+++ b/src/utils/helper.js
@@ -58,7 +58,6 @@ function getOperation(conjunction) {
}
function createBoolQuery(operation, query) {
- console.log('creating bool query', operation, query);
let resultQuery = null;
if ((Array.isArray(query) && query.length) || (!Array.isArray(query) && query)) {
resultQuery = {
|
:mute: Remove logs
|
diff --git a/lib/nearley.js b/lib/nearley.js
index <HASH>..<HASH> 100644
--- a/lib/nearley.js
+++ b/lib/nearley.js
@@ -38,8 +38,11 @@ State.prototype.toString = function() {
State.prototype.nextState = function(data) {
var state = new State(this.rule, this.dot + 1, this.reference, this.wantedBy);
- state.data = this.data.slice(0); // make a cheap copy of currentState's data
- state.data.push(data); // append the passed data
+ state.left = this;
+ state.right = data;
+ if (state.isComplete) {
+ state.data = state.build();
+ }
return state;
};
@@ -59,6 +62,17 @@ State.prototype.consumeTerminal = function(inp) {
return val;
};
+State.prototype.build = function() {
+ var children = [];
+ var node = this;
+ do {
+ children.push(node.right);
+ node = node.left;
+ } while (node.left);
+ children.reverse();
+ return children;
+};
+
State.prototype.finish = function() {
if (this.rule.postprocess) {
this.data = this.rule.postprocess(this.data, this.reference, Parser.fail);
|
Store node data as linked list! :D
(sort of.)
This is a really big deal. Currently slice() in `nextState` is really hurting
us. Avoiding it brings exciting perf improvements (~2-3x faster).
|
diff --git a/salt/modules/swarm.py b/salt/modules/swarm.py
index <HASH>..<HASH> 100644
--- a/salt/modules/swarm.py
+++ b/salt/modules/swarm.py
@@ -23,9 +23,7 @@ Docker Python SDK
More information: https://docker-py.readthedocs.io/en/stable/
"""
-# Import python libraries
-# Import Salt libs
import salt.utils.json
diff --git a/tests/integration/modules/test_swarm.py b/tests/integration/modules/test_swarm.py
index <HASH>..<HASH> 100644
--- a/tests/integration/modules/test_swarm.py
+++ b/tests/integration/modules/test_swarm.py
@@ -7,7 +7,6 @@ from tests.support.case import ModuleCase
from tests.support.helpers import destructiveTest, slowTest
from tests.support.mixins import SaltReturnAssertsMixin
-# Import Salt Testing Libs
from tests.support.unit import skipIf
|
[<I>] pre-commit
|
diff --git a/lib/wordpress_tools/cli_helper.rb b/lib/wordpress_tools/cli_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/wordpress_tools/cli_helper.rb
+++ b/lib/wordpress_tools/cli_helper.rb
@@ -31,7 +31,7 @@ module WordPressTools
end
def download_with_curl(url, destionation, options = {})
- sudo = options[:sudo]
+ sudo = options[:sudo]
command = "curl '#{url}' -o '#{destionation}'"
command = "sudo #{command}" if sudo == true
@@ -48,7 +48,7 @@ module WordPressTools
end
def wp_cli_installed?
- system("which wp-cli") || system("which wp")
+ system("which wp-cli >>#{void} 2>&1") || system("which wp >>#{void} 2>&1")
end
private
|
suppressed stdout from sysstem calls
|
diff --git a/src/Chat.php b/src/Chat.php
index <HASH>..<HASH> 100644
--- a/src/Chat.php
+++ b/src/Chat.php
@@ -11,10 +11,10 @@ class Chat {
$this->channel = $channel;
}
- public function send($message = null)
+ public function send($message = null, $attachments = null)
{
$config = $this->client->getConfig();
- $query = array_merge(array('text' => $message, 'channel' => $this->channel), $config);
+ $query = array_merge(array('text' => $message, 'channel' => $this->channel, 'attachments' => json_encode($attachments)), $config);
$request = $this->client->request('chat.postMessage', $query)->send();
$response = new Response($request);
if ($this->client->debug)
|
Allow sending 'attachments' as part of 'send' to allow formatted messages:
<URL>
|
diff --git a/salt/states/jboss7.py b/salt/states/jboss7.py
index <HASH>..<HASH> 100644
--- a/salt/states/jboss7.py
+++ b/salt/states/jboss7.py
@@ -412,6 +412,7 @@ def __get_artifact(salt_source):
template=None,
source=salt_source['source'],
source_hash=None,
+ source_hash_name=None,
user=None,
group=None,
mode=None,
|
Added missing source_hash_name argument in get_managed function
Additional fix to #<I>
Customer was still seeing errors, this should now work.
Tested with <I> and <I>
|
diff --git a/tests/mock_server.py b/tests/mock_server.py
index <HASH>..<HASH> 100644
--- a/tests/mock_server.py
+++ b/tests/mock_server.py
@@ -29,7 +29,7 @@ def start_service(service_name, host, port):
requests.get(url, timeout=0.5, proxies=_proxy_bypass)
break
except requests.exceptions.ConnectionError:
- time.sleep(0.5)
+ time.sleep(1.5)
else:
stop_process(process) # pytest.fail doesn't call stop_process
pytest.fail("Can not start service: {}".format(service_name))
|
Test to see if its startup time
|
diff --git a/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java b/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
+++ b/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
@@ -765,14 +765,15 @@ public class CmsDefaultXmlContentHandler implements I_CmsXmlContentHandler {
} else {
result = result.newInstance();
}
- // set the configuration value for this widget
- String configuration = getConfiguration(value);
- if (configuration == null) {
- // no individual configuration defined, try to get global default configuration
- configuration = OpenCms.getXmlContentTypeManager().getWidgetDefaultConfiguration(result);
+ if (result != null) {
+ // set the configuration value for this widget
+ String configuration = getConfiguration(value);
+ if (configuration == null) {
+ // no individual configuration defined, try to get global default configuration
+ configuration = OpenCms.getXmlContentTypeManager().getWidgetDefaultConfiguration(result);
+ }
+ result.setConfiguration(configuration);
}
- result.setConfiguration(configuration);
-
return result;
}
|
Avoiding null pointer exceptions.
|
diff --git a/end-to-end-tests/src/test/java/fi/jumi/test/RunningTestsTest.java b/end-to-end-tests/src/test/java/fi/jumi/test/RunningTestsTest.java
index <HASH>..<HASH> 100755
--- a/end-to-end-tests/src/test/java/fi/jumi/test/RunningTestsTest.java
+++ b/end-to-end-tests/src/test/java/fi/jumi/test/RunningTestsTest.java
@@ -30,9 +30,8 @@ public class RunningTestsTest {
printProcessOutput(launcher);
launcher.setJumiHome(sandboxDir);
- // TODO: is adding to classpath really required, or will it happend automatically?
String threadSafetyAgent = TestEnvironment.getProjectJar("thread-safety-agent").getAbsolutePath();
- launcher.setJvmOptions("-javaagent:" + threadSafetyAgent, "-cp", threadSafetyAgent);
+ launcher.setJvmOptions("-javaagent:" + threadSafetyAgent);
}
@Before
|
It's not necessary to add Java agents to classpath
|
diff --git a/forms/gridfield/GridField.php b/forms/gridfield/GridField.php
index <HASH>..<HASH> 100755
--- a/forms/gridfield/GridField.php
+++ b/forms/gridfield/GridField.php
@@ -123,7 +123,10 @@ class GridField extends FormField {
*/
public function getModelClass() {
if ($this->modelClassName) return $this->modelClassName;
- if ($this->list && $this->list->dataClass) return $this->list->dataClass;
+ if ($this->list && method_exists($this->list, 'dataClass')) {
+ $class = $this->list->dataClass();
+ if($class) return $class;
+ }
throw new LogicException('GridField doesn\'t have a modelClassName, so it doesn\'t know the columns of this grid.');
}
|
BUGFIX: Fixed GridField::getModelClass() not to access protected property.
|
diff --git a/py/selenium/webdriver/common/keys.py b/py/selenium/webdriver/common/keys.py
index <HASH>..<HASH> 100644
--- a/py/selenium/webdriver/common/keys.py
+++ b/py/selenium/webdriver/common/keys.py
@@ -92,4 +92,4 @@ class Keys(object):
META = u'\ue03d'
COMMAND = u'\ue03d'
- ZENKAKU_HANKAKU: '\uE040'
+ ZENKAKU_HANKAKU = u'\ue040'
|
[py] that is definitely the wrong syntax for python
|
diff --git a/tests/test_helpers.py b/tests/test_helpers.py
index <HASH>..<HASH> 100644
--- a/tests/test_helpers.py
+++ b/tests/test_helpers.py
@@ -397,7 +397,8 @@ class ScriptDownloaderTestCase(unittest.TestCase):
# checks
mock_downloader_class.assert_called_with(test_url)
- self.assertLoggedInfo("Downloading remote script", test_url, filepath, 'mock downloader')
+ self.assertLoggedInfo(
+ "Downloading remote script", test_url, repr(filepath), 'mock downloader')
with open(filepath, "rt", encoding='utf8') as fh:
self.assertEqual(fh.read(), test_content)
|
Check for repr of the path.
|
diff --git a/vendor/ember-suave/test-loader.js b/vendor/ember-suave/test-loader.js
index <HASH>..<HASH> 100644
--- a/vendor/ember-suave/test-loader.js
+++ b/vendor/ember-suave/test-loader.js
@@ -1,7 +1,12 @@
-/* globals jQuery, QUnit */
+/* globals requirejs, jQuery, QUnit */
jQuery(document).ready(function () {
- var TestLoaderModule = require('ember-cli/test-loader');
+ var testLoaderModulePath = 'ember-cli-test-loader/test-support/index';
+ if (!requirejs.entries[testLoaderModulePath]) {
+ testLoaderModulePath = 'ember-cli/test-loader';
+ }
+
+ var TestLoaderModule = require(testLoaderModulePath);
var addModuleExcludeMatcher = TestLoaderModule['addModuleExcludeMatcher'];
function isJscsDisabled() { return typeof QUnit === 'undefined' ? false : QUnit.urlParams.nojscs; }
|
Make compatible with ember-cli-qunit@<I>.
In ember-cli-qunit@<I> `ember-cli-test-loader` is attempted to be
loaded as an addon and falling back to the bower version if the addon is
not present.
This change brings ember-suave in line with those changes.
|
diff --git a/routing/result_interpretation.go b/routing/result_interpretation.go
index <HASH>..<HASH> 100644
--- a/routing/result_interpretation.go
+++ b/routing/result_interpretation.go
@@ -348,6 +348,10 @@ func (i *interpretedResult) processPaymentOutcomeIntermediate(
reportOutgoing()
+ // All nodes up to the failing pair must have forwarded
+ // successfully.
+ i.successPairRange(route, 0, errorSourceIdx-1)
+
// If we get a permanent channel, we'll prune the channel set in both
// directions and continue with the rest of the routes.
case *lnwire.FailPermanentChannelFailure:
diff --git a/routing/result_interpretation_test.go b/routing/result_interpretation_test.go
index <HASH>..<HASH> 100644
--- a/routing/result_interpretation_test.go
+++ b/routing/result_interpretation_test.go
@@ -362,6 +362,7 @@ var resultTestCases = []resultTestCase{
pairResults: map[DirectedNodePair]pairResult{
getTestPair(1, 2): failPairResult(0),
getTestPair(2, 1): failPairResult(0),
+ getTestPair(0, 1): successPairResult(100),
},
policyFailure: getPolicyFailure(1, 2),
},
|
routing: report success up to the failing node on FailChannelDisabled
|
diff --git a/swift_sync.py b/swift_sync.py
index <HASH>..<HASH> 100755
--- a/swift_sync.py
+++ b/swift_sync.py
@@ -24,7 +24,7 @@ def get_account():
def get_files(args):
swift_url = os.environ['OS_SWIFT_URL']
account = get_account()
- container_url = '{0}/v1/{1}/{2}?format=json'.format(
+ container_url = '{0}/{1}/{2}?format=json'.format(
swift_url, account, args.container)
print("Checking {0}".format(container_url))
response = urllib2.urlopen(container_url)
|
v1 is in the swift_url.
|
diff --git a/Flickr4Java/src/com/flickr4java/flickr/REST.java b/Flickr4Java/src/com/flickr4java/flickr/REST.java
index <HASH>..<HASH> 100644
--- a/Flickr4Java/src/com/flickr4java/flickr/REST.java
+++ b/Flickr4Java/src/com/flickr4java/flickr/REST.java
@@ -279,6 +279,9 @@ public class REST extends Transport {
if (Flickr.debugStream) {
System.out.println(strXml);
}
+ if(strXml.startsWith("oauth_problem=")) {
+ throw new FlickrRuntimeException(strXml);
+ }
Document document = builder.parse(new InputSource(new StringReader(strXml)));
response = (com.flickr4java.flickr.Response) responseClass.newInstance();
response.parse(document);
|
If there's an OAuth issue, Flickr returns a string, and not an XML. In
the post added a detection for this, to throw an error, rather than
letting it go on. if it goes on then WC3 will throw an error
|
diff --git a/src/Composer/Installer/BinaryInstaller.php b/src/Composer/Installer/BinaryInstaller.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Installer/BinaryInstaller.php
+++ b/src/Composer/Installer/BinaryInstaller.php
@@ -422,6 +422,15 @@ fi
export COMPOSER_BIN_DIR=\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd)
+# If bash is sourcing this file, we have to source the target as well
+bashSource="\$BASH_SOURCE"
+if [ -n "\$bashSource" ]; then
+ if [ "\$bashSource" != "\$0" ]; then
+ source "\${dir}/$binFile" "\$@"
+ return
+ fi
+fi
+
"\${dir}/$binFile" "\$@"
PROXY;
|
Add support for sourcing binaries despite the bin proxy being present, take 2
|
diff --git a/views/site/standard_template.php b/views/site/standard_template.php
index <HASH>..<HASH> 100755
--- a/views/site/standard_template.php
+++ b/views/site/standard_template.php
@@ -28,7 +28,7 @@
<meta name="description" content="<?= htmlspecialchars( $page->description );?>" />
<meta name="keywords" content="<?= htmlspecialchars( $page->keywords );?>" />
<script type='text/javascript' src='/sledge/js/jquery.js'></script>
- <script type="text/javascript" src="/js/main_init.js"></script>
+ <script type="text/javascript" src="/site/js/main_init.js"></script>
<?= View::factory( 'site/css' ); ?>
|
Updated link to site js
|
diff --git a/lxd/daemon_config.go b/lxd/daemon_config.go
index <HASH>..<HASH> 100644
--- a/lxd/daemon_config.go
+++ b/lxd/daemon_config.go
@@ -55,7 +55,7 @@ func (k *daemonConfigKey) Validate(d *Daemon, value string) error {
}
// Validate booleans
- if k.valueType == "bool" && !shared.StringInSlice(strings.ToLower(value), []string{"true", "false", "1", "0", "yes", "no"}) {
+ if k.valueType == "bool" && !shared.StringInSlice(strings.ToLower(value), []string{"true", "false", "1", "0", "yes", "no", "on", "off"}) {
return fmt.Errorf("Invalid value for a boolean: %s", value)
}
@@ -145,7 +145,7 @@ func (k *daemonConfigKey) GetBool() bool {
}
// Convert to boolean
- if shared.StringInSlice(strings.ToLower(value), []string{"true", "1", "yes"}) {
+ if shared.StringInSlice(strings.ToLower(value), []string{"true", "1", "yes", "on"}) {
return true
}
|
Allow on/off as boolean strings
|
diff --git a/lib/sass/script/funcall.rb b/lib/sass/script/funcall.rb
index <HASH>..<HASH> 100644
--- a/lib/sass/script/funcall.rb
+++ b/lib/sass/script/funcall.rb
@@ -145,10 +145,10 @@ module Sass
def perform_sass_fn(function, args, keywords)
# TODO: merge with mixin arg evaluation?
- keywords.each do |name, value|
- # TODO: Make this fast
- unless function.args.find {|(var, default)| var.underscored_name == name}
- raise Sass::SyntaxError.new("Function #{@name} doesn't have an argument named $#{name}")
+ if keywords.any?
+ unknown_args = keywords.keys - function.args.map {|var| var.first.underscored_name }
+ if unknown_args.any?
+ raise Sass::SyntaxError.new("Function #{@name} doesn't have an arguments: #{unknwon_args.map{|name| "$#{name}"}}")
end
end
|
A bit faster (for most cases) check for unknwon named argments in function call
|
diff --git a/lib/sanford/version.rb b/lib/sanford/version.rb
index <HASH>..<HASH> 100644
--- a/lib/sanford/version.rb
+++ b/lib/sanford/version.rb
@@ -1,3 +1,3 @@
module Sanford
- VERSION = "0.12.0"
+ VERSION = "0.13.0"
end
|
version to <I>
* require the latest dat-tcp f<I>a<I>bc4d3c<I>b3a<I>c1c2e<I>
* add `router` and `template_source` instance methods to the server obj #<I>
* rework template source api for querying about configured engines #<I>
/cc @jcredding
|
diff --git a/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java b/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java
index <HASH>..<HASH> 100644
--- a/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java
+++ b/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java
@@ -604,7 +604,7 @@ public class GVRPicker extends GVRBehavior {
GVRCollider collider = GVRCollider.lookup(colliderPointer);
if (collider == null)
{
- Log.d("Picker", "makeHit: cannot find collider for %p", colliderPointer);
+ Log.d(TAG, "makeHit: cannot find collider for %x", colliderPointer);
return null;
}
return new GVRPicker.GVRPickedObject(collider, new float[] { hitx, hity, hitz }, distance);
|
Fix for a UnknownFormatConversionException that leads to a crash
|
diff --git a/src/Bar.js b/src/Bar.js
index <HASH>..<HASH> 100644
--- a/src/Bar.js
+++ b/src/Bar.js
@@ -54,6 +54,8 @@ export default class BarChart extends Component {
}
},
axisY: {
+ min: false,
+ max: false,
showAxis: true,
showLines: true,
showLabels: true,
@@ -78,8 +80,9 @@ export default class BarChart extends Component {
}
getMaxAndMin(values, scale) {
- let maxValue = 0
- let minValue = 0
+ const axisY = this.props.options.axisY
+ let maxValue = axisY.max || 0
+ let minValue = axisY.min || 0
let max = _.max(values)
if (max > maxValue) maxValue = max
@@ -106,7 +109,9 @@ export default class BarChart extends Component {
gutter: this.props.options.gutter || 10,
width: options.chartWidth,
height: options.chartHeight,
- accessor: accessor
+ accessor: accessor,
+ min: this.props.options.axisY.min || undefined,
+ max: this.props.options.axisY.max || undefined,
})
let values = chart.curves.map((curve) => accessor(curve.item))
|
Add min/max scale support to the y axis on the bar chart (#<I>)
|
diff --git a/api/urls.py b/api/urls.py
index <HASH>..<HASH> 100644
--- a/api/urls.py
+++ b/api/urls.py
@@ -202,9 +202,13 @@ Auth
Create a new :class:`~api.models.UserRegistration`.
-.. http:post:: /api/auth/???
+.. http:post:: /api/auth/login
- TODO: document the important rest_framework login URLs
+ Authenticate for the REST framework.
+
+.. http:post:: /api/auth/logout
+
+ Clear authentication for the REST framework.
.. http:get:: /api/generate-api-key/
|
Fixed #<I> -- doc the 2 restframework methods.
|
diff --git a/sorl/thumbnail/engines/pil_engine.py b/sorl/thumbnail/engines/pil_engine.py
index <HASH>..<HASH> 100644
--- a/sorl/thumbnail/engines/pil_engine.py
+++ b/sorl/thumbnail/engines/pil_engine.py
@@ -1,4 +1,3 @@
-from io import BytesIO
from sorl.thumbnail.engines.base import EngineBase
from sorl.thumbnail.compat import BufferIO
@@ -41,14 +40,14 @@ class GaussianBlur(ImageFilter.Filter):
class Engine(EngineBase):
def get_image(self, source):
- buffer = BytesIO(source.read())
+ buffer = BufferIO(source.read())
return Image.open(buffer)
def get_image_size(self, image):
return image.size
def is_valid_image(self, raw_data):
- buffer = BytesIO(raw_data)
+ buffer = BufferIO(raw_data)
try:
trial_image = Image.open(buffer)
trial_image.verify()
|
Always use compat.BufferIO in pil_engine.
|
diff --git a/src/ElephantOnCouch/Message/Request.php b/src/ElephantOnCouch/Message/Request.php
index <HASH>..<HASH> 100755
--- a/src/ElephantOnCouch/Message/Request.php
+++ b/src/ElephantOnCouch/Message/Request.php
@@ -295,7 +295,7 @@ final class Request extends Message {
//! @param[in] string $value Parameter value.
public function setQueryParam($name, $value) {
if (preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/', $name))
- $this->queryParams[$name] = rawurlencode($value);
+ $this->queryParams[$name] = $value;
else
throw new \InvalidArgumentException("\$name must start with a letter or underscore, followed by any number of
letters, numbers, or underscores.");
|
fixed a bug on setQueryParam(), I was encoding two times
|
diff --git a/SpiffWorkflow/bpmn/DMNPythonScriptEngine.py b/SpiffWorkflow/bpmn/DMNPythonScriptEngine.py
index <HASH>..<HASH> 100644
--- a/SpiffWorkflow/bpmn/DMNPythonScriptEngine.py
+++ b/SpiffWorkflow/bpmn/DMNPythonScriptEngine.py
@@ -33,7 +33,7 @@ class DMNPythonScriptEngine(PythonScriptEngine):
will play nice with the existing FeelLikeScriptEngine
"""
def __init__(self):
- pass
+ super().__init__()
def eval_dmn_expression(self, inputExpr, matchExpr, **kwargs):
"""
diff --git a/SpiffWorkflow/bpmn/FeelLikeScriptEngine.py b/SpiffWorkflow/bpmn/FeelLikeScriptEngine.py
index <HASH>..<HASH> 100644
--- a/SpiffWorkflow/bpmn/FeelLikeScriptEngine.py
+++ b/SpiffWorkflow/bpmn/FeelLikeScriptEngine.py
@@ -278,7 +278,7 @@ class FeelLikeScriptEngine(PythonScriptEngine):
expressions in a mini-language of your own.
"""
def __init__(self):
- pass
+ super().__init__()
def patch_expression(self,invalid_python,lhs=''):
if invalid_python is None:
|
Fixing a slight bug in the script engines.
|
diff --git a/lib/tophat/opengraph.rb b/lib/tophat/opengraph.rb
index <HASH>..<HASH> 100644
--- a/lib/tophat/opengraph.rb
+++ b/lib/tophat/opengraph.rb
@@ -59,7 +59,8 @@ module TopHat
end
end
- def fb_like()
+ def fb_like(options={})
+ tag("fb:like", options)
end
end
diff --git a/test/test_opengraph.rb b/test/test_opengraph.rb
index <HASH>..<HASH> 100644
--- a/test/test_opengraph.rb
+++ b/test/test_opengraph.rb
@@ -65,6 +65,12 @@ class TopHatOpenGraphTestCase < Test::Unit::TestCase
end
+ context "generating a like button" do
+ should "render the tag" do
+ assert_equal @template.fb_like(:href => 'http://developers.facebook.com/', :width => '450', :height => 80), '<fb:like height="80" href="http://developers.facebook.com/" width="450" />'
+ end
+ end
+
end
end
\ No newline at end of file
|
added a fb_like method
|
diff --git a/src/main/java/org/efaps/ui/wicket/models/objects/grid/UIGrid.java b/src/main/java/org/efaps/ui/wicket/models/objects/grid/UIGrid.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/efaps/ui/wicket/models/objects/grid/UIGrid.java
+++ b/src/main/java/org/efaps/ui/wicket/models/objects/grid/UIGrid.java
@@ -231,7 +231,7 @@ public class UIGrid
multi.addMsgPhrase(field.getProperty(UITableFieldProperty.SORT_MSG_PHRASE));
}
}
- multi.execute();
+ multi.executeWithoutAccessCheck();
while (multi.next()) {
final GridRow row = new GridRow(multi.getCurrentInstance());
this.values.add(row);
|
Grid move to be able to do a Tree
|
diff --git a/chalice/app.py b/chalice/app.py
index <HASH>..<HASH> 100644
--- a/chalice/app.py
+++ b/chalice/app.py
@@ -72,8 +72,8 @@ def _matches_content_type(content_type, valid_content_types):
elif ';' in content_type:
for section in content_type.split(';'):
- for type in section.split(','):
- if type.lower().strip() in valid_content_types:
+ for mime_type in section.split(','):
+ if mime_type.lower().strip() in valid_content_types:
content_type_matches = True
elif content_type in valid_content_types:
content_type_matches = True
|
Change variable to not clash with bultin keyword
|
diff --git a/src/main/java/io/reactivesocket/internal/Responder.java b/src/main/java/io/reactivesocket/internal/Responder.java
index <HASH>..<HASH> 100644
--- a/src/main/java/io/reactivesocket/internal/Responder.java
+++ b/src/main/java/io/reactivesocket/internal/Responder.java
@@ -26,6 +26,7 @@ import io.reactivesocket.RequestHandler;
import io.reactivesocket.exceptions.InvalidSetupException;
import io.reactivesocket.exceptions.RejectedException;
import io.reactivesocket.exceptions.SetupException;
+import io.reactivesocket.internal.frame.FrameHeaderFlyweight;
import io.reactivesocket.internal.frame.SetupFrameFlyweight;
import io.reactivesocket.internal.rx.EmptyDisposable;
import io.reactivesocket.internal.rx.EmptySubscription;
@@ -431,7 +432,7 @@ public class Responder {
onError(exc);
} else {
Frame nextCompleteFrame = Frame.Response.from(
- streamId, FrameType.NEXT_COMPLETE, v);
+ streamId, FrameType.RESPONSE, v.getMetadata(), v.getData(), FrameHeaderFlyweight.FLAGS_RESPONSE_C);
child.onNext(nextCompleteFrame);
}
}
|
request response now returns a response frame with a complete flag set
|
diff --git a/src/views/boom/editor/toolbar.php b/src/views/boom/editor/toolbar.php
index <HASH>..<HASH> 100755
--- a/src/views/boom/editor/toolbar.php
+++ b/src/views/boom/editor/toolbar.php
@@ -46,10 +46,6 @@
<?php endif ?>
<div class="b-page-container">
- <?/*<button id="boom-page-editlive" class="ui-button boom-button" data-icon="ui-icon-boom-edit-live">
- <?=Lang::get('Edit live') ?>
- </button>*/?>
-
<?= new \BoomCMS\Core\UI\Button('view-live', Lang::get('View the page as it appears on the live site'), ['id' => 'boom-page-viewlive', 'class' => 'b-button-preview', 'data-preview' => 'disabled']) ?>
</div>
|
Removed commented code from editor toolbar
|
diff --git a/closure/goog/debug/debugwindow.js b/closure/goog/debug/debugwindow.js
index <HASH>..<HASH> 100644
--- a/closure/goog/debug/debugwindow.js
+++ b/closure/goog/debug/debugwindow.js
@@ -603,3 +603,16 @@ goog.debug.DebugWindow.prototype.addFilter = function(loggerName) {
goog.debug.DebugWindow.prototype.removeFilter = function(loggerName) {
delete this.filteredLoggers_[loggerName];
};
+
+
+/**
+ * Modify the size of the circular buffer. Allows the log to retain more
+ * information while the window is closed.
+ * @param {number} size New size of the circular buffer.
+ */
+goog.debug.DebugWindow.prototype.resetBufferWithNewSize = function(size) {
+ if (size > 0 && size < 50000) {
+ this.clear_();
+ this.savedMessages_ = new goog.structs.CircularBuffer(size);
+ }
+};
|
Allow changes to the circular buffer size.
R=gboyer,arv,pupius,nicksantos
DELTA=<I> (<I> added, 0 deleted, 0 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=<I>
git-svn-id: <URL>
|
diff --git a/lib/dimples/site.rb b/lib/dimples/site.rb
index <HASH>..<HASH> 100644
--- a/lib/dimples/site.rb
+++ b/lib/dimples/site.rb
@@ -36,7 +36,6 @@ module Dimples
end
def generate
- prepare_output_directory
scan_files
generate_files
copy_assets
@@ -160,6 +159,8 @@ module Dimples
end
def generate_files
+ prepare_output_directory
+
generate_pages unless @pages.count.zero?
return if @posts.count.zero?
|
Update generate_files to call prepare_output_directory.
|
diff --git a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java
+++ b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java
@@ -650,7 +650,7 @@ public abstract class NanoHTTPD {
protected int sendContentLengthHeaderIfNotAlreadyPresent(PrintWriter pw, Map<String, String> header, int size) {
for (String headerName : header.keySet()) {
- if (headerName.equalsIgnoreCase("content-length") {
+ if (headerName.equalsIgnoreCase("content-length")) {
try {
return Integer.parseInt(header.get(headerName));
} catch (NumberFormatException ex) {
|
Fixed missing paren, Issue #<I>
|
diff --git a/public/js/components/EditorSearchBar.js b/public/js/components/EditorSearchBar.js
index <HASH>..<HASH> 100644
--- a/public/js/components/EditorSearchBar.js
+++ b/public/js/components/EditorSearchBar.js
@@ -4,12 +4,12 @@ const { findDOMNode } = require("react-dom");
const Svg = require("./utils/Svg");
const { find, findNext, findPrev } = require("../utils/source-search");
const classnames = require("classnames");
-const debounce = require("lodash").debounce;
+const { debounce, escapeRegExp } = require("lodash");
require("./EditorSearchBar.css");
function countMatches(query, text) {
- const re = new RegExp(query, "g");
+ const re = new RegExp(escapeRegExp(query), "g");
const match = text.match(re);
return match ? match.length : 0;
}
|
Escape EditorSearchBar queries before using as RegExp (#<I>)
|
diff --git a/lib/Epuber/server/keyboard_control.js b/lib/Epuber/server/keyboard_control.js
index <HASH>..<HASH> 100644
--- a/lib/Epuber/server/keyboard_control.js
+++ b/lib/Epuber/server/keyboard_control.js
@@ -2,6 +2,13 @@
window.addEventListener('keydown', function (e) {
var l = window.location;
+ // alt == 18
+ // cmd == 91
+ if (e.which == 91) // cmd
+ {
+ return;
+ }
+
switch (e.keyCode)
{
case 37: // left
@@ -23,4 +30,4 @@ window.addEventListener('keydown', function (e) {
break;
}
-});
+}, false);
|
[Server][keyboard_control.js] do not jump when command key is down
|
diff --git a/tests/React/Curry/UtilTest.php b/tests/React/Curry/UtilTest.php
index <HASH>..<HASH> 100644
--- a/tests/React/Curry/UtilTest.php
+++ b/tests/React/Curry/UtilTest.php
@@ -27,7 +27,7 @@ class UtilTest extends \PHPUnit_Framework_TestCase
$this->assertSame(6, $addOneAndFive());
}
- public function createAddFunction()
+ private function createAddFunction()
{
return function ($a, $b) {
return $a + $b;
|
Update tests/React/Curry/UtilTest.php
|
diff --git a/src/Table.php b/src/Table.php
index <HASH>..<HASH> 100644
--- a/src/Table.php
+++ b/src/Table.php
@@ -145,7 +145,7 @@ class Table extends BaseTable
public function getReminderFields()
{
$result = [];
- foreach ($this->getFieldsDefinitions($this->alias()) as $field) {
+ foreach ($this->getFieldsDefinitions(Inflector::camelize($this->table())) as $field) {
if ($field['type'] == 'reminder') {
$result[] = $field;
}
|
Fixed incorrect reference to association instead of table
|
diff --git a/lib/logger.js b/lib/logger.js
index <HASH>..<HASH> 100644
--- a/lib/logger.js
+++ b/lib/logger.js
@@ -1,4 +1,5 @@
var winston = require('winston');
+var config = require('./config-loader');
var logger = new winston.Logger({
transports: [
@@ -15,5 +16,13 @@ var loggerStream = {write: function (data) {
logger.info(data.replace(/\n$/, ''));
}};
+var logInfo = logger.info;
+
+logger.info = function() {
+ if (config.get('NODE_ENV') !== 'test') {
+ logInfo.apply(logger, arguments);
+ }
+};
+
exports.logger = logger;
exports.loggerStream = loggerStream;
|
Suppress database logging during tests
|
diff --git a/amazon_dash/scan.py b/amazon_dash/scan.py
index <HASH>..<HASH> 100644
--- a/amazon_dash/scan.py
+++ b/amazon_dash/scan.py
@@ -21,6 +21,9 @@ def scan_devices(fn, lfilter, iface=None):
:return: loop
"""
try:
- sniff(prn=fn, store=0, filter="udp", lfilter=lfilter, iface=iface)
+ sniff(prn=fn, store=0,
+ # filter="udp",
+ filter="arp or (udp and src port 68 and dst port 67 and src host 0.0.0.0)",
+ lfilter=lfilter, iface=iface)
except PermissionError:
raise SocketPermissionError
|
Issue #<I>: Evaluate to change sniff filters
|
diff --git a/lib/dimples/site.rb b/lib/dimples/site.rb
index <HASH>..<HASH> 100644
--- a/lib/dimples/site.rb
+++ b/lib/dimples/site.rb
@@ -83,7 +83,6 @@ module Dimples
end
def scan_posts
-
Dir.glob(File.join(@source_paths[:posts], '*.*')).reverse.each do |path|
post = @post_class.new(self, path)
@@ -102,6 +101,11 @@ module Dimples
@posts << post
end
+ @posts.each_index do |index|
+ posts[index].next_post = @posts.fetch(index - 1, nil) if index - 1 > 0
+ @posts[index].previous_post = @posts.fetch(index + 1, nil) if index + 1 < @posts.count
+ end
+
@latest_post = @posts.first
end
@@ -190,7 +194,7 @@ module Dimples
path += File.split(paths[0])[-1] + "/" if paths[0] != @output_paths[:site]
path += paths[1..-1].join('/') + "/" if paths.length > 1
-
+
path
end
|
Updated the scan_posts method to set a post's neighbours.
|
diff --git a/tests/HTMLPurifier/HTMLModule/HTML5/TextTest.php b/tests/HTMLPurifier/HTMLModule/HTML5/TextTest.php
index <HASH>..<HASH> 100644
--- a/tests/HTMLPurifier/HTMLModule/HTML5/TextTest.php
+++ b/tests/HTMLPurifier/HTMLModule/HTML5/TextTest.php
@@ -384,6 +384,10 @@ class HTMLPurifier_HTMLModule_HTML5_TextTest extends BaseTestCase
'empty figure' => array(
'<figure></figure>',
),
+ 'deep figcaption' => array(
+ '<figure><div><div><figcaption>Foo</figcaption></div></div></figure>',
+ '<figure><div><div></div></div><figcaption>Foo</figcaption></figure>',
+ ),
);
}
|
Add test for deep figcaption
|
diff --git a/lib/chai/interface/should.js b/lib/chai/interface/should.js
index <HASH>..<HASH> 100644
--- a/lib/chai/interface/should.js
+++ b/lib/chai/interface/should.js
@@ -10,10 +10,8 @@ module.exports = function (chai, util) {
function loadShould () {
// explicitly define this method as function as to have it's name to include as `ssfi`
function shouldGetter() {
- if (this instanceof String || this instanceof Number) {
- return new Assertion(this.constructor(this), null, shouldGetter);
- } else if (this instanceof Boolean) {
- return new Assertion(this == true, null, shouldGetter);
+ if (this instanceof String || this instanceof Number || this instanceof Boolean ) {
+ return new Assertion(this.valueOf(), null, shouldGetter);
}
return new Assertion(this, null, shouldGetter);
}
|
Primitives now use valueOf in shouldGetter
This allows the should syntax to be more resilient when
dealing with modified primitive constructors which
may occur more frequently with ES6 to ES5 transpilation.
|
diff --git a/src/test/org/openscience/cdk/atomtype/CDKAtomTypeMatcherTest.java b/src/test/org/openscience/cdk/atomtype/CDKAtomTypeMatcherTest.java
index <HASH>..<HASH> 100644
--- a/src/test/org/openscience/cdk/atomtype/CDKAtomTypeMatcherTest.java
+++ b/src/test/org/openscience/cdk/atomtype/CDKAtomTypeMatcherTest.java
@@ -3524,10 +3524,9 @@ public class CDKAtomTypeMatcherTest extends AbstractCDKAtomTypeTest {
IChemObjectBuilder builder = DefaultChemObjectBuilder.getInstance();
IMolecule mol = builder.newInstance(IMolecule.class);
IAtom a1 = builder.newInstance(IAtom.class,"Te");
- a1.setFormalCharge(0);
+ a1.setFormalCharge(4);
mol.addAtom(a1);
-
String[] expectedTypes = {"Te.4plus"};
assertAtomTypes(testedAtomTypes, expectedTypes, mol);
}
|
Fixed charge in unit test: <I> not 0
|
diff --git a/doc/conf.py b/doc/conf.py
index <HASH>..<HASH> 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -263,8 +263,8 @@ if on_saltstack:
copyright = time.strftime("%Y")
# < --- START do not merge these settings to other branches START ---> #
-build_type = 'latest' # latest, previous, develop, next
-release = latest_release # version, latest_release, previous_release
+build_type = 'previous' # latest, previous, develop, next
+release = previous_release # version, latest_release, previous_release
# < --- END do not merge these settings to other branches END ---> #
# Set google custom search engine
|
[<I>] change build_type and release in doc/conf.py
|
diff --git a/Gemfile.lock b/Gemfile.lock
index <HASH>..<HASH> 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- warden (1.1.1)
+ warden (1.2.0)
rack (>= 1.0)
GEM
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -14,6 +14,7 @@ end
RSpec.configure do |config|
config.include(Warden::Spec::Helpers)
+ config.include(Warden::Test::Helpers)
def load_strategies
Dir[File.join(File.dirname(__FILE__), "helpers", "strategies", "**/*.rb")].each do |f|
diff --git a/spec/warden/test/helpers_spec.rb b/spec/warden/test/helpers_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/warden/test/helpers_spec.rb
+++ b/spec/warden/test/helpers_spec.rb
@@ -2,8 +2,6 @@
require 'spec_helper'
describe Warden::Test::Helpers do
- include Warden::Test::Helpers
-
before{ $captures = [] }
after{ Warden.test_reset! }
|
make hidden global include obvious, now all tests pass when run on their own (previously proxy_spec failed when run on its own)
|
diff --git a/lib/respect/unit_test_helper.rb b/lib/respect/unit_test_helper.rb
index <HASH>..<HASH> 100644
--- a/lib/respect/unit_test_helper.rb
+++ b/lib/respect/unit_test_helper.rb
@@ -7,7 +7,7 @@ module Respect
if msg
message = msg
else
- message = "Schema:\n#{schema}expected to validate object <#{object}> but failed with '#{schema.last_error.context.join(" ")}'."
+ message = "Schema:\n#{schema}expected to validate object <#{object}> but failed with \"#{schema.last_error.context.join(" ")}\"."
end
assert false, message
end
|
Double-quote are more readable here.
|
diff --git a/lib/specjour/db_scrub.rb b/lib/specjour/db_scrub.rb
index <HASH>..<HASH> 100644
--- a/lib/specjour/db_scrub.rb
+++ b/lib/specjour/db_scrub.rb
@@ -25,12 +25,8 @@ module Specjour
def scrub
connect_to_database
- if pending_migrations?
- puts "Migrating schema for database #{ENV['TEST_ENV_NUMBER']}..."
- schema_load_task.invoke
- else
- purge_tables
- end
+ puts "Resetting database #{ENV['TEST_ENV_NUMBER']}…"
+ schema_load_task.invoke
end
protected
@@ -48,14 +44,6 @@ module Specjour
ActiveRecord::Base.connection
end
- def purge_tables
- connection.disable_referential_integrity do
- tables_to_purge.each do |table|
- connection.delete "delete from #{table}"
- end
- end
- end
-
def pending_migrations?
ActiveRecord::Migrator.new(:up, 'db/migrate').pending_migrations.any?
end
|
DbScrub always recreates the database
Sometimes, pending migrations isn't a good enough indicator to know if
the database has changed
|
diff --git a/benchexec/tablegenerator/__init__.py b/benchexec/tablegenerator/__init__.py
index <HASH>..<HASH> 100644
--- a/benchexec/tablegenerator/__init__.py
+++ b/benchexec/tablegenerator/__init__.py
@@ -762,8 +762,7 @@ def merge_task_lists(runset_results, tasks):
for task in tasks:
run_result = dic.get(task)
if run_result is None:
- assert len(task) == 1\
- and len(runset.attributes['tool']) == 1\
+ assert len(runset.attributes['tool']) == 1\
and len(runset.attributes['name']) == 1\
and len(runset.attributes['benchmarkname']) == 1
logging.info(" no result for task '%s' (tool='%s', benchmark='%s', benchmark name='%s').",
|
Fix wrong assertion in table generator: Task is a tuple of three.
|
diff --git a/copulas/bivariate/gumbel.py b/copulas/bivariate/gumbel.py
index <HASH>..<HASH> 100644
--- a/copulas/bivariate/gumbel.py
+++ b/copulas/bivariate/gumbel.py
@@ -139,4 +139,7 @@ class Gumbel(Bivariate):
On Gumbel copula :math:`\tau` is defined as :math:`τ = \frac{θ−1}{θ}`
that we solve as :math:`θ = \frac{1}{1-τ}`
"""
+ if self.tau == 1:
+ raise ValueError("Tau value can't be 1")
+
return 1 / (1 - self.tau)
|
Prevent ZeroDivisionError by raising a controlled ValueError
|
diff --git a/auto_ml/predictor.py b/auto_ml/predictor.py
index <HASH>..<HASH> 100644
--- a/auto_ml/predictor.py
+++ b/auto_ml/predictor.py
@@ -914,6 +914,9 @@ class Predictor(object):
n_jobs = -1
+ if os.environ.get('is_test_suite', 0) == 'True':
+ n_jobs = 1
+
gs = GridSearchCV(
# Fit on the pipeline.
ppl,
@@ -1181,7 +1184,7 @@ class Predictor(object):
if os.environ.get('is_test_suite', False) == 'True':
# If this is the test_suite, do not run things in parallel
- results = list(pool.map(lambda x: train_one_categorical_model(x[0], x[1], x[2]), categories_and_data))
+ results = list(map(lambda x: train_one_categorical_model(x[0], x[1], x[2]), categories_and_data))
else:
try:
results = list(pool.map(lambda x: train_one_categorical_model(x[0], x[1], x[2]), categories_and_data))
|
reinstates one place for n_jobs=1 for is_test_suite
|
diff --git a/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialChip.java b/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialChip.java
index <HASH>..<HASH> 100644
--- a/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialChip.java
+++ b/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialChip.java
@@ -60,7 +60,7 @@ import gwt.material.design.client.ui.html.Span;
* @see <a href="https://material.io/guidelines/components/chips.html">Material Design Specification</a>
*/
//@formatter:on
-public class MaterialChip extends AbstractTextWidget implements HasImage, HasIcon, HasLetter,
+public class MaterialChip extends AbstractValueWidget<String> implements HasImage, HasIcon, HasLetter,
HasValue<String>, HasCloseHandlers, HasType<ChipType> {
private MaterialIcon icon = new MaterialIcon(IconType.CLOSE);
|
Reverted Chips to AbstractValueWidget.
|
diff --git a/auth_jwt_test.go b/auth_jwt_test.go
index <HASH>..<HASH> 100644
--- a/auth_jwt_test.go
+++ b/auth_jwt_test.go
@@ -19,7 +19,7 @@ type DecoderToken struct {
func makeTokenString(username string, key []byte) string {
token := jwt.New(jwt.GetSigningMethod("HS256"))
- token.Claims["id"] = "admin"
+ token.Claims["id"] = username
token.Claims["exp"] = time.Now().Add(time.Hour).Unix()
token.Claims["orig_iat"] = time.Now().Unix()
tokenString, _ := token.SignedString(key)
@@ -107,7 +107,7 @@ func TestAuthJWT(t *testing.T) {
recorded = test.RunRequest(t, handler, expiredTimestampReq)
recorded.CodeIs(401)
recorded.ContentTypeIsJson()
-
+
// right credt, right method, right priv, wrong signing method on request
tokenBadSigning := jwt.New(jwt.GetSigningMethod("HS384"))
tokenBadSigning.Claims["id"] = "admin"
|
change const value to variable on makeTokenString method.
|
diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py
index <HASH>..<HASH> 100644
--- a/pandas/core/tools/datetimes.py
+++ b/pandas/core/tools/datetimes.py
@@ -260,7 +260,7 @@ def _convert_listlike_datetimes(
Parameters
----------
arg : list, tuple, ndarray, Series, Index
- date to be parced
+ date to be parsed
name : object
None or string for the Index name
tz : object
|
Fiy Typo in datetimes (parced) (#<I>)
|
diff --git a/hooks/papertrail/papertrail.go b/hooks/papertrail/papertrail.go
index <HASH>..<HASH> 100644
--- a/hooks/papertrail/papertrail.go
+++ b/hooks/papertrail/papertrail.go
@@ -31,6 +31,7 @@ func NewPapertrailHook(host string, port int, appName string) (*PapertrailHook,
func (hook *PapertrailHook) Fire(entry *logrus.Entry) error {
defer hook.UDPConn.Close()
date := time.Now().Format(format)
+ payload := fmt.Sprintf("<22> %s %s: [%s] %s", date, hook.AppName, entry.Data["level"], entry.Message)
line, err := entry.String()
if err != nil {
|
Log just the message, not the stringified version of the whole log line.
|
diff --git a/get_file.go b/get_file.go
index <HASH>..<HASH> 100644
--- a/get_file.go
+++ b/get_file.go
@@ -18,8 +18,13 @@ func (g *FileGetter) ClientMode(u *url.URL) (ClientMode, error) {
path = u.RawPath
}
+ fi, err := os.Stat(path)
+ if err != nil {
+ return 0, err
+ }
+
// Check if the source is a directory.
- if fi, err := os.Stat(path); err == nil && fi.IsDir() {
+ if fi.IsDir() {
return ClientModeDir, nil
}
diff --git a/get_file_test.go b/get_file_test.go
index <HASH>..<HASH> 100644
--- a/get_file_test.go
+++ b/get_file_test.go
@@ -166,6 +166,15 @@ func TestFileGetter_percent2F(t *testing.T) {
}
}
+func TestFileGetter_ClientMode_notexist(t *testing.T) {
+ g := new(FileGetter)
+
+ u := testURL("nonexistent")
+ if _, err := g.ClientMode(u); err == nil {
+ t.Fatal("expect source file error")
+ }
+}
+
func TestFileGetter_ClientMode_file(t *testing.T) {
g := new(FileGetter)
|
Error is returned early if file source does not exist
|
diff --git a/tests/longSelect.go b/tests/longSelect.go
index <HASH>..<HASH> 100644
--- a/tests/longSelect.go
+++ b/tests/longSelect.go
@@ -7,39 +7,16 @@ func main() {
prompt := &survey.Select{
Message: "Choose a color:",
Options: []string{
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "red",
- "blue",
- "green",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
},
}
survey.AskOne(prompt, &color, nil)
|
made longselect test more reasonable
|
diff --git a/src/drag.js b/src/drag.js
index <HASH>..<HASH> 100644
--- a/src/drag.js
+++ b/src/drag.js
@@ -5,6 +5,7 @@ module.exports = class Drag extends Plugin
constructor(parent)
{
super(parent)
+ this.inMove = false
}
down(x, y, data)
@@ -29,7 +30,7 @@ module.exports = class Drag extends Plugin
{
const distX = x - this.last.x
const distY = y - this.last.y
- if (this.parent.checkThreshold(distX) || this.parent.checkThreshold(distY))
+ if (this.parent.checkThreshold(distX) || this.parent.checkThreshold(distY) || this.inMove)
{
this.parent.container.x += distX
this.parent.container.y += distY
@@ -37,6 +38,10 @@ module.exports = class Drag extends Plugin
this.inMove = true
}
}
+ else
+ {
+ this.inMove = false
+ }
}
}
|
Smoothed dragging
- Dragging is no longer choppy
|
diff --git a/server/server.go b/server/server.go
index <HASH>..<HASH> 100644
--- a/server/server.go
+++ b/server/server.go
@@ -431,7 +431,7 @@ func (s *Server) AcceptLoop(clr chan struct{}) {
conn, err := l.Accept()
if err != nil {
if ne, ok := err.(net.Error); ok && ne.Temporary() {
- s.Debugf("Temporary Client Accept Error(%v), sleeping %dms",
+ s.Errorf("Temporary Client Accept Error (%v), sleeping %dms",
ne, tmpDelay/time.Millisecond)
time.Sleep(tmpDelay)
tmpDelay *= 2
@@ -439,7 +439,7 @@ func (s *Server) AcceptLoop(clr chan struct{}) {
tmpDelay = ACCEPT_MAX_SLEEP
}
} else if s.isRunning() {
- s.Noticef("Accept error: %v", err)
+ s.Errorf("Client Accept Error: %v", err)
}
continue
}
|
Change client Accept error log level
This is an error users should know about. Thus, the log level should be
error.
Fixes #<I>
|
diff --git a/torrent.go b/torrent.go
index <HASH>..<HASH> 100644
--- a/torrent.go
+++ b/torrent.go
@@ -637,7 +637,7 @@ func (t *Torrent) hashPiece(piece int) (ret metainfo.Hash) {
return
}
if err != io.ErrUnexpectedEOF && !os.IsNotExist(err) {
- log.Printf("unexpected error hashing piece with %T: %s", t.storage, err)
+ log.Printf("unexpected error hashing piece with %T: %s", t.storage.TorrentImpl, err)
}
return
}
|
Log the storage TorrentImpl type
|
diff --git a/dipper/sources/Source.py b/dipper/sources/Source.py
index <HASH>..<HASH> 100644
--- a/dipper/sources/Source.py
+++ b/dipper/sources/Source.py
@@ -450,7 +450,7 @@ class Source:
for field in line.findall('field'):
atts = dict(field.attrib)
row[atts['name']] = field.text
- processing_function(line)
+ processing_function(row)
line_counter += 1
if self.test_mode and limit is not None and line_counter > limit:
continue
|
reconsider which of the previously clobbered 'row' to pass an an arg
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.