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
|
|---|---|---|---|---|---|
a26fe8adc9a333c08149b32ebe048f7ac21b18fe
|
diff --git a/tensor2tensor/utils/learning_rate.py b/tensor2tensor/utils/learning_rate.py
index <HASH>..<HASH> 100644
--- a/tensor2tensor/utils/learning_rate.py
+++ b/tensor2tensor/utils/learning_rate.py
@@ -52,6 +52,14 @@ def learning_rate_factor(name, step_num, hparams):
return tf.math.cos(
step * np.pi /
(hparams.train_steps - hparams.learning_rate_warmup_steps)) / 2.0 + 0.5
+ elif name == "multi_cycle_cos_decay":
+ # Cosine decay with a variable number of cycles. This is different from
+ # "cosdecay" because it starts at 1 when the warmup steps end. Use
+ # hparams.learning_rate_decay_steps to determine the number of cycles.
+ x = tf.maximum(step_num, hparams.learning_rate_warmup_steps)
+ step = x - hparams.learning_rate_warmup_steps
+ return tf.math.cos(
+ step * np.pi / hparams.learning_rate_decay_steps) / 2.0 + 0.5
elif name == "rsqrt_decay":
return tf.rsqrt(tf.maximum(step_num, hparams.learning_rate_warmup_steps))
elif name == "rsqrt_normalized_decay":
|
Cosine learning rate decay with multiple cycles.
PiperOrigin-RevId: <I>
|
tensorflow_tensor2tensor
|
train
|
py
|
5b2ac8051f704bfabd04a95d94a4a548512dd9b3
|
diff --git a/lockfile.js b/lockfile.js
index <HASH>..<HASH> 100644
--- a/lockfile.js
+++ b/lockfile.js
@@ -33,20 +33,21 @@ process.on('uncaughtException', function H (er) {
exports.unlock = function (path, cb) {
// best-effort. unlocking an already-unlocked lock is a noop
- fs.unlink(path, function (unlinkEr) {
- if (!hasOwnProperty(locks, path)) return cb()
- fs.close(locks[path], function (closeEr) {
- delete locks[path]
- cb()
- })
- })
+ if (hasOwnProperty(locks, path))
+ fs.close(locks[path], unlink)
+ else
+ unlink()
+
+ function unlink () {
+ delete locks[path]
+ fs.unlink(path, function (unlinkEr) { cb() })
+ }
}
exports.unlockSync = function (path) {
- try { fs.unlinkSync(path) } catch (er) {}
- if (!hasOwnProperty(locks, path)) return
// best-effort. unlocking an already-unlocked lock is a noop
- try { fs.close(locks[path]) } catch (er) {}
+ try { fs.closeSync(locks[path]) } catch (er) {}
+ try { fs.unlinkSync(path) } catch (er) {}
delete locks[path]
}
|
unlock: Close before unlinking
the unlink() triggers watches to try to acquire a lock,
but the fd might not be closed yet, leading to a race condition where
the new lock gets fs.close'd instead of the old one.
|
npm_lockfile
|
train
|
js
|
54e01a49ae3dbedf2240c8b9772ef27992c06cbd
|
diff --git a/tests/parser/functions/test_send.py b/tests/parser/functions/test_send.py
index <HASH>..<HASH> 100644
--- a/tests/parser/functions/test_send.py
+++ b/tests/parser/functions/test_send.py
@@ -1,6 +1,3 @@
-from web3.exceptions import ValidationError
-
-
def test_send(assert_tx_failed, get_contract):
send_test = """
@public
@@ -25,7 +22,7 @@ def pay_me() -> bool:
"""
c = get_contract(code)
- assert_tx_failed(lambda: c.pay_me(transact={"value": w3.toWei(0.1, "ether")}), ValidationError)
+ assert_tx_failed(lambda: c.pay_me(transact={"value": w3.toWei(0.1, "ether")}))
def test_default_gas(get_contract, w3):
|
bug: Raises TransactionFailed instead of ValidationError
|
ethereum_vyper
|
train
|
py
|
1515d112a8333d02c4e2e86443608059a0e6bbc4
|
diff --git a/web/concrete/src/File/FileList.php b/web/concrete/src/File/FileList.php
index <HASH>..<HASH> 100644
--- a/web/concrete/src/File/FileList.php
+++ b/web/concrete/src/File/FileList.php
@@ -171,8 +171,7 @@ class FileList extends DatabaseItemList implements PermissionableListItemInterfa
*/
public function filterByDateAdded($date, $comparison = '=')
{
- $this->query->andWhere('f.fDateAdded ' . $comparison . ' :fDateAdded');
- $this->query->setParameter('fDateAdded', $date);
+ $this->query->andWhere($this->query->expr()->comparison('f.fDateAdded', $comparison, $this->query->createNamedParameter($date)));
}
public function filterByOriginalPageID($ocID)
|
Files: allow filtering by date ranges of date added
Former-commit-id: e<I>ed5ccb<I>c8b<I>f<I>a6
|
concrete5_concrete5
|
train
|
php
|
315f281d6d87e8e89197651dd7d46f34b8f07a53
|
diff --git a/cmd/boulder-publisher/main.go b/cmd/boulder-publisher/main.go
index <HASH>..<HASH> 100644
--- a/cmd/boulder-publisher/main.go
+++ b/cmd/boulder-publisher/main.go
@@ -2,6 +2,7 @@ package notmain
import (
"flag"
+ "fmt"
"os"
"runtime"
@@ -87,6 +88,9 @@ func main() {
cmd.FailOnError(err, "failed to load chain.")
issuer := chain[0]
id := issuer.NameID()
+ if _, exists := bundles[id]; exists {
+ cmd.Fail(fmt.Sprintf("Got multiple chains configured for issuer %q", issuer.Subject.CommonName))
+ }
bundles[id] = publisher.GetCTBundleForChain(chain)
}
|
Publisher: abort if conflicting chains configured (#<I>)
Fixes #<I>
|
letsencrypt_boulder
|
train
|
go
|
a45e5e49373e6459dcc4a693720d6a9942496ea9
|
diff --git a/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java b/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
+++ b/src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
@@ -487,10 +487,7 @@ public class ExtendedEmailPublisher extends Publisher {
}
public String getHudsonUrl() {
- if(hudsonUrl!=null)
- return hudsonUrl;
- // if the value is not configured yet, try to get some reasonable default from elsewhere.
- return Hudson.getInstance().getRootUrl();
+ return hudsonUrl;
}
public String getSmtpServer() {
@@ -583,6 +580,8 @@ public class ExtendedEmailPublisher extends Publisher {
String url = nullify(req.getParameter("ext_mailer_hudson_url"));
if(url!=null && !url.endsWith("/"))
url += '/';
+ if(url==null)
+ url = Hudson.getInstance().getRootUrl();
hudsonUrl = url;
//specify authentication information
|
this is probably better way to make this fool-proof.
|
jenkinsci_email-ext-plugin
|
train
|
java
|
43127f2a305df29b3cb356d84d886fca831b5e6f
|
diff --git a/modules/router5.js b/modules/router5.js
index <HASH>..<HASH> 100644
--- a/modules/router5.js
+++ b/modules/router5.js
@@ -145,6 +145,7 @@ class Router5 {
} else {
// Initialise router with provided start state
this.lastKnownState = startState
+ browser.replaceState(this.lastKnownState, '', this.buildUrl(startState.name, startState.params))
cb(null, startState)
}
// Listen to popstate
|
fix: replace history state on start when supplying a starting state
|
router5_router5
|
train
|
js
|
872489268a951f706445b2ada83748fb7c544dbb
|
diff --git a/src/Token.php b/src/Token.php
index <HASH>..<HASH> 100644
--- a/src/Token.php
+++ b/src/Token.php
@@ -41,6 +41,7 @@ class Token
->setSecret($secret)
->setExpiration(Carbon::parse($expiration)->getTimestamp())
->setIssuer($issuer)
+ ->setIssuedAt(time())
->build()
->getToken();
}
|
Added issued at claim to the Token create method.
|
RobDWaller_ReallySimpleJWT
|
train
|
php
|
a1f9ff72f2bc36ae1ac98de9241a95988649f84c
|
diff --git a/spec/mongoid/slug_spec.rb b/spec/mongoid/slug_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/mongoid/slug_spec.rb
+++ b/spec/mongoid/slug_spec.rb
@@ -55,7 +55,6 @@ module Mongoid
entity = Entity.create(:_id => UUID.generate, :name => 'Adele', :user_edited_variation => 'adele')
entity.to_param.should eql "adele"
end
-
end
context "when the object is top-level" do
@@ -405,30 +404,6 @@ module Mongoid
dup.to_param.should eql character.to_param
end
end
-
- context "when using history and reusing a slug within the scope" do
- let!(:subject1) do
- book.subjects.create(:name => "A Subject")
- end
- let!(:subject2) do
- book.subjects.create(:name => "Another Subject")
- end
-
- before(:each) do
- subject1.name = "Something Else Entirely"
- subject1.save
- subject2.name = "A Subject"
- subject2.save
- end
-
- it "allows using the slug" do
- subject2.slugs.should include("a-subject")
- end
-
- it "removes the slug from the old owner's history" do
- subject1.slugs.should_not include("a-subject")
- end
- end
end
context "when slug is scoped by one of the class's own fields" do
|
remove failing history transfer specs after history transfer removal
|
mongoid_mongoid-slug
|
train
|
rb
|
6e6a70d69e29f2cba3b27f50cc618a2fa46a0470
|
diff --git a/lib/github_api/request.rb b/lib/github_api/request.rb
index <HASH>..<HASH> 100644
--- a/lib/github_api/request.rb
+++ b/lib/github_api/request.rb
@@ -1,6 +1,7 @@
# encoding: utf-8
module Github
+
# Defines HTTP verbs
module Request
@@ -27,7 +28,7 @@ module Github
request(:delete, path, params, options)
end
- def request(method, path, params, options)
+ def request(method, path, params, options) # :nodoc:
if !METHODS.include?(method)
raise ArgumentError, "unkown http method: #{method}"
end
@@ -45,7 +46,7 @@ module Github
request.body = extract_data_from_params(params) unless params.empty?
end
end
- response.body
+ ResponseWrapper.new(response, self)
end
private
|
Use response wrapper when returning from request.
|
piotrmurach_github
|
train
|
rb
|
c36197d01779cbb48d66563cf149af202ba6b7fc
|
diff --git a/CHANGES.rst b/CHANGES.rst
index <HASH>..<HASH> 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,14 @@
Change Log
----------
+0.9999
+~~~~~~
+
+Released on XXX, 2014
+
+* XXX
+
+
0.999
~~~~~
diff --git a/html5lib/__init__.py b/html5lib/__init__.py
index <HASH>..<HASH> 100644
--- a/html5lib/__init__.py
+++ b/html5lib/__init__.py
@@ -20,4 +20,4 @@ from .serializer import serialize
__all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder",
"getTreeWalker", "serialize"]
-__version__ = "0.999"
+__version__ = "0.9999-dev"
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ with codecs.open(os.path.join(current_dir, 'README.rst'), 'r', 'utf8') as readme
long_description = readme_file.read() + '\n' + changes_file.read()
setup(name='html5lib',
- version='0.999',
+ version='0.9999-dev',
url='https://github.com/html5lib/html5lib-python',
license="MIT License",
description='HTML parser based on the WHATWG HTML specifcation',
|
And back to dev for <I>.
|
html5lib_html5lib-python
|
train
|
rst,py,py
|
d9ad9ef49b98e54eb34097c3a4beb8f95864185d
|
diff --git a/cihai/__about__.py b/cihai/__about__.py
index <HASH>..<HASH> 100644
--- a/cihai/__about__.py
+++ b/cihai/__about__.py
@@ -1,6 +1,6 @@
__title__ = 'cihai'
__package_name__ = 'cihai'
-__version__ = '0.8.0'
+__version__ = '0.8.1'
__description__ = 'Library for CJK (chinese, japanese, korean) language data.'
__author__ = 'Tony Narlock'
__email__ = 'tony@git-pull.com'
|
Release <I>
This release loosen version requirements for dependency packages. This
should make a life bit easier in downstream packages.
There were issues with a pyyaml version release that broke compatibility
with Python <I>. This should handle that.
Also update Sphinx <I> to <I>, and releases <I> to <I>
|
cihai_cihai
|
train
|
py
|
8eb8fe38683a400cda632e4a0d77021ec26ace7d
|
diff --git a/src/main/java/org/vesalainen/parser/util/Input.java b/src/main/java/org/vesalainen/parser/util/Input.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/vesalainen/parser/util/Input.java
+++ b/src/main/java/org/vesalainen/parser/util/Input.java
@@ -836,10 +836,9 @@ public abstract class Input<I,B extends Buffer> implements InputReader
return cursor;
}
/**
- * @deprecated Not that feasible
* Returns a reference to current field. Field start and length are decoded
* in int value. This method is used in postponing or avoiding string object
- * creation. String or Iterator<String> can be constructed later by using
+ * creation. String or Iterator>String< can be constructed later by using
* getString(int fieldRef) or getCharSequence(fieldRef) methods.
*
* <p>Note! If buffer size is too small the fieldRef might not be available.
|
Removed deprecation from fieldRef
|
tvesalainen_lpg
|
train
|
java
|
a84c9924bcba6fe3bdeba5834134e5a9fb3ecc5d
|
diff --git a/featuretests/cmd_juju_dumplogs_test.go b/featuretests/cmd_juju_dumplogs_test.go
index <HASH>..<HASH> 100644
--- a/featuretests/cmd_juju_dumplogs_test.go
+++ b/featuretests/cmd_juju_dumplogs_test.go
@@ -61,6 +61,7 @@ func (s *dumpLogsCommandSuite) TestRun(c *gc.C) {
Location: "location",
Level: loggo.INFO,
Message: fmt.Sprintf("%d", i),
+ Labels: []string{"http"},
}})
c.Assert(err, jc.ErrorIsNil)
}
@@ -72,7 +73,7 @@ func (s *dumpLogsCommandSuite) TestRun(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)
// Check the log file for each environment
- expectedLog := "machine-42: 2015-11-04 03:02:01 INFO module %d"
+ expectedLog := "machine-42: 2015-11-04 03:02:01 INFO module %d http"
for _, st := range states {
logName := context.AbsPath(fmt.Sprintf("%s.log", st.ModelUUID()))
logFile, err := os.Open(logName)
|
Featuretests: Fix log message output
Fix the message log output with in the feature tests for dumplogs.
|
juju_juju
|
train
|
go
|
499a6dd1298ab4e0b2e89c94ac45364cc1267763
|
diff --git a/spec/integration/qless_spec.rb b/spec/integration/qless_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration/qless_spec.rb
+++ b/spec/integration/qless_spec.rb
@@ -1169,7 +1169,7 @@ module Qless
(bjob.heartbeat + 11).should > Time.now.to_i
expect {
ajob.heartbeat
- }.to raise_error(Qless::LuaScriptError, /handed out to another/)
+ }.to raise_error(Qless::LuaScriptError, /given out to another/)
end
it "removes jobs from original worker's list of jobs" do
@@ -2166,7 +2166,7 @@ module Qless
job.instance_variable_set(:@worker_name, 'foobar')
expect {
job.retry
- }.to raise_error(Qless::LuaScriptError, /handed out to another/)
+ }.to raise_error(Qless::LuaScriptError, /given to another/)
job.instance_variable_set(:@worker_name, Qless.worker_name)
job.complete
expect {
|
Fix specs failing due to error message changes.
|
seomoz_qless
|
train
|
rb
|
d6440a55d35b0492dc3cecdbbc04d1e7e49bcd00
|
diff --git a/heroku-api/src/main/java/com/heroku/api/Release.java b/heroku-api/src/main/java/com/heroku/api/Release.java
index <HASH>..<HASH> 100644
--- a/heroku-api/src/main/java/com/heroku/api/Release.java
+++ b/heroku-api/src/main/java/com/heroku/api/Release.java
@@ -20,6 +20,7 @@ public class Release implements Serializable {
String description;
String created_at;
List<String> addon_plan_names;
+ Slug slug;
public Map<String, String> getUser() {
return user;
@@ -76,4 +77,12 @@ public class Release implements Serializable {
private void setAddon_plan_names(List<String> addon_plan_names) {
this.addon_plan_names = addon_plan_names;
}
+
+ public Slug getSlug() {
+ return slug;
+ }
+
+ public void setSlug(Slug slug) {
+ this.slug = slug;
+ }
}
|
Added slug to Release model
|
heroku_heroku.jar
|
train
|
java
|
0ac77212e03dcd2c3309530967b2d745c2a43c30
|
diff --git a/src/Injectors/user.php b/src/Injectors/user.php
index <HASH>..<HASH> 100644
--- a/src/Injectors/user.php
+++ b/src/Injectors/user.php
@@ -9,5 +9,6 @@ return [
[
'text' => __('laralum_notifications::general.create_notification'),
'url' => route('laralum::notifications.create'),
+ 'permission' => 'laralum::notifications.create',
],
];
|
Added permission to user.php injection
|
Laralum_Notifications
|
train
|
php
|
d8b1ebb6aebf97c76ea6a3fa0148d8429fab8848
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ setup(
license="New BSD",
install_requires=["emoji", "grapheme", "requests"],
classifiers=[
- "Development Status :: 3 - Beta",
+ "Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
|
Beta isn't valid, revert
`Classifier 'Development Status :: 3 - Beta' is not a valid classifier.`
|
glasnt_emojificate
|
train
|
py
|
6faebacf5145b4d9a10de8fe06219d2b0946c659
|
diff --git a/src/org/zaproxy/zap/authentication/ManualAuthenticationMethodType.java b/src/org/zaproxy/zap/authentication/ManualAuthenticationMethodType.java
index <HASH>..<HASH> 100644
--- a/src/org/zaproxy/zap/authentication/ManualAuthenticationMethodType.java
+++ b/src/org/zaproxy/zap/authentication/ManualAuthenticationMethodType.java
@@ -200,6 +200,9 @@ public class ManualAuthenticationMethodType extends AuthenticationMethodType {
@Override
public String encode(String parentStringSeparator) {
+ if (selectedSession == null) {
+ return "";
+ }
return Base64.encodeBase64String(selectedSession.getName().getBytes());
}
|
Fix NPE when saving manual authentication data
Change ManualAuthenticationMethodType to skip session's encoding if
none was set, preventing the NullPointerException.
Fix #<I> - Error whilst using Api - ERROR ExtensionUserManagement -
Unable to persist Users
|
zaproxy_zaproxy
|
train
|
java
|
1ea0ea27926630176aaae011ed849414053e3103
|
diff --git a/tests/lib/Utf8Tools.spec.js b/tests/lib/Utf8Tools.spec.js
index <HASH>..<HASH> 100644
--- a/tests/lib/Utf8Tools.spec.js
+++ b/tests/lib/Utf8Tools.spec.js
@@ -41,6 +41,11 @@ describe('Utf8Tools', function() {
isValid: false,
decoded: '48656c6c6f0020576f726c6421',
},
+ {
+ data: new Uint8Array(Nimiq.BufferUtils.fromBase64('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAAAAAAAASoAAAA=')),
+ isValid: false,
+ decoded: '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000012a000000',
+ },
];
for (const vector of vectors) {
|
Add Philipp's exploit as test vector
|
nimiq_keyguard-next
|
train
|
js
|
b598f0bac36241dcaa220497606bd4208536a974
|
diff --git a/app/models/manager_refresh/save_inventory.rb b/app/models/manager_refresh/save_inventory.rb
index <HASH>..<HASH> 100644
--- a/app/models/manager_refresh/save_inventory.rb
+++ b/app/models/manager_refresh/save_inventory.rb
@@ -15,7 +15,10 @@ module ManagerRefresh
end
def save_collection(parent, key, dto_collection, hashes)
- return if dto_collection.is_a? Array
+ unless dto_collection.is_a? ::DtoCollection
+ raise "A ManagerRefresh::SaveInventory needs a DtoCollection object, it got: #{dto_collection.inspect}"
+ end
+
return if dto_collection.saved?
if dto_collection.saveable?(hashes)
|
Allow only DtoCollection in ManagerRefresh::Saveinventory
Allow only DtoCollection in ManagerRefresh::Saveinventory
(transferred from ManageIQ/manageiq@<I>c1a<I>fec<I>c6dfc<I>ed<I>fe<I>edcb<I>)
|
ManageIQ_inventory_refresh
|
train
|
rb
|
aaec9ef9f3d89921b7f6aa362076df90a4b6bca7
|
diff --git a/libkbfs/kbfs_ops_concur_test.go b/libkbfs/kbfs_ops_concur_test.go
index <HASH>..<HASH> 100644
--- a/libkbfs/kbfs_ops_concur_test.go
+++ b/libkbfs/kbfs_ops_concur_test.go
@@ -716,8 +716,6 @@ func TestKBFSOpsConcurBlockSyncTruncate(t *testing.T) {
// overwrites, plus one write that blocks until the dirty bcache has
// room. This is a repro for KBFS-1846.
func TestKBFSOpsTruncateAndOverwriteDeferredWithArchivedBlock(t *testing.T) {
- t.Skip("Pending KBFS-1852")
-
config, _, ctx, cancel := kbfsOpsInitNoMocks(t, "test_user")
defer kbfsTestShutdownNoMocks(t, config, ctx, cancel)
|
kbfs_ops_concur_test: with KBFS-<I> fixed, reenable test
Issue: KBFS-<I>
|
keybase_client
|
train
|
go
|
955bd7ce4d1d565ad7d15b815b8c6e2ab679fc9f
|
diff --git a/lintly/parsers.py b/lintly/parsers.py
index <HASH>..<HASH> 100644
--- a/lintly/parsers.py
+++ b/lintly/parsers.py
@@ -229,7 +229,7 @@ class CfnLintParser(BaseLintParser):
violation = Violation(line=int(line_number),
column=int(column),
- code="`{}`".format(code),
+ code="{}".format(code),
message=message)
violations[path].append(violation)
|
Remove backticks from the code field.
|
grantmcconnaughey_Lintly
|
train
|
py
|
b386951e4281f1a393a7448d5cccf84843ddac30
|
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -614,9 +614,11 @@ module ActiveRecord
# SCHEMA STATEMENTS ========================================
- def recreate_database(name) #:nodoc:
+ # Drops the database specified on the +name+ attribute
+ # and creates it again using the provided +options+.
+ def recreate_database(name, options = {}) #:nodoc:
drop_database(name)
- create_database(name)
+ create_database(name, options)
end
# Create a new PostgreSQL database. Options include <tt>:owner</tt>, <tt>:template</tt>,
|
accept option for recreate db for postgres (same as mysql now)
|
rails_rails
|
train
|
rb
|
9843d5ab21f6a253cf6aeb1fc7f55968b22e5178
|
diff --git a/src/Site/Key.php b/src/Site/Key.php
index <HASH>..<HASH> 100644
--- a/src/Site/Key.php
+++ b/src/Site/Key.php
@@ -16,7 +16,7 @@
namespace Zest\Site;
-use Zest\Contracts\Site\key as KeyContract;
+use Zest\Contracts\Site\Key as KeyContract;
class Key implements keyContract
{
|
Changes the interface statment to use (#<I>)
|
zestframework_Zest_Framework
|
train
|
php
|
bc8f53819a1e3df72c0f421360ee31a74e6487ed
|
diff --git a/djcelery/loaders.py b/djcelery/loaders.py
index <HASH>..<HASH> 100644
--- a/djcelery/loaders.py
+++ b/djcelery/loaders.py
@@ -21,7 +21,10 @@ class DjangoLoader(BaseLoader):
return settings
def on_task_init(self, task_id, task):
+ # the parent process may have established these,
+ # so need to close them.
self.close_database()
+ self.close_cache()
def close_database(self):
from django.db import connection
@@ -33,6 +36,13 @@ class DjangoLoader(BaseLoader):
return connection.close()
self._db_reuse += 1
+ def close_cache(self):
+ # reset cache connection (if supported).
+ try:
+ cache.cache.close()
+ except AttributeError:
+ pass
+
def on_process_cleanup(self):
"""Does everything necessary for Django to work in a long-living,
multiprocessing environment.
@@ -42,11 +52,7 @@ class DjangoLoader(BaseLoader):
# browse_thread/thread/78200863d0c07c6d/
self.close_database()
- # ## Reset cache connection (if supported).
- try:
- cache.cache.close()
- except AttributeError:
- pass
+ self.close_cache()
def on_worker_init(self):
"""Called when the worker starts.
|
Need to close cache connection at start of task, as it may be left over from the parent process. Thanks to DctrWatson and otherjacob.
|
celery_django-celery
|
train
|
py
|
c03eada8f03bc2a685f7c49a303b7ea184442772
|
diff --git a/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb b/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
+++ b/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
@@ -38,6 +38,13 @@ describe 'RailsAdmin Basic Bulk Action', type: :request do
expect(response.response_code).to eq 404
expect(response.body).to match /0 players failed to be deleted/i
end
+
+ it 'returns 404 error for DELETE request without bulk_ids' do
+ expect(Player.count).to eq @players.length
+ delete(bulk_delete_path(bulk_action: 'bulk_delete', model_name: 'player', bulk_ids: ""))
+ expect(response.response_code).to eq 404
+ expect(response.body).to match /0 players failed to be deleted/i
+ end
end
describe 'bulk_export' do
|
add an example to send the request which has empty bulk_ids
|
sferik_rails_admin
|
train
|
rb
|
69da140264d947317b313a2bec4ec62f49213c4e
|
diff --git a/matchpy/matching/many_to_one.py b/matchpy/matching/many_to_one.py
index <HASH>..<HASH> 100644
--- a/matchpy/matching/many_to_one.py
+++ b/matchpy/matching/many_to_one.py
@@ -299,7 +299,7 @@ class _MatchIter:
self.constraints |= restore_constraints
self.patterns |= restore_patterns
self.substitution = substitution
- self.subjects.append(subject)
+ self.subjects.appendleft(subject)
def _match_regular_operation(self, transition: _Transition) -> Iterator[_State]:
subject = self.subjects.popleft()
|
Fixed a bug in the ManyToOneMatcher.
|
HPAC_matchpy
|
train
|
py
|
2652d236b65d5aa21dae1cddf2465bb2e60b7490
|
diff --git a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java
+++ b/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java
@@ -23,6 +23,7 @@ import hudson.Util;
import hudson.lifecycle.Lifecycle;
import hudson.model.*;
import hudson.remoting.Callable;
+import hudson.remoting.Launcher;
import hudson.remoting.VirtualChannel;
import hudson.security.Permission;
import hudson.util.IOUtils;
@@ -803,6 +804,7 @@ public class AboutJenkins extends Component {
.replaceAll("`", "`") + "`");
out.println(" - Labels: " + getLabelString(Jenkins.getInstance()));
out.println(" - Usage: `" + Jenkins.getInstance().getMode() + "`");
+ out.println(" - Slave Version: " + Launcher.VERSION);
out.print(new GetJavaInfo(" -", " +").call());
out.println();
for (Node node : Jenkins.getInstance().getNodes()) {
|
JENKINS-<I> - Added "Slave Version" using `Launcher.VERSION` to master node
|
jenkinsci_support-core-plugin
|
train
|
java
|
82960b8eac4f610026af01a6e8c5a75f5978f0d0
|
diff --git a/fitsio/fitslib.py b/fitsio/fitslib.py
index <HASH>..<HASH> 100644
--- a/fitsio/fitslib.py
+++ b/fitsio/fitslib.py
@@ -135,7 +135,6 @@ def write(filename, data, extname=None, units=None, compress=None, header=None,
A list of strings representing units for each column.
"""
- fits = FITS(filename, 'rw', clobber=clobber)
with FITS(filename, 'rw', clobber=clobber) as fits:
if data.dtype.fields == None:
fits.write_image(data, extname=extname, compress=compress, header=header)
@@ -174,7 +173,6 @@ class FITS:
filename = extract_filename(filename)
self.filename = filename
self.mode=mode
- self.clobber=clobber
if mode not in _int_modemap:
raise ValueError("mode should be one of 'r','rw',READONLY,READWRITE")
@@ -184,7 +182,7 @@ class FITS:
create=0
if mode in [READWRITE,'rw']:
- if self.clobber:
+ if clobber:
create=1
if os.path.exists(filename):
print 'Removing existing file'
@@ -213,7 +211,6 @@ class FITS:
self._FITS=None
self.filename=None
self.mode=None
- self.clobber=None
self.charmode=None
self.intmode=None
self.hdu_list=None
|
fixed bug where file was being opened twice
|
esheldon_fitsio
|
train
|
py
|
89c56fb4a34ce8161b2c17ed4d567e864062e2ac
|
diff --git a/lib/application.js b/lib/application.js
index <HASH>..<HASH> 100644
--- a/lib/application.js
+++ b/lib/application.js
@@ -44,9 +44,9 @@ framework.extend(Application.prototype, new function() {
upload: 'incoming/'
}
- // Contains the various registered application storages for caching
- this.storage = {
- cache: null,
+ // Used to group the available application storages
+ this.cache = {
+ default: null,
driver: null,
response: null,
session: null
@@ -1141,6 +1141,30 @@ framework.extend(Application.prototype, new function() {
.replace(/\/(_)?/g,'_').replace(/^__/, '');
this.views.partials[id] = func;
}
+
+ /**
+ Returns a new driver instance
+
+ @param {string} driver
+ @param {object} config
+ @public
+ */
+
+ this.driver = function(driver, config) {
+ return new framework.drivers[driver](this, config || {});
+ }
+
+ /**
+ Returns a new storage instance
+
+ @param {string} driver
+ @param {object} config
+ @public
+ */
+
+ this.storage = function(storage, config) {
+ return new framework.storage[storage](this, config || {});
+ }
/**
Gets the static directories available in the application's public
|
Added Application::(driver|storage)
|
derdesign_protos
|
train
|
js
|
ce70fdf40ed875562025dc61aab83596774b2eea
|
diff --git a/astropy_helpers/test_helpers.py b/astropy_helpers/test_helpers.py
index <HASH>..<HASH> 100644
--- a/astropy_helpers/test_helpers.py
+++ b/astropy_helpers/test_helpers.py
@@ -137,7 +137,8 @@ class AstropyTest(Command, object):
else:
ignore_python_version = '3'
coveragerc_content = coveragerc_content.replace(
- "{ignore_python_version}", ignore_python_version)
+ "{ignore_python_version}", ignore_python_version).replace(
+ "{packagename}", self.package_name)
tmp_coveragerc = os.path.join(tmp_dir, 'coveragerc')
with open(tmp_coveragerc, 'wb') as tmp:
tmp.write(coveragerc_content.encode('utf-8'))
|
Changes to test_helpers.py from astropy/astropy#<I>
|
astropy_astropy-helpers
|
train
|
py
|
d55e2dcef8b295938027db8f84c91ae6cbaad953
|
diff --git a/route.go b/route.go
index <HASH>..<HASH> 100644
--- a/route.go
+++ b/route.go
@@ -90,6 +90,13 @@ func (r Route) matchesAccept(mimeTypesWithQuality string) bool {
// Return whether the mimeTypes match to what this Route can consume.
func (r Route) matchesContentType(mimeTypes string) bool {
+
+ // idempotent methods with empty content always match Content-Type
+ m := r.Method
+ if m == "GET" || m == "HEAD" || m == "OPTIONS" || m == "DELETE" {
+ return true
+ }
+
// check for both defaults
if len(r.Consumes) == 0 && mimeTypes == MIME_OCTET {
return true
|
fix for regression introduced in #<I>
|
emicklei_go-restful
|
train
|
go
|
f79cd704fe6f7dfc6992bfc0ed24b862147420dd
|
diff --git a/lib/injectedlogger/delegator.rb b/lib/injectedlogger/delegator.rb
index <HASH>..<HASH> 100644
--- a/lib/injectedlogger/delegator.rb
+++ b/lib/injectedlogger/delegator.rb
@@ -126,14 +126,25 @@ module InjectedLogger
if prefix and not prefix.empty?
prefix_s += " " + prefix
end
- klass.define_singleton_method lvl do |msg|
- logger.send :log, "#{prefix_s} #{msg}"
+ klass.define_singleton_method lvl do |*msg, &blk|
+ if blk
+ logger.send :log, *msg do
+ str = blk.call
+ "#{prefix_s} #{str}"
+ end
+ else
+ logger.send :log, "#{prefix_s} #{msg.join ' '}"
+ end
end
else
# assume two or more params, best effort with 1st being level
if lvl_s = ruby_logger_severity(lvl)
- klass.define_singleton_method lvl do |msg|
- logger.send :log, lvl_s, msg
+ klass.define_singleton_method lvl do |*msg, &blk|
+ if blk
+ logger.send :log, lvl_s, *msg, &blk
+ else
+ logger.send :log, lvl_s, msg.join(' ')
+ end
end
end
end
|
logger: add support for :log with blocks
|
unleashed_injectedlogger
|
train
|
rb
|
586b8f32bc2d7cb879c598c1376510ebc9239c11
|
diff --git a/parameters.py b/parameters.py
index <HASH>..<HASH> 100644
--- a/parameters.py
+++ b/parameters.py
@@ -475,6 +475,7 @@ class CmdLineParser(ArgumentParser):
except:
raise Exception("No handler for command %s" % result.operation)
+ self.preops(result, error)
retval = method(result.values[result.operation], error)
return True, result, retval
else:
@@ -533,6 +534,10 @@ class CmdLineParser(ArgumentParser):
else:
print "Exit with errors"
sys.exit(-1)
+
+ # This function is exectued in the autocall_ops procedure. It is called prior to the call to the function that implements the operation
+ def preops(self, result, info):
+ pass
# This function is executed if the self_service function is called with the ops parameter set to False and the commandline is properly parsed.
# * It should return True in case that the function is properly executed. Otherwise it should return False.
diff --git a/version.py b/version.py
index <HASH>..<HASH> 100644
--- a/version.py
+++ b/version.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-VERSION="0.08"
+VERSION="0.09"
def get():
global VERSION
|
including a new call in the self service mechanism to address the global options
|
grycap_cpyutils
|
train
|
py,py
|
20e9abe26a0992df38180b786aa60dd4888c8dba
|
diff --git a/script/upload.py b/script/upload.py
index <HASH>..<HASH> 100755
--- a/script/upload.py
+++ b/script/upload.py
@@ -108,6 +108,9 @@ def parse_args():
def get_atom_shell_build_version():
+ if os.environ.has_key('CI'):
+ # In CI we just build as told.
+ return ATOM_SHELL_VERSION
if PLATFORM == 'darwin':
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R',
'{0}.app'.format(PRODUCT_NAME), 'Contents',
|
Don't check build version in CI
|
electron_electron
|
train
|
py
|
91c9db66ef3cce6208c4fe3a1cae0a1d0c5af71d
|
diff --git a/src/Resolvers/ResolverBase.php b/src/Resolvers/ResolverBase.php
index <HASH>..<HASH> 100644
--- a/src/Resolvers/ResolverBase.php
+++ b/src/Resolvers/ResolverBase.php
@@ -73,7 +73,7 @@ class ResolverBase
{
// can we do this easier?
if (strpos($path, self::CHILDPATH_VARIABLE_OPEN) === false) {
- return explode('/', $path);
+ return explode(self::CHILDPATH_PATH_SEPARATOR, $path);
}
// First detect all variables
diff --git a/tests/PropertyResolverTest.php b/tests/PropertyResolverTest.php
index <HASH>..<HASH> 100644
--- a/tests/PropertyResolverTest.php
+++ b/tests/PropertyResolverTest.php
@@ -22,6 +22,11 @@ class PropertyResolverTest extends PHPUnit_Framework_TestCase
);
$this->assertEquals(
+ [ 'parameter', 'parameter2' ],
+ $propertyResolver->splitPathParameters('parameter.parameter2')
+ );
+
+ $this->assertEquals(
[ 'parameter', '{variable}' ],
$propertyResolver->splitPathParameters('parameter.{variable}')
);
|
Fix the property resolver and add test to avoid making that mistake again.
|
CatLabInteractive_charon
|
train
|
php,php
|
c64f083cd16ff515537a92f969b86b32e37c2c4b
|
diff --git a/lib/ddbcli/cli/options.rb b/lib/ddbcli/cli/options.rb
index <HASH>..<HASH> 100644
--- a/lib/ddbcli/cli/options.rb
+++ b/lib/ddbcli/cli/options.rb
@@ -7,7 +7,7 @@ def parse_options
options.access_key_id = ENV['AWS_ACCESS_KEY_ID']
options.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
options.ddb_endpoint_or_region =
- ENV['AWS_REGION'] || ENV['DDB_ENDPOINT'] || ENV['DDB_REGION'] || 'dynamodb.us-east-1.amazonaws.com'
+ ENV['AWS_REGION'] || ENV['AWS_DEFAULT_REGION'] || ENV['DDB_ENDPOINT'] || ENV['DDB_REGION'] || 'dynamodb.us-east-1.amazonaws.com'
# default value
options.timeout = 60
|
support the AWS_DEFAULT_REGION environment variable
|
winebarrel_ddbcli
|
train
|
rb
|
2d007715cfe25119a6a6b3b306057db2fae56c93
|
diff --git a/tests/ArraysTest.php b/tests/ArraysTest.php
index <HASH>..<HASH> 100644
--- a/tests/ArraysTest.php
+++ b/tests/ArraysTest.php
@@ -309,61 +309,5 @@ class ArraysTest extends PHPUnit_Framework_TestCase
}
}
-/*
-$(document).ready(function() {
-
- module("Arrays");
-
- test("first", function() {
- });
-
- test("rest", function() {
- });
-
- test("initial", function() {
- });
-
- test("last", function() {
- });
-
- test("compact", function() {
- });
-
- test("flatten", function() {
- });
-
- test("without", function() {
- });
-
- test("uniq", function() {
- });
-
- test("intersection", function() {
- });
-
- test("union", function() {
- });
-
- test("difference", function() {
- });
-
- test('zip', function() {
- });
-
- test('object', function() {
- });
-
- test("indexOf", function() {
- });
-
- test("lastIndexOf", function() {
- });
-
- test("range", function() {
- });
-
-});
-*/
-
// __END__
// vim: expandtab softtabstop=2 shiftwidth=2
|
Remove unnecessity code of test
|
emonkak_underbar.php
|
train
|
php
|
7b28a128617075c52f77b7470f0d4d7ad319cef5
|
diff --git a/src/org/mozilla/javascript/JavaMembers.java b/src/org/mozilla/javascript/JavaMembers.java
index <HASH>..<HASH> 100644
--- a/src/org/mozilla/javascript/JavaMembers.java
+++ b/src/org/mozilla/javascript/JavaMembers.java
@@ -603,8 +603,9 @@ class JavaMembers
Object v = ht.get(beanPropertyName);
if (v != null) {
// A private field shouldn't mask a public getter/setter
- if (!includePrivate ||
+ if (!includePrivate || !(v instanceof Member) ||
!Modifier.isPrivate(((Member)v).getModifiers()))
+
{
continue;
}
|
Fix propagated from <I>R2 release branch.
|
mozilla_rhino
|
train
|
java
|
ca1b683743a34e2bb8104e28c4a0c75f496e8213
|
diff --git a/azurerm/internal/services/compute/validation.go b/azurerm/internal/services/compute/validation.go
index <HASH>..<HASH> 100644
--- a/azurerm/internal/services/compute/validation.go
+++ b/azurerm/internal/services/compute/validation.go
@@ -168,9 +168,9 @@ func validateDiskSizeGB(v interface{}, _ string) (warnings []string, errors []er
func validateManagedDiskSizeGB(v interface{}, _ string) (warnings []string, errors []error) {
value := v.(int)
- if value < 0 || value > 32767 {
+ if value < 0 || value > 65536 {
errors = append(errors, fmt.Errorf(
- "The `disk_size_gb` can only be between 0 and 32767"))
+ "The `disk_size_gb` can only be between 0 and 65536"))
}
return warnings, errors
}
|
azurerm_managed_disk - increase the maximum disk_size_gb to <I> GB. (#<I>)
Azure Ultra SSD Managed Disk (storage_account_type UltraSSD_LRS) supports more than <I> GB.
This code fix this limitation, allowing the max of <I> for Ultra SSD.
Fixes #<I>
|
terraform-providers_terraform-provider-azurerm
|
train
|
go
|
a94596b05b486975d21075630406158099e679ee
|
diff --git a/templates/js/atk4_univ.js b/templates/js/atk4_univ.js
index <HASH>..<HASH> 100644
--- a/templates/js/atk4_univ.js
+++ b/templates/js/atk4_univ.js
@@ -145,7 +145,6 @@ $.each({
},
reloadArgs: function(url,key,value){
var u=$.atk4.addArgument(url,key+'='+value);
- console.log(url);
this.jquery.atk4_load(u);
},
reload: function(url,arg,fn){
@@ -480,6 +479,15 @@ numericField: function(){
if(t != this.value)this.value=t;
});
},
+onKey: function(code,fx,modifier,modival){
+ this.jquery.bind('keydown',function(e){
+ if(e.which==code && (!modifier || e[modifier]==modival)){
+ e.preventDefault();
+ e.stopPropagation();
+ return fx();
+ }
+ });
+},
disableEnter: function(){
this.jquery.bind('keydown keypress',function (e) {
if(e.which==13){
|
add onKey method for capturing certain keycode
|
atk4_atk4
|
train
|
js
|
b5a9440318bdf671a8d9d6d75dd043f4b9ebbf62
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -51,7 +51,7 @@ function check(port, host) {
return deferred.promise;
}
- if (!is.hostAddress(host)) {
+ if (is.nullOrUndefined(host)) {
debug('set host address to default 127.0.0.1');
host = '127.0.0.1';
}
@@ -123,7 +123,7 @@ function waitUntilFreeOnHost(port, host, retryTimeMs, timeOutMs) {
return deferred.promise;
}
- if (!is.hostAddress(host)) {
+ if (!is.nullOrUndefined(host)) {
host = '127.0.0.1';
debug('waitUntilUsedOnHost set host to default "127.0.0.1"');
}
@@ -232,7 +232,7 @@ function waitUntilUsedOnHost(port, host, retryTimeMs, timeOutMs) {
return deferred.promise;
}
- if (!is.hostAddress(host)) {
+ if (is.nullOrUndefined(host)) {
host = '127.0.0.1';
debug('waitUntilUsedOnHost set host to default "127.0.0.1"');
}
|
Swapped is.hostAddress for is.nullOrUndefined.
|
stdarg_tcp-port-used
|
train
|
js
|
9acf9235bd70327edcce7cb1f9941539b7ef1e94
|
diff --git a/src/semantic_version/__init__.py b/src/semantic_version/__init__.py
index <HASH>..<HASH> 100644
--- a/src/semantic_version/__init__.py
+++ b/src/semantic_version/__init__.py
@@ -2,7 +2,7 @@
# Copyright (c) 2012 Raphaël Barrois
-__version__ = '1.1.0-alpha'
+__version__ = '1.1.0-beta'
from .base import compare, match, Version, Spec, SpecList
|
Version bump.
Features ready, doc to write.
|
rbarrois_python-semanticversion
|
train
|
py
|
33a8aa9f2efb4c04e42100513a1cc130cbcb9b4e
|
diff --git a/archivex.go b/archivex.go
index <HASH>..<HASH> 100644
--- a/archivex.go
+++ b/archivex.go
@@ -342,6 +342,10 @@ func (t *TarFile) Close() error {
func getSubDir(dir string, rootDir string, includeCurrentFolder bool) (subDir string) {
subDir = strings.Replace(dir, rootDir, "", 1)
+ // Remove leading slashes, since this is intentionally a subdirectory.
+ if len(subDir) > 0 && subDir[0] == os.PathSeparator {
+ subDir = subDir[1:]
+ }
if includeCurrentFolder {
parts := strings.Split(rootDir, string(os.PathSeparator))
|
When using AddAll with includeCurrentFolder=false, remove leading slashes from subdirectories within the archive.
|
jhoonb_archivex
|
train
|
go
|
bfad210e8e8c02976819494ba670cc8e192c3ede
|
diff --git a/blueprints/ember-token-auth/index.js b/blueprints/ember-token-auth/index.js
index <HASH>..<HASH> 100644
--- a/blueprints/ember-token-auth/index.js
+++ b/blueprints/ember-token-auth/index.js
@@ -1,5 +1,7 @@
module.exports = {
+ normalizeEntityName: function() {},
+
afterInstall: function() {
return this.addBowerPackageToProject('ember-oauth2', '0.5.3');
}
-;
+};
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -1,17 +1,15 @@
'use strict';
-var path = require('path');
-var fs = require('fs');
-
module.exports = {
name: 'ember-token-auth',
included: function(app) {
this._super.included(app);
+
app.import(app.bowerDirectory + '/ember-oauth2/dist/ember-oauth2.amd.js', {
exports: {
'ember-oauth2': ['default']
}
});
}
-}
+};
|
blueprint ember-token-auth should install ember-oauth2
|
amkirwan_ember-token-auth
|
train
|
js,js
|
fe0c4a3ac4c9abe7965378e6a9b00f7b523331fa
|
diff --git a/src/Model/Project.php b/src/Model/Project.php
index <HASH>..<HASH> 100644
--- a/src/Model/Project.php
+++ b/src/Model/Project.php
@@ -135,6 +135,18 @@ class Project extends Resource
}
/**
+ * @inheritdoc
+ */
+ public function operationAvailable($op)
+ {
+ if (!parent::operationAvailable($op)) {
+ $this->ensureFull();
+ }
+
+ return parent::operationAvailable($op);
+ }
+
+ /**
* Get a list of environments for the project.
*
* @param int $limit
|
Ensure project has full representation when checking operationAvailable()
|
platformsh_platformsh-client-php
|
train
|
php
|
d24d9ff79e8ca10dd7fb0b23203b9a3b1a896a3a
|
diff --git a/core/lib/refinery/crud.rb b/core/lib/refinery/crud.rb
index <HASH>..<HASH> 100644
--- a/core/lib/refinery/crud.rb
+++ b/core/lib/refinery/crud.rb
@@ -175,13 +175,15 @@ module Refinery
# If we have already found a set then we don't need to again
find_all_#{plural_name} if @#{plural_name}.nil?
- per_page = if #{options[:per_page].present?.inspect}
+ @#{plural_name} = @#{plural_name}.paginate(:page => params[:page], :per_page => paginate_per_page)
+ end
+
+ def paginate_per_page
+ if #{options[:per_page].present?.inspect}
#{options[:per_page].inspect}
elsif #{class_name}.methods.map(&:to_sym).include?(:per_page)
#{class_name}.per_page
end
-
- @#{plural_name} = @#{plural_name}.paginate(:page => params[:page], :per_page => per_page)
end
# If the controller is being accessed via an ajax request
@@ -207,6 +209,7 @@ module Refinery
protected :find_#{singular_name},
:find_all_#{plural_name},
:paginate_all_#{plural_name},
+ :paginate_per_page,
:render_partial_response?,
:search_all_#{plural_name}
)
|
Extracted paginate_per_page helper for crudify from complex logic.
|
refinery_refinerycms
|
train
|
rb
|
f90eab8505b1980ca3b533e31060947bb14a522b
|
diff --git a/lib/celluloid/logging/incident_reporter.rb b/lib/celluloid/logging/incident_reporter.rb
index <HASH>..<HASH> 100644
--- a/lib/celluloid/logging/incident_reporter.rb
+++ b/lib/celluloid/logging/incident_reporter.rb
@@ -1,18 +1,29 @@
+require 'logger'
module Celluloid
# Subscribes to log incident topics to report on them.
class IncidentReporter
include Celluloid
include Celluloid::Notifications
+ # get the time from the event
+ class Formatter < ::Logger::Formatter
+ def call(severity, time, progname, msg)
+ super(severity, msg.timestamp, progname, msg.message)
+ end
+ end
+
def initialize
subscribe(/log\.incident/, :report)
+ @logger = ::Logger.new(STDERR)
+ @logger.formatter = Formatter.new
end
def report(topic, incident)
+
puts "INCIDENT"
puts "===================="
incident.events.each do |event|
- puts event.message
+ @logger.add(event.severity, event, event.progname)
end
puts "===================="
end
|
use a Logger to write incident events
Includes a custom formatter that uses the event time instead of the time
given by Logger, which is likely to be inaccurate as most events
actually happened in the past.
The actual format of the log output is the same as the default.
|
celluloid_celluloid
|
train
|
rb
|
51a2eae5e3fc7c3a73aac13ec120121666409b71
|
diff --git a/htmresearch/frameworks/pytorch/modules/k_winners.py b/htmresearch/frameworks/pytorch/modules/k_winners.py
index <HASH>..<HASH> 100644
--- a/htmresearch/frameworks/pytorch/modules/k_winners.py
+++ b/htmresearch/frameworks/pytorch/modules/k_winners.py
@@ -32,6 +32,42 @@ from htmresearch.frameworks.pytorch.functions import k_winners, k_winners2d
+def getEntropy(m):
+ """
+ Function used to get the current and max entropies of KWinners modules.
+
+ :param m: any module
+
+ :return: (currentEntropy, maxEntropy)
+ """
+ if isinstance(m, KWinnersBase):
+ return m.entropy(), m.maxEntropy()
+ else:
+ return 0.0, 0.0
+
+
+def getEntropies(m):
+ """
+ Recursively get the current and max entropies from every child module
+
+ :param m: any module
+
+ :return: (currentEntropy, maxEntropy)
+ """
+ entropy = 0.0
+ max_entropy = 0.0
+ for module in m.children():
+ e, m = getEntropies(module)
+ entropy += e
+ max_entropy += m
+
+ e, m = getEntropy(m)
+ entropy += e
+ max_entropy += m
+
+ return entropy, max_entropy
+
+
def updateBoostStrength(m):
"""
Function used to update KWinner modules boost strength after each epoch.
|
Added generic get entropy function
|
numenta_htmresearch
|
train
|
py
|
3fbbd54fdec72fb8bd09ad73f4d5305ab7605ea6
|
diff --git a/src/actions/general.js b/src/actions/general.js
index <HASH>..<HASH> 100644
--- a/src/actions/general.js
+++ b/src/actions/general.js
@@ -56,6 +56,12 @@ export function getLicenseConfig() {
);
}
+export function getClientConfigAndLicense() {
+ return async (dispatch, getState) => {
+ await Promise.all([getLicenseConfig()(dispatch, getState), getClientConfig()(dispatch, getState)]);
+ };
+}
+
export function logClientError(message, level = 'ERROR') {
return bindClientFunc(
Client4.logClientError,
@@ -101,13 +107,21 @@ export function setStoreFromLocalData(data) {
};
}
+export function setUrl(url) {
+ Client.setUrl(url);
+ Client4.setUrl(url);
+ return true;
+}
+
export default {
getPing,
getClientConfig,
getLicenseConfig,
+ getClientConfigAndLicense,
logClientError,
setAppState,
setDeviceToken,
setServerVersion,
- setStoreFromLocalData
+ setStoreFromLocalData,
+ setUrl
};
|
Add action to get both client and license config at the same time
|
mattermost_mattermost-redux
|
train
|
js
|
e35d8bfe0c0e2bd3e23340b594c4ba1dd602a760
|
diff --git a/Bool/Bool.php b/Bool/Bool.php
index <HASH>..<HASH> 100644
--- a/Bool/Bool.php
+++ b/Bool/Bool.php
@@ -50,11 +50,13 @@ class Bool implements BuilderInterface
*/
public function addToBool(BuilderInterface $bool, $type = self::MUST)
{
- if (in_array($type, [ self::MUST, self::MUST_NOT, self::SHOULD ])) {
- $this->container[$type][] = $bool;
- } else {
+ $constants = (new \ReflectionObject($this))->getConstants();
+
+ if (!in_array($type, $constants)) {
throw new \UnexpectedValueException(sprintf('The bool operator %s is not supported', $type));
}
+
+ $this->container[$type][] = $bool;
}
/**
|
refactored Bool::addToBool method
|
ongr-io_ElasticsearchDSL
|
train
|
php
|
d43271d11f7d6e86dfd5c5708ca2942761cc96eb
|
diff --git a/module/image-set.js b/module/image-set.js
index <HASH>..<HASH> 100644
--- a/module/image-set.js
+++ b/module/image-set.js
@@ -629,7 +629,8 @@ export class ImageSet {
// Build the form data
const formData = cls.behaviours.formData[this._behaviours.formData](
this,
- file
+ file,
+ version
)
// Set up the uploader
diff --git a/module/utils/behaviours/defaults.js b/module/utils/behaviours/defaults.js
index <HASH>..<HASH> 100644
--- a/module/utils/behaviours/defaults.js
+++ b/module/utils/behaviours/defaults.js
@@ -38,9 +38,14 @@ export function formData() {
/**
* Return the minimal FormData instance required to upload a file.
*/
- function _formData(inst, file) {
+ function _formData(inst, file, version) {
const data = new FormData()
data.append('file', file)
+
+ if (version) {
+ data.append('version', version)
+ }
+
return data
}
|
Default form data behaviour now includes version as a parameter for image sets
|
GetmeUK_manhattan-js-assets
|
train
|
js,js
|
e52fc6156900b035cc9ecd014b19d6b153630bdf
|
diff --git a/src/Native5/UI/ScriptPathResolver.php b/src/Native5/UI/ScriptPathResolver.php
index <HASH>..<HASH> 100644
--- a/src/Native5/UI/ScriptPathResolver.php
+++ b/src/Native5/UI/ScriptPathResolver.php
@@ -75,12 +75,14 @@ class ScriptPathResolver
$searchFolder = 'scripts';
} else if(preg_match('/.*\.css$/', $name)) {
$searchFolder = 'styles';
+ } else if(preg_match('/.*\.(?:jpg|jpeg|gif|png)$/', $name)) {
+ $searchFolder = 'images';
} else {
$isUrl = true;
$name = DIRECTORY_SEPARATOR.$app->getConfiguration()->getApplicationContext().DIRECTORY_SEPARATOR.$name;
}
- if($isUrl) {
+ if ($isUrl) {
return $name;
}
|
Fixed issue with Image Path Resolution in Client Library
|
native5_native5-sdk-client-php
|
train
|
php
|
9843ae9adedb5197ed00d27f7c55f36bd946f1f0
|
diff --git a/salt/modules/status.py b/salt/modules/status.py
index <HASH>..<HASH> 100644
--- a/salt/modules/status.py
+++ b/salt/modules/status.py
@@ -139,6 +139,8 @@ def uptime():
The uptime function was changed to return a dictionary of easy-to-read
key/value pairs containing uptime information, instead of the output
from a ``cmd.run`` call.
+ .. versionchanged:: carbon
+ Fall back to output of `uptime` when /proc/uptime is not available.
CLI Example:
@@ -160,6 +162,8 @@ def uptime():
raise CommandExecutionError('The boot_time kstat was not found.')
utc_time = datetime.datetime.utcfromtimestamp(float(res['stdout'].split()[1].strip()))
ut_ret['seconds'] = int((datetime.datetime.utcnow() - utc_time).total_seconds())
+ elif salt.utils.which('uptime'):
+ return __salt__['cmd.run']('uptime')
else:
raise CommandExecutionError('This platform is not supported')
|
status.uptime - readded fallback to uptime binary, atleast we get something on the BSDs too now
|
saltstack_salt
|
train
|
py
|
a66644f1d7284718a8a9ab7fbff9a3d0415c180f
|
diff --git a/percy/percy.test.js b/percy/percy.test.js
index <HASH>..<HASH> 100644
--- a/percy/percy.test.js
+++ b/percy/percy.test.js
@@ -18,7 +18,10 @@ jest.setTimeout(600000)
const PERCY_EXTRA_WAIT = 5000
const percySnapshotWithWait = async (page, name) => {
await page.waitForTimeout(PERCY_EXTRA_WAIT)
- await percySnapshot(page, name, { enableJavascript: true })
+ await percySnapshot(page, name, {
+ enableJavascript: true,
+ percyCSS: '.link-button.pull-right: {display:none}'
+ })
}
let browser
|
ci(percy): hide refresh button that won't let itself be standardized
|
opentripplanner_otp-react-redux
|
train
|
js
|
0901ace5677377afa84e7c9fad3215f430db2209
|
diff --git a/packages/blueprint/lib/RouterBuilder.js b/packages/blueprint/lib/RouterBuilder.js
index <HASH>..<HASH> 100644
--- a/packages/blueprint/lib/RouterBuilder.js
+++ b/packages/blueprint/lib/RouterBuilder.js
@@ -122,7 +122,7 @@ RouterBuilder.prototype.addSpecification = function (spec, currPath) {
var result = controller.invoke ();
var resultType = typeof result;
- if (resultType === 'function') {
+ if (resultType === 'function' || Array.isArray (result)) {
// Push the function onto the middleware stack.
middleware.push (result);
}
|
Added support for controller method returning arrays
|
onehilltech_blueprint
|
train
|
js
|
7239036e2d919c45241d8e346ce9e40f407c155f
|
diff --git a/exchange/bitswap/strategy/strategy.go b/exchange/bitswap/strategy/strategy.go
index <HASH>..<HASH> 100644
--- a/exchange/bitswap/strategy/strategy.go
+++ b/exchange/bitswap/strategy/strategy.go
@@ -72,6 +72,8 @@ func (s *strategist) Seed(int64) {
// TODO
}
+// MessageReceived performs book-keeping. Returns error if passed invalid
+// arguments.
func (s *strategist) MessageReceived(p peer.Peer, m bsmsg.BitSwapMessage) error {
s.lock.Lock()
defer s.lock.Unlock()
@@ -91,7 +93,7 @@ func (s *strategist) MessageReceived(p peer.Peer, m bsmsg.BitSwapMessage) error
// FIXME extract blocks.NumBytes(block) or block.NumBytes() method
l.ReceivedBytes(len(block.Data))
}
- return errors.New("TODO")
+ return nil
}
// TODO add contents of m.WantList() to my local wantlist? NB: could introduce
|
clarify MessageReceived contract
License: MIT
|
ipfs_go-ipfs
|
train
|
go
|
0dbe46d11b00ec033f89935fcdd069165fa0c452
|
diff --git a/src/Providers/AuthorizationServiceProvider.php b/src/Providers/AuthorizationServiceProvider.php
index <HASH>..<HASH> 100644
--- a/src/Providers/AuthorizationServiceProvider.php
+++ b/src/Providers/AuthorizationServiceProvider.php
@@ -54,23 +54,23 @@ class AuthorizationServiceProvider extends ServiceProvider
private function registerLogViewerPolicies(GateContract $gate)
{
// TODO: Complete the log-viewer policy implementations.
- $gate->define('foundation::log-viewer.dashboard', function ($user) {
+ $gate->define('foundation.logviewer.dashboard', function ($user) {
return true;
});
- $gate->define('foundation::log-viewer.list', function ($user) {
+ $gate->define('foundation.logviewer.list', function ($user) {
return true;
});
- $gate->define('foundation::log-viewer.show', function ($user) {
+ $gate->define('foundation.logviewer.show', function ($user) {
return true;
});
- $gate->define('foundation::log-viewer.download', function ($user) {
+ $gate->define('foundation.logviewer.download', function ($user) {
return true;
});
- $gate->define('foundation::log-viewer.delete', function ($user) {
+ $gate->define('foundation.logviewer.delete', function ($user) {
return true;
});
}
|
Updating the LogViewer abilities to match with the permissions
|
ARCANESOFT_Foundation
|
train
|
php
|
63d4135add741e99f9cc2af5cdd354ee61a64e8a
|
diff --git a/lib/Skeleton/Core/Web/Media.php b/lib/Skeleton/Core/Web/Media.php
index <HASH>..<HASH> 100644
--- a/lib/Skeleton/Core/Web/Media.php
+++ b/lib/Skeleton/Core/Web/Media.php
@@ -148,7 +148,7 @@ class Media {
}
unset($path_parts[0]);
- $package_path = $package->asset_path . '/' . $filetype . '/' . $pathinfo['dirname'] . '/' . $pathinfo['basename'];
+ $package_path = $package->asset_path . '/' . $filetype . '/' . $pathinfo['basename'];
$filepaths[] = $package_path;
}
}
|
Fix building skeleton package asset path
|
tigron_skeleton-core
|
train
|
php
|
2cb7f2190ad6cebcf864948673e92fc2c9b9b219
|
diff --git a/lib/Pagon/Middleware/Booster.php b/lib/Pagon/Middleware/Booster.php
index <HASH>..<HASH> 100644
--- a/lib/Pagon/Middleware/Booster.php
+++ b/lib/Pagon/Middleware/Booster.php
@@ -12,8 +12,12 @@ class Booster extends Middleware
{
$app = $this->app;
- // configure timezone
- if (isset($app->timezone)) date_default_timezone_set($app->timezone);
+ // Set encoding
+ iconv_set_encoding("internal_encoding", $app->charset);
+ mb_internal_encoding($app->charset);
+
+ // Configure timezone
+ date_default_timezone_set($app->timezone);
// configure debug
if ($app->enabled('debug')) $app->add(new Middleware\PrettyException());
|
Move encoding set to Booster
|
hfcorriez_pagon
|
train
|
php
|
57cac8bd2fa2cbf455ef9c14351feb1c5789d5b9
|
diff --git a/lib/jekyll-admin/server.rb b/lib/jekyll-admin/server.rb
index <HASH>..<HASH> 100644
--- a/lib/jekyll-admin/server.rb
+++ b/lib/jekyll-admin/server.rb
@@ -52,14 +52,13 @@ module JekyllAdmin
end
def sanitized_path(path)
- path = path.to_s.gsub(%r!\A#{Regexp.escape(JekyllAdmin.site.source)}!, "")
+ path = path_without_site_source(path)
Jekyll.sanitized_path JekyllAdmin.site.source, path
end
# Returns the sanitized path relative to the site source
def sanitized_relative_path(path)
- path = sanitized_path(path)
- path.sub(%r!\A#{Regexp.escape(JekyllAdmin.site.source)}!, "")
+ path_without_site_source sanitized_path(path)
end
def filename
@@ -155,5 +154,9 @@ module JekyllAdmin
return input if input.nil? || input.empty? || input.start_with?("/")
"/#{input}"
end
+
+ def path_without_site_source(path)
+ path.to_s.gsub(%r!\A#{Regexp.escape(JekyllAdmin.site.source)}!, "")
+ end
end
end
|
DRY up removing the site source
|
jekyll_jekyll-admin
|
train
|
rb
|
f4d0979f3b627f9f671574ae4947c37b0ca4c67d
|
diff --git a/LiipImagineBundle.php b/LiipImagineBundle.php
index <HASH>..<HASH> 100644
--- a/LiipImagineBundle.php
+++ b/LiipImagineBundle.php
@@ -40,13 +40,13 @@ class LiipImagineBundle extends Bundle
{
parent::build($container);
+ $container->addCompilerPass(new NonFunctionalFilterExceptionPass());
$container->addCompilerPass(new DriverCompilerPass());
$container->addCompilerPass(new LoadersCompilerPass());
$container->addCompilerPass(new FiltersCompilerPass());
$container->addCompilerPass(new PostProcessorsCompilerPass());
$container->addCompilerPass(new ResolversCompilerPass());
$container->addCompilerPass(new MetadataReaderCompilerPass());
- $container->addCompilerPass(new NonFunctionalFilterExceptionPass());
if (class_exists(AddTopicMetaPass::class)) {
$container->addCompilerPass(AddTopicMetaPass::create()
|
pr/<I>: Move 'NonFunctionalFilterExceptionPass' to be called first
|
liip_LiipImagineBundle
|
train
|
php
|
06624ac8619259afbed1d0c4df9465f725781e46
|
diff --git a/server/src/auth/auth0.js b/server/src/auth/auth0.js
index <HASH>..<HASH> 100644
--- a/server/src/auth/auth0.js
+++ b/server/src/auth/auth0.js
@@ -45,7 +45,7 @@ function auth0(horizon, raw_options) {
https.request({ host, path: '/userinfo',
headers: { Authorization: `Bearer ${access_token}` } });
- const extract_id = (user_info) => user_info && user_info.identities[0].user_id;
+ const extract_id = (user_info) => user_info && user_info.user_id;
auth_utils.oauth2({
|
fixing user id extraction from auth0 info (#<I>)
|
rethinkdb_horizon
|
train
|
js
|
90a2b4eeeff0155f619fa5c3069c6d8a6eb71dfd
|
diff --git a/core.js b/core.js
index <HASH>..<HASH> 100644
--- a/core.js
+++ b/core.js
@@ -197,7 +197,7 @@ class Location extends EventEmitter {
}
// triggers navigation
get href() { return this._url.href || ''; }
- set href(href) { this._url = new url.URL(href, this._url.href); this.update(); }
+ set href(href) { this._url = new url.URL(href, _getBaseUrl(this._url.href)); this.update(); }
get protocol() { return this._url.protocol || ''; }
set protocol(protocol) { this._url.protocol = protocol; this.update(); }
get host() { return this._url.host || ''; }
|
Make Location href setting respect the base url
|
exokitxr_exokit
|
train
|
js
|
6c14ca8dca559c5f7cad2be566a7c5111b5b5ad9
|
diff --git a/src/actions/breakpoints/breakpointPositions.js b/src/actions/breakpoints/breakpointPositions.js
index <HASH>..<HASH> 100644
--- a/src/actions/breakpoints/breakpointPositions.js
+++ b/src/actions/breakpoints/breakpointPositions.js
@@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
+// @flow
+
import {
getSourceActors,
getBreakpointPositionsForLine
|
Add flow type to breakpointPositions (#<I>)
|
firefox-devtools_debugger
|
train
|
js
|
6e60b7097791d7d880468a2b93b2b0aeb4e8fbde
|
diff --git a/src/session.js b/src/session.js
index <HASH>..<HASH> 100644
--- a/src/session.js
+++ b/src/session.js
@@ -148,6 +148,13 @@ ghostdriver.Session = function(desiredCapabilities) {
args.splice(0, 3);
}
+ // Our callbacks assume that the only thing affecting the page state
+ // is the function we execute. Therefore we need to kill any
+ // pre-existing activity (such as part of the page being loaded in
+ // the background), otherwise it's events might interleave with the
+ // events from the current function.
+ this.stop();
+
// Register event handlers
// This logic bears some explaining. If we are loading a new page,
// the loadStarted event will fire, then urlChanged, then loadFinished,
|
Stop the page before trying to load a new URL, otherwise our callbacks get confused.
|
detro_ghostdriver
|
train
|
js
|
b826dc91cedc0d17721cc15c244142417a46e111
|
diff --git a/class.simple_mail.php b/class.simple_mail.php
index <HASH>..<HASH> 100755
--- a/class.simple_mail.php
+++ b/class.simple_mail.php
@@ -546,7 +546,7 @@ class SimpleMail
public function formatHeader($email, $name = null)
{
$email = $this->filterEmail((string) $email);
- if (empty(trim($name))) {
+ if (empty($name)) {
return $email;
}
$name = $this->encodeUtf8($this->filterName((string) $name));
|
Fix issue with calling `trim` and expecting a return value in PHP < <I>
|
eoghanobrien_php-simple-mail
|
train
|
php
|
1ba78d7a4b0e1f9468d7ff5131dcd9e939ae811d
|
diff --git a/lib/create-clusters.js b/lib/create-clusters.js
index <HASH>..<HASH> 100644
--- a/lib/create-clusters.js
+++ b/lib/create-clusters.js
@@ -8,6 +8,7 @@ function createClusters(selection, g) {
svgClusters = selection.selectAll("g.cluster")
.data(clusters, function(v) { return v; });
+ svgClusters.selectAll("*").remove();
svgClusters.enter()
.append("g")
.attr("class", "cluster")
|
Remove contents of cluster on change
Fixes #<I>
|
dagrejs_dagre-d3
|
train
|
js
|
3750ce8b0933d8d445e1e2625248a6bf50e4744a
|
diff --git a/tools/java/src/com/twitter/bazel/checkstyle/JavaCheckstyle.java b/tools/java/src/com/twitter/bazel/checkstyle/JavaCheckstyle.java
index <HASH>..<HASH> 100644
--- a/tools/java/src/com/twitter/bazel/checkstyle/JavaCheckstyle.java
+++ b/tools/java/src/com/twitter/bazel/checkstyle/JavaCheckstyle.java
@@ -95,7 +95,9 @@ public final class JavaCheckstyle {
// Filter out files under heron/storm directory due to license issues
Collection<String> sourceFiles = Collections2.filter(jInfo.getSourceFileList(),
- Predicates.not(Predicates.containsPattern("heron/storm/src/java"))
+ Predicates.not(Predicates.or(
+ Predicates.containsPattern("heron/storm/src/java"),
+ Predicates.containsPattern("contrib/kafka-spout")))
);
return sourceFiles.toArray(new String[sourceFiles.size()]);
|
disable checkstyle for kafka-spout
|
apache_incubator-heron
|
train
|
java
|
f78042cf26446fb423e341cd0efc574e3baa1f4d
|
diff --git a/lib/Array/prototype/common-left.js b/lib/Array/prototype/common-left.js
index <HASH>..<HASH> 100644
--- a/lib/Array/prototype/common-left.js
+++ b/lib/Array/prototype/common-left.js
@@ -4,13 +4,11 @@
var every = Array.prototype.every
, call = Function.prototype.call
- , assertNotNull = require('../../assert-not-null')
, toArray = require('../../Object/to-array')
, sortMethod = call.bind(require('../../Object/get-compare-by')('length'));
module.exports = function (list) {
var lists, r, l;
- assertNotNull(this);
lists = [this].concat(toArray(arguments)).sort(sortMethod);
l = r = lists[0].length >>> 0;
|
Input arguments are already validated by sortMethod
|
medikoo_es5-ext
|
train
|
js
|
ae1083e766dd00b6372d62483bb01e6d4427f96b
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@ setup(
license='BSD License',
description='A simple python wrapper around National Rail Enquires LDBS SOAP Webservice',
long_description=README,
- #url='https://github.com/robert-b-clarke/django-laconicurls',
+ url='https://github.com/robert-b-clarke/nre-darwin-py',
author='Robert Clarke',
author_email='rob@redanorak.co.uk',
test_suite='test_nredarwin',
@@ -30,6 +30,6 @@ setup(
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
- 'Development Status :: 4 - Beta',
+ 'Development Status :: 4 - Beta'
],
)
|
add link from setup to github
|
robert-b-clarke_nre-darwin-py
|
train
|
py
|
a7baafc02243e2c2ed9b24b6d0440542d3f2bd14
|
diff --git a/src/main/java/org/springframework/hateoas/PagedResources.java b/src/main/java/org/springframework/hateoas/PagedResources.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/springframework/hateoas/PagedResources.java
+++ b/src/main/java/org/springframework/hateoas/PagedResources.java
@@ -168,10 +168,6 @@ public class PagedResources<T> extends Resources<T> {
*
* @author Oliver Gierke
*/
- @org.codehaus.jackson.annotate.JsonAutoDetect(
- fieldVisibility = org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.ANY)
- @com.fasterxml.jackson.annotation.JsonAutoDetect(
- fieldVisibility = com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY)
public static class PageMetadata {
@XmlAttribute//
|
#<I> - Removed obsolete annotations from PagedResources.
Removed JsonAutoDetect annotations from PagedResources as the reference to Visibility was causing compile errors in case one of the 2 Jackson variants was not on the classpath (which by design will usually be the case). Generally, the annotations weren't required anymore so that we could remove them.
|
spring-projects_spring-hateoas
|
train
|
java
|
f7803aee788ea47fba64ff6e90dafdbdd9d12447
|
diff --git a/spec/unit/active_attr/typecasting_spec.rb b/spec/unit/active_attr/typecasting_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/active_attr/typecasting_spec.rb
+++ b/spec/unit/active_attr/typecasting_spec.rb
@@ -123,12 +123,12 @@ module ActiveAttr
end
context "from Float::INFINITY" do
- let(:value) { Float::INFINITY }
+ let(:value) { 1.0 / 0.0 }
it { should be_nil }
end
context "from Float::NAN" do
- let(:value) { Float::NAN }
+ let(:value) { 0.0 / 0.0 }
it { should be_nil }
end
end
|
No Float::INFINITY or FLOAT::NAN in <I>x, use computations resulting in those values for #5
|
cgriego_active_attr
|
train
|
rb
|
96aa3bd0eae0afa98a1a16d87f5e0b6fa0005dab
|
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/http/url.rb
+++ b/actionpack/lib/action_dispatch/http/url.rb
@@ -64,7 +64,7 @@ module ActionDispatch
end
def host_or_subdomain_and_domain(options)
- return options[:host] unless options[:subdomain] || options[:subdomain] == false || options[:domain]
+ return options[:host] if options[:subdomain].nil? && options[:domain].nil?
tld_length = options[:tld_length] || @@tld_length
@@ -73,7 +73,7 @@ module ActionDispatch
host << (options[:subdomain] || extract_subdomain(options[:host], tld_length))
host << "."
end
- host << (options[:domain] || extract_domain(options[:host], tld_length))
+ host << (options[:domain] || extract_domain(options[:host], tld_length))
host
end
end
|
Clean up subdomain code a bit.
|
rails_rails
|
train
|
rb
|
677d19b85fb7f85bc1a4999719768150b4f8700f
|
diff --git a/src/PhpFileFinder.php b/src/PhpFileFinder.php
index <HASH>..<HASH> 100644
--- a/src/PhpFileFinder.php
+++ b/src/PhpFileFinder.php
@@ -22,7 +22,7 @@ class PhpFileFinder
), '/^.+\.php$/i', \RecursiveRegexIterator::GET_MATCH
);
foreach ($regexIterator as $fileName) {
- $collection->add(new PhpFile(new \SplFileInfo($fileName[0])));
+ $collection = $collection->add(new PhpFile(new \SplFileInfo($fileName[0])));
}
return $collection;
|
Fix bug where immutable collection was treated like mutable
|
mihaeu_dephpend
|
train
|
php
|
f7059bdb09d9fdec0e78e61bb3d3b69159e69e51
|
diff --git a/Grido/Components/Filters/Filter.php b/Grido/Components/Filters/Filter.php
index <HASH>..<HASH> 100755
--- a/Grido/Components/Filters/Filter.php
+++ b/Grido/Components/Filters/Filter.php
@@ -153,7 +153,12 @@ abstract class Filter extends \Grido\Components\Base
public function getColumns()
{
if (!$this->columns) {
- $this->setColumn($this->name);
+ $column = $this->name;
+ if ($column = $this->grid->getColumn($this->name, FALSE)) {
+ $column = $column->column; //use db column from column compoment
+ }
+
+ $this->setColumn($column);
}
return $this->columns;
|
Filters: Use db's column from column component when not set and column component with the same name exists
|
o5_grido
|
train
|
php
|
4d0c65a57ee6052ec0bafcca483cac3719153606
|
diff --git a/ddmrp_adjustment/models/stock_warehouse_orderpoint.py b/ddmrp_adjustment/models/stock_warehouse_orderpoint.py
index <HASH>..<HASH> 100644
--- a/ddmrp_adjustment/models/stock_warehouse_orderpoint.py
+++ b/ddmrp_adjustment/models/stock_warehouse_orderpoint.py
@@ -38,7 +38,7 @@ class StockWarehouseOrderpoint(models.Model):
for val in values:
daf *= val
prev = self.adu
- self.with_context(__no_adu_calc=True).adu *= daf
+ self.adu *= daf
_logger.debug(
"DAF=%s applied to %s. ADU: %s -> %s" %
(daf, self.name, prev, self.adu))
|
[<I>][FIX] ADU *must* only be computed by the cron job (we do *not* want real-time ADU).
|
OCA_ddmrp
|
train
|
py
|
fc46a7cb76659255adaa7f3e27857a15c1563c3a
|
diff --git a/tests/Generator/GeneratorTest.php b/tests/Generator/GeneratorTest.php
index <HASH>..<HASH> 100755
--- a/tests/Generator/GeneratorTest.php
+++ b/tests/Generator/GeneratorTest.php
@@ -650,7 +650,7 @@ class GeneratorTest extends TestCase
{
$instance = self::getBingGeneratorInstance();
- if (PHP_VERSION_ID < 70013) {
+ if (PHP_VERSION_ID < 70015) {
$this->assertSame(array(), $instance->getSoapClient()->getSoapClientStreamContextOptions());
} else {
$this->assertSame(array(
|
issue #<I> - fix unit test based on php version
|
WsdlToPhp_PackageGenerator
|
train
|
php
|
0509fcf889e863bbb844347fbf7df0c0c1b7b9b0
|
diff --git a/app/controllers/storytime/posts_controller.rb b/app/controllers/storytime/posts_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/storytime/posts_controller.rb
+++ b/app/controllers/storytime/posts_controller.rb
@@ -41,8 +41,8 @@ module Storytime
@comments = @post.comments.order("created_at DESC")
#allow overriding in the host app
- if lookup_context.template_exists?("storytime/posts/#{@post.slug}")
- render @post.slug
+ if lookup_context.template_exists?("storytime/#{@post.type_name.pluralize}/#{@post.slug}")
+ render "storytime/#{@post.type_name.pluralize}/#{@post.slug}"
elsif lookup_context.template_exists?("storytime/#{@post.type_name.pluralize}/show")
render "storytime/#{@post.type_name.pluralize}/show"
end
|
custom post type show by slug
|
CultivateLabs_storytime
|
train
|
rb
|
a0c596440b7d0844bdd6dd38177f40f27abf2e7b
|
diff --git a/exp/sdb/integration_test/tests.go b/exp/sdb/integration_test/tests.go
index <HASH>..<HASH> 100644
--- a/exp/sdb/integration_test/tests.go
+++ b/exp/sdb/integration_test/tests.go
@@ -338,10 +338,6 @@ func (t *ItemsTest) BatchPutThenGet() {
)
}
-func (t *ItemsTest) BatchPutThenBatchGet() {
- ExpectEq("TODO", "")
-}
-
func (t *ItemsTest) GetForNonExistentItem() {
ExpectEq("TODO", "")
}
@@ -350,22 +346,10 @@ func (t *ItemsTest) GetParticularAttributes() {
ExpectEq("TODO", "")
}
-func (t *ItemsTest) BatchGetParticularAttributes() {
- ExpectEq("TODO", "")
-}
-
-func (t *ItemsTest) BatchGetForNonExistentItems() {
- ExpectEq("TODO", "")
-}
-
func (t *ItemsTest) GetNonExistentAttributeName() {
ExpectEq("TODO", "")
}
-func (t *ItemsTest) BatchGetNonExistentAttributeName() {
- ExpectEq("TODO", "")
-}
-
func (t *ItemsTest) FailedValuePrecondition() {
ExpectEq("TODO", "")
}
|
There's no such thing as batch get.
|
jacobsa_aws
|
train
|
go
|
7a3bc60e46159669dac4c56be28eb2cd8f626b56
|
diff --git a/structr-core/src/main/java/org/structr/module/JarConfigurationProvider.java b/structr-core/src/main/java/org/structr/module/JarConfigurationProvider.java
index <HASH>..<HASH> 100644
--- a/structr-core/src/main/java/org/structr/module/JarConfigurationProvider.java
+++ b/structr-core/src/main/java/org/structr/module/JarConfigurationProvider.java
@@ -1084,7 +1084,8 @@ public class JarConfigurationProvider implements ConfigurationProvider {
}
}
- } catch (Throwable ignore) {
+ } catch (Throwable t) {
+ logger.log(Level.FINEST, "Error trying to load class " + className, t);
}
}
}
|
Adds logging with level FINEST to get information about classes with unmet dependencies in modules.
|
structr_structr
|
train
|
java
|
97f02bcdc7c2d23663cb050bd1dfbedd413ffebe
|
diff --git a/lib/Boris/ReadlineClient.php b/lib/Boris/ReadlineClient.php
index <HASH>..<HASH> 100644
--- a/lib/Boris/ReadlineClient.php
+++ b/lib/Boris/ReadlineClient.php
@@ -7,6 +7,9 @@
*/
class Boris_ReadlineClient {
private $_socket;
+ private $_prompt;
+ private $_historyFile;
+ private $_clear = false;
/**
* Create a new ReadlineClient using $socket for communication.
@@ -30,13 +33,20 @@ class Boris_ReadlineClient {
declare(ticks = 1);
pcntl_signal(SIGCHLD, SIG_IGN);
+ pcntl_signal(SIGINT, array($this, 'clear'));
$parser = new Boris_ShallowParser();
$buf = '';
for (;;) {
+ $this->_clear = false;
$line = readline($buf == '' ? $prompt : str_pad('*> ', strlen($prompt), ' ', STR_PAD_LEFT));
+ if ($this->_clear) {
+ $buf = '';
+ continue;
+ }
+
if (false === $line) {
$buf = 'exit(0);'; // ctrl-d acts like exit
}
@@ -65,4 +75,8 @@ class Boris_ReadlineClient {
}
}
}
+
+ public function clear() {
+ $this->_clear = true;
+ }
}
|
Clear buffer on ctrl-c... this seems to have a nasty side-effect on the ctrl-d handling though
|
borisrepl_boris
|
train
|
php
|
74f9f4f7a0b559fa6b3da4912f32a36a8358c3d0
|
diff --git a/ring.go b/ring.go
index <HASH>..<HASH> 100644
--- a/ring.go
+++ b/ring.go
@@ -203,7 +203,7 @@ func (ring *Ring) heartbeat() {
for _, shard := range ring.shards {
err := shard.Client.Ping().Err()
- if shard.Vote(err == nil) {
+ if shard.Vote(err == nil || err == errPoolTimeout) {
log.Printf("redis: ring shard state changed: %s", shard)
rebalance = true
}
|
ring: ignore pool timeout when pinging shards.
|
go-redis_redis
|
train
|
go
|
9561ba76ddecc725e6e32c925edea3a743be4223
|
diff --git a/category/selectors/index.js b/category/selectors/index.js
index <HASH>..<HASH> 100644
--- a/category/selectors/index.js
+++ b/category/selectors/index.js
@@ -124,3 +124,8 @@ export const getCurrentCategories = createSelector(
return null;
}
);
+
+export const getCategoryProductCount = createSelector(
+ getCurrentCategory,
+ category => category.productCount || null
+);
|
Added getCategoryProductCount selector
|
shopgate_pwa
|
train
|
js
|
49c36933e66b11c6a3ace93532c7393100f2a21c
|
diff --git a/player_js.go b/player_js.go
index <HASH>..<HASH> 100644
--- a/player_js.go
+++ b/player_js.go
@@ -123,8 +123,16 @@ func (p *player) Write(data []byte) (int, error) {
buf := p.context.Call("createBuffer", p.channelNum, sizeInSamples, p.sampleRate)
l, r := toLR(p.tmp[:p.bufferSize])
- buf.Call("copyToChannel", l, 0, 0)
- buf.Call("copyToChannel", r, 1, 0)
+ if buf.Get("copyToChannel") != js.Undefined {
+ buf.Call("copyToChannel", l, 0, 0)
+ buf.Call("copyToChannel", r, 1, 0)
+ } else {
+ // copyToChannel is not defined on Safari 11
+ outL := buf.Call("getChannelData", 0).Interface().([]float32)
+ outR := buf.Call("getChannelData", 1).Interface().([]float32)
+ copy(outL, l)
+ copy(outR, r)
+ }
s := p.context.Call("createBufferSource")
s.Set("buffer", buf)
|
js: Bug fix: copyToChannel is not defined on Safari
|
hajimehoshi_oto
|
train
|
go
|
54a625aae8021e8ed3c3c1504f2f5f7162a44577
|
diff --git a/plenum/__init__.py b/plenum/__init__.py
index <HASH>..<HASH> 100644
--- a/plenum/__init__.py
+++ b/plenum/__init__.py
@@ -5,6 +5,11 @@ plenum package
from __future__ import absolute_import, division, print_function
import sys
+import plenum
if sys.version_info < (3, 5, 0):
raise ImportError("Python 3.5.0 or later required.")
+
+import importlib
+from .__metadata__ import *
+
|
Hotfix: Deps (#<I>)
|
hyperledger_indy-plenum
|
train
|
py
|
2e584d8e4e72a229c0a18182d231022d05356ef7
|
diff --git a/tests/fixtures/issues/issue-470.php b/tests/fixtures/issues/issue-470.php
index <HASH>..<HASH> 100644
--- a/tests/fixtures/issues/issue-470.php
+++ b/tests/fixtures/issues/issue-470.php
@@ -133,7 +133,7 @@ return [
'Device_Name' => '2320 classic',
'Device_Maker' => 'Nokia',
'Device_Type' => 'Mobile Phone',
- 'Device_Pointing_Method' => 'touchscreen',
+ 'Device_Pointing_Method' => 'unknown',
'Device_Code_Name' => '2323c',
'Device_Brand_Name' => 'Nokia',
'RenderingEngine_Name' => 'unknown',
|
#<I>: change pointing method inside test
|
browscap_browscap
|
train
|
php
|
486229e57aacfb945cd3ce3879efb3a9abb85a8a
|
diff --git a/spec/controllers/static_controller_spec.rb b/spec/controllers/static_controller_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controllers/static_controller_spec.rb
+++ b/spec/controllers/static_controller_spec.rb
@@ -9,7 +9,7 @@ describe StaticController do
response.should render_template "layouts/homepage"
end
it "renders no layout with javascript" do
- get "mendeley" ,{format:"js"}
+ xhr :get, :mendeley
response.should be_success
response.should_not render_template "layouts/homepage"
end
@@ -22,7 +22,7 @@ describe StaticController do
response.should render_template "layouts/homepage"
end
it "renders no layout with javascript" do
- get "zotero" ,{format:"js"}
+ xhr :get, :zotero
response.should be_success
response.should_not render_template "layouts/homepage"
end
|
Test for an XHR request, not for a javascript format
|
samvera_hyrax
|
train
|
rb
|
bba4bab1772c6dee6508f3ee01febfce7e8b55ca
|
diff --git a/lib/textbringer/controller.rb b/lib/textbringer/controller.rb
index <HASH>..<HASH> 100644
--- a/lib/textbringer/controller.rb
+++ b/lib/textbringer/controller.rb
@@ -59,7 +59,8 @@ module Textbringer
end
end
rescue => e
- Window.echo_area.show(e.to_s.chomp)
+ message(e.to_s.chomp)
+ STDERR.puts(e.backtrace)
Window.beep
end
Window.redisplay
@@ -101,7 +102,7 @@ module Textbringer
def key_binding(key_sequence)
@overriding_map&.lookup(key_sequence) ||
- Buffer.current.keymap&.lookup(key_sequence) ||
+ Buffer.current&.keymap&.lookup(key_sequence) ||
GLOBAL_MAP.lookup(key_sequence)
end
end
diff --git a/lib/textbringer/minibuffer.rb b/lib/textbringer/minibuffer.rb
index <HASH>..<HASH> 100644
--- a/lib/textbringer/minibuffer.rb
+++ b/lib/textbringer/minibuffer.rb
@@ -3,6 +3,9 @@
module Textbringer
module Minibuffer
def message(msg)
+ buffer = Buffer.find_or_new("*Messages*")
+ buffer.end_of_buffer
+ buffer.insert(msg + "\n")
Window.echo_area.show(msg)
end
|
Log messages are saved in *Messsages*.
|
shugo_textbringer
|
train
|
rb,rb
|
a9958a1d24c11724e1cadca0ce1abbb0b8849f45
|
diff --git a/src/jquery.sidebar.js b/src/jquery.sidebar.js
index <HASH>..<HASH> 100644
--- a/src/jquery.sidebar.js
+++ b/src/jquery.sidebar.js
@@ -22,6 +22,7 @@
* $(".my-sidebar").trigger("sidebar:open");
* $(".my-sidebar").trigger("sidebar:close");
* $(".my-sidebar").trigger("sidebar:toggle");
+ * $(".my-sidebar").trigger("sidebar:close", [{ speed: 0 }]);
* ```
*
* After the sidebar is opened/closed, `sidebar:opened`/`sidebar:closed` event is emitted.
|
Improved a documentation comment
according to a manual change in README.md
|
jillix_jQuery-sidebar
|
train
|
js
|
b031fc61b48b5c910d9b88c91d729856f375e825
|
diff --git a/mbdata/replication.py b/mbdata/replication.py
index <HASH>..<HASH> 100644
--- a/mbdata/replication.py
+++ b/mbdata/replication.py
@@ -249,7 +249,7 @@ def load_tar(filename, db, config, ignored_schemas, ignored_tables):
continue
print(" - Loading {} to {}".format(name, fulltable))
cursor.copy_from(tar.extractfile(member), fulltable)
- db.commit
+ db.commit()
def mbslave_import_main(config, args):
|
Fix commit in mbslave import
|
lalinsky_mbdata
|
train
|
py
|
fddeea35b14439cc2caf09df455716b56a4de8f0
|
diff --git a/bugzoo/bug.py b/bugzoo/bug.py
index <HASH>..<HASH> 100644
--- a/bugzoo/bug.py
+++ b/bugzoo/bug.py
@@ -218,6 +218,7 @@ class Bug(object):
if self.__program:
return "{}:{}:{}".format(self.__dataset.name, self.__program, self.__name)
return "{}:{}".format(self.__dataset.name, self.__name)
+ uid = identifier
def validate(self, verbose: bool = True) -> bool:
"""
|
added 'uid' property to Bug
|
squaresLab_BugZoo
|
train
|
py
|
998045e976129287a96217acdf3efa60916c2593
|
diff --git a/lib/linters/attribute_quotes.js b/lib/linters/attribute_quotes.js
index <HASH>..<HASH> 100644
--- a/lib/linters/attribute_quotes.js
+++ b/lib/linters/attribute_quotes.js
@@ -22,7 +22,7 @@ module.exports = {
results.push({
column: column,
- line: selector.source.start.line,
+ line: node.source.start.line + selector.source.start.line - 1,
message: this.message
});
}
diff --git a/test/specs/linters/attribute_quotes.js b/test/specs/linters/attribute_quotes.js
index <HASH>..<HASH> 100644
--- a/test/specs/linters/attribute_quotes.js
+++ b/test/specs/linters/attribute_quotes.js
@@ -79,7 +79,11 @@ describe('lesshint', function () {
});
it('should check all selectors in a selector group', function () {
- const source = 'input[type=text], input[type=text] {}';
+ const source = [
+ 'input[type=text],',
+ 'input[type=text] {}'
+ ].join('\n');
+
const expected = [
{
column: 12,
@@ -87,8 +91,8 @@ describe('lesshint', function () {
message: 'Attribute selectors should use quotes.'
},
{
- column: 30,
- line: 1,
+ column: 12,
+ line: 2,
message: 'Attribute selectors should use quotes.'
}
];
|
Fix line reporting in attributeQuotes. Closes #<I>
|
lesshint_lesshint
|
train
|
js,js
|
834c3e3ac4fac290b3fc83e45f518a5c76700972
|
diff --git a/test/karma.config.js b/test/karma.config.js
index <HASH>..<HASH> 100644
--- a/test/karma.config.js
+++ b/test/karma.config.js
@@ -5,8 +5,7 @@ delete webpackConfig.entry
module.exports = function (config) {
config.set({
browsers: ['PhantomJS'],
- singleRun: false,
- autoWatch: process.env.TRAVIS ? false : true,
+ singleRun: true,
frameworks: ['mocha', 'chai'],
reporters: ['mocha'],
files: [
|
chore(unit test) edit single run property
|
MatteoGabriele_storage-helper
|
train
|
js
|
5368dd06fdb9dacc9e8dbc5ae846e4de87180b34
|
diff --git a/js/bigone.js b/js/bigone.js
index <HASH>..<HASH> 100644
--- a/js/bigone.js
+++ b/js/bigone.js
@@ -44,7 +44,7 @@ module.exports = class bigone extends Exchange {
'1w': 'week1',
'1M': 'month1',
},
- 'hostname': 'big.one', // set to 'b1.run' for China mainland
+ 'hostname': 'big.one', // or 'bigone.com'
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/69354403-1d532180-0c91-11ea-88ed-44c06cefdf87.jpg',
'api': {
|
bigone minor edits / comments
|
ccxt_ccxt
|
train
|
js
|
042e4abcd807678f0f2739c58a22c295bd64fd94
|
diff --git a/lib/specinfra/version.rb b/lib/specinfra/version.rb
index <HASH>..<HASH> 100644
--- a/lib/specinfra/version.rb
+++ b/lib/specinfra/version.rb
@@ -1,3 +1,3 @@
module Specinfra
- VERSION = "2.34.3"
+ VERSION = "2.34.4"
end
|
Bump up version
[skip ci]
|
mizzy_specinfra
|
train
|
rb
|
53ec3f6980d2292965424e9c12c7e17b23a251b4
|
diff --git a/newrelic_api/servers.py b/newrelic_api/servers.py
index <HASH>..<HASH> 100644
--- a/newrelic_api/servers.py
+++ b/newrelic_api/servers.py
@@ -54,7 +54,9 @@ class Servers(Resource):
}
"""
- label_param = ';'.join(['{}:{}'.format(label, value) for label, value in filter_labels.items()])
+ if filter_labels:
+ label_param = ';'.join(['{}:{}'.format(label, value) for label, value in filter_labels.items()])
+
filters = [
'filter[name]={0}'.format(filter_name) if filter_name else None,
'filter[ids]={0}'.format(','.join([str(app_id) for app_id in filter_ids])) if filter_ids else None,
|
Fix code if `filter_labels` is `None`
|
ambitioninc_newrelic-api
|
train
|
py
|
5b8b7c034630a93517e99d9caa9a71134571ad3a
|
diff --git a/javascript/firefox-driver/js/modals.js b/javascript/firefox-driver/js/modals.js
index <HASH>..<HASH> 100644
--- a/javascript/firefox-driver/js/modals.js
+++ b/javascript/firefox-driver/js/modals.js
@@ -159,12 +159,12 @@ fxdriver.modals.signalOpenModal = function(parent, text) {
if (driver && driver.response_) {
fxdriver.modals.setFlag(driver, text);
var res = driver.response_;
- if (driver.response_.name == 'executeAsyncScript') {
+ if (driver.response_.name == 'executeAsyncScript' && !driver.response_.responseSent_) {
// Special case handling. If a modal is open when executeAsyncScript
// tries to respond with a result, it doesn't do anything, so that this
// codepath can be followed.
fxdriver.modals.isModalPresent(function(present) {
- var errorMessage = 'Unexpected modal dialog (text: ' + text + ')';
+ var errorMessage = 'Unexpected modal dialog (text: ' + text + ')';
if (present) {
try {
fxdriver.modals.dismissAlert(driver);
|
DanielWagnerHall: Only dismiss alert if the current command is still pending. Yeah, there's still a bit of a race condition here, because of the timer that the response is actually sent in, but it's much *less* of a race condition :)
r<I>
|
SeleniumHQ_selenium
|
train
|
js
|
95715c5f2fdef4598b14140acc3f792b255b9d00
|
diff --git a/globus_cli/parsing/shared_options.py b/globus_cli/parsing/shared_options.py
index <HASH>..<HASH> 100644
--- a/globus_cli/parsing/shared_options.py
+++ b/globus_cli/parsing/shared_options.py
@@ -175,12 +175,14 @@ def endpoint_create_and_update_params(*args, **kwargs):
# Managed Endpoint options
f = click.option(
"--managed", "managed", is_flag=True, flag_value=True,
+ default=None,
help=("Set the endpoint as a managed endpoint. Requires the "
"user to be a subscription manager. If the user has "
"multiple subscription IDs, --subscription-id must be used "
"instead"))(f)
f = click.option(
"--no-managed", "managed", is_flag=True, flag_value=False,
+ default=None,
help=("Unset the endpoint as a managed endpoint. "
"Does not require the user to be a subscription manager. "
"Mutually exclusive with --subscription-id"))(f)
|
Make default for --managed "None", not "False"
With `--managed/--no-managed` split into two separate flag arguments,
the default becomes `False` (this is a click behavior, makes sense for
typical is_flag=True options). Explicitly tune the default back to
"None" so that all of the behaviors based on this option remain the
same.
|
globus_globus-cli
|
train
|
py
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.