diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/Providers/FortServiceProvider.php b/src/Providers/FortServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/Providers/FortServiceProvider.php +++ b/src/Providers/FortServiceProvider.php @@ -121,6 +121,7 @@ class FortServiceProvider extends ServiceProvider $this->app->booted(function () use ($router) { $router->getRoutes()->refreshNameLookups(); + $router->getRoutes()->refreshActionLookups(); }); } }
refreshActionLookups after routes registration
diff --git a/lib/devise_invitable/model.rb b/lib/devise_invitable/model.rb index <HASH>..<HASH> 100644 --- a/lib/devise_invitable/model.rb +++ b/lib/devise_invitable/model.rb @@ -254,7 +254,7 @@ module Devise invitable = find_or_initialize_with_errors(invite_key_array, attributes_hash) invitable.assign_attributes(attributes) invitable.invited_by = invited_by - unless invitable.password || invitable.encrypted_password + unless invitable.password || invitable.encrypted_password.present? invitable.password = Devise.friendly_token[0, 20] end
fix previous commit for #<I>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,14 +7,14 @@ from distutils.core import setup setup( name = 'febio', - version = '0.1', + version = '0.1.1', packages = ['febio',], py_modules = ['febio.__init__','febio.MatDef','febio.MeshDef','febio.Boundary','febio.Control','febio.Load','febio.Model'], author = 'Scott Sibole', author_email = 'ssibole@kin.ucalgary.ca', license = 'MIT', package_data = {'febio': ['verification/*'],}, - url = 'https:/github.com/siboles/pyFEBio', - download_url = 'https://github.com/siboles/pyFEBio/tarball/0.1', + url = 'https://github.com/siboles/pyFEBio', + download_url = 'https://github.com/siboles/pyFEBio/tarball/0.1.1', description = 'A Python API for FEBio', )
Updated version to correct URL to homepage.
diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -122,7 +122,7 @@ module Jekyll base = File.join(self.source, self.config['layouts']) return unless File.exists?(base) entries = [] - Dir.chdir(base) { entries = filter_entries(Dir['*.*']) } + Dir.chdir(base) { entries = filter_entries(Dir['**/*.*']) } entries.each do |f| name = f.split(".")[0..-2].join(".")
Add support for use of folders inside _layout path, closes #<I>
diff --git a/tests/library/CM/Model/SplitfeatureTest.php b/tests/library/CM/Model/SplitfeatureTest.php index <HASH>..<HASH> 100644 --- a/tests/library/CM/Model/SplitfeatureTest.php +++ b/tests/library/CM/Model/SplitfeatureTest.php @@ -133,6 +133,15 @@ class CM_Model_SplitfeatureTest extends CMTest_TestCase { $this->assertEquals($splitfeature, CM_Model_Splitfeature::find('foo')); } + public function testFindChildClass() { + CM_Model_Splitfeature::createStatic(array('name' => 'bar', 'percentage' => 0)); + $mockClass = $this->mockClass('CM_Model_Splitfeature'); + /** @var CM_Model_Splitfeature $className */ + $className = $mockClass->getClassName(); + + $this->assertInstanceOf($className, $className::find('bar')); + } + /** * @param CM_Model_User[] $userList * @param CM_Model_Splitfeature $splitfeature
Add test for CM_Model_Splitfeature::find() when it should create child instance
diff --git a/gifi/feature.py b/gifi/feature.py index <HASH>..<HASH> 100644 --- a/gifi/feature.py +++ b/gifi/feature.py @@ -117,16 +117,17 @@ def _get_pull_requests(repo): def _discard(repo=None): repo = get_repo(repo) config = configuration(repo) - current_branch = _current_feature_branch(repo) + _fetch(repo, config) + feature_branch = _current_feature_branch(repo) repo.git.checkout(config.target_branch) repo.git.rebase('%s/%s' % (config.target_remote, config.target_branch)) try: repo.git.commit('--amend', '-C', 'HEAD') - repo.git.push(config.working_remote, ':%s' % current_branch) + repo.git.push(config.working_remote, ':%s' % feature_branch) except GitCommandError as e: logging.warn('Unable to drop remote feature branch: %s' % e) print 'WARNING: Unable to remove remote feature branch. Maybe it was not yet created?' - repo.git.branch('-D', current_branch) + repo.git.branch('-D', feature_branch) def configuration(repo=None):
Fetch repository before rebase'ing master after feature is discarded
diff --git a/src/_pytest/cacheprovider.py b/src/_pytest/cacheprovider.py index <HASH>..<HASH> 100755 --- a/src/_pytest/cacheprovider.py +++ b/src/_pytest/cacheprovider.py @@ -319,7 +319,8 @@ def cache(request): def pytest_report_header(config): - if config.option.verbose: + """Display cachedir with --cache-show and if non-default.""" + if config.option.verbose or config.getini("cache_dir") != ".pytest_cache": cachedir = config.cache._cachedir # TODO: evaluate generating upward relative paths # starting with .., ../.. if sensible
cacheprovider: display cachedir also in non-verbose mode if customized
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java b/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java +++ b/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java @@ -1771,13 +1771,6 @@ public class DrawerBuilder { } /** - * resets the DrawerBuilder's internal `mUsed` variable to false so the `DrawerBuilder` can be reused - */ - public void reset() { - this.mUsed = false; - } - - /** * helper method to close the drawer delayed */ protected void closeDrawerDelayed() {
* remove reset method as it is not possible
diff --git a/src/API/Implementation/TTS/IbmWatson/AudioFormat/IbmWatsonAudioFormatsTrait.php b/src/API/Implementation/TTS/IbmWatson/AudioFormat/IbmWatsonAudioFormatsTrait.php index <HASH>..<HASH> 100644 --- a/src/API/Implementation/TTS/IbmWatson/AudioFormat/IbmWatsonAudioFormatsTrait.php +++ b/src/API/Implementation/TTS/IbmWatson/AudioFormat/IbmWatsonAudioFormatsTrait.php @@ -14,7 +14,7 @@ use GinoPane\PHPolyglot\Exception\InvalidAudioFormatCodeException; */ trait IbmWatsonAudioFormatsTrait { - private $formatMapping = [ + private static $formatMapping = [ TtsAudioFormat::AUDIO_BASIC => 'audio/basic', TtsAudioFormat::AUDIO_FLAC => 'audio/flac', TtsAudioFormat::AUDIO_L16 => 'audio/l16', @@ -36,7 +36,7 @@ trait IbmWatsonAudioFormatsTrait */ public function getAcceptParameter(TtsAudioFormat $format, array $additionalData = []): string { - $accept = $formatMapping[$format] ?? ''; + $accept = self::$formatMapping[$format->getFormat()] ?? ''; if (empty($accept)) { throw new InvalidAudioFormatCodeException($format->getFormat());
Updates: - fixed undefined local variable.
diff --git a/commands/command.go b/commands/command.go index <HASH>..<HASH> 100644 --- a/commands/command.go +++ b/commands/command.go @@ -40,12 +40,6 @@ type HelpText struct { Subcommands string // overrides SUBCOMMANDS section } -// TODO: check Argument definitions when creating a Command -// (might need to use a Command constructor) -// * make sure any variadic args are at the end -// * make sure there aren't duplicate names -// * make sure optional arguments aren't followed by required arguments - // Command is a runnable command, with input arguments and options (flags). // It can also have Subcommands, to group units of work into sets. type Command struct {
commands: Removed old TODOs
diff --git a/bat/dataframe_to_parquet.py b/bat/dataframe_to_parquet.py index <HASH>..<HASH> 100644 --- a/bat/dataframe_to_parquet.py +++ b/bat/dataframe_to_parquet.py @@ -20,7 +20,7 @@ def df_to_parquet(df, filename, compression='SNAPPY'): arrow_table = pa.Table.from_pandas(df) if compression == 'UNCOMPRESSED': compression = None - pq.write_table(arrow_table, filename, use_dictionary=False, compression=compression) + pq.write_table(arrow_table, filename, compression=compression, use_deprecated_int96_timestamps=True) def parquet_to_df(filename, nthreads=1):
use the int<I> timestamps for now
diff --git a/system/src/Grav/Console/Gpm/UninstallCommand.php b/system/src/Grav/Console/Gpm/UninstallCommand.php index <HASH>..<HASH> 100644 --- a/system/src/Grav/Console/Gpm/UninstallCommand.php +++ b/system/src/Grav/Console/Gpm/UninstallCommand.php @@ -117,7 +117,7 @@ class UninstallCommand extends Command $this->output->writeln(''); } else { $this->output->write(" |- Uninstalling package... "); - $uninstall = $this->uninstallPackage($package); + $uninstall = $this->uninstallPackage($slug, $package); if (!$uninstall) { $this->output->writeln(" '- <red>Uninstallation failed or aborted.</red>"); @@ -135,12 +135,16 @@ class UninstallCommand extends Command /** + * @param $slug * @param $package + * * @return bool */ - private function uninstallPackage($package) + private function uninstallPackage($slug, $package) { - $path = self::getGrav()['locator']->findResource($package->package_type . '://' . $package->slug); + $locator = self::getGrav()['locator']; + + $path = self::getGrav()['locator']->findResource($package->package_type . '://' .$slug); Installer::uninstall($path); $errorCode = Installer::lastErrorCode();
fix #<I> - incorrect slug name causing issues
diff --git a/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/suites/AuditLogTestCase.java b/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/suites/AuditLogTestCase.java index <HASH>..<HASH> 100644 --- a/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/suites/AuditLogTestCase.java +++ b/testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/suites/AuditLogTestCase.java @@ -367,6 +367,7 @@ public class AuditLogTestCase { final PathAddress serverAddress = PathAddress.pathAddress(baseAddress.getElement(0)).append(SERVER_CONFIG, servers.get(0)); final ModelNode restartOp = Util.createEmptyOperation("reload", serverAddress); restartOp.get(BLOCKING).set(true); + masterLifecycleUtil.executeForResult(restartOp); expectNoSyslogData(); //Now enable the server logger again
Execute the server reload op that the test creates
diff --git a/spec/index.spec.js b/spec/index.spec.js index <HASH>..<HASH> 100644 --- a/spec/index.spec.js +++ b/spec/index.spec.js @@ -190,7 +190,7 @@ describe('phonegap-plugin-contentsync', function() { jasmine.any(Function), 'Sync', 'cancel', - [] + [ options.id ] ]); done(); }, 100); diff --git a/www/index.js b/www/index.js index <HASH>..<HASH> 100644 --- a/www/index.js +++ b/www/index.js @@ -58,9 +58,8 @@ var ContentSync = function(options) { options.headers = null; } - if (typeof options.id === 'undefined') { - options.id = null; - } + // store the options to this object instance + this.options = options; // triggered on update and completion var that = this; @@ -97,7 +96,7 @@ ContentSync.prototype.cancel = function() { that.emit('cancel'); }; setTimeout(function() { - exec(onCancel, onCancel, 'Sync', 'cancel', []); + exec(onCancel, onCancel, 'Sync', 'cancel', [ that.options.id ]); }, 10); };
[www] Pass id to cancel operation.
diff --git a/src/runners/cucumber/CucumberReporter.js b/src/runners/cucumber/CucumberReporter.js index <HASH>..<HASH> 100644 --- a/src/runners/cucumber/CucumberReporter.js +++ b/src/runners/cucumber/CucumberReporter.js @@ -154,6 +154,8 @@ export default class CucumberReporter { caseResult.endTime = oxutil.getTimeStamp(); caseResult.duration = caseResult.endTime - caseResult.startTime; caseResult.status = this.determineCaseStatus(caseResult); + caseResult.logs = this.oxygenEventListener.resultStore && this.oxygenEventListener.resultStore.logs ? this.oxygenEventListener.resultStore.logs : []; + caseResult.har = this.oxygenEventListener.resultStore && this.oxygenEventListener.resultStore.har ? this.oxygenEventListener.resultStore.har : null; // call oxygen onAfterCase if defined if (typeof this.oxygenEventListener.onAfterCase === 'function') {
cucumber add logs collecting support (#<I>)
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -331,7 +331,7 @@ module.exports = function (connect) { clear(callback) { return withCallback(this.collectionReady() - .then(collection => collection.drop()) + .then(collection => collection.drop(this.writeOperationOptions)) , callback) }
Add writeOperationOptions support to collection.drop() call (supported as of MongoDB <I>)
diff --git a/lib/octopress-deploy/git.rb b/lib/octopress-deploy/git.rb index <HASH>..<HASH> 100644 --- a/lib/octopress-deploy/git.rb +++ b/lib/octopress-deploy/git.rb @@ -50,7 +50,7 @@ git_url: #{options[:git_url]} # Branch defaults to master. # If using GitHub project pages, set the branch to 'gh-pages'. # -# git_branch: #{options[:git_branch] || 'master'} +git_branch: #{options[:git_branch] || 'master'} CONFIG end
Removed git branch comment. It was not necessary; broke tests.
diff --git a/tests/test_commands.py b/tests/test_commands.py index <HASH>..<HASH> 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -72,6 +72,17 @@ def test_commit_retry_works(mocker): assert not os.path.isfile(temp_file) +def test_commit_when_nothing_to_commit(mocker): + is_staging_clean_mock = mocker.patch("commitizen.git.is_staging_clean") + is_staging_clean_mock.return_value = True + + with pytest.raises(SystemExit) as err: + commit_cmd = commands.Commit(config, {}) + commit_cmd() + + assert err.value.code == commands.commit.NOTHING_TO_COMMIT + + def test_example(): with mock.patch("commitizen.out.write") as write_mock: commands.Example(config)()
test(commands/commit): test aborting commit when there is nothing to commit #<I>
diff --git a/src/test/java/com/messners/gitlab/api/TestGitLabApiEvents.java b/src/test/java/com/messners/gitlab/api/TestGitLabApiEvents.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/messners/gitlab/api/TestGitLabApiEvents.java +++ b/src/test/java/com/messners/gitlab/api/TestGitLabApiEvents.java @@ -11,8 +11,8 @@ import org.codehaus.jackson.map.ObjectMapper; import org.junit.BeforeClass; import org.junit.Test; -import com.messners.gitlab.api.event.EventObject; -import com.messners.gitlab.api.event.PushEvent; +import com.messners.gitlab.api.webhook.EventObject; +import com.messners.gitlab.api.webhook.PushEvent; public class TestGitLabApiEvents {
Mods for renamed classes.
diff --git a/src/main/java/hex/DGLM.java b/src/main/java/hex/DGLM.java index <HASH>..<HASH> 100644 --- a/src/main/java/hex/DGLM.java +++ b/src/main/java/hex/DGLM.java @@ -1214,7 +1214,7 @@ public abstract class DGLM { } else { int d = (int) data[i]; // Enum value d can be -1 if we got enum values not seen in training if(d == 0) continue; // level 0 of factor is skipped (coef==0). - if( d > 0 && (idx += d) < _colCatMap[i + 1] ) p += _beta[idx]/* *1.0 */; + if( d > 0 && (idx += d) <= _colCatMap[i + 1] ) p += _beta[idx-1]/* *1.0 */; else // Enum out of range? p = Double.NaN;// Can use a zero, or a NaN }
Bugfix in glm scoring.
diff --git a/src/Adapter/MapperInterface.php b/src/Adapter/MapperInterface.php index <HASH>..<HASH> 100644 --- a/src/Adapter/MapperInterface.php +++ b/src/Adapter/MapperInterface.php @@ -33,5 +33,5 @@ interface MapperInterface * * @return void */ - public function map(array $input, MetadataInterface $output); + public function map(array $input, MetadataInterface &$output); }
Bugfix: Mapper should use by-reference
diff --git a/ext/extconf.rb b/ext/extconf.rb index <HASH>..<HASH> 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -48,7 +48,8 @@ def check_libmemcached Dir.chdir(HERE) do Dir.chdir(BUNDLE_PATH) do - run("find . | xargs touch", "Touching all files so autoconf doesn't run.") + ts_now=Time.now.strftime("%Y%m%d%H%M.%S") + run("find . | xargs touch -t #{ts_now}", "Touching all files so autoconf doesn't run.") run("env CFLAGS='-fPIC #{LIBM_CFLAGS}' LDFLAGS='-fPIC #{LIBM_LDFLAGS}' ./configure --prefix=#{HERE} --without-memcached --disable-shared --disable-utils --disable-dependency-tracking #{$CC} #{$EXTRA_CONF} 2>&1", "Configuring libmemcached.") end
Determine timestamp to use one time, and then update all files with that timestamp in order to avoid a possible race condition which could cause autoconf to run
diff --git a/core/src/elements/ons-ripple/index.js b/core/src/elements/ons-ripple/index.js index <HASH>..<HASH> 100644 --- a/core/src/elements/ons-ripple/index.js +++ b/core/src/elements/ons-ripple/index.js @@ -51,10 +51,18 @@ class RippleElement extends BaseElement { */ /** - * @attribute center + * @attribute color + * @type {String} + * @description + * [en]Color of the ripple effect.[/en] + * [ja]リップルエフェクトの色を指定します。[/ja] + */ + + /** + * @attribute background * @description - * [en]If this attribute is set, the effect will originate from the center.[/en] - * [ja]この属性が設定された場合、その効果は要素の中央から始まります。[/ja] + * [en]Color of the background.[/en] + * [ja]背景の色を設定します。[/ja] */ /**
docs(ons-ripple): Add docs for "background" attribute.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -32,6 +32,7 @@ if __name__ == "__main__": author_email="adam.schubert@sg1-game.net", url="https://github.com/Salamek/cron-descriptor", long_description=long_description, + long_description_content_type='text/markdown', packages=setuptools.find_packages(), package_data={ 'cron_descriptor': [
Tell PyPI the long_description is markdown As per [packaging tutorial](<URL>) (see bottom). This should render it as markdown on <URL>
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,10 @@ dev_requires = docs_requires + [ from pathlib import Path this_directory = Path(__file__).parent -long_description = (this_directory / "README.md").read_text() +readme_text = (this_directory / "README.md").read_text() +parts = readme_text.partition("A library for event sourcing in Python.") +long_description = "".join(parts[1:]) + packages = [ "eventsourcing", @@ -58,6 +61,7 @@ setup( }, zip_safe=False, long_description=long_description, + long_description_content_type="text/markdown", keywords=[ "event sourcing", "event store",
Trimmed README text for package (to avoid including links to buttons and project image).
diff --git a/algoliasearch/algoliasearch.py b/algoliasearch/algoliasearch.py index <HASH>..<HASH> 100644 --- a/algoliasearch/algoliasearch.py +++ b/algoliasearch/algoliasearch.py @@ -195,7 +195,7 @@ class Client: params['indexes'] = indexes return AlgoliaUtils_request(self.headers, self.hosts, "POST", "/1/keys", params) - def generate_secured_api_key(self, private_api_key, tag_filters, user_token = None): + def generateSecuredApiKey(self, private_api_key, tag_filters, user_token = None): """ Generate a secured and public API Key from a list of tagFilters and an optional user token identifying the current user
Keep using camelCase
diff --git a/src/saml2/sigver.py b/src/saml2/sigver.py index <HASH>..<HASH> 100644 --- a/src/saml2/sigver.py +++ b/src/saml2/sigver.py @@ -27,7 +27,13 @@ import base64 import random import os -XMLSEC_BINARY = "/opt/local/bin/xmlsec1" +def get_xmlsec_binary(): + for path in ('/opt/local/bin/xmlsec1', + '/usr/bin/xmlsec1'): + if os.path.exists(path): + return path + +XMLSEC_BINARY = get_xmlsec_binary() ID_ATTR = "ID" NODE_NAME = "urn:oasis:names:tc:SAML:2.0:assertion:Assertion" ENC_NODE_NAME = "urn:oasis:names:tc:SAML:2.0:assertion:EncryptedAssertion"
Added a function that attempts to find the xmlsec1 binaries, made by Lorenzo Gil Sanchez
diff --git a/tests/testnumbergen.py b/tests/testnumbergen.py index <HASH>..<HASH> 100644 --- a/tests/testnumbergen.py +++ b/tests/testnumbergen.py @@ -18,7 +18,7 @@ class TestUniformRandom(unittest.TestCase): seed=_seed, lbound=lbound, ubound=ubound) - for _ in xrange(_iterations): + for _ in range(_iterations): value = gen() self.assertTrue(lbound <= value < ubound) @@ -30,7 +30,7 @@ class TestUniformRandomOffset(unittest.TestCase): seed=_seed, mean=(ubound + lbound) / 2, range=ubound - lbound) - for _ in xrange(_iterations): + for _ in range(_iterations): value = gen() self.assertTrue(lbound <= value < ubound)
Fixed numbergen unit tests for Python 3 compatibility
diff --git a/lib/server/index.js b/lib/server/index.js index <HASH>..<HASH> 100644 --- a/lib/server/index.js +++ b/lib/server/index.js @@ -47,11 +47,11 @@ module.exports = { return callback(error); } - var html = data.toString().replace('</head>', - '<script type="text/javascript" src="/socket.io/socket.io.js"></script>\n' + - '<script type="text/javascript" src="/' + var html = data.toString().replace('</body>', + ' <script type="text/javascript" src="/socket.io/socket.io.js"></script>\n' + + ' <script type="text/javascript" src="/' + config.adapterPath + '/' + config.adapters + '"></script>\n' + - '</head>\n'); + ' </body>\n'); callback(null, html); }); });
Issue #<I> Testee client script injection needs to move to the page body
diff --git a/easymode/admin/forms/fields.py b/easymode/admin/forms/fields.py index <HASH>..<HASH> 100644 --- a/easymode/admin/forms/fields.py +++ b/easymode/admin/forms/fields.py @@ -37,6 +37,7 @@ class HtmlEntityField(fields.CharField): entityless_value = re.sub(r'&[^;]+;', 'X', tagless_value) else: entityless_value = value + value = u'' # validate using super class super(HtmlEntityField, self).clean(entityless_value)
Any HTMLField in easymode will now properly clean None as u''.
diff --git a/src/Type/FileTypeMapper.php b/src/Type/FileTypeMapper.php index <HASH>..<HASH> 100644 --- a/src/Type/FileTypeMapper.php +++ b/src/Type/FileTypeMapper.php @@ -31,7 +31,7 @@ class FileTypeMapper public function getTypeMap(string $fileName): array { - $cacheKey = sprintf('%s-%d-v3', $fileName, filemtime($fileName)); + $cacheKey = sprintf('%s-%d-v4', $fileName, filemtime($fileName)); $cachedResult = $this->cache->load($cacheKey); if ($cachedResult === null) { $typeMap = $this->createTypeMap($fileName);
FileTypeMapper - bump cache version because of change in StaticType and bugfixes
diff --git a/src/foremast/pipeline/construct_pipeline_block_lambda.py b/src/foremast/pipeline/construct_pipeline_block_lambda.py index <HASH>..<HASH> 100644 --- a/src/foremast/pipeline/construct_pipeline_block_lambda.py +++ b/src/foremast/pipeline/construct_pipeline_block_lambda.py @@ -64,7 +64,7 @@ def construct_pipeline_block_lambda(env='', user_data = generate_encoded_user_data(env=env, region=region, app_name=gen_app_name, group_name=generated.project) # Use different variable to keep template simple - instance_security_groups = DEFAULT_EC2_SECURITYGROUPS[env] + instance_security_groups = sorted(DEFAULT_EC2_SECURITYGROUPS[env]) instance_security_groups.append(gen_app_name) instance_security_groups.extend(settings['security_group']['instance_extras'])
added sorted to make a copy of the list so global variable is not mutated
diff --git a/src/bbn/User.php b/src/bbn/User.php index <HASH>..<HASH> 100644 --- a/src/bbn/User.php +++ b/src/bbn/User.php @@ -273,6 +273,7 @@ class User extends Models\Cls\Basic $this->_init_class_cfg($cfg); $f =& $this->class_cfg['fields']; + self::retrieverInit($this); if ($this->isToken() && !empty($params[$f['token']])) { @@ -370,7 +371,6 @@ class User extends Models\Cls\Basic // Creating the session's variables if they don't exist yet $this->_init_session(); - self::retrieverInit($this); /* if (x::isCli() && isset($params['id'])) {
Fix in User, moved retrieverInit
diff --git a/tests/ObservableBunnyTest.php b/tests/ObservableBunnyTest.php index <HASH>..<HASH> 100644 --- a/tests/ObservableBunnyTest.php +++ b/tests/ObservableBunnyTest.php @@ -55,9 +55,10 @@ final class ObservableBunnyTest extends TestCase $messageDto = null; $subject->subscribe(function (Message $message) use (&$messageDto, $subject) { $messageDto = $message; - $subject->dispose(); }); + $loop->addTimer(2, [$subject, 'dispose']); + $loop->run(); self::assertSame($message, $messageDto->getMessage());
Dispose after the first message has been shipped
diff --git a/master/contrib/git_buildbot.py b/master/contrib/git_buildbot.py index <HASH>..<HASH> 100755 --- a/master/contrib/git_buildbot.py +++ b/master/contrib/git_buildbot.py @@ -40,17 +40,17 @@ from optparse import OptionParser master = "localhost:9989" -# When sending the notification, send this category if +# When sending the notification, send this category if (and only if) # it's set (via --category) category = None -# When sending the notification, send this repository if +# When sending the notification, send this repository if (and only if) # it's set (via --repository) repository = None -# When sending the notification, send this project if +# When sending the notification, send this project if (and only if) # it's set (via --project) project = None
replace iff with if (and only if) for non-math speakers ;)
diff --git a/validator/testcases/l10ncompleteness.py b/validator/testcases/l10ncompleteness.py index <HASH>..<HASH> 100644 --- a/validator/testcases/l10ncompleteness.py +++ b/validator/testcases/l10ncompleteness.py @@ -1,6 +1,6 @@ import sys import os -import chardet +import fastchardet import json import fnmatch from StringIO import StringIO @@ -336,7 +336,7 @@ def _parse_l10n_doc(name, doc, no_encoding=False): # Allow the parse to specify files to skip for encoding checks if not no_encoding: - encoding = chardet.detect(doc) + encoding = fastchardet.detect(doc) encoding["encoding"] = encoding["encoding"].upper() loc_doc.expected_encoding = encoding["encoding"] in handler_formats loc_doc.found_encoding = encoding["encoding"]
Added initial support for fastchardet
diff --git a/src/Illuminate/Http/Resources/Json/JsonResource.php b/src/Illuminate/Http/Resources/Json/JsonResource.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Http/Resources/Json/JsonResource.php +++ b/src/Illuminate/Http/Resources/Json/JsonResource.php @@ -60,7 +60,7 @@ class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRou /** * Create a new resource instance. * - * @param dynamic $parameters + * @param mixed $parameters * @return static */ public static function make(...$parameters)
Update DocBlock for PHP Analyses (#<I>)
diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb index <HASH>..<HASH> 100644 --- a/activesupport/lib/active_support/testing/assertions.rb +++ b/activesupport/lib/active_support/testing/assertions.rb @@ -167,7 +167,7 @@ module ActiveSupport retval end - # Assertion that the result of evaluating an expression is changed before + # Assertion that the result of evaluating an expression is not changed before # and after invoking the passed in block. # # assert_no_changes 'Status.all_good?' do
Add missing "not" in the doc for `assert_no_changes` [ci skip]
diff --git a/salt/config/__init__.py b/salt/config/__init__.py index <HASH>..<HASH> 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -73,6 +73,10 @@ if salt.utils.platform.is_windows(): _MASTER_USER = "SYSTEM" elif salt.utils.platform.is_proxy(): _DFLT_FQDNS_GRAINS = False + _DFLT_IPC_MODE = "ipc" + _DFLT_FQDNS_GRAINS = True + _MASTER_TRIES = 1 + _MASTER_USER = salt.utils.user.get_user() else: _DFLT_IPC_MODE = "ipc" _DFLT_FQDNS_GRAINS = True
Need additional default opions for proxy minions.
diff --git a/cli_helpers/tabular_output/output_formatter.py b/cli_helpers/tabular_output/output_formatter.py index <HASH>..<HASH> 100644 --- a/cli_helpers/tabular_output/output_formatter.py +++ b/cli_helpers/tabular_output/output_formatter.py @@ -2,6 +2,7 @@ """A generic tabular data output formatter interface.""" from __future__ import unicode_literals +from six import text_type from collections import namedtuple from cli_helpers.compat import (text_type, binary_type, int_types, float_types, @@ -102,7 +103,7 @@ class TabularOutputFormatter(object): @property def supported_formats(self): """The names of the supported output formats in a :class:`tuple`.""" - return tuple(self._output_formats.keys()) + return tuple(map(text_type, self._output_formats.keys())) @classmethod def register_new_formatter(cls, format_name, handler, preprocessors=(),
Return the supported formats as a list of unicode strings.
diff --git a/merge.go b/merge.go index <HASH>..<HASH> 100644 --- a/merge.go +++ b/merge.go @@ -267,8 +267,8 @@ func deepMerge(dstIn, src reflect.Value, visited map[uintptr]*visit, depth int, return } default: - overwriteFull := (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst)) - if overwriteFull { + mustSet := (!isEmptyValue(src) || overwriteWithEmptySrc) && (overwrite || isEmptyValue(dst)) + if mustSet { if dst.CanSet() { dst.Set(src) } else {
Improved name for the final condition to set
diff --git a/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java b/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java index <HASH>..<HASH> 100644 --- a/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java +++ b/aeron-common/src/main/java/uk/co/real_logic/aeron/util/concurrent/logbuffer/LogBuffer.java @@ -75,6 +75,7 @@ public class LogBuffer { logBuffer.setMemory(0, logBuffer.capacity(), (byte)0); stateBuffer.setMemory(0, stateBuffer.capacity(), (byte)0); + statusOrdered(CLEAN); } /**
[Java:] Ensure cleaning writes are ordered.
diff --git a/fuel/utils.py b/fuel/utils.py index <HASH>..<HASH> 100644 --- a/fuel/utils.py +++ b/fuel/utils.py @@ -1,7 +1,10 @@ import collections +import os import six +from fuel import config + # See http://python3porting.com/differences.html#buffer if six.PY3: @@ -10,6 +13,32 @@ else: buffer_ = buffer # noqa +def find_in_data_path(filename): + """Searches for a file within Fuel's data path. + + This function loops over all paths defined in Fuel's data path and + returns the first path in which the file is found. + + Returns + ------- + file_path : str + Path to the first file matching `filename` found in Fuel's + data path. + + Raises + ------ + IOError + If the file doesn't appear in Fuel's data path. + + """ + for path in config.data_path.split(os.path.pathsep): + path = os.path.expanduser(os.path.expandvars(path)) + file_path = os.path.join(path, filename) + if os.path.isfile(file_path): + return file_path + raise IOError("{} not found in Fuel's data path".format(filename)) + + def lazy_property_factory(lazy_property): """Create properties that perform lazy loading of attributes.""" def lazy_property_getter(self):
Make fuel.config.data_path accept multiple directories
diff --git a/rflink/protocol.py b/rflink/protocol.py index <HASH>..<HASH> 100644 --- a/rflink/protocol.py +++ b/rflink/protocol.py @@ -151,7 +151,7 @@ class PacketHandling(ProtocolBase): try: packet = decode_packet(raw_packet) except BaseException: - log.exception("failed to parse packet: %s", packet) + log.exception("failed to parse packet data: %s", raw_packet) log.debug("decoded packet: %s", packet)
Improve debugging of failed packet parse
diff --git a/lib/OpenLayers/Renderer/Canvas.js b/lib/OpenLayers/Renderer/Canvas.js index <HASH>..<HASH> 100644 --- a/lib/OpenLayers/Renderer/Canvas.js +++ b/lib/OpenLayers/Renderer/Canvas.js @@ -789,7 +789,7 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, { var featureId, feature; // if the drawing canvas isn't visible, return undefined. - if (this.root.style.display === "none") return feature; + if (this.root.style.display === "none") { return feature; } if (this.hitDetection) { // this dragging check should go in the feature handler
being a good coder and adding braces around if statement body
diff --git a/src/utils/test.js b/src/utils/test.js index <HASH>..<HASH> 100644 --- a/src/utils/test.js +++ b/src/utils/test.js @@ -256,6 +256,19 @@ describe('graphology-utils', function () { assert.strictEqual(newGraph.edge(1, 2), 'rel1'); assert.strictEqual(newGraph.edge(2, 3), 'rel2'); }); + + it.skip('should work with undirected graphs.', function () { + var graph = new Graph({type: 'undirected'}); + graph.mergeEdge('Jon', 'Ishtar'); + graph.mergeEdge('Julia', 'Robin'); + + var newGraph = renameGraphKeys(graph, { + Jon: 'Joseph', + Ishtar: 'Quixal' + }); + + console.log(newGraph); + }); }); describe('updateGraphKeys', function () {
Adding unit test related to #<I>
diff --git a/dhcpcanon/timers.py b/dhcpcanon/timers.py index <HASH>..<HASH> 100644 --- a/dhcpcanon/timers.py +++ b/dhcpcanon/timers.py @@ -9,8 +9,8 @@ import random from pytz import utc from datetime import datetime, timedelta -from constants import MAX_DELAY_SELECTING, RENEW_PERC, REBIND_PERC -from constants import DT_PRINT_FORMAT +from .constants import MAX_DELAY_SELECTING, RENEW_PERC, REBIND_PERC +from .constants import DT_PRINT_FORMAT logger = logging.getLogger(__name__) diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -20,12 +20,11 @@ setup( url=dhcpcanon.__website__, packages=find_packages(exclude=['contrib', 'docs', 'tests*']), install_requires=[ - "scapy>=2.2", + 'scapy>=2.2";python_version<="2.7"', + 'scapy-python3>=0.21;python_version>="3.4"', "netaddr>=0.7", - "ipaddr>=2.1", "pytz>=2016.6", "pip>=8.1", - "pyroute2>=0.4", "attrs>=16.3", "daemon>=1.1" ],
Remove not used dependencies and modify imports for python 3
diff --git a/dictobj.py b/dictobj.py index <HASH>..<HASH> 100644 --- a/dictobj.py +++ b/dictobj.py @@ -143,6 +143,8 @@ class DictionaryObject(object): if -1 == val: if self._defaultIsSet: if rhs._defaultIsSet: + if self._defaultValue is None and rhs._defaultValue is None: + return True return -1 == cmp(self._defaultValue, rhs._defaultValue) else: return False
Fix comparison tests when both default values are None.
diff --git a/lib/discordrb/data.rb b/lib/discordrb/data.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/data.rb +++ b/lib/discordrb/data.rb @@ -319,19 +319,15 @@ module Discordrb # @return [true, false] whether this member is muted server-wide. attr_reader :mute - alias_method :muted?, :mute # @return [true, false] whether this member is deafened server-wide. attr_reader :deaf - alias_method :deafened?, :deaf # @return [true, false] whether this member has muted themselves. attr_reader :self_mute - alias_method :self_muted?, :self_mute # @return [true, false] whether this member has deafened themselves. attr_reader :self_deaf - alias_method :self_deafened?, :self_deaf def initialize(user_id) @user_id = user_id
Remove the mute/deaf aliases from VoiceState as they're only marginally useful there
diff --git a/salt/modules/win_system.py b/salt/modules/win_system.py index <HASH>..<HASH> 100644 --- a/salt/modules/win_system.py +++ b/salt/modules/win_system.py @@ -207,6 +207,8 @@ def set_computer_desc(desc): __salt__['cmd.run'](cmd) return {'Computer Description': get_computer_desc()} +set_computer_description = set_computer_desc + def get_computer_desc(): '''
Alias set_computer_description to set_computer_desc
diff --git a/lib/questionlib.php b/lib/questionlib.php index <HASH>..<HASH> 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -1926,9 +1926,6 @@ function question_format_grade($cmoptions, $grade) { */ function question_init_qenginejs_script() { global $CFG; - - // Get the properties we want into a PHP array first, becase that is easier - // to build. $config = array( 'pixpath' => $CFG->pixpath, 'wwwroot' => $CFG->wwwroot, @@ -1937,16 +1934,7 @@ function question_init_qenginejs_script() { 'flaggedalt' => get_string('flagged', 'question'), 'unflaggedalt' => get_string('notflagged', 'question'), ); - - // Then generate the script tag. - $lines = array(); - foreach ($config as $property => $value) { - $lines[] = ' ' . $property . ': "' . addslashes_js($value) . '"'; - } - $script = '<script type="text/javascript">qengine_config = {' . "\n" . - implode(",\n", $lines) . - "\n};</script>\n"; - return $script; + return print_js_config($config, 'qengine_config', true); } /// FUNCTIONS THAT SIMPLY WRAP QUESTIONTYPE METHODS //////////////////////////////////
Update to use print_js_config.
diff --git a/lib/lita/adapters/shell.rb b/lib/lita/adapters/shell.rb index <HASH>..<HASH> 100644 --- a/lib/lita/adapters/shell.rb +++ b/lib/lita/adapters/shell.rb @@ -2,6 +2,7 @@ module Lita module Adapters class Shell < Adapter def run + puts 'Type "exit" or "quit" to end the session.' loop do print "#{robot.name} > " input = gets.chomp.strip diff --git a/spec/lita/adapters/shell_spec.rb b/spec/lita/adapters/shell_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lita/adapters/shell_spec.rb +++ b/spec/lita/adapters/shell_spec.rb @@ -8,6 +8,8 @@ describe Lita::Adapters::Shell do subject { described_class.new(robot) } describe "#run" do + before { allow(subject).to receive(:puts) } + it "passes input to the Robot and breaks on an exit message" do expect(subject).to receive(:print).with("#{robot.name} > ").twice allow(subject).to receive(:gets).and_return("foo", "exit")
Add an opening message to the Shell session.
diff --git a/lib/transforms/insertColumn.js b/lib/transforms/insertColumn.js index <HASH>..<HASH> 100644 --- a/lib/transforms/insertColumn.js +++ b/lib/transforms/insertColumn.js @@ -1,4 +1,5 @@ const TablePosition = require('../TablePosition'); +const moveSelection = require('./moveSelection'); const createCell = require('../createCell'); /** @@ -38,8 +39,9 @@ function insertColumn(opts, transform, at) { }); // Replace the table - return transform - .setNodeByKey(table.key, newTable); + transform = transform.setNodeByKey(table.key, newTable); + // Update the selection (not doing can break the undo) + return moveSelection(opts, transform, pos.getColumnIndex() + 1, pos.getRowIndex()); } module.exports = insertColumn;
Fix undo of insertColumn when cursor is in inserted column
diff --git a/code/libraries/koowa/components/com_activities/view/activities/json.php b/code/libraries/koowa/components/com_activities/view/activities/json.php index <HASH>..<HASH> 100644 --- a/code/libraries/koowa/components/com_activities/view/activities/json.php +++ b/code/libraries/koowa/components/com_activities/view/activities/json.php @@ -82,7 +82,7 @@ class ComActivitiesViewActivitiesJson extends KViewJson $item = array( 'id' => $activity->getActivityId(), - 'title' => $renderer->render($activity), + 'title' => $renderer->render($activity, array('escaped_urls' => false, 'fqr' => true)), 'story' => $renderer->render($activity, array('html' => false)), 'published' => $activity->getActivityPublished()->format('c'), 'verb' => $activity->getActivityVerb(),
re #<I> Ask for fully qualified routes.
diff --git a/lib/cloud_providers/connections.rb b/lib/cloud_providers/connections.rb index <HASH>..<HASH> 100644 --- a/lib/cloud_providers/connections.rb +++ b/lib/cloud_providers/connections.rb @@ -88,7 +88,7 @@ module CloudProviders raise StandardError.new("You must pass a :source=>uri option to rsync") unless opts[:source] destination_path = opts[:destination] || opts[:source] rsync_opts = opts[:rsync_opts] || '-va' - rsync_opts += %q% --rsync-path="sudo rsync" % + rsync_opts += %q% --rsync-path="sudo rsync" --exclude=.svn --exclude=.git --exclude=.cvs % cmd_string = "rsync -L -e 'ssh #{ssh_options}' #{rsync_opts} #{opts[:source]} #{user}@#{host}:#{destination_path}" out = system_run(cmd_string) out
Added standard VCS files to rsync excludes to speed up transfer
diff --git a/Kwf_js/Form/ComboBox.js b/Kwf_js/Form/ComboBox.js index <HASH>..<HASH> 100644 --- a/Kwf_js/Form/ComboBox.js +++ b/Kwf_js/Form/ComboBox.js @@ -73,6 +73,9 @@ Kwf.Form.ComboBox = Ext.extend(Ext.form.ComboBox, reader: reader }; Ext.apply(storeConfig, this.storeConfig); + if (typeof storeConfig.remoteSort == 'undefined') { + storeConfig.remoteSort = proxy instanceof Ext.data.HttpProxy; + } if (store.type && Ext.data[store.type]) { this.store = new Ext.data[store.type](storeConfig); } else if (store.type) {
set remoteSort for store when using httpProxy this is required for SuperBoxSelect so it doesn't sort locally
diff --git a/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php b/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php @@ -116,4 +116,9 @@ class SQLServer2008Platform extends SQLServer2005Platform { return Keywords\SQLServer2008Keywords::class; } + + protected function getLikeWildcardCharacters() : iterable + { + return array_merge(parent::getLikeWildcardCharacters(), ['[', ']', '^']); + } }
Add more meta-characters for some MS platforms The docs only talk about <I> and up, not sure if those should be added to <I> too.
diff --git a/activesupport/lib/active_support/security_utils.rb b/activesupport/lib/active_support/security_utils.rb index <HASH>..<HASH> 100644 --- a/activesupport/lib/active_support/security_utils.rb +++ b/activesupport/lib/active_support/security_utils.rb @@ -19,12 +19,14 @@ module ActiveSupport end module_function :fixed_length_secure_compare - # Constant time string comparison, for variable length strings. + # Secure string comparison for strings of variable length. # - # The values are first processed by SHA256, so that we don't leak length info - # via timing attacks. + # While a timing attack would not be able to discern the content of + # a secret compared via secure_compare, it is possible to determine + # the secret length. This should be considered when using secure_compare + # to compare weak, short secrets to user input. def secure_compare(a, b) - fixed_length_secure_compare(::Digest::SHA256.digest(a), ::Digest::SHA256.digest(b)) && a == b + a.length == b.length && fixed_length_secure_compare(a, b) end module_function :secure_compare end
Remove hashing from secure_compare and clarify documentation
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index <HASH>..<HASH> 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -560,6 +560,11 @@ class Chef config[:ssh_password] = get_stripped_unfrozen_value(ssh_password || Chef::Config[:knife][:ssh_password]) end + + # CHEF-4342 Diable host key verification if a password has been given. + if config[:ssh_password] + config[:host_key_verify] = false + end end def configure_ssh_identity_file
Fix "knife ssh" authentication scheme #<I> Affects at least knife <I> When a user uses knife ssh in "password, not key" mode, it fails.
diff --git a/visidata/loaders/json.py b/visidata/loaders/json.py index <HASH>..<HASH> 100644 --- a/visidata/loaders/json.py +++ b/visidata/loaders/json.py @@ -45,16 +45,20 @@ class JSONSheet(Sheet): with self.source.open_text() as fp: self.rows = [] for L in fp: - self.addRow(json.loads(L)) + try: + self.addRow(json.loads(L)) + except Exception as e: + pass # self.addRow(e) def addRow(self, row, index=None): super().addRow(row, index=index) - for k in row: - if k not in self.colnames: - c = ColumnItem(k, type=deduceType(row[k])) - self.colnames[k] = c - self.addColumn(c) - return row + if isinstance(row, dict): + for k in row: + if k not in self.colnames: + c = ColumnItem(k, type=deduceType(row[k])) + self.colnames[k] = c + self.addColumn(c) + return row def newRow(self): return {}
[json] make loader more robust
diff --git a/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java b/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java index <HASH>..<HASH> 100644 --- a/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java +++ b/flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java @@ -156,7 +156,7 @@ public final class Utils { Path dst = new Path(homedir, suffix); - LOG.debug("Copying from " + localSrcPath + " to " + dst); + LOG.debug("Copying from {} to {}", localSrcPath, dst); fs.copyFromLocalFile(false, true, localSrcPath, dst);
[hotfix] Replace String concatenation with Slf4j placeholders.
diff --git a/library/CM/SmartyPlugins/function.resource.php b/library/CM/SmartyPlugins/function.resource.php index <HASH>..<HASH> 100644 --- a/library/CM/SmartyPlugins/function.resource.php +++ b/library/CM/SmartyPlugins/function.resource.php @@ -34,7 +34,7 @@ function smarty_helper_resource_internal(CM_Render $render) { // Sorts all classes according to inheritance order, pairs them with path $phpClasses = CM_View_Abstract::getClasses($render->getSite()->getNamespaces(), CM_View_Abstract::CONTEXT_JAVASCRIPT); foreach ($phpClasses as $path => $className) { - $path = str_replace(DIR_ROOT, '', $path); + $path = str_replace(DIR_ROOT, '/', $path); $path = str_replace(DIRECTORY_SEPARATOR, '/', $path); $paths[] = preg_replace('#\.php$#', '.js', $path); }
Fix: Dev resource paths should be absolute
diff --git a/examples/nexrad/nexrad_copy.py b/examples/nexrad/nexrad_copy.py index <HASH>..<HASH> 100644 --- a/examples/nexrad/nexrad_copy.py +++ b/examples/nexrad/nexrad_copy.py @@ -106,7 +106,7 @@ logger.info('ref_data.shape: {}'.format(ref_data.shape)) # https://stackoverflow.com/questions/7222382/get-lat-long-given-current-point-distance-and-bearing def offset_by_meters(lat, lon, dist, bearing): R = 6378.1 - bearing_rads = np.deg2rad(az)[:, None] + bearing_rads = np.deg2rad(bearing)[:, None] dist_km = dist / 1000.0 lat1 = np.radians(lat)
Use bearing function parameter instead of az The function was working by coincidence but it was using a global variable. Fix it by using the parameter `bearing` passed to it. Thanks to Goizueta, the reviewer :)
diff --git a/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java b/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java index <HASH>..<HASH> 100644 --- a/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java +++ b/src/jpa-engine/core/src/test/java/com/impetus/kundera/utils/LuceneCleanupUtilities.java @@ -53,10 +53,14 @@ public class LuceneCleanupUtilities { for (File file : files) { - // Delete each file - if (!file.delete()) - { - } + if(file.isDirectory() && !(file.list().length==0)){ + + cleanDir(file.getPath()); + file.delete(); + }else{ + file.delete(); + } + } } }
for recursively cleaning the directory
diff --git a/icekit/utils/testing.py b/icekit/utils/testing.py index <HASH>..<HASH> 100644 --- a/icekit/utils/testing.py +++ b/icekit/utils/testing.py @@ -4,11 +4,13 @@ import os import uuid from django.conf import settings +from nose.tools import nottest from PIL import Image, ImageDraw +@nottest @contextlib.contextmanager -def get_sample_image(storage): +def get_test_image(storage): """ Context manager that creates an image with the given storage class, returns a storage name, and cleans up (including thumbnails) when done. diff --git a/icekit/utils/tests.py b/icekit/utils/tests.py index <HASH>..<HASH> 100644 --- a/icekit/utils/tests.py +++ b/icekit/utils/tests.py @@ -5,15 +5,15 @@ from django.conf import settings from django_dynamic_fixture import G from django_webtest import WebTest -from icekit.utils.testing import get_sample_image +from icekit.utils import testing from icekit.tests.models import ImageTest class TestingUtils(WebTest): - def test_get_sample_image(self): + def test_get_test_image(self): image_test = G(ImageTest) - with get_sample_image(image_test.image.storage) as image_name: + with testing.get_test_image(image_test.image.storage) as image_name: # Check that the image was created. image_test.image = image_name self.assertTrue(os.path.exists(image_test.image.path))
Rename `get_sample_image()` to `get_test_image()` and tell Nose it is not a test.
diff --git a/commands/commands.go b/commands/commands.go index <HASH>..<HASH> 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -86,6 +86,7 @@ func (c *Command) Usage() { func (c *Command) Parse() { core.SetupDebugging(c.FlagSet) + c.FlagSet.SetOutput(core.ErrorWriter) c.FlagSet.Parse(c.Args) }
FlagSet errors should go to the panic log too
diff --git a/msaf/run.py b/msaf/run.py index <HASH>..<HASH> 100644 --- a/msaf/run.py +++ b/msaf/run.py @@ -355,9 +355,9 @@ def process(in_path, annot_beats=False, feature="pcp", framesync=False, # TODO: Only save if needed # Save estimations - # msaf.utils.ensure_dir(os.path.dirname(file_struct.est_file)) - # io.save_estimations(file_struct, est_times, est_labels, - # boundaries_id, labels_id, **config) + msaf.utils.ensure_dir(os.path.dirname(file_struct.est_file)) + io.save_estimations(file_struct, est_times, est_labels, + boundaries_id, labels_id, **config) return est_times, est_labels else:
Single file process saves estimations This commented lines produced this issue <URL>
diff --git a/base.php b/base.php index <HASH>..<HASH> 100644 --- a/base.php +++ b/base.php @@ -1143,7 +1143,7 @@ final class Base { foreach (str_split($body,1024) as $part) { // Throttle output $ctr++; - if ($ctr/$kbps>$elapsed=microtime(TRUE)-$now && + if ($ctr/$kbps>($elapsed=microtime(TRUE)-$now) && !connection_aborted()) usleep(1e6*($ctr/$kbps-$elapsed)); echo $part;
Bug fix: Calculation of elapsed time
diff --git a/telethon/sessions/memory.py b/telethon/sessions/memory.py index <HASH>..<HASH> 100644 --- a/telethon/sessions/memory.py +++ b/telethon/sessions/memory.py @@ -228,7 +228,7 @@ class MemorySession(Session): def cache_file(self, md5_digest, file_size, instance): if not isinstance(instance, (InputDocument, InputPhoto)): raise TypeError('Cannot cache %s instance' % type(instance)) - key = (md5_digest, file_size, _SentFileType.from_type(instance)) + key = (md5_digest, file_size, _SentFileType.from_type(type(instance))) value = (instance.id, instance.access_hash) self._files[key] = value
Fix MemorySession file caching
diff --git a/vault/testing.go b/vault/testing.go index <HASH>..<HASH> 100644 --- a/vault/testing.go +++ b/vault/testing.go @@ -790,7 +790,6 @@ func TestCluster(t testing.TB, handlers []http.Handler, base *CoreConfig, unseal if err != nil { t.Fatalf("err: %v", err) } - c1.redirectAddr = coreConfig.RedirectAddr coreConfig.RedirectAddr = fmt.Sprintf("https://127.0.0.1:%d", c2lns[0].Address.Port) if coreConfig.ClusterAddr != "" { @@ -800,7 +799,6 @@ func TestCluster(t testing.TB, handlers []http.Handler, base *CoreConfig, unseal if err != nil { t.Fatalf("err: %v", err) } - c2.redirectAddr = coreConfig.RedirectAddr coreConfig.RedirectAddr = fmt.Sprintf("https://127.0.0.1:%d", c3lns[0].Address.Port) if coreConfig.ClusterAddr != "" { @@ -810,7 +808,6 @@ func TestCluster(t testing.TB, handlers []http.Handler, base *CoreConfig, unseal if err != nil { t.Fatalf("err: %v", err) } - c2.redirectAddr = coreConfig.RedirectAddr // // Clustering setup
Don't need to explictly set redirectAddrs
diff --git a/lib/get/onValue.js b/lib/get/onValue.js index <HASH>..<HASH> 100644 --- a/lib/get/onValue.js +++ b/lib/get/onValue.js @@ -36,7 +36,7 @@ module.exports = function onValue(model, node, seedOrFunction, outerResults, per } else if (outputFormat === "JSONG") { - if (typeof node.value === "object") { + if (node.value && typeof node.value === "object") { valueNode = clone(node); } else { valueNode = node.value;
made it so null is not output as an atom.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ if sys.version_info <= (3, 1): setup( name="ss", - version="1.5.1", + version="1.5.2", packages=[], scripts=['ss.py'], py_modules=['ss'], diff --git a/ss.py b/ss.py index <HASH>..<HASH> 100644 --- a/ss.py +++ b/ss.py @@ -18,7 +18,7 @@ import guessit init(autoreset=True) -__version__ = '1.5.0' +__version__ = '1.5.2' if sys.version_info[0] == 3: # pragma: no cover from urllib.request import urlopen
Bumping version to <I> Fixes #<I>
diff --git a/runtime/API.js b/runtime/API.js index <HASH>..<HASH> 100644 --- a/runtime/API.js +++ b/runtime/API.js @@ -137,6 +137,8 @@ function buildClass(base, def) { this._es6now = { + version: "0.7.1", + class: buildClass, // Support for iterator protocol diff --git a/src/NodeRun.js b/src/NodeRun.js index <HASH>..<HASH> 100644 --- a/src/NodeRun.js +++ b/src/NodeRun.js @@ -104,6 +104,8 @@ export function startREPL() { addExtension(); + console.log(`es6now ${ _es6now.version } (Node ${ process.version })`); + // Provide a way to load a module from the REPL global.loadModule = path => __load(global.require.resolve(path)); diff --git a/src/Runtime.js b/src/Runtime.js index <HASH>..<HASH> 100644 --- a/src/Runtime.js +++ b/src/Runtime.js @@ -141,6 +141,8 @@ function buildClass(base, def) { this._es6now = { + version: "0.7.1", + class: buildClass, // Support for iterator protocol
Output the version of es6now and Node when we start the REPL.
diff --git a/course/report.php b/course/report.php index <HASH>..<HASH> 100644 --- a/course/report.php +++ b/course/report.php @@ -21,7 +21,7 @@ $navigation = build_navigation($navlinks); print_header($course->fullname.': '.$strreports, $course->fullname.': '.$strreports, $navigation); - $reports = get_plugin_list('report'); + $reports = get_plugin_list('coursereport'); foreach ($reports as $report => $reportdirectory) { $pluginfile = $reportdirectory.'/mod.php';
course-reports MDL-<I> Fixed broken reports, changed plugin list type to coursereport
diff --git a/components/select-ng/select-ng__lazy.js b/components/select-ng/select-ng__lazy.js index <HASH>..<HASH> 100644 --- a/components/select-ng/select-ng__lazy.js +++ b/components/select-ng/select-ng__lazy.js @@ -38,11 +38,11 @@ class SelectLazy { } attachEvents() { - this.container.addEventListener('click', this.onClick, {capture: true, once: true}); + this.container.addEventListener('click', this.onClick, {capture: true}); } detachEvents() { - this.container.removeEventListener('click', this.onClick); + this.container.removeEventListener('click', this.onClick, {capture: true}); } render(props) {
RG-<I> use {capture: true} for removeEventListener too
diff --git a/src/Extensions/BlockArchiveExtension.php b/src/Extensions/BlockArchiveExtension.php index <HASH>..<HASH> 100644 --- a/src/Extensions/BlockArchiveExtension.php +++ b/src/Extensions/BlockArchiveExtension.php @@ -48,7 +48,7 @@ class BlockArchiveExtension extends DataExtension implements ArchiveViewProvider 'Breadcrumbs' => function ($val, $item) { $parent = $item->Page; - return $parent ? $parent->Breadcrumbs() : null; + return ($parent && $parent->hasMethod('Breadcrumbs')) ? $parent->Breadcrumbs() : null; }, 'allVersions.first.LastEdited' => function ($val, $item) { return DBDatetime::create_field('Datetime', $val)->Ago();
FIX Prevent exception when parent does not have breadcrumbs
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,8 @@ install_requires = [ # List your project dependencies here. # For more details, see: # http://packages.python.org/distribute/setuptools.html#declaring-dependencies - "enum", "lxml", "networkx", "pygraphviz" + "enum", "lxml", "networkx", "pygraphviz", + "brewer2mpl", "unidecode" ]
added missing packages to setup.py
diff --git a/lib/monologue/engine.rb b/lib/monologue/engine.rb index <HASH>..<HASH> 100644 --- a/lib/monologue/engine.rb +++ b/lib/monologue/engine.rb @@ -15,7 +15,7 @@ module Monologue config.generators.fixture_replacement :factory_girl config.generators.integration_tool :rspec - initializer "monologue.assets.precompile" do |app| + initializer 'monologue.assets.precompile' do |app| app.config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts') app.config.assets.precompile += %w[ monologue/admin/ckeditor-config.js @@ -23,7 +23,7 @@ module Monologue ] end - initializer "monologue.configuration", :before => :load_config_initializers do |app| + initializer 'monologue.configuration', :before => :load_config_initializers do |app| app.config.monologue = Monologue::Configuration.new Monologue::Config = app.config.monologue end
Fixes #<I>. small refactoring
diff --git a/src/Jira/Api/Client/CurlClient.php b/src/Jira/Api/Client/CurlClient.php index <HASH>..<HASH> 100644 --- a/src/Jira/Api/Client/CurlClient.php +++ b/src/Jira/Api/Client/CurlClient.php @@ -90,6 +90,7 @@ class CurlClient implements ClientInterface if ($method == 'POST') { curl_setopt($curl, CURLOPT_POST, 1); if ($isFile) { + $data['file'] = $this->getCurlValue($data['file']); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); } else { curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data)); @@ -122,4 +123,19 @@ class CurlClient implements ClientInterface return $data; } + + /** + * If necessary, replace curl file @ string with a CURLFile object (for PHP 5.5 and up) + * + * @param string $fileString The string in @-format as it is used on PHP 5.4 and older. + * @return \CURLFile|string + */ + protected function getCurlValue($fileString) + { + if (!function_exists('curl_file_create')) { + return $fileString; + } + + return curl_file_create(substr($fileString, 1)); + } }
Fixing deprecated error when uploading file attachments in PHP <I>+
diff --git a/php/commands/cron.php b/php/commands/cron.php index <HASH>..<HASH> 100644 --- a/php/commands/cron.php +++ b/php/commands/cron.php @@ -487,6 +487,13 @@ class Cron_Command extends WP_CLI_Command { /** * Test the WP Cron spawning system and report back its status. + * + * This command tests the spawning system by performing the following steps: + * * Checks to see if the `DISABLE_WP_CRON` constant is set; errors if true + * because WP-Cron is disabled. + * * Checks to see if the `ALTERNATE_WP_CRON` constant is set; warns if true + * * Attempts to spawn WP-Cron over HTTP; warns if non 200 response code is + * returned. */ public function test() {
Explain what `wp cron test` actually does
diff --git a/lib/Rackem/Rack.php b/lib/Rackem/Rack.php index <HASH>..<HASH> 100644 --- a/lib/Rackem/Rack.php +++ b/lib/Rackem/Rack.php @@ -23,7 +23,7 @@ class Rack "rack.multithread" => false, "rack.multiprocess" => false, "rack.run_once" => false, - "rack.session" => &$_SESSION, + "rack.session" => array(), "rack.logger" => "" )); return new \ArrayObject($env);
don't bother with the $_SESSION global
diff --git a/providers/oura/oura.go b/providers/oura/oura.go index <HASH>..<HASH> 100644 --- a/providers/oura/oura.go +++ b/providers/oura/oura.go @@ -131,13 +131,26 @@ func userFromReader(reader io.Reader, user *goth.User) error { return err } + rawData := make(map[string]interface{}) + + if u.Age != 0 { + rawData["age"] = u.Age + } + if u.Weight != 0 { + rawData["weight"] = u.Weight + } + if u.Height != 0 { + rawData["height"] = u.Height + } + if u.Gender != "" { + rawData["gender"] = u.Gender + } + user.UserID = u.UserID user.Email = u.Email - user.RawData = make(map[string]interface{}) - user.RawData["age"] = u.Age - user.RawData["weight"] = u.Weight - user.RawData["height"] = u.Height - user.RawData["gender"] = u.Gender + if len(rawData) > 0 { + user.RawData = rawData + } return err }
Update FetchUser to only fill populated fields in RawData
diff --git a/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java b/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java index <HASH>..<HASH> 100644 --- a/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java +++ b/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/table/management/OracleTableManager.java @@ -83,6 +83,10 @@ class OracleTableManager extends AbstractTableManager { return indexName; } + protected String getDropTimestampSql() { + return String.format("DROP INDEX %s", getIndexName(true)); + } + @Override public String getInsertRowSql() { if (insertRowSql == null) {
ISPN-<I> Drop Index fails on Oracle DBs
diff --git a/src/views/ticket/_clientInfo.php b/src/views/ticket/_clientInfo.php index <HASH>..<HASH> 100644 --- a/src/views/ticket/_clientInfo.php +++ b/src/views/ticket/_clientInfo.php @@ -60,11 +60,14 @@ $this->registerCss(' <?= ClientGridView::detailView([ 'model' => $client, 'boxed' => false, - 'columns' => $client->login === 'anonym' ? ['name', 'email'] : [ - 'name', 'email', 'messengers', 'country', 'language', - 'state', 'balance', 'credit', - 'servers_spoiler', 'domains_spoiler', 'hosting', - ], + 'columns' => array_filter( + $client->login === 'anonym' ? ['name', 'email'] : [ + 'name', 'email', 'messengers', 'country', 'language', 'state', + Yii::$app->user->can('bill.read') ? 'balance' : null, + Yii::$app->user->can('bill.read') ? 'credit' : null, + 'servers_spoiler', 'domains_spoiler', 'hosting', + ] + ), ]) ?> <?php if ($client->login !== 'anonym') : ?>
hidden balance and credit if can not `bill.read`
diff --git a/src/Dingo/Api/Facades/API.php b/src/Dingo/Api/Facades/API.php index <HASH>..<HASH> 100644 --- a/src/Dingo/Api/Facades/API.php +++ b/src/Dingo/Api/Facades/API.php @@ -1,6 +1,7 @@ <?php namespace Dingo\Api\Facades; use Closure; +use Dingo\Api\Http\InternalRequest; use Illuminate\Support\Facades\Facade; /** @@ -37,4 +38,14 @@ class API extends Facade { return static::$app['dingo.api.authorization']->token($payload); } + /** + * Determine if a request is internal. + * + * @return bool + */ + public static function internal() + { + return static::$app['router']->getCurrentRequest() instanceof InternalRequest; + } + } \ No newline at end of file
Method to check if request is internal.
diff --git a/Controller/CRUDController.php b/Controller/CRUDController.php index <HASH>..<HASH> 100644 --- a/Controller/CRUDController.php +++ b/Controller/CRUDController.php @@ -391,8 +391,10 @@ class CRUDController extends Controller */ public function batchAction() { - if ($this->getRestMethod() != 'POST') { - throw new \RuntimeException('invalid request type, POST expected'); + $restMethod = $this->getRestMethod(); + + if ('POST' !== $restMethod) { + throw $this->createNotFoundException(sprintf('Invalid request type "%s", POST expected', $restMethod)); } // check the csrf token
Throw http not found exception instead of runtime Avoids a <I> server error.
diff --git a/functions/functions-twig.php b/functions/functions-twig.php index <HASH>..<HASH> 100644 --- a/functions/functions-twig.php +++ b/functions/functions-twig.php @@ -36,10 +36,17 @@ $twig->addFilter('wp_title', new Twig_Filter_Function('twig_wp_title')); $twig->addFilter('wp_sidebar', new Twig_Filter_Function('twig_wp_sidebar')); + $twig->addFilter('get_post_info', new Twig_Filter_Function('twig_get_post_info')); + $twig = apply_filters('get_twig', $twig); return $twig; } + function twig_get_post_info($id, $field = 'path'){ + $pi = PostMaster::get_post_info($id); + return $pi->$field; + } + function twig_wp_sidebar($arg){ get_sidebar($arg); }
added twig for get_post_info
diff --git a/lib/weblib.php b/lib/weblib.php index <HASH>..<HASH> 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1605,13 +1605,20 @@ function obfuscate_text($plaintext) { $i=0; $length = strlen($plaintext); $obfuscated=""; + $prev_obfuscated = false; while ($i < $length) { - if (rand(0,2)) { + $c = ord($plaintext{$i}); + $numerical = ($c >= ord('0')) && ($c <= ord('9')); + if ($prev_obfuscated and $numerical ) { + $obfuscated.='&#'.ord($plaintext{$i}); + } else if (rand(0,2)) { $obfuscated.='&#'.ord($plaintext{$i}); + $prev_obfuscated = true; } else { $obfuscated.=$plaintext{$i}; + $prev_obfuscated = false; } - $i++; + $i++; } return $obfuscated; }
Fixes for obfuscate_text() when printing emails with numbers in them. (Patch from Zbigniew Fiedorowicz - thanks)
diff --git a/lib/things/document.rb b/lib/things/document.rb index <HASH>..<HASH> 100644 --- a/lib/things/document.rb +++ b/lib/things/document.rb @@ -1,6 +1,6 @@ module Things class Document - DEFAULT_DATABASE_PATH = ENV['HOME'] + '/Library/Application Support/Cultured Code/Things/Database.xml' unless defined?(DEFAULT_DATABASE_PATH) + DEFAULT_DATABASE_PATH = "#{ENV['HOME']}/Library/Application Support/Cultured Code/Things/Database.xml" unless defined?(DEFAULT_DATABASE_PATH) attr_reader :database_file @@ -36,4 +36,4 @@ module Things @doc = Hpricot(IO.read(database_file)) end end -end \ No newline at end of file +end
Use interpolation for DEFAULT_DATABASE_PATH
diff --git a/src/toil/test/jobStores/jobStoreTest.py b/src/toil/test/jobStores/jobStoreTest.py index <HASH>..<HASH> 100644 --- a/src/toil/test/jobStores/jobStoreTest.py +++ b/src/toil/test/jobStores/jobStoreTest.py @@ -1253,9 +1253,16 @@ class AWSJobStoreTest(AbstractJobStoreTest.Test): else: self.fail() finally: - for attempt in retry_s3(): - with attempt: - s3.delete_bucket(bucket=bucket) + try: + for attempt in retry_s3(): + with attempt: + s3.delete_bucket(bucket=bucket) + except boto.exception.S3ResponseError as e: + if e.error_code == 404: + # The bucket doesn't exist; maybe a failed delete actually succeeded. + pass + else: + raise @slow def testInlinedFiles(self):
Tolerate unnecessary bucket cleanup (#<I>)
diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php index <HASH>..<HASH> 100644 --- a/lib/Cake/Model/Behavior/TranslateBehavior.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -392,6 +392,16 @@ class TranslateBehavior extends ModelBehavior { unset($this->runtime[$model->alias]['beforeValidate'], $this->runtime[$model->alias]['beforeSave']); $conditions = array('model' => $model->alias, 'foreign_key' => $model->id); $RuntimeModel = $this->translateModel($model); + + $fields = array_merge($this->settings[$model->alias], $this->runtime[$model->alias]['fields']); + if ($created) { + foreach ($fields as $field) { + if (!isset($tempData[$field])) { + //set the field value to an empty string + $tempData[$field] = ''; + } + } + } foreach ($tempData as $field => $value) { unset($conditions['content']);
Update afterSave to ensure created entires have all translated fields present Without all fields being present, find() will be unable to find the translated records. Fixes #<I>
diff --git a/main.py b/main.py index <HASH>..<HASH> 100755 --- a/main.py +++ b/main.py @@ -62,6 +62,9 @@ class Node: continue attrib = getattr(self, attr) if attrib: + if isinstance(attrib, int): + # Check for enums + attrib = str(int(attrib)) element.attrib[attr] = attrib return element
Handle int attributes in serialization
diff --git a/cruddy/__init__.py b/cruddy/__init__.py index <HASH>..<HASH> 100644 --- a/cruddy/__init__.py +++ b/cruddy/__init__.py @@ -200,3 +200,18 @@ class CRUD(object): params = {'Key': {'id': id}} self._call_ddb_method(self.table.delete_item, params, response) return self._prepare_response(response) + + def handler(self, item, operation): + operation = operation.lower() + if operation == 'list': + response = self.list() + elif operation == 'get': + response = self.get(item['id']) + elif operation == 'create': + response = self.create(item) + elif operation == 'update': + response = self.update(item) + elif operation == 'delete': + response = self.delete(item['id']) + return response +
Add back the handler method. Still useful, I think.
diff --git a/src/streamcorpus_pipeline/_tsv_files_list.py b/src/streamcorpus_pipeline/_tsv_files_list.py index <HASH>..<HASH> 100644 --- a/src/streamcorpus_pipeline/_tsv_files_list.py +++ b/src/streamcorpus_pipeline/_tsv_files_list.py @@ -151,7 +151,7 @@ class tsv_files_list(object): return stream_item if __name__ == '__main__': - ## this is a simple test of this extractor stage + ## this is a simple test of this reader stage import argparse parser = argparse.ArgumentParser() parser.add_argument(
renaming extractor --> reader one more (trivial)
diff --git a/packages/react-server-website/components/doc-contents.js b/packages/react-server-website/components/doc-contents.js index <HASH>..<HASH> 100644 --- a/packages/react-server-website/components/doc-contents.js +++ b/packages/react-server-website/components/doc-contents.js @@ -38,7 +38,7 @@ export default class DocContents extends React.Component { } componentDidMount() { - getCurrentRequestContext().navigator.on( "navigateStart", this.closeMenu.bind(this) ); + getCurrentRequestContext().navigator.on("loadComplete", this.closeMenu.bind(this)); } render() {
Close mobile doc menu on load complete (#<I>) This feels a little nicer. Waits to close the nav menu until the page has changed. Previously the nav menu was closed immediately, and then the page would change _after_.
diff --git a/lib/spout/version.rb b/lib/spout/version.rb index <HASH>..<HASH> 100644 --- a/lib/spout/version.rb +++ b/lib/spout/version.rb @@ -3,7 +3,7 @@ module Spout MAJOR = 0 MINOR = 1 TINY = 0 - BUILD = "pre" # nil, "pre", "rc", "rc2" + BUILD = "rc" # nil, "pre", "rc", "rc2" STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.') end
Version bump to <I>.rc
diff --git a/CHANGELOG.md b/CHANGELOG.md index <HASH>..<HASH> 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] - unreleased +### Added +- `Service.close` method for freeing resources. ## [2] - 2015-11-15 diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ def long_desc(): setup( name='syndicate', - version='2', + version='2.1', description='A wrapper for REST APIs', author='Justin Mayfield', author_email='tooker@gmail.com', diff --git a/syndicate/client.py b/syndicate/client.py index <HASH>..<HASH> 100644 --- a/syndicate/client.py +++ b/syndicate/client.py @@ -49,6 +49,7 @@ class Service(object): async=False, **adapter_config): if not uri: raise TypeError("Required: uri") + self.closed = False self.async = async self.auth = auth self.filters = [] @@ -129,4 +130,9 @@ class Service(object): return self.do('patch', path, data=data, **kwargs) def close(self): - self.adapter.close() + if self.closed: + return + if self.adapter is not None: + self.adapter.close() + self.adapter = None + self.closed = True
Rev to <I> and add close() docs.
diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go index <HASH>..<HASH> 100644 --- a/lxd/container_lxc.go +++ b/lxd/container_lxc.go @@ -3480,7 +3480,6 @@ func (c *containerLXC) Delete() error { } // Update network files - networkUpdateStatic(c.state, "") for k, m := range c.expandedDevices { if m["type"] != "nic" || m["nictype"] != "bridged" { continue @@ -3515,6 +3514,11 @@ func (c *containerLXC) Delete() error { } } + if !c.IsSnapshot() { + // Remove any static lease file + networkUpdateStatic(c.state, "") + } + logger.Info("Deleted container", ctxMap) if c.IsSnapshot() {
lxd/containers: Properly clear static leases
diff --git a/lib/producer.js b/lib/producer.js index <HASH>..<HASH> 100644 --- a/lib/producer.js +++ b/lib/producer.js @@ -75,7 +75,7 @@ function Producer(conf, topicConf) { this.globalConfig = conf; this.topicConfig = topicConf; this.defaultTopic = gTopic || null; - this.defaultPartition = gPart || null; + this.defaultPartition = gPart == null ? -1 : gPart; this.outstandingMessages = 0; this.sentMessages = 0; @@ -189,7 +189,7 @@ Producer.prototype.produceSync = function(msg) { this.sentMessages++; var topic = msg.topic || false; - var partition = msg.partition || this.defaultPartition; + var partition = msg.partition == null ? this.defaultPartition : msg.partition; if (!topic) { throw new TypeError('"topic" needs to be set');
Do null checking on partition instead of checking falsiness (#<I>)
diff --git a/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java b/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java +++ b/src/main/java/org/dbflute/mail/send/embedded/proofreader/SMailPmCommentProofreader.java @@ -73,6 +73,9 @@ public class SMailPmCommentProofreader implements SMailTextProofreader { // Line Adjustment // =============== protected String filterTemplateText(String templateText, Object pmb) { + // #for_now jflute pending, IF in FOR comment becomes empty line when false (2019/02/21) + // basically it may be unneeded because it should be structured in Java + // and modification is very difficult so pending, waiting for next request final String replaced = Srl.replace(templateText, CRLF, LF); final List<String> lineList = Srl.splitList(replaced, LF); final StringBuilder sb = new StringBuilder(templateText.length());
comment: IF in FOR comment becomes empty line when false