diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/resqued/listener_proxy.rb b/lib/resqued/listener_proxy.rb
index <HASH>..<HASH> 100644
--- a/lib/resqued/listener_proxy.rb
+++ b/lib/resqued/listener_proxy.rb
@@ -13,6 +13,14 @@ module Resqued
@options = options
end
+ # Public: wrap up all the things, this object is going home.
+ def dispose
+ if @master_socket
+ @master_socket.close
+ @master_socket = nil
+ end
+ end
+
# Public: An IO to select on to check if there is incoming data available.
def read_pipe
@master_socket
@@ -80,6 +88,7 @@ module Resqued
# Public: Report that a worker finished.
def worker_finished(pid)
+ return if @master_socket.nil?
@master_socket.puts(pid)
end
end
diff --git a/lib/resqued/master.rb b/lib/resqued/master.rb
index <HASH>..<HASH> 100644
--- a/lib/resqued/master.rb
+++ b/lib/resqued/master.rb
@@ -119,7 +119,7 @@ module Resqued
@listener_backoff.finished
@current_listener = nil
end
- listener_pids.delete(lpid) # This may leak workers.
+ listener_pids.delete(lpid).dispose # This may leak workers.
write_procline
else
return
|
Clean up some of the listener's details.
|
diff --git a/test/web/specs/getDirectoryContents.spec.js b/test/web/specs/getDirectoryContents.spec.js
index <HASH>..<HASH> 100644
--- a/test/web/specs/getDirectoryContents.spec.js
+++ b/test/web/specs/getDirectoryContents.spec.js
@@ -114,7 +114,7 @@ describe("getDirectoryContents", function() {
});
});
- it("glob filter test')", function() {
+ it("supports globbing files", function() {
const options = {
deep: true,
glob: {
|
renamed test based on Perry's recommendation
|
diff --git a/pycbc/events/events.py b/pycbc/events/events.py
index <HASH>..<HASH> 100644
--- a/pycbc/events/events.py
+++ b/pycbc/events/events.py
@@ -427,6 +427,7 @@ class EventManager(object):
row.channel = channel
row.ifo = ifo
+ row.chisq = event['chisq']
# FIXME: This is *not* the dof!!!
# but is needed for later programs not to fail
if 'chisq_dof' in event.dtype.names:
|
Add chisq back into code. This should have already been fixed on master
|
diff --git a/version/src/main/java/org/jboss/as/version/ProductConfig.java b/version/src/main/java/org/jboss/as/version/ProductConfig.java
index <HASH>..<HASH> 100644
--- a/version/src/main/java/org/jboss/as/version/ProductConfig.java
+++ b/version/src/main/java/org/jboss/as/version/ProductConfig.java
@@ -124,14 +124,14 @@ public class ProductConfig implements Serializable {
public String getPrettyVersionString() {
if (name != null)
- return String.format("JBoss %s %s (AS %s)", name, version, Version.AS_VERSION);
+ return String.format("JBoss %s %s (WildFly %s)", name, version, Version.AS_VERSION);
return String.format("WildFly %s \"%s\"", Version.AS_VERSION, Version.AS_RELEASE_CODENAME);
}
public static String getPrettyVersionString(final String name, String version1, String version2) {
if(name != null) {
- return String.format("JBoss %s %s (AS %s)", name, version1, version2);
+ return String.format("JBoss %s %s (WildFly %s)", name, version1, version2);
}
return String.format("WildFly %s \"%s\"", version1, version2);
}
|
Use WildFly also for layered configurations
|
diff --git a/src/Illuminate/Bus/Queueable.php b/src/Illuminate/Bus/Queueable.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Bus/Queueable.php
+++ b/src/Illuminate/Bus/Queueable.php
@@ -47,7 +47,7 @@ trait Queueable
/**
* The number of seconds before the job should be made available.
*
- * @var \DateTimeInterface|\DateInterval|int|null
+ * @var \DateTimeInterface|\DateInterval|array|int|null
*/
public $delay;
@@ -129,7 +129,7 @@ trait Queueable
/**
* Set the desired delay in seconds for the job.
*
- * @param \DateTimeInterface|\DateInterval|int|null $delay
+ * @param \DateTimeInterface|\DateInterval|array|int|null $delay
* @return $this
*/
public function delay($delay)
|
Fix #<I> let delay() method accept array (#<I>)
* Update Queueable.php
let delay method accept array according to documentation>
<URL>
|
diff --git a/src/client/pfs.go b/src/client/pfs.go
index <HASH>..<HASH> 100644
--- a/src/client/pfs.go
+++ b/src/client/pfs.go
@@ -395,6 +395,27 @@ func (c APIClient) PutFileWithDelimiter(repoName string, commitID string, path s
return int(written), err
}
+// PutFileURL
+func (c APIClient) PutFileURL(repoName string, commitID string, path string, url string) (retErr error) {
+ putFileClient, err := c.PfsAPIClient.PutFile(context.Background())
+ if err != nil {
+ return sanitizeErr(err)
+ }
+ defer func() {
+ if _, err := putFileClient.CloseAndRecv(); err != nil && retErr == nil {
+ retErr = sanitizeErr(err)
+ }
+ }()
+ if err := putFileClient.Send(&pfs.PutFileRequest{
+ File: NewFile(repoName, commitID, path),
+ FileType: pfs.FileType_FILE_TYPE_REGULAR,
+ Url: url,
+ }); err != nil {
+ return sanitizeErr(err)
+ }
+ return nil
+}
+
// GetFile returns the contents of a file at a specific Commit.
// offset specifies a number of bytes that should be skipped in the beginning of the file.
// size limits the total amount of data returned, note you will get fewer bytes
|
Adds PutFileURL to the goclient.
|
diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java
index <HASH>..<HASH> 100644
--- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java
+++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java
@@ -240,6 +240,10 @@ public class XmppConnectionManager<DC extends AbstractXMPPConnection> {
}
connections.clear();
+
+ if (accountRegistrationConnection != null) {
+ accountRegistrationConnection.disconnect();
+ }
}
|
Admin should be disconnected after tests.
The Smack Integration tests can use an admin account to provision
accounts that are used by the tests. This admin account uses an XMPP
connection to interact with the server-under-test.
When the tests are over, this account should be disconnected
explicitly, to prevent stream management from keeping it alive longer
than it needs to.
|
diff --git a/js/crypton.js b/js/crypton.js
index <HASH>..<HASH> 100644
--- a/js/crypton.js
+++ b/js/crypton.js
@@ -404,9 +404,4 @@ module.exports = class crypton extends Exchange {
}
}
}
-
- async request (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
- let response = await this.fetch2 (path, api, method, params, headers, body);
- return response['result'];
- }
};
|
removed unnecessary request override from crypton fix #<I>
|
diff --git a/src/Tapestry.php b/src/Tapestry.php
index <HASH>..<HASH> 100644
--- a/src/Tapestry.php
+++ b/src/Tapestry.php
@@ -27,7 +27,7 @@ class Tapestry implements ContainerAwareInterface, ArrayAccess
* Version Number
* @var string
*/
- const VERSION = '1.0.3';
+ const VERSION = '1.0.4';
/**
* Tapestry constructor.
|
:bookmark: Merged fixes into development and incremented version
|
diff --git a/gcsproxy/mutable_content_test.go b/gcsproxy/mutable_content_test.go
index <HASH>..<HASH> 100644
--- a/gcsproxy/mutable_content_test.go
+++ b/gcsproxy/mutable_content_test.go
@@ -296,7 +296,15 @@ func (t *DirtyTest) SetUp(ti *TestInfo) {
}
func (t *DirtyTest) ReadAt_CallsLease() {
- AssertTrue(false, "TODO")
+ buf := make([]byte, 4)
+ const offset = 17
+
+ // Lease
+ ExpectCall(t.rwl, "ReadAt")(bufferIs(buf), offset).
+ WillOnce(Return(0, errors.New("")))
+
+ // Call
+ t.mc.ReadAt(buf, offset)
}
func (t *DirtyTest) ReadAt_LeaseFails() {
|
DirtyTest.ReadAt_CallsLease
|
diff --git a/src/SourceLocator/Exception/InvalidFileInfo.php b/src/SourceLocator/Exception/InvalidFileInfo.php
index <HASH>..<HASH> 100644
--- a/src/SourceLocator/Exception/InvalidFileInfo.php
+++ b/src/SourceLocator/Exception/InvalidFileInfo.php
@@ -6,11 +6,14 @@ class InvalidFileInfo extends \RuntimeException
{
/**
* @param mixed $nonSplFileInfo
+ *
* @return InvalidFileInfo
*/
public static function fromNonSplFileInfo($nonSplFileInfo)
{
- $type = is_object($nonSplFileInfo) ? get_class($nonSplFileInfo) : gettype($nonSplFileInfo) ;
- return new self(sprintf('Expected an iterator of SplFileInfo instances, %s given instead', $type));
+ return new self(sprintf(
+ 'Expected an iterator of SplFileInfo instances, %s given instead',
+ is_object($nonSplFileInfo) ? get_class($nonSplFileInfo) : gettype($nonSplFileInfo)
+ ));
}
}
|
#<I> CS (inlining expressions, docblock spacing)
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
# we only support Python 3 version >= 3.4
-if sys.version_info < (3, 4):
+if len(sys.argv) >= 2 and sys.argv[1] == "install" and sys.version_info < (3, 4):
raise SystemExit("Python 3.4 or higher is required")
|
Check python version in setup.py only for install
This allow us to use this on build service like travis.
|
diff --git a/lib/sbdb/db.rb b/lib/sbdb/db.rb
index <HASH>..<HASH> 100644
--- a/lib/sbdb/db.rb
+++ b/lib/sbdb/db.rb
@@ -88,6 +88,14 @@ module SBDB
def self.new file, name = nil, *p, &e
super file, name, RECNO, *p, &e
end
+
+ def [] k
+ super [k].pack('I')
+ end
+
+ def []= k, v
+ super [k].pack('I'), v
+ end
end
Array = Recno
@@ -95,5 +103,13 @@ module SBDB
def self.new file, name = nil, *p, &e
super file, name, QUEUE, *p, &e
end
+
+ def [] k
+ super [k].pack('I')
+ end
+
+ def []= k, v
+ super [k].pack('I'), v
+ end
end
end
|
DB: Recno/Queue-support
|
diff --git a/panc/src/org/quattor/pan/utils/XmlUtils.java b/panc/src/org/quattor/pan/utils/XmlUtils.java
index <HASH>..<HASH> 100644
--- a/panc/src/org/quattor/pan/utils/XmlUtils.java
+++ b/panc/src/org/quattor/pan/utils/XmlUtils.java
@@ -30,6 +30,7 @@ public class XmlUtils {
if (!factory.getFeature(SAXTransformerFactory.FEATURE)) {
throw CompilerError.create(MSG_MISSING_SAX_TRANSFORMER);
}
+ factory.setAttribute("indent-number", new Integer(4));
// Can safely cast the factory to a SAX-specific one. Get the
// handler to feed with SAX events.
|
fix indentation for annotation files (possibly also for xml output files)
|
diff --git a/src/Artax/Http/Client.php b/src/Artax/Http/Client.php
index <HASH>..<HASH> 100644
--- a/src/Artax/Http/Client.php
+++ b/src/Artax/Http/Client.php
@@ -71,6 +71,7 @@ class Client {
$this->contextOptions['http']['content'] = $request->getBody();
$this->contextOptions['http']['method'] = $request->getMethod();
+ $this->contextOptions['http']['protocol_version'] = $request->getHttpVersion();
$context = stream_context_create(
$this->contextOptions,
|
Added protocol_version in the request.
|
diff --git a/web/concrete/src/Cache/Cache.php b/web/concrete/src/Cache/Cache.php
index <HASH>..<HASH> 100644
--- a/web/concrete/src/Cache/Cache.php
+++ b/web/concrete/src/Cache/Cache.php
@@ -74,7 +74,9 @@ abstract class Cache
*/
public function enable()
{
- $this->pool->setDriver($this->driver);
+ if ($this->driver !== null) {
+ $this->pool->setDriver($this->driver);
+ }
$this->enabled = true;
}
|
Only need to set the cache driver if the driver stored is not null
Former-commit-id: afaa<I>ac<I>f6aa<I>a<I>f1e<I>b6c<I>
|
diff --git a/src/Propel/Generator/Command/InitCommand.php b/src/Propel/Generator/Command/InitCommand.php
index <HASH>..<HASH> 100644
--- a/src/Propel/Generator/Command/InitCommand.php
+++ b/src/Propel/Generator/Command/InitCommand.php
@@ -166,9 +166,10 @@ class InitCommand extends AbstractCommand
private function initMysql(OutputInterface $output, DialogHelper $dialog)
{
$host = $dialog->ask($output, 'Please enter your database host', 'localhost');
+ $port = $dialog->ask($output, 'Please enter your database port', '3306');
$database = $dialog->ask($output, 'Please enter your database name');
- return sprintf('mysql:host=%s;dbname=%s', $host, $database);
+ return sprintf('mysql:host=%s;port=%s;dbname=%s', $host, $port, $database);
}
private function initSqlite(OutputInterface $output, DialogHelper $dialog)
|
Init command now allows you to choose mysql port
|
diff --git a/salt/modules/file.py b/salt/modules/file.py
index <HASH>..<HASH> 100644
--- a/salt/modules/file.py
+++ b/salt/modules/file.py
@@ -2380,6 +2380,34 @@ def get_managed(
'''
Return the managed file data for file.managed
+ name
+ location where the file lives on the server
+
+ template
+ template format
+
+ source
+ managed source file
+
+ source_hash
+ hash of the source file
+
+ user
+ user owner
+
+ group
+ group owner
+
+ mode
+ file mode
+
+ context
+ variables to add to the environment
+
+ default
+ default values of for context_dict
+
+
CLI Example:
.. code-block:: bash
@@ -2852,6 +2880,49 @@ def manage_file(name,
Checks the destination against what was retrieved with get_managed and
makes the appropriate modifications (if necessary).
+ name
+ location to place the file
+
+ sfn
+ location of cached file on the minion
+
+ This is the path to the file stored on the minion. This file is placed on the minion
+ using cp.cache_file. If the hash sum of that file matches the source_sum, we do not
+ transfer the file to the minion again.
+
+ This file is then grabbed and if it has template set, it renders the file to be placed
+ into the correct place on the system using salt.utils.copyfile()
+
+ source
+ file reference on the master
+
+ source_hash
+ sum hash for source
+
+ user
+ user owner
+
+ group
+ group owner
+
+ backup
+ backup_mode
+
+ makedirs
+ make directories if they do not exist
+
+ template
+ format of templating
+
+ show_diff
+ Include diff in state return
+
+ contents:
+ contents to be placed in the file
+
+ dir_mode
+ mode for directories created with makedirs
+
CLI Example:
.. code-block:: bash
|
expand documentation around sfn
This important variable is not documented anywhere else. It is the
location in the cache where the minion recieves the file from the master
and then templates it or just moves it into place on the minion using
try:
salt.utils.copyfile(sfn,
real_name,
__salt__['config.backup_mode'](backup),
__opts__['cachedir'])
|
diff --git a/src/Router.js b/src/Router.js
index <HASH>..<HASH> 100644
--- a/src/Router.js
+++ b/src/Router.js
@@ -235,9 +235,7 @@ function Router(declarativeStates) {
assertPathUniqueness(stateArray);
- // Only leaf states can be transitioned to.
- leafStates = {};
- registerLeafStates(stateArray);
+ leafStates = registerLeafStates(stateArray, {});
}
function assertPathUniqueness(states) {
@@ -258,15 +256,16 @@ function Router(declarativeStates) {
for (var name in states) callback(name, states[name]);
}
- function registerLeafStates(states) {
- states.forEach(function(state) {
+ function registerLeafStates(states, leafStates) {
+ return states.reduce(function(leafStates, state) {
if (state.children.length)
- registerLeafStates(state.children);
+ return registerLeafStates(state.children, leafStates);
else {
leafStates[state.fullName] = state;
state.paths = util.parsePaths(state.fullPath());
+ return leafStates;
}
- });
+ }, leafStates);
}
/*
|
Quick refactoring: Less side effect
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -16,4 +16,20 @@ end
class ActiveSupport::TestCase
fixtures :all
+
+ def self.aws_setup
+ paperclip_config = AnotherUploader.configuration.has_attached_file_options
+ @@bucket ||= paperclip_config[:bucket]
+ AWS.config(paperclip_config[:s3_credentials])
+ AWS::S3.new
+ end
+
+ def self.bucket
+ @@aws ||= self.aws_setup
+ @@aws.buckets[@@bucket]
+ end
+
+ def assert_remote_file_exists path
+ assert self.class.bucket.objects[path].exists?, "Expected #{path} to be uploaded to bucket #{@@bucket}"
+ end
end
|
added AWS query function to test_helper
|
diff --git a/visidata/cmdlog.py b/visidata/cmdlog.py
index <HASH>..<HASH> 100644
--- a/visidata/cmdlog.py
+++ b/visidata/cmdlog.py
@@ -17,7 +17,7 @@ BaseSheet.init('undone', list) # list of CommandLogRow for redo after undo
nonLogged = '''forget exec-longname undo redo quit
error status errors statuses options threads cmdlog
replay stop pause cancel advance save-cmdlog
-go- search scroll prev next page go start end zoom resize
+go- search scroll prev next page start end zoom resize visibility
suspend redraw no-op help syscopy syspaste sysopen profile toggle'''.split()
option('rowkey_prefix', 'キ', 'string prefix for rowkey in the cmdlog')
|
[cmdlog] make visibility commands not loggable
|
diff --git a/docs/conf_std.py b/docs/conf_std.py
index <HASH>..<HASH> 100644
--- a/docs/conf_std.py
+++ b/docs/conf_std.py
@@ -90,7 +90,7 @@ exclude_patterns = ['_build']
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
+modindex_common_prefix = ['pycbc.']
# -- Options for HTML output ---------------------------------------------------
@@ -130,7 +130,7 @@ html_theme_options = {'collapsiblesidebar':True}
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
+html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@@ -150,7 +150,7 @@ html_theme_options = {'collapsiblesidebar':True}
#html_use_index = True
# If true, the index is split into individual pages for each letter.
-#html_split_index = False
+html_split_index = True
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
|
fix module index page to not include pycbc. prefix
|
diff --git a/normandy/settings.py b/normandy/settings.py
index <HASH>..<HASH> 100644
--- a/normandy/settings.py
+++ b/normandy/settings.py
@@ -399,7 +399,7 @@ class Development(Base):
class Production(Base):
"""Settings for the production environment."""
- USE_X_FORWARDED_HOST = values.BooleanValue(True)
+ USE_X_FORWARDED_HOST = values.BooleanValue(False)
SECURE_PROXY_SSL_HEADER = values.TupleValue(("HTTP_X_FORWARDED_PROTO", "https"))
LOGGING_USE_JSON = values.Value(True)
SECURE_HSTS_SECONDS = values.IntegerValue(31536000) # 1 year
|
Do not use X-Forwarded-Host
We started stripping this header at Nginx due to <URL>
|
diff --git a/Controller/PageAdminController.php b/Controller/PageAdminController.php
index <HASH>..<HASH> 100644
--- a/Controller/PageAdminController.php
+++ b/Controller/PageAdminController.php
@@ -580,8 +580,9 @@ class PageAdminController extends CRUDController
* @throws \Symfony\Component\Security\Core\Exception\AccessDeniedException
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
- public function editAction(Request $request, $id = null)
+ public function editAction($id = null)
{
+ $request = $this->getRequest();
// the key used to lookup the template
$templateKey = 'edit';
|
make sure the edit action is compatible with the parent class
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -20,4 +20,14 @@ setup(name='arguments',
license='GPL',
packages=['arguments'],
zip_safe=True,
- install_requires=['docopt', 'schema', 'consoleprinter'])
+ install_requires=['docopt', 'schema', 'consoleprinter'],
+ classifiers=[
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Development Status :: Beta",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
+ "Operating System :: POSIX",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ "Topic :: System",
+ ])
|
pip
Friday <I> March <I> (week:9 day:<I>), <I>:<I>:<I>
|
diff --git a/config/local.js b/config/local.js
index <HASH>..<HASH> 100644
--- a/config/local.js
+++ b/config/local.js
@@ -7,8 +7,8 @@ module.exports = {
* Current Node Information
*/
port: 3010,
- routes: require("./endpoints/routes.js"),
- events: require("./endpoints/events.js"),
+ routes: __dirname + "/endpoints/routes.js",
+ events: __dirname + "/endpoints/events.js",
/**
diff --git a/connections/server.js b/connections/server.js
index <HASH>..<HASH> 100644
--- a/connections/server.js
+++ b/connections/server.js
@@ -99,8 +99,8 @@ class Server {
* Apply Routes/Events after Middleware for correct order
*/
applyRoutes() {
- blitz.config.api.routes(this.http)
- blitz.config.api.events(this.sockets, this.http)
+ require(blitz.config.api.routes)(this.http)
+ require(blitz.config.api.events)(this.sockets, this.http)
}
|
require routes on setup rather than on config
|
diff --git a/lib/cistern/attributes.rb b/lib/cistern/attributes.rb
index <HASH>..<HASH> 100644
--- a/lib/cistern/attributes.rb
+++ b/lib/cistern/attributes.rb
@@ -135,9 +135,9 @@ module Cistern::Attributes
transform = Cistern::Attributes.transforms[options[:squash] ? :squash : :none] ||
Cistern::Attributes.default_transform
- parser = Cistern::Attributes.parsers[options[:type]] ||
- options[:parser] ||
- Cistern::Attributes.default_parser
+ parser = options[:parser] ||
+ Cistern::Attributes.parsers[options[:type]] ||
+ Cistern::Attributes.default_parser
transformed = transform.call(name, value, options)
|
fix(attributes): always use explicit :parser
|
diff --git a/plans/models.py b/plans/models.py
index <HASH>..<HASH> 100644
--- a/plans/models.py
+++ b/plans/models.py
@@ -260,8 +260,6 @@ class UserPlan(models.Model):
def get_plan_extended_until(self, plan, pricing):
if plan.is_free():
return None
- if not self.plan.is_free() and self.expire is None:
- return None
if pricing is None:
return self.expire
return self.get_plan_extended_from(plan) + timedelta(days=pricing.period)
|
fix get_plan_extended_until() if UserPlan does not set expiry date - use today from get_plan_extended_from()
|
diff --git a/lxd/db/cluster/stmt.go b/lxd/db/cluster/stmt.go
index <HASH>..<HASH> 100644
--- a/lxd/db/cluster/stmt.go
+++ b/lxd/db/cluster/stmt.go
@@ -42,11 +42,21 @@ var stmts = map[int]string{} // Statement code to statement SQL text.
var PreparedStmts = map[int]*sql.Stmt{}
// Stmt prepares the in-memory prepared statement for the transaction.
-func Stmt(tx *sql.Tx, code int) *sql.Stmt {
+func Stmt(tx *sql.Tx, code int) (*sql.Stmt, error) {
stmt, ok := PreparedStmts[code]
if !ok {
- panic(fmt.Sprintf("No prepared statement registered with code %d", code))
+ return nil, fmt.Errorf("No prepared statement registered with code %d", code)
}
- return tx.Stmt(stmt)
+ return tx.Stmt(stmt), nil
+}
+
+// StmtString returns the in-memory query string with the given code.
+func StmtString(code int) (string, error) {
+ stmt, ok := stmts[code]
+ if !ok {
+ return "", fmt.Errorf("No prepared statement registered with code %d", code)
+ }
+
+ return stmt, nil
}
|
lxd/db/cluster/stmt: Add StmtString and remove panics
|
diff --git a/src/stylable.js b/src/stylable.js
index <HASH>..<HASH> 100644
--- a/src/stylable.js
+++ b/src/stylable.js
@@ -5,7 +5,18 @@ import hoistStatics from 'hoist-non-react-statics'
import Node from './node'
function getDisplayName (comp) {
- return comp.displayName || comp.name || 'Component'
+ if (typeof comp.getName === 'function') {
+ return comp.getName()
+ }
+ if (typeof comp.tag === 'number') {
+ if (typeof comp.type === 'string') {
+ return comp.type
+ }
+ if (typeof comp.type === 'function') {
+ return comp.displayName || comp.name
+ }
+ }
+ return 'Component'
}
export default function stylable (name) {
|
fix: make getDisplayName to be almost equal to react getElementName
|
diff --git a/src/types.js b/src/types.js
index <HASH>..<HASH> 100644
--- a/src/types.js
+++ b/src/types.js
@@ -19,10 +19,23 @@ export type InnerRef = ElementRef<typeof HTMLElement>;
export type PropsWithInnerRef = {
innerRef: InnerRef,
};
+
export type PropsWithStyles = {
getStyles: (string, any) => {},
};
+export type CommonProps = {
+ clearValue: () => void,
+ getStyles: (string, any) => {},
+ getValue: () => ValueType,
+ hasValue: boolean,
+ isMulti: boolean,
+ options: OptionsType,
+ selectOption: OptionType => void,
+ selectProps: any,
+ setValue: (ValueType, ActionTypes) => void,
+};
+
export type ActionTypes =
| 'select-option'
| 'deselect-option'
|
Adding CommonProps type (needs work to be applied everywhere)
|
diff --git a/actionpack/lib/action_view/render/layouts.rb b/actionpack/lib/action_view/render/layouts.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_view/render/layouts.rb
+++ b/actionpack/lib/action_view/render/layouts.rb
@@ -65,7 +65,7 @@ module ActionView
if formats.size == 1
_find_layout(layout)
else
- update_details(:formats => self.formats.first){ _find_layout(layout) }
+ update_details(:formats => [self.formats.first]) { _find_layout(layout) }
end
rescue ActionView::MissingTemplate => e
update_details(:formats => nil) do
|
Formats should always be an array.
|
diff --git a/src/TooltipFactory.js b/src/TooltipFactory.js
index <HASH>..<HASH> 100644
--- a/src/TooltipFactory.js
+++ b/src/TooltipFactory.js
@@ -341,7 +341,7 @@ var addMutation = function(tooltip) {
};
var addXRefs = function(tooltip, xrefs) {
- if (xrefs) {
+ if (xrefs && (xrefs.length !== 0)) {
var sourceRow = tooltip.table.append('tr')
.attr('class', 'up_pftv_evidence-source');
|
Check xrefs length.
|
diff --git a/sos/plugins/libreswan.py b/sos/plugins/libreswan.py
index <HASH>..<HASH> 100644
--- a/sos/plugins/libreswan.py
+++ b/sos/plugins/libreswan.py
@@ -49,7 +49,7 @@ class Libreswan(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
self.add_forbidden_path([
'/etc/ipsec.secrets',
- '/etc/ipsec.secrets.d/*',
+ '/etc/ipsec.secrets.d',
'/etc/ipsec.d/*.db',
'/etc/ipsec.d/*.secrets'
])
|
[libreswan] fix directory blacklist style
Plugins must use 'path/to/exclude' rather than 'path/to/exclude/*'
in order to omit a directory and all its content from the report.
|
diff --git a/tests/test_arg_parsing.py b/tests/test_arg_parsing.py
index <HASH>..<HASH> 100644
--- a/tests/test_arg_parsing.py
+++ b/tests/test_arg_parsing.py
@@ -18,7 +18,7 @@ from cookiecutter import main
def test_parse_cookiecutter_args():
args = main.parse_cookiecutter_args(['project/'])
assert args.input_dir == 'project/'
- assert args.checkout == None
+ assert args.checkout is None
def test_parse_cookiecutter_args_with_branch():
|
Change comparision to 'is' in order to fix flake8
|
diff --git a/lib/sup/mode.rb b/lib/sup/mode.rb
index <HASH>..<HASH> 100644
--- a/lib/sup/mode.rb
+++ b/lib/sup/mode.rb
@@ -83,6 +83,7 @@ EOS
### helper functions
def save_to_file fn, talk=true
+ FileUtils.mkdir_p File.dirname(fn)
if File.exist? fn
unless BufferManager.ask_yes_or_no "File \"#{fn}\" exists. Overwrite?"
info "Not overwriting #{fn}"
|
Create directory for saving files if it doesn't exist yet
|
diff --git a/lib/toml-rb/dumper.rb b/lib/toml-rb/dumper.rb
index <HASH>..<HASH> 100644
--- a/lib/toml-rb/dumper.rb
+++ b/lib/toml-rb/dumper.rb
@@ -93,12 +93,12 @@ module TomlRB
obj.strftime("%Y-%m-%dT%H:%M:%SZ")
elsif obj.is_a?(Date)
obj.strftime("%Y-%m-%d")
- elsif obj.is_a? Regexp
+ elsif obj.is_a?(Regexp)
obj.inspect.inspect
- elsif obj.is_a? String
+ elsif obj.is_a?(String)
obj.inspect.gsub(/\\(#[$@{])/, '\1')
- elsif obj.is_a? Array
- '[' + obj.map(&method(:to_toml)).join(', ') + ']'
+ elsif obj.is_a?(Array)
+ "[" + obj.map(&method(:to_toml)).join(", ") + "]"
else
obj.inspect
end
|
Fix linter and sytle-inconsistency.
|
diff --git a/src/Engine/SocketIO.php b/src/Engine/SocketIO.php
index <HASH>..<HASH> 100644
--- a/src/Engine/SocketIO.php
+++ b/src/Engine/SocketIO.php
@@ -81,10 +81,9 @@ abstract class SocketIO implements EngineInterface
*/
protected function getServerInformation()
{
- $server = array_replace($this->url, ['scheme' => 'http',
- 'host' => 'localhost',
- 'path' => 'socket.io',
- 'transport' => static::TRANSPORT_POLLING]);
+ $server = array_replace($this->url, ['scheme' => 'http',
+ 'host' => 'localhost',
+ 'path' => 'socket.io']);
if (!isset($server['port'])) {
$server['port'] = 'https' === $server['scheme'] ? 443 : 80;
@@ -94,6 +93,8 @@ abstract class SocketIO implements EngineInterface
$server['scheme'] = 'ssl';
}
+ $server['transport'] = $this->transport ?: static::TRANSPORT_POLLING;
+
return $server;
}
|
The transport should not be in the url configuration
|
diff --git a/Kwc/Form/Component.php b/Kwc/Form/Component.php
index <HASH>..<HASH> 100644
--- a/Kwc/Form/Component.php
+++ b/Kwc/Form/Component.php
@@ -134,7 +134,6 @@ class Kwc_Form_Component extends Kwc_Abstract_Composite_Component
if (!$this->_errors) {
try {
$this->_form->prepareSave(null, $postData);
- $this->_beforeSave($this->_form->getRow());
$isInsert = false;
if (!$this->_form->getRow()->{$this->_form->getModel()->getPrimaryKey()}) {
$isInsert = true;
@@ -142,14 +141,15 @@ class Kwc_Form_Component extends Kwc_Abstract_Composite_Component
} else {
$this->_beforeUpdate($this->_form->getRow());
}
+ $this->_beforeSave($this->_form->getRow());
$this->_form->save(null, $postData);
- $this->_form->afterSave(null, $postData);
- $this->_afterSave($this->_form->getRow());
if ($isInsert) {
$this->_afterInsert($this->_form->getRow());
} else {
$this->_afterUpdate($this->_form->getRow());
}
+ $this->_form->afterSave(null, $postData);
+ $this->_afterSave($this->_form->getRow());
$this->_isSaved = true;
} catch (Exception $e) {
$this->_handleProcessException($e);
|
fixed order of before-/after- save calls in form component
correct is beforeInsert/beforeUpdate - beforeSave - save - afterInsert/afterUpdate - afterSave
|
diff --git a/lib/cli/finder.js b/lib/cli/finder.js
index <HASH>..<HASH> 100644
--- a/lib/cli/finder.js
+++ b/lib/cli/finder.js
@@ -135,7 +135,15 @@ function find(globs, callback) {
}
return globs.some(function (glob) {
- return match(filePath, glob) && stat(filePath).isFile();
+ if (!stat(filePath).isFile()) {
+ return false;
+ }
+
+ if (hasMagic(glob)) {
+ return match(filePath, glob);
+ }
+
+ return given.indexOf(filePath) !== -1;
});
}, filePaths, function (err, files) {
callback(err, failed.concat(files).map(function (file) {
|
Fix non-magic globs from matching all files
For a while, remark(1) included all files nested in directories
if that directory was given on the CLI. For example, if `content`
was given, `content/foo.jpg` was included by mistake. Now, if a glob
does not contain magic (as in, it is a file-path) and represents a
directory, only files with known markdown extensions in it are
included.
Related to <URL>
|
diff --git a/openquake/engine/utils/tasks.py b/openquake/engine/utils/tasks.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/utils/tasks.py
+++ b/openquake/engine/utils/tasks.py
@@ -157,9 +157,9 @@ def oqtask(task_func):
# the revoke functionality can work
EnginePerformanceMonitor.store_task_id(job_id, tsk)
- with (EnginePerformanceMonitor(
- 'total ' + task_func.__name__, job_id, tsk, flush=True),
- logs.handle(job)):
+ with EnginePerformanceMonitor(
+ 'total ' + task_func.__name__, job_id, tsk, flush=True), \
+ logs.handle(job):
try:
# log a warning if too much memory is used
check_mem_usage(SOFT_MEM_LIMIT, HARD_MEM_LIMIT)
|
Removed parens breaking a with statement
Former-commit-id: d<I>f5c<I>e6f<I>fafc<I>efb<I>cf4ded3f
|
diff --git a/src/nwmatcher.js b/src/nwmatcher.js
index <HASH>..<HASH> 100644
--- a/src/nwmatcher.js
+++ b/src/nwmatcher.js
@@ -69,9 +69,13 @@ NW.Dom = (function(global) {
reIdSelector = /\#([-\w]+)$/,
reWhiteSpace = /[\x20\t\n\r\f]+/g,
+ // match missing R/L context
reLeftContext = /^\s*[>+~]+/,
reRightContext = /[>+~]+\s*$/,
+ // match the document type
+ reDocumentType = / [XHTML]+ /,
+
/*----------------------------- UTILITY METHODS ----------------------------*/
slice = Array.prototype.slice,
|
added regular expression to aid in guessing document type, added missing comment
|
diff --git a/dynamic_rest/viewsets.py b/dynamic_rest/viewsets.py
index <HASH>..<HASH> 100644
--- a/dynamic_rest/viewsets.py
+++ b/dynamic_rest/viewsets.py
@@ -519,12 +519,9 @@ class DynamicModelViewSet(WithDynamicViewSetMixin, viewsets.ModelViewSet):
bulk_payload = self._get_bulk_payload(request)
if bulk_payload:
return self._destroy_many(bulk_payload)
- try:
- # check if the request is formatted in such a way that
- # we can get the object
- self.get_object()
- except:
- # if not, assume that it is a poorly formatted bulk request
+ lookup_url_kwarg = self.lookup_url_kwarg or self.lookup_field
+ if lookup_url_kwarg not in kwargs:
+ # assume that it is a poorly formatted bulk request
return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED)
return super(DynamicModelViewSet, self).destroy(
request, *args, **kwargs)
|
Only return <I> on AssertionError (unable to retrieve pk)
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ instructions.
setup(
name="django-prometheus",
- version="0.0.8",
+ version="0.0.9",
author="Uriel Corfa",
author_email="uriel@corfa.fr",
description=(
|
Release <I>
Breaking change: the in-thread exporter is now disabled by default,
and exporting /metrics as a django view is now the "common" way of
doing things.
|
diff --git a/client/consul/sync.go b/client/consul/sync.go
index <HASH>..<HASH> 100644
--- a/client/consul/sync.go
+++ b/client/consul/sync.go
@@ -268,8 +268,8 @@ func (c *ConsulService) deregisterCheck(ID string) error {
return c.client.Agent().CheckDeregister(ID)
}
-// SyncWithConsul triggers periodic syncing of services and checks with Consul
-func (c *ConsulService) SyncWithConsul() {
+// PeriodicSync triggers periodic syncing of services and checks with Consul
+func (c *ConsulService) PeriodicSync() {
sync := time.After(syncInterval)
for {
select {
diff --git a/client/driver/executor/executor.go b/client/driver/executor/executor.go
index <HASH>..<HASH> 100644
--- a/client/driver/executor/executor.go
+++ b/client/driver/executor/executor.go
@@ -359,7 +359,7 @@ func (e *UniversalExecutor) RegisterServices() error {
e.consulService = cs
}
err := e.consulService.SyncTask(e.ctx.Task)
- go e.consulService.SyncWithConsul()
+ go e.consulService.PeriodicSync()
return err
}
|
Renaming the SyncWithConsul method
|
diff --git a/javascript/hasoneautocompletefield.js b/javascript/hasoneautocompletefield.js
index <HASH>..<HASH> 100644
--- a/javascript/hasoneautocompletefield.js
+++ b/javascript/hasoneautocompletefield.js
@@ -105,15 +105,15 @@
getCurrentTextElement: function() {
- return this.closest('.field').find('.hasoneautocomplete-currenttext').first();
+ return this.closest('.hasoneautocomplete').find('.hasoneautocomplete-currenttext').first();
},
getIDElement: function() {
- return this.closest('.field').find('.hasoneautocomplete-id').first();
+ return this.closest('.hasoneautocomplete').find('.hasoneautocomplete-id').first();
},
getFieldElement: function() {
- return this.closest('.field');
+ return this.closest('.hasoneautocomplete');
}
});
|
Update JS to account for FieldGroup markup changing between SS versions
|
diff --git a/lib/cancan/controller_additions.rb b/lib/cancan/controller_additions.rb
index <HASH>..<HASH> 100644
--- a/lib/cancan/controller_additions.rb
+++ b/lib/cancan/controller_additions.rb
@@ -151,6 +151,9 @@ module CanCan
# [:+except+]
# Does not apply before filter to given actions.
#
+ # [:+singleton+]
+ # Pass +true+ if this is a singleton resource through a +has_one+ association.
+ #
# [:+parent+]
# True or false depending on if the resource is considered a parent resource. This defaults to +true+ if a resource
# name is given which does not match the controller.
|
Just add singleton to description of authorize_resource
|
diff --git a/pytodoist/todoist.py b/pytodoist/todoist.py
index <HASH>..<HASH> 100644
--- a/pytodoist/todoist.py
+++ b/pytodoist/todoist.py
@@ -1119,7 +1119,7 @@ class RequestError(Exception):
HTTP_OK = 200
def _fail_if_contains_errors(response):
- """Raise a TodoistError Exception if a given response
+ """Raise a RequestError Exception if a given response
does not denote a successful request.
"""
if _contains_errors(response):
|
Fixed a docstring inconsistency.
|
diff --git a/src/CRUDlex/CRUDControllerProvider.php b/src/CRUDlex/CRUDControllerProvider.php
index <HASH>..<HASH> 100644
--- a/src/CRUDlex/CRUDControllerProvider.php
+++ b/src/CRUDlex/CRUDControllerProvider.php
@@ -205,7 +205,7 @@ class CRUDControllerProvider implements ControllerProviderInterface {
}
$definition = $crudData->getDefinition();
$pageSize = $definition->getPageSize();
- $total = $crudData->countBy($definition->getTable(), array(), array(), false);
+ $total = $crudData->countBy($definition->getTable(), array(), array(), true);
$page = abs(intval($app['request']->get('crudPage', 0)));
$maxPage = intval($total / $pageSize);
if ($total % $pageSize == 0) {
|
don't count soft deleted items in the total amount on the list page
|
diff --git a/lib/ecm/videos/version.rb b/lib/ecm/videos/version.rb
index <HASH>..<HASH> 100644
--- a/lib/ecm/videos/version.rb
+++ b/lib/ecm/videos/version.rb
@@ -1,5 +1,5 @@
module Ecm
module Videos
- VERSION = '2.0.0'.freeze
+ VERSION = '2.1.0'.freeze
end
end
|
Bumped version to <I>
|
diff --git a/src/Jasny/Router.php b/src/Jasny/Router.php
index <HASH>..<HASH> 100644
--- a/src/Jasny/Router.php
+++ b/src/Jasny/Router.php
@@ -326,7 +326,7 @@ class Router
*/
public function getUrl()
{
- if (!isset($this->url)) $this->url = preg_replace('/\?.*$/', '', $_SERVER['REQUEST_URI']);
+ if (!isset($this->url)) $this->url = urldecode(preg_replace('/\?.*$/', '', $_SERVER['REQUEST_URI']));
return $this->url;
}
|
Decode the URL got from $_SERVER['REQUEST_URI']
|
diff --git a/spyder/widgets/variableexplorer/dataframeeditor.py b/spyder/widgets/variableexplorer/dataframeeditor.py
index <HASH>..<HASH> 100644
--- a/spyder/widgets/variableexplorer/dataframeeditor.py
+++ b/spyder/widgets/variableexplorer/dataframeeditor.py
@@ -45,7 +45,7 @@ COMPLEX_NUMBER_TYPES = (complex, np.complex64, np.complex128)
_bool_false = ['false', '0']
# Default format for data frames with floats
-DEFAULT_FORMAT = '%.3g'
+DEFAULT_FORMAT = '%.6g'
# Limit at which dataframe is considered so large that it is loaded on demand
LARGE_SIZE = 5e5
|
Default float format change
Edited default float format, according to previous change in array editor.
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -17,9 +17,6 @@ export default function serve (options = { contentBase: '' }) {
options.https = options.https || false
mime.default_type = 'text/plain'
- let server
- // Fallback to http protocol if https option is false or SSL cert files do not exist
- const PROTOCOL = (options.https && 'https://') || 'http://'
const requestListener = (request, response) => {
// Remove querystring
const urlPath = decodeURI(request.url.split('?')[0])
@@ -65,6 +62,8 @@ export default function serve (options = { contentBase: '' }) {
})
}
+ // If HTTPS options are available, create an HTTPS server
+ let server
if (options.https) {
server = createHttpsServer(options.https, requestListener).listen(options.port)
} else {
@@ -82,7 +81,7 @@ export default function serve (options = { contentBase: '' }) {
running = true
// Log which url to visit
- const url = `${PROTOCOL + options.host}:${options.port}`
+ const url = (options.https ? 'https' : 'http') + '://' + options.host + ':' + options.port
options.contentBase.forEach(base => {
console.log(green(url) + ' -> ' + resolve(base))
})
|
Cleanup
Refactor single-use `PROTOCOL` variable
Move declaration of `server`
|
diff --git a/faq-bundle/contao/dca/tl_faq.php b/faq-bundle/contao/dca/tl_faq.php
index <HASH>..<HASH> 100644
--- a/faq-bundle/contao/dca/tl_faq.php
+++ b/faq-bundle/contao/dca/tl_faq.php
@@ -368,7 +368,7 @@ class tl_faq extends Backend
if (!strlen($varValue))
{
$autoAlias = true;
- $varValue = standardize($this->restoreBasicEntities($dc->activeRecord->question));
+ $varValue = standardize(String::restoreBasicEntities($dc->activeRecord->question));
}
$objAlias = $this->Database->prepare("SELECT id FROM tl_faq WHERE alias=?")
|
[Faq] Moved `Controller::restoreBasicEntities()` to the `String` class (see #<I>)
|
diff --git a/generators/app/templates/api/auth/auth.router.test.js b/generators/app/templates/api/auth/auth.router.test.js
index <HASH>..<HASH> 100644
--- a/generators/app/templates/api/auth/auth.router.test.js
+++ b/generators/app/templates/api/auth/auth.router.test.js
@@ -66,16 +66,6 @@ test.serial('POST /auth 400 (master) - invalid password', async (t) => {
t.true(body.param === 'password')
})
-test.serial('POST /auth 400 (master) - invalid password', async (t) => {
- const { status, body } = await request(app())
- .post('/')
- .query({ access_token: masterKey })
- .auth('a@a.com', '123')
- t.true(status === 400)
- t.true(typeof body === 'object')
- t.true(body.param === 'password')
-})
-
test.serial('POST /auth 401 (master) - user does not exist', async (t) => {
const { status } = await request(app())
.post('/')
|
Remove duplicate test from auth router tests
|
diff --git a/framework/js/onsen.js b/framework/js/onsen.js
index <HASH>..<HASH> 100644
--- a/framework/js/onsen.js
+++ b/framework/js/onsen.js
@@ -549,7 +549,9 @@ limitations under the License.
}
};
- return ons._createPopoverOriginal(page, options);
+ return ons._createPopoverOriginal(page, options).then(function(popover) {
+ return angular.element(popover).data('ons-popover');
+ });
},
/**
|
fix(ons-popover): Changed ons.createPopover() to resolve component view object instead of ons-popover element on angular bindings.
|
diff --git a/shakedown/cli/helpers.py b/shakedown/cli/helpers.py
index <HASH>..<HASH> 100644
--- a/shakedown/cli/helpers.py
+++ b/shakedown/cli/helpers.py
@@ -67,6 +67,7 @@ def fchr(char):
return {
'PP': chr(10003),
'FF': chr(10005),
+ 'SK': chr(10073),
'>>': chr(12299)
}.get(char, '')
diff --git a/shakedown/cli/main.py b/shakedown/cli/main.py
index <HASH>..<HASH> 100644
--- a/shakedown/cli/main.py
+++ b/shakedown/cli/main.py
@@ -181,6 +181,8 @@ def cli(**args):
schr = fchr('FF')
elif state == 'pass':
schr = fchr('PP')
+ elif state == 'skip':
+ schr = fchr('SK')
else:
schr = ''
|
adding a pause char for skip
|
diff --git a/schema.js b/schema.js
index <HASH>..<HASH> 100644
--- a/schema.js
+++ b/schema.js
@@ -25,7 +25,7 @@ class SchemaItem {
// mapping names to either attributes (to add) or null (to remove
// the attribute by that name).
static updateAttrs(attrs) {
- this.prototype.attrs = overlayObj(this.prototype.attrs, attrs)
+ Object.defineProperty(this.prototype, "attrs", {value: overlayObj(this.prototype.attrs, attrs)})
}
// For node types where all attrs have a default value (or which don't
|
Fix the way updateAttrs overwrites the member property
|
diff --git a/lib/dm-migrations/adapters/dm-sqlserver-adapter.rb b/lib/dm-migrations/adapters/dm-sqlserver-adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-migrations/adapters/dm-sqlserver-adapter.rb
+++ b/lib/dm-migrations/adapters/dm-sqlserver-adapter.rb
@@ -47,7 +47,7 @@ module DataMapper
# TODO: update dkubb/dm-more/dm-migrations to use schema_name and remove this
- alias db_name schema_name
+ alias_method :db_name, :schema_name
# @api private
def create_table_statement(connection, model, properties)
diff --git a/lib/dm-migrations/sql/table_modifier.rb b/lib/dm-migrations/sql/table_modifier.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-migrations/sql/table_modifier.rb
+++ b/lib/dm-migrations/sql/table_modifier.rb
@@ -28,7 +28,7 @@ module SQL
@statements << "ALTER TABLE #{quoted_table_name} DROP COLUMN #{quote_column_name(name)}"
end
end
- alias drop_columns drop_column
+ alias_method :drop_columns, :drop_column
def rename_column(name, new_name, opts = {})
# raise NotImplemented for SQLite3
|
Changed usage of alias to alias_method
|
diff --git a/app.py b/app.py
index <HASH>..<HASH> 100644
--- a/app.py
+++ b/app.py
@@ -181,7 +181,6 @@ def get_random_condcount():
filter(or_(Participant.status == 4,
Participant.status == 5,
Participant.beginhit > starttime)).\
- filter(Participant.cond<4).\
all()
counts = Counter()
for cond in range(numconds):
|
Delete line that prevents previous conditions>3 to be counted before drawing new condition
|
diff --git a/src/Git/CheckedOutRepository.php b/src/Git/CheckedOutRepository.php
index <HASH>..<HASH> 100644
--- a/src/Git/CheckedOutRepository.php
+++ b/src/Git/CheckedOutRepository.php
@@ -17,7 +17,6 @@ final class CheckedOutRepository
public static function fromPath(string $path) : self
{
- Assert::that($path)->directory();
Assert::that($path . '/.git')->directory();
$instance = new self();
$instance->path = $path;
diff --git a/test/unit/Git/CheckedOutRepositoryTest.php b/test/unit/Git/CheckedOutRepositoryTest.php
index <HASH>..<HASH> 100644
--- a/test/unit/Git/CheckedOutRepositoryTest.php
+++ b/test/unit/Git/CheckedOutRepositoryTest.php
@@ -30,6 +30,13 @@ final class CheckedOutRepositoryTest extends TestCase
rmdir($path);
}
+ public function testFromPathRejectsNonGitDirectory() : void
+ {
+ $this->expectException(AssertionFailedException::class);
+
+ CheckedOutRepository::fromPath(__DIR__);
+ }
+
public function testFromPathRejectsNonExistingDirectory() : void
{
$this->expectException(AssertionFailedException::class);
|
Verify that non-git directories are rejected in `CheckedOutRepository`
|
diff --git a/tests/dummy/app/controllers/application.js b/tests/dummy/app/controllers/application.js
index <HASH>..<HASH> 100644
--- a/tests/dummy/app/controllers/application.js
+++ b/tests/dummy/app/controllers/application.js
@@ -6,7 +6,7 @@ export default Ember.Controller.extend({
dynamicCurrent: 5,
actions: {
- pageChanged(direction, page, last) {
+ pageChanged: function (direction, page, last) {
console.log(direction, page, last);
}
}
|
Fix dummy for prod build
|
diff --git a/lib/better_errors/error_page.rb b/lib/better_errors/error_page.rb
index <HASH>..<HASH> 100644
--- a/lib/better_errors/error_page.rb
+++ b/lib/better_errors/error_page.rb
@@ -28,6 +28,11 @@ module BetterErrors
def render(template_name = "main")
binding.eval(self.class.template(template_name).src)
+ rescue => e
+ # Fix the backtrace, which doesn't identify the template that failed (within Better Errors).
+ # We don't know the line number, so just injecting the template path has to be enough.
+ e.backtrace.unshift "#{self.class.template_path(template_name)}:0"
+ raise
end
def do_variables(opts)
|
Improve backtrace when a BE template raises error
This is purely for BE development.
|
diff --git a/djcelery/snapshot.py b/djcelery/snapshot.py
index <HASH>..<HASH> 100644
--- a/djcelery/snapshot.py
+++ b/djcelery/snapshot.py
@@ -33,7 +33,7 @@ debug = logger.debug
def aware_tstamp(secs):
"""Event timestamps uses the local timezone."""
- return maybe_make_aware(datetime.fromtimestamp(secs))
+ return maybe_make_aware(datetime.utcfromtimestamp(secs))
class Camera(Polaroid):
|
Fix snapshot.aware_tstamp by converting from utc timestamp
|
diff --git a/src/views/part/_objectParts.php b/src/views/part/_objectParts.php
index <HASH>..<HASH> 100644
--- a/src/views/part/_objectParts.php
+++ b/src/views/part/_objectParts.php
@@ -78,6 +78,7 @@ echo \hipanel\grid\GridView::widget([
[
'label' => Yii::t('hipanel.finance.price', 'Price'),
'attribute' => 'price',
+ 'visible' => Yii::$app->user->can('part.read'),
'value' => static function ($models) {
return implode(', ', array_map(static function ($parts) {
$part = reset($parts);
|
Due to use the `_objectParts` view from other modules, it was necessary to additionally limit visibility
|
diff --git a/src/transformers/models/big_bird/modeling_big_bird.py b/src/transformers/models/big_bird/modeling_big_bird.py
index <HASH>..<HASH> 100755
--- a/src/transformers/models/big_bird/modeling_big_bird.py
+++ b/src/transformers/models/big_bird/modeling_big_bird.py
@@ -1378,6 +1378,13 @@ class BigBirdAttention(nn.Module):
from_blocked_mask=None,
to_blocked_mask=None,
):
+ # fp16 compatibility
+ if band_mask is not None:
+ band_mask = band_mask.to(hidden_states.dtype)
+ if from_mask is not None:
+ from_mask = from_mask.to(hidden_states.dtype)
+ if to_mask is not None:
+ to_mask = to_mask.to(hidden_states.dtype)
if self.attention_type == "original_full":
self_outputs = self.self(
|
Make BigBird model compatiable to fp<I> dtype. (#<I>)
* Make BigBird model compatiable to fp<I> dtype.
* Use tree_map instead of map
* Reformat the code
* Fix import order
* Convert masks to the correct dtype
* Fix format issue
* Address comments.
|
diff --git a/cmd/influx_inspect/help/help.go b/cmd/influx_inspect/help/help.go
index <HASH>..<HASH> 100644
--- a/cmd/influx_inspect/help/help.go
+++ b/cmd/influx_inspect/help/help.go
@@ -31,6 +31,7 @@ Usage: influx_inspect [[command] [arguments]]
The commands are:
+ dumptsi dumps low-level details about tsi1 files.
dumptsm dumps low-level details about tsm1 files.
export exports raw data from a shard to line protocol
help display this help message
|
Add dumptsi command to help command.
|
diff --git a/bbb.go b/bbb.go
index <HASH>..<HASH> 100644
--- a/bbb.go
+++ b/bbb.go
@@ -238,17 +238,19 @@ func (p *bbbAnalogPin) Close() error {
return nil
}
-// BBBPWMDefaultPolarity represents the default polarity (Positve or 1) for pwm.
-const BBBPWMDefaultPolarity = Positive
+const (
+ // BBBPWMDefaultPolarity represents the default polarity (Positve or 1) for pwm.
+ BBBPWMDefaultPolarity = Positive
-// BBBPWMDefaultDuty represents the default duty (0ns) for pwm.
-const BBBPWMDefaultDuty = 0
+ // BBBPWMDefaultDuty represents the default duty (0ns) for pwm.
+ BBBPWMDefaultDuty = 0
-// BBBPWMDefaultPeriod represents the default period (500000ns) for pwm.
-const BBBPWMDefaultPeriod = 500000
+ // BBBPWMDefaultPeriod represents the default period (500000ns) for pwm.
+ BBBPWMDefaultPeriod = 500000
-// BBBPWMMaxPulseWidth represents the max period (1000000000ns) supported by pwm.
-const BBBPWMMaxPulseWidth = 1000000000
+ // BBBPWMMaxPulseWidth represents the max period (1000000000ns) supported by pwm.
+ BBBPWMMaxPulseWidth = 1000000000
+)
type bbbPWMPin struct {
n string
|
doc: group the bbb constants together
|
diff --git a/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ScreenshotTaker.java b/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ScreenshotTaker.java
index <HASH>..<HASH> 100644
--- a/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ScreenshotTaker.java
+++ b/robotium-solo/src/main/java/com/jayway/android/robotium/solo/ScreenshotTaker.java
@@ -211,10 +211,12 @@ class ScreenshotTaker {
Bitmap orig = view.getDrawingCache();
Bitmap.Config config = null;
- if(orig != null) {
- config = orig.getConfig();
+ if(orig == null) {
+ return null;
}
+ config = orig.getConfig();
+
if(config == null) {
config = Bitmap.Config.ARGB_8888;
}
|
Bugfix for issue-<I>
|
diff --git a/scraper.rb b/scraper.rb
index <HASH>..<HASH> 100644
--- a/scraper.rb
+++ b/scraper.rb
@@ -55,10 +55,20 @@ class Scraper
end
end
+ private
+
+ def self.rules
+ @rules ||= {}
+ end
+
+ def self.inherited(subclass)
+ subclass.rules.update self.rules
+ end
+
# Rule declaration is in Hash or single argument form:
#
- # { '//some/selector' => :name, :with => MyClass }
- # #=> ['//some/selector', :name, MyClass]
+ # { '//some/selector' => :name, :with => delegate }
+ # #=> ['//some/selector', :name, delegate]
#
# :title
# #=> ['title', :title, nil]
@@ -72,14 +82,6 @@ class Scraper
return selector, property, delegate
end
- def self.rules
- @rules ||= {}
- end
-
- def self.inherited(subclass)
- subclass.rules.update self.rules
- end
-
def initialize_plural_accessors
self.class.rules.each do |name, (s, k, plural)|
send("#{name}=", []) if plural
|
declare methods that usually shouldn't be overriden as private
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -22,5 +22,5 @@ setup(
setup_requires=['pytest-runner', 'setuptools_scm'],
# put pytest last to workaround this bug
# https://bitbucket.org/pypa/setuptools/issues/196/tests_require-pytest-pytest-cov-breaks
- tests_require=['mock', 'pytest-timeout', 'moto', 'responses', 'scipy', 'pytest'],
+ tests_require=['mock', 'pytest-timeout', 'moto<=1.1.22', 'responses', 'scipy', 'pytest'],
)
|
Pin moto version
This is to circumvent an upstream issue with a required library (aws-xray-sdk) that is
pinned to a version not available on pypi anymore.
|
diff --git a/core/src/main/java/hudson/model/TopLevelItemDescriptor.java b/core/src/main/java/hudson/model/TopLevelItemDescriptor.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/model/TopLevelItemDescriptor.java
+++ b/core/src/main/java/hudson/model/TopLevelItemDescriptor.java
@@ -40,6 +40,7 @@ import org.kohsuke.stapler.jelly.JellyClassTearOff;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import java.io.StringWriter;
+import java.util.logging.Level;
import java.util.logging.Logger;
/**
@@ -157,7 +158,7 @@ public abstract class TopLevelItemDescriptor extends Descriptor<TopLevelItem> {
dsi.invokeScript(Stapler.getCurrentRequest(), Stapler.getCurrentResponse(), s, this, xml);
return sw.toString();
} catch (Exception e) {
- LOGGER.warning(e.getMessage());
+ LOGGER.log(Level.WARNING, null, e);
return "";
}
} else {
|
[JENKINS-<I>] LOGGER.log() instead of LOGGER.warning()
|
diff --git a/security/Member.php b/security/Member.php
index <HASH>..<HASH> 100644
--- a/security/Member.php
+++ b/security/Member.php
@@ -1073,6 +1073,7 @@ class Member extends DataObject {
*/
public function isInGroup($groupID) {
user_error('Member::isInGroup() is deprecated. Please use inGroup() instead.', E_USER_NOTICE);
+ return $this->inGroup($groupID);
}
}
|
Updated Member::isInGroup() to function as well as being deprecated
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9
|
diff --git a/telethon/events/newmessage.py b/telethon/events/newmessage.py
index <HASH>..<HASH> 100644
--- a/telethon/events/newmessage.py
+++ b/telethon/events/newmessage.py
@@ -137,12 +137,6 @@ class NewMessage(EventBuilder):
else:
return
- # Make messages sent to ourselves outgoing unless they're forwarded.
- # This makes it consistent with official client's appearance.
- ori = event.message
- if ori.peer_id == types.PeerUser(self_id) and not ori.fwd_from:
- event.message.out = True
-
return event
def filter(self, event):
diff --git a/telethon/tl/custom/message.py b/telethon/tl/custom/message.py
index <HASH>..<HASH> 100644
--- a/telethon/tl/custom/message.py
+++ b/telethon/tl/custom/message.py
@@ -269,6 +269,12 @@ class Message(ChatGetter, SenderGetter, TLObject):
known entities.
"""
self._client = client
+
+ # Make messages sent to ourselves outgoing unless they're forwarded.
+ # This makes it consistent with official client's appearance.
+ if self.peer_id == types.PeerUser(client._self_id) and not self.fwd_from:
+ self.out = True
+
cache = client._entity_cache
self._sender, self._input_sender = utils._get_entity_pair(
|
Move message.out patching in self-chat to Message
May fix #<I>.
|
diff --git a/http/query.go b/http/query.go
index <HASH>..<HASH> 100644
--- a/http/query.go
+++ b/http/query.go
@@ -117,7 +117,7 @@ func toSpec(p *ast.Program, now func() time.Time) (*flux.Spec, error) {
return nil, err
}
- if err := itrp.Eval(semProg); err != nil {
+ if err := itrp.Eval(semProg, nil); err != nil {
return nil, err
}
return flux.ToSpec(itrp, itrp.SideEffects()...), nil
|
fix: pass nil importer to Eval
|
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index <HASH>..<HASH> 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -106,7 +106,8 @@ No changes will be made to system configuration.
def check(self):
"""This method checks to see if we are running on RHEL. It returns True
or False."""
- return (os.path.isfile('/etc/redhat-release'))
+ return (os.path.isfile('/etc/redhat-release')
+ and not os.path.isfile('/etc/fedora-release'))
def rhelVersion(self):
try:
@@ -135,7 +136,7 @@ No changes will be made to system configuration.
def getLocalName(self):
return self.rhnUsername() or self.hostName()
-class FedoraPolicy(LinuxPolicy):
+class FedoraPolicy(RedHatPolicy):
distro = "Fedora"
vendor = "the Fedora Project"
|
Fix Fedora policy detection
Make sure that the Fedora policy gets a chance to run by checking
for the absence of /etc/fedora-release in the RHEL policy and
fix the inheritance of FedoraPolicy.
|
diff --git a/templates/releaf/installer.rb b/templates/releaf/installer.rb
index <HASH>..<HASH> 100644
--- a/templates/releaf/installer.rb
+++ b/templates/releaf/installer.rb
@@ -90,6 +90,9 @@ if dummy
mysql_password = ask_wizard("Password for MySQL user #{mysql_username}?", '')
gsub_file "config/database.yml", /password:/, "password: #{mysql_password}"
+
+ mysql_database = ask_wizard("MySQL database name (leave blank to use 'releaf_dummy')?", 'releaf_dummy')
+ gsub_file "config/database.yml", /database: dummy_/, "database: #{mysql_database}_"
end
gsub_file 'config/boot.rb', "'../../Gemfile'", "'../../../../Gemfile'"
else
|
Possibility to define dummy database name
|
diff --git a/resources/lang/fa-IR/forms.php b/resources/lang/fa-IR/forms.php
index <HASH>..<HASH> 100644
--- a/resources/lang/fa-IR/forms.php
+++ b/resources/lang/fa-IR/forms.php
@@ -168,7 +168,7 @@ return [
'analytics' => [
'analytics_google' => 'Google Analytics code',
'analytics_gosquared' => 'GoSquared Analytics code',
- 'analytics_piwik_url' => 'URL of your Piwik instance (without http(s)://)',
+ 'analytics_piwik_url' => 'URL of your Piwik instance',
'analytics_piwik_siteid' => 'Piwik\'s site id',
],
'localization' => [
@@ -229,6 +229,11 @@ return [
'timezone' => 'Select Timezone',
],
+ 'seo' => [
+ 'title' => 'SEO Title',
+ 'description' => 'SEO Description',
+ ],
+
// Buttons
'add' => 'Add',
'save' => 'Save',
|
New translations forms.php (Persian)
|
diff --git a/hyperbahn/service_proxy.js b/hyperbahn/service_proxy.js
index <HASH>..<HASH> 100644
--- a/hyperbahn/service_proxy.js
+++ b/hyperbahn/service_proxy.js
@@ -302,10 +302,12 @@ function removeServicePeer(serviceName, hostPort) {
return;
}
- var peer = svcchan.peers.get(hostPort);
- if (peer) {
- peer.close(noop);
+ var peer = self.channel.peers.get(hostPort);
+ if (!peer) {
+ return;
}
+
+ peer.close(noop);
self.channel.peers.delete(hostPort);
};
|
ServiceDispatchHandler: get peer from root channel in #removeServicePeer
|
diff --git a/source/application/components/widgets/oxwarticlebox.php b/source/application/components/widgets/oxwarticlebox.php
index <HASH>..<HASH> 100644
--- a/source/application/components/widgets/oxwarticlebox.php
+++ b/source/application/components/widgets/oxwarticlebox.php
@@ -95,6 +95,10 @@ class oxwArticleBox extends oxWidget
$oArticle->setLinkType( $iLinkType );
}
+ if ( $oRecommList = $this->getActiveRecommList() ) {
+ $oArticle->text = $oRecommList->getArtDescription( $oArticle->getId() );
+ }
+
return $oArticle;
}
@@ -221,6 +225,7 @@ class oxwArticleBox extends oxWidget
*/
public function getShowMainLink()
{
+ dumpVar($this->getViewParameter('showMainLink'));
return (bool) $this->getViewParameter('showMainLink');
}
|
Load article description in article box widget for recommendation list.
|
diff --git a/bigchaindb/version.py b/bigchaindb/version.py
index <HASH>..<HASH> 100644
--- a/bigchaindb/version.py
+++ b/bigchaindb/version.py
@@ -1,2 +1,2 @@
-__version__ = '1.2.0.dev'
-__short_version__ = '1.2.dev'
+__version__ = '1.3.0.dev'
+__short_version__ = '1.3.dev'
|
Updated to <I>.dev in version.py
|
diff --git a/intranet/apps/eighth/serializers.py b/intranet/apps/eighth/serializers.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/eighth/serializers.py
+++ b/intranet/apps/eighth/serializers.py
@@ -143,7 +143,9 @@ class EighthBlockDetailSerializer(serializers.Serializer):
"administrative": scheduled_activity.get_administrative(),
"presign": activity.presign,
"sticky": scheduled_activity.get_sticky(),
+ "finance": "", # TODO: refactor JS to remove this
"title": scheduled_activity.title,
+ "comments": scheduled_activity.comments, # TODO: refactor JS to remove this
"display_text": "",
# TODO: Remove together with other eighth waitlist functionality
"waitlist_count": 0,
|
fix(eighth): add finance and comments field
|
diff --git a/app/models/outgoing_message_prototype.rb b/app/models/outgoing_message_prototype.rb
index <HASH>..<HASH> 100644
--- a/app/models/outgoing_message_prototype.rb
+++ b/app/models/outgoing_message_prototype.rb
@@ -163,11 +163,15 @@ class OutgoingMessagePrototype
if @html_body.blank? && attachments.empty?
mail.body = @plain_body
else
- mail.text_part = Mail::Part.new
- mail.text_part.body = @plain_body
- mail.html_part = Mail::Part.new
- mail.html_part.content_type = "text/html; charset=UTF-8"
- mail.html_part.body = @html_body
+ if !@plain_body.blank?
+ mail.text_part = Mail::Part.new
+ mail.text_part.body = @plain_body
+ end
+ if !@html_body.blank?
+ mail.html_part = Mail::Part.new
+ mail.html_part.content_type = "text/html; charset=UTF-8"
+ mail.html_part.body = @html_body
+ end
end
attachments.each do |attachment|
mail.attachments[attachment[:name]] = {
|
don't create empty parts in a multi part email (#<I>)
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -9,7 +9,7 @@ class Test::Unit::TestCase
define_method("test_#{name.gsub(/\s+/,'_')}".to_sym, block)
end
- def environment
+ def default_environment
{ "RACK_ENV" => "test",
"JANKY_CONFIG_DIR" => File.dirname(__FILE__),
"JANKY_GITHUB_USER" => "hubot",
@@ -24,6 +24,16 @@ class Test::Unit::TestCase
}
end
+ def environment
+ env = default_environment
+ ENV.each do |key, value|
+ if key =~ /^JANKY_/
+ env[key] = value
+ end
+ end
+ env
+ end
+
def gh_commit(sha1 = "HEAD")
Janky::GitHub::Commit.new(
sha1,
|
allow overriding settings in test environment
|
diff --git a/lib/array.js b/lib/array.js
index <HASH>..<HASH> 100644
--- a/lib/array.js
+++ b/lib/array.js
@@ -12,6 +12,13 @@ module.exports.max = function(array)
return Math.max.apply(Math, array);
};
+//Get the min value in an array
+module.exports.min = function(obj)
+{
+ //Return the min value
+ return Math.min.apply(Math, obj);
+};
+
//Return a range of values
module.exports.range = function(start, end, step)
{
|
lib/array.js: added array.min method to get the minimum value in an array
|
diff --git a/client.go b/client.go
index <HASH>..<HASH> 100644
--- a/client.go
+++ b/client.go
@@ -110,8 +110,9 @@ func NewDockerClientTimeout(daemonUrl string, tlsConfig *tls.Config, timeout tim
u.Scheme = "https"
}
}
+ copiedUrl, _ := url.Parse(u.String())
httpClient := newHttpClient(u, tlsConfig, timeout, rwTimeout)
- longpollClient := newHttpClient(u, tlsConfig, timeout, 0)
+ longpollClient := newHttpClient(copiedUrl, tlsConfig, timeout, 0)
clientApiVersion := kDefaultApiVersion
if len(apiVersion) > 0 && apiVersion[0] != "" {
clientApiVersion = apiVersion[0]
|
fix for newHttpClient is not idempotency
|
diff --git a/src/resolvers/ClassNameResolver.php b/src/resolvers/ClassNameResolver.php
index <HASH>..<HASH> 100644
--- a/src/resolvers/ClassNameResolver.php
+++ b/src/resolvers/ClassNameResolver.php
@@ -28,7 +28,7 @@ class ClassNameResolver implements DependencyResolverInterface
throw new NotInstantiableException($class);
}
$constructor = $reflectionClass->getConstructor();
- return isset($constructor) ? $this->resolveFunction($constructor) : [];
+ return $constructor === null ? [] : $this->resolveFunction($constructor);
}
private function resolveFunction(\ReflectionFunctionAbstract $reflectionFunction): array
|
Update src/resolvers/ClassNameResolver.php
|
diff --git a/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java b/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java
index <HASH>..<HASH> 100755
--- a/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java
+++ b/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java
@@ -10,6 +10,7 @@ import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.SparseArray;
import android.view.LayoutInflater;
@@ -647,6 +648,14 @@ public abstract class Controller {
return false;
}
+ /**
+ * Returns a bundle for the view's state, which would have been created in {@link #onSaveViewState(View, Bundle)}.
+ */
+ @Nullable
+ public Bundle getViewStateBundle() {
+ return viewState;
+ }
+
final void setNeedsAttach() {
needsAttach = true;
}
|
Added a view state getter, which is needed if view state must be obtained at the time of view creation (ex: for Google Maps)
|
diff --git a/src/keymaps/index.js b/src/keymaps/index.js
index <HASH>..<HASH> 100644
--- a/src/keymaps/index.js
+++ b/src/keymaps/index.js
@@ -152,7 +152,7 @@ export default () => {
if (ableTorun || opts.force) {
opts.prevent && canvas.getCanvasView().preventDefault(e);
typeof handler == 'object'
- ? handler.run(editor, 0, opt)
+ ? cmd.runCommand(handler, opt)
: handler(editor, 0, opt);
const args = [id, h.shortcut, e];
em.trigger('keymap:emit', ...args);
|
Execute shortcut commands from the Commands manager. Closes #<I>
|
diff --git a/cluster_state_test.go b/cluster_state_test.go
index <HASH>..<HASH> 100644
--- a/cluster_state_test.go
+++ b/cluster_state_test.go
@@ -91,3 +91,15 @@ func TestClusterStateURLs(t *testing.T) {
}
}
}
+
+func TestClusterStateGet(t *testing.T) {
+ client := setupTestClientAndCreateIndex(t) // , SetTraceLog(log.New(os.Stdout, "", 0)))
+
+ state, err := client.ClusterState().Pretty(true).Do(context.TODO())
+ if err != nil {
+ t.Fatal(err)
+ }
+ if want, have := "elasticsearch", state.ClusterName; want != have {
+ t.Fatalf("ClusterName: want %q, have %q", want, have)
+ }
+}
|
Add test for Cluster State API
Trying to find issue mentioned in #<I>.
|
diff --git a/lib/economic/entity.rb b/lib/economic/entity.rb
index <HASH>..<HASH> 100644
--- a/lib/economic/entity.rb
+++ b/lib/economic/entity.rb
@@ -207,10 +207,6 @@ module Economic
)
end
- def soap_action_name(action)
- Endpoint.new.soap_action_name(self.class, action)
- end
-
def class_name
self.class.to_s.split("::").last
end
|
Remove unused soap_action_name method
This should probably have been removed as part of commit eb<I>e<I>e<I>d8dbcbafeaf<I>e<I>f<I>a1.
|
diff --git a/molgenis-data-annotators/src/main/java/org/molgenis/data/annotation/core/resources/impl/tabix/TabixReader.java b/molgenis-data-annotators/src/main/java/org/molgenis/data/annotation/core/resources/impl/tabix/TabixReader.java
index <HASH>..<HASH> 100644
--- a/molgenis-data-annotators/src/main/java/org/molgenis/data/annotation/core/resources/impl/tabix/TabixReader.java
+++ b/molgenis-data-annotators/src/main/java/org/molgenis/data/annotation/core/resources/impl/tabix/TabixReader.java
@@ -41,8 +41,8 @@ import static java.nio.charset.StandardCharsets.UTF_8;
public class TabixReader
{
- public String filename;
- public BlockCompressedInputStream blockCompressedInputStream;
+ private String filename;
+ private BlockCompressedInputStream blockCompressedInputStream;
private int mPreset;
private int mSc;
@@ -53,7 +53,7 @@ public class TabixReader
private String[] mSeq;
private TIndex[] mIndex;
- public HashMap<String, Integer> mChr2tid;
+ private HashMap<String, Integer> mChr2tid;
private static int MAX_BIN = 37450;
private static int TAD_MIN_CHUNK_GAP = 32768;
|
Fix three "Class variable fields should not have public accessibility" vulnerabilities reported by Sonar
|
diff --git a/project/library/CM/Session.php b/project/library/CM/Session.php
index <HASH>..<HASH> 100644
--- a/project/library/CM/Session.php
+++ b/project/library/CM/Session.php
@@ -233,7 +233,7 @@ class CM_Session {
}
}
- public static function gc() {
+ public static function deleteExpired() {
CM_Mysql::exec("DELETE FROM TBL_CM_SESSION WHERE `expires` < ?", time());
}
|
t<I>: Rename Session::gc() to deleteExpired()
|
diff --git a/Eloquent/Model.php b/Eloquent/Model.php
index <HASH>..<HASH> 100755
--- a/Eloquent/Model.php
+++ b/Eloquent/Model.php
@@ -1125,9 +1125,11 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa
*/
protected function updateTimestamps()
{
+ $time = $this->freshTimestamp();
+
if ( ! $this->isDirty(static::UPDATED_AT))
{
- $this->setUpdatedAt($time = $this->freshTimestamp());
+ $this->setUpdatedAt($this->freshTimestamp());
}
if ( ! $this->exists and ! $this->isDirty(static::CREATED_AT))
|
Fix timestamp bug in Eloquent models.
|
diff --git a/src/InfoViz/Native/MutualInformationDiagram/index.js b/src/InfoViz/Native/MutualInformationDiagram/index.js
index <HASH>..<HASH> 100644
--- a/src/InfoViz/Native/MutualInformationDiagram/index.js
+++ b/src/InfoViz/Native/MutualInformationDiagram/index.js
@@ -780,7 +780,7 @@ function informationDiagram(publicAPI, model) {
// mutualInformationData.vmap[d.source.index].autoInfo/mutualInformationData.matrix[d.source.index][d.source.index]);
svg
- .selectAll('g.group path[id^=\'group\']')
+ .selectAll(`g.group path[id^=\'${model.instanceID}-group\']`)
.on('click', (d, i) => {
pmiChordMode.mode = PMI_CHORD_MODE_NONE;
pmiChordMode.srcParam = null;
|
fix(MutualInfoDiagram): Fix a query that missed using instance id to generate element id
|
diff --git a/src/js/pannellum.js b/src/js/pannellum.js
index <HASH>..<HASH> 100644
--- a/src/js/pannellum.js
+++ b/src/js/pannellum.js
@@ -1784,10 +1784,12 @@ function destroyHotSpots() {
if (hs) {
for (var i = 0; i < hs.length; i++) {
var current = hs[i].div;
- while(current.parentNode != renderContainer) {
- current = current.parentNode;
+ if (current) {
+ while(current.parentNode != renderContainer) {
+ current = current.parentNode;
+ }
+ renderContainer.removeChild(current);
}
- renderContainer.removeChild(current);
delete hs[i].div;
}
}
|
Check to make sure hot spot div exists before deleting it (#<I>).
|
diff --git a/functions_defs_crypto_rand.go b/functions_defs_crypto_rand.go
index <HASH>..<HASH> 100644
--- a/functions_defs_crypto_rand.go
+++ b/functions_defs_crypto_rand.go
@@ -10,6 +10,15 @@ import (
)
func loadStandardFunctionsCryptoRand() funcGroup {
+ // TODO:
+ // urlencode/urldecode
+ // rv[`md5`] =
+ // rv[`sha1`] =
+ // rv[`sha256`] =
+ // rv[`sha384`] =
+ // rv[`sha512`] =
+
+
return funcGroup{
Name: `Hashing and Cryptography`,
Description: `These functions provide basic cryptographic and non-cryptographic functions, ` +
|
funcdoc: stubs
|
diff --git a/openquake/engine/tests/calculators/hazard/general_test.py b/openquake/engine/tests/calculators/hazard/general_test.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/tests/calculators/hazard/general_test.py
+++ b/openquake/engine/tests/calculators/hazard/general_test.py
@@ -215,7 +215,7 @@ class CalculationLimitsTestCase(unittest.TestCase):
calc = get_calculator_class('hazard', hc.calculation_mode)(job)
input_weight, output_weight = calc.pre_execute()
self.assertEqual(input_weight, 1352.75)
- self.assertEqual(output_weight, 12.1)
+ self.assertAlmostEqual(output_weight, 12.1)
# NB: 12.1 = 121 sites * 2 IMT * 2 rlzs * 5 SES * 50/10000 years
|
Fixed a test broken by the change in the output_weight
|
diff --git a/test/test-helper/index.js b/test/test-helper/index.js
index <HASH>..<HASH> 100644
--- a/test/test-helper/index.js
+++ b/test/test-helper/index.js
@@ -8,6 +8,8 @@ let { randomBytes } = require("crypto");
let { exec, spawn } = require("./child_process");
+let { COPY_KARMA } = process.env;
+
function generateRandomFilePath () {
return join(
tmpdir(),
@@ -40,7 +42,9 @@ async function createKarmaTest (launcherOptions, testFunction) {
var karmaBinPath = join(npmBinDirectory, "karma");
- return spawn(karmaBinPath, ["start", tmpConfigFile]);
+ return spawn(karmaBinPath, ["start", tmpConfigFile], {
+ stdio: COPY_KARMA === "1" ? "inherit" : "pipe"
+ });
}
function waitToExit (process) {
|
Add support for the COPY_KARMA option
This is actually outputted in error, saying it can be used, but it
couldn't up until now.
|
diff --git a/src/Http/Controllers/Adminarea/AccountPasswordController.php b/src/Http/Controllers/Adminarea/AccountPasswordController.php
index <HASH>..<HASH> 100644
--- a/src/Http/Controllers/Adminarea/AccountPasswordController.php
+++ b/src/Http/Controllers/Adminarea/AccountPasswordController.php
@@ -31,7 +31,7 @@ class AccountPasswordController extends AuthenticatedController
$currentUser = $request->user($this->getGuard());
// Update profile
- $currentUser->fill(['password' => $request->get('new_password')])->save();
+ $currentUser->fill(['password' => $request->get('new_password')])->forceSave();
return intend([
'back' => true,
|
Force save password regardless of any other fields validation errors
- This action only deal with password change anyway.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.