diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/sprinter/formulas/package.py b/sprinter/formulas/package.py
index <HASH>..<HASH> 100644
--- a/sprinter/formulas/package.py
+++ b/sprinter/formulas/package.py
@@ -23,8 +23,11 @@ class PackageFormula(FormulaStandard):
super(PackageFormula, self).setup(feature_name, config)
def update(self, feature_name, source_config, target_config):
- if 'formula' not in source_config or \
- source_config['formula'] != target_config['formula']:
+ install_package = ('formula' not in source_config
+ or (source_config['formula'] != target_config['formula'])
+ or (self.package_manager in target_config and self.package_manager not in source_config)
+ or (target_config[self.package_manager] != source_config[self.package_manager]))
+ if install_package:
self.__install_package(feature_name, target_config)
super(PackageFormula, self).update(feature_name, source_config, target_config)
|
Fixing bug with different package not install on update
|
diff --git a/smore/apispec/core.py b/smore/apispec/core.py
index <HASH>..<HASH> 100644
--- a/smore/apispec/core.py
+++ b/smore/apispec/core.py
@@ -18,6 +18,8 @@ class APISpec(object):
ret = {}
if properties:
ret['properties'] = properties
+ for func in self._definition_helpers:
+ ret.update(func(name, **kwargs))
ret.update(kwargs)
self._definitions[name] = ret
diff --git a/tests/test_api_spec.py b/tests/test_api_spec.py
index <HASH>..<HASH> 100644
--- a/tests/test_api_spec.py
+++ b/tests/test_api_spec.py
@@ -64,3 +64,16 @@ class TestExtensions:
pass
spec.register_definition_helper(my_definition_helper)
assert my_definition_helper in spec._definition_helpers
+
+
+class TestDefinitionHelpers:
+
+ def test_definition_helpers_are_used(self, spec):
+ properties = {'properties': {'name': {'type': 'string'}}}
+
+ def definition_helper(name, **kwargs):
+ return properties
+ spec.register_definition_helper(definition_helper)
+ spec.definition('Pet', {})
+ assert spec._definitions['Pet'] == properties
+
|
Use definition helpers in APISpec#definition
|
diff --git a/presto-main/src/main/java/com/facebook/presto/sql/planner/iterative/rule/TransformCorrelatedScalarAggregationToJoin.java b/presto-main/src/main/java/com/facebook/presto/sql/planner/iterative/rule/TransformCorrelatedScalarAggregationToJoin.java
index <HASH>..<HASH> 100644
--- a/presto-main/src/main/java/com/facebook/presto/sql/planner/iterative/rule/TransformCorrelatedScalarAggregationToJoin.java
+++ b/presto-main/src/main/java/com/facebook/presto/sql/planner/iterative/rule/TransformCorrelatedScalarAggregationToJoin.java
@@ -85,7 +85,7 @@ public class TransformCorrelatedScalarAggregationToJoin
@Override
public Optional<PlanNode> apply(LateralJoinNode lateralJoinNode, Captures captures, Context context)
{
- PlanNode subquery = context.getLookup().resolve(lateralJoinNode.getSubquery());
+ PlanNode subquery = lateralJoinNode.getSubquery();
if (!isScalar(subquery, context.getLookup())) {
return Optional.empty();
|
Remove unnessasary Lookup::resolve usage
|
diff --git a/modules/cms/menu/Container.php b/modules/cms/menu/Container.php
index <HASH>..<HASH> 100644
--- a/modules/cms/menu/Container.php
+++ b/modules/cms/menu/Container.php
@@ -5,6 +5,7 @@ namespace cms\menu;
use Yii;
use Exception;
use ArrayAccess;
+use yii\web\NotFoundHttpException;
use yii\db\Query as DbQuery;
use cms\menu\Query as MenuQuery;
@@ -375,15 +376,12 @@ class Container extends \yii\base\Component implements ArrayAccess
}
}
- if (!$item) {
- $this->_currentAppendix = $requestPath;
-
- return $this->home;
+ if ($item) {
+ $this->_currentAppendix = substr($requestPath, strlen($item->alias) + 1);
+ return $item;
}
- $this->_currentAppendix = substr($requestPath, strlen($item->alias) + 1);
-
- return $item;
+ throw new NotFoundHttpException("Unable to resolve requested path '".$requestPath."'.");
}
/**
|
fixed where not found rules will not be resolved by current menu item.
|
diff --git a/lib/phusion_passenger/common_library.rb b/lib/phusion_passenger/common_library.rb
index <HASH>..<HASH> 100644
--- a/lib/phusion_passenger/common_library.rb
+++ b/lib/phusion_passenger/common_library.rb
@@ -102,7 +102,7 @@ class CommonLibraryBuilder
def define_tasks(extra_compiler_flags = nil)
flags = "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} "
- flags << "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
+ flags << "#{PlatformInfo.portability_cxxflags} #{EXTRA_CXXFLAGS}"
flags.strip!
group_all_components_by_category.each_pair do |category, object_names|
|
Compile the common library with portability_cxxflags instead of portability_cflags
|
diff --git a/packages/cozy-konnector-libs/src/libs/cozyclient.js b/packages/cozy-konnector-libs/src/libs/cozyclient.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-konnector-libs/src/libs/cozyclient.js
+++ b/packages/cozy-konnector-libs/src/libs/cozyclient.js
@@ -67,8 +67,8 @@ const getCozyClient = function(environment = 'production') {
const cozyFields = JSON.parse(process.env.COZY_FIELDS || '{}')
cozyClient.new = new NewCozyClient({
- uri: cozyClient._uri,
- token: cozyClient._token,
+ uri: cozyURL,
+ token: credentials.token.accessToken,
appMetadata: {
slug: manifest.data.slug,
sourceAccount: cozyFields.account,
|
fix: initalization of new cozy-client instance
|
diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php
index <HASH>..<HASH> 100644
--- a/src/DependencyInjection/Configuration.php
+++ b/src/DependencyInjection/Configuration.php
@@ -4,6 +4,7 @@ namespace Algolia\SearchBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
+use function method_exists;
/**
* This is the class that validates and merges configuration from your app/config files.
@@ -17,8 +18,13 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
- $treeBuilder = new TreeBuilder();
- $rootNode = $treeBuilder->root('algolia_search');
+ if (method_exists(TreeBuilder::class, 'getRootNode')) {
+ $treeBuilder = new TreeBuilder('algolia_search');
+ $rootNode = $treeBuilder->getRootNode();
+ } else {
+ $treeBuilder = new TreeBuilder();
+ $rootNode = $treeBuilder->root('algolia_search');
+ }
$rootNode
->children()
|
Fix deprecation for tree builders without root node
|
diff --git a/pkg/transport/timeout_dialer_test.go b/pkg/transport/timeout_dialer_test.go
index <HASH>..<HASH> 100644
--- a/pkg/transport/timeout_dialer_test.go
+++ b/pkg/transport/timeout_dialer_test.go
@@ -43,7 +43,7 @@ func TestReadWriteTimeoutDialer(t *testing.T) {
defer conn.Close()
// fill the socket buffer
- data := make([]byte, 1024*1024)
+ data := make([]byte, 5*1024*1024)
timer := time.AfterFunc(d.wtimeoutd*5, func() {
t.Fatal("wait timeout")
})
diff --git a/pkg/transport/timeout_listener_test.go b/pkg/transport/timeout_listener_test.go
index <HASH>..<HASH> 100644
--- a/pkg/transport/timeout_listener_test.go
+++ b/pkg/transport/timeout_listener_test.go
@@ -52,7 +52,7 @@ func TestWriteReadTimeoutListener(t *testing.T) {
defer conn.Close()
// fill the socket buffer
- data := make([]byte, 1024*1024)
+ data := make([]byte, 5*1024*1024)
timer := time.AfterFunc(wln.wtimeoutd*5, func() {
t.Fatal("wait timeout")
})
|
pkg/transport: change write size from 1MB -> 5MB
As we move to container-based infrastructure testing env
on travis, the tcp write buffer is more than 1MB. Change
the test according to the change on the testing env.
|
diff --git a/src/matches.js b/src/matches.js
index <HASH>..<HASH> 100644
--- a/src/matches.js
+++ b/src/matches.js
@@ -21,7 +21,7 @@ function type(object, fragment) {
}
function id(object, fragment) {
- return (object.props.id == fragment);
+ return (object.props.id == fragment.slice(1));
}
export default {
|
Fixed a bug where selecting by ID wouldn't work.
- This was because the hash wasn't slice when comparing the fragment.
|
diff --git a/Repo/Data/Downline/Qualification.php b/Repo/Data/Downline/Qualification.php
index <HASH>..<HASH> 100644
--- a/Repo/Data/Downline/Qualification.php
+++ b/Repo/Data/Downline/Qualification.php
@@ -9,6 +9,8 @@ namespace Praxigento\BonusHybrid\Repo\Data\Downline;
* Customer qualification data for downline trees.
*
* TODO: do we really need this entity? See \Praxigento\BonusHybrid\Repo\Data\Downline::A_RANK_REF
+ * All customers have DISTRIBUTOR rank in "Downline" table, even w/o qualification but only qualified distributors
+ * have record in "Qualification" table.
*/
class Qualification
extends \Praxigento\Core\App\Repo\Data\Entity\Base
|
MOBI-<I> Complete bonus overview report
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -13,17 +13,22 @@ kwargs = {'name': 'Glymur',
'package_data': {'glymur': ['data/*.jp2', 'data/*.j2k']},
'scripts': ['bin/jp2dump'],
'license': 'LICENSE.txt',
+ 'test_suite': 'glymur.test',
'platforms': ['darwin']}
instllrqrs = ['numpy>1.6.2']
if sys.hexversion < 0x03030000:
instllrqrs.append('contextlib2>=0.4')
- instllrqrs.append('mock>=1.0.1')
if sys.hexversion < 0x02070000:
instllrqrs.append('ordereddict>=1.1')
instllrqrs.append('unittest2>=0.5.1')
kwargs['install_requires'] = instllrqrs
+testrqrs = ['matplotlib>=1.1.0', 'Pillow>=2.0.0']
+if sys.hexversion < 0x03030000:
+ testrqrs.append('mock>=1.0.1')
+kwargs['tests_require'] = testrqrs
+
clssfrs = ["Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
|
Moving test requirements into its own area. Worked on Fedora<I>, python <I>. #<I>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,14 +2,14 @@ from setuptools import setup
import rtv
-DESCRIPTION = 'RTV podcast downloader'
-LONG_DESCRIPTION = 'Command-line program to download podcasts from various sites.'
+DESCRIPTION = 'RTV downloader'
+LONG_DESCRIPTION = 'Command-line program to download videos from various sites.'
setup(name='rtv',
version=rtv.__version__,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
- url='https://github.com/radzak/RtvDownloader',
+ url='https://github.com/radzak/RTVdownloader',
author='Radek Krzak',
author_email='radek.krzak@gmail.com',
license='MIT',
@@ -23,7 +23,8 @@ setup(name='rtv',
'Js2Py',
'youtube_dl',
'validators',
- 'beautifulsoup4'
+ 'beautifulsoup4',
+ 'tldextract'
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
|
Refactor setup.py + add tldextract to required packages
|
diff --git a/src/module.js b/src/module.js
index <HASH>..<HASH> 100644
--- a/src/module.js
+++ b/src/module.js
@@ -84,9 +84,8 @@
}
}
// Maybe failed to fetch successfully, such as 404 or non-module.
- // // In these cases, module.status stay at FETCHING or FETCHED.
+ // In these cases, just call cb function directly.
else {
- util.log('It is not a valid CMD module: ' + uri)
cb()
}
}
|
Remove "It is not valid CMD module" log info. close #<I>
|
diff --git a/packages/cozy-scripts/template/app/jest.config.js b/packages/cozy-scripts/template/app/jest.config.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-scripts/template/app/jest.config.js
+++ b/packages/cozy-scripts/template/app/jest.config.js
@@ -9,6 +9,10 @@ module.exports = {
'\\.(css|styl)$': 'identity-obj-proxy'
},
transformIgnorePatterns: ['node_modules/(?!cozy-ui)'],
+ transform: {
+ // babel-jest module is installed by cozy-scripts
+ '^.+\\.jsx?$': 'babel-jest'
+ },
globals: {
__ALLOW_HTTP__: false,
__TARGET__: 'browser',
|
fix: :nail_care: Force using babel-jest for react app
|
diff --git a/Command/JordiLlonchCrudCommand.php b/Command/JordiLlonchCrudCommand.php
index <HASH>..<HASH> 100644
--- a/Command/JordiLlonchCrudCommand.php
+++ b/Command/JordiLlonchCrudCommand.php
@@ -17,7 +17,6 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Sensio\Bundle\GeneratorBundle\Command\GenerateDoctrineCrudCommand;
use JordiLlonch\Bundle\CrudGeneratorBundle\Generator\JordiLlonchCrudGenerator;
-use Symfony\Component\HttpKernel\Bundle\Bundle;
class JordiLlonchCrudCommand extends GenerateDoctrineCrudCommand
{
|
Fixes from SensioLabsInsight
|
diff --git a/src/Plugin.php b/src/Plugin.php
index <HASH>..<HASH> 100644
--- a/src/Plugin.php
+++ b/src/Plugin.php
@@ -234,6 +234,10 @@ class Plugin implements PluginInterface, EventSubscriberInterface
$path = substr($path, 1);
}
+ if (strncmp($path, '$', 1) === 0) {
+ $path = Builder::path(substr($path, 1));
+ }
+
if (!$this->getFilesystem()->isAbsolutePath($path)) {
$prefix = $package instanceof RootPackageInterface
? $this->getBaseDir()
|
added `$config` paths to include built configs
|
diff --git a/src/Http/Controllers/PageController.php b/src/Http/Controllers/PageController.php
index <HASH>..<HASH> 100644
--- a/src/Http/Controllers/PageController.php
+++ b/src/Http/Controllers/PageController.php
@@ -14,6 +14,23 @@ class PageController extends \Pvtl\VoyagerPages\Http\Controllers\PageController
protected $viewPath = 'voyager-frontend::modules.pages.default';
/**
+ * Add the layout to the returned page
+ *
+ * @param string $slug
+ *
+ * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
+ */
+ public function getPage($slug = 'home')
+ {
+ $view = parent::getPage($slug);
+ $page = Page::findOrFail((int)$view->page->id);
+
+ $view->layout = $page->layout;
+
+ return $view;
+ }
+
+ /**
* POST B(R)EAD - Read data.
*
* @param \Illuminate\Http\Request $request
|
Extend pages to add layout to page view
|
diff --git a/lib/giantbomb.rb b/lib/giantbomb.rb
index <HASH>..<HASH> 100644
--- a/lib/giantbomb.rb
+++ b/lib/giantbomb.rb
@@ -10,5 +10,5 @@ end
end
module GiantBomb
- VERSION = "0.1.0"
+ VERSION = "0.5.0"
end
\ No newline at end of file
|
bumped version to <I>
|
diff --git a/controller/extjs/tests/TestHelper.php b/controller/extjs/tests/TestHelper.php
index <HASH>..<HASH> 100644
--- a/controller/extjs/tests/TestHelper.php
+++ b/controller/extjs/tests/TestHelper.php
@@ -50,6 +50,9 @@ class TestHelper
}
+ /**
+ * @param string $site
+ */
private static function _createContext( $site )
{
$ctx = new MShop_Context_Item_Default();
diff --git a/lib/custom/tests/TestHelper.php b/lib/custom/tests/TestHelper.php
index <HASH>..<HASH> 100644
--- a/lib/custom/tests/TestHelper.php
+++ b/lib/custom/tests/TestHelper.php
@@ -47,6 +47,9 @@ class TestHelper
}
+ /**
+ * @param string $site
+ */
private static function _createContext( $site )
{
$ds = DIRECTORY_SEPARATOR;
|
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on <URL>
|
diff --git a/lib/hash/hash_path_processors.rb b/lib/hash/hash_path_processors.rb
index <HASH>..<HASH> 100644
--- a/lib/hash/hash_path_processors.rb
+++ b/lib/hash/hash_path_processors.rb
@@ -101,8 +101,7 @@ module BBLib
end
def self.parse_date(child, *args, class_based: true)
- params = BBLib.named_args(args)
- format = params.include?(:format) ? params[:format] : '%Y-%m-%d %H:%M:%S'
+ format = BBLib.named_args(*args)[:format]
child.replace_with(
if class_based && child.node_class == Hash
child.value.map do |k, v|
@@ -122,7 +121,8 @@ module BBLib
formatted = nil
patterns.each do |pattern|
next unless formatted.nil?
- formatted = Time.strptime(value.to_s, pattern.to_s).strftime(format) rescue nil
+ formatted = Time.strptime(value.to_s, pattern.to_s) rescue nil
+ formatted = formatted.strftime(format) if format
end
formatted
end
|
Changed date parsing to return a time object if a format is not passed.
|
diff --git a/lib/lazy_resource/request.rb b/lib/lazy_resource/request.rb
index <HASH>..<HASH> 100644
--- a/lib/lazy_resource/request.rb
+++ b/lib/lazy_resource/request.rb
@@ -29,7 +29,7 @@ module LazyResource
end
def log_response(response)
- LazyResource.logger.info "\t[#{response.code}](#{(response.time.to_i * 1000).ceil}ms): #{self.url}"
+ LazyResource.logger.info "\t[#{response.code}](#{((response.time || 0) * 1000).ceil}ms): #{self.url}"
end
def parse
|
Using to_i just wiped out the response time.
|
diff --git a/grab/base.py b/grab/base.py
index <HASH>..<HASH> 100644
--- a/grab/base.py
+++ b/grab/base.py
@@ -458,7 +458,7 @@ class Grab(LXMLExtension, FormExtension, PyqueryExtension,
#raise IOError('Response code is %s: ' % self.response_code)
if self.config['log_file']:
- with open(self.config['log_file'], 'w') as out:
+ with open(self.config['log_file'], 'wb') as out:
out.write(self.response.body)
|
Change file open mode in log_file option
|
diff --git a/calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/PoiExecutionGraphBuilder.java b/calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/PoiExecutionGraphBuilder.java
index <HASH>..<HASH> 100644
--- a/calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/PoiExecutionGraphBuilder.java
+++ b/calculation-engine/engine-evaluation/src/main/java/com/dataart/spreadsheetanalytics/engine/graph/PoiExecutionGraphBuilder.java
@@ -309,8 +309,6 @@ public class PoiExecutionGraphBuilder implements IExecutionGraphBuilder {
ExecutionGraphVertex ivertex = state.dgraph.getEdgeSource(edge);
buildFormula(ivertex, state);
}
- vertex.formula.formulaPtgStr("");
- vertex.formula.ptgStr("");
return CellFormulaExpression.copyOf(vertex.formula);
}
case RANGE: {
|
PTG strings are built in POI
|
diff --git a/firetv/__main__.py b/firetv/__main__.py
index <HASH>..<HASH> 100644
--- a/firetv/__main__.py
+++ b/firetv/__main__.py
@@ -29,7 +29,7 @@ app = Flask(__name__)
devices = {}
config_data = None
valid_device_id = re.compile('^[-\w]+$')
-valid_app_id = re.compile('^[a-zA-Z][a-z\.A-Z]+$')
+valid_app_id = re.compile('^[A-Za-z0-9\.]+$')
def is_valid_host(host):
|
update valid_app_id regex
Update to allow app/package names with numbers.
|
diff --git a/internal/services/automation/automation_account_data_source.go b/internal/services/automation/automation_account_data_source.go
index <HASH>..<HASH> 100644
--- a/internal/services/automation/automation_account_data_source.go
+++ b/internal/services/automation/automation_account_data_source.go
@@ -68,8 +68,10 @@ func dataSourceAutomationAccountRead(d *pluginsdk.ResourceData, meta interface{}
}
return fmt.Errorf("retreiving Automation Account Registration Information %s: %+v", id, err)
}
- d.Set("primary_key", iresp.Keys.Primary)
- d.Set("secondary_key", iresp.Keys.Secondary)
+ if iresp.Keys != nil {
+ d.Set("primary_key", iresp.Keys.Primary)
+ d.Set("secondary_key", iresp.Keys.Secondary)
+ }
d.Set("endpoint", iresp.Endpoint)
return nil
}
|
fix #<I> by adding nil check
|
diff --git a/vaex/test/dataset.py b/vaex/test/dataset.py
index <HASH>..<HASH> 100644
--- a/vaex/test/dataset.py
+++ b/vaex/test/dataset.py
@@ -1399,8 +1399,8 @@ class TestDataset(unittest.TestCase):
path_fits_astropy = tempfile.mktemp(".fits")
#print path
- with self.assertRaises(AssertionError):
- self.dataset.export_hdf5(path, selection=True)
+ #with self.assertRaises(AssertionError):
+ # self.dataset.export_hdf5(path, selection=True)
for dataset in [self.dataset_concat_dup, self.dataset]:
#print dataset.virtual_columns
|
fix: we don't check for selections anymore in export, test reflects that now
|
diff --git a/src/Routing/Conditions/Url.php b/src/Routing/Conditions/Url.php
index <HASH>..<HASH> 100644
--- a/src/Routing/Conditions/Url.php
+++ b/src/Routing/Conditions/Url.php
@@ -145,8 +145,8 @@ class Url implements ConditionInterface {
// add a question mark to the end to make the trailing slash optional
$validation_regex = $validation_regex . '?';
- // make sure the regex matches the beginning of the url
- $validation_regex = '^' . $validation_regex;
+ // make sure the regex matches the entire url
+ $validation_regex = '^' . $validation_regex . '$';
if ( $wrap ) {
$validation_regex = '~' . $validation_regex . '~';
|
fix Url condition matching just the start of the path instead of the whole path
|
diff --git a/lib/passbook.rb b/lib/passbook.rb
index <HASH>..<HASH> 100644
--- a/lib/passbook.rb
+++ b/lib/passbook.rb
@@ -3,7 +3,7 @@ require "passbook/pkpass"
require "passbook/signer"
require 'active_support/core_ext/module/attribute_accessors'
require 'passbook/push_notification'
-require 'grocer/passbook_notification'
+require 'grocer'
require 'rack/passbook_rack'
module Passbook
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
@@ -2,7 +2,7 @@ require 'rubygems'
require 'bundler'
require 'json'
require 'simplecov'
-require 'grocer/passbook_notification'
+require 'grocer'
SimpleCov.start
Dir['lib/passbook/**/*.rb'].each {|f| require File.join(File.dirname(__FILE__), '..', f.gsub(/.rb/, ''))}
|
require whole "grocer" gem
otherwise you won't load "lib/grocer.rb"
and you'll see "NoMethodError (undefined method `pusher' for Grocer:Module):" error.
|
diff --git a/src/ORM/Table.php b/src/ORM/Table.php
index <HASH>..<HASH> 100644
--- a/src/ORM/Table.php
+++ b/src/ORM/Table.php
@@ -1213,7 +1213,7 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
* called allowing you to define additional default values. The new
* entity will be saved and returned.
*
- * @param array|\Cake\ORM\Query|string $search The criteria to find existing records by.
+ * @param array|\Cake\ORM\Query $search The criteria to find existing records by.
* @param callable|null $callback A callback that will be invoked for newly
* created entities. This callback will be called *before* the entity
* is persisted.
|
Updating the doc block for findOrCreate
|
diff --git a/demo/demo.js b/demo/demo.js
index <HASH>..<HASH> 100644
--- a/demo/demo.js
+++ b/demo/demo.js
@@ -13,8 +13,6 @@ function init(){
domi5 = new OriDomi(demo5, { hPanels: 10, vPanels: 1 }),
foldMe = document.querySelector('.fold-me > p'),
foldDomi = new OriDomi(foldMe, { vPanels: 1, hPanels: 4, perspective: 200, speed: 500 });
- //menu = document.getElementsByClassName('menu')[0],
- //menuDomi = new OriDomi(menu, { vPanels: 1, hPanels: 4, perspective: 200, speed: 500, touchEnabled: false, shadingIntensity: 7 });
foldMe.addEventListener('mouseover', function(){
foldDomi.accordion(-40, 1);
@@ -23,15 +21,6 @@ function init(){
foldMe.addEventListener('mouseout', function(){
foldDomi.reset();
}, false);
- /*
- menu.addEventListener('mouseover', function(){
- menuDomi.accordion(-10, 1);
- }, false);
-
- menu.addEventListener('mouseout', function(){
- menuDomi.reset();
- }, false);
- */
setTimeout(function(){
domi1.reveal(40, 1);
|
removed menu oridomi from demo js
|
diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java
index <HASH>..<HASH> 100755
--- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java
+++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java
@@ -1750,6 +1750,7 @@ public class Cql2ElmVisitor extends cqlBaseVisitor {
switch (ctx.getChild(1).getText()) {
case "all" : returnClause.setDistinct(false); break;
case "distinct" : returnClause.setDistinct(true); break;
+ default : break;
}
}
for (cqlParser.ExpressionContext expression : ctx.expression()) {
|
Fixed a code warning that was failing the build.
|
diff --git a/tests/Convert/Converters/ConverterTestHelper.php b/tests/Convert/Converters/ConverterTestHelper.php
index <HASH>..<HASH> 100644
--- a/tests/Convert/Converters/ConverterTestHelper.php
+++ b/tests/Convert/Converters/ConverterTestHelper.php
@@ -186,6 +186,7 @@ class ConverterTestHelper
);
try {
$converter->checkOperationality();
+ echo "\n" . $converterClassName . ' is operational.' . "\n";
} catch (\Exception $e) {
echo "\n" . 'NOTICE: ' . $converterClassName . ' is not operational: ' . $e->getMessage() . "\n";
}
|
Let us know which converters are working too, during test
|
diff --git a/daemon/volumes.go b/daemon/volumes.go
index <HASH>..<HASH> 100644
--- a/daemon/volumes.go
+++ b/daemon/volumes.go
@@ -281,6 +281,7 @@ func (daemon *Daemon) backportMountSpec(container *container.Container) {
from, _, err := volume.ParseVolumesFrom(fromSpec)
if err != nil {
logrus.WithError(err).WithField("id", container.ID).Error("Error reading volumes-from spec during mount spec backport")
+ continue
}
fromC, err := daemon.GetContainer(from)
if err != nil {
|
Add continue on error in mountspec backport
|
diff --git a/src/frontend/org/voltcore/network/ReverseDNSCache.java b/src/frontend/org/voltcore/network/ReverseDNSCache.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltcore/network/ReverseDNSCache.java
+++ b/src/frontend/org/voltcore/network/ReverseDNSCache.java
@@ -40,8 +40,8 @@ public class ReverseDNSCache {
public static final long DEFAULT_MAX_SUCCESS = 1000 * 10;
public static final long DEFAULT_MAX_FAILURE = 1000 * 10;
- public static final long DEFAULT_SUCCESS_TIMEOUT = 300L; //10 minutes
- public static final long DEFAULT_FAILURE_TIMEOUT = 3600; //1 hr
+ public static final long DEFAULT_SUCCESS_TIMEOUT = 600L; //10 minutes
+ public static final long DEFAULT_FAILURE_TIMEOUT = 3600L; //1 hr
public static final TimeUnit DEFAULT_TIMEOUT_UNIT = TimeUnit.SECONDS;
private static final Function<InetAddress, String> DNS_RESOLVER = new Function<InetAddress, String>() {
|
For ENG-<I>, fix timeout and comment based on Ning's feedback
|
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index <HASH>..<HASH> 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -60,13 +60,6 @@ module Puppet
this directory can be removed without causing harm (although it
might result in spurious service restarts)."
},
- :statefile => { :default => "$statedir/state.yaml",
- :mode => 0660,
- :desc => "Where puppetd and puppetmasterd store state associated
- with the running configuration. In the case of puppetmasterd,
- this file reflects the state discovered through interacting
- with clients."
- },
:ssldir => {
:default => "$confdir/ssl",
:mode => 0771,
@@ -363,6 +356,13 @@ module Puppet
:mode => 0660,
:desc => "Where puppetd caches the local configuration. An
extension indicating the cache format is added automatically."},
+ :statefile => { :default => "$statedir/state.yaml",
+ :mode => 0660,
+ :desc => "Where puppetd and puppetmasterd store state associated
+ with the running configuration. In the case of puppetmasterd,
+ this file reflects the state discovered through interacting
+ with clients."
+ },
:classfile => { :default => "$statedir/classes.txt",
:owner => "root",
:mode => 0644,
|
Changing the statefile to only being managed by clients,
not by puppetmasterd.
|
diff --git a/filters/ErrorToExceptionFilter.php b/filters/ErrorToExceptionFilter.php
index <HASH>..<HASH> 100644
--- a/filters/ErrorToExceptionFilter.php
+++ b/filters/ErrorToExceptionFilter.php
@@ -5,13 +5,13 @@ namespace filsh\yii2\oauth2server\filters;
use Yii;
use yii\base\Controller;
-class ErrorToExceptionFilter extends yii\base\Behavior
+class ErrorToExceptionFilter extends \yii\base\Behavior
{
public function events()
{
return [Controller::EVENT_AFTER_ACTION => 'afterAction'];
}
-
+
/**
* @param ActionEvent $event
* @return boolean
@@ -20,7 +20,7 @@ class ErrorToExceptionFilter extends yii\base\Behavior
public function afterAction($event)
{
$response = Yii::$app->getModule('oauth2')->getServer()->getResponse();
-
+
$isValid = true;
if($response !== null) {
$isValid = $response->isInformational() || $response->isSuccessful() || $response->isRedirection();
@@ -35,4 +35,4 @@ class ErrorToExceptionFilter extends yii\base\Behavior
throw new \yii\web\HttpException($status, $message);
}
}
-}
\ No newline at end of file
+}
|
Fixed full class name from which ErrorToExceptionFilter extends
|
diff --git a/src/core/lombok/javac/handlers/HandleNonNull.java b/src/core/lombok/javac/handlers/HandleNonNull.java
index <HASH>..<HASH> 100644
--- a/src/core/lombok/javac/handlers/HandleNonNull.java
+++ b/src/core/lombok/javac/handlers/HandleNonNull.java
@@ -141,6 +141,7 @@ public class HandleNonNull extends JavacAnnotationHandler<NonNull> {
List<JCStatement> newList = tail.prepend(nullCheck);
for (JCStatement stat : head) newList = newList.prepend(stat);
declaration.body.stats = newList;
+ annotationNode.getAst().setChanged();
}
public boolean isNullCheck(JCStatement stat) {
|
[fixes #<I>] A source file with just parameter @NonNull would not trigger delombok due to lack of ast.setChanged flagging
|
diff --git a/packages/netlify-cms-core/src/components/App/App.js b/packages/netlify-cms-core/src/components/App/App.js
index <HASH>..<HASH> 100644
--- a/packages/netlify-cms-core/src/components/App/App.js
+++ b/packages/netlify-cms-core/src/components/App/App.js
@@ -217,11 +217,11 @@ class App extends React.Component {
render={props => <Collection {...props} isSearchResults />}
/>
<RouteInCollection
- path="/edit/:collectionName/:entryName"
+ path="/edit/:name/:entryName"
collections={collections}
render={({ match }) => {
- const { collectionName, entryName } = match.params;
- return <Redirect to={`/collections/${collectionName}/entries/${entryName}`} />;
+ const { name, entryName } = match.params;
+ return <Redirect to={`/collections/${name}/entries/${entryName}`} />;
}}
/>
<Route component={NotFoundPage} />
|
fix(core): use correct name for edit route param (#<I>)
|
diff --git a/lib/visitor/evaluator.js b/lib/visitor/evaluator.js
index <HASH>..<HASH> 100644
--- a/lib/visitor/evaluator.js
+++ b/lib/visitor/evaluator.js
@@ -202,21 +202,6 @@ Evaluator.prototype.visitPage = function(page){
};
/**
- * Visit noops.
- */
-
-Evaluator.prototype.visitString =
-Evaluator.prototype.visitUnit =
-Evaluator.prototype.visitRGBA =
-Evaluator.prototype.visitHSLA =
-Evaluator.prototype.visitNull =
-Evaluator.prototype.visitComment =
-Evaluator.prototype.visitBoolean =
-Evaluator.prototype.visitLiteral = function(string){
- return string;
-};
-
-/**
* Visit Keyframes.
*/
diff --git a/lib/visitor/index.js b/lib/visitor/index.js
index <HASH>..<HASH> 100644
--- a/lib/visitor/index.js
+++ b/lib/visitor/index.js
@@ -25,7 +25,7 @@ var Visitor = module.exports = function Visitor(root) {
Visitor.prototype.visit = function(node, fn){
var method = 'visit' + node.constructor.name;
- if (!this[method]) throw new Error('un-implemented ' + method);
- return this[method](node);
+ if (this[method]) return this[method](node);
+ return node;
};
|
revert noop visitor methods
|
diff --git a/lib/milia/control.rb b/lib/milia/control.rb
index <HASH>..<HASH> 100644
--- a/lib/milia/control.rb
+++ b/lib/milia/control.rb
@@ -171,10 +171,10 @@ module Milia
# My signup form has fields for user's email,
# organization's name (tenant model), coupon code,
# ------------------------------------------------------------------------------
- def prep_signup_view(tenant=nil, user=nil, coupon='')
+ def prep_signup_view(tenant=nil, user=nil, coupon={coupon:''})
@user = klass_option_obj( User, user )
@tenant = klass_option_obj( Tenant, tenant )
- @coupon = coupon if ::Milia.use_coupon
+ @coupon = coupon # if ::Milia.use_coupon
end
# ------------------------------------------------------------------------------
|
reg ctlr logging - 5
|
diff --git a/trionyx/trionyx/middleware.py b/trionyx/trionyx/middleware.py
index <HASH>..<HASH> 100644
--- a/trionyx/trionyx/middleware.py
+++ b/trionyx/trionyx/middleware.py
@@ -57,10 +57,26 @@ class GlobalRequestMiddleware:
def __call__(self, request):
"""Store request in local data"""
LOCAL_DATA.request = request
+
+ def streaming_content_wrapper(content):
+ try:
+ for chunk in content:
+ yield chunk
+ finally:
+ del LOCAL_DATA.request
+
try:
- return self.get_response(request)
- finally:
+ response = self.get_response(request)
+ except Exception as e:
del LOCAL_DATA.request
+ raise e
+
+ if response.streaming:
+ response.streaming_content = streaming_content_wrapper(response.streaming_content)
+ else:
+ del LOCAL_DATA.request
+
+ return response
class LastLoginMiddleware:
|
[BUGFIX] get_current_request not working in streaming response
|
diff --git a/src/Boot.php b/src/Boot.php
index <HASH>..<HASH> 100755
--- a/src/Boot.php
+++ b/src/Boot.php
@@ -146,7 +146,10 @@ if (empty($_SESSION['__session_name_validated'])) {
// Http auth for PHP-CGI mode
if (isset($_SERVER['HTTP_AUTHORIZATION']) && !isset($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) {
- list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
+ $tmp = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
+ if (isset($tmp[1])) {
+ list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
+ }
}
// Ini with required keys
|
HTTP auth for PHP-CGI fix for servers without it
|
diff --git a/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java b/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
index <HASH>..<HASH> 100644
--- a/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
+++ b/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
@@ -126,7 +126,8 @@ public class TypeAnnotationPosition {
// Tree position.
public int pos = -1;
- // For typecasts, type tests, new (and locals, as start_pc).
+ // For type casts, type tests, new, locals (as start_pc),
+ // and method and constructor reference type arguments.
public boolean isValidOffset = false;
public int offset = -1;
|
Clarify and expand a comment.
|
diff --git a/auto_ml/utils.py b/auto_ml/utils.py
index <HASH>..<HASH> 100644
--- a/auto_ml/utils.py
+++ b/auto_ml/utils.py
@@ -25,27 +25,23 @@ class SplitOutput(BaseEstimator, TransformerMixin):
return self
-def instantiate_model(model_name='RandomForestClassifier'):
- print(model_name)
-
- model_map = {
- 'LogisticRegression': LogisticRegression(),
- 'RandomForestClassifier': RandomForestClassifier()
- }
-
- return model_map[model_name]
-
-
class FinalModelATC(BaseEstimator, TransformerMixin):
- def __init__(self, model_name, X_train=None, y_train=None, perform_grid_search_on_model=False):
+ def __init__(self, model_name, X_train=None, y_train=None, perform_grid_search_on_model=False, model_map=None):
self.model_name = model_name
self.X_train = X_train
self.y_train = y_train
self.perform_grid_search_on_model = perform_grid_search_on_model
+ if model_map is not None:
+ self.model_map = model_map
+ else:
+ self.set_model_map()
+
+
+ def set_model_map(self):
self.model_map = {
'LogisticRegression': LogisticRegression(),
'RandomForestClassifier': RandomForestClassifier()
|
removes old code and modularizes model_map to make it more readable
|
diff --git a/js/values/WordCombination.js b/js/values/WordCombination.js
index <HASH>..<HASH> 100644
--- a/js/values/WordCombination.js
+++ b/js/values/WordCombination.js
@@ -27,10 +27,10 @@ function WordCombination( words, occurrences ) {
}
WordCombination.lengthBonus = {
- 2: 2,
- 3: 4,
- 4: 6,
- 5: 8,
+ 2: 3,
+ 3: 6,
+ 4: 9,
+ 5: 12,
};
/**
|
Increase length bonus to 3 to improve results
|
diff --git a/app/models/renalware/letters/pdf_letter_cache.rb b/app/models/renalware/letters/pdf_letter_cache.rb
index <HASH>..<HASH> 100644
--- a/app/models/renalware/letters/pdf_letter_cache.rb
+++ b/app/models/renalware/letters/pdf_letter_cache.rb
@@ -40,7 +40,7 @@ module Renalware
delegate :clear, to: :store
def fetch(letter, **options)
- store.fetch(cache_key_for(letter, **options)) { yield }
+ store.fetch(cache_key_for(letter, **options), expires_in: 4.weeks) { yield }
end
# Note the letter must be a LetterPresenter which has a #to_html method
|
Expire letters in the PDF cache after 4 weeks
|
diff --git a/dev_setup.py b/dev_setup.py
index <HASH>..<HASH> 100644
--- a/dev_setup.py
+++ b/dev_setup.py
@@ -11,10 +11,13 @@ DESCRIPTION
updates to PmagPy, it may be better to use the pip or binary installs of
this software instructions here:
(https://earthref.org/PmagPy/cookbook/#pip_install).
- Also note for Windows users the windows_install function of this file
+ Note for Windows users: the windows_install function of this file
requires administrative access so you will need to run in a command prompt
with elevated privileges. See:
(http://www.thewindowsclub.com/how-to-run-command-prompt-as-an-administrator)
+ Note for OSX users: you must use bash as your shell (not csh, zsh, etc.).
+ To switch to bash, select Terminal --> Preferences --> General,
+ and choose "default login shell".
Last, this script MUST BE RUN FROM THE PMAGPY DIRECTORY.
SYNTAX
|
for dev_setup.py add note about using bash instead of other shells
|
diff --git a/python-package/xgboost/sklearn.py b/python-package/xgboost/sklearn.py
index <HASH>..<HASH> 100644
--- a/python-package/xgboost/sklearn.py
+++ b/python-package/xgboost/sklearn.py
@@ -222,7 +222,7 @@ class XGBModel(XGBModelBase):
evals_result = {}
if eval_set is not None:
- evals = list(DMatrix(x[0], label=x[1],missing=self.missing) for x in eval_set)
+ evals = list(DMatrix(x[0], label=x[1], missing=self.missing) for x in eval_set)
evals = list(zip(evals, ["validation_{}".format(i) for i in
range(len(evals))]))
else:
|
cosmetic change
cosmetic change of putting space after comma compared to previous edit.
|
diff --git a/nbdiff/diff.py b/nbdiff/diff.py
index <HASH>..<HASH> 100644
--- a/nbdiff/diff.py
+++ b/nbdiff/diff.py
@@ -33,6 +33,8 @@ def diff(before, after, check_modified=False):
diff_items : A list of dictionaries containing diff information.
"""
grid = create_grid(before, after)
+ if len(grid) < 1:
+ return []
nrows = len(grid[0])
ncols = len(grid)
dps = diff_points(grid)
diff --git a/tests/test_diff.py b/tests/test_diff.py
index <HASH>..<HASH> 100644
--- a/tests/test_diff.py
+++ b/tests/test_diff.py
@@ -35,6 +35,11 @@ def test_create_grid():
assert len([True for col in grid if len(col) == 0]) == 0
+def test_empty_diff():
+ result = diff([], [])
+ assert len(result) == 0
+
+
def test_diff_points():
A = [u'x = [1,3,3]\n', u'z = {1, 2, 3} \n', u'\n', u'z']
B = [u'x = [1,3,4]\n', u'z = {1, 2, 3} \n', u'\n', u'm']
|
Fix #<I> - fix diff on empty lists
|
diff --git a/holoviews/element/chart.py b/holoviews/element/chart.py
index <HASH>..<HASH> 100644
--- a/holoviews/element/chart.py
+++ b/holoviews/element/chart.py
@@ -39,7 +39,7 @@ class Chart(Element2D):
settings.update(params)
super(Chart, self).__init__(data, **settings)
- if not data.shape[1] == len(self.dimensions()):
+ if data.ndim > 1 and not data.shape[1] == len(self.dimensions()):
raise ValueError("Data has to match number of key and value dimensions")
|
Added support for single dimensional Charts
|
diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py
index <HASH>..<HASH> 100644
--- a/ceph_deploy/install.py
+++ b/ceph_deploy/install.py
@@ -168,6 +168,8 @@ def custom_repo(distro, args, cd_conf, rlogger):
def uninstall(args):
+ LOG.info('note that some dependencies *will not* be removed because they can cause issues with qemu-kvm')
+ LOG.info('like: librbd1 and librados2')
LOG.debug(
'Uninstalling on cluster %s hosts %s',
args.cluster,
@@ -186,6 +188,9 @@ def uninstall(args):
def purge(args):
+ LOG.info('note that some dependencies *will not* be removed because they can cause issues with qemu-kvm')
+ LOG.info('like: librbd1 and librados2')
+
LOG.debug(
'Purging from cluster %s hosts %s',
args.cluster,
|
when purging/uninstalling mention note about librados and librbd
|
diff --git a/passpie/history.py b/passpie/history.py
index <HASH>..<HASH> 100644
--- a/passpie/history.py
+++ b/passpie/history.py
@@ -66,6 +66,8 @@ class Repository(object):
@ensure_git()
def commit(self, message, add=True):
+ process.call(["git", "config", "--local", "user.name", "Passpie"], cwd=self.path)
+ process.call(["git", "config", "--local", "user.email", "passpie@localhost"], cwd=self.path)
if add:
self.add(all=True)
cmd = ['git', 'commit', '-m', message]
|
Fix setting author to git config before commit
|
diff --git a/src/response/payload/ImagePayload.php b/src/response/payload/ImagePayload.php
index <HASH>..<HASH> 100644
--- a/src/response/payload/ImagePayload.php
+++ b/src/response/payload/ImagePayload.php
@@ -91,7 +91,7 @@ final class ImagePayload extends Payload implements PayloadInterface
}
unset($temp);
- } else {
+ } elseif (!is_image($image)) { // Image may be GdImage.
if (File::errorCheck($image, $error)) {
throw new PayloadException($error->getMessage(), null, $error->getCode());
}
|
response.payload.ImagePayload: fix GdImage issue.
|
diff --git a/main.js b/main.js
index <HASH>..<HASH> 100644
--- a/main.js
+++ b/main.js
@@ -1774,7 +1774,7 @@ require('es6-promise').polyfill();
proto.editGroupInfo = function editGroupInfo(groupId, newInfo, callback){
callback = typeof callback === "function" ? callback : function () { };
- apiconnector.basicRequest('POST', '/group/update',{ group_id:groupId, info:newInfo }, false, function(err,respObj){
+ apiconnector.basicRequest('POST', '/group/update',{ groupId:groupId, info:newInfo }, false, function(err,respObj){
if(err){
Log.m(this.session.debug, 'Monkey - error updating group: '+err);
return callback(err);
|
Change snake case to camel case on group update
|
diff --git a/src/nls/zh-cn/strings.js b/src/nls/zh-cn/strings.js
index <HASH>..<HASH> 100644
--- a/src/nls/zh-cn/strings.js
+++ b/src/nls/zh-cn/strings.js
@@ -373,7 +373,7 @@ define({
"JSLINT_ERROR_INFORMATION" : "1个JSLint错误",
"JSLINT_ERRORS_INFORMATION" : "{0}个JSLint错误",
"JSLINT_NO_ERRORS" : "未发现JSLint错误 - 骚年加油!",
- "JSLINT_DISABLED" : "JSLint已被禁用或者无法工作在此文件."
+ "JSLINT_DISABLED" : "JSLint已被禁用或者无法工作在此文件.",
// extensions/default/QuickView
"CMD_ENABLE_QUICK_VIEW" : "鼠标悬停时启用快速查看",
|
add a comma at the end of line <I>.
|
diff --git a/sdk/src/main/java/com/wonderpush/sdk/inappmessaging/display/InAppMessagingDisplay.java b/sdk/src/main/java/com/wonderpush/sdk/inappmessaging/display/InAppMessagingDisplay.java
index <HASH>..<HASH> 100644
--- a/sdk/src/main/java/com/wonderpush/sdk/inappmessaging/display/InAppMessagingDisplay.java
+++ b/sdk/src/main/java/com/wonderpush/sdk/inappmessaging/display/InAppMessagingDisplay.java
@@ -373,6 +373,7 @@ public class InAppMessagingDisplay extends InAppMessagingDisplayImpl {
new View.OnClickListener() {
@Override
public void onClick(View v) {
+ if (inAppMessage == null) return;
if (callbacks != null) {
callbacks.messageClicked(actions);
}
|
Fix NPE when clicking an in-app message during its exit animation
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -14,9 +14,9 @@ describe('full_process', function () {
});
describe('Scorer Identity Tests', function () {
- for (var scorer of scorers) {
- var tmpscorer = scorer;
- describe('Scorer: ' + scorer.name, function () {
+ for (var scorer in scorers) {
+ var tmpscorer = scorers[scorer];
+ describe('Scorer: ' + tmpscorer.name, function () {
it('should return 0 if either string is empty', function () {
assert.equal(0, tmpscorer("", "striiing"));
|
use 'in' style test loop to pass <I>
|
diff --git a/lib/serverspec/setup.rb b/lib/serverspec/setup.rb
index <HASH>..<HASH> 100644
--- a/lib/serverspec/setup.rb
+++ b/lib/serverspec/setup.rb
@@ -189,7 +189,7 @@ EOF
list_of_vms = []
if vagrant_list != ''
vagrant_list.each_line do |line|
- if match = /([a-z]+[\s]+)(created|not created|poweroff|running|saved)[\s](\(virtualbox\)|\(vmware\))/.match(line)
+ if match = /([a-z_-]+[\s]+)(created|not created|poweroff|running|saved)[\s](\(virtualbox\)|\(vmware\))/.match(line)
list_of_vms << match[1].strip!
end
end
|
Allow to use '_' and '-' as vagrant machine name
|
diff --git a/lib/rails_best_practices/core/check.rb b/lib/rails_best_practices/core/check.rb
index <HASH>..<HASH> 100644
--- a/lib/rails_best_practices/core/check.rb
+++ b/lib/rails_best_practices/core/check.rb
@@ -354,7 +354,7 @@ module RailsBestPractices
end
def internal_except_methods
- raise NoMethodError.new 'no method internal_except_methods'
+ raise NoMethodError, 'no method internal_except_methods'
end
end
end
|
Auto corrected by following Style/RaiseArgs
|
diff --git a/pywbem/cim_operations.py b/pywbem/cim_operations.py
index <HASH>..<HASH> 100644
--- a/pywbem/cim_operations.py
+++ b/pywbem/cim_operations.py
@@ -1116,6 +1116,11 @@ class WBEMConnection(object): # pylint: disable=too-many-instance-attributes
CIM-XML data of the last response received from the WBEM server
on this connection, formatted as prettified XML.
+ Setting this property requires XML parsing of the received CIM-XML
+ response. If the XML parsing fails, this property will be `None`, but
+ the :attr:`~pywbem.WBEMConnection.last_raw_reply` property will already
+ have been set and should be used, instead.
+
Prior to receiving the very first response on this connection object,
and when debug saving of requests and responses is disabled (see
:attr:`~pywbem.WBEMConnection.debug`), this property is `None`.
|
Improved description of WBEMConnection.last_reply
Details:
- The last_reply property is set only if SAX parsing of the
response succeeds. If that fails (i.e. ParseError with
XML parsing indicated as a reason), the last_reply property
is None. This change improves the description of the
last_reply property to explain this and to hint at using the
last_raw_reply property instead in such a case.
|
diff --git a/lib/spinach/config.rb b/lib/spinach/config.rb
index <HASH>..<HASH> 100644
--- a/lib/spinach/config.rb
+++ b/lib/spinach/config.rb
@@ -41,7 +41,7 @@ module Spinach
# output to the standard output
#
def default_reporter
- @default_reporter || Spinach::Reporter::Stdout
+ @default_reporter || Spinach::Reporter::Stdout.new
end
# Allows you to read the config object using a hash-like syntax.
diff --git a/lib/spinach/runner.rb b/lib/spinach/runner.rb
index <HASH>..<HASH> 100644
--- a/lib/spinach/runner.rb
+++ b/lib/spinach/runner.rb
@@ -17,7 +17,7 @@ module Spinach
@support_path = options.delete(:support_path ) ||
Spinach.config.support_path
- @reporter = Spinach::config.default_reporter.new
+ @reporter = Spinach::config.default_reporter
end
# The default reporter associated to this run
|
Use an instance of the reporter, not the class
This will allow us to have statistics on all reports, for example.
|
diff --git a/engine/src/main/java/org/camunda/bpm/engine/impl/util/xml/Parse.java b/engine/src/main/java/org/camunda/bpm/engine/impl/util/xml/Parse.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/org/camunda/bpm/engine/impl/util/xml/Parse.java
+++ b/engine/src/main/java/org/camunda/bpm/engine/impl/util/xml/Parse.java
@@ -143,7 +143,7 @@ public class Parse extends DefaultHandler {
SAXParser saxParser = parser.getSaxParser();
try {
- saxParser.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "file,http,https");
+ saxParser.setProperty("http://javax.xml.XMLConstants/property/accessExternalSchema", "file,http,https,jar,wsjar");
} catch (Exception e) {
// ignore unavailable option
}
|
fix(engine): correct external schema access in parser
* use compatible reference (some JDKs do not contain the XMLConstants constant)
* allow "jar" and "wsjar" references in schema as well
related to CAM-<I>
|
diff --git a/test/geocoder_test.rb b/test/geocoder_test.rb
index <HASH>..<HASH> 100644
--- a/test/geocoder_test.rb
+++ b/test/geocoder_test.rb
@@ -21,6 +21,8 @@ class GeocoderTest < Test::Unit::TestCase
def test_distance_between
assert_equal 69, Geocoder::Calculations.distance_between(0,0, 0,1).round
+ la_to_ny = Geocoder::Calculations.distance_between(34.05,-118.25, 40.72,-74).round
+ assert (la_to_ny - 2444).abs < 10
end
def test_compass_points
|
Add non-trivial distance_between test.
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100755
--- a/lib/index.js
+++ b/lib/index.js
@@ -77,7 +77,7 @@ exports.register = function (server, options, next) {
server.route({
method: 'GET',
- path: '/docs/swaggerui/images/throbber.gif',
+ path: settings.endpoint + '/swaggerui/images/throbber.gif',
config: {
auth: settings.auth,
},
|
Fixed endpoint for throbber.gif image
|
diff --git a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/Partitioner.java b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/Partitioner.java
index <HASH>..<HASH> 100644
--- a/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/Partitioner.java
+++ b/builder/src/main/java/com/stratio/cassandra/lucene/builder/index/Partitioner.java
@@ -74,13 +74,11 @@ public abstract class Partitioner extends JSONBuilder {
*/
public OnToken(int partitions) {
this.partitions = partitions;
- this.paths=paths;
}
/**
- *
* @param paths the paths where to save partitions
- *
+ * @return this with the specified path directories
*/
public OnToken paths(String[] paths) {
this.paths = paths;
@@ -120,7 +118,6 @@ public abstract class Partitioner extends JSONBuilder {
*
* @param partitions the number of index partitions per node
* @param column the partition key column
-
*/
public OnColumn(int partitions, String column) {
this.partitions = partitions;
@@ -128,9 +125,8 @@ public abstract class Partitioner extends JSONBuilder {
}
/**
- *
* @param paths the paths where to save partitions
- *
+ * @return this with the specified path directories
*/
public OnColumn paths(String[] paths) {
this.paths = paths;
|
fixed two javadoc warnings in builder
|
diff --git a/py/selenium/webdriver/remote/webelement.py b/py/selenium/webdriver/remote/webelement.py
index <HASH>..<HASH> 100755
--- a/py/selenium/webdriver/remote/webelement.py
+++ b/py/selenium/webdriver/remote/webelement.py
@@ -363,7 +363,7 @@ class WebElement(object):
@property
def parent(self):
- """Parent element."""
+ """Internal reference to the WebDriver instance this element was found from."""
return self._parent
@property
|
clarifying doc string for 'parent' property. Fixes Issue #<I>
|
diff --git a/shakedown/dcos/package.py b/shakedown/dcos/package.py
index <HASH>..<HASH> 100644
--- a/shakedown/dcos/package.py
+++ b/shakedown/dcos/package.py
@@ -308,9 +308,9 @@ def uninstall_package_and_data(
print('\n{}uninstall/delete done after pkg({}) + data({}) = total({})\n'.format(
shakedown.cli.helpers.fchr('>>'),
- pretty_duration(data_start start),
- pretty_duration(finish data_start),
- pretty_duration(finish start)))
+ pretty_duration(data_start - start),
+ pretty_duration(finish - data_start),
+ pretty_duration(finish - start)))
|
repairing a failed attempt a search and replace
|
diff --git a/katcp/sensortree.py b/katcp/sensortree.py
index <HASH>..<HASH> 100644
--- a/katcp/sensortree.py
+++ b/katcp/sensortree.py
@@ -50,7 +50,7 @@ class GenericSensorTree(object):
sensor : :class:`katcp.Sensor`
The sensor whose value has changed.
"""
- parents = self._child_to_parents[sensor]
+ parents = list(self._child_to_parents[sensor])
for parent in parents:
self.recalculate(parent, (sensor,))
|
Handle addition of new sensors to the sensor tree during a sensor update without crashing (missing part from last commit).
git-svn-id: <URL>
|
diff --git a/Form/Type/DataType.php b/Form/Type/DataType.php
index <HASH>..<HASH> 100644
--- a/Form/Type/DataType.php
+++ b/Form/Type/DataType.php
@@ -212,6 +212,9 @@ class DataType extends AbstractType
DataInterface $data = null,
array $options = []
) {
+ if ($attribute->getOption('hidden')) {
+ return;
+ }
if ($attribute->isMultiple() && $attribute->isCollection()) {
$this->addMultipleAttribute($form, $attribute, $family, $data, $options);
} else {
|
Adding "hidden" option in attributes
|
diff --git a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/linking/impl/AbstractCleaningLinker.java b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/linking/impl/AbstractCleaningLinker.java
index <HASH>..<HASH> 100644
--- a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/linking/impl/AbstractCleaningLinker.java
+++ b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/linking/impl/AbstractCleaningLinker.java
@@ -84,10 +84,12 @@ public abstract class AbstractCleaningLinker extends AbstractLinker {
*/
protected boolean shouldCheckParentNode(INode node) {
if (node.getGrammarElement() instanceof AbstractElement) {
- AbstractElement grammarElement = (AbstractElement) node.getGrammarElement();
- Assignment assignment = GrammarUtil.containingAssignment(grammarElement);
- if (assignment == null && node.getParent() != null && !node.getParent().hasDirectSemanticElement()) {
- return true;
+ if (node.getParent() != null && !node.getParent().hasDirectSemanticElement()) {
+ AbstractElement grammarElement = (AbstractElement) node.getGrammarElement();
+ Assignment assignment = GrammarUtil.containingAssignment(grammarElement);
+ if (assignment == null) {
+ return true;
+ }
}
}
return false;
|
[organizeImports] Fix: ValueConverterException on organize imports
This fixes a regression due to the application of value converters
on organize imports
see <URL>
|
diff --git a/Middleware/AuthenticateWithBearerAuth.php b/Middleware/AuthenticateWithBearerAuth.php
index <HASH>..<HASH> 100644
--- a/Middleware/AuthenticateWithBearerAuth.php
+++ b/Middleware/AuthenticateWithBearerAuth.php
@@ -24,6 +24,8 @@ class AuthenticateWithBearerAuth
) {
return $continue;
}
+
+ $this->response('Unauthorized', 401);
}
/**
@@ -108,7 +110,7 @@ class AuthenticateWithBearerAuth
*
* @return void
*/
- protected function response($message, $code) : rest
+ protected function response($message, $code)
{
return Rest::response()->json([
'status' => $message,
|
Feat: return <I> if user is not authorized
|
diff --git a/src/Torann/Currency/Middleware/CurrencyMiddleware.php b/src/Torann/Currency/Middleware/CurrencyMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/Torann/Currency/Middleware/CurrencyMiddleware.php
+++ b/src/Torann/Currency/Middleware/CurrencyMiddleware.php
@@ -92,6 +92,6 @@ class CurrencyMiddleware
// Save it for later too!
$request->getSession()->put(['currency' => $currency]);
- $request->getSession()->reflash();
+ $request->getSession()->keep('currency');
}
}
\ No newline at end of file
|
Use `keep` when setting currency
|
diff --git a/ga4gh/datarepo.py b/ga4gh/datarepo.py
index <HASH>..<HASH> 100644
--- a/ga4gh/datarepo.py
+++ b/ga4gh/datarepo.py
@@ -608,7 +608,6 @@ class SqlDataRepository(AbstractDataRepository):
referenceSet.getSourceUri(), referenceSet.getDataUrl()))
except sqlite3.IntegrityError:
raise exceptions.DuplicateNameException(referenceSet.getLocalId())
- self._dbConnection.commit()
for reference in referenceSet.getReferences():
self.insertReference(reference)
|
Remove unintended db.commit
|
diff --git a/salt/utils/http.py b/salt/utils/http.py
index <HASH>..<HASH> 100644
--- a/salt/utils/http.py
+++ b/salt/utils/http.py
@@ -15,6 +15,7 @@ import pprint
import socket
import urllib
import inspect
+import yaml
import ssl
try:
@@ -561,10 +562,12 @@ def query(url,
decode_type = 'xml'
elif 'json' in content_type:
decode_type = 'json'
+ elif 'yaml' in content_type:
+ decode_type = 'yaml'
else:
decode_type = 'plain'
- valid_decodes = ('json', 'xml', 'plain')
+ valid_decodes = ('json', 'xml', 'yaml', 'plain')
if decode_type not in valid_decodes:
ret['error'] = (
'Invalid decode_type specified. '
@@ -582,6 +585,8 @@ def query(url,
items = ET.fromstring(result_text)
for item in items:
ret['dict'].append(xml.to_dict(item))
+ elif decode_type == 'yaml':
+ ret['dict'] = yaml.load(result_text)
else:
text = True
|
Added support for yaml decode_type
|
diff --git a/pypeerassets/transactions.py b/pypeerassets/transactions.py
index <HASH>..<HASH> 100644
--- a/pypeerassets/transactions.py
+++ b/pypeerassets/transactions.py
@@ -186,7 +186,4 @@ def unpack_txn_buffer(buffer, network="ppc"):
def unpack_raw_transaction(rawtx: bytes) -> dict:
'''unpacks raw transactions, returns dictionary'''
- if not isinstance(rawtx, bytes):
- raise ValueError('Binary input required')
-
return unpack_txn_buffer(Tx_buffer(rawtx))
|
transactions: unpack_raw_transaction; remove redundant type check.
|
diff --git a/src/Data/Collection.php b/src/Data/Collection.php
index <HASH>..<HASH> 100644
--- a/src/Data/Collection.php
+++ b/src/Data/Collection.php
@@ -517,7 +517,7 @@ class Collection implements Serializable, ArrayAccess, Iterator
*/
protected function _moveToOriginalCollection($index)
{
- if (array_key_exists($index, $this->_originalCollection)
+ if (!array_key_exists($index, $this->_originalCollection)
&& !in_array($index, $this->_newKeys)
) {
$this->_originalCollection[$index] = $this->_COLLECTION[$index];
|
create Collection class (issue #4)
This version introduces multiple enhancements:
fixed move collection element to original collection
Details of additions/deletions below:
--------------------------------------------------------------
Modified: Data/Collection.php
-- Updated --
_moveToOriginalCollection added negation for array_key_exists
|
diff --git a/session.go b/session.go
index <HASH>..<HASH> 100644
--- a/session.go
+++ b/session.go
@@ -809,7 +809,9 @@ func (s *session) handleSinglePacket(p *receivedPacket, hdr *wire.Header) bool /
}
// drop 0-RTT packets, if we are a client
if s.perspective == protocol.PerspectiveClient && hdr.Type == protocol.PacketType0RTT {
- s.tracer.DroppedPacket(logging.PacketType0RTT, p.Size(), logging.PacketDropKeyUnavailable)
+ if s.tracer != nil {
+ s.tracer.DroppedPacket(logging.PacketType0RTT, p.Size(), logging.PacketDropKeyUnavailable)
+ }
return false
}
|
only trace dropped 0-RTT packets when a tracer is set
|
diff --git a/src/qinfer/abstract_model.py b/src/qinfer/abstract_model.py
index <HASH>..<HASH> 100644
--- a/src/qinfer/abstract_model.py
+++ b/src/qinfer/abstract_model.py
@@ -207,7 +207,7 @@ class Model(Simulatable):
probabilities = self.likelihood(np.arange(self.n_outcomes(expparams)), modelparams, expparams)
cdf = np.cumsum(probabilities,axis=0)
- randnum = np.random.random((1, repeat, 1))
+ randnum = np.random.random((1, modelparams.shape[0], repeat))
outcomes = np.argmax(cdf > randnum, axis=0)
return outcomes[0] if repeat==1 else outcomes
|
I lied last time... now it's fixed
|
diff --git a/src/components/seek_time/seek_time.js b/src/components/seek_time/seek_time.js
index <HASH>..<HASH> 100644
--- a/src/components/seek_time/seek_time.js
+++ b/src/components/seek_time/seek_time.js
@@ -32,15 +32,19 @@ export default class SeekTime extends UIObject {
}
addEventListeners() {
- this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR, (event) => {
- this.hoveringOverSeekBar = true
- this.calculateHoverPosition(event)
- this.update()
- })
- this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSELEAVE_SEEKBAR, (event) => {
- this.hoveringOverSeekBar = false
- this.update()
- })
+ this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR, this.showTime)
+ this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSELEAVE_SEEKBAR, this.hideTime)
+ }
+
+ showTime(event) {
+ this.hoveringOverSeekBar = true
+ this.calculateHoverPosition(event)
+ this.update()
+ }
+
+ hideTime() {
+ this.hoveringOverSeekBar = false
+ this.update()
}
calculateHoverPosition(event) {
|
seek time: move anonymous event listeners to object methods
|
diff --git a/test/regex-shorthand.js b/test/regex-shorthand.js
index <HASH>..<HASH> 100644
--- a/test/regex-shorthand.js
+++ b/test/regex-shorthand.js
@@ -32,7 +32,8 @@ ruleTester.run('regex-shorthand', rule, {
`const foo = new RegExp(/\\d/ig)`,
`const foo = new RegExp(/\\d/, 'ig')`,
`const foo = new RegExp(/\\d*?/)`,
- `const foo = new RegExp(/[a-z]/, 'i')`
+ `const foo = new RegExp(/[a-z]/, 'i')`,
+ `const foo = new RegExp(/^[^*]*[*]?$/)`
],
invalid: [
{
|
Add another test for `regex-shorthand` rule
|
diff --git a/ceph_deploy/mgr.py b/ceph_deploy/mgr.py
index <HASH>..<HASH> 100644
--- a/ceph_deploy/mgr.py
+++ b/ceph_deploy/mgr.py
@@ -32,7 +32,7 @@ def create_mgr(distro, name, cluster, init):
name=name
)
- conn.remote_module.safe_mkdir(path)
+ conn.remote_module.safe_makedirs(path)
bootstrap_keyring = '/var/lib/ceph/bootstrap-mgr/{cluster}.keyring'.format(
cluster=cluster
|
[RM-<I>] Use recursive dir creation
|
diff --git a/django_braintree/views.py b/django_braintree/views.py
index <HASH>..<HASH> 100644
--- a/django_braintree/views.py
+++ b/django_braintree/views.py
@@ -1,3 +1,5 @@
+import logging
+
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from django.contrib import messages
@@ -36,8 +38,11 @@ def payments_billing(request, template='django_braintree/payments_billing.html')
return JsonResponse(success=False, data={'form': form_errors_serialize(form)})
else:
if UserVault.objects.is_in_vault(request.user):
- response = Customer.find(UserVault.objects.get_user_vault_instance_or_none(request.user).vault_id)
- d['current_cc_info'] = response.credit_cards[0]
+ try:
+ response = Customer.find(UserVault.objects.get_user_vault_instance_or_none(request.user).vault_id)
+ d['current_cc_info'] = response.credit_cards[0]
+ except Exception, e:
+ logging.log('Unable to get vault information for user from braintree. %s' % e)
d['cc_form'] = UserCCDetailsForm(request.user)
return render(request, template, d)
|
try/except in the view also in case customer.get() throws exception
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -35,4 +35,5 @@ gulp.task('build', function() {
// Rerun the task when a file changes
gulp.task('watch', function () {
gulp.watch('test/ouibounce.styl', ['build']);
+ gulp.watch('source/ouibounce.js', ['build']);
});
|
Fix gulp script to watch src file change
|
diff --git a/lib/resque/worker.rb b/lib/resque/worker.rb
index <HASH>..<HASH> 100644
--- a/lib/resque/worker.rb
+++ b/lib/resque/worker.rb
@@ -81,7 +81,7 @@ module Resque
$0 = procline
log! procline
process(job, &block)
- @cant_fork ? next : exit!
+ exit! unless @cant_fork
end
@child = nil
|
only exit if we can't fork
|
diff --git a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/websocket/SpeechToTextWebSocketListener.java b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/websocket/SpeechToTextWebSocketListener.java
index <HASH>..<HASH> 100755
--- a/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/websocket/SpeechToTextWebSocketListener.java
+++ b/speech-to-text/src/main/java/com/ibm/watson/developer_cloud/speech_to_text/v1/websocket/SpeechToTextWebSocketListener.java
@@ -55,7 +55,7 @@ public final class SpeechToTextWebSocketListener extends WebSocketListener {
private static final String RESULTS = "results";
private static final String SPEAKER_LABELS = "speaker_labels";
private static final String CUSTOMIZATION_ID = "customization_id";
- private static final String LANGUAGE_CUSTOMIZATION_ID = "customization_id";
+ private static final String LANGUAGE_CUSTOMIZATION_ID = "language_customization_id";
private static final String ACOUSTIC_CUSTOMIZATION_ID = "acoustic_customization_id";
private static final String CUSTOMIZATION_WEIGHT = "customization_weight";
private static final String VERSION = "base_model_version";
|
fix(Speech to Text): Fix value of language customization ID property in WebSocket listener
|
diff --git a/spec/model_extensions_spec.rb b/spec/model_extensions_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/model_extensions_spec.rb
+++ b/spec/model_extensions_spec.rb
@@ -215,4 +215,10 @@ describe ActsAsTenant do
it { @sub_task = SubTask.create(:name => 'foo').valid?.should == true }
end
+ describe "It should be possible to create and save an AaT-enabled child without it having a parent" do
+ @account = Account.create!(:name => 'baz')
+ ActsAsTenant.current_tenant = @account
+ @task = Task.new(:name => 'bar')
+ lambda { @task.save }.should_not raise_exception
+ end
end
|
Added test for a orphan AAT-model
|
diff --git a/tests/I18n/bootstrap.php b/tests/I18n/bootstrap.php
index <HASH>..<HASH> 100644
--- a/tests/I18n/bootstrap.php
+++ b/tests/I18n/bootstrap.php
@@ -3,5 +3,6 @@
require __DIR__.'/kohana.php';
// Load some required classes
-require DOCROOT.'Testcase'.EXT;
-require DOCROOT.'Plural/Testcase'.EXT;
\ No newline at end of file
+require_once DOCROOT.'helpers'.EXT;
+require_once DOCROOT.'Testcase'.EXT;
+require_once DOCROOT.'Plural/Testcase'.EXT;
\ No newline at end of file
diff --git a/tests/I18n/kohana.php b/tests/I18n/kohana.php
index <HASH>..<HASH> 100644
--- a/tests/I18n/kohana.php
+++ b/tests/I18n/kohana.php
@@ -29,7 +29,4 @@ Kohana::$config->attach(new Kohana_Config_File);
Kohana::modules(array(
'plurals' => MODPATH.'plurals',
'unittest' => MODPATH.'unittest',
-));
-
-// Load some required classes
-require_once DOCROOT.'helpers'.EXT;
\ No newline at end of file
+));
\ No newline at end of file
|
Moved some 'requires' around
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -181,6 +181,10 @@ class mochaPlugin {
const inited = this.serverless.service;
myModule.config = (inited.custom || {})['serverless-mocha-plugin'] || {};
// Verify that the service runtime matches with the current runtime
+ let runtime = inited.provider.runtime;
+ // Fix the real version for node10
+ runtime = runtime.replace('\.x', '');
+
let nodeVersion;
if (typeof process.versions === 'object') {
nodeVersion = process.versions.node;
@@ -188,9 +192,9 @@ class mochaPlugin {
nodeVersion = process.versions;
}
nodeVersion = nodeVersion.replace(/\.[^.]*$/, '');
- if (`nodejs${nodeVersion}` !== inited.provider.runtime) {
+ if (! `nodejs${nodeVersion}`.startsWith(runtime)) {
let errorMsg = `Tests being run with nodejs${nodeVersion}, `;
- errorMsg = `${errorMsg} service is using ${inited.provider.runtime}.`;
+ errorMsg = `${errorMsg} service is using ${runtime}.`;
errorMsg = `${errorMsg} Tests may not be reliable.`;
this.serverless.cli.log(errorMsg);
|
Fix runtime detection for node<I>
|
diff --git a/image/internal/util.go b/image/internal/util.go
index <HASH>..<HASH> 100644
--- a/image/internal/util.go
+++ b/image/internal/util.go
@@ -2,6 +2,7 @@ package internal
import (
"image"
+ "image/color"
"image/draw"
"runtime"
"sync"
@@ -21,7 +22,7 @@ func NewDrawable(p image.Image) draw.Image {
// NewDrawableSize returns a new draw.Image with the same type as p and the given bounds.
// If p is not a draw.Image, another type is used.
func NewDrawableSize(p image.Image, r image.Rectangle) draw.Image {
- switch p.(type) {
+ switch p := p.(type) {
case *image.RGBA:
return image.NewRGBA(r)
case *image.RGBA64:
@@ -38,6 +39,10 @@ func NewDrawableSize(p image.Image, r image.Rectangle) draw.Image {
return image.NewGray(r)
case *image.Gray16:
return image.NewGray16(r)
+ case *image.Paletted:
+ pl := make(color.Palette, len(p.Palette))
+ copy(pl, p.Palette)
+ return image.NewPaletted(r, pl)
case *image.CMYK:
return image.NewCMYK(r)
default:
|
image/internal.NewDrawableSize(): add support for Paletted image
|
diff --git a/python/bigdl/dllib/optim/optimizer.py b/python/bigdl/dllib/optim/optimizer.py
index <HASH>..<HASH> 100644
--- a/python/bigdl/dllib/optim/optimizer.py
+++ b/python/bigdl/dllib/optim/optimizer.py
@@ -630,6 +630,13 @@ class BaseOptimizer(JavaValue):
print("Loading input ...")
self.value.prepareInput()
+ def set_end_when(self, end_when):
+ """
+ When to stop, passed in a [[Trigger]]
+ """
+ self.value.setEndWhen(end_when.value)
+ return self
+
class Optimizer(BaseOptimizer):
|
Fix optimizer state messed up when calling optimize() multiple times in DistriOptimizer (#<I>)
* support continue training
* meet code review
* add unit tests
* fix set model
|
diff --git a/test/Role/ReadModel/Constraints/Doctrine/UserConstraintWriteRepositoryTest.php b/test/Role/ReadModel/Constraints/Doctrine/UserConstraintWriteRepositoryTest.php
index <HASH>..<HASH> 100644
--- a/test/Role/ReadModel/Constraints/Doctrine/UserConstraintWriteRepositoryTest.php
+++ b/test/Role/ReadModel/Constraints/Doctrine/UserConstraintWriteRepositoryTest.php
@@ -23,7 +23,7 @@ class UserConstraintWriteRepositoryTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->roleConstraintTableName = new StringLiteral('role_constraints');
+ $this->roleConstraintTableName = new StringLiteral('role_constraint');
$schemaConfigurator = new SchemaConfigurator($this->roleConstraintTableName);
$schemaConfigurator->configure($this->getConnection()->getSchemaManager());
|
III-<I> Consistent naming for role constraint table.
|
diff --git a/src/Properties/ModelPropertyExtension.php b/src/Properties/ModelPropertyExtension.php
index <HASH>..<HASH> 100644
--- a/src/Properties/ModelPropertyExtension.php
+++ b/src/Properties/ModelPropertyExtension.php
@@ -195,15 +195,16 @@ final class ModelPropertyExtension implements PropertiesClassReflectionExtension
$readableType = $writableType = $column->readableType.($column->nullable ? '|null' : '');
break;
+ case 'boolean':
case 'bool':
switch ((string) config('database.default')) {
case 'sqlite':
case 'mysql':
- $writableType = '0|1|bool';
+ $writableType = '0|1|boolean';
$readableType = '0|1';
break;
default:
- $readableType = $writableType = 'bool';
+ $readableType = $writableType = 'boolean';
break;
}
break;
|
Fix incorrect boolean type cast
|
diff --git a/autopep8.py b/autopep8.py
index <HASH>..<HASH> 100644
--- a/autopep8.py
+++ b/autopep8.py
@@ -245,10 +245,15 @@ class FixPEP8(object):
def fix_e303(self, result):
delete_linenum = int(result['info'].split("(")[1].split(")")[0]) - 2
delete_linenum = max(1, delete_linenum)
- for cnt in range(delete_linenum):
- line = result['line'] - 2 - cnt
+ cnt = 0
+ line = result['line'] - 2
+ while cnt < delete_linenum:
+ if line < 0:
+ break
if not self.source[line].strip():
self.source[line] = ''
+ cnt += 1
+ line -= 1
def fix_e401(self, result):
line_index = result['line'] - 1
diff --git a/test_target.py b/test_target.py
index <HASH>..<HASH> 100644
--- a/test_target.py
+++ b/test_target.py
@@ -58,7 +58,7 @@ def func11():
-
+# comment after too empty lines
def func2():
pass
def func22():
|
Get fix_e<I>() working with comments
|
diff --git a/salt/utils/mine.py b/salt/utils/mine.py
index <HASH>..<HASH> 100644
--- a/salt/utils/mine.py
+++ b/salt/utils/mine.py
@@ -42,7 +42,13 @@ def minion_side_acl_denied(
True if an ACL has been defined and does not grant access.
'''
minion_acl_entry = minion_acl_cache.get(mine_minion, {}).get(mine_function, [])
- return minion_acl_entry and req_minion not in minion_acl_entry
+ ret = minion_acl_entry and req_minion not in minion_acl_entry
+ if ret:
+ log.debug('Salt mine request from %s for function %s on minion %s denied.',
+ req_minion,
+ mine_function,
+ mine_minion)
+ return ret
def wrap_acl_structure(
|
Added logging of denied mine requests.
|
diff --git a/indra/sources/medscan/processor.py b/indra/sources/medscan/processor.py
index <HASH>..<HASH> 100644
--- a/indra/sources/medscan/processor.py
+++ b/indra/sources/medscan/processor.py
@@ -512,6 +512,10 @@ class MedscanProcessor(object):
self._pmids_handled.add(pmid_num)
self._sentences_handled = set()
+ # Solution for memory leak found here:
+ # https://stackoverflow.com/questions/12160418/why-is-lxml-etree-iterparse-eating-up-all-my-memory?lq=1
+ elem.clear()
+
self.files_processed += 1
self.__f.close()
return
|
Fix "memory leak" from the lxml iterator.
|
diff --git a/salt/utils/__init__.py b/salt/utils/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/utils/__init__.py
+++ b/salt/utils/__init__.py
@@ -1532,7 +1532,20 @@ def is_windows():
'''
Simple function to return if a host is Windows or not
'''
- return sys.platform.startswith('win')
+ import __main__ as main
+ # This is a hack. If a proxy minion is started by other
+ # means, e.g. a custom script that creates the minion objects
+ # then this will fail.
+ is_proxy = False
+ try:
+ if 'salt-proxy' in main.__file__:
+ is_proxy = True
+ except AttributeError:
+ pass
+ if is_proxy:
+ return False
+ else:
+ return sys.platform.startswith('win')
def sanitize_win_path_string(winpath):
@@ -1553,12 +1566,12 @@ def sanitize_win_path_string(winpath):
def is_proxy():
'''
Return True if this minion is a proxy minion.
- Leverages the fact that is_linux() returns False
- for proxies.
+ Leverages the fact that is_linux() and is_windows
+ both return False for proxies.
TODO: Need to extend this for proxies that might run on
- other Unices or Windows.
+ other Unices
'''
- return not is_linux()
+ return not (is_linux() or is_windows())
@real_memoize
|
Don't report proxy on windows.
|
diff --git a/doc/conf.py b/doc/conf.py
index <HASH>..<HASH> 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -117,7 +117,7 @@ copyright = '2013 SaltStack, Inc.'
version = salt.version.__version__
#release = '.'.join(map(str, salt.version.__version_info__))
-release = '2014.1.0'
+release = '0.17.5'
language = 'en'
locale_dirs = [
|
Wait until actual announced release to change doc version
|
diff --git a/src/Repository/Repository.php b/src/Repository/Repository.php
index <HASH>..<HASH> 100644
--- a/src/Repository/Repository.php
+++ b/src/Repository/Repository.php
@@ -382,13 +382,17 @@ abstract class Repository implements IRepository
$ids = [];
$entities = $this->identityMap->getAll();
foreach ($entities as $entity) {
- if (!$allowOverwrite && $entity->isModified()) {
+ if (!$entity->isPersisted()) {
+ continue;
+ } elseif (!$allowOverwrite && $entity->isModified()) {
throw new InvalidStateException('Cannot refresh modified entity, flush changes first or set $allowOverwrite flag to true.');
}
$this->identityMap->markForRefresh($entity);
$ids[] = $entity->getPersistedId();
}
- $this->findById($ids)->fetchAll();
+ if (count($ids)) {
+ $this->findById($ids)->fetchAll();
+ }
foreach ($entities as $entity) {
if (!$this->identityMap->isMarkedForRefresh($entity)) {
continue;
|
repository: do not refresh unpersisted entities, do not query without ids [closes #<I>]
|
diff --git a/web/api/v1/api.go b/web/api/v1/api.go
index <HASH>..<HASH> 100644
--- a/web/api/v1/api.go
+++ b/web/api/v1/api.go
@@ -166,6 +166,7 @@ func NewAPI(
enableAdmin: enableAdmin,
rulesRetriever: rr,
remoteReadLimit: remoteReadLimit,
+ logger: logger,
}
}
|
Logger is nil for API. Fixes #<I> (#<I>)
|
diff --git a/test/integration.js b/test/integration.js
index <HASH>..<HASH> 100644
--- a/test/integration.js
+++ b/test/integration.js
@@ -294,6 +294,9 @@ test('deploy a node microservice', async t => {
}));
t.is(code, 0, formatOutput({ stdout, stderr }));
+ // Give 2 seconds for the proxy purge to propagate
+ await sleep(2000);
+
response = await fetch(href);
t.is(response.status, 404);
});
|
Sleep 2 seconds after the `now rm` integration test (#<I>)
Sometimes it fails with a stale <I> status code.
This should make it less flaky.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.