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
88e21a1231f8658752e9ebe58a7339c6b944ce9d
diff --git a/lurklib/core.py b/lurklib/core.py index <HASH>..<HASH> 100755 --- a/lurklib/core.py +++ b/lurklib/core.py @@ -97,9 +97,6 @@ class _Core(variables._Variables, exceptions._Exceptions, If an error is found the relevant exception will be raised. """ with self.lock: - if self.find(msg, '\0') or self.find(msg, '\x00'): - raise \ - self.NullCharNotAllowed("LurklibError: NullCharNotAllowed") msg = msg.replace('\r', '\\r').replace('\n', '\\n') + self._crlf try: data = msg.encode(self.encoding) diff --git a/lurklib/exceptions.py b/lurklib/exceptions.py index <HASH>..<HASH> 100755 --- a/lurklib/exceptions.py +++ b/lurklib/exceptions.py @@ -71,9 +71,6 @@ class _Exceptions(object): class MessageTooLong(LurklibError): pass - class NullCharNotAllowed(LurklibError): - pass - class AlreadyInChannel(LurklibError): pass
Removed NullChar exception etc.
jamieleshaw_lurklib
train
py,py
465e406e62b9e291edae69b86a1ce5f6e3a73cb0
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -38,6 +38,8 @@ export default (editor, opts = {}) => { }, async createDirectory(zip, root) { + root = typeof root === 'function' ? await root(editor) : root; + for (const name in root) { if (root.hasOwnProperty(name)) { let content = root[name];
Accept `root` as an async function
artf_grapesjs-plugin-export
train
js
be57ff7977fae01f23a687968a5330ec6d74590a
diff --git a/samples/quickstart.js b/samples/quickstart.js index <HASH>..<HASH> 100644 --- a/samples/quickstart.js +++ b/samples/quickstart.js @@ -23,7 +23,7 @@ const {Spanner} = require('@google-cloud/spanner'); const projectId = 'YOUR_PROJECT_ID'; // Creates a client -const spanner = Spanner({ +const spanner = new Spanner({ projectId: projectId, });
Update QuickStart to use "new" syntax for creating Spanner client. (#<I>)
googleapis_nodejs-spanner
train
js
2a68bd84cd047c1f634290239a43702708ae2826
diff --git a/treebeard/models.py b/treebeard/models.py index <HASH>..<HASH> 100644 --- a/treebeard/models.py +++ b/treebeard/models.py @@ -50,13 +50,16 @@ class NodeQuerySet(models.query.QuerySet): # already getting removed, since that would be redundant removed = {} for node in self.order_by('depth', 'path'): + found = False for depth in range(1, len(node.path)/node.steplen): path = node._get_basepath(node.path, depth) if path in removed: # we are already removing a parent of this node # skip - continue - removed[node.path] = node + found = True + break + if not found: + removed[node.path] = node # ok, got the minimal list of nodes to remove... # we must also remove their children @@ -231,7 +234,7 @@ class MPNode(Node): .. warning:: - Do not change the values of the :attr:`depth`, :attr:`alphabet` or + Do not change the values of the :attr:`steplen`, :attr:`alphabet` or :attr:`node_order_by` after saving your first model. Doing so will corrupt the tree. If you *must* do it:
fixed bug in delete() slowing down... well... deletetion of nodes
django-treebeard_django-treebeard
train
py
935035b42a437c08f457aeb791f383d4811703fb
diff --git a/tests/test_summarizers/test_kl.py b/tests/test_summarizers/test_kl.py index <HASH>..<HASH> 100644 --- a/tests/test_summarizers/test_kl.py +++ b/tests/test_summarizers/test_kl.py @@ -130,3 +130,19 @@ def test_tf_idf_metric_should_be_real_number(): "words": 0.2, "jop": 0.2, } + + +def test_the_sentences_should_be_in_different_order(summarizer): + """https://github.com/miso-belica/sumy/issues/146""" + paragraphs = [ + ["This is 1st sentence.", "This is 2nd sentence."], + ["This is 3rd sentence.", "This is 4th sentence."], + ["This is 5th sentence."], + ] + document = build_document(*paragraphs) + reversed_document = build_document(*(reversed(p) for p in reversed(paragraphs))) + + sentences = summarizer(document, "100%") + reversed_sentences = summarizer(reversed_document, "100%") + + assert tuple(reversed(sentences)) == reversed_sentences
Add test for the sentence order of KL summarizer #<I>
miso-belica_sumy
train
py
1e87da1c846e1f5ad40caf4b1b2e8f26df401f53
diff --git a/src/Schema.php b/src/Schema.php index <HASH>..<HASH> 100644 --- a/src/Schema.php +++ b/src/Schema.php @@ -240,7 +240,7 @@ abstract class Schema ); foreach ($this->getTables('VIEW') as $view) { if (!$this->shouldIgnore($view)) { - $operations[] = "DROP VIEW $view"; + $operations[] = "DROP VIEW IF EXISTS $view"; } } return $operations;
add if exists, it might already have been dropped due to cascade
dbmover_core
train
php
d575a1d0c97749150799de2d48c40a07695849dc
diff --git a/lib/tuttle/middleware/request_profiler.rb b/lib/tuttle/middleware/request_profiler.rb index <HASH>..<HASH> 100644 --- a/lib/tuttle/middleware/request_profiler.rb +++ b/lib/tuttle/middleware/request_profiler.rb @@ -1,6 +1,4 @@ # frozen-string-literal: true -require 'tuttle/ruby_prof/fast_call_stack_printer' - module Tuttle module Middleware class RequestProfiler @@ -49,6 +47,7 @@ module Tuttle def profile_cpu(env, query_string) require 'ruby-prof' + require 'tuttle/ruby_prof/fast_call_stack_printer' query_params = Rack::Utils.parse_nested_query(query_string) options = {}
defer requiring custom ruby-prof printer in case memory_profiler is installed but not ruby-prof
dgynn_tuttle
train
rb
1ff60899f741beb5696dd2645f718a5f1b67a5e5
diff --git a/mod/resource/mod_form.php b/mod/resource/mod_form.php index <HASH>..<HASH> 100644 --- a/mod/resource/mod_form.php +++ b/mod/resource/mod_form.php @@ -37,7 +37,8 @@ class mod_resource_mod_form extends moodleform_mod { $mform->addElement('htmleditor', 'summary', get_string('summary')); $mform->setType('summary', PARAM_RAW); $mform->setHelpButton('summary', array('summary', get_string('summary'), 'resource')); - $mform->addRule('summary', get_string('required'), 'required', null, 'client'); + // summary should be optional again MDL-9485 + //$mform->addRule('summary', get_string('required'), 'required', null, 'client'); $mform->addElement('header', 'typedesc', get_string('resourcetype'.$type,'resource')); $this->_resinstance->setup_elements($mform);
MDL-<I> resource summary now optional again; merged from MOODLE_<I>_STABLE
moodle_moodle
train
php
5d27d89bd0cd987cb0f75254db8a445f0f1ec44b
diff --git a/fusionbox/passwords.py b/fusionbox/passwords.py index <HASH>..<HASH> 100644 --- a/fusionbox/passwords.py +++ b/fusionbox/passwords.py @@ -3,9 +3,15 @@ from django.core.exceptions import ValidationError A list of very common passwords and a function for validating that passwords are not too common. """ + def validate_password(pw): if pw in COMMON_PASSWORDS: - raise ValidationError('Your password is too common. Please choose another.') + raise ValidationError( + 'Your password is too common. Please avoid proper ' + 'nouns, characters in obvious patterns, or any list ' + 'of characters that form a pattern on the keyboard.' + ) + #!comment: This list has been compiled by Solar Designer of Openwall Project, #!comment: http://www.openwall.com/wordlists/
Change password validation message The password validation message is not clear enough. Change it to include more specific information about what is wrong with the password.
fusionbox_django-argonauts
train
py
3c8dbf9df1722999c1aae7a4dbc303b7cb70d051
diff --git a/repairbox/manager.py b/repairbox/manager.py index <HASH>..<HASH> 100644 --- a/repairbox/manager.py +++ b/repairbox/manager.py @@ -220,7 +220,9 @@ class SourceManager(object): def remove(self, src: str) -> None: """ - Removes an existing source. + Removes an existing source. The removal process destroys the local + copies of the manifest (and build) files for this source, and + uninstalls all of its associated images. """ assert src != "" if src not in self.__sources: @@ -231,7 +233,6 @@ class SourceManager(object): self.__write() - def update(self) -> None: """ Downloads any available updates for all (installed) sources.
modified API for SourceManager::remove
squaresLab_BugZoo
train
py
ffa6c077e549f3b2f70add3ebd2d88a0b40f1a43
diff --git a/oplus/version.py b/oplus/version.py index <HASH>..<HASH> 100644 --- a/oplus/version.py +++ b/oplus/version.py @@ -1 +1 @@ -version='8.1.0' +version='8.1.1'
[skip ci] updated version as <I>
openergy_oplus
train
py
9bf19f28f899b9cd82197d6e0707c78b4e72ecc8
diff --git a/src/plumb-gulp.js b/src/plumb-gulp.js index <HASH>..<HASH> 100644 --- a/src/plumb-gulp.js +++ b/src/plumb-gulp.js @@ -1,21 +1,17 @@ import gulp from 'gulp'; -import notify from 'gulp-notify'; +import gutil from 'gulp-util'; import plumber from 'gulp-plumber'; const plumberArg = options => { return { errorHandler: function (err) { - const opts = { - title: 'Gulp Error', - message: '<%= error.message.split(\'\\n\')[0] %>', - sound: 'Bottle', - }; - if (!options || !options.filterout || !options.filterout(err)) { - notify.onError(opts)(err); + gutil.log(err.message); } + // Hack not to hang gulp tasks + this.emit('finish'); this.emit('end'); }, };
Removed gulp-notify, force end of stream 'finish' used to not be necessary
jlenoble_plumb-gulp
train
js
0d04678353de878428a7c1b992d5187be3fcb55c
diff --git a/repo_collaborator.go b/repo_collaborator.go index <HASH>..<HASH> 100644 --- a/repo_collaborator.go +++ b/repo_collaborator.go @@ -29,7 +29,7 @@ func (c *Client) AddCollaborator(user, repo, collaborator string, opt AddCollabo if err != nil { return err } - _, err = c.getResponse("PUT", fmt.Sprintf("/repos/%s/%s/collaborators/%s", user, repo, collaborator), nil, bytes.NewReader(body)) + _, err = c.getResponse("PUT", fmt.Sprintf("/repos/%s/%s/collaborators/%s", user, repo, collaborator), jsonHeader, bytes.NewReader(body)) return err } diff --git a/user_follow.go b/user_follow.go index <HASH>..<HASH> 100644 --- a/user_follow.go +++ b/user_follow.go @@ -37,7 +37,7 @@ func (c *Client) IsUserFollowing(user, target string) bool { } func (c *Client) Follow(target string) error { - _, err := c.getResponse("PUT", fmt.Sprintf("/user/following/%s", target), nil, nil) + _, err := c.getResponse("PUT", fmt.Sprintf("/user/following/%s", target), jsonHeader, nil) return err }
add jsonHeader to put request (#<I>)
gogs_go-gogs-client
train
go,go
c14fb79726f280f12c8afd046f92c2b79794c23e
diff --git a/indra/trips/processor.py b/indra/trips/processor.py index <HASH>..<HASH> 100644 --- a/indra/trips/processor.py +++ b/indra/trips/processor.py @@ -73,10 +73,15 @@ class TripsProcessor(object): to a sentence ID. Here we find and return the full sentence from which the event was taken. ''' - par_id = event_tag.attrib['paragraph'] - uttnum = event_tag.attrib['uttnum'] - text = event_tag.find('text').text - sentence = self.sentences[uttnum] + par_id = event_tag.attrib.get('paragraph') + uttnum = event_tag.attrib.get('uttnum') + event_text = event_tag.find('text') + if self.sentences is not None and uttnum is not None: + sentence = self.sentences[uttnum] + elif event_text is not None: + sentence = event_text.text + else: + sentence = None return sentence def get_activations(self):
Handle missing text/sentence/paragraph in TRIPS processor
sorgerlab_indra
train
py
ce1b2ef6b568f1987bdf920e2f5c3f3ecf744dd7
diff --git a/src/Enum/Fields/ProductImageFields.php b/src/Enum/Fields/ProductImageFields.php index <HASH>..<HASH> 100644 --- a/src/Enum/Fields/ProductImageFields.php +++ b/src/Enum/Fields/ProductImageFields.php @@ -4,6 +4,7 @@ namespace Shopify\Enum\Fields; class ProductImageFields extends AbstractObjectEnum { + const ATTACHMENT = 'attachment'; const CREATED_AT = 'created_at'; const ID = 'id'; const POSITION = 'position'; @@ -16,7 +17,8 @@ class ProductImageFields extends AbstractObjectEnum public function getFieldTypes() { - return array( + return array( + 'attachment' => 'string', 'created_at' => 'DateTime', 'id' => 'integer', 'position' => 'integer',
Add attachment to ProductImage (#<I>) Resolves #<I>
robwittman_shopify-php-sdk
train
php
96e90dcf94b01786115169481f51ba3c242a0212
diff --git a/flowcraft/__init__.py b/flowcraft/__init__.py index <HASH>..<HASH> 100644 --- a/flowcraft/__init__.py +++ b/flowcraft/__init__.py @@ -1,6 +1,6 @@ -__version__ = "1.2.3dev" -__build__ = "29082018" +__version__ = "1.3.0" +__build__ = "21092018" __author__ = "Diogo N. Silva, Tiago F. Jesus, Ines Mendes, Bruno Ribeiro-Goncalves" __copyright__ = "Diogo N. Silva" __license__ = "GPL3"
Updated version for <I> release
assemblerflow_flowcraft
train
py
70965c637bdd988325f3994ca113d261acfd811a
diff --git a/lib/View/Button.php b/lib/View/Button.php index <HASH>..<HASH> 100644 --- a/lib/View/Button.php +++ b/lib/View/Button.php @@ -183,13 +183,13 @@ class View_Button extends View_HtmlElement $this->owner->add('Order')->move($but, 'after', $this)->now(); // Not very pretty, but works well - $but->jsButton() + $but ->js(true) ->removeClass('ui-corner-all') ->addClass('ui-corner-right') ->css('margin-left','-2px'); - $this->jsButton() + $this ->js(true) ->removeClass('ui-corner-all') ->addClass('ui-corner-left')
was generating nasty errors. TODO: fix
atk4_atk4
train
php
a8915ec327ce55f0d5c5420665c73380b6be0576
diff --git a/src/Entity.php b/src/Entity.php index <HASH>..<HASH> 100644 --- a/src/Entity.php +++ b/src/Entity.php @@ -61,7 +61,7 @@ class Entity $this->id = get_id($data[0]['item']); $this->label = $data[0]['itemLabel']; $this->wikipedia_article = $data[0]['wikipediaArticle']; - $this->aliases = explode(', ', $data[0]['itemAltLabel']); + $this->aliases = is_string($data[0]['itemAltLabel']) ? explode(', ', $data[0]['itemAltLabel']) : []; $this->description = $data[0]['itemDescription']; $collection = collect($data)->groupBy('prop');
Check that itemAltLabel is string
freearhey_wikidata
train
php
cadf2bdc22e36f8081a166f508fc29ed4d7205db
diff --git a/src/jalle19/tvheadend/model/ConnectionStatus.php b/src/jalle19/tvheadend/model/ConnectionStatus.php index <HASH>..<HASH> 100644 --- a/src/jalle19/tvheadend/model/ConnectionStatus.php +++ b/src/jalle19/tvheadend/model/ConnectionStatus.php @@ -33,4 +33,12 @@ namespace jalle19\tvheadend\model; class ConnectionStatus extends Node { + /** + * @return bool whether the connection is anonymous (i.e. uses a ticket) + */ + public function isAnonymous() + { + return !$this->hasProperty('user'); + } + } diff --git a/src/jalle19/tvheadend/model/Node.php b/src/jalle19/tvheadend/model/Node.php index <HASH>..<HASH> 100644 --- a/src/jalle19/tvheadend/model/Node.php +++ b/src/jalle19/tvheadend/model/Node.php @@ -63,6 +63,17 @@ abstract class Node implements \JsonSerializable $this->_properties[$name] = $value; } + + /** + * @param string $name + * + * @return bool whether the object has the specified property + */ + public function hasProperty($name) + { + return array_key_exists($name, $this->_properties); + } + /** * Constructs an appropriate object based on the raw entry * @param stdClass $entry the raw entry
add a method for checking if a connection belongs to an anonymous streaming user (i.e. ticket)
Jalle19_php-tvheadend
train
php,php
4f99c29d8d728fc39129025cc45006ad7ff05790
diff --git a/src/Query/BulkWrite.php b/src/Query/BulkWrite.php index <HASH>..<HASH> 100644 --- a/src/Query/BulkWrite.php +++ b/src/Query/BulkWrite.php @@ -19,11 +19,6 @@ class BulkWrite extends Query public function addQuery(Query $query) { - if (defined('BLA')) { - dump($this->repository->getCollection()->getCollectionName()); - dump(get_class($query)); - dump($query->getDocument()['_id']); - } $this->queries[] = $query; } @@ -58,6 +53,10 @@ class BulkWrite extends Query } } + if (empty($operations)) { + return true; + } + $result = $this->repository->getCollection()->bulkWrite($operations); return $result->isAcknowledged() || $this->repository->getCollection()->getWriteConcern()->getW() === 0; }
Fix bug when bulk write operations is empty
JoffreyPoreeCoding_MongoDB-ODM
train
php
603fbcdb60556990f88ed9e8c415c07c0d033788
diff --git a/kuyruk/worker.py b/kuyruk/worker.py index <HASH>..<HASH> 100644 --- a/kuyruk/worker.py +++ b/kuyruk/worker.py @@ -339,7 +339,11 @@ class Worker(object): def _heartbeat_tick(self, connection, stop_event): while not stop_event.wait(1): try: - connection.heartbeat_tick() + try: + connection.heartbeat_tick() + except socket.error as e: + if e.errno != errno.EINTR: + raise except socket.timeout: pass except Exception as e:
handle EINTR on heartbeat thread
cenkalti_kuyruk
train
py
94650054f38b80ab066a72e945a9e7553c292ff1
diff --git a/sdk/unix_listener.go b/sdk/unix_listener.go index <HASH>..<HASH> 100644 --- a/sdk/unix_listener.go +++ b/sdk/unix_listener.go @@ -3,10 +3,12 @@ package sdk import ( + "fmt" "net" "os" "path/filepath" + "github.com/coreos/go-systemd/activation" "github.com/docker/go-connections/sockets" ) @@ -19,6 +21,17 @@ func newUnixListener(pluginName string, group string) (net.Listener, string, err if err != nil { return nil, "", err } + listenFds := activation.Files(false) + if len(listenFds) > 1 { + return nil, "", fmt.Errorf("expected only one socket from systemd, got %d", len(listenFds)) + } + if len(listenFds) == 1 { + l, err := net.FileListener(listenFds[0]) + if err != nil { + return nil, "", err + } + return l, path, nil + } listener, err := sockets.NewUnixSocket(path, group) if err != nil { return nil, "", err
sdk: support systemd socket activation
docker_go-plugins-helpers
train
go
6046e638afb8bddbd01b8731368255dd7487c746
diff --git a/src/grapesjs/index.js b/src/grapesjs/index.js index <HASH>..<HASH> 100644 --- a/src/grapesjs/index.js +++ b/src/grapesjs/index.js @@ -50,6 +50,11 @@ module.exports = (() => { config.el = els instanceof window.HTMLElement ? els : document.querySelector(els); const editor = new Editor(config).init(); + // Execute `onLoad` on modules once all plugins are initialized. + // A plugin might have extended/added some custom type so this + // is a good point to load stuff like components, css rules, etc. + editor.getModel().loadOnStart(); + // Load plugins config.plugins.forEach(pluginId => { const plugin = plugins.get(pluginId); @@ -61,11 +66,6 @@ module.exports = (() => { } }); - // Execute `onLoad` on modules once all plugins are initialized. - // A plugin might have extended/added some custom type so this - // is a good point to load stuff like components, css rules, etc. - editor.getModel().loadOnStart(); - config.autorender && editor.render(); editors.push(editor);
moved module initialization before plugin initialization
artf_grapesjs
train
js
19423e9a44dc520c0db2850ec2ab2d8bcef2e928
diff --git a/javascript/HtmlEditorField.js b/javascript/HtmlEditorField.js index <HASH>..<HASH> 100644 --- a/javascript/HtmlEditorField.js +++ b/javascript/HtmlEditorField.js @@ -293,8 +293,15 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE; onremove: function() { var ed = tinyMCE.get(this.attr('id')); if (ed) { - ed.remove(); - ed.destroy(); + try { + ed.remove(); + } catch(ex) {} + try { + ed.destroy(); + } catch(ex) {} + + // Remove any residual tinyMCE editor element + this.next('.mceEditor').remove(); // TinyMCE leaves behind events. We should really fix TinyMCE, but lets brute force it for now $.each(jQuery.cache, function(){
BUG Fix tinymce errors crashing CMS When removing a tinymce field, internal third party errors should be caught and ignored gracefully rather than breaking the whole CMS.
silverstripe_silverstripe-framework
train
js
21c85d69c59e6cffb446dc60d96763c1a04bfc8b
diff --git a/src/Cleave.js b/src/Cleave.js index <HASH>..<HASH> 100644 --- a/src/Cleave.js +++ b/src/Cleave.js @@ -326,6 +326,7 @@ Cleave.prototype = { window.setTimeout(function () { owner.element.value = pps.result; owner.setCurrentSelection(endPos, oldValue); + owner.callOnValueChanged(); }, 1); return; @@ -334,6 +335,12 @@ Cleave.prototype = { owner.element.value = pps.result; owner.setCurrentSelection(endPos, oldValue); + owner.callOnValueChanged(); + }, + + callOnValueChanged: function () { + var owner = this, + pps = owner.properties; pps.onValueChanged.call(owner, { target: { value: pps.result,
Call onValueChanged on android devices as well, fixes #<I> (#<I>)
nosir_cleave.js
train
js
9e618ca70c799e0586d566692f41d06e68a3e6c1
diff --git a/django_mobile/conf.py b/django_mobile/conf.py index <HASH>..<HASH> 100644 --- a/django_mobile/conf.py +++ b/django_mobile/conf.py @@ -29,9 +29,14 @@ class defaults(object): FLAVOURS_SESSION_KEY = u'flavour' FLAVOURS_TEMPLATE_LOADERS = [] for loader in django_settings.TEMPLATE_LOADERS: - if loader != 'django_mobile.loader.Loader': + if isinstance(loader, (tuple, list)) and loader[0] == 'django.template.loaders.cached.Loader': + for cached_loader in loader[1]: + if cached_loader != 'django_mobile.loader.Loader': + FLAVOURS_TEMPLATE_LOADERS.append(('django.template.loaders.cached.Loader', + (cached_loader, ))) + elif loader != 'django_mobile.loader.Loader': FLAVOURS_TEMPLATE_LOADERS.append(loader) FLAVOURS_TEMPLATE_LOADERS = tuple(FLAVOURS_TEMPLATE_LOADERS) - + print FLAVOURS_TEMPLATE_LOADERS settings = SettingsProxy(django_settings, defaults)
add support for django cached template loader
gregmuellegger_django-mobile
train
py
c7b7509bbb19ff5ae3f8d4b72fa859beba36a507
diff --git a/test/hamlit/static_analyzer_test.rb b/test/hamlit/static_analyzer_test.rb index <HASH>..<HASH> 100644 --- a/test/hamlit/static_analyzer_test.rb +++ b/test/hamlit/static_analyzer_test.rb @@ -33,6 +33,11 @@ describe Hamlit::StaticAnalyzer do assert_static('"".gsub(/foo/, "bar")', false) assert_static('1.times {}', false) assert_static('[3, 1.2, [2i, "hello #{ nya } world"]]', false) + assert_static('self', false) + assert_static('__FILE__', false) + assert_static('__LINE__', false) + assert_static('__ENCODING__', false) + assert_static('__dir__', false) end specify 'invalid expression' do
Ensure pseudo variable is regarded as dynamic
haml_haml
train
rb
43345cd21f66d7bb0056cf6764aad2c704867544
diff --git a/src/PhpConsole/Laravel/ServiceProvider.php b/src/PhpConsole/Laravel/ServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/PhpConsole/Laravel/ServiceProvider.php +++ b/src/PhpConsole/Laravel/ServiceProvider.php @@ -77,7 +77,7 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider { * @return void */ public function boot() { - $this->package('php-console/php-console-laravel', static::PACKAGE_ALIAS); + $this->package('php-console/laravel-service-provider', static::PACKAGE_ALIAS); foreach($this->getServiceProviderConfig() as $option => $value) { $this->setOption($option, $value); }
Fix package name to recognize the config files Fixes #3.
barbushin_php-console-laravel
train
php
9df19170e99c5db9aada2d162e3af276a21bc1ab
diff --git a/middleware/mailer.js b/middleware/mailer.js index <HASH>..<HASH> 100644 --- a/middleware/mailer.js +++ b/middleware/mailer.js @@ -8,7 +8,7 @@ » References: - http://www.nodemailer.org/ + http://github.com/andris9/nodemailer » SMTP Example:
Updated nodemailer homepage url
derdesign_protos
train
js
606fa502ff36c126422029d45686c311f20dc322
diff --git a/source/application/controllers/admin/order_overview.php b/source/application/controllers/admin/order_overview.php index <HASH>..<HASH> 100644 --- a/source/application/controllers/admin/order_overview.php +++ b/source/application/controllers/admin/order_overview.php @@ -165,6 +165,7 @@ class Order_Overview extends oxAdminDetails } } + /** * Sends order. */
ESDEV-<I> Remove support for: DTAUS
OXID-eSales_oxideshop_ce
train
php
3f99a3796f77177f0bbf6acf9cc44bf571e22881
diff --git a/jupyter-js-widgets/src/embed-webpack.js b/jupyter-js-widgets/src/embed-webpack.js index <HASH>..<HASH> 100644 --- a/jupyter-js-widgets/src/embed-webpack.js +++ b/jupyter-js-widgets/src/embed-webpack.js @@ -44,7 +44,7 @@ function renderInlineWidgets(event) { var tag = tags[i]; var widgetStateObject = JSON.parse(tag.innerHTML); var widgetContainer = document.createElement('div'); - widgetContainer.className = 'widget-area'; + widgetContainer.className = 'widget-subarea'; manager.display_widget_state(widgetStateObject, widgetContainer).then(function() { if (tag.previousElementSibling && tag.previousElementSibling.matches('img.jupyter-widget')) {
Widget area is a vbox
jupyter-widgets_ipywidgets
train
js
0c5a32b6b573b260e94568696dc6bda73b9c1f67
diff --git a/db/seeds.rb b/db/seeds.rb index <HASH>..<HASH> 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -2,7 +2,7 @@ ip_pool = IPPool.create!(:name => "Shared IP Pool", :type => 'Transactional', :d ip_pool.ip_addresses.create!(:ipv4 => "10.1.1.1", :ipv6 => "2a03:1234:a:1::1", :hostname => "i2.mx.example.com") ip_pool.ip_addresses.create!(:ipv4 => "10.1.1.2", :ipv6 => "2a03:1234:a:1::2", :hostname => "i3.mx.example.com") -user = User.create!(:first_name => "Example", :last_name => "Admin", :email_address => "[email protected]", :password => "llamafarm", :time_zone => "London", :email_verified_at => Time.now, :admin => true) +user = User.create!(:first_name => "Example", :last_name => "Admin", :email_address => "[email protected]", :password => "password", :time_zone => "London", :email_verified_at => Time.now, :admin => true) org = Organization.create!(:name => "Acme Inc", :permalink => "acme", :time_zone => "London", :owner => user) org.users << user
update initial password to something a little less insane
atech_postal
train
rb
22749ac376b10982eb5fa5a32ba336b20e1e6344
diff --git a/lib/php/lib/Protocol/TProtocol.php b/lib/php/lib/Protocol/TProtocol.php index <HASH>..<HASH> 100644 --- a/lib/php/lib/Protocol/TProtocol.php +++ b/lib/php/lib/Protocol/TProtocol.php @@ -22,6 +22,8 @@ namespace Thrift\Protocol; +use Thrift\Exception\TException; +use Thrift\Transport\TTransport; use Thrift\Type\TType; use Thrift\Exception\TProtocolException; @@ -38,7 +40,7 @@ abstract class TProtocol protected $trans_; /** - * Constructor + * @param TTransport $trans */ protected function __construct($trans) {
THRIFT-<I>: Missing imports in TProtocol (phpdoc related only) Client: php
apache_thrift
train
php
d3240de3630a8117cd0aaadc6bf11bb6cbf3db27
diff --git a/lib/oops/tasks.rb b/lib/oops/tasks.rb index <HASH>..<HASH> 100644 --- a/lib/oops/tasks.rb +++ b/lib/oops/tasks.rb @@ -1,7 +1,7 @@ require 'oops/opsworks_deploy' require 'aws' namespace :oops do - task :build, :ref do |t, args| + task :build, [:ref] => 'assets:precompile' do |t, args| args.with_defaults ref: build_hash file_path = zip_file args.ref @@ -9,12 +9,11 @@ namespace :oops do sh %{mkdir -p build} sh %{git archive --format zip --output build/#{file_path} HEAD} - sh %{rm -rf public/assets} - sh %{rake assets:precompile:all RAILS_ENV=deploy RAILS_GROUPS=assets} - sh %{zip -r -g build/#{file_path} public/} sh %{zip build/#{file_path} -d .gitignore} + sh %{rm -rf public/assets} + puts "Packaged Application: #{file_path}" end diff --git a/lib/oops/version.rb b/lib/oops/version.rb index <HASH>..<HASH> 100644 --- a/lib/oops/version.rb +++ b/lib/oops/version.rb @@ -1,3 +1,3 @@ module Oops - VERSION = "0.0.1" + VERSION = "0.0.2" end
Switch to task dependency on asset:precompile Rails 3 and 4 handle asset precompiling differently and assets:precompile:all no longer exists in rails 4. Doing it this way, we can specify the RAILS_ENV=deploy on a task run and it will be passed to the shellout assets:precompile:all on rails 3
StemboltHQ_oops
train
rb,rb
ddd116fa1990677b2bdb156dbe06f42be328f633
diff --git a/scriptworker/constants.py b/scriptworker/constants.py index <HASH>..<HASH> 100644 --- a/scriptworker/constants.py +++ b/scriptworker/constants.py @@ -283,7 +283,7 @@ DEFAULT_CONFIG = frozendict({ # mozilla-esr68 too. 'project:releng:googleplay:aurora': 'esr68', 'project:releng:googleplay:beta': 'esr68', - 'project:releng:googleplay:release': 'release', + 'project:releng:googleplay:release': 'esr68', 'project:releng:signing:cert:nightly-signing': 'all-nightly-branches', 'project:releng:signing:cert:release-signing': 'all-release-branches',
Bug <I> - Move Fennec Release to the esr<I> channel
mozilla-releng_scriptworker
train
py
5b72b4e0078d45d7729a029789af906c762a5073
diff --git a/test/worker_external_task_test.py b/test/worker_external_task_test.py index <HASH>..<HASH> 100644 --- a/test/worker_external_task_test.py +++ b/test/worker_external_task_test.py @@ -13,7 +13,7 @@ # the License. import luigi -from luigi.file import LocalTarget +from luigi.local_target import LocalTarget from luigi.scheduler import Scheduler import luigi.server import luigi.worker @@ -28,7 +28,7 @@ import shutil class TestExternalFileTask(luigi.ExternalTask): """ Mocking tasks is a pain, so touch a file instead """ path = luigi.Parameter() - times_to_call = luigi.Parameter() + times_to_call = luigi.IntParameter() def __init__(self, *args, **kwargs): super(TestExternalFileTask, self).__init__(*args, **kwargs) @@ -54,7 +54,7 @@ class TestTask(luigi.Task): Requires a single file dependency """ tempdir = luigi.Parameter() - complete_after = luigi.Parameter() + complete_after = luigi.IntParameter() def __init__(self, *args, **kwargs): super(TestTask, self).__init__(*args, **kwargs)
Avoid warnings in unit tests. (#<I>)
spotify_luigi
train
py
a59f41b08045b052c24d690e55baa6cfdca429cb
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -49,10 +49,9 @@ setup( packages=find_packages(exclude=["tests"]), install_requires=[ "six>=1.10.0", - "graphene>=2.1,<3", - "graphql-core>=2.1rc1", + "graphene>=2.1.3,<3", + "graphql-core>=2.1.0,<3", "Django>=1.11", - "iso8601", "singledispatch>=3.4.0.3", "promise>=2.1", ],
Remove iso<I> dependency, updated graphql-core
graphql-python_graphene-django
train
py
dd72a3226e0e6f64bddd7d5c8bc7bc9cae4e429b
diff --git a/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java b/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java index <HASH>..<HASH> 100644 --- a/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java +++ b/languagetool-language-modules/en/src/main/java/org/languagetool/rules/en/AbstractEnglishSpellerRule.java @@ -353,6 +353,8 @@ public abstract class AbstractEnglishSpellerRule extends MorfologikSpellerRule { protected Map<String, List<String>> getTopSuggestions() { Map<String, List<String>> s = new HashMap<>(); + s.put("thouraly", Arrays.asList("thoroughly")); + s.put("heiaracky", Arrays.asList("hierarchy")); s.put("on-prem", Arrays.asList("on-premise")); s.put("sin-off", Arrays.asList("sign-off")); s.put("sin-offs", Arrays.asList("sign-offs"));
[en] add suggestions (via user feedback)
languagetool-org_languagetool
train
java
73321eac4f3cabc0cb349a8a926132fd56a9108a
diff --git a/response.go b/response.go index <HASH>..<HASH> 100644 --- a/response.go +++ b/response.go @@ -96,7 +96,7 @@ type CommonQueryResponses struct { Locales []string `json:"locales,omitempty"` // ATV 6+ DeviceID string `json:"device_id"` // ATV 6+ OrganizationInfo map[string]string `json:"organization_info,omitempty"` // IOS 7+ - LastCloudBackupDate string `json:"last_cloud_backup_date,omitempty"` // IOS 8+ + LastCloudBackupDate time.Time `json:"last_cloud_backup_date,omitempty"` // IOS 8+ AwaitingConfiguration bool `json:"awaiting_configuration"` // IOS 9+ // iTunes ITunesStoreAccountIsActive bool `json:"itunes_store_account_is_active"` // IOS 7+ OSX 10.9+
Changed type of LastCloudBackupDate to time.Time (#<I>)
micromdm_mdm
train
go
b10e7d2bf2ac796621e734e24a8429b45ce483b4
diff --git a/exdoc/sa/__init__.py b/exdoc/sa/__init__.py index <HASH>..<HASH> 100644 --- a/exdoc/sa/__init__.py +++ b/exdoc/sa/__init__.py @@ -74,6 +74,8 @@ def _model_columns(ins): # Got to compile it using a dialect # TODO: support other dialects in addition to Postgres column_type_str = column_type.compile(dialect=postgresql.dialect()) + except sa_exc.CompileError: + column_type_str = '?' # Collect columns.append(SaColumnDoc( diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup, find_packages setup( name='exdoc', - version='0.1.4', + version='0.1.4-1', author='Mark Vartanyan', author_email='[email protected]',
Fix: column_properties gave an error in some cases
kolypto_py-exdoc
train
py,py
f428928abfc6031aa58a7737f20086e07389f781
diff --git a/src/Event/DynamoDb/DynamoDbEvent.php b/src/Event/DynamoDb/DynamoDbEvent.php index <HASH>..<HASH> 100644 --- a/src/Event/DynamoDb/DynamoDbEvent.php +++ b/src/Event/DynamoDb/DynamoDbEvent.php @@ -27,7 +27,7 @@ final class DynamoDbEvent implements LambdaEvent } /** - * @return array + * @return DynamoDbRecord[] */ public function getRecords(): array {
Update src/Event/DynamoDb/DynamoDbEvent.php
mnapoli_bref
train
php
ae4f72b091cb218842ef26dc032f2bac45ff3cc0
diff --git a/hugolib/menu_test.go b/hugolib/menu_test.go index <HASH>..<HASH> 100644 --- a/hugolib/menu_test.go +++ b/hugolib/menu_test.go @@ -242,7 +242,8 @@ func doTestPageMenuWithDuplicateName(t *testing.T, menuPageSources []source.Byte assert.NotNil(t, me2) assert.True(t, strings.Contains(me1.URL, "doc1")) - assert.True(t, strings.Contains(me2.URL, "doc2")) + // TODO(bep) the below is failing on Travis on 1.3 + 1.5. + // assert.True(t, strings.Contains(me2.URL, "doc2")) }
Comment out mystery test Fails on Travis in Go <I> + <I>. Will have to look into that one.
gohugoio_hugo
train
go
9257d2e41679c18ea4f6d51f41c2c43b755840d0
diff --git a/aiohttp_apispec/decorators.py b/aiohttp_apispec/decorators.py index <HASH>..<HASH> 100644 --- a/aiohttp_apispec/decorators.py +++ b/aiohttp_apispec/decorators.py @@ -43,6 +43,8 @@ def use_kwargs(schema, **kwargs): def marshal_with(schema, code=200, required=False): + if callable(schema): + schema = schema() def wrapper(func): if not hasattr(func, '__apispec__'):
not callable also in marshalling
maximdanilchenko_aiohttp-apispec
train
py
ab71d65219563772a4ea833704c8a601c3a06bba
diff --git a/idbstore.js b/idbstore.js index <HASH>..<HASH> 100644 --- a/idbstore.js +++ b/idbstore.js @@ -6,7 +6,7 @@ * Copyright (c) 2011 - 2017 Jens Arps * http://jensarps.de/ * - * Licensed under the MIT (X11) license + * Licensed under the MIT license */ (function (name, definition, global) {
Remove X<I> mention from code
jensarps_IDBWrapper
train
js
2812e369e6f6b95b74c15c7bb2760745033ae014
diff --git a/src/ProjectX.php b/src/ProjectX.php index <HASH>..<HASH> 100644 --- a/src/ProjectX.php +++ b/src/ProjectX.php @@ -98,6 +98,9 @@ class ProjectX extends Application */ public function loadRoboProjectClasses() { + if (!$this->hasProjectXFile()) { + return []; + } $classes = []; foreach ($this->findPHPFilesInRoot() as $file) { @@ -129,9 +132,11 @@ class ProjectX extends Application */ protected function findPHPFilesInRoot() { + $project_root = $this->getProjectXRootPath(); + return (new Finder()) ->name('*.php') - ->in($this->getProjectXRootPath()) + ->in($project_root) ->depth(0) ->files(); }
Fix issue where robo files were trying to be loaded before project-x has been initialized.
droath_project-x
train
php
7772a58ade14fee8cd284d429f341e44c2718d07
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -64,6 +64,8 @@ module.exports = function (source, mnt, isLazy) { stat.ctime = ctime stat.mtime = mtime stat.atime = new Date() + stat.uid = process.getuid() + stat.gid = process.getgid() if (file) { stat.size = file.length
set uid/gid to not always mount as root
mafintosh_torrent-mount
train
js
525ad0c75e82f3740a1bbac696b7a96f585c0cba
diff --git a/www/tests/brython_test_utils/unittest.py b/www/tests/brython_test_utils/unittest.py index <HASH>..<HASH> 100644 --- a/www/tests/brython_test_utils/unittest.py +++ b/www/tests/brython_test_utils/unittest.py @@ -78,12 +78,11 @@ class OneTimeTestResult(unittest.TestResult): def load_brython_test_cases(base_path=''): - return unittest.TestSuite( - NamedTestSuite('Brython : ' + label, - (BrythonModuleTestCase(filenm, caption, base_path) - for filenm, caption in options) - ) - for label, options in utils.discover_brython_test_modules() - ) - + ret = [] + for label, options in utils.discover_brython_test_modules(): + tcs = [] + for filenm, caption in options: + tcs.append(BrythonModuleTestCase(filenm, caption, base_path)) + ret.append(NamedTestSuite('Brython :' + label, tcs)) + return unittest.TestSuite(ret)
BUGFIX: Make CI tests pass again.
brython-dev_brython
train
py
cc4a6fd9333851c8167b556b39fb46276b05402b
diff --git a/userena/settings.py b/userena/settings.py index <HASH>..<HASH> 100644 --- a/userena/settings.py +++ b/userena/settings.py @@ -6,8 +6,6 @@ from django.conf import settings gettext = lambda s: s -# This will sign a user in after they signup successfully. -# USERENA_ACTIVATION_REQUIRED must be False. USERENA_SIGNIN_AFTER_SIGNUP = getattr(settings, 'USERENA_SIGNIN_AFTER_SIGNUP', False)
Removes comments in settings.py
bread-and-pepper_django-userena
train
py
28720dc39c6562f812f8af54669e8cccd157e5ef
diff --git a/Imager.js b/Imager.js index <HASH>..<HASH> 100644 --- a/Imager.js +++ b/Imager.js @@ -65,6 +65,8 @@ this.cache = {}; this.scrollDelay = opts.scrollDelay || 250; this.lazyload = opts.lazyload || false; + this.transforms = Imager.transforms; + this.changeDivsToEmptyImages(); window.requestAnimationFrame(function(){ @@ -196,7 +198,19 @@ }; Imager.prototype.changeImageSrcToUseNewImageDimensions = function (src, selectedWidth) { - return src.replace(/{width}/g, selectedWidth); + return src + .replace(/{width}/g, selectedWidth) + .replace(/{pixel_ratio}/g, this.transforms['pixel_ratio'](Imager.getPixelRatio())); + }; + + Imager.getPixelRatio = function getPixelRatio(){ + return window.devicePixelRatio || 1; + }; + + Imager.transforms = { + pixel_ratio: function(value){ + return value === 1 ? '' : '-'+value+'x' ; + } }; if (typeof module === 'object' && typeof module.exports === 'object') {
Pixel ratio implementation - added Imager.transforms to let room to customise things further on - replacing {pixel_ratio} pattern in `data-src` URI
BBC-News_Imager.js
train
js
450c7b0f353e3d41f3346f5c6c6e1dfb66489bc9
diff --git a/core/Controller.php b/core/Controller.php index <HASH>..<HASH> 100644 --- a/core/Controller.php +++ b/core/Controller.php @@ -100,7 +100,8 @@ abstract class Controller extends core\Controller )) { return false; } - $parts = explode('/', substr($_SERVER['REQUEST_URI'], 1)); + $uri = array_shift(explode('?', $_SERVER['REQUEST_URI'])); + $parts = explode('/', substr($uri, 1)); foreach ($parts as $key => $value) { if (!strlen($value)) { unset($parts[$key]);
handle this better so query strings get ignored
monomelodies_monad
train
php
8cc9d1709e52df44e1874497cebb650e6d47ab2f
diff --git a/internal/goofys_test.go b/internal/goofys_test.go index <HASH>..<HASH> 100644 --- a/internal/goofys_test.go +++ b/internal/goofys_test.go @@ -364,7 +364,7 @@ func (s *GoofysTest) setupBlobs(cloud StorageBackend, t *C, env map[string]*stri // double check, except on AWS S3, because there we sometimes // hit 404 NoSuchBucket and there's no way to distinguish that // from 404 KeyNotFound - if !s.emulator && hasEnv("AWS") { + if !hasEnv("AWS") { for path, c := range env { throttler.V(1) go func(path string, content *string) {
incorrect condition, meant to NOT run this in AWS
kahing_goofys
train
go
83c72b78187af8c0c592bf8453b7a18d56dd6538
diff --git a/tests/test_compare.py b/tests/test_compare.py index <HASH>..<HASH> 100644 --- a/tests/test_compare.py +++ b/tests/test_compare.py @@ -252,6 +252,32 @@ class TestCompare(unittest.TestCase): self.assertIsNone(c._df_a_indexed) self.assertIsNone(c._df_b_indexed) + def test_series_argument(self): + + # The columns with data + col_A = self.A['given_name'] + col_B = self.B['given_name'] + + pairs = pandas.MultiIndex.from_arrays( + [arange(len(self.A)), arange(len(self.B))], + names=[self.A.index.name, self.B.index.name]) + + c = recordlinkage.Compare( + pairs, self.A, self.B, low_memory=True + ) + + # Check exact with column arguments + result = c.exact(col_A, col_B) + + # check result is series + self.assertIsInstance(result, pandas.Series) + + # resulting series has a pandas.MultiIndex + self.assertIsInstance(result.index, pandas.MultiIndex) + + # resulting series has a pandas.MultiIndex + self.assertEqual(len(result), len(col_A)) + def ones_compare(s1, s2):
TESTS: Test passing data to compare method instead of label
J535D165_recordlinkage
train
py
cb45dd9f618fcc6588f3ea89fe40dff453cbf04a
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 @@ -15,7 +15,10 @@ module TestHelper jobs['pending'] = jobs['expected'].select{|j| j['confirmed_ats'].length < j['count']} start_time = Time.now.utc total_time = 0 - while (jobs['pending'].length>0 or Mobilize::Resque.workers('working').length>0) and total_time < time_limit + while (jobs['pending'].length>0 or #while there are pending jobs + #or there are workers working (don't count jobtracker) + Mobilize::Resque.workers('working').select{|w| w.job['payload']['class']!='Mobilize::Jobtracker'}.length>0) and + total_time < time_limit #time limit not yet expired #working jobs are running on the queue at this instant jobs['working'] = Mobilize::Resque.workers('working').map{|w| w.job}.select{|j| j and j['payload'] and j['payload']['args']} #failed jobs are in the failure queue
fixed test helper to ignore jobtracker
DeNA_mobilize-base
train
rb
baf75b6968ef39a8f5f492a70b1731ed85921bdd
diff --git a/bitex/api/rest.py b/bitex/api/rest.py index <HASH>..<HASH> 100644 --- a/bitex/api/rest.py +++ b/bitex/api/rest.py @@ -498,14 +498,8 @@ class QuoineREST(APIClient): class QuadrigaCXREST(APIClient): - """ - The Quoine Api requires the API version to be designated in each requests's - header as {'X-Quoine-API-Version': 2} - """ def __init__(self, key=None, secret=None, client_id='', api_version='v2', url='https://api.quoine.com/', timeout=5): - if not jwt: - raise SystemError("No JWT Installed! Quoine API Unavailable!") self.client_id = client_id super(QuadrigaCXREST, self).__init__(url, api_version=api_version, key=key, secret=secret,
removed copy-pasta error when initializing quadriga exchange
Crypto-toolbox_bitex
train
py
ff43b1ff6f6c29671a1fe4da09fcf066a8302b8d
diff --git a/rundeck/project.go b/rundeck/project.go index <HASH>..<HASH> 100644 --- a/rundeck/project.go +++ b/rundeck/project.go @@ -4,13 +4,31 @@ import ( "encoding/xml" ) +// Project represents a project within Rundeck. type Project struct { - XMLName xml.Name `xml:"project"` Name string `xml:"name"` Description string `xml:"description,omitempty"` - URL string `xml:"url,attr"` + + // RawConfigItems is a raw representation of the XML structure of + // project configuration. Config is a more convenient representation + // for most cases, so on read this property is emptied and its + // contents rebuilt in Config. RawConfigItems []ConfigProperty `xml:"config>property,omitempty"` + + // Config is the project configuration. + // + // When making requests, Config and RawConfigItems are combined to produce + // a single set of configuration settings. Thus it isn't necessary and + // doesn't make sense to duplicate the same properties in both properties. Config map[string]string `xml:"-"` + + // URL is used only to represent server responses. It is ignored when + // making requests. + URL string `xml:"url,attr"` + + // XMLName is used only in XML unmarshalling and doesn't need to + // be set when creating a Project to send to the server. + XMLName xml.Name `xml:"project"` } type projects struct {
Document some of the attributes of Project.
apparentlymart_go-rundeck-api
train
go
05373425f3d150e2bac2d1b48f7682eeb081c82b
diff --git a/source/Core/Database/Adapter/Doctrine/Database.php b/source/Core/Database/Adapter/Doctrine/Database.php index <HASH>..<HASH> 100644 --- a/source/Core/Database/Adapter/Doctrine/Database.php +++ b/source/Core/Database/Adapter/Doctrine/Database.php @@ -117,9 +117,9 @@ class Database implements DatabaseInterface $connection = $this->getConnectionFromDriverManager(); $connection->connect(); - $this->ensureConnectionIsEstablished($connection); - $this->setConnection($connection); + + $this->ensureConnectionIsEstablished($connection); } catch (DBALException $exception) { $exception = $this->convertException($exception); $this->handleException($exception); @@ -1100,7 +1100,7 @@ class Database implements DatabaseInterface * * @param \Doctrine\DBAL\Connection $connection The connection we want to ensure, if it is established. * - * @throws DBALException If we are not connected correctly to the database. + * @throws \Exception If we are not connected correctly to the database. */ protected function ensureConnectionIsEstablished($connection) {
ESDEV-<I> Add ping check for master/slave connection. Cause the doctrine master slave connection object doesn't have a working isConnected method, we try to overcome this issue with the ping method. (cherry picked from commit fa<I>f2)
OXID-eSales_oxideshop_ce
train
php
0c2fe3aac19408ae0e6aa4bb786903083d955709
diff --git a/repository/filepicker.js b/repository/filepicker.js index <HASH>..<HASH> 100644 --- a/repository/filepicker.js +++ b/repository/filepicker.js @@ -1737,7 +1737,7 @@ M.core_filepicker.init = function(Y, options) { setAttrs({id:'fp-tb-help-'+client_id+'-link', target:'_blank'}). setStyle('display', 'none'); toolbar.append(helplnk); - toolbar.one('.fp-tb-manage').one('a,button'). + toolbar.one('.fp-tb-help').one('a,button'). on('click', function(e) { e.preventDefault(); helplnk.simulate('click')
MDL-<I> fixed mistype causing wrong link in some browsers
moodle_moodle
train
js
d8651487fc4625448fade64f797a1cd621143cb5
diff --git a/pgmpy/readwrite/XMLBIF.py b/pgmpy/readwrite/XMLBIF.py index <HASH>..<HASH> 100644 --- a/pgmpy/readwrite/XMLBIF.py +++ b/pgmpy/readwrite/XMLBIF.py @@ -301,7 +301,7 @@ class XMLBIFWriter: outcome_tag[var] = [] for state in cpd.variables[var]: state_tag = etree.SubElement(self.variables[var], "OUTCOME") - state_tag.text = state + state_tag.text = str(state.state) outcome_tag[var].append(state_tag) return outcome_tag @@ -356,7 +356,7 @@ class XMLBIFWriter: for cpd in cpds: definition_tag[cpd.variable] = etree.SubElement(self.network, "DEFINITION") etree.SubElement(definition_tag[cpd.variable], "FOR").text = cpd.variable - for child in sorted([] if cpd.evidence == None else cpd.evidence): + for child in sorted([] if cpd.evidence is None else cpd.evidence): etree.SubElement(definition_tag[cpd.variable], "GIVEN").text = child return definition_tag
fixes error in XMLBIF writer class
pgmpy_pgmpy
train
py
01f2b016c19fc525a9c6c559b0116793f5f35f1a
diff --git a/doc/conf.py b/doc/conf.py index <HASH>..<HASH> 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -101,6 +101,10 @@ html_theme_path = ["."] html_theme_options = {'collapsiblesidebar': True} html_static_path = ['static'] +html_sidebars = { + 'index': ['globaltoc.html', 'searchbox.html'], +} + # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". #html_title = None
MOTOR-<I> Global table of contents in sidebar. Just for the index page; other pages have their own ToCs in the sidebar.
mongodb_motor
train
py
fe3d301989c129d49baf6fa7a2654769657ec279
diff --git a/java/src/main/java/com/google/appengine/tools/mapreduce/MapSettings.java b/java/src/main/java/com/google/appengine/tools/mapreduce/MapSettings.java index <HASH>..<HASH> 100644 --- a/java/src/main/java/com/google/appengine/tools/mapreduce/MapSettings.java +++ b/java/src/main/java/com/google/appengine/tools/mapreduce/MapSettings.java @@ -47,7 +47,10 @@ public class MapSettings implements Serializable { public static final String DEFAULT_BASE_URL = "/mapreduce/"; public static final String CONTROLLER_PATH = "controllerCallback"; public static final String WORKER_PATH = "workerCallback"; - public static final int DEFAULT_MILLIS_PER_SLICE = 180_000; + // this value needs to be lower than the datastore query iterator timeout, or 60 seconds + // ideally we should wrapper the query iterator to work around such limitation + // but it's not straightforward to intercept the datastore input reader + public static final int DEFAULT_MILLIS_PER_SLICE = 60_000; public static final int DEFAULT_SHARD_RETREIES = 4; public static final int DEFAULT_SLICE_RETREIES = 20;
Changing the slice time to be below the query iterator timeout (can be as low as <I> seconds). Otherwise long job/mappers currently keep failing. Revision created by MOE tool push_codebase. MOE_MIGRATION=<I>
GoogleCloudPlatform_appengine-mapreduce
train
java
70db3070ead7b4ac53deec2d156e3e8757ec7630
diff --git a/identification-authorization/plugin-api/src/main/java/io/motown/identificationauthorization/pluginapi/AuthorizationProvider.java b/identification-authorization/plugin-api/src/main/java/io/motown/identificationauthorization/pluginapi/AuthorizationProvider.java index <HASH>..<HASH> 100644 --- a/identification-authorization/plugin-api/src/main/java/io/motown/identificationauthorization/pluginapi/AuthorizationProvider.java +++ b/identification-authorization/plugin-api/src/main/java/io/motown/identificationauthorization/pluginapi/AuthorizationProvider.java @@ -25,7 +25,7 @@ public interface AuthorizationProvider { /** * Validates the identification. * - * @param identification + * @param identification the identification to validate. * @return true if the identification is valid, false if not or if the identification is unknown. */ boolean isValid(IdentifyingToken identification);
Javadoc on AuthorizationProvider interface
motown-io_motown
train
java
81dd913712288c1f5aa2ae5c67504f214dff5fee
diff --git a/flux_led/models_db.py b/flux_led/models_db.py index <HASH>..<HASH> 100755 --- a/flux_led/models_db.py +++ b/flux_led/models_db.py @@ -694,7 +694,7 @@ MODELS = [ ), LEDENETModel( model_num=0x07, - # "AK001-ZJ2146" == v2 has RF remote support + # "AK001-ZJ2146" == v2.06 has RF remote support models=["AK001-ZJ2146"], description="Controller RGBCW", always_writes_white_and_colors=False, # Formerly rgbwprotocol @@ -711,7 +711,7 @@ MODELS = [ LEDENETModel( model_num=0x08, # AK001-ZJ2101 is v1 - # AK001-ZJ2145 is v2.11 + # AK001-ZJ2145 is v2.11 (Upgradable to v2.15) models=["AK001-ZJ2101", "AK001-ZJ2145", "AK001-ZJ2147"], description="Controller RGB with MIC", always_writes_white_and_colors=True, # Formerly rgbwprotocol
Small model db tweaks (#<I>)
Danielhiversen_flux_led
train
py
c1ac3d410fdd0a5c0d050d4eee23ed442a408a0c
diff --git a/lfs/lfs.go b/lfs/lfs.go index <HASH>..<HASH> 100644 --- a/lfs/lfs.go +++ b/lfs/lfs.go @@ -12,7 +12,7 @@ import ( ) const ( - Version = "0.5.3" + Version = "0.6.0-pre" tempDirPerms = 0755 localMediaDirPerms = 0755 localLogDirPerms = 0755
change the version so pre-releases don't look like <I>.x releases
git-lfs_git-lfs
train
go
229444f4365f03b3febc14efcd112e3229cd7e90
diff --git a/src/deep-di/lib/DI.js b/src/deep-di/lib/DI.js index <HASH>..<HASH> 100644 --- a/src/deep-di/lib/DI.js +++ b/src/deep-di/lib/DI.js @@ -14,6 +14,7 @@ import Core from 'deep-core'; export class DI { constructor() { this._bottle = new Bottle(); + this._localBackend = false; } /** @@ -88,4 +89,18 @@ export class DI { has(key) { return this._bottle.container.hasOwnProperty(key); } + + /** + * @param {Boolean} localBackend + */ + set localBackend(localBackend) { + this._localBackend = localBackend; + } + + /** + * @returns {Boolean} + */ + get localBackend() { + return this._localBackend; + } } diff --git a/src/deep-kernel/lib/Kernel.js b/src/deep-kernel/lib/Kernel.js index <HASH>..<HASH> 100644 --- a/src/deep-kernel/lib/Kernel.js +++ b/src/deep-kernel/lib/Kernel.js @@ -406,6 +406,8 @@ export class Kernel { this._config ); + this._container.localBackend = Core.IS_DEV_SERVER; + let bootingServices = 0; for (let serviceKey in this._services) {
Added localBackend property for deep-di service (#<I>)
MitocGroup_deep-framework
train
js,js
bacbdd415f1b7d5b3a5c4617ee720586c931a404
diff --git a/grifts/release.go b/grifts/release.go index <HASH>..<HASH> 100644 --- a/grifts/release.go +++ b/grifts/release.go @@ -23,16 +23,6 @@ var _ = grift.Add("release", func(c *grift.Context) error { return err } - err = grift.Run("shoulders", c) - if err != nil { - return err - } - - err = grift.Run("deplist", c) - if err != nil { - return err - } - err = installBin() if err != nil { return err @@ -48,6 +38,9 @@ var _ = grift.Add("release", func(c *grift.Context) error { return err } + grift.Run("shoulders", c) + grift.Run("deplist", c) + err = tagRelease(v) if err != nil { return err
re-ordered the release task a bit
gobuffalo_buffalo
train
go
d3503a28816598caae35974fec1471c7365497b5
diff --git a/test/e2e/framework/pv/pv.go b/test/e2e/framework/pv/pv.go index <HASH>..<HASH> 100644 --- a/test/e2e/framework/pv/pv.go +++ b/test/e2e/framework/pv/pv.go @@ -749,7 +749,8 @@ func WaitForPersistentVolumeClaimsPhase(phase v1.PersistentVolumeClaimPhase, c c pvc, err := c.CoreV1().PersistentVolumeClaims(ns).Get(context.TODO(), pvcName, metav1.GetOptions{}) if err != nil { framework.Logf("Failed to get claim %q, retrying in %v. Error: %v", pvcName, Poll, err) - continue + phaseFoundInAllClaims = false + break } if pvc.Status.Phase == phase { framework.Logf("PersistentVolumeClaim %s found and phase=%s (%v)", pvcName, phase, time.Since(start))
Fix waiting for PVCs to get Bound When Get() returns error, the loop should not return with nil. Make sure that the faulty Get() marks phaseFoundInAllClaims as not satisfied.
kubernetes_kubernetes
train
go
20e17b73732605fac37533421fd75c38b13b4540
diff --git a/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php b/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php +++ b/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php @@ -82,13 +82,19 @@ class VerifyCsrfToken */ protected function tokensMatch($request) { + $sessionToken = $request->session()->token(); + $token = $request->input('_token') ?: $request->header('X-CSRF-TOKEN'); if (! $token && $header = $request->header('X-XSRF-TOKEN')) { $token = $this->encrypter->decrypt($header); } - return Str::equals((string) $request->session()->token(), $token); + if (! is_string($sessionToken) || ! is_string($token)) { + return false; + } + + return Str::equals($sessionToken, $token); } /**
Be super careful making sure the csrf tokens are strings
laravel_framework
train
php
3dd274d40d6c75bc5a6719c9ebcf44bffef476a0
diff --git a/src/ui/common/dom-el.js b/src/ui/common/dom-el.js index <HASH>..<HASH> 100644 --- a/src/ui/common/dom-el.js +++ b/src/ui/common/dom-el.js @@ -28,6 +28,9 @@ var el = function (x, attributes) { } } +// utils +el.isElement = isElement + export default el // helpers diff --git a/src/ui/create-message-ui.js b/src/ui/create-message-ui.js index <HASH>..<HASH> 100644 --- a/src/ui/create-message-ui.js +++ b/src/ui/create-message-ui.js @@ -22,15 +22,17 @@ function message (message, expire, type) { // internals var isClosed = false - // create html elements + // create main html element var messageEl = el('<div>',{ class: 'message' }).prependTo(mainEl).hide() el('<div>',{ class: 'spacer' }).appendTo(messageEl) - el('<div>',{ - html: message, + + // insert content + var contentEl = el('<div>',{ class: 'text '+type }).appendTo(messageEl) + el.isElement(message) ? contentEl.append(message) : contentEl.innerHTML = message // create message object var resolve
Added support for html elements as argument in ui messages
archilogic-com_3dio-js
train
js,js
26202511b488664d6258b45cd363139f1601e679
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -58,7 +58,7 @@ var ( jsonContentType = "application/json; charset=utf-8" formContentType = "application/x-www-form-urlencoded" - jsonCheck = regexp.MustCompile(`(?i:(application|text)/(problem\+json|json))`) + jsonCheck = regexp.MustCompile(`(?i:(application|text)/(problem\+json|hal\+json|json))`) xmlCheck = regexp.MustCompile(`(?i:(application|text)/(problem\+xml|xml))`) hdrUserAgentValue = "go-resty v%s - https://github.com/go-resty/resty"
Adding content type "application/hal+json" into json automatic unmarshal #<I> (#<I>)
go-resty_resty
train
go
2eaa705118c34457786279ebf8ffb1e2b68d0bf6
diff --git a/src/__init__.py b/src/__init__.py index <HASH>..<HASH> 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -207,6 +207,7 @@ _ignore = set([ 'resource', # this trips up many extension authors 'gtk', + 'sip', # setuptools' pkg_resources.py expects "from __main__ import x" to # raise ImportError if x not defined '__main__',
Add sip to ignore list. Closes #6
bwesterb_py-demandimport
train
py
bb975413a3297502d3070a80fef8d2df867f5d9c
diff --git a/crosscat/utils/plot_utils.py b/crosscat/utils/plot_utils.py index <HASH>..<HASH> 100644 --- a/crosscat/utils/plot_utils.py +++ b/crosscat/utils/plot_utils.py @@ -184,7 +184,7 @@ def do_gen_feature_z(X_L_list, X_D_list, M_c, filename, tablename=''): z_matrix /= float(num_latent_states) # hierachically cluster z_matrix - Y = pdist(matrix) + Y = pdist(z_matrix) Z = linkage(Y) pylab.figure() dendrogram(Z) @@ -214,6 +214,7 @@ def do_gen_feature_z(X_L_list, X_D_list, M_c, filename, tablename=''): rotation=90, size='small') pylab.title('column dependencies for: %s' % tablename) pylab.savefig(filename) + pylab.close() def legend_outside(ax=None, bbox_to_anchor=(0.5, -.25), loc='upper center', ncol=None, label_cmp=None):
z matrix plotting has broken variable name Also don't leave a broken dangling plot window around. We're saving to a file, so clean up the screen.
probcomp_crosscat
train
py
1612636de6a214375ccb912bd373acc2ca7363e1
diff --git a/src/main/java/org/opensky/libadsb/Decoder.java b/src/main/java/org/opensky/libadsb/Decoder.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/opensky/libadsb/Decoder.java +++ b/src/main/java/org/opensky/libadsb/Decoder.java @@ -144,7 +144,7 @@ public class Decoder { } else if (modes.getDownlinkFormat() == 18 && modes.getFirstField() == 6) { // TODO: ADS-R message (minor differences to ADS-B, see 2.2.18 in DO-260B return modes; - } else if (modes.getDownlinkFormat() == 18 && modes.getFirstField() < 4 | + } else if (modes.getDownlinkFormat() == 18 && modes.getFirstField() < 4 || modes.getDownlinkFormat() == 18 && modes.getFirstField() == 5) { // TODO: TIS-B "ME" field // check IMF field for AA interpretation
Fixed minor (currently ineffective) bug
openskynetwork_java-adsb
train
java
cead937e60f398011d9549072360b317679aa140
diff --git a/api.go b/api.go index <HASH>..<HASH> 100644 --- a/api.go +++ b/api.go @@ -473,7 +473,8 @@ func NewRaft(conf *Config, fsm FSM, logs LogStore, stable StableStore, snaps Sna } r.processConfigurationLogEntry(&entry) } - r.logger.Printf("[INFO] raft: Initial configurations: %+v", r.configurations) + r.logger.Printf("[INFO] raft: Initial configuration (index=%d): %+v", + r.configurations.latestIndex, r.configurations.latest) // Setup a heartbeat fast-path to avoid head-of-line // blocking where possible. It MUST be safe for this
Makes the initial configuration log a little nicer.
hashicorp_raft
train
go
249ebe07bf7975a54e87a89c1d73538677ef5d56
diff --git a/WiFi.js b/WiFi.js index <HASH>..<HASH> 100644 --- a/WiFi.js +++ b/WiFi.js @@ -314,7 +314,7 @@ function onWiFiPropertyChanged(name, value) { break; case WIFI_STATES.FAILURE: debug('[FAILURE] WiFi connection failure, open hotspot'); - openHotspot(); + _self.openHotspot(); break; } break;
fix internal openHotspot call
Doodle3D_connman-simplified
train
js
4dc884cccb70c6bb6b0f7bacc183c3bb34a6b751
diff --git a/phoenix-build.js b/phoenix-build.js index <HASH>..<HASH> 100644 --- a/phoenix-build.js +++ b/phoenix-build.js @@ -30,6 +30,7 @@ exports.watch = function(server, mocks) { exports.build({ dir: 'build/dev', + sourceMap: true, watch: true, complete: function(code) { process.exit(code); @@ -49,6 +50,7 @@ desc('Process all lumbar modules.'); task('lumbar', [], function() { exports.build({ dir: 'build/dev', + sourceMap: true, complete: complete }); }, true);
Output source maps in dev mode
walmartlabs_phoenix-build
train
js
cf1bc10c6c8c5ab9034a57ec728562ea0a15d46d
diff --git a/plugins/API/API.php b/plugins/API/API.php index <HASH>..<HASH> 100644 --- a/plugins/API/API.php +++ b/plugins/API/API.php @@ -1360,7 +1360,7 @@ class Piwik_API_API private function getRowEvolutionMetaData($idSite, $period, $date, $apiModule, $apiAction, $language, $idGoal = false) { $apiParameters = array(); - if(!empty($idGoal)) { + if(!empty($idGoal) && $idGoal > 0 ) { $apiParameters = array( 'idGoal' => $idGoal); } $reportMetadata = $this->getMetadata($idSite, $apiModule, $apiAction, $apiParameters, $language, $period, $date, $hideMetricsDoc = false, $showSubtableReports = true);
Fixing Row Evolution changing "Periods to Plot" was not working git-svn-id: <URL>
matomo-org_matomo
train
php
9eb1d32345c70a7280d33dbaf1adbf0d69cf5f74
diff --git a/gatling-maven-plugin/src/main/java/com/excilys/ebi/gatling/mojo/GatlingMojo.java b/gatling-maven-plugin/src/main/java/com/excilys/ebi/gatling/mojo/GatlingMojo.java index <HASH>..<HASH> 100644 --- a/gatling-maven-plugin/src/main/java/com/excilys/ebi/gatling/mojo/GatlingMojo.java +++ b/gatling-maven-plugin/src/main/java/com/excilys/ebi/gatling/mojo/GatlingMojo.java @@ -264,7 +264,7 @@ public class GatlingMojo extends AbstractMojo { } protected String fileNametoClassName(String fileName) { - return chompLast(fileName).replace(File.separatorChar, '.'); + return chompLast(fileName, ".scala").replace(File.separatorChar, '.'); } /**
Fix regression in last tentative for #<I>
gatling_gatling
train
java
f45788c13b18cea8c6ba62e95e80e403bfe6728c
diff --git a/backbone.js b/backbone.js index <HASH>..<HASH> 100644 --- a/backbone.js +++ b/backbone.js @@ -647,12 +647,6 @@ // initialization logic. initialize: function(){}, - // Method for checking whether an object should be considered a model for - // the purposes of adding to the collection. - isModel: function (model) { - return model instanceof Model - }, - // The JSON representation of a Collection is an array of the // models' attributes. toJSON: function(options) { @@ -713,7 +707,7 @@ // from being added. for (var i = 0, length = models.length; i < length; i++) { attrs = models[i] || {}; - if (this.isModel(attrs)) { + if (this._isModel(attrs)) { id = model = attrs; } else if (targetProto.generateId) { id = targetProto.generateId(attrs); @@ -957,6 +951,12 @@ return false; }, + // Method for checking whether an object should be considered a model for + // the purposes of adding to the collection. + _isModel: function (model) { + return model instanceof Model; + }, + // Internal method to create a model's ties to a collection. _addReference: function(model, options) { this._byId[model.cid] = model;
rename to _isModel, add semi-colon, move to be next to other internal methods
jashkenas_backbone
train
js
2341db2f1b67151f6b48bd3616967c580e60737f
diff --git a/lib/solargraph/pin/base_variable.rb b/lib/solargraph/pin/base_variable.rb index <HASH>..<HASH> 100644 --- a/lib/solargraph/pin/base_variable.rb +++ b/lib/solargraph/pin/base_variable.rb @@ -40,6 +40,7 @@ module Solargraph types = [] returns_from(@assignment).each do |node| chain = Source::NodeChainer.chain(node, filename) + next if chain.links.first.word == name clip = api_map.clip_at(location.filename, location.range.start) locals = clip.locals - [self] result = chain.infer(api_map, closure, locals) diff --git a/lib/solargraph/type_checker.rb b/lib/solargraph/type_checker.rb index <HASH>..<HASH> 100644 --- a/lib/solargraph/type_checker.rb +++ b/lib/solargraph/type_checker.rb @@ -95,9 +95,9 @@ module Solargraph # @return [Array<Problem>] def check_return_type pin tagged = pin.typify(api_map) - probed = pin.probe(api_map) if tagged.undefined? if pin.return_type.undefined? + probed = pin.probe(api_map) return [Problem.new(pin.location, "#{pin.name} has undefined @return type", probed.to_s)] else return [Problem.new(pin.location, "#{pin.name} has unresolved @return type #{pin.return_type}")]
Avoid infinite loops from self-referential variable assignments.
castwide_solargraph
train
rb,rb
9319efe60dda74bea5b43b8929d394acf74b853e
diff --git a/src/WebWorkers/ImageIOWorker.js b/src/WebWorkers/ImageIOWorker.js index <HASH>..<HASH> 100644 --- a/src/WebWorkers/ImageIOWorker.js +++ b/src/WebWorkers/ImageIOWorker.js @@ -59,7 +59,7 @@ const readImage = (input, withTransferList) => { } } if (io === null) { - return new Error('Could not find IO for: ' + input.name) + return Promise.reject(new Error('Could not find IO for: ' + input.name)) } let ioModule = null @@ -109,7 +109,7 @@ const writeImage = (input, withTransferList) => { } } if (io === null) { - return new Error('Could not find IO for: ' + input.name) + return Promise.reject(new Error('Could not find IO for: ' + input.name)) } let ioModule = null
fix(ImageIOWorker): Wrap the returned errors in a Promise This improves how the error is handled downstream and improves the message.
InsightSoftwareConsortium_itk-js
train
js
43b2b813660196ea450747f62afc1aee503691be
diff --git a/lib/jekyll/multiple/languages/plugin.rb b/lib/jekyll/multiple/languages/plugin.rb index <HASH>..<HASH> 100644 --- a/lib/jekyll/multiple/languages/plugin.rb +++ b/lib/jekyll/multiple/languages/plugin.rb @@ -72,11 +72,12 @@ module Jekyll end translation = Jekyll.langs[lang].access(key) if key.is_a?(String) if translation.nil? or translation.empty? + default_lang = context.registers[:site].config['languages'].first + translation = Jekyll.langs[default_lang].access(key) puts "Missing i18n key: #{lang}:#{key}" - "*#{lang}:#{key}*" - else - translation + puts "Using translation '#{translation}' from default language: #{default_lang}" end + translation end end
default translation - if no translation exists for the current language, return the translation from the default language
Anthony-Gaudino_jekyll-multiple-languages-plugin
train
rb
8591bf7ce52d585145b126f949eaed20547bf824
diff --git a/babel/index.js b/babel/index.js index <HASH>..<HASH> 100644 --- a/babel/index.js +++ b/babel/index.js @@ -5,6 +5,7 @@ const getDistLocation = importName => { // apis case 'Animated': case 'AppRegistry': + case 'AppState': case 'AsyncStorage': case 'BackAndroid': case 'Clipboard':
[fix] add AppState to Babel plugin list
necolas_react-native-web
train
js
ceaba663b4567133ce0fdfb5877079692d7150e2
diff --git a/spec/src/resource.spec.js b/spec/src/resource.spec.js index <HASH>..<HASH> 100644 --- a/spec/src/resource.spec.js +++ b/spec/src/resource.spec.js @@ -134,4 +134,9 @@ describe('fdom.resources.httpResolver', function() { resources.httpResolver('http://www.example.com/path/manifest.json', '../../test.html', r, f); expect(spy).toHaveBeenCalledWith('http://www.example.com/test.html'); }); + + it("should remove buggy cca URLs", function() { + resources.httpResolver('chrome-extension:////extensionid/manifest.json', 'resource.js', r, f); + expect(spy).toHaveBeenCalledWith('chrome-extension://extensionid/resource.js'); + }); });
Added a small test to check for weird cca chrome-extension URLs
freedomjs_freedom
train
js
bef2b6d38b45c783a2318ee7f381476825a50eb0
diff --git a/lib/debitech_soap.rb b/lib/debitech_soap.rb index <HASH>..<HASH> 100644 --- a/lib/debitech_soap.rb +++ b/lib/debitech_soap.rb @@ -36,7 +36,7 @@ module DebitechSoap @client = SOAP::WSDLDriverFactory.new('https://secure.incab.se/axis2/services/DTServerModuleService_v1?wsdl').create_rpc_driver end - define_jruby_wrapper_methods! + define_java_wrapper_methods! end def valid_credentials? @@ -47,7 +47,7 @@ module DebitechSoap private - def define_jruby_wrapper_methods! + def define_java_wrapper_methods! PARAMS.keys.each { |method| (class << self; self; end).class_eval do # Doc: define_method(method) do |*args| # def refund(*args)
Java is probably a better name for it right now.
joakimk_debitech_soap
train
rb
e59629f1cbc8eeb397e9deedbe0814c2d8a48e19
diff --git a/salt/modules/gnomedesktop.py b/salt/modules/gnomedesktop.py index <HASH>..<HASH> 100644 --- a/salt/modules/gnomedesktop.py +++ b/salt/modules/gnomedesktop.py @@ -13,6 +13,9 @@ try: except ImportError: HAS_PWD = False +# Import Salt libs +import salt.utils.path + # Import 3rd-party libs try: from gi.repository import Gio, GLib # pylint: disable=W0611 @@ -20,8 +23,6 @@ try: except ImportError: HAS_GLIB = False -import salt.utils - log = logging.getLogger(__name__) # Define the module's virtual name @@ -56,7 +57,7 @@ class _GSettings(object): ''' return the command to run the gesttings binary ''' - if salt.utils.which_bin(['dbus-run-session']): + if salt.utils.path.which_bin(['dbus-run-session']): cmd = ['dbus-run-session', '--', 'gsettings'] else: cmd = ['dbus-launch', '--exit-with-session', 'gsettings']
Update old utils paths to new utils paths
saltstack_salt
train
py
53751878704b81769c90b2ab2e998cd7518585a4
diff --git a/lib/onebox/version.rb b/lib/onebox/version.rb index <HASH>..<HASH> 100644 --- a/lib/onebox/version.rb +++ b/lib/onebox/version.rb @@ -1,3 +1,3 @@ module Onebox - VERSION = "1.0.0" -end \ No newline at end of file + VERSION = "1.0.1" +end
update version to <I> after merging root behavior
discourse_onebox
train
rb
677243dd15a611ab537003e139a391eb4040a7d6
diff --git a/gimmemotifs/config.py b/gimmemotifs/config.py index <HASH>..<HASH> 100644 --- a/gimmemotifs/config.py +++ b/gimmemotifs/config.py @@ -57,7 +57,10 @@ class MotifConfig: self.config.set("params", k, v) def get_default_params(self): - return dict(self.config.items("params")) + d = dict(self.config.items("params")) + for k in ["use_strand", "use_cache"]: + d[k] = self.config.getboolean("params", k) + return d def get_seqlogo(self): try:
fixed issue with boolean in config file
vanheeringen-lab_gimmemotifs
train
py
e2ae6a8651156a37d38904a53ef1e979a2b81703
diff --git a/src/Context/Argument/PageObjectArgumentResolver.php b/src/Context/Argument/PageObjectArgumentResolver.php index <HASH>..<HASH> 100644 --- a/src/Context/Argument/PageObjectArgumentResolver.php +++ b/src/Context/Argument/PageObjectArgumentResolver.php @@ -3,7 +3,9 @@ namespace SensioLabs\Behat\PageObjectExtension\Context\Argument; use Behat\Behat\Context\Argument\ArgumentResolver; +use SensioLabs\Behat\PageObjectExtension\PageObject\Element; use SensioLabs\Behat\PageObjectExtension\PageObject\Factory; +use SensioLabs\Behat\PageObjectExtension\PageObject\Page; class PageObjectArgumentResolver implements ArgumentResolver { @@ -55,7 +57,7 @@ class PageObjectArgumentResolver implements ArgumentResolver */ private function isPage($className) { - return is_subclass_of($className, 'SensioLabs\Behat\PageObjectExtension\PageObject\Page'); + return is_subclass_of($className, Page::class); } /** @@ -65,7 +67,7 @@ class PageObjectArgumentResolver implements ArgumentResolver */ private function isElement($className) { - return is_subclass_of($className, 'SensioLabs\Behat\PageObjectExtension\PageObject\Element'); + return is_subclass_of($className, Element::class); } /**
Update PageObjectArgumentResolver.php As PHP minimum supported version is 7, it's perfectly safe to refactor this as you see in this PR
sensiolabs_BehatPageObjectExtension
train
php
577c5fc30a623309eaeb4cf5b0d910005c780eaf
diff --git a/pyontutils/scigraph_codegen.py b/pyontutils/scigraph_codegen.py index <HASH>..<HASH> 100755 --- a/pyontutils/scigraph_codegen.py +++ b/pyontutils/scigraph_codegen.py @@ -776,7 +776,16 @@ class State: def gencode(self): """ Run this to generate the code """ - ledict = requests.get(self.api_url).json() + resp = requests.get(self.api_url) + if not resp.ok: + if resp.status_code == 401 and 'scicrunch.org' in self.api_url: + resp = requests.get( + self.api_url, + params={'key': auth.get('scigraph-api-key')}) + else: + resp.raise_for_status() + + ledict = resp.json() for durl in self._dynamics: dj = requests.get(durl).json() for p in dj['paths']: @@ -787,6 +796,7 @@ class State: out = self.dodict(ledict) self._code = out + class State2(State): path_prefix = '' dynamic_produces = [
scigraph codegen support for swagger.json requiring an api key
tgbugs_pyontutils
train
py
cf5010ca6e50cc9c3b873781921b771ff0cf4a14
diff --git a/pkg/apimachinery/registered/registered.go b/pkg/apimachinery/registered/registered.go index <HASH>..<HASH> 100644 --- a/pkg/apimachinery/registered/registered.go +++ b/pkg/apimachinery/registered/registered.go @@ -22,6 +22,7 @@ import ( "os" "sort" "strings" + "sync" "github.com/golang/glog" @@ -207,11 +208,7 @@ func AddThirdPartyAPIGroupVersions(gvs ...unversioned.GroupVersion) []unversione } RegisterVersions(filteredGVs) EnableVersions(filteredGVs...) - next := make([]unversioned.GroupVersion, len(gvs)) - for ix := range filteredGVs { - next[ix] = filteredGVs[ix] - } - thirdPartyGroupVersions = next + thirdPartyGroupVersions = append(thirdPartyGroupVersions, filteredGVs...) return skippedGVs }
Fix a problem with multiple APIs clobbering each other in registration.
kubernetes_kubernetes
train
go
ad3b675bf9fbbd49ca5bba8e8ea324ff49808d61
diff --git a/src/Lib/DefaultFilters.php b/src/Lib/DefaultFilters.php index <HASH>..<HASH> 100644 --- a/src/Lib/DefaultFilters.php +++ b/src/Lib/DefaultFilters.php @@ -227,7 +227,7 @@ class DefaultFilters */ function filter_lower ($v) { - return mb_strtolower ($str) ($v); + return mb_strtolower ($v); } /** @@ -325,7 +325,7 @@ class DefaultFilters */ function filter_upper ($v) { - return mb_strtoupper ($str) ($v); + return mb_strtoupper ($v); } /**
FIX: lower and upper filters.
electro-modules_matisse
train
php
4f2fad5058bfeb0a8d45981cf610fec6d4949824
diff --git a/src/bosh-director/spec/spec_helper.rb b/src/bosh-director/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/src/bosh-director/spec/spec_helper.rb +++ b/src/bosh-director/spec/spec_helper.rb @@ -132,10 +132,12 @@ module SpecHelper Sequel.default_timezone = :utc @director_db = Sequel.connect(@director_db_helper.connection_string, db_opts) @director_db.loggers << (logger || @init_logger) + @director_db.log_connection_info = true Bosh::Director::Config.db = @director_db @dns_db = Sequel.connect(@dns_db_helper.connection_string, db_opts) @dns_db.loggers << (logger || @init_logger) + @dns_db.log_connection_info = true Bosh::Director::Config.dns_db = @dns_db end
Include database connection ID in spec logs For consistency with the main runtime logger which changed in e<I>b<I>c7d
cloudfoundry_bosh
train
rb
18fbe564627b70334efc84638f4ce7371877be57
diff --git a/superset/assets/src/explore/controlPanels/Table.js b/superset/assets/src/explore/controlPanels/Table.js index <HASH>..<HASH> 100644 --- a/superset/assets/src/explore/controlPanels/Table.js +++ b/superset/assets/src/explore/controlPanels/Table.js @@ -59,4 +59,12 @@ export default { validators: [], }, }, + sectionOverrides: { + druidTimeSeries: { + controlSetRows: [['granularity', 'druid_time_origin'], ['time_range']], + }, + sqlaTimeSeries: { + controlSetRows: [['granularity_sqla', 'time_grain_sqla'], ['time_range']], + }, + }, };
[fix] Adding time grains to Table (#<I>)
apache_incubator-superset
train
js
79ec1a884cef183440e97499879b2e0ab34ca036
diff --git a/js/jcf.js b/js/jcf.js index <HASH>..<HASH> 100755 --- a/js/jcf.js +++ b/js/jcf.js @@ -448,5 +448,10 @@ } }; + // we need to make JCF available globally if we're in AMD environment + if (typeof define === 'function' && define.amd) { + window.jcf = api; + } + return api; }));
fixed usage with require.js (previous commit improved compatibility with CommonJS but AMD was broken)
w3co_jcf
train
js
f4cc30b72b58ffaec8a7a10897da2cfbadc19353
diff --git a/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php b/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php +++ b/src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Core\Encoder; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; + /** * PasswordEncoderInterface is the interface for all encoders. * @@ -25,6 +27,9 @@ interface PasswordEncoderInterface * @param string $salt The salt * * @return string The encoded password + * + * @throws BadCredentialsException If the raw password is invalid, e.g. excessively long + * @throws \InvalidArgumentException If the salt is invalid */ public function encodePassword($raw, $salt); @@ -36,6 +41,8 @@ interface PasswordEncoderInterface * @param string $salt The salt * * @return bool true if the password is valid, false otherwise + * + * @throws \InvalidArgumentException If the salt is invalid */ public function isPasswordValid($encoded, $raw, $salt); }
Declare exceptions that are already thrown by implementations
symfony_symfony
train
php
4a0066238144b7013e80f96500d5bd2e60dda789
diff --git a/rollbar/contrib/fastapi/utils.py b/rollbar/contrib/fastapi/utils.py index <HASH>..<HASH> 100644 --- a/rollbar/contrib/fastapi/utils.py +++ b/rollbar/contrib/fastapi/utils.py @@ -45,15 +45,25 @@ def get_installed_middlewares(app): ASGIReporterMiddleware, ) - if not hasattr(app, 'user_middleware'): + if hasattr(app, 'user_middleware'): # FastAPI v0.51.0+ + return [ + middleware.cls + for middleware in app.user_middleware + if middleware.cls in candidates + ] + elif hasattr(app, 'error_middleware'): + middleware = app.error_middleware + middlewares = [] + + while hasattr(middleware, 'app'): + if isinstance(middleware, candidates): + middlewares.append(middleware) + middleware = middleware.app + + return [middleware.__class__ for middleware in middlewares] + else: return [] - return [ - middleware.cls - for middleware in app.user_middleware - if middleware.cls in candidates - ] - def has_bare_routing(app_or_router): expected_app_routes = 4
Fix get_installed_middlewares() for older FastAPI versions
rollbar_pyrollbar
train
py
e01a94cc276ff88ca9d0d6c2a418e9c427e46c1c
diff --git a/lib/ecwid_api/api.rb b/lib/ecwid_api/api.rb index <HASH>..<HASH> 100644 --- a/lib/ecwid_api/api.rb +++ b/lib/ecwid_api/api.rb @@ -22,7 +22,7 @@ module EcwidApi # def raise_on_failure(response) if response.success? - yield if block_given? + yield(response) if block_given? else raise ResponseError.new(response) end diff --git a/lib/ecwid_api/api/products.rb b/lib/ecwid_api/api/products.rb index <HASH>..<HASH> 100644 --- a/lib/ecwid_api/api/products.rb +++ b/lib/ecwid_api/api/products.rb @@ -55,7 +55,7 @@ module EcwidApi def create(params) response = client.post("products", params) - raise_on_failure(response) { find(id) } + raise_on_failure(response) {|response| find(response.body["id"]) } end # Public: Updates an existing Product
Fixes Product creation The Product ID is supplied in the body of the response, so that is what we need to get in order to find the most recent details of the Product. The raise_on_failuer method will yield the response if it is successful.
davidbiehl_ecwid_api
train
rb,rb
d621af226a78bd4748183ac7e21aeb1f9138d0a4
diff --git a/tests/Http/RequestTest.php b/tests/Http/RequestTest.php index <HASH>..<HASH> 100644 --- a/tests/Http/RequestTest.php +++ b/tests/Http/RequestTest.php @@ -258,6 +258,7 @@ class RequestTest extends PHPUnit_Framework_TestCase $this->assertEquals(null, $request->getHeader('Request-Method', null, 'Only HTTP_ prefixed $_SERVER data should be considered a header')); $this->assertEquals($expectedHeaders['X-Forwarded-For'], $request->getHeader('X-Forwarded-For')); $this->assertEquals($expectedHeaders['Fake-Ass-Header'], $request->getHeader('Fake-Ass-Header')); + $this->assertEquals($expectedHeaders['X-Forwarded-For'], $request->getHeader('x-forwarded-for', 'getHeader() should be case insensitive')); } public function testIsHttpsForNonEmpty()
[#9] RequestTest: Add test to ensure getHeader($key) is case-insensitive
roydejong_Enlighten
train
php
b475b6e6cf44400ed48808d42160833b850b5e22
diff --git a/lib/commander/user_interaction.rb b/lib/commander/user_interaction.rb index <HASH>..<HASH> 100644 --- a/lib/commander/user_interaction.rb +++ b/lib/commander/user_interaction.rb @@ -327,7 +327,7 @@ module Commander # const_get(:Config) issues a deprecation warning on ruby 1.8.7 Object.const_get(const) unless const == :Config end.select do |const| - const.is_a? Class and const.respond_to? :parse + const.class == Class && const.respond_to?(:parse) end).each do |klass| define_method "ask_for_#{klass.to_s.downcase}" do |prompt| $terminal.ask(prompt, klass)
Avoid triggering ActiveSupport deprecation warning (#<I>)
commander-rb_commander
train
rb
1575ff4df1b41da059e8eeb7b0cd9ce59e0cc6bc
diff --git a/lib/puppet_library/version.rb b/lib/puppet_library/version.rb index <HASH>..<HASH> 100644 --- a/lib/puppet_library/version.rb +++ b/lib/puppet_library/version.rb @@ -16,5 +16,5 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. module PuppetLibrary - VERSION = "0.17.0" + VERSION = "0.18.0" end
[release] Incremented version number
drrb_puppet-library
train
rb