diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/Degree.php b/src/Degree.php
index <HASH>..<HASH> 100644
--- a/src/Degree.php
+++ b/src/Degree.php
@@ -55,7 +55,7 @@ class Degree extends BaseGraph
*/
public function getDegreeMin()
{
- return $this->getDegreeVertex($this->graph->getVertices()->getVertexOrder(Vertices::ORDER_DEGREE));
+ return $this->getDegreeVertex($this->graph->getVertices()->getVertexOrder(array($this, 'getDegreeVertex')));
}
/**
@@ -68,7 +68,7 @@ class Degree extends BaseGraph
*/
public function getDegreeMax()
{
- return $this->getDegreeVertex($this->graph->getVertices()->getVertexOrder(Vertices::ORDER_DEGREE, true));
+ return $this->getDegreeVertex($this->graph->getVertices()->getVertexOrder(array($this, 'getDegreeVertex'), true));
}
/**
|
Simplify getting min/max degree
|
diff --git a/enoslib/service/locust/locust.py b/enoslib/service/locust/locust.py
index <HASH>..<HASH> 100644
--- a/enoslib/service/locust/locust.py
+++ b/enoslib/service/locust/locust.py
@@ -95,7 +95,7 @@ class Locust(Service):
)
with play_on(pattern_hosts="agent", roles=self.roles) as p:
- for i in [density]:
+ for i in range(density):
p.shell(
(
"nohup locust "
|
service/locust: fix density
|
diff --git a/agent/config/config.go b/agent/config/config.go
index <HASH>..<HASH> 100644
--- a/agent/config/config.go
+++ b/agent/config/config.go
@@ -314,8 +314,9 @@ func environmentConfig() Config {
imageCleanupDisabled := utils.ParseBool(os.Getenv("ECS_DISABLE_IMAGE_CLEANUP"), false)
minimumImageDeletionAge := parseEnvVariableDuration("ECS_IMAGE_MINIMUM_CLEANUP_AGE")
imageCleanupInterval := parseEnvVariableDuration("ECS_IMAGE_CLEANUP_INTERVAL")
- numImagesToDeletePerCycle, err := strconv.Atoi(os.Getenv("ECS_NUM_IMAGES_DELETE_PER_CYCLE"))
- if err != nil {
+ numImagesToDeletePerCycleEnvVal := os.Getenv("ECS_NUM_IMAGES_DELETE_PER_CYCLE")
+ numImagesToDeletePerCycle, err := strconv.Atoi(numImagesToDeletePerCycleEnvVal)
+ if numImagesToDeletePerCycleEnvVal != "" && err != nil {
seelog.Warnf("Invalid format for \"ECS_NUM_IMAGES_DELETE_PER_CYCLE\", expected an integer. err %v", err)
}
|
Fix warning message when ECS_NUM_IMAGES_DELETE_PER_CYCLE is not provided
|
diff --git a/test/helpers_test.rb b/test/helpers_test.rb
index <HASH>..<HASH> 100644
--- a/test/helpers_test.rb
+++ b/test/helpers_test.rb
@@ -133,6 +133,33 @@ class HelpersTest < Test::Unit::TestCase
get '/'
assert_equal 'Hello World', body
end
+
+ it 'can be used with other objects' do
+ mock_app do
+ get '/' do
+ body :hello => 'from json'
+ end
+
+ after do
+ if Hash === response.body
+ body response.body[:hello]
+ end
+ end
+ end
+
+ get '/'
+ assert_body 'from json'
+ end
+
+ it 'can be set in after filter' do
+ mock_app do
+ get('/') { body 'route' }
+ after { body 'filter' }
+ end
+
+ get '/'
+ assert_body 'filter'
+ end
end
describe 'redirect' do
|
add tests to show body is already working properly, fixes #<I>
|
diff --git a/app/classes/lowlevelchecks.php b/app/classes/lowlevelchecks.php
index <HASH>..<HASH> 100644
--- a/app/classes/lowlevelchecks.php
+++ b/app/classes/lowlevelchecks.php
@@ -153,7 +153,7 @@ class LowlevelChecks
return; // Okidoki..
}
- if (!@rename($distname, $ymlname)) {
+ if (!@copy($distname, $ymlname)) {
$message = sprintf("Couldn't create a new <code>%s</code>-file. Create the file manually by copying
<code>%s</code>, and optionally make it writable to the user that the webserver is using.",
htmlspecialchars($name . ".yml", ENT_QUOTES),
|
Fixed #<I>
Config files are now *copied* rather than *moved*.
|
diff --git a/Doctrine/adodb-hack/adodb-datadict.inc.php b/Doctrine/adodb-hack/adodb-datadict.inc.php
index <HASH>..<HASH> 100644
--- a/Doctrine/adodb-hack/adodb-datadict.inc.php
+++ b/Doctrine/adodb-hack/adodb-datadict.inc.php
@@ -212,7 +212,7 @@ class ADODB_DataDict {
* @return array of tables for current database.
*/
- function MetaTables()
+ function &MetaTables($ttype=false,$showSchema=false,$mask=false)
{
global $ADODB_FETCH_MODE;
diff --git a/Doctrine/adodb-hack/drivers/datadict-mysql.inc.php b/Doctrine/adodb-hack/drivers/datadict-mysql.inc.php
index <HASH>..<HASH> 100644
--- a/Doctrine/adodb-hack/drivers/datadict-mysql.inc.php
+++ b/Doctrine/adodb-hack/drivers/datadict-mysql.inc.php
@@ -248,7 +248,7 @@ class ADODB2_mysql extends ADODB_DataDict {
*
* @return array of ADOFieldObjects for current table.
*/
- function MetaColumns($table)
+ function MetaColumns($table, $upper = true, $schema = false)
{
$this->_findschema($table,$schema);
if ($schema) {
|
more fixed to make it strict compatable
|
diff --git a/bquery/ctable.py b/bquery/ctable.py
index <HASH>..<HASH> 100644
--- a/bquery/ctable.py
+++ b/bquery/ctable.py
@@ -151,8 +151,6 @@ class ctable(bcolz.ctable):
carray_values.flush()
rm_file_or_dir(col_values_rootdir, ignore_errors=True)
shutil.move(col_values_rootdir_tmp, col_values_rootdir)
- else:
- rm_file_or_dir(col_factor_rootdir_tmp, ignore_errors=True)
def unique(self, col_or_col_list):
"""
|
Remove unneeded tmp dir removal
|
diff --git a/actionpack/lib/action_controller/cgi_ext/cookie.rb b/actionpack/lib/action_controller/cgi_ext/cookie.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_controller/cgi_ext/cookie.rb
+++ b/actionpack/lib/action_controller/cgi_ext/cookie.rb
@@ -78,6 +78,12 @@ class CGI #:nodoc:
buf
end
+ # FIXME: work around broken 1.8.7 DelegateClass#respond_to?
+ def respond_to?(method, include_private = false)
+ return true if super(method)
+ return __getobj__.respond_to?(method, include_private)
+ end
+
# Parses a raw cookie string into a hash of <tt>cookie-name => cookie-object</tt>
# pairs.
#
|
Ruby <I> compat: work around broken DelegateClass#respond_to?
|
diff --git a/astrobase/lcproc.py b/astrobase/lcproc.py
index <HASH>..<HASH> 100644
--- a/astrobase/lcproc.py
+++ b/astrobase/lcproc.py
@@ -629,7 +629,7 @@ def getlclist(listpickle,
ext_cosdecl = np.cos(np.radians(extcat['decl']))
ext_sindecl = np.sin(np.radians(extcat['decl']))
ext_cosra = np.cos(np.radians(extcat['ra']))
- ext_sinra = np.sin(np.radians(extcat['decl']))
+ ext_sinra = np.sin(np.radians(extcat['ra']))
ext_xyz = np.column_stack((ext_cosra*ext_cosdecl,
ext_sinra*ext_cosdecl,
|
lcproc.getlclist fix bugs with xmatchexternal
|
diff --git a/pysd/py_backend/functions.py b/pysd/py_backend/functions.py
index <HASH>..<HASH> 100644
--- a/pysd/py_backend/functions.py
+++ b/pysd/py_backend/functions.py
@@ -1094,15 +1094,6 @@ def log(x, base):
"""
return np.log(x) / np.log(base)
-#TODO document this new functions...
-def and_(x, y):
- #TODO check logical operations between matrix and vectors
- return xr.ufuncs.logical_and(x, y)
-
-
-def or_(x, y):
- return xr.ufuncs.logical_or(x, y)
-
def sum(x, dim=None):
|
Remove not implemented logical functions
remove logical or_ and and_ because they are not implemented in the vensim/vensim2py.py.
|
diff --git a/client/client.go b/client/client.go
index <HASH>..<HASH> 100644
--- a/client/client.go
+++ b/client/client.go
@@ -217,7 +217,7 @@ func NewClient(cfg *config.Config) (*Client, error) {
go c.run()
// Start collecting stats
- go c.monitorHostStats()
+ go c.collectHostStats()
// Start the consul sync
go c.syncConsul()
@@ -1282,15 +1282,16 @@ func (c *Client) syncConsul() {
}
}
-// monitorHostStats collects host resource usage stats periodically
-func (c *Client) monitorHostStats() {
+// collectHostStats collects host resource usage stats periodically
+func (c *Client) collectHostStats() {
next := time.NewTimer(hostStatsCollectorIntv)
for {
select {
case <-next.C:
ru, err := c.hostStatsCollector.Collect()
if err != nil {
- c.logger.Printf("[DEBUG] client: error fetching stats of host: %v", err)
+ c.logger.Printf("[DEBUG] client: error fetching host resource usage stats: %v", err)
+ continue
}
c.resourceUsageLock.RLock()
c.resourceUsage.Enqueue(ru)
|
Renamed monitorUsage method
|
diff --git a/handshake-state.js b/handshake-state.js
index <HASH>..<HASH> 100644
--- a/handshake-state.js
+++ b/handshake-state.js
@@ -295,7 +295,7 @@ function readMessage (state, message, payloadBuffer) {
if (state.messagePatterns.length === 0) {
var tx = sodium.sodium_malloc(cipherState.STATELEN)
var rx = sodium.sodium_malloc(cipherState.STATELEN)
- symmetricState.split(state.symmetricState, tx, rx)
+ symmetricState.split(state.symmetricState, rx, tx)
return {tx, rx}
}
|
Swap (tx, rx) so they are symmetric in readMessage and writeMessage
|
diff --git a/timepiece/views.py b/timepiece/views.py
index <HASH>..<HASH> 100644
--- a/timepiece/views.py
+++ b/timepiece/views.py
@@ -521,6 +521,7 @@ def view_person_time_sheet(request, person_id, period_id=None, window_id=None):
total_statuses = len(statuses)
unverified_count = statuses.count('unverified')
verified_count = statuses.count('verified')
+ approved_count = statuses.count('approved')
if time_sheet.user.pk == request.user.pk:
show_verify = unverified_count != 0
|
Bug fix: Forgot one more line in the last commit
|
diff --git a/mutagen/flac.py b/mutagen/flac.py
index <HASH>..<HASH> 100644
--- a/mutagen/flac.py
+++ b/mutagen/flac.py
@@ -503,6 +503,21 @@ class Picture(MetadataBlock):
* colors -- number of colors for indexed palettes (like GIF),
0 for non-indexed
* data -- picture data
+
+ To create a picture from file (in order to add to a FLAC file),
+ instantiate this object without passing anything to the constructor and
+ then set the properties manually::
+
+ p = Picture()
+
+ with open("Folder.jpg", "rb") as f:
+ pic.data = f.read()
+
+ pic.type = APICType.COVER_FRONT
+ pic.mime = u"image/jpeg"
+ pic.width = 500
+ pic.height = 500
+ pic.depth = 16 # color depth
"""
code = 6
|
docs: add example for how to create a new flac.Picture (Fixes issue #<I>)
|
diff --git a/manticore/ethereum.py b/manticore/ethereum.py
index <HASH>..<HASH> 100644
--- a/manticore/ethereum.py
+++ b/manticore/ethereum.py
@@ -613,7 +613,7 @@ class ABI(object):
'''
Build transaction data from function signature and arguments
'''
- m = re.match(r"(?P<name>[a-zA-Z_]+)(?P<type>\(.*\))", type_spec)
+ m = re.match(r"(?P<name>[a-zA-Z_][a-zA-Z_0-9]*)(?P<type>\(.*\))", type_spec)
if not m:
raise EthereumError("Function signature expected")
|
Allow function identifiers on smart contract to have numbers on them (#<I>)
|
diff --git a/src/SDP/Asset.php b/src/SDP/Asset.php
index <HASH>..<HASH> 100755
--- a/src/SDP/Asset.php
+++ b/src/SDP/Asset.php
@@ -40,6 +40,14 @@ class SDP_Asset extends Pluf_Model
'editable' => false,
'readable' => true
),
+ 'file_name' => array(
+ 'type' => 'Pluf_DB_Field_Varchar',
+ 'blank' => true,
+ 'default' => 'noname',
+ 'size' => 256,
+ 'editable' => true,
+ 'readable' => true
+ ),
'download' => array(
'type' => 'Pluf_DB_Field_Integer',
'blank' => false,
|
A field named file_name is added to SDP_Asset
|
diff --git a/spec/project_spec.rb b/spec/project_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/project_spec.rb
+++ b/spec/project_spec.rb
@@ -191,14 +191,14 @@ RSpec.describe 'RuboCop Project', type: :feature do
describe 'requiring all of `lib` with verbose warnings enabled' do
it 'emits no warnings' do
- whitelisted = lambda do |line|
+ allowed = lambda do |line|
line =~ /warning: private attribute\?$/ && RUBY_VERSION < '2.3'
end
warnings = `ruby -Ilib -w -W2 lib/rubocop.rb 2>&1`
.lines
.grep(%r{/lib/rubocop}) # ignore warnings from dependencies
- .reject(&whitelisted)
+ .reject(&allowed)
expect(warnings.empty?).to be(true)
end
end
|
Follow Rails lead on naming
See rails/rails#<I>.
|
diff --git a/aeron-client/src/main/java/uk/co/real_logic/aeron/Aeron.java b/aeron-client/src/main/java/uk/co/real_logic/aeron/Aeron.java
index <HASH>..<HASH> 100644
--- a/aeron-client/src/main/java/uk/co/real_logic/aeron/Aeron.java
+++ b/aeron-client/src/main/java/uk/co/real_logic/aeron/Aeron.java
@@ -20,8 +20,7 @@ import uk.co.real_logic.aeron.common.CommonContext;
import uk.co.real_logic.aeron.common.concurrent.logbuffer.DataHandler;
import uk.co.real_logic.aeron.exceptions.DriverTimeoutException;
import uk.co.real_logic.agrona.*;
-import uk.co.real_logic.agrona.concurrent.AgentRunner;
-import uk.co.real_logic.agrona.concurrent.IdleStrategy;
+import uk.co.real_logic.agrona.concurrent.*;
import uk.co.real_logic.agrona.concurrent.broadcast.BroadcastReceiver;
import uk.co.real_logic.agrona.concurrent.broadcast.CopyBroadcastReceiver;
import uk.co.real_logic.agrona.concurrent.ringbuffer.ManyToOneRingBuffer;
|
[Java]: Moved package for SleepingIdleStrategy.
|
diff --git a/parsl/launchers/launchers.py b/parsl/launchers/launchers.py
index <HASH>..<HASH> 100644
--- a/parsl/launchers/launchers.py
+++ b/parsl/launchers/launchers.py
@@ -298,7 +298,7 @@ class AprunLauncher(Launcher):
----------
options: str
- This string will be passed to the aprun launcher. Default: None
+ This string will be passed to the aprun launcher. Default: ''
"""
self.overrides = overrides
|
make Aprun default comment consistent with other launchers
|
diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Controller/Controller.php
+++ b/lib/Cake/Controller/Controller.php
@@ -462,8 +462,8 @@ class Controller extends Object implements EventListener {
$this->request = $request;
$this->plugin = isset($request->params['plugin']) ? Inflector::camelize($request->params['plugin']) : null;
$this->view = isset($request->params['action']) ? $request->params['action'] : null;
- if (isset($request->params['pass']) && isset($request->params['named'])) {
- $this->passedArgs = array_merge($request->params['pass'], $request->params['named']);
+ if (isset($request->params['pass'])) {
+ $this->passedArgs = $request->params['pass'];
}
if (array_key_exists('return', $request->params) && $request->params['return'] == 1) {
|
Update passedArgs
named parameters have been removed.
|
diff --git a/LiSE/LiSE/portal.py b/LiSE/LiSE/portal.py
index <HASH>..<HASH> 100644
--- a/LiSE/LiSE/portal.py
+++ b/LiSE/LiSE/portal.py
@@ -165,8 +165,6 @@ class Portal(Edge, RuleFollower, TimeDispatcher):
if not self.engine.caching:
super().__setitem__(key, value)
return
- if key in self.character._portal_traits:
- self.character._portal_traits = set()
super().__setitem__(key, value)
self.dispatch(key, value)
@@ -175,8 +173,6 @@ class Portal(Edge, RuleFollower, TimeDispatcher):
if not self.engine.caching:
super().__delitem__(key)
return
- if key in self.character._portal_traits:
- self.character._portal_traits = set()
self.dispatch(key, None)
def __repr__(self):
|
Delete the remnants of a previous caching scheme
|
diff --git a/lib/sensu/server.rb b/lib/sensu/server.rb
index <HASH>..<HASH> 100644
--- a/lib/sensu/server.rb
+++ b/lib/sensu/server.rb
@@ -299,7 +299,7 @@ module Sensu
else
@logger.error('mutator error', {
:event => event,
- :extension => extension,
+ :extension => extension.name,
:error => 'non-zero exit status (' + status.to_s + '): ' + output
})
@handlers_in_progress_count -= 1
|
log failed extension mutator name instead of empty curly braces
|
diff --git a/lib/filepicker/rails/version.rb b/lib/filepicker/rails/version.rb
index <HASH>..<HASH> 100644
--- a/lib/filepicker/rails/version.rb
+++ b/lib/filepicker/rails/version.rb
@@ -1,5 +1,5 @@
module Filepicker
module Rails
- VERSION = "0.0.2"
+ VERSION = "0.0.3"
end
end
|
Update Version with @edowling suggestions
|
diff --git a/ember-cli-build.js b/ember-cli-build.js
index <HASH>..<HASH> 100644
--- a/ember-cli-build.js
+++ b/ember-cli-build.js
@@ -1,10 +1,12 @@
-/*jshint node:true*/
+/* jshint node:true*/
/* global require, module */
-var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
+let EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
- var app = new EmberAddon(defaults, {
- // Add options here
+ let app = new EmberAddon(defaults, {
+ flatpickr: {
+ theme: 'dark'
+ }
});
/*
|
Try to set theme for dummy app
|
diff --git a/scripts/experiments/run_srl.py b/scripts/experiments/run_srl.py
index <HASH>..<HASH> 100755
--- a/scripts/experiments/run_srl.py
+++ b/scripts/experiments/run_srl.py
@@ -660,6 +660,9 @@ class ParamDefinitions():
base_work_mem_megs = 5*1024
elif exp.get("includeSrl") == False:
base_work_mem_megs = 5 * 1000
+ is_higher_order = exp.get("grandparentFactors") or exp.get("siblingFactors")
+ if exp.get("pruneEdges") == False and is_higher_order:
+ base_work_mem_megs = 20*1000
else:
if exp.get("useProjDepTreeFactor"):
base_work_mem_megs = 20 * 1000
@@ -849,7 +852,6 @@ class SrlExpParamsRunner(ExpParamsRunner):
parser += SrlExpParams(pruneModel=pruneModel)
exp = g.defaults + data + parser
exp += SrlExpParams(work_mem_megs=self.prm_defs.get_srl_work_mem_megs(exp))
- #TODO: Maybe remove? if parser != first_order: exp += SrlExpParams(work_mem_megs=20*1000)
exps.append(exp)
return self._get_pipeline_from_exps(exps)
|
Giving more memory to unpruned 2nd-order models
|
diff --git a/icekit/api/base_serializers.py b/icekit/api/base_serializers.py
index <HASH>..<HASH> 100644
--- a/icekit/api/base_serializers.py
+++ b/icekit/api/base_serializers.py
@@ -113,7 +113,8 @@ class WritableSerializerHelperMixin(object):
for fieldname, field in self.get_fields().items():
if isinstance(field, ModelSubSerializer):
field_data = validated_data.pop(fieldname)
- validated_data.update(field_data)
+ if field_data:
+ validated_data.update(field_data)
def _get_or_create_related_model_instances(self, validated_data):
"""
@@ -183,10 +184,10 @@ class WritableSerializerHelperMixin(object):
u" 'can_update' is not set for this field in"
u" 'writable_related_fields' but submitted"
u" value `%s=%s` does not match existing"
- u" instance %s"
+ u" instance value `%s`"
% (fieldname, ModelClass.__name__,
self.Meta.model.__name__, name, value,
- related_instance)
+ original_value)
)
setattr(related_instance, name, value)
is_updated = True
|
#<I> Fix crash on null value for `ModelSubSerializer` field
If a `ModelSubSerializer` API field is flagged as `allow_null`
it might receive some null/empty data. Don't crash if that
happens.
|
diff --git a/app.js b/app.js
index <HASH>..<HASH> 100644
--- a/app.js
+++ b/app.js
@@ -47,8 +47,7 @@ module.exports = {
opts.COUCH_BUFFER_SIZE,
opts.COUCH_PARALLELISM,
opts.COUCH_LOG,
- opts.COUCH_RESUME,
- opts.OUTPUT
+ opts.COUCH_RESUME
).on('written', function(obj) {
debug(' backed up batch', obj.batch, ' docs: ', obj.total, 'Time', obj.time);
writeStream.write(JSON.stringify(obj.data) + '\n');
diff --git a/includes/backup.js b/includes/backup.js
index <HASH>..<HASH> 100644
--- a/includes/backup.js
+++ b/includes/backup.js
@@ -61,7 +61,7 @@ var processBatches = function(dbUrl, parallelism, log, batches, ee, start, grand
};
// backup function
-module.exports = function(dbUrl, blocksize, parallelism, log, resume, output) {
+module.exports = function(dbUrl, blocksize, parallelism, log, resume) {
if (typeof blocksize === 'string') {
blocksize = parseInt(blocksize);
}
|
Remove unused output parameter to backup method
The `--output` argument is converted into a file in the application
code.
#<I>
|
diff --git a/contrib/git-sync/main.go b/contrib/git-sync/main.go
index <HASH>..<HASH> 100644
--- a/contrib/git-sync/main.go
+++ b/contrib/git-sync/main.go
@@ -66,12 +66,14 @@ func main() {
if _, err := exec.LookPath("git"); err != nil {
log.Fatalf("required git executable not found: %v", err)
}
- if err := syncRepo(*flRepo, *flDest, *flBranch, *flRev); err != nil {
- log.Fatalf("error syncing repo: %v", err)
+ for {
+ if err := syncRepo(*flRepo, *flDest, *flBranch, *flRev); err != nil {
+ log.Fatalf("error syncing repo: %v", err)
+ }
+ log.Printf("wait %d seconds", *flWait)
+ time.Sleep(time.Duration(*flWait) * time.Second)
+ log.Println("done")
}
- log.Printf("wait %d seconds", *flWait)
- time.Sleep(time.Duration(*flWait) * time.Second)
- log.Println("done")
}
// syncRepo syncs the branch of a given repository to the destination at the given rev.
|
let the contrib/git-sync use a for-loop, rather than relying on the pod's restart policy, to periodically pull from the repo
|
diff --git a/lib/rbk/cli.rb b/lib/rbk/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/rbk/cli.rb
+++ b/lib/rbk/cli.rb
@@ -10,7 +10,7 @@ module Rbk
@argv = argv
@options = options
@git = @options[:git] || Git
- @github = @options[:github_repos] || Github::Repos
+ @github_repos = @options[:github_repos] || Github::Repos
end
def setup
@@ -36,7 +36,7 @@ module Rbk
def repos
@repos ||= begin
- r = @github.new(oauth_token: @config.github_access_token)
+ r = @github_repos.new(oauth_token: @config.github_access_token)
r.list(org: @config.organization, auto_pagination: true)
end
end
|
Rename `github` instance variable in Cli
|
diff --git a/lavalink/websocket.py b/lavalink/websocket.py
index <HASH>..<HASH> 100644
--- a/lavalink/websocket.py
+++ b/lavalink/websocket.py
@@ -120,6 +120,9 @@ class WebSocket:
'indicates that the remote server is a webserver '
'and not Lavalink. Check your ports, and try again.'
.format(self._node.name, ce.status))
+ else:
+ self._lavalink._logger.warning('[Node:{}] An unknown error occurred whilst trying to establish '
+ 'a connection to Lavalink'.format(self._node.name), ce)
backoff = min(10 * attempt, 60)
await asyncio.sleep(backoff)
else:
|
Log the connection error if it's not handled
|
diff --git a/samples/people/me.js b/samples/people/me.js
index <HASH>..<HASH> 100644
--- a/samples/people/me.js
+++ b/samples/people/me.js
@@ -16,19 +16,22 @@
const {google} = require('googleapis');
const sampleClient = require('../sampleclient');
-const plus = google.plus({
+const people = google.people({
version: 'v1',
auth: sampleClient.oAuth2Client,
});
async function runSample() {
- const res = await plus.people.get({userId: 'me'});
+ // See documentation of personFields at
+ // https://developers.google.com/people/api/rest/v1/people/get
+ const res = await people.people.get({
+ resourceName: 'people/me',
+ personFields: 'emailAddresses,names,photos',
+ });
console.log(res.data);
}
const scopes = [
- 'https://www.googleapis.com/auth/plus.login',
- 'https://www.googleapis.com/auth/plus.me',
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile',
];
|
Use people API instead of plus API
Use people API instead of plus API
The plus API is being deprecated. This updates the sample code to use the people API instead.
Fixes #<I>.
- [x] Tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
#<I> automerged by dpebot
|
diff --git a/lib/util/prelude.js b/lib/util/prelude.js
index <HASH>..<HASH> 100644
--- a/lib/util/prelude.js
+++ b/lib/util/prelude.js
@@ -49,11 +49,13 @@
// cache jump to the current global require ie. the last bundle
// that was added to the page.
var currentRequire = typeof require == "function" && require;
- if (!jumped && currentRequire && currentRequire.length === 2) {
- return currentRequire(name, true);
- }
- else {
- return currentRequire(name);
+ if (!jumped && currentRequire) {
+ if (currentRequire.length === 2) {
+ return currentRequire(name, true);
+ }
+ else {
+ return currentRequire(name);
+ }
}
// If there are other bundles on this page the require from the
|
Correctly check for require arity AND presence
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,13 @@
#!/usr/bin/env python
-from distutils.core import setup
from os.path import abspath, join, dirname
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup
+
+
setup(
name='ccm',
version='1.1',
|
Use setuptools to run with install_requires
|
diff --git a/src/main/java/com/vmware/vim25/ws/SoapClient.java b/src/main/java/com/vmware/vim25/ws/SoapClient.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/vmware/vim25/ws/SoapClient.java
+++ b/src/main/java/com/vmware/vim25/ws/SoapClient.java
@@ -237,7 +237,9 @@ public abstract class SoapClient implements Client {
*/
public String marshall(String methodName, Argument[] paras) {
String soapMsg = XmlGen.toXML(methodName, paras, vimNameSpace);
- log.trace("Marshalled Payload String xml: " + soapMsg);
+ if (log.isTraceEnabled()) {
+ log.trace("Marshalled Payload String xml: " + soapMsg);
+ }
return soapMsg;
}
|
Performance improvement - don't issue a log.trace with a huge string content concatnation, without first checking if trace is enabled
|
diff --git a/src/Framework/Hal/Strategy/JsonResponseStrategy.php b/src/Framework/Hal/Strategy/JsonResponseStrategy.php
index <HASH>..<HASH> 100644
--- a/src/Framework/Hal/Strategy/JsonResponseStrategy.php
+++ b/src/Framework/Hal/Strategy/JsonResponseStrategy.php
@@ -62,6 +62,9 @@ class JsonResponseStrategy implements StrategyInterface
continue;
}
+ /**
+ * @var $link Link
+ */
$data['_links'][$link->getRel()] = $this->handleLink($link);
}
|
Added type-hint comment to remove warning of 'method not found'
|
diff --git a/tests/test_vapor_pressure.py b/tests/test_vapor_pressure.py
index <HASH>..<HASH> 100644
--- a/tests/test_vapor_pressure.py
+++ b/tests/test_vapor_pressure.py
@@ -134,7 +134,14 @@ def test_VaporPressure():
assert_close(w.T_dependent_property(305.), 4715.122890601165)
w.extrapolation = 'interp1d'
assert_close(w.T_dependent_property(200.), 0.5364148240126076)
-
+
+ Ts_bad = [300, 325, 350]
+ Ps_bad = [1, -1, 1j]
+ with pytest.raises(ValueError):
+ w.add_tabular_data(Ts=Ts_bad, properties=Ps_bad)
+ Ts_rev = list(reversed(Ts))
+ with pytest.raises(ValueError):
+ w.add_tabular_data(Ts=Ts_rev, properties=Ps)
# Get a check for Antoine Extended
cycloheptane = VaporPressure(Tb=391.95, Tc=604.2, Pc=3820000.0, omega=0.2384, CASRN='291-64-5')
|
More test coverage of bad tabular inputs
|
diff --git a/source/Core/VirtualNameSpaceClassMap.php b/source/Core/VirtualNameSpaceClassMap.php
index <HASH>..<HASH> 100644
--- a/source/Core/VirtualNameSpaceClassMap.php
+++ b/source/Core/VirtualNameSpaceClassMap.php
@@ -27,6 +27,9 @@ namespace OxidEsales\EshopCommunity\Core;
* Each edition has its own map file. The map files will be merged like this: CE <- PE <- EE
* So the mapping to a concrete class will be overwritten, if a class exists in a different edition.
*
+ * NOTE: exceptions aren't working at the moment with the virtual namespaces (throwing them is the problem).
+ * Use the OxidEsales\EshopCommunity namespace instead!
+ *
* @inheritdoc
*/
class VirtualNameSpaceClassMap extends \OxidEsales\EshopCommunity\Core\Edition\ClassMap
|
ESDEV-<I> Add notes about the exceptions to the virtual namespace class maps
The throwing of virtual namepsaced exceptions isn't working yet. So we add a note here about the why.
|
diff --git a/lib/app/models/open_object_resource.rb b/lib/app/models/open_object_resource.rb
index <HASH>..<HASH> 100644
--- a/lib/app/models/open_object_resource.rb
+++ b/lib/app/models/open_object_resource.rb
@@ -316,7 +316,7 @@ module Ooor
if self.class.associations_keys.index(skey) || value.is_a?(Array) #FIXME may miss m2o with inherits!
@associations[skey] = value #the association because we want the method to load the association through method missing
else
- @attributes[skey] = value
+ @attributes[skey] = (value == false)? nil : value
end
end
self
|
initialize attributes to nil rather than false to play nice with user interfaces
|
diff --git a/did/plugins/trello.py b/did/plugins/trello.py
index <HASH>..<HASH> 100644
--- a/did/plugins/trello.py
+++ b/did/plugins/trello.py
@@ -49,7 +49,7 @@ from did.utils import log, pretty, listed, split
from did.stats import Stats, StatsGroup
DEFAULT_FILTERS = [
- "createCard", "updateCard",
+ "commentCard", "createCard", "updateCard",
"updateCard:idList", "updateCard:closed",
"updateCheckItemStateOnCard"]
@@ -256,6 +256,7 @@ class TrelloStatsGroup(StatsGroup):
'Boards': {},
'Lists': {},
'Cards': {
+ 'commentCard': TrelloCards,
'updateCard': TrelloCards,
'updateCard:closed': TrelloCardsClosed,
'updateCard:idList': TrelloCardsMoved,
|
Add commentCard to trello DEFAULT_FILTERS
It is not sufficient to customize the trello plugin 'filters' to
make it display the commentCard objects too, because there is no
mapping for such a card action into a python class.
This change updates the DEFAULT_FILTERS list to include commentCard
and adds the matching filter_map item.
|
diff --git a/controller/src/main/java/org/jboss/as/controller/ReadOnlyContext.java b/controller/src/main/java/org/jboss/as/controller/ReadOnlyContext.java
index <HASH>..<HASH> 100644
--- a/controller/src/main/java/org/jboss/as/controller/ReadOnlyContext.java
+++ b/controller/src/main/java/org/jboss/as/controller/ReadOnlyContext.java
@@ -30,6 +30,7 @@ import org.jboss.as.controller.access.AuthorizationResult;
import org.jboss.as.controller.access.ResourceAuthorization;
import org.jboss.as.controller.client.MessageSeverity;
import org.jboss.as.controller.logging.ControllerLogger;
+import org.jboss.as.controller.notification.Notification;
import org.jboss.as.controller.persistence.ConfigurationPersistenceException;
import org.jboss.as.controller.persistence.ConfigurationPersister;
import org.jboss.as.controller.registry.ImmutableManagementResourceRegistration;
@@ -321,6 +322,11 @@ class ReadOnlyContext extends AbstractOperationContext {
return primaryContext.authorizeResource(attributes, isDefaultResource);
}
+ @Override
+ public void emit(Notification notification) {
+ throw readOnlyContext();
+ }
+
Resource getModel() {
return primaryContext.getModel();
}
|
override emit(Notification)
to delegate the notification emission to the primary context
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -179,7 +179,8 @@ function OtrEventHandler( otrChannel ){
case "log_message": emit(o.EVENT,o.message);break;
case "new_fingerprint": emit(o.EVENT,o.fingerprint);break;
case "write_fingerprints":
- otrChannel.user.writeFingerprints();
+ //otrChannel.user.writeFingerprints();
+ emit(o.EVENT);//app will decide to write fringerprints or not.
break;
case "is_logged_in": return 1;break;//assume remote buddy is logged in.
case "policy":
|
fix for start_smp, app decides to write_fingerprints or not..
|
diff --git a/actionview/lib/action_view/renderer/object_renderer.rb b/actionview/lib/action_view/renderer/object_renderer.rb
index <HASH>..<HASH> 100644
--- a/actionview/lib/action_view/renderer/object_renderer.rb
+++ b/actionview/lib/action_view/renderer/object_renderer.rb
@@ -4,8 +4,15 @@ module ActionView
class ObjectRenderer < PartialRenderer # :nodoc:
include ObjectRendering
+ def initialize(lookup_context, options)
+ super
+ @object = nil
+ @local_name = nil
+ end
+
def render_object_with_partial(object, partial, context, block)
- @object = object
+ @object = object
+ @local_name = local_variable(partial)
render(partial, context, block)
end
@@ -16,12 +23,11 @@ module ActionView
private
def template_keys(path)
- super + [local_variable(path)]
+ super + [@local_name]
end
def render_partial_template(view, locals, template, layout, block)
- as = template.variable
- locals[as] = @object
+ locals[@local_name || template.variable] = @object
super(view, locals, template, layout, block)
end
end
|
Fix issue in ActionText
ActionText was using `render` in a way that ActionView didn't have tests
for. This is a fix for it.
|
diff --git a/avrgirl-arduino.js b/avrgirl-arduino.js
index <HASH>..<HASH> 100644
--- a/avrgirl-arduino.js
+++ b/avrgirl-arduino.js
@@ -153,11 +153,36 @@ Avrgirl_arduino.prototype._uploadSTK500v2 = function (eggs, callback) {
Avrgirl_arduino.prototype._resetAVR109 = function (callback) {
var self = this;
var resetFile = __dirname + '/lib/leo-reset.js';
+ var tries = 0;
+ var cb = callback;
childProcess.execFile('node', [resetFile, self.options.port], function() {
- // replace this timeout with a port poll instead.
- setTimeout(callback, 600);
+ tryConnect(function(connected) {
+ var status = connected ? null : new Error('could not complete reset.');
+ cb(status);
+ });
});
+
+ function tryConnect (callback) {
+ function checkList() {
+ Serialport.list(function (error, ports) {
+ // iterate through ports
+ for (var i = 0; i < ports.length; i++) {
+ // iterate through all possible pid's
+ if (ports[i].comName === self.options.port) {
+ return callback(true);
+ }
+ }
+ tries += 1;
+ if (tries < 4) {
+ setTimeout(checkList, 300);
+ } else {
+ return callback(false);
+ }
+ });
+ }
+ setTimeout(checkList, 300);
+ }
};
|
add port polling after reset for board sleep allowance
|
diff --git a/test/functional/associations/test_one_proxy.rb b/test/functional/associations/test_one_proxy.rb
index <HASH>..<HASH> 100644
--- a/test/functional/associations/test_one_proxy.rb
+++ b/test/functional/associations/test_one_proxy.rb
@@ -24,6 +24,18 @@ class OneProxyTest < Test::Unit::TestCase
post.author.object_id.should == post.author.target.object_id
end
+
+ should "allow assignment of associated document using a hash" do
+ @post_class.one :author, :class => @author_class
+
+ post = @post_class.new('author' => { 'name' => 'Frank' })
+ post.author.name.should == 'Frank'
+
+ post.save.should be_true
+ post.reload
+
+ post.author.name.should == 'Frank'
+ end
context "replacing the association" do
context "with an object of the class" do
|
add a similar test that many documents and many embedded documents proxies have
|
diff --git a/sockjsclient/xhr.go b/sockjsclient/xhr.go
index <HASH>..<HASH> 100644
--- a/sockjsclient/xhr.go
+++ b/sockjsclient/xhr.go
@@ -256,7 +256,7 @@ type doResult struct {
}
func (x *XHRSession) do(req *http.Request) <-chan doResult {
- ch := make(chan doResult)
+ ch := make(chan doResult, 1)
go func() {
var res doResult
|
sockjsclient: do not block on sending do() method Result
|
diff --git a/tenant_schemas_celery/registry_test.py b/tenant_schemas_celery/registry_test.py
index <HASH>..<HASH> 100644
--- a/tenant_schemas_celery/registry_test.py
+++ b/tenant_schemas_celery/registry_test.py
@@ -33,7 +33,6 @@ def test_get_schema_from_class_task_registration(transactional_db):
task = app._tasks[name]
assert not inspect.isclass(task)
assert task.__class__.__name__ == 'get_schema_from_class_task'
- assert isinstance(task, TenantTask)
assert isinstance(task, SchemaClassTask)
|
verified we are of the specified base class and ignore tenanttask
|
diff --git a/src/transformers/modeling_utils.py b/src/transformers/modeling_utils.py
index <HASH>..<HASH> 100644
--- a/src/transformers/modeling_utils.py
+++ b/src/transformers/modeling_utils.py
@@ -2068,7 +2068,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
model_to_load = getattr(model, cls.base_model_prefix)
if any(key in expected_keys_not_prefixed for key in loaded_keys):
raise ValueError(
- "The state dictionary of the model you are training to load is corrupted. Are you sure it was "
+ "The state dictionary of the model you are trying to load is corrupted. Are you sure it was "
"properly saved?"
)
|
[Typo] Fix typo in modeling utils (#<I>)
|
diff --git a/src/main/java/org/codelibs/fess/FessBoot.java b/src/main/java/org/codelibs/fess/FessBoot.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/codelibs/fess/FessBoot.java
+++ b/src/main/java/org/codelibs/fess/FessBoot.java
@@ -82,7 +82,7 @@ public class FessBoot extends TomcatBoot {
if (fessLogPath == null) {
fessLogPath = "../../logs";
}
- op.replace("fess.log.path", fessLogPath);
+ op.replace("fess.log.path", fessLogPath.replace("\\", "/"));
}) // uses jdk14logger
.asDevelopment(isNoneEnv()).bootAwait();
}
|
fix fess.log.path on windows
|
diff --git a/tests/main.js b/tests/main.js
index <HASH>..<HASH> 100644
--- a/tests/main.js
+++ b/tests/main.js
@@ -24,6 +24,24 @@ exports.defineAutoTests = function () {
fail("Write Boolean Failed");
});
});
+ it('Ints', function (done) {
+ var dummyData = 154243;
+ NativeStorage.set("dummy_ref_int",
+ dummyData,
+ function (result) {
+ NativeStorage.getInt("dummy_ref_int",
+ function (result) {
+ expect(result).toEqual(dummyData);
+ done();
+ },
+ function (e) {
+ fail("Read Int Failed");
+ });
+ },
+ function (e) {
+ fail("Write Int Failed");
+ });
+ });
it('Objects', function (done) {
var dummyData = { data1: "", data2: 2, data3: 3.0 };
NativeStorage.set("dummy_ref_obj",
|
Added Integers Write-Read to Test Suite Coverage
|
diff --git a/lib/Predis.php b/lib/Predis.php
index <HASH>..<HASH> 100644
--- a/lib/Predis.php
+++ b/lib/Predis.php
@@ -1511,6 +1511,8 @@ class RedisServer_vNext extends RedisServer_v1_2 {
/* publish - subscribe */
'subscribe' => '\Predis\Commands\Subscribe',
'unsubscribe' => '\Predis\Commands\Unsubscribe',
+ 'psubscribe' => '\Predis\Commands\SubscribeByPattern',
+ 'punsubscribe' => '\Predis\Commands\UnsubscribeByPattern',
'publish' => '\Predis\Commands\Publish',
/* remote server control commands */
@@ -2348,6 +2350,16 @@ class Unsubscribe extends \Predis\MultiBulkCommand {
public function getCommandId() { return 'UNSUBSCRIBE'; }
}
+class SubscribeByPattern extends \Predis\MultiBulkCommand {
+ public function canBeHashed() { return false; }
+ public function getCommandId() { return 'PSUBSCRIBE'; }
+}
+
+class UnsubscribeByPattern extends \Predis\MultiBulkCommand {
+ public function canBeHashed() { return false; }
+ public function getCommandId() { return 'PUNSUBSCRIBE'; }
+}
+
class Publish extends \Predis\MultiBulkCommand {
public function canBeHashed() { return false; }
public function getCommandId() { return 'PUBLISH'; }
|
New commands: PSUBSCRIBE and PUNSUBSCRIBE (Redis <I>-dev).
|
diff --git a/lib/src/ChainWebSocket.js b/lib/src/ChainWebSocket.js
index <HASH>..<HASH> 100644
--- a/lib/src/ChainWebSocket.js
+++ b/lib/src/ChainWebSocket.js
@@ -50,7 +50,12 @@ class ChainWebSocket {
this.recv_life --;
if( this.recv_life == 0){
console.error('keep alive timeout.');
- this.ws.terminate();
+ if( this.ws.terminate ) {
+ this.ws.terminate();
+ }
+ else{
+ this.ws.close();
+ }
clearInterval(this.keepalive_timer);
this.keepalive_timer = undefined;
return;
|
fix an issue in browser which doesn't have terminate method on WebSocket.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ from __future__ import print_function
from codecs import open
from setuptools import setup, find_packages
-VERSION = '0.2.0'
+VERSION = '0.3.0'
DEPENDENCIES = [
'argcomplete',
|
Change version to <I> (#<I>)
|
diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index <HASH>..<HASH> 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -28,7 +28,7 @@ const DOCKER_COUCHBASE = 'couchbase:6.0.1';
const DOCKER_CASSANDRA = 'cassandra:3.11.4';
const DOCKER_MSSQL = 'microsoft/mssql-server-linux:latest';
const DOCKER_HAZELCAST_MANAGEMENT_CENTER = 'hazelcast/management-center:3.12';
-const DOCKER_MEMCACHED = 'memcached:1.5.12-alpine';
+const DOCKER_MEMCACHED = 'memcached:1.5.15-alpine';
const DOCKER_KEYCLOAK = 'jboss/keycloak:6.0.1';
const DOCKER_ELASTICSEARCH = 'docker.elastic.co/elasticsearch/elasticsearch:6.4.3'; // The version should be coerent with the one from spring-data-elasticsearch project
const DOCKER_KAFKA = 'wurstmeister/kafka:2.11-2.0.1';
|
Update memcached docker image to <I>-alpine
|
diff --git a/lib/init-archive.js b/lib/init-archive.js
index <HASH>..<HASH> 100644
--- a/lib/init-archive.js
+++ b/lib/init-archive.js
@@ -125,9 +125,12 @@ module.exports = function (opts, cb) {
}
function tryOtherKey () {
- debug('Bad Key. Trying other key.')
- archive = drive.createArchive(keys[0], opts)
- doneArchive()
+ archive.close(function (err) {
+ if (err) debug(err) // Hopefully no error but we just want this thing closed!
+ debug('Bad Key. Trying other key.')
+ archive = drive.createArchive(keys[0], opts)
+ doneArchive()
+ })
}
})
}
|
close old archive before opening new (#<I>)
|
diff --git a/lib/class_methods.js b/lib/class_methods.js
index <HASH>..<HASH> 100644
--- a/lib/class_methods.js
+++ b/lib/class_methods.js
@@ -394,7 +394,12 @@ ClassMethods.many = function(associatedModel) {
ClassMethods.one = function(associatedModel, opts) {
this.hasOne = this.hasOne || {}
- this.hasOne[_.singularize(associatedModel.collectionName())] = { model: associatedModel, opts: opts }
+ var name = _.singularize(associatedModel.collectionName())
+ if(opts && opts.as) {
+ opts.foreignKey = opts.foreignKey || opts.as + "Id"
+ name = opts.as
+ }
+ this.hasOne[name] = { model: associatedModel, opts: opts }
return this
}
diff --git a/lib/instance_methods.js b/lib/instance_methods.js
index <HASH>..<HASH> 100644
--- a/lib/instance_methods.js
+++ b/lib/instance_methods.js
@@ -445,5 +445,14 @@ var InstanceMethods = {
keys.push("_id")
return keys
}
+
+, assocs: function() {
+ var assocs = _.union(
+ _.keys(this.constructor.hasMany || {})
+ , _.keys(this.constructor.hasOne || {})
+ , _.keys(this.constructor.belongingTo || {})
+ )
+ return assocs
+ }
}
module.exports = InstanceMethods
|
get a list of assocs
|
diff --git a/packages/webchannel-wrapper/gulpfile.js b/packages/webchannel-wrapper/gulpfile.js
index <HASH>..<HASH> 100644
--- a/packages/webchannel-wrapper/gulpfile.js
+++ b/packages/webchannel-wrapper/gulpfile.js
@@ -52,7 +52,9 @@ const closureDefines = [
// Disables IE8-specific event fallback code (saves 523 bytes).
'goog.events.CAPTURE_SIMULATION_MODE=0',
// Disable IE-Specific ActiveX fallback for XHRs (saves 524 bytes).
- 'goog.net.XmlHttpDefines.ASSUME_NATIVE_XHR=true'
+ 'goog.net.XmlHttpDefines.ASSUME_NATIVE_XHR=true',
+ // Disable Origin Trials code for WebChannel (saves 1786 bytes).
+ 'goog.net.webChannel.ALLOW_ORIGIN_TRIAL_FEATURES=false',
];
/**
|
Disable Origin Trial code in WebChannel to reduce JS bundle size. (#<I>)
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -49,6 +49,8 @@ export { default as BootstrapProvider } from './components/BootstrapProvider';
export { default as Breadcrumb } from './components/Breadcrumb';
export { default as Button } from './components/Button';
export { default as ButtonGroup } from './components/ButtonGroup';
+export { default as ButtonCheckbox } from './components/ButtonCheckbox';
+export { default as ButtonRadio } from './components/ButtonRadio';
export { default as Caption } from './components/Caption';
export { default as Clearfix } from './components/Clearfix';
export { default as Close } from './components/Close';
|
Update export for ButtonRadio and ButtonCheckbox
|
diff --git a/lib/adp-downloader/http_client.rb b/lib/adp-downloader/http_client.rb
index <HASH>..<HASH> 100644
--- a/lib/adp-downloader/http_client.rb
+++ b/lib/adp-downloader/http_client.rb
@@ -9,8 +9,10 @@ module ADPDownloader
end
def get(url)
- contents = download(url)
- contents.to_s.empty? ? {} : JSON.parse(contents)
+ res = agent.get(url)
+ _raise_on_error(res)
+ contents = res.body
+ contents.body.to_s.empty? ? {} : JSON.parse(contents)
end
def post(url, data)
@@ -41,7 +43,8 @@ module ADPDownloader
def _raise_on_error(res)
uri = res.uri.to_s.downcase
if not uri.start_with? TARGET_URL or uri.include? "login"
- raise "Unable to authenticate: make sure your username and password are correct"
+ #raise "Unable to authenticate: make sure your username and password are correct"
+ raise "Unable to authenticate: make sure the file cookie.txt is up to date"
end
end
end
|
Display better error message on auth error
Since we're using the cookie based auth, there's no more validation of
auth credentials during http client instantiation. This sort of
validades it on every get request.
It's a pretty ugly solution just to temporarily get around the issue of
not being able to authenticate with username and password.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,14 +1,17 @@
+import sys
from setuptools import setup, find_packages
install_requires = [
'prompt_toolkit',
- 'pathlib',
'python-keystoneclient'
]
-test_requires = [
- 'mock'
-]
+test_requires = []
+
+if sys.version_info[0] == 2:
+ install_requires.append('pathlib')
+ test_requires.append('mock')
+
setup(
name='contrail-api-cli',
|
Install requirements depending on python version
|
diff --git a/libraries/lithium/console/command/Help.php b/libraries/lithium/console/command/Help.php
index <HASH>..<HASH> 100644
--- a/libraries/lithium/console/command/Help.php
+++ b/libraries/lithium/console/command/Help.php
@@ -33,12 +33,12 @@ class Help extends \lithium\console\Command {
$this->_renderCommands();
return true;
}
- $command = Inflector::classify($command);
-
if (!$class = Libraries::locate('command', $command)) {
$this->error("Command `{$command}` not found");
return false;
}
+ $command = Inflector::classify($command);
+
if (strpos($command, '\\') !== false) {
$command = join('', array_slice(explode("\\", $command), -1));
}
|
Updating `Help` command to classify passed command name later.
This is so the previous error message shouldn't contain the already
classified command but the one actually literally given.
|
diff --git a/kie-internal/src/main/java/org/kie/internal/task/api/model/TaskEvent.java b/kie-internal/src/main/java/org/kie/internal/task/api/model/TaskEvent.java
index <HASH>..<HASH> 100644
--- a/kie-internal/src/main/java/org/kie/internal/task/api/model/TaskEvent.java
+++ b/kie-internal/src/main/java/org/kie/internal/task/api/model/TaskEvent.java
@@ -43,6 +43,8 @@ public interface TaskEvent {
String getCorrelationKey();
Integer getProcessType();
+
+ String getCurrentOwner();
void setCorrelationKey(String correlationKey);
|
[JBPM-<I>] Adding actual owner to TaskEvent
With this addition, code retrieving the event can determine which
was the actual owner after the operation was applied.
|
diff --git a/addon/remote/route-mixin.js b/addon/remote/route-mixin.js
index <HASH>..<HASH> 100644
--- a/addon/remote/route-mixin.js
+++ b/addon/remote/route-mixin.js
@@ -2,10 +2,13 @@ import Ember from 'ember';
import PagedRemoteArray from './paged-remote-array';
export default Ember.Mixin.create({
+ perPage: 10,
+ startingPage: 1,
+
findPaged: function(name, params) {
return PagedRemoteArray.create({
- page: params.page || 1,
- perPage: params.perPage || 10,
+ page: params.page || this.get('startingPage'),
+ perPage: params.perPage || this.get('perPage'),
modelName: name,
store: this.store
});
|
allow setting perPage as route property
|
diff --git a/packages/@vue/cli-shared-utils/lib/module.js b/packages/@vue/cli-shared-utils/lib/module.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-shared-utils/lib/module.js
+++ b/packages/@vue/cli-shared-utils/lib/module.js
@@ -61,6 +61,11 @@ exports.resolveModule = function (request, context) {
}
exports.loadModule = function (request, context, force = false) {
+ // createRequire doesn't work with jest mock modules (which we used in migrator, for inquirer)
+ if (process.env.VUE_CLI_TEST && request.endsWith('migrator')) {
+ return require(request)
+ }
+
try {
return createRequire(path.resolve(context, 'package.json'))(request)
} catch (e) {
|
test: fix mock module in upgrader test
|
diff --git a/mixins.py b/mixins.py
index <HASH>..<HASH> 100755
--- a/mixins.py
+++ b/mixins.py
@@ -423,10 +423,10 @@ class SimpleTreeMixin(object):
# started with; you will get a copy of the same data
# from the database in a new Python object.
#
- def get_parents(self, oldest_first = False):
+ def get_parents(self, oldest_first = False, stop_at_id = None):
ancestors = []
node = self
- while node.parent is not None:
+ while node.parent is not None and (stop_at_id is None or stop_at_id != node.pk):
node = node.parent
ancestors.append(node)
@@ -435,6 +435,18 @@ class SimpleTreeMixin(object):
else:
return ancestors
+ # and a simpler, related question: is node A a
+ # child of node B?
+ def is_child_of(self, candidate_id, allow_self = True):
+ # something is often considered a child of itself;
+ # we test this first because get_parents will NOT
+ # include self in the list, but WILL stop (with
+ # an empty list) if self is the candidate
+ if self.pk == candidate_id:
+ return allow_self
+ ancestors = self.get_parents(stop_at_id = candidate_id)
+ return len(ancestors) > 0 and ancestors[-1].pk == candidate_id
+
# get the root node
#
# Similar parent-then-child fetching caveat as
|
Added ability to test ancestorship in SimpleTreeMixin.
|
diff --git a/src/League/Fractal/Manager.php b/src/League/Fractal/Manager.php
index <HASH>..<HASH> 100644
--- a/src/League/Fractal/Manager.php
+++ b/src/League/Fractal/Manager.php
@@ -42,6 +42,4 @@ class Manager
return $scopeInstance;
}
-
-
}
diff --git a/src/League/Fractal/Scope.php b/src/League/Fractal/Scope.php
index <HASH>..<HASH> 100644
--- a/src/League/Fractal/Scope.php
+++ b/src/League/Fractal/Scope.php
@@ -110,7 +110,7 @@ class Scope
{
$data = $this->runAppropriateTransformer();
- $output = [];
+ $output = array();
if ($this->availableEmbeds) {
$output['embeds'] = $this->availableEmbeds;
@@ -166,7 +166,8 @@ class Scope
$data = $this->transformPaginator();
} else {
throw new \InvalidArgumentException(
- 'Argument $resource should be an instance of Resource\Item, Resource\Collection or Resource\PaginatedCollection'
+ 'Argument $resource should be an instance of Resource\Item, Resource\Collection'
+ . ' or Resource\PaginatedCollection'
);
}
|
Every time you convert a short array to a long one, a fairy dies.
|
diff --git a/tests/integration/shell/test_call.py b/tests/integration/shell/test_call.py
index <HASH>..<HASH> 100644
--- a/tests/integration/shell/test_call.py
+++ b/tests/integration/shell/test_call.py
@@ -9,7 +9,6 @@
# Import python libs
from __future__ import absolute_import
-import getpass
import os
import sys
import re
@@ -25,7 +24,6 @@ from tests.support.mixins import ShellCaseCommonTestsMixin
from tests.support.helpers import (
destructiveTest,
flaky,
- requires_system_grains,
skip_if_not_root,
)
from tests.integration.utils import testprogram
|
Appease the mighty linter
|
diff --git a/projects/samskivert/src/java/com/samskivert/jdbc/jora/Table.java b/projects/samskivert/src/java/com/samskivert/jdbc/jora/Table.java
index <HASH>..<HASH> 100644
--- a/projects/samskivert/src/java/com/samskivert/jdbc/jora/Table.java
+++ b/projects/samskivert/src/java/com/samskivert/jdbc/jora/Table.java
@@ -173,6 +173,14 @@ public class Table {
return new Cursor(this, session, 1, query);
}
+ /** Like {@link #join} but does a straight join with the specified
+ * table. */
+ public final Cursor straightJoin(String table, String condition) {
+ String query = "select " + listOfFields +
+ " from " + name + " straight_join " + table + " " + condition;
+ return new Cursor(this, session, 1, query);
+ }
+
/** Select records from database table according to search condition
*
* @param condition valid SQL condition expression started with WHERE
|
Added straightJoin() for those times when you know you gotta be a straight
shooter.
git-svn-id: <URL>
|
diff --git a/source/partialObject.js b/source/partialObject.js
index <HASH>..<HASH> 100644
--- a/source/partialObject.js
+++ b/source/partialObject.js
@@ -29,5 +29,5 @@ import _curry2 from './internal/_curry2.js';
* sayHelloToMs({ firstName: 'Jane', lastName: 'Jones' }); //=> 'Hello, Ms. Jane Jones!'
* @symb R.partialObject(f, { a, b })({ c, d }) = f({ a, b, c, d })
*/
-
-export default _curry2((f, o) => (props) => f.call(this, mergeDeepRight(o, props)));
+var partialObject = _curry2((f, o) => (props) => f.call(this, mergeDeepRight(o, props)));
+export default partialObject;
|
refactor: assign partialObject function to var so that JSDoc can infer its name (#<I>)
fix ramda/ramda.github.io#<I>
|
diff --git a/webapps/client/scripts/task/directives/cam-tasklist-task-meta.js b/webapps/client/scripts/task/directives/cam-tasklist-task-meta.js
index <HASH>..<HASH> 100644
--- a/webapps/client/scripts/task/directives/cam-tasklist-task-meta.js
+++ b/webapps/client/scripts/task/directives/cam-tasklist-task-meta.js
@@ -55,6 +55,7 @@ define([
});
$scope.groupsState = taskMetaData.observe('groups', function(groups) {
+ groups = groups || [];
var groupIds = [];
for (var i = 0, group; !!(group = groups[i]); i++) {
groupIds.push(group.groupId);
|
fix(groups): initialize array of groups
|
diff --git a/raiden/transfer/node.py b/raiden/transfer/node.py
index <HASH>..<HASH> 100644
--- a/raiden/transfer/node.py
+++ b/raiden/transfer/node.py
@@ -433,6 +433,7 @@ def maybe_add_tokennetwork(
ids_to_tokens[token_network_address] = token_network_state
addresses_to_ids[token_address] = token_network_address
+ token_network_registry_state.token_network_list.append(token_network_state)
mapping = chain_state.tokennetworkaddresses_to_tokennetworkregistryaddresses
mapping[token_network_address] = token_network_registry_address
|
Fix inconsistent token network registry
TNs that were registered were included in all attributes but
`token_network_list`. The class should be refactored to disallow
inconsistent states.
|
diff --git a/test/runtime/monitor.go b/test/runtime/monitor.go
index <HASH>..<HASH> 100644
--- a/test/runtime/monitor.go
+++ b/test/runtime/monitor.go
@@ -113,6 +113,7 @@ var _ = Describe("RuntimeMonitorTest", func() {
})
It("Cilium monitor event types", func() {
+ Skip("Disabled flake: https://github.com/cilium/cilium/issues/7872")
monitorConfig()
|
CI: Disable RuntimeMonitorTest With Sample Containers Cilium monitor event types
This began failing often sometime around April <I>. See
<URL>
|
diff --git a/spec/element_spec.rb b/spec/element_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/element_spec.rb
+++ b/spec/element_spec.rb
@@ -45,7 +45,7 @@ describe Watir::Element do
describe "#hover" do
not_compliant_on [:webdriver, :firefox, :synthesized_events],
- [:webdriver, :ie],
+ [:webdriver, :internet_explorer],
[:webdriver, :iphone],
[:webdriver, :safari] do
it "should hover over the element" do
|
Rename :ie guard to :internet_explorer.
|
diff --git a/xiaomi_gateway/__init__.py b/xiaomi_gateway/__init__.py
index <HASH>..<HASH> 100644
--- a/xiaomi_gateway/__init__.py
+++ b/xiaomi_gateway/__init__.py
@@ -70,7 +70,7 @@ class XiaomiGatewayDiscovery(object):
(self.MULTICAST_ADDRESS, self.GATEWAY_DISCOVERY_PORT))
while True:
- data, _ = _socket.recvfrom(1024)
+ data, (ip_add, _) = _socket.recvfrom(1024)
if len(data) is None:
continue
@@ -83,7 +83,6 @@ class XiaomiGatewayDiscovery(object):
_LOGGER.error("Response must be gateway model")
continue
- ip_add = resp["ip"]
if ip_add in self.gateways:
continue
|
Consistently use IP from package sender and not from data in packet. (#<I>)
This fixes issues with "Unknown gateway ip" when using Multicast forwarders
|
diff --git a/tests/CarbonInterval/CascadeTest.php b/tests/CarbonInterval/CascadeTest.php
index <HASH>..<HASH> 100644
--- a/tests/CarbonInterval/CascadeTest.php
+++ b/tests/CarbonInterval/CascadeTest.php
@@ -312,4 +312,16 @@ class CascadeTest extends AbstractTestCase
$this->assertSame(28, CarbonInterval::getFactor('day', 'month'));
$this->assertSame(28, CarbonInterval::getFactor('dayz', 'months'));
}
+
+ public function testComplexInterval()
+ {
+ $this->markTestIncomplete('To be fixed in 2.37.x');
+
+ $interval = CarbonInterval::create()
+ ->years(-714)->months(-101)->days(-737)
+ ->seconds(442)->microseconds(-19);
+
+ $this->assertFalse($interval->cascade()->hasNegativeValues());
+ $this->assertTrue($interval->cascade()->hasPositiveValues());
+ }
}
|
Add unit test to be fixed in <I>.x
|
diff --git a/saltapi/netapi/rest_cherrypy.py b/saltapi/netapi/rest_cherrypy.py
index <HASH>..<HASH> 100644
--- a/saltapi/netapi/rest_cherrypy.py
+++ b/saltapi/netapi/rest_cherrypy.py
@@ -187,7 +187,7 @@ class Login(LowDataAdapter):
def GET(self):
cherrypy.response._tmpl = self.tmpl
cherrypy.response.status = '401 Unauthorized'
- cherrypy.response.headers['WWW-Authenticate'] = 'HTML'
+ cherrypy.response.headers['WWW-Authenticate'] = 'Session'
return {
'status': cherrypy.response.status,
|
Changed value of authentication header; still arbitrary and custom
|
diff --git a/DrdPlus/Properties/Derived/FatigueBoundary.php b/DrdPlus/Properties/Derived/FatigueBoundary.php
index <HASH>..<HASH> 100644
--- a/DrdPlus/Properties/Derived/FatigueBoundary.php
+++ b/DrdPlus/Properties/Derived/FatigueBoundary.php
@@ -10,7 +10,6 @@ class FatigueBoundary extends AbstractDerivedProperty
{
const FATIGUE_BOUNDARY = PropertyCode::FATIGUE_BOUNDARY;
- // TODO PPH page 117 left column little catty Mrrr and its less-than-one fatigue boundary...
/**
* @param Endurance $endurance
* @param Tables $tables
|
A todo moved to more related library
|
diff --git a/src/common/api.js b/src/common/api.js
index <HASH>..<HASH> 100644
--- a/src/common/api.js
+++ b/src/common/api.js
@@ -49,13 +49,6 @@ module.exports.version = sre.System.getInstance().version;
/**
* Exporting method to return an aural rendered speech string.
- * @deprecated Use toSpeech().
- */
-module.exports.processExpression = sre.Api.toSpeech;
-
-
-/**
- * Exporting method to return an aural rendered speech string.
*/
module.exports.toSpeech = sre.Api.toSpeech;
@@ -109,13 +102,6 @@ module.exports.file.toSpeech = sre.System.getInstance().fileToSpeech;
/**
- * Exporting method to aural render an expression from a file.
- * @deprecated Use file.toSpeech()
- */
-module.exports.processFile = sre.System.getInstance().fileToSpeech;
-
-
-/**
* Exporting method to compute the semantic tree for an expression from a file.
*/
module.exports.file.toSemantic = sre.System.getInstance().fileToSemantic;
|
Removes deprecated API functions ``processExpression`` and ``processFile``.
|
diff --git a/ansible/plugins/lookup/hashivault.py b/ansible/plugins/lookup/hashivault.py
index <HASH>..<HASH> 100755
--- a/ansible/plugins/lookup/hashivault.py
+++ b/ansible/plugins/lookup/hashivault.py
@@ -46,6 +46,7 @@ class LookupModule(LookupBase):
key = None
default = kwargs.get('default', None)
version = kwargs.get('version')
+ mount_point = kwargs.get('mount_point', 'secret')
params = {
'url': self._get_url(environments),
'verify': self._get_verify(environments),
@@ -53,7 +54,7 @@ class LookupModule(LookupBase):
'key': key,
'default': default,
'version': version,
- 'mount_point': 'secret',
+ 'mount_point': mount_point,
}
authtype = self._get_environment(environments, 'VAULT_AUTHTYPE', 'token')
params['authtype'] = authtype
|
Add `mount_point` option to the lookup plugin
The `mount_point` option is recognized by `hashivault_read` module,
which can be used to override default `secret`. This commit gives
similar capability to `hashivault` lookup plugin.
|
diff --git a/plugin/acts_as_ferret/lib/class_methods.rb b/plugin/acts_as_ferret/lib/class_methods.rb
index <HASH>..<HASH> 100644
--- a/plugin/acts_as_ferret/lib/class_methods.rb
+++ b/plugin/acts_as_ferret/lib/class_methods.rb
@@ -94,8 +94,16 @@ module ActsAsFerret
# Used by the DRb server when switching to a new index version.
def index_dir=(dir)
logger.debug "changing index dir to #{dir}"
+ # get a handle to the index before changing the directory (which serves
+ # as the key to retrieve the index instance in aaf_index method below)
+ idx = aaf_index
+ old_dir = aaf_configuration[:index_dir]
aaf_configuration[:index_dir] = aaf_configuration[:ferret][:path] = dir
- aaf_index.reopen!
+ # store index reference with new directory
+ ActsAsFerret::ferret_indexes[aaf_configuration[:index_dir]] = idx
+ # clean old reference to index
+ ActsAsFerret::ferret_indexes.delete old_dir
+ idx.reopen!
logger.debug "index dir is now #{dir}"
end
|
fix file handle leakage in rebuild_index via DRb,
|
diff --git a/tests/index.spec.js b/tests/index.spec.js
index <HASH>..<HASH> 100644
--- a/tests/index.spec.js
+++ b/tests/index.spec.js
@@ -573,7 +573,7 @@ describe('GET OG', function () {
expect(error).to.be(false);
expect(result.success).to.be(true);
expect(result.requestUrl).to.be('https://www.namecheap.com/');
- expect(result.data.ogTitle).to.be('\n\tDomain Names Starting at $0.48 - Namecheap.com\n');
+ expect(result.data.ogTitle).to.be('\n\tDomain Name Registration - Buy Domain Names from $0.48 - Namecheap\n');
done();
});
});
|
update changed page title in test 'Valid Call - Test Name Cheap Page That Dose Not Have content-type=text/html - Should Return correct Open Graph Info'
|
diff --git a/i3pystatus/temp.py b/i3pystatus/temp.py
index <HASH>..<HASH> 100644
--- a/i3pystatus/temp.py
+++ b/i3pystatus/temp.py
@@ -11,6 +11,7 @@ class Temperature(IntervalModule):
settings = (
("format",
"format string used for output. {temp} is the temperature in degrees celsius"),
+ ('display_if', 'snippet that gets evaluated. if true, displays the module output'),
"color",
"file",
"alert_temp",
@@ -21,12 +22,14 @@ class Temperature(IntervalModule):
file = "/sys/class/thermal/thermal_zone0/temp"
alert_temp = 90
alert_color = "#FF0000"
+ display_if = 'True'
def run(self):
with open(self.file, "r") as f:
temp = float(f.read().strip()) / 1000
- self.output = {
- "full_text": self.format.format(temp=temp),
- "color": self.color if temp < self.alert_temp else self.alert_color,
- }
+ if eval(self.display_if):
+ self.output = {
+ "full_text": self.format.format(temp=temp),
+ "color": self.color if temp < self.alert_temp else self.alert_color,
+ }
|
temp: add a "display_if" setting
Adds a "display_if" setting to temp module. This is a snippet that will
be evaulated, and if the result is true, it will display the module's
output.
|
diff --git a/jquery.popupoverlay.js b/jquery.popupoverlay.js
index <HASH>..<HASH> 100644
--- a/jquery.popupoverlay.js
+++ b/jquery.popupoverlay.js
@@ -663,8 +663,7 @@
}
// Click outside of popup
- if ($(el).data('popupoptions').blur && !$(event.target).closest('#' + elementId).length && event.which !== 2) {
-
+ if ($(el).data('popupoptions').blur && !$(event.target).closest('#' + elementId).length && event.which !== 2 && $(event.target).is(':visible')) {
methods.hide(el);
if ($(el).data('popupoptions').type === 'overlay') {
|
Prevent popup from closing unintentionally if it's HTML is modified.
Make sure that the popup doesn't close (with "blur" option set to true) when clicked inside of it, if HTML of the popup is dynamically replaced.
E.g.
$(document).on('click', '#basic #some_button', function(event) {
$('#basic').html('test');
});
|
diff --git a/lib/Widget/Resource/i18n/validator/zh-CN.php b/lib/Widget/Resource/i18n/validator/zh-CN.php
index <HASH>..<HASH> 100644
--- a/lib/Widget/Resource/i18n/validator/zh-CN.php
+++ b/lib/Widget/Resource/i18n/validator/zh-CN.php
@@ -20,8 +20,10 @@ return array(
'equal' => '指定的值不相等',
'exists' => '指定的路径不存在',
'file' => '指定的文件不存在',
- 'file.blackExts' => '文件后缀名非法',
- 'file.maxSize' => '文件太大了({{ size }}),允许的最大大小为{{ maxSize }}',
+ 'file.exts' => '该文件扩展名({{ ext }})不合法,允许的扩展名为:{{ exts }}',
+ 'file.excludeExts' => '该文件扩展名({{ ext }})不合法,不允许扩展名为:{{ excludeExts }}',
+ 'file.minSize' => '该文件太小了({{ size }}字节),允许的最小文件大小为{{ minSize }}字节',
+ 'file.maxSize' => '该文件太大了({{ size }}字节),允许的最大文件大小为{{ maxSize }}字节',
'image' => '该项必须是有效的图片',
'image.notFound' => '该图片不存在,或不可读',
'image.notDetected' => '该文件不是有效的图片,或是无法检测到图片的尺寸',
|
added zh-CN message for file validator
|
diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js
index <HASH>..<HASH> 100755
--- a/src/jquery.gridster.js
+++ b/src/jquery.gridster.js
@@ -3011,8 +3011,9 @@
* @return {Object} Returns the instance of the Gridster class.
*/
fn.get_widgets_from_DOM = function() {
- this.$widgets.each($.proxy(function(i, widget) {
- this.register_widget($(widget));
+ var widgets_coords = this.$widgets.map($.proxy(function(i, widget) {
+ var $w = $(widget);
+ return this.dom_to_coords($w);
}, this));
widgets_coords = Gridster.sort_by_row_and_col_asc(widgets_coords);
|
fix(gridster): sort widgets appropriately when reading them from DOM
|
diff --git a/tests/unit/phpDocumentor/Infrastructure/FlySystemFactoryTest.php b/tests/unit/phpDocumentor/Infrastructure/FlySystemFactoryTest.php
index <HASH>..<HASH> 100644
--- a/tests/unit/phpDocumentor/Infrastructure/FlySystemFactoryTest.php
+++ b/tests/unit/phpDocumentor/Infrastructure/FlySystemFactoryTest.php
@@ -60,7 +60,7 @@ class FlySystemFactoryTest extends \Mockery\Adapter\Phpunit\MockeryTestCase
/** @var AbstractAdapter $adapter */
$adapter = $result->getAdapter();
$pathPrefix = $adapter->getPathPrefix();
- $this->assertEquals('/tmp' . DIRECTORY_SEPARATOR, $pathPrefix);
+ $this->assertEquals(realpath('/tmp') . DIRECTORY_SEPARATOR, $pathPrefix);
}
/**
|
Ensure that the test works on both Mac and Linux
|
diff --git a/jbxapi.py b/jbxapi.py
index <HASH>..<HASH> 100644
--- a/jbxapi.py
+++ b/jbxapi.py
@@ -31,7 +31,7 @@ except ImportError:
print("Please install the Python 'requests' package via pip", file=sys.stderr)
sys.exit(1)
-__version__ = "2.5.1"
+__version__ = "2.5.2"
# API URL.
API_URL = "https://jbxcloud.joesecurity.org/api"
@@ -370,9 +370,9 @@ class JoeSandbox(object):
# urllib3 (via python-requests) and our server
# https://github.com/requests/requests/issues/2117
# Internal Ticket #3090
- acceptable_chars = "0123456789" + "abcdefghijklmnopqrstuvwxyz" + \
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + " _-.,()[]{}"
- if "files" in kwargs and kwargs["files"] != None:
+ if "files" in kwargs and kwargs["files"] is not None:
+ acceptable_chars = "0123456789" + "abcdefghijklmnopqrstuvwxyz" + \
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + " _-.,()[]{}"
for param_name, fp in kwargs["files"].items():
filename = requests.utils.guess_filename(fp) or param_name
|
code improvement, use the identity instead of the equality
|
diff --git a/helpers/update_helpers.py b/helpers/update_helpers.py
index <HASH>..<HASH> 100644
--- a/helpers/update_helpers.py
+++ b/helpers/update_helpers.py
@@ -7,7 +7,7 @@ import re
import codecs
from functools import partial
from collections import defaultdict
-from cablemap.core import cables_from_directory
+from cablemap.core import cables_from_source
import logging
import sys
@@ -81,7 +81,7 @@ def run_update(in_dir, predicate=None):
acronyms = set(_ACRONYMS)
subjects = set()
tags = defaultdict(list)
- for cable in cables_from_directory(in_dir, predicate):
+ for cable in cables_from_source(in_dir, predicate):
update_acronyms(cable, acronyms)
update_missing_subjects(cable, subjects)
update_tags(cable, tags)
|
Usage of ``cables_from_source``
|
diff --git a/documentation/samples/src/main/resources/assets/socket.js b/documentation/samples/src/main/resources/assets/socket.js
index <HASH>..<HASH> 100644
--- a/documentation/samples/src/main/resources/assets/socket.js
+++ b/documentation/samples/src/main/resources/assets/socket.js
@@ -27,7 +27,10 @@
if (window.WebSocket) {
// Compute the web socket url.
// window.location.host includes the port
- var url = "ws://" + window.location.host + "/ws/websocket";
+ var url = "ws://" + window.location.host + "/ws/websocket";
+ if (window.location.protocol == "https:") {
+ url = "wss://" + window.location.host + "/ws/websocket";
+ }
socket = new WebSocket(url);
socket.onopen = onopen;
socket.onmessage = onmessage;
|
Compute the right web socket url
wss:// is used when the page is loaded with https://
|
diff --git a/core.js b/core.js
index <HASH>..<HASH> 100644
--- a/core.js
+++ b/core.js
@@ -890,9 +890,9 @@ class VRDisplay extends MRDisplay {
frameData.copy(this._frameData);
}
}
-class FakeDisplay extends MRDisplay {
constructor(window, displayId) {
super('FAKE', window, displayId);
+class FakeVRDisplay extends MRDisplay {
this.position = new THREE.Vector3();
this.quaternion = new THREE.Quaternion();
@@ -3382,7 +3382,7 @@ const _makeWindow = (options = {}, parent = null, top = null) => {
return Promise.resolve(this.getVRDisplaysSync());
},
createVRDisplay() {
- const display = new FakeDisplay(window, 2);
+ const display = new FakeVRDisplay(window, 2);
fakeVrDisplays.push(display);
return display;
},
@@ -3578,7 +3578,7 @@ const _makeWindow = (options = {}, parent = null, top = null) => {
window.VRStageParameters = VRStageParameters;
window.VRDisplay = VRDisplay;
window.MLDisplay = MLDisplay;
- window.FakeDisplay = FakeDisplay;
+ window.FakeVRDisplay = FakeVRDisplay;
// window.ARDisplay = ARDisplay;
window.VRFrameData = VRFrameData;
window.btoa = btoa;
|
Rename FakeDisplay to FakeVRDisplay
|
diff --git a/src/Http/Controllers/UserController.php b/src/Http/Controllers/UserController.php
index <HASH>..<HASH> 100644
--- a/src/Http/Controllers/UserController.php
+++ b/src/Http/Controllers/UserController.php
@@ -24,7 +24,9 @@ class UserController extends BaseController
*/
public function index()
{
- return $this->appShellView('user.index');
+ return $this->appShellView('user.index', [
+ 'users' => UserProxy::all()
+ ]);
}
/**
@@ -34,11 +36,9 @@ class UserController extends BaseController
*/
public function create()
{
- return $this->appShellView('user.create',
- [
+ return $this->appShellView('user.create', [
'user' => app(User::class)
- ]
- );
+ ]);
}
/**
|
Fixed user index action (no data was sent)
|
diff --git a/raiden/tests/utils/__init__.py b/raiden/tests/utils/__init__.py
index <HASH>..<HASH> 100644
--- a/raiden/tests/utils/__init__.py
+++ b/raiden/tests/utils/__init__.py
@@ -18,8 +18,8 @@ def wait_blocks(web3: Web3, blocks: int):
def dicts_are_equal(a: dict, b: dict) -> bool:
- """Compare dicts, but allows ignoring specific values through the
- dicts_are_equal.IGNORE_VALUE identifier"""
+ """Compares dicts, but allows ignoring specific values through the
+ dicts_are_equal.IGNORE_VALUE object"""
if set(a.keys()) != set(b.keys()):
return False
for k in a.keys():
|
Fix wording
[skip ci]
|
diff --git a/lib/laziness/api/channels.rb b/lib/laziness/api/channels.rb
index <HASH>..<HASH> 100644
--- a/lib/laziness/api/channels.rb
+++ b/lib/laziness/api/channels.rb
@@ -1,9 +1,15 @@
module Slack
module API
class Channels < Base
- def all(exclude_archived=false)
- response = request :get, 'channels.list', exclude_archived: exclude_archived ? 1 : 0
- Slack::Channel.parse response, 'channels'
+ def all(exclude_archived=false, page: nil)
+ responses = with_paging(page) do |pager|
+ request :get,
+ 'channels.list',
+ exclude_archived: exclude_archived ? 1 : 0,
+ **pager.to_h
+ end
+
+ Slack::Channel.parse_all responses, 'channels'
end
def archive(id)
|
Add paging to channels.list
|
diff --git a/eventbinder/src/main/java/com/google/web/bindery/event/shared/binder/impl/GenericEventType.java b/eventbinder/src/main/java/com/google/web/bindery/event/shared/binder/impl/GenericEventType.java
index <HASH>..<HASH> 100644
--- a/eventbinder/src/main/java/com/google/web/bindery/event/shared/binder/impl/GenericEventType.java
+++ b/eventbinder/src/main/java/com/google/web/bindery/event/shared/binder/impl/GenericEventType.java
@@ -41,7 +41,7 @@ public class GenericEventType extends Type<GenericEventHandler> {
* called directly by users.
*/
public static <T extends GenericEvent> GenericEventType getTypeOf(Class<T> clazz) {
- if (!TYPE_MAP.containsKey(clazz)) {
+ if (TYPE_MAP.get(clazz)==null) {
TYPE_MAP.put(clazz, new GenericEventType());
}
return TYPE_MAP.get(clazz);
|
Improved the performance by switching from containKey to get method
|
diff --git a/owncloud/owncloud.py b/owncloud/owncloud.py
index <HASH>..<HASH> 100644
--- a/owncloud/owncloud.py
+++ b/owncloud/owncloud.py
@@ -881,7 +881,7 @@ class Client():
if res.status_code == 200:
tree = ET.fromstring(res.text)
- self.__check_ocs_status(tree, [100, 102])
+ self.__check_ocs_status(tree, [100])
return True
raise HTTPResponseError(res)
|
only accept OCS return code <I> in add_user_to_group
<I> means here "group does not exist", we really should not return True in that case but raise and OCSResponseError
|
diff --git a/lib/ecstatic.js b/lib/ecstatic.js
index <HASH>..<HASH> 100755
--- a/lib/ecstatic.js
+++ b/lib/ecstatic.js
@@ -255,7 +255,7 @@ function shouldCompress(req) {
// See: https://github.com/jesusabdullah/node-ecstatic/issues/109
function decodePathname(pathname) {
- var pieces = pathname.split('/');
+ var pieces = pathname.replace(/\\/g,"/").split('/');
return pieces.map(function (piece) {
piece = decodeURIComponent(piece);
|
Fix path splitting to account for Windows paths
|
diff --git a/bang/config.py b/bang/config.py
index <HASH>..<HASH> 100644
--- a/bang/config.py
+++ b/bang/config.py
@@ -14,6 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with bang. If not, see <http://www.gnu.org/licenses/>.
+import collections
import os
import os.path
import tempfile
@@ -225,7 +226,11 @@ class Config(dict):
for server in self.get(R.SERVERS, []):
svars = {A.STACK: stack}
for scope in server.get(A.server.SCOPES, []):
- svars[scope] = self[scope]
+ # allow scopes to be defined inline
+ if isinstance(scope, collections.Mapping):
+ svars.update(scope)
+ else:
+ svars[scope] = self[scope]
server[A.server.VARS] = svars
def prepare(self):
|
Allow scopes to be defined inline.
This allows playbooks to reference a single config scope name while
allowing for server-specific values. Note that inline scopes trump
scopes that are defined in the top-level config.
|
diff --git a/library/Garp/Application/Resource/Router.php b/library/Garp/Application/Resource/Router.php
index <HASH>..<HASH> 100644
--- a/library/Garp/Application/Resource/Router.php
+++ b/library/Garp/Application/Resource/Router.php
@@ -89,7 +89,8 @@ class Garp_Application_Resource_Router extends Zend_Application_Resource_Router
$lang = $this->_getCurrentLanguage();
$territory = Garp_I18n::languageToTerritory($lang);
- setlocale(LC_ALL, $territory);
+ $utf8_extension = PHP_OS === 'Linux' ? '.utf8' : '.UTF-8';
+ setlocale(LC_ALL, $territory . $utf8_extension);
if (
$this->_localeIsEnabled() &&
|
-n
utf8 added to locale by platform
|
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -588,7 +588,7 @@ module ActiveRecord
SQL
else
result = execute(<<-SQL, 'SCHEMA')
- SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput
+ SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, t.typtype, t.typbasetype
FROM pg_type as t
SQL
end
@@ -630,10 +630,11 @@ module ActiveRecord
# populate domain types
domains.each do |row|
- if base_type = type_map[row["typbasetype"].to_i]
+ base_type_oid = row["typbasetype"].to_i
+ if base_type = type_map[base_type_oid]
type_map[row['oid'].to_i] = base_type
else
- warn "unknown base type (OID: #{row["typbasetype"].to_i}) for domain #{row["typname"]}."
+ warn "unknown base type (OID: #{base_type_oid}) for domain #{row["typname"]}."
end
end
end
|
fix, adjust OID query without range support to include required fields.
This is a follow-up fix to f7a6b<I>fea9f<I>a<I>b<I>c<I>f<I> and
<I>f<I>d<I>e<I>bbac3bc<I>bace3f<I>
|
diff --git a/test/test.js b/test/test.js
index <HASH>..<HASH> 100644
--- a/test/test.js
+++ b/test/test.js
@@ -197,6 +197,25 @@ describe('sourcemap-concat', function() {
});
});
+ it('inputFiles are sorted lexicographically (improve stability of build output)', function() {
+ var final = concat(firstFixture, {
+ outputFile: '/staged.js',
+ inputFiles: ['inner/second.js', 'inner/first.js'],
+ sourceMapConfig: {
+ enabled: false
+ }
+ });
+
+ builder = new broccoli.Builder(final);
+ return builder.build().then(function(result) {
+ var first = fs.readFileSync(path.join(firstFixture, 'inner/first.js'), 'UTF-8');
+ var second = fs.readFileSync(path.join(firstFixture, 'inner/second.js'), 'UTF-8');
+
+ var expected = first + '\n' + second;
+ expect(file(result.directory + '/staged.js')).to.equal(expected);
+ });
+ });
+
it('dedupe uniques in inputFiles (with simpleconcat)', function() {
var final = concat(firstFixture, {
outputFile: '/staged.js',
|
Add test ensuring inputFiles are sorted lexicographically
This improves stability of concat output.
related: <URL>
|
diff --git a/receive_test.go b/receive_test.go
index <HASH>..<HASH> 100644
--- a/receive_test.go
+++ b/receive_test.go
@@ -62,6 +62,8 @@ func TestInvalidExcludePatterns(t *testing.T) {
}
func TestCopyWithSubDir(t *testing.T) {
+ requiresRoot(t)
+
d, err := tmpDir(changeStream([]string{
"ADD foo dir",
"ADD foo/bar file data1",
diff --git a/stat_test.go b/stat_test.go
index <HASH>..<HASH> 100644
--- a/stat_test.go
+++ b/stat_test.go
@@ -10,6 +10,8 @@ import (
)
func TestStat(t *testing.T) {
+ requiresRoot(t)
+
d, err := tmpDir(changeStream([]string{
"ADD foo file data1",
"ADD zzz dir",
|
- [*] skip tests that would fail in Debian-build
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.