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
2b8904bf928b5730a172e63791eba6d452a89aff
diff --git a/scripts/bcbio_prepare_samples.py b/scripts/bcbio_prepare_samples.py index <HASH>..<HASH> 100755 --- a/scripts/bcbio_prepare_samples.py +++ b/scripts/bcbio_prepare_samples.py @@ -110,6 +110,7 @@ if __name__ == "__main__": config["algorithm"] = {"num_cores": args.cores_per_job} config["resources"].update({'sambamba': res, 'samtools': res}) + config["log_dir"] = os.path.join(os.path.abspath(os.getcwd()), "log") parallel = clargs.to_parallel(args) parallel.update({'progs': ['samtools', 'sambamba']}) parallel = log.create_base_logger(config, parallel)
set log_dir to be inside working folder.
bcbio_bcbio-nextgen
train
py
4b8782735d4c2851470bff290b931f44a1a996d9
diff --git a/src/Module.php b/src/Module.php index <HASH>..<HASH> 100644 --- a/src/Module.php +++ b/src/Module.php @@ -13,7 +13,7 @@ class Module implements { public function getConfig() { - return include __DIR__ . '/../../config/module.config.php'; + return include __DIR__ . '/../config/module.config.php'; } public function getAutoloaderConfig()
Actually make the fix Actually remove the directory. GitHub messed me up.
neeckeloo_NewRelic
train
php
b6aa7b9229a3a20d08b08fe58ca724ba5a323825
diff --git a/lib/twurl/cli.rb b/lib/twurl/cli.rb index <HASH>..<HASH> 100644 --- a/lib/twurl/cli.rb +++ b/lib/twurl/cli.rb @@ -76,6 +76,7 @@ Supported Commands: #{SUPPORTED_COMMANDS.sort.join(', ')} o.section "Common options:" do trace data + raw_data headers host quiet @@ -236,6 +237,14 @@ Supported Commands: #{SUPPORTED_COMMANDS.sort.join(', ')} end end + def raw_data + on('-r', '--raw-data [data]', 'Sends the specified data as it is in a POST request to the HTTP server.') do |data| + CGI::parse(data).each_pair do |key, value| + options.data[key] = value + end + end + end + def headers on('-A', '--header [header]', 'Adds the specified header to the request to the HTTP server.') do |header| key, value = header.split(': ')
Added --raw-data to send pre-URL-encode data as is presumably fixes #<I>
twitter_twurl
train
rb
be6c2e21e9ca5073a533249d7288b6564cb52d75
diff --git a/test/web/make-web-tests.js b/test/web/make-web-tests.js index <HASH>..<HASH> 100644 --- a/test/web/make-web-tests.js +++ b/test/web/make-web-tests.js @@ -38,7 +38,7 @@ var pth = require("path") , " <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>" , " <script src='../../node_modules/expect.js/expect.js'></script>" , " <script src='../../node_modules/mocha/mocha.js'></script>" - , " <script src='../../node_modules/jsondiffpatch/jsondiffpatch.min.js'></script>" + , " <script src='../../node_modules/jsondiffpatch/public/build/jsondiffpatch.min.js'></script>" , " <script src='../../lib/webidl2.js'></script>" , " <script>mocha.setup('bdd');</script>" , " <script src='run-tests.js'></script>"
Correct jsondiffpatch location. Fixes #<I>
w3c_webidl2.js
train
js
8f5af861578db48ad3342d7892e7b05c6d4f4c1c
diff --git a/fmn/rules/generic.py b/fmn/rules/generic.py index <HASH>..<HASH> 100644 --- a/fmn/rules/generic.py +++ b/fmn/rules/generic.py @@ -12,6 +12,7 @@ log = logging.getLogger('fedmsg') try: import re2 as re + re.set_fallback_notification(re.FALLBACK_WARNING) except ImportError: log.warning("Couldn't import the 're2' module.") import re
Warn if RE2 falls back.
fedora-infra_fmn.rules
train
py
01ca5af6312adc2a4bd0a3e854c655d2fa378767
diff --git a/lib/components/app/call-taker-panel.js b/lib/components/app/call-taker-panel.js index <HASH>..<HASH> 100644 --- a/lib/components/app/call-taker-panel.js +++ b/lib/components/app/call-taker-panel.js @@ -287,10 +287,17 @@ class CallTakerPanel extends Component { <UserSettings /> )} <div className="desktop-narrative-container"> + {/* FIXME: Achieve this partially scrolling layout as below + without using absolute positioning and by sharing styles with BatchRoutingPanel. */} <NarrativeItineraries containerStyle={{ + bottom: '0', display: 'flex', - flexDirection: 'column' + flexDirection: 'column', + left: '0', + position: 'absolute', + right: '0', + top: '210px' }} /> </div>
fix(CallTakerPanel): Add lost narrative scrolling feature.
opentripplanner_otp-react-redux
train
js
c21ac802682b957786b79db4c2344f0662dd3d32
diff --git a/cmd/main.go b/cmd/main.go index <HASH>..<HASH> 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -178,18 +178,18 @@ func Main() { accessKey := os.Getenv("MINIO_ACCESS_KEY") secretKey := os.Getenv("MINIO_SECRET_KEY") if accessKey != "" && secretKey != "" { - if !isValidAccessKey.MatchString(accessKey) { - fatalIf(errInvalidArgument, "Invalid access key.") - } - if !isValidSecretKey.MatchString(secretKey) { - fatalIf(errInvalidArgument, "Invalid secret key.") - } // Set new credentials. serverConfig.SetCredential(credential{ AccessKeyID: accessKey, SecretAccessKey: secretKey, }) } + if !isValidAccessKey.MatchString(serverConfig.GetCredential().AccessKeyID) { + fatalIf(errInvalidArgument, "Invalid access key. Accept only a string starting with a alphabetic and containing from 5 to 20 characters.") + } + if !isValidSecretKey.MatchString(serverConfig.GetCredential().SecretAccessKey) { + fatalIf(errInvalidArgument, "Invalid secret key. Accept only a string containing from 8 to 40 characters.") + } // Enable all loggers by now. enableLoggers()
Validate access/secret keys found in the config file and enhance invalid keys messages (#<I>)
minio_minio
train
go
60aa4bb714a291a4694fc27085017ed83b00bbc3
diff --git a/src/test/java/org/scribe/examples/TwitterExample.java b/src/test/java/org/scribe/examples/TwitterExample.java index <HASH>..<HASH> 100644 --- a/src/test/java/org/scribe/examples/TwitterExample.java +++ b/src/test/java/org/scribe/examples/TwitterExample.java @@ -47,7 +47,6 @@ public class TwitterExample // Now let's go and ask for a protected resource! System.out.println("Now we're going to access a protected resource..."); OAuthRequest request = new OAuthRequest(Verb.GET, PROTECTED_RESOURCE_URL); - request.addBodyParameter("status", "this is sparta! *"); service.signRequest(accessToken, request); Response response = request.send(); System.out.println("Got it! Lets see what we found...");
remove body parameter it was previously used since the sample request was sending a twit, now twitter validation got stricter and it's making the sample get request fail. thanks @witbrock for noticing!
scribejava_scribejava
train
java
fb99266e8a0e3f196dbcb9e40205e1f4ab7ea2fa
diff --git a/ella/exports/timeline.py b/ella/exports/timeline.py index <HASH>..<HASH> 100644 --- a/ella/exports/timeline.py +++ b/ella/exports/timeline.py @@ -21,14 +21,17 @@ DATETIME_FORMAT = models.DATETIME_FORMAT TIME_FORMAT = models.TIME_FORMAT TIMELINE_STEP = timedelta(hours=2) # two hours EMPTY_TIMELINE_CELL = None +DAY_MAX_HOUR = 23 +RANGE_DAYS = 14 +RANGE_WIDTH_HOURS = 2 log = logging.getLogger('ella.exports') def get_timerange(year=datetime.now().year, month=datetime.now().month, day=datetime.now().day): now = datetime.now() out = list() - for d in range(-14, 14): + for d in range(-RANGE_DAYS, RANGE_DAYS): dt = timedelta(days=d) - for h in [h for h in range(23) if h % 2 == 0]: + for h in [h for h in range(DAY_MAX_HOUR) if h % RANGE_WIDTH_HOURS == 0]: t = datetime(year, month, day, h, 0) + dt str_t = t.strftime(DATETIME_FORMAT) out.append( (str_t, str_t) )
Constants renamed to named constants.
ella_ella
train
py
5aaa3d99b8f8d887a8a123addedd108f1c5cd0b3
diff --git a/src/utils/sentry.js b/src/utils/sentry.js index <HASH>..<HASH> 100644 --- a/src/utils/sentry.js +++ b/src/utils/sentry.js @@ -6,6 +6,7 @@ export const boot = () => { release: window.app.revision, tags: { role: 'frontend' }, environment: window.app.env, + whitelistUrls: [window.app.cdnUrl, window.app.frontendHost], }).install(); };
chore(app): add frontend host as window app var
commercetools_merchant-center-application-kit
train
js
4095aaed423d87b705f7847d911c544d20c7b902
diff --git a/src/request_handlers/session_request_handler.js b/src/request_handlers/session_request_handler.js index <HASH>..<HASH> 100644 --- a/src/request_handlers/session_request_handler.js +++ b/src/request_handlers/session_request_handler.js @@ -302,7 +302,8 @@ ghostdriver.SessionReqHand = function(session) { }, _postKeysCommand = function(req, res) { - var elReqHand = _locator.locateActiveElement("REQ_HAND"); + var activeEl = _locator.locateActiveElement(); + var elReqHand = new ghostdriver.WebElementReqHand(activeEl.value, _session); elReqHand.postValueCommand(req, res); },
Forgot to fix getting of active element
detro_ghostdriver
train
js
76c64363ebceeed2984a4b3d440ab728d9f13605
diff --git a/test.py b/test.py index <HASH>..<HASH> 100644 --- a/test.py +++ b/test.py @@ -43,16 +43,16 @@ testCase = None def mockMciSendStringW(command, buf, bufLen, bufStart): decodeCommand = command.decode('utf-16') - if command.startswith(u'open '): + if decodeCommand.startswith(u'open '): testCase.assertEqual(windll.winmm.mciSendStringW(command, buf, bufLen, bufStart), 306) # 306 indicates drivers are missing. It's fine. return 0 - if command.endswith(u' wait'): + if decodeCommand.endswith(u' wait'): testCase.assertEqual(windll.winmm.mciSendStringW(command, buf, bufLen, bufStart), 0) sleep(expectedDuration) return 0 - if command.startswith(u'close '): + if decodeCommand.startswith(u'close '): global sawClose sawClose = True testCase.assertEqual(windll.winmm.mciSendStringW(command, buf, bufLen, bufStart), 0)
Fix a dumb mistake in the test...
TaylorSMarks_playsound
train
py
bdd7c6c4eb0e717f198308d021ae3bc6aa9f985d
diff --git a/packages/vaex-hdf5/vaex/hdf5/_version.py b/packages/vaex-hdf5/vaex/hdf5/_version.py index <HASH>..<HASH> 100644 --- a/packages/vaex-hdf5/vaex/hdf5/_version.py +++ b/packages/vaex-hdf5/vaex/hdf5/_version.py @@ -1,2 +1,2 @@ -__version_tuple__ = (0, 11, 0) -__version__ = '0.11.0' +__version_tuple__ = (0, 11, 1) +__version__ = '0.11.1' diff --git a/packages/vaex-meta/setup.py b/packages/vaex-meta/setup.py index <HASH>..<HASH> 100644 --- a/packages/vaex-meta/setup.py +++ b/packages/vaex-meta/setup.py @@ -18,7 +18,7 @@ url = 'https://www.github.com/vaexio/vaex' install_requires = [ 'vaex-core>=4.7.0-post.1,<5', 'vaex-astro>=0.9.0,<0.10', - 'vaex-hdf5>=0.11.0,<0.12', + 'vaex-hdf5>=0.11.1,<0.12', 'vaex-viz>=0.5.0,<0.6', 'vaex-server>=0.7.0,<0.8', 'vaex-jupyter>=0.6.0,<0.7',
🔖 vaex-hdf5 <I> released
vaexio_vaex
train
py,py
5eb2ad999a071d4f1eb5118577af011a59bd6401
diff --git a/bika/lims/browser/analysisrequest/analysisrequests.py b/bika/lims/browser/analysisrequest/analysisrequests.py index <HASH>..<HASH> 100644 --- a/bika/lims/browser/analysisrequest/analysisrequests.py +++ b/bika/lims/browser/analysisrequest/analysisrequests.py @@ -821,11 +821,11 @@ class AnalysisRequestsView(BikaListingView): @Obj: it is an analysis request brain. @return: boolean """ - if not self.context.bika_setup.getAllowDepartmentFiltering(): - return True if self.filter_bar_enabled and not self.filter_bar_check_item(obj): return False - # Gettin the department from analysis service + if not self.context.bika_setup.getAllowDepartmentFiltering(): + return True + # Getting the department from analysis service deps = obj.getDepartmentUIDs if hasattr(obj, 'getDepartmentUIDs')\ else [] result = True
isItemAllowed correct checking order
senaite_senaite.core
train
py
07cf957dc385e378193b403b9ca3aff298c2a55c
diff --git a/kuyruk/manager/server.py b/kuyruk/manager/server.py index <HASH>..<HASH> 100644 --- a/kuyruk/manager/server.py +++ b/kuyruk/manager/server.py @@ -17,7 +17,7 @@ class ManagerServer(ThreadingTCPServer): def get_request(self): client_sock, client_addr = ThreadingTCPServer.get_request(self) - self.clients[client_addr] = ClientStruct(client_sock) + self.clients[client_addr] = Client(client_sock) print 'self.clients', pformat(self.clients) return client_sock, client_addr @@ -54,10 +54,10 @@ class RequestHandler(BaseRequestHandler): @total_ordering -class ClientStruct(dict): +class Client(dict): def __init__(self, socket): - super(ClientStruct, self).__init__() + super(Client, self).__init__() self.socket = socket self.stats = {} self.actions = Queue.Queue()
rename ClientStruct -> Client
cenkalti_kuyruk
train
py
101b8cdef45a6a4e03d8fc034eabe966aebee211
diff --git a/lib/sysrev/sysrev.js b/lib/sysrev/sysrev.js index <HASH>..<HASH> 100644 --- a/lib/sysrev/sysrev.js +++ b/lib/sysrev/sysrev.js @@ -254,7 +254,7 @@ module.exports = function(options, logger) { */ var getHeadRevisionId = function(systemId, cb) { listRevisions(systemId, function(err, revs) { - cb(err, revs[0].id); + cb(err, revs && revs[0] && revs[0].id); }); };
Do not crash if listing the revisions fail.
nearform_nscale-kernel
train
js
197e4ac1c7b9f4d86aea344c352f4beee9af81c8
diff --git a/cartoframes/layer.py b/cartoframes/layer.py index <HASH>..<HASH> 100644 --- a/cartoframes/layer.py +++ b/cartoframes/layer.py @@ -188,11 +188,6 @@ class QueryLayer(AbstractLayer): styling module of cartoframes that exposes `CartoColors <https://github.com/CartoDB/CartoColor/wiki/CARTOColor-Scheme-Names>`__. Defaults to mint scheme. - - bin_method (str, optional): Quantification method for dividing - data range into bins. Must be one of: ``quantiles``, ``equal``, - ``headtails``, or ``jenks``. Defaults to ``quantiles``. - - bins (int, optional): Number of bins to divide data amongst in - the `bin_method`. Defaults to 5. size (dict or int, optional): Size style to apply to point data. If `size` is a :obj:`dict`, the follow keys are options, with values
removing bin_method and bins keywords from color argument
CartoDB_cartoframes
train
py
bd7fbf7c213359a83b06d96f55f7728a871be117
diff --git a/src/components/media_control/media_control.js b/src/components/media_control/media_control.js index <HASH>..<HASH> 100644 --- a/src/components/media_control/media_control.js +++ b/src/components/media_control/media_control.js @@ -220,8 +220,7 @@ module.exports = MediaControl = UIObject.extend({ } }, ended: function() { - this.togglePlayStop(); - this.togglePlayPause(); + this.changeTogglePlay(); }, updateProgressBar: function(startPosition, endPosition, duration) { var loadedStart = startPosition / duration * 100;
media control: fix error causing hls playback to stop
clappr_clappr
train
js
c5ea1fb5cc00fb68ca81afcc9abd6370b62666d4
diff --git a/src/js/components/SVGIcon.js b/src/js/components/SVGIcon.js index <HASH>..<HASH> 100644 --- a/src/js/components/SVGIcon.js +++ b/src/js/components/SVGIcon.js @@ -56,6 +56,7 @@ SVGIcon.defaultProps = { SVGIcon.propTypes = { a11yTitle: PropTypes.string, colorIndex: PropTypes.string, - size: PropTypes.oneOf(['small', 'medium', 'large', 'xlarge', 'huge']), + size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', + 'huge']), type: PropTypes.oneOf(['control', 'logo', 'status']) };
Add xsmall propType to SVGIcon #<I> (#<I>) Signed-off-by: Marcelo Frantz <githubpr AT marcelofs DOT com>
grommet_grommet
train
js
b50584b0723c6d1cd9b94e2f0cac86dd7d54a18b
diff --git a/structr-ui/src/main/resources/structr/js/init.js b/structr-ui/src/main/resources/structr/js/init.js index <HASH>..<HASH> 100644 --- a/structr-ui/src/main/resources/structr/js/init.js +++ b/structr-ui/src/main/resources/structr/js/init.js @@ -401,6 +401,9 @@ var Structr = { }, toggle2FALoginBox: function (data) { + $('#errorText').html(''); + $('#errorText-two-factor').html(''); + $('table.username-password', loginBox).hide(); $('#two-factor', loginBox).show();
Minor: Clear error texts when showing the two factor login box
structr_structr
train
js
90f8b2468eedb4790dd6baa0abdfad2413fea751
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -81,8 +81,8 @@ gulp.task('browserSync', function() { }) }) -// Watch Task that compiles LESS and watches for HTML or JS changes and reloads with browserSync -gulp.task('watch', ['browserSync', 'less', 'minify-css', 'minify-js'], function() { +// Dev task with browserSync +gulp.task('dev', ['browserSync', 'less', 'minify-css', 'minify-js'], function() { gulp.watch('less/*.less', ['less']); gulp.watch('css/*.css', ['minify-css']); gulp.watch('js/*.js', ['minify-js']);
i like 'dev' better than 'watch'
BlackrockDigital_startbootstrap-clean-blog
train
js
b0b8818a41652bc54c13d4643649c04f5a353f0e
diff --git a/pdfminer/pdftypes.py b/pdfminer/pdftypes.py index <HASH>..<HASH> 100644 --- a/pdfminer/pdftypes.py +++ b/pdfminer/pdftypes.py @@ -223,8 +223,13 @@ class PDFStream(PDFObject): return [] if not isinstance(filters, list): filters = [filters] - if not isinstance(params, list): + if not params: + # Make sure the parameters list is the same as filters. + params = [{}]*len(filters) + elif not isinstance(params, list): params = [params] + if STRICT and len(params) != len(filters): + raise PDFException("Parameters len filter mismatch") return zip(filters, params) def decode(self):
Fix a bug with pdfminer which occurs when two or more filters are applied to a stream, even though no parameters are specified. The code would previously drop all of the streams after the first due to misapplication of the zip function.
euske_pdfminer
train
py
3faf68d400ada3d881016ce3e9a49261311ab622
diff --git a/src/main/lombok/ast/Node.java b/src/main/lombok/ast/Node.java index <HASH>..<HASH> 100644 --- a/src/main/lombok/ast/Node.java +++ b/src/main/lombok/ast/Node.java @@ -47,4 +47,12 @@ public interface Node { Node getParent(); Position getPosition(); + + Node addDanglingPrefixNode(Node unbound); + + Node addDanglingPostfixNode(Node unbound); + + List<Node> getDanglingPrefixNodes(); + + List<Node> getDanglingPostfixNodes(); }
Added support for dangling nodes step 1.
rzwitserloot_lombok.ast
train
java
34e2d6638dc452325c833cc141d23a986682dab7
diff --git a/go_level_db.go b/go_level_db.go index <HASH>..<HASH> 100644 --- a/go_level_db.go +++ b/go_level_db.go @@ -102,7 +102,7 @@ func (db *GoLevelDB) Stats() map[string]string { "leveldb.cachedblock", "leveldb.openedtables", "leveldb.alivesnaps", - "leveldb.alibeiters", + "leveldb.aliveiters", } stats := make(map[string]string)
Fixed a typo in LevelDB property names.
tendermint_tendermint
train
go
061b6203c19bc03b2845fe76b4f231b7c0c1003a
diff --git a/src/ibmiotf/device.py b/src/ibmiotf/device.py index <HASH>..<HASH> 100644 --- a/src/ibmiotf/device.py +++ b/src/ibmiotf/device.py @@ -286,7 +286,7 @@ class HttpClient(HttpAbstractClient): self.logger.debug("URL: %s",intermediateUrl) try: self.logger.debug("Data Format = %s",(dataFormat)) - contentType = util.getContentType(dataFormat) + contentType = self.getContentType(dataFormat) self.logger.debug("contentType = %s",(contentType)) payload = self._messageEncoderModules[dataFormat].encode(data, datetime.now(pytz.timezone('UTC'))) self.logger.debug("payload = %s",(payload))
Removed util reference from device.py
ibm-watson-iot_iot-python
train
py
8bc732482fa7fe68473fedc8176c1dfa1f10ddc4
diff --git a/tests/TestCase.php b/tests/TestCase.php index <HASH>..<HASH> 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,7 +2,7 @@ use Arcanedev\LaravelHtml\HtmlBuilder; use Illuminate\Http\Request; -use Illuminate\Routing\RouteCollection; +use Illuminate\Routing\Router; use Illuminate\Routing\UrlGenerator; use Orchestra\Testbench\TestCase as BaseTestCase; @@ -93,13 +93,17 @@ abstract class TestCase extends BaseTestCase */ protected function registerRoutes() { - /** @var \Illuminate\Routing\Router $router */ + /** @var Router $router */ $router = $this->app['router']; - $router->get('/', [ - 'as' => 'home', - 'uses' => 'Arcanedev\LaravelHtml\Tests\Stubs\DummyController@index' - ]); + $router->group([ + 'namespace' => 'Arcanedev\LaravelHtml\Tests\Stubs', + ], function (Router $router) { + $router->get('/', [ + 'as' => 'home', + 'uses' => 'DummyController@index' + ]); + }); return $router; }
Updating the Base TestCase
ARCANEDEV_LaravelHtml
train
php
63a8e789a19341be71f07ad9d042800e9bc60ebc
diff --git a/analyzer.go b/analyzer.go index <HASH>..<HASH> 100644 --- a/analyzer.go +++ b/analyzer.go @@ -219,7 +219,12 @@ func (gosec *Analyzer) load(pkgPath string, conf *packages.Config) ([]*packages. func (gosec *Analyzer) Check(pkg *packages.Package) { gosec.logger.Println("Checking package:", pkg.Name) for _, file := range pkg.Syntax { - checkedFile := pkg.Fset.File(file.Pos()).Name() + fp := pkg.Fset.File(file.Pos()) + if fp == nil { + // skip files which cannot be located + continue + } + checkedFile := fp.Name() // Skip the no-Go file from analysis (e.g. a Cgo files is expanded in 3 different files // stored in the cache which do not need to by analyzed) if filepath.Ext(checkedFile) != ".go" {
Handle nil when looking up a file by position into a package (#<I>)
securego_gosec
train
go
9bf0f72d1d65e56a283a9a5722d2dca4a77d787a
diff --git a/resources/lang/no-NO/cachet.php b/resources/lang/no-NO/cachet.php index <HASH>..<HASH> 100644 --- a/resources/lang/no-NO/cachet.php +++ b/resources/lang/no-NO/cachet.php @@ -45,7 +45,7 @@ return [ // Schedule 'schedules' => [ 'status' => [ - 0 => 'Upcoming', + 0 => 'Kommende', 1 => 'Pågår', 2 => 'Fullført', ], @@ -81,6 +81,7 @@ return [ 'manage' => [ 'no_subscriptions' => 'Du abonnerer for øyeblikket på alle oppdateringer.', 'my_subscriptions' => 'Du abonnerer for øyeblikket på følgende oppdateringer.', + 'manage_at_link' => 'Manage your subscriptions at :link', ], 'email' => [ 'subscribe' => 'Abonner for å motta varslinger på e-post.',
New translations cachet.php (Norwegian)
CachetHQ_Cachet
train
php
9b21eb62b83eebad451fb724ae98578b9ac0e8b1
diff --git a/lib/buildbox/api.rb b/lib/buildbox/api.rb index <HASH>..<HASH> 100644 --- a/lib/buildbox/api.rb +++ b/lib/buildbox/api.rb @@ -5,6 +5,9 @@ require 'hashie/mash' module Buildbox class API + RETRYABLE_EXCEPTIONS = [ 'Timeout::Error', 'Errno::EINVAL', 'Errno::ECONNRESET', 'EOFError', 'Net::HTTPBadResponse', + 'Net::HTTPHeaderSyntaxError', 'Net::ProtocolError', 'Errno::EPIPE' ] + def initialize(config = Buildbox.config) @config = config end @@ -35,6 +38,9 @@ module Buildbox @connection ||= Faraday.new(:url => @config.api_endpoint) do |faraday| faraday.basic_auth @api_key || @config.api_key, '' + # Retry when some random things happen + faraday.request :retry, :max => 3, :interval => 1, :exceptions => RETRYABLE_EXCEPTIONS + faraday.request :json faraday.response :logger, Buildbox.logger
Initial implementation of capturing connection failure errors.
buildkite_buildbox-agent-ruby
train
rb
5ee343b6b3b6f70bebf8b57d309cc2ba00932718
diff --git a/src/Reportico.php b/src/Reportico.php index <HASH>..<HASH> 100755 --- a/src/Reportico.php +++ b/src/Reportico.php @@ -13,6 +13,15 @@ function ReporticoSession() { return REPORTICO_SESSION_CLASS; } +if ( !function_exists("get_magic_quotes_gpc") ) { + function get_magic_quotes_gpc() { + return false; + } +} + +echo get_magic_quotes_gpc(); +die; + // Set Session handling based on framework
Support deprecation of magic_quotes_gc function in php <I>.x
reportico-web_reportico
train
php
9c7f4cfdc90fa385ecb318a29317dd9f9a584d49
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -135,7 +135,7 @@ setup( 'Intended Audience :: Science/Research', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Operating System :: MacOS :: MacOS X', - 'Operating System :: Microsoft :: Windows' + 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX :: Linux', 'Operating System :: Unix', 'Programming Language :: C++',
Fixing missing comma in setup.py's classifiers
YannickJadoul_Parselmouth
train
py
889a4b853a04c671ba00848969613c06cac7fff8
diff --git a/mtools/mgenerate/mgenerate.py b/mtools/mgenerate/mgenerate.py index <HASH>..<HASH> 100644 --- a/mtools/mgenerate/mgenerate.py +++ b/mtools/mgenerate/mgenerate.py @@ -32,7 +32,7 @@ class MGeneratorTool(BaseCmdLineTool): self.argparser.add_argument('--collection', '-c', action='store', metavar='C', default='mgendata', help='collection C to import data, default=mgendata') self.argparser.add_argument('--drop', action='store_true', default=False, help='drop collection before inserting data') self.argparser.add_argument('--stdout', action='store_true', default=False, help='prints data to stdout instead of inserting to mongod/s instance.') - self.argparser.add_argument('--write-concern', '-w', action='store', default=1, help='write concern for inserts, default=1') + self.argparser.add_argument('--write-concern', '-w', action='store', metavar="W", default=1, help='write concern for inserts, default=1') # add all operators classes from the operators module, pass in _decode method
better help text for mgenerate.
rueckstiess_mtools
train
py
c65fdef8704c0674de4dc764d15997ad666a1459
diff --git a/lib/actions/ResourcesRemove.js b/lib/actions/ResourcesRemove.js index <HASH>..<HASH> 100644 --- a/lib/actions/ResourcesRemove.js +++ b/lib/actions/ResourcesRemove.js @@ -11,9 +11,7 @@ module.exports = function(SPlugin, serverlessPath) { SError = require(path.join(serverlessPath, 'ServerlessError')), SCli = require(path.join(serverlessPath, 'utils/cli')), BbPromise = require('bluebird'), - SUtils = require(path.join(serverlessPath, 'utils/index')), - _ = require('lodash'), - fs = BbPromise.promisifyAll(require('fs')); + SUtils = require(path.join(serverlessPath, 'utils/index')); class ResourcesRemove extends SPlugin {
removes loads and fs dependencies;
serverless_serverless
train
js
e9b55edc84e7e7f1661cb68a03a4fcc9b8b9b607
diff --git a/internal/service/elasticache/replication_group_test.go b/internal/service/elasticache/replication_group_test.go index <HASH>..<HASH> 100644 --- a/internal/service/elasticache/replication_group_test.go +++ b/internal/service/elasticache/replication_group_test.go @@ -1168,6 +1168,7 @@ func TestAccElastiCacheReplicationGroup_enableAuthTokenTransitEncryption(t *test } var rg elasticache.ReplicationGroup + rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) resourceName := "aws_elasticache_replication_group.test" resource.ParallelTest(t, resource.TestCase{ @@ -1177,7 +1178,7 @@ func TestAccElastiCacheReplicationGroup_enableAuthTokenTransitEncryption(t *test CheckDestroy: testAccCheckReplicationDestroy, Steps: []resource.TestStep{ { - Config: testAccReplicationGroup_EnableAuthTokenTransitEncryptionConfig(sdkacctest.RandString(10), sdkacctest.RandString(16)), + Config: testAccReplicationGroup_EnableAuthTokenTransitEncryptionConfig(rName, sdkacctest.RandString(16)), Check: resource.ComposeTestCheckFunc( testAccCheckReplicationGroupExists(resourceName, &rg), resource.TestCheckResourceAttr(resourceName, "transit_encryption_enabled", "true"),
Fix 'Error: invalid value for replication_group_id (must begin with a letter' in acceptance test.
terraform-providers_terraform-provider-aws
train
go
63bd15e8d1f37a6c929f9063edede688739b45cf
diff --git a/fastlane/lib/fastlane/actions/ensure_git_branch.rb b/fastlane/lib/fastlane/actions/ensure_git_branch.rb index <HASH>..<HASH> 100644 --- a/fastlane/lib/fastlane/actions/ensure_git_branch.rb +++ b/fastlane/lib/fastlane/actions/ensure_git_branch.rb @@ -9,7 +9,7 @@ module Fastlane branch = params[:branch] branch_expr = /#{branch}/ if Actions.git_branch =~ branch_expr - UI.success("Git branch match `#{branch}`, all good! 💪") + UI.success("Git branch matches `#{branch}`, all good! 💪") else UI.user_error!("Git is not on a branch matching `#{branch}`. Current branch is `#{Actions.git_branch}`! Please ensure the repo is checked out to the correct branch.") end
Fix wording in ensure_git_branch's output message (#<I>)
fastlane_fastlane
train
rb
1117644d1d3361bda45acb287bbefabb5e150d0d
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,13 @@ NASSL_SETUP = { "name": "nassl", "version": __version__, "package_dir": {"nassl": "nassl"}, - "py_modules": ["nassl.__init__", "nassl.ssl_client", "nassl.key_exchange_info", "nassl.legacy_ssl_client", "nassl.ocsp_response"], + "py_modules": [ + "nassl.__init__", + "nassl.ssl_client", + "nassl.key_exchange_info", + "nassl.legacy_ssl_client", + "nassl.ocsp_response" + ], "description": "Experimental OpenSSL wrapper for Python 3.7+ and SSLyze.", "author": __author__, "author_email": "nabla.c0d3@gmail.com",
Fixed E<I> line too long in setup.py.
nabla-c0d3_nassl
train
py
642321ea7029ea2ccb996054eab2b1d812c0c4e4
diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index <HASH>..<HASH> 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -10505,7 +10505,7 @@ return [ 'radius_strerror' => ['string', 'radius_handle'=>'resource'], 'rand' => ['int', 'min'=>'int', 'max'=>'int'], 'rand\'1' => ['int'], -'random_bytes' => ['string', 'length'=>'int'], +'random_bytes' => ['non-empty-string', 'length'=>'positive-int'], 'random_int' => ['int', 'min'=>'int', 'max'=>'int'], 'range' => ['array', 'start'=>'mixed', 'end'=>'mixed', 'step='=>'int|float'], 'RangeException::__clone' => ['void'],
Improve signature of random_bytes()
vimeo_psalm
train
php
79c3e4eefd43c8039fa5171a58f7d51add4bbac6
diff --git a/auctionrunner/zone_builder.go b/auctionrunner/zone_builder.go index <HASH>..<HASH> 100644 --- a/auctionrunner/zone_builder.go +++ b/auctionrunner/zone_builder.go @@ -59,7 +59,7 @@ func fetchStateAndBuildZones(logger lager.Logger, workPool *workpool.WorkPool, c lock.Lock() zones[state.Zone] = append(zones[state.Zone], cell) lock.Unlock() - logger.Info("fetched-cell-state", lager.Data{"cell-guid": guid, "duration_ns": time.Since(startTime)}) + logger.Debug("fetched-cell-state", lager.Data{"cell-guid": guid, "duration_ns": time.Since(startTime)}) }) }
Reduce logging of fetched-cell-state to debug
cloudfoundry_auction
train
go
5d3b7d31c691434bf4a14229f735cebd30113b3f
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -183,8 +183,8 @@ class ClinicBubbleprof extends events.EventEmitter { title: 'Clinic Bubbleprof', styles: styleFile, script: scriptFile, - headerLogoUrl: 'https://github.com/nearform/node-clinic-bubbleprof', - headerLogoTitle: 'Clinic Bubbleprof on GitHub', + headerLogoUrl: 'https://clinicjs.org/bubbleprof/', + headerLogoTitle: 'Clinic Bubbleprof on Clinicjs.org', headerLogo: logoFile, headerText: 'Bubbleprof', nearFormLogo: nearFormLogoFile,
icon and product name link to clinicjs.org/bubbleprof (#<I>)
nearform_node-clinic-bubbleprof
train
js
27f34593eac04fa5e43a540eb13b20d739169140
diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index <HASH>..<HASH> 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -489,8 +489,8 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes. return warnings, fmt.Errorf("Invalid value %d, range for oom score adj is [-1000, 1000]", hostConfig.OomScoreAdj) } - // ip-forwarding does not affect container with '--net=host' - if sysInfo.IPv4ForwardingDisabled && !hostConfig.NetworkMode.IsHost() { + // ip-forwarding does not affect container with '--net=host' (or '--net=none') + if sysInfo.IPv4ForwardingDisabled && !(hostConfig.NetworkMode.IsHost() || hostConfig.NetworkMode.IsNone()) { warnings = append(warnings, "IPv4 forwarding is disabled. Networking will not work.") logrus.Warnf("IPv4 forwarding is disabled. Networking will not work") }
Suppress "IPv4 forwarding" warning for --net=none There's no need to warn that "ip-forwarding" is disabled if a container doesn't use networking.
moby_moby
train
go
ddc092aeb82be655cca9a996fabd4012d5f6be61
diff --git a/spec/views/hyrax/base/_relationships.html.erb_spec.rb b/spec/views/hyrax/base/_relationships.html.erb_spec.rb index <HASH>..<HASH> 100644 --- a/spec/views/hyrax/base/_relationships.html.erb_spec.rb +++ b/spec/views/hyrax/base/_relationships.html.erb_spec.rb @@ -35,7 +35,7 @@ RSpec.describe 'hyrax/base/relationships', type: :view do Hyrax::CollectionPresenter.new( SolrDocument.new( id: '345', - has_model_ssim: ['Collection'], + has_model_ssim: [Hyrax.config.collection_model], title_tesim: ['Containing collection'] ), ability
test model sensitive collection behavior for relationships views relationship specs shouldn't try to check behavior for "Collection" when that model is disabled in favor of `Hyrax::PcdmCollection`.
samvera_hyrax
train
rb
9351de5ae3374cdbafce58b307b01e3dfa10a730
diff --git a/src/Http/Middleware/Certificate.php b/src/Http/Middleware/Certificate.php index <HASH>..<HASH> 100644 --- a/src/Http/Middleware/Certificate.php +++ b/src/Http/Middleware/Certificate.php @@ -69,7 +69,7 @@ class Certificate if ($certificateResult === 1) { return $next($request); - } elseif ($certificateResult = 0) { + } elseif ($certificateResult === 0) { throw new InvalidSignatureChainException("The request did not validate against the certificate chain."); } else { throw new \Exception("Something went wrong when validating the request and certificate.");
Update Certificate.php Assignment vs. comparison error.
develpr_alexa-app
train
php
799eac215d2a5bd5ce3db9cbf64bbd2aa80f2c52
diff --git a/test/unit/application.js b/test/unit/application.js index <HASH>..<HASH> 100644 --- a/test/unit/application.js +++ b/test/unit/application.js @@ -180,18 +180,26 @@ vows.describe('lib/application.js').addBatch({ framework.storages.redis = redisCtor; // restore redis constructor } - }, + } + +}).addBatch({ 'Application::getResource': { topic: function() { + var promise = new EventEmitter(); app.context = { alpha: {name: 'alpha'}, beta: { gamma: {name: 'gamma'} } } - return app; + + app.getResource('storages/redis', function(storage) { + promise.emit('success', storage); + }); + + return promise; }, 'Gets {context}/{resource}': function() { @@ -202,9 +210,15 @@ vows.describe('lib/application.js').addBatch({ 'Gets {context}/{group}:{resource}': function() { var drv = app.getResource('context/beta:gamma'); assert.equal(drv.name, 'gamma'); + }, + + 'Works asynchronously if callback provided': function(storage) { + assert.instanceOf(storage, framework.storages.redis); } - }, + } + +}).addBatch({ 'Application::createMulti': {
Added extra test case for Application::getResource
derdesign_protos
train
js
e3ee8deaf4605d40e40d74b136308f9066e5244d
diff --git a/plugins/Admin/templates/layout/default.php b/plugins/Admin/templates/layout/default.php index <HASH>..<HASH> 100644 --- a/plugins/Admin/templates/layout/default.php +++ b/plugins/Admin/templates/layout/default.php @@ -92,8 +92,8 @@ echo $this->Html->script('/node_modules/bootstrap-select/dist/js/bootstrap-selec echo $this->Html->script('/node_modules/components-jqueryui/jquery-ui.min.js'); echo $this->Html->script('/node_modules/blueimp-file-upload/js/jquery.fileupload.js'); echo $this->Html->script('/node_modules/bootstrap-select/dist/js/i18n/defaults-'.I18n::getLocale().'.js'); -echo $this->Html->script('/node_modules/ckeditor4/ckeditor'); -echo $this->Html->script('/node_modules/ckeditor4/adapters/jquery'); +echo $this->Html->script('/node_modules/ckeditor4/ckeditor.js?v4.16.0'); +echo $this->Html->script('/node_modules/ckeditor4/adapters/jquery.js?v4.16.0'); $scripts = $this->fetch('script'); if ($scripts != '') {
do not use cached ckeditor file
foodcoopshop_foodcoopshop
train
php
4a9e883baee42a8bbc48399e4d749879db18f3d9
diff --git a/source/rafcon/gui/mygaphas/items/line.py b/source/rafcon/gui/mygaphas/items/line.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/mygaphas/items/line.py +++ b/source/rafcon/gui/mygaphas/items/line.py @@ -287,10 +287,9 @@ class PerpLine(Line): return 0 line_width = parent_state_v.border_width / constants.BORDER_WIDTH_LINE_WIDTH_FACTOR if for_port: - return min(line_width, for_port.port_side_size) + return min(line_width, for_port.port_size[0]) return line_width - def _head_length(self, port): """Distance from the center of the port to the perpendicular waypoint""" if not port: @@ -300,12 +299,11 @@ class PerpLine(Line): if parent_state_v == port.parent: length = port.port_side_size elif port.has_label(): - length =port.port_side_size + length = port.port_side_size else: length = port.port_side_size * 2 return max(length, self._calc_line_width()) - def _head_offset(self, port): """How far away from the port center does the line begin""" if not port:
feat(gaphas): Line width according to port width The minimum line width is now set to the port width for better optics
DLR-RM_RAFCON
train
py
556620fea68b464f53b25cb1dc2e041e8040653b
diff --git a/rpcserver.go b/rpcserver.go index <HASH>..<HASH> 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -4066,9 +4066,13 @@ func (s *rpcServer) processRequest(request *btcjson.Request, isAdmin bool, close result, err = s.standardCmdResult(parsedCmd, closeChan) if err != nil { - jsonErr = &btcjson.RPCError{ - Code: btcjson.ErrRPCInvalidRequest.Code, - Message: "Invalid request: malformed", + if rpcErr, ok := err.(*btcjson.RPCError); ok { + jsonErr = rpcErr + } else { + jsonErr = &btcjson.RPCError{ + Code: btcjson.ErrRPCInvalidRequest.Code, + Message: "Invalid request: malformed", + } } } }
rpcserver: Fix Error message returned by processRequest When processRequest can't find a rpc command, standardCmdResult returns a `btcjson.ErrRPCMethodNotFound` but it gets ignored and a `btcjson.ErrRPCInvalidRequest` is returned instead. This makes processRequest return the right error message.
btcsuite_btcd
train
go
ea95e0c3e285b02e99143295d3f7b09f23721d78
diff --git a/src/Elcodi/CoreBundle/Generator/RandomStringGenerator.php b/src/Elcodi/CoreBundle/Generator/RandomStringGenerator.php index <HASH>..<HASH> 100644 --- a/src/Elcodi/CoreBundle/Generator/RandomStringGenerator.php +++ b/src/Elcodi/CoreBundle/Generator/RandomStringGenerator.php @@ -56,8 +56,9 @@ class RandomStringGenerator implements GeneratorInterface public function generate() { $string = ''; + $length = $this->getLength(); - for ($i = 0; $i < $this->getLength(); $i++) { + for ($i = 0; $i < $length; $i++) { $string .= substr( $this->getCharset(),
Fixes #<I> [CoreBundle] Usage of a function in loops should be avoided
elcodi_elcodi
train
php
72992fe01c88a5b6bccb03a75a9498b4fe747ac2
diff --git a/lib/yaml/scanner.py b/lib/yaml/scanner.py index <HASH>..<HASH> 100644 --- a/lib/yaml/scanner.py +++ b/lib/yaml/scanner.py @@ -1305,13 +1305,13 @@ class Scanner: ch = self.peek(length) if ch in u'\0 \t\r\n\x85\u2028\u2029' \ or (not self.flow_level and ch == u':' and - self.peek(length+1) in u'\0 \t\r\n\x28\u2028\u2029') \ + self.peek(length+1) in u'\0 \t\r\n\x85\u2028\u2029') \ or (self.flow_level and ch in u',:?[]{}'): break length += 1 # It's not clear what we should do with ':' in the flow context. if (self.flow_level and ch == u':' - and self.peek(length+1) not in u'\0 \t\r\n\x28\u2028\u2029,[]{}'): + and self.peek(length+1) not in u'\0 \t\r\n\x85\u2028\u2029,[]{}'): self.forward(length) raise ScannerError("while scanning a plain scalar", start_mark, "found unexpected ':'", self.get_mark(),
Fix a typo in a plain scalar scanner.
yaml_pyyaml
train
py
c89cda29bc03b87f5f1db2bf2225b61121dd8359
diff --git a/upload/admin/language/en-gb/en-gb.php b/upload/admin/language/en-gb/en-gb.php index <HASH>..<HASH> 100644 --- a/upload/admin/language/en-gb/en-gb.php +++ b/upload/admin/language/en-gb/en-gb.php @@ -135,7 +135,6 @@ $_['tab_discount'] = 'Discount'; $_['tab_documentation'] = 'Documentation'; $_['tab_general'] = 'General'; $_['tab_history'] = 'History'; -$_['tab_ftp'] = 'FTP'; $_['tab_ip'] = 'IP Addresses'; $_['tab_links'] = 'Links'; $_['tab_log'] = 'Log';
Removed unused language variable en-gb
opencart_opencart
train
php
f4a58e777a1cd1e6bc80cf6473a37ee87cba840d
diff --git a/lib/sidekiq-scheduler/extensions/web.rb b/lib/sidekiq-scheduler/extensions/web.rb index <HASH>..<HASH> 100644 --- a/lib/sidekiq-scheduler/extensions/web.rb +++ b/lib/sidekiq-scheduler/extensions/web.rb @@ -1,6 +1,6 @@ require 'sidekiq/web' unless defined?(Sidekiq::Web) -ASSETS_PATH = File.expand_path('../../../../web/assets', __dir__) +ASSETS_PATH = File.expand_path('../../../web/assets', __dir__) Sidekiq::Web.register(SidekiqScheduler::Web) Sidekiq::Web.tabs['recurring_jobs'] = 'recurring-jobs'
Fix CSS file path in web UI. Commit <I>b<I>afc8e<I>fcb<I>c3f7db9a8c<I>a0dd moved the styles to a separate file and mount like the rest of the Sidekiq assets. It looks like the CSS file does not have its path properly set up. The CSS path has been adjusted so that it loads properly now.
moove-it_sidekiq-scheduler
train
rb
cb527657b61d999e22f3ad474d5b3c5d29987d64
diff --git a/src/main/java/mServer/crawler/sender/arte/MediathekArte.java b/src/main/java/mServer/crawler/sender/arte/MediathekArte.java index <HASH>..<HASH> 100644 --- a/src/main/java/mServer/crawler/sender/arte/MediathekArte.java +++ b/src/main/java/mServer/crawler/sender/arte/MediathekArte.java @@ -94,6 +94,15 @@ public class MediathekArte extends MediathekReader { } @Override + protected synchronized void meldungStart() { + super.meldungStart(); + // starte Sprachen Sender, da es sonst zu doppelten Sendern kommen kann + mlibFilmeSuchen.melden(Const.ARTE_FR, getMax(), getProgress(), ""); + mlibFilmeSuchen.melden(ARTE_EN, getMax(), getProgress(), ""); + mlibFilmeSuchen.melden(ARTE_ES, getMax(), getProgress(), ""); + } + + @Override protected synchronized void meldungThreadUndFertig() { // der MediathekReader ist erst fertig wenn nur noch ein Thread läuft // dann zusätzliche Sender, die der Crawler bearbeitet, beenden
arte: fix sender registered twice as running
mediathekview_MServer
train
java
0771aae7c776a43e535e558c76924cf63034a23e
diff --git a/src/wormhole/servers/server.py b/src/wormhole/servers/server.py index <HASH>..<HASH> 100644 --- a/src/wormhole/servers/server.py +++ b/src/wormhole/servers/server.py @@ -46,6 +46,7 @@ class RelayServer(service.MultiService): self.relayport_service = ServerEndpointService(r, site) self.relayport_service.setServiceParent(self) self.relay = Relay(self.db, welcome, blur_usage) # accessible from tests + self.relay.setServiceParent(self) # for the pruning timer self.root.putChild(b"wormhole-relay", self.relay) if transitport: self.transit = Transit(self.db, blur_usage)
server: Relay wasn't pruning channels I forgot to hook it up to the service parent, so the timer was never started.
warner_magic-wormhole
train
py
f5461fdb69af70c60ffa30125a61ccd33257c055
diff --git a/lxd/instance/instance_errors.go b/lxd/instance/instance_errors.go index <HASH>..<HASH> 100644 --- a/lxd/instance/instance_errors.go +++ b/lxd/instance/instance_errors.go @@ -4,5 +4,5 @@ import ( "fmt" ) -// ErrNotImplemented is the "Not implemented" error +// ErrNotImplemented is the "Not implemented" error. var ErrNotImplemented = fmt.Errorf("Not implemented")
lxd/instance: Ends all comments with a full-stop.
lxc_lxd
train
go
ccdd81d16293c122bb1fc9f96241dec0bd548427
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,10 @@ from setuptools import setup, find_packages from numpy.distutils.core import setup, Extension -from distutils.command import bdist_conda +try: + from distutils.command import bdist_conda +except ImportError: + pass from os import path import io @@ -92,7 +95,7 @@ if __name__ == "__main__": long_description = long_description, long_description_content_type='text/markdown', ext_modules = [ext1, ext2, ext3, ext4], - install_requires = ['numpy>=1.18.1', 'scipy>=1.4.1'], + install_requires = ['numpy>=1.16.0', 'scipy>=1.0.0'], packages = ['stripy'], package_data = {'stripy': ['Notebooks/*ipynb', # Worked Examples is not currently used 'Notebooks/CartesianTriangulations/*ipynb',
py2 fails with strict numpy versions. Don't fail on bdist_conda
underworldcode_stripy
train
py
dc934fea4f5a5c046d71d7a0126efb4cd045733d
diff --git a/lib/somehow_has_relation.rb b/lib/somehow_has_relation.rb index <HASH>..<HASH> 100644 --- a/lib/somehow_has_relation.rb +++ b/lib/somehow_has_relation.rb @@ -27,7 +27,7 @@ module SomehowHasRelation define_method(related) do found = somehow_found_or_recur relation, current_options[:if], current_options if current_options.has_key?(:one) - found.flatten.compact.first rescue found + found.flatten.compact.first rescue nil elsif current_options.has_key?(:many) found.flatten.compact rescue [] end @@ -58,7 +58,7 @@ module SomehowHasRelation if opt.has_key?(:through) found << somehow_recur(relation, opt[:through], opt[:if]) else - return send_and_filter(relation, condition) + return [send_and_filter(relation, condition)] end rescue found << [] @@ -67,7 +67,7 @@ module SomehowHasRelation found else - send_and_filter(relation, condition) + [send_and_filter(relation, condition)] end end
uniformed return values to arrays (more readable)
mtylty_somehow_has_relation
train
rb
5316e503de37b461bf8222f2c7f95f25be0515ed
diff --git a/core/src/main/java/me/prettyprint/cassandra/service/template/ColumnFamilyResultWrapper.java b/core/src/main/java/me/prettyprint/cassandra/service/template/ColumnFamilyResultWrapper.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/me/prettyprint/cassandra/service/template/ColumnFamilyResultWrapper.java +++ b/core/src/main/java/me/prettyprint/cassandra/service/template/ColumnFamilyResultWrapper.java @@ -1,6 +1,7 @@ package me.prettyprint.cassandra.service.template; import java.nio.ByteBuffer; +import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; @@ -37,8 +38,15 @@ public class ColumnFamilyResultWrapper<K,N> extends AbstractResultWrapper<K,N> { this.rows = executionResult.get().entrySet().iterator(); next(); } - - + + /** + * All the column names we know about in the current iterator position + * @return + */ + public Collection<N> getColumnNames() { + return columns.keySet(); + } + public ByteBuffer getColumnValue( N columnName) { HColumn<N,ByteBuffer> col = getColumn( columnName ); return col != null ? col.getValue() : null;
added get for columnnames on result set
hector-client_hector
train
java
57ab89d2dff24dc5edf6dfede4c9c83fff24160c
diff --git a/lib/push0r/APNS/ApnsService.rb b/lib/push0r/APNS/ApnsService.rb index <HASH>..<HASH> 100755 --- a/lib/push0r/APNS/ApnsService.rb +++ b/lib/push0r/APNS/ApnsService.rb @@ -52,6 +52,8 @@ module Push0r unless @sock.nil? @sock.close end + + @messages = [] ## reset return [failed_messages, []] end diff --git a/lib/push0r/GCM/GcmService.rb b/lib/push0r/GCM/GcmService.rb index <HASH>..<HASH> 100755 --- a/lib/push0r/GCM/GcmService.rb +++ b/lib/push0r/GCM/GcmService.rb @@ -109,6 +109,7 @@ module Push0r end end + @messages = [] ## reset return [failed_messages, new_registration_messages] end end diff --git a/push0r.gemspec b/push0r.gemspec index <HASH>..<HASH> 100644 --- a/push0r.gemspec +++ b/push0r.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'Push0r' - s.version = '0.2.5' + s.version = '0.2.6' s.date = '2014-04-26' s.date = '2014-05-20' s.summary = "Push0r gem"
clear internal service message queues in end_push
cbot_push0r
train
rb,rb,gemspec
0c9dbd01c967f980bc0bb54b2b85463740f74f9d
diff --git a/semver.js b/semver.js index <HASH>..<HASH> 100644 --- a/semver.js +++ b/semver.js @@ -1519,7 +1519,7 @@ function intersects (r1, r2, options) { } exports.coerce = coerce -function coerce (version) { +function coerce (version, options) { if (version instanceof SemVer) { return version } @@ -1536,5 +1536,5 @@ function coerce (version) { return parse(match[1] + '.' + (match[2] || '0') + - '.' + (match[3] || '0')) + '.' + (match[3] || '0'), options) }
added options support for coerce function Close #<I>
npm_node-semver
train
js
3f9e2bdb01daf2310a831903bc803f2568606244
diff --git a/openquake/server/db/actions.py b/openquake/server/db/actions.py index <HASH>..<HASH> 100644 --- a/openquake/server/db/actions.py +++ b/openquake/server/db/actions.py @@ -508,10 +508,10 @@ def get_calcs(db, request_get_dict, allowed_users, user_acl_on=False, id=None): a :class:`openquake.server.dbapi.Db` instance :param request_get_dict: a dictionary - :param user_name: - user name + :param allowed_users: + a list of users :param user_acl_on: - if True, returns only the calculations owned by the user + if True, returns only the calculations owned by the user or the group :param id: if given, extract only the specified calculation :returns:
Update a docstring in db/actions.py [skip ci]
gem_oq-engine
train
py
3e24afb3925d68b134ca29e24c9d7cf2697a9717
diff --git a/Resources/public/js/angular/Question/Controllers/Type/MatchQuestionCtrl.js b/Resources/public/js/angular/Question/Controllers/Type/MatchQuestionCtrl.js index <HASH>..<HASH> 100644 --- a/Resources/public/js/angular/Question/Controllers/Type/MatchQuestionCtrl.js +++ b/Resources/public/js/angular/Question/Controllers/Type/MatchQuestionCtrl.js @@ -609,7 +609,12 @@ angular.module('Question').controller('MatchQuestionCtrl', [ if (sets[i] && sets[i] !== '') { var items = sets[i].split(','); // disable corresponding draggable item - $('#draggable_' + items[0]).draggable("disable"); + if (this.question.typeMatch === 3) { + $('#div_' + items[0]).draggable("disable"); + } + else { + $('#draggable_' + items[0]).draggable("disable"); + } // ui update if (this.question.typeMatch !== 3) { $('#draggable_' + items[0]).fadeTo(100, 0.3);
[ExoBundle] Saved answers are set on reload of the question
claroline_Distribution
train
js
585a574bc9936e3c0d2b1b20900e772ae3a8c6a5
diff --git a/pylint/checkers/spelling.py b/pylint/checkers/spelling.py index <HASH>..<HASH> 100644 --- a/pylint/checkers/spelling.py +++ b/pylint/checkers/spelling.py @@ -260,7 +260,9 @@ class SpellingChecker(BaseTokenChecker): "default": "fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:", "type": "string", "metavar": "<comma separated words>", - "help": "List of comma separated words that should be considered directives if they appear and the beginning of a comment and should not be checked.", + "help": "List of comma separated words that should be considered " + "directives if they appear at the beginning of a comment " + "and should not be checked.", }, ), )
[spelling checker] Break the help docstring on multiple lines
PyCQA_pylint
train
py
02af6d18ece7bf245f55673bcf7500925a2c7c31
diff --git a/programs/cit_magic3.py b/programs/cit_magic3.py index <HASH>..<HASH> 100755 --- a/programs/cit_magic3.py +++ b/programs/cit_magic3.py @@ -175,6 +175,13 @@ def main(command_line=True, **kwargs): else: Z=samp_con.split("-")[1] samp_con="4" + elif "7" in samp_con: + if "-" not in samp_con: + print "option [7] must be in form 7-Z where Z is an integer" + return False, "naming convention option [7] must be in form 7-Z where Z is an integer" + else: + Z=samp_con.split("-")[1] + samp_con="7" if input_dir_path=='': input_dir_path='.' magfile = os.path.join(input_dir_path, magfile)
Made CIT Magic check for '7' sample naming convention which requires a number of characters in form 7-Z and was missing before
PmagPy_PmagPy
train
py
4f9464ae1fb17e4c7f435630d98955e8978574aa
diff --git a/lib/pkgcloud/core/base/client.js b/lib/pkgcloud/core/base/client.js index <HASH>..<HASH> 100644 --- a/lib/pkgcloud/core/base/client.js +++ b/lib/pkgcloud/core/base/client.js @@ -225,6 +225,10 @@ Client.prototype.request = function () { buffer.emit('end'); buffer.removeAllListeners('pipe'); }); + + response.on('response', function (res) { + buffer.emit('response', res); + }); if (options.upload) { pipeUpload(response);
[api] Reemit `response` event on the buffer
pkgcloud_pkgcloud
train
js
f9979a5128c3a46414e3e1f4efaa5008f5a8a2d8
diff --git a/Notifications/ResetPassword.php b/Notifications/ResetPassword.php index <HASH>..<HASH> 100644 --- a/Notifications/ResetPassword.php +++ b/Notifications/ResetPassword.php @@ -72,6 +72,17 @@ class ResetPassword extends Notification ], false)); } + return $this->getMailMessage($url); + } + + /** + * Get the actual contents for the notification. + * + * @param string $url + * @return \Illuminate\Notifications\Messages\MailMessage + */ + protected function getMailMessage($url) + { return (new MailMessage) ->subject(Lang::get('Reset Password Notification')) ->line(Lang::get('You are receiving this email because we received a password reset request for your account.')) diff --git a/Notifications/VerifyEmail.php b/Notifications/VerifyEmail.php index <HASH>..<HASH> 100644 --- a/Notifications/VerifyEmail.php +++ b/Notifications/VerifyEmail.php @@ -50,6 +50,17 @@ class VerifyEmail extends Notification return call_user_func(static::$toMailCallback, $notifiable, $verificationUrl); } + return $this->getMailMessage($verificationUrl); + } + + /** + * Get the actual contents for the notification. + * + * @param string $verificationUrl + * @return \Illuminate\Notifications\Messages\MailMessage + */ + protected function getMailMessage($verificationUrl) + { return (new MailMessage) ->subject(Lang::get('Verify Email Address')) ->line(Lang::get('Please click the button below to verify your email address.'))
[8.x] Outsource mail content creation to separate methods
illuminate_auth
train
php,php
7700657d78d044500983df091329690d16a5ad25
diff --git a/scripts/check-commit-message.js b/scripts/check-commit-message.js index <HASH>..<HASH> 100644 --- a/scripts/check-commit-message.js +++ b/scripts/check-commit-message.js @@ -59,8 +59,8 @@ const checkFirstLine = (line) => { let issues = []; - if (ucs2.decode(line).length > 50) { - issues.push('[Line 1] Has over 50 characters.'); + if (ucs2.decode(line).length > 72) { + issues.push('[Line 1] Has over 72 characters.'); } const tag = ALLOWED_TAGS.filter((allowedTag) => {
Chore: Allow commit messages with up to <I> character on the first line This change is done in order to allow for longer commit messages that could potentially be used without any human review in the release process.
webhintio_hint
train
js
8a2983e5e983fd8cff893205a28a1b649ef98b50
diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php index <HASH>..<HASH> 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php @@ -1273,14 +1273,6 @@ class AssignmentAnalyzer $statements_analyzer->node_data->setType($stmt, $fake_coalesce_type); } - BinaryOpAnalyzer::addDataFlow( - $statements_analyzer, - $stmt, - $stmt->var, - $stmt->expr, - 'coalesce' - ); - return true; } diff --git a/tests/UnusedVariableTest.php b/tests/UnusedVariableTest.php index <HASH>..<HASH> 100644 --- a/tests/UnusedVariableTest.php +++ b/tests/UnusedVariableTest.php @@ -2188,6 +2188,14 @@ class UnusedVariableTest extends TestCase print_r(...func_get_args()); }' ], + 'nullCoalesce' => [ + '<?php + function foo (?bool $b, int $c): void { + $b ??= $c; + + echo $b; + }' + ], ]; }
Fix #<I> - don’t merge sources twice for null coalesce
vimeo_psalm
train
php,php
72bffc77fc4f504bb36fe8716736682402c3b223
diff --git a/packages/ember-metal-views/lib/htmlbars-renderer.js b/packages/ember-metal-views/lib/htmlbars-renderer.js index <HASH>..<HASH> 100755 --- a/packages/ember-metal-views/lib/htmlbars-renderer.js +++ b/packages/ember-metal-views/lib/htmlbars-renderer.js @@ -7,7 +7,7 @@ import buildComponentTemplate from 'ember-views/system/build-component-template' import environment from 'ember-metal/environment'; import { internal } from 'htmlbars-runtime'; -function Renderer(domHelper, { destinedForDOM } = {}) { +export function Renderer(domHelper, { destinedForDOM } = {}) { this._dom = domHelper; // This flag indicates whether the resulting rendered element will be
Ensure `Ember._Renderer` still exists (for ember-cli-fastboot).
emberjs_ember.js
train
js
9798186a1842de57300888682cf14487150dbba9
diff --git a/blockstack/lib/storage/auth.py b/blockstack/lib/storage/auth.py index <HASH>..<HASH> 100644 --- a/blockstack/lib/storage/auth.py +++ b/blockstack/lib/storage/auth.py @@ -22,11 +22,28 @@ """ import virtualchain -from blockstack_client import get_zonefile_data_hash +import hashlib log = virtualchain.get_logger("blockstack-server") +def get_data_hash(data_txt): + """ + Generate a hash over data for immutable storage. + Return the hex string. + """ + h = hashlib.sha256() + h.update(data_txt) + return h.hexdigest() + + +def get_zonefile_data_hash(data_txt): + """ + Generate a hash over a user's zonefile. + Return the hex string. + """ + return hex_hash160(data_txt) + def verify_zonefile( zonefile_str, value_hash ): """
add zonefile hashing methods, removing dependency on blockstack_client
blockstack_blockstack-core
train
py
d99d962f66243b34ee51967b0457611c5d0a4faf
diff --git a/lib/Models/WebMapServiceCatalogItem.js b/lib/Models/WebMapServiceCatalogItem.js index <HASH>..<HASH> 100644 --- a/lib/Models/WebMapServiceCatalogItem.js +++ b/lib/Models/WebMapServiceCatalogItem.js @@ -470,6 +470,22 @@ WebMapServiceCatalogItem.defaultSerializers.tilingScheme = function(wmsItem, jso json.tilingScheme = wmsItem.tilingScheme; } }; + +// Do not serialize availableDimensions, availableStyles, intervals, description, info - these can be huge and can be recovered from the server. +// Normally when you share a WMS item, it is inside a WMS group, and when CatalogGroups are shared, they share their contents applying the +// CatalogMember.propertyFilters.sharedOnly filter, which only shares the "propertiesForSharing". +// However, if you create a straight WMS item outside a group (eg. by duplicating it), then share it, it will serialize everything it can. +WebMapServiceCatalogItem.defaultSerializers.availableDimensions = function() { +}; +WebMapServiceCatalogItem.defaultSerializers.availableStyles = function() { +}; +WebMapServiceCatalogItem.defaultSerializers.intervals = function() { +}; +WebMapServiceCatalogItem.defaultSerializers.description = function() { +}; +WebMapServiceCatalogItem.defaultSerializers.info = function() { +}; + freezeObject(WebMapServiceCatalogItem.defaultSerializers); /**
can share split wms items
TerriaJS_terriajs
train
js
dee4153d9becefb12d695837751e33d73c2e19d2
diff --git a/abodepy/__main__.py b/abodepy/__main__.py index <HASH>..<HASH> 100644 --- a/abodepy/__main__.py +++ b/abodepy/__main__.py @@ -293,15 +293,14 @@ def call(): if device: # pylint: disable=protected-access - _LOGGER.info(device_id + " JSON:\n" + - json.dumps(device._json_state, sort_keys=True, - indent=4, separators=(',', ': '))) + print(json.dumps(device._json_state, sort_keys=True, + indent=4, separators=(',', ': '))) else: _LOGGER.warning("Could not find device with id: %s", device_id) # Print def _device_print(dev, append=''): - _LOGGER.info("%s%s", + print("%s%s", dev.desc, append) # Print out all automations
Update __main__.py (#<I>) Use of print instead of logger to display JSON and device list Allows the information to be displayed when --quiet option is used See issue: --quiet does not return anything for --device or --device device_id #<I>
MisterWil_abodepy
train
py
aa5696c10da452f3985b971679d5b8c98229c3a4
diff --git a/cmd/influxd/server_integration_test.go b/cmd/influxd/server_integration_test.go index <HASH>..<HASH> 100644 --- a/cmd/influxd/server_integration_test.go +++ b/cmd/influxd/server_integration_test.go @@ -1922,10 +1922,6 @@ func TestSeparateBrokerTwoDataNodes(t *testing.T) { t.Fatalf("Test %s: failed to create leader data node on port %d", testName, dataConfig1.Port) } - // FIXME: This is needed for now because cmd.Open() will return before the server - // is actually ready to handle requests. - time.Sleep(1 * time.Second) - // Join data node 2 to single broker and first data node dataConfig2 := main.NewConfig() dataConfig2.Port = 9012 diff --git a/server.go b/server.go index <HASH>..<HASH> 100644 --- a/server.go +++ b/server.go @@ -691,6 +691,14 @@ func (s *Server) Join(u *url.URL, joinURL *url.URL) error { } defer resp.Body.Close() + // If we get a service unavailable, the other data nodes may still be booting + // so retry again + if resp.StatusCode == http.StatusServiceUnavailable { + retries += 1 + time.Sleep(1 * time.Second) + continue + } + // We likely tried to join onto a broker which cannot handle this request. It // has given us the address of a known data node to join instead. if resp.StatusCode == http.StatusTemporaryRedirect {
Handle server unavailable response When starting multiple servers concurrently, they can race to connect to each other. This change just has the join attempts retry to make cluster setup easier.
influxdata_influxdb
train
go,go
8c6521bb9bef180cdce2c19d33035d0b1c17639f
diff --git a/admin/uploadpicture.php b/admin/uploadpicture.php index <HASH>..<HASH> 100644 --- a/admin/uploadpicture.php +++ b/admin/uploadpicture.php @@ -209,7 +209,7 @@ function process_file ($file, $userfield, $overwrite) { // userfield names are safe, so don't quote them. if (!($user = $DB->get_record('user', array ($userfield => $uservalue, 'deleted' => 0)))) { - $a = new Object(); + $a = new stdClass(); $a->userfield = clean_param($userfield, PARAM_CLEANHTML); $a->uservalue = clean_param($uservalue, PARAM_CLEANHTML); echo $OUTPUT->notification(get_string('uploadpicture_usernotfound', 'admin', $a));
MDL-<I> switching to stdClass- some leftovers
moodle_moodle
train
php
c2f4425ee749a288078c5c3045fc984e691ae6c8
diff --git a/sharding-opentracing/src/main/java/org/apache/shardingsphere/opentracing/hook/OpenTracingSQLExecutionHook.java b/sharding-opentracing/src/main/java/org/apache/shardingsphere/opentracing/hook/OpenTracingSQLExecutionHook.java index <HASH>..<HASH> 100644 --- a/sharding-opentracing/src/main/java/org/apache/shardingsphere/opentracing/hook/OpenTracingSQLExecutionHook.java +++ b/sharding-opentracing/src/main/java/org/apache/shardingsphere/opentracing/hook/OpenTracingSQLExecutionHook.java @@ -64,7 +64,7 @@ public final class OpenTracingSQLExecutionHook implements SQLExecutionHook { if (null == parameterSets || parameterSets.isEmpty()) { return ""; } - return String.format("[%s]", Joiner.on(", ").join(parameterSets)); + return String.format("[%s]", Joiner.on(", ").useForNull("Null").join(parameterSets)); } @Override
#<I>, another case didn't fixed before
apache_incubator-shardingsphere
train
java
33d1e5dfbd6eb618a18bf6f64bd73de996a7796e
diff --git a/wordpress_xmlrpc/base.py b/wordpress_xmlrpc/base.py index <HASH>..<HASH> 100644 --- a/wordpress_xmlrpc/base.py +++ b/wordpress_xmlrpc/base.py @@ -9,17 +9,13 @@ class Client(object): self.blog_id = blog_id self.server = xmlrpclib.ServerProxy(url, use_datetime=True) - - def supported_methods(self): - """ - Retrieve list of supported XML-RPC methods. - """ - return self.server.mt.supportedMethods() + self.supported_methods = self.server.mt.supportedMethods() def call(self, method): + assert (method.method_name in self.supported_methods) server_method = getattr(self.server, method.method_name) args = method.get_args(self) - print method.method_name, args + # print method.method_name, args raw_result = server_method(*args) return method.process_result(raw_result)
Added assertion to check that a method call is supported by the server.
maxcutler_python-wordpress-xmlrpc
train
py
fe0dd8e08fcd7464300209a7776e4e9275fcb17e
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/SpringCli.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/SpringCli.java index <HASH>..<HASH> 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/SpringCli.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/SpringCli.java @@ -304,14 +304,21 @@ public class SpringCli { private void showCommandHints(String starting) { for (Command command : SpringCli.this.commands) { - if (command.getName().startsWith(starting) - || (command.isOptionCommand() && ("--" + command.getName()) - .startsWith(starting))) { + if (isHintMatch(command, starting)) { Log.info(command.getName() + " " + command.getDescription()); } } } + private boolean isHintMatch(Command command, String starting) { + if (command instanceof HintCommand) { + return false; + } + return command.getName().startsWith(starting) + || (command.isOptionCommand() && ("--" + command.getName()) + .startsWith(starting)); + } + private void showCommandOptionHints(String commandName, List<String> specifiedArguments, String starting) { Command command = find(commandName);
Don't provide hints for the hint command
spring-projects_spring-boot
train
java
d3c382a7e7e933e9602f5a5445d03f6dc5138da0
diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py index <HASH>..<HASH> 100644 --- a/tests/test_pytest_cov.py +++ b/tests/test_pytest_cov.py @@ -1100,7 +1100,7 @@ def test_run_target(): @pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support is broken on Windows") @pytest.mark.skipif('platform.python_implementation() == "PyPy"', reason="often deadlocks on PyPy") -@pytest.mark.skipif('sys.version_info[:2] == (3, 8)', reason="deadlocks on Python 3.8, see: https://bugs.python.org/issue38227") +@pytest.mark.skipif('sys.version_info[:2] >= (3, 8)', reason="deadlocks on Python 3.8, see: https://bugs.python.org/issue38227") def test_multiprocessing_pool_terminate(testdir): pytest.importorskip('multiprocessing.util')
Skip this on <I>+
pytest-dev_pytest-cov
train
py
932cf9a5a1c7052b0986892fa137f195646cd1bb
diff --git a/lib/keen/client.rb b/lib/keen/client.rb index <HASH>..<HASH> 100644 --- a/lib/keen/client.rb +++ b/lib/keen/client.rb @@ -7,7 +7,7 @@ require 'openssl' require 'multi_json' require 'base64' require 'cgi' -require 'addressable' +require 'addressable/uri' module Keen class Client @@ -92,7 +92,12 @@ module Keen end def api_event_collection_resource_path(event_collection) - "/#{api_version}/projects/#{project_id}/events/#{Addressable::URI.escape(event_collection.to_s)}" + path = "" + path = path + "/#{api_version}/projects/#{project_id}/events/" + encoded_collection_name = Addressable::URI.escape(event_collection.to_s) + encoded_collection_name.gsub! '/', '%2F' + path = path + encoded_collection_name + path end def preprocess_params(params)
fixes a bug so that collection names with slashes will work
keenlabs_keen-gem
train
rb
ae006493054e524ed35c08863f1713986fe0a22c
diff --git a/daemon/graphdriver/devmapper/driver.go b/daemon/graphdriver/devmapper/driver.go index <HASH>..<HASH> 100644 --- a/daemon/graphdriver/devmapper/driver.go +++ b/daemon/graphdriver/devmapper/driver.go @@ -4,11 +4,12 @@ package devmapper import ( "fmt" - "github.com/dotcloud/docker/daemon/graphdriver" - "github.com/dotcloud/docker/utils" "io/ioutil" "os" "path" + + "github.com/dotcloud/docker/daemon/graphdriver" + "github.com/dotcloud/docker/utils" ) func init() { @@ -98,7 +99,7 @@ func (d *Driver) Get(id, mountLabel string) (string, error) { } // Mount the device - if err := d.DeviceSet.MountDevice(id, mp, ""); err != nil { + if err := d.DeviceSet.MountDevice(id, mp, mountLabel); err != nil { return "", err }
Update devicemapper to pass mount flag Docker-DCO-<I>-
moby_moby
train
go
077ea3cf8f727c7a962122ad687a1a88272e5371
diff --git a/lib/common.js b/lib/common.js index <HASH>..<HASH> 100644 --- a/lib/common.js +++ b/lib/common.js @@ -23,6 +23,7 @@ var util = require('util'); var sprintf = require('sprintf').sprintf; var async = require('async'); var gex = require('gex'); +var log = require('logmagic').local('whiskey.common'); var assert = require('./assert'); var constants = require('./constants'); @@ -138,6 +139,9 @@ Test.prototype.run = function(callback) { function finishFunc() { if (finishCallbackCalled) { // someone called .finish() twice. + log.infof('test.finish in [bold]${name}[/bold] has been called twice' + + ', possible double callback in your code!', + {'name': self._testName}); return; }
Log when test.finish is called second time.
cloudkick_whiskey
train
js
7e332c894ea3f9a3837a75155386af58f66e2076
diff --git a/lib/handlers/plugin-handler.js b/lib/handlers/plugin-handler.js index <HASH>..<HASH> 100644 --- a/lib/handlers/plugin-handler.js +++ b/lib/handlers/plugin-handler.js @@ -22,6 +22,14 @@ module.exports = function(req, res, next) { req.headers[pluginMgr.SSL_FLAG_HEADER] = 'true'; } + var localHost = req.rules.host; + if (localHost) { + req.headers[pluginMgr.LOCAL_HOST_HEADER] = encodeURIComponent(util.removeProtocol(localHost.matcher, true)); + if (localHost.port) { + req.headers[pluginMgr.HOST_PORT_HEADER] = localHost.port; + } + } + options.host = '127.0.0.1'; options.port = ports.port; options.href = util.changePort(req.fullUrl, ports.port);
feat: send host:port to plugin.server
avwo_whistle
train
js
047226ce5537a22cab966f5aa8fbb8cfc827a561
diff --git a/src/Broadway/Saga/MultipleSagaManager.php b/src/Broadway/Saga/MultipleSagaManager.php index <HASH>..<HASH> 100644 --- a/src/Broadway/Saga/MultipleSagaManager.php +++ b/src/Broadway/Saga/MultipleSagaManager.php @@ -15,7 +15,7 @@ use Broadway\Domain\DomainMessage; use Broadway\EventDispatcher\EventDispatcherInterface; use Broadway\Saga\Metadata\MetadataFactoryInterface; use Broadway\Saga\State\RepositoryInterface; -use Broadway\Saga\State\StateManager; +use Broadway\Saga\State\StateManagerInterface; /** * SagaManager that manages multiple sagas. @@ -29,7 +29,7 @@ class MultipleSagaManager implements SagaManagerInterface public function __construct( RepositoryInterface $repository, array $sagas, - StateManager $stateManager, + StateManagerInterface $stateManager, MetadataFactoryInterface $metadataFactory, EventDispatcherInterface $eventDispatcher ) {
Use StateManagerInterface instead of StateManager
broadway_broadway-saga
train
php
b61e3ab6ac4c3c22050e17c1769e8410da91f170
diff --git a/graylog2-server/src/main/java/org/graylog2/indexer/ranges/IndexRangeComparator.java b/graylog2-server/src/main/java/org/graylog2/indexer/ranges/IndexRangeComparator.java index <HASH>..<HASH> 100644 --- a/graylog2-server/src/main/java/org/graylog2/indexer/ranges/IndexRangeComparator.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/ranges/IndexRangeComparator.java @@ -16,6 +16,8 @@ */ package org.graylog2.indexer.ranges; +import com.google.common.collect.ComparisonChain; + import java.util.Comparator; public class IndexRangeComparator implements Comparator<IndexRange> { @@ -24,6 +26,10 @@ public class IndexRangeComparator implements Comparator<IndexRange> { */ @Override public int compare(IndexRange o1, IndexRange o2) { - return o2.end().compareTo(o1.end()); + return ComparisonChain.start() + .compare(o1.end(), o2.end()) + .compare(o1.begin(), o2.begin()) + .compare(o1.indexName(), o2.indexName()) + .result(); } }
IndexRangeComparator should take begin and indexName into account Some sorted collections (I'm looking at you, `ImmutableSortedSet`) are using the comparison equality instead of `Object#equals()` to determine whether an element should be added or not. Since the default "empty" index range has always the same begin and end timestamp (i. e. UNIX epoch), this has lead to strange effects when calculating or checking index ranges before.
Graylog2_graylog2-server
train
java
81e3ceb2369b5a9d6c88962a0c474c539444292e
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -2,9 +2,8 @@ import sys from setuptools import setup install_requires = [ - "argparse==1.2.1", - "requests==2.4.3", - "wsgiref==0.1.2" + "argparse>=1.2.1", + "requests>=2.4.3" ] setup(
My bet is you don't need wsgiref and future you will be glad these >= are there
Schwanksta_python-arcgis-rest-query
train
py
135b6cda4745f5d6f327fab62ebb6b481f088b83
diff --git a/tests/test_pif.py b/tests/test_pif.py index <HASH>..<HASH> 100644 --- a/tests/test_pif.py +++ b/tests/test_pif.py @@ -40,6 +40,7 @@ class TestPifGenerator(unittest.TestCase): Test ability to parse VASP directories ''' + test_quality_report = True for file in glob.glob(os.path.join('examples','vasp','*.tar.gz')): # Get the example files unpack_example(file) @@ -47,7 +48,9 @@ class TestPifGenerator(unittest.TestCase): # Make the pif file # print("\tpif for example:", name) - result = directory_to_pif(name) + result = directory_to_pif(name, quality_report=test_quality_report) + # Only hit the quality report endpoint once to avoid load spikes in automated tests + test_quality_report=False assert result.chemical_formula is not None assert result.properties is not None # print(pif.dumps(result, indent=4))
Reducing testing load on quality report endpoint
CitrineInformatics_pif-dft
train
py
f87718c667e7f3e908c395ff6302af45864440bb
diff --git a/src/DataPool/SearchEngine/IntegrationTestSearchEngineAbstract.php b/src/DataPool/SearchEngine/IntegrationTestSearchEngineAbstract.php index <HASH>..<HASH> 100644 --- a/src/DataPool/SearchEngine/IntegrationTestSearchEngineAbstract.php +++ b/src/DataPool/SearchEngine/IntegrationTestSearchEngineAbstract.php @@ -87,10 +87,10 @@ abstract class IntegrationTestSearchEngineAbstract implements SearchEngine, Clea */ private function createSearchEngineCriteriaForFilters(array $filters) { - return array_map(function ($filterCode, $filterOptionValues) { - $optionValuesCriteriaArray = $this->createOptionValuesCriteriaArray($filterCode, $filterOptionValues); + return array_map(function ($filterCode) use ($filters) { + $optionValuesCriteriaArray = $this->createOptionValuesCriteriaArray($filterCode, $filters[$filterCode]); return CompositeSearchCriterion::createOr(...$optionValuesCriteriaArray); - }, array_keys($filters), $filters); + }, array_keys($filters)); } /**
Issue #<I>: Remove potential inconsistency between array_keys and array_values
lizards-and-pumpkins_catalog
train
php
792372f4672db00145f1022770b11f5fb39abd2e
diff --git a/spyderlib/baseconfig.py b/spyderlib/baseconfig.py index <HASH>..<HASH> 100644 --- a/spyderlib/baseconfig.py +++ b/spyderlib/baseconfig.py @@ -275,6 +275,8 @@ def get_interface_language(): lang.startswith(locale_language): language = lang break + else: + language = DEFAULT_LANGUAGE return language
Fix breakage on Windows after PR #<I>
spyder-ide_spyder
train
py
61af11fddc5ec39331cdec6b1215b891167a39cb
diff --git a/torrent.go b/torrent.go index <HASH>..<HASH> 100644 --- a/torrent.go +++ b/torrent.go @@ -655,7 +655,7 @@ type Peer struct { } func (t *torrent) pieceLength(piece int) (len_ pp.Integer) { - if piece < 0 || piece > t.Info.NumPieces() { + if piece < 0 || piece >= t.Info.NumPieces() { return } if int(piece) == t.numPieces()-1 {
Off by one error in torrent.pieceLength?
anacrolix_torrent
train
go
d769f3393284abcb409e124332bb23b55292369a
diff --git a/Resources/public/scripts/form.wysiwyg.js b/Resources/public/scripts/form.wysiwyg.js index <HASH>..<HASH> 100644 --- a/Resources/public/scripts/form.wysiwyg.js +++ b/Resources/public/scripts/form.wysiwyg.js @@ -17,7 +17,9 @@ dataType: "script", cache: true }).done(function() { - $elements.ckeditor(); + var config = {}; + $elements.trigger('ckeditor-config', config); + $elements.ckeditor(config); }); }); });
[Backoffice] Allow ckeditor configuration.
Clastic_BackofficeBundle
train
js
2ca82ad43d70337b4317e2367b8d20cb9f14f3df
diff --git a/lib/renderer.js b/lib/renderer.js index <HASH>..<HASH> 100644 --- a/lib/renderer.js +++ b/lib/renderer.js @@ -501,17 +501,15 @@ * @return {Bounds} */ PixmapRenderer.prototype._getContentBounds = function (layer, ignoreArtboardBounds) { - if (ignoreArtboardBounds && layer.artboard) { - return; - } // Do not include the top-level layer group var isRoot = (layer.document.layers === layer), + ignorableArtboard = ignoreArtboardBounds && layer.artboard, maskBounds = isRoot ? null : layer.getTotalMaskBounds(), - bounds = isRoot ? null : layer.bounds; + bounds = isRoot || ignorableArtboard ? null : layer.bounds; if ((!isRoot && !layer.visible) || layer.clipped || layer.type === "adjustmentLayer") { - return; + return new Bounds({top: 0, left: 0, bottom: 0, right: 0}); } var unionChildBounds = function (currentBounds, childLayer) { @@ -527,7 +525,7 @@ if (bounds && maskBounds) { bounds = bounds.intersect(maskBounds); } - return bounds && new Bounds(bounds); + return bounds && new Bounds(bounds) || new Bounds({top: 0, left: 0, bottom: 0, right: 0}); }; /**
treat artboards as root nodes for contentbounds calculations, fixes <I>
adobe-photoshop_generator-assets
train
js
d8b90b93c7fdf636d6080a8dd8bfb0a8256e598c
diff --git a/load-i18n.js b/load-i18n.js index <HASH>..<HASH> 100644 --- a/load-i18n.js +++ b/load-i18n.js @@ -1,6 +1,6 @@ export default function loadI18n(locale) { // Use lazy once so that subsequent calls to import() will use the same // network response. https://webpack.js.org/api/module-methods/#import- - return import(/* webpackChunkName: "i18n-locale-data", webpackMode: "lazy-once" */ + return import(/* webpackChunkName: "i18n-locale-data" */ `./data/${locale}.json`); }
refactor(app-shell): remove iunnecessary nner application
commercetools_merchant-center-application-kit
train
js
489d184e2a5f0a072e730170792a2c81e0d54c62
diff --git a/app/controllers/mercator_mesonic/application_controller.rb b/app/controllers/mercator_mesonic/application_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/mercator_mesonic/application_controller.rb +++ b/app/controllers/mercator_mesonic/application_controller.rb @@ -13,7 +13,7 @@ module MercatorMesonic private def admin_required - redirect_to user_login_path unless logged_in? && current_user.administrator? + redirect_to user_login_path unless logged_in? && current_user.administrator? end WebartikelImportJob = Struct.new(:dummy) do
mesosnic user controller extension specs
informatom_mercator_mesonic
train
rb
ed0fa07f4822ad7b6396f8135a237e8b88b3eb6a
diff --git a/rshell/main.py b/rshell/main.py index <HASH>..<HASH> 100755 --- a/rshell/main.py +++ b/rshell/main.py @@ -1390,7 +1390,7 @@ def connect(port, baud=115200, user='micro', password='python', wait=0): ip_address = socket.gethostbyname(port) #print('Connecting to ip', ip_address) connect_telnet(port, ip_address, user=user, password=password) - except socket.gaierror: + except (socket.gaierror, ValueError): # Doesn't look like a hostname or IP-address, assume its a serial port #print('connecting to serial', port) connect_serial(port, baud=baud, wait=wait)
Catch exception raised by socket.gethostbyname() if the serial port name is too long.
dhylands_rshell
train
py
9b4e1c5e6a2441cef82e7ce2afc4186ef1691ecc
diff --git a/lib/active_admin_sidebar/version.rb b/lib/active_admin_sidebar/version.rb index <HASH>..<HASH> 100644 --- a/lib/active_admin_sidebar/version.rb +++ b/lib/active_admin_sidebar/version.rb @@ -1,3 +1,3 @@ module ActiveAdminSidebar - VERSION = "1.1.0" + VERSION = '1.2.0'.freeze end
Bump <I> Drop dependency of coffee-script
activeadmin-plugins_active_admin_sidebar
train
rb
b40a546b2646986c604ed876f3a0cffa0f047615
diff --git a/providers/transport/webrtc/transport.webrtc.js b/providers/transport/webrtc/transport.webrtc.js index <HASH>..<HASH> 100644 --- a/providers/transport/webrtc/transport.webrtc.js +++ b/providers/transport/webrtc/transport.webrtc.js @@ -3,7 +3,9 @@ // For use in unit testing if (typeof Promise === 'undefined' && typeof require === 'function') { + /*jslint -W079 */ var Promise = require('es6-promise').Promise; + /*jslint +W079 */ }
remove jshint warning.
freedomjs_freedom
train
js
3bca57f93d0abbd77010da65856bc98abc64e83c
diff --git a/master/buildbot/statistics/capture.py b/master/buildbot/statistics/capture.py index <HASH>..<HASH> 100644 --- a/master/buildbot/statistics/capture.py +++ b/master/buildbot/statistics/capture.py @@ -344,6 +344,10 @@ class CaptureDataBase(Capture): context = self._defaultContext(build_data, builder_info['name']) yield self._store(post_data, series_name, context) + @abc.abstractmethod + def _builder_name_matches(self, builder_info): + pass + class CaptureData(CaptureDataBase): @@ -366,8 +370,5 @@ class CaptureDataAllBuilders(CaptureDataBase): Capture methods for arbitraty data that may not be stored in the Buildbot database. """ - def __init__(self, data_name, callback=None): - CaptureDataBase.__init__(self, data_name, callback) - def _builder_name_matches(self, builder_info): return True
Added ABC method to CaptureData; removed __init__ of CaptureDataAllBuilders
buildbot_buildbot
train
py
93ea1294e38371d2a348489189bb13b5bf1277e4
diff --git a/lib/navigationlib.php b/lib/navigationlib.php index <HASH>..<HASH> 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -1406,7 +1406,7 @@ class global_navigation extends navigation_node { foreach ($modinfo->sections[$sectionnumber] as $cmid) { $cm = $modinfo->cms[$cmid]; - if ($cm->modname == 'label' || (!$viewhiddenactivities && !$cm->visible)) { + if (!$viewhiddenactivities && !$cm->visible) { continue; } if ($cm->icon) { @@ -1418,7 +1418,9 @@ class global_navigation extends navigation_node { $activitynode = $sectionnode->add($cm->name, $url, navigation_node::TYPE_ACTIVITY, $cm->name, $cm->id, $icon); $activitynode->title(get_string('modulename', $cm->modname)); $activitynode->hidden = (!$cm->visible); - if ($this->module_extends_navigation($cm->modname)) { + if ($cm->modname == 'label') { + $activitynode->display = false; + } else if ($this->module_extends_navigation($cm->modname)) { $activitynode->nodetype = navigation_node::NODETYPE_BRANCH; } $activities[$cmid] = $activitynode;
navigation MDL-<I> Labels are now added to the navigation but the display property is set to false.
moodle_moodle
train
php
53c5d31e10255d41f1392fe79fd3666ad1b60fdb
diff --git a/spec/rack/app/router/versioned_path_spec.rb b/spec/rack/app/router/versioned_path_spec.rb index <HASH>..<HASH> 100644 --- a/spec/rack/app/router/versioned_path_spec.rb +++ b/spec/rack/app/router/versioned_path_spec.rb @@ -4,10 +4,15 @@ describe Rack::App do include Rack::App::Test paths = [ + '/1.0.0', '/v1.0.0', '/api/v1.0.0', + '/api/version/1.0.0', '/api/v1.0.0/anything', - '/api/v1.0.0/anything/plus_more' + '/api/v1.0.0-alpha2/anything', + '/api/version/1.0.0/anything', + '/api/v1.0.0/anything/plus_more', + '/api/version/1.0.0/anything/plus_more' ].freeze paths.each do |path|
test: add more test based on JoWilfrid instruction
rack-app_rack-app
train
rb
6646929d172249d0b3b99b5a441a4753f2044a52
diff --git a/lib/docusign_rest/client.rb b/lib/docusign_rest/client.rb index <HASH>..<HASH> 100644 --- a/lib/docusign_rest/client.rb +++ b/lib/docusign_rest/client.rb @@ -607,8 +607,7 @@ module DocusignRest request.body = post_body response = http.request(request) - parsed_response = JSON.parse(response.body) - parsed_response["url"] + JSON.parse(response.body) end # Public returns the envelope recipients for a given envelope
return the response, not the url
jondkinney_docusign_rest
train
rb
d5bee148b202913723f921e992225d8ad8064550
diff --git a/Fixture/OrmYamlFixture.php b/Fixture/OrmYamlFixture.php index <HASH>..<HASH> 100755 --- a/Fixture/OrmYamlFixture.php +++ b/Fixture/OrmYamlFixture.php @@ -22,8 +22,16 @@ class OrmYamlFixture extends AbstractFixture { $value = new \DateTime($value); } $object->$method($value); - } else if (in_array($field, $associations)) { // This field is an association, we load it from the references - $object->$method($this->loader->getReference($value)); + } else if (in_array($field, $associations)) { // This field is an association + if (is_array($value)) { // The field is an array of associations + $referenceArray = array(); + foreach ($value as $referenceObject) { + $referenceArray[] = $this->loader->getReference($referenceObject); + } + $object->$method($referenceArray); + } else { + $object->$method($this->loader->getReference($value)); + } } else { // It's a method call that will set a field named differently // eg: FOSUserBundle ->setPlainPassword sets the password after
Associations can now be passed as an array of associations
khepin_KhepinYamlFixturesBundle
train
php
987a5da5c3f5c997a627b84c7c5c55a131e93f20
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ except(IOError, ImportError): setup( name='waspy', - version='0.25.0', + version='0.25.2', install_requires=[ 'httptools==0.0.10', 'aioamqp==0.10.0', diff --git a/waspy/transports/rabbitmqtransport.py b/waspy/transports/rabbitmqtransport.py index <HASH>..<HASH> 100644 --- a/waspy/transports/rabbitmqtransport.py +++ b/waspy/transports/rabbitmqtransport.py @@ -1,6 +1,7 @@ import asyncio import logging import uuid +from http import HTTPStatus import aioamqp import re @@ -145,7 +146,7 @@ class RabbitMQClientTransport(ClientTransportABC, RabbitChannelMixIn): response = Response(headers=headers, correlation_id=properties.correlation_id, body=body, - status=status, + status=HTTPStatus(status), content_type=properties.content_type) future.set_result(response)
Fix rabbitmq client parsing
wasp_waspy
train
py,py