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
fa7aed6424b4ad97adccbb62b498b5b15c7e3e71
diff --git a/salt/state.py b/salt/state.py index <HASH>..<HASH> 100644 --- a/salt/state.py +++ b/salt/state.py @@ -2433,6 +2433,7 @@ class State(object): '__run_num__': self.__run_num, '__sls__': low['__sls__'] } + self.pre[tag] = running[tag] self.__run_num += 1 elif status == 'change' and not low.get('__prereq__'): ret = self.call(low, chunks, running)
Ensure failed tags are added to self.pre.
saltstack_salt
train
py
fca162fb2bfddd7fedf9e5e7f1e73f21e03b1a17
diff --git a/pkg/cmd/server/origin/webconsole_proxy.go b/pkg/cmd/server/origin/webconsole_proxy.go index <HASH>..<HASH> 100644 --- a/pkg/cmd/server/origin/webconsole_proxy.go +++ b/pkg/cmd/server/origin/webconsole_proxy.go @@ -43,7 +43,7 @@ func withAssetServerRedirect(handler http.Handler, accessor *webConsolePublicURL func (c *MasterConfig) withConsoleRedirection(handler, assetServerHandler http.Handler, accessor *webConsolePublicURLAccessor) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { // blacklist well known paths so we do not risk recursion deadlocks - for _, prefix := range []string{"/apis", "/api", "/oapi", "/healtz", "/version"} { + for _, prefix := range []string{"/apis", "/api", "/oapi", "/healthz", "/version"} { if req.URL.Path == prefix || strings.HasPrefix(req.URL.Path, prefix+"/") { // Dispatch to the next handler handler.ServeHTTP(w, req)
Fix typo in /healthz filter exemption
openshift_origin
train
go
d10929a635a4431f342ac6ca8f16df44c8226abe
diff --git a/perceval/backends/gerrit.py b/perceval/backends/gerrit.py index <HASH>..<HASH> 100644 --- a/perceval/backends/gerrit.py +++ b/perceval/backends/gerrit.py @@ -124,13 +124,15 @@ class Gerrit(Backend): raw_data = self.client.reviews(last_item) self._push_cache_queue(raw_data) self._flush_cache_queue() - reviews = Gerrit.parse_reviews(raw_data) + reviews = self.parse_reviews(raw_data) logger.info("Received %i reviews in %.2fs" % (len(reviews), time.time()-task_init)) return reviews - @classmethod - def parse_reviews(cls, raw_data): + @staticmethod + def parse_reviews(raw_data): + """Parse a Gerrit reviews list.""" + # Join isolated reviews in JSON in array for parsing items_raw = "[" + raw_data.replace("\n", ",") + "]" items_raw = items_raw.replace(",]", "]")
[gerrit] Shift parse_reviews() from class to static method
chaoss_grimoirelab-perceval
train
py
893e1eea247288fb522080dd61de1bfc52250500
diff --git a/modules/tester.js b/modules/tester.js index <HASH>..<HASH> 100755 --- a/modules/tester.js +++ b/modules/tester.js @@ -854,7 +854,7 @@ Tester.prototype.assertInstanceOf = function assertInstanceOf(subject, construct } return this.assert(utils.betterInstanceOf(subject, constructor), message, { type: "assertInstanceOf", - standard: f('Subject type is: "%s"', constructor), + standard: f('Subject is instance of: "%s"', constructor.name), values: { subject: subject, className: constructor.name,
Improved output of Tester.assertInstanceOf() method
casperjs_casperjs
train
js
73a9b2d74073c644ee821843a5877ca8183c5547
diff --git a/lib/interop.js b/lib/interop.js index <HASH>..<HASH> 100644 --- a/lib/interop.js +++ b/lib/interop.js @@ -213,8 +213,10 @@ Interop.prototype.toPlanB = function(desc) { // In Plan B the msid is an SSRC attribute. delete uLine.msid; - // Used to build the group:BUNDLE value after this loop. - types.push(uLine.type); + if (uLine.direction !== 'inactive') { + // Used to build the group:BUNDLE value after this loop. + types.push(uLine.type); + } // Add the channel to the new media array. session.media.push(uLine); diff --git a/test/sdp_interop.js b/test/sdp_interop.js index <HASH>..<HASH> 100644 --- a/test/sdp_interop.js +++ b/test/sdp_interop.js @@ -537,7 +537,7 @@ s=Kurento Media Server\r\n\ c=IN IP4 0.0.0.0\r\n\ t=0 0\r\n\ a=msid-semantic: WMS *\r\n\ -a=group:BUNDLE audio video\r\n\ +a=group:BUNDLE video\r\n\ m=audio 0 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126\r\n\ a=mid:audio\r\n\ a=inactive\r\n\
interop: toPlanB: do not add mid to bundle group if the related uLine is innactive
jitsi_sdp-interop
train
js,js
e7d67a65920ff461322f26e847af91b3a005c8a5
diff --git a/utils_data.py b/utils_data.py index <HASH>..<HASH> 100644 --- a/utils_data.py +++ b/utils_data.py @@ -53,7 +53,7 @@ def filter_sgls(n_samples, exp_ind, sgls, max_pitch, min_depth, def get_subdir(path, cfg): import os - import utils + from bodycondition import utils def match_subdir(path, cfg): import numpy
changed import in utils_data for importing in paper_body_condition
ryanjdillon_pyotelem
train
py
98389db2ae73147aeab9b56a0ea588843649a5ce
diff --git a/plugin/import-js-sublime/import-js.py b/plugin/import-js-sublime/import-js.py index <HASH>..<HASH> 100644 --- a/plugin/import-js-sublime/import-js.py +++ b/plugin/import-js-sublime/import-js.py @@ -21,7 +21,7 @@ class ImportJsCommand(sublime_plugin.TextCommand): result = proc.communicate(input=current_file_contents.encode('utf-8')) stderr = result[1].decode() - if(len(stderr) > 0): + if(proc.returncode > 0): sublime.error_message('Error when executing import-js: ' + stderr) return
Check for exit code > 0 instead of existence of stderr I'm about to make messages appear in the Sublime plugin. In order to do that, I need a channel to post them that won't mess up the end results being posted to stdout.
Galooshi_import-js
train
py
013b9d9dfc62cb7c5f8c5725e6596d405d9c2f0b
diff --git a/ipv6.js b/ipv6.js index <HASH>..<HASH> 100644 --- a/ipv6.js +++ b/ipv6.js @@ -1062,3 +1062,24 @@ v6.Address.prototype.teredo = function() { udpPort: udpPort }; }; + +/* + * Returns an object containing the 6to4 properties of the address + */ +v6.Address.prototype.6to4 = function() { + /* + - Bits 0 to 15 are set to the 6to4 prefix (2002::/16). + - Bits 16 to 48 embed the IPv4 address of the 6to4 gateway that is used. + */ + + var s = this.binaryZeroPad().split(''); + + var prefix = this.getBitsBase16(0, 16); + + var gateway4 = v4.Address.fromHex(this.getBitsBase16(16, 48)); + + return { + prefix: sprintf('%s', prefix.slice(0, 4)), + gateway4: gateway4.address, + }; +};
Added v6.Address.prototype<I>to4
beaugunderson_deprecated-javascript-ipv6
train
js
bc5f8bd6e61fe116c91e0eb2d97e49e374d19e30
diff --git a/test/component/doc.spec.js b/test/component/doc.spec.js index <HASH>..<HASH> 100644 --- a/test/component/doc.spec.js +++ b/test/component/doc.spec.js @@ -23,18 +23,6 @@ describe('QIX Doc', () => { config.url = 'ws://mocked:1337/app/engineData'; config.createSocket = url => new SocketMock(url); - config.mixins = [{ - type: 'Global', - mixin() { - return { - tweet() { - return Promise.resolve('Mr tweeter!'); - }, - }; - }, - config: {}, - }]; - return Qix.create(config).open().then(global => global.openDoc('my-app')).then((doc) => { qixDoc = doc; });
Removed incorrect use of mixins in component tests (#<I>)
qlik-oss_enigma.js
train
js
47953624561967ef3bdd6323d73f2af628d04146
diff --git a/main/core/Controller/ResourceController.php b/main/core/Controller/ResourceController.php index <HASH>..<HASH> 100644 --- a/main/core/Controller/ResourceController.php +++ b/main/core/Controller/ResourceController.php @@ -221,7 +221,7 @@ class ResourceController try { $loaded = $this->manager->load($resourceNode, intval($embedded) ? true : false); //I have no idea if it is correct to do this - if ($this->tokenStorage->getToken()->getUser()) { + if ('anon.' !== $this->tokenStorage->getToken()->getUser()) { $this->resourceEvaluationManager->createResourceEvaluation($resourceNode, $this->tokenStorage->getToken()->getUser(), null, [ 'status' => ResourceEvaluation::STATUS_PARTICIPATED, ]);
Fixes resource evaluation creation when opening a resource for anonymous (#<I>)
claroline_Distribution
train
php
f4727b2f991d4238429163f772eefc61fadfb981
diff --git a/lib/main.js b/lib/main.js index <HASH>..<HASH> 100644 --- a/lib/main.js +++ b/lib/main.js @@ -2,7 +2,7 @@ //- main.js ~~ // ~~ (c) SRW, 16 Jul 2012 -// ~~ last updated 01 Apr 2013 +// ~~ last updated 23 May 2014 (function () { 'use strict'; @@ -21,6 +21,8 @@ exports.roll_up = require('./katamari').roll_up; + exports.version = require('../package.json').version; + // That's all, folks! return;
Added `qm.version` property that reads directly from package.json
qmachine_qm-nodejs
train
js
f5448b371cd3ad182609850ecd0c15aa9f5da98b
diff --git a/uncompyle6/semantics/fragments.py b/uncompyle6/semantics/fragments.py index <HASH>..<HASH> 100644 --- a/uncompyle6/semantics/fragments.py +++ b/uncompyle6/semantics/fragments.py @@ -105,6 +105,9 @@ TABLE_DIRECT_FRAGMENT = { 'pass': ( '%|%rpass\n', ), 'raise_stmt0': ( '%|%rraise\n', ), 'import': ( '%|import %c%x\n', 2, (2, (0, 1)), ), + 'import_cont': ( ', %c%x', (2, 'alias'), (2, (0, 1)), ), + 'import_from': ( '%|from %[2]{pattr}%x import %c\n', + (2, (0, 1)), (3, 'importlist'), ), 'importfrom': ( '%|from %[2]{pattr}%x import %c\n', (2, (0, 1)), 3), # FIXME only in <= 2.4
More complete fragment parsing for imports
rocky_python-uncompyle6
train
py
bc3b667b552b18d211a858c49bb6be39d66af50b
diff --git a/test/AlexaSmartHome/Response/AlexaResponseTest.php b/test/AlexaSmartHome/Response/AlexaResponseTest.php index <HASH>..<HASH> 100644 --- a/test/AlexaSmartHome/Response/AlexaResponseTest.php +++ b/test/AlexaSmartHome/Response/AlexaResponseTest.php @@ -100,6 +100,28 @@ class AlexaResponseTest extends TestCase { /** * @group smarthome */ + public function testAlexaResponseAuthorizationTemplate() { + $alexaResponse = AlexaResponse::create('Authorization'); + $expect = [ + 'response' => [ + 'event' => [ + 'header' => [ + 'namespace' => 'Alexa', + 'name' => null, + 'payloadVersion' => '3', + 'messageId' => null, + ], + 'payload' => [], + ] + ], + ]; + + $this->assertEquals($expect, $alexaResponse->render()); + } + + /** + * @group smarthome + */ public function testAlexaResponseErrorTemplate() { $alexaResponse = AlexaResponse::create('Error'); $expect = [
Add test for response template 'Authorization'
internetofvoice_libvoice
train
php
15e88a3986ae57b956fdce482b75e81332292537
diff --git a/workshift/tests.py b/workshift/tests.py index <HASH>..<HASH> 100644 --- a/workshift/tests.py +++ b/workshift/tests.py @@ -2270,6 +2270,11 @@ class TestSemester(TestCase): def test_clear_semester(self): utils.clear_semester(self.s1) + self.assertEqual( + Semester.objects.all().count(), + 1, + ) + utils.clear_semester(self.s2) self.assertEqual( Semester.objects.all().count(),
Check mid-clearing that we've only removed one semester
knagra_farnsworth
train
py
fb7542f920276689e0db30061df632d8e745985a
diff --git a/salt/config/__init__.py b/salt/config/__init__.py index <HASH>..<HASH> 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -2965,7 +2965,7 @@ def apply_minion_config(overrides=None, return opts -def master_config(path, env_var='SALT_MASTER_CONFIG', defaults=None): +def master_config(path, env_var='SALT_MASTER_CONFIG', defaults=None, exit_on_config_errors=False): ''' Reads in the master configuration file and sets up default options @@ -2992,8 +2992,8 @@ def master_config(path, env_var='SALT_MASTER_CONFIG', defaults=None): defaults['default_include']) include = overrides.get('include', []) - overrides.update(include_config(default_include, path, verbose=False)) - overrides.update(include_config(include, path, verbose=True)) + overrides.update(include_config(default_include, path, verbose=False), exit_on_config_errors=exit_on_config_errors) + overrides.update(include_config(include, path, verbose=True), exit_on_config_errors=exit_on_config_errors) opts = apply_master_config(overrides, defaults) _validate_opts(opts) # If 'nodegroups:' is uncommented in the master config file, and there are
Add option to master config reader on ignoring system exit for wrong configuration
saltstack_salt
train
py
1ade156d3c79ebda2cdf383e1f610002570c23cd
diff --git a/actionview/lib/action_view/helpers/form_options_helper.rb b/actionview/lib/action_view/helpers/form_options_helper.rb index <HASH>..<HASH> 100644 --- a/actionview/lib/action_view/helpers/form_options_helper.rb +++ b/actionview/lib/action_view/helpers/form_options_helper.rb @@ -129,9 +129,9 @@ module ActionView # A block can be passed to +select+ to customize how the options tags will be rendered. This # is useful when the options tag has complex attributes. # - # select(report, "campaign_ids") do + # select(report, :campaign_ids) do # available_campaigns.each do |c| - # content_tag(:option, c.name, value: c.id, data: { tags: c.tags.to_json }) + # tag.option(c.name, value: c.id, data: { tags: c.tags.to_json }) # end # end #
[ci skip] Use more modern tag.x call structure
rails_rails
train
rb
a32497585d1c71fdd79617e052b83b307f9a6217
diff --git a/src/values/ErrorValue.js b/src/values/ErrorValue.js index <HASH>..<HASH> 100644 --- a/src/values/ErrorValue.js +++ b/src/values/ErrorValue.js @@ -73,7 +73,16 @@ class ErrorInstance extends ObjectValue { } } if ( this.native ) { - for ( var k in extra ) this.native[k] = extra[k]; + for ( var k in extra ) { + if ( ['ast', 'scope', 'canidates'].indexOf(k) !== -1 ) { + Object.defineProperty(this.native, k, { + value: extra[k], + enumerable: false + }); + } else { + this.native[k] = extra[k]; + } + } } this.extra = extra; }
Hide some of the extra info properties.
codecombat_esper.js
train
js
8069ebee19d5df3f94573219527066a66ed9c669
diff --git a/src/main/java/com/github/mygreen/cellformatter/ObjectCellFormatter.java b/src/main/java/com/github/mygreen/cellformatter/ObjectCellFormatter.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/github/mygreen/cellformatter/ObjectCellFormatter.java +++ b/src/main/java/com/github/mygreen/cellformatter/ObjectCellFormatter.java @@ -281,6 +281,25 @@ public class ObjectCellFormatter { } /** + * {@link FormatterResolver}を取得する。 + * @since 0.9 + * @return + */ + public FormatterResolver getFormatterResolver() { + return formatterResolver; + } + + /** + * {@link FormatterResolver}を設定する。 + * 独自のものに入れ替える際に利用します。 + * @since 0.9 + * @param formatterResolver + */ + public void setFormatterResolver(FormatterResolver formatterResolver) { + this.formatterResolver = formatterResolver; + } + + /** * パースしたフォーマッタをキャッシュするかどうか。 * 初期値はtrueです。 * @return @@ -297,4 +316,5 @@ public class ObjectCellFormatter { this.cache = cache; } + }
refs #<I> add accessor method for formatterResolver
mygreen_excel-cellformatter
train
java
c155fedcd47f4908d371731d74dc36d03efc7713
diff --git a/src/store.js b/src/store.js index <HASH>..<HASH> 100644 --- a/src/store.js +++ b/src/store.js @@ -1252,7 +1252,12 @@ function store(Model, options = {}) { return lastValue; }, - connect: options.draft ? () => () => clear(Model, false) : undefined, + connect: options.draft + ? (host, key) => () => { + cache.invalidate(host, key, true); + clear(Model, false); + } + : undefined, }; return desc;
fix(store): clear lastValue for draft mode
hybridsjs_hybrids
train
js
9692746a28e54f0c94496ebfb95e7614b8550299
diff --git a/src/Ouzo/Core/View.php b/src/Ouzo/Core/View.php index <HASH>..<HASH> 100644 --- a/src/Ouzo/Core/View.php +++ b/src/Ouzo/Core/View.php @@ -48,7 +48,7 @@ class View private function verifyExists($viewPath, $viewName) { if (!Files::exists($viewPath)) { - throw new ViewException('No view found [' . $viewName . ']'); + throw new ViewException('No view found [' . $viewName . '] at: ' . $viewPath); } }
More verbose view exception (issue #<I>).
letsdrink_ouzo
train
php
bee46ad3b5422567edfd88ec82e196fe4c754241
diff --git a/go/client/chat_api_doc.go b/go/client/chat_api_doc.go index <HASH>..<HASH> 100644 --- a/go/client/chat_api_doc.go +++ b/go/client/chat_api_doc.go @@ -25,6 +25,9 @@ If you're on the nth page and want to go back, set the previous field instead. Send a message: {"method": "send", "params": {"options": {"channel": {"name": "you,them"}, "message": {"body": "is it cold today?"}}}} +Send a reply: + {"method": "send", "params": {"options": {"channel": {"name": "you,them"}, "message": {"body": "is it cold today?"}, "reply_to": 314}}} + Delete a message: {"method": "delete", "params": {"options": {"channel": {"name": "you,them"}, "message_id": 314}}}
add send reply to api doc (#<I>)
keybase_client
train
go
e354beb3d61598a696835f90603b55585b930f3a
diff --git a/liquibase-core/src/main/java/liquibase/snapshot/DatabaseSnapshot.java b/liquibase-core/src/main/java/liquibase/snapshot/DatabaseSnapshot.java index <HASH>..<HASH> 100644 --- a/liquibase-core/src/main/java/liquibase/snapshot/DatabaseSnapshot.java +++ b/liquibase-core/src/main/java/liquibase/snapshot/DatabaseSnapshot.java @@ -337,7 +337,7 @@ public abstract class DatabaseSnapshot implements LiquibaseSerializable { } // System.out.println("replaceObject "+fieldValue); - if (isWrongSchema(((DatabaseObject) fieldValue))) { + if (!(fieldValue instanceof Catalog) && isWrongSchema(((DatabaseObject) fieldValue))) { DatabaseObject savedFieldValue = referencedObjects.get((DatabaseObject) fieldValue, schemaComparisons); if (savedFieldValue == null) { savedFieldValue = (DatabaseObject) fieldValue;
DVONE-<I> Handle catalog differently
liquibase_liquibase
train
java
13b60d692f31ebc6fb7503af9396cbcdca4fe48f
diff --git a/packages/blueprint-gatekeeper/app/controllers/account.js b/packages/blueprint-gatekeeper/app/controllers/account.js index <HASH>..<HASH> 100644 --- a/packages/blueprint-gatekeeper/app/controllers/account.js +++ b/packages/blueprint-gatekeeper/app/controllers/account.js @@ -68,7 +68,7 @@ module.exports = ResourceController.extend ({ // Extract the index that caused the duplicate key error. This will determine // the best course of action for correcting the problem. - const [, field] = err.message.match (/\$(\w+)_\d+/); + const [, field] = err.message.match (/index:\s+(\w+)_\d+/); // Since we got a duplicate exception, this means an account with either the // username or email address already exists. Let's attempt to restore the
Extracting the index failed if no $ present in name
onehilltech_blueprint
train
js
58fda2dc351d9c68b6d9da1549109343caaf58b6
diff --git a/commands/command_migrate.go b/commands/command_migrate.go index <HASH>..<HASH> 100644 --- a/commands/command_migrate.go +++ b/commands/command_migrate.go @@ -1,6 +1,10 @@ package commands import ( + "path/filepath" + + "github.com/git-lfs/git-lfs/git" + "github.com/git-lfs/git-lfs/git/odb" "github.com/spf13/cobra" ) @@ -13,6 +17,16 @@ var ( migrateExcludeRefs []string ) +// getObjectDatabase creates a *git.ObjectDatabase from the filesystem pointed +// at the .git directory of the currently checked-out repository. +func getObjectDatabase() (*odb.ObjectDatabase, error) { + dir, err := git.GitDir() + if err != nil { + return nil, errors.Wrap(err, "cannot open root") + } + return odb.FromFilesystem(filepath.Join(dir, "objects")) +} + func init() { RegisterCommand("migrate", nil, func(cmd *cobra.Command) { // Adding flags directly to cmd.Flags() doesn't apply those
commands/command_migrate: implement getObjectDatabase
git-lfs_git-lfs
train
go
ad4e1290387dcab3797f49568146e2209fb2cdfa
diff --git a/app/src/Bolt/Controllers/Backend.php b/app/src/Bolt/Controllers/Backend.php index <HASH>..<HASH> 100644 --- a/app/src/Bolt/Controllers/Backend.php +++ b/app/src/Bolt/Controllers/Backend.php @@ -85,7 +85,7 @@ class Backend implements ControllerProviderInterface ->bind('extensions') ; - $ctl->get("/user/{action}/{id}", array($this, 'extensions')) + $ctl->get("/user/{action}/{id}", array($this, 'useraction')) ->before(array($this, 'before')) ->bind('useraction') ;
Deleting users didn't work. Fixes <I>.
bolt_bolt
train
php
e15dd321112776ec10580e50fe8ea67f57b73968
diff --git a/test_keccak.py b/test_keccak.py index <HASH>..<HASH> 100644 --- a/test_keccak.py +++ b/test_keccak.py @@ -17,7 +17,7 @@ class SHA3TestCaseMixin(object): def assertHashesEqual(self, hash_obj, hex_hash): "Assert that the hex and non-hex digests match an expected value." - self.assertEqual(hash_obj.digest(), unhexlify(hex_hash)) + self.assertEqual(hash_obj.digest(), unhexlify(hex_hash.encode())) self.assertEqual(hash_obj.hexdigest(), hex_hash) def test_empty_hash(self):
More python 3 compatibility.
habnabit_cykeccak
train
py
02509d3c406f3ac140136e2a7ec1e6793fb4b7d1
diff --git a/instaloader.py b/instaloader.py index <HASH>..<HASH> 100755 --- a/instaloader.py +++ b/instaloader.py @@ -63,8 +63,10 @@ def _log(*msg, sep='', end='\n', flush=False, quiet=False): def get_json(name: str, session: requests.Session, max_id: int = 0, sleep: bool = True) -> Optional[Dict[str, Any]]: """Return JSON of a profile""" - resp = session.get('http://www.instagram.com/'+name, - params={'max_id': max_id}) + if max_id == 0: + resp = session.get('https://www.instagram.com/'+name) + else: + resp = session.get('https://www.instagram.com/'+name, params={'max_id': max_id}) if sleep: time.sleep(4 * random.random() + 1) match = re.search('window\\._sharedData = .*<', resp.text)
Fix downloading (set max_id only if not zero) This should fix #<I>.
instaloader_instaloader
train
py
106635eb669127fb77dac87de6292045fba306c5
diff --git a/test/integration/active_record_searchable_test.rb b/test/integration/active_record_searchable_test.rb index <HASH>..<HASH> 100644 --- a/test/integration/active_record_searchable_test.rb +++ b/test/integration/active_record_searchable_test.rb @@ -477,6 +477,7 @@ module Tire context "with multiple class instances in one index" do setup do + # Tire.configure { logger STDERR, level: 'debug' } ActiveRecord::Schema.define do create_table(:active_record_assets) { |t| t.string :title, :timestamp } create_table(:active_record_model_one) { |t| t.string :title, :timestamp } @@ -484,13 +485,13 @@ module Tire end ActiveRecordModelOne.create :title => 'Title One', timestamp: Time.now.to_i - ActiveRecordModelTwo.create :title => 'Title Two', timestamp: Time.now.to_i + ActiveRecordModelTwo.create :title => 'Title Two', timestamp: Time.now.to_i+1 ActiveRecordModelOne.tire.index.refresh ActiveRecordModelTwo.tire.index.refresh ActiveRecordVideo.create! :title => 'Title One', timestamp: Time.now.to_i - ActiveRecordPhoto.create! :title => 'Title Two', timestamp: Time.now.to_i + ActiveRecordPhoto.create! :title => 'Title Two', timestamp: Time.now.to_i+1 ActiveRecordAsset.tire.index.refresh end
[TEST] Fixed incorrect test for STI `to_i` obviously doesn't provide enough granularity.
karmi_retire
train
rb
8492924614f495aa78f33cf4300b05e418135b5c
diff --git a/crd-generator/api/src/test/java/io/fabric8/crd/generator/CRDGeneratorTest.java b/crd-generator/api/src/test/java/io/fabric8/crd/generator/CRDGeneratorTest.java index <HASH>..<HASH> 100644 --- a/crd-generator/api/src/test/java/io/fabric8/crd/generator/CRDGeneratorTest.java +++ b/crd-generator/api/src/test/java/io/fabric8/crd/generator/CRDGeneratorTest.java @@ -51,6 +51,8 @@ public class CRDGeneratorTest { assertNotNull(definition); CustomResourceDefinitionSpec spec = definition.getSpec(); CustomResourceDefinitionNames names = spec.getNames(); + + assertEquals("apiextensions.k8s.io/v1", definition.getApiVersion()); assertEquals("Basic", names.getKind()); assertEquals("basics", names.getPlural()); assertEquals("Namespaced", spec.getScope());
test: assert the crd apiVersion used (cherry picked from commit <I>f5ace<I>c<I>dd<I>f4bb<I>accbc7e)
fabric8io_kubernetes-client
train
java
9f4c7c1ae203f8dc6ae33918bec3d3d5e190c250
diff --git a/src/java/com/threerings/media/sound/SoundManager.java b/src/java/com/threerings/media/sound/SoundManager.java index <HASH>..<HASH> 100644 --- a/src/java/com/threerings/media/sound/SoundManager.java +++ b/src/java/com/threerings/media/sound/SoundManager.java @@ -885,8 +885,8 @@ public class SoundManager this(cmd, pkgPath, key); stamp = System.currentTimeMillis() + delay; - this.volume = volume; - this.pan = pan; + setVolume(volume); + setPan(pan); } // documentation inherited from interface Frob
Use setPan() in the SoundKey constructor so that we bound to sanity the pan value passed to us. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@<I> <I>f4-<I>e9-<I>-aa3c-eee0fc<I>fb1
threerings_narya
train
java
17a57d19da9385cb5d61ed6d567cf5692ec3e7cc
diff --git a/app/models/mongoid_shortener/shortened_url.rb b/app/models/mongoid_shortener/shortened_url.rb index <HASH>..<HASH> 100644 --- a/app/models/mongoid_shortener/shortened_url.rb +++ b/app/models/mongoid_shortener/shortened_url.rb @@ -7,8 +7,8 @@ module MongoidShortener field :unique_key, :type => String field :use_count, :type => Integer, :default => 0 - index :url, :unique => true - index :unique_key, :unique => true + index({ url: 1 }, { unique: true }) + index({ unique_key: 1 }, { unique: true }) URL_PROTOCOL_HTTP = "http://"
update to support mongoid3.
siong1987_mongoid_shortener
train
rb
c44b538aa42a1f0a7445d33a45e0b50064f52206
diff --git a/representatives/management/commands/import_representatives_no_preserve.py b/representatives/management/commands/import_representatives_no_preserve.py index <HASH>..<HASH> 100644 --- a/representatives/management/commands/import_representatives_no_preserve.py +++ b/representatives/management/commands/import_representatives_no_preserve.py @@ -51,7 +51,7 @@ class Command(BaseCommand): for address in reps["contact"]["address"]: country = Country.objects.filter(code=address["country"]["code"]) if not country: - Country.objects.create( + country = Country.objects.create( name=address["country"]["name"], code=address["country"]["code"] )
[fix] didn't reassigned newly created country
political-memory_django-representatives
train
py
65e92799bef5c20299dd43cc105c597e199df9a2
diff --git a/src/ResourceBuilder.php b/src/ResourceBuilder.php index <HASH>..<HASH> 100644 --- a/src/ResourceBuilder.php +++ b/src/ResourceBuilder.php @@ -58,15 +58,17 @@ class ResourceBuilder return new Space($data['name'], $metadata, $locales, $defaultLocale); case 'Entry': $fields = []; - foreach ($data['fields'] as $name => $fieldData) { - if ($this->isResourceData($fieldData)) { - $fields[$name] = $this->buildFromData($fieldData); - } elseif ($this->isArrayResourceData($fieldData)) { - $fields[$name] = array_map(function ($itemData) { - return $this->buildFromData($itemData); - }, $fieldData); - } else { - $fields[$name] = $fieldData; + if (isset($data['fields'])) { + foreach ($data['fields'] as $name => $fieldData) { + if ($this->isResourceData($fieldData)) { + $fields[$name] = $this->buildFromData($fieldData); + } elseif ($this->isArrayResourceData($fieldData)) { + $fields[$name] = array_map(function ($itemData) { + return $this->buildFromData($itemData); + }, $fieldData); + } else { + $fields[$name] = $fieldData; + } } } $entry = new Entry($fields, $metadata);
handle lack of fields data for an entry (could be case if preview API being accessed)
usemarkup_contentful
train
php
7d6276ff623a29ca63c8bb3eb3255c660646aa46
diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java b/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java index <HASH>..<HASH> 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java @@ -605,14 +605,14 @@ public final class ConsensusModule implements AutoCloseable public static final int ERROR_BUFFER_LENGTH_DEFAULT = 1024 * 1024; /** - * Timeout waiting for follower termination by leader. + * Timeout a leader will wait on getting termination acks from followers. */ public static final String TERMINATION_TIMEOUT_PROP_NAME = "aeron.cluster.termination.timeout"; /** - * Timeout waiting for follower termination by leader default value. + * Default timeout a leader will wait on getting termination acks from followers. */ - public static final long TERMINATION_TIMEOUT_DEFAULT_NS = TimeUnit.SECONDS.toNanos(5); + public static final long TERMINATION_TIMEOUT_DEFAULT_NS = TimeUnit.SECONDS.toNanos(10); /** * Resolution in nanoseconds for each tick of the timer wheel for scheduling deadlines.
[Java] Increase default cluster termination timeout.
real-logic_aeron
train
java
9a4bdbcd6e34776a85877893903418e597d666d4
diff --git a/lib/validates_formatting_of/version.rb b/lib/validates_formatting_of/version.rb index <HASH>..<HASH> 100644 --- a/lib/validates_formatting_of/version.rb +++ b/lib/validates_formatting_of/version.rb @@ -1,3 +1,3 @@ module ValidatesFormattingOf - VERSION = "0.3.4" + VERSION = "0.3.5" end
Testing on <I>.alpha
mdespuits_validates_formatting_of
train
rb
256917edc574a8e992ca998b81cc938e65ba45fd
diff --git a/examples/player/player.js b/examples/player/player.js index <HASH>..<HASH> 100644 --- a/examples/player/player.js +++ b/examples/player/player.js @@ -79,7 +79,7 @@ Player.prototype = { // Stop the wave animation. wave.container.style.display = 'none'; bar.style.display = 'block'; - self.skip('right'); + self.skip('next'); }, onpause: function() { // Stop the wave animation.
Fix typo Since it's call skip('next'), it's better to use the same wording
goldfire_howler.js
train
js
cf6704b9ef1a889b037ae384a6c0d184e877cd7c
diff --git a/pysparkling/sql/expressions/expressions.py b/pysparkling/sql/expressions/expressions.py index <HASH>..<HASH> 100644 --- a/pysparkling/sql/expressions/expressions.py +++ b/pysparkling/sql/expressions/expressions.py @@ -148,3 +148,20 @@ class UnaryExpression(Expression): def __str__(self): raise NotImplementedError + + +class BinaryOperation(Expression): + """ + Perform a binary operation but return None if any value is None + """ + + def __init__(self, arg1, arg2): + super(BinaryOperation, self).__init__(arg1, arg2) + self.arg1 = arg1 + self.arg2 = arg2 + + def eval(self, row, schema): + raise NotImplementedError + + def __str__(self): + raise NotImplementedError
Add a BinaryOperation class
svenkreiss_pysparkling
train
py
53b01e206986925cf35a1382658ce9bbdc59a2b4
diff --git a/lib/connection.js b/lib/connection.js index <HASH>..<HASH> 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -61,7 +61,7 @@ Connection.prototype = { }).then(function() { _this._log('closing connection'); _this._connection.end(); - return [0, stdout, stderr]; + return [stdout, stderr]; }); }, @@ -116,11 +116,11 @@ MockConnection.prototype.exec = function exec(commands) { return Bluebird.resolve(commandOptions.code || 0); } else { - return [0, '', '']; + return ['', '']; } }) .then(function() { - return [0, stdout, stderr]; + return [stdout, stderr]; }); }; module.exports.MockConnection = MockConnection;
Remove reference to exit codes in resolves of successful operations
relekang_promised-ssh
train
js
e20b59dae5b9e484bb22cfa30082fc183cbd9a41
diff --git a/tests/_support/Helper/Functional.php b/tests/_support/Helper/Functional.php index <HASH>..<HASH> 100644 --- a/tests/_support/Helper/Functional.php +++ b/tests/_support/Helper/Functional.php @@ -50,7 +50,9 @@ class Functional extends \Codeception\Module { { $this->getModule('Laravel5') ->haveApplicationHandler(function ($app) use ($closure) { - addMultiLanguageRoutes($closure); + addMultiLanguageRoutes([ + 'domain' => config('gzero.domain') + ], $closure); }); } @@ -61,7 +63,9 @@ class Functional extends \Codeception\Module { { $this->getModule('Laravel5') ->haveApplicationHandler(function ($app) use ($closure) { - addRoutes($closure); + addRoutes([ + 'domain' => config('gzero.domain') + ], $closure); }); }
default domain in the helper for creating test routes It solves the problem of the test route being overlapped by another route defined with specific domain in tested platform
GrupaZero_core
train
php
a94e1daa69ea04c6ecd3b9be011285827ed785ba
diff --git a/pyxmpp2/streamtls.py b/pyxmpp2/streamtls.py index <HASH>..<HASH> 100644 --- a/pyxmpp2/streamtls.py +++ b/pyxmpp2/streamtls.py @@ -112,7 +112,10 @@ class StreamTLSHandler(StreamFeatureHandler, EventHandler): raise TLSNegotiationFailed("StartTLS required," " but not supported by peer") return None - required = element.find(REQUIRED_TAG) is not None + if len(features) == 1: + required = True + else: + required = element.find(REQUIRED_TAG) is not None if stream.tls_established: logger.warning("StartTLS offerred when already established") return StreamFeatureNotHandled("StartTLS", mandatory = required)
consider TLS required when it is the only feature
Jajcus_pyxmpp2
train
py
c68f2daf4751e0547743b207aa8e07b4df0759ab
diff --git a/sos/plugins/opendaylight.py b/sos/plugins/opendaylight.py index <HASH>..<HASH> 100644 --- a/sos/plugins/opendaylight.py +++ b/sos/plugins/opendaylight.py @@ -22,7 +22,7 @@ class OpenDaylight(Plugin, RedHatPlugin): plugin_name = 'opendaylight' profiles = ('openstack', 'openstack_controller') - packages = ('opendaylight',) + packages = ('opendaylight', 'puppet-opendaylight') def setup(self): self.add_copy_spec("/opt/opendaylight/etc/")
[opendaylight] Enable plugin by puppet-opendaylight package Required for ODL running in a container. Resolves: #<I>
sosreport_sos
train
py
c5918809bcdb86b772d09e48e2f4ed002a4508b6
diff --git a/lib/webaccessadmin_lib.py b/lib/webaccessadmin_lib.py index <HASH>..<HASH> 100644 --- a/lib/webaccessadmin_lib.py +++ b/lib/webaccessadmin_lib.py @@ -311,8 +311,8 @@ def perform_resetdefaultsettings(req, superusers=[], confirm=0): to connect to <strong>%s</strong>.<br> enter as many e-mail adresses you want and press <strong>reset</strong>.<br> <strong>confirm reset settings</strong> when you have added enough e-mails.<br> - <strong><SUPPORTEMAIL></strong> is added as default. - </p>""" % (SUPERADMINROLE, ) + <strong>%s</strong> is added as default. + </p>""" % (SUPERADMINROLE, supportemail) # add more superusers output += """ @@ -390,8 +390,8 @@ def perform_adddefaultsettings(req, superusers=[], confirm=0): to connect to <strong>%s</strong>.<br> enter as many e-mail adresses you want and press <strong>add</strong>.<br> <strong>confirm add settings</strong> when you have added enough e-mails.<br> - <strong><SUPPORTEMAIL></strong> is added as default. - </p>""" % (SUPERADMINROLE, ) + <strong>%s</strong> is added as default. + </p>""" % (SUPERADMINROLE, supportemail) # add more superusers output += """
Replaced <SUPPORTEMAIL> WML variable by its Pythonic equivalent.
inveniosoftware_invenio-access
train
py
8158f1eb1a4bd14a4b20b26bb68a132ca7e48dc6
diff --git a/pelix/misc/xmpp.py b/pelix/misc/xmpp.py index <HASH>..<HASH> 100644 --- a/pelix/misc/xmpp.py +++ b/pelix/misc/xmpp.py @@ -85,9 +85,6 @@ class BasicBot(sleekxmpp.ClientXMPP): :param use_ssl: Server connection is encrypted :return: True if connection succeeded """ - # FIXME: see why TLS and SSL don't work with an OpenFire server - self['feature_mechanisms'].unencrypted_plain = True - # Try to connect if super(BasicBot, self).connect((host, port), reattempt, use_tls, use_ssl):
Plain login doesn't seem necessary anymore
tcalmant_ipopo
train
py
4335aa296e09d9a0329af7231bb241e8585d193c
diff --git a/lib/dml/pgsql_native_moodle_database.php b/lib/dml/pgsql_native_moodle_database.php index <HASH>..<HASH> 100644 --- a/lib/dml/pgsql_native_moodle_database.php +++ b/lib/dml/pgsql_native_moodle_database.php @@ -623,6 +623,9 @@ class pgsql_native_moodle_database extends moodle_database { if ($limitfrom or $limitnum) { if ($limitnum < 1) { $limitnum = "ALL"; + } else if (PHP_INT_MAX - $limitnum < $limitfrom) { + // this is a workaround for weird max int problem + $limitnum = "ALL"; } $sql .= " LIMIT $limitnum OFFSET $limitfrom"; } @@ -662,6 +665,9 @@ class pgsql_native_moodle_database extends moodle_database { if ($limitfrom or $limitnum) { if ($limitnum < 1) { $limitnum = "ALL"; + } else if (PHP_INT_MAX - $limitnum < $limitfrom) { + // this is a workaround for weird max int problem + $limitnum = "ALL"; } $sql .= " LIMIT $limitnum OFFSET $limitfrom"; }
MDL-<I> ugly workaround for PHP int size limitation in query limits It looks like the pg driver or database is internally overflowing at least on my <I>bit test setup, I think we can safely return all results when from + num is over our max PHP integer.
moodle_moodle
train
php
dad1750dfa657d2ad585cf058baff8a382825900
diff --git a/src/Symfony/Bridge/Twig/Tests/TestCase.php b/src/Symfony/Bridge/Twig/Tests/TestCase.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Bridge/Twig/Tests/TestCase.php +++ b/src/Symfony/Bridge/Twig/Tests/TestCase.php @@ -11,7 +11,7 @@ namespace Symfony\Bridge\Twig\Tests; -class TestCase extends \PHPUnit_Framework_TestCase +abstract class TestCase extends \PHPUnit_Framework_TestCase { protected function setUp() {
[TwigBridge] updated TestCase as an abstract class
symfony_symfony
train
php
4becd428cea00bb15999d004f0a820053e5e15d0
diff --git a/pycbc/workflow/core.py b/pycbc/workflow/core.py index <HASH>..<HASH> 100644 --- a/pycbc/workflow/core.py +++ b/pycbc/workflow/core.py @@ -199,7 +199,7 @@ class Executable(pegasus_workflow.Executable): "at %s" % (name, exe_path)) if exe_path.startswith('gsiftp://'): - self.add_pfn(exe_path,site='pycbc-code') + self.add_pfn(exe_path, site='nonlocal') else: self.add_pfn(exe_path)
Change to nonlocal for symmetry with other uses
gwastro_pycbc
train
py
488ac02ced305f8887573319d755417a500c68d0
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ var assign = require('object-assign'); hexo.config.tag_generator = assign({ - per_page: hexo.config.per_page || 10 + per_page: typeof hexo.config.per_page === "undefined" ? 10 : hexo.config.per_page }, hexo.config.tag_generator); hexo.extend.generator.register('tag', require('./lib/generator')); \ No newline at end of file
Allow users to set the per_page option to 0
hexojs_hexo-generator-tag
train
js
265026d73d07cd52c55719c094cfc3561be76802
diff --git a/core/server/services/notifications/notifications.js b/core/server/services/notifications/notifications.js index <HASH>..<HASH> 100644 --- a/core/server/services/notifications/notifications.js +++ b/core/server/services/notifications/notifications.js @@ -6,6 +6,14 @@ const errors = require('@tryghost/errors'); const ObjectId = require('bson-objectid'); class Notifications { + /** + * + * @param {Object} options + * @param {Object} options.settingsCache - settings cache instance + * @param {Object} options.i18n - i18n instance + * @param {Object} options.ghostVersion + * @param {String} options.ghostVersion.full - Ghost instance version in "full" format - major.minor.patch + */ constructor({settingsCache, i18n, ghostVersion}) { this.settingsCache = settingsCache; this.i18n = i18n;
Added JSDoc to notifications service's constructor refs <URL>
TryGhost_Ghost
train
js
1b2c20dfd80c14920c889cdb01b827dee9c439d5
diff --git a/src/project.js b/src/project.js index <HASH>..<HASH> 100644 --- a/src/project.js +++ b/src/project.js @@ -26,8 +26,8 @@ var Project = function(prjDir) { FS.writeFileSync( configFile, "{\n" - + " 'name': '" + Path.basename(this._prjDir) + "',\n" - + " 'version': '0.0.0'\n}" + + ' "name": "' + Path.basename(this._prjDir) + '",\n' + + ' "version": "0.0.0"\n}' ); } var cfg;
Added TGD (aka ToloGameDev) library.
tolokoban_ToloFrameWork
train
js
55663fe4c1fc5de9fb0dcc1bebeeb95878736656
diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index <HASH>..<HASH> 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -32,7 +32,11 @@ if ( file_exists( __DIR__ . '/utils.php' ) ) { require_once __DIR__ . '/../../php/utils.php'; require_once __DIR__ . '/../../php/WP_CLI/Process.php'; require_once __DIR__ . '/../../php/WP_CLI/ProcessRun.php'; - require_once __DIR__ . '/../../vendor/autoload.php'; + if ( file_exists( __DIR__ . '/../../vendor/autoload.php' ) ) { + require_once __DIR__ . '/../../vendor/autoload.php'; + } else if ( file_exists( __DIR__ . '/../../../../autoload.php' ) ) { + require_once __DIR__ . '/../../../../autoload.php'; + } } /**
Adapt Behat bootstrap paths to allow for `wp-cli/wp-cli` to be dependency.
wp-cli_wp-cli
train
php
3880e9ceeb40a85ecd1ef707105a7d72ef272aac
diff --git a/tests/Behat/Tests/Definition/Pattern/PatternTransformerTest.php b/tests/Behat/Tests/Definition/Pattern/PatternTransformerTest.php index <HASH>..<HASH> 100644 --- a/tests/Behat/Tests/Definition/Pattern/PatternTransformerTest.php +++ b/tests/Behat/Tests/Definition/Pattern/PatternTransformerTest.php @@ -68,8 +68,6 @@ class PatternTransformerTest extends TestCase public function testTransformPatternToRegexNoMatch() { - $this->expectException('\Behat\Behat\Definition\Exception\UnknownPatternException'); - $this->expectExceptionMessage("Can not find policy for a pattern `hello world`."); // first pattern $policy1Prophecy = $this->prophesize('Behat\Behat\Definition\Pattern\Policy\PatternPolicy'); $policy1Prophecy->supportsPattern('hello world')->willReturn(false); @@ -79,6 +77,8 @@ class PatternTransformerTest extends TestCase $testedInstance = new PatternTransformer(); $testedInstance->registerPatternPolicy($policy1Prophecy->reveal()); + $this->expectException('\Behat\Behat\Definition\Exception\UnknownPatternException'); + $this->expectExceptionMessage("Can not find policy for a pattern `hello world`."); $regex = $testedInstance->transformPatternToRegex('hello world'); } }
Move expectException to just above where the exception is expected
Behat_Behat
train
php
25dceb9d3a0218cfa89fa4a72b6c929435e0cba9
diff --git a/src/common/storage/client.js b/src/common/storage/client.js index <HASH>..<HASH> 100644 --- a/src/common/storage/client.js +++ b/src/common/storage/client.js @@ -188,7 +188,7 @@ define([ "util/assert", "util/guid" ], function (ASSERT, GUID) { if (options.type === 'browser') { require([ _hostAddress + "/socket.io/socket.io.js" ], function (io) { - IO = io; + IO = io || window.io; IOReady(); }); } else {
Under some circumstances, socket.io client doesn't know it is being loaded by requirejs. Workaround by looking for window.io also Former-commit-id: ba<I>cb<I>f<I>a<I>df<I>e<I>df
webgme_webgme-engine
train
js
bad3a223dbc0bf4ec5adb9f18de51418d4d1ff2f
diff --git a/tensorlayer/layers/core.py b/tensorlayer/layers/core.py index <HASH>..<HASH> 100644 --- a/tensorlayer/layers/core.py +++ b/tensorlayer/layers/core.py @@ -512,6 +512,8 @@ class ModelLayer(Layer): # Layer weight state self._all_weights = model.all_weights + self._trainable_weights = model.trainable_weights + self._nontrainable_weights = model.nontrainable_weights # Layer training state self.is_train = True
[fix bug] copy original model's trainable_weights and nontrainable_weights when initializing ModelLayer
tensorlayer_tensorlayer
train
py
a0b39e15d883decd916a2d1b4b67d29f503a3a7a
diff --git a/lib/excon/connection.rb b/lib/excon/connection.rb index <HASH>..<HASH> 100644 --- a/lib/excon/connection.rb +++ b/lib/excon/connection.rb @@ -175,7 +175,7 @@ module Excon request << HTTP_1_1 # calculate content length and set to handle non-ascii - unless params[:headers].has_key?('Content-Length') + unless params[:headers].has_key?('Content-Length') || (params[:method].to_s.upcase == "GET" && params[:body].to_s.empty?) params[:headers]['Content-Length'] = case params[:body] when File params[:body].binmode
Content-Length for GET requests with an empty body Is zero. Even though the HTTP spec doesn't forbid sending a body in a GET request, it's generally not reccomended to send a body via GET. Some servers behave oddly with a Content-Length of 0 on a GET request since it seems there are realted security vulnerabilities (IIS, I believe).
excon_excon
train
rb
7892bdb81866a1c154b545396cb78962b532c018
diff --git a/test/plugin_helper/test_inject.rb b/test/plugin_helper/test_inject.rb index <HASH>..<HASH> 100644 --- a/test/plugin_helper/test_inject.rb +++ b/test/plugin_helper/test_inject.rb @@ -93,7 +93,7 @@ class InjectHelperTest < Test::Unit::TestCase assert_not_nil @d.instance_eval{ @_inject_time_formatter } end - sub_test_case 'using inject_record' do + sub_test_case 'using inject_values_to_record' do test 'injects hostname automatically detected' do detected_hostname = `hostname`.chomp @d.configure(config_inject_section("hostname_key" => "host")) @@ -222,7 +222,7 @@ class InjectHelperTest < Test::Unit::TestCase assert_equal record.merge(injected), @d.inject_values_to_record('tag', time, record) end end - sub_test_case 'using inject_event_stream' do + sub_test_case 'using inject_values_to_event_stream' do local_timezone = Time.now.strftime('%z') time_in_unix = Time.parse("2016-06-21 08:10:11 #{local_timezone}").to_i time_subsecond = 320_101_224
fix test subjects to use correct method name
fluent_fluentd
train
rb
ef5d6c92369cd0827b02063942b433ab20f4dfd8
diff --git a/lib/octokit/client/pull_requests.rb b/lib/octokit/client/pull_requests.rb index <HASH>..<HASH> 100644 --- a/lib/octokit/client/pull_requests.rb +++ b/lib/octokit/client/pull_requests.rb @@ -254,6 +254,7 @@ module Octokit # @param repo [String, Hash, Repository] A GitHub repository # @param comment_id [Integer] Id of the comment to delete # @return [Boolean] True if deleted, false otherwise + # @see http://developer.github.com/v3/pulls/comments/#delete-a-comment # @example # @client.delete_pull_request_comment("octokit/octokit.rb", 1902707) def delete_pull_request_comment(repo, comment_id, options = {})
Add doc url for #delete_pull_request_comment [ci skip]
octokit_octokit.rb
train
rb
1ae3ce38ef90d213d27fea04b8af17ee5eb98f57
diff --git a/src/main/java/org/jbpm/designer/bpmn2/impl/Bpmn2JsonUnmarshaller.java b/src/main/java/org/jbpm/designer/bpmn2/impl/Bpmn2JsonUnmarshaller.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jbpm/designer/bpmn2/impl/Bpmn2JsonUnmarshaller.java +++ b/src/main/java/org/jbpm/designer/bpmn2/impl/Bpmn2JsonUnmarshaller.java @@ -927,6 +927,7 @@ public class Bpmn2JsonUnmarshaller { itemdef.setId("_" + din.getId() + "Item"); itemdef.setStructureRef(dinType); toAddItemDefinitions.add(itemdef); + din.setItemSubjectRef(itemdef); } } } @@ -946,6 +947,7 @@ public class Bpmn2JsonUnmarshaller { itemdef.setId("_" + dout.getId() + "Item"); itemdef.setStructureRef(doutType); toAddItemDefinitions.add(itemdef); + dout.setItemSubjectRef(itemdef); } } }
associate itemdefinition with data input/output
kiegroup_jbpm-designer
train
java
18b30e15476e01487b444f53befeb86a8b4e125e
diff --git a/xurls_test.go b/xurls_test.go index <HASH>..<HASH> 100644 --- a/xurls_test.go +++ b/xurls_test.go @@ -7,23 +7,6 @@ import ( "testing" ) -func TestReverseJoin(t *testing.T) { - for _, c := range [...]struct { - in []string - inSep string - want string - }{ - {[]string{`a`, `b`, `c`}, `.`, `c.b.a`}, - {[]string{`1`, `22`, `333`}, `,`, `333,22,1`}, - {[]string{`xxx`, `yyy`, `zzz`}, `__`, `zzz__yyy__xxx`}, - } { - got := reverseJoin(c.in, c.inSep) - if got != c.want { - t.Errorf(`reverseJoin(%v) got "%s", want "%s"`, c.in, got, c.want) - } - } -} - func TestWebURL(t *testing.T) { for _, c := range [...]struct { in string
Remove reverseJoin testing since it's gone
mvdan_xurls
train
go
33fb39454dcae2895e6ce840d9243a7e14410b70
diff --git a/spec/javascripts/components/show-password-spec.js b/spec/javascripts/components/show-password-spec.js index <HASH>..<HASH> 100644 --- a/spec/javascripts/components/show-password-spec.js +++ b/spec/javascripts/components/show-password-spec.js @@ -27,6 +27,7 @@ describe('A show password component', function () { expect(element.find('.gem-c-show-password__toggle').length).toBe(1) expect(element.find('.gem-c-show-password__toggle').text()).toBe('Show') expect(element.find('.gem-c-show-password__toggle').attr('aria-controls')).toBe('input') + expect(element.find('.gem-c-show-password__toggle').attr('type')).toBe('button') expect(element.find('.govuk-visually-hidden').length).toBe(1) expect(element.find('.govuk-visually-hidden').text()).toBe('Your password is hidden') })
Update show password component tests Update show password components spec to check that the type for toggle button is "button". Following on from this PR where I implemented the change and forgot to uodate the test as well: <URL>
alphagov_govuk_publishing_components
train
js
91c3626aac0307a006daf4ba30d3e040279f9733
diff --git a/services/time/time.js b/services/time/time.js index <HASH>..<HASH> 100644 --- a/services/time/time.js +++ b/services/time/time.js @@ -1,6 +1,6 @@ 'use strict'; -const BaseService = require('../base'); +const { BaseService } = require('../base'); module.exports = class Time extends BaseService {
Fix time service (#<I>)
badges_shields
train
js
c432f50ae08ce37b9d3c7e59757fe10d7d5ee31f
diff --git a/sysfs/i2c_device.go b/sysfs/i2c_device.go index <HASH>..<HASH> 100644 --- a/sysfs/i2c_device.go +++ b/sysfs/i2c_device.go @@ -94,12 +94,17 @@ func (d *i2cDevice) Read(b []byte) (n int, err error) { return d.file.Read(b) } - data := make([]byte, len(b)+1) - data[0] = byte(len(b)) + // Command byte - a data byte which often selects a register on the device: + // https://www.kernel.org/doc/Documentation/i2c/smbus-protocol + command := byte(b[0]) + buf := b[1:] + data := make([]byte, len(buf)+1) + data[0] = byte(len(buf)) + copy(data[1:], buf) smbus := &i2cSmbusIoctlData{ readWrite: I2C_SMBUS_READ, - command: 0, + command: command, size: I2C_SMBUS_I2C_BLOCK_DATA, data: uintptr(unsafe.Pointer(&data[0])), }
sysfs: Should fix #<I> by using first byte of data as command register for I2C reads
hybridgroup_gobot
train
go
621c8d289ef6a78eaa38eb77b12692c8c684c974
diff --git a/test/add_reference_test.rb b/test/add_reference_test.rb index <HASH>..<HASH> 100644 --- a/test/add_reference_test.rb +++ b/test/add_reference_test.rb @@ -1,32 +1,32 @@ require_relative "test_helper" class AddReferenceTest < Minitest::Test - def test_add_reference + def test_basic skip unless postgresql? assert_unsafe AddReference end - def test_add_reference_polymorphic + def test_polymorphic skip unless postgresql? assert_unsafe AddReferencePolymorphic end - def test_add_reference_no_index + def test_no_index skip unless postgresql? assert_safe AddReferenceNoIndex end - def test_add_reference_default + def test_default skip unless postgresql? assert_unsafe AddReferenceDefault end - def test_add_reference_concurrently + def test_concurrently skip unless postgresql? assert_safe AddReferenceConcurrently end - def test_add_reference_foreign_key + def test_foreign_key skip unless postgresql? assert_unsafe AddReferenceForeignKey, /Then add the foreign key/ end
Improved test names [skip ci]
ankane_strong_migrations
train
rb
c39f74bcc68cdac100acb44d4517a06b6fb389bf
diff --git a/core/html.js b/core/html.js index <HASH>..<HASH> 100644 --- a/core/html.js +++ b/core/html.js @@ -139,7 +139,7 @@ exports.Element.prototype.updateStyle = function() { } exports.Element.prototype.append = function(el) { - this.dom.appendChild(el.dom) + this.dom.appendChild((el instanceof Node)? el: el.dom) } exports.Element.prototype.remove = function() {
if append's argument was Node, bypass it to appendChild
pureqml_qmlcore
train
js
02705211936efe01a33ad50ae137b6f8aea0ad37
diff --git a/package.php b/package.php index <HASH>..<HASH> 100644 --- a/package.php +++ b/package.php @@ -4,7 +4,7 @@ require_once 'PEAR/PackageFileManager2.php'; -$version = '1.4.82'; +$version = '1.4.83'; $notes = <<<EOT No release notes for you! EOT;
prepare for release of <I> svn commit r<I>
silverorange_swat
train
php
43956dd8addb7c28953a018b892647904d3eb3da
diff --git a/spec/dancer.js b/spec/dancer.js index <HASH>..<HASH> 100644 --- a/spec/dancer.js +++ b/spec/dancer.js @@ -379,7 +379,7 @@ describe('Dancer', function () { var webAudio = window.webkitAudioContext || window.AudioContext, audioData = window.Audio && (new window.Audio()).mozSetup && window.Audio, _audio = webAudio || audioData, - type = webAudio ? 'audioContext' : 'Audio'; + type = webAudio ? 'AudioContext' : 'Audio'; expect(!!(webAudio || audioData)).toEqual(Dancer.isSupported()); window.webkitAudioContext = window.AudioContext = window.Audio = false;
Use correct method AudioContext() for future Web Audio API implementations, spec
jsantell_dancer.js
train
js
1580b9f7802cb5f20d177c1f7c70105e487e6ac7
diff --git a/spec/integration/cli_stemcell_spec.rb b/spec/integration/cli_stemcell_spec.rb index <HASH>..<HASH> 100644 --- a/spec/integration/cli_stemcell_spec.rb +++ b/spec/integration/cli_stemcell_spec.rb @@ -212,11 +212,8 @@ describe 'cli: stemcell', type: :integration do context 'when NOT using the --skip-if-exists flag' do it 'tells the user and does exit as a failure' do - _, exit_code = bosh_runner.run("upload stemcell #{stemcell_url}", { - failure_expected: true, - return_exit_code: true, - }) - expect(exit_code).to eq(1) + output = bosh_runner.run("upload stemcell #{stemcell_url}") + expect(output).to_not include("Uploading stemcell") end end
Fix stemcell upload expectations in ruby CLI Broken by <I>feb<I>a4caa<I>dc6f6aafe<I>d8c7f1dc0 [#<I>](<URL>)
cloudfoundry_bosh
train
rb
ba2abf951759fbcec82d7e7d851467428aaec79c
diff --git a/hotdoc/core/tree.py b/hotdoc/core/tree.py index <HASH>..<HASH> 100644 --- a/hotdoc/core/tree.py +++ b/hotdoc/core/tree.py @@ -25,7 +25,7 @@ import io import re import os from urllib.parse import urlparse -import pickle as pickle +import pickle from collections import namedtuple, defaultdict, OrderedDict # pylint: disable=import-error @@ -88,7 +88,7 @@ Logger.register_warning_code('markdown-bad-link', HotdocSourceException) # pylint: disable=too-many-instance-attributes -class Page(object): +class Page: "Banana banana" meta_schema = {Optional('title'): And(str, len), Optional('symbols'): Schema([And(str, len)]), @@ -363,7 +363,7 @@ class Page(object): # pylint: disable=too-many-instance-attributes -class Tree(object): +class Tree: "Banana banana" def __init__(self, project, app):
tree: fix lint and pep8
hotdoc_hotdoc
train
py
cc9ee2cc37ed0c7a7f9b0c50cf5edca63e289e1a
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java index <HASH>..<HASH> 100755 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java @@ -987,6 +987,7 @@ public class ExecutionGraph implements Serializable { } // clear the non-serializable fields + restartStrategy = null; scheduler = null; checkpointCoordinator = null; executionContext = null;
[hotfix] [execution graph] Null restart strategy field in ExecutionGraph when archiving
apache_flink
train
java
a744ad091b2cf7b9442fedf9776a9c6543ee9658
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index <HASH>..<HASH> 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,9 +1,6 @@ Rails.application.config.assets.precompile += %w( govuk_publishing_components/vendor/modernizr.js govuk_publishing_components/component_guide.css - component_guide/all_components.css - component_guide/all_components_print.css - component_guide/no_slimmer.js govuk_publishing_components/search-button.png govuk_publishing_components/favicon-development.png govuk_publishing_components/favicon-integration.png
Remove unnecessary precompiles for assets These files don't need to be available separately.
alphagov_govuk_publishing_components
train
rb
07d2743e763d0f3a63fcab899ccb7daa872cec9d
diff --git a/peri/__init__.py b/peri/__init__.py index <HASH>..<HASH> 100644 --- a/peri/__init__.py +++ b/peri/__init__.py @@ -11,4 +11,5 @@ try: except ImportError as e: pass -__version__ = "0.1.1" +import pkg_resources +__version__ = pkg_resources.require("peri")[0].version diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ from distutils.core import setup #from setuptools import setup -# import peri desc = open('./README.md').read() reqs = open('./requirements.txt').readlines() @@ -9,7 +8,7 @@ setup(name='peri', url='http://github.com/mattbierbaum/peri/', license='MIT License', author='Matt Bierbaum, Brian Leahy', - version='0.1.1', #peri.__version__, + version='0.1.1', packages=[ 'peri', 'peri.mc', 'peri.comp', 'peri.viz',
fixing version issue with setup.py / __init__.py
peri-source_peri
train
py,py
24cde80f6a60039724154e92f2d57620f3087d3a
diff --git a/src/Rammbock/message.py b/src/Rammbock/message.py index <HASH>..<HASH> 100644 --- a/src/Rammbock/message.py +++ b/src/Rammbock/message.py @@ -221,7 +221,7 @@ class Field(object): @property def chars(self): - return str(self._value) + return self._value @property def bin(self):
fix returning value on binary chars. Chars dont need to be ascii
robotframework_Rammbock
train
py
5b5bd2e8e8d79850ba9d65db02b20d112308ff35
diff --git a/Common/Model/Notify.php b/Common/Model/Notify.php index <HASH>..<HASH> 100644 --- a/Common/Model/Notify.php +++ b/Common/Model/Notify.php @@ -100,6 +100,12 @@ class Notify private $includeView; /** + * (For supplier order) + * @var bool + */ + private $includeForm; + + /** * @var string */ private $report; @@ -697,13 +703,37 @@ class Notify /** * Sets the include view. * - * @param string $includeView + * @param string $include + * + * @return Notify + */ + public function setIncludeView($include) + { + $this->includeView = $include; + + return $this; + } + + /** + * Returns the includeForm. + * + * @return bool + */ + public function isIncludeForm() + { + return $this->includeForm; + } + + /** + * Sets the includeForm. + * + * @param bool $include * * @return Notify */ - public function setIncludeView($includeView) + public function setIncludeForm($include) { - $this->includeView = $includeView; + $this->includeForm = $include; return $this; }
[Commerce] Notify: added include form property.
ekyna_Commerce
train
php
7ae1d8f1d05af36ab299a56b8952e599e226a6f1
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -70,10 +70,10 @@ module.exports = Adapter => class MongodbAdapter extends Adapter { if ('match' in options) // check for or operator - if ( 'or' in options.match ){ + if ( 'or' in options.match ) { for (const key in options.match.or ) { - let q = {}; - q[key] = options.match.or[key]; + const q = {} + q[key] = options.match.or[key] query.$or.push( q ) } }
fixes linting issues to pass travis build
fortunejs_fortune-mongodb
train
js
0ea8dc0886c52df96aeccc46dc2b5238fc46940e
diff --git a/tests/unit/Specification/InPathTest.php b/tests/unit/Specification/InPathTest.php index <HASH>..<HASH> 100644 --- a/tests/unit/Specification/InPathTest.php +++ b/tests/unit/Specification/InPathTest.php @@ -28,7 +28,14 @@ class InPathTest extends \PHPUnit_Framework_TestCase { $absolutePath = 'absolute/path/to/file.txt'; $spec = new InPath(new Path($absolutePath)); - $this->assertTrue($spec->isSatisfiedBy(['dirname' => $absolutePath])); + $this->assertTrue($spec->isSatisfiedBy([ + 'type' => 'file', + 'path' => $absolutePath, + 'dirname' => $absolutePath, + 'filename' => 'file', + 'extension' => 'txt', + 'basename' => 'file.txt' + ])); } protected function useWildcardPath()
fix location spec of exact file path
phpDocumentor_FlyFinder
train
php
565192916ba57c404e05d4eb328d2c8c23c5d937
diff --git a/jss/tools.py b/jss/tools.py index <HASH>..<HASH> 100644 --- a/jss/tools.py +++ b/jss/tools.py @@ -157,7 +157,7 @@ def element_str(elem): # deepcopy so we don't mess with the valid XML. pretty_data = copy.deepcopy(elem) indent_xml(pretty_data) - return ElementTree.tostring(pretty_data, encoding='unicode') + return ElementTree.tostring(pretty_data, encoding='UTF_8') def quote_and_encode(string):
'unicode' is not an encoding that ElementTree understands Switched this to 'UTF_8' as ElementTree returns errors otherwise
jssimporter_python-jss
train
py
057d814a9f82db1611f2a748cc58a37d2cf4fdb5
diff --git a/src/Attributes/UuidAttribute.php b/src/Attributes/UuidAttribute.php index <HASH>..<HASH> 100644 --- a/src/Attributes/UuidAttribute.php +++ b/src/Attributes/UuidAttribute.php @@ -15,6 +15,13 @@ class UuidAttribute extends TextAttribute protected $name = 'uuid'; /** + * Is the attribute fillable. + * + * @var bool + */ + protected $fillable = false; + + /** * Retrieve default value. * * @param \Railken\Lem\Contracts\EntityContract $entity
uuid not fillable
railken_lem
train
php
0f2e2db90d5a14382eafbdfebff74048a487372f
diff --git a/lib/puppet-lint/tasks/puppet-lint.rb b/lib/puppet-lint/tasks/puppet-lint.rb index <HASH>..<HASH> 100644 --- a/lib/puppet-lint/tasks/puppet-lint.rb +++ b/lib/puppet-lint/tasks/puppet-lint.rb @@ -49,6 +49,8 @@ class PuppetLint task_block.call(*[self, args].slice(0, task_block.arity)) if task_block + # clear any (auto-)pre-existing task + Rake::Task[@name].clear task @name do PuppetLint::OptParser.build
fix #<I> - clear any pre-(auto-)existing tasks Because we automatically create a lint task at the bottom of the file using a configuration block with the default name (:lint) would not work, as we would now have 2 instances of that RakeTask floating around. However, only the first - auto-generated - task is used. Which makes it impossible to configure any of the options for it.
rodjek_puppet-lint
train
rb
459633a9eedc3c715d350a85d91a5a7d31cc9312
diff --git a/src/main/java/com/arangodb/internal/velocystream/internal/VstConnection.java b/src/main/java/com/arangodb/internal/velocystream/internal/VstConnection.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/arangodb/internal/velocystream/internal/VstConnection.java +++ b/src/main/java/com/arangodb/internal/velocystream/internal/VstConnection.java @@ -83,7 +83,7 @@ public abstract class VstConnection implements Connection { this.sslContext = sslContext; this.messageStore = messageStore; - connectionName = "conenction_" + System.currentTimeMillis() + "_" + Math.random(); + connectionName = "connection_" + System.currentTimeMillis() + "_" + Math.random(); LOGGER.debug("Connection " + connectionName + " created"); }
Fixed typo in VstConnection. (#<I>)
arangodb_arangodb-java-driver
train
java
e3be3d65b30392eabd9479ac7f6edafc2dd2e30e
diff --git a/spacy/about.py b/spacy/about.py index <HASH>..<HASH> 100644 --- a/spacy/about.py +++ b/spacy/about.py @@ -3,7 +3,7 @@ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy' -__version__ = '2.0.9' +__version__ = '2.0.10.dev0' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython' __uri__ = 'https://spacy.io' __author__ = 'Explosion AI'
Version as <I>.dev0
explosion_spaCy
train
py
bd3598803d6202bcb867361dfd0fa37421d68c10
diff --git a/src/ScnSocialAuth/Controller/UserController.php b/src/ScnSocialAuth/Controller/UserController.php index <HASH>..<HASH> 100644 --- a/src/ScnSocialAuth/Controller/UserController.php +++ b/src/ScnSocialAuth/Controller/UserController.php @@ -2,6 +2,7 @@ namespace ScnSocialAuth\Controller; use Hybrid_Auth; +use Ign\User\Mapper\Exception; use ScnSocialAuth\Mapper\UserProviderInterface; use ScnSocialAuth\Options\ModuleOptions; use Zend\Mvc\Controller\AbstractActionController; @@ -59,7 +60,13 @@ class UserController extends AbstractActionController $userProfile = $adapter->getUserProfile(); $accessToken = $adapter->getAccessToken(); - $this->getMapper()->linkUserToProvider($localUser, $userProfile, $provider, $accessToken); + try { + $this->getMapper()->linkUserToProvider($localUser, $userProfile, $provider, $accessToken); + } catch (Exception\RuntimeException $e) { + $redirect = $this->params()->fromQuery('redirect', false); + + return $this->redirect()->toUrl($redirect . '?errorMessage=' . $e->getMessage()); + } $redirect = $this->params()->fromQuery('redirect', false);
Catch exception and return error message when attempting to link user to a provider
SocalNick_ScnSocialAuth
train
php
8a7be4fdcac34685757439f86fbd64bee6643cc8
diff --git a/web/app.php b/web/app.php index <HASH>..<HASH> 100644 --- a/web/app.php +++ b/web/app.php @@ -2,7 +2,6 @@ require_once __DIR__.'/../app/bootstrap.php.cache'; require_once __DIR__.'/../app/AppKernel.php'; -//require_once __DIR__.'/../app/bootstrap_cache.php.cache'; //require_once __DIR__.'/../app/AppCache.php'; use Symfony\Component\HttpFoundation\Request;
removed the bootstrap_cache as it's not needed anymore
symfony_symfony-standard
train
php
56c817917b939b51d68403e4672a146d80374354
diff --git a/db/seeds.rb b/db/seeds.rb index <HASH>..<HASH> 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -53,8 +53,8 @@ end # configure limited permissions for the anonymous user -Role.allow 'anonymous_role', [:create, :update], :ar_notices -Role.allow 'anonymous_role', [:create, :update], :ar_user_notices +Role.allow 'anonymous_role', [:create, :update], :notices +Role.allow 'anonymous_role', [:create, :update], :user_notices # TODO protection of all /api controllers (currently all roles authorized by default)
migrating anonymous_role to not user ar_
Katello_katello
train
rb
04aa1ad482a50d6154d2c4a01aabc40155d8cbfa
diff --git a/test/test_score_set.rb b/test/test_score_set.rb index <HASH>..<HASH> 100644 --- a/test/test_score_set.rb +++ b/test/test_score_set.rb @@ -91,4 +91,10 @@ class ScoreSetTest < Minitest::Test def test_compare_opr_dpr_ccwm assert_equal @score_set.ccwm.round(2), (@score_set.opr - @score_set.dpr).round(2) end + + # Ensure that a TypeError will get thrown when an argument to + # the constructor is not a Matrix. + def test_constructor_not_matrix + assert_raises(TypeError) { OPRCalc::ScoreSet.new "this", "will", "raise", "TypeError" } + end end
Add test for an argument to the constructor that is not a matrix I feel like testing with other objects will be redundant, so strings will suffice.
frc461_opr-calc
train
rb
445ec8a0e99ded4a3d8b92b6f33e27ba066d51a3
diff --git a/clc-java-sdk/sdk/src/test/java/sample/PowerOperationsSampleApp.java b/clc-java-sdk/sdk/src/test/java/sample/PowerOperationsSampleApp.java index <HASH>..<HASH> 100644 --- a/clc-java-sdk/sdk/src/test/java/sample/PowerOperationsSampleApp.java +++ b/clc-java-sdk/sdk/src/test/java/sample/PowerOperationsSampleApp.java @@ -196,7 +196,7 @@ public class PowerOperationsSampleApp extends Assert { .equals("started"); } - private ServerFilter testStopMySql() { + private void testStopMySql() { serverService .powerOff(new ServerFilter() .dataCenters(US_EAST_STERLING)
Implement Sample App for Power Operations milestone #<I>
CenturyLinkCloud_clc-java-sdk
train
java
6985e2ce7c9f55f7a5143383675b5fbe614fa17c
diff --git a/app/react/src/server/config.js b/app/react/src/server/config.js index <HASH>..<HASH> 100644 --- a/app/react/src/server/config.js +++ b/app/react/src/server/config.js @@ -73,7 +73,10 @@ export default function(configType, baseConfig, configDir) { ...config.module, // We need to use our and custom rules. ...customConfig.module, - rules: [...config.module.rules, ...(customConfig.module.rules || [])], + rules: [ + ...config.module.rules, + ...((customConfig.module && customConfig.module.rules) || []), + ], }, resolve: { ...config.resolve,
Fix issue when extending webpack config
storybooks_storybook
train
js
f0cd11320af1a09cea68de157212f7b4be041199
diff --git a/great_expectations/cli/suite.py b/great_expectations/cli/suite.py index <HASH>..<HASH> 100644 --- a/great_expectations/cli/suite.py +++ b/great_expectations/cli/suite.py @@ -192,14 +192,15 @@ A batch of data is required to edit the suite - let's help you to specify it.""" cli_message("To continue editing this suite, run <green>jupyter " f"notebook {notebook_path}</green>") - if jupyter: - subprocess.call(["jupyter", "notebook", notebook_path]) - send_usage_message( data_context=context, event="cli.suite.edit", success=True ) + + if jupyter: + subprocess.call(["jupyter", "notebook", notebook_path]) + except Exception as e: send_usage_message( data_context=context,
Swapped the lines in order to make sure that calling subprocess does not prevent the usage stat message from being sent
great-expectations_great_expectations
train
py
60d3ac1efcb728e39551900d57206b9632e9ee8c
diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js index <HASH>..<HASH> 100644 --- a/migrations/2_deploy_contracts.js +++ b/migrations/2_deploy_contracts.js @@ -1,6 +1,6 @@ var MarketContract = artifacts.require("./MarketContract.sol"); var MathLib = artifacts.require("./libraries/MathLib.sol"); -var HashLib = artifacts.require("./libraries/HashLib.sol"); +var OrderLib = artifacts.require("./libraries/OrderLib.sol"); var ZeppelinSafeERC20 = artifacts.require("zeppelin-solidity/contracts/token/SafeERC20.sol"); @@ -8,8 +8,8 @@ var ZeppelinSafeERC20 = artifacts.require("zeppelin-solidity/contracts/token/Saf module.exports = function(deployer) { deployer.deploy(MathLib); deployer.link(MathLib, MarketContract); - deployer.deploy(HashLib); - deployer.link(HashLib, MarketContract); + deployer.deploy(OrderLib); + deployer.link(OrderLib, MarketContract); deployer.deploy(ZeppelinSafeERC20); deployer.link(ZeppelinSafeERC20, MarketContract); deployer.deploy(MarketContract, "ETHXBT",
large reorginization to conform to solidity stack requirements.
MARKETProtocol_MARKETProtocol
train
js
7414828bb3d6e0d931cfe4ea18f0877d2603835a
diff --git a/libtextsecure/test/websocket-resources_test.js b/libtextsecure/test/websocket-resources_test.js index <HASH>..<HASH> 100644 --- a/libtextsecure/test/websocket-resources_test.js +++ b/libtextsecure/test/websocket-resources_test.js @@ -100,7 +100,7 @@ }); }); - describe('with a keepalive config', function() { + describe.skip('with a keepalive config', function() { before(function() { window.WebSocket = MockSocket; }); after (function() { window.WebSocket = WebSocket; }); this.timeout(60000);
Disable keepalive tests These are failing because MockSocket doesn't implement an EventTarget interface like an actual WebSocket does, so we get an exception when trying to call addEventListener on it. :( // FREEBIE
ForstaLabs_librelay-node
train
js
a2990a053cdeb1737062b11188a1357a18441f62
diff --git a/src/python/grpcio_tests/commands.py b/src/python/grpcio_tests/commands.py index <HASH>..<HASH> 100644 --- a/src/python/grpcio_tests/commands.py +++ b/src/python/grpcio_tests/commands.py @@ -160,8 +160,7 @@ class TestGevent(setuptools.Command): ) BANNED_WINDOWS_TESTS = ( # TODO(https://github.com/grpc/grpc/pull/15411) enable this test - 'unit._dns_resolver_test.DNSResolverTest.test_connect_loopback', - ) + 'unit._dns_resolver_test.DNSResolverTest.test_connect_loopback',) description = 'run tests with gevent. Assumes grpc/gevent are installed' user_options = [] @@ -187,7 +186,7 @@ class TestGevent(setuptools.Command): loader = tests.Loader() loader.loadTestsFromNames(['tests']) runner = tests.Runner() - if os.name == 'nt': + if sys.platform == 'win32': runner.skip_tests(self.BANNED_TESTS + self.BANNED_WINDOWS_TESTS) else: runner.skip_tests(self.BANNED_TESTS)
Revert changes in src/python/grpcio_tests/commands.py
grpc_grpc
train
py
a8d52c013f06ce41834737dd6371755bf84ed49e
diff --git a/src/paginate-anything.js b/src/paginate-anything.js index <HASH>..<HASH> 100644 --- a/src/paginate-anything.js +++ b/src/paginate-anything.js @@ -55,7 +55,7 @@ }; $scope.gotoPage = function (i) { - if(i < 0 || i >= $scope.numPages) { + if(i < 0 || (i-1)*$scope.perPage > $scope.numItems) { return; } diff --git a/test/paginate-anything-spec.js b/test/paginate-anything-spec.js index <HASH>..<HASH> 100644 --- a/test/paginate-anything-spec.js +++ b/test/paginate-anything-spec.js @@ -308,6 +308,22 @@ expect(scope.numPages).toEqual(1); }); + it('keeps page in-bounds when shrinking perPage', function () { + scope.perPage = 16; + scope.page = 1; + $httpBackend.whenGET('/items').respond( + finiteStringBackend('abcdefghijklmnopqrstuvwxyz') + ); + $compile(template)(scope); + scope.$digest(); + $httpBackend.flush(); + + scope.perPage = 4; + scope.$digest(); + $httpBackend.flush(); + expect(scope.page).toEqual(5); + }); + }); function linksShouldBe(elt, ar) {
Fix $digest() race between perPage and numPages
begriffs_angular-paginate-anything
train
js,js
1a8a6be31d43925e8cec903c4834869951b68ea6
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -4,13 +4,13 @@ from setuptools import setup setup( name="gophish", packages=["gophish", "gophish.api"], - version="0.4.0", + version="0.5.1", description="Python API Client for Gophish", author="Jordan Wright", author_email="python@getgophish.com", url="https://github.com/gophish/api-client-python", license="MIT", - download_url="https://github.com/gophish/api-client-python/tarball/0.4.0", + download_url="https://github.com/gophish/api-client-python/tarball/0.5.1", keywords=["gophish"], classifiers=[ "Development Status :: 3 - Alpha",
Bumping version to <I>
gophish_api-client-python
train
py
1a1a4c03d2f7b5c6932438e3380dd63b167619d9
diff --git a/src/Entities/Menu.php b/src/Entities/Menu.php index <HASH>..<HASH> 100644 --- a/src/Entities/Menu.php +++ b/src/Entities/Menu.php @@ -8,6 +8,7 @@ use Laracasts\Presenter\PresentableTrait; use Spatie\EloquentSortable\SortableTrait; use Yajra\Acl\Models\Permission; use Yajra\Auditable\AuditableTrait; +use Yajra\CMS\Contracts\Cacheable; use Yajra\CMS\Entities\Traits\CanRequireAuthentication; use Yajra\CMS\Entities\Traits\HasOrder; use Yajra\CMS\Entities\Traits\HasParameters; @@ -32,7 +33,7 @@ use Yajra\CMS\Presenters\MenuPresenter; * @property int navigation_id * @property int extension_id */ -class Menu extends Node +class Menu extends Node implements Cacheable { use PresentableTrait, PublishableTrait, CanRequireAuthentication; use AuditableTrait, HasParameters, HasOrder, SortableTrait; @@ -215,4 +216,17 @@ class Menu extends Node { return $this->belongsTo(Extension::class); } + + /** + * Get list of keys used for caching. + * + * @return array + */ + public function getCacheKeys() + { + return [ + 'navigation.published', + 'navigation.all', + ]; + } }
Fix clearing of menu related cache. Note: touches relation seems not working.
yajra_cms-core
train
php
a9ccf9d5fcc9a8d08f6da1f79e1478b96f4187b1
diff --git a/test/unit/test_filters_ibip.py b/test/unit/test_filters_ibip.py index <HASH>..<HASH> 100644 --- a/test/unit/test_filters_ibip.py +++ b/test/unit/test_filters_ibip.py @@ -47,7 +47,7 @@ class IBIPTest(): bd = np.zeros_like(im) bd[:, 0] = True inv = ps.filters.porosimetry(im, inlets=bd) - seq = ps.tools.size_to_seq(inv) + seq = ps.filters.size_to_seq(inv) inv_w_trapping = ps.filters.find_trapped_regions(seq=seq, return_mask=False) assert (inv_w_trapping == -1).sum() == 236
fixing one size_seq_satn call
PMEAL_porespy
train
py
1b413f5d8075b71537c0c5fbc57882fa444f4d9c
diff --git a/pkg/synthetictests/allowedalerts/all.go b/pkg/synthetictests/allowedalerts/all.go index <HASH>..<HASH> 100644 --- a/pkg/synthetictests/allowedalerts/all.go +++ b/pkg/synthetictests/allowedalerts/all.go @@ -24,7 +24,7 @@ func AllAlertTests() []AlertTest { newAlert("etcd", "etcdHighNumberOfLeaderChanges").firing(), newAlert("kube-apiserver", "KubeAPIErrorBudgetBurn").pending().neverFail(), - newAlert("kube-apiserver", "KubeAPIErrorBudgetBurn").firing().neverFail(), // https://bugzilla.redhat.com/show_bug.cgi?id=2039539 + newAlert("kube-apiserver", "KubeAPIErrorBudgetBurn").firing(), newAlert("kube-apiserver", "KubeClientErrors").pending().neverFail(), newAlert("kube-apiserver", "KubeClientErrors").firing(),
alert: allow apiserver burn rate to fire Allow the apiserver burn rate to fire since it is a great umbrella alert to notice anything going wrong in the cluster. With the new thresholds coming from upstream, it will only fire when a big enough disruption impacting our SLO is happening.
openshift_origin
train
go
10b54ee44ed413563de0cac0b3e92cfee344527b
diff --git a/lib/cli/index.js b/lib/cli/index.js index <HASH>..<HASH> 100644 --- a/lib/cli/index.js +++ b/lib/cli/index.js @@ -61,7 +61,7 @@ module.exports = function(env) { var options = _.last(args); action.name = options.name(); action.args = args; - } + }; }; program @@ -104,11 +104,11 @@ module.exports = function(env) { fn.apply(undefined, args); }; -module.exports.require = function (name, module) { +module.exports.require = function (name/*, module*/) { console.log('Requiring external module', chalk.magenta(name)); }; -module.exports.requireFail = function (name, err) { +module.exports.requireFail = function (name/*, err*/) { console.log(chalk.red('Failed to load external module'), chalk.magenta(name)); };
Fixed a few JSHint warnings.
wbyoung_azul
train
js
327675db1d52ab1234bc696322c4416e9e565547
diff --git a/resources/lang/fr-FR/cachet.php b/resources/lang/fr-FR/cachet.php index <HASH>..<HASH> 100644 --- a/resources/lang/fr-FR/cachet.php +++ b/resources/lang/fr-FR/cachet.php @@ -53,7 +53,7 @@ return [ // Service Status 'service' => [ - 'good' => '[0,1] Système opérationnel|[2,Inf] Tous les systèmes sont opérationnels', + 'good' => '[0,1]System operational|[2,*]All systems are operational', 'bad' => '[0,1] Le système rencontre actuellement des problèmes|[2,Inf] Certains systèmes rencontrent des problèmes', 'major' => '[0,1] Le service rencontre une panne majeure|[2,Inf] Certains systèmes rencontrent une panne majeure', ],
New translations cachet.php (French)
CachetHQ_Cachet
train
php
0fc920f14d616ba1e130d2455ce0b2057f52ed6c
diff --git a/lib/ronin/license.rb b/lib/ronin/license.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/license.rb +++ b/lib/ronin/license.rb @@ -98,19 +98,19 @@ module Ronin :url => 'http://creativecommons.org/licenses/zero/1.0/' # General Public License, version 2 - predefine :gpl_2, + predefine :gpl2, :name => 'GPL-2', :description => 'GNU Public License v2.0', :url => 'http://www.gnu.org/licenses/gpl-2.0.txt' # General Public License, version 3 - predefine :gpl_3, + predefine :gpl3, :name => 'GPL-3', :description => 'GNU Public License v3.0', :url => 'http://www.gnu.org/licenses/gpl-3.0.txt' # Lesser General Public License, version 3 - predefine :lgpl_3 + predefine :lgpl3 :name => 'LGPL-3', :description => 'GNU Lesser General Public License v3.0', :url => 'http://www.gnu.org/licenses/lgpl-3.0.txt'
Renamed gpl_2, gpl_3, lgpl_3, to gpl2, gpl3 and lgpl3, respectively.
ronin-ruby_ronin
train
rb
fafe506d520b6fc26ed8671fe2d01343aaaac74e
diff --git a/lib/phonelib/phone_analyzer_helper.rb b/lib/phonelib/phone_analyzer_helper.rb index <HASH>..<HASH> 100644 --- a/lib/phonelib/phone_analyzer_helper.rb +++ b/lib/phonelib/phone_analyzer_helper.rb @@ -102,6 +102,7 @@ module Phonelib # * +country_optional+ - whether to put country code as optional group def full_regex_for_data(data, type, country_optional = true) regex = [] + regex << '0{2}?' regex << "(#{data[Core::INTERNATIONAL_PREFIX]})?" regex << "(#{data[Core::COUNTRY_CODE]})#{country_optional ? '?' : ''}" regex << "(#{data[Core::NATIONAL_PREFIX_FOR_PARSING] || data[Core::NATIONAL_PREFIX]})?" @@ -133,7 +134,7 @@ module Phonelib def phone_match_data?(phone, data, possible = false) country_code = "#{data[Core::COUNTRY_CODE]}" inter_prefix = "(#{data[Core::INTERNATIONAL_PREFIX]})?" - return unless phone.match cr("^#{inter_prefix}#{country_code}") + return unless phone.match cr("^0{2}?#{inter_prefix}#{country_code}") type = possible ? Core::POSSIBLE_PATTERN : Core::VALID_PATTERN phone.match full_regex_for_data(data, type, false)
added <I> as international prefix
daddyz_phonelib
train
rb
6d68966cafcfa868ec66a2f9a6c9c3521e2d83f3
diff --git a/phoebe/frontend/plotting.py b/phoebe/frontend/plotting.py index <HASH>..<HASH> 100644 --- a/phoebe/frontend/plotting.py +++ b/phoebe/frontend/plotting.py @@ -415,7 +415,7 @@ def mesh(b, t, **kwargs): obj.set_time(t) try: - total_flux = obj.projected_intensity(ref=dataref,boosting_alg=boosting_alg, + total_flux = obj.projected_intensity(ref=b.get_obs(dataref)['ref'],boosting_alg=boosting_alg, with_partial_as_half=with_partial_as_half) except ValueError as msg: raise ValueError(str(msg)+'\nPossible solution: did you provide a valid time?')
fixed dataref bug in plot_mesh
phoebe-project_phoebe2
train
py
05e7191468393a73f714a7f0a12fee85953a854b
diff --git a/fabfile.py b/fabfile.py index <HASH>..<HASH> 100644 --- a/fabfile.py +++ b/fabfile.py @@ -76,14 +76,14 @@ def test(args=None): def release(): test() make_tag() - descriptor = release_descriptor(".") - print(green("Building release %s" % descriptor)) + env.descriptor = release_descriptor(".") + print(green("Building release %(descriptor)s" % env)) local("mvn package -pl enabler -am") # Must have keystore info configured in ~/.m2/settings local("mvn install -Prelease -pl enabler") local("mkdir -p %(releases_directory)s" % env) - local("cp enabler/target/openxc-enabler.apk %(releases_directory)s/openxc-enabler-%s.apk" % descriptor) - local("cp enabler/target/openxc-enabler-signed-aligned.apk %(releases_directory)s/openxc-enabler-release-%s.apk" % descriptor) + local("cp enabler/target/openxc-enabler.apk %(releases_directory)s/openxc-enabler-%(descriptor)s.apk" % env) + local("cp enabler/target/openxc-enabler-signed-aligned.apk %(releases_directory)s/openxc-enabler-release-%(descriptor)s.apk" % env) local("scripts/updatedocs.sh")
Fix release descriptor usage in fabfile.
openxc_openxc-android
train
py