diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/app/app.go b/app/app.go
index <HASH>..<HASH> 100644
--- a/app/app.go
+++ b/app/app.go
@@ -539,12 +539,14 @@ func (a *App) Log(message string, source string) error {
log.Printf(message)
messages := strings.Split(message, "\n")
for _, msg := range messages {
- l := Applog{
- Date: time.Now(),
- Message: msg,
- Source: source,
+ if msg != "" {
+ l := Applog{
+ Date: time.Now(),
+ Message: msg,
+ Source: source,
+ }
+ a.Logs = append(a.Logs, l)
}
- a.Logs = append(a.Logs, l)
}
return db.Session.Apps().Update(bson.M{"name": a.Name}, a)
}
|
app: fix blank line logging issue
|
diff --git a/lib/sfn/command_module/stack.rb b/lib/sfn/command_module/stack.rb
index <HASH>..<HASH> 100644
--- a/lib/sfn/command_module/stack.rb
+++ b/lib/sfn/command_module/stack.rb
@@ -74,7 +74,7 @@ module Sfn
# @param action [String] create or update
# @return [TrueClass]
def unpack_nesting(name, file, action)
- config.apply_stacks ||= []
+ config[:apply_stacks] ||= []
stack_count = 0
file['Resources'].each do |stack_resource_name, stack_resource|
|
Fix apply stack reference to access via hash method
|
diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/config/application.rb
+++ b/spec/dummy/config/application.rb
@@ -24,9 +24,6 @@ module Dummy
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
config.i18n.default_locale = :nl
-
- # Do not swallow errors in after_commit/after_rollback callbacks.
- config.active_record.raise_in_transactional_callbacks = true
end
end
|
Get rid of deprecated app setting.
|
diff --git a/text-minimessage/src/test/java/net/kyori/adventure/text/minimessage/tag/TagResolverTest.java b/text-minimessage/src/test/java/net/kyori/adventure/text/minimessage/tag/TagResolverTest.java
index <HASH>..<HASH> 100644
--- a/text-minimessage/src/test/java/net/kyori/adventure/text/minimessage/tag/TagResolverTest.java
+++ b/text-minimessage/src/test/java/net/kyori/adventure/text/minimessage/tag/TagResolverTest.java
@@ -86,10 +86,6 @@ class TagResolverTest {
@Test
void testParseInResolver() {
- final List<TagResolver> placeholders = Arrays.asList(
- Placeholder.parsed("foo", "<red>Hello</red>"),
- Placeholder.parsed("bar", "<yellow>World</yellow>")
- );
final Context ctx = TestBase.dummyContext("dummy text");
final Component input = ctx.parse("<foo> <bar>",
Placeholder.parsed("foo", "<red>Hello</red>"), Placeholder.parsed("bar", "<yellow>World</yellow>"));
|
minimessage-text: Cleanup test ParseInResolver
|
diff --git a/test_pyout.py b/test_pyout.py
index <HASH>..<HASH> 100644
--- a/test_pyout.py
+++ b/test_pyout.py
@@ -178,8 +178,8 @@ def test_tabular_write_update():
fd = StringIO()
out = Tabular(["name", "status"],
stream=fd, force_styling=True)
- data = [{"name": "foo", "path": "/tmp/foo", "status": "unknown"},
- {"name": "bar", "path": "/tmp/bar", "status": "installed"}]
+ data = [{"name": "foo", "status": "unknown"},
+ {"name": "bar", "status": "installed"}]
for row in data:
out(row)
|
TST: Remove an unused field
|
diff --git a/public/js/clients/chrome/events.js b/public/js/clients/chrome/events.js
index <HASH>..<HASH> 100644
--- a/public/js/clients/chrome/events.js
+++ b/public/js/clients/chrome/events.js
@@ -11,6 +11,10 @@ function scriptParsed(scriptId, url, startLine, startColumn,
endLine, endColumn, executionContextId, hash,
isContentScript, isInternalScript, isLiveEdit,
sourceMapURL, hasSourceURL, deprecatedCommentWasUsed) {
+ if (isInternalScript || isContentScript) {
+ return;
+ }
+
actions.newSource(Source({
id: scriptId,
url,
|
Exclude internal sources (#<I>)
|
diff --git a/webroot/js/calendar.js b/webroot/js/calendar.js
index <HASH>..<HASH> 100644
--- a/webroot/js/calendar.js
+++ b/webroot/js/calendar.js
@@ -565,6 +565,12 @@ Vue.component('calendar-modal', {
calendarId: function() {
this.getEventTypes();
},
+ isRecurring: function() {
+ if (!this.isRecurring) {
+ this.rrule = null;
+ this.rruleResult = null;
+ }
+ },
},
methods: {
searchAttendees: function(search, loading) {
|
Resetting reccuring rule on checkbox off (task #<I>)
|
diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -151,7 +151,17 @@ func main() {
// GUI
if !opts.NoGUI && opts.GUIAddr != "" {
- startGUI(opts.GUIAddr, m)
+ host, port, err := net.SplitHostPort(opts.GUIAddr)
+ if err != nil {
+ warnf("Cannot start GUI on %q: %v", opts.GUIAddr, err)
+ } else {
+ if len(host) > 0 {
+ infof("Starting web GUI on http://%s", opts.GUIAddr)
+ } else {
+ infof("Starting web GUI on port %s", port)
+ }
+ startGUI(opts.GUIAddr, m)
+ }
}
// Walk the repository and update the local model before establishing any
|
Show web GUI address on startup (fixes #<I>)
|
diff --git a/Reminders/DatabaseReminderRepository.php b/Reminders/DatabaseReminderRepository.php
index <HASH>..<HASH> 100755
--- a/Reminders/DatabaseReminderRepository.php
+++ b/Reminders/DatabaseReminderRepository.php
@@ -139,7 +139,7 @@ class DatabaseReminderRepository implements ReminderRepositoryInterface {
*/
public function deleteExpired()
{
- $expired = Carbon::now()->addSeconds($this->expires);
+ $expired = Carbon::now()->subSeconds($this->expires);
$this->getTable()->where('created_at', '<', $expired)->delete();
}
|
We should remove the seconds and not add it to the current DateTime.
|
diff --git a/scoop/_control.py b/scoop/_control.py
index <HASH>..<HASH> 100644
--- a/scoop/_control.py
+++ b/scoop/_control.py
@@ -105,7 +105,6 @@ def runController(callable, *args, **kargs):
else:
future = execQueue.pop()
else:
- execQueue.append(future)
future = execQueue.pop()
else:
# future is in progress; run next future from pending execution queue.
|
Fixed a memory leak in the controller. It seems to enhance greatly the performances.
|
diff --git a/nodeconductor/server/base_settings.py b/nodeconductor/server/base_settings.py
index <HASH>..<HASH> 100644
--- a/nodeconductor/server/base_settings.py
+++ b/nodeconductor/server/base_settings.py
@@ -46,6 +46,13 @@ MIDDLEWARE_CLASSES = (
REST_FRAMEWORK = {
'TEST_REQUEST_DEFAULT_FORMAT': 'json',
+ 'DEFAULT_AUTHENTICATION_CLASSES': (
+ 'rest_framework.authentication.BasicAuthentication',
+ 'rest_framework.authentication.SessionAuthentication',
+ ),
+ 'DEFAULT_PERMISSION_CLASSES': (
+ 'rest_framework.permissions.IsAuthenticated',
+ )
}
ROOT_URLCONF = 'nodeconductor.server.urls'
|
Enabled basic and session authentication.
- NC-4
- Made all requests require authentication by default.
|
diff --git a/src/Content/Migration/Base.php b/src/Content/Migration/Base.php
index <HASH>..<HASH> 100644
--- a/src/Content/Migration/Base.php
+++ b/src/Content/Migration/Base.php
@@ -129,6 +129,21 @@ class Base
}
/**
+ * Helper function for logging messages
+ *
+ * @param string $message
+ * @param string $type (info, warning, error, success)
+ * @return void
+ **/
+ public function log($message, $type='info')
+ {
+ $this->callback('migration', 'log', [
+ 'message' => $message,
+ 'type' => $type
+ ]);
+ }
+
+ /**
* Get option - these are specified/overwritten by the individual migrations/hooks
*
* @param string $key
|
[feat] Adding helper for logging messages
|
diff --git a/aioxmpp/security_layer.py b/aioxmpp/security_layer.py
index <HASH>..<HASH> 100644
--- a/aioxmpp/security_layer.py
+++ b/aioxmpp/security_layer.py
@@ -713,11 +713,6 @@ class STARTTLSProvider:
`certificate_verifier_factory` must be a callable providing a
:class:`CertificateVerifer` instance which will hooked up to the transport
and the SSL context to perform certificate validation.
-
- .. note::
-
- Partial DANE support is provided by :mod:`dane`.
-
"""
def __init__(self,
|
Remove incorrect documentation on dane support
|
diff --git a/src/Entry.php b/src/Entry.php
index <HASH>..<HASH> 100644
--- a/src/Entry.php
+++ b/src/Entry.php
@@ -59,7 +59,7 @@ class Entry implements EntryInterface
return $this->resolvedLinks[$key];
}
- if (is_array($this->fields[$key]) && array_values($this->fields[$key])[0] instanceof Link) {
+ if (is_array($this->fields[$key]) && count($this->fields[$key]) > 0 && array_values($this->fields[$key])[0] instanceof Link) {
if (!isset($this->resolvedLinks[$key])) {
$this->resolvedLinks[$key] = array_map(function ($link) {
return call_user_func($this->resolveLinkFunction, $link);
|
handle case where entry field is empty collection
|
diff --git a/paper/scripts/k2sc_cdpp.py b/paper/scripts/k2sc_cdpp.py
index <HASH>..<HASH> 100755
--- a/paper/scripts/k2sc_cdpp.py
+++ b/paper/scripts/k2sc_cdpp.py
@@ -22,7 +22,7 @@ import warnings
from urllib.error import HTTPError
from scipy.signal import savgol_filter
-for campaign in range(4,7):
+for campaign in range(3,7):
print("\nRunning campaign %02d..." % campaign)
|
add c3 to k2sc
|
diff --git a/lib/load-grunt-configs.js b/lib/load-grunt-configs.js
index <HASH>..<HASH> 100644
--- a/lib/load-grunt-configs.js
+++ b/lib/load-grunt-configs.js
@@ -17,7 +17,7 @@ var path = require('path');
module.exports = function(grunt, options){
- options = _.merge({
+ options = _.assign({
config: {
src : ['config/*.js*', 'config/*.coffee']
}
@@ -54,7 +54,6 @@ module.exports = function(grunt, options){
runner = runner[key];
});
});
-
});
return options;
};
|
fixes incorrect overwrite of passedin options for this task
|
diff --git a/xwiki-commons-core/xwiki-commons-job/src/test/java/org/xwiki/job/internal/DefaultRequestTest.java b/xwiki-commons-core/xwiki-commons-job/src/test/java/org/xwiki/job/internal/DefaultRequestTest.java
index <HASH>..<HASH> 100644
--- a/xwiki-commons-core/xwiki-commons-job/src/test/java/org/xwiki/job/internal/DefaultRequestTest.java
+++ b/xwiki-commons-core/xwiki-commons-job/src/test/java/org/xwiki/job/internal/DefaultRequestTest.java
@@ -38,7 +38,7 @@ public class DefaultRequestTest
DefaultRequest request2 = new DefaultRequest(request);
Assert.assertEquals(request.getId(), request2.getId());
- Assert.assertEquals(request.getProperty("property"), request2.getProperty("property"));
+ Assert.assertEquals(request.getProperty("property"), (String) request2.getProperty("property"));
Assert.assertEquals(request.isRemote(), request2.isRemote());
Assert.assertEquals(request.isInteractive(), request2.isInteractive());
}
|
[Misc] Don't use the assertEquals (Object[], Object[]) signature which is deprecated
|
diff --git a/src/main/lombok/ast/resolve/Resolver.java b/src/main/lombok/ast/resolve/Resolver.java
index <HASH>..<HASH> 100644
--- a/src/main/lombok/ast/resolve/Resolver.java
+++ b/src/main/lombok/ast/resolve/Resolver.java
@@ -124,6 +124,16 @@ public class Resolver {
String name = typeReference.getTypeName();
if (name.equals(wanted)) return true;
+ /* checks array dimensions */ {
+ int dims1 = typeReference.astArrayDimensions();
+ int dims2 = 0;
+ while (wanted.endsWith("[]")) {
+ dims2++;
+ wanted = wanted.substring(0, wanted.length() - 2);
+ }
+ if (dims1 != dims2) return false;
+ }
+
int dot = wanted.lastIndexOf('.');
String wantedPkg = dot == -1 ? "" : wanted.substring(0, dot);
String wantedName = dot == -1 ? wanted : wanted.substring(dot + 1);
|
resolver work - we don't use this yet, huh.
|
diff --git a/lib/vaulted_billing/gateways/ipcommerce.rb b/lib/vaulted_billing/gateways/ipcommerce.rb
index <HASH>..<HASH> 100644
--- a/lib/vaulted_billing/gateways/ipcommerce.rb
+++ b/lib/vaulted_billing/gateways/ipcommerce.rb
@@ -90,7 +90,7 @@ module VaultedBilling
response = http.get
raise(UnavailableKeyError, 'Unable to renew service keys.') unless response.success?
@expires_at = Time.now + 30.minutes
- @key = response.body.try(:[], 1...-1)
+ store_key(response.body.try(:[], 1...-1))
end
private
|
Tokenization should store the keys using the store_key method.
|
diff --git a/test/integration/serverless/test/index.test.js b/test/integration/serverless/test/index.test.js
index <HASH>..<HASH> 100644
--- a/test/integration/serverless/test/index.test.js
+++ b/test/integration/serverless/test/index.test.js
@@ -13,6 +13,7 @@ import {
renderViaHTTP,
} from 'next-test-utils'
import qs from 'querystring'
+import path from 'path'
import fetch from 'node-fetch'
const appDir = join(__dirname, '../')
@@ -62,6 +63,17 @@ describe('Serverless', () => {
expect(legacy).toMatch(`new static folder`)
})
+ it('should not infinity loop on a 404 static file', async () => {
+ expect.assertions(2)
+
+ // ensure top-level static does not exist (important for test)
+ // we expect /public/static, though.
+ expect(existsSync(path.join(appDir, 'static'))).toBe(false)
+
+ const res = await fetchViaHTTP(appPort, '/static/404')
+ expect(res.status).toBe(404)
+ })
+
it('should render the page with dynamic import', async () => {
const html = await renderViaHTTP(appPort, '/dynamic')
expect(html).toMatch(/Hello!/)
|
Test static folder (#<I>)
* Test for infinite loop
* remove focus
|
diff --git a/code/MemberTableField.php b/code/MemberTableField.php
index <HASH>..<HASH> 100755
--- a/code/MemberTableField.php
+++ b/code/MemberTableField.php
@@ -349,7 +349,7 @@ class MemberTableField extends ComplexTableField {
$message = sprintf(
_t('ComplexTableField.SUCCESSADD', 'Added %s %s %s'),
$childData->singular_name(),
- '<a href="' . $this->Link() . '">' . $childData->Title . '</a>',
+ '<a href="' . $this->Link() . '">' . htmlspecialchars($childData->Title, ENT_QUOTES) . '</a>',
$closeLink
);
$form->sessionMessage($message, 'good');
|
BUGFIX: Removed XSS holes (from r<I>) (from r<I>)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9
|
diff --git a/src/cloudant/client.py b/src/cloudant/client.py
index <HASH>..<HASH> 100755
--- a/src/cloudant/client.py
+++ b/src/cloudant/client.py
@@ -95,7 +95,7 @@ class CouchDB(dict):
authentication if necessary.
"""
if self.r_session:
- return
+ self.session_logout()
if self.admin_party:
self.r_session = ClientSession(timeout=self._timeout)
@@ -132,7 +132,9 @@ class CouchDB(dict):
"""
Ends a client authentication session, performs a logout and a clean up.
"""
- self.session_logout()
+ if self.r_session:
+ self.session_logout()
+
self.r_session = None
self.clear()
|
Allow multiple calls to client .connect()
|
diff --git a/StreamSelectLoop.php b/StreamSelectLoop.php
index <HASH>..<HASH> 100644
--- a/StreamSelectLoop.php
+++ b/StreamSelectLoop.php
@@ -182,8 +182,11 @@ class StreamSelectLoop implements LoopInterface
// There is a pending timer, only block until it is due ...
} elseif ($scheduledAt = $this->timers->getFirst()) {
- if (0 > $timeout = $scheduledAt - $this->timers->getTime()) {
+ $timeout = $scheduledAt - $this->timers->getTime();
+ if ($timeout < 0) {
$timeout = 0;
+ } else {
+ $timeout *= self::MICROSECONDS_PER_SECOND;
}
// The only possible event is stream activity, so wait forever ...
@@ -195,7 +198,7 @@ class StreamSelectLoop implements LoopInterface
break;
}
- $this->waitForStreamActivity($timeout * self::MICROSECONDS_PER_SECOND);
+ $this->waitForStreamActivity($timeout);
}
}
|
Fix <I>% cpu usage for idle StreamSelectLoop with no timers.
A null timeout must not be multiplied by an integer.
Fixes #<I>
|
diff --git a/coaster/views.py b/coaster/views.py
index <HASH>..<HASH> 100644
--- a/coaster/views.py
+++ b/coaster/views.py
@@ -70,8 +70,8 @@ def get_next_url(referrer=False, external=False, session=False, default=__marker
This function looks for a ``next`` parameter in the request or in the session
(depending on whether parameter ``session`` is True). If no ``next`` is present,
it checks the referrer (if enabled), and finally returns either the provided
- default (which can be any value including ``None``) or ``url_for('index')``.
- If your app does not have a URL endpoint named ``index``, ``/`` is returned.
+ default (which can be any value including ``None``) or the script root
+ (typically ``/``).
"""
if session:
next_url = request_session.pop('next', None) or request.args.get('next', '')
|
We're no longer assuming presence of a route named 'index'.
|
diff --git a/worker.go b/worker.go
index <HASH>..<HASH> 100644
--- a/worker.go
+++ b/worker.go
@@ -64,7 +64,7 @@ type Worker struct {
// ConfigureQorResourceBeforeInitialize a method used to config Worker for qor admin
func (worker *Worker) ConfigureQorResourceBeforeInitialize(res resource.Resourcer) {
if res, ok := res.(*admin.Resource); ok {
- admin.RegisterViewPath("github.com/qor/worker/views")
+ res.GetAdmin().RegisterViewPath("github.com/qor/worker/views")
res.UseTheme("worker")
worker.Admin = res.GetAdmin()
|
Upgrade to new RegisterViewPath API
|
diff --git a/classes/taxonomy.class.php b/classes/taxonomy.class.php
index <HASH>..<HASH> 100644
--- a/classes/taxonomy.class.php
+++ b/classes/taxonomy.class.php
@@ -68,7 +68,7 @@ class Cuztom_Taxonomy
add_action( 'init', array( &$this, 'register_taxonomy_for_object_type' ) );
}
- if( ( get_bloginfo( 'version' ) < '3.5' ) && ( isset( $args['show_column'] ) && $args['show_column'] ) )
+ if( ( get_bloginfo( 'version' ) < '3.5' ) && ( isset( $args['show_admin_column'] ) && $args['show_admin_column'] ) )
{
add_filter( 'manage_' . $this->post_type_name . '_posts_columns', array( &$this, 'add_column' ) );
add_action( 'manage_' . $this->post_type_name . '_posts_custom_column', array( &$this, 'add_column_content' ), 10, 2 );
@@ -124,7 +124,7 @@ class Cuztom_Taxonomy
'show_ui' => true,
'show_in_nav_menus' => true,
'_builtin' => false,
- 'show_column' => false
+ 'show_admin_column' => false
),
// Given
|
Show_columns changed to show_admin_column
With compatability for versions below <I>
|
diff --git a/src/controllers/playlists.js b/src/controllers/playlists.js
index <HASH>..<HASH> 100755
--- a/src/controllers/playlists.js
+++ b/src/controllers/playlists.js
@@ -219,7 +219,8 @@ export const createPlaylistItems = function createPlaylistItems(id, playlistID,
_playlistItem = new PlaylistItem({
'media': media,
'artist': media.artist,
- 'title': media.title
+ 'title': media.title,
+ 'end': media.duration
});
return _playlistItem.save();
|
set end to media.duration at creation
|
diff --git a/internal/services/compute/dedicated_host_resource.go b/internal/services/compute/dedicated_host_resource.go
index <HASH>..<HASH> 100644
--- a/internal/services/compute/dedicated_host_resource.go
+++ b/internal/services/compute/dedicated_host_resource.go
@@ -264,7 +264,7 @@ func resourceDedicatedHostDelete(d *pluginsdk.ResourceData, meta interface{}) er
future, err := client.Delete(ctx, id.ResourceGroup, id.HostGroupName, id.HostName)
if err != nil {
- return fmt.Errorf("deleting %: %+v", *id, err)
+ return fmt.Errorf("deleting %s: %+v", *id, err)
}
if err = future.WaitForCompletionRef(ctx, client.Client); err != nil {
|
r/dedicated_host: adding a missing formatting placeholder
|
diff --git a/tests/App/AppKernel.php b/tests/App/AppKernel.php
index <HASH>..<HASH> 100644
--- a/tests/App/AppKernel.php
+++ b/tests/App/AppKernel.php
@@ -120,7 +120,7 @@ final class AppKernel extends Kernel
$containerBuilder->loadFromExtension('twig', [
'default_path' => sprintf('%s/templates', $this->getProjectDir()),
- 'strict_variables' => '%kernel.debug%',
+ 'strict_variables' => true,
'exception_controller' => null,
'form_themes' => ['@SonataAdmin/Form/form_admin_fields.html.twig'],
]);
|
Use strict_variables in tests (#<I>)
|
diff --git a/Command/JobsCommand.php b/Command/JobsCommand.php
index <HASH>..<HASH> 100644
--- a/Command/JobsCommand.php
+++ b/Command/JobsCommand.php
@@ -55,6 +55,9 @@ class JobsCommand extends Command
foreach( $this->getSiteItems( $context, $input ) as $siteItem )
{
+ \Aimeos\MShop::cache( true );
+ \Aimeos\MAdmin::cache( true );
+
$localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false );
$localeItem->setLanguageId( null );
$localeItem->setCurrencyId( null );
|
Clear cached managers to avoid using old context
|
diff --git a/haas/tests/test_result.py b/haas/tests/test_result.py
index <HASH>..<HASH> 100644
--- a/haas/tests/test_result.py
+++ b/haas/tests/test_result.py
@@ -298,7 +298,7 @@ class TestFailfast(ExcInfoFixture, unittest.TestCase):
self.assertFalse(collector.shouldStop)
-class TestBuffering(ExcInfoFixture):
+class TestBuffering(ExcInfoFixture, unittest.TestCase):
@patch('sys.stderr', new_callable=StringIO)
def test_buffering_stderr(self, stderr):
|
Add accidentally removed TestCase base class
|
diff --git a/peri/comp/objs.py b/peri/comp/objs.py
index <HASH>..<HASH> 100644
--- a/peri/comp/objs.py
+++ b/peri/comp/objs.py
@@ -1,6 +1,5 @@
import numpy as np
from scipy.special import erf
-from scipy.linalg import expm3
try:
from scipy.weave import inline
@@ -708,14 +707,11 @@ class Slab(Component):
])
pos = pos + self.inner.l
- # p = self.rvecs.dot(self.normal()) - pos).dot(self.normal())
- n = self.normal()
p = (np.sum([r*n for r, n in zip(self.rvecs, self.normal())]) -
pos.dot(self.normal()))
m1 = p < -4.
m0 = p > 4.
mp = -(m1 | m0)
- # self.image[:] = 1.0/(1.0 + np.exp(7*p)) #FIXME why is this not an erf???
self.image[m1] = 1.
self.image[mp] = 1.0/(1.0 + np.exp(7*p[mp])) #FIXME why is this not an erf???
self.image[m0] = 0.
|
Removing some now unnecessary lines from objs.py
|
diff --git a/src/tween/tween.babel.js b/src/tween/tween.babel.js
index <HASH>..<HASH> 100644
--- a/src/tween/tween.babel.js
+++ b/src/tween/tween.babel.js
@@ -1221,14 +1221,16 @@ class Tween extends Module {
@parma {Function} Method to call
*/
_overrideCallback(callback, fun) {
+ let self = this;
+
var isCallback = (callback && typeof callback === 'function'),
override = function callbackOverride() {
// call overriden callback if it exists
- isCallback && callback.apply(this, arguments);
+ isCallback && callback.apply(self, arguments);
// call the passed cleanup function
- fun.apply(this, arguments);
+ fun.apply(self, arguments);
};
// add overridden flag
|
Fix `no-invalid-this` rule
Note that `self` in this context refer to the global `window` object.
|
diff --git a/properties/base.py b/properties/base.py
index <HASH>..<HASH> 100644
--- a/properties/base.py
+++ b/properties/base.py
@@ -385,7 +385,8 @@ class List(basic.Property):
return 'a list - each item is {info}'.format(info=self.prop.info())
def _unused_default_warning(self):
- if self.prop.default is not utils.undefined:
+ if (self.prop.default is not utils.undefined and
+ self.prop.default != self.default):
warn('List prop default ignored: {}'.format(self.prop.default),
RuntimeWarning)
@@ -507,7 +508,7 @@ class Union(basic.Property):
continue
if prop_def is utils.undefined:
prop_def = prop.default
- else:
+ elif prop_def != prop.default:
warn('Union prop default ignored: {}'.format(prop.default),
RuntimeWarning)
|
Do not warn on unused defaults if unused and used values are the same
For example Unions of different list types will not warn any more.
An empty list is the default regardless.
|
diff --git a/src/_pdbpp_path_hack/pdb.py b/src/_pdbpp_path_hack/pdb.py
index <HASH>..<HASH> 100644
--- a/src/_pdbpp_path_hack/pdb.py
+++ b/src/_pdbpp_path_hack/pdb.py
@@ -9,5 +9,9 @@ else:
pdb_path = os.path.join(os.path.dirname(code.__file__), 'pdb.py')
+# Set __file__ to exec'd code. This is good in general, and required for
+# coverage.py to use it.
+__file__ = pdb_path
+
with open(pdb_path) as f:
exec(compile(f.read(), pdb_path, 'exec'))
|
_pdbpp_path_hack/pdb.py: set __file__
Required for coverage.py since it uses the same filename.
Ref: <URL>
|
diff --git a/src/Manager.php b/src/Manager.php
index <HASH>..<HASH> 100644
--- a/src/Manager.php
+++ b/src/Manager.php
@@ -77,6 +77,10 @@ class Manager extends Module {
self::ATTR_SESSION_TIMEOUT => 60 // seconds inactive to trigger timeout
];
}
+ /**
+ * @throws InvalidEntityException
+ * @return \Logikos\Auth\UserModelInterface
+ */
public function getEntity() {
static $cache = [];
$entity = $this->getUserOption(self::ATTR_ENTITY);
|
added return comment for ide autocomplete
|
diff --git a/lib/solargraph/convention/rspec.rb b/lib/solargraph/convention/rspec.rb
index <HASH>..<HASH> 100644
--- a/lib/solargraph/convention/rspec.rb
+++ b/lib/solargraph/convention/rspec.rb
@@ -8,14 +8,23 @@ module Solargraph
@environ ||= Environ.new(
requires: ['rspec'],
domains: ['RSpec::Matchers', 'RSpec::ExpectationGroups'],
- # This override is necessary due to an erroneous @return tag in
- # rspec's YARD documentation.
- # @todo The return types have been fixed (https://github.com/rspec/rspec-expectations/pull/1121)
pins: [
+ # This override is necessary due to an erroneous @return tag in
+ # rspec's YARD documentation.
+ # @todo The return types have been fixed (https://github.com/rspec/rspec-expectations/pull/1121)
Solargraph::Pin::Reference::Override.method_return('RSpec::Matchers#expect', 'RSpec::Expectations::ExpectationTarget')
- ]
+ ].concat(extras)
)
end
+
+ private
+
+ def extras
+ @@extras ||= SourceMap.load_string(%(
+ def describe(*args); end
+ def it(*args); end
+ )).pins
+ end
end
end
end
|
Basic support for RSpec #describe and #it
|
diff --git a/tests/Formatter/PhpGetBrowserTest.php b/tests/Formatter/PhpGetBrowserTest.php
index <HASH>..<HASH> 100644
--- a/tests/Formatter/PhpGetBrowserTest.php
+++ b/tests/Formatter/PhpGetBrowserTest.php
@@ -68,4 +68,30 @@ class PhpGetBrowserTest extends \PHPUnit_Framework_TestCase
self::assertSame('TestComment', $return->comment);
self::assertObjectHasAttribute('browser_type', $return);
}
+
+ public function testPatternIdIsReturned()
+ {
+ $data = [
+ 'Browser' => 'test',
+ 'PatternId' => 'test.json::u0::c1',
+ ];
+
+ $this->object->setData($data);
+ $return = $this->object->getData();
+
+ self::assertObjectHasAttribute('patternid', $return);
+ self::assertSame('test.json::u0::c1', $return->patternid);
+ }
+
+ public function testPatternIdIsNotReturned()
+ {
+ $data = [
+ 'Browser' => 'test',
+ ];
+
+ $this->object->setData($data);
+ $return = $this->object->getData();
+
+ self::assertObjectNotHasAttribute('patternid', $return);
+ }
}
|
adding a couple of tests to hit new code
|
diff --git a/Tests/Unit/Document/UrlObjectTest.php b/Tests/Unit/Document/UrlObjectTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Unit/Document/UrlObjectTest.php
+++ b/Tests/Unit/Document/UrlObjectTest.php
@@ -57,7 +57,7 @@ class UrlObjectTest extends \PHPUnit_Framework_TestCase
$url->setUrl($data['url']);
$this->assertEquals($data['url'], $url->getUrl());
- $url->setUrlKey($data['key']);
- $this->assertEquals($data['key'], $url->getUrlKey());
+ $url->setKey($data['key']);
+ $this->assertEquals($data['key'], $url->getKey());
}
}
|
Test fixed for CategoryService
Test updated for UrlObject after change
|
diff --git a/pachyderm/plot.py b/pachyderm/plot.py
index <HASH>..<HASH> 100644
--- a/pachyderm/plot.py
+++ b/pachyderm/plot.py
@@ -465,6 +465,8 @@ class LegendConfig:
font_size: Optional[float] = attr.ib(default=None)
ncol: Optional[float] = attr.ib(default=1)
marker_label_spacing: Optional[float] = attr.ib(default=None)
+ # NOTE: Default in mpl is 0.5
+ label_spacing: Optional[float] = attr.ib(default=None)
def apply(
self,
@@ -490,6 +492,7 @@ class LegendConfig:
fontsize=self.font_size,
ncol=self.ncol,
handletextpad=self.marker_label_spacing,
+ labelspacing=self.label_spacing,
**kwargs,
)
|
Set spacing from marker to label in legend
|
diff --git a/tasks/index.js b/tasks/index.js
index <HASH>..<HASH> 100644
--- a/tasks/index.js
+++ b/tasks/index.js
@@ -1,18 +1,8 @@
'use strict';
var i18next = require('..');
-var through2 = require('through2');
var vfs = require('vinyl-fs');
-var tap = function(callback) {
- return through2.obj(function(file, enc, done) {
- if (typeof callback === 'function') {
- callback();
- }
- done();
- });
-};
-
module.exports = function(grunt) {
grunt.registerMultiTask('i18next', 'A grunt task for i18next-scanner', function() {
var done = this.async();
@@ -23,9 +13,9 @@ module.exports = function(grunt) {
vfs.src(target.files || target.src, {base: target.base || '.'})
.pipe(i18next(options, target.customTransform, target.customFlush))
.pipe(vfs.dest(target.dest || '.'))
- .pipe(tap(function() {
+ .on('end', function() {
done();
- }));
+ });
});
});
};
|
Fix the grunt task.
Wait for all files to be written before finish the task.
|
diff --git a/mongo/mongo_test.go b/mongo/mongo_test.go
index <HASH>..<HASH> 100644
--- a/mongo/mongo_test.go
+++ b/mongo/mongo_test.go
@@ -374,7 +374,7 @@ func (s *MongoSuite) TestInstallMongod(c *gc.C) {
{"precise", [][]string{{"--target-release", "precise-updates/cloud-tools", "mongodb-server"}}},
{"trusty", [][]string{{"juju-mongodb"}}},
{"xenial", [][]string{{"juju-mongodb3.2"}, {"juju-mongo-tools3.2"}}},
- {"bionic", [][]string{{"juju-mongodb3.2"}, {"juju-mongo-tools3.2"}}},
+ {"bionic", [][]string{{"mongodb-server-core"}}},
}
testing.PatchExecutableAsEchoArgs(c, s, "add-apt-repository")
@@ -434,7 +434,7 @@ func (s *MongoSuite) TestInstallMongodFallsBack(c *gc.C) {
{"precise", "mongodb-server"},
{"trusty", "juju-mongodb"},
{"xenial", "juju-mongodb3.2"},
- {"bionic", "juju-mongodb3.2"},
+ {"bionic", "mongodb-server-core"},
}
dataDir := c.MkDir()
|
Update the test to expect mongodb-server-core on bionic.
|
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
index <HASH>..<HASH> 100644
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -288,7 +288,7 @@ class BoxSelectTool(Tool):
defaults to all renderers on a plot.
""")
- select_every_mousemove = Bool(True, help="""
+ select_every_mousemove = Bool(False, help="""
An explicit list of renderers to hit test again. If unset,
defaults to all renderers on a plot.
""")
|
Fix box select tool issue
Python default out of sync with js
|
diff --git a/provider/maas/environ.go b/provider/maas/environ.go
index <HASH>..<HASH> 100644
--- a/provider/maas/environ.go
+++ b/provider/maas/environ.go
@@ -64,7 +64,7 @@ func releaseNodes(nodes gomaasapi.MAASObject, ids url.Values) error {
func reserveIPAddress(ipaddresses gomaasapi.MAASObject, cidr string, addr network.Address) error {
params := url.Values{}
params.Add("network", cidr)
- params.Add("ip", addr.Value)
+ params.Add("requested_address", addr.Value)
_, err := ipaddresses.CallPost("reserve", params)
return err
}
|
Fixed MAAS provider address allocation params - forward port to master
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -48,7 +48,7 @@ function statAsync (fp, callback) {
function tryStatSync (fp) {
try {
return fs.statSync(fp).isDirectory()
- } catch(err) {
+ } catch (err) {
return false
}
}
|
index.js: add space after `catch` (#6)
|
diff --git a/src/modules/auth-session/sagas/logout.js b/src/modules/auth-session/sagas/logout.js
index <HASH>..<HASH> 100644
--- a/src/modules/auth-session/sagas/logout.js
+++ b/src/modules/auth-session/sagas/logout.js
@@ -1,12 +1,16 @@
import { takeLeading, put } from 'redux-saga/effects';
-import { config } from 'config';
+import { config, globalEnv } from 'config';
import { deleteTokens } from 'services/actions';
import { types, logoutSuccess, logoutFailure } from '../actions';
function requestFrame() {
return new Promise(res => {
- window.requestAnimationFrame(res);
+ if (globalEnv.requestAnimationFrame) {
+ window.requestAnimationFrame(res);
+ } else {
+ res();
+ }
});
}
|
:bug: Skip calling requestAnimationFrame if window object isn't present
|
diff --git a/malcolm/modules/scanning/infos.py b/malcolm/modules/scanning/infos.py
index <HASH>..<HASH> 100644
--- a/malcolm/modules/scanning/infos.py
+++ b/malcolm/modules/scanning/infos.py
@@ -178,8 +178,6 @@ class ExposureDeadtimeInfo(Info):
def calculate_minimum_duration(self, exposure: float) -> float:
"""Calculate the minimum frame duration required for the frame"""
- if exposure < self.min_exposure:
- self.min_exposure
denominator = 1 - (self.frequency_accuracy / 1000000.0)
min_duration = (exposure + self.readout_time) / denominator
return min_duration
|
ExposureDeadtimeInfo: remove unused code path for calculating duration
|
diff --git a/pyisbn/__init__.py b/pyisbn/__init__.py
index <HASH>..<HASH> 100644
--- a/pyisbn/__init__.py
+++ b/pyisbn/__init__.py
@@ -58,6 +58,7 @@ books in their collection.
class Isbn(object):
+
"""Class for representing ISBN objects."""
__slots__ = ('_isbn', 'isbn')
@@ -174,11 +175,13 @@ class Isbn(object):
class Isbn10(Isbn):
+
"""Class for representing ISBN-10 objects.
:seealso: ``Isbn``
"""
+
def __init__(self, isbn):
"""Initialise a new ``Isbn10`` object.
@@ -208,11 +211,13 @@ class Isbn10(Isbn):
class Sbn(Isbn10):
+
"""Class for representing SBN objects.
:seealso: ``Isbn10``
"""
+
def __init__(self, sbn):
"""Initialise a new ``Sbn`` object.
@@ -252,11 +257,13 @@ class Sbn(Isbn10):
class Isbn13(Isbn):
+
"""Class for representing ISBN-13 objects.
:seealso: ``Isbn``
"""
+
def __init__(self, isbn):
"""Initialise a new ``Isbn13`` object.
|
[QA] PEP-<I> class docstring compliance fixes.
For some reason I always forget this one.
|
diff --git a/example.js b/example.js
index <HASH>..<HASH> 100644
--- a/example.js
+++ b/example.js
@@ -2,15 +2,19 @@ var pdfFormFill = require('lib/pdf-fill-form.js');
var fs = require('fs');
// Show fields
-var formFields = pdfFormFill.readSync('test.pdf')
+var formFields = pdfFormFill.readSync('test.pdf');
console.log(formFields);
// Write fields
-pdfFormFill.writeAsync('test.pdf', { "myField1": "myField1 fill text" }, { "save": "imgpdf" }, function(err, result) {
- fs.writeFile("test_filled_images.pdf", result, function(err) {
- if(err) {
+pdfFormFill.writeAsync('test.pdf', { 'myField1': 'myField1 fill text' }, { 'save': 'imgpdf' }, function(err, result) {
+ if (err) {
+ return console.log(err);
+ }
+
+ fs.writeFile('test_filled_images.pdf', result, function(err) {
+ if (err) {
return console.log(err);
}
- console.log("The file was saved!");
- });
+ console.log('The file was saved!');
+ });
});
|
Ran through Google Closure linter
|
diff --git a/tt/gspreadsheet.py b/tt/gspreadsheet.py
index <HASH>..<HASH> 100644
--- a/tt/gspreadsheet.py
+++ b/tt/gspreadsheet.py
@@ -129,6 +129,8 @@ class GSpreadsheet(object):
return "https://docs.google.com/a/texastribune.org/spreadsheet/ccc?key=%s" % (self.key)
def get_worksheets(self):
+ if hasattr(self, 'spreadsheet_name') and hasattr(self, '_worksheets'):
+ return self._worksheets
# for debugging
worksheets = self.client.GetWorksheetsFeed(self.key)
self.spreadsheet_name = worksheets.title.text
|
return cached worksheets if importer already knows the worksheets
|
diff --git a/lib/cb/requests/application_external/submit_application.rb b/lib/cb/requests/application_external/submit_application.rb
index <HASH>..<HASH> 100644
--- a/lib/cb/requests/application_external/submit_application.rb
+++ b/lib/cb/requests/application_external/submit_application.rb
@@ -30,6 +30,7 @@ module Cb
private
def ipath
+ return '' unless @args[:ipath].class == String
ipath_length = 10
@args[:ipath].slice(0, ipath_length) || '' unless @args.nil? || @args[:ipath].nil?
|
ipath won't bomb if not given a string
|
diff --git a/gulpfile.js b/gulpfile.js
index <HASH>..<HASH> 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -19,7 +19,7 @@ gulp.task('sass', function () {
});
gulp.task('css', ['sass'], function () {
- return gulp.src(cssDir + '/*.css')
+ return gulp.src([cssDir + '/*.css', '!' + cssDir + '/*.min.css'])
.pipe(minifycss())
.pipe(rename({extname: '.min.css'}))
.pipe(gulp.dest(cssDir));
@@ -37,7 +37,7 @@ gulp.task('scripts', function() {
});
gulp.task('js', ['scripts'], function() {
- return gulp.src([jsDir + '/grido.js', jsDir + '/grido.bundle.js'])
+ return gulp.src([jsDir + '/*.js', '!' + jsDir + '/*.min.js'])
.pipe(uglify({preserveComments: 'license'}))
.pipe(rename({extname: '.min.js'}))
.pipe(gulp.dest(jsDir));
|
Assets: Fixed a gulp task for minification
|
diff --git a/engine/src/main/java/com/stratio/streaming/configuration/StreamingContextConfiguration.java b/engine/src/main/java/com/stratio/streaming/configuration/StreamingContextConfiguration.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/com/stratio/streaming/configuration/StreamingContextConfiguration.java
+++ b/engine/src/main/java/com/stratio/streaming/configuration/StreamingContextConfiguration.java
@@ -275,8 +275,6 @@ public class StreamingContextConfiguration {
private void configureDataContext(JavaPairDStream<String, String> messages) {
KeepPayloadFromMessageFunction keepPayloadFromMessageFunction = new KeepPayloadFromMessageFunction();
- kafkaTopicService.createTopicIfNotExist(InternalTopic.TOPIC_DATA.getTopicName(), configurationContext.getKafkaReplicationFactor(), configurationContext.getKafkaPartitions());
-
JavaDStream<StratioStreamingMessage> insertRequests = messages.filter(
new FilterMessagesByOperationFunction(STREAM_OPERATIONS.MANIPULATION.INSERT)).map(
keepPayloadFromMessageFunction);
|
Removed duplicated Kafka topic creation.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ from libsubmit.version import VERSION
install_requires = [
'ipyparallel',
'boto3',
- 'azure'
+ 'azure',
'haikunator',
'python-novaclient'
]
|
Fixing missing comma in setup
|
diff --git a/src/org/zaproxy/zap/extension/autoupdate/ExtensionAutoUpdate.java b/src/org/zaproxy/zap/extension/autoupdate/ExtensionAutoUpdate.java
index <HASH>..<HASH> 100644
--- a/src/org/zaproxy/zap/extension/autoupdate/ExtensionAutoUpdate.java
+++ b/src/org/zaproxy/zap/extension/autoupdate/ExtensionAutoUpdate.java
@@ -278,6 +278,19 @@ public class ExtensionAutoUpdate extends ExtensionAdaptor implements CheckForUpd
}
}
+ File addOnFile;
+ try {
+ addOnFile = copyAddOnFileToLocalPluginFolder(ao);
+ } catch (FileAlreadyExistsException e) {
+ logger.warn("Unable to copy add-on, a file with the same name already exists.", e);
+ return false;
+ } catch (IOException e) {
+ logger.warn("Unable to copy add-on to local plugin folder.", e);
+ return false;
+ }
+
+ ao.setFile(addOnFile);
+
return install(ao);
}
|
Copy the add-on installed through the API
Copy the add-on to local plugin directory to install it permanently,
like the other ways of installing an add-on do, to avoid surprises when
ZAP is started again.
|
diff --git a/visidata/vd.py b/visidata/vd.py
index <HASH>..<HASH> 100755
--- a/visidata/vd.py
+++ b/visidata/vd.py
@@ -241,9 +241,7 @@ anytype = lambda r='': str(r)
anytype.__name__ = ''
class date:
- """Simple wrapper around `datetime`.
-
- This allows it to be created from dateutil str or numeric input as time_t"""
+ """`datetime` wrapper, constructing from time_t or with dateutil.parse"""
def __init__(self, s=None):
if s is None:
@@ -263,6 +261,10 @@ class date:
fmtstr = '%Y-%m-%d %H:%M:%S'
return self.dt.strftime(fmtstr)
+ def __getattr__(self, k):
+ """Forward unknown attributes to inner datetime object"""
+ return getattr(self.dt, k)
+
def __str__(self):
return self.to_string()
|
Add forwarding from date to inner datetime for .year/etc #<I>
|
diff --git a/voluptuous/voluptuous.py b/voluptuous/voluptuous.py
index <HASH>..<HASH> 100644
--- a/voluptuous/voluptuous.py
+++ b/voluptuous/voluptuous.py
@@ -260,13 +260,21 @@ class Schema(object):
continue
# Backtracking is not performed once a key is selected, so if
# the value is invalid we immediately throw an exception.
+ exception_errors = []
try:
out[new_key] = cvalue(key_path, value)
+ except MultipleInvalid as e:
+ exception_errors.extend(e.errors)
except Invalid as e:
- if len(e.path) > len(key_path):
- errors.append(e)
- else:
- errors.append(Invalid(e.msg + invalid_msg, e.path))
+ exception_errors.append(e)
+
+ if exception_errors:
+ for err in exception_errors:
+ if len(err.path) > len(key_path):
+ errors.append(err)
+ else:
+ errors.append(
+ Invalid(err.msg + invalid_msg, err.path))
break
# Key and value okay, mark any Required() fields as found.
|
Preserve all errors for fields of dicts and objects
|
diff --git a/src/drawer.js b/src/drawer.js
index <HASH>..<HASH> 100644
--- a/src/drawer.js
+++ b/src/drawer.js
@@ -709,8 +709,7 @@ function updateTile( drawer, drawLevel, haveDrawn, x, y, level, levelOpacity, le
);
if ( tile.loaded ) {
-
- drawer.updateAgain = blendTile(
+ var needsUpdate = blendTile(
drawer,
tile,
x, y,
@@ -718,6 +717,10 @@ function updateTile( drawer, drawLevel, haveDrawn, x, y, level, levelOpacity, le
levelOpacity,
currentTime
);
+
+ if ( needsUpdate ) {
+ drawer.updateAgain = true;
+ }
} else if ( tile.loading ) {
// the tile is already in the download queue
// thanks josh1093 for finally translating this typo
|
Fixed blendTile()-related blurriness issue
We were setting drawer.updateAgain to the result of each blendTile(),
which meant it was keeping only the last result. Instead we should have
been only setting it to true if blendTile returned true, but never
setting it to false. Fixed.
|
diff --git a/dev/io.openliberty.microprofile.openapi.2.0.internal/src/io/openliberty/microprofile/openapi20/utils/IndexUtils.java b/dev/io.openliberty.microprofile.openapi.2.0.internal/src/io/openliberty/microprofile/openapi20/utils/IndexUtils.java
index <HASH>..<HASH> 100644
--- a/dev/io.openliberty.microprofile.openapi.2.0.internal/src/io/openliberty/microprofile/openapi20/utils/IndexUtils.java
+++ b/dev/io.openliberty.microprofile.openapi.2.0.internal/src/io/openliberty/microprofile/openapi20/utils/IndexUtils.java
@@ -74,7 +74,7 @@ public class IndexUtils {
for (Path file : files) {
try {
- processFile(file.getFileName().toString(), Files.newInputStream(file), indexer, filter, config);
+ processFile(containerPath.relativize(file).toString(), Files.newInputStream(file), indexer, filter, config);
} catch (IOException e) {
if (LoggingUtils.isEventEnabled(tc)) {
Tr.event(tc, String.format("Error occurred when processing file %s: %s", file.getFileName().toString(), e.getMessage()));
|
OpenAPI: respect config when scanning expanded app
File paths were not being handled correctly for expanded apps, leading
to an incorrect class name being compared to the include/exclude filters
derived from the configuration.
|
diff --git a/suitable/tests/conftest.py b/suitable/tests/conftest.py
index <HASH>..<HASH> 100644
--- a/suitable/tests/conftest.py
+++ b/suitable/tests/conftest.py
@@ -19,14 +19,20 @@ class Container(object):
self.password = password
def spawn_api(self, api_class, **kwargs):
- return api_class(
- '%s:%s' % (self.host, self.port),
- remote_user=self.username,
- remote_pass=self.password,
- connection='smart',
- extra_vars={
+ options = {
+ 'remote_user': self.username,
+ 'remote_pass': self.password,
+ 'connection': 'smart',
+ 'extra_vars': {
'ansible_python_interpreter': '/usr/bin/python3'
}
+ }
+
+ options.update(kwargs)
+
+ return api_class(
+ '%s:%s' % (self.host, self.port),
+ ** options
)
def vanilla_api(self, **kwargs):
|
Fixes conftest options not being propagated
|
diff --git a/lib/survey_gizmo/resource.rb b/lib/survey_gizmo/resource.rb
index <HASH>..<HASH> 100644
--- a/lib/survey_gizmo/resource.rb
+++ b/lib/survey_gizmo/resource.rb
@@ -257,8 +257,6 @@ module SurveyGizmo
def inspect
if ENV['GIZMO_DEBUG']
ap "CLASS: #{self.class}"
- ap "CLASS ATTRIBUTE SET\n----------"
- ap self.class.attribute_set
end
attribute_strings = self.class.attribute_set.map do |attrib|
|
Don't need to log the attribute_set as an object
|
diff --git a/azurerm/resource_arm_api_management_logger_test.go b/azurerm/resource_arm_api_management_logger_test.go
index <HASH>..<HASH> 100644
--- a/azurerm/resource_arm_api_management_logger_test.go
+++ b/azurerm/resource_arm_api_management_logger_test.go
@@ -89,7 +89,7 @@ func TestAccAzureRMApiManagementLogger_basicEventHubAppInsightsUpdate(t *testing
resource.TestCheckResourceAttr(resourceName, "eventhub.#", "1"),
resource.TestCheckResourceAttrSet(resourceName, "eventhub.0.name"),
resource.TestCheckResourceAttrSet(resourceName, "eventhub.0.connection_string"),
- resource.TestCheckNoResourceAttr(resourceName, "application_insights.#"),
+ resource.TestCheckResourceAttr(resourceName, "application_insights.#", "0"),
),
},
{
|
Update azurerm/resource_arm_api_management_logger_test.go
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup(
name="rueckenwind",
version="0.0.1",
- install_requires=['tornado>=3.0.1,<4.0', 'jinja2', 'werkzeug==0.6.2', 'babel', 'mock', 'configobj', 'bson'],
+ install_requires=['tornado>=3.0.1,<4.0', 'jinja2', 'werkzeug==0.6.2', 'babel', 'mock', 'configobj', 'motor'],
packages=find_packages(exclude=["test"]),
include_package_data=True,
package_data={
|
Added motor dependency, bson will be provided by pymongo.
|
diff --git a/spec/ransack/dependencies_spec.rb b/spec/ransack/dependencies_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/ransack/dependencies_spec.rb
+++ b/spec/ransack/dependencies_spec.rb
@@ -1,3 +1,4 @@
+=begin
rails = ::ActiveRecord::VERSION::STRING.first(3)
if %w(3.2 4.0 4.1).include?(rails) || rails == '3.1' && RUBY_VERSION < '2.2'
@@ -8,3 +9,4 @@ if %w(3.2 4.0 4.1).include?(rails) || rails == '3.1' && RUBY_VERSION < '2.2'
end
end
end
+=end
|
Comment out this test for now. TODO: examine this.
|
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/associations/association_proxy.rb
+++ b/activerecord/lib/active_record/associations/association_proxy.rb
@@ -51,7 +51,7 @@ module ActiveRecord
alias_method :proxy_respond_to?, :respond_to?
alias_method :proxy_extend, :extend
delegate :to_param, :to => :proxy_target
- instance_methods.each { |m| undef_method m unless m =~ /^(?:nil\?|send|object_id|to_a)$|^__|proxy_/ }
+ instance_methods.each { |m| undef_method m unless m.to_s =~ /^(?:nil\?|send|object_id|to_a)$|^__|proxy_/ }
def initialize(owner, reflection)
@owner, @reflection = owner, reflection
|
Prevent calling regexp on symbol in Ruby <I> in association_proxy
|
diff --git a/plash/cli.py b/plash/cli.py
index <HASH>..<HASH> 100644
--- a/plash/cli.py
+++ b/plash/cli.py
@@ -19,6 +19,9 @@ SHORTCUTS = [
('-a', ['apt'], '+'),
('-p', ['pip'], '+'),
('-b', ['apt', 'ubuntu-server'], 0),
+ ('-U', ['os', 'ubuntu'], 0),
+ ('-F', ['os', 'fedora'], 0),
+ ('-D', ['os', 'debian'], 0),
]
|
Shortcuts for some osses
|
diff --git a/galpy/potential_src/TwoPowerSphericalPotential.py b/galpy/potential_src/TwoPowerSphericalPotential.py
index <HASH>..<HASH> 100644
--- a/galpy/potential_src/TwoPowerSphericalPotential.py
+++ b/galpy/potential_src/TwoPowerSphericalPotential.py
@@ -312,6 +312,7 @@ class HernquistPotential(TwoPowerIntegerSphericalPotential):
self.beta= 4
if normalize:
self.normalize(normalize)
+ self.hasC= True
return None
def _evaluate(self,R,z,phi=0.,t=0.,dR=0,dphi=0):
|
add C implementation of Hernquist potential
|
diff --git a/test_isort.py b/test_isort.py
index <HASH>..<HASH> 100644
--- a/test_isort.py
+++ b/test_isort.py
@@ -1507,3 +1507,12 @@ def test_basic_comment():
'# Foo\n'
'import os\n')
assert SortImports(file_contents=test_input).output == test_input
+
+
+def test_shouldnt_add_lines():
+ """Ensure that isort doesn't add a blank line when a top of import comment is present, issue #316"""
+ test_input = ('"""Text"""\n'
+ '# This is a comment\n'
+ 'import pkg_resources\n')
+ assert SortImports(file_contents=test_input).output == test_input
+
|
Add test case for issue #<I>
|
diff --git a/build/prepareNightly.js b/build/prepareNightly.js
index <HASH>..<HASH> 100644
--- a/build/prepareNightly.js
+++ b/build/prepareNightly.js
@@ -9,9 +9,14 @@ if (!parts) {
throw new Error(`Invalid version number ${version}`);
}
// Add date to version.
-const major = parts[1];
-const minor = parts[2];
-const patch = parts[3];
+const major = +parts[1];
+const minor = +parts[2];
+let patch = +parts[3];
+const isStable = !parts[4];
+if (isStable) {
+ // It's previous stable version. Dev version should be higher.
+ patch++;
+}
const date = new Date().toISOString().replace(/:|T|\.|-/g, '').slice(0, 8);
const nightlyVersion = `${major}.${minor}.${patch}-dev.${date}`;
|
chore: increase dev version from stable version.
|
diff --git a/registrator.go b/registrator.go
index <HASH>..<HASH> 100644
--- a/registrator.go
+++ b/registrator.go
@@ -1,4 +1,4 @@
-package main
+package main // import "github.com/progrium/registrator"
import (
"errors"
|
Added canonical import path to main package.
So can be built and Dockerized by centurylink/golang-builder.
<URL>
|
diff --git a/lib/fields.js b/lib/fields.js
index <HASH>..<HASH> 100644
--- a/lib/fields.js
+++ b/lib/fields.js
@@ -42,7 +42,7 @@ exports.string = function (opt) {
if (b.required) {
var validator = typeof b.required === 'function' ? b.required : validators.required();
validator(form, b, function (v_err) {
- b.error = v_err ? v_err.toString() : null;
+ b.error = v_err ? String(v_err) : null;
callback(v_err, b);
});
} else {
@@ -52,7 +52,7 @@ exports.string = function (opt) {
async.forEachSeries(b.validators || [], function (v, callback) {
if (!b.error) {
v(form, b, function (v_err) {
- b.error = v_err ? v_err.toString() : null;
+ b.error = v_err ? String(v_err) : null;
callback(null);
});
} else {
|
Use String() instead of the toString prototype method.
|
diff --git a/Tests/Model/Node/ProductOptionsTest.php b/Tests/Model/Node/ProductOptionsTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Model/Node/ProductOptionsTest.php
+++ b/Tests/Model/Node/ProductOptionsTest.php
@@ -76,13 +76,8 @@ class ProductOptionsTest extends WebTestCase
$po->getOption('color', 'red')->getName(),
'an option can be returned by type and value'
);
- $this->assertEquals(
- 'colorBlue',
- $po->getOption('CoLoRr', 'bLuE')->getName(),
- 'getOption parameters for type and value are case insensitive'
- );
$this->assertNull($po->getOption('bull', 'shit'), "return null when the type doesn't exists");
-
+
$this->assertEquals(
'colorBlue',
$po->getOptionByName('colorBlue')->getName(),
|
remove case insensitive test, it just doesn't make sense
|
diff --git a/libraries/lithium/core/Libraries.php b/libraries/lithium/core/Libraries.php
index <HASH>..<HASH> 100644
--- a/libraries/lithium/core/Libraries.php
+++ b/libraries/lithium/core/Libraries.php
@@ -144,9 +144,13 @@ class Libraries {
public static function add($name, $config = array()) {
$defaults = array(
'path' => LITHIUM_LIBRARY_PATH . '/' . $name,
- 'prefix' => $name . "\\", 'suffix' => '.php',
- 'loader' => null, 'includePath' => false,
- 'transform' => null, 'bootstrap' => null, 'defer' => false,
+ 'prefix' => $name . "\\",
+ 'suffix' => '.php',
+ 'loader' => null,
+ 'includePath' => false,
+ 'transform' => null,
+ 'bootstrap' => null,
+ 'defer' => false
);
switch ($name) {
case 'app':
@@ -549,7 +553,7 @@ class Libraries {
* @return void
*/
protected static function _addPlugins($plugins) {
- $defaults = array('bootstrap' => null, 'route' => true);
+ $defaults = array('bootstrap' => true, 'route' => true);
$params = array('app' => LITHIUM_APP_PATH, 'root' => LITHIUM_LIBRARY_PATH);
$result = array();
|
Plugins now load thier bootstrap files automatically.
|
diff --git a/comments-bundle/src/Resources/contao/classes/Comments.php b/comments-bundle/src/Resources/contao/classes/Comments.php
index <HASH>..<HASH> 100644
--- a/comments-bundle/src/Resources/contao/classes/Comments.php
+++ b/comments-bundle/src/Resources/contao/classes/Comments.php
@@ -73,7 +73,8 @@ class Comments extends Frontend
$total = $gtotal = $intTotal;
// Get the current page
- $page = Input::get('page') ? Input::get('page') : 1;
+ $id = 'page_c' . $this->id;
+ $page = Input::get($id) ?: 1;
// Do not index or cache the page if the page number is outside the range
if ($page < 1 || $page > max(ceil($total/$objConfig->perPage), 1))
@@ -93,7 +94,7 @@ class Comments extends Frontend
$offset = ($page - 1) * $objConfig->perPage;
// Initialize the pagination menu
- $objPagination = new Pagination($total, $objConfig->perPage);
+ $objPagination = new Pagination($total, $objConfig->perPage, 7, $id);
$objTemplate->pagination = $objPagination->generate("\n ");
}
|
[Comments] Pagination variables are now unique (see #<I>)
|
diff --git a/lib/genDocute.js b/lib/genDocute.js
index <HASH>..<HASH> 100644
--- a/lib/genDocute.js
+++ b/lib/genDocute.js
@@ -23,6 +23,6 @@ module.exports = async config => {
logger.success('Generated successfully')
} catch (err) {
console.error(err.name === 'SAOError' ? err.message : err.stack)
+ process.exit(1)
}
- process.exit(1)
}
|
fix: Avoid abnormal exits
fix #<I>
|
diff --git a/lib/grably.rb b/lib/grably.rb
index <HASH>..<HASH> 100644
--- a/lib/grably.rb
+++ b/lib/grably.rb
@@ -33,7 +33,7 @@ module Grably
def init
profile = (ENV[ENV_PROFILE_KEY] || 'default').split(',')
puts 'Loding profile ' + profile.join('/')
- @config = Grably::Core::Configuration.load(ENV[ENV_PROFILE_KEY] || [])
+ @config = Grably::Core::Configuration.load(profile)
end
def server
|
Use profile var instead of looking up into ENV
|
diff --git a/includes/constants.php b/includes/constants.php
index <HASH>..<HASH> 100755
--- a/includes/constants.php
+++ b/includes/constants.php
@@ -30,7 +30,7 @@
*
*/
#TAO version number
-define('TAO_VERSION', '3.3.0-sprint70');
+define('TAO_VERSION', '3.3.0-sprint71');
$version = TAO_VERSION;
|
udpate version to sprint <I>
|
diff --git a/VirtualProductDelivery.php b/VirtualProductDelivery.php
index <HASH>..<HASH> 100644
--- a/VirtualProductDelivery.php
+++ b/VirtualProductDelivery.php
@@ -33,7 +33,7 @@ class VirtualProductDelivery extends AbstractDeliveryModule
*/
public function isValidDelivery(Country $country)
{
- $cart = $this->getRequest()->getSession()->getCart();
+ $cart = $this->getRequest()->getSession()->getSessionCart($this->getDispatcher());
foreach ($cart->getCartItems() as $cartItem) {
if (!$cartItem->getProduct()->getVirtual()) {
return false;
|
Refactored the cart management in the Session object
|
diff --git a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/XtextResource.java b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/XtextResource.java
index <HASH>..<HASH> 100644
--- a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/XtextResource.java
+++ b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/resource/XtextResource.java
@@ -226,6 +226,21 @@ public class XtextResource extends ResourceImpl {
super.doUnload();
parseResult = null;
}
+
+ /**
+ * @since 2.9
+ */
+ public void relink() {
+ if (!isLoaded()) {
+ throw new IllegalStateException("You can't update an unloaded resource.");
+ }
+ try {
+ isUpdating = true;
+ updateInternalState(parseResult, parseResult);
+ } finally {
+ isUpdating = false;
+ }
+ }
public void update(int offset, int replacedTextLength, String newText) {
if (!isLoaded()) {
|
[idea][performance] Only relink a model on the modification counter
change, reparsing should be triggered by changing a corresponding xtext
file
Change-Id: I<I>eefbbe<I>c<I>d4e2d<I>e3
|
diff --git a/lib/html/builder.rb b/lib/html/builder.rb
index <HASH>..<HASH> 100644
--- a/lib/html/builder.rb
+++ b/lib/html/builder.rb
@@ -8,6 +8,10 @@ module BBLib
SELF_CLOSING_TAGS.include?(tag.to_s.downcase)
end
+ def self.build(*args, &block)
+ Builder.build(*args, &block)
+ end
+
module Builder
BBLib::HTML::TAGS.each do |tag|
|
Added build method to HTML module.
|
diff --git a/test/test_calculating_business_duration.rb b/test/test_calculating_business_duration.rb
index <HASH>..<HASH> 100644
--- a/test/test_calculating_business_duration.rb
+++ b/test/test_calculating_business_duration.rb
@@ -25,6 +25,13 @@ describe "calculating business duration" do
assert_equal 5, sunday.business_days_until(friday, true)
end
+ it "can calculate inclusive business duration with holidays passed as options" do
+ monday = Date.parse("June 20, 2022")
+ friday = Date.parse("June 24, 2022")
+ tuesday_holiday = Date.parse("June 22, 2022")
+ assert_equal 4, monday.business_days_until(friday, inclusive=true, holidays: [tuesday_holiday])
+ end
+
it "properly calculate business time with respect to work_hours" do
friday = Time.parse("December 24, 2010 15:00")
monday = Time.parse("December 27, 2010 11:00")
|
add tests for inclusive business duration with holidays passed as options
|
diff --git a/eZ/Bundle/EzPublishCoreBundle/EventListener/SessionSetDynamicNameListener.php b/eZ/Bundle/EzPublishCoreBundle/EventListener/SessionSetDynamicNameListener.php
index <HASH>..<HASH> 100644
--- a/eZ/Bundle/EzPublishCoreBundle/EventListener/SessionSetDynamicNameListener.php
+++ b/eZ/Bundle/EzPublishCoreBundle/EventListener/SessionSetDynamicNameListener.php
@@ -57,11 +57,9 @@ class SessionSetDynamicNameListener implements EventSubscriberInterface
/** @var $session \Symfony\Component\HttpFoundation\Session\Session */
$session = $this->container->get( 'session' );
- /** @var $configResolver \eZ\Publish\Core\MVC\ConfigResolverInterface */
- $configResolver = $this->container->get( 'ezpublish.config.resolver' );
- $sessionName = $configResolver->getParameter( 'session_name' );
- if ( $session->getName() != $sessionName )
+ if ( !$session->isStarted() )
{
+ $sessionName = $this->container->get( 'ezpublish.config.resolver' )->getParameter( 'session_name' );
if ( strpos( $sessionName, self::MARKER ) !== false )
{
$session->setName(
|
Additional fix for EZP-<I>, Impossible to log in using PHP <I>
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -92,9 +92,9 @@ author = u'Deren Eaton'
# The short X.Y version.
#import ipyrad
-version = 0.0.65 ##ipyrad.__version__
+version = "0.0.65" ##ipyrad.__version__
# The full version, including alpha/beta/rc tags.
-release = 0.0.65 ##ipyrad.__version__
+release = "0.0.65" ##ipyrad.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
|
'version' hard coded in conf as str not float
|
diff --git a/packages/currencies/tests/index.test.js b/packages/currencies/tests/index.test.js
index <HASH>..<HASH> 100644
--- a/packages/currencies/tests/index.test.js
+++ b/packages/currencies/tests/index.test.js
@@ -117,12 +117,15 @@ test("formatter can change locale", () => {
expect(
formatCurrencyUnit(getFiatUnit("USD"), -1234567, { showCode: true })
).toBe("- USD 12,345.67");
+ // FIXME we can't test this unless we configure node.js properly to have the locales. we'll come back to this later...
+ /*
expect(
formatCurrencyUnit(getFiatUnit("EUR"), -1234567, {
showCode: true,
locale: "fr-FR"
})
).toBe("-12 345.67 EUR");
+ */
});
test("encodeURIScheme", () => {
|
comment out tests for now because node.js need conf for Intl
|
diff --git a/lib/praxis-blueprints/blueprint.rb b/lib/praxis-blueprints/blueprint.rb
index <HASH>..<HASH> 100644
--- a/lib/praxis-blueprints/blueprint.rb
+++ b/lib/praxis-blueprints/blueprint.rb
@@ -337,11 +337,11 @@ module Praxis
if value.respond_to?(:validating) # really, it's a thing with sub-attributes
next if value.validating
end
- errors.push(*sub_attribute.validate(value, sub_context))
+ errors.concat(sub_attribute.validate(value, sub_context))
end
self.class.attribute.type.requirements.each do |req|
validation_errors = req.validate(keys_with_values, context)
- errors.push(*validation_errors) unless validation_errors.empty?
+ errors.concat(validation_errors) unless validation_errors.empty?
end
errors
ensure
diff --git a/lib/praxis-blueprints/field_expander.rb b/lib/praxis-blueprints/field_expander.rb
index <HASH>..<HASH> 100644
--- a/lib/praxis-blueprints/field_expander.rb
+++ b/lib/praxis-blueprints/field_expander.rb
@@ -108,7 +108,7 @@ module Praxis
new_fields = fields.is_a?(Array) ? fields[0] : fields
result = [expand(object.member_attribute.type, new_fields)]
- history[object][fields].push(*result)
+ history[object][fields].concat(result)
result
end
|
Use `.concat` to appease the cops a little bit.
|
diff --git a/frontend/client/src/model.js b/frontend/client/src/model.js
index <HASH>..<HASH> 100644
--- a/frontend/client/src/model.js
+++ b/frontend/client/src/model.js
@@ -42,6 +42,18 @@ Espo.define('model', [], function () {
Dep.prototype.initialize.call(this);
},
+ set: function (key, val, options) {
+ if (typeof key === 'object') {
+ var o = key;
+ if (this.idAttribute in o) {
+ this.id = o[this.idAttribute];
+ }
+ } else if (key === 'id') {
+ this.id = val;
+ }
+ return Dep.prototype.set.call(this, key, val, options);
+ },
+
get: function (key) {
if (key === 'id' && this.id) {
return this.id;
|
fix id in model.set
|
diff --git a/application/briefkasten/tests/test_dropbox.py b/application/briefkasten/tests/test_dropbox.py
index <HASH>..<HASH> 100644
--- a/application/briefkasten/tests/test_dropbox.py
+++ b/application/briefkasten/tests/test_dropbox.py
@@ -49,8 +49,8 @@ def test_dropbox_is_created_if_it_does_not_exist():
@fixture
-def dropbox_without_attachment(dropbox_container):
- return dropbox_container.add_dropbox(message=u'Schönen guten Tag!')
+def dropbox_without_attachment(dropbox_container, drop_id):
+ return dropbox_container.add_dropbox(drop_id, message=u'Schönen guten Tag!')
@fixture
|
add_dropbox now requires a pre-computed id
|
diff --git a/xblock/fields.py b/xblock/fields.py
index <HASH>..<HASH> 100644
--- a/xblock/fields.py
+++ b/xblock/fields.py
@@ -438,7 +438,7 @@ class Dict(Field):
if value is None or isinstance(value, dict):
return value
else:
- raise TypeError('Value stored in a Dict must be None or a dict.')
+ raise TypeError('Value stored in a Dict must be None or a dict, found %s' % type(value))
class List(Field):
@@ -453,7 +453,7 @@ class List(Field):
if value is None or isinstance(value, list):
return value
else:
- raise TypeError('Value stored in an List must be None or a list.')
+ raise TypeError('Value stored in an List must be None or a list, found %s' % type(value))
class String(Field):
@@ -468,7 +468,7 @@ class String(Field):
if value is None or isinstance(value, basestring):
return value
else:
- raise TypeError('Value stored in a String must be None or a string.')
+ raise TypeError('Value stored in a String must be None or a string, found %s' % type(value))
class Any(Field):
|
Provide more information in some exceptions.
|
diff --git a/src/node_modules/base/model.js b/src/node_modules/base/model.js
index <HASH>..<HASH> 100644
--- a/src/node_modules/base/model.js
+++ b/src/node_modules/base/model.js
@@ -6,9 +6,7 @@ var Model = require('ampersand-model');
module.exports = Model.extend({
- '@type': "Base",
-
- typeAttribute: "@type",
+ typeAttribute: "modelType",
idAttribute: "@id",
namespaceAttribute: "@graph",
|
typeAttribute is now the default modelType
|
diff --git a/src/xterm.js b/src/xterm.js
index <HASH>..<HASH> 100644
--- a/src/xterm.js
+++ b/src/xterm.js
@@ -1102,9 +1102,8 @@
line = this.lines[row];
out = '';
- if (y === this.y
+ if (this.y === y - (this.ybase - this.ydisp)
&& this.cursorState
- && (this.ydisp === this.ybase)
&& !this.cursorHidden) {
x = this.x;
} else {
|
Draw cursor at correct position when scrolling
Fixes #<I>
|
diff --git a/ctd/ctd.py b/ctd/ctd.py
index <HASH>..<HASH> 100644
--- a/ctd/ctd.py
+++ b/ctd/ctd.py
@@ -12,6 +12,8 @@
# obs: New constructors and methods for pandas DataFrame and Series.
#
+# Standard library.
+import warnings
# Scientific stack.
import numpy as np
@@ -179,9 +181,9 @@ def from_cnv(fname, compression=None, below_water=False, lon=None,
cast[column] = cast[column].astype(dtypes[column])
else:
try:
- cast[column] = np.float_(cast[column].astype(float))
+ cast[column] = cast[column].astype(float)
except ValueError:
- print('Could not convert %s to float.' % column)
+ warnings.warn('Could not convert %s to float.' % column)
if below_water:
cast = remove_above_water(cast)
return cast
|
Using warnings instead of print statements to show alerts.
Fixed astype bug.
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -8,4 +8,5 @@ module.exports = function(grunt) {
});
grunt.loadNpmTasks('grunt-fh-build');
+ grunt.registerTask('default', ['fh:default']);
};
|
[task]:RHMAP-<I> - Add default task which is missing
|
diff --git a/lxd/backup/backup_instance.go b/lxd/backup/backup_instance.go
index <HASH>..<HASH> 100644
--- a/lxd/backup/backup_instance.go
+++ b/lxd/backup/backup_instance.go
@@ -5,6 +5,7 @@ import (
"strings"
"time"
+ "github.com/lxc/lxd/lxd/operations"
"github.com/lxc/lxd/lxd/project"
"github.com/lxc/lxd/lxd/state"
"github.com/lxc/lxd/shared"
@@ -16,6 +17,7 @@ import (
type Instance interface {
Name() string
Project() string
+ Operation() *operations.Operation
}
// InstanceBackup represents an instance backup.
@@ -47,6 +49,11 @@ func (b *InstanceBackup) InstanceOnly() bool {
return b.instanceOnly
}
+// Instance returns the instance to be backed up.
+func (b *InstanceBackup) Instance() Instance {
+ return b.instance
+}
+
// Rename renames an instance backup.
func (b *InstanceBackup) Rename(newName string) error {
oldBackupPath := shared.VarPath("backups", "instances", project.Instance(b.instance.Project(), b.name))
|
lxd/backup/backup/instance: expose instance interface
|
diff --git a/src/Client.php b/src/Client.php
index <HASH>..<HASH> 100644
--- a/src/Client.php
+++ b/src/Client.php
@@ -180,20 +180,22 @@ final class Client
*/
public function publish(string $uri, $obs, array $options = []): DisposableInterface
{
- $obs = $obs instanceof Observable ? $obs : Observable::just($obs);
+ $obs = $obs instanceof Observable ? $obs : Observable::of($obs);
$completed = new Subject();
return $this->session
->takeUntil($completed)
- ->mapTo($obs->doOnCompleted(function () use ($completed) {
+ ->mapTo($obs->finally(function () use ($completed) {
$completed->onNext(0);
}))
->switchFirst()
->map(function ($value) use ($uri, $options) {
return new PublishMessage(Utils::getUniqueId(), (object)$options, $uri, [$value]);
})
- ->subscribe($this->webSocket);
+ ->subscribe(function ($value) {
+ $this->webSocket->onNext($value);
+ });
}
public function onChallenge(callable $challengeCallback)
|
Only subscribe onNext of websocket in pusblish
|
diff --git a/salt/cloud/clouds/vmware.py b/salt/cloud/clouds/vmware.py
index <HASH>..<HASH> 100644
--- a/salt/cloud/clouds/vmware.py
+++ b/salt/cloud/clouds/vmware.py
@@ -1903,6 +1903,9 @@ def list_snapshots(kwargs=None, call=None):
return {vm["name"]: _get_snapshots(vm["snapshot"].rootSnapshotList)}
else:
ret[vm["name"]] = _get_snapshots(vm["snapshot"].rootSnapshotList)
+ else:
+ if kwargs and kwargs.get('name') == vm["name"]:
+ return {}
return ret
|
Update vmware.py
if the vmname does't have any snapshot,it will return all snapshots on all vm that with snapshots. but it should return none.fix it
|
diff --git a/tests/test_sharding.py b/tests/test_sharding.py
index <HASH>..<HASH> 100644
--- a/tests/test_sharding.py
+++ b/tests/test_sharding.py
@@ -14,7 +14,7 @@ logger = logging.getLogger(__name__)
import tempfile
-from lib import set_storage
+from lib import set_storage, cleanup_storage
from lib.shards import Shard, Shards
from lib.hosts import Hosts
from lib.process import PortPool, HOSTNAME
@@ -42,7 +42,8 @@ class ShardsTestCase(unittest.TestCase):
PortPool().change_range()
def tearDown(self):
- self.sh.cleanup()
+ # self.sh.cleanup()
+ cleanup_storage()
if os.path.exists(self.db_path):
os.remove(self.db_path)
|
use cleanup_storage function instead of sh.cleanup in tearDown
|
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go
index <HASH>..<HASH> 100644
--- a/matterclient/matterclient.go
+++ b/matterclient/matterclient.go
@@ -817,9 +817,14 @@ func (m *MMClient) StatusLoop() {
backoff = time.Second * 60
case <-time.After(time.Second * 5):
if retries > 3 {
+ m.log.Debug("StatusLoop() timeout")
m.Logout()
m.WsQuit = false
- m.Login()
+ err := m.Login()
+ if err != nil {
+ log.Errorf("Login failed: %#v", err)
+ break
+ }
if m.OnWsConnect != nil {
m.OnWsConnect()
}
|
Break when re-login fails (mattermost)
|
diff --git a/src/test/java/io/nats/client/NatsTestServer.java b/src/test/java/io/nats/client/NatsTestServer.java
index <HASH>..<HASH> 100644
--- a/src/test/java/io/nats/client/NatsTestServer.java
+++ b/src/test/java/io/nats/client/NatsTestServer.java
@@ -165,6 +165,8 @@ public class NatsTestServer implements AutoCloseable {
System.out.println("\t" + ex.getMessage());
System.out.println("%%% Make sure that gnatsd is installed and in your PATH.");
System.out.println("%%% See https://github.com/nats-io/gnatsd for information on installing gnatsd");
+
+ throw new IllegalStateException("Failed to run [" + this.cmdLine +"]");
}
}
|
Added illegalstate exception when test server can't run
|
diff --git a/lib/cramp/action.rb b/lib/cramp/action.rb
index <HASH>..<HASH> 100644
--- a/lib/cramp/action.rb
+++ b/lib/cramp/action.rb
@@ -112,7 +112,7 @@ module Cramp
end
def websockets_protocol_10?
- [8, 9, 10].include?(@env['HTTP_SEC_WEBSOCKET_VERSION'].to_i)
+ [7, 8, 9, 10].include?(@env['HTTP_SEC_WEBSOCKET_VERSION'].to_i)
end
def protocol10_parser
diff --git a/lib/cramp/websocket/extension.rb b/lib/cramp/websocket/extension.rb
index <HASH>..<HASH> 100644
--- a/lib/cramp/websocket/extension.rb
+++ b/lib/cramp/websocket/extension.rb
@@ -10,7 +10,7 @@ module Cramp
end
def websocket?
- @env['HTTP_CONNECTION'] == 'Upgrade' && ['WebSocket', 'websocket'].include?(@env['HTTP_UPGRADE'])
+ ['WebSocket', 'websocket'].include?(@env['HTTP_UPGRADE'])
end
def secure_websocket?
|
Firefox 6 websockets support
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -68,11 +68,6 @@ setup_requires = [
install_requires = [
'Flask>=0.11.1',
- # "requests" has hard version range dependency on "idna" and "urllib3"
- # Every time "idna" and "urllib3" are updated, installation breaks because
- # "requests" dependencies are not resolved properly.
- 'urllib3<1.25,>=1.21.1', # from "requests"
- 'idna>=2.5,<2.8', # from "requests"
]
packages = find_packages()
|
installation: remove requests-related pins
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.