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
|
---|---|---|---|---|---|
5171604467c4d9e282f65a71da56fde4aa633fef
|
diff --git a/tests/WebPushTest.php b/tests/WebPushTest.php
index <HASH>..<HASH> 100644
--- a/tests/WebPushTest.php
+++ b/tests/WebPushTest.php
@@ -37,6 +37,7 @@ class WebPushTest extends PHPUnit_Framework_TestCase
);
$this->webPush = new WebPush($this->keys);
+ $this->webPush->setAutomaticPadding(false); // disable automatic padding in tests to speed these up
}
public function testSendNotification()
@@ -63,7 +64,7 @@ class WebPushTest extends PHPUnit_Framework_TestCase
{
$res = $this->webPush->sendNotification(
$this->endpoints['standard'],
- 'test',
+ '{message: "Plop", tag: "general"}',
$this->keys['standard'],
null,
true
|
disable automatic padding in tests to speed these up
|
web-push-libs_web-push-php
|
train
|
php
|
5fa30156585e257cdb2803c9b022efab9bba5013
|
diff --git a/tensorflow_datasets/core/download/downloader.py b/tensorflow_datasets/core/download/downloader.py
index <HASH>..<HASH> 100644
--- a/tensorflow_datasets/core/download/downloader.py
+++ b/tensorflow_datasets/core/download/downloader.py
@@ -204,7 +204,8 @@ class _Downloader(object):
self._pbar_dl_size.update(size_mb // unit_mb)
size_mb %= unit_mb
self._pbar_url.update(1)
- return checksums_lib.UrlInfo(checksum=checksum.hexdigest(), size=size)
+ return checksums_lib.UrlInfo(checksum=checksum.hexdigest(),
+ size=size, filename=fname)
def _open_url(url: str) -> ContextManager[Tuple[Response, Iterable[bytes]]]:
|
Update downloader to use url_info.filename
|
tensorflow_datasets
|
train
|
py
|
81329d277feb25270a4b128280c30fe28b43b0d7
|
diff --git a/src/petlx/xlsx.py b/src/petlx/xlsx.py
index <HASH>..<HASH> 100644
--- a/src/petlx/xlsx.py
+++ b/src/petlx/xlsx.py
@@ -32,7 +32,7 @@ def fromxlsx(filename, sheetname, checksumfun=None):
class XLSXView(object):
- def __init__(self, filename, sheetname, checksumfun=None):
+ def __init__(self, filename, sheetname='Sheet1', checksumfun=None):
self.filename = filename
self.sheetname = sheetname
self.checksumfun = checksumfun
|
#<I> add Sheet1 as default sheet name
|
petl-developers_petlx
|
train
|
py
|
8d3b3859f57c9e6336713cd83a1e0eb77d78c33b
|
diff --git a/library/src/main/java/com/getbase/floatingactionbutton/FloatingActionsMenu.java b/library/src/main/java/com/getbase/floatingactionbutton/FloatingActionsMenu.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/getbase/floatingactionbutton/FloatingActionsMenu.java
+++ b/library/src/main/java/com/getbase/floatingactionbutton/FloatingActionsMenu.java
@@ -371,6 +371,7 @@ public class FloatingActionsMenu extends ViewGroup {
private ObjectAnimator mExpandAlpha = new ObjectAnimator();
private ObjectAnimator mCollapseDir = new ObjectAnimator();
private ObjectAnimator mCollapseAlpha = new ObjectAnimator();
+ private boolean animationsSetToPlay;
public LayoutParams(ViewGroup.LayoutParams source) {
super(source);
@@ -407,10 +408,13 @@ public class FloatingActionsMenu extends ViewGroup {
mExpandDir.setTarget(view);
// Now that the animations have targets, set them to be played
- mCollapseAnimation.play(mCollapseAlpha);
- mCollapseAnimation.play(mCollapseDir);
- mExpandAnimation.play(mExpandAlpha);
- mExpandAnimation.play(mExpandDir);
+ if (!animationsSetToPlay) {
+ mCollapseAnimation.play(mCollapseAlpha);
+ mCollapseAnimation.play(mCollapseDir);
+ mExpandAnimation.play(mExpandAlpha);
+ mExpandAnimation.play(mExpandDir);
+ animationsSetToPlay = true;
+ }
}
}
|
Only call AnimatorSet.play() once for each animation
|
futuresimple_android-floating-action-button
|
train
|
java
|
8ad7389de7aeae95fd9862072fbe64e958a2e8c4
|
diff --git a/src/MathParser/Interpreting/RationalEvaluator.php b/src/MathParser/Interpreting/RationalEvaluator.php
index <HASH>..<HASH> 100644
--- a/src/MathParser/Interpreting/RationalEvaluator.php
+++ b/src/MathParser/Interpreting/RationalEvaluator.php
@@ -277,7 +277,7 @@ class RationalEvaluator implements Visitor
case '!':
if ($inner->getDenominator() == 1 && $inner->getNumerator() >= 0)
- return Math::Factorial($inner->getNumerator());
+ return new RationalNode(Math::Factorial($inner->getNumerator()),1);
throw new \UnexpectedValueException("Expecting positive integer (factorial)");
|
RationalEvaluator returning RationalNode for \! and \!\!
|
mossadal_math-parser
|
train
|
php
|
e805930d132adcd23ac1f2921b3ea1b00db70e9f
|
diff --git a/provider/scaleway/scaleway_discover_test.go b/provider/scaleway/scaleway_discover_test.go
index <HASH>..<HASH> 100644
--- a/provider/scaleway/scaleway_discover_test.go
+++ b/provider/scaleway/scaleway_discover_test.go
@@ -12,13 +12,6 @@ import (
var _ discover.Provider = (*scaleway.Provider)(nil)
func TestAddrs(t *testing.T) {
- //args := discover.Config{
- // "provider": "scaleway",
- // "organization": os.Getenv("SCALEWAY_ORGANIZATION"),
- // "token": os.Getenv("SCALEWAY_TOKEN"),
- // "tag_name": "consul-server",
- // "region": os.Getenv("SCALEWAY_REGION"),
- //}
args := discover.Config{
"provider": "scaleway",
"organization": os.Getenv("SCALEWAY_ORGANIZATION"),
|
Removed unnecessary code. Reduced servers checked to 2.
|
hashicorp_go-discover
|
train
|
go
|
5d4db43538a08eda8436da88b7fe92d829ec124f
|
diff --git a/bytesconv_timing_test.go b/bytesconv_timing_test.go
index <HASH>..<HASH> 100644
--- a/bytesconv_timing_test.go
+++ b/bytesconv_timing_test.go
@@ -1,9 +1,28 @@
package fasthttp
import (
+ "bufio"
+ "bytes"
"testing"
)
+func BenchmarkWriteHexInt(b *testing.B) {
+ b.RunParallel(func(pb *testing.PB) {
+ var w bytes.Buffer
+ bw := bufio.NewWriter(&w)
+ i := 0
+ for pb.Next() {
+ writeHexInt(bw, i)
+ i++
+ if i > 0x7fffffff {
+ i = 0
+ }
+ w.Reset()
+ bw.Reset(&w)
+ }
+ })
+}
+
func BenchmarkAppendUint(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
var buf []byte
|
Added a benchmark for writeHexInt
|
valyala_fasthttp
|
train
|
go
|
6588bf9a32d97165cd749b51e17cf72608114427
|
diff --git a/mygeotab/api.py b/mygeotab/api.py
index <HASH>..<HASH> 100644
--- a/mygeotab/api.py
+++ b/mygeotab/api.py
@@ -243,7 +243,10 @@ class MyGeotabException(Exception):
self.stack_trace = main_error['stackTrace']
def __str__(self):
- return '{0}\n{1}\n\nStacktrace:\n{2}'.format(self.name, self.message, self.stack_trace)
+ error_str = '{0}\n{1}'.format(self.name, self.message)
+ if self.stack_trace:
+ error_str = error_str + '\n\nStacktrace:\n{2}'.format(self.stack_trace)
+ return error_str
class AuthenticationException(Exception):
|
Don't show stacktrace heading if there isn't a stacktrace
|
Geotab_mygeotab-python
|
train
|
py
|
123dcc442737e3ef7981dd964d3faa006e7b6d0d
|
diff --git a/lib/Jazz.php b/lib/Jazz.php
index <HASH>..<HASH> 100644
--- a/lib/Jazz.php
+++ b/lib/Jazz.php
@@ -23,6 +23,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+if (!extension_loaded("dom")) {
+ throw new \RuntimeException(
+ "Jazz requires the DOM Extension. Please make sure it's enabled."
+ );
+}
+
# Converts nested arrays to HTML.
#
# Examples
|
Throwin' an exception if the DOM extension is not loaded
|
CHH_jazz
|
train
|
php
|
da59846cfd15d64ae97ffa68b78b4ef25edd9d3d
|
diff --git a/maildir-deduplicate.py b/maildir-deduplicate.py
index <HASH>..<HASH> 100755
--- a/maildir-deduplicate.py
+++ b/maildir-deduplicate.py
@@ -186,6 +186,9 @@ def parse_args():
if opts.remove_matching:
opts.remove_matching = re.compile(opts.remove_matching)
+ if opts.remove_not_matching:
+ opts.remove_not_matching = re.compile(opts.remove_not_matching)
+
return opts, maildirs
def count_removal_strategies(opts):
|
previously forgot to compile remove_not_matching into a regexp (fixes #1)
|
kdeldycke_maildir-deduplicate
|
train
|
py
|
40485e23e20a8a234aecfa0a187c8b9b8bfee518
|
diff --git a/kconfiglib.py b/kconfiglib.py
index <HASH>..<HASH> 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -1547,8 +1547,6 @@ error, and you should email ulfalizer a.t Google's email service."""
for caching/invalidation purposes. The calculated sets might be larger
than necessary as we don't do any complicated analysis of the
expressions."""
- for sym in self.syms.itervalues():
- sym.dep = set()
# Adds 'sym' as a directly dependent symbol to all symbols that appear
# in the expression 'e'
@@ -2783,11 +2781,12 @@ class Symbol(Item, _HasVisibility):
# Caches the calculated value
self.cached_val = None
- # Note: An instance variable 'self.dep' gets set on the Symbol in
- # Config._build_dep(), linking the symbol to the symbols that
- # immediately depend on it (in a caching/invalidation sense). The total
- # set of dependent symbols for the symbol (the transitive closure) is
- # calculated on an as-needed basis in _get_dependent().
+ # Populated in Config._build_dep() after parsing. Links the symbol to
+ # the symbols that immediately depend on it (in a caching/invalidation
+ # sense). The total set of dependent symbols for the symbol (the
+ # transitive closure) is calculated on an as-needed basis in
+ # _get_dependent().
+ self.dep = set()
# Caches the total list of dependent symbols. Calculated in
# _get_dependent().
|
Create Symbol.dep in symbol.__init__().
All symbols get a 'dep', so it's pointless to do it afterwards.
|
ulfalizer_Kconfiglib
|
train
|
py
|
6680e4d1cae89c5016f4d30f61cb8bf982fbdc01
|
diff --git a/server/src/main/java/org/jboss/as/server/deployment/Phase.java b/server/src/main/java/org/jboss/as/server/deployment/Phase.java
index <HASH>..<HASH> 100644
--- a/server/src/main/java/org/jboss/as/server/deployment/Phase.java
+++ b/server/src/main/java/org/jboss/as/server/deployment/Phase.java
@@ -398,6 +398,7 @@ public enum Phase {
public static final int POST_MODULE_WAB_FRAGMENTS = 0x0250;
public static final int POST_MODULE_JSF_MANAGED_BEANS = 0x0300;
public static final int POST_MODULE_INTERCEPTOR_ANNOTATIONS = 0x0301;
+ public static final int POST_MODULE_JSF_CDI_EXTENSIONS = 0x0302;
public static final int POST_MODULE_EJB_BUSINESS_VIEW_ANNOTATION = 0x0400;
public static final int POST_MODULE_EJB_HOME_MERGE = 0x0401;
public static final int POST_MODULE_EJB_DD_METHOD_RESOLUTION = 0x0402;
|
[WFLY-<I>] Implement workaround for WFLY-<I> without requiring a spec maintenance release
was: b<I>b<I>f<I>c<I>a6c<I>bc<I>ee6
|
wildfly_wildfly-core
|
train
|
java
|
312b46c8bfb377de0e545551f3d38d128ad6c6e3
|
diff --git a/api/handlers.go b/api/handlers.go
index <HASH>..<HASH> 100644
--- a/api/handlers.go
+++ b/api/handlers.go
@@ -9,13 +9,27 @@ import (
"github.com/luizbafilho/fusis/api/types"
)
+type ServiceResponse struct {
+ types.Service
+ Destinations []types.Destination
+}
+
func (as ApiService) serviceList(c *gin.Context) {
services := as.balancer.GetServices()
if len(services) == 0 {
c.Status(http.StatusNoContent)
return
}
- c.JSON(http.StatusOK, services)
+
+ response := []ServiceResponse{}
+ for _, s := range services {
+ response = append(response, ServiceResponse{
+ Service: s,
+ Destinations: as.balancer.GetDestinations(&s),
+ })
+ }
+
+ c.JSON(http.StatusOK, response)
}
func (as ApiService) serviceGet(c *gin.Context) {
@@ -30,7 +44,13 @@ func (as ApiService) serviceGet(c *gin.Context) {
}
return
}
- c.JSON(http.StatusOK, service)
+
+ response := ServiceResponse{
+ Service: *service,
+ Destinations: as.balancer.GetDestinations(service),
+ }
+
+ c.JSON(http.StatusOK, response)
}
func (as ApiService) serviceCreate(c *gin.Context) {
|
Adding destinations back to json response
|
luizbafilho_fusis
|
train
|
go
|
5517046fcdd2301bfa90a0f3c7559115eb41ef46
|
diff --git a/modules/ve/ui/ve.ui.Inspector.js b/modules/ve/ui/ve.ui.Inspector.js
index <HASH>..<HASH> 100644
--- a/modules/ve/ui/ve.ui.Inspector.js
+++ b/modules/ve/ui/ve.ui.Inspector.js
@@ -30,10 +30,10 @@ ve.ui.Inspector = function VeUiInspector( context ) {
.addClass( 've-ui-icon-' + this.constructor.static.icon );
this.$closeButton = this.frame.$$(
'<div class="ve-ui-inspector-button ve-ui-inspector-closeButton ve-ui-icon-close"></div>'
- );
+ ).attr( 'title', ve.msg( 'visualeditor-inspector-close-tooltip' ) );
this.$removeButton = this.frame.$$(
'<div class="ve-ui-inspector-button ve-ui-inspector-removeButton ve-ui-icon-remove"></div>'
- );
+ ).attr( 'title', ve.msg( 'visualeditor-inspector-remove-tooltip' ) );
// Events
this.$closeButton.on( {
|
Add tooltips to close and remove inspector controls.
Addresses (Bug <I>)
Change-Id: I6fa0bb8acafbc9e4e<I>f9f0e<I>b<I>bc1afaa
|
wikimedia_oojs-ui
|
train
|
js
|
4256941179b6983850b0fd028dcfbd5c999b8fab
|
diff --git a/fastlane/lib/fastlane/version.rb b/fastlane/lib/fastlane/version.rb
index <HASH>..<HASH> 100644
--- a/fastlane/lib/fastlane/version.rb
+++ b/fastlane/lib/fastlane/version.rb
@@ -1,5 +1,5 @@
module Fastlane
- VERSION = '2.59.0'.freeze
+ VERSION = '2.60.0'.freeze
DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
MINIMUM_XCODE_RELEASE = "7.0".freeze
end
|
Version bump to <I> (#<I>)
|
fastlane_fastlane
|
train
|
rb
|
b550326e219ad84d3ee9596709e9bf5aa8da10e0
|
diff --git a/messagebird/client.py b/messagebird/client.py
index <HASH>..<HASH> 100644
--- a/messagebird/client.py
+++ b/messagebird/client.py
@@ -270,6 +270,11 @@ class Client(object):
self.request(CONVERSATION_WEB_HOOKS_PATH, 'POST', webhook_create_request, CONVERSATION_TYPE))
def conversation_update_webhook(self, id, update_request):
+ """
+ Updates a webhook with the supplied parameters.
+
+ API Reference: https://developers.messagebird.com/api/conversations/#webhooks
+ """
uri = CONVERSATION_WEB_HOOKS_PATH + '/' + str(id)
web_hook = self.request(uri, 'PATCH', update_request, CONVERSATION_TYPE)
return ConversationWebhook().load(web_hook)
|
Adding docstring for update webhook
|
messagebird_python-rest-api
|
train
|
py
|
6d638a7be54511a5e3e4df74dfc72d5eb34f940a
|
diff --git a/Log.php b/Log.php
index <HASH>..<HASH> 100644
--- a/Log.php
+++ b/Log.php
@@ -1,4 +1,4 @@
-<?php
+ <?php
class Log {
private $testCount;
diff --git a/tests/authTest.php b/tests/authTest.php
index <HASH>..<HASH> 100644
--- a/tests/authTest.php
+++ b/tests/authTest.php
@@ -2,8 +2,12 @@
class HookTest extends PHPUnit_Framework_TestCase
{
+ private $log;
+
public function setUp()
{
+ require "Log.php";
+ $this->log = new Log();
}
public function tearDown()
@@ -14,6 +18,7 @@ class HookTest extends PHPUnit_Framework_TestCase
{
$auth = new \Devtools\Auth("user", "password");
$this->assertInstanceOf('Auth', $auth);
+ $this->log->logToFile('$auth is instance of Auth','EMPTY','authTest.log');
}
public function validateTest()
|
Sets hard path to Log from authTest.php
|
seagoj_devtools
|
train
|
php,php
|
9a98bbc9c4a490354a39c3b0e8b7d272db8db137
|
diff --git a/metrics/sinks/wavefront/wavefront.go b/metrics/sinks/wavefront/wavefront.go
index <HASH>..<HASH> 100644
--- a/metrics/sinks/wavefront/wavefront.go
+++ b/metrics/sinks/wavefront/wavefront.go
@@ -100,13 +100,11 @@ func (this *WavefrontSink) addLabelTags(ms *core.MetricSet, tags map[string]stri
for _, labelName := range sortedLabelKeys(ms.Labels) {
labelValue := ms.Labels[labelName]
if labelName == "labels" {
- if this.IncludeLabels {
- for _, label := range strings.Split(labelValue, ",") {
- //labels = app:webproxy,version:latest
- tagParts := strings.SplitN(label, ":", 2)
- if len(tagParts) == 2 {
- tags["label."+tagParts[0]] = tagParts[1]
- }
+ for _, label := range strings.Split(labelValue, ",") {
+ //labels = app:webproxy,version:latest
+ tagParts := strings.SplitN(label, ":", 2)
+ if len(tagParts) == 2 {
+ tags["label."+tagParts[0]] = tagParts[1]
}
}
} else {
|
removed unnecessary if statement in addLabelTags
|
kubernetes-retired_heapster
|
train
|
go
|
476462765d0df55a479d3045a17709d0cd92b423
|
diff --git a/yowsup/layers/axolotl/store/sqlite/liteidentitykeystore.py b/yowsup/layers/axolotl/store/sqlite/liteidentitykeystore.py
index <HASH>..<HASH> 100644
--- a/yowsup/layers/axolotl/store/sqlite/liteidentitykeystore.py
+++ b/yowsup/layers/axolotl/store/sqlite/liteidentitykeystore.py
@@ -61,7 +61,7 @@ class LiteIdentityKeyStore(IdentityKeyStore):
def isTrustedIdentity(self, recipientId, identityKey):
q = "SELECT public_key from identities WHERE recipient_id = ?"
c = self.dbConn.cursor()
- c.execute(q, (identityKey.getPublicKey().serialize(),))
+ c.execute(q, (recipientId,))
result = c.fetchone()
if not result:
return True
|
Fixed check if identity is trusted, closes #<I>
|
tgalal_yowsup
|
train
|
py
|
4c2ae3b72676e59ccd4d1eca4c076e5a874c461c
|
diff --git a/splunklib/modularinput/script.py b/splunklib/modularinput/script.py
index <HASH>..<HASH> 100755
--- a/splunklib/modularinput/script.py
+++ b/splunklib/modularinput/script.py
@@ -98,7 +98,8 @@ class Script(object):
return 1
else:
- err_string = "ERROR Invalid arguments to modular input script:" + ' '.join(args)
+ err_string = "ERROR Invalid arguments to modular input script:" + ' '.join(
+ args)
event_writer._err.write(err_string)
except Exception as e:
@@ -129,13 +130,14 @@ class Script(object):
splunkd_uri = self._input_definition.metadata["server_uri"]
session_key = self._input_definition.metadata["session_key"]
- scheme, netloc, _, _, _ = urlsplit(splunkd_uri, allow_fragments=False)
-
- splunkd_host, splunkd_port = netloc.split(':')
+ splunkd = urlsplit(splunkd_uri, allow_fragments=False)
self._service = Service(
- scheme=scheme, host=splunkd_host, port=splunkd_port,
- token=session_key)
+ scheme=splunkd.scheme,
+ host=splunkd.hostname,
+ port=splunkd.port,
+ token=session_key,
+ )
return self._service
|
Fix modinput url split code to work with an IPv6 address
this uses the same code as custom search commands
|
splunk_splunk-sdk-python
|
train
|
py
|
06b45b800b3ea83a8c773b49e6ef90ff9139801a
|
diff --git a/spinoff/tests/test_microprocess.py b/spinoff/tests/test_microprocess.py
index <HASH>..<HASH> 100644
--- a/spinoff/tests/test_microprocess.py
+++ b/spinoff/tests/test_microprocess.py
@@ -194,6 +194,16 @@ def test_pausing_and_resuming():
assert stopped[0]
+def test_coroutine_does_not_have_to_catch_coroutinestopped():
+ @microprocess
+ def Proc():
+ yield Deferred()
+ proc = Proc()
+ proc.start()
+ with assert_not_raises(CoroutineStopped):
+ proc.stop()
+
+
def test_coroutine_must_exit_after_being_stopped():
# coroutine that violates the rule
@microprocess
diff --git a/spinoff/util/microprocess.py b/spinoff/util/microprocess.py
index <HASH>..<HASH> 100644
--- a/spinoff/util/microprocess.py
+++ b/spinoff/util/microprocess.py
@@ -87,7 +87,10 @@ class MicroProcess(object):
if self._running:
self.pause()
try:
- self._gen.throw(CoroutineStopped())
+ try:
+ self._gen.throw(CoroutineStopped())
+ except CoroutineStopped:
+ raise StopIteration()
except StopIteration:
pass
except _DefGen_Return as ret: # XXX: is there a way to let inlineCallbacks handle this for us?
|
Made it optional for microprocesses to catch CoroutineStopped
|
eallik_spinoff
|
train
|
py,py
|
b60fbff2c0e7857491bafcfcc182d3d7cf81ea6e
|
diff --git a/lib/sensu/api/http_handler.rb b/lib/sensu/api/http_handler.rb
index <HASH>..<HASH> 100644
--- a/lib/sensu/api/http_handler.rb
+++ b/lib/sensu/api/http_handler.rb
@@ -21,6 +21,7 @@ module Sensu
# @result [Hash]
def request_details
return @request_details if @request_details
+ @request_start_time = Time.now.to_f
_, remote_address = Socket.unpack_sockaddr_in(get_peername)
@request_details = {
:remote_address => remote_address,
@@ -42,12 +43,14 @@ module Sensu
@logger.debug("api request", request_details)
end
- # Log the HTTP response.
+ # Log the HTTP response. This method calculates the
+ # request/response time.
def log_response
@logger.info("api response", {
:request => request_details,
:status => @response.status,
- :content_length => @response.content.to_s.bytesize
+ :content_length => @response.content.to_s.bytesize,
+ :time => (Time.now.to_f - @request_start_time).round(3)
})
end
|
[api-times] log api response time
|
sensu_sensu
|
train
|
rb
|
2c89d1dda4077b2a99ddcced59bdd7a9a21b39a0
|
diff --git a/actionpack/lib/action_dispatch/journey/nodes/node.rb b/actionpack/lib/action_dispatch/journey/nodes/node.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/journey/nodes/node.rb
+++ b/actionpack/lib/action_dispatch/journey/nodes/node.rb
@@ -32,7 +32,7 @@ module ActionDispatch
end
def name
- -(left.tr "*:", "")
+ -left.tr("*:", "")
end
def type
@@ -82,7 +82,7 @@ module ActionDispatch
def initialize(left)
super
@regexp = DEFAULT_EXP
- @name = -(left.tr "*:", "")
+ @name = -left.tr("*:", "")
end
def default_regexp?
|
Write the code in a more natural way.
|
rails_rails
|
train
|
rb
|
763b341f7b62817228abc06be61dbd9559048dbd
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -30,5 +30,5 @@ setup(name='synergy_scheduler',
'Topic :: Utilities',
],
requires=['werkzeug', 'jinja2', 'amqp', 'pymongo', 'psutil', 'fabric', 'setproctitle', 'synergy_odm', 'mock',
- 'xmlrunner', 'pylint', 'six', 'bson', 'IPython', 'virtualenv']
+ 'xmlrunner', 'pylint', 'six']
)
|
- dropping non-synergy-specific requirements
|
mushkevych_scheduler
|
train
|
py
|
e376a5071018f7c4518518514062a785b44dbf33
|
diff --git a/lib/action_kit_api/page.rb b/lib/action_kit_api/page.rb
index <HASH>..<HASH> 100644
--- a/lib/action_kit_api/page.rb
+++ b/lib/action_kit_api/page.rb
@@ -1,13 +1,13 @@
require 'action_kit_api'
module ActionKitApi
- include Searchable
-
# Please note that this class should almost never be directly called
# every 'real' page is a specific sub-page type that should extend this
# class. Please refer to the ActionKit API documentation for more
# information about pages
class Page < ApiDataModel
+ include Searchable
+
# Required
attr_accessor :id, :name, :title
attr_reader :type # Page type can't change
|
Messed up where I made the page searchable
|
Democracy-for-America_ActionKitApi
|
train
|
rb
|
21b122e06969a9d85c65ce8276519d34da7dc747
|
diff --git a/setuptools/dist.py b/setuptools/dist.py
index <HASH>..<HASH> 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -583,6 +583,7 @@ class Distribution(_Distribution):
self.announce("Distribution.parse_config_files():")
parser = ConfigParser()
+ parser.optionxform = str
for filename in filenames:
with io.open(filename, encoding='utf-8') as reader:
if DEBUG:
|
Preserve case-sensitive keys in setup.cfg
|
pypa_setuptools
|
train
|
py
|
0c595d1b4ca7ae8896ad43aadf661ebbc7d452ba
|
diff --git a/lib/cheerio.js b/lib/cheerio.js
index <HASH>..<HASH> 100644
--- a/lib/cheerio.js
+++ b/lib/cheerio.js
@@ -111,7 +111,7 @@ Cheerio.prototype.cheerio = '[cheerio object]';
Cheerio.prototype.options = {
normalizeWhitespace: false,
xmlMode: false,
- lowerCaseTags: false
+ decodeEntities: false
};
/*
|
remove lowerCaseTags from default options
caused failure of test cases (htmlparser2's behavior depends on the
existence of the property)
as a reminder for future optimizations, I've added the `decodeEntities`
option instead
|
oyyd_cheerio-without-node-native
|
train
|
js
|
b2341899c56a64078de781b5599682bcdeae0afa
|
diff --git a/_pytest/terminal.py b/_pytest/terminal.py
index <HASH>..<HASH> 100644
--- a/_pytest/terminal.py
+++ b/_pytest/terminal.py
@@ -27,7 +27,7 @@ def pytest_addoption(parser):
group._addoption('--tb', metavar="style",
action="store", dest="tbstyle", default='auto',
choices=['auto', 'long', 'short', 'no', 'line', 'native'],
- help="traceback print mode (long/short/line/native/no).")
+ help="traceback print mode (auto/long/short/line/native/no).")
group._addoption('--fulltrace', '--full-trace',
action="store_true", default=False,
help="don't cut any tracebacks (default is to cut).")
|
Adding "auto" to help for "--tb" option
|
vmalloc_dessert
|
train
|
py
|
be536debf418b67d46224ff17c6d76897d72a41c
|
diff --git a/ApiBundle/Transformer/NodeTransformer.php b/ApiBundle/Transformer/NodeTransformer.php
index <HASH>..<HASH> 100644
--- a/ApiBundle/Transformer/NodeTransformer.php
+++ b/ApiBundle/Transformer/NodeTransformer.php
@@ -131,7 +131,7 @@ class NodeTransformer extends AbstractTransformer
}
}
- if (NodeInterface::TYPE_GENERAL !== $mixed->getNodeType()) {
+ if (NodeInterface::TRANSVERSE_NODE_ID !== $mixed->getNodeId()) {
$facade->addLink('_status_list', $this->generateRoute('open_orchestra_api_list_status_node', array(
'nodeMongoId' => $mixed->getId()
)));
|
add correction to nodetransformer
|
open-orchestra_open-orchestra-media-admin-bundle
|
train
|
php
|
40879d82954033732f0d79a25cd35806449abbab
|
diff --git a/src/core/content.js b/src/core/content.js
index <HASH>..<HASH> 100644
--- a/src/core/content.js
+++ b/src/core/content.js
@@ -36,7 +36,7 @@ PROTOTYPE._update = function(content, element, reposition) {
// Wait for content to be loaded, and reposition
return this._waitForContent(element).then(function(images) {
- if(images.images && images.images.length && self.rendered && self.tooltip[0].offsetWidth > 0) {
+ if(self.rendered && self.tooltip[0].offsetWidth > 0) {
self.reposition(cache.event, !images.length);
}
});
|
Remove images present requirement on content reposition. Fixes #<I>
|
qTip2_qTip2
|
train
|
js
|
668233fb955517d6d3496a4afd7566faa0150546
|
diff --git a/h5p.classes.php b/h5p.classes.php
index <HASH>..<HASH> 100644
--- a/h5p.classes.php
+++ b/h5p.classes.php
@@ -2432,7 +2432,7 @@ class H5PCore {
// Using content dependencies
foreach ($dependencies as $dependency) {
if (isset($dependency['path']) === FALSE) {
- $dependency['path'] = 'libraries/' . H5PCore::libraryToString($dependency, TRUE);
+ $dependency['path'] = $this->getDependencyPath($dependency);
$dependency['preloadedJs'] = explode(',', $dependency['preloadedJs']);
$dependency['preloadedCss'] = explode(',', $dependency['preloadedCss']);
}
@@ -2452,6 +2452,16 @@ class H5PCore {
return $files;
}
+ /**
+ * Get the path to the dependency.
+ *
+ * @param array $dependency
+ * @return string
+ */
+ protected function getDependencyPath(array $dependency) {
+ return 'libraries/' . H5PCore::libraryToString($dependency, TRUE);
+ }
+
private static function getDependenciesHash(&$dependencies) {
// Build hash of dependencies
$toHash = array();
|
Allow the dependency path to be overridden by child classes
This allows an implementor to choose how the library is served.
|
h5p_h5p-php-library
|
train
|
php
|
cd93e41d610965842e4b61f4691a0a0889737790
|
diff --git a/src/Concerns/InteractsWithMouse.php b/src/Concerns/InteractsWithMouse.php
index <HASH>..<HASH> 100644
--- a/src/Concerns/InteractsWithMouse.php
+++ b/src/Concerns/InteractsWithMouse.php
@@ -2,6 +2,8 @@
namespace Laravel\Dusk\Concerns;
+use Facebook\WebDriver\Exception\ElementClickInterceptedException;
+use Facebook\WebDriver\Exception\NoSuchElementException;
use Facebook\WebDriver\Interactions\WebDriverActions;
use Facebook\WebDriver\WebDriverBy;
@@ -48,11 +50,21 @@ trait InteractsWithMouse
{
if (is_null($selector)) {
(new WebDriverActions($this->driver))->click()->perform();
- } else {
- $this->resolver->findOrFail($selector)->click();
+
+ return $this;
}
- return $this;
+ foreach ($this->resolver->all($selector) as $element) {
+ try {
+ $element->click();
+
+ return $this;
+ } catch (ElementClickInterceptedException $e) {
+ //
+ }
+ }
+
+ throw $e ?? new NoSuchElementException("Unable to locate element with selector [{$selector}].");
}
/**
|
[6.x] Try clicking all elements before throwing `ElementClickInterceptedException` (#<I>)
* attempt to click all elements before failing
* remove unused import
* Update InteractsWithMouse.php
|
laravel_dusk
|
train
|
php
|
b7d53894896e822a4058e0263b9f128607aebc07
|
diff --git a/pysat/instruments/sw_methods.py b/pysat/instruments/sw_methods.py
index <HASH>..<HASH> 100644
--- a/pysat/instruments/sw_methods.py
+++ b/pysat/instruments/sw_methods.py
@@ -278,8 +278,7 @@ def combine_f107(standard_inst, forecast_inst, start=None, stop=None):
if stop is None:
stimes = [inst.index.max() for inst in [standard_inst, forecast_inst]
if len(inst.index) > 0]
- stop = max(stimes) if len(stimes) > 0 else None
- stop += pds.DateOffset(days=1)
+ stop = max(stimes) + pds.DateOffset(days=1) if len(stimes) > 0 else None
if start is None or stop is None:
raise ValueError("must either load in Instrument objects or provide" +
|
Update sw_methods.py
Fixed bug where time was added to NoneType
|
rstoneback_pysat
|
train
|
py
|
f86dfc32126474f1b955f44024c64dba79b38446
|
diff --git a/src/ol/source/source.js b/src/ol/source/source.js
index <HASH>..<HASH> 100644
--- a/src/ol/source/source.js
+++ b/src/ol/source/source.js
@@ -8,14 +8,6 @@ goog.require('ol.Extent');
goog.require('ol.projection');
-/**
- * @typedef {{attributions: (Array.<ol.Attribution>|undefined),
- * extent: (ol.Extent|undefined),
- * projection: ol.ProjectionLike}}
- */
-ol.source.SourceOptions;
-
-
/**
* @constructor
|
Remove ol.source.SourceOptions typedef
The ol.source.SourceOptions type is already declared in objectliteral.exports, so it should not be declared in the ol/source/source.js file.
|
openlayers_openlayers
|
train
|
js
|
227f6d66b361e7ea1991bd96d39499663f5e6a6b
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -31,13 +31,13 @@ except(IOError, ImportError):
dist = setup(
name = __package_name__,
- version = "1.68",
+ version = "1.69",
description = "Cython interface between the numpy arrays and the Matrix/Array classes of the Eigen C++ library",
long_description=long_description,
author = "Wouter Boomsma",
author_email = "[email protected]",
url = "https://github.com/wouterboomsma/eigency",
- download_url = "https://github.com/wouterboomsma/eigency/tarball/1.68",
+ download_url = "https://github.com/wouterboomsma/eigency/tarball/1.69",
ext_modules = cythonize(extensions),
packages = [__package_name__]
)
|
Bumped version to <I>.
|
wouterboomsma_eigency
|
train
|
py
|
3d40c96bc1614a77b9bb722a1a8418590952ae6f
|
diff --git a/Kwc/Basic/LinkTag/ComponentClass/Data.php b/Kwc/Basic/LinkTag/ComponentClass/Data.php
index <HASH>..<HASH> 100644
--- a/Kwc/Basic/LinkTag/ComponentClass/Data.php
+++ b/Kwc/Basic/LinkTag/ComponentClass/Data.php
@@ -3,9 +3,10 @@ class Kwc_Basic_LinkTag_ComponentClass_Data extends Kwc_Basic_LinkTag_Intern_Dat
{
protected function _getData()
{
- if (($row = $this->_getRow()) && $row->target_component_id) {
+ $m = Kwc_Abstract::createOwnModel($this->componentClass);
+ if ($column = $m->fetchColumnByPrimaryId('target_component_id', $this->dbId)) {
return Kwf_Component_Data_Root::getInstance()
- ->getComponentByDbId($row->target_component_id, array('subroot' => $this));
+ ->getComponentByDbId($column, array('subroot' => $this));
}
return false;
}
|
_getRow doesnt exist anymore, fetch column by primary id now
|
koala-framework_koala-framework
|
train
|
php
|
f3a9183d8d4ab1ab388820d7c0b3ee9ac690fb9d
|
diff --git a/parser.go b/parser.go
index <HASH>..<HASH> 100644
--- a/parser.go
+++ b/parser.go
@@ -20,9 +20,10 @@ const (
coloptCollate
coloptNull
coloptDefault
- coloptAutoIncrement
coloptKey
coloptComment
+
+ coloptAutoIncrement = coloptKey
)
const (
diff --git a/parser_test.go b/parser_test.go
index <HASH>..<HASH> 100644
--- a/parser_test.go
+++ b/parser_test.go
@@ -204,6 +204,10 @@ primary key (id, c)
Input: "CREATE TABLE foo LIKE bar",
Expect: "CREATE TABLE `foo` LIKE `bar`",
},
+ {
+ Input: "CREATE TABLE foo (id INTEGER PRIMARY KEY AUTO_INCREMENT)",
+ Expect: "CREATE TABLE `foo` (\n`id` INT (11) DEFAULT NULL AUTO_INCREMENT,\nPRIMARY KEY (`id`)\n)",
+ },
}
p := New()
|
Allow PRIMARY KEY/AUTO_INCREMENT order to be interchangeable
|
schemalex_schemalex
|
train
|
go,go
|
28460d76d483e47b6faa63f5b9c3013031a68dea
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,10 +11,15 @@ if sys.argv[-1] == 'publish':
sys.exit()
+with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
+ readme = f.read()
+
+
setup(
name='sentry-sso-google',
version='1.1',
description='Google SSO support for Sentry',
+ long_description=readme,
author='Educreations Engineering',
author_email='[email protected]',
url='https://github.com/educreations/sentry-sso-google',
|
Use new README.rst as package long_description
|
educreations_sentry-sso-google
|
train
|
py
|
aadc760bd94c553f41605672c9bdffbde4ad8765
|
diff --git a/atomic_reactor/tasks/binary.py b/atomic_reactor/tasks/binary.py
index <HASH>..<HASH> 100644
--- a/atomic_reactor/tasks/binary.py
+++ b/atomic_reactor/tasks/binary.py
@@ -23,6 +23,7 @@ class BinaryPreBuildTask(plugin_based.PluginBasedTask):
plugins_def = plugin_based.PluginsDef(
prebuild=[
{"name": "check_user_settings"},
+ {"name": "distgit_fetch_artefacts"},
{"name": "check_and_set_platforms"},
{"name": "flatpak_create_dockerfile"},
{"name": "inject_parent_image"},
@@ -40,7 +41,6 @@ class BinaryPreBuildTask(plugin_based.PluginBasedTask):
{"name": "fetch_maven_artifacts"},
{"name": "add_image_content_manifest"},
{"name": "add_dockerfile"},
- {"name": "distgit_fetch_artefacts"},
{"name": "inject_yum_repos"},
{"name": "hide_files"},
{"name": "distribution_scope"},
|
Fetch sources before build_dir initialization
* CLOUDBLD-<I>
The final goal is the fetched sources files, including the exploded sources
tarballs, will be available in each platform-specific build_dir. Since the
plugin distgit_fetch_artefacts just simply run the rhpkg script and does not
depend on any other plugin, run it earlier and the fetched files will be copied
along with the container repo source while initializing the build_dirs.
This change works by requiring the previous two revert commits.
|
projectatomic_atomic-reactor
|
train
|
py
|
9e830805076df42971f27c3c2a86496098282f35
|
diff --git a/src/test/java/com/stripe/functional/PlanTest.java b/src/test/java/com/stripe/functional/PlanTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/stripe/functional/PlanTest.java
+++ b/src/test/java/com/stripe/functional/PlanTest.java
@@ -30,7 +30,7 @@ public class PlanTest extends BaseStripeTest {
params.put("currency", "usd");
params.put("id", "sapphire-elite");
params.put("interval", "month");
- params.put("name", "Sapphire Elite");
+ params.put("nickname", "Sapphire Elite");
final Plan plan = Plan.create(params);
@@ -58,7 +58,7 @@ public class PlanTest extends BaseStripeTest {
final Plan plan = getPlanFixture();
final Map<String, Object> params = new HashMap<>();
- params.put("name", "Updated Name");
+ params.put("nickname", "Updated Name");
final Plan updatedPlan = plan.update(params);
|
update param name to nickname (#<I>)
|
stripe_stripe-java
|
train
|
java
|
1534a33a3b0bb8191c7951031e9ed0e322834807
|
diff --git a/spec/lib/soloist/cli_spec.rb b/spec/lib/soloist/cli_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/soloist/cli_spec.rb
+++ b/spec/lib/soloist/cli_spec.rb
@@ -74,7 +74,7 @@ describe Soloist::CLI do
context "when the soloistrc does not exist" do
it "raises an error" do
expect do
- cli.install("pineapple::wut")
+ Dir.chdir(base_path) { cli.install("pineapple::wut") }
end.to raise_error(Soloist::NotFound)
end
end
|
run all installs in tempfir in test suite
the test for not having a soloistrc was managing to run since
I have a soloistrc on my box
|
mkocher_soloist
|
train
|
rb
|
8800c37fd82b15d977d8fe3a7b45cc58e240c65d
|
diff --git a/src/js/layer.js b/src/js/layer.js
index <HASH>..<HASH> 100644
--- a/src/js/layer.js
+++ b/src/js/layer.js
@@ -65,7 +65,7 @@ ch.layer = function(conf) {
// Click
if (conf.event == "click") {
- $('<p class="btn close">x</p>').bind('click', that.hide).prependTo(that.$container);
+ conf.close = true;
// Document events
$(document).one('click', that.hide);
|
GH-<I> Btn close creates only once
|
mercadolibre_chico
|
train
|
js
|
bce3ad4f2a4433e4add2297d99308018249d0e50
|
diff --git a/bucketcache/buckets.py b/bucketcache/buckets.py
index <HASH>..<HASH> 100644
--- a/bucketcache/buckets.py
+++ b/bucketcache/buckets.py
@@ -399,11 +399,13 @@ class Bucket(ReprHelperMixin, Container, object):
md5hash = md5(self.backend.__name__.encode('utf-8'))
for batch in self.keymaker.make_key(key):
+ logger.debug('_hash_for_key received bytes: {}', batch)
md5hash.update(batch)
- logger.debug('_hash_for_key finished.')
+ digest = md5hash.hexdigest()
+ logger.debug('_hash_for_key finished with digest {}', digest)
- return md5hash.hexdigest()
+ return digest
@staticmethod
def _abbreviate(obj):
|
Improve debug logging for _hash_for_key
|
RazerM_bucketcache
|
train
|
py
|
aabe8921f65196146135878e757c3bd80b4fb58a
|
diff --git a/src/controllers/ZoneController.php b/src/controllers/ZoneController.php
index <HASH>..<HASH> 100644
--- a/src/controllers/ZoneController.php
+++ b/src/controllers/ZoneController.php
@@ -13,11 +13,24 @@ namespace hipanel\modules\dns\controllers;
use hipanel\actions\IndexAction;
use hipanel\actions\OrientationAction;
use hipanel\modules\dns\models\Record;
+use hipanel\filters\EasyAccessControl;
use yii\data\ArrayDataProvider;
use yii\web\NotFoundHttpException;
class ZoneController extends \hipanel\base\CrudController
{
+ public function behaviors()
+ {
+ return array_merge(parent::behaviors(), [
+ [
+ 'class' => EasyAccessControl::class,
+ 'actions' => [
+ '*' => 'domain.read',
+ ],
+ ],
+ ]);
+ }
+
public function actions()
{
return array_merge(parent::actions(), [
|
added `EasyAccessControl`
|
hiqdev_hipanel-module-dns
|
train
|
php
|
775dd8a53d086d8f86d1f5cee4d96d271593e8b7
|
diff --git a/lib/spout/version.rb b/lib/spout/version.rb
index <HASH>..<HASH> 100644
--- a/lib/spout/version.rb
+++ b/lib/spout/version.rb
@@ -5,7 +5,7 @@ module Spout
MAJOR = 0
MINOR = 12
TINY = 0
- BUILD = 'beta2' # 'pre', 'rc', 'rc2', nil
+ BUILD = 'rc' # 'pre', 'rc', 'rc2', nil
STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.').freeze
end
|
Version bump to <I>.rc
|
nsrr_spout
|
train
|
rb
|
bfcb94da03c7ac5f576356468eeca75eca369c7a
|
diff --git a/src/javascripts/components/form.js b/src/javascripts/components/form.js
index <HASH>..<HASH> 100644
--- a/src/javascripts/components/form.js
+++ b/src/javascripts/components/form.js
@@ -53,16 +53,9 @@ export default class FrigForm extends React.Component {
}
modifiedFields() {
- let modifiedFields = this._childComponents().filter((c) => c.isModified())
-
- return modifiedFields.map((modifiedField) => {
- if (modifiedField.props.data === undefined) {
- return modifiedField
- } else {
- // return any fields that are modified in nested fields
- return modifiedField.modifiedFields()
- }
- })
+ return this._childComponents()
+ .filter((c) => c.isModified())
+ .map((c) => (c.modifiedFields == null) ? c.isModified() : c.modifiedFields())
}
resetModified() {
|
if it quacks like a duck...
|
frig-js_frig
|
train
|
js
|
42d3d26f286e738a86e4cf612f84c50414211e65
|
diff --git a/tests/unit/utils/cloud_test.py b/tests/unit/utils/cloud_test.py
index <HASH>..<HASH> 100644
--- a/tests/unit/utils/cloud_test.py
+++ b/tests/unit/utils/cloud_test.py
@@ -122,7 +122,7 @@ class CloudUtilsTestCase(TestCase):
with self.assertRaises(Exception) as context:
cloud.sftp_file("/tmp/test", "ТЕСТ test content")
# we successful pass the place with os.write(tmpfd, ...
- self.assertEqual("'hostname'", str(context.exception))
+ self.assertNotEqual("a bytes-like object is required, not 'str'", str(context.exception))
if __name__ == '__main__':
from integration import run_tests
|
[<I>] Fix test assertion
|
saltstack_salt
|
train
|
py
|
576083090b2d4969a63ab90cc1c5bb11af6c003e
|
diff --git a/lib/travis/github/services/sync_user.rb b/lib/travis/github/services/sync_user.rb
index <HASH>..<HASH> 100644
--- a/lib/travis/github/services/sync_user.rb
+++ b/lib/travis/github/services/sync_user.rb
@@ -15,7 +15,7 @@ module Travis
def run
new_user? do
syncing do
- if Time.now.utc.sunday? && !Travis::Features.feature_active?("reset_token_in_sync")
+ if Time.now.utc.sunday? && Travis::Features.feature_active?("reset_token_in_sync")
ResetToken.new(user).run
end
UserInfo.new(user).run
|
reset token service: reset_token_in_sync turns feature on rather than off (this should disable it in production for now)
|
travis-ci_travis-core
|
train
|
rb
|
8607c0ea6ea4724d23923cf6013d7b679d4712c1
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,23 +2,14 @@
# http://docs.python.org/distutils/setupscript.html
# http://docs.python.org/2/distutils/examples.html
-import sys
from setuptools import setup, find_packages
-import ast
+import re
import os
-name = 'endpoints'
-version = ''
+name = "endpoints"
with open(os.path.join(name, "__init__.py"), 'rU') as f:
- for node in (n for n in ast.parse(f.read()).body if isinstance(n, ast.Assign)):
- node_name = node.targets[0]
- if isinstance(node_name, ast.Name) and node_name.id.startswith('__version__'):
- version = node.value.s
- break
-
-if not version:
- raise RuntimeError('Unable to find version number')
+ version = re.search("^__version__\s*=\s*[\'\"]([^\'\"]+)", f.read(), flags=re.I | re.M).group(1)
setup(
|
a little simpler setup.py
|
Jaymon_endpoints
|
train
|
py
|
d4517ddb805888ae28eb4e3a65a3e50c873a5b72
|
diff --git a/vue.config.js b/vue.config.js
index <HASH>..<HASH> 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -5,6 +5,34 @@ module.exports = {
extract: !isLib
},
chainWebpack: config => {
- // todo
+ if (isLib) {
+ // https://github.com/vuejs/vue-cli/issues/2646
+ config.merge({
+ externals: {
+ vue: {
+ commonjs: 'vue',
+ commonjs2: 'vue',
+ root: 'Vue',
+ },
+ three: {
+ commonjs: 'three',
+ commonjs2: 'three',
+ root: 'THREE',
+ },
+ 'dat.gui': {
+ commonjs: 'dat.gui',
+ commonjs2: 'dat.gui',
+ // https://github.com/dataarts/dat.gui/blob/1b18f7227e56c8b5071337732342101501b9fa95/rollup.config.js#L30
+ root: 'dat',
+ },
+ oimo: {
+ commonjs: 'oimo',
+ commonjs2: 'oimo',
+ // https://github.com/lo-th/Oimo.js/blob/0ce1c3d8ff3f857d9180035076a70d8d6976a3e6/rollup.config.js#L7
+ root: 'OIMO',
+ },
+ }
+ })
+ }
},
}
|
wip: added completed externals while lib build, sync'd from legacy ./build/*.conf.js
|
fritx_vue-threejs
|
train
|
js
|
5e12da0203929a40a506193c60cd149df93f7610
|
diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Package/Locker.php
+++ b/src/Composer/Package/Locker.php
@@ -288,7 +288,7 @@ class Locker
unset($spec['version_normalized']);
if ($package->isDev()) {
- if ('git' === $package->getSourceType() && $path = $this->installationManager->getInstallPath($package)) {
+ if ('git' === $package->getSourceType() && $path = $this->installationManager->getInstallPath($package) && function_exists('proc_open')) {
$sourceRef = $package->getSourceReference() ?: $package->getDistReference();
$process = new ProcessExecutor();
if (0 === $process->execute('git log -n1 --pretty=%ct '.escapeshellarg($sourceRef), $output, $path)) {
|
Skip locking dev package to time when proc_open does not exist on system.
|
mothership-ec_composer
|
train
|
php
|
29ccea64652d817072e468e976b4eb3c7b0570d7
|
diff --git a/src/main/java/com/github/fge/grappa/parsers/BaseParser.java b/src/main/java/com/github/fge/grappa/parsers/BaseParser.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/fge/grappa/parsers/BaseParser.java
+++ b/src/main/java/com/github/fge/grappa/parsers/BaseParser.java
@@ -653,7 +653,7 @@ public abstract class BaseParser<V>
* @see #sequence(Object, Object, Object...)
*/
public final JoinMatcherBootstrap<V, BaseParser<V>> join(final Object rule,
- final Object rule2, final Object moreRules)
+ final Object rule2, final Object... moreRules)
{
Objects.requireNonNull(moreRules);
return join(sequence(rule, rule2, moreRules));
|
BaseParser: fix stupid error in join()
|
fge_grappa
|
train
|
java
|
553597adada632d320ec190d90b02a74bb1ac92c
|
diff --git a/lib/fog/rackspace/requests/storage/get_containers.rb b/lib/fog/rackspace/requests/storage/get_containers.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/rackspace/requests/storage/get_containers.rb
+++ b/lib/fog/rackspace/requests/storage/get_containers.rb
@@ -44,7 +44,7 @@ module Fog
inject(0) { |sum, k| sum + files[k].bytes }
results << {
"name" => container,
- "count" => files.size,
+ "count" => files.size - 1,
"bytes" => total
}
end
|
Don't count the :meta entry as an object.
|
fog_fog
|
train
|
rb
|
a87591b8d5cffc5041fedcb654be2fadfb6dd78f
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -31,6 +31,7 @@ const REGEX_VERSION = /(\d+\.)?(\d+\.)?(\*|\d+)/;
exports.collection = Interface.collection;
exports.ensureAuthenticated = Interface.ensureAuthenticated;
+exports.errorHandler = () => Interface.errorHandler({ logger: Interface.logger });
exports.StatSerializer = Interface.StatSerializer;
exports.ResourceSerializer = Interface.ResourceSerializer;
exports.ResourceDeserializer = Interface.ResourceDeserializer;
diff --git a/test/index.test.js b/test/index.test.js
index <HASH>..<HASH> 100644
--- a/test/index.test.js
+++ b/test/index.test.js
@@ -9,6 +9,13 @@ describe('index', () => {
expect(forestExpressSequelize.collection).toBeInstanceOf(Function);
});
+ it('should export an errorHandler middleware', () => {
+ expect.assertions(2);
+
+ expect(forestExpressSequelize.errorHandler).toBeDefined();
+ expect(forestExpressSequelize.errorHandler).toBeInstanceOf(Function);
+ });
+
it('should export an ensureAuthenticated middleware', () => {
expect.assertions(2);
|
fix: export error handler middleware (#<I>)
|
ForestAdmin_forest-express-sequelize
|
train
|
js,js
|
3df9a9366ea54d4961fce4181cf904ce897b60e1
|
diff --git a/trace/trace.go b/trace/trace.go
index <HASH>..<HASH> 100644
--- a/trace/trace.go
+++ b/trace/trace.go
@@ -348,11 +348,6 @@ func sendSample(sample *ssf.SSFSpan) error {
if err != nil {
return err
}
- newSample := &ssf.SSFSpan{}
- err = proto.Unmarshal(data, newSample)
- if err != nil {
- panic(err)
- }
return nil
}
|
Remove re-unmarshal in sendSample (#<I>)
|
stripe_veneur
|
train
|
go
|
ca12000b56ad982e0899a6306e6075818fff597e
|
diff --git a/tests/Exscript/ConnectionTest.py b/tests/Exscript/ConnectionTest.py
index <HASH>..<HASH> 100644
--- a/tests/Exscript/ConnectionTest.py
+++ b/tests/Exscript/ConnectionTest.py
@@ -32,12 +32,6 @@ class ConnectionTest(DummyTest):
self.transport.transport.device = self.device
self.transport.login(flush = flush)
- def doAuthenticate(self, flush = True):
- # This is overwritten do make the tests that are inherited from
- # DummyTest happy.
- self.transport.open()
- self.transport.protocol_authenticate()
-
def testConstructor(self):
self.assert_(isinstance(self.transport, Connection))
|
ConnectionTest: remove some useless code.
|
knipknap_exscript
|
train
|
py
|
86d41d1e09fe475554d974fba6bb5a6e48de4e4c
|
diff --git a/mc/byzantine.js b/mc/byzantine.js
index <HASH>..<HASH> 100644
--- a/mc/byzantine.js
+++ b/mc/byzantine.js
@@ -976,7 +976,7 @@ function pushReceivedAddresses(arrAddresses, address){
}
function decisionTrustMe(proposal, approvedCoordinators) {
- console.log("byllllog decisionTrustMe " + hp + ":" + phase);
+ console.log("byllllog decisionTrustMe proposal approvedCoordinators");
eventBus.emit( 'byzantine_success', address_p, proposal, approvedCoordinators );
}
|
modi trustme unit compose method, use byzantine success event
|
trustnote_trustnote-pow-common
|
train
|
js
|
d708dbbfed4eb3f035f2571813d3d6d13d1a56db
|
diff --git a/Feed.php b/Feed.php
index <HASH>..<HASH> 100644
--- a/Feed.php
+++ b/Feed.php
@@ -624,8 +624,13 @@ abstract class Feed
$tags = array_keys($this->channels);
// ... and now all names from feed items
- foreach ($this->items as $item)
- $tags = array_merge($tags, array_keys($item->getElements()));
+ foreach ($this->items as $item) {
+ foreach (array_keys($item->getElements()) as $key) {
+ if (!in_array($key, $tags)) {
+ $tags[] = $key;
+ }
+ }
+ }
// Look for prefixes in those tag names
foreach ($tags as $tag) {
|
Get all names from feed items: optimisation
Replaced slow array_merge with array element assignment with uniqueness check
|
mibe_FeedWriter
|
train
|
php
|
6e06e3b495e4d08a43de801956578308880bd503
|
diff --git a/src/Providers/None.php b/src/Providers/None.php
index <HASH>..<HASH> 100644
--- a/src/Providers/None.php
+++ b/src/Providers/None.php
@@ -32,6 +32,10 @@ class None implements Environment
*/
public function getRepo()
{
+ if (!$this->isGitRepo()) {
+ return '';
+ }
+
return exec('git config --get remote.origin.url');
}
@@ -40,6 +44,10 @@ class None implements Environment
*/
public function getBranch()
{
+ if (!$this->isGitRepo()) {
+ return '';
+ }
+
exec('git branch', $branches);
$branches = implode("\n", $branches);
preg_match('/^\* (.+)$/m', $branches, $branch);
@@ -52,6 +60,10 @@ class None implements Environment
*/
public function getCommit()
{
+ if (!$this->isGitRepo()) {
+ return '';
+ }
+
return exec('git log --pretty=format:"%H" -1');
}
@@ -62,4 +74,13 @@ class None implements Environment
{
return '';
}
+
+ /**
+ * @return bool
+ */
+ protected function isGitRepo()
+ {
+ exec("git status", $output, $status);
+ return $status === 0;
+ }
}
|
Explicitly check if we're in a git repo
Or we could be returned a commit id like "fatal: Not a git repository"
|
matthiasmullie_ci-sniffer
|
train
|
php
|
643ea5548a6beb60375a8a7ce98f59ecf22b3bc0
|
diff --git a/lib/bolt/pal/yaml_plan/loader.rb b/lib/bolt/pal/yaml_plan/loader.rb
index <HASH>..<HASH> 100644
--- a/lib/bolt/pal/yaml_plan/loader.rb
+++ b/lib/bolt/pal/yaml_plan/loader.rb
@@ -43,7 +43,13 @@ module Bolt
end
def self.parse_plan(yaml_string, source_ref)
- parse_tree = Psych.parse(yaml_string, filename: source_ref)
+ # This passes the filename as the second arg for compatibility with Psych used with ruby < 2.6
+ # This can be removed when we remove support for ruby 2.5
+ parse_tree = if Psych.method(:parse).parameters.include?('legacy_filename')
+ Psych.parse(yaml_string, filename: source_ref)
+ else
+ Psych.parse(yaml_string, source_ref)
+ end
PuppetVisitor.create_visitor.accept(parse_tree)
end
|
(BOLT-<I>) Use old Psych.parse signature if needed
**What this changes** This checks the `Psych.parse` signature available in the installed ruby stdlib to see if `legacy_filename` is available. If it is, we can assume passing filename using the keyword parameter. If not, use the old Psych.parse signature and just pass a filename
**Why** So that we can successfully load plans on ruby < <I>
|
puppetlabs_bolt
|
train
|
rb
|
c30cab37873037a5468563e5782609ae6f723c7b
|
diff --git a/lib/client.js b/lib/client.js
index <HASH>..<HASH> 100644
--- a/lib/client.js
+++ b/lib/client.js
@@ -214,7 +214,7 @@ function onReceipt(frame, beforeSendResponse){
}
function onUnknownCommand(frame){
- this.destroy(new Error("unknown command"));
+ this.destroy(new Error("unknown command '" + frame.command + "'"));
}
function Subscription(id, ack, onMessageCallback, client){
diff --git a/package.json b/package.json
index <HASH>..<HASH> 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "stompit",
"description": "STOMP client and server",
- "version": "0.2.0",
+ "version": "0.2.1",
"keywords": [
"stomp", "messages", "queue"
],
diff --git a/test/client.js b/test/client.js
index <HASH>..<HASH> 100644
--- a/test/client.js
+++ b/test/client.js
@@ -112,7 +112,7 @@ describe("Client", function(){
it("should emit an error event", function(done){
client.once("error", function(exception){
- assert(exception.message === "unknown command");
+ assert(exception.message === "unknown command 'FOIDSUF'");
done();
});
|
Include the command name in the unknown command error message
|
gdaws_node-stomp
|
train
|
js,json,js
|
6d6c6805c1be5e865ff40767ea4702de2f167c3a
|
diff --git a/spyder/app/tests/test_mainwindow.py b/spyder/app/tests/test_mainwindow.py
index <HASH>..<HASH> 100644
--- a/spyder/app/tests/test_mainwindow.py
+++ b/spyder/app/tests/test_mainwindow.py
@@ -1959,6 +1959,7 @@ def test_edidorstack_open_switcher_dlg(main_window, tmpdir):
@flaky(max_runs=3)
@pytest.mark.slow
[email protected]_introspection
def test_editorstack_open_symbolfinder_dlg(main_window, qtbot, tmpdir):
"""
Test that the symbol finder is working as expected when called from the
@@ -1984,6 +1985,8 @@ def test_editorstack_open_symbolfinder_dlg(main_window, qtbot, tmpdir):
with qtbot.waitSignal(code_editor.lsp_response_signal, timeout=30000):
code_editor.request_symbols()
+ qtbot.wait(5000)
+
# Test that the symbol finder opens as expected from the editorstack.
editorstack = main_window.editor.get_current_editorstack()
assert editorstack.switcher_dlg is None
|
Add pytest.mark.use_introspection
|
spyder-ide_spyder
|
train
|
py
|
9f422b6c4f1e0766c0662505f6b8d8a56a69e117
|
diff --git a/src/consoleStream.js b/src/consoleStream.js
index <HASH>..<HASH> 100644
--- a/src/consoleStream.js
+++ b/src/consoleStream.js
@@ -1,26 +1,24 @@
var levels = require('./levels');
-var result;
-
-if (typeof(console) !== 'undefined') {
- result = console;
-}
+var dest = typeof(console) !== 'undefined' ? console : false;
function write(data) {
- if (result) {
- switch(data.level) {
- case levels.log:
- result.log(data);
- break;
- case levels.info:
- result.log(data);
- break;
- case levels.warn:
- result.warn(data);
- break;
- case levels.error:
- result.error(data);
- break;
- }
+ if (!dest) {
+ return;
+ }
+
+ switch(data.level) {
+ case levels.log:
+ dest.log(data);
+ break;
+ case levels.info:
+ dest.log(data);
+ break;
+ case levels.warn:
+ dest.warn(data);
+ break;
+ case levels.error:
+ dest.error(data);
+ break;
}
}
|
Cleaned up a lil bit of the console stream code
|
MiguelCastillo_loggero
|
train
|
js
|
381367b1100cf806d6fab422f0fc62b913671b7f
|
diff --git a/Cronner/TimestampStorage/FileStorage.php b/Cronner/TimestampStorage/FileStorage.php
index <HASH>..<HASH> 100644
--- a/Cronner/TimestampStorage/FileStorage.php
+++ b/Cronner/TimestampStorage/FileStorage.php
@@ -92,7 +92,7 @@ class FileStorage extends Object implements ITimestampStorage
private function checkDirectoryExists()
{
if (!is_dir($this->directory)) {
- throw new DirectoryNotFoundException();
+ throw new DirectoryNotFoundException("Directory '" . $this->directory . "' not found.");
}
}
|
Added description for DirectoryNotFoundException
|
stekycz_Cronner
|
train
|
php
|
744b6b35dfbd941d2468ce8c09506b0cf991614c
|
diff --git a/test/term_buffer.js b/test/term_buffer.js
index <HASH>..<HASH> 100644
--- a/test/term_buffer.js
+++ b/test/term_buffer.js
@@ -309,4 +309,11 @@ describe('TermBuffer', function() {
t.setLed(4,true);
expect(t._leds.length).to.be(4);
});
+
+ it("Handles \r correctly with terminal bounds", function() {
+ var t = newTermBuffer(6, 4);
+ t.inject("1234");
+ t.inject("\rabcd\rABCD");
+ expect(t.toString()).to.be("ABCD");
+ });
});
|
Adding test for issue #<I>
|
Gottox_terminal.js
|
train
|
js
|
8546bffcc47cdb9214cf76aeef2fdafd3f53a7da
|
diff --git a/src/Console/IdeHelperCommand.php b/src/Console/IdeHelperCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/IdeHelperCommand.php
+++ b/src/Console/IdeHelperCommand.php
@@ -14,7 +14,7 @@ class IdeHelperCommand extends Command
const GENERATED_NOTICE = <<<'SDL'
# File generated by "php artisan lighthouse:ide-helper".
# Do not edit this file directly.
-# This file should be ignored by git.
+# This file should be ignored by git as it can be autogenerated.
SDL;
|
Enhance hint why schema-directives.graphql should be ignored by git
|
nuwave_lighthouse
|
train
|
php
|
3addf51f1e6c4d78003fbd954b6bc9fad64254a6
|
diff --git a/packages/node_modules/@webex/internal-plugin-presence/src/presence.js b/packages/node_modules/@webex/internal-plugin-presence/src/presence.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-presence/src/presence.js
+++ b/packages/node_modules/@webex/internal-plugin-presence/src/presence.js
@@ -34,11 +34,15 @@ const Presence = WebexPlugin.extend({
},
/**
- * Initialize and listen to the presence worker for incoming presence updates.
+ * Initialize the presence worker for client
* @returns {undefined}
*/
- listen() {
- this.worker.initialize(this.webex);
+ initialize() {
+ this.webex.once('ready', () => {
+ if (this.config.initializeWorker) {
+ this.worker.initialize(this.webex);
+ }
+ });
},
/**
|
feat(presence): initialize worker off config setting
|
webex_spark-js-sdk
|
train
|
js
|
99e3c0515b2257b5811ab4d8347c6d0a692d2809
|
diff --git a/nodemcu-uploader.py b/nodemcu-uploader.py
index <HASH>..<HASH> 100755
--- a/nodemcu-uploader.py
+++ b/nodemcu-uploader.py
@@ -264,15 +264,13 @@ if __name__ == '__main__':
if not args.destination:
uploader.prepare()
for f in args.filename:
- uploader.write_file(f, f)
+ uploader.write_file(f)
elif len(args.destination) == len(args.filename):
uploader.prepare()
for f, d in zip(args.filename, args.destination):
uploader.write_file(f, d)
else:
raise Exception('You must specify a destination filename for each file you want to upload.')
- for f in args.filename:
- uploader.write_file(f)
print 'All done!'
elif args.operation == 'file':
|
Fix but in which files would be uploaded twice
|
kmpm_nodemcu-uploader
|
train
|
py
|
0c659fd640bf8e4330c66e66574b9fe5aaa294f6
|
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
index <HASH>..<HASH> 100644
--- a/lib/sup/crypto.rb
+++ b/lib/sup/crypto.rb
@@ -130,6 +130,7 @@ class CryptoManager
end
output = IO.read output_fn.path
+ output.force_encoding Encoding::ASCII_8BIT if output.respond_to? :force_encoding
## there's probably a better way to do this, but we're using the output to
## look for a valid signature being present.
@@ -157,6 +158,7 @@ class CryptoManager
msg = RMail::Parser.read output
if msg.header.content_type =~ %r{^multipart/} && !msg.multipart?
output = "MIME-Version: 1.0\n" + output
+ output.force_encoding Encoding::ASCII_8BIT if output.respond_to? :force_encoding
msg = RMail::Parser.read output
end
notice = Chunk::CryptoNotice.new :valid, "This message has been decrypted for display"
|
force binary encoding before parsing decrypted messages
|
sup-heliotrope_sup
|
train
|
rb
|
993f880eb04def4f92467e1e3f6a3ab7052eeb3b
|
diff --git a/blockstack/lib/config.py b/blockstack/lib/config.py
index <HASH>..<HASH> 100644
--- a/blockstack/lib/config.py
+++ b/blockstack/lib/config.py
@@ -389,6 +389,9 @@ if os.environ.get("BLOCKSTACK_TEST", None) is not None:
else:
NAMESPACE_REVEAL_EXPIRE = BLOCKS_PER_DAY # small enough so we can actually test this...
+ # make this low enough that we can actually test it with regtest
+ NAMESPACE_1_CHAR_COST = 41 * SATOSHIS_PER_BTC
+
else:
NAME_IMPORT_KEYRING_SIZE = 300 # number of keys to derive from the import key
|
while testing keep the price of a 1-char namespace low so we don't run
out of regtest bitcoin
|
blockstack_blockstack-core
|
train
|
py
|
ed223101c77ef83e5575f66db7d7134150ae6924
|
diff --git a/armstrong/hatband/sites.py b/armstrong/hatband/sites.py
index <HASH>..<HASH> 100644
--- a/armstrong/hatband/sites.py
+++ b/armstrong/hatband/sites.py
@@ -18,7 +18,10 @@ class HatbandAndDjangoRegistry(object):
return iter(self.items())
def __contains__(self, k):
- return k in self._registry or k in django_site._registry
+ for d in self.dicts:
+ if k in d:
+ return True
+ return False
class AdminSite(DjangoAdminSite):
|
fix this so it uses self.dicts and can check multiples
|
armstrong_armstrong.hatband
|
train
|
py
|
b1fceb706c011b85600902510ac31a24b720e992
|
diff --git a/amqpstorm/management/http_client.py b/amqpstorm/management/http_client.py
index <HASH>..<HASH> 100644
--- a/amqpstorm/management/http_client.py
+++ b/amqpstorm/management/http_client.py
@@ -9,10 +9,11 @@ from amqpstorm.management.exception import ApiError
class HTTPClient(object):
def __init__(self, api_url, username, password, verify, cert, timeout):
self._auth = HTTPBasicAuth(username, password)
- self._verify = verify
- self._cert = cert
- self._timeout = timeout
self._base_url = api_url
+ self._timeout = timeout
+ self._session = requests.Session()
+ self._session.verify = verify
+ self._session.cert = cert
def get(self, path, payload=None, headers=None):
"""HTTP GET operation.
@@ -126,13 +127,11 @@ class HTTPClient(object):
headers = headers or {}
headers['content-type'] = 'application/json'
try:
- response = requests.request(
+ response = self._session.request(
method, url,
auth=self._auth,
data=payload,
headers=headers,
- cert=self._cert,
- verify=self._verify,
timeout=self._timeout,
params=params,
)
|
Re-use requests session for management calls
|
eandersson_amqpstorm
|
train
|
py
|
19b8e8fb733b6ccce440546052000a79b31ffc49
|
diff --git a/lib/rules/util.js b/lib/rules/util.js
index <HASH>..<HASH> 100644
--- a/lib/rules/util.js
+++ b/lib/rules/util.js
@@ -334,7 +334,7 @@ setTimeout(function getWhistleVersion() {
res.on('error', util.noop);
res.on('end', function() {
var ver = util.parseJSON(body);
- ver = ver['dist-tags'];
+ ver = ver && ver['dist-tags'];
if (ver = ver && ver['latest']) {
propertiesStorage.setProperty('latestVersion', ver);
}
|
bugfix: Cannot read property dist-tags of null
|
avwo_whistle
|
train
|
js
|
8697542fffc56d486902d2f9cfa509c86b9818d8
|
diff --git a/lib/deliver/ipa_uploader.rb b/lib/deliver/ipa_uploader.rb
index <HASH>..<HASH> 100644
--- a/lib/deliver/ipa_uploader.rb
+++ b/lib/deliver/ipa_uploader.rb
@@ -133,7 +133,7 @@ module Deliver
def fetch_info_plist_file
Zip::File.open(@ipa_file.path) do |zipfile|
zipfile.each do |file|
- if file.name.include?'.plist'
+ if file.name.include?'.plist' and not file.name.include?".bundle"
# We can not be completely sure, that's the correct plist file, so we have to try
begin
# The XML file has to be properly unpacked first
|
plist files inside bundles are ignored
|
fastlane_fastlane
|
train
|
rb
|
04a247d1a8d621bbae11f9aec57086141791777e
|
diff --git a/test/tools/javac/api/T6838467.java b/test/tools/javac/api/T6838467.java
index <HASH>..<HASH> 100644
--- a/test/tools/javac/api/T6838467.java
+++ b/test/tools/javac/api/T6838467.java
@@ -32,7 +32,6 @@ import java.util.*;
import java.util.zip.*;
import javax.tools.*;
import com.sun.tools.javac.file.JavacFileManager;
-import com.sun.tools.javac.main.OptionName;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.Options;
|
<I>: remove obsolete import
Reviewed-by: jjh
|
wmdietl_jsr308-langtools
|
train
|
java
|
402f446ae2b0b8372919c309a7115aa124aa3fcb
|
diff --git a/proto/gossip_store.go b/proto/gossip_store.go
index <HASH>..<HASH> 100644
--- a/proto/gossip_store.go
+++ b/proto/gossip_store.go
@@ -267,10 +267,10 @@ func (s *GossipStoreImpl) UpdateNodeStatuses(d time.Duration, sd time.Duration)
} // else node is marked up
}
if nodeInfo.Status != nodeStatus {
- log.Warnf(" Marking node %s down since time diff %v is greater "+
- "than %v, its last update time was %v and current time is"+
- " %v node: %v new status %v", id, timeDiff, d, nodeInfo.LastUpdateTs, currTime,
- nodeInfo, nodeStatus)
+ log.Warnf("Gossip Status change: for node: %v newStatus: %v "+
+ ", time diff: %v , limit: %v, its last update time "+
+ "was %v and current time is %v",
+ nodeStatus, id, timeDiff, d, nodeInfo.LastUpdateTs, currTime)
}
if nodeInfo.Status != nodeStatus {
nodeInfo.Status = nodeStatus
|
Correct the message (it is for change of status and not just down)
|
libopenstorage_gossip
|
train
|
go
|
eab30d38a113ea6858c4e1e91995084d0bff49c2
|
diff --git a/framework/filters/PageCache.php b/framework/filters/PageCache.php
index <HASH>..<HASH> 100644
--- a/framework/filters/PageCache.php
+++ b/framework/filters/PageCache.php
@@ -304,7 +304,7 @@ class PageCache extends ActionFilter implements DynamicContentAwareInterface
/**
* {@inheritdoc}
*/
- protected function getView()
+ public function getView()
{
return $this->view;
}
|
getView() made public instead of protected
|
yiisoft_yii2
|
train
|
php
|
4825ffa63368abbb0c3b8fe4c91cbf3260f8ed8f
|
diff --git a/executor/executor.go b/executor/executor.go
index <HASH>..<HASH> 100644
--- a/executor/executor.go
+++ b/executor/executor.go
@@ -134,14 +134,34 @@ func (self *Executor) RunPQL(database_name string, pql string) (interface{}, err
query_list[i].Id = qry.Id
}
- // technically, this is blocking on the hold for each query, but it may be ok, since we need them all for the final anyway.
final_result := make(map[string]interface{})
+ result := make(chan struct {
+ final interface{}
+ label string
+ err error
+ })
+ x := 0
for i, _ := range query_list {
- final, err := self.service.Hold.Get(query_list[i].Id, 10)
+ x++
+ go func(q query.PqlListItem, reply chan struct {
+ final interface{}
+ label string
+ err error
+ }) {
+ final, err := self.service.Hold.Get(q.Id, 10)
+ result <- struct {
+ final interface{}
+ label string
+ err error
+ }{final, q.Label, err}
+ }(query_list[i], result)
if err != nil {
spew.Dump(err)
}
- final_result[query_list[i].Label] = final
+ }
+ for z := 0; z < x; z++ {
+ ans := <-result
+ final_result[ans.label] = ans.final
}
return final_result, nil
|
made hold retrival async from exector
|
pilosa_pilosa
|
train
|
go
|
7d17862240877d60aca4615ad9623d765677e063
|
diff --git a/lib/OptionParser.php b/lib/OptionParser.php
index <HASH>..<HASH> 100644
--- a/lib/OptionParser.php
+++ b/lib/OptionParser.php
@@ -243,7 +243,7 @@ class OptionParser
$options = array();
foreach($this->_flags as $option => $index) {
- if(!empty($this->_options[$index])) {
+ if(array_key_exists($index, $this->_options)) {
$options[$option] = $this->_options[$index];
}
}
|
Changed getAllOptions() to allow "0"
|
mjackson_optionparser
|
train
|
php
|
38b6e4cf87cb4fcaf7cd70edda8b52c8d323c26e
|
diff --git a/structr-ui/src/main/resources/structr/js/websocket.js b/structr-ui/src/main/resources/structr/js/websocket.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/websocket.js
+++ b/structr-ui/src/main/resources/structr/js/websocket.js
@@ -177,7 +177,7 @@ function wsConnect() {
} else {
var msgClass;
- var codeStr = code.toString();
+ var codeStr = code ? code.toString() : '';
if (codeStr.startsWith('2')) {
msgClass = 'success';
|
Avoid exception when code is undefined.
|
structr_structr
|
train
|
js
|
058d846a2be3042d2af1a93c11042d0f0abe9e5b
|
diff --git a/src/pyctd/manager/query.py b/src/pyctd/manager/query.py
index <HASH>..<HASH> 100644
--- a/src/pyctd/manager/query.py
+++ b/src/pyctd/manager/query.py
@@ -225,7 +225,7 @@ class QueryManager(BaseDbManager):
if pathway_name:
q = q.filter(models.Pathway.pathway_name.like(pathway_name))
if pathway_id:
- q = q.filter(models.Pathway.pathway_name.like(pathway_id))
+ q = q.filter(models.Pathway.pathway_id.like(pathway_id))
return self._limit_and_df(q, limit, as_df)
|
Update query.py
typo in pathway query
|
cebel_pyctd
|
train
|
py
|
8b237c129a959c8f504aeb83cbb8281133795366
|
diff --git a/salt/states/archive.py b/salt/states/archive.py
index <HASH>..<HASH> 100644
--- a/salt/states/archive.py
+++ b/salt/states/archive.py
@@ -1501,12 +1501,15 @@ def extracted(name,
for item in enforce_failed:
ret['comment'] += '\n- {0}'.format(item)
- if not keep_source and not source_is_local:
- log.debug('Cleaning cached source file %s', cached)
- result = __states__['file.not_cached'](source_match, saltenv=__env__)
- if not result['result']:
- # Don't let failure to delete cached file cause the state itself ot
- # fail, just drop it in the warnings.
- ret.setdefault('warnings', []).append(result['comment'])
+ if not source_is_local:
+ if keep_source:
+ log.debug('Keeping cached source file %s', cached)
+ else:
+ log.debug('Cleaning cached source file %s', cached)
+ result = __states__['file.not_cached'](source_match, saltenv=__env__)
+ if not result['result']:
+ # Don't let failure to delete cached file cause the state
+ # itself to fail, just drop it in the warnings.
+ ret.setdefault('warnings', []).append(result['comment'])
return ret
|
Improve logging when keeping the cached source file
|
saltstack_salt
|
train
|
py
|
9b7e7eeae474beb6be9e06b44f7effbad58e8acc
|
diff --git a/alertaclient/config.py b/alertaclient/config.py
index <HASH>..<HASH> 100644
--- a/alertaclient/config.py
+++ b/alertaclient/config.py
@@ -14,6 +14,7 @@ default_config = {
'timezone': 'Europe/London',
'timeout': 5.0,
'sslverify': True,
+ 'use_local': [], # eg. set to ['endpoint'] to prevent server override
'output': 'simple',
'color': True,
'debug': False
@@ -52,4 +53,8 @@ class Config:
except requests.RequestException as e:
raise
- self.options = {**self.options, **remote_config}
+ # remove local exclusions from remote config
+ remote_config_only = {k: v for k, v in remote_config.items() if k not in self.options['use_local']}
+
+ # merge local config with remote, giving precedence to remote
+ self.options = {**self.options, **remote_config_only}
|
Allow local config exclusions to prevent remote override (#<I>)
|
alerta_python-alerta-client
|
train
|
py
|
ae94c9071d4541659a2f4d9a9aa06555f18db214
|
diff --git a/lib/generators/adminsite/install/install_generator.rb b/lib/generators/adminsite/install/install_generator.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/adminsite/install/install_generator.rb
+++ b/lib/generators/adminsite/install/install_generator.rb
@@ -33,7 +33,7 @@ module Adminsite
end
puts "Setting up CanCan"
- copy_file 'app/models/adminsite/ability.rb', 'app/models/adminsite/ability.rb'
+ copy_file "#{Adminsite::Engine.root}/app/models/adminsite/ability.rb", 'app/models/adminsite/ability.rb'
# Locales
copy_file "config/locales/adminsite.da.yml", 'config/locales/adminsite.da.yml'
|
Fixed source path to ability.rb durring install.
|
RelationshusetGekko_adminsite
|
train
|
rb
|
712b3078311164f679c8db9ee00ec825559a25fc
|
diff --git a/test/unit/ReplaceReferencesCapableTraitTest.php b/test/unit/ReplaceReferencesCapableTraitTest.php
index <HASH>..<HASH> 100644
--- a/test/unit/ReplaceReferencesCapableTraitTest.php
+++ b/test/unit/ReplaceReferencesCapableTraitTest.php
@@ -212,7 +212,7 @@ class ReplaceReferencesCapableTraitTest extends TestCase
$tDefault,
];
- $subject = $this->createInstance(['_normalizeString', '_quoteRegex', '_getAllMatchesRegex', '_containerGet']);
+ $subject = $this->createInstance(['_normalizeString', '_quoteRegex', '_getAllMatchesRegex', '_containerGet', '_normalizeTokenKey', '_stringableReplace']);
$_subject = $this->reflect($subject);
$subject->expects($this->exactly(2))
@@ -242,6 +242,15 @@ class ReplaceReferencesCapableTraitTest extends TestCase
// First group matches
$keys,
]));
+ // Key normalization can simply return the key, because here we expect them in the same format as they appear in the template.
+ $subject->expects($this->exactly(count($keys)))
+ ->method('_normalizeTokenKey')
+ ->withConsecutive(
+ [$keys[0]],
+ [$keys[1]],
+ [$keys[2]]
+ )
+ ->will($this->returnArgument(0));
$subject->expects($this->exactly(count($keys)))
->method('_containerGet')
->withConsecutive(
|
Changed expectations for `_replaceTokens()`
|
Dhii_placeholder-template-abstract
|
train
|
php
|
f6b86153a0cf7623e2871b1413b09f41dffe2e5a
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -57,7 +57,6 @@ function VM (opts = {}) {
} else {
var trie = opts.state || new Trie()
if (opts.activatePrecompiles) {
- trie = new Trie()
for (var i = 1; i <= 8; i++) {
trie.put(new BN(i).toArrayLike(Buffer, 'be', 20), new Account().serialize())
}
|
Fixed an issue where trie passed as opts.state is overwritten if opts.activePrecomplies is set to true
|
ethereumjs_ethereumjs-vm
|
train
|
js
|
7215130ff518eb33a51d07c4264a105c5a90bb24
|
diff --git a/holoviews/plotting/plot.py b/holoviews/plotting/plot.py
index <HASH>..<HASH> 100644
--- a/holoviews/plotting/plot.py
+++ b/holoviews/plotting/plot.py
@@ -215,7 +215,7 @@ class Plot(param.Parameterized):
# If we do not have the Document lock, schedule refresh as callback
self._triggering += [s for p in self.traverse(lambda x: x, [Plot])
for s in getattr(p, 'streams', []) if s._triggering]
- if self.document.session_context:
+ if self.document and self.document.session_context:
self.document.add_next_tick_callback(self.refresh)
return
|
Add check if document has already been set in server mode (#<I>)
|
pyviz_holoviews
|
train
|
py
|
2bd4ead01e94cd66b5d50f5d0fc38c76a3d1e0c5
|
diff --git a/src/Aws/S3/StreamWrapper.php b/src/Aws/S3/StreamWrapper.php
index <HASH>..<HASH> 100644
--- a/src/Aws/S3/StreamWrapper.php
+++ b/src/Aws/S3/StreamWrapper.php
@@ -490,10 +490,11 @@ class StreamWrapper
if ($this->objectIterator->valid()) {
$current = $this->objectIterator->current();
if (isset($current['Prefix'])) {
- // Include "directories"
- $result = rtrim(str_replace($this->openedBucketPrefix, '', $current['Prefix']), '/');
- $key = "s3://{$this->openedBucket}/{$current['Prefix']}";
- $stat = $this->formatUrlStat($current['Prefix']);
+ // Include "directories". Be sure to strip a trailing "/" on prefixes.
+ $prefix = rtrim($current['Prefix'], '/');
+ $result = str_replace($this->openedBucketPrefix, '', $prefix);
+ $key = "s3://{$this->openedBucket}/{$prefix}";
+ $stat = $this->formatUrlStat($prefix);
} else {
// Remove the prefix from the result to emulate other stream wrappers
$result = str_replace($this->openedBucketPrefix, '', $current['Key']);
|
Fixing the nextStat caching of the stream wrapper to account for the removal of the "/"
|
aws_aws-sdk-php
|
train
|
php
|
a80ba50fb168029b1d1e30eba994092b6f38ab63
|
diff --git a/plugins/debug/debugPanel.js b/plugins/debug/debugPanel.js
index <HASH>..<HASH> 100644
--- a/plugins/debug/debugPanel.js
+++ b/plugins/debug/debugPanel.js
@@ -244,6 +244,9 @@
// call the original me.Entity.draw function
this._patched(renderer);
+ // increment the bounds counter
+ _this.counters.inc("bounds");
+
// check if debug mode is enabled
if (me.debug.renderHitBox) {
renderer.save();
@@ -254,16 +257,19 @@
bounds.copy(this.getBounds());
bounds.pos.sub(this.ancestor._absPos);
renderer.drawShape(bounds);
- _this.counters.inc("bounds");
// draw all defined shapes
renderer.setColor("red");
renderer.translate(this.pos.x, this.pos.y);
- for (var i = this.body.shapes.length, shape; i--, (shape = this.body.shapes[i]);) {
+ }
+ for (var i = this.body.shapes.length, shape; i--, (shape = this.body.shapes[i]);) {
+ if (me.debug.renderHitBox) {
renderer.drawShape(shape);
- _this.counters.inc("shapes");
}
+ _this.counters.inc("shapes");
+ }
+ if (me.debug.renderHitBox) {
renderer.restore();
}
|
[debug] fix the bound and shape counters not being updated when the "hitbox" option is not ticked in the panel
|
melonjs_melonJS
|
train
|
js
|
4692e18f52a4a7099ee5d20288f871a6b151234e
|
diff --git a/master/buildbot/process/builder.py b/master/buildbot/process/builder.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/process/builder.py
+++ b/master/buildbot/process/builder.py
@@ -808,7 +808,7 @@ class Builder(pb.Referenceable, service.MultiService):
for other_breq_object in unclaimed_request_objects:
wfd = defer.waitForDeferred(
defer.maybeDeferred(lambda :
- mergeRequests_fn(breq_object, other_breq_object)))
+ mergeRequests_fn(self, breq_object, other_breq_object)))
yield wfd
if wfd.getResult():
merged_request_objects.append(other_breq_object)
diff --git a/master/buildbot/test/unit/test_process_builder.py b/master/buildbot/test/unit/test_process_builder.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/unit/test_process_builder.py
+++ b/master/buildbot/test/unit/test_process_builder.py
@@ -489,7 +489,7 @@ class TestBuilderBuildCreation(unittest.TestCase):
yield wfd
brdicts = wfd.getResult()
- def mergeRequests_fn(breq, other):
+ def mergeRequests_fn(builder, breq, other):
# merge evens with evens, odds with odds
return breq.id % 2 == other.id % 2
|
test for and supply the right number of arguments to mergeRequests functions
|
buildbot_buildbot
|
train
|
py,py
|
ef2341373c7a6b88779d0e01188a295154897577
|
diff --git a/mode/clike/clike.js b/mode/clike/clike.js
index <HASH>..<HASH> 100644
--- a/mode/clike/clike.js
+++ b/mode/clike/clike.js
@@ -617,7 +617,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
intendSwitch: false,
indentStatements: false,
multiLineStrings: true,
- number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
+ number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
blockKeywords: words("catch class do else finally for if where try while enum"),
defKeywords: words("class val var object interface fun"),
atoms: words("true false null this"),
|
[clike mode] Disallow trailing dots in numbers in Kotlin
|
codemirror_CodeMirror
|
train
|
js
|
6e205e9e8381f0e0effe0f177f690be072a60577
|
diff --git a/modules/create-router.js b/modules/create-router.js
index <HASH>..<HASH> 100644
--- a/modules/create-router.js
+++ b/modules/create-router.js
@@ -123,15 +123,17 @@ function createRouter(routes, opts = {}, deps={}) {
setProp('name', name);
setProp('params', params);
setProp('path', path);
- stateId += 1;
- setProp('id', stateId);
+
if (metaParams || source) {
const meta = { params: metaParams };
if (source) meta.source = source;
setProp('meta', meta);
+ stateId += 1;
+ setProp('id', stateId);
}
+
return state;
}
|
refactor: assign id to state objects only if meta provided
|
router5_router5
|
train
|
js
|
e7547c4e91c17064319e0bf9fca7c5aecaedda72
|
diff --git a/coursera/coursera_dl.py b/coursera/coursera_dl.py
index <HASH>..<HASH> 100755
--- a/coursera/coursera_dl.py
+++ b/coursera/coursera_dl.py
@@ -192,9 +192,9 @@ def down_the_wabbit_hole(className, cookies_file):
opener.open(req)
for cookie in cj:
- if cookie.name == 'session':
- session = cookie.value
- break
+ if cookie.name == 'session':
+ session = cookie.value
+ break
opener.close()
|
Fix erroneous indentation of the body of a loop.
|
coursera-dl_coursera-dl
|
train
|
py
|
c2dd18bd71f7a468eb9cf307f05ffcd543e4db12
|
diff --git a/spectator-ext-jvm/src/main/java/com/netflix/spectator/jvm/MemoryPoolMeter.java b/spectator-ext-jvm/src/main/java/com/netflix/spectator/jvm/MemoryPoolMeter.java
index <HASH>..<HASH> 100644
--- a/spectator-ext-jvm/src/main/java/com/netflix/spectator/jvm/MemoryPoolMeter.java
+++ b/spectator-ext-jvm/src/main/java/com/netflix/spectator/jvm/MemoryPoolMeter.java
@@ -52,7 +52,7 @@ class MemoryPoolMeter extends AbstractMeter<MemoryPoolMXBean> {
final List<Measurement> ms = new ArrayList<>();
if (mbean != null) {
final String typeKey = "memtype";
- final String type = mbean.getName();
+ final String type = mbean.getType().name();
final MemoryUsage usage = mbean.getUsage();
ms.add(new Measurement(usedId.withTag(typeKey, type), timestamp, usage.getUsed()));
|
fix value for memtype tag on memory pool metrics
|
Netflix_spectator
|
train
|
java
|
0615759e7c1d4ea1b143d00390d83661ceb91f00
|
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -63,12 +63,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
private $requestStackSize = 0;
private $resetServices = false;
- const VERSION = '4.1.7';
- const VERSION_ID = 40107;
+ const VERSION = '4.1.8-DEV';
+ const VERSION_ID = 40108;
const MAJOR_VERSION = 4;
const MINOR_VERSION = 1;
- const RELEASE_VERSION = 7;
- const EXTRA_VERSION = '';
+ const RELEASE_VERSION = 8;
+ const EXTRA_VERSION = 'DEV';
const END_OF_MAINTENANCE = '01/2019';
const END_OF_LIFE = '07/2019';
|
bumped Symfony version to <I>
|
symfony_symfony
|
train
|
php
|
3ad8f3442522c34d5649b6b1320aa7994e0f5834
|
diff --git a/spec/baby_squeel/active_record/query_methods/joining_spec.rb b/spec/baby_squeel/active_record/query_methods/joining_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/baby_squeel/active_record/query_methods/joining_spec.rb
+++ b/spec/baby_squeel/active_record/query_methods/joining_spec.rb
@@ -176,6 +176,17 @@ describe BabySqueel::ActiveRecord::QueryMethods, '#joining' do
LEFT OUTER JOIN "comments" ON "comments"."author_id" = "authors"."id"
EOSQL
end
+
+ it 'joins back with a new alias' do
+ pending 'Joins will need to be reworked in order to get this working'
+ relation = Post.joining { author.posts }
+
+ expect(relation).to produce_sql(<<-EOSQL)
+ SELECT "posts".* FROM "posts"
+ INNER JOIN "authors" ON "authors"."id" = "posts"."author_id"
+ INNER JOIN "posts" "posts_authors" ON "posts_authors"."author_id" = "authors"."id"
+ EOSQL
+ end
end
it 'raises an error when attempting to alias an inner join' do
|
Added a failing spec for joins
|
rzane_baby_squeel
|
train
|
rb
|
128f6546569acc1d97e73b575ca22157a28bd257
|
diff --git a/web/concrete/single_pages/dashboard/extend/install.php b/web/concrete/single_pages/dashboard/extend/install.php
index <HASH>..<HASH> 100644
--- a/web/concrete/single_pages/dashboard/extend/install.php
+++ b/web/concrete/single_pages/dashboard/extend/install.php
@@ -276,7 +276,7 @@ if ($this->controller->getTask() == 'install_package' && $showInstallOptionsScre
<? if (count($availableArray) == 0 && count($purchasedBlocks) == 0) { ?>
<? if (!$mi->isConnected()) { ?>
- <?=t('Nothing currently available to install.')?>
+ <p><?=t('Nothing currently available to install.')?></p>
<? } ?>
<? } else { ?>
|
Fixed orphan paragraph missing its tags.
Former-commit-id: 4e<I>acd<I>f9f7ab0b<I>f<I>b4b<I>d<I>
|
concrete5_concrete5
|
train
|
php
|
00e0af8769765d98342df0beaf56398da6c97a57
|
diff --git a/tests/TestCase/FieldHandlers/Config/ConfigTest.php b/tests/TestCase/FieldHandlers/Config/ConfigTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/FieldHandlers/Config/ConfigTest.php
+++ b/tests/TestCase/FieldHandlers/Config/ConfigTest.php
@@ -99,6 +99,7 @@ class ConfigTest extends PHPUnit_Framework_TestCase
'renderInput' => '\\CsvMigrations\\FieldHandlers\\Provider\\RenderInput\\StringRenderer',
'renderValue' => '\\CsvMigrations\\FieldHandlers\\Provider\\RenderValue\\StringRenderer',
'renderName' => '\\CsvMigrations\\FieldHandlers\\Provider\\RenderName\\DefaultRenderer',
+ 'validationRules' => '\\CsvMigrations\\FieldHandlers\\Provider\\ValidationRules\\StringValidationRules',
],
],
];
|
Updated unit test expected result for new validation rules provider type (task #<I>)
|
QoboLtd_cakephp-csv-migrations
|
train
|
php
|
33ed76fdc04080b30001292b31f73739ddcccb84
|
diff --git a/test/resolver-test.js b/test/resolver-test.js
index <HASH>..<HASH> 100644
--- a/test/resolver-test.js
+++ b/test/resolver-test.js
@@ -284,4 +284,41 @@ module.exports = {
});
},
+ query: function(test) {
+ this.resolver.query('www.something.com', function(err, response) {
+ test.ifError(err);
+ test.notStrictEqual(response, null, err);
+
+ test.ok(response.header instanceof Object,
+ "Invalid header returned.");
+
+ test.ok(response.question instanceof Array,
+ "Invalid question returned.");
+ test.ok(response.question.length === 1,
+ "Invalid number of questions returned.");
+ var question = response.question[0];
+ test.ok(question.class === 1,
+ "Invalid class in the question returned.");
+ test.ok(question.type === 1,
+ "Invalid type in the question returned.");
+
+ test.ok(response.authority instanceof Array,
+ "Invalid authority returned.");
+ test.ok(response.authority.length === 0,
+ "No authorites expected.");
+
+ test.ok(response.additional instanceof Array,
+ "Invalid additional returned.");
+ test.ok(response.additional.length === 0,
+ "No additionals expected.");
+
+ test.ok(response.answer instanceof Array,
+ "Invalid answer returned.");
+ test.ok(response.answer.length > 0,
+ "No answers returned.");
+
+ test.done();
+ });
+ },
+
};
|
Added a test method for resolver.query.
|
royalpinto_node-cares
|
train
|
js
|
41d83e16786350110dee9e5f0c0bb4b149b977ec
|
diff --git a/spec/chef/chef_runner.rb b/spec/chef/chef_runner.rb
index <HASH>..<HASH> 100644
--- a/spec/chef/chef_runner.rb
+++ b/spec/chef/chef_runner.rb
@@ -179,6 +179,9 @@ EOF
params[:args][:cwd])
end
+ # defeat chef logging to console during spec runs.
+ ::Chef::Config.add_formatter(:null)
+
# must set file cache path and ensure it exists otherwise evented run_command will fail
cache_dir_path = File.join(::RightScale::Platform.filesystem.temp_dir, 'chef_runner_1B0C7CAA87E241daB90B75829DD6A833')
AgentConfig.cache_dir = cache_dir_path
|
acu<I> defeat chef logging to console during spec runs (using our fixed version of NullFormatter)
|
rightscale_right_link
|
train
|
rb
|
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.