hash
stringlengths
40
40
diff
stringlengths
131
26.7k
message
stringlengths
7
694
project
stringlengths
5
67
split
stringclasses
1 value
diff_languages
stringlengths
2
24
c0f0781ce91525398a611d5f6364522b864a4217
diff --git a/entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/binop/BinaryOperatorEntityIterable.java b/entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/binop/BinaryOperatorEntityIterable.java index <HASH>..<HASH> 100644 --- a/entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/binop/BinaryOperatorEntityIterable.java +++ b/entity-store/src/main/java/jetbrains/exodus/entitystore/iterate/binop/BinaryOperatorEntityIterable.java @@ -251,8 +251,8 @@ abstract class BinaryOperatorEntityIterable extends EntityIterableBase { } private static boolean shouldBinaryOperationBeCached(@NotNull EntityIterableBase iterable1, @NotNull EntityIterableBase iterable2) { - return (iterable1.canBeCached() || iterable1.getHandle().getType().isPropertyIndex()) && - (iterable2.canBeCached() || iterable2.getHandle().getType().isPropertyIndex()); + return (iterable1.getHandle().getType().isPropertyIndex() || iterable1.canBeCached()) && + (iterable2.getHandle().getType().isPropertyIndex() || iterable2.canBeCached()); } private static boolean isOrderOk(@NotNull final EntityIterableHandle handle1,
canBeCached() is too heavy for PropertyRangeOrValueIterableBase
JetBrains_xodus
train
java
e10ec172c372e43e26cdca0619282817016b8efc
diff --git a/src/info/eboost.js b/src/info/eboost.js index <HASH>..<HASH> 100644 --- a/src/info/eboost.js +++ b/src/info/eboost.js @@ -74,7 +74,7 @@ const currencyInfo: EdgeCurrencyInfo = { 'electrums://electrum3.eboost.fun:50002', 'electrum://electrum1.eboost.fun:50001', 'electrum://electrum2.eboost.fun:50001', - 'electrum://electrum3.eboost.fun:50001', + 'electrum://electrum3.eboost.fun:50001' ], disableFetchingServers: true },
[EBoost] Fix Trailing Comma on servers
EdgeApp_edge-currency-bitcoin
train
js
fb821183ea5654de572886da57f0fe1e68f15f47
diff --git a/src/Vectorface/SnappyRouter/Handler/AbstractHandler.php b/src/Vectorface/SnappyRouter/Handler/AbstractHandler.php index <HASH>..<HASH> 100644 --- a/src/Vectorface/SnappyRouter/Handler/AbstractHandler.php +++ b/src/Vectorface/SnappyRouter/Handler/AbstractHandler.php @@ -3,7 +3,7 @@ namespace Vectorface\SnappyRouter\Handler; use \Exception; -use VectorFace\SnappyRouter\Config\Config; +use Vectorface\SnappyRouter\Config\Config; use Vectorface\SnappyRouter\Di\Di; use Vectorface\SnappyRouter\Di\DiProviderInterface; use Vectorface\SnappyRouter\Di\ServiceProvider;
Bug fix for case sensitive vendor name.
Vectorface_SnappyRouter
train
php
eae6bc4a6facd11f5378a6085047b2416af68c9c
diff --git a/src/js/tempusdominus-bootstrap-4.js b/src/js/tempusdominus-bootstrap-4.js index <HASH>..<HASH> 100644 --- a/src/js/tempusdominus-bootstrap-4.js +++ b/src/js/tempusdominus-bootstrap-4.js @@ -278,15 +278,15 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars self.widget.removeClass('float-right'); } - // find the first parent element that has a static css positioning - if (parent.css('position') !== 'static') { + // find the first parent element that has a relative css positioning + if (parent.css('position') !== 'relative') { parent = parent.parents().filter(function () { - return $(this).css('position') === 'static'; + return $(this).css('position') === 'relative'; }).first(); } if (parent.length === 0) { - throw new Error('datetimepicker component should be placed within a static positioned container'); + throw new Error('datetimepicker component should be placed within a relative positioned container'); } self.widget.css({
datetimepicker component should be placed within a relative positioned container
tempusdominus_bootstrap-4
train
js
514769b4d0f120cbca4e6f7ff77b3aba72892c98
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -75,7 +75,7 @@ setup( author_email="me@syrusakbary.com", license="MIT", classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Topic :: Software Development :: Libraries", "Programming Language :: Python :: 3",
setup.py upgrade development status to production/stable
graphql-python_gql
train
py
1a0b20b63618f68a0e511ae66a45729f31aaabfc
diff --git a/django_markdown/static/django_markdown/markdown.js b/django_markdown/static/django_markdown/markdown.js index <HASH>..<HASH> 100644 --- a/django_markdown/static/django_markdown/markdown.js +++ b/django_markdown/static/django_markdown/markdown.js @@ -101,6 +101,16 @@ miu = (function($){ * Editor instance: default mIu settings extended with what you passed to miu.init(..., extraSettings) * */ var editorSettings = $.extend(settings, extraSettings); + + /* + * Initialize/re-initialize the editor + * */ + function init(){ + with($('#' + textareaId)){ + markItUpRemove(); + markItUp(editorSettings); + } + } /* * Dynamicaly adds button to the editor at index position @@ -128,20 +138,11 @@ miu = (function($){ function config(newSettings){ if(newSettings){ editorSettings = newSettings; + init(); } return editorSettings; } - /* - * Initialize/re-initialize the editor - * */ - function init(){ - with($('#' + textareaId)){ - markItUpRemove(); - markItUp(editorSettings); - } - } - /* ----- initializing ------ */ this.addButton = addButton;
Reinit JS editor after new settings set
sv0_django-markdown-app
train
js
ac3f925120c235ca04058254a5c2a14d883a0d00
diff --git a/CHANGELOG.md b/CHANGELOG.md index <HASH>..<HASH> 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.0.0 + +- breaking change: the key "id" is not required anymore in the loaded data and + as such has been removed from the geojson Feature root. + ## 1.0.0-rc.4 - housenumbers are not indexed anymore (to gain RAM), they are only matched in @@ -37,6 +42,8 @@ and reindex everything. `index` and `deindex` methods - endpoints API changed - by default, documents are now stored in a separate Redis database +- the key "id" is not required anymore in the loaded data and as such has been + removed from the geojson Feature root. ### Minor changes diff --git a/addok/helpers/formatters.py b/addok/helpers/formatters.py index <HASH>..<HASH> 100644 --- a/addok/helpers/formatters.py +++ b/addok/helpers/formatters.py @@ -25,5 +25,4 @@ def geojson(result): "coordinates": [float(result.lon), float(result.lat)] }, "properties": properties, - "id": result.id } diff --git a/tests/test_search.py b/tests/test_search.py index <HASH>..<HASH> 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -1,5 +1,3 @@ -import pytest - from addok.core import Result, search
BREAKING: remove "id" from the geojson Feature root
addok_addok
train
md,py,py
513675bc5b9be6eda48983cb5c8b4ad4d42c9efb
diff --git a/workflow/executor/executor.go b/workflow/executor/executor.go index <HASH>..<HASH> 100644 --- a/workflow/executor/executor.go +++ b/workflow/executor/executor.go @@ -40,6 +40,13 @@ import ( os_specific "github.com/argoproj/argo/workflow/executor/os-specific" ) +var MainContainerStartRetry = wait.Backoff{ + Steps: 8, + Duration: 1 * time.Second, + Factor: 1.0, + Jitter: 0.1, +} + const ( // This directory temporarily stores the tarballs of the artifacts before uploading tempOutArtDir = "/tmp/argo/outputs/artifacts" @@ -936,7 +943,18 @@ func (we *WorkflowExecutor) waitMainContainerStart() (string, error) { opts := metav1.ListOptions{ FieldSelector: fieldSelector.String(), } - watchIf, err := podsIf.Watch(opts) + + var err error + var watchIf watch.Interface + + err = wait.ExponentialBackoff(MainContainerStartRetry, func() (bool, error) { + watchIf, err = podsIf.Watch(opts) + if err != nil { + log.Debugf("Failed to establish watch, retrying: %v", err) + return false, nil + } + return true, nil + }) if err != nil { return "", errors.InternalWrapErrorf(err, "Failed to establish pod watch: %v", err) }
fix(executor): Add retry on pods watch to handle timeout. (#<I>)
argoproj_argo
train
go
ece11d3d036a63563ac1fb5efed658fe0ed4aacf
diff --git a/sentry_hipchat_ac/cards.py b/sentry_hipchat_ac/cards.py index <HASH>..<HASH> 100644 --- a/sentry_hipchat_ac/cards.py +++ b/sentry_hipchat_ac/cards.py @@ -4,9 +4,9 @@ from django.utils.html import escape from sentry.models import Activity, User, Event -ICON = 'https://s3.amazonaws.com/f.cl.ly/items/0X2q0W011B1i1m2D140m/sentry-icon.png' -ICON2X = 'https://s3.amazonaws.com/f.cl.ly/items/0X2q0W011B1i1m2D140m/sentry-icon.png' -ICON_SM = 'https://app.getsentry.com/_static/sentry/images/favicon.ico' +ICON = 'https://sentry-hipchat-ac-assets.s3.amazonaws.com/sentry-icon.png' +ICON2X = 'https://sentry-hipchat-ac-assets.s3.amazonaws.com/sentry-icon.png' +ICON_SM = 'https://sentry-hipchat-ac-assets.s3.amazonaws.com/favicon.ico' COLORS = { 'ALERT': 'red',
Pin image urls to static location Fixes #<I>
getsentry_sentry-hipchat-ac
train
py
89148d169ebceb693140aefa71bba0de5f7221fd
diff --git a/pogobuf/pogobuf.client.js b/pogobuf/pogobuf.client.js index <HASH>..<HASH> 100755 --- a/pogobuf/pogobuf.client.js +++ b/pogobuf/pogobuf.client.js @@ -828,7 +828,6 @@ function Client(options) { this.authTicket = null; this.rpcId = 2; this.lastHashingKeyIndex = 0; - this.firstGetMapObjects = true; this.lehmer = new Lehmer(1); /**
:lipstick: Remove inadvertently added variable
cyraxx_pogobuf
train
js
2d2dbbc32447d62b0dc2e1b3dd578ba1642b38dc
diff --git a/tests/YoutubeDlTest.php b/tests/YoutubeDlTest.php index <HASH>..<HASH> 100644 --- a/tests/YoutubeDlTest.php +++ b/tests/YoutubeDlTest.php @@ -367,7 +367,7 @@ class YoutubeDlTest extends TestCase $collection = $yt->download(Options::create()->cleanupMetadata(true)->downloadPath($this->tmpDir)->url($url)); foreach ($collection->getVideos() as $video) { - self::assertFileNotExists($video->getMetadataFile()->getPathname()); + self::assertFileDoesNotExist($video->getMetadataFile()->getPathname()); } }
Don't use deprecated method in test
norkunas_youtube-dl-php
train
php
22a70c56a87f7dd29f4ea089381db48583aa8ed7
diff --git a/src/cli.js b/src/cli.js index <HASH>..<HASH> 100644 --- a/src/cli.js +++ b/src/cli.js @@ -45,8 +45,8 @@ const entries = getEntries(command) const outputFileMatrix = getOutputMatrix(command, PKG_CONFIG) async function bundleAll() { - if (!outputFileMatrix.main) { - console.warn(chalk.red.bold("Missing `main` entry in `package.json`!")) + if (!outputFileMatrix.main && !entries.binary) { + console.warn(chalk.red.bold("Missing `main` or `bin` entry in `package.json`!")) } if (entries.node) {
Improved feedback when bundling plain cli apps.
sebastian-software_preppy
train
js
93f0981d3016e0f2a2e041b5e0e4478ac59cfc17
diff --git a/client/html/src/Client/Html/Catalog/Base.php b/client/html/src/Client/Html/Catalog/Base.php index <HASH>..<HASH> 100644 --- a/client/html/src/Client/Html/Catalog/Base.php +++ b/client/html/src/Client/Html/Catalog/Base.php @@ -34,11 +34,21 @@ abstract class Base */ protected function addAttributeFilterByParam( array $params, \Aimeos\MW\Criteria\Iface $filter ) { - $attrids = ( isset( $params['f_attrid'] ) ? (array) $params['f_attrid'] : array() ); + $attrids = array(); + + if( isset( $params['f_attrid'] ) ) + { + foreach( (array) $params['f_attrid'] as $attrid ) + { + if( $attrid != '' ) { + $attrids[] = (int) $attrid; + } + } + } if( !empty( $attrids ) ) { - $func = $filter->createFunction( 'index.attributeaggregate', array( array_keys( $attrids ) ) ); + $func = $filter->createFunction( 'index.attributeaggregate', array( $attrids ) ); $expr = array( $filter->getConditions(), $filter->compare( '==', $func, count( $attrids ) ),
Allow attribute facets sent via form select
aimeos_ai-client-html
train
php
01dacac90051e75cf068cc12b02b31119749f1f0
diff --git a/lib/collection/url.js b/lib/collection/url.js index <HASH>..<HASH> 100644 --- a/lib/collection/url.js +++ b/lib/collection/url.js @@ -287,9 +287,12 @@ _.extend(Url, /** @lends Url */ { _.isString(p.port) && (url = url.substr(p.port.length + 1)); // extract the path - p.path = url.match(/.*?(?=\?|#|$)/); - p.path = _.get(p.path, '[0]'); - _.isString(p.path) && ((url = url.substr(p.path.length)), (p.path = p.path.split('/'))); + p.path = _.get(url.match(/.*?(?=\?|#|$)/), '[0]'); + if (_.isString(p.path)) { + url = url.substr(p.path.length); + // if path is blank string, we set it to undefined, if '/' then single blank string array + p.path = !p.path ? undefined : (p.path === '/' ? [''] : p.path.split('/')); + } // extract the query string p.query = url.match(/^\?([^#$]+)/);
Fixed path parsing where path splitting was not being done correctly
postmanlabs_postman-collection
train
js
d751093e276cf255f0b92f84633aef82b12823b5
diff --git a/scripts/install-dependencies.py b/scripts/install-dependencies.py index <HASH>..<HASH> 100644 --- a/scripts/install-dependencies.py +++ b/scripts/install-dependencies.py @@ -13,7 +13,7 @@ home = os.path.expanduser('~') dot_learnuv = os.path.join(home, '.learnuv') def log_info(msg): - print '\033[0;32mlearnuv\033[0m ' + msg + print('\033[0;32mlearnuv\033[0m ' + msg) def mkdirp(dir): try:
Fix install-dependencies.py `npm install` does not fork on python ><I> ```File "scripts/install-dependencies.py", line <I> print '\<I>[0;<I>mlearnuv\<I>[0m ' + msg```
thlorenz_learnuv
train
py
81efda052d5a94f4f534d2112f3eae8b15852306
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup( name='slacker', - version='0.8.6', + version='0.8.6.2', packages=['slacker'], description='Slack API client', author='Oktay Sancak',
Set version number to <I>.
os_slacker
train
py
30a9d5227760132f5820ea0ff4337daecf7214e4
diff --git a/lib/version.js b/lib/version.js index <HASH>..<HASH> 100644 --- a/lib/version.js +++ b/lib/version.js @@ -652,8 +652,34 @@ program print("Current version of " + configuration.name + ": " + configuration.currentVersion, "completed", "spaced22"); } + var textLength; + var spaces; + var spacesLength; + configuration.filesList.forEach(function(file, index) { - print((index + 1) + " - " + file, "important", "spaced22"); + var fileData = file.split(':'); + var fileName = fileData[0]; + var fileType = fileData[1]; + + if (!fileType) { + fileType = 'normal'; + } + + spaces = ""; + textLength = (index + 1).toString().length + fileName.length; + spacesLength = 50 - textLength; + + if (spacesLength > 0) { + while (spacesLength > 0) { + spaces = spaces + " "; + spacesLength--; + } + } + else { + spaces = " "; + } + + print((index + 1) + " - " + fileName + spaces + '[' + fileType + ']', "important", "spaced22"); filesCounter++; });
support for file listing with versioning type
Cerealkillerway_versionUpdater
train
js
bbfadcda6bb6c0d9a2b05a174b12c269e2ebc661
diff --git a/lib/how_is/report.rb b/lib/how_is/report.rb index <HASH>..<HASH> 100644 --- a/lib/how_is/report.rb +++ b/lib/how_is/report.rb @@ -18,7 +18,6 @@ module HowIs @travis = HowIs::Sources::Travis.new(repository, end_date) end - def to_h(frontmatter_data = nil) @report_hash ||= { title: "How is #{@repository}?",
use only one blank line between methods.
duckinator_inq
train
rb
43867b8887dc38cbc03602cbc15f051e8e90b75a
diff --git a/src/tr/passwords.php b/src/tr/passwords.php index <HASH>..<HASH> 100644 --- a/src/tr/passwords.php +++ b/src/tr/passwords.php @@ -15,7 +15,7 @@ return [ 'password' => 'Parolanız en az altı karakter olmalı ve doğrulama ile eşleşmelidir.', 'reset' => 'Parolanız sıfırlandı!', 'sent' => 'Parola sıfırlama bağlantınız e-posta ile gönderildi!', - 'throttled' => 'Please wait before retrying.', + 'throttled' => 'Lütfen tekrar denemeden önce bekleyiniz.', 'token' => 'Parola sıfırlama adresi/kodu geçersiz.', 'user' => 'Bu e-posta adresi ile kayıtlı bir üye bulunmuyor.', ];
[tr] Updated passwords.php
caouecs_Laravel-lang
train
php
b9f17939fbe014dad47abaa31da806d9088954c2
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -24,13 +24,14 @@ function HTMLScreenshotReporter(options) { self.specStarted = function (spec) { var featureName = spec.fullName.replace(spec.description, ''); spec.description = __featureDenominator + featureName + __scenarioDenominator + spec.description; + browser.currentTest = spec.description; if(browser.browserName){ spec.description += '|' + browser.browserName; + browser.currentTest += '|' + browser.browserName; if(browser.browserVersion){ spec.description += '-' + browser.version; } } - browser.currentTest = spec.description; }; self.specDone = function (spec) {
Now the browser.currentTest does not care about the browser version
Andre-H_ruru-protractor-html-screenshot-reporter
train
js
193473fd4c5bd0e43ad8547cb058602731a412d3
diff --git a/src/Illuminate/Session/SessionManager.php b/src/Illuminate/Session/SessionManager.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Session/SessionManager.php +++ b/src/Illuminate/Session/SessionManager.php @@ -70,7 +70,7 @@ class SessionManager extends Manager { { $connection = $this->getDatabaseConnection(); - $table = $connection->getTablePrefix().$this->app['config']['session.table']; + $table = $this->app['config']['session.table']; return $this->buildSession(new DatabaseSessionHandler($connection, $table)); }
Table prefix was added twice If a table prefix was set in the database config, this code caused the prefix to be added twice: once here and once in the call to the database engine inside `DatabaseSessionHandler`. refs #<I> on the correct branch.
laravel_framework
train
php
24c716cac35b0c5476944108e545058749c43e61
diff --git a/commands/new_theme.go b/commands/new_theme.go index <HASH>..<HASH> 100644 --- a/commands/new_theme.go +++ b/commands/new_theme.go @@ -38,7 +38,7 @@ func (b *commandsBuilder) newNewThemeCmd() *newThemeCmd { cmd := &cobra.Command{ Use: "theme [name]", Short: "Create a new theme", - Long: `Create a new theme (skeleton) called [name] in the current directory. + Long: `Create a new theme (skeleton) called [name] in ./themes. New theme is a skeleton. Please add content to the touched files. Add your name to the copyright line in the license and adjust the theme.toml file as you see fit.`,
Fix `new theme` command description `hugo new theme foo` creates theme `foo` in `./themes` and not in current directory.
gohugoio_hugo
train
go
f86ce2dcb6b537fba960c4ed5cc8d1c8ec5d1e4f
diff --git a/cache/stores/file/lib.php b/cache/stores/file/lib.php index <HASH>..<HASH> 100644 --- a/cache/stores/file/lib.php +++ b/cache/stores/file/lib.php @@ -308,9 +308,13 @@ class cachestore_file implements cache_store, cache_is_key_aware { public function delete($key) { $filename = $key.'.cache'; $file = $this->path.'/'.$filename; - $result = @unlink($file); - unset($this->keys[$filename]); - return $result; + + if (@unlink($file)) { + unset($this->keys[$filename]); + return true; + } + + return false; } /**
MDL-<I> Improved the deletion logic to preserve the 'prescan' setting
moodle_moodle
train
php
56e528080ae8510104adb5626e361853830c556c
diff --git a/lib/classes/command-bus.js b/lib/classes/command-bus.js index <HASH>..<HASH> 100644 --- a/lib/classes/command-bus.js +++ b/lib/classes/command-bus.js @@ -1,7 +1,6 @@ 'use strict'; const Promise = require(`bluebird`); -const EventEmitter = require(`events`); const StackedError = require(`./stacked-error`); const ProgrammerError = require(`./programmer-error`); @@ -13,9 +12,6 @@ class CommandBus { Object.defineProperties(this, { _commandRoutes: { value: [] - }, - _emitter: { - value: new EventEmitter() } }); } @@ -40,8 +36,8 @@ class CommandBus { if (!isNonEmptyString(type)) { throw new ProgrammerError(`CommandBus#command() requires an type String`); } - if (!isNonEmptyString(pattern)) { - throw new ProgrammerError(`CommandBus#command() requires an pattern String`); + if (!isNonEmptyString(patternString)) { + throw new ProgrammerError(`CommandBus#command() requires a patternString`); } patternString = `${type}:${patternString}`; @@ -49,7 +45,7 @@ class CommandBus { if (!match) { return Promise.reject(new ProgrammerError( - `CommandBus has no handler for ${pattern}` + `CommandBus has no handler for ${patternString}` )); }
Remove unsued _emitter from CommandBus Changes to be committed: modified: lib/classes/command-bus.js
kixxauth_kixx
train
js
483fdf465fd9ec1f278166777fe5042796f04f53
diff --git a/lib/csvconverter/strings2csv.rb b/lib/csvconverter/strings2csv.rb index <HASH>..<HASH> 100644 --- a/lib/csvconverter/strings2csv.rb +++ b/lib/csvconverter/strings2csv.rb @@ -15,7 +15,8 @@ class Strings2CSV < Base2Csv # Load all strings of a given file def load_strings(strings_filename) strings = ORDERED_HASH_CLASS.new - + + contents = File.open(strings_filename).read contents.each_line do |line| hash = self.parse_dotstrings_line(line) strings.merge!(hash) if hash
Fixes error after deactivate utf8 fix
netbe_Babelish
train
rb
14e320329f756b7d8e298c4e2251d8a0b194c9c4
diff --git a/datasette/database.py b/datasette/database.py index <HASH>..<HASH> 100644 --- a/datasette/database.py +++ b/datasette/database.py @@ -365,6 +365,9 @@ class Database: "sqlite_sequence", "views_geometry_columns", "virts_geometry_columns", + "data_licenses", + "KNN", + "KNN2", ] + [ r[0] for r in (
Hidden tables data_licenses, KNN, KNN2 for SpatiaLite, closes #<I>
simonw_datasette
train
py
1f65f52b2d928ab86245d3e97cff6362858c4919
diff --git a/basket.php b/basket.php index <HASH>..<HASH> 100644 --- a/basket.php +++ b/basket.php @@ -229,7 +229,8 @@ class Basket extends Magic { **/ function __construct($key='basket') { $this->key=$key; - @session_start(); + if (session_status()!=PHP_SESSION_ACTIVE) + session_start(); Base::instance()->sync('SESSION'); $this->reset(); }
Avoid error suppression in all session_start directives
bcosca_fatfree-core
train
php
feac1b8a4e10794ecf6c8108168aa295513d2ffb
diff --git a/lib/rubocop/config.rb b/lib/rubocop/config.rb index <HASH>..<HASH> 100644 --- a/lib/rubocop/config.rb +++ b/lib/rubocop/config.rb @@ -242,7 +242,7 @@ module RuboCop return nil unless loaded_path base_path = base_dir_for_path_parameters - ['gems.locked', 'Gemfile.lock'].each do |file_name| + ['Gemfile.lock', 'gems.locked'].each do |file_name| path = find_file_upwards(file_name, base_path) return path if path end
Find Gemfile.lock before gems.locked Generally named Gemfile.lock instead of gems.locked. So finding in gems.locked is redundant most of the time. There was once a proposal to deprecate Gemfile and become gems.rb in past Bundler 2 development, but that has been abandoned.
rubocop-hq_rubocop
train
rb
42096755eed4289184c11b03ba16abc1975ef974
diff --git a/bigcommerce/connection.py b/bigcommerce/connection.py index <HASH>..<HASH> 100644 --- a/bigcommerce/connection.py +++ b/bigcommerce/connection.py @@ -239,7 +239,9 @@ class OAuthConnection(Connection): client_secret, algorithms=["HS256"], audience=client_id, - verify_iss=False) + options={ + 'verify_iss': False + }) def fetch_token(self, client_secret, code, context, scope, redirect_uri, token_url='https://login.bigcommerce.com/oauth2/token'):
Fixed issue with the `verify_iss` argument passed to jwt.decode(). Error Occurred with jwt.decode() option `verify_iss=False` passed. ``` JWT verification failed: decode() got an unexpected keyword argument 'verify_iss' Payload verification failed! ```
bigcommerce_bigcommerce-api-python
train
py
ee403f003e4614baab6219bedb19f5c15a6a1225
diff --git a/skflow/estimators/base.py b/skflow/estimators/base.py index <HASH>..<HASH> 100644 --- a/skflow/estimators/base.py +++ b/skflow/estimators/base.py @@ -115,9 +115,11 @@ class TensorFlowEstimator(BaseEstimator): tf.as_dtype(self._data_feeder.output_dtype), output_shape, name="output") - # Add histograms for X and y. - tf.histogram_summary("X", self._inp) - tf.histogram_summary("y", self._out) + # Add histograms for X and y if they are floats. + if self._data_feeder.input_dtype in (np.float32, np.float64): + tf.histogram_summary("X", self._inp) + if self._data_feeder.output_dtype in (np.float32, np.float64): + tf.histogram_summary("y", self._out) # Create model's graph. self._model_predictions, self._model_loss = self.model_fn(
Ref #<I>: Update histograms for X and y only if they are floats
tensorflow_skflow
train
py
c7e0b1fda014b22ded7ef853563d3381388325e6
diff --git a/lib/jekyll_pages_api_search/version.rb b/lib/jekyll_pages_api_search/version.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll_pages_api_search/version.rb +++ b/lib/jekyll_pages_api_search/version.rb @@ -1,5 +1,5 @@ # @author Mike Bland (michael.bland@gsa.gov) module JekyllPagesApiSearch - VERSION = '0.4.1' + VERSION = '0.4.2' end
Bump to <I> Enables the `placeholder` config feature to set the widget placeholder text.
mbland_jekyll_pages_api_search
train
rb
ad5606566413545abed89b66631ab156e9f3d624
diff --git a/src/core/AnimatedNode.js b/src/core/AnimatedNode.js index <HASH>..<HASH> 100644 --- a/src/core/AnimatedNode.js +++ b/src/core/AnimatedNode.js @@ -179,7 +179,7 @@ export default class AnimatedNode { if (ReanimatedModule.connectNodes) { ReanimatedModule.connectNodes(this.__nodeID, child.__nodeID); } else { - this.__dangerouslyRescheduleEvaluate(); + child.__dangerouslyRescheduleEvaluate(); } } @@ -189,7 +189,10 @@ export default class AnimatedNode { console.warn("Trying to remove a child that doesn't exist"); return; } - ReanimatedModule.disconnectNodes(this.__nodeID, child.__nodeID); + + if (ReanimatedModule.disconnectNodes) { + ReanimatedModule.disconnectNodes(this.__nodeID, child.__nodeID); + } this.__children.splice(index, 1); if (this.__children.length === 0) {
[web] Fix parity issue between native addChild and JS addChild (#<I>)
kmagiera_react-native-reanimated
train
js
1baa956da1d328044614a22bda3b6e5e4dca2638
diff --git a/salt/states/file.py b/salt/states/file.py index <HASH>..<HASH> 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -244,13 +244,18 @@ def symlink(name, target, force=False, makedirs=False): 'changes': {}, 'result': True, 'comment': ''} - if not os.path.isdir(os.path.dirname(name)): + + pardir = os.path.abspath(os.path.join(name, os.pardir)) + + if not os.path.isdir(pardir): if makedirs: - _makedirs(name) - ret['result'] = False - ret['comment'] = ('Directory {0} for symlink is not present' + _makedirs(pardir) + else: + ret['result'] = False + ret['comment'] = ('Directory {0} for symlink is not present' .format(os.path.dirname(name))) - return ret + return ret + if os.path.islink(name): # The link exists, verify that it matches the target if not os.readlink(name) == target:
Fixed bug with the ``file.symlink`` state ``mkdirs`` option I also replaced os.path.dirname() which give inconsistent results if the path ends with a trailing slash.
saltstack_salt
train
py
82706c8ce92dfd596a99b7ffda1317fb76e5a793
diff --git a/imagen/image.py b/imagen/image.py index <HASH>..<HASH> 100644 --- a/imagen/image.py +++ b/imagen/image.py @@ -404,10 +404,9 @@ class FileImage(GenericImage): def __call__(self,**params_to_override): # Cache image to avoid channel_data being deleted before channel-specific processing completes. - params_to_override['cache_image']=True p = param.ParamOverrides(self,params_to_override) - if not ( p.cache_image and (p._image is not None) ): + if not (p.cache_image and (p._image is not None)): self._cached_average = super(FileImage,self).__call__(**params_to_override) self._channel_data = self._process_channels(p,**params_to_override) @@ -422,6 +421,15 @@ class FileImage(GenericImage): return self._cached_average + def set_matrix_dimensions(self, *args): + """ + Subclassed to delete the cached image when matrix dimensions are + changed. + """ + self._image = None + super(FileImage, self).set_matrix_dimensions(*args) + + def _get_image(self,p): file_, ext = splitext(p.filename) npy = (ext.lower() == ".npy")
Fixed bug in FileImage caching, when matrix dimensions are changed When a cached FileImage was first viewed using the default matrix dimensions and then installed on a GeneratorSheet with different dimensions, it would continue to present the cached image with wrong dimensions.
pyviz_imagen
train
py
224ecb3e71d6a76f92be44d6c0cd9ad03b011a29
diff --git a/aiohttp_apiset/swagger/router.py b/aiohttp_apiset/swagger/router.py index <HASH>..<HASH> 100644 --- a/aiohttp_apiset/swagger/router.py +++ b/aiohttp_apiset/swagger/router.py @@ -74,6 +74,7 @@ class SwaggerRouter(dispatcher.TreeUrlDispatcher): self._swagger_yaml[spec] = yaml.dump(data) self.add_route('GET', spec, self._handler_swagger_spec) self.add_route('GET', index, self._handler_swagger_ui) + self.add_route('GET', base_ui, self._handler_swagger_ui) self.add_static(base_ui, ui.STATIC_UI) ui.get_template() # warm up
swagger-ui on base_ui
aamalev_aiohttp_apiset
train
py
118a4ca2e8d0596fba679558ccb5203d9f9ebcd4
diff --git a/achilles-cql/src/main/java/info/archinnov/achilles/entity/manager/CQLEntityManagerFactory.java b/achilles-cql/src/main/java/info/archinnov/achilles/entity/manager/CQLEntityManagerFactory.java index <HASH>..<HASH> 100644 --- a/achilles-cql/src/main/java/info/archinnov/achilles/entity/manager/CQLEntityManagerFactory.java +++ b/achilles-cql/src/main/java/info/archinnov/achilles/entity/manager/CQLEntityManagerFactory.java @@ -50,6 +50,7 @@ public class CQLEntityManagerFactory extends EntityManagerFactory { daoContext = CQLDaoContextBuilder.builder(session).build(entityMetaMap, hasSimpleCounter); contextFactory = new CQLPersistenceContextFactory(daoContext, configContext, entityMetaMap); + registerShutdownHook(cluster); } /** @@ -92,4 +93,16 @@ public class CQLEntityManagerFactory extends EntityManagerFactory { return new CQLConsistencyLevelPolicy(defaultReadConsistencyLevel, defaultWriteConsistencyLevel, readConsistencyMap, writeConsistencyMap); } + + private void registerShutdownHook(final Cluster cluster) + { + Runtime.getRuntime().addShutdownHook(new Thread() + { + @Override + public void run() + { + cluster.shutdown(); + } + }); + } }
Add shutdown hook on Cluster of Java Driver core for gracefull stop
doanduyhai_Achilles
train
java
94d7a0e35263da1e51e869919fa43cb9c5e65857
diff --git a/lib/ronin/database/database.rb b/lib/ronin/database/database.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/database/database.rb +++ b/lib/ronin/database/database.rb @@ -128,14 +128,6 @@ module Ronin end # - # @return [DataMapper::Logger, nil] - # The current Database log. - # - def Database.log - @log - end - - # # Setup the Database log. # # @param [Hash] options @@ -151,15 +143,16 @@ module Ronin # The level of messages to log. # May be either `:fatal`, `:error`, `:warn`, `:info` or `:debug`. # - # @return [DataMapper::Logger] - # The new Database log. + # @return [true] + # Specifies that the log has been setup. # def Database.setup_log(options={}) path = (options[:path] || DEFAULT_LOG_PATH) stream = (options[:stream] || File.new(path,'w+')) level = (options[:level] || DEFAULT_LOG_LEVEL) - return @log = DataMapper::Logger.new(stream,level) + @log = DataMapper::Logger.new(stream,level) + return true end # @@ -204,7 +197,7 @@ module Ronin # def Database.setup(&block) # setup the database log - Database.setup_log unless Database.log + Database.setup_log unless @log # setup the database repositories Database.repositories.each do |name,uri|
Do not provide direct access to the DataMapper log.
ronin-ruby_ronin
train
rb
24e1c55bd41b1509284b1f478140724edb6705df
diff --git a/backend.js b/backend.js index <HASH>..<HASH> 100644 --- a/backend.js +++ b/backend.js @@ -128,6 +128,7 @@ Backend.prototype.buildVectorTile = function(z, x, y, callback) { var buffer = image.getData(self.dataopts); buffer.metatile = self.metatile; + buffer._vtile = image; image.clear(function(err) { callback(err, buffer); diff --git a/test/index.js b/test/index.js index <HASH>..<HASH> 100644 --- a/test/index.js +++ b/test/index.js @@ -1,3 +1,4 @@ +var mapnik = require('mapnik'); var tilestrata = require('tilestrata'); var assertVTile = require('./utils/assertVTile.js'); var TileServer = tilestrata.TileServer; @@ -22,6 +23,8 @@ describe('Provider Implementation "vtile"', function() { if (err) throw err; assert.deepEqual(headers, {'Content-Type': 'application/x-protobuf'}); assert.instanceOf(buffer, Buffer); + assert.instanceOf(buffer._vtile, mapnik.VectorTile, 'buffer._vtile'); + assert.equal(buffer.metatile, 1, 'buffer.metatile'); // fs.writeFileSync(__dirname + '/fixtures/world.pbf', buffer); assertVTile(5, 5, 12, buffer, __dirname + '/fixtures/world.pbf'); done();
Attach mapnik VectorTile instance to buffer for downstream modules (to prevent re-parsing)
naturalatlas_tilestrata-vtile
train
js,js
6ddedf43c08c13275581bc8769c9b3a426e90643
diff --git a/NEMbox/menu.py b/NEMbox/menu.py index <HASH>..<HASH> 100644 --- a/NEMbox/menu.py +++ b/NEMbox/menu.py @@ -239,6 +239,10 @@ class Menu: # 播放、暂停 elif key == ord(' '): + if self.datalist[idx] == self.storage.database["songs"][str(self.player.playing_id)]: + self.player.play_and_pause(self.storage.database['player_info']['idx']) + time.sleep(0.1) + continue if datatype == 'songs': self.resume_play = False self.player.new_player_list('songs', self.title, self.datalist, -1) diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ from setuptools import setup, find_packages setup( name='NetEase-MusicBox', - version='0.1.7.0', + version='0.1.7.1', packages=find_packages(), include_package_data=True,
Fix play/pause bug when press ' ' at the same song
darknessomi_musicbox
train
py,py
0df49d0b4be82f81a60f7b97bbea9b67c8de4405
diff --git a/main/core/API/Finder/ResourceNodeFinder.php b/main/core/API/Finder/ResourceNodeFinder.php index <HASH>..<HASH> 100644 --- a/main/core/API/Finder/ResourceNodeFinder.php +++ b/main/core/API/Finder/ResourceNodeFinder.php @@ -200,4 +200,13 @@ class ResourceNodeFinder extends AbstractFinder return $qb; } + + //required for the unions + public function getExtraFieldMapping() + { + return [ + 'meta.updated' => 'creation_date', + 'meta.created' => 'modification_date', + ]; + } }
[CoreBundle] ResourceNode finder order by fix. (#<I>)
claroline_Distribution
train
php
f0ad4b57d5c1bcfd650e4b144cc86593735df750
diff --git a/static/js/admin/pads.js b/static/js/admin/pads.js index <HASH>..<HASH> 100644 --- a/static/js/admin/pads.js +++ b/static/js/admin/pads.js @@ -14,7 +14,7 @@ exports.documentReady=function(hooks, context, cb){ var room = url + "pluginfw/admin/pads"; //connect - socket = io.connect(room, {resource : resource}); + socket = io.connect(room, {path: baseURL + "socket.io", resource : resource}); $('.search-results').data('query', { pattern: '',
made socket.io path relative to the base url
spcsser_ep_adminpads
train
js
62430e6715af5b9c3dae1178381a9c024aafefe0
diff --git a/lib/websearchadminlib.py b/lib/websearchadminlib.py index <HASH>..<HASH> 100644 --- a/lib/websearchadminlib.py +++ b/lib/websearchadminlib.py @@ -38,7 +38,8 @@ from invenio.config import \ CFG_SITE_URL,\ CFG_WEBCOMMENT_ALLOW_COMMENTS,\ CFG_WEBCOMMENT_ALLOW_REVIEWS,\ - CFG_INSPIRE_SITE + CFG_INSPIRE_SITE, \ + CFG_CERN_SITE from invenio.bibrankadminlib import \ write_outcome, \ modify_translations, \ @@ -3452,6 +3453,12 @@ def get_detailed_page_tabs(colID=None, recID=None, ln=CFG_SITE_LANG): if len(brd.list_bibdocs('Plot')) == 0: tabs['plots']['enabled'] = False + if CFG_CERN_SITE: + from invenio.search_engine import get_collection_reclist + if recID in get_collection_reclist("Books & Proceedings"): + tabs['holdings']['visible'] = True + tabs['holdings']['enabled'] = True + tabs[''] = tabs['metadata'] del tabs['metadata']
WebSearch: CERN-specific enabling of holdings tab * Display "holdings" tab when viewing record belonging to "Books & Proceedings" collection at CERN.
inveniosoftware_invenio-records
train
py
70ac27c2fb073b00eec65548d1e94d9c3ef0bdbe
diff --git a/azurerm/internal/services/storage/tests/data_source_storage_container_test.go b/azurerm/internal/services/storage/tests/data_source_storage_container_test.go index <HASH>..<HASH> 100644 --- a/azurerm/internal/services/storage/tests/data_source_storage_container_test.go +++ b/azurerm/internal/services/storage/tests/data_source_storage_container_test.go @@ -20,7 +20,6 @@ func TestAccDataSourceArmStorageContainer_basic(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(data.ResourceName, "container_access_type", "private"), resource.TestCheckResourceAttr(data.ResourceName, "has_immutability_policy", "false"), - resource.TestCheckResourceAttr(data.ResourceName, "storage_account_name", "acctestsadsc"+data.RandomString), resource.TestCheckResourceAttr(data.ResourceName, "metadata.%", "2"), resource.TestCheckResourceAttr(data.ResourceName, "metadata.k1", "v1"), resource.TestCheckResourceAttr(data.ResourceName, "metadata.k2", "v2"),
removing the check for storage_account_name this is required to lookup the data source, so if it's omited the test'll fail at another point
terraform-providers_terraform-provider-azurerm
train
go
734f60961cb1e7b4cdd17bc9b0e1a6f0af487ceb
diff --git a/tests/test_webdriver_firefox.py b/tests/test_webdriver_firefox.py index <HASH>..<HASH> 100644 --- a/tests/test_webdriver_firefox.py +++ b/tests/test_webdriver_firefox.py @@ -37,6 +37,13 @@ class FirefoxBrowserTest(WebDriverTests, unittest.TestCase): assert_equals(alert.text, 'This is an alert example.') alert.accept() + def test_acess_alerts_and_dismiss_them(self): + self.browser.visit(EXAMPLE_APP + 'alert') + self.browser.find_by_tag('h1').first.click() + alert = self.browser.get_alert() + assert_equals(alert.text, 'This is an alert example.') + alert.dismiss() + def test_access_prompts_and_be_able_to_fill_then(self): self.browser.visit(EXAMPLE_APP + 'alert') self.browser.find_by_tag('h2').first.click()
Missing test for "dismiss" feature on alert elements
cobrateam_splinter
train
py
6d8252eaf3658ff43586e98b9b97d590e64489cc
diff --git a/lib/dynflow/web_console.rb b/lib/dynflow/web_console.rb index <HASH>..<HASH> 100644 --- a/lib/dynflow/web_console.rb +++ b/lib/dynflow/web_console.rb @@ -213,7 +213,7 @@ module Dynflow filters = params[:filters] elsif supported_filter?('state') - filters = { 'state' => ExecutionPlan.states.map(&:to_s) } + filters = { 'state' => ExecutionPlan.states.map(&:to_s) - ['stopped'] } else filters = {} end
'stopped' should not be included in defaults
Dynflow_dynflow
train
rb
b80310924ea20c25dd0646ee14c791de7cec3c3a
diff --git a/grunt/shell.js b/grunt/shell.js index <HASH>..<HASH> 100644 --- a/grunt/shell.js +++ b/grunt/shell.js @@ -6,14 +6,14 @@ module.exports = function (grunt, options) { stdout: true }, selenium: { - command: 'node_modules/protractor/bin/webdriver-manager start', + command: 'node node_modules/protractor/bin/webdriver-manager start', options: { stdout: false, async: true } }, protractor_update: { - command: 'node_modules/protractor/bin/webdriver-manager update' + command: 'node node_modules/protractor/bin/webdriver-manager update' }, npm_install: { command: 'npm install'
Fix errors launching protractor from Grunt on Windows.
tombatossals_angular-leaflet-directive
train
js
5959fe399bd2191cc04ee0a8c4f894d8e27da682
diff --git a/src/Event/Http/FpmHandler.php b/src/Event/Http/FpmHandler.php index <HASH>..<HASH> 100644 --- a/src/Event/Http/FpmHandler.php +++ b/src/Event/Http/FpmHandler.php @@ -32,6 +32,11 @@ final class FpmHandler extends HttpHandler private const SOCKET = '/tmp/.bref/php-fpm.sock'; private const PID_FILE = '/tmp/.bref/php-fpm.pid'; private const CONFIG = '/opt/bref/etc/php-fpm.conf'; + /** + * We define this constant instead of using the PHP one because that avoids + * depending on the pcntl extension. + */ + private const SIGTERM = 15; /** @var Client|null */ private $client; @@ -243,7 +248,7 @@ final class FpmHandler extends HttpHandler echo "PHP-FPM seems to be running already. This might be because Lambda stopped the bootstrap process but didn't leave us an opportunity to stop PHP-FPM (did Lambda timeout?). Stopping PHP-FPM now to restart from a blank slate.\n"; // The previous PHP-FPM process is running, let's try to kill it properly - $result = posix_kill($pid, SIGTERM); + $result = posix_kill($pid, self::SIGTERM); if ($result === false) { echo "PHP-FPM's PID file contained a PID that doesn't exist, assuming PHP-FPM isn't running.\n"; unlink(self::SOCKET);
Remove a dependency to the pcntl extension
mnapoli_bref
train
php
f14cd2eed150bf9e1899c7dfd3962c34236e85cd
diff --git a/js/models/threads.js b/js/models/threads.js index <HASH>..<HASH> 100644 --- a/js/models/threads.js +++ b/js/models/threads.js @@ -15,7 +15,7 @@ var Whisper = Whisper || {}; }, validate: function(attributes, options) { - var required = ['id', 'type', 'timestamp', 'image', 'name']; + var required = ['type', 'timestamp', 'image', 'name']; var missing = _.filter(required, function(attr) { return !attributes[attr]; }); if (missing.length) { return "Thread must have " + missing; } },
Don't validate presence of thread id It's undefined until the first save();
ForstaLabs_librelay-node
train
js
5197f4b13164d8011290ba4bd777b890d9992b87
diff --git a/PHP/Reflect.php b/PHP/Reflect.php index <HASH>..<HASH> 100644 --- a/PHP/Reflect.php +++ b/PHP/Reflect.php @@ -791,6 +791,7 @@ class PHP_Reflect implements ArrayAccess $tokenName = 'T_TRAIT_C'; } elseif (strcasecmp($text, 'trait') == 0 && $trait === false + && $this->tokens[$id - 1][0] != 'T_OBJECT_OPERATOR' ) { $tokenName = 'T_TRAIT'; } elseif (strcasecmp($text, 'insteadof') == 0) {
avoid wrong trait detection if source code used a class property named trait
llaville_php-reflect
train
php
b7679957eb47d80c7e075e160b4609ab15ec8a96
diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php index <HASH>..<HASH> 100755 --- a/mod/scorm/lib.php +++ b/mod/scorm/lib.php @@ -236,25 +236,25 @@ function scorm_user_outline($course, $user, $mod, $scorm) { } } switch ($scorm->grademethod) { - case VALUEHIGHEST: + case GRADEHIGHEST: if ($scores->values > 0) { $return->info = get_string('score','scorm').':&nbsp;'.$scores->max; $return->time = $scores->lastmodify; } break; - case VALUEAVERAGE: + case GRADEAVERAGE: if ($scores->values > 0) { $return->info = get_string('score','scorm').':&nbsp;'.$scores->sum/$scores->values; $return->time = $scores->lastmodify; } break; - case VALUESUM: + case GRADESUM: if ($scores->values > 0) { $return->info = get_string('score','scorm').':&nbsp;'.$scores->sum; $return->time = $scores->lastmodify; } break; - case VALUESCOES: + case GRADESCOES: $return->info = ''; $scores->notattempted = $scores->count; if (isset($scores->completed)) {
Fixed modified names for some constants [Bug <I>]
moodle_moodle
train
php
3d2e97f76b461bf8799b8590f7dde7e185939e2a
diff --git a/persephone/run.py b/persephone/run.py index <HASH>..<HASH> 100644 --- a/persephone/run.py +++ b/persephone/run.py @@ -236,7 +236,7 @@ def train_ready(corpus): exp_dir = prep_exp_dir() model = get_simple_model(exp_dir, corpus) - model.train(min_epochs=10, early_stopping_steps=3) + model.train(min_epochs=20, early_stopping_steps=3) def transcribe(model_path, corpus): """ Applies a trained model to untranscribed data in a Corpus. """
Increased min_epochs to <I> for tutorial.
persephone-tools_persephone
train
py
da2db5ff32176a7c59d4ef9de58df497cd77e9a2
diff --git a/ginkgo/main.go b/ginkgo/main.go index <HASH>..<HASH> 100644 --- a/ginkgo/main.go +++ b/ginkgo/main.go @@ -42,6 +42,7 @@ import ( "fmt" "github.com/onsi/ginkgo/config" "os" + "time" ) var numCPU int @@ -84,13 +85,16 @@ func main() { os.Exit(1) } + t := time.Now() runner := newTestRunner(numCPU, recurse, runMagicI, race, cover) passed := runner.run() + fmt.Printf("\nGinkgo ran in %s\n", time.Since(t)) if passed { + fmt.Printf("Test Suite Passed\n") os.Exit(0) } else { - fmt.Printf("\nTest Suite Failed\n") + fmt.Printf("Test Suite Failed\n") os.Exit(1) } }
added timing information to ginkgo runs
onsi_ginkgo
train
go
386f665b492f4f3df3abfb647dafaec35327fa68
diff --git a/src/Gzero/Api/Validator/ContentValidator.php b/src/Gzero/Api/Validator/ContentValidator.php index <HASH>..<HASH> 100644 --- a/src/Gzero/Api/Validator/ContentValidator.php +++ b/src/Gzero/Api/Validator/ContentValidator.php @@ -21,7 +21,7 @@ class ContentValidator extends AbstractValidator { */ protected $rules = [ 'list' => [ - 'lang' => 'required_with:title|in:pl,en', + 'lang' => 'required_with:title,sort|in:pl,en', 'page' => 'numeric', 'perPage' => 'numeric', 'type' => 'in:content,category',
Content validator - lang field required with sort field
GrupaZero_api
train
php
05f4d402699378c44aff5e3065448ecf8a5d297c
diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py index <HASH>..<HASH> 100644 --- a/salt/client/ssh/__init__.py +++ b/salt/client/ssh/__init__.py @@ -56,11 +56,7 @@ try: HAS_WINSHELL = True except ImportError: HAS_WINSHELL = False -try: - import zmq - HAS_ZMQ = True -except ImportError: - HAS_ZMQ = False +from salt.utils.zeromq import zmq # The directory where salt thin is deployed DEFAULT_THIN_DIR = '/var/tmp/.%%USER%%_%%FQDNUUID%%_salt' @@ -207,7 +203,7 @@ class SSH(object): ''' def __init__(self, opts): pull_sock = os.path.join(opts['sock_dir'], 'master_event_pull.ipc') - if os.path.isfile(pull_sock) and HAS_ZMQ: + if os.path.exists(pull_sock) and zmq: self.event = salt.utils.event.get_event( 'master', opts['sock_dir'],
Use utility for ZMQ import handling in SSH client
saltstack_salt
train
py
a1991136fdab2700c627cb94ac8f9d4db9cc5dca
diff --git a/tornado/options.py b/tornado/options.py index <HASH>..<HASH> 100644 --- a/tornado/options.py +++ b/tornado/options.py @@ -100,10 +100,12 @@ def parse_command_line(args=None): We return all command line arguments that are not options as a list. """ if args is None: args = sys.argv + remaining = [] for i in xrange(1, len(args)): # All things after the last option are command line arguments if not args[i].startswith("-"): - return args[i:] + remaining = args[i:] + break if args[i] == "--": continue arg = args[i].lstrip("-") @@ -127,7 +129,7 @@ def parse_command_line(args=None): logging.getLogger().setLevel(getattr(logging, options.logging.upper())) enable_pretty_logging() - return [] + return remaining def parse_config_file(path, overwrite=True): @@ -307,7 +309,7 @@ def enable_pretty_logging(): return channel = logging.StreamHandler() channel.setFormatter(_ColorLogFormatter()) - logging.getLogger().addHandler(channel) + logging.getLogger().addHandler(channel) class _ColorLogFormatter(logging.Formatter):
Make parse_command_line initialize logging even when there are non-option arguments.
tornadoweb_tornado
train
py
6c22846ab056e7e732e4e1f18cd4b787af14d819
diff --git a/scripts/garp.php b/scripts/garp.php index <HASH>..<HASH> 100755 --- a/scripts/garp.php +++ b/scripts/garp.php @@ -118,9 +118,12 @@ if (empty($args[0])) { /** * Read STDIN */ -stream_set_blocking(STDIN, false); -$stdin = trim(stream_get_contents(STDIN)); -stream_set_blocking(STDIN, true); +$stdin = ''; +if (!posix_isatty(STDIN)) { + stream_set_blocking(STDIN, true); + stream_set_timeout(STDIN, 1); + $stdin = trim(stream_get_contents(STDIN)); +} /* Construct command classname */ $classArgument = ucfirst($args[0]);
Check for interactivity before reading STDIN posix_isatty can be used to determine wether data is being piped into a script. Using this, we can revert stream_set_blocking() to true, in order to make the script wait for all input. Specifically fixes a case where remote data (which takes a while to be downloaded) from <I>g was not being picked up by garp.php.
grrr-amsterdam_garp3
train
php
c43823633b56d58772a8aba1daa24fd1bec3350f
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> -from distutils.core import setup +try: + from setuptools import setup +except ImportError: + from distutils.core import setup from sys import version from os.path import expanduser
Ditch distutils in favor of setuptools
crodjer_paster
train
py
5163acd238025d5124daf5e9d4bb5d1b2ba88ab5
diff --git a/tpot/export_utils.py b/tpot/export_utils.py index <HASH>..<HASH> 100644 --- a/tpot/export_utils.py +++ b/tpot/export_utils.py @@ -464,6 +464,22 @@ else: {1} = {0}.copy() '''.format(operator[2], result_name) + elif operator_name == '_binarizer': + threshold = float(operator[3]) + operator_text += ''' +# Use Scikit-learn's Binarizer to scale the features +training_features = {0}.loc[training_indices].drop('class', axis=1) + +if len(training_features.columns.values) > 0: + scaler = Binarizer(threshold={1}) + scaler.fit(training_features.values.astype(np.float64)) + scaled_features = scaler.transform({0}.drop('class', axis=1).values.astype(np.float64)) + {2} = pd.DataFrame(data=scaled_features) + {2}['class'] = {0}['class'].values +else: + {2} = {0}.copy() +'''.format(operator[2], threshold, result_name) + elif operator_name == '_polynomial_features': operator_text += ''' # Use Scikit-learn's PolynomialFeatures to construct new features from the existing feature set
Add export support for _binarizer
EpistasisLab_tpot
train
py
dd5b7cfc65f0e60dfb21bb7acb815f7126a6acc8
diff --git a/tests/test_ramon.py b/tests/test_ramon.py index <HASH>..<HASH> 100644 --- a/tests/test_ramon.py +++ b/tests/test_ramon.py @@ -15,10 +15,10 @@ class TestRAMON(unittest.TestCase): if os.path.exists("1.hdf5"): os.remove("1.hdf5") - def test_create_ramon_file(self): - r = ramon.RAMONSegment(id=self.ramon_id) - r.cutout = numpy.zeros((3, 3, 3)) - self.h = ramon.ramon_to_hdf5(r) + # def test_create_ramon_file(self): + # r = ramon.RAMONSegment(id=self.ramon_id) + # r.cutout = numpy.zeros((3, 3, 3)) + # self.h = ramon.ramon_to_hdf5(r) # self.assertEqual(type(self.h), h5py.File) # Need to write to disk before this'll work
kill more tests to gruntle travis
jhuapl-boss_intern
train
py
b592eb1074bb158643bccfef45c2d47c0233f93f
diff --git a/paramiko/client.py b/paramiko/client.py index <HASH>..<HASH> 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -455,6 +455,7 @@ class SSHClient (object): if not remaining_auth_types: return two_factor = True + break except SSHException, e: saved_exception = e else: @@ -485,6 +486,7 @@ class SSHClient (object): if not remaining_auth_types: return two_factor = True + break except SSHException, e: saved_exception = e except IOError, e:
make sure to break out of key auth loop on success when doing 2-factor (cherry picked from commit 0a4aa8a9d<I>adef3b8d<I>f<I>ea<I>fc1a)
paramiko_paramiko
train
py
199795ab7e3d23c61290662547de2290176d13f1
diff --git a/spec/providers/coreIntegration/xhr.integration.src.js b/spec/providers/coreIntegration/xhr.integration.src.js index <HASH>..<HASH> 100644 --- a/spec/providers/coreIntegration/xhr.integration.src.js +++ b/spec/providers/coreIntegration/xhr.integration.src.js @@ -76,15 +76,14 @@ module.exports = function (provider, setup) { xhr.send(null); }); - //@todo Pending a valid URL that we can upload things to - xit("triggers upload events", function(done) { - dispatch.gotMessageAsync("onuploadprogress", [], function(e) { + it("triggers upload events", function(done) { + dispatch.gotMessageAsync("onuploadloadstart", [], function(e) { expect(e.lengthComputable).toEqual(jasmine.any(Boolean)); expect(e.loaded).toEqual(jasmine.any(Number)); expect(e.total).toEqual(jasmine.any(Number));; done(); }); xhr.open("POST", "http://pastebin.com/api/api_post.php", true); - xhr.send("POST"); + xhr.send({ string: "POST" }); }); };
fixed integration test for upload events on core.xhr
freedomjs_freedom
train
js
da325fc0e2b8348f839ed497384cabce39aa6e01
diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelShutdownOnTearDownTrait.php @@ -16,7 +16,9 @@ use PHPUnit\Framework\TestCase; // Auto-adapt to PHPUnit 8 that added a `void` return-type to the tearDown method if (method_exists(\ReflectionMethod::class, 'hasReturnType') && (new \ReflectionMethod(TestCase::class, 'tearDown'))->hasReturnType()) { -eval(' + eval(' + namespace Symfony\Bundle\FrameworkBundle\Test; + /** * @internal */
bug #<I> fix lost namespace in eval (fizzka) This PR was squashed before being merged into the <I> branch (closes #<I>). Discussion ---------- fix lost namespace in eval Bugfix: phpunit8 tearDown() declaration Commits ------- <I>a1ada8 fix lost namespace in eval
symfony_symfony
train
php
2cf5db4c554aaf55b836823f66f68152d1c216c1
diff --git a/modules/citrus-core/src/main/java/com/consol/citrus/validation/matcher/core/ContainsValidationMatcher.java b/modules/citrus-core/src/main/java/com/consol/citrus/validation/matcher/core/ContainsValidationMatcher.java index <HASH>..<HASH> 100644 --- a/modules/citrus-core/src/main/java/com/consol/citrus/validation/matcher/core/ContainsValidationMatcher.java +++ b/modules/citrus-core/src/main/java/com/consol/citrus/validation/matcher/core/ContainsValidationMatcher.java @@ -31,8 +31,8 @@ public class ContainsValidationMatcher implements ValidationMatcher { if (!value.contains(control)) { throw new ValidationException(this.getClass().getSimpleName() + " failed for field '" + fieldName - + "'. Received value is '" + value - + "', control value is '" + control + "'."); + + "'. Received value '" + value + + "' must contain '" + control + "'"); } } }
Improved error message on contains validation matcher
citrusframework_citrus
train
java
534636fa626a6b60c3d74a48e49cf5c6fbbb39d8
diff --git a/src/Http/RedirectBinding.php b/src/Http/RedirectBinding.php index <HASH>..<HASH> 100644 --- a/src/Http/RedirectBinding.php +++ b/src/Http/RedirectBinding.php @@ -37,11 +37,6 @@ use XMLSecurityKey; class RedirectBinding { /** - * @var \Surfnet\SamlBundle\Entity\ServiceProviderRepository - */ - private $entityRepository; - - /** * @var \Psr\Log\LoggerInterface */ private $logger; @@ -51,14 +46,19 @@ class RedirectBinding */ private $signatureVerifier; + /** + * @var \Surfnet\SamlBundle\Entity\ServiceProviderRepository + */ + private $entityRepository; + public function __construct( LoggerInterface $logger, SignatureVerifier $signatureVerifier, ServiceProviderRepository $repository = null ) { - $this->entityRepository = $repository; $this->logger = $logger; $this->signatureVerifier = $signatureVerifier; + $this->entityRepository = $repository; } /**
Minor reordering of private and assignments
OpenConext_Stepup-saml-bundle
train
php
c6830f907ebed56d67af9e368ea9c6864854b9c3
diff --git a/lib/mongoose-intl.js b/lib/mongoose-intl.js index <HASH>..<HASH> 100644 --- a/lib/mongoose-intl.js +++ b/lib/mongoose-intl.js @@ -57,7 +57,7 @@ module.exports = exports = function mongooseIntl(schema, options) { // embedded and sub-documents will use language methods from the top level document var owner = this.ownerDocument ? this.ownerDocument() : this, lang = owner.getLanguage(), - langSubDoc = this.getValue(path); + langSubDoc = (this.$__getValue || this.getValue).call(this, path); if (langSubDoc === null || langSubDoc === void 0) { return langSubDoc;
Support Mongoose >=<I> The name of the internal Mongoose function `Document#getValue` changed in <I>; adjust the plugin accordingly (maintaining compatibility with earlier versions). See: <URL>
alexsk_mongoose-intl
train
js
74b8de8809ce6b2343657a996768b96320d7c242
diff --git a/src/gulpfile.js b/src/gulpfile.js index <HASH>..<HASH> 100644 --- a/src/gulpfile.js +++ b/src/gulpfile.js @@ -4,17 +4,17 @@ elixir(function(mix) { mix.copy( 'node_modules/bootstrap/dist/fonts', - 'public/fonts' + 'public/build/fonts' ); mix.copy( 'node_modules/font-awesome/fonts', - 'public/fonts' + 'public/build/fonts' ); mix.copy( 'node_modules/ionicons/dist/fonts', - 'public/fonts' + 'public/build/fonts' ); mix.scripts([ @@ -30,8 +30,8 @@ elixir(function(mix) { '../../../node_modules/bootstrap/less/bootstrap.less', '../../../node_modules/font-awesome/less/font-awesome.less', '../../../node_modules/ionicons/dist/css/ionicons.min.css', - 'admin-lte/AdminLTE.less', - 'admin-lte/skins/_all-skins.less' + 'adminlte/AdminLTE.less', + 'adminlte/skins/_all-skins.less' ], 'public/css/vendor.css'); mix.less([
Change path tot adminlte less file Copy the fonts to build folder because we will be using elixir
syahzul_admin-theme
train
js
e6bc727fd3911379ba50dd4fdc662c3cdbc31040
diff --git a/src/Content/ContentBlocksApiV1PutRequestHandler.php b/src/Content/ContentBlocksApiV1PutRequestHandler.php index <HASH>..<HASH> 100644 --- a/src/Content/ContentBlocksApiV1PutRequestHandler.php +++ b/src/Content/ContentBlocksApiV1PutRequestHandler.php @@ -3,6 +3,7 @@ namespace LizardsAndPumpkins\Content; use LizardsAndPumpkins\Api\ApiRequestHandler; +use LizardsAndPumpkins\Content\Exception\ContentBlockContentIsMissingInRequestBodyException; use LizardsAndPumpkins\Content\Exception\ContentBlockContextIsMissingInRequestBodyException; use LizardsAndPumpkins\Http\HttpRequest; use LizardsAndPumpkins\Queue\Queue; @@ -63,7 +64,7 @@ class ContentBlocksApiV1PutRequestHandler extends ApiRequestHandler protected function validateRequestBody(array $requestBody) { if (!isset($requestBody['content'])) { - throw new ContentBlockContextIsMissingInRequestBodyException( + throw new ContentBlockContentIsMissingInRequestBodyException( 'Content block content is missing in request body.' ); }
Issue #<I>: Fix missing exception issue
lizards-and-pumpkins_catalog
train
php
15dccee12da51200d82900ee9463f716bf8f03f7
diff --git a/pkg/volume/gce_pd/gce_pd_test.go b/pkg/volume/gce_pd/gce_pd_test.go index <HASH>..<HASH> 100644 --- a/pkg/volume/gce_pd/gce_pd_test.go +++ b/pkg/volume/gce_pd/gce_pd_test.go @@ -179,6 +179,9 @@ func TestPlugin(t *testing.T) { PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete, } provisioner, err := plug.(*gcePersistentDiskPlugin).newProvisionerInternal(options, &fakePDManager{}) + if err != nil { + t.Errorf("Error creating new provisioner:%v", err) + } persistentSpec, err := provisioner.Provision() if err != nil { t.Errorf("Provision() failed: %v", err) @@ -202,6 +205,9 @@ func TestPlugin(t *testing.T) { PersistentVolume: persistentSpec, } deleter, err := plug.(*gcePersistentDiskPlugin).newDeleterInternal(volSpec, &fakePDManager{}) + if err != nil { + t.Errorf("Error creating new deleter:%v", err) + } err = deleter.Delete() if err != nil { t.Errorf("Deleter() failed: %v", err)
Fix swallowed errors in tests of gce_pd
kubernetes_kubernetes
train
go
3d87026c318fc7fca0cf0efaaa9e6708ad30c6d3
diff --git a/aeron-client/src/main/java/io/aeron/BufferBuilder.java b/aeron-client/src/main/java/io/aeron/BufferBuilder.java index <HASH>..<HASH> 100644 --- a/aeron-client/src/main/java/io/aeron/BufferBuilder.java +++ b/aeron-client/src/main/java/io/aeron/BufferBuilder.java @@ -195,6 +195,7 @@ public class BufferBuilder if (isDirect) { final ByteBuffer byteBuffer = ByteBuffer.allocateDirect(newCapacity); + byteBuffer.order(ByteOrder.LITTLE_ENDIAN); buffer.getBytes(0, byteBuffer, 0, limit); buffer.wrap(byteBuffer); }
[Java] Set the byte order in ByteBuffers for the logs to be little endian for those who would expect this.
real-logic_aeron
train
java
0ad84b2c24f2102948db6dfe22f306801438227f
diff --git a/presto-main/src/main/java/com/facebook/presto/operator/exchange/LocalExchangeSinkOperator.java b/presto-main/src/main/java/com/facebook/presto/operator/exchange/LocalExchangeSinkOperator.java index <HASH>..<HASH> 100644 --- a/presto-main/src/main/java/com/facebook/presto/operator/exchange/LocalExchangeSinkOperator.java +++ b/presto-main/src/main/java/com/facebook/presto/operator/exchange/LocalExchangeSinkOperator.java @@ -149,8 +149,8 @@ public class LocalExchangeSinkOperator { requireNonNull(page, "page is null"); page = pagePreprocessor.apply(page); - sink.addPage(page); operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); + sink.addPage(page); } @Override
Record operator output before addPage in LocalExchangeSink This minor change ensures that any Page#getSizeInBytes calculation work is done inside of LocalExchangeSinkOperator before passing the page through to LocalExchangeSink, which can be relatively more expensive to calculate from within the sink since most involve critical sections and locking. This work would have been done anyway, but doing it from within the sink operator makes it possible for that work to be avoided while holding a lock in some contexts on the other side.
prestodb_presto
train
java
f665980509699ec6e6df9ff037056473d3356e66
diff --git a/src/googleclouddebugger/version.py b/src/googleclouddebugger/version.py index <HASH>..<HASH> 100644 --- a/src/googleclouddebugger/version.py +++ b/src/googleclouddebugger/version.py @@ -4,4 +4,4 @@ # The major version should only change on breaking changes. Minor version # changes go between regular updates. Instances running debuggers with # different major versions will show up as two different debuggees. -__version__ = '2.8' +__version__ = '2.9'
Increment python debugger version in preparation for releasing <I>. ------------- Created by MOE: <URL>
GoogleCloudPlatform_cloud-debug-python
train
py
6245741f1f83c3bfb85ffc8b41d3bdc859dab791
diff --git a/tests/loaders/http.tests.js b/tests/loaders/http.tests.js index <HASH>..<HASH> 100644 --- a/tests/loaders/http.tests.js +++ b/tests/loaders/http.tests.js @@ -68,7 +68,7 @@ describe('http', function() { it('should report errors', function(done) { http({ url: 'http://localhost:9999/config' })(confabulous, function(err, config) { assert(err) - assert.equal(err.message, 'connect ECONNREFUSED 127.0.0.1:9999') + assert.ok(/connect ECONNREFUSED/.test(err.message)) done() }) })
Working around differences between local and travis
guidesmiths_confabulous
train
js
812b4215d64e1b30ee86a83a6cf316c129ed9b11
diff --git a/spec/fixtures/movie.rb b/spec/fixtures/movie.rb index <HASH>..<HASH> 100644 --- a/spec/fixtures/movie.rb +++ b/spec/fixtures/movie.rb @@ -1,5 +1,5 @@ class Movie - attr_accessor :title, :rating, :year, :country, :seen, :star_rating + attr_accessor :title, :rating, :year, :country, :seen, :star_rating, :home_formats def self.random_collection(count = 100) (1...count).map { |_| Movie.random } @@ -16,6 +16,7 @@ class Movie self.country = random_country self.seen = [true, false].sample self.star_rating = [1, 2, 3, 4, 5].sample + self.home_formats = %w(BD DVD Hulu Amazon Netflix).sample(2) end def seen?
Update fixture to give it a collection attribute home_formats will return an array of 2 of the available home formats
umn-asr_query_string_search
train
rb
217c21bf9949b8fd7ab91c1278fd4f0457394286
diff --git a/pyecoregen/ecore.py b/pyecoregen/ecore.py index <HASH>..<HASH> 100644 --- a/pyecoregen/ecore.py +++ b/pyecoregen/ecore.py @@ -93,7 +93,7 @@ class EcorePackageModuleTask(EcoreTask): attributes = itertools.chain(*(c.eAttributes for c in classes)) attributes_types = (a.eType for a in attributes) - imported |= {t for t in attributes_types if t.ePackage not in {p, ecore.eClass}} + imported |= {t for t in attributes_types if t.ePackage not in {p, ecore.eClass, None}} imported_dict = {} for classifier in imported:
Fix generation when attribute's type is not contained in a package In some cases, attributes' type can be outside a Resource and an EPackage (when build in memory). In thoses cases, as the EPackage is 'None', the code generation would raise an error.
pyecore_pyecoregen
train
py
29b5d8aa9f34ba447fee8530594393a9284c883f
diff --git a/packages/openneuro-server/datalad/draft.js b/packages/openneuro-server/datalad/draft.js index <HASH>..<HASH> 100644 --- a/packages/openneuro-server/datalad/draft.js +++ b/packages/openneuro-server/datalad/draft.js @@ -22,6 +22,7 @@ const draftFilesKey = (datasetId, revision) => { export const getDraftFiles = async (datasetId, revision, options = {}) => { // If untracked is set and true const untracked = 'untracked' in options && options.untracked + const query = untracked ? { untracked: true } : {} const filesUrl = `${uri}/datasets/${datasetId}/files` const key = draftFilesKey(datasetId, revision) return redis.get(key).then(data => { @@ -29,7 +30,7 @@ export const getDraftFiles = async (datasetId, revision, options = {}) => { else return request .get(filesUrl) - .query({ untracked }) + .query(query) .set('Accept', 'application/json') .then(({ body: { files } }) => { const filesWithUrls = files.map(addFileUrl(datasetId))
Fix query string generation for getDraftFiles.
OpenNeuroOrg_openneuro
train
js
562640dbb43195ebdfb2c1c79cac683a5d462c6f
diff --git a/examples/with-webassembly/next.config.js b/examples/with-webassembly/next.config.js index <HASH>..<HASH> 100644 --- a/examples/with-webassembly/next.config.js +++ b/examples/with-webassembly/next.config.js @@ -1,6 +1,10 @@ module.exports = { webpack(config) { config.output.webassemblyModuleFilename = 'static/wasm/[modulehash].wasm' + + // Since Webpack 5 doesn't enable WebAssembly by default, we should do it manually + config.experiments = { asyncWebAssembly: true } + return config }, }
(examples/with-webassembly) fixed for webpack 5 (#<I>) ## Documentation / Examples - [x] Make sure the linting passes Fixes #<I> As mention in #<I> `with-webassembly` example doesn't work anymore after switching to webpack 5. This PR adds webpack experimental configuration.
zeit_next.js
train
js
a062d456a659240e1ce9f45854cc1b5d0d346d7c
diff --git a/test/test_helper.rb b/test/test_helper.rb index <HASH>..<HASH> 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -38,6 +38,12 @@ class JSISpec < Minitest::Spec matcher = Regexp.new Regexp.escape matcher if String === matcher assert matcher =~ obj, msg end + + def assert_is_a mod, obj, msg = nil + msg = message(msg) { "Expected instance of #{mod}. received #{obj.class}: #{mu_pp(obj)}" } + + assert obj.is_a?(mod), msg + end end # register this to be the base class for specs instead of Minitest::Spec
JSISpec#assert_is_a, because apparently that's not something minitest feels like including
notEthan_jsi
train
rb
0e14bd026a1276b16ff39fefccfb5f0d40c0ff68
diff --git a/src/core/cb.run.project/project.js b/src/core/cb.run.project/project.js index <HASH>..<HASH> 100644 --- a/src/core/cb.run.project/project.js +++ b/src/core/cb.run.project/project.js @@ -55,7 +55,7 @@ ProjectRunner.prototype.runScript = function(projectType, port) { env: _.defaults({ PORT: port, HTTP_PORT: port - }) + }, process.env) }); // Id of our harbor port (to release)
Mixin current env variables when running a project
CodeboxIDE_codebox
train
js
5d9636edb6dd7d572d0191f3d778f35816a0d17e
diff --git a/models/ticket.php b/models/ticket.php index <HASH>..<HASH> 100644 --- a/models/ticket.php +++ b/models/ticket.php @@ -1,7 +1,7 @@ <?php class Ticket extends TORM\Model { public static function getNewPKValue() { - return mktime(); + return time(); } } diff --git a/test/modelTest.php b/test/modelTest.php index <HASH>..<HASH> 100644 --- a/test/modelTest.php +++ b/test/modelTest.php @@ -392,7 +392,7 @@ $this->assertTrue($ticket->save()); $ticket = Ticket::last(); - $this->assertTrue($ticket->id>=mktime()-1000); + $this->assertTrue($ticket->id>=time()-1000); $this->assertTrue($ticket->destroy()); } }
Changed mktime to time
taq_torm
train
php,php
9fe4efea0353882e3fa0584ce61c7d8606193f62
diff --git a/pkg/kubelet/apis/config/types.go b/pkg/kubelet/apis/config/types.go index <HASH>..<HASH> 100644 --- a/pkg/kubelet/apis/config/types.go +++ b/pkg/kubelet/apis/config/types.go @@ -291,12 +291,12 @@ type KubeletConfiguration struct { /* the following fields are meant for Node Allocatable */ - // A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G,pids=100) pairs + // A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G,pid=100) pairs // that describe resources reserved for non-kubernetes components. // Currently only cpu and memory are supported. // See http://kubernetes.io/docs/user-guide/compute-resources for more detail. SystemReserved map[string]string - // A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G,pids=100) pairs + // A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G,pid=100) pairs // that describe resources reserved for kubernetes system components. // Currently cpu, memory and local ephemeral storage for root file system are supported. // See http://kubernetes.io/docs/user-guide/compute-resources for more detail.
Fix typo in comments on SystemReserved and KubeReserved
kubernetes_kubernetes
train
go
c1b2752c085805e618252bf1946c5b8a6b880d7b
diff --git a/test/Component.test.js b/test/Component.test.js index <HASH>..<HASH> 100644 --- a/test/Component.test.js +++ b/test/Component.test.js @@ -1652,6 +1652,29 @@ function ComponentTests (debug, memory) { t.end() }) + test('[Forwarding Component] updating attributes of a forwarded component', t => { + class Parent extends TestComponent { + render ($$) { + let el = $$(Child) + if (this.props.mode === 1) { + el.attr('disabled', true) + } + return el + } + } + class Child extends TestComponent { + render ($$) { + return $$('div').addClass('sc-child') + } + } + let parent = Parent.render({ mode: 0 }) + parent.setProps({ mode: 1 }) + t.ok(parent.el.hasAttribute('disabled'), 'forwarded element should have attribute "disabled"') + parent.setProps({ mode: 0 }) + t.notOk(parent.el.hasAttribute('disabled'), 'forwarded element should not have attribute "disabled"') + t.end() + }) + test('[Preserving] components that do not change the structure preserve child components', t => { class MyComponent extends Component { render ($$) {
Add a test revealing an issue related to Forwarding Components.
substance_substance
train
js
fa65c307153d418724ca8d9cf4e40ff34e06c8f1
diff --git a/satpy/tests/writer_tests/test_mitiff.py b/satpy/tests/writer_tests/test_mitiff.py index <HASH>..<HASH> 100644 --- a/satpy/tests/writer_tests/test_mitiff.py +++ b/satpy/tests/writer_tests/test_mitiff.py @@ -405,7 +405,7 @@ class TestMITIFFWriter(unittest.TestCase): w.save_dataset(dataset) tif = TIFF.open(os.path.join(self.base_dir, os.listdir(self.base_dir)[0])) IMAGEDESCRIPTION = 270 - imgdesc = str(tif.GetField(IMAGEDESCRIPTION)).split('\\n') + imgdesc = (tif.GetField(IMAGEDESCRIPTION)).decode('utf-8').split('\n') for key in imgdesc: if 'In this file' in key: self.assertEqual(key, ' Channels: 1 In this file: 1')
Need to decode to 'utf-8' to handle correct in both <I> and <I>
pytroll_satpy
train
py
531b6caf5d5cfdc0b56d3833285332d4538a3bb3
diff --git a/blocks/loops.js b/blocks/loops.js index <HASH>..<HASH> 100644 --- a/blocks/loops.js +++ b/blocks/loops.js @@ -257,7 +257,7 @@ Blockly.Blocks['controls_flow_statements'] = { * @this Blockly.Block */ onchange: function(e) { - if (this.workspace.isDragging()) { + if (!this.workspace.isDragging || this.workspace.isDragging()) { return; // Don't change state at the start of a drag. } var legal = false; diff --git a/blocks/procedures.js b/blocks/procedures.js index <HASH>..<HASH> 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -843,7 +843,7 @@ Blockly.Blocks['procedures_ifreturn'] = { * @this Blockly.Block */ onchange: function(e) { - if (this.workspace.isDragging()) { + if (!this.workspace.isDragging || this.workspace.isDragging()) { return; // Don't change state at the start of a drag. } var legal = false;
Stop some blocks from throwing errors in headless workspaces.
LLK_scratch-blocks
train
js,js
3abafd6d1a4128c340f6d646be52ba410a6aca4d
diff --git a/unifiedpush-test-extension/unifiedpush-test-extension-server/src/main/java/org/jboss/aerogear/unifiedpush/test/ProxySetup.java b/unifiedpush-test-extension/unifiedpush-test-extension-server/src/main/java/org/jboss/aerogear/unifiedpush/test/ProxySetup.java index <HASH>..<HASH> 100644 --- a/unifiedpush-test-extension/unifiedpush-test-extension-server/src/main/java/org/jboss/aerogear/unifiedpush/test/ProxySetup.java +++ b/unifiedpush-test-extension/unifiedpush-test-extension-server/src/main/java/org/jboss/aerogear/unifiedpush/test/ProxySetup.java @@ -162,9 +162,9 @@ public class ProxySetup { if (backgroundThread.isAlive() && !backgroundThread.isInterrupted()) { backgroundThread.closeChannel(); backgroundThread.interrupt(); - backgroundThread = null; logger.log(Level.INFO, "Background thread interrupted in ProxySetup."); } + backgroundThread = null; } }
proxy background thread is set to null after server stopping
aerogear_aerogear-testing-tools
train
java
06c4488faab789cb8220c52b14e0562c29a31729
diff --git a/backend/server.js b/backend/server.js index <HASH>..<HASH> 100644 --- a/backend/server.js +++ b/backend/server.js @@ -303,7 +303,7 @@ if (macros.DEV) { port = 5000; } else { - port = 80; + port = 5000; }
"Changed port to <I> for prod because of nginx is now used"
ryanhugh_searchneu
train
js
e4e0b05031a3282b50cc2a475bde2e5e9fcbd070
diff --git a/src/FieldHandlers/Renderer/TextRenderer.php b/src/FieldHandlers/Renderer/TextRenderer.php index <HASH>..<HASH> 100644 --- a/src/FieldHandlers/Renderer/TextRenderer.php +++ b/src/FieldHandlers/Renderer/TextRenderer.php @@ -17,7 +17,7 @@ class TextRenderer extends BaseRenderer */ public function renderValue($value, array $options = []) { - $result = (string)$value; + $result = parent::renderValue($value, $options); if (empty($result)) { return $result;
TextRenderer uses BaseRenderer for sanitization (task #<I>)
QoboLtd_cakephp-csv-migrations
train
php
7ee9f643b99ce17de46757290a7df55378817474
diff --git a/src/AccessControl/AccessChecker.php b/src/AccessControl/AccessChecker.php index <HASH>..<HASH> 100644 --- a/src/AccessControl/AccessChecker.php +++ b/src/AccessControl/AccessChecker.php @@ -73,6 +73,9 @@ class AccessChecker $this->permissions = $permissions; $this->randomGenerator = $randomGenerator; $this->cookieOptions = $cookieOptions; + + // Disable password saves by default + $this->repositoryUsers->getPersister()->disableField('password'); } /** diff --git a/src/Users.php b/src/Users.php index <HASH>..<HASH> 100644 --- a/src/Users.php +++ b/src/Users.php @@ -35,6 +35,8 @@ class Users { $this->app = $app; $this->repository = $this->app['storage']->getRepository('Bolt\Storage\Entity\Users'); + // Disable password saves by default + $this->repository->getPersister()->disableField('password'); /** @deprecated Will be removed in Bolt 3.0 */ $this->usertable = $this->app['storage']->getTablename('users');
Set the persister to disable password fields by default
bolt_bolt
train
php,php
fb8d5beecebff9f40b1eda4e64b7c59c7c103f95
diff --git a/hot_redis.py b/hot_redis.py index <HASH>..<HASH> 100644 --- a/hot_redis.py +++ b/hot_redis.py @@ -104,6 +104,12 @@ class Iterable(Base): elif t != self.type: raise TypeError("%s != %s" % (t, self.type)) + def __eq__(self, value): + return self.value == self._to_value(value) + + def __iter__(self): + return iter(self.value) + class List(Iterable): @@ -121,12 +127,6 @@ class List(Iterable): def value(self): return self[:] - def __eq__(self, l): - return self.value == self._to_value(l) - - def __iter__(self): - return iter(self.value) - def __add__(self, l): return List(self.value + self._to_value(l))
Generic iter/cmp for iterables
stephenmcd_hot-redis
train
py
71379beab85df346a2e84e29a6a8bde7ae173c0a
diff --git a/lib/client.js b/lib/client.js index <HASH>..<HASH> 100644 --- a/lib/client.js +++ b/lib/client.js @@ -242,6 +242,8 @@ Client.prototype.connect = function(cfg) { self.emit('drain'); }).once('header', function(header) { self._remoteVer = header.versions.software; + }).on('continue', function() { + self.emit('continue'); }); if (typeof cfg.hostVerifier === 'function' diff --git a/lib/server.js b/lib/server.js index <HASH>..<HASH> 100644 --- a/lib/server.js +++ b/lib/server.js @@ -168,6 +168,8 @@ function Client(stream, socket) { self.emit('error', err); }).on('drain', function() { self.emit('drain'); + }).on('continue', function() { + self.emit('continue'); }); var exchanges = 0,
lib: re-emit continue event for client and server
mscdex_ssh2
train
js,js
95b1c15529043c4d37093d2239501da6ea7adf06
diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index <HASH>..<HASH> 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -315,7 +315,8 @@ class Session(object): if sockaddr in cls.bmc_handlers: self = cls.bmc_handlers[sockaddr] if (self.bmc == bmc and self.userid == userid and - self.password == password and self.kgo == kg): + self.password == password and self.kgo == kg and + self.logged): trueself = self else: del cls.bmc_handlers[sockaddr]
Do not reuse a session that is not logged If a session was not logged, it would still be considered a candidate for new session objects. Disqualify such sessions so that new session objects after a 'logout' or similar will be fulfilled. Change-Id: I7af<I>a8a<I>b7aedcadcec<I>d<I>e3b<I>f<I>d
openstack_pyghmi
train
py
28d0358aab76cafadcb632c8ea64083346a2e096
diff --git a/package.php b/package.php index <HASH>..<HASH> 100644 --- a/package.php +++ b/package.php @@ -4,7 +4,7 @@ require_once 'PEAR/PackageFileManager2.php'; -$version = '1.4.108'; +$version = '1.4.109'; $notes = <<<EOT No release notes for you! EOT;
prepare for release of <I> svn commit r<I>
silverorange_swat
train
php
aea28a6e86c0685584353ce4f2af4f0d8d199e0c
diff --git a/gae_memcache_store.go b/gae_memcache_store.go index <HASH>..<HASH> 100644 --- a/gae_memcache_store.go +++ b/gae_memcache_store.go @@ -190,7 +190,7 @@ func (s *memcacheStore) Get(id string) Session { // Service error? Retry.. continue } - if e.Expires.After(time.Now()) { + if e.Expires.Before(time.Now()) { // Session expired. datastore.Delete(s.ctx, key) // Omitting error check... return nil
Fixed timeout check logic in the Datastore. Issue #2.
icza_session
train
go
42d765c8dbcc099f7bd2ac77485a0b5351a1b0a7
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ METADATA = dict( long_description=open('README.rst').read(), url='http://github.com/flashingpumpkin/django-socialregistration', keywords='django facebook twitter oauth openid registration', - install_requires=['django', 'oauth2', 'python-openid'], + install_requires=['oauth2', 'python-openid'], include_package_data=True, classifiers=[ 'Development Status :: 4 - Beta',
Remove django requirement to prevent version conflicts when using pip
flashingpumpkin_django-socialregistration
train
py
db39b6ca7eebbfcdbb3e9575fdabced3de072e28
diff --git a/ccxt/async/exchange.py b/ccxt/async/exchange.py index <HASH>..<HASH> 100644 --- a/ccxt/async/exchange.py +++ b/ccxt/async/exchange.py @@ -81,7 +81,7 @@ class Exchange(BaseExchange): # if self.verbose: # print('Waiting for tokens: Exchange: {0}'.format(self.id)) self.add_new_tokens() - seconds_delays = [0.01, 0.1, 0.7, 1, 1.5, 2] + seconds_delays = [0.001, 0.005, 0.022, 0.106, 0.5] delay = random.choice(seconds_delays) await asyncio.sleep(delay) self.rateLimitTokens -= 1 diff --git a/ccxt/async/exchanges.py b/ccxt/async/exchanges.py index <HASH>..<HASH> 100644 --- a/ccxt/async/exchanges.py +++ b/ccxt/async/exchanges.py @@ -14675,6 +14675,8 @@ class kraken (Exchange): 'hasFetchClosedOrders': True, 'hasFetchMyTrades': True, 'hasWithdraw': True, + 'rateLimitTokens': 8, + 'rateLimitMaxTokens': 8, 'marketsByAltname': {}, 'timeframes': { '1m': '1',
Implemented fixes for issues raised on Pull Request #<I>, proper exponential backoff random selection times (in seconds) and lowering Krakens starting tokens, to avoid being rate limited on Kraken
ccxt_ccxt
train
py,py
040af99c3979ed0488efa2c2f3ab875fd341800e
diff --git a/framework/web/CHttpRequest.php b/framework/web/CHttpRequest.php index <HASH>..<HASH> 100644 --- a/framework/web/CHttpRequest.php +++ b/framework/web/CHttpRequest.php @@ -93,7 +93,7 @@ class CHttpRequest extends CApplicationComponent private $_hostInfo; private $_baseUrl; private $_cookies; - private $_preferredLanguage; + private $_preferredLanguages; private $_csrfToken; private $_restParams;
Update framework/web/CHttpRequest.php Updated the name of the private property used to store the list of accepted languages (no further need for a store for the preferred language since we just take the first value from this list).
yiisoft_yii
train
php
2c7a181560e866219e714e1deba06c0dc9aee9f1
diff --git a/lib/assets/javascripts/unobtrusive_flash.js b/lib/assets/javascripts/unobtrusive_flash.js index <HASH>..<HASH> 100644 --- a/lib/assets/javascripts/unobtrusive_flash.js +++ b/lib/assets/javascripts/unobtrusive_flash.js @@ -53,7 +53,7 @@ $(function() { } } - $(function() { + $(window).load(function() { UnobtrusiveFlash.showFlashFromCookies(); });
Transfer flash rendered from document load to window load [#<I>]
leonid-shevtsov_unobtrusive_flash
train
js
adaaab72585e03620eb7b5963f8d0402165b1cd8
diff --git a/spec/chicanery/state_comparison_spec.rb b/spec/chicanery/state_comparison_spec.rb index <HASH>..<HASH> 100644 --- a/spec/chicanery/state_comparison_spec.rb +++ b/spec/chicanery/state_comparison_spec.rb @@ -1,6 +1,10 @@ describe Chicanery::StateComparison do include Chicanery::StateComparison + it 'should fail' do + 1.should == 2 + end + describe '#compare_jobs' do let(:current_jobs) { {} } let(:previous_jobs) { {} }
added a failing spec to break build
markryall_chicanery
train
rb
e3f62e4a1a6d945fe8b38d050f3b93364828eb58
diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index <HASH>..<HASH> 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -650,6 +650,7 @@ class SourceWalker(GenericASTTraversal, object): out = out[:-self.pending_newlines] if (isinstance(out, str) and not (PYTHON3 or self.FUTURE_UNICODE_LITERALS)): + from trepan.api import debug; debug() out = unicode(out, 'utf-8') self.f.write(out) @@ -854,7 +855,7 @@ class SourceWalker(GenericASTTraversal, object): # strings are interpreted: # u'xxx' -> 'xxx' # xxx' -> b'xxx' - if isinstance(data, unicode): + if not PYTHON3 and isinstance(data, unicode): try: try: data = str(data)
unicode bug fix try #2... this time, for sure!
rocky_python-uncompyle6
train
py
a922df929c352d2914b1d27ebe315dfb57ef853b
diff --git a/lib/fake_stripe/stub_app.rb b/lib/fake_stripe/stub_app.rb index <HASH>..<HASH> 100644 --- a/lib/fake_stripe/stub_app.rb +++ b/lib/fake_stripe/stub_app.rb @@ -74,6 +74,10 @@ module FakeStripe json_response 200, fixture('list_cards') end + get '/v1/customers/:customer_id/sources/:id' do + json_response 200, fixture('retrieve_card') + end + # Subscriptions post '/v1/customers/:customer_id/subscriptions' do FakeStripe.subscription_count += 1
Successfully retrieve a source Assume that the `source` (which could be a credit card or a bank account) is in fact a card, since the `create_customer.json` lists the source as a card. Without this, Stripe <I>s when it tries to retreive an customer's source.
thoughtbot_fake_stripe
train
rb
040dee0b85105332b1f13f1e5ba7d36209cefaf9
diff --git a/lib/controllers/media.js b/lib/controllers/media.js index <HASH>..<HASH> 100644 --- a/lib/controllers/media.js +++ b/lib/controllers/media.js @@ -74,6 +74,9 @@ MediaController.prototype.load = function(media, options, callback) { if(response.type === 'LOAD_FAILED') { return callback(new Error('Load failed')); } + if(response.type === 'LOAD_CANCELLED'){ + return callback(new Error('Load cancelled')); + } var status = response.status[0]; callback(null, status); }); @@ -113,4 +116,4 @@ MediaController.prototype.seek = function(currentTime, callback) { this.sessionRequest(data, callback); }; -module.exports = MediaController; \ No newline at end of file +module.exports = MediaController;
added LOAD_CANCELLED error to stop a crash sometimes the load responses with LOAD_CANCELLED and this causes a crash since there isn't a response.status
thibauts_node-castv2-client
train
js