diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/tests/test_Apex.py b/tests/test_Apex.py
index <HASH>..<HASH> 100644
--- a/tests/test_Apex.py
+++ b/tests/test_Apex.py
@@ -309,10 +309,9 @@ def test_convert_qd2apex():
assert_allclose(apex_out.convert(60, 15, 'qd', 'apex', height=100),
apex_out.qd2apex(60, 15, height=100))
-
+
def test_convert_qd2apex_at_equator():
- """Test the quasi-dipole to apex conversion at the magnetic equator
- """
+ """Test the quasi-dipole to apex conversion at the magnetic equator """
apex_out = Apex(date=2000, refh=80)
elat, elon = apex_out.convert(lat=0.0, lon=0, source='qd', dest='apex',
height=120.0)
|
STY: removed trailing whitespace
Removed trailing whitespace for PEP8 compliance.
|
diff --git a/src/Codeception/TestCase/WPTestCase.php b/src/Codeception/TestCase/WPTestCase.php
index <HASH>..<HASH> 100644
--- a/src/Codeception/TestCase/WPTestCase.php
+++ b/src/Codeception/TestCase/WPTestCase.php
@@ -7,7 +7,7 @@ if (!class_exists('WP_UnitTest_Factory')) {
if (!class_exists('TracTickets')) {
require_once dirname(dirname(dirname(__FILE__))) . '/includes/trac.php';
}
-
+//@todo: update to latest version from core
class WPTestCase extends \Codeception\TestCase\Test {
protected static $forced_tickets = array();
@@ -763,4 +763,13 @@ class WPTestCase extends \Codeception\TestCase\Test {
$time_array = explode(' ', $microtime);
return array_sum($time_array);
}
+
+ /**
+ * Returns the WPQueries module instance.
+ *
+ * @return \Codeception\Module\WPQueries
+ */
+ public function queries(){
+ return $this->getModule('WPQueries');
+ }
}
|
added WPTestCase::queries() method
|
diff --git a/stagpy/_step.py b/stagpy/_step.py
index <HASH>..<HASH> 100644
--- a/stagpy/_step.py
+++ b/stagpy/_step.py
@@ -42,8 +42,8 @@ class _Geometry:
self._init_shape()
def _scale_radius_mo(self, radius: ndarray) -> ndarray:
- """Rescale radius for MO runs."""
- if self._step.sdat.par['magma_oceans_in']['magma_oceans_mode']:
+ """Rescale radius for evolving MO runs."""
+ if self._step.sdat.par['magma_oceans_in']['evolving_magma_oceans']:
return self._header['mo_thick_sol'] * (
radius + self._header['mo_lambda'])
return radius
|
Rescaling radius only when evolving_magma_oceans
Having only "magma_oceans_mode" falls back on the classic non-
dimensionalization.
|
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserService.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserService.java
index <HASH>..<HASH> 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserService.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/user/UserService.java
@@ -69,8 +69,7 @@ public class UserService extends ModeledDirectoryObjectService<ModeledUser, User
* creation.
*/
private static final ObjectPermission.Type[] IMPLICIT_USER_PERMISSIONS = {
- ObjectPermission.Type.READ,
- ObjectPermission.Type.UPDATE
+ ObjectPermission.Type.READ
};
/**
|
GUAC-<I>: Do not grant UPDATE on self by default.
|
diff --git a/app/controllers/think_feel_do_dashboard/arms_controller.rb b/app/controllers/think_feel_do_dashboard/arms_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/think_feel_do_dashboard/arms_controller.rb
+++ b/app/controllers/think_feel_do_dashboard/arms_controller.rb
@@ -45,9 +45,9 @@ module ThinkFeelDoDashboard
# DELETE /think_feel_do_dashboard/arms/1
def destroy
- @arm.destroy
- redirect_to arms_url,
- notice: "Arm was successfully destroyed."
+ redirect_to arm_path(@arm),
+ notice: "You do not have privileges to delete an arm. "\
+ "Please contact the site administrator to remove this arm."
end
private
diff --git a/spec/features/super_users/arms_spec.rb b/spec/features/super_users/arms_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/features/super_users/arms_spec.rb
+++ b/spec/features/super_users/arms_spec.rb
@@ -132,8 +132,8 @@ feature "Super User - Arms", type: :feature do
click_on "Arm 1"
click_on "Destroy"
- expect(page).to have_text "Arm was successfully destroyed"
- expect(page).to_not have_text "Arm 1"
+ expect(page).to have_text "You do not have privileges to delete an arm."\
+ " Please contact the site administrator to remove this arm"
end
end
end
|
Remove ability to delete Arm.
* Updated controller logic for arm destruction.
* Added notice explaining arm deletion privileges.
* Added spec to ensure notice displays.
[Finished #<I>]
|
diff --git a/src/main/java/moa/tasks/LearnModel.java b/src/main/java/moa/tasks/LearnModel.java
index <HASH>..<HASH> 100644
--- a/src/main/java/moa/tasks/LearnModel.java
+++ b/src/main/java/moa/tasks/LearnModel.java
@@ -55,10 +55,6 @@ public class LearnModel extends MainTask {
"The number of passes to do over the data.", 1, 1,
Integer.MAX_VALUE);
- public IntOption maxMemoryOption = new IntOption("maxMemory", 'b',
- "Maximum size of model (in bytes). -1 = no limit.", -1, -1,
- Integer.MAX_VALUE);
-
public IntOption memCheckFrequencyOption = new IntOption(
"memCheckFrequency", 'q',
"How many instances between memory bound checks.", 100000, 0,
|
Remove option '-b' from LearnModel
|
diff --git a/sqlite3.go b/sqlite3.go
index <HASH>..<HASH> 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -875,9 +875,10 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
// _loc
if val := params.Get("_loc"); val != "" {
- if val == "auto" {
+ switch strings.ToLower(val) {
+ case "auto":
loc = time.Local
- } else {
+ default:
loc, err = time.LoadLocation(val)
if err != nil {
return nil, fmt.Errorf("Invalid _loc: %v: %v", val, err)
@@ -887,7 +888,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
// _mutex
if val := params.Get("_mutex"); val != "" {
- switch val {
+ switch strings.ToLower(val) {
case "no":
mutex = C.SQLITE_OPEN_NOMUTEX
case "full":
@@ -899,7 +900,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
// _txlock
if val := params.Get("_txlock"); val != "" {
- switch val {
+ switch strings.ToLower(val) {
case "immediate":
txlock = "BEGIN IMMEDIATE"
case "exclusive":
|
Fix: String ToLower for PRAGMA's
|
diff --git a/cirq/circuits/circuit.py b/cirq/circuits/circuit.py
index <HASH>..<HASH> 100644
--- a/cirq/circuits/circuit.py
+++ b/cirq/circuits/circuit.py
@@ -135,6 +135,9 @@ class Circuit:
def copy(self) -> 'Circuit':
return Circuit(self._moments, self._device)
+ def __bool__(self):
+ return bool(self._moments)
+
def __eq__(self, other):
if not isinstance(other, type(self)):
return NotImplemented
diff --git a/cirq/circuits/circuit_test.py b/cirq/circuits/circuit_test.py
index <HASH>..<HASH> 100644
--- a/cirq/circuits/circuit_test.py
+++ b/cirq/circuits/circuit_test.py
@@ -126,6 +126,11 @@ def test_append_moments():
])
+def test_bool():
+ assert not Circuit()
+ assert Circuit.from_ops(cirq.X(cirq.NamedQubit('a')))
+
+
@cirq.testing.only_test_in_python3
def test_repr():
assert repr(cirq.Circuit()) == 'cirq.Circuit()'
|
define bool for Circuit (#<I>)
|
diff --git a/ghproxy/ghcache/coalesce.go b/ghproxy/ghcache/coalesce.go
index <HASH>..<HASH> 100644
--- a/ghproxy/ghcache/coalesce.go
+++ b/ghproxy/ghcache/coalesce.go
@@ -45,7 +45,7 @@ type requestCoalescer struct {
type firstRequest struct {
*sync.Cond
- waiting bool
+ subscribers bool
resp []byte
err error
}
@@ -85,7 +85,7 @@ func (r *requestCoalescer) RoundTrip(req *http.Request) (*http.Response, error)
}
firstReq.L.Lock()
r.Unlock()
- firstReq.waiting = true
+ firstReq.subscribers = true
// The documentation for Wait() says:
// "Because c.L is not locked when Wait first resumes, the caller typically
@@ -125,7 +125,7 @@ func (r *requestCoalescer) RoundTrip(req *http.Request) (*http.Response, error)
r.Unlock()
firstReq.L.Lock()
- if firstReq.waiting {
+ if firstReq.subscribers {
if err != nil {
firstReq.resp, firstReq.err = nil, err
} else {
|
ghproxy: rename 'waiting' field to 'subscribers'
No logical change.
|
diff --git a/pkg/endpoint/endpoint.go b/pkg/endpoint/endpoint.go
index <HASH>..<HASH> 100644
--- a/pkg/endpoint/endpoint.go
+++ b/pkg/endpoint/endpoint.go
@@ -305,9 +305,9 @@ func (e *Endpoint) closeBPFProgramChannel() {
}
}
-// HasBPFProgram returns whether a BPF program has been generated for this
+// bpfProgramInstalled returns whether a BPF program has been generated for this
// endpoint.
-func (e *Endpoint) HasBPFProgram() bool {
+func (e *Endpoint) bpfProgramInstalled() bool {
select {
case <-e.hasBPFProgram:
return true
@@ -2114,7 +2114,7 @@ func (e *Endpoint) waitForFirstRegeneration(ctx context.Context) error {
}
hasSidecarProxy := e.HasSidecarProxy()
e.runlock()
- if hasSidecarProxy && e.HasBPFProgram() {
+ if hasSidecarProxy && e.bpfProgramInstalled() {
// If the endpoint is determined to have a sidecar proxy,
// return immediately to let the sidecar container start,
// in case it is required to enforce L7 rules.
|
endpoint: do not export check to see if endpoint BPF program is installed
|
diff --git a/src/Scheduling.php b/src/Scheduling.php
index <HASH>..<HASH> 100644
--- a/src/Scheduling.php
+++ b/src/Scheduling.php
@@ -75,6 +75,15 @@ class Scheduling extends Extension
];
}
+ if (PHP_OS_FAMILY === 'Windows' && Str::contains($event->command, '"artisan"')) {
+ $exploded = explode(' ', $event->command);
+
+ return [
+ 'type' => 'artisan',
+ 'name' => 'artisan '.implode(' ', array_slice($exploded, 2)),
+ ];
+ }
+
return [
'type' => 'command',
'name' => $event->command,
@@ -95,6 +104,10 @@ class Scheduling extends Extension
/** @var \Illuminate\Console\Scheduling\Event $event */
$event = $this->getKernelEvents()[$id - 1];
+ if (PHP_OS_FAMILY === 'Windows') {
+ $event->command = Str::of($event->command)->replace('php-cgi.exe', 'php.exe');
+ }
+
$event->sendOutputTo($this->getOutputTo());
$event->run(app());
|
fixed several compatibility issues with windows and php-cgi
|
diff --git a/app/controllers/backend/tags_controller.rb b/app/controllers/backend/tags_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/backend/tags_controller.rb
+++ b/app/controllers/backend/tags_controller.rb
@@ -15,7 +15,7 @@ class Backend::TagsController < BackendController
def destroy
find_model.tagged_items.where(tag_id: find_tag.id).destroy_all
- render json: { tag: params[:tag] }
+ render json: { success: true }
end
private
|
Enhance json output when a tag is deleted.
|
diff --git a/datasette/app.py b/datasette/app.py
index <HASH>..<HASH> 100644
--- a/datasette/app.py
+++ b/datasette/app.py
@@ -131,6 +131,10 @@ class ConnectedDatabase:
self.size = p.stat().st_size
@property
+ def mtime_ns(self):
+ return Path(self.path).stat().st_mtime_ns
+
+ @property
def name(self):
if self.is_memory:
return ":memory:"
|
New ConnectedDatabase.mtime_ns property
I plan to use this for some clever table count caching tricks
|
diff --git a/config/doctrine.php b/config/doctrine.php
index <HASH>..<HASH> 100644
--- a/config/doctrine.php
+++ b/config/doctrine.php
@@ -108,7 +108,6 @@ return [
|--------------------------------------------------------------------------
*/
'custom_types' => [
- 'json' => LaravelDoctrine\ORM\Types\Json::class
],
/*
|--------------------------------------------------------------------------
diff --git a/src/Types/Json.php b/src/Types/Json.php
index <HASH>..<HASH> 100644
--- a/src/Types/Json.php
+++ b/src/Types/Json.php
@@ -14,6 +14,9 @@ use Doctrine\DBAL\Types\JsonArrayType;
* \Doctrine\DBAL\Types\Type::addType('json', '\Path\To\Custom\Type\Json');
* @link http://www.doctrine-project.org/jira/browse/DBAL-446
* @link https://github.com/doctrine/dbal/pull/655
+ *
+ * @deprecated Replaced by JsonType in Doctrine.
+ * You can safely remove usage of this type in your 'custom_type' configuration.
*/
class Json extends JsonArrayType
{
|
Deprecate and remove usage of our custom JsonType
This type is provided by doctrine.
|
diff --git a/bakery/settings/views.py b/bakery/settings/views.py
index <HASH>..<HASH> 100644
--- a/bakery/settings/views.py
+++ b/bakery/settings/views.py
@@ -191,7 +191,7 @@ def addclone():
db.session.add(project)
db.session.commit()
- flash(_("Repository successfully added to the list"))
+ flash(_("Repository successfully added to <a href='/'>the list</a>"))
git_clone(login = g.user.login, project_id = project.id, clone = project.clone)
return redirect(url_for('settings.repos')+"#tab_owngit")
@@ -235,7 +235,7 @@ def massgit():
)
db.session.add(project)
db.session.commit()
- flash(_("Repository %s successfully added to the list" % project.full_name))
+ flash(_("Repository %s successfully added to <a href='/'>the list</a>" % project.full_name))
git_clone(login = g.user.login, project_id = project.id, clone = project.clone)
db.session.commit()
|
Adding link to dashboard when repo added
|
diff --git a/sift.js b/sift.js
index <HASH>..<HASH> 100644
--- a/sift.js
+++ b/sift.js
@@ -383,7 +383,7 @@
query = comparable(query);
if (!query || (query.constructor.toString() !== "Object" &&
- query.constructor.toString() !== "function Object() { [native code] }")) {
+ query.constructor.toString().replace(/\n/g,'').replace(/ /g, '') !== "functionObject(){[nativecode]}")) { // cross browser support
query = { $eq: query };
}
|
fix #<I>: cross-browser support
|
diff --git a/output/html/request.php b/output/html/request.php
index <HASH>..<HASH> 100644
--- a/output/html/request.php
+++ b/output/html/request.php
@@ -27,6 +27,13 @@ class QM_Output_Html_Request extends QM_Output_Html {
echo '<div class="qm qm-half" id="' . esc_attr( $this->collector->id() ) . '">';
echo '<table cellspacing="0">';
+ echo '<caption class="screen-reader-text">' . esc_html( $this->collector->name() ) . '</caption>';
+ echo '<thead class="screen-reader-text">';
+ echo '<tr>';
+ echo '<th scope="col">' . esc_html__( 'Property', 'query-monitor' ) . '</th>';
+ echo '<th scope="col" colspan="2">' . esc_html__( 'Value', 'query-monitor' ) . '</th>';
+ echo '</tr>';
+ echo '</thead>';
echo '<tbody>';
foreach ( array(
|
Table a<I>y: request
Caption is visible to screen readers only.
Additional column headers are for screen-readers only.
|
diff --git a/client/my-sites/themes/theme-options.js b/client/my-sites/themes/theme-options.js
index <HASH>..<HASH> 100644
--- a/client/my-sites/themes/theme-options.js
+++ b/client/my-sites/themes/theme-options.js
@@ -59,6 +59,7 @@ const activate = {
const activateOnJetpack = {
label: i18n.translate( 'Activate' ),
header: i18n.translate( 'Activate on:', { comment: 'label for selecting a site on which to activate a theme' } ),
+ // Append `-wpcom` suffix to the theme ID so the installAndActivate() will install the theme from WordPress.com, not WordPress.org
action: ( themeId, siteId, ...args ) => installAndActivate( themeId + '-wpcom', siteId, ...args ),
hideForSite: ( state, siteId ) => ! isJetpackSite( state, siteId ),
hideForTheme: ( state, theme, siteId ) => (
|
my-sites/themes/theme-options#activateOnJetpack: Add explanation about -wpcom suffix
|
diff --git a/packages/upgrade/src/migrations/carbon-icons-react/10.3.0/update-icon-import-path.js b/packages/upgrade/src/migrations/carbon-icons-react/10.3.0/update-icon-import-path.js
index <HASH>..<HASH> 100644
--- a/packages/upgrade/src/migrations/carbon-icons-react/10.3.0/update-icon-import-path.js
+++ b/packages/upgrade/src/migrations/carbon-icons-react/10.3.0/update-icon-import-path.js
@@ -51,6 +51,17 @@ module.exports = (file, api) => {
// then capture all the icon-specific data. Depending on the length of
// this data, we assign name, size, and prefix values.
const { node } = path;
+
+ // Ignore imports if they already directly reference the package or one of
+ // its entrypoints that support tree-shaking
+ if (
+ node.source.value === '@carbon/icons-react' ||
+ node.source.value === '@carbon/icons-react/es' ||
+ node.source.value === '@carbon/icons-react/lib'
+ ) {
+ return;
+ }
+
const [
_scope,
_packageName,
|
fix(upgrade): ignore files that have correct import path (#<I>)
|
diff --git a/config.js b/config.js
index <HASH>..<HASH> 100644
--- a/config.js
+++ b/config.js
@@ -67,7 +67,7 @@ config = Object.assign({}, config, {
compiler_hash_type: __PROD__ ? 'chunkhash' : 'hash',
compiler_fail_on_warning: __TEST__ || __PROD__,
compiler_output_path: paths.base(config.dir_docs_dist),
- compiler_public_path: __PROD__ ? '//cdn.rawgit.com/Semantic-Org/Semantic-UI-React/gh-pages/' : '/',
+ compiler_public_path: __PROD__ ? '//raw.github.com/Semantic-Org/Semantic-UI-React/gh-pages/' : '/',
compiler_stats: {
hash: false, // the hash of the compilation
version: false, // webpack version info
|
chore(webpack): switch rawgit to github (#<I>)
|
diff --git a/tests/TestCase.php b/tests/TestCase.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -22,8 +22,8 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
'allowed_origins' => ['localhost'],
'allowed_headers' => ['X-Custom-1', 'X-Custom-2'],
'allowed_methods' => ['GET', 'POST'],
- 'exposed_headers' => false,
- 'max_age' => false,
+ 'exposed_headers' => [],
+ 'max_age' => 0,
];
}
|
Update TestCase.php
|
diff --git a/src/Bridge/Symfony/Routing/Router.php b/src/Bridge/Symfony/Routing/Router.php
index <HASH>..<HASH> 100644
--- a/src/Bridge/Symfony/Routing/Router.php
+++ b/src/Bridge/Symfony/Routing/Router.php
@@ -71,7 +71,7 @@ final class Router implements RouterInterface, UrlGeneratorInterface
$baseContext = $this->router->getContext();
$pathInfo = str_replace($baseContext->getBaseUrl(), '', $pathInfo);
- $request = Request::create($pathInfo);
+ $request = Request::create($pathInfo, 'GET', [], [], [], ['HTTP_HOST' => $baseContext->getHost()]);
$context = (new RequestContext())->fromRequest($request);
$context->setPathInfo($pathInfo);
$context->setScheme($baseContext->getScheme());
|
fix #<I> Router keep host context in match process
|
diff --git a/Tests/OAuth/ResourceOwner/Auth0ResourceOwnerTest.php b/Tests/OAuth/ResourceOwner/Auth0ResourceOwnerTest.php
index <HASH>..<HASH> 100644
--- a/Tests/OAuth/ResourceOwner/Auth0ResourceOwnerTest.php
+++ b/Tests/OAuth/ResourceOwner/Auth0ResourceOwnerTest.php
@@ -50,6 +50,13 @@ json;
protected function setUpResourceOwner($name, $httpUtils, array $options)
{
+ $options = array_merge(
+ array(
+ 'base_url' => 'https://example.oauth0.com'
+ ),
+ $options
+ );
+
return new Auth0ResourceOwner($this->buzzClient, $httpUtils, $options, $name, $this->storage);
}
}
|
Fixed test with the required base_url option
|
diff --git a/services/opentsdb/service.go b/services/opentsdb/service.go
index <HASH>..<HASH> 100644
--- a/services/opentsdb/service.go
+++ b/services/opentsdb/service.go
@@ -177,7 +177,9 @@ func (s *Service) Close() error {
return s.ln.Close()
}
- s.batcher.Stop()
+ if s.batcher != nil {
+ s.batcher.Stop()
+ }
close(s.done)
s.wg.Wait()
return nil
|
Only call Stop on non-nil batchers
|
diff --git a/client-vendor/after-body/jquery.clipSlide/jquery.clipSlide.js b/client-vendor/after-body/jquery.clipSlide/jquery.clipSlide.js
index <HASH>..<HASH> 100755
--- a/client-vendor/after-body/jquery.clipSlide/jquery.clipSlide.js
+++ b/client-vendor/after-body/jquery.clipSlide/jquery.clipSlide.js
@@ -59,6 +59,7 @@
var self = this;
this.$handle.on('click.clipSlide', function() {
self.toggle(true);
+ self.$elem.trigger('toggle.clipSlide');
});
};
|
Trigger toggle.clipSlide event on opening clipSlide content.
|
diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -87,7 +87,8 @@ func (s *Scanner) Scan() bool {
func (s *Scanner) Token() ([]byte, int) {
var kind int
switch {
- case len(s.line) == 0 || s.line[0] == ' ':
+ // The backslash is to detect "\ No newline at end of file" lines.
+ case len(s.line) == 0 || s.line[0] == ' ' || s.line[0] == '\\':
kind = 0
case s.line[0] == '+':
//kind = 1
|
For diffs, highlight "\ No newline at end of file" lines correctly.
|
diff --git a/src/hypercorn/protocol/h11.py b/src/hypercorn/protocol/h11.py
index <HASH>..<HASH> 100755
--- a/src/hypercorn/protocol/h11.py
+++ b/src/hypercorn/protocol/h11.py
@@ -161,9 +161,9 @@ class H11Protocol:
break
else:
if isinstance(event, h11.Request):
+ await self.send(Updated(idle=False))
await self._check_protocol(event)
await self._create_stream(event)
- await self.send(Updated(idle=False))
elif event is h11.PAUSED:
await self.can_read.clear()
await self.can_read.wait()
diff --git a/tests/protocol/test_h11.py b/tests/protocol/test_h11.py
index <HASH>..<HASH> 100755
--- a/tests/protocol/test_h11.py
+++ b/tests/protocol/test_h11.py
@@ -296,6 +296,7 @@ async def test_protocol_handle_h2c_upgrade(protocol: H11Protocol) -> None:
)
)
assert protocol.send.call_args_list == [ # type: ignore
+ call(Updated(idle=False)),
call(
RawData(
b"HTTP/1.1 101 \r\n"
|
Bugfix send the idle update first on HTTP/1 request receipt
This ensures that the connection is marked as not idle before a
protocol upgrade takes place. This therefore ensures that on upgrading
a slow response is not timed out.
|
diff --git a/src/converter/r2t/Sec2Heading.js b/src/converter/r2t/Sec2Heading.js
index <HASH>..<HASH> 100644
--- a/src/converter/r2t/Sec2Heading.js
+++ b/src/converter/r2t/Sec2Heading.js
@@ -1,5 +1,5 @@
import { last } from 'substance'
-import { replaceWith } from '../util/domHelpers'
+import { replaceWith, findChild } from '../util/domHelpers'
export default class Sec2Heading {
@@ -44,7 +44,7 @@ function _flattenSec(sec, level) {
h.attr('label', label.textContent)
label.remove()
}
- let title = sec.find('title')
+ let title = findChild(sec, 'title')
if (title) {
h.append(title.childNodes)
title.remove()
|
Fix Sec2Heading.
|
diff --git a/ez_setup.py b/ez_setup.py
index <HASH>..<HASH> 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -14,7 +14,7 @@ the appropriate options to ``use_setuptools()``.
This file can also be run as a script to install or upgrade setuptools.
"""
import sys
-DEFAULT_VERSION = "0.6c9"
+DEFAULT_VERSION = "0.6c8"
DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
md5_data = {
|
Default version of setup tools was decreased to <I>c8, because Debian have only that version.
|
diff --git a/lib/zxcvbn/matchers/repeat.rb b/lib/zxcvbn/matchers/repeat.rb
index <HASH>..<HASH> 100644
--- a/lib/zxcvbn/matchers/repeat.rb
+++ b/lib/zxcvbn/matchers/repeat.rb
@@ -5,28 +5,26 @@ module Zxcvbn
result = []
i = 0
while i < password.length
+ cur_char = password[i]
j = i + 1
- loop do
- prev_char, cur_char = password[j-1..j]
- if password[j-1] == password[j]
- j += 1
- else
- if j - i > 2 # don't consider length 1 or 2 chains.
- result << Match.new(
- :pattern => 'repeat',
- :i => i,
- :j => j-1,
- :token => password[i...j],
- :repeated_char => password[i]
- )
- end
- break
- end
+ while cur_char == password[j]
+ j += 1
end
+
+ if j - i > 2 # don't consider length 1 or 2 chains.
+ result << Match.new(
+ :pattern => 'repeat',
+ :i => i,
+ :j => j-1,
+ :token => password[i...j],
+ :repeated_char => cur_char
+ )
+ end
+
i = j
end
result
end
end
end
-end
\ No newline at end of file
+end
|
Simplified loop construction
Algorithm is the same, basically moved the if with break, to loop condition.
|
diff --git a/lib/ssh.js b/lib/ssh.js
index <HASH>..<HASH> 100644
--- a/lib/ssh.js
+++ b/lib/ssh.js
@@ -332,7 +332,6 @@ SSH2Stream.prototype._transform = function(chunk, encoding, callback) {
debug('DEBUG: Parser: IN_PACKETBEFORE (expecting ' + decrypt.size + ')');
// wait for the right number of bytes so we can determine the incoming
// packet length
- //expectData(this, EXP_TYPE_BYTES, decrypt.size, '_decryptBuf');
expectData(this, EXP_TYPE_BYTES, decrypt.size, decrypt.buf);
instate.status = IN_PACKET;
} else if (instate.status === IN_PACKET) {
@@ -414,7 +413,6 @@ SSH2Stream.prototype._transform = function(chunk, encoding, callback) {
if (instate.hmac.size !== undefined) {
// wait for hmac hash
debug('DEBUG: Parser: HMAC size:' + instate.hmac.size);
- //expectData(this, EXP_TYPE_BYTES, instate.hmac.size, '_hmacBuf');
expectData(this, EXP_TYPE_BYTES, instate.hmac.size, instate.hmac.buf);
instate.status = IN_PACKETDATAVERIFY;
instate.packet = buf;
|
SSH2Stream: remove old comments
|
diff --git a/test/rails_root/config/environment.rb b/test/rails_root/config/environment.rb
index <HASH>..<HASH> 100644
--- a/test/rails_root/config/environment.rb
+++ b/test/rails_root/config/environment.rb
@@ -1,6 +1,6 @@
# Specifies gem version of Rails to use when vendor/rails is not present
old_verbose, $VERBOSE = $VERBOSE, nil
-RAILS_GEM_VERSION = '>= 2.1.0' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '= 2.2.2' unless defined? RAILS_GEM_VERSION
$VERBOSE = old_verbose
require File.join(File.dirname(__FILE__), 'boot')
|
Set the tests to run against Rails <I>, as Rails <I> is currently unsupported
|
diff --git a/app/controllers/katello/api/v2/products_controller.rb b/app/controllers/katello/api/v2/products_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/katello/api/v2/products_controller.rb
+++ b/app/controllers/katello/api/v2/products_controller.rb
@@ -52,10 +52,7 @@ module Katello
param_group :search, Api::V2::ApiController
def index
filters = [filter_terms(product_ids_filter)]
- # TODO: support enabled filter in products. Product currently has
- # an enabled method, and elasticsearch has mappings, but filtering
- # errors. See elasticsearch output.
- # filters << filter_terms(enabled_filter) if enabled_filter.present?
+ filters << enabled_filter unless params[:enabled] == 'false'
options = sort_params.merge(:filters => filters, :load_records? => true)
@collection = item_search(Product, params, options)
respond_for_index(:collection => @collection)
@@ -121,9 +118,7 @@ module Katello
end
def enabled_filter
- if (enabled = params[:enabled])
- {:enabled => enabled}
- end
+ filter_terms({:enabled => [true]})
end
def filter_terms(terms)
|
fixing disabled products from showing up by default in the api
also hiding them in the ui
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -30,7 +30,9 @@ module.exports = config => {
colors: true,
reporters: ['mocha', 'coverage'],
// https://github.com/karma-runner/karma/blob/master/docs/config/01-configuration-file.md#browsernoactivitytimeout
- browserNoActivityTimeout: 100000,
+ browserNoActivityTimeout: 60000,
+ browserDisconnectTimeout: 30000,
+ captureTimeout: 60000,
logLevel: config.LOG_INFO,
preprocessors: {
'test/*.js': ['webpack']
|
Update karma.conf.js
|
diff --git a/lib/Model.php b/lib/Model.php
index <HASH>..<HASH> 100644
--- a/lib/Model.php
+++ b/lib/Model.php
@@ -428,10 +428,6 @@ class Model extends AbstractModel implements ArrayAccess,Iterator {
// determine the actual class of the other model
if(!is_object($model)){
$tmp=$this->api->normalizeClassName($model,'Model');
- /* bug - does not address namespace conversion properly.
- * fix by jancha */
- $tmp=str_replace('/', '\\', $tmp);
- /* */
$tmp=new $tmp; // avoid recursion
}else $tmp=$model;
$our_field=($tmp->table).'_id';
|
Model: Janchas fix moved to normalize method
|
diff --git a/src/Common/BaseRepository.php b/src/Common/BaseRepository.php
index <HASH>..<HASH> 100755
--- a/src/Common/BaseRepository.php
+++ b/src/Common/BaseRepository.php
@@ -60,7 +60,7 @@ abstract class BaseRepository extends \Prettus\Repository\Eloquent\BaseRepositor
$model->$key()->sync(array_values($new_values));
break;
case 'Illuminate\Database\Eloquent\Relations\BelongsTo':
- $model_key = $model->$key()->getQualifiedForeignKey();
+ $model_key = $model->$key()->getQualifiedForeignKeyName();
$new_value = array_get($attributes, $key, null);
$new_value = $new_value == '' ? null : $new_value;
$model->$model_key = $new_value;
|
fix(relationships): getQualifiedForeignKey -> getQualifiedForeignKeyName (#<I>)
In Laravel <I> the getForeignKey and getQualifiedForeignKey methods of the BelongsTo relationship have been renamed to getForeignKeyName and getQualifiedForeignKeyName respectively.
|
diff --git a/sportsreference/nba/constants.py b/sportsreference/nba/constants.py
index <HASH>..<HASH> 100644
--- a/sportsreference/nba/constants.py
+++ b/sportsreference/nba/constants.py
@@ -292,6 +292,7 @@ PLAYER_SCHEME = {
}
NATIONALITY = {
+ 'ao': 'Angola',
'ag': 'Antigua and Barbuda',
'ar': 'Argentina',
'au': 'Australia',
@@ -324,6 +325,7 @@ NATIONALITY = {
'gh': 'Ghana',
'gr': 'Greece',
'gp': 'Guadeloupe',
+ 'gn': 'Guinea',
'gy': 'Guyana',
'ht': 'Haiti',
'hu': 'Hungary',
|
Add support for additional NBA nationalities
After the summer <I> NBA draft and transfer window, a couple of new
players became the first ever players to represent their country in the
NBA. As a result, support for their countries was not included yet,
preventing sportsreference from pulling stats from these players without
throwing errors. With support added, all NBA teams can now be pulled
with every roster able to be analyzed.
|
diff --git a/plexapi/myplex.py b/plexapi/myplex.py
index <HASH>..<HASH> 100644
--- a/plexapi/myplex.py
+++ b/plexapi/myplex.py
@@ -217,7 +217,7 @@ class MyPlexAccount(PlexObject):
return []
t = time.time()
- if t - self._sonos_cache_timestamp > 60:
+ if t - self._sonos_cache_timestamp > 5:
self._sonos_cache_timestamp = t
data = self.query('https://sonos.plex.tv/resources')
self._sonos_cache = [PlexSonosClient(self, elem) for elem in data]
|
Reduce timeout to expire Sonos resource cache (#<I>)
|
diff --git a/src/record/Records.php b/src/record/Records.php
index <HASH>..<HASH> 100644
--- a/src/record/Records.php
+++ b/src/record/Records.php
@@ -24,7 +24,7 @@ use froq\pager\Pager;
*/
class Records extends ItemCollection
{
- /** @var froq\pager\Pager */
+ /** @var ?froq\pager\Pager */
protected ?Pager $pager;
/**
|
record.Records: doc-up.
|
diff --git a/tests/demo/basic_usage.py b/tests/demo/basic_usage.py
index <HASH>..<HASH> 100755
--- a/tests/demo/basic_usage.py
+++ b/tests/demo/basic_usage.py
@@ -169,6 +169,7 @@ class DemoApplication:
text=f'Least squares request from {metadata.client_node_id} time={metadata.timestamp.system} '
f'tid={metadata.transfer_id} prio={metadata.priority}',
)
+ print('Least squares request:', request, file=sys.stderr)
self._pub_diagnostic_record.publish_soon(diagnostic_msg)
# This is just the business logic.
|
We're dealing with an odd case where a test passes on my local machine successfully yet it fais randomly on the CI.
|
diff --git a/controllers/CcmpCompanyController.php b/controllers/CcmpCompanyController.php
index <HASH>..<HASH> 100644
--- a/controllers/CcmpCompanyController.php
+++ b/controllers/CcmpCompanyController.php
@@ -37,6 +37,11 @@ class CcmpCompanyController extends Controller {
'roles' => array('Company.readonly'),
),
array(
+ 'allow',
+ 'actions' => array('view', 'editableSaver'),
+ 'roles' => array('ClientOffice'),
+ ),
+ array(
'deny',
'users' => array('*'),
),
|
In Company controler added acces to view for Customer Office users
|
diff --git a/mpv-test.py b/mpv-test.py
index <HASH>..<HASH> 100755
--- a/mpv-test.py
+++ b/mpv-test.py
@@ -106,6 +106,10 @@ class TestProperties(MpvTestCase):
time.sleep(0.05)
check_canaries = lambda: os.path.exists('100') or os.path.exists('foo')
for name in sorted(self.m.property_list):
+ # See issue #108 and upstream mpv issues #7919 and #7920.
+ if name in ('demuxer', 'audio-demuxer', 'audio-files'):
+ continue
+ # These may cause files to be created
if name in ('external-file', 'heartbeat-cmd', 'wid', 'dump-stats', 'log-file') or name.startswith('input-'):
continue
name = name.replace('-', '_')
|
tests: Fix test_write for segaults in libmpv (#<I>)
|
diff --git a/lib/provider.js b/lib/provider.js
index <HASH>..<HASH> 100644
--- a/lib/provider.js
+++ b/lib/provider.js
@@ -38,6 +38,7 @@ function Provider(options) {
this.engine.manager = gethApiDouble;
this.engine.addProvider(new RequestFunnel());
+ this.engine.addProvider(new DelayedBlockFilter());
this.engine.addProvider(subscriptionSubprovider);
this.engine.addProvider(new GethDefaults());
this.engine.addProvider(gethApiDouble);
|
Add old DelayedBlockFilter subprovider so that old web3 doesn't hang on contract deployments
|
diff --git a/internal/graphics/shader.go b/internal/graphics/shader.go
index <HASH>..<HASH> 100644
--- a/internal/graphics/shader.go
+++ b/internal/graphics/shader.go
@@ -53,9 +53,6 @@ varying vec2 varying_tex_coord_max;
void main(void) {
varying_tex_coord = vec2(tex_coord[0], tex_coord[1]);
- // varying_tex_coord_min and varying_tex_coord_max mean endmost texel values
- // in the source rect. As varying_tex_coord is adjusted with minHighpValue
- // in vertices.go, re-adjust them so that exact endmost texel values.
varying_tex_coord_min = vec2(min(tex_coord[0], tex_coord[2]), min(tex_coord[1], tex_coord[3]));
varying_tex_coord_max = vec2(max(tex_coord[0], tex_coord[2]), max(tex_coord[1], tex_coord[3]));
gl_Position = projection_matrix * vec4(vertex, 0, 1);
|
graphics: Remove unneeded comments (#<I>)
|
diff --git a/js_host/conf.py b/js_host/conf.py
index <HASH>..<HASH> 100644
--- a/js_host/conf.py
+++ b/js_host/conf.py
@@ -10,7 +10,7 @@ class Conf(conf.Conf):
PATH_TO_NODE = 'node'
# An absolute path to the directory which contains your node_modules directory
- SOURCE_ROOT = None
+ SOURCE_ROOT = os.getcwd()
# A path to the binary used to control hosts and managers.
BIN_PATH = os.path.join('node_modules', '.bin', 'js-host')
|
SOURCE_ROOT now defaults to the current working directory
|
diff --git a/TYPO3.Flow/Classes/MVC/Controller/ActionController.php b/TYPO3.Flow/Classes/MVC/Controller/ActionController.php
index <HASH>..<HASH> 100644
--- a/TYPO3.Flow/Classes/MVC/Controller/ActionController.php
+++ b/TYPO3.Flow/Classes/MVC/Controller/ActionController.php
@@ -271,17 +271,5 @@ class ActionController extends \F3\FLOW3\MVC\Controller\AbstractController {
protected function initializeAction() {
}
- /**
- * The default action of this controller.
- *
- * This method should always be overridden by the concrete action
- * controller implementation.
- *
- * @return void
- * @author Robert Lemke <robert@typo3.org>
- */
- protected function indexAction() {
- return 'No index action has been implemented yet for this controller.';
- }
}
?>
\ No newline at end of file
|
FLOW3:
* removed indexAction from the ActionController, as it caused runtime notices about mismatching method signature with subclasses using non-empty argument list.
Original-Commit-Hash: <I>a<I>be<I>e<I>d<I>d8d
|
diff --git a/shared/my-sites/themes/theme-options.js b/shared/my-sites/themes/theme-options.js
index <HASH>..<HASH> 100644
--- a/shared/my-sites/themes/theme-options.js
+++ b/shared/my-sites/themes/theme-options.js
@@ -68,7 +68,9 @@ function rawOptions( site, theme, isLoggedOut ) {
return [
{
name: 'signup',
- label: i18n.translate( 'Choose this design' ),
+ label: i18n.translate( 'Choose this design', {
+ comment: 'when signing up for a WordPress.com account with a selected theme'
+ } ),
hasUrl: true,
isHidden: ! isLoggedOut
},
|
Add translation comment for 'Choose this design'
|
diff --git a/spec/s3uploader_spec.rb b/spec/s3uploader_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/s3uploader_spec.rb
+++ b/spec/s3uploader_spec.rb
@@ -23,7 +23,7 @@ describe S3Uploader do
(access + error).each do |file|
directory, basename = File.split(File.join(tmp_directory, file))
FileUtils.mkdir_p directory
- Open3.popen3("dd if=/dev/zero of=#{directory}/#{basename} count=1024 bs=1024")
+ create_test_file(File.join(directory, basename), 1)
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -8,3 +8,11 @@ RSpec.configure do |config|
config.color_enabled = true
config.formatter = 'documentation'
end
+
+
+def create_test_file(filename, size)
+ File.open(filename, 'w') do |f|
+ contents = "x" * (1024*1024)
+ size.to_i.times { f.write(contents) }
+ end
+end
|
Use Cross-platform creation of test files
|
diff --git a/faq-bundle/src/Resources/contao/dca/tl_faq.php b/faq-bundle/src/Resources/contao/dca/tl_faq.php
index <HASH>..<HASH> 100644
--- a/faq-bundle/src/Resources/contao/dca/tl_faq.php
+++ b/faq-bundle/src/Resources/contao/dca/tl_faq.php
@@ -301,7 +301,6 @@ $GLOBALS['TL_DCA']['tl_faq'] = array
'exclude' => true,
'filter' => true,
'inputType' => 'checkbox',
- 'eval' => array('tl_class'=>'w50'),
'sql' => "char(1) NOT NULL default ''"
),
'published' => array
|
[Faq] Adjust some DCA evaluation keys to comply with the general settings
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -103,6 +103,22 @@ const validators = {
throw new Error(`Invalid value for '${term}': '${value}', must be one of: none, quarantine, reject`);
}
}
+ },
+ aspf: {
+ description: 'SPF Alignment mode. Can be "s" or "r".',
+ validate(term, value) {
+ if (!/^(s|r)$/i.test(value)) {
+ throw new Error(`Invalid value for '${term}': '${value}', must be one of: s, r`);
+ }
+ }
+ },
+ adkim: {
+ description: 'DKIM Alignment mode. Can be "s" or "r".',
+ validate(term, value) {
+ if (!/^(s|r)$/i.test(value)) {
+ throw new Error(`Invalid value for '${term}': '${value}', must be one of: s, r`);
+ }
+ }
}
};
|
added support for aspf and adkim
|
diff --git a/tests/common/bootstrap.php b/tests/common/bootstrap.php
index <HASH>..<HASH> 100644
--- a/tests/common/bootstrap.php
+++ b/tests/common/bootstrap.php
@@ -11,5 +11,8 @@
*/
+/**
+ * @uses \phpDocumentor\Bootstrap
+ */
require_once __DIR__ . '/../../src/phpDocumentor/Bootstrap.php';
\phpDocumentor\Bootstrap::createInstance()->initialize();
\ No newline at end of file
|
put a docblock on the Bootstrap require element
|
diff --git a/hazelcast/src/main/java/com/hazelcast/map/operation/PartitionWideEntryOperation.java b/hazelcast/src/main/java/com/hazelcast/map/operation/PartitionWideEntryOperation.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/map/operation/PartitionWideEntryOperation.java
+++ b/hazelcast/src/main/java/com/hazelcast/map/operation/PartitionWideEntryOperation.java
@@ -37,7 +37,6 @@ import java.util.Map;
public class PartitionWideEntryOperation extends AbstractMapOperation implements BackupAwareOperation, PartitionAwareOperation {
private static final EntryEventType __NO_NEED_TO_FIRE_EVENT = null;
- private transient EntryEventType eventType;
EntryProcessor entryProcessor;
MapEntrySet response;
@@ -66,6 +65,7 @@ public class PartitionWideEntryOperation extends AbstractMapOperation implements
dataValue = mapService.toData(result);
response.add(new AbstractMap.SimpleImmutableEntry<Data, Data>(dataKey, dataValue));
+ EntryEventType eventType = null;
if (valueAfterProcess == null) {
recordStore.remove(dataKey);
eventType = EntryEventType.REMOVED;
|
issue #<I> reorganize field declarations
|
diff --git a/modules/static/app/controllers/static.go b/modules/static/app/controllers/static.go
index <HASH>..<HASH> 100644
--- a/modules/static/app/controllers/static.go
+++ b/modules/static/app/controllers/static.go
@@ -4,6 +4,7 @@ import (
"github.com/robfig/revel"
"os"
fpath "path/filepath"
+ "strings"
)
type Static struct {
@@ -47,7 +48,12 @@ func (c Static) Serve(prefix, filepath string) revel.Result {
basePath = revel.BasePath
}
- fname := fpath.Join(basePath, fpath.FromSlash(prefix), fpath.FromSlash(filepath))
+ basePathPrefix := fpath.Join(basePath, fpath.FromSlash(prefix))
+ fname := fpath.Join(basePathPrefix, fpath.FromSlash(filepath))
+ if !strings.HasPrefix(fname, basePathPrefix) {
+ revel.WARN.Printf("Attempted to read file outside of base path: %s", fname)
+ return c.NotFound("")
+ }
finfo, err := os.Stat(fname)
|
Static module should only allow reading files within the base path
|
diff --git a/LDAP.js b/LDAP.js
index <HASH>..<HASH> 100644
--- a/LDAP.js
+++ b/LDAP.js
@@ -85,6 +85,7 @@ var LDAP = function(opts) {
}
} else {
fn(new Error('LDAP Error ' + binding.err2string(), msgid));
+ reconnect();
}
return msgid;
}
|
Reconnect on any errored msgid.
|
diff --git a/src/main/java/com/googlecode/lanterna/gui2/ComboBox.java b/src/main/java/com/googlecode/lanterna/gui2/ComboBox.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/googlecode/lanterna/gui2/ComboBox.java
+++ b/src/main/java/com/googlecode/lanterna/gui2/ComboBox.java
@@ -328,6 +328,17 @@ public class ComboBox<V> extends AbstractInteractableComponent<ComboBox<V>> {
}
/**
+ * Returns the item at the selected index, this is the same as calling:
+ * <pre>
+ * comboBox.getItem(comboBox.getSelectedIndex());
+ * </pre>
+ * @return The item at the selected index
+ */
+ public synchronized V getSelectedItem() {
+ return getItem(getSelectedIndex());
+ }
+
+ /**
* Adds a new listener to the {@code ComboBox} that will be called on certain user actions
* @param listener Listener to attach to this {@code ComboBox}
* @return Itself
|
Adding an extra getSelectedItem() helper method to ComboBox
|
diff --git a/src/ValidatorFactory.php b/src/ValidatorFactory.php
index <HASH>..<HASH> 100644
--- a/src/ValidatorFactory.php
+++ b/src/ValidatorFactory.php
@@ -66,7 +66,7 @@ class ValidatorFactory
/**
* @param AbstractValidator $validator
- * @param array $rules
+ * @param string[] $rules
*
* @return AbstractValidator
*/
|
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on <URL>
|
diff --git a/lib/etl/engine.rb b/lib/etl/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/etl/engine.rb
+++ b/lib/etl/engine.rb
@@ -32,7 +32,7 @@ module ETL #:nodoc:
options[:config] = 'config/database.yml' unless File.exist?(options[:config])
database_configuration = YAML::load(ERB.new(IO.read(options[:config])).result + "\n")
ActiveRecord::Base.configurations.merge!(database_configuration)
- ETL::Base.configurations = database_configuration
+ ETL::Base.configurations = HashWithIndifferentAccess.new(database_configuration)
#puts "configurations in init: #{ActiveRecord::Base.configurations.inspect}"
require 'etl/execution'
|
Turn db config into a HashWithIndifferentAccess to avoid crash in sqlite adapter (line 9) which expects symbol keys not the string keys we present.
|
diff --git a/services/freecodecamp/freecodecamp-points.service.js b/services/freecodecamp/freecodecamp-points.service.js
index <HASH>..<HASH> 100644
--- a/services/freecodecamp/freecodecamp-points.service.js
+++ b/services/freecodecamp/freecodecamp-points.service.js
@@ -2,11 +2,17 @@ import Joi from 'joi'
import { metric } from '../text-formatters.js'
import { BaseJsonService, InvalidResponse, NotFound } from '../index.js'
+/**
+ * Validates that the schema response is what we're expecting.
+ * The username pattern should match the freeCodeCamp repository.
+ *
+ * @see https://github.com/freeCodeCamp/freeCodeCamp/blob/main/utils/validate.js#L14
+ */
const schema = Joi.object({
entities: Joi.object({
user: Joi.object()
.required()
- .pattern(/^\w+$/, {
+ .pattern(/^[a-zA-Z0-9\-_+]*$/, {
points: Joi.number().allow(null).required(),
}),
}).optional(),
|
[freecodecamp]: allow + symbol in username (#<I>)
|
diff --git a/lib/pool.js b/lib/pool.js
index <HASH>..<HASH> 100644
--- a/lib/pool.js
+++ b/lib/pool.js
@@ -89,7 +89,7 @@ var pool = module.exports = function pool(options, authorizeFn){
});
//Only let the first fork show synced status or the log wil look flooded with it
- if (portWarnings.length && !process.env.forkId || process.env.forkId === '0') {
+ if (portWarnings.length > 0 && (!process.env.forkId || process.env.forkId === '0')) {
var warnMessage = 'Network difficulty of ' + _this.jobManager.currentJob.difficulty + ' is lower than '
+ portWarnings.join(' and ');
emitWarningLog(warnMessage);
|
Port diff warnings were happening on accident
|
diff --git a/webmagic-core/src/main/java/us/codecraft/webmagic/Site.java b/webmagic-core/src/main/java/us/codecraft/webmagic/Site.java
index <HASH>..<HASH> 100644
--- a/webmagic-core/src/main/java/us/codecraft/webmagic/Site.java
+++ b/webmagic-core/src/main/java/us/codecraft/webmagic/Site.java
@@ -123,7 +123,7 @@ public class Site {
* @return get cookies
*/
public Map<String,Map<String, String>> getAllCookies() {
- return cookies.columnMap();
+ return cookies.rowMap();
}
/**
|
fix mistake of guava Table #<I>
|
diff --git a/tests/Gin/Asset/AssetTest.php b/tests/Gin/Asset/AssetTest.php
index <HASH>..<HASH> 100644
--- a/tests/Gin/Asset/AssetTest.php
+++ b/tests/Gin/Asset/AssetTest.php
@@ -89,16 +89,27 @@ class AssetTest extends TestCase
/**
* @test
*/
- public function it_should_throw_on_file_if_no_asset_file()
+ public function it_should_throw_on_getting_file_uri_if_file_is_missing()
{
$config = $this->getConfig();
$asset = $this->getAsset($config, 'js/example.js');
$this->expectException(FileNotFoundException::class);
-
$asset->getUri();
}
+ /**
+ * @test
+ */
+ public function it_should_throw_on_getting_file_path_if_file_is_missing()
+ {
+ $config = $this->getConfig();
+ $asset = $this->getAsset($config, 'js/example.js');
+
+ $this->expectException(FileNotFoundException::class);
+ $asset->getPath();
+ }
+
public function getConfig()
{
return new Config([
|
Adds missing test case for Asset class
|
diff --git a/frontend/dockerfile/builder/build.go b/frontend/dockerfile/builder/build.go
index <HASH>..<HASH> 100644
--- a/frontend/dockerfile/builder/build.go
+++ b/frontend/dockerfile/builder/build.go
@@ -861,6 +861,7 @@ func contextByName(ctx context.Context, c client.Client, sessionID, name string,
if err := json.Unmarshal(data, &img); err != nil {
return nil, nil, nil, err
}
+ img.Created = nil
st := llb.Image(ref, imgOpt...)
st, err = st.WithImageConfig(data)
|
dockerfile: fix created timestamp
Images built using docker-image:// passed through buildkit named
contexts had the wrong Image.Created timestamp, using the timestamp from
the used image, instead of the current datetime.
To fix, we perform the same input cleanup as in Dockerfile2LLB, and
explicitly set the timestamp to nil.
|
diff --git a/lib/cancan/ability.rb b/lib/cancan/ability.rb
index <HASH>..<HASH> 100644
--- a/lib/cancan/ability.rb
+++ b/lib/cancan/ability.rb
@@ -202,6 +202,28 @@ module CanCan
relevant_rules(action, subject).any?(&:only_raw_sql?)
end
+ # Copies all rules of the given +CanCan::Ability+ and adds them to +self+.
+ # class ReadAbility
+ # include CanCan::Ability
+ #
+ # def initialize
+ # can :read, User
+ # end
+ # end
+ #
+ # class WritingAbility
+ # include CanCan::Ability
+ #
+ # def initialize
+ # can :edit, User
+ # end
+ # end
+ #
+ # read_ability = ReadAbility.new
+ # read_ability.can? :edit, User.new #=> false
+ # read_ability.merge(WritingAbility.new)
+ # read_ability.can? :edit, User.new #=> true
+ #
def merge(ability)
ability.rules.each do |rule|
add_rule(rule.dup)
|
Added documentation for merge. (#<I>)
|
diff --git a/account/auth_backends.py b/account/auth_backends.py
index <HASH>..<HASH> 100644
--- a/account/auth_backends.py
+++ b/account/auth_backends.py
@@ -11,12 +11,14 @@ class UsernameAuthenticationBackend(ModelBackend):
def authenticate(self, **credentials):
try:
user = User.objects.get(username__iexact=credentials["username"])
- except User.DoesNotExist:
+ except (User.DoesNotExist, KeyError):
return None
else:
- if user.check_password(credentials["password"]):
- return user
-
+ try:
+ if user.check_password(credentials["password"]):
+ return user
+ except KeyError:
+
class EmailAuthenticationBackend(ModelBackend):
@@ -24,9 +26,12 @@ class EmailAuthenticationBackend(ModelBackend):
qs = EmailAddress.objects.filter(Q(primary=True) | Q(verified=True))
try:
email_address = qs.get(email__iexact=credentials["username"])
- except EmailAddress.DoesNotExist:
+ except (EmailAddress.DoesNotExist, KeyError):
return None
else:
user = email_address.user
- if user.check_password(credentials["password"]):
- return user
+ try:
+ if user.check_password(credentials["password"]):
+ return user
+ except KeyError:
+ return None
|
Be more resilliant to auth backends that don't require username/password as the params.
|
diff --git a/apiserver/server_test.go b/apiserver/server_test.go
index <HASH>..<HASH> 100644
--- a/apiserver/server_test.go
+++ b/apiserver/server_test.go
@@ -60,12 +60,15 @@ func (s *serverSuite) TestStop(c *gc.C) {
machine, password := s.Factory.MakeMachineReturningPassword(
c, &factory.MachineParams{Nonce: "fake_nonce"})
+ // A net.TCPAddr cannot be directly stringified into a valid hostname.
+ address := fmt.Sprintf("localhost:%d", srv.Addr().Port)
+
// Note we can't use openAs because we're not connecting to
apiInfo := &api.Info{
Tag: machine.Tag(),
Password: password,
Nonce: "fake_nonce",
- Addrs: []string{srv.Addr().String()},
+ Addrs: []string{address},
CACert: coretesting.CACert,
EnvironTag: s.State.EnvironTag(),
}
|
Fix test stop to specify the address properly.
|
diff --git a/lib/callcredit.rb b/lib/callcredit.rb
index <HASH>..<HASH> 100644
--- a/lib/callcredit.rb
+++ b/lib/callcredit.rb
@@ -21,8 +21,8 @@ module Callcredit
@config = Config.new(&block)
end
- def self.id_enhanced_check(check_data)
- client.id_enhanced_check(check_data)
+ def self.id_enhanced_check(*args)
+ client.id_enhanced_check(*args)
end
def self.client
|
Splat delegated method's args
|
diff --git a/forms/UploadField.php b/forms/UploadField.php
index <HASH>..<HASH> 100644
--- a/forms/UploadField.php
+++ b/forms/UploadField.php
@@ -915,16 +915,18 @@ class UploadField_SelectHandler extends RequestHandler {
$config->addComponent(new GridFieldDataColumns());
$config->addComponent(new GridFieldPaginator(10));
- // Create the data source for the list of files within the current directory.
- $files = DataList::create('File')->filter('ParentID', $folderID);
-
- // If relation is to be autoset, make sure only objects from related class are listed.
+ // If relation is to be autoset, we need to make sure we only list compatible objects.
+ $baseClass = null;
if ($this->parent->relationAutoSetting) {
- if ($relationClass = $this->parent->getRelationAutosetClass()) {
- $files->filter('ClassName', $relationClass);
- }
+ $baseClass = $this->parent->getRelationAutosetClass();
}
+ // By default we can attach anything that is a file, or derives from file.
+ if (!$baseClass) $baseClass = 'File';
+
+ // Create the data source for the list of files within the current directory.
+ $files = DataList::create($baseClass)->filter('ParentID', $folderID);
+
$fileField = new GridField('Files', false, $files, $config);
$fileField->setAttribute('data-selectable', true);
if($this->parent->getConfig('allowedMaxFileNumber') > 1) $fileField->setAttribute('data-multiselect', true);
|
BUGFIX: include derived classes for attaching in the UploadField.
|
diff --git a/src/onelogin/api/client.py b/src/onelogin/api/client.py
index <HASH>..<HASH> 100644
--- a/src/onelogin/api/client.py
+++ b/src/onelogin/api/client.py
@@ -1701,7 +1701,6 @@ class OneLoginClient(object):
"""
self.clean_error()
- self.prepare_token()
try:
url = Constants.EMBED_APP_URL
|
prepare_token is not required on get_embed_apps method
|
diff --git a/c7n/policy.py b/c7n/policy.py
index <HASH>..<HASH> 100644
--- a/c7n/policy.py
+++ b/c7n/policy.py
@@ -85,7 +85,7 @@ class PolicyExecutionMode(object):
def __init__(self, policy):
self.policy = policy
- def run(self):
+ def run(self, event=None, lambda_context=None):
"""Run the actual policy."""
raise NotImplementedError("subclass responsibility")
@@ -300,7 +300,7 @@ class PeriodicMode(LambdaMode, PullMode):
POLICY_METRICS = ('ResourceCount', 'ResourceTime', 'ActionTime')
- def run(self):
+ def run(self, event, lambda_context):
return PullMode.run(self)
|
fix run method signature on periodic mode, update base class to reflect run interface params (#<I>)
|
diff --git a/datapackage/datapackage.py b/datapackage/datapackage.py
index <HASH>..<HASH> 100644
--- a/datapackage/datapackage.py
+++ b/datapackage/datapackage.py
@@ -26,9 +26,9 @@ class DataPackage(object):
metadata (dict, str or file-like object, optional): The contents of the
`datapackage.json` file. It can be a ``dict`` with its contents,
a ``string`` with the local path for the file or its URL, or a
- file-like object. It also can point to a `ZIP` file with the
- `datapackage.json` in its root folder. If you're passing a
- ``dict``, it's a good practice to also set the
+ file-like object. It also can point to a `ZIP` file with one and
+ only one `datapackage.json` (it can be in a subfolder). If
+ you're passing a ``dict``, it's a good practice to also set the
``default_base_path`` parameter to the absolute `datapackage.json`
path.
schema (dict or str, optional): The schema to be used to validate this
@@ -226,7 +226,7 @@ class DataPackage(object):
def _extract_zip_if_possible(self, metadata):
'''str: Path to the extracted datapackage.json if metadata points to
- ZIP, or the unaltered metadata.'''
+ ZIP, or the unaltered metadata otherwise.'''
result = metadata
try:
if isinstance(metadata, six.string_types):
|
[#<I>] Update docstring
|
diff --git a/cmd/minikube/cmd/dashboard.go b/cmd/minikube/cmd/dashboard.go
index <HASH>..<HASH> 100644
--- a/cmd/minikube/cmd/dashboard.go
+++ b/cmd/minikube/cmd/dashboard.go
@@ -172,8 +172,8 @@ func kubectlProxy(kubectlVersion string, contextName string) (*exec.Cmd, string,
// readByteWithTimeout returns a byte from a reader or an indicator that a timeout has occurred.
func readByteWithTimeout(r io.ByteReader, timeout time.Duration) (byte, bool, error) {
- bc := make(chan byte)
- ec := make(chan error)
+ bc := make(chan byte, 1)
+ ec := make(chan error, 1)
go func() {
b, err := r.ReadByte()
if err != nil {
|
prevents a goroutine from being leaked in call to readByteWithTimeout
|
diff --git a/messages_extends/static/close-alerts.js b/messages_extends/static/close-alerts.js
index <HASH>..<HASH> 100644
--- a/messages_extends/static/close-alerts.js
+++ b/messages_extends/static/close-alerts.js
@@ -1,6 +1,9 @@
-$("a.close[close-href]").click(function (e) {
- e.preventDefault();
- $.post($(this).attr("close-href"), "", function () {
- });
- }
-);
+$(function() {
+ $("a.close[close-href]").click(function (e) {
+ e.preventDefault();
+ $.post($(this).attr("close-href"), "", function () {
+ });
+ }
+ );
+});
+
|
jQuery js need to be executed after document is ready.
|
diff --git a/src/Eloquent/Model.php b/src/Eloquent/Model.php
index <HASH>..<HASH> 100644
--- a/src/Eloquent/Model.php
+++ b/src/Eloquent/Model.php
@@ -12,6 +12,15 @@ use Illuminate\Database\Eloquent\Relations\HasOne;
class Model extends \Illuminate\Database\Eloquent\Model
{
/**
+ * The "type" of the auto-incrementing ID.
+ * Setting to 'string' prevents Laravel from casting non-integer IDs
+ * to numeric ones. Very helpful with inverted relations.
+ *
+ * @var string
+ */
+ protected $keyType = 'string';
+
+ /**
* Get the format for database stored dates.
*
* @return string
|
Update Model with $keyType = 'string' property
Use of $keyType property, set to 'string' (instead of default, Laravel's int), prevents Laravel from casting non-integer IDs to numeric ones. Since RethinkDB uses UUIDs instead of ints, thought it might be good to change default $keyType directly in base Model class.
|
diff --git a/concrete/src/Editor/CkeditorEditor.php b/concrete/src/Editor/CkeditorEditor.php
index <HASH>..<HASH> 100644
--- a/concrete/src/Editor/CkeditorEditor.php
+++ b/concrete/src/Editor/CkeditorEditor.php
@@ -5,6 +5,7 @@ use Concrete\Core\Site\Config\Liaison as Repository;
use Concrete\Core\Http\Request;
use Concrete\Core\Http\ResponseAssetGroup;
use Concrete\Core\Localization\Localization;
+use Concrete\Core\Page\Theme\Theme as PageTheme;
use Concrete\Core\Utility\Service\Identifier;
use URL;
use User;
@@ -84,9 +85,21 @@ EOL;
if ($cp->canViewPage()) {
$pt = $c->getCollectionThemeObject();
if (is_object($pt)) {
- $obj->classes = $pt->getThemeEditorClasses();
+ if ($pt->getThemeHandle()) {
+ $obj->classes = $pt->getThemeEditorClasses();
+ } else {
+ $siteTheme = $pt::getSiteTheme();
+ if (is_object($siteTheme)) {
+ $obj->classes = $siteTheme->getThemeEditorClasses();
+ }
+ }
}
}
+ } else {
+ $siteTheme = PageTheme::getSiteTheme();
+ if (is_object($siteTheme)) {
+ $obj->classes = $siteTheme->getThemeEditorClasses();
+ }
}
return $obj;
|
get theme editor classes when using CKEditor in dashboard single pages and non-pages
|
diff --git a/modopt/opt/algorithms.py b/modopt/opt/algorithms.py
index <HASH>..<HASH> 100644
--- a/modopt/opt/algorithms.py
+++ b/modopt/opt/algorithms.py
@@ -393,7 +393,10 @@ class FISTA(object):
"""
if self.restart_strategy is None:
return False
- criterion = np.dot(z_old - x_new, x_new - x_old) >= 0
+ criterion = np.dot(
+ (z_old - x_new).flatten(),
+ (x_new - x_old).flatten(),
+ ) >= 0
if criterion:
if 'adaptive' in self.restart_strategy:
self.r_lazy *= self.xi_restart
|
corrected criterion computation in the case of a non-1D optim variable
|
diff --git a/engine/src/main/java/org/camunda/bpm/engine/task/IdentityLink.java b/engine/src/main/java/org/camunda/bpm/engine/task/IdentityLink.java
index <HASH>..<HASH> 100644
--- a/engine/src/main/java/org/camunda/bpm/engine/task/IdentityLink.java
+++ b/engine/src/main/java/org/camunda/bpm/engine/task/IdentityLink.java
@@ -61,7 +61,10 @@ public interface IdentityLink {
public String getProcessDefId();
/**
- * Get the tenand id
+ * The id of the tenant associated with this identity link.
+ *
+ * @since 7.5
+ *
*/
public String getTenantId();
|
fix(engine): Added version number to tenantId in IdentityLink
related to #CAM-<I>
|
diff --git a/provider/kv_test.go b/provider/kv_test.go
index <HASH>..<HASH> 100644
--- a/provider/kv_test.go
+++ b/provider/kv_test.go
@@ -264,6 +264,7 @@ func TestKvWatchTree(t *testing.T) {
<-configChan
close(c1) // WatchTree chans can close due to error
case <-time.After(1 * time.Second):
+ t.Fatalf("Failed to create a new WatchTree chan")
}
select {
@@ -271,6 +272,7 @@ func TestKvWatchTree(t *testing.T) {
c2 <- []*store.KVPair{}
<-configChan
case <-time.After(1 * time.Second):
+ t.Fatalf("Failed to create a new WatchTree chan")
}
select {
|
Fatalf for timeout cases.
|
diff --git a/pycoin/version.py b/pycoin/version.py
index <HASH>..<HASH> 100644
--- a/pycoin/version.py
+++ b/pycoin/version.py
@@ -1 +1 @@
-version = "0.80"
+version = "0.90a"
|
Update version to <I>a.
|
diff --git a/structr-core/src/main/java/org/structr/schema/parser/DatePropertyParser.java b/structr-core/src/main/java/org/structr/schema/parser/DatePropertyParser.java
index <HASH>..<HASH> 100644
--- a/structr-core/src/main/java/org/structr/schema/parser/DatePropertyParser.java
+++ b/structr-core/src/main/java/org/structr/schema/parser/DatePropertyParser.java
@@ -68,7 +68,7 @@ public class DatePropertyParser extends PropertyParser {
@Override
public void parseFormatString(final Schema entity, String expression) throws FrameworkException {
- if (expression.length() == 0) {
+ if (expression == null || expression.length() == 0) {
errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(expression, "invalid_date_pattern", "Empty date pattern."));
return;
}
|
Added null check (was in outer method before)
|
diff --git a/src/path.js b/src/path.js
index <HASH>..<HASH> 100644
--- a/src/path.js
+++ b/src/path.js
@@ -36,7 +36,7 @@ _gpfErrorDeclare("path", {
//region _gpfPathDecompose
function _gpfPathSplit (path) {
- if (-1 < path.indexOf("\\")) {
+ if (path.indexOf("\\") > -1) {
// DOS path is case insensitive, hence lowercase it
return path.toLowerCase().split("\\");
}
@@ -109,7 +109,7 @@ function _gpfPathName (path) {
function _gpfPathExtension (path) {
var name = _gpfPathName(path),
pos = name.lastIndexOf(".");
- if (-1 === pos) {
+ if (pos === -1) {
return "";
}
return name.substr(pos);
@@ -250,7 +250,7 @@ gpf.path = {
nameOnly: function (path) {
var name = _gpfPathName(path),
pos = name.lastIndexOf(".");
- if (-1 === pos) {
+ if (pos === -1) {
return name;
}
return name.substr(0, pos);
|
!yoda style (#<I>)
|
diff --git a/src/Block/LocaleSwitcherBlockService.php b/src/Block/LocaleSwitcherBlockService.php
index <HASH>..<HASH> 100644
--- a/src/Block/LocaleSwitcherBlockService.php
+++ b/src/Block/LocaleSwitcherBlockService.php
@@ -71,7 +71,7 @@ class LocaleSwitcherBlockService extends AbstractBlockService
), E_USER_DEPRECATED);
parent::__construct($templatingOrDeprecatedName, $showCountryFlagsOrTemplating);
- $this->showCountryFlags = $showCountryFlags;
+ $this->showCountryFlags = $showCountryFlags ?? false;
} else {
throw new \TypeError(sprintf(
'Argument 2 passed to "%s()" must be either a "bool" value, "null" or an instance of "%s", %s given.',
|
Fix nullable value
$showCountryFlags could be nullable and the class property should
be boolean, there hasn't been a release yet, so there is no need
of changelog.
|
diff --git a/packages/okam-build/example/base/scripts/swan.config.js b/packages/okam-build/example/base/scripts/swan.config.js
index <HASH>..<HASH> 100644
--- a/packages/okam-build/example/base/scripts/swan.config.js
+++ b/packages/okam-build/example/base/scripts/swan.config.js
@@ -7,7 +7,7 @@
const merge = require('../../../').merge;
module.exports = merge({}, require('./base.config'), {
- polyfill: ['async'],
+ localPolyfill: ['async'],
wx2swan: true,
framework: ['filter'],
processors: {
diff --git a/packages/okam-cli/templates/base/scripts/swan.config.js b/packages/okam-cli/templates/base/scripts/swan.config.js
index <HASH>..<HASH> 100644
--- a/packages/okam-cli/templates/base/scripts/swan.config.js
+++ b/packages/okam-cli/templates/base/scripts/swan.config.js
@@ -9,7 +9,7 @@ const merge = require('okam-build').merge;
module.exports = merge({}, require('./base.config'), {
<% if: ${async} %>
- polyfill: ['async'],
+ localPolyfill: ['async'],
<% /if %>
// wx2swan: true,
rules: []
|
fix(okam-cli): change swan.config.js polyfill to localPoly due to smarty app breackchange
|
diff --git a/template/parse.go b/template/parse.go
index <HASH>..<HASH> 100644
--- a/template/parse.go
+++ b/template/parse.go
@@ -144,6 +144,11 @@ func (r *rawTemplate) Template() (*Template, error) {
continue
}
+ // The name defaults to the type if it isn't set
+ if pp.Name == "" {
+ pp.Name = pp.Type
+ }
+
// Set the configuration
delete(c, "except")
delete(c, "only")
|
name a post-processor to it's type if it is not named
|
diff --git a/acceptance-tests/src/test/java/io/blueocean/ath/offline/personalization/FavoritesCardsTest.java b/acceptance-tests/src/test/java/io/blueocean/ath/offline/personalization/FavoritesCardsTest.java
index <HASH>..<HASH> 100644
--- a/acceptance-tests/src/test/java/io/blueocean/ath/offline/personalization/FavoritesCardsTest.java
+++ b/acceptance-tests/src/test/java/io/blueocean/ath/offline/personalization/FavoritesCardsTest.java
@@ -165,6 +165,8 @@ public class FavoritesCardsTest extends AbstractFavoritesTest {
tmpFile.createNewFile();
sseClientRule.untilEvents(pipeline.buildsFinished);
+ dashboardPage.open(); // FIXME - because sse is not yet registered (started before the page was loaded)
+
dashboardPage.checkFavoriteCardStatus(fullNameMaster, SUCCESS);
dashboardPage.checkFavoriteCardStatus(fullNameOther, SUCCESS);
|
Ugh hax, force the page to have current status after build until sse is fixed
|
diff --git a/classes/ggphpsoapclient.php b/classes/ggphpsoapclient.php
index <HASH>..<HASH> 100644
--- a/classes/ggphpsoapclient.php
+++ b/classes/ggphpsoapclient.php
@@ -180,7 +180,7 @@ var_export($action);
public function setOption( $option, $value )
{
- if ( $opption = 'soapVersion' )
+ if ( $option = 'soapVersion' )
{
$this->SoapVersion = $version;
}
diff --git a/classes/ggsoapclient.php b/classes/ggsoapclient.php
index <HASH>..<HASH> 100644
--- a/classes/ggsoapclient.php
+++ b/classes/ggsoapclient.php
@@ -38,7 +38,7 @@ class ggSOAPClient extends ggWebservicesClient
public function setOption( $option, $value )
{
- if ( $opption = 'soapVersion' )
+ if ( $option = 'soapVersion' )
{
$this->SoapVersion = $version;
}
|
- fix: setOption (soapVersion) not working
|
diff --git a/lib/core/DiscordieDispatcher.js b/lib/core/DiscordieDispatcher.js
index <HASH>..<HASH> 100644
--- a/lib/core/DiscordieDispatcher.js
+++ b/lib/core/DiscordieDispatcher.js
@@ -1,5 +1,6 @@
"use strict";
+const DiscordieError = require("./DiscordieError");
const events = require("events");
let lastEvent = null;
diff --git a/lib/core/DiscordieError.js b/lib/core/DiscordieError.js
index <HASH>..<HASH> 100644
--- a/lib/core/DiscordieError.js
+++ b/lib/core/DiscordieError.js
@@ -1,8 +1,8 @@
"use strict";
-class DiscordieError {
+class DiscordieError extends Error {
constructor(message, exception) {
- this.message = message;
+ super(message);
this.exception = exception;
}
}
|
Fix DiscordieError and DiscordieError
|
diff --git a/txnserver/ledger_web_client.py b/txnserver/ledger_web_client.py
index <HASH>..<HASH> 100644
--- a/txnserver/ledger_web_client.py
+++ b/txnserver/ledger_web_client.py
@@ -302,8 +302,8 @@ class LedgerWebClient(object):
except urllib2.HTTPError as err:
logger.error('peer operation on url %s failed with response: %d',
url, err.code)
- raise MessageException('operation failed with resonse: {0}'.format(
- err.code))
+ raise MessageException('operation failed '
+ 'with response: {0}'.format(err.code))
except urllib2.URLError as err:
logger.error('peer operation on url %s failed: %s',
|
Fix line length issue for lint
|
diff --git a/components/colorPicker/index.js b/components/colorPicker/index.js
index <HASH>..<HASH> 100644
--- a/components/colorPicker/index.js
+++ b/components/colorPicker/index.js
@@ -9,6 +9,8 @@ module.exports = {
this.$on('openCP', function (event) {
this.show = true;
this.originalColor = event;
+ this.cancelIntercept = this.onCancel.bind(this);
+ document.addEventListener("backbutton", this.cancelIntercept, true);
});
},
computed: {
@@ -38,6 +40,8 @@ module.exports = {
},
onCancel: function (e) {
e.preventDefault();
+ e.stopPropagation();
+ document.removeEventListener("backbutton", this.cancelIntercept, true);
this.selectedColor = this.originalColor;
this.show = false;
}
|
color picker always hides on 'back' now
|
diff --git a/lib/ghtorrent/ghtorrent.rb b/lib/ghtorrent/ghtorrent.rb
index <HASH>..<HASH> 100644
--- a/lib/ghtorrent/ghtorrent.rb
+++ b/lib/ghtorrent/ghtorrent.rb
@@ -944,7 +944,9 @@ module GHTorrent
# Adds a pull request history event
def ensure_pull_request_history(id, ts, unq, act, actor)
- user = ensure_user(actor, false, false)
+ user = unless actor.nil?
+ ensure_user(actor, false, false)
+ end
pull_req_history = @db[:pull_request_history]
entry = pull_req_history.first(:pull_request_id => id,
:created_at => (ts - 3)..(ts + 3),
|
Don't choke if actor is null
|
diff --git a/viewport-units-buggyfill.js b/viewport-units-buggyfill.js
index <HASH>..<HASH> 100755
--- a/viewport-units-buggyfill.js
+++ b/viewport-units-buggyfill.js
@@ -365,7 +365,7 @@
};
forEach.call(document.styleSheets, function(sheet) {
- if (!sheet.href || origin(sheet.href) === origin(location.href)) {
+ if (!sheet.href || origin(sheet.href) === origin(location.href) || sheet.ownerNode.getAttribute('data-viewport-units-buggyfill') === 'ignore') {
// skip <style> and <link> from same origin
return;
}
|
Update viewport-units-buggyfill.js
Problem:
CSS from CDN does not work (CORS error) even if we add data-viewport-units-buggyfill="ignore" as attribute in link tag
Solution:
Add data-viewport-units-buggyfill="ignore" for importCrossOriginLinks function to skip import cross origin links.
|
diff --git a/tests/Process/ProcessorCounterTest.php b/tests/Process/ProcessorCounterTest.php
index <HASH>..<HASH> 100644
--- a/tests/Process/ProcessorCounterTest.php
+++ b/tests/Process/ProcessorCounterTest.php
@@ -12,9 +12,9 @@ class ProcessorCounterTest extends \PHPUnit_Framework_TestCase
*/
public function shouldCountTheNumberOfProcessorInLinux()
{
- $processorCount = new ProcessorCounter(__DIR__.'/Fixture/proc_cpuinfo');
+ $processorCount = new ProcessorCounter();
$this->assertEquals(4, $processorCount->execute());
}
}
-
\ No newline at end of file
+
|
Fixed test for new ProcessorCounter
|
diff --git a/lib/apic.js b/lib/apic.js
index <HASH>..<HASH> 100644
--- a/lib/apic.js
+++ b/lib/apic.js
@@ -114,7 +114,16 @@ define(function (require) {
root.getBaseHost = function () {
return base;
};
-
+
+ root.setBaseHost = function (host) {
+
+ if (host) {
+ base = host;
+ }
+
+ return base;
+ };
+
function method(verb, uri, res, params, secure) {
var safe = safeMethods[verb] || false,
protocol = (secure = secure || !safe) ? 'https:' : scheme;
|
Implemented method to set basehost uri
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
from setuptools import setup
setup(name='billboard.py',
- version='4.4.0',
+ version='4.4.1',
description='Unofficial Python API for accessing Billboard.com charts',
author='Allen Guo',
author_email='guoguo12@gmail.com',
|
Bump to <I> (hotfix; see message for prior commit)
|
diff --git a/myo/math.py b/myo/math.py
index <HASH>..<HASH> 100644
--- a/myo/math.py
+++ b/myo/math.py
@@ -171,7 +171,7 @@ class Quaternion(object):
return iter((self.x, self.y, self.z, self.w))
def __repr__(self):
- return '{}({0}, {1}, {2}, {3})'.format(
+ return '{0}({1}, {2}, {3}, {4})'.format(
type(self).__name__, self.x, self.y, self.z, self.w)
def __invert__(self):
|
Bugfix for string formatting
The exception `ValueError: cannot switch from automatic field numbering to manual field specification` is raised when running `event.orientation` inside of the `on_orientation` function in a subclassed `myo.DeviceListener` in python <I>
|
diff --git a/packages/wdio-cli/src/constants.js b/packages/wdio-cli/src/constants.js
index <HASH>..<HASH> 100644
--- a/packages/wdio-cli/src/constants.js
+++ b/packages/wdio-cli/src/constants.js
@@ -76,10 +76,10 @@ export const SUPPORTED_PACKAGES = {
{ name: 'browserstack', value: '@wdio/browserstack-service$--$browserstack' },
{ name: 'appium', value: '@wdio/appium-service$--$appium' },
{ name: 'firefox-profile', value: '@wdio/firefox-profile-service$--$firefox-profile' },
+ { name: 'crossbrowsertesting', value: '@wdio/crossbrowsertesting-service$--$crossbrowsertesting' },
// external
{ name: 'zafira-listener', value: 'wdio-zafira-listener-service$--$zafira-listener' },
{ name: 'reportportal', value: 'wdio-reportportal-service$--$reportportal' },
- { name: 'crossbrowsertesting', value: 'wdio-crossbrowsertesting-service$--$crossbrowsertesting' },
{ name: 'docker', value: 'wdio-docker-service$--$docker' },
],
}
|
Move cbt to internal services in wdio-cli (#<I>)
|
diff --git a/src/app-router.js b/src/app-router.js
index <HASH>..<HASH> 100644
--- a/src/app-router.js
+++ b/src/app-router.js
@@ -75,7 +75,12 @@ export class AppRouter extends Router {
super.registerViewPort(viewPort, name);
if (!this.isActive) {
- this.activate();
+ if('configureRouter' in this.container.viewModel){
+ var result = this.container.viewModel.configureRouter() || Promise.resolve();
+ return result.then(() => this.activate());
+ }else{
+ this.activate();
+ }
} else {
this.dequeueInstruction();
}
|
fix(router): enable async configureRouter for app-level router
|
diff --git a/lxd/cluster/upgrade.go b/lxd/cluster/upgrade.go
index <HASH>..<HASH> 100644
--- a/lxd/cluster/upgrade.go
+++ b/lxd/cluster/upgrade.go
@@ -194,7 +194,6 @@ func UpgradeMembersWithoutRole(gateway *Gateway, members []db.NodeInfo) error {
if err != nil {
return errors.Wrap(err, "Failed to add dqlite node")
}
-
}
return nil
|
lxd/cluster/upgrade: Removes empty line in UpgradeMembersWithoutRole
|
diff --git a/Kwc/Form/Field/Abstract/Component.php b/Kwc/Form/Field/Abstract/Component.php
index <HASH>..<HASH> 100644
--- a/Kwc/Form/Field/Abstract/Component.php
+++ b/Kwc/Form/Field/Abstract/Component.php
@@ -17,6 +17,10 @@ class Kwc_Form_Field_Abstract_Component extends Kwc_Abstract
{
$ret = parent::getTemplateVars();
$form = $this->_getForm();
+
+ //initialize form, sets formName on fields
+ $form->getComponent()->getForm();
+
$postData = array();
$errors = array();
if ($form->getComponent()->isProcessed()) {
|
initialize form if view cache is used
fixes test
|
diff --git a/test/Functional/Fixtures/TestKernel.php b/test/Functional/Fixtures/TestKernel.php
index <HASH>..<HASH> 100644
--- a/test/Functional/Fixtures/TestKernel.php
+++ b/test/Functional/Fixtures/TestKernel.php
@@ -21,11 +21,11 @@ class TestKernel extends Kernel
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
- $loader->load(__DIR__.'/config/config_27.yml');
-// if (self::VERSION_ID < 20800) {
-// } else {
-// $loader->load(__DIR__.'/config/config.yml');
-// }
+ if (Kernel::VERSION_ID >= 30000) {
+ $loader->load(__DIR__.'/config/config.yml');
+ } else {
+ $loader->load(__DIR__.'/config/config_27.yml');
+ }
}
/**
|
Fixed commented config file in test kernel
|
diff --git a/aioelasticsearch/transport.py b/aioelasticsearch/transport.py
index <HASH>..<HASH> 100644
--- a/aioelasticsearch/transport.py
+++ b/aioelasticsearch/transport.py
@@ -278,10 +278,11 @@ class AIOHttpTransport(Transport):
raise
else:
+ self.connection_pool.mark_live(connection)
+
if method == 'HEAD':
return 200 <= status < 300
- self.connection_pool.mark_live(connection)
if data:
data = self.deserializer.loads(
data, headers.get('content-type'),
|
mark any connection sucessful if server responded
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.