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
|
|---|---|---|---|---|---|
4aa2593a7587af1666b57faf8987a470148a9029
|
diff --git a/lib/middleware/autoreload.js b/lib/middleware/autoreload.js
index <HASH>..<HASH> 100644
--- a/lib/middleware/autoreload.js
+++ b/lib/middleware/autoreload.js
@@ -18,7 +18,7 @@ var gaze = require('gaze'),
module.exports = function(options) {
var outdated = false,
- watches = [ path.join(process.cwd(), 'www/*') ];
+ watches = [ path.join(process.cwd(), 'www/**/*') ];
// optional options parameter
options = options || {};
|
[#<I>] Add subdirectory support to AutoReload.
|
phonegap_connect-phonegap
|
train
|
js
|
e54d186da477470550041b18df8aeb41cf9bcecb
|
diff --git a/wisdom-maven-plugin/src/main/java/org/ow2/chameleon/wisdom/maven/utils/DependencyFinder.java b/wisdom-maven-plugin/src/main/java/org/ow2/chameleon/wisdom/maven/utils/DependencyFinder.java
index <HASH>..<HASH> 100644
--- a/wisdom-maven-plugin/src/main/java/org/ow2/chameleon/wisdom/maven/utils/DependencyFinder.java
+++ b/wisdom-maven-plugin/src/main/java/org/ow2/chameleon/wisdom/maven/utils/DependencyFinder.java
@@ -73,6 +73,7 @@ public class DependencyFinder {
{
result = mojo.repoSystem.resolveArtifact( mojo.repoSession, request );
} catch ( ArtifactResolutionException e ) {
+ mojo.getLog().error("Cannot resolve " + groupId + ":" + artifact + ":" + version + ":" + type);
throw new MojoExecutionException( e.getMessage(), e );
}
|
Improve reporting when the runtime cannot be resolved
|
wisdom-framework_wisdom
|
train
|
java
|
14dae2f13295405284ddf7ae5fcd8ec281905225
|
diff --git a/django_ulogin/models.py b/django_ulogin/models.py
index <HASH>..<HASH> 100644
--- a/django_ulogin/models.py
+++ b/django_ulogin/models.py
@@ -76,8 +76,8 @@ def create_user(request, ulogin_response):
Creates user
"""
# Custom behaviour
- if settings.CREATE_USER_CALLBACK is not None:
- callback = import_by_path(settings.CREATE_USER_CALLBACK)
+ if s.CREATE_USER_CALLBACK is not None:
+ callback = import_by_path(s.CREATE_USER_CALLBACK)
if callable(callback):
return callback(request=request, ulogin_response=ulogin_response)
raise ImproperlyConfigured("The ULOGIN_CREATE_USER_CALLBACK isn't a callable")
diff --git a/django_ulogin/settings.py b/django_ulogin/settings.py
index <HASH>..<HASH> 100644
--- a/django_ulogin/settings.py
+++ b/django_ulogin/settings.py
@@ -28,6 +28,7 @@ ALLOWED_PROVIDERS = (
('foursquare', _('Foursquare')),
('googleplus', _('Google+')),
('tumblr', _('Tumblr')),
+ ('dudu', _('Dudu')),
)
|
Fix some attribute errors;
added Dudu provier.
|
marazmiki_django-ulogin
|
train
|
py,py
|
1c6efee74557f433dfc5b67fb8ab76b0d9e6f988
|
diff --git a/sos/collector/__init__.py b/sos/collector/__init__.py
index <HASH>..<HASH> 100644
--- a/sos/collector/__init__.py
+++ b/sos/collector/__init__.py
@@ -764,6 +764,7 @@ class SoSCollector(SoSComponent):
self.cluster = self.clusters['jbon']
else:
self.cluster = self.clusters[self.opts.cluster_type]
+ self.cluster_type = self.opts.cluster_type
self.cluster.master = self.master
else:
|
[collector] allow overriding plain --cluster-type
In few user scenarios, it is useful to force sos collect to override
cluster type, but let it generate list of nodes by itself. For that,
it is sufficient to set the self.cluster_type accordingly.
Resolves: #<I>
|
sosreport_sos
|
train
|
py
|
0b1d06de59f5dbad5ac8afac026be8f440525b82
|
diff --git a/src/basis.js b/src/basis.js
index <HASH>..<HASH> 100644
--- a/src/basis.js
+++ b/src/basis.js
@@ -1946,14 +1946,18 @@
* @return {*}
*/
as: function(fn){
- var token = new Token(fn(this.value));
+ var token = new Token();
var setter = function(value){
- this.set(fn(value));
+ this.set(fn.call(this, value));
};
+
+ setter.call(token, this.get());
+
this.attach(setter, token, token.destroy);
token.attach($undef, this, function(){
this.detach(setter, token);
});
+
return token;
},
@@ -1970,6 +1974,9 @@
this.deferredToken = null;
}
+ this.attach = $undef;
+ this.detach = $undef;
+
var cursor = this;
while (cursor = cursor.handler)
if (cursor.destroy)
@@ -1977,8 +1984,6 @@
this.handler = null;
this.value = null;
- this.attach = $undef;
- this.detach = $undef;
}
});
|
core: basis.Token#as invoke fn in context of resulting token
|
basisjs_basisjs
|
train
|
js
|
09d8c79e5cbce7a77973cff78b4ad611e1d7a1ea
|
diff --git a/test/unit/test_unit_before_after_test.rb b/test/unit/test_unit_before_after_test.rb
index <HASH>..<HASH> 100644
--- a/test/unit/test_unit_before_after_test.rb
+++ b/test/unit/test_unit_before_after_test.rb
@@ -182,7 +182,7 @@ class TestUnitBeforeAfter < Test::Unit::TestCase
"test_something(MyExampleTest):",
"RuntimeError: Error in 2nd before_setup",
"_test_file_temp.rb:10",
- "/hardmock/lib/test_unit_before_after.rb:136:in `call'"
+ "/hardmock/lib/test_unit_before_after.rb:", ":in `call'"
see_results :tests => 1, :assertions => 0, :failures => 0, :errors => 1
end
|
TestUnitBeforeAndAfter test was breaking due to fragile line-number-in-stack-trace expectations... removal of one line of source in Hardmock's source code broke this test's expectations.
git-svn-id: <URL>
|
atomicobject_hardmock
|
train
|
rb
|
6737d626a816fcf4eed2ac8d7b68b5deb9405a0d
|
diff --git a/napalm/ios/ios.py b/napalm/ios/ios.py
index <HASH>..<HASH> 100644
--- a/napalm/ios/ios.py
+++ b/napalm/ios/ios.py
@@ -442,6 +442,7 @@ class IOSDriver(NetworkDriver):
output = self._commit_hostname_handler(cmd)
if ('original configuration has been successfully restored' in output) or \
('error' in output.lower()) or \
+ ('not a valid config file' in output.lower()) or \
('failed' in output.lower()):
msg = "Candidate config could not be applied\n{}".format(output)
raise ReplaceConfigException(msg)
|
FIXES #<I> additional error message on failed replace (#<I>)
|
napalm-automation_napalm
|
train
|
py
|
28d4bb163a9d671f537558a629c9529ee7efdcf2
|
diff --git a/cli/src/main/java/org/jboss/as/cli/impl/aesh/cmd/deployment/ListCommand.java b/cli/src/main/java/org/jboss/as/cli/impl/aesh/cmd/deployment/ListCommand.java
index <HASH>..<HASH> 100644
--- a/cli/src/main/java/org/jboss/as/cli/impl/aesh/cmd/deployment/ListCommand.java
+++ b/cli/src/main/java/org/jboss/as/cli/impl/aesh/cmd/deployment/ListCommand.java
@@ -135,7 +135,7 @@ public class ListCommand extends CommandWithPermissions {
throw new CommandException("Failed to execute operation request.", e);
}
if (!result.hasDefined(Util.RESULT)) {
- return null;
+ throw new CommandException("Failed to read deployment information.");
}
return result.get(Util.RESULT);
}
|
[WFCORE-<I>] Improve CLI error handling in ListCommand
|
wildfly_wildfly-core
|
train
|
java
|
57e68e42aa6a04f5e1574d77eb9cbd3f97bb99b5
|
diff --git a/lib/knife-solo/ssh_command.rb b/lib/knife-solo/ssh_command.rb
index <HASH>..<HASH> 100644
--- a/lib/knife-solo/ssh_command.rb
+++ b/lib/knife-solo/ssh_command.rb
@@ -142,6 +142,7 @@ module KnifeSolo
def run_command(command, options={})
detect_authentication_method
+ Chef::Log.debug("Running command #{command}")
result = ExecResult.new
command = command.sub(/^\s*sudo/, 'sudo -p \'knife sudo password: \'')
Net::SSH.start(host, user, connection_options) do |ssh|
@@ -154,6 +155,7 @@ module KnifeSolo
if data =~ /^knife sudo password: /
ch.send_data("#{password}\n")
else
+ Chef::Log.debug("#{command} stdout: #{data}")
ui.stdout << data if options[:streaming]
result.stdout << data
end
@@ -161,6 +163,7 @@ module KnifeSolo
channel.on_extended_data do |ch, type, data|
next unless type == 1
+ Chef::Log.debug("#{command} stderr: #{data}")
ui.stderr << data if options[:streaming]
result.stderr << data
end
|
Get some debugging output on prepare.
|
matschaffer_knife-solo
|
train
|
rb
|
f202331b80e7184a34b4ef7b1decf817c7a7fbe2
|
diff --git a/pypet/utils/helpful_classes.py b/pypet/utils/helpful_classes.py
index <HASH>..<HASH> 100644
--- a/pypet/utils/helpful_classes.py
+++ b/pypet/utils/helpful_classes.py
@@ -40,7 +40,7 @@ class IteratorChain(object):
return self._current.next()
except IndexError:
# Chain is empty we have no more elements
- raise StopIteration
+ raise StopIteration('Reached end of iterator chain')
def __iter__(self):
while True:
|
added error statement to StopIteration
|
SmokinCaterpillar_pypet
|
train
|
py
|
55be6b37f23a0693eb65e9561bd1f37819d55b77
|
diff --git a/django_mailbox/transports/generic.py b/django_mailbox/transports/generic.py
index <HASH>..<HASH> 100644
--- a/django_mailbox/transports/generic.py
+++ b/django_mailbox/transports/generic.py
@@ -1,4 +1,5 @@
import sys
+import six
from .base import EmailTransport
@@ -9,9 +10,12 @@ class GenericFileMailbox(EmailTransport):
def __init__(self, path):
super(GenericFileMailbox, self).__init__()
- self._path = path.encode(
- sys.getfilesystemencoding()
- )
+ if six.PY2:
+ self._path = path.encode(
+ sys.getfilesystemencoding()
+ )
+ else:
+ self._path = path
def get_instance(self):
return self._variant(self._path)
|
possible fix for python3 maildir issue
|
coddingtonbear_django-mailbox
|
train
|
py
|
f0dd9b0720f1d58251e282ab689533a82e792440
|
diff --git a/core/cache/watcher.go b/core/cache/watcher.go
index <HASH>..<HASH> 100644
--- a/core/cache/watcher.go
+++ b/core/cache/watcher.go
@@ -4,6 +4,7 @@
package cache
import (
+ "regexp"
"sort"
"sync"
@@ -258,3 +259,37 @@ func (w *ChangeWatcher) changed(topic string, value interface{}) {
w.notify(strings)
}
+
+// RegexpChangeWatcher notifies when individual pieces of a subscribed topic
+// match the given compiled regular expression. An initial event is sent
+// with the input given at creation.
+type RegexpChangeWatcher struct {
+ *stringsWatcherBase
+
+ compiled *regexp.Regexp
+}
+
+func newRegexpAddRemoveWatcher(compiled *regexp.Regexp, values ...string) *RegexpChangeWatcher {
+ return &RegexpChangeWatcher{
+ stringsWatcherBase: newStringsWatcherBase(values...),
+ compiled: compiled,
+ }
+}
+
+func (w *RegexpChangeWatcher) changed(topic string, value interface{}) {
+ strings, ok := value.([]string)
+ if !ok {
+ logger.Errorf("programming error, value not of type []string")
+ }
+
+ matches := set.NewStrings()
+ for _, s := range strings {
+ if w.compiled.MatchString(s) {
+ matches.Add(s)
+ }
+ }
+
+ if !matches.IsEmpty() {
+ w.notify(matches.Values())
+ }
+}
|
Added RegexpChangeWatcher, tested by machine.WatchContainers.
|
juju_juju
|
train
|
go
|
cba266702258f0a8c67efd3118667d8a0005692f
|
diff --git a/publisher/static/publisher/publisher.js b/publisher/static/publisher/publisher.js
index <HASH>..<HASH> 100644
--- a/publisher/static/publisher/publisher.js
+++ b/publisher/static/publisher/publisher.js
@@ -1,16 +1,15 @@
var $ = django.jQuery;
$(function() {
- $('input:checkbox.publish-checkbox').change(function() {
- if ($(this).is(':checked')) {
- var url = $(this).data('publish');
- }
- else {
- var url = $(this).data('unpublish');
- }
- $.get(url, function(data) {
- if (data.success) {
- $('.published-icon').find('img').toggle();
- }
- });
- })
-})
+ $('input:checkbox.publish-checkbox').change(function() {
+ if ($(this).is(':checked')) {
+ var url = $(this).attr('data-publish');
+ } else {
+ var url = $(this).attr('data-unpublish');
+ }
+ $.get(url, function(data) {
+ if (data.success) {
+ $('.published-icon').find('img').toggle();
+ }
+ });
+ });
+});
|
Swapped from data attributes to standard attr call to fix undefined bug
|
jp74_django-model-publisher
|
train
|
js
|
8df8a93c670173cd1d8737a507a253b94f2d0b5a
|
diff --git a/proto/text.go b/proto/text.go
index <HASH>..<HASH> 100644
--- a/proto/text.go
+++ b/proto/text.go
@@ -334,7 +334,8 @@ func writeStruct(w *textWriter, sv reflect.Value) error {
}
inner := fv.Elem().Elem() // interface -> *T -> T
tag := inner.Type().Field(0).Tag.Get("protobuf")
- props.Parse(tag) // Overwrite the outer props.
+ props = new(Properties) // Overwrite the outer props var, but not its pointee.
+ props.Parse(tag)
// Write the value in the oneof, not the oneof itself.
fv = inner.Field(0)
|
Fix race in text formatting of oneof fields.
I was reparsing the oneof's struct field tag,
but not making a new Properties for it.
|
golang_protobuf
|
train
|
go
|
95d24e2fbf0f863dd5e6a6bf8b56449daab61c67
|
diff --git a/tag.go b/tag.go
index <HASH>..<HASH> 100644
--- a/tag.go
+++ b/tag.go
@@ -284,14 +284,14 @@ func (t *Tag) Save() error {
newFile.Close()
originalFile.Close()
- // Make sure we clean up the temp file if it's still around
- os.Remove(newFile.Name())
-
// Replace original file with new file
if err = os.Rename(newFile.Name(), originalFile.Name()); err != nil {
return err
}
+ // Make sure we clean up the temp file if it's still around
+ os.Remove(newFile.Name())
+
// Set t.file to new file with original name
t.file, err = os.Open(originalFile.Name())
if err != nil {
|
Fix bug with rename in tag.Save
|
bogem_id3v2
|
train
|
go
|
ab285bcb00b6c45387e63e40e631387a93f2e77b
|
diff --git a/packages/webiny-app-cms/src/editor/components/Droppable.js b/packages/webiny-app-cms/src/editor/components/Droppable.js
index <HASH>..<HASH> 100644
--- a/packages/webiny-app-cms/src/editor/components/Droppable.js
+++ b/packages/webiny-app-cms/src/editor/components/Droppable.js
@@ -35,7 +35,7 @@ const Droppable = pure(
}
return connectDropTarget(
- <div data-type="droppable">
+ <div data-type="droppable" style={{ position: "relative" }}>
{children({ isDragging, isOver, isDroppable: isDroppable(item) })}
</div>
);
|
Fixes out of bounds drop zone
|
Webiny_webiny-js
|
train
|
js
|
bf297dab099637a10d1930dfcc706881cb76a9f0
|
diff --git a/js/examples/raindrops.js b/js/examples/raindrops.js
index <HASH>..<HASH> 100644
--- a/js/examples/raindrops.js
+++ b/js/examples/raindrops.js
@@ -104,7 +104,7 @@ example.start();
// Start the fps and raindrop count plot.
var fpsPlot = new SmoothieChart({tooltip:true});
fpsPlot.streamTo(document.getElementById("fpsPlot"), 1000);
-var countPlot = new SmoothieChart({tooltip:true});
+var countPlot = new SmoothieChart({tooltip:true, interpolation:'linear'});
countPlot.streamTo(document.getElementById("countPlot"), 1000);
var fpsLine = new TimeSeries();
var countLine = new TimeSeries();
@@ -114,9 +114,10 @@ setInterval(function() {
fpsLine.append(new Date().getTime(), example.getFPS());
}, 1000);
-// Add a raindrop 0.1 second.
+// Add a raindrop every 0.1 second, unless the fps dips below 21.
setInterval(function() {
- example.addRaindrop();
+ if (example.getFPS() > 20)
+ example.addRaindrop();
countLine.append(new Date().getTime(), example.numRaindrops());
}, 100);
|
Added a bound to the number of spawns, based on the fps.
|
jobtalle_myr.js
|
train
|
js
|
cb3548c64c745e97a48b300440a52acc4b2c578f
|
diff --git a/src/Composer/Util/ProcessExecutor.php b/src/Composer/Util/ProcessExecutor.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Util/ProcessExecutor.php
+++ b/src/Composer/Util/ProcessExecutor.php
@@ -33,6 +33,7 @@ class ProcessExecutor
public function execute($command, &$output = null)
{
$captureOutput = count(func_get_args()) > 1;
+ $this->errorOutput = null;
$process = new Process($command, null, null, null, static::getTimeout());
$process->run(function($type, $buffer) use ($captureOutput) {
if ($captureOutput) {
|
Reset the errorOutput before attempting to run command
|
mothership-ec_composer
|
train
|
php
|
919b5bc7dd55f864f4dc3c27aba470f8c3112af0
|
diff --git a/gruvi/fibers.py b/gruvi/fibers.py
index <HASH>..<HASH> 100644
--- a/gruvi/fibers.py
+++ b/gruvi/fibers.py
@@ -47,6 +47,7 @@ class Fiber(fibers.Fiber):
self._log = logging.get_logger(self)
self._done = Signal()
self._thread = threading.get_ident()
+ self.context = None
@property
def name(self):
diff --git a/gruvi/logging.py b/gruvi/logging.py
index <HASH>..<HASH> 100644
--- a/gruvi/logging.py
+++ b/gruvi/logging.py
@@ -117,6 +117,7 @@ class ContextLogger(object):
return
prefix = [self.thread_info()]
prefix.append(self.stack_info() if self._debug else '')
+ prefix.append(getattr(fibers.current(), 'context', None) or '')
prefix.append(self.context)
while not prefix[-1]:
prefix.pop()
|
[logging] show a fiber context
|
geertj_gruvi
|
train
|
py,py
|
9b4abb2cc7005a2b2eb0422c0812067ed3db22be
|
diff --git a/jawn-core/src/main/java/net/javapla/jawn/core/FrameworkBootstrap.java b/jawn-core/src/main/java/net/javapla/jawn/core/FrameworkBootstrap.java
index <HASH>..<HASH> 100644
--- a/jawn-core/src/main/java/net/javapla/jawn/core/FrameworkBootstrap.java
+++ b/jawn-core/src/main/java/net/javapla/jawn/core/FrameworkBootstrap.java
@@ -291,9 +291,8 @@ public class FrameworkBootstrap {
} catch (Exception e) {
logger.debug("Error reading custom configuration. Going with built in defaults. The error was: " + getCauseMessage(e));
}
-
- return all;
}
+ return all;
} else {
logger.debug("Did not find custom configuration for {}. Going with built in defaults ", clazz);
}
|
looking for modules were exiting too early
|
MTDdk_jawn
|
train
|
java
|
5acc5e814009e7fa4cc12a228141353ee23aa3e3
|
diff --git a/examples/client.js b/examples/client.js
index <HASH>..<HASH> 100644
--- a/examples/client.js
+++ b/examples/client.js
@@ -2,7 +2,9 @@
const soupbintcp = require('../');
-const client = soupbintcp.createClient(4000, 'localhost', () => {
+const client = soupbintcp.createClient(4000, 'localhost');
+
+client.on('connect', () => {
client.login({
username: 'foo',
password: 'bar',
diff --git a/lib/Client.js b/lib/Client.js
index <HASH>..<HASH> 100644
--- a/lib/Client.js
+++ b/lib/Client.js
@@ -48,7 +48,12 @@ class Client extends EventEmitter {
this.emit('end');
});
- socket.connect(port, host, cb);
+ socket.connect(port, host, () => {
+ this.emit('connect');
+
+ if (cb)
+ cb();
+ });
}
login(payload, cb) {
|
Add 'connect' event for client
|
jvirtanen_node-soupbintcp
|
train
|
js,js
|
536b94745af834f7a85ddc88dfdd5f64510e8648
|
diff --git a/src/Autolinker.js b/src/Autolinker.js
index <HASH>..<HASH> 100644
--- a/src/Autolinker.js
+++ b/src/Autolinker.js
@@ -264,6 +264,8 @@ Autolinker.prototype = {
* @return {String} The HTML, with matches automatically linked.
*/
link : function( textOrHtml ) {
+ if( !textOrHtml ) { return ""; } // handle `null` and `undefined`
+
var htmlParser = this.getHtmlParser(),
htmlNodes = htmlParser.parse( textOrHtml ),
anchorTagStackCount = 0, // used to only process text around anchor tags, and any inner text/html they may have
diff --git a/tests/AutolinkerSpec.js b/tests/AutolinkerSpec.js
index <HASH>..<HASH> 100644
--- a/tests/AutolinkerSpec.js
+++ b/tests/AutolinkerSpec.js
@@ -47,6 +47,15 @@ describe( "Autolinker", function() {
} );
+ it( 'should return an empty string when provided `undefined` as its argument', function() {
+ expect( autolinker.link( undefined ) ).toBe( '' );
+ } );
+
+ it( 'should return an empty string when provided `null` as its argument', function() {
+ expect( autolinker.link( null ) ).toBe( '' );
+ } );
+
+
describe( "URL linking", function() {
describe( "protocol-prefixed URLs (i.e. URLs starting with http:// or https://)", function() {
|
Handle `null` or `undefined` being passed to the link() method by returning empty string.
|
gregjacobs_Autolinker.js
|
train
|
js,js
|
72e4e65a9c0b81e6620cba9d463856879be8da97
|
diff --git a/grails-core/src/main/groovy/org/codehaus/groovy/grails/support/MockApplicationContext.java b/grails-core/src/main/groovy/org/codehaus/groovy/grails/support/MockApplicationContext.java
index <HASH>..<HASH> 100644
--- a/grails-core/src/main/groovy/org/codehaus/groovy/grails/support/MockApplicationContext.java
+++ b/grails-core/src/main/groovy/org/codehaus/groovy/grails/support/MockApplicationContext.java
@@ -332,7 +332,6 @@ public class MockApplicationContext extends GroovyObjectSupport implements WebAp
this.servletContext = servletContext;
}
- @Override
public Environment getEnvironment() {
return new org.springframework.web.context.support.DefaultWebEnvironment();
}
|
remove @Override from interface method
|
grails_grails-core
|
train
|
java
|
a49e9d9b20d172189341a837fbe2af8d8e692611
|
diff --git a/eventsourcing/domain/model/decorators.py b/eventsourcing/domain/model/decorators.py
index <HASH>..<HASH> 100644
--- a/eventsourcing/domain/model/decorators.py
+++ b/eventsourcing/domain/model/decorators.py
@@ -156,11 +156,12 @@ def attribute(getter):
raise ProgrammingError("Expected a function, got: {}".format(repr(getter)))
-def retry(exc=Exception, max_attempts=1, wait=0):
+def retry(exc=Exception, max_attempts=1, wait=0, stall=0):
def _retry(func):
@wraps(func)
def wrapper(*args, **kwargs):
+ sleep(stall)
attempts = 0
while True:
try:
|
Changed retry decorator to support 'stall' delay before looping.
|
johnbywater_eventsourcing
|
train
|
py
|
0881fec7f02bfc147b7b0bd98eb5cd4dc7a144ed
|
diff --git a/resources/views/adminarea/partials/timestamps.blade.php b/resources/views/adminarea/partials/timestamps.blade.php
index <HASH>..<HASH> 100644
--- a/resources/views/adminarea/partials/timestamps.blade.php
+++ b/resources/views/adminarea/partials/timestamps.blade.php
@@ -1,5 +1,11 @@
<div style="padding-top: 5px;">
@if($model->exists)
+ <small>
+ <strong>{{ trans('cortex/foundation::common.id') }}:</strong> {{ $model->getKey() }}
+ </small>
+
+ @if($model->created_at || $model->updated_at) | @endif
+
@if($model->created_at)
<small>
<strong>{{ trans('cortex/foundation::common.created_at') }}:</strong>
|
Display record ID in form footer for admins
|
rinvex_cortex-foundation
|
train
|
php
|
eca5fe3ff394e0de089fb646d7ea9172b9f6cb5b
|
diff --git a/builtin/providers/aws/resource_aws_elb_test.go b/builtin/providers/aws/resource_aws_elb_test.go
index <HASH>..<HASH> 100644
--- a/builtin/providers/aws/resource_aws_elb_test.go
+++ b/builtin/providers/aws/resource_aws_elb_test.go
@@ -425,7 +425,7 @@ resource "aws_elb" "bar" {
const testAccAWSELBConfigHealthCheck = `
resource "aws_elb" "bar" {
name = "foobar-terraform-test"
- availability_zones = ["us-west-2a"]
+ availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"]
listener {
instance_port = 8000
|
providers/aws: fix ELB acceptance test
|
hashicorp_terraform
|
train
|
go
|
805e49af441f1fd8e74dc730179dbc87b4cbeb6c
|
diff --git a/src/Context/FOSRestFormValidationContext.php b/src/Context/FOSRestFormValidationContext.php
index <HASH>..<HASH> 100644
--- a/src/Context/FOSRestFormValidationContext.php
+++ b/src/Context/FOSRestFormValidationContext.php
@@ -13,6 +13,7 @@ class FOSRestFormValidationContext extends RawApiContext
{
/**
* @Then /^the JSON response should have the error "([^"]*)" at "([^"]*)"$/
+ * @Then /^the JSON response should have the error '([^']*)' at "([^"]*)"$/
*/
public function theJSONResponseShouldHaveTheErrorAt(string $errorMessage, string $formChildFieldDescriptor)
{
|
Added additional quote format for FOSRest JSON response check
|
Persata_SymfonyApiExtension
|
train
|
php
|
1e7acd88df1d33af83d992e0037253de93664cd9
|
diff --git a/lib/down/chunked_io.rb b/lib/down/chunked_io.rb
index <HASH>..<HASH> 100644
--- a/lib/down/chunked_io.rb
+++ b/lib/down/chunked_io.rb
@@ -36,6 +36,8 @@ module Down
@rewindable = rewindable
@buffer = nil
@position = 0
+ @next_chunk = nil
+ @closed = false
retrieve_chunk # fetch first chunk so that we know whether the file is empty
end
diff --git a/test/support/warnings.rb b/test/support/warnings.rb
index <HASH>..<HASH> 100644
--- a/test/support/warnings.rb
+++ b/test/support/warnings.rb
@@ -1,3 +1,4 @@
require "warning"
+Warning.process('', /instance variable @\w+ not initialized/ => :raise)
Warning.ignore(/interpreted as argument prefix/, Gem::Specification.find_by_name("http-parser").load_paths.first)
|
Remove uninitialized @next_chunk and @closed warnings
Fixes #<I>
|
janko_down
|
train
|
rb,rb
|
a0aff329fe6c9c798f8e6b78419110e3778fa706
|
diff --git a/werkzeug/_reloader.py b/werkzeug/_reloader.py
index <HASH>..<HASH> 100644
--- a/werkzeug/_reloader.py
+++ b/werkzeug/_reloader.py
@@ -40,11 +40,16 @@ def _iter_module_files():
entered.add(path_entry)
try:
for filename in os.listdir(path_entry):
- if not filename.endswith(('.py', '.pyc', '.pyo')):
- continue
- filename = _verify_file(os.path.join(path_entry, filename))
- if filename:
- yield filename
+ path = os.path.join(path_entry, filename)
+ if os.path.isdir(path):
+ for filename in _recursive_walk(path):
+ yield filename
+ else:
+ if not filename.endswith(('.py', '.pyc', '.pyo')):
+ continue
+ filename = _verify_file(path)
+ if filename:
+ yield filename
except OSError:
pass
|
Make _recursive_walk actually recursive
|
pallets_werkzeug
|
train
|
py
|
053248d0f0d8a811ff1c516f172a38b60cf8fc53
|
diff --git a/monero_serialize/xmrboost.py b/monero_serialize/xmrboost.py
index <HASH>..<HASH> 100644
--- a/monero_serialize/xmrboost.py
+++ b/monero_serialize/xmrboost.py
@@ -32,6 +32,9 @@ async def load_uvarint(reader):
result = 0
shift = 0
+ if size > 8:
+ raise ValueError('Varint size too big')
+
# TODO: endianity, rev bytes if needed
for _ in range(size):
await reader.areadinto(buffer)
|
boost: varint unserialize range check
- too big varint is probably an invalid deserialization, maximum allowed is 8 B
|
ph4r05_monero-serialize
|
train
|
py
|
8556cb6ae3ffe298e0d3e2ba91d559dba703eba6
|
diff --git a/pkg/k8s/factory_functions.go b/pkg/k8s/factory_functions.go
index <HASH>..<HASH> 100644
--- a/pkg/k8s/factory_functions.go
+++ b/pkg/k8s/factory_functions.go
@@ -134,12 +134,22 @@ func ObjToSlimCNP(obj interface{}) *types.SlimCNP {
func ObjTov1Pod(obj interface{}) *slim_corev1.Pod {
pod, ok := obj.(*slim_corev1.Pod)
- if !ok {
- log.WithField(logfields.Object, logfields.Repr(obj)).
- Warn("Ignoring invalid k8s v1 Pod")
- return nil
+ if ok {
+ return pod
+ }
+ deletedObj, ok := obj.(cache.DeletedFinalStateUnknown)
+ if ok {
+ // Delete was not observed by the watcher but is
+ // removed from kube-apiserver. This is the last
+ // known state and the object no longer exists.
+ pod, ok := deletedObj.Obj.(*slim_corev1.Pod)
+ if ok {
+ return pod
+ }
}
- return pod
+ log.WithField(logfields.Object, logfields.Repr(obj)).
+ Warn("Ignoring invalid k8s v1 Pod")
+ return nil
}
func ObjToV1Node(obj interface{}) *slim_corev1.Node {
|
pkg/k8s: cast to Pod even if obj is cache.DeletedFinalStateUnknown
When casting to a Pod, the k8s watcher might send a
cache.DeletedFinalStateUnknown object to the event handler. Since the
converter is not expecting this type, it will cause a warning to be
printed in the logs which will be unexpected for users. This commit
adds the ability for the function converter to cast the objects from
cache.DeletedFinalStateUnknown to avoid printing such warning.
|
cilium_cilium
|
train
|
go
|
af30cd88706916a785ac40192188a46e63434528
|
diff --git a/mod/quiz/report/statistics/qstats.php b/mod/quiz/report/statistics/qstats.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/report/statistics/qstats.php
+++ b/mod/quiz/report/statistics/qstats.php
@@ -89,12 +89,6 @@ class qstats{
$stats->covariancemaxsum += $sortedgradedifference * $sortedothergradedifference;
$stats->covariancewithoverallgradesum += $gradedifference * $overallgradedifference;
- if ($stats->subquestion){
- $question =& $this->subquestions[$stats->questionid];
- } else {
- $question =& $this->questions[$stats->questionid];
- }
-
}
function add_response_detail_to_array($responsedetail){
|
MDL-<I> "quiz stats report:Seperation of functionality and unit tests for calculations" forgot to remove this, now redundant, piece of code.
|
moodle_moodle
|
train
|
php
|
c274b5fc358ac9c86d97a33c0668ddc1190b5fad
|
diff --git a/ghost/admin/app/components/gh-post-settings-menu/email.js b/ghost/admin/app/components/gh-post-settings-menu/email.js
index <HASH>..<HASH> 100644
--- a/ghost/admin/app/components/gh-post-settings-menu/email.js
+++ b/ghost/admin/app/components/gh-post-settings-menu/email.js
@@ -84,7 +84,7 @@ export default Component.extend({
return yield this.ajax.post(url, options);
} catch (error) {
if (error) {
- this.notifications.showAPIError(error, {key: 'send.previewEmail'});
+ this.set('sendTestEmailError', 'Error sending mail, please check your mailgun config');
}
}
}).drop()
|
Updated send test mail error for mailgun
no issue
|
TryGhost_Ghost
|
train
|
js
|
837a1f829232745159c280a097350f9b92548337
|
diff --git a/lib/howitzer/capybara/settings.rb b/lib/howitzer/capybara/settings.rb
index <HASH>..<HASH> 100644
--- a/lib/howitzer/capybara/settings.rb
+++ b/lib/howitzer/capybara/settings.rb
@@ -266,6 +266,7 @@ module Capybara
Capybara.run_server = false
Capybara.app_host = ''
+ Capybara.asset_host = app_base_url
Capybara.default_wait_time = settings.timeout_small
Capybara.ignore_hidden_elements = true
Capybara.visible_text_only = true
|
Added capybara asset host to settings
|
strongqa_howitzer
|
train
|
rb
|
17b6aa0117a8150be17570afdccf5ea3f4c59f45
|
diff --git a/pymzn/_mzn/_minizinc.py b/pymzn/_mzn/_minizinc.py
index <HASH>..<HASH> 100644
--- a/pymzn/_mzn/_minizinc.py
+++ b/pymzn/_mzn/_minizinc.py
@@ -146,6 +146,8 @@ def minizinc(mzn, *dzn_files, data=None, keep=False, output_base=None,
elif mzn_model.mzn_file:
output_dir, mzn_name = os.path.split(mzn_file)
output_prefix, mzn_ext = os.path.split(mzn_name)
+ else:
+ output_dir = os.getcwd()
output_prefix += '_'
output_file = NamedTemporaryFile(dir=output_dir, prefix=output_prefix,
suffix='.mzn', delete=False, mode='w+',
|
minizinc: use current working directory if keep=True but a model string is used
|
paolodragone_pymzn
|
train
|
py
|
8b50b83067468b6ee75fdef8194ca76b00c326ec
|
diff --git a/pkg/cloudprovider/providers/azure/azure_loadbalancer.go b/pkg/cloudprovider/providers/azure/azure_loadbalancer.go
index <HASH>..<HASH> 100644
--- a/pkg/cloudprovider/providers/azure/azure_loadbalancer.go
+++ b/pkg/cloudprovider/providers/azure/azure_loadbalancer.go
@@ -538,6 +538,10 @@ func (az *Cloud) reconcileLoadBalancer(lb network.LoadBalancer, fipConfiguration
}
}
+ loadDistribution := network.Default
+ if service.Spec.SessionAffinity == v1.ServiceAffinityClientIP {
+ loadDistribution = network.SourceIP
+ }
expectedRules[i] = network.LoadBalancingRule{
Name: &lbRuleName,
LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{
@@ -551,6 +555,7 @@ func (az *Cloud) reconcileLoadBalancer(lb network.LoadBalancer, fipConfiguration
Probe: &network.SubResource{
ID: to.StringPtr(az.getLoadBalancerProbeID(lbName, lbRuleName)),
},
+ LoadDistribution: loadDistribution,
FrontendPort: to.Int32Ptr(port.Port),
BackendPort: to.Int32Ptr(port.Port),
EnableFloatingIP: to.BoolPtr(true),
|
azure: loadbalancer: respect svc sessionaffinity
If the Service spec sets sessionAffinity, reflects that in the
configuration specified for the Azure loadbalancer.
|
kubernetes_kubernetes
|
train
|
go
|
360a8956fe73a0a96315e946f52737569d990369
|
diff --git a/smmap/__init__.py b/smmap/__init__.py
index <HASH>..<HASH> 100644
--- a/smmap/__init__.py
+++ b/smmap/__init__.py
@@ -3,7 +3,7 @@
__author__ = "Sebastian Thiel"
__contact__ = "byronimo@gmail.com"
__homepage__ = "https://github.com/Byron/smmap"
-version_info = (0, 8, 1)
+version_info = (0, 8, 2)
__version__ = '.'.join(str(i) for i in version_info)
# make everything available in root package for convenience
|
Bumped version to <I>
|
gitpython-developers_smmap
|
train
|
py
|
6244044a93478bd383b6ff39d99d8cb3be78826d
|
diff --git a/src/TestCase.php b/src/TestCase.php
index <HASH>..<HASH> 100644
--- a/src/TestCase.php
+++ b/src/TestCase.php
@@ -21,6 +21,7 @@ abstract class TestCase extends BaseTestCase
{
$loop = LoopFactory::create();
$container = ContainerBuilder::buildDevContainer();
+ $container->set(LoopInterface::class, $loop);
$container->set(CommandBus::class, $this->createCommandBus($loop));
return Factory::create($container, [
Options::NAMESPACE => '',
|
Added missing setting of loop into container on hydrate
|
php-api-clients_resource-test-utilities
|
train
|
php
|
665bda536d19917cf88e5fb3642fe606412c9976
|
diff --git a/easybatch-core/src/main/java/org/easybatch/core/impl/Engine.java b/easybatch-core/src/main/java/org/easybatch/core/impl/Engine.java
index <HASH>..<HASH> 100755
--- a/easybatch-core/src/main/java/org/easybatch/core/impl/Engine.java
+++ b/easybatch-core/src/main/java/org/easybatch/core/impl/Engine.java
@@ -132,7 +132,7 @@ public final class Engine implements Callable<Report> {
//read next record
Record currentRecord;
try {
- currentRecord = recordReader.readNextRecord();
+ currentRecord = readRecord();
} catch (Exception e) {
eventManager.fireOnBatchException(e);
eventManager.fireOnRecordReadException(e);
|
call readRecord method to fire pre/post reading events
|
j-easy_easy-batch
|
train
|
java
|
dbc173c5b895a18cb4dadfdd8b811f9ae688508f
|
diff --git a/cppman/Config.py b/cppman/Config.py
index <HASH>..<HASH> 100644
--- a/cppman/Config.py
+++ b/cppman/Config.py
@@ -23,8 +23,9 @@
#
import ConfigParser
+import os
-from os.path import exists
+from os.path import dirname, exists
class Config(object):
def __init__(self, configfile):
@@ -48,6 +49,10 @@ class Config(object):
def set_default(self):
"""Set config to default."""
+ try:
+ os.makedirs(dirname(self._configfile))
+ except: pass
+
self._config = ConfigParser.RawConfigParser()
self._config.add_section('Settings')
self._config.set('Settings', 'UpdateManPath', 'false')
@@ -58,6 +63,10 @@ class Config(object):
def store_config(self):
"""Store config back to file."""
+ try:
+ os.makedirs(dirname(self._configfile))
+ except: pass
+
with open(self._configfile, 'w') as f:
self._config.write(f)
|
Fix bug: config dir doesn't get created of doesn't exists.
|
aitjcize_cppman
|
train
|
py
|
f25e43fab8e9d935a155f2a528133871c1cc89b3
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -750,6 +750,7 @@ gulp.task('build.dart', function(done) {
'build/pubspec.dart',
'build/analyze.dart',
'build/pubbuild.dart',
+ 'build.dart.material.css',
sequenceComplete(done)
);
});
@@ -1050,14 +1051,16 @@ gulp.task('build.dart2js.material', function(done) {
runSequence('build.dart', 'build.css.material', sequenceComplete(done));
});
-// TODO: this target is temporary until we find a way to use the SASS transformer
-gulp.task('build.dart.material', ['build/packages.dart'], function() {
+gulp.task('build.dart.material.css', function() {
return gulp.src('dist/dart/angular2_material/src/**/*.scss')
.pipe(sass())
.pipe(autoprefixer())
.pipe(gulp.dest('dist/dart/angular2_material/lib/src'));
});
+gulp.task('build.dart.material', ['build/packages.dart'], function(done) {
+ runSequence('build/packages.dart', 'build.dart.material.css', sequenceComplete(done))
+});
gulp.task('cleanup.builder', function() {
return angularBuilder.cleanup();
|
chore(build): add material css to dart build.
|
angular_angular
|
train
|
js
|
fee93008b6ffe95854cff58486169b253a58b44e
|
diff --git a/sovrin_client/client/wallet/wallet.py b/sovrin_client/client/wallet/wallet.py
index <HASH>..<HASH> 100644
--- a/sovrin_client/client/wallet/wallet.py
+++ b/sovrin_client/client/wallet/wallet.py
@@ -68,6 +68,10 @@ class Wallet(PWallet, TrustAnchoring):
:param raw: the wallet's raw representation of any version
:return: the wallet's raw representation of the current version
"""
+
+ # At first, call makeRawCompatible method of base class(es)
+ # if it contains such the method
+
rawClassVersion = raw.get(getClassVersionKey(Wallet), 0)
if rawClassVersion < 1:
Wallet.convertRawToVersion1(raw)
|
INDY-<I>: Added a comment
|
hyperledger_indy-node
|
train
|
py
|
f5459a9d7728211ccf1ecaa4ae771c6ecae47fd4
|
diff --git a/src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java b/src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java
index <HASH>..<HASH> 100644
--- a/src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java
+++ b/src/main/groovy/netflix/nebula/dependency/recommender/DependencyRecommendationsPlugin.java
@@ -58,7 +58,7 @@ public class DependencyRecommendationsPlugin implements Plugin<Project> {
if (CORE_BOM_SUPPORT_ENABLED) {
logger.warn("coreBomSupport feature enabled");
recommendationProviderContainer.excludeConfigurations("archives", NEBULA_RECOMMENDER_BOM, "provided",
- "versionManagement", "resolutionRules", "bootArchives", "webapp");
+ "versionManagement", "resolutionRules", "bootArchives", "webapp", "checkstyle", "jacocoAgent", "jacocoAnt", "pmd", "findbugs", "spotbugs", "cobertura");
bomConfiguration.setCanBeResolved(false);
applyRecommendationsDirectly(project, bomConfiguration);
} else {
|
Exclude tools configurations from applying recommendatation from bom
|
nebula-plugins_nebula-dependency-recommender-plugin
|
train
|
java
|
3cfbdfb31ee3b36273f581460536a5084e44fca6
|
diff --git a/code/Calendar.php b/code/Calendar.php
index <HASH>..<HASH> 100755
--- a/code/Calendar.php
+++ b/code/Calendar.php
@@ -120,7 +120,6 @@ class Calendar extends Page {
}
$f->addFieldToTab("Root.Main", new TextField('RSSTitle', _t('Calendar.RSSTITLE','Title of RSS Feed')),'Content');
- $this->extend('updateCMSFields',$f);
return $f;
}
|
BUGFIX: updateCMSFields() called multiple times
|
unclecheese_silverstripe-event-calendar
|
train
|
php
|
6de0c4b3ed2193800b0f81839dedded355a4d52c
|
diff --git a/lib/ryodo/suffix_list_fetcher.rb b/lib/ryodo/suffix_list_fetcher.rb
index <HASH>..<HASH> 100644
--- a/lib/ryodo/suffix_list_fetcher.rb
+++ b/lib/ryodo/suffix_list_fetcher.rb
@@ -41,7 +41,8 @@ module Ryodo
def prepare_data
@prepared_data = @fetched_data.inject([]) do |acc, line|
- next(acc) if SKIPPABLE_LINE_REGEXP.match?(line)
+ # Using `Regexp#===` instead of `.match?`, to be compatible with Ruby 2.3 and older
+ next(acc) if SKIPPABLE_LINE_REGEXP === line # rubocop:disable Style/CaseEquality
acc << reverse_dn(line)
end.sort
end
|
Fix method issue (.match? exists in Ruby <I>+ only)
|
asaaki_ryodo
|
train
|
rb
|
834e23dc003d950196d085eb92a81f36e43b067f
|
diff --git a/discord/channel.py b/discord/channel.py
index <HASH>..<HASH> 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -372,7 +372,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
async def purge(
self,
*,
- limit: int = 100,
+ limit: Optional[int] = 100,
check: Callable[[Message], bool] = MISSING,
before: Optional[SnowflakeTime] = None,
after: Optional[SnowflakeTime] = None,
diff --git a/discord/threads.py b/discord/threads.py
index <HASH>..<HASH> 100644
--- a/discord/threads.py
+++ b/discord/threads.py
@@ -366,7 +366,7 @@ class Thread(Messageable, Hashable):
async def purge(
self,
*,
- limit: int = 100,
+ limit: Optional[int] = 100,
check: Callable[[Message], bool] = MISSING,
before: Optional[SnowflakeTime] = None,
after: Optional[SnowflakeTime] = None,
|
Fix type annotations for purge's limit param on Thread/TextChannel
Optional was missing.
|
Rapptz_discord.py
|
train
|
py,py
|
49617203a3b734ce0d8648e8cfeb36b271d94a5f
|
diff --git a/openquake/commonlib/tests/riskmodels_test.py b/openquake/commonlib/tests/riskmodels_test.py
index <HASH>..<HASH> 100644
--- a/openquake/commonlib/tests/riskmodels_test.py
+++ b/openquake/commonlib/tests/riskmodels_test.py
@@ -35,7 +35,7 @@ class ParseVulnerabilityModelTestCase(unittest.TestCase):
assetCategory="population"
lossCategory="fatalities">
<IML IMT="PGA">0.005 0.007 0.0098 0.0137</IML>
- <discreteVulnerability vulnerabilityFunctionID="A"
+ <discreteVulnerability vulnerabilityFunctionID="RC/A"
probabilisticDistribution="LN">
<lossRatio>0.01 0.06 0.18 0.36</lossRatio>
<coefficientsVariation>0.30 0.30 0.30 0.30
@@ -46,7 +46,7 @@ class ParseVulnerabilityModelTestCase(unittest.TestCase):
assetCategory="population"
lossCategory="fatalities">
<IML IMT="PGA">0.004 0.008 0.037</IML>
- <discreteVulnerability vulnerabilityFunctionID="B"
+ <discreteVulnerability vulnerabilityFunctionID="RC/B"
probabilisticDistribution="LN">
<lossRatio>0.01 0.06 0.18</lossRatio>
<coefficientsVariation>0.30 0.30 0.30
|
Used a slash in the vulnerabilityFunctionID
|
gem_oq-engine
|
train
|
py
|
955139bde5381f6647ffaa6f3bc59cf50ec5e015
|
diff --git a/cumulusci/core/config.py b/cumulusci/core/config.py
index <HASH>..<HASH> 100644
--- a/cumulusci/core/config.py
+++ b/cumulusci/core/config.py
@@ -392,6 +392,10 @@ class OrgConfig(BaseConfig):
def org_id(self):
return self.id.split('/')[-2]
+ @property
+ def username(self):
+ return self.userinfo__preferred_username
+
def load_userinfo(self):
self._load_userinfo()
diff --git a/cumulusci/core/tasks.py b/cumulusci/core/tasks.py
index <HASH>..<HASH> 100644
--- a/cumulusci/core/tasks.py
+++ b/cumulusci/core/tasks.py
@@ -65,6 +65,10 @@ class BaseTask(object):
""" Log the beginning of the task execution """
self.logger.info('Beginning task: %s', self.__class__.__name__)
if self.org_config:
- self.logger.info('As user: %s', self.org_config.userinfo__preferred_username)
- self.logger.info('On org: %s', self.org_config.org_id)
+ self.logger.info(
+ '%15s %s',
+ 'As user:',
+ self.org_config.username
+ )
+ self.logger.info('%15s %s', 'In org:', self.org_config.org_id)
self.logger.info('')
|
properly print username for all org types, closes #<I>
|
SFDO-Tooling_CumulusCI
|
train
|
py,py
|
35b6d023d63c9a61bfcdf1fb56e3f0df68ab3a8a
|
diff --git a/services/purge_service_offering_test.go b/services/purge_service_offering_test.go
index <HASH>..<HASH> 100644
--- a/services/purge_service_offering_test.go
+++ b/services/purge_service_offering_test.go
@@ -80,6 +80,8 @@ var _ = Describe("Purging service offerings", func() {
AfterEach(func() {
app_helpers.AppReport(appName, DEFAULT_TIMEOUT)
+
+ Expect(cf.Cf("delete", appName, "-f", "-r").Wait(DEFAULT_TIMEOUT)).To(Exit(0))
})
})
})
|
Delete app in services test AfterEach
[#<I>]
|
cloudfoundry_cf-acceptance-tests
|
train
|
go
|
ab61ca42d42b3a98bebbbe112b8cd25809a1ef0c
|
diff --git a/lib/geminabox/server.rb b/lib/geminabox/server.rb
index <HASH>..<HASH> 100644
--- a/lib/geminabox/server.rb
+++ b/lib/geminabox/server.rb
@@ -156,7 +156,7 @@ module Geminabox
delete '/gems/*.gem' do
unless self.class.allow_delete?
- error_response(403, 'Gem deletion is disabled - see https://github.com/cwninja/geminabox/issues/115')
+ error_response(403, 'Gem deletion is disabled - see https://github.com/geminabox/geminabox/issues/115')
end
serialize_update do
|
Update link to issue
The location of geminabox changed to <URL>
|
geminabox_geminabox
|
train
|
rb
|
f0010caaa09ebfa9fa908e17b90efb815ff96e48
|
diff --git a/salt/modules/mysql.py b/salt/modules/mysql.py
index <HASH>..<HASH> 100755
--- a/salt/modules/mysql.py
+++ b/salt/modules/mysql.py
@@ -271,7 +271,7 @@ def db_create(name):
# db doesnt exist, proceed
db = connect()
cur = db.cursor()
- query = "CREATE DATABASE %s;" % name
+ query = "CREATE DATABASE `%s`;" % name
log.debug("Query: {0}".format(query,))
if cur.execute( query ):
log.info("DB '{0}' created".format(name,))
@@ -298,7 +298,7 @@ def db_remove(name):
# db doesnt exist, proceed
db = connect()
cur = db.cursor()
- query = "DROP DATABASE %s;" % name
+ query = "DROP DATABASE `%s`;" % name
log.debug("Doing query: {0}".format(query,))
cur.execute( query )
|
added escaping for CREATE/DROP DATABASE
|
saltstack_salt
|
train
|
py
|
62b4752804f5b2b1f706187e0f453d6fd6bffdf1
|
diff --git a/command/agent/command.go b/command/agent/command.go
index <HASH>..<HASH> 100644
--- a/command/agent/command.go
+++ b/command/agent/command.go
@@ -720,6 +720,11 @@ Options:
-encrypt=key Provides the gossip encryption key
-join=1.2.3.4 Address of an agent to join at start time.
Can be specified multiple times.
+ -retry-join=1.2.3.4 Address of an agent to join at start time with
+ retries enabled. Can be specified multiple times.
+ -retry-interval=30s Time to wait between join attempts.
+ -retry-max=0 Maximum number of join attempts. Defaults to 0, which
+ will retry indefinitely.
-log-level=info Log level of the agent.
-node=hostname Name of this node. Must be unique in the cluster
-protocol=N Sets the protocol version. Defaults to latest.
|
command/agent: add help for retry join
|
hashicorp_consul
|
train
|
go
|
fc4720c10674ecadd8e506aa85d3d17949aa6d24
|
diff --git a/optaplanner-core/src/main/java/org/optaplanner/core/api/solver/SolverJob.java b/optaplanner-core/src/main/java/org/optaplanner/core/api/solver/SolverJob.java
index <HASH>..<HASH> 100644
--- a/optaplanner-core/src/main/java/org/optaplanner/core/api/solver/SolverJob.java
+++ b/optaplanner-core/src/main/java/org/optaplanner/core/api/solver/SolverJob.java
@@ -31,7 +31,7 @@ public interface SolverJob<Solution_, ProblemId_> {
/**
* @return never null, a value given to {@link SolverManager#solveBatch(Object, Function, Consumer)}
- *or {@link SolverManager#solveObserving(Object, Function, Consumer)}
+ * or {@link SolverManager#solveObserving(Object, Function, Consumer)}
*/
ProblemId_ getProblemId();
|
Update optaplanner-core/src/main/java/org/optaplanner/core/api/solver/SolverJob.java
|
kiegroup_optaplanner
|
train
|
java
|
1338d0531eb76b6a5702d431e6e18b1957c1031c
|
diff --git a/src/tables.minimap.js b/src/tables.minimap.js
index <HASH>..<HASH> 100644
--- a/src/tables.minimap.js
+++ b/src/tables.minimap.js
@@ -17,7 +17,7 @@
var $btns = $('<div class="tablesaw-advance minimap">');
var $dotNav = $('<ul class="tablesaw-advance-dots">').appendTo($btns);
var hideDot = "tablesaw-advance-dots-hide";
- var $headerCells = $table.find("thead th");
+ var $headerCells = $table.data("tablesaw")._getPrimaryHeaderCells();
// populate dots
$headerCells.each(function() {
|
Fixes minimap to only use primary header row (especially important if you have more than one header row)
|
filamentgroup_tablesaw
|
train
|
js
|
d9ed0c4458b35d91d2a8e037f49114c89a6e5e07
|
diff --git a/src/daos/dao.php b/src/daos/dao.php
index <HASH>..<HASH> 100644
--- a/src/daos/dao.php
+++ b/src/daos/dao.php
@@ -39,7 +39,8 @@ abstract class Dao {
* Child classes need to implement get_by_criterion
*
* @abstract
- * @param $options
+ * @param array|null $options
+ * @return mixed
*/
abstract public function get_by_criterion( $options );
}
|
Update phpdoc notation on DAO
|
gios-asu_nectary
|
train
|
php
|
467333cc402985f1af9b355cd432d08429d31342
|
diff --git a/pkg/controller/petset/pet.go b/pkg/controller/petset/pet.go
index <HASH>..<HASH> 100644
--- a/pkg/controller/petset/pet.go
+++ b/pkg/controller/petset/pet.go
@@ -231,7 +231,9 @@ func (p *apiServerPetClient) getPVC(pvcName, pvcNamespace string) (*api.Persiste
if errors.IsNotFound(err) {
found = false
}
- if err != nil || !found {
+ if !found {
+ return nil, found, nil
+ } else if err != nil {
return nil, found, err
}
return pvc, true, nil
@@ -249,7 +251,8 @@ func (p *apiServerPetClient) SyncPVCs(pet *pcb) error {
for i, pvc := range pet.pvcs {
_, exists, err := p.getPVC(pvc.Name, pet.parent.Namespace)
if !exists {
- if err := p.createPVC(&pet.pvcs[i]); err != nil {
+ var err error
+ if err = p.createPVC(&pet.pvcs[i]); err != nil {
errMsg += fmt.Sprintf("Failed to create %v: %v", pvc.Name, err)
}
p.event(pet.parent, "Create", fmt.Sprintf("pvc: %v", pvc.Name), err)
|
Create event only if creation of PVC failed.
|
kubernetes_kubernetes
|
train
|
go
|
78423ca29290529e533b700843ae13ace3d3eb2c
|
diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/FilePath.java
+++ b/core/src/main/java/hudson/FilePath.java
@@ -2988,7 +2988,7 @@ public final class FilePath implements SerializableOnlyOverRemoting {
private void writeObject(ObjectOutputStream oos) throws IOException {
Channel target = getChannelForSerialization();
if(channel!=target) {
- throw new IllegalStateException("Can't send a remote FilePath to a different remote channel");
+ throw new IllegalStateException("Can't send a remote FilePath to a different remote channel (current=" + channel + ", target=" + target + ")");
}
oos.defaultWriteObject();
|
[JENKINS-<I>] - Add some diagnostics for the failing channel comparison in FilePath
|
jenkinsci_jenkins
|
train
|
java
|
6a033b7445d070cf57e3dd51c9dd1ce50aeed1f1
|
diff --git a/bin/ember-template-lint.js b/bin/ember-template-lint.js
index <HASH>..<HASH> 100755
--- a/bin/ember-template-lint.js
+++ b/bin/ember-template-lint.js
@@ -44,7 +44,7 @@ async function buildLinterOptions(workingDir, filePath, filename = '', isReading
}
function executeGlobby(workingDir, pattern, ignore) {
- let supportedExtensions = new Set(['.hbs', '.html', '.handlebars']);
+ let supportedExtensions = new Set(['.hbs', '.handlebars']);
// `--no-ignore-pattern` results in `ignorePattern === [false]`
let options =
|
task: Temporarily disabling html parsing for <I>
|
ember-template-lint_ember-template-lint
|
train
|
js
|
df351e70f49e532e5e387835beed9ca507f7309e
|
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
index <HASH>..<HASH> 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
@@ -18,7 +18,7 @@
*/
package org.apache.tinkerpop.gremlin.server.auth;
-import org.apache.tinkerpop.gremlin.groovy.plugin.dsl.credential.CredentialGraph;
+import org.apache.tinkerpop.gremlin.groovy.jsr223.dsl.credential.CredentialGraph;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.io.IoCore;
|
Stopped using the deprecated CredentialsGraph
Switched to the non-deprecated one. CTR
|
apache_tinkerpop
|
train
|
java
|
28f6efbacfa4954ab487bafd801cb0a68dee8d5d
|
diff --git a/lib/appium_lib/driver.rb b/lib/appium_lib/driver.rb
index <HASH>..<HASH> 100644
--- a/lib/appium_lib/driver.rb
+++ b/lib/appium_lib/driver.rb
@@ -321,8 +321,6 @@ module Appium
# https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile
@appium_device = @caps[:platformName]
@appium_device = @appium_device.is_a?(Symbol) ? @appium_device : @appium_device.downcase.strip.intern if @appium_device
- fail "platformName must be set. Not found in options: #{opts}" unless @appium_device
- fail 'platformName must be Android or iOS' unless [:android, :ios].include?(@appium_device)
# load common methods
extend Appium::Common
|
Do not check platformName in passed caps
|
appium_ruby_lib
|
train
|
rb
|
d13c4c6f7e624affe47b59351575ea307a938061
|
diff --git a/src/modules/producer.js b/src/modules/producer.js
index <HASH>..<HASH> 100644
--- a/src/modules/producer.js
+++ b/src/modules/producer.js
@@ -132,12 +132,11 @@ function checkRpc(queue, msg, options) {
//reply to us if you receive this message!
options.replyTo = amqpRPCQueues[queue].queue;
- return publishOrSendToQueue.call(this, queue, msg, options)
- .then(() => {
+ if (publishOrSendToQueue.call(this, queue, msg, options)) {
//defered promise that will resolve when response is received
amqpRPCQueues[queue][corrId] = Promise.defer();
return amqpRPCQueues[queue][corrId].promise;
- });
+ }
});
}
|
Create defered promise on RPC only when message is truly sent
|
dial-once_node-bunnymq
|
train
|
js
|
1f6201116b48f508ee9bcf1cdd37dd2ac6914639
|
diff --git a/pymola/ast.py b/pymola/ast.py
index <HASH>..<HASH> 100644
--- a/pymola/ast.py
+++ b/pymola/ast.py
@@ -461,7 +461,7 @@ ImportFromClause.ast_spec = {
ElementModification.ast_spec = {
'component': Field(ComponentRef, ComponentRef()),
- 'modifications': FieldList([Primary, Expression, ClassModification], []),
+ 'modifications': FieldList([Primary, Expression, ClassModification, Array], []),
}
ShortClassDefinition.ast_spec = {
|
Allow element modifications to be of type Array
|
pymoca_pymoca
|
train
|
py
|
29b1125978429a5ec360ac3d63c864e603dba523
|
diff --git a/Kwf/Model/Abstract.php b/Kwf/Model/Abstract.php
index <HASH>..<HASH> 100644
--- a/Kwf/Model/Abstract.php
+++ b/Kwf/Model/Abstract.php
@@ -889,9 +889,13 @@ abstract class Kwf_Model_Abstract implements Kwf_Model_Interface
public function getColumnMappings($mapping)
{
- if (!isset($this->_columnMappings[$mapping])) {
+ if (!$this->hasColumnMappings($mapping)) {
throw new Kwf_Exception("unknown mapping: '$mapping'");
}
return $this->_columnMappings[$mapping];
}
+
+ public function hasColumnMappings($mapping) {
+ return isset($this->_columnMappings[$mapping]);
+ }
}
|
Model_Abstract: added hasColumnMappings(), needed for newsletter
|
koala-framework_koala-framework
|
train
|
php
|
bada9370674e3f9da789af2bf64ff4bcd19aa666
|
diff --git a/src/View/View/ViewFinderInterface.php b/src/View/View/ViewFinderInterface.php
index <HASH>..<HASH> 100644
--- a/src/View/View/ViewFinderInterface.php
+++ b/src/View/View/ViewFinderInterface.php
@@ -30,8 +30,8 @@ interface ViewFinderInterface extends FinderInterface
*
* @since 0.1.0
*
- * @param array $criteria Criteria to search for.
- * @param EngineInterface $engine Optional. Engine to use with the view.
+ * @param array $criteria Criteria to search for.
+ * @param EngineInterface|null $engine Optional. Engine to use with the view.
*
* @return ViewInterface View that was found.
*/
|
Add `null` in typehint where needed.
|
brightnucleus_view
|
train
|
php
|
efdf6c6ed7ebd2e996d8f30627819b1dcb5c837c
|
diff --git a/structurizr-examples/src/com/structurizr/example/structurizr/UploadToStructurizr.java b/structurizr-examples/src/com/structurizr/example/structurizr/UploadToStructurizr.java
index <HASH>..<HASH> 100644
--- a/structurizr-examples/src/com/structurizr/example/structurizr/UploadToStructurizr.java
+++ b/structurizr-examples/src/com/structurizr/example/structurizr/UploadToStructurizr.java
@@ -3,6 +3,8 @@ package com.structurizr.example.structurizr;
import com.structurizr.Workspace;
import com.structurizr.api.StructurizrClient;
+import java.io.File;
+
public class UploadToStructurizr extends AbstractStructurizrWorkspace {
public static void main(String[] args) throws Exception {
@@ -12,6 +14,7 @@ public class UploadToStructurizr extends AbstractStructurizrWorkspace {
void run() throws Exception {
Workspace workspace = readFromFile();
StructurizrClient structurizrClient = new StructurizrClient();
+ structurizrClient.setWorkspaceArchiveLocation(new File(System.getProperty("user.home"), "structurizr-workspaces"));
structurizrClient.mergeWorkspace(121, workspace);
}
|
Save Structurizr workspaces to a persistent directory.
|
structurizr_java
|
train
|
java
|
52dd96db6b0d3025ebeef42d1a72fa2c4f07dba3
|
diff --git a/libcontainer/cgroups/systemd/systemd_test.go b/libcontainer/cgroups/systemd/systemd_test.go
index <HASH>..<HASH> 100644
--- a/libcontainer/cgroups/systemd/systemd_test.go
+++ b/libcontainer/cgroups/systemd/systemd_test.go
@@ -219,9 +219,6 @@ func TestFreezePodCgroup(t *testing.T) {
t.Fatal(err)
}
- if err := pm.Freeze(configs.Frozen); err != nil {
- t.Fatal(err)
- }
if err := pm.Set(podConfig.Resources); err != nil {
t.Fatal(err)
}
|
libct/cg/sd: TestFreezePodCgroup: rm explicit freeze
This was initially added by commit 3e5c<I>b<I>a because Set (with
r.Freezer = Frozen) was not able to freeze a container.
Now (see a few previous commits) Set can do the freeze, so the explicit
Freeze is no longer needed.
|
opencontainers_runc
|
train
|
go
|
8c8555a71d3be8ba0ff71c3aa399469a4bdd5d5d
|
diff --git a/twemproxy/datadog_checks/twemproxy/twemproxy.py b/twemproxy/datadog_checks/twemproxy/twemproxy.py
index <HASH>..<HASH> 100644
--- a/twemproxy/datadog_checks/twemproxy/twemproxy.py
+++ b/twemproxy/datadog_checks/twemproxy/twemproxy.py
@@ -101,10 +101,11 @@ class Twemproxy(AgentCheck):
except Exception as e:
self.log.error('Could not submit metric: %s: %s', repr(row), e)
- if version is None:
- self.log.warning('Error collecting Twemproxy version')
- else:
- self.set_metadata('version', version)
+ if self.is_metadata_collection_enabled():
+ if version is None:
+ self.log.warning('Error collecting Twemproxy version')
+ else:
+ self.set_metadata('version', version)
def _get_data(self, instance):
host = instance.get('host')
|
Don't collect version if metadata is not enabled (#<I>)
* Collect metadata behind a flag
* Don't log if metadata isn't enabled
|
DataDog_integrations-core
|
train
|
py
|
b327bd4d7876151dc35697b1ba2204b81d40be8b
|
diff --git a/addon/components/as-side-panel.js b/addon/components/as-side-panel.js
index <HASH>..<HASH> 100644
--- a/addon/components/as-side-panel.js
+++ b/addon/components/as-side-panel.js
@@ -42,6 +42,14 @@ export default Ember.Component.extend(KeyEventsMixin, TransitionDurationMixin, I
this.sendAction('previous');
},
+ showDrawer: function() {
+ this.set('isDrawerActive', true);
+ },
+
+ hideDrawer: function() {
+ this.set('isDrawerActive', false);
+ },
+
toggleDrawer: function() {
this.toggleProperty('isDrawerActive');
}
|
Add showDrawer and hideDrawer actions to side panel
|
alphasights_ember-cli-paint
|
train
|
js
|
5287e74e3b44b975dc29e95c09da61c96af35f9f
|
diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/github.py b/datadog_checks_dev/datadog_checks/dev/tooling/github.py
index <HASH>..<HASH> 100644
--- a/datadog_checks_dev/datadog_checks/dev/tooling/github.py
+++ b/datadog_checks_dev/datadog_checks/dev/tooling/github.py
@@ -90,9 +90,10 @@ def from_contributor(pr_payload):
def parse_pr_number(log_line):
- match = re.search(PR_PATTERN, log_line)
- if match:
- return match.group(1)
+ """If there are multiple matches, the PR id is always the latest one"""
+ matches = re.findall(PR_PATTERN, log_line)
+ if matches:
+ return matches[-1]
def parse_pr_numbers(git_log_lines):
|
Fix for parsing the PR id from commits
* Fix for PR name
* Fix variable name
|
DataDog_integrations-core
|
train
|
py
|
ca4b72ff897342eed8ed0a8ab336161d44396c6c
|
diff --git a/irc.js b/irc.js
index <HASH>..<HASH> 100644
--- a/irc.js
+++ b/irc.js
@@ -224,7 +224,7 @@ function handleNotice(user, serverIdx, server, origin, targetName, text) {
}
} else {
// no nickname yet, so this is most likely an AUTH notice
- user.applyStateChange('Notice', server.toWindowPath(), origin.getNickOrName(), text);
+ user.applyStateChange('Text', server.toWindowPath(), '-' + origin.getNickOrName() + '- ' + text);
}
}
}
|
special treatment for server AUTH notices
|
pavben_WebIRC
|
train
|
js
|
3999cc1a7b2d5365f6a8313d29df50027066431a
|
diff --git a/networkapiclient/ApiInterface.py b/networkapiclient/ApiInterface.py
index <HASH>..<HASH> 100644
--- a/networkapiclient/ApiInterface.py
+++ b/networkapiclient/ApiInterface.py
@@ -39,7 +39,7 @@ class ApiInterfaceRequest(ApiGenericClient):
data = dict()
- return self.put(uri)
+ return self.put(uri, data)
def deploy_channel_config_sync(self, channel_id):
"""
@@ -49,4 +49,4 @@ class ApiInterfaceRequest(ApiGenericClient):
data = dict()
- return self.put(uri)
+ return self.put(uri, data)
diff --git a/networkapiclient/__init__.py b/networkapiclient/__init__.py
index <HASH>..<HASH> 100644
--- a/networkapiclient/__init__.py
+++ b/networkapiclient/__init__.py
@@ -16,6 +16,6 @@
MAJOR_VERSION = '0'
MINOR_VERSION = '6'
-PATCH_VERSION = '0'
+PATCH_VERSION = '1'
VERSION = '.'.join((MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION,))
|
put and post data variable in order not to send null data
|
globocom_GloboNetworkAPI-client-python
|
train
|
py,py
|
9d6cb1c7e6cea2e5a209c0ecb6841dab49bc284f
|
diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -5,6 +5,7 @@ var express = require('express')
exports.reset = function() {
server = express()
+ server.disable('x-powered-by')
server.use(express.urlencoded())
server.use(express.json())
server.use(express.methodOverride())
|
disable `X-Powered-By` header
|
rkusa_swac-odm
|
train
|
js
|
e4ce6dd7055a4d0bed9b7142397e4298b8cc26f9
|
diff --git a/cobra/core/Metabolite.py b/cobra/core/Metabolite.py
index <HASH>..<HASH> 100644
--- a/cobra/core/Metabolite.py
+++ b/cobra/core/Metabolite.py
@@ -132,7 +132,7 @@ class Metabolite(Species):
the_coefficient = the_reaction._metabolites[self]
the_reaction.subtract_metabolites({self: the_coefficient})
elif method.lower() == 'destructive':
- for x in self._reaction():
+ for x in self._reaction:
x.remove_from_model()
else:
raise Exception(method + " is not 'subtractive' or 'destructive'")
|
Correct bug in remove_from_model in Metabolite.py
Correct a small bug in remove_from_model in core/Metabolite.py when method == "destructive'.
|
opencobra_cobrapy
|
train
|
py
|
0a113621817627fb0594cf671f03c85b2738a4d7
|
diff --git a/size.go b/size.go
index <HASH>..<HASH> 100644
--- a/size.go
+++ b/size.go
@@ -7,26 +7,24 @@ import (
"strings"
)
-type unit int64
-
// See: http://en.wikipedia.org/wiki/Binary_prefix
const (
// Decimal
- KB unit = 1000
- MB = 1000 * KB
- GB = 1000 * MB
- TB = 1000 * GB
- PB = 1000 * TB
+ KB = 1000
+ MB = 1000 * KB
+ GB = 1000 * MB
+ TB = 1000 * GB
+ PB = 1000 * TB
// Binary
- KiB unit = 1024
- MiB = 1024 * KiB
- GiB = 1024 * MiB
- TiB = 1024 * GiB
- PiB = 1024 * TiB
+ KiB = 1024
+ MiB = 1024 * KiB
+ GiB = 1024 * MiB
+ TiB = 1024 * GiB
+ PiB = 1024 * TiB
)
-type unitMap map[string]unit
+type unitMap map[string]int64
var (
decimalMap = unitMap{"k": KB, "m": MB, "g": GB, "t": TB, "p": PB}
@@ -81,7 +79,7 @@ func parseSize(sizeStr string, uMap unitMap) (int64, error) {
unitPrefix := strings.ToLower(matches[2])
if mul, ok := uMap[unitPrefix]; ok {
- size *= int64(mul)
+ size *= mul
}
return size, nil
|
pkg/units: Unit constants directly int<I>
int<I> seems sufficient
Docker-DCO-<I>-
|
docker_go-units
|
train
|
go
|
0e1e218943a4168cf015c4f37c1d7dba17fbba6f
|
diff --git a/paperweight/document.py b/paperweight/document.py
index <HASH>..<HASH> 100755
--- a/paperweight/document.py
+++ b/paperweight/document.py
@@ -119,6 +119,7 @@ class FilesystemTexDocument(TexDocument):
def __init__(self, path, recursive=True):
# read the tex document
self._filepath = path
+ root = os.path.dirname(os.path.abspath(path))
with codecs.open(path, 'r', encoding='utf-8') as f:
text = f.read()
super(FilesystemTexDocument, self).__init__(text)
@@ -126,7 +127,7 @@ class FilesystemTexDocument(TexDocument):
child_paths = self.find_input_documents()
for path in child_paths:
# FIXME may need to deal with path normalization here.
- self._children[path] = FilesystemTexDocument(path,
+ self._children[path] = FilesystemTexDocument(root+os.sep+path,
recursive=True)
def _file_exists(self, path):
|
fix for issue with recursive processing of files where they are not
in the current working directory
|
jonathansick_paperweight
|
train
|
py
|
8a09877f222e11422c2dcebe49a391e1601093c8
|
diff --git a/stanza/tests/test_tokenize_data.py b/stanza/tests/test_tokenize_data.py
index <HASH>..<HASH> 100644
--- a/stanza/tests/test_tokenize_data.py
+++ b/stanza/tests/test_tokenize_data.py
@@ -23,6 +23,7 @@ FAKE_PROPERTIES = {
"lang":"de",
'feat_funcs': ("space_before","capitalized"),
'max_seqlen': 300,
+ 'use_dictionary': False,
}
def test_has_mwt():
|
Update test for new tokenizer args after the dictionary was added
|
stanfordnlp_stanza
|
train
|
py
|
c5913debf28a2657cc9d120cb5ccfc4e85c8ae66
|
diff --git a/test/acceptance/app_test.rb b/test/acceptance/app_test.rb
index <HASH>..<HASH> 100644
--- a/test/acceptance/app_test.rb
+++ b/test/acceptance/app_test.rb
@@ -220,6 +220,9 @@ class AppTest < ActiveSupport::TestCase
end
test "app gets reloaded when preloaded files change (listen watcher)" do
+ # listen with ruby 2.0.0-rc1 crashes on travis, revisit when they install 2.0.0-p0
+ skip if RUBY_VERSION == "2.0.0" && RUBY_PATCHLEVEL == -1
+
begin
gemfile = app_root.join("Gemfile")
gemfile_contents = gemfile.read
|
Disable test on <I>-rc1 for now
|
rails_spring
|
train
|
rb
|
a08fa11e63b96e81f3e9089324ab3f798b0d03bb
|
diff --git a/lib/obfuscate_id.rb b/lib/obfuscate_id.rb
index <HASH>..<HASH> 100644
--- a/lib/obfuscate_id.rb
+++ b/lib/obfuscate_id.rb
@@ -1,2 +1,37 @@
module ObfuscateId
+
+ def obfuscate_id
+ extend ClassMethods
+ include InstanceMethods
+ end
+
+ def self.hide(id)
+ id.to_i + 100
+ end
+
+ def self.show(id)
+ id.to_i - 100
+ end
+
+ module ClassMethods
+ def find(*args)
+ if has_obfuscated_id?
+ args[0] = ObfuscateId.show(args[0])
+ end
+ super(*args)
+ end
+
+ def has_obfuscated_id?
+ true
+ end
+ end
+
+ module InstanceMethods
+ def to_param
+ ObfuscateId.hide(self.id)
+ end
+
+ end
end
+
+ActiveRecord::Base.extend ObfuscateId
diff --git a/spec/dummy/app/models/post.rb b/spec/dummy/app/models/post.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/app/models/post.rb
+++ b/spec/dummy/app/models/post.rb
@@ -1,2 +1,3 @@
class Post < ActiveRecord::Base
+ obfuscate_id
end
|
added methods to update find and to_param and add them to active record - specs pass
|
namick_obfuscate_id
|
train
|
rb,rb
|
af6cf12a3fd343d1ba9d9a5f24b42bffec4545ca
|
diff --git a/src/sap.m/test/sap/m/visual/SinglePlanningCalendarCellAndAppNav.spec.js b/src/sap.m/test/sap/m/visual/SinglePlanningCalendarCellAndAppNav.spec.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/test/sap/m/visual/SinglePlanningCalendarCellAndAppNav.spec.js
+++ b/src/sap.m/test/sap/m/visual/SinglePlanningCalendarCellAndAppNav.spec.js
@@ -5,6 +5,8 @@ describe("sap.m.SinglePlanningCalendarCellAndAppNav", function() {
var CTRL_KEY = process.platform === 'darwin' ? protractor.Key.META : protractor.Key.CONTROL;
+ browser.testrunner.currentSuite.meta.controlName = "sap.m.SinglePlanningCalendar";
+
it("should select 2 appointments with Ctrl/Cmd + Click", function () {
var oSPC = element(by.id("SinglePlanningCalendar"));
|
[INTERNAL] sap.m.SinglePlanningCalendar: visual test added to ownership
Change-Id: I7cbcb3f<I>c<I>bf<I>c<I>f<I>d8f<I>ad<I>b
|
SAP_openui5
|
train
|
js
|
249c4ec3f426041a4aa5dea7b1c191b96dad83ac
|
diff --git a/lib/zyre.js b/lib/zyre.js
index <HASH>..<HASH> 100644
--- a/lib/zyre.js
+++ b/lib/zyre.js
@@ -141,10 +141,11 @@ class Zyre extends EventEmitter {
* @return {Promise}
*/
stop(callback) {
+ this._zyreNode.removeAllListeners();
+ this._zyrePeers.removeAllListeners();
+ this._zyrePeers.disconnectAll();
+
return new Promise((resolve) => {
- this._zyreNode.removeAllListeners();
- this._zyrePeers.removeAllListeners();
- this._zyrePeers.disconnectAll();
this._zBeacon.stop().then(() => {
this._zyreNode.stopListening().then(() => {
if (typeof callback === 'function') callback();
|
Move sync functions out of async promise body
|
interpretor_zyre.js
|
train
|
js
|
c5e288bc8435b5f9c6bfff76f550cd2a71942411
|
diff --git a/lib/modules/apostrophe-ui/public/js/ui.js b/lib/modules/apostrophe-ui/public/js/ui.js
index <HASH>..<HASH> 100644
--- a/lib/modules/apostrophe-ui/public/js/ui.js
+++ b/lib/modules/apostrophe-ui/public/js/ui.js
@@ -534,7 +534,7 @@ apos.define('apostrophe-ui', {
restore($old, $new);
function autoPreserveText($context) {
- $context.find('input[name],textarea[name]').each(function() {
+ $context.find('input[name]:focus,textarea[name]:focus').each(function() {
var $el = $(this);
if (!is($el, 'preserve')) {
attr($el, 'preserve', $el.attr('name'));
|
text elements should be autopreserved on AJAX only if they currently have the focus. Makes it easier to update the value
|
apostrophecms_apostrophe
|
train
|
js
|
f772527445530d2c05cd12b8ece011d7c989232a
|
diff --git a/cake/libs/model/datasources/dbo/dbo_mysql.php b/cake/libs/model/datasources/dbo/dbo_mysql.php
index <HASH>..<HASH> 100644
--- a/cake/libs/model/datasources/dbo/dbo_mysql.php
+++ b/cake/libs/model/datasources/dbo/dbo_mysql.php
@@ -313,12 +313,7 @@ class DboMysql extends DboSource {
* @return in
*/
function lastInsertId($source = null) {
- $id = $this->fetchRow('SELECT LAST_INSERT_ID() AS insertID', false);
- if ($id !== false && !empty($id) && !empty($id[0]) && isset($id[0]['insertID'])) {
- return $id[0]['insertID'];
- }
-
- return null;
+ return $this->_connection->lastInsertId();
}
/**
|
Using PDO method to get lastInsertId
|
cakephp_cakephp
|
train
|
php
|
fb532b0691bd6001c89f7b2629b1023381fd3e6d
|
diff --git a/lib/fb_graph2/comment.rb b/lib/fb_graph2/comment.rb
index <HASH>..<HASH> 100644
--- a/lib/fb_graph2/comment.rb
+++ b/lib/fb_graph2/comment.rb
@@ -6,8 +6,8 @@ module FbGraph2
register_attributes(
raw: [:can_comment, :can_remove, :comment_count, :like_count, :message, :user_likes, :is_hidden, :can_hide],
time: [:created_time],
- user: [:from],
comment: [:parent],
+ profile: [:from],
profiles: [:message_tags],
custom: [:attachment]
)
|
Comment#from can be a Page, use "profile" for auto User/Page detection.
close #<I>
|
nov_fb_graph2
|
train
|
rb
|
40fbf3913898d5ea5fe9b2244e89d0c82bcbbcf2
|
diff --git a/lib/chef/knife/raw_essentials.rb b/lib/chef/knife/raw_essentials.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/knife/raw_essentials.rb
+++ b/lib/chef/knife/raw_essentials.rb
@@ -4,12 +4,12 @@ class Chef
class Knife
remove_const(:Raw) if const_defined?(:Raw) && Raw.name == 'Chef::Knife::Raw' # override Chef's version
class Raw < Chef::Knife
- ChefFS = ::ChefFS
banner "knife raw REQUEST_PATH"
deps do
require 'json'
- require 'chef_fs/data_handler/data_handler_base'
+ require 'chef/rest'
+ require 'chef/config'
require 'chef_fs/raw_request'
end
@@ -48,7 +48,7 @@ class Chef
end
chef_rest = Chef::REST.new(Chef::Config[:chef_server_url])
begin
- output ChefFS::RawRequest.api_request(chef_rest, config[:method].to_sym, chef_rest.create_url(name_args[0]), {}, data)
+ output ::ChefFS::RawRequest.api_request(chef_rest, config[:method].to_sym, chef_rest.create_url(name_args[0]), {}, data)
rescue Timeout::Error => e
ui.error "Server timeout"
exit 1
|
Fix knife raw (Chef = ::ChefFS exception)
|
jkeiser_knife-essentials
|
train
|
rb
|
e4bed2b9e57d4c64f209ed3d472b6187c0593dae
|
diff --git a/src/ar/validation.php b/src/ar/validation.php
index <HASH>..<HASH> 100755
--- a/src/ar/validation.php
+++ b/src/ar/validation.php
@@ -89,7 +89,7 @@ return [
'string' => 'يجب أن يكون طول النص :attribute على الأقل :min حروفٍ/حرفًا.',
'array' => 'يجب أن يحتوي :attribute على الأقل على :min عُنصرًا/عناصر.',
],
- 'not_in' => ':attribute موجود.',
+ 'not_in' => 'العنصر :attribute غير صحيح.',
'not_regex' => 'صيغة :attribute غير صحيحة.',
'numeric' => 'يجب على :attribute أن يكون رقمًا.',
'present' => 'يجب تقديم :attribute.',
|
[ar] Update validation.not_in
The old translation was not clear this what is says
`:attribute exists`
I changed to the equivalent of the original laravel translation which says
`The selected :attribute is invalid.`
|
caouecs_Laravel-lang
|
train
|
php
|
7a7f5b76bbbc2dcefcc9781789f3ece1964d2f2d
|
diff --git a/core/src/main/resources/lib/form/repeatable/repeatable.js b/core/src/main/resources/lib/form/repeatable/repeatable.js
index <HASH>..<HASH> 100644
--- a/core/src/main/resources/lib/form/repeatable/repeatable.js
+++ b/core/src/main/resources/lib/form/repeatable/repeatable.js
@@ -186,7 +186,8 @@ Behaviour.specify("INPUT.repeatable-delete", 'repeatable', 0, function(e) {
});
// radio buttons in repeatable content
-Behaviour.specify("DIV.repeated-chunk", 'repeatable', 0, function(d) {
+// Needs to run before the radioBlock behavior so that names are already unique.
+Behaviour.specify("DIV.repeated-chunk", 'repeatable', -200, function(d) {
var inputs = d.getElementsByTagName('INPUT');
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == 'radio') {
|
[JENKINS-<I>] Uniquify names before setting initial visibility
|
jenkinsci_jenkins
|
train
|
js
|
3b73f9ae17596872d2eb7a74c23461e8740243c8
|
diff --git a/src/Util.php b/src/Util.php
index <HASH>..<HASH> 100644
--- a/src/Util.php
+++ b/src/Util.php
@@ -160,14 +160,6 @@ final class Util
// ORM = first L octets of T
/** @var string $orm */
$orm = Binary::safeSubstr($t, 0, $length);
-
- // @codeCoverageIgnoreStart
- if (!\is_string($orm)) {
- throw new CannotPerformOperation(
- 'An unknown error has occurred'
- );
- }
- // @codeCoverageIgnoreEnd
return $orm;
}
|
This check is actually not needed with constant_time_encoding v2+
|
paragonie_halite
|
train
|
php
|
ffc00f7740d4c77b1c9f9a429fdfe132eedd7313
|
diff --git a/bettercache/utils.py b/bettercache/utils.py
index <HASH>..<HASH> 100644
--- a/bettercache/utils.py
+++ b/bettercache/utils.py
@@ -8,6 +8,9 @@ from django.utils.cache import cc_delim_re
from django.utils.encoding import smart_str
from django.utils.http import http_date, parse_http_date
+import logging
+logger = logging.getLogger()
+
CACHEABLE_STATUS = [200, 203, 300, 301, 404, 410]
class CachingMixin(object):
@@ -114,6 +117,7 @@ class CachingMixin(object):
"""
# try and get the cached GET response
cache_key = self.cache_key(request)
+ logger.error(cache_key)
cached_response = cache.get(cache_key, None)
# if it wasn't found and we are looking for a HEAD, try looking for a corresponding GET
if cached_response is None and request.method == 'HEAD':
@@ -129,7 +133,7 @@ class CachingMixin(object):
""" the cache key is the absolute uri and the request method """
if method is None:
method = request.method
- return "page_cache:%s:%s" %(request.build_absolute_uri, method)
+ return "page_cache:%s:%s" %(request.build_absolute_uri(), method)
def get_header_dict(response, header):
|
[CMSPERF-<I>] changes from today's OTIS session
|
ironfroggy_django-better-cache
|
train
|
py
|
c04d73ad1f377ea4a8ac7454014aa0b773c16b95
|
diff --git a/test/karma.conf.js b/test/karma.conf.js
index <HASH>..<HASH> 100644
--- a/test/karma.conf.js
+++ b/test/karma.conf.js
@@ -22,7 +22,9 @@ module.exports = function (config) {
browsers: ['Chrome'],
captureTimeout: 60000,
singleRun: false,
- preprocessors: { 'src/js/**/!(app|intro|outro).js': 'coverage' },
+ preprocessors: {
+ 'src/js/**/!(app|intro|outro|ui|settings).js': 'coverage'
+ },
coverageReporter: {
type: 'lcov',
dir: 'test/coverage/',
|
remove ui settings from coverage.
|
summernote_summernote
|
train
|
js
|
f9d284d8898d205d9255ab0598d14ce085f36a56
|
diff --git a/Lib/ufo2fdk/fdkBridge.py b/Lib/ufo2fdk/fdkBridge.py
index <HASH>..<HASH> 100644
--- a/Lib/ufo2fdk/fdkBridge.py
+++ b/Lib/ufo2fdk/fdkBridge.py
@@ -143,11 +143,6 @@ def checkOutlines(fontPath, removeOverlap=True, correctContourDirection=True):
stderr, stdout = _execute(c)
allStderr.append(stderr)
allStdout.append(stdout)
- if not removeOverlap and not correctContourDirection:
- c = cmds + ["-O", fontPath]
- stderr, stdout = _execute(c)
- allStderr.append(stderr)
- allStdout.append(stdout)
return "\n".join(allStderr), "\n".join(allStdout)
outlineCheckFirstLineRE = re.compile(
|
ignore checkoutlines and correct contour direction output from fdk
|
googlefonts_ufo2ft
|
train
|
py
|
1a0eb72b3caf0f7cea94ad81f1014949276c7438
|
diff --git a/django_databrowse/tests/sites.py b/django_databrowse/tests/sites.py
index <HASH>..<HASH> 100644
--- a/django_databrowse/tests/sites.py
+++ b/django_databrowse/tests/sites.py
@@ -51,7 +51,7 @@ class DatabrowseTestsClient(TestCase):
def tearDownClass(self):
django_databrowse.site.unregister(SomeModel)
- def test_root(self):
+ def test_urls(self):
django_databrowse.site.register(SomeModel)
response = Client().get('')
self.assertEqual(response.status_code, 200)
@@ -61,3 +61,11 @@ class DatabrowseTestsClient(TestCase):
response = Client().get('/django_databrowse/somemodel/')
self.assertEqual(response.status_code, 200)
+
+ response = Client().get('/django_databrowse/doesnotexistmodel/')
+ self.assertEqual(response.status_code, 404)
+ response = Client().get('/django_databrowse/something/somemodel/')
+ self.assertEqual(response.status_code, 404)
+ response = Client().get(
+ '/django_databrowse/somemodel/fields/some_field/')
+ self.assertEqual(response.status_code, 200)
|
added a test on a model field detail page
|
Alir3z4_django-databrowse
|
train
|
py
|
11c798cd15076d2c70e6a5b863dbd2a158a61778
|
diff --git a/Response.php b/Response.php
index <HASH>..<HASH> 100644
--- a/Response.php
+++ b/Response.php
@@ -3,6 +3,7 @@
namespace Modulus\Framework;
use Modulus\Http\Rest;
+use Modulus\Utility\View;
use Modulus\Http\Redirect;
use Modulus\Framework\Upstart;
@@ -41,6 +42,11 @@ class Response
if ($response instanceof Redirect) return $response->send();
/**
+ * Create a view page
+ */
+ if (Response::isView($response)) return;
+
+ /**
* Avoid "Segmentation fault (core dumped)"
*/
echo ' ';
@@ -50,4 +56,21 @@ class Response
*/
return null;
}
+
+ /**
+ * Render a view
+ *
+ * @param mixed $response
+ * @return bool
+ */
+ public static function isView($response) : bool
+ {
+ if ($response instanceof View) {
+ $response->render();
+
+ return true;
+ }
+
+ return false;
+ }
}
|
chore: handle View instances
render view component if the returned object was a view instance
|
modulusphp_framework
|
train
|
php
|
1a234679d578674c43a2db7137146932dc26733c
|
diff --git a/modules/social_features/social_search/modules/social_search_autocomplete/webpack.config.js b/modules/social_features/social_search/modules/social_search_autocomplete/webpack.config.js
index <HASH>..<HASH> 100644
--- a/modules/social_features/social_search/modules/social_search_autocomplete/webpack.config.js
+++ b/modules/social_features/social_search/modules/social_search_autocomplete/webpack.config.js
@@ -11,7 +11,7 @@ module.exports = {
rules: [
{
test: /\.m?jsx?$/,
- exclude: /node_modules\/(?!yoastseo\/)/,
+ exclude: /node_modules/,
use: {
loader: 'babel-loader',
}
|
Remove reference to yoastseo
This was accidentally left behind by re-using a webpack configuration
for the RTSEO.js project but is not needed here.
|
goalgorilla_open_social
|
train
|
js
|
d2f2482cda98cace0e32f42cacce0e86a50a9371
|
diff --git a/rpc2/transport.go b/rpc2/transport.go
index <HASH>..<HASH> 100644
--- a/rpc2/transport.go
+++ b/rpc2/transport.go
@@ -86,7 +86,7 @@ func (t *Transport) GetRemoteAddr() (ret net.Addr) {
}
func NewTransport(c net.Conn, l LogFactory, wef WrapErrorFunc) *Transport {
- var mh codec.MsgpackHandle
+ mh := codec.MsgpackHandle{WriteExt : true}
buf := new(bytes.Buffer)
ret := &Transport{
|
This should address keybase/go#<I>
|
maxtaco_go-framed-msgpack-rpc
|
train
|
go
|
206c0f25fe1c392b73092b772cb5c2d2b824b373
|
diff --git a/asset/js/setup.js b/asset/js/setup.js
index <HASH>..<HASH> 100644
--- a/asset/js/setup.js
+++ b/asset/js/setup.js
@@ -82,7 +82,7 @@ function setupWithSearch(siteData) {
},
methods: {
searchCallback(match) {
- const page = `${baseUrl}/${match.src.replace('.md', '.html')}`;
+ const page = `${baseUrl}/${match.src.replace(/.(md|mbd)$/, '.html')}`;
const anchor = match.heading ? `#${match.heading.id}` : '';
window.location = `${page}${anchor}`;
},
|
Support .mbd file extension in search navigation
|
MarkBind_markbind
|
train
|
js
|
b833054b71af53c305cfab8c376865819834c580
|
diff --git a/lib/remote_syslog/tcp_endpoint.rb b/lib/remote_syslog/tcp_endpoint.rb
index <HASH>..<HASH> 100644
--- a/lib/remote_syslog/tcp_endpoint.rb
+++ b/lib/remote_syslog/tcp_endpoint.rb
@@ -3,6 +3,20 @@ require 'eventmachine'
module RemoteSyslog
# Additional class that uses TCP but no TLS. Has the benefit of a greater max packet size
class TcpEndpoint
+ class Handler < EventMachine::Connection
+ def initialize(endpoint)
+ @endpoint = endpoint
+ super()
+ end
+
+ def connection_completed
+ @endpoint.connection = self
+ end
+
+ def unbind
+ @endpoint.unbind
+ end
+ end
attr_accessor :connection
@@ -44,7 +58,7 @@ module RemoteSyslog
def connect
logger.debug "Connecting to #{address}:#{@port}"
- self.connection = EventMachine.connect(address, @port)
+ EventMachine.connect(address, @port, TcpEndpoint::Handler, self)
end
def unbind
|
TCP endpoint works better with the handler in place
|
papertrail_remote_syslog
|
train
|
rb
|
44e46f5c3e40a113d03a34bf4c8a945827cb5b22
|
diff --git a/tests/phpunit/TagTest.php b/tests/phpunit/TagTest.php
index <HASH>..<HASH> 100644
--- a/tests/phpunit/TagTest.php
+++ b/tests/phpunit/TagTest.php
@@ -118,6 +118,26 @@ class TagTest extends \PHPUnit\Framework\TestCase {
}
/**
+ * @covers Tag::appendContent
+ */
+ public function testAppendContentWithArrayKeys() {
+ $tag = new Tag();
+ // FIXME: The behavior of appendContent() and prependContent() is not consistent
+ $this->expectError();
+ $tag->appendContent( [ 'foo' => 'bar' ] );
+ }
+
+ /**
+ * @covers Tag::prependContent
+ */
+ public function testPrependContentWithArrayKeys() {
+ $tag = new Tag();
+ // FIXME: The behavior of appendContent() and prependContent() is not consistent
+ $tag->prependContent( [ 'foo' => 'bar' ] );
+ $this->assertSame( '<div>bar</div>', $tag->toString() );
+ }
+
+ /**
* @covers Tag::setAttributes
* @covers Tag::getAttribute
* @covers Tag::removeAttributes
|
Document inconsistent Tag methods with PHPUnit tests
All this does is documenting the status quo. Possible fixes are
discussed in the next patch.
Change-Id: I<I>db<I>c7b<I>d5be6d1f<I>f3fac3bcae2ee
|
wikimedia_oojs-ui
|
train
|
php
|
aa73e1297ad3c38e173cde8ff00162d999f6f301
|
diff --git a/nestable/NodeMoveAction.php b/nestable/NodeMoveAction.php
index <HASH>..<HASH> 100644
--- a/nestable/NodeMoveAction.php
+++ b/nestable/NodeMoveAction.php
@@ -25,6 +25,9 @@ class NodeMoveAction extends Action
{
/** @var string class to use to locate the supplied data ids */
public $modelName;
+
+ /** @var bool variable to support editing without possibility of creating a root elements */
+ public $rootable = true;
/** @vars string the attribute names of the model that hold these attributes */
private $leftAttribute;
@@ -76,7 +79,7 @@ class NodeMoveAction extends Action
]);
/* Root/Append/Left/Right change */
- if($this->treeAttribute&&is_null($par)&&!$model->isRoot()){
+ if($this->rootable&&$this->treeAttribute&&is_null($par)&&!$model->isRoot()){
$model->makeRoot();
} else if(is_null($par)){
if(!is_null($rgt))
|
Update NodeMoveAction.php
Add support edit subtrees.
|
ASlatius_yii2-nestable
|
train
|
php
|
4afb203e7616de29eea5e8c152b7332171bad899
|
diff --git a/edison-togglz/src/main/java/de/otto/edison/togglz/s3/S3TogglzRepository.java b/edison-togglz/src/main/java/de/otto/edison/togglz/s3/S3TogglzRepository.java
index <HASH>..<HASH> 100644
--- a/edison-togglz/src/main/java/de/otto/edison/togglz/s3/S3TogglzRepository.java
+++ b/edison-togglz/src/main/java/de/otto/edison/togglz/s3/S3TogglzRepository.java
@@ -50,7 +50,7 @@ public class S3TogglzRepository implements StateRepository {
}
@Scheduled(initialDelay = 0, fixedRate = SCHEDULE_RATE_IN_MILLISECONDS)
- private void prefetchFeatureStates() {
+ protected void prefetchFeatureStates() {
if (cache.size() == 0) {
LOG.debug("Initialize state for features");
initializeFeatureStates();
|
Enable scheduling on TogglzRepo in newer Spring version
Newer Spring Version does not allow @Scheduled-Annotation for
private functions, so changing to protected for correct proxying.
|
otto-de_edison-microservice
|
train
|
java
|
1913ab5b93574a1f39528802a55c1b1cb043b79d
|
diff --git a/src/main/java/fr/xebia/springframework/jdbc/ManagedBasicDataSourceMBean.java b/src/main/java/fr/xebia/springframework/jdbc/ManagedBasicDataSourceMBean.java
index <HASH>..<HASH> 100644
--- a/src/main/java/fr/xebia/springframework/jdbc/ManagedBasicDataSourceMBean.java
+++ b/src/main/java/fr/xebia/springframework/jdbc/ManagedBasicDataSourceMBean.java
@@ -46,5 +46,7 @@ public interface ManagedBasicDataSourceMBean {
void setMaxIdle(int maxIdle);
+ void setMinIdle(int maxIdle);
+
void setMaxWait(long maxWait);
}
|
expose setMinIdle in JMX
|
xebia-france_xebia-management-extras
|
train
|
java
|
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.