diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/fec.go b/fec.go
index <HASH>..<HASH> 100644
--- a/fec.go
+++ b/fec.go
@@ -26,6 +26,7 @@ type (
next uint32 // next seqid
enc reedsolomon.Encoder
shards [][]byte
+ shards2 [][]byte // for calcECC
shardsflag []bool
paws uint32 // Protect Against Wrapped Sequence numbers
lastCheck uint32
@@ -59,6 +60,7 @@ func newFEC(rxlimit, dataShards, parityShards int) *FEC {
}
fec.enc = enc
fec.shards = make([][]byte, fec.shardSize)
+ fec.shards2 = make([][]byte, fec.shardSize)
fec.shardsflag = make([]bool, fec.shardSize)
return fec
}
@@ -228,7 +230,7 @@ func (fec *FEC) calcECC(data [][]byte, offset, maxlen int) (ecc [][]byte) {
if len(data) != fec.shardSize {
return nil
}
- shards := make([][]byte, fec.shardSize)
+ shards := fec.shards2
for k := range shards {
shards[k] = data[k][offset:maxlen]
} | add a cache for FEC's calcECC for zero allocation |
diff --git a/manage/sawtooth_manage/docker.py b/manage/sawtooth_manage/docker.py
index <HASH>..<HASH> 100644
--- a/manage/sawtooth_manage/docker.py
+++ b/manage/sawtooth_manage/docker.py
@@ -140,7 +140,7 @@ class DockerNodeController(NodeController):
command = 'bash -c "sawtooth admin keygen && \
validator {} -v"'
if len(peers) > 0:
- command = command.format('--peers ' + " ".join(peers))
+ command = command.format('--peers ' + ",".join(peers))
else:
command = command.format('') | Update sawtooth manage to generate correct --peers command line args |
diff --git a/src/Illuminate/Validation/Validator.php b/src/Illuminate/Validation/Validator.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Validation/Validator.php
+++ b/src/Illuminate/Validation/Validator.php
@@ -863,7 +863,7 @@ class Validator implements MessageProviderInterface {
*/
protected function validateAlphaDash($attribute, $value)
{
- return preg_match('/^([-a-z0-9_-])+$/i', $value);
+ return preg_match('/^([a-z0-9_-])+$/i', $value);
}
/** | Remove extra dash from reg-ex. |
diff --git a/bits/99_footer.js b/bits/99_footer.js
index <HASH>..<HASH> 100644
--- a/bits/99_footer.js
+++ b/bits/99_footer.js
@@ -3,7 +3,7 @@
/*:: declare var define:any; */
if(typeof exports !== 'undefined') make_xlsx_lib(exports);
else if(typeof module !== 'undefined' && module.exports) make_xlsx_lib(module.exports);
-else if(typeof define === 'function' && define.amd) define('xlsx-dist', function() { if(!XLSX.version) make_xlsx_lib(XLSX); return XLSX; });
+else if(typeof define === 'function' && define.amd) define('xlsx', function() { if(!XLSX.version) make_xlsx_lib(XLSX); return XLSX; });
else make_xlsx_lib(XLSX);
/* NOTE: the following extra line is needed for "Lightning Locker Service" */
if(typeof window !== 'undefined' && !window.XLSX) window.XLSX = XLSX; | Fixed RequireJS export name [ci skip] |
diff --git a/timezones/__init__.py b/timezones/__init__.py
index <HASH>..<HASH> 100644
--- a/timezones/__init__.py
+++ b/timezones/__init__.py
@@ -1,4 +1,4 @@
-VERSION = (0, 1, 4, "final")
+VERSION = (0, 2, 0, "dev", 1)
@@ -6,6 +6,8 @@ def get_version():
if VERSION[3] == "final":
return "%s.%s.%s" % (VERSION[0], VERSION[1], VERSION[2])
elif VERSION[3] == "dev":
+ if VERSION[2] == 0:
+ return "%s.%s.%s%s" % (VERSION[0], VERSION[1], VERSION[3], VERSION[4])
return "%s.%s.%s.%s%s" % (VERSION[0], VERSION[1], VERSION[2], VERSION[3], VERSION[4])
else:
return "%s.%s.%s%s" % (VERSION[0], VERSION[1], VERSION[2], VERSION[3]) | bumped to <I>.dev1 and fixed version generation when VERSION[2] == 0 |
diff --git a/pull_into_place/structures.py b/pull_into_place/structures.py
index <HASH>..<HASH> 100644
--- a/pull_into_place/structures.py
+++ b/pull_into_place/structures.py
@@ -136,7 +136,7 @@ def read_and_calculate(workspace, pdb_paths):
records = []
from scipy.spatial.distance import euclidean
- from tools.bio.basics import residue_type_3to1_map
+ from klab.bio.basics import residue_type_3to1_map
for i, path in enumerate(pdb_paths):
record = {'path': os.path.basename(path)}
@@ -161,6 +161,10 @@ def read_and_calculate(workspace, pdb_paths):
print "\nFailed to read '{}'".format(path)
continue
+ if not lines:
+ print "\n{} is empty".format(path)
+ continue
+
# Get different information from different lines in the PDB file. Some
# of these lines are specific to different simulations. | Don't try to load empty PDB files. |
diff --git a/src/UsersAnyDataset.php b/src/UsersAnyDataset.php
index <HASH>..<HASH> 100644
--- a/src/UsersAnyDataset.php
+++ b/src/UsersAnyDataset.php
@@ -249,8 +249,8 @@ class UsersAnyDataset extends UsersBase
}
foreach ($allProp as $property => $value) {
- foreach ($row->getAsArray($property) as $value) {
- $userModel->addProperty(new UserPropertiesModel($property, $value));
+ foreach ($row->getAsArray($property) as $eachValue) {
+ $userModel->addProperty(new UserPropertiesModel($property, $eachValue));
}
} | More refactoring. Rename CUSTOM to USERPROPERTY. |
diff --git a/apiserver/service/service.go b/apiserver/service/service.go
index <HASH>..<HASH> 100644
--- a/apiserver/service/service.go
+++ b/apiserver/service/service.go
@@ -125,6 +125,18 @@ func deployService(st *state.State, owner string, args params.ServiceDeploy) err
// Try to find the charm URL in state first.
ch, err := st.Charm(curl)
+ // TODO(wallyworld) - remove for 2.0 beta4
+ if errors.IsNotFound(err) {
+ // Clients written to expect 1.16 compatibility require this next block.
+ if curl.Schema != "cs" {
+ return errors.Errorf(`charm url has unsupported schema %q`, curl.Schema)
+ }
+ if err = AddCharmWithAuthorization(st, params.AddCharmWithAuthorization{
+ URL: args.CharmUrl,
+ }); err == nil {
+ ch, err = st.Charm(curl)
+ }
+ }
if err != nil {
return errors.Trace(err)
} | Restore some old deploy code for now to fix the gui |
diff --git a/brozzler/worker.py b/brozzler/worker.py
index <HASH>..<HASH> 100755
--- a/brozzler/worker.py
+++ b/brozzler/worker.py
@@ -44,8 +44,10 @@ class BrozzlerWorker:
}
if self._proxy_server:
ydl_opts["proxy"] = "http://{}".format(self._proxy_server)
- # see https://github.com/rg3/youtube-dl/issues/6087
- os.environ["http_proxy"] = "http://{}".format(self._proxy_server)
+ ## XXX (sometimes?) causes chrome debug websocket to go through
+ ## proxy. Maybe not needed thanks to hls_prefer_native.
+ ## # see https://github.com/rg3/youtube-dl/issues/6087
+ ## os.environ["http_proxy"] = "http://{}".format(self._proxy_server)
self._ydl = youtube_dl.YoutubeDL(ydl_opts)
def _next_url(self, site): | don't set http_proxy environment variable, because it affects things we don't want it to |
diff --git a/test/replica/replset_tools.py b/test/replica/replset_tools.py
index <HASH>..<HASH> 100644
--- a/test/replica/replset_tools.py
+++ b/test/replica/replset_tools.py
@@ -199,7 +199,11 @@ def stepdown_primary():
primary = get_primary()
if primary:
c = pymongo.Connection(primary)
- c.admin.command('replSetStepDown', 20)
+ # replSetStepDown causes mongod to close all connections
+ try:
+ c.admin.command('replSetStepDown', 20)
+ except:
+ pass
def restart_members(members):
diff --git a/test/replica/test_replica_set.py b/test/replica/test_replica_set.py
index <HASH>..<HASH> 100644
--- a/test/replica/test_replica_set.py
+++ b/test/replica/test_replica_set.py
@@ -160,7 +160,7 @@ class TestHealthMonitor(unittest.TestCase):
secondaries = c.secondaries
def primary_changed():
- for _ in xrange(20):
+ for _ in xrange(30):
if c.primary != primary:
return True
time.sleep(1) | Make stepdown test work with MongoDB-<I>.
MongoDB-<I> wasn't closing connections during
primary stepdown. That was fixed in <I>. |
diff --git a/src/Metrics/Client.php b/src/Metrics/Client.php
index <HASH>..<HASH> 100644
--- a/src/Metrics/Client.php
+++ b/src/Metrics/Client.php
@@ -56,6 +56,8 @@ class Client {
$client = new Curl();
$request->addHeader('Authorization: Basic ' . base64_encode($this->email . ':' . $this->token));
+ $request->addHeader('User-Agent: ' . $this->getUserAgent());
+
if (count($data)) {
$request->addHeader('Content-Type: application/json');
$request->setContent(json_encode($data));
@@ -78,6 +80,15 @@ class Client {
}
/**
+ * Returns user agent to identify libary.
+ *
+ * @return sting
+ */
+ protected function getUserAgent() {
+ return sprintf("librato-metrics/%s (PHP %s)", self::API_VERSION, PHP_VERSION);
+ }
+
+ /**
* Fetches data from Metrics API.
*
* @param string $path Path on Metrics API to request. For Example '/metrics/'. | Added HTTP UserAgent to identify PHP bindings |
diff --git a/lib/restfolia/http/behaviour.rb b/lib/restfolia/http/behaviour.rb
index <HASH>..<HASH> 100644
--- a/lib/restfolia/http/behaviour.rb
+++ b/lib/restfolia/http/behaviour.rb
@@ -55,13 +55,13 @@ module Restfolia::HTTP
# Public: Creates a Store.
def initialize
- self.clear
+ self.clear!
@helpers = Helpers.new
end
# Public: clear all defined behaviours.
# Returns nothing.
- def clear
+ def clear!
@behaviours = {}
@behaviours_range = {}
nil
diff --git a/samples/http_behaviour.rb b/samples/http_behaviour.rb
index <HASH>..<HASH> 100644
--- a/samples/http_behaviour.rb
+++ b/samples/http_behaviour.rb
@@ -7,7 +7,7 @@ require "restfolia"
Restfolia::HTTP.behaviours do
- clear #clean all defined behaviours
+ clear! #clear all defined behaviours
on(200) do |http_response|
content_type = (http_response["content-type"] =~ /application\/json/) | Added bang to clear method from HTTP behaviours |
diff --git a/synapse/lib/layer.py b/synapse/lib/layer.py
index <HASH>..<HASH> 100644
--- a/synapse/lib/layer.py
+++ b/synapse/lib/layer.py
@@ -1572,7 +1572,6 @@ class Layer(s_nexus.Pusher):
# use/abuse python's dict ordering behavior
results = {}
- nexsindx = nexsitem[0]
nodeedits = collections.deque(nodeedits)
while nodeedits:
@@ -1602,6 +1601,7 @@ class Layer(s_nexus.Pusher):
flatedits = list(results.values())
if self.logedits and edited:
+ nexsindx = nexsitem[0]
offs = self.nodeeditlog.add((flatedits, meta), indx=nexsindx)
[(await wind.put((offs, flatedits))) for wind in tuple(self.windows)] | Only get nexsindx in storNodeEdits if logging edits (#<I>) |
diff --git a/gulptasks/schemas.js b/gulptasks/schemas.js
index <HASH>..<HASH> 100644
--- a/gulptasks/schemas.js
+++ b/gulptasks/schemas.js
@@ -38,9 +38,10 @@ function xmlToJsonChain(name, dest) {
gutil.log(`Skipped running saxon for ${json}.`);
return;
}
- exec(`${options.saxon} -xsl:` +
- "/usr/share/xml/tei/stylesheet/odds/odd2json.xsl" +
- ` -s:${compiled} -o:${json} callback=''`);
+
+ yield exec(`${options.saxon} -xsl:` +
+ "/usr/share/xml/tei/stylesheet/odds/odd2json.xsl" +
+ ` -s:${compiled} -o:${json} callback=''`);
}
gulp.task(compiledToJsonTaskName, [rngTaskName], | Fix a race condition.
Forgot to wait for the exec to end. |
diff --git a/tasks/bump.js b/tasks/bump.js
index <HASH>..<HASH> 100644
--- a/tasks/bump.js
+++ b/tasks/bump.js
@@ -50,6 +50,8 @@ module.exports = function(grunt) {
// increment the version
var pkg = grunt.file.readJSON(grunt.config('pkgFile'));
var previousVersion = pkg.version;
+ var minor = parseInt(previousVersion.split('.')[1], 10);
+ var branch = (minor % 2) ? 'master' : 'stable';
var newVersion = pkg.version = bumpVersion(previousVersion, type);
// write updated package.json
@@ -67,7 +69,7 @@ module.exports = function(grunt) {
'Changes committed');
run('git tag -a v' + newVersion + ' -m "Version ' + newVersion + '"', 'New tag "v' +
newVersion + '" created');
- run('git push upstream master --tags', 'Pushed to github');
+ run('git push upstream ' + branch + ' --tags', 'Pushed to github');
}); | chore(release): push to correct branch (master/stable) |
diff --git a/DependencyInjection/HttplugExtension.php b/DependencyInjection/HttplugExtension.php
index <HASH>..<HASH> 100644
--- a/DependencyInjection/HttplugExtension.php
+++ b/DependencyInjection/HttplugExtension.php
@@ -19,7 +19,6 @@ use Psr\Http\Message\UriInterface;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
@@ -149,7 +148,7 @@ class HttplugExtension extends Extension
* @param ContainerBuilder $container In case we need to add additional services for this plugin
* @param string $serviceId Service id of the plugin, in case we need to add additional services for this plugin.
*/
- private function configurePluginByName($name, Definition $definition, array $config, ContainerInterface $container, $serviceId)
+ private function configurePluginByName($name, Definition $definition, array $config, ContainerBuilder $container, $serviceId)
{
switch ($name) {
case 'cache': | We need the concrete implementation, not the interface. |
diff --git a/module/Core/src/Grid/Core/Controller/FaviconController.php b/module/Core/src/Grid/Core/Controller/FaviconController.php
index <HASH>..<HASH> 100644
--- a/module/Core/src/Grid/Core/Controller/FaviconController.php
+++ b/module/Core/src/Grid/Core/Controller/FaviconController.php
@@ -24,10 +24,11 @@ class FaviconController extends AbstractActionController
if ( empty( $options['headLink']['favicon']['href'] ) )
{
- $this->getResponse()
- ->setStatusCode( 404 );
-
- return;
+ $redirect = '/uploads/_central/settings/favicon.ico';
+ }
+ else
+ {
+ $redirect = $options['headLink']['favicon']['href'];
}
return $this->redirect() | default favicon is used when not found |
diff --git a/openfisca_core/scenarios.py b/openfisca_core/scenarios.py
index <HASH>..<HASH> 100644
--- a/openfisca_core/scenarios.py
+++ b/openfisca_core/scenarios.py
@@ -23,11 +23,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from copy import deepcopy
-import datetime
+import copy
import logging
-
from . import conv
from . import simulations
@@ -52,7 +50,7 @@ class AbstractScenario(object):
def add_reform(self, reform):
if reform.reference_dated_legislation_json is None:
- reform.reference_dated_legislation_json = deepcopy(self.reference_dated_legislation_json)
+ reform.reference_dated_legislation_json = copy.deepcopy(self.reference_dated_legislation_json)
self.reforms.update({reform.name: reform})
def add_reforms(self, reforms): | Import module instead of its attributes. |
diff --git a/actionview/test/template/form_options_helper_test.rb b/actionview/test/template/form_options_helper_test.rb
index <HASH>..<HASH> 100644
--- a/actionview/test/template/form_options_helper_test.rb
+++ b/actionview/test/template/form_options_helper_test.rb
@@ -1187,7 +1187,7 @@ class FormOptionsHelperTest < ActionView::TestCase
def test_time_zone_select_with_priority_zones_as_regexp
@firm = Firm.new("D")
- @fake_timezones.each_with_index do |tz, i|
+ @fake_timezones.each do |tz|
def tz.=~(re); %(A D).include?(name) end
end | Ditch `each_with_index` for `each`.
We never touch the index, so don't bother. |
diff --git a/src/Omnipay/WorldPay/Message/CompletePurchaseRequest.php b/src/Omnipay/WorldPay/Message/CompletePurchaseRequest.php
index <HASH>..<HASH> 100644
--- a/src/Omnipay/WorldPay/Message/CompletePurchaseRequest.php
+++ b/src/Omnipay/WorldPay/Message/CompletePurchaseRequest.php
@@ -19,8 +19,8 @@ class CompletePurchaseRequest extends PurchaseRequest
return $this->httpRequest->request->all();
}
- public function send()
+ public function sendData($data)
{
- return $this->response = new CompletePurchaseResponse($this, $this->getData());
+ return $this->response = new CompletePurchaseResponse($this, $data);
}
}
diff --git a/src/Omnipay/WorldPay/Message/PurchaseRequest.php b/src/Omnipay/WorldPay/Message/PurchaseRequest.php
index <HASH>..<HASH> 100644
--- a/src/Omnipay/WorldPay/Message/PurchaseRequest.php
+++ b/src/Omnipay/WorldPay/Message/PurchaseRequest.php
@@ -77,9 +77,9 @@ class PurchaseRequest extends AbstractRequest
return $data;
}
- public function send()
+ public function sendData($data)
{
- return $this->response = new PurchaseResponse($this, $this->getData());
+ return $this->response = new PurchaseResponse($this, $data);
}
public function getEndpoint() | Update gateways to use new sendData method |
diff --git a/motor/core.py b/motor/core.py
index <HASH>..<HASH> 100644
--- a/motor/core.py
+++ b/motor/core.py
@@ -247,7 +247,7 @@ class _MotorTransactionContext(object):
exec(textwrap.dedent("""
async def __aenter__(self):
return self
-
+
async def __aexit__(self, exc_type, exc_val, exc_tb):
if self._session.delegate._in_transaction:
if exc_val is None:
@@ -712,7 +712,7 @@ class AgnosticCollection(AgnosticBaseProperties):
# ensures it is canceled promptly if your code breaks
# from the loop or throws an exception.
async with db.collection.watch() as change_stream:
- async for change in stream:
+ async for change in change_stream:
print(change)
# Tornado | Fix change stream docs example (#<I>) |
diff --git a/src/binwalk/__init__.py b/src/binwalk/__init__.py
index <HASH>..<HASH> 100644
--- a/src/binwalk/__init__.py
+++ b/src/binwalk/__init__.py
@@ -1,13 +1,17 @@
-__all__ = ['execute', 'Modules', 'ModuleException']
+__all__ = ['scan', 'execute', 'Modules', 'ModuleException']
import sys
import binwalk.core.common
# This allows importing of the built-in pyqtgraph if it
# is not available on the system at run time.
+# No longer needed, as pyqtgraph is no longer bundled with binwalk.
sys.path.append(binwalk.core.common.get_libs_path())
from binwalk.core.module import Modules, ModuleException
+# Convenience functions
+def scan(*args, **kwargs):
+ return Modules(*args, **kwargs).execute()
def execute(*args, **kwargs):
return Modules(*args, **kwargs).execute() | Added convenience binwalk.scan function |
diff --git a/lib/active_interaction/filters.rb b/lib/active_interaction/filters.rb
index <HASH>..<HASH> 100644
--- a/lib/active_interaction/filters.rb
+++ b/lib/active_interaction/filters.rb
@@ -24,5 +24,12 @@ module ActiveInteraction
self
end
+
+ # @param key [Symbol]
+ #
+ # @return Filter
+ def [](key)
+ @filters.find { |f| f.name == key }
+ end
end
end
diff --git a/spec/active_interaction/filters_spec.rb b/spec/active_interaction/filters_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/active_interaction/filters_spec.rb
+++ b/spec/active_interaction/filters_spec.rb
@@ -20,4 +20,23 @@ describe ActiveInteraction::Filters do
expect(subject.add(filter).to_a).to eql [filter]
end
end
+
+ describe '#[]' do
+ let(:filter) { double(name: name) }
+ let(:name) { SecureRandom.hex.to_sym }
+
+ it 'returns nil' do
+ expect(subject[name]).to be_nil
+ end
+
+ context 'with a filter' do
+ before do
+ subject.add(filter)
+ end
+
+ it 'returns the filter' do
+ expect(subject[name]).to eq filter
+ end
+ end
+ end
end | Fix #<I>; allow getting filters by name |
diff --git a/src/main/java/com/semanticcms/view/what_links_here/WhatLinksHereView.java b/src/main/java/com/semanticcms/view/what_links_here/WhatLinksHereView.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/semanticcms/view/what_links_here/WhatLinksHereView.java
+++ b/src/main/java/com/semanticcms/view/what_links_here/WhatLinksHereView.java
@@ -66,6 +66,15 @@ public class WhatLinksHereView extends View {
return null;
}
+ /**
+ * Not sure if this would be a benefit to search engines, but we'll be on the safe side
+ * and focus on search engines seeing the original content.
+ */
+ @Override
+ public boolean getAllowRobots(Page page) {
+ return false;
+ }
+
@Override
public void doView(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, Page page) throws ServletException, IOException {
PageRef pageRef = page.getPageRef(); | May now exclude robots from specific views. |
diff --git a/tests/integration/user/userTestCase.php b/tests/integration/user/userTestCase.php
index <HASH>..<HASH> 100644
--- a/tests/integration/user/userTestCase.php
+++ b/tests/integration/user/userTestCase.php
@@ -45,4 +45,10 @@ class UserTestCase extends OxidTestCase
return $oUser;
}
+
+ protected function _createSecondSubShop()
+ {
+ $oShop = new oxShop();
+ $oShop->save();
+ }
}
\ No newline at end of file | ESDEV-<I> Create integration tests for login to admin with subshops
duplicated code removed |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,8 +1,9 @@
'use strict';
+const path = require('path');
const importModules = require('import-modules');
module.exports = {
- rules: importModules('rules', {camelize: false}),
+ rules: importModules(path.resolve(__dirname, 'rules'), {camelize: false}),
configs: {
recommended: {
env: { | Make sure the rules directory is resolved correctly (#<I>)
Works around buggy `import-modules` directory resolution in Atom.
Fixes <URL> |
diff --git a/rest/handler_test.go b/rest/handler_test.go
index <HASH>..<HASH> 100644
--- a/rest/handler_test.go
+++ b/rest/handler_test.go
@@ -28,10 +28,6 @@ func TestHandler(t *testing.T) {
}
w.WriteJson(data)
}),
- Get("/auto-fails", func(w ResponseWriter, r *Request) {
- a := []int{}
- _ = a[0]
- }),
Get("/user-error", func(w ResponseWriter, r *Request) {
Error(w, "My error", 500)
}),
@@ -58,12 +54,6 @@ func TestHandler(t *testing.T) {
recorded.ContentTypeIsJson()
recorded.BodyIs(`{"Error":"Resource not found"}`)
- // auto 500 on unhandled userecorder error
- recorded = test.RunRequest(t, &handler, test.MakeSimpleRequest("GET", "http://1.2.3.4/auto-fails", nil))
- recorded.CodeIs(500)
- recorded.ContentTypeIsJson()
- recorded.BodyIs(`{"Error":"Internal Server Error"}`)
-
// userecorder error
recorded = test.RunRequest(t, &handler, test.MakeSimpleRequest("GET", "http://1.2.3.4/user-error", nil))
recorded.CodeIs(500) | Remove duplicated recover tests
As a preparation to remove the deprecated ResourceHandler,
make sure no test is lost by dispatching the content of
handler_test.go to the right places.
This test is already in recover_test.go |
diff --git a/code/services/FusionService.php b/code/services/FusionService.php
index <HASH>..<HASH> 100644
--- a/code/services/FusionService.php
+++ b/code/services/FusionService.php
@@ -88,14 +88,14 @@ class FusionService {
// Update the staging version.
$object->writeWithoutVersion();
+ }
+ Versioned::reading_stage('Live');
+ $objects = $class::get()->filter('FusionTags.ID', $fusionID);
+ foreach($objects as $object) {
// Update the live version.
- Versioned::reading_stage('Live');
- if($live = $class::get()->byID($object->ID)) {
- $live->writeWithoutVersion();
- }
- Versioned::reading_stage('Stage');
+ $object->writeWithoutVersion();
}
}
else { | Improving searchable content tagging performance. |
diff --git a/thefuck/main.py b/thefuck/main.py
index <HASH>..<HASH> 100644
--- a/thefuck/main.py
+++ b/thefuck/main.py
@@ -139,7 +139,7 @@ def main():
command = get_command(settings, sys.argv)
if command:
if is_second_run(command):
- print("echo Can't fuck twice")
+ sys.stderr.write("Can't fuck twice\n")
return
rules = get_rules(user_dir, settings)
@@ -148,4 +148,4 @@ def main():
run_rule(matched_rule, command, settings)
return
- print('echo No fuck given')
+ sys.stderr.write('No fuck given\n') | Put errors in stderr instead of "echo ..." in stdout |
diff --git a/app/components/validated-input-component.js b/app/components/validated-input-component.js
index <HASH>..<HASH> 100644
--- a/app/components/validated-input-component.js
+++ b/app/components/validated-input-component.js
@@ -5,17 +5,24 @@ App.ValidatedInputComponent = Ember.TextField.extend({
isValid: Ember.computed.empty('errors'),
isInvalid: Ember.computed.notEmpty('errors'),
+ save: "save",
focusOut: function () {
this.set('error', this.get('isInvalid'));
},
- keyUp: function () {
+ keyUp: function (e) {
if ( this.get('isValid') ) {
this.set('error', false);
}
},
+ keyDown: function(e) {
+ if (e.keyCode === 13) {
+ this.sendAction('save');
+ }
+ },
+
observeErrors: function () {
if ( !this.get('parentModel') ) return;
this.get('parentModel').addObserver('errors.' + this.get('name'), this, this.syncErrors); | Issue #<I> - handle pressing 'enter' for forms |
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -89,7 +89,7 @@ var phantomjsHtml = module.exports = {
var requestURL = domain + req.originalUrl;
requestURL = requestURL.replace(/(\?|&)_escaped_fragment_=?/,'');
-
+
phantomjsHtml.getHTML(requestURL, function(err, output){
if(err){
console.log('PHANTOMJS-HTML ERROR :', err);
@@ -167,7 +167,7 @@ var phantomjsHtml = module.exports = {
// check _escaped_fragment_
var parsedQuery = url.parse(req.url, true).query;
- if(parsedQuery && parsedQuery.hasOwnProperty('_escaped_fragment_')){
+ if(parsedQuery && '_escaped_fragment_' in parsedQuery){
return true;
}
@@ -186,13 +186,13 @@ var phantomjsHtml = module.exports = {
var childArgs = [
path.join(__dirname, 'script.js'), URL
];
-
+
childProcess.execFile(phantomjs.path, childArgs, function(err, stdout, stderr) {
if(stderr) {
callback(stderr, null);
- } else {
+ } else {
callback(null, stdout.toString());
}
});
}
-}
\ No newline at end of file
+} | Replace hasOwnProperty with in for node v6. |
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -342,7 +342,6 @@ module.exports = function( grunt ) {
grunt.loadNpmTasks("grunt-saucelabs");
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
- grunt.loadNpmTasks('grunt-contrib-concat');
function runIndependentTest( file, cb , env) {
var fs = require("fs"); | Avoid loading unused Grunt tasks |
diff --git a/lib/railsdav/renderer.rb b/lib/railsdav/renderer.rb
index <HASH>..<HASH> 100644
--- a/lib/railsdav/renderer.rb
+++ b/lib/railsdav/renderer.rb
@@ -139,7 +139,7 @@ module Railsdav
response_hash = {
:quota_used_bytes => 0,
:quota_available_bytes => 10.gigabytes,
- :creationdate => updated_at.rfc2822,
+ :creationdate => updated_at.iso8601,
:getlastmodified => updated_at.rfc2822,
:getcontentlength => hash[:size],
:getcontenttype => hash[:format].to_s | Creation date is supposed to be in ISO <I> format.
Inconsistent and weird, I know. |
diff --git a/lib/librarian/manifest_set.rb b/lib/librarian/manifest_set.rb
index <HASH>..<HASH> 100644
--- a/lib/librarian/manifest_set.rb
+++ b/lib/librarian/manifest_set.rb
@@ -78,8 +78,10 @@ module Librarian
until names.empty?
name = names.shift
manifest = index.delete(name)
- manifest.dependencies.each do |dependency|
- names << dependency.name
+ if manifest
+ manifest.dependencies.each do |dependency|
+ names << dependency.name
+ end
end
end
self | Fix an edge case where it was sending #dependencies to nil. |
diff --git a/lib/activerecord-multi-tenant/query_rewriter.rb b/lib/activerecord-multi-tenant/query_rewriter.rb
index <HASH>..<HASH> 100644
--- a/lib/activerecord-multi-tenant/query_rewriter.rb
+++ b/lib/activerecord-multi-tenant/query_rewriter.rb
@@ -31,6 +31,7 @@ module MultiTenant
@arel_node = arel_node
@known_relations = []
@handled_relations = []
+ @discovering = false
end
def discover_relations | init discovering instance var in Context to false to fix warning |
diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js
index <HASH>..<HASH> 100644
--- a/src/client/voice/dispatcher/StreamDispatcher.js
+++ b/src/client/voice/dispatcher/StreamDispatcher.js
@@ -140,7 +140,7 @@ class StreamDispatcher extends Writable {
if (!this.pausedSince) return;
this._pausedTime += Date.now() - this.pausedSince;
this.pausedSince = null;
- if (this._writeCallback) this._writeCallback();
+ if (typeof this._writeCallback === 'function') this._writeCallback();
}
/**
@@ -195,13 +195,11 @@ class StreamDispatcher extends Writable {
}
_step(done) {
- if (this.pausedSince) {
- this._writeCallback = done;
- return;
- }
+ this._writeCallback = done;
+ if (this.pausedSince) return;
if (!this.streams.broadcast) {
const next = FRAME_LENGTH + (this.count * FRAME_LENGTH) - (Date.now() - this.startTime - this.pausedTime);
- setTimeout(done.bind(this), next);
+ setTimeout(this._writeCallback.bind(this), next);
}
this._sdata.sequence++;
this._sdata.timestamp += TIMESTAMP_INC; | voice: resolve "cb is not a function" error (#<I>) |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -23,9 +23,9 @@ requirements = [
setup(
name='pipreqs',
version=__version__,
- description="Pip requirements.txt generator based on imports in project",
+ description='Pip requirements.txt generator based on imports in project',
long_description=readme + '\n\n' + history,
- author="Vadim Kravcenko",
+ author='Vadim Kravcenko',
author_email='vadim.kravcenko@gmail.com',
url='https://github.com/bndr/pipreqs',
packages=[
@@ -36,7 +36,7 @@ setup(
include_package_data=True,
package_data={'': ['stdlib','mapping']},
install_requires=requirements,
- license="Apache License",
+ license='Apache License',
zip_safe=False,
keywords='pip requirements imports',
classifiers=[
@@ -44,7 +44,7 @@ setup(
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
- "Programming Language :: Python :: 2",
+ 'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4', | Use single quotes consistently in setup.py |
diff --git a/discoverd/server/store.go b/discoverd/server/store.go
index <HASH>..<HASH> 100644
--- a/discoverd/server/store.go
+++ b/discoverd/server/store.go
@@ -223,7 +223,7 @@ func (s *Store) Close() error {
}
}
if s.raft != nil {
- s.raft.Shutdown()
+ s.raft.Shutdown().Error()
s.raft = nil
}
if s.transport != nil { | discoverd: Wait for Raft shutdown in Store.Close |
diff --git a/vm/vmExpr.go b/vm/vmExpr.go
index <HASH>..<HASH> 100644
--- a/vm/vmExpr.go
+++ b/vm/vmExpr.go
@@ -844,6 +844,9 @@ func invokeExpr(expr ast.Expr, env *Env) (reflect.Value, error) {
if err != nil {
return NilValue, NewError(expr, err)
}
+ if rt == nil {
+ return NilValue, NewStringError(expr, fmt.Sprintf("invalid type for make"))
+ }
if rt.Kind() == reflect.Map {
return reflect.MakeMap(reflect.MapOf(rt.Key(), rt.Elem())).Convert(rt), nil
} | Updated MakeExpr, added nil type check |
diff --git a/raiden/transfer/mediated_transfer/target.py b/raiden/transfer/mediated_transfer/target.py
index <HASH>..<HASH> 100644
--- a/raiden/transfer/mediated_transfer/target.py
+++ b/raiden/transfer/mediated_transfer/target.py
@@ -241,7 +241,7 @@ def handle_block(
channel_state.partner_state,
lock.secrethash,
)
- lock_has_expired, lock_expired_msg = channel.is_lock_expired(
+ lock_has_expired, _ = channel.is_lock_expired(
end_state=channel_state.our_state,
lock=lock,
block_number=block_number,
@@ -252,7 +252,7 @@ def handle_block(
failed = EventUnlockClaimFailed(
identifier=transfer.payment_identifier,
secrethash=transfer.lock.secrethash,
- reason=f'lock expired {lock_expired_msg}',
+ reason=f'lock expired',
)
target_state.state = 'expired'
events = [failed] | Fixed log message
When the lock has expired the message is None, appending it to the event
will result in the string `lock expired None`. |
diff --git a/sumy/models/dom/_sentence.py b/sumy/models/dom/_sentence.py
index <HASH>..<HASH> 100644
--- a/sumy/models/dom/_sentence.py
+++ b/sumy/models/dom/_sentence.py
@@ -44,4 +44,7 @@ class Sentence(object):
return " ".join(self._words)
def __repr__(self):
- return to_string("<Sentence: %s>") % self.__str__()
+ return to_string("<%s: %s>") % (
+ "Heading" if self._is_heading else "Sentence",
+ self.__str__()
+ ) | Better string representation for sentence of DOM |
diff --git a/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php b/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php
index <HASH>..<HASH> 100644
--- a/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php
+++ b/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php
@@ -41,7 +41,8 @@ class UserProvider extends FOSUBUserProvider
*/
public function __construct(UserManagerInterface $userManager, RepositoryInterface $oauthRepository)
{
- $this->userManager = $userManager;
+ parent::__construct($userManager, array());
+
$this->oauthRepository = $oauthRepository;
} | [CoreBundle] OAuth provider should call parent class instead of direct assign |
diff --git a/bin/run.js b/bin/run.js
index <HASH>..<HASH> 100755
--- a/bin/run.js
+++ b/bin/run.js
@@ -111,10 +111,15 @@ function main () {
}
function constructDefaultArgs () {
+ var defaultTimeout = 30
+ if (global.__coverage__) {
+ defaultTimeout = 240
+ }
+
var defaultArgs = {
nodeArgs: [],
nycArgs: [],
- timeout: process.env.TAP_TIMEOUT || 30,
+ timeout: +process.env.TAP_TIMEOUT || defaultTimeout,
color: supportsColor,
reporter: null,
files: [],
@@ -131,10 +136,6 @@ function constructDefaultArgs () {
statements: 0
}
- if (global.__coverage__) {
- defaultArgs.timeout = 240
- }
-
if (process.env.TAP_COLORS !== undefined) {
defaultArgs.color = !!(+process.env.TAP_COLORS)
}
diff --git a/test/rcfiles.js b/test/rcfiles.js
index <HASH>..<HASH> 100644
--- a/test/rcfiles.js
+++ b/test/rcfiles.js
@@ -31,7 +31,10 @@ var defaults = {
}
function runTest (rcFile, expect) { return function (t) {
- var env = { HOME: process.env.HOME }
+ var env = {
+ HOME: process.env.HOME,
+ TAP_TIMEOUT: 30
+ }
if (rcFile) {
env.TAP_RCFILE = rcFile | hard-code TAP_TIMEOUT in rcfiles test
Otherwise running with coverage fails, because of bigger default |
diff --git a/Symfony/CS/AbstractPhpdocTypesFixer.php b/Symfony/CS/AbstractPhpdocTypesFixer.php
index <HASH>..<HASH> 100644
--- a/Symfony/CS/AbstractPhpdocTypesFixer.php
+++ b/Symfony/CS/AbstractPhpdocTypesFixer.php
@@ -97,7 +97,7 @@ abstract class AbstractPhpdocTypesFixer extends AbstractFixer
private function normalizeTypes(array $types)
{
foreach ($types as $index => $type) {
- $types[$index] = static::normalizeType($type);
+ $types[$index] = $this->normalizeType($type);
}
return $types; | AbstractPhpdocTypesFixer - instance method should be called on instance |
diff --git a/tests/test_data_cloud.py b/tests/test_data_cloud.py
index <HASH>..<HASH> 100644
--- a/tests/test_data_cloud.py
+++ b/tests/test_data_cloud.py
@@ -52,7 +52,7 @@ def _should_test_gcp():
try:
check_output(['gcloud', 'auth', 'activate-service-account',
'--key-file', creds])
- except CalledProcessError:
+ except (CalledProcessError, FileNotFoundError):
return False
return True | test: gcp: handle FileNotFoundError |
diff --git a/supermercado/scripts/cli.py b/supermercado/scripts/cli.py
index <HASH>..<HASH> 100644
--- a/supermercado/scripts/cli.py
+++ b/supermercado/scripts/cli.py
@@ -32,7 +32,7 @@ cli.add_command(edges)
@click.option('--parsenames', is_flag=True)
def union(inputtiles, parsenames):
"""
- Returns the unioned shape of a steeam of [<x>, <y>, <z>] tiles in GeoJSON.
+ Returns the unioned shape of a stream of [<x>, <y>, <z>] tiles in GeoJSON.
"""
try:
inputtiles = click.open_file(inputtiles).readlines()
@@ -60,4 +60,4 @@ def burn(features, sequence, zoom):
click.echo(t.tolist())
-cli.add_command(burn)
\ No newline at end of file
+cli.add_command(burn) | Update cli.py
Fix typo in supermercado/scripts/cli.py |
diff --git a/lib/SearchEngine.js b/lib/SearchEngine.js
index <HASH>..<HASH> 100644
--- a/lib/SearchEngine.js
+++ b/lib/SearchEngine.js
@@ -5,6 +5,7 @@ module.exports = function (options) {
var SearchIndex = require('search-index');
var path = require('path');
+ var fs = require('extfs');
var preparer = require('./Preparer.js');
var cfi = require('./CFI.js');
@@ -18,8 +19,11 @@ module.exports = function (options) {
this.indexing = function (pathToEpubs, callback) {
+ if(fs.isEmptySync(pathToEpubs))
+ return callback(new Error('Can`t index empty folder: ' + pathToEpubs));
+
console.log("normalize epub content");
-
+
path.normalize(pathToEpubs);
preparer.normalize(pathToEpubs, function (dataSet) {
@@ -103,4 +107,8 @@ module.exports = function (options) {
this.empty = function (callback) {
si.empty(callback);
};
+
+ this.close = function(callback) {
+ si.close(callback);
+ }
};
\ No newline at end of file | - added contract to check epub data folder is not empty
- added close() |
diff --git a/spec/search_spec.rb b/spec/search_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/search_spec.rb
+++ b/spec/search_spec.rb
@@ -75,6 +75,15 @@ describe "Search" do
search.username.should be_nil
end
+ it "should use custom scopes before normalizing" do
+ User.create(:username => "bjohnson")
+ User.named_scope :username, lambda { |value| {:conditions => {:username => value.reverse}} }
+ search1 = User.search(:username => "bjohnson")
+ search2 = User.search(:username => "nosnhojb")
+ search1.count.should == 0
+ search2.count.should == 1
+ end
+
it "should ignore blank values in arrays" do
search = User.search
search.conditions = {"username_equals_any" => [""]} | Added a failing test for existing scopes that share their names with column names being ignored. |
diff --git a/app/models/artefact.rb b/app/models/artefact.rb
index <HASH>..<HASH> 100644
--- a/app/models/artefact.rb
+++ b/app/models/artefact.rb
@@ -82,6 +82,7 @@ class Artefact
"travel-advice-publisher" => ["travel-advice"],
"specialist-publisher" => ["aaib_report",
"cma_case",
+ "countryside_stewardship_grant",
"drug_safety_update",
"international_development_fund",
"maib_report", | Add countryside stewardship grant
This format is published from Specialist Publisher initially just by
DEFRA editors and will be listed as a Finder. Ticket:
<URL> |
diff --git a/Kwc/Basic/Svg/Component.php b/Kwc/Basic/Svg/Component.php
index <HASH>..<HASH> 100644
--- a/Kwc/Basic/Svg/Component.php
+++ b/Kwc/Basic/Svg/Component.php
@@ -25,7 +25,10 @@ class Kwc_Basic_Svg_Component extends Kwc_Abstract
$ret['fileSource'] = file_get_contents($uploadRow->getFileSource());
} else if ($ret['outputType'] === 'url') {
$filename = $uploadRow->filename . '.' . $uploadRow->extension;
- $ret['fileUrl'] = Kwf_Media::getUrl($this->getData()->componentClass, $this->getData()->componentId, 'default', $filename);
+ $url = Kwf_Media::getUrl($this->getData()->componentClass, $this->getData()->componentId, 'default', $filename);
+ $ev = new Kwf_Component_Event_CreateMediaUrl($this->getData()->componentClass, $this->getData(), $url);
+ Kwf_Events_Dispatcher::fireEvent($ev);
+ $ret['fileUrl'] = $ev->url;
}
} | Support cdn also for SVG-Component |
diff --git a/src/main/java/java/money/module-info.java b/src/main/java/java/money/module-info.java
index <HASH>..<HASH> 100644
--- a/src/main/java/java/money/module-info.java
+++ b/src/main/java/java/money/module-info.java
@@ -19,6 +19,7 @@ module java.money {
uses javax.money.spi.MonetaryAmountsSingletonQuerySpi;
uses javax.money.spi.MonetaryAmountsSingletonSpi;
uses javax.money.spi.MonetaryConversionsSingletonSpi;
+ uses javax.money.spi.MonetaryCurrenciesSingletonSpi;
uses javax.money.spi.MonetaryFormatsSingletonSpi;
uses javax.money.spi.MonetaryRoundingsSingletonSpi;
uses javax.money.spi.RoundingProviderSpi; | Add uses MonetaryCurrenciesSingletonSpi
Monetary.MONETARY_CURRENCIES_SINGLETON_SPI() tries to use ServiceLoader
for loading MonetaryCurrenciesSingletonSpi but it is not declared in
the module info.
This should fix <URL> |
diff --git a/libkbfs/md_ops_concur_test.go b/libkbfs/md_ops_concur_test.go
index <HASH>..<HASH> 100644
--- a/libkbfs/md_ops_concur_test.go
+++ b/libkbfs/md_ops_concur_test.go
@@ -27,7 +27,6 @@ func (m *MDOpsConcurTest) GetForHandle(handle *DirHandle) (
}
func (m *MDOpsConcurTest) GetForTLF(id DirID) (*RootMetadata, error) {
- fmt.Printf("HERE in GETFORTLF\n")
_, ok := <-m.enter
if !ok {
// Only one caller should ever get here | md_ops_concur_test: remove debugging statement |
diff --git a/addon/controllers/edit-form.js b/addon/controllers/edit-form.js
index <HASH>..<HASH> 100644
--- a/addon/controllers/edit-form.js
+++ b/addon/controllers/edit-form.js
@@ -284,17 +284,13 @@ export default Ember.Controller.extend(
* This method invokes by `resetController` in the `edit-form` route.
*
* @method rollbackHasManyRelationships
- * @public
- *
- * @param {DS.Model} processedModel Model to rollback its relations (controller's model will be used if undefined).
+ * @param {DS.Model} model Record with hasMany relationships.
*/
- rollbackHasManyRelationships: function(processedModel) {
- let model = processedModel ? processedModel : this.get('model');
- let promises = Ember.A();
+ rollbackHasManyRelationships: function(model) {
model.eachRelationship((name, desc) => {
if (desc.kind === 'hasMany') {
model.get(name).filterBy('hasDirtyAttributes', true).forEach((record) => {
- promises.pushObject(record.rollbackAttributes());
+ record.rollbackAttributes();
});
}
}); | Refactor rollbackHasManyRelationships in edit-form |
diff --git a/src/MvcCore/Ext/Debugs/Tracy.php b/src/MvcCore/Ext/Debugs/Tracy.php
index <HASH>..<HASH> 100644
--- a/src/MvcCore/Ext/Debugs/Tracy.php
+++ b/src/MvcCore/Ext/Debugs/Tracy.php
@@ -183,7 +183,6 @@ namespace {
\Tracy\Dumper::DEBUGINFO => TRUE,
];
foreach ($args as $arg) {
-
if ($isCli) {
\Tracy\Dumper::dump($arg, $options);
} else {
@@ -209,7 +208,15 @@ namespace {
if (count($args) > 0)
foreach ($args as $arg)
\Tracy\Debugger::log($arg, \Tracy\ILogger::DEBUG);
- \Tracy\Debugger::getBlueScreen()->render(NULL);
+ if (PHP_SAPI === 'cli') {
+ echo 'Stopped' . PHP_EOL;
+ } else {
+ try {
+ throw new \Exception('Stopped.', 500);
+ } catch (\Exception $e) {
+ \Tracy\Debugger::getBlueScreen()->render($e);
+ }
+ }
exit;
}
} | updates for production dumping in cli |
diff --git a/cli/environment-builder.js b/cli/environment-builder.js
index <HASH>..<HASH> 100644
--- a/cli/environment-builder.js
+++ b/cli/environment-builder.js
@@ -90,7 +90,7 @@ module.exports = class EnvironmentBuilder {
*/
_lookupJHipster() {
// Register jhipster generators.
- this.env.lookup({ packagePaths: [path.join(__dirname, '..')] }).forEach(generator => {
+ this.env.lookup({ packagePaths: [path.join(__dirname, '..')], lookups: ['generators'] }).forEach(generator => {
// Verify jhipster generators namespace.
assert(
generator.namespace.startsWith(`${CLI_NAME}:`), | Limit lookup to generators/*/index |
diff --git a/js/binance.js b/js/binance.js
index <HASH>..<HASH> 100644
--- a/js/binance.js
+++ b/js/binance.js
@@ -152,7 +152,7 @@ module.exports = class binance extends Exchange {
'userDataStream',
'futures/transfer',
// lending
- 'lending/customizedFixed/purchase'
+ 'lending/customizedFixed/purchase',
'lending/daily/purchase',
'lending/daily/redeem',
], | binance.js minor edit/linting |
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -339,6 +339,29 @@ describe('Localization', function () {
payload.message.should.equal('No localization available for en-US');
});
+ it('allows other plugins to handle pre response', async () => {
+ let otherPluginCalled = false;
+ const otherPluginWithPreResponseHandling = {
+ name: 'onPreResponseTest',
+ register: function (server, options) {
+ server.ext('onPreResponse', function (request, h) {
+ otherPluginCalled = true;
+ return h.continue;
+ });
+ }
+ };
+ await server.register({plugin: otherPluginWithPreResponseHandling});
+ const response = await server.inject(
+ {
+ method: 'GET',
+ url: '/en-US/localized/resource'
+ }
+ );
+ const payload = JSON.parse(response.payload);
+ payload.statusCode.should.equal(404);
+ otherPluginCalled.should.be.true();
+ });
+
it('is available in the validation failAction handler ', async () => {
const response = await server.inject(
{
@@ -476,6 +499,7 @@ describe('Localization', function () {
response.statusCode.should.equal(404);
should(response.result).startWith('<!DOCTYPE html><html lang=');
});
+
});
}) | Added test to verfify plugin returns with continue when language code is not found |
diff --git a/lib/Predis.php b/lib/Predis.php
index <HASH>..<HASH> 100644
--- a/lib/Predis.php
+++ b/lib/Predis.php
@@ -646,16 +646,13 @@ class ResponseReader {
}
$prefix = $header[0];
- $payload = strlen($header) > 1 ? substr($header, 1) : '';
-
if (!isset($this->_prefixHandlers[$prefix])) {
Utils::onCommunicationException(new MalformedServerResponse(
$connection, "Unknown prefix '$prefix'"
));
}
-
$handler = $this->_prefixHandlers[$prefix];
- return $handler->handle($connection, $payload);
+ return $handler->handle($connection, substr($header, 1));
}
} | Remove a useless check for the payload length. |
diff --git a/gns3server/modules/virtualbox/virtualbox_vm.py b/gns3server/modules/virtualbox/virtualbox_vm.py
index <HASH>..<HASH> 100644
--- a/gns3server/modules/virtualbox/virtualbox_vm.py
+++ b/gns3server/modules/virtualbox/virtualbox_vm.py
@@ -250,7 +250,7 @@ class VirtualBoxVM(BaseVM):
log.debug("Stop result: {}".format(result))
log.info("VirtualBox VM '{name}' [{id}] stopped".format(name=self.name, id=self.id))
- # yield from asyncio.sleep(0.5) # give some time for VirtualBox to unlock the VM
+ yield from asyncio.sleep(0.5) # give some time for VirtualBox to unlock the VM
try:
# deactivate the first serial port
yield from self._modify_vm("--uart1 off") | Renable sleep at Vbox exit bug seem to be back
Fix <URL> |
diff --git a/lib/torquespec/version.rb b/lib/torquespec/version.rb
index <HASH>..<HASH> 100644
--- a/lib/torquespec/version.rb
+++ b/lib/torquespec/version.rb
@@ -1,3 +1,3 @@
module TorqueSpec
- VERSION = "0.3.5"
+ VERSION = "0.3.6"
end | Cutting a release that supports injection better. |
diff --git a/context.go b/context.go
index <HASH>..<HASH> 100644
--- a/context.go
+++ b/context.go
@@ -68,7 +68,7 @@ const (
methods = "GET,PUT,POST,DELETE"
corsCType = "Content-Type, *"
trueStr = "true"
- jsonCT = "application/json"
+ jsonCT = "application/json;charset=utf8"
hOrigin = "Origin"
) | context: support utf8 in JSON() responses |
diff --git a/libraries/lithium/tests/cases/template/helpers/FormTest.php b/libraries/lithium/tests/cases/template/helpers/FormTest.php
index <HASH>..<HASH> 100644
--- a/libraries/lithium/tests/cases/template/helpers/FormTest.php
+++ b/libraries/lithium/tests/cases/template/helpers/FormTest.php
@@ -46,6 +46,12 @@ class FormTest extends \lithium\test\Unit {
$this->context = new MockFormRenderer();
$this->form = new Form(array('context' => $this->context));
}
+
+ public function tearDown() {
+ foreach ($this->_routes as $route) {
+ Router::connect($route);
+ }
+ }
public function testFormCreation() {
$base = trim($this->context->request()->env('base'), '/') . '/'; | adding tearDown to form to reset routes |
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -22,6 +22,9 @@ module.exports = {
get UFDS() {
return require('./ufds');
},
+ get UFDS2() {
+ return require('./ufds2');
+ },
get Config() {
return require('./config');
}, | PUBAPI-<I>: Need to be able to use new UFDS including account users |
diff --git a/quandl/message.py b/quandl/message.py
index <HASH>..<HASH> 100644
--- a/quandl/message.py
+++ b/quandl/message.py
@@ -24,10 +24,10 @@ class Message:
WARN_DATA_LIMIT_EXCEEDED = 'This call exceeds the amount of data that quandl.get_table() allows. \
Please use the following link in your browser, which will download the full results as \
- a CSV file: https://www.quandl.com/api/v3/datatables/%s?qopts.export=true&api_key=%s. See \
+ a CSV file: https://www.quandl.com/api/v3/datatables/%s?qopts.export=true&api_key=%s . See \
our API documentation for more info: \
https://docs.quandl.com/docs/in-depth-usage-1#section-download-an-entire-table'
- WARN_PAGE_LIMIT_EXCEEDED = 'To request more pages, please set paginate=true in your \
+ WARN_PAGE_LIMIT_EXCEEDED = 'To request more pages, please set paginate=True in your \
quandl.get_table() call. For more information see our documentation: \
https://github.com/quandl/quandl-python/blob/master/FOR_ANALYSTS.md#things-to-note'
WARN_PARAMS_NOT_SUPPORTED = '%s will no longer supported. Please use %s instead' | Fix two small typos. (#<I>) |
diff --git a/djcelery_model/models.py b/djcelery_model/models.py
index <HASH>..<HASH> 100644
--- a/djcelery_model/models.py
+++ b/djcelery_model/models.py
@@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
from django.db import models
from django.db.models import Q
from django.db.models.query import QuerySet
from django.contrib.contenttypes.models import ContentType
+from django.utils.encoding import python_2_unicode_compatible
try:
# Django >= 1.7
@@ -59,6 +61,7 @@ class ModelTaskMetaManager(ModelTaskMetaFilterMixin, models.Manager):
def get_queryset(self):
return ModelTaskMetaQuerySet(self.model, using=self._db)
+@python_2_unicode_compatible
class ModelTaskMeta(models.Model):
STATES = (
(ModelTaskMetaState.PENDING, 'PENDING'),
@@ -77,9 +80,6 @@ class ModelTaskMeta(models.Model):
objects = ModelTaskMetaManager()
- def __unicode__(self):
- return u'%s: %s' % (self.task_id, dict(self.STATES)[self.state])
-
def __str__(self):
return '%s: %s' % (self.task_id, dict(self.STATES)[self.state]) | Simplify Python 2 and 3 unicode compatibility |
diff --git a/src/lib/widget.js b/src/lib/widget.js
index <HASH>..<HASH> 100644
--- a/src/lib/widget.js
+++ b/src/lib/widget.js
@@ -105,7 +105,8 @@ define(['./assets', './webfinger', './hardcoded', './wireClient', './sync', './s
'_content': 'This app allows you to use your own data storage!<br/>Click for more info on remotestorage.'
}),
userAddress: el('input', 'remotestorage-useraddress', {
- 'placeholder': 'user@host'
+ 'placeholder': 'user@host',
+ 'type': 'email'
}),
style: el('style') | give user address input type=email (refs #<I>) |
diff --git a/client/state/google-my-business/actions.js b/client/state/google-my-business/actions.js
index <HASH>..<HASH> 100644
--- a/client/state/google-my-business/actions.js
+++ b/client/state/google-my-business/actions.js
@@ -45,8 +45,8 @@ export const disconnectGoogleMyBusinessLocation = siteId => dispatch => {
return dispatch(
saveSiteSettings( siteId, {
- google_my_business_keyring_id: null,
- google_my_business_location_id: null,
+ google_my_business_keyring_id: false,
+ google_my_business_location_id: false,
} )
).then( ( { updated } ) => {
if ( | Send false to unset site settings properties instead of null |
diff --git a/tests/pathops_test.py b/tests/pathops_test.py
index <HASH>..<HASH> 100644
--- a/tests/pathops_test.py
+++ b/tests/pathops_test.py
@@ -162,7 +162,9 @@ class OpBuilderTest(object):
('lineTo', ((5220.0, 4866.92333984375),)),
('lineTo', ((5316.0, 4590.0),)),
('closePath', ()),
- ('moveTo', ((-225.0, 7425.0),)),
+ ('moveTo', ((5688.0, 7425.0),)),
+ ('lineTo', ((-225.0, 7425.0),)),
+ ('lineTo', ((-225.0, 7425.0),)),
('lineTo', ((5.0, -225.0),)),
('lineTo', ((7425.0, -225.0),)),
('lineTo', ((7425.0, 7425.0),)), | Update expected test result for SkOpBuilder after updating skia library
not sure why this changed, i'll investigate another time |
diff --git a/src/test/java/picocli/Demo.java b/src/test/java/picocli/Demo.java
index <HASH>..<HASH> 100644
--- a/src/test/java/picocli/Demo.java
+++ b/src/test/java/picocli/Demo.java
@@ -32,6 +32,9 @@ import java.util.concurrent.Callable;
/**
* Demonstrates picocli subcommands.
+ * <p>
+ * Banner ascii art thanks to <a href="http://patorjk.com/software/taag/">http://patorjk.com/software/taag/</a>.
+ * </p>
*/
@Command(name = "picocli.Demo", sortOptions = false,
header = {
@@ -682,7 +685,6 @@ public class Demo implements Runnable {
CommandLine.call(new CheckSum(), System.err, args);
}
- @Override
public Void call() throws Exception {
// business logic: do different things depending on options the user specified
if (helpRequested) { | Added link to Ascii art site; removed annotations on interface methods in Demo.java to allow compilation under Java 5. |
diff --git a/spectator-nflx-plugin/src/main/java/com/netflix/spectator/nflx/RxHttp.java b/spectator-nflx-plugin/src/main/java/com/netflix/spectator/nflx/RxHttp.java
index <HASH>..<HASH> 100644
--- a/spectator-nflx-plugin/src/main/java/com/netflix/spectator/nflx/RxHttp.java
+++ b/spectator-nflx-plugin/src/main/java/com/netflix/spectator/nflx/RxHttp.java
@@ -733,7 +733,7 @@ public final class RxHttp {
* default is to use the ip address and avoid the dns lookup.
*/
boolean useIpAddress() {
- return Spectator.config().getBoolean(prop("UseIpAddress"), true);
+ return Spectator.config().getBoolean(prop("UseIpAddress"), false);
}
/** | set UseIpAddress default to false
In some cases such as calls from vpc
to classic the host name needs to
get used so it is the safer choice.
Use IP can be explicitly set on clients
that want to avoid the DNS lookup. |
diff --git a/lib/voice/streams/WebmOpusTransformer.js b/lib/voice/streams/WebmOpusTransformer.js
index <HASH>..<HASH> 100644
--- a/lib/voice/streams/WebmOpusTransformer.js
+++ b/lib/voice/streams/WebmOpusTransformer.js
@@ -15,7 +15,7 @@ const TAG_TYPE_TAG = 2;
const TRACKTYPE_AUDIO = 2; // EBML spec: https://www.matroska.org/technical/specs/index.html#TrackType
-class OggOpusTransformer extends BaseTransformer {
+class WebmOpusTransformer extends BaseTransformer {
constructor(options) {
options = options || {};
super(options);
@@ -200,7 +200,7 @@ class OggOpusTransformer extends BaseTransformer {
}
}
-module.exports = OggOpusTransformer;
+module.exports = WebmOpusTransformer;
const schema = {
ae: { | Fix WebmOpusTransformer class name (#<I>) |
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -13,14 +13,15 @@ export default (env, options) => {
Object.keys(env).forEach(key => {
debug(`key "${key}" before type was ${typeof env[key]}`);
- env[key] = parseKey(env[key], key);
- debug(`key "${key}" after type was ${typeof env[key]}`);
-
- if (envOptions.assignToProcessEnv === true) {
- if (envOptions.overrideProcessEnv === true) {
- process.env[key] = env[key] || process.env[key];
- } else {
- process.env[key] = process.env[key] || env[key];
+ if (env[key]) {
+ env[key] = parseKey(env[key], key);
+ debug(`key "${key}" after type was ${typeof env[key]}`);
+ if (envOptions.assignToProcessEnv === true) {
+ if (envOptions.overrideProcessEnv === true) {
+ process.env[key] = env[key] || process.env[key];
+ } else {
+ process.env[key] = process.env[key] || env[key];
+ }
}
}
}); | fix: added null condition check (closes #<I>) |
diff --git a/httprunner/testcase.py b/httprunner/testcase.py
index <HASH>..<HASH> 100644
--- a/httprunner/testcase.py
+++ b/httprunner/testcase.py
@@ -705,8 +705,13 @@ class TestcaseParser(object):
return self.functions[item_name]
try:
- return eval(item_name)
- except NameError:
+ # check if builtin functions
+ item_func = eval(item_name)
+ if callable(item_func):
+ # is builtin function
+ return item_func
+ except (NameError, TypeError):
+ # is not builtin function, continue to search
pass
elif item_type == "variable":
if item_name in self.variables: | #<I>: add callable to check if it is function |
diff --git a/hugolib/translations.go b/hugolib/translations.go
index <HASH>..<HASH> 100644
--- a/hugolib/translations.go
+++ b/hugolib/translations.go
@@ -69,5 +69,7 @@ func assignTranslationsToPages(allTranslations map[string]Translations, pages []
for _, translatedPage := range trans {
page.translations = append(page.translations, translatedPage)
}
+
+ pageBy(languagePageSort).Sort(page.translations)
}
} | node to page: Re-add translations sort of regular pages
Was removed by mistake.
Updates #<I> |
diff --git a/cobe/kvstore.py b/cobe/kvstore.py
index <HASH>..<HASH> 100644
--- a/cobe/kvstore.py
+++ b/cobe/kvstore.py
@@ -138,8 +138,12 @@ class SqliteStore(KVStore):
c.execute("PRAGMA cache_size=0")
c.execute("PRAGMA page_size=4096")
+ # Use write-ahead logging if it's available, otherwise truncate
+ journal_mode, = c.execute("PRAGMA journal_mode=WAL").fetchone()
+ if journal_mode != "wal":
+ c.execute("PRAGMA journal_mode=truncate")
+
# Speed-for-reliability tradeoffs
- c.execute("PRAGMA journal_mode=truncate")
c.execute("PRAGMA temp_store=memory")
c.execute("PRAGMA synchronous=OFF") | Use write-ahead logging in the SQLite store if it's available |
diff --git a/internal/services/authorization/role_definition_resource.go b/internal/services/authorization/role_definition_resource.go
index <HASH>..<HASH> 100644
--- a/internal/services/authorization/role_definition_resource.go
+++ b/internal/services/authorization/role_definition_resource.go
@@ -388,8 +388,8 @@ func roleDefinitionEventualConsistencyUpdate(ctx context.Context, client azuresd
return resp, "Pending", nil
}
- if !respUpdatedOn.After(updateRequestTime) {
- // The real updated on will be after the time we requested it due to the swap out.
+ if updateRequestTime.After(respUpdatedOn) {
+ // The real updated on will be equal or after the time we requested it due to the swap out.
return resp, "Pending", nil
} | Fix: The real updated time will be equal or after the requested time for azurerm_role_definition (#<I>)
#<I> |
diff --git a/core/src/main/java/lucee/runtime/net/mail/MailUtil.java b/core/src/main/java/lucee/runtime/net/mail/MailUtil.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/lucee/runtime/net/mail/MailUtil.java
+++ b/core/src/main/java/lucee/runtime/net/mail/MailUtil.java
@@ -157,6 +157,7 @@ public final class MailUtil {
String domain = address.substring(pos + 1);
if (local.length() > 64) return false; // local part may only be 64 characters
+ if (domain.length() > 255) return false; // domain may only be 255 characters
if (domain.charAt(0) == '.' || local.charAt(0) == '.' || local.charAt(local.length() - 1) == '.') return false; | email domain must be LT <I> characters |
diff --git a/library/CM/Elasticsearch/Type/Location.php b/library/CM/Elasticsearch/Type/Location.php
index <HASH>..<HASH> 100644
--- a/library/CM/Elasticsearch/Type/Location.php
+++ b/library/CM/Elasticsearch/Type/Location.php
@@ -2,8 +2,6 @@
class CM_Elasticsearch_Type_Location extends CM_Elasticsearch_Type_Abstract {
- protected $_source = true;//TODO change, set for debugging
-
protected $_mapping = array(
'level' => array('type' => 'integer', 'store' => 'yes'),
'id' => array('type' => 'integer', 'store' => 'yes'), | revert source=true for location |
diff --git a/src/app/rocket/core/view/anglTemplate.html.php b/src/app/rocket/core/view/anglTemplate.html.php
index <HASH>..<HASH> 100644
--- a/src/app/rocket/core/view/anglTemplate.html.php
+++ b/src/app/rocket/core/view/anglTemplate.html.php
@@ -6,7 +6,7 @@ use n2n\core\N2N;
$view = HtmlView::view($this);
$html = HtmlView::html($view);
- if (N2N::isDevelopmentModeOn()) {
+ if (defined('ROCKET_DEV')) {
$html->meta()->bodyEnd()->addJs('angl-dev/runtime.js');
$html->meta()->bodyEnd()->addJs('angl-dev/polyfills.js');
$html->meta()->bodyEnd()->addJs('angl-dev/styles.js'); | ROCKET_DEV constant added |
diff --git a/lib/yelp/burst_struct.rb b/lib/yelp/burst_struct.rb
index <HASH>..<HASH> 100644
--- a/lib/yelp/burst_struct.rb
+++ b/lib/yelp/burst_struct.rb
@@ -31,6 +31,10 @@ module BurstStruct
end
end
+ def to_json(options = {})
+ JSON.generate(@hash)
+ end
+
private
def return_or_build_struct(method_name) | Add to_json method to properly deserialize the object |
diff --git a/src/PatternLab/KSSPlugin/Listener.php b/src/PatternLab/KSSPlugin/Listener.php
index <HASH>..<HASH> 100644
--- a/src/PatternLab/KSSPlugin/Listener.php
+++ b/src/PatternLab/KSSPlugin/Listener.php
@@ -22,7 +22,7 @@ class Listener extends \PatternLab\Listener {
*/
public function __construct() {
- $this->addListener("patternData.gatherEnd","runHelper");
+ $this->addListener("patternData.codeHelperStart","runHelper");
} | hooking into a better timed event |
diff --git a/lib/mail/message.rb b/lib/mail/message.rb
index <HASH>..<HASH> 100644
--- a/lib/mail/message.rb
+++ b/lib/mail/message.rb
@@ -1939,7 +1939,6 @@ module Mail
def add_required_fields
add_multipart_mixed_header unless !body.multipart?
- body = nil if body.nil?
add_message_id unless (has_message_id? || self.class == Mail::Part)
add_date unless has_date?
add_mime_version unless has_mime_version? | Remove confusing no-op
This line previously always set the (unused) local variable body to nil.
I assume it meant to read `self.body = nil if body.nil?` however
`body.nil?` cannot happen as the previous line would crash.
Closer inspection reveals that the initialize method calls either
init_with_string or init_with_hash, both of which eventually set the
body to non-nil. |
diff --git a/lib/wd_sinatra/test_unit_helpers.rb b/lib/wd_sinatra/test_unit_helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/wd_sinatra/test_unit_helpers.rb
+++ b/lib/wd_sinatra/test_unit_helpers.rb
@@ -6,8 +6,8 @@ module TestUnitHelpers
response ||= TestApi.json_response
print response.rest_response.errors if response.status === 500
assert response.success?, message || ["Body: #{response.rest_response.body}", "Errors: #{response.errors}", "Status code: #{response.status}"].join("\n")
- service = WSList.all.find{|s| s.verb == response.verb && s.url == response.uri[1..-1]}
- raise "Service for (#{response.verb.upcase} #{response.uri[1..-1]}) not found" unless service
+ service = WSList.find(response.verb, response.uri)
+ raise "Service for (#{response.verb.upcase} #{response.uri}) not found" unless service
unless service.response.nodes.empty?
assert response.body.is_a?(Hash), "Invalid JSON response:\n#{response.body}"
valid, errors = service.validate_hash_response(response.body) | updated the test helper to properly do a service url lookup |
diff --git a/client/driver/docker.go b/client/driver/docker.go
index <HASH>..<HASH> 100644
--- a/client/driver/docker.go
+++ b/client/driver/docker.go
@@ -1852,7 +1852,7 @@ func (h *DockerHandle) Signal(s os.Signal) error {
// Kill is used to terminate the task. This uses `docker stop -t killTimeout`
func (h *DockerHandle) Kill() error {
// Stop the container
- err := h.client.StopContainer(h.containerID, uint(h.killTimeout.Seconds()))
+ err := h.waitClient.StopContainer(h.containerID, uint(h.killTimeout.Seconds()))
if err != nil {
// Container has already been removed. | killing should be done with wait client
Incidentally changed in 5b<I>d<I>bf<I>bab<I>d<I>d<I>bcf<I>e0b<I>e |
diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java
index <HASH>..<HASH> 100644
--- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java
+++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java
@@ -37,7 +37,7 @@ public interface CloudFoundryClient {
/**
* The currently supported Cloud Controller API version
*/
- String SUPPORTED_API_VERSION = "2.40.0";
+ String SUPPORTED_API_VERSION = "2.41.0";
/**
* Main entry point to the Cloud Foundry Applications V2 Client API | Upgrade CC API Support
This change upgrades the support CC API version to <I>.
[#<I>] |
diff --git a/spec/mangopay/refund_spec.rb b/spec/mangopay/refund_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/mangopay/refund_spec.rb
+++ b/spec/mangopay/refund_spec.rb
@@ -21,7 +21,7 @@ describe MangoPay::Refund do
describe 'FETCH for Repudiation' do
it "fetches a repudiation's refunds" do
- refunds = MangoPay::Refund.of_repudiation('45135438')
+ refunds = MangoPay::Refund.of_repudiation('45026109')
expect(refunds).to be_an(Array)
end
end | Using another Repudiation ID for a test |
diff --git a/src/Node/NodeInterface.php b/src/Node/NodeInterface.php
index <HASH>..<HASH> 100644
--- a/src/Node/NodeInterface.php
+++ b/src/Node/NodeInterface.php
@@ -8,4 +8,9 @@ interface NodeInterface
* @return string
*/
public function __toString();
+
+ /**
+ * @return string
+ */
+ public function getPath();
} | Make sure getPath is part of the interface |
diff --git a/lib/ticket_sharing/client.rb b/lib/ticket_sharing/client.rb
index <HASH>..<HASH> 100644
--- a/lib/ticket_sharing/client.rb
+++ b/lib/ticket_sharing/client.rb
@@ -24,7 +24,6 @@ module TicketSharing
end
def success?
- raise "No call made to determine success" unless @success
@success
end | Don't blow up when checking for success... |
diff --git a/src/FondOfSpryker/Zed/ConditionalAvailability/Persistence/ConditionalAvailabilityRepository.php b/src/FondOfSpryker/Zed/ConditionalAvailability/Persistence/ConditionalAvailabilityRepository.php
index <HASH>..<HASH> 100644
--- a/src/FondOfSpryker/Zed/ConditionalAvailability/Persistence/ConditionalAvailabilityRepository.php
+++ b/src/FondOfSpryker/Zed/ConditionalAvailability/Persistence/ConditionalAvailabilityRepository.php
@@ -127,6 +127,12 @@ class ConditionalAvailabilityRepository extends AbstractRepository implements Co
$fosConditionalAvailabilityQuery->innerJoinWithSpyProduct();
}
+ if ($conditionalAvailabilityCriteriaFilterTransfer->getWarehouseGroup() !== null) {
+ $fosConditionalAvailabilityQuery->filterByWarehouseGroup(
+ $conditionalAvailabilityCriteriaFilterTransfer->getWarehouseGroup(),
+ );
+ }
+
if ($conditionalAvailabilityCriteriaFilterTransfer->getMinimumQuantity() !== null) {
$fosConditionalAvailabilityQuery->useFosConditionalAvailabilityPeriodQuery()
->filterByQuantity( | Add missing functionality to filter warehouse group (#<I>) |
diff --git a/glue/ligolw/lsctables.py b/glue/ligolw/lsctables.py
index <HASH>..<HASH> 100644
--- a/glue/ligolw/lsctables.py
+++ b/glue/ligolw/lsctables.py
@@ -1463,14 +1463,14 @@ class SimInspiralTable(LSCTableUnique):
def get_column(self,column):
if 'chirp_dist' in column:
- site = column(-1)
+ site = column[-1]
return self.get_chirp_dist(site)
else:
return self.getColumnByName(column).asarray()
- def get_chirp_dist(self,ref_mass = 1.40):
+ def get_chirp_dist(self,site,ref_mass = 1.40):
mchirp = self.get_column('mchirp')
- eff_dist = self.get_column('eff_dist' + site)
+ eff_dist = self.get_column('eff_dist_' + site)
return eff_dist * (2.**(-1./5) * ref_mass / mchirp)**(5./6)
def get_end(self,site = None): | fix bugs in chirp dist reconstruction |
diff --git a/modelx/__init__.py b/modelx/__init__.py
index <HASH>..<HASH> 100644
--- a/modelx/__init__.py
+++ b/modelx/__init__.py
@@ -20,7 +20,7 @@ Attributes:
"""
-VERSION = (0, 9, 0, "dev")
+VERSION = (0, 9, 0)
__version__ = ".".join([str(x) for x in VERSION])
from modelx.core.api import * # must come after __version__ assignment.
try: | DIST: Release <I> |
diff --git a/emds/__init__.py b/emds/__init__.py
index <HASH>..<HASH> 100644
--- a/emds/__init__.py
+++ b/emds/__init__.py
@@ -1 +1 @@
-__version__ = '0.3'
\ No newline at end of file
+__version__ = '0.4'
\ No newline at end of file | Bump to <I>. |
diff --git a/lib/qs/daemon.rb b/lib/qs/daemon.rb
index <HASH>..<HASH> 100644
--- a/lib/qs/daemon.rb
+++ b/lib/qs/daemon.rb
@@ -296,7 +296,7 @@ module Qs
def initialize(values = nil)
super(values)
- @process_label = (v = ENV['QS_PROCESS_LABEL']) && !v.to_s.empty? ? v : self.name
+ @process_label = !(v = ENV['QS_PROCESS_LABEL'].to_s).empty? ? v : self.name
@init_procs, @error_procs = [], []
@queues = []
@valid = nil | hotfix: use more efficient method for checking the QS_PROCESS_LABEL env var
I noticed this while reviewing redding/sanford#<I>. This is a better
implementation plus I want them to be consistent.
/cc @jcredding |
diff --git a/account/applications.go b/account/applications.go
index <HASH>..<HASH> 100644
--- a/account/applications.go
+++ b/account/applications.go
@@ -8,6 +8,8 @@ import (
"fmt"
"io"
+ "golang.org/x/oauth2"
+
"github.com/TheThingsNetwork/go-account-lib/scope"
"github.com/TheThingsNetwork/ttn/core/types"
)
@@ -192,3 +194,30 @@ func (a *Account) AppCollaborators(appID string) ([]Collaborator, error) {
return collaborators, nil
}
+
+type exchangeReq struct {
+ Username string `json:"username"`
+ Password string `json:"password"`
+}
+
+type exchangeRes struct {
+ AccessToken string `json:"access_token"`
+ ExpiresIn int `json:"expires_in"`
+}
+
+// ExchangeAppKeyForToken exchanges an app ID and app Key for an app token
+func (a *Account) ExchangeAppKeyForToken(appID, accessKey string) (*oauth2.Token, error) {
+ req := exchangeReq{
+ Username: appID,
+ Password: accessKey,
+ }
+
+ var res tokenRes
+
+ err := a.post(a.auth, "/api/v2/applications/token", &req, &res)
+ if err != nil {
+ return nil, err
+ }
+
+ return res.Token(), nil
+} | Add ExchangeAppKeyForToken to account.Account |
diff --git a/slave/ls340.py b/slave/ls340.py
index <HASH>..<HASH> 100644
--- a/slave/ls340.py
+++ b/slave/ls340.py
@@ -314,7 +314,7 @@ class Input(InstrumentBase):
'300uA', '1mA', '10mV', '1mV'),
Enum('1mV', '2.5mV', '5mV', '10mV', '25mV',
'50mV', '100mV', '250mV', '500mV',
- '1V', '2.5V', '5V', '7.5V', start=0)])
+ '1V', '2.5V', '5V', '7.5V', start=1)])
self.kelvin = Command(('KRDG? {0}'.format(name), Float))
self.sensor_units = Command(('SRDG? {0}'.format(name), Float))
self.linear = Command(('LDAT? {0}'.format(name), Float)) | Fixed wrong start value in Input enum of LS<I>. |
diff --git a/lib/wikipedia/page.rb b/lib/wikipedia/page.rb
index <HASH>..<HASH> 100644
--- a/lib/wikipedia/page.rb
+++ b/lib/wikipedia/page.rb
@@ -88,7 +88,7 @@ module Wikipedia
s.gsub!(/\{\{ipa[^\}]+\}\}/i, '')
# misc
- s.gsub!(/{{[^\}]+}}/, '')
+ s.gsub!(/\{\{[^\}]+\}\}/, '')
s.gsub!(/<ref[^<>]*>[\s\S]*?<\/ref>/, '')
s.gsub!(/<!--[^>]+?-->/, '')
s.gsub!(' ', ' ') | Fixed a faulty regex. |
diff --git a/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java b/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java
index <HASH>..<HASH> 100755
--- a/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java
+++ b/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java
@@ -627,7 +627,8 @@ public class DefaultChannelPipeline implements ChannelPipeline {
ChannelStateHandlerAdapter h = (ChannelStateHandlerAdapter) handler;
if (!h.isSharable() && h.added) {
throw new ChannelHandlerLifeCycleException(
- "Only a @Sharable handler can be added or removed multiple times.");
+ h.getClass().getName() +
+ " is not a @Sharable handler, so can't be added or removed multiple times.");
}
h.added = true;
} | [#<I>] Report non @Shareable handler name that has been re-added. |
diff --git a/src/share/classes/com/sun/tools/javac/code/Printer.java b/src/share/classes/com/sun/tools/javac/code/Printer.java
index <HASH>..<HASH> 100644
--- a/src/share/classes/com/sun/tools/javac/code/Printer.java
+++ b/src/share/classes/com/sun/tools/javac/code/Printer.java
@@ -190,7 +190,7 @@ public abstract class Printer implements Type.Visitor<String, Locale>, Symbol.Vi
StringBuilder buf = new StringBuilder();
if (t.getEnclosingType().tag == CLASS && t.tsym.owner.kind == Kinds.TYP) {
buf.append(visit(t.getEnclosingType(), locale));
- buf.append(".");
+ buf.append('.');
buf.append(className(t, false, locale));
} else {
buf.append(className(t, true, locale));
@@ -198,7 +198,7 @@ public abstract class Printer implements Type.Visitor<String, Locale>, Symbol.Vi
if (t.getTypeArguments().nonEmpty()) {
buf.append('<');
buf.append(visitTypes(t.getTypeArguments(), locale));
- buf.append(">");
+ buf.append('>');
}
return buf.toString();
} | Consistently use chars instead of length one string literals. |
diff --git a/rules/tls.go b/rules/tls.go
index <HASH>..<HASH> 100644
--- a/rules/tls.go
+++ b/rules/tls.go
@@ -106,7 +106,7 @@ func (t *insecureConfigTLS) processTLSConfVal(n *ast.KeyValueExpr, c *gas.Contex
}
func (t *insecureConfigTLS) Match(n ast.Node, c *gas.Context) (*gas.Issue, error) {
- if complit, ok := n.(*ast.CompositeLit); ok && c.Info.TypeOf(complit.Type).String() == t.requiredType {
+ if complit, ok := n.(*ast.CompositeLit); ok && complit.Type != nil && c.Info.TypeOf(complit.Type).String() == t.requiredType {
for _, elt := range complit.Elts {
if kve, ok := elt.(*ast.KeyValueExpr); ok {
issue := t.processTLSConfVal(kve, c) | Fix nil pointer dereference in complit types |
diff --git a/classes/GemsEscort.php b/classes/GemsEscort.php
index <HASH>..<HASH> 100644
--- a/classes/GemsEscort.php
+++ b/classes/GemsEscort.php
@@ -166,7 +166,8 @@ class GemsEscort extends MUtil_Application_Escort
}
if ($exists) {
- $cacheFrontendOptions = array('automatic_serialization' => true);
+ $cacheFrontendOptions = array('automatic_serialization' => true,
+ 'cache_id_prefix' => GEMS_PROJECT_NAME . '_');
$cache = Zend_Cache::factory('Core', $cacheBackend, $cacheFrontendOptions, $cacheBackendOptions); | Improved cache by using prefix so 'apc' won't get name clashes on a shared environment |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.