diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/code/KickAssets.php b/code/KickAssets.php index <HASH>..<HASH> 100644 --- a/code/KickAssets.php +++ b/code/KickAssets.php @@ -433,7 +433,7 @@ class KickAssets extends LeftAndMain { $types = explode(',',$r->getVar('allowedTypes')); return Convert::array2json(array( - 'baseRoute' => $this->Link(), + 'baseRoute' => Controller::join_links(Director::baseURL(), $this->Link()), 'maxFilesize' => FileAttachmentField::get_filesize_from_ini(), 'allowedExtensions' => implode(',', $exts), 'thumbnailsDir' => DROPZONE_DIR.'/images/file-icons',
Fix for issue #<I> Prefix baseRoute with baseURL to resolve issue #<I>
diff --git a/lib/futures_pipeline/client.rb b/lib/futures_pipeline/client.rb index <HASH>..<HASH> 100644 --- a/lib/futures_pipeline/client.rb +++ b/lib/futures_pipeline/client.rb @@ -18,6 +18,14 @@ module FuturesPipeline get("/api/v1/careers.json", options) end + # Get a single career using O*NET code. + # + # @param onet_soc_code [String] The O*NET code + # @param options [Hash] A customizable set of options. + # @return [Hashie::Mash] + # @example + # @client = FuturesPipeline.new + # @client.career("11-1011.00") def career(onet_soc_code, options={}) api_safe_onet_soc_code = onet_soc_code.tr(".", "-") get("/api/v1/careers/#{api_safe_onet_soc_code}.json", options)
Added documenntation for career method
diff --git a/lib/puppet.rb b/lib/puppet.rb index <HASH>..<HASH> 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -23,7 +23,7 @@ require 'puppet/util/suidmanager' # it's also a place to find top-level commands like 'debug' module Puppet - PUPPETVERSION = '0.25.5' + PUPPETVERSION = '2.6.0' def Puppet.version return PUPPETVERSION
Updated version to <I>
diff --git a/src/extensions/default/CSSCodeHints/main.js b/src/extensions/default/CSSCodeHints/main.js index <HASH>..<HASH> 100644 --- a/src/extensions/default/CSSCodeHints/main.js +++ b/src/extensions/default/CSSCodeHints/main.js @@ -174,10 +174,9 @@ define(function (require, exports, module) { } if (TokenUtils.moveSkippingWhitespace(TokenUtils.moveNextToken, ctx) && ctx.token.string === ":") { adjustCursor = true; - newCursor = cursor; - newCursor.ch = cursor.ch + (hint.length - this.info.name.length); - } - if (!adjustCursor) { + newCursor = { line: cursor.line, + ch: cursor.ch + (hint.length - this.info.name.length) }; + } else { hint += ":"; end.ch++; // Add one for the colon that we're appending. }
Explicitly making a new cursor from the current cursor.
diff --git a/parsl/providers/grid_engine/grid_engine.py b/parsl/providers/grid_engine/grid_engine.py index <HASH>..<HASH> 100644 --- a/parsl/providers/grid_engine/grid_engine.py +++ b/parsl/providers/grid_engine/grid_engine.py @@ -7,7 +7,7 @@ from parsl.providers.cluster_provider import ClusterProvider from parsl.providers.grid_engine.template import template_string from parsl.launchers import SingleNodeLauncher from parsl.providers.provider_base import JobState, JobStatus -from parsl.utils import RepresentationMixin, wtime_to_minutes +from parsl.utils import RepresentationMixin logger = logging.getLogger(__name__) @@ -99,7 +99,7 @@ class GridEngineProvider(ClusterProvider, RepresentationMixin): job_config = {} job_config["submit_script_dir"] = self.channel.script_dir job_config["nodes"] = self.nodes_per_block - job_config["walltime"] = wtime_to_minutes(self.walltime) + job_config["walltime"] = self.walltime job_config["scheduler_options"] = self.scheduler_options job_config["worker_init"] = self.worker_init job_config["user_script"] = command
Fix walltime format for GridEngineProvider GridEngine takes a h_rt attribute that expects HH:MM:SS format or seconds. (#<I>) Previously we incorrectly passed it walltime in minutes. Fixes #<I>
diff --git a/java/src/main/java/cucumber/runtime/java/Java8StepDefinition.java b/java/src/main/java/cucumber/runtime/java/Java8StepDefinition.java index <HASH>..<HASH> 100644 --- a/java/src/main/java/cucumber/runtime/java/Java8StepDefinition.java +++ b/java/src/main/java/cucumber/runtime/java/Java8StepDefinition.java @@ -65,7 +65,7 @@ public class Java8StepDefinition implements StepDefinition { @Override public Integer getParameterCount() { - return pattern.matcher("").groupCount(); + return parameterInfos.size(); } @Override
Update Java8StepDefinition.java I have Arity mismatch error when using Java8 step definitions. Looking at class Java8StepDefinition, I saw that could be solved by returning parameterCounter like JavaStepDefinition actually does. Simple: return parameterInfos.size();
diff --git a/lib/hawkular/base_client.rb b/lib/hawkular/base_client.rb index <HASH>..<HASH> 100644 --- a/lib/hawkular/base_client.rb +++ b/lib/hawkular/base_client.rb @@ -146,14 +146,9 @@ module Hawkular end def tenant_header - if @options[:tenant].nil? - { 'Hawkular-Tenant' => 'hawkular' } - elsif @options[:tenant].empty? - {} - else - { :'Hawkular-Tenant' => @options[:tenant], - 'tenantId' => @options[:tenant] } - end + headers = {} + headers[:'Hawkular-Tenant'] = @options[:tenant] unless @options[:tenant].nil? + headers end def handle_fault(f)
If the tenant is not passed in the options no default value is used. (#<I>)
diff --git a/django_performance_testing/queries.py b/django_performance_testing/queries.py index <HASH>..<HASH> 100644 --- a/django_performance_testing/queries.py +++ b/django_performance_testing/queries.py @@ -81,7 +81,8 @@ class QueryCollector(object): self.queries_about_to_be_reset_handler) return self - def queries_about_to_be_reset_handler(self, signal, sender, queries): + def queries_about_to_be_reset_handler(self, + signal, sender, queries, **kwargs): self.store_queries() self.nr_of_queries_when_entering = 0
signal handles must accept kwargs :(
diff --git a/modernrpc/tests/test_rpc_method_object.py b/modernrpc/tests/test_rpc_method_object.py index <HASH>..<HASH> 100644 --- a/modernrpc/tests/test_rpc_method_object.py +++ b/modernrpc/tests/test_rpc_method_object.py @@ -144,6 +144,20 @@ def multi_line_documented_2(): return "abc" +def test_html_documentation_simple(): + + settings.MODERNRPC_DOC_FORMAT = '' + + rpc_method(single_line_documented, 'dummy_name') + method = RPCMethod(single_line_documented) + assert '*italic*, **strong**, normal text' in method.html_doc + + rpc_method(multi_line_documented_1, 'dummy_name_2') + method = RPCMethod(multi_line_documented_1) + # We ensure no <br/> is added to the text when the original docstring contained single \n characters + assert 'attribute function is read. The indentation should not' in method.html_doc + + def test_html_documentation_markdown(settings): settings.MODERNRPC_DOC_FORMAT = 'md'
Add a test related to PR #7
diff --git a/visidata/plugins.py b/visidata/plugins.py index <HASH>..<HASH> 100644 --- a/visidata/plugins.py +++ b/visidata/plugins.py @@ -140,8 +140,10 @@ class PluginsSheet(JsonLinesSheet): stderr=subprocess.PIPE) out, err = p.communicate() vd.status(out.decode()) + if err: + vd.warning(err.decode()) if p.returncode != 0: - vd.fail('pip install failed:%s' % err.decode()) + vd.fail('pip install failed') else: with vd.urlcache(plugin.url, days=0).open_text(encoding='utf-8') as pyfp: contents = pyfp.read()
[plugins] pip stderr in warning but only fail if returncode is non-zero
diff --git a/tests/test_decimal_fields.py b/tests/test_decimal_fields.py index <HASH>..<HASH> 100644 --- a/tests/test_decimal_fields.py +++ b/tests/test_decimal_fields.py @@ -13,7 +13,7 @@ class DecimalFieldsTest(unittest.TestCase): def setUp(self): self.database = Database('test-db') - self.database.add_setting('allow_experimental_decimal_typez', 1) + self.database.add_setting('allow_experimental_decimal_type', 1) try: self.database.create_table(DecimalModel) except ServerError as e:
re-enable decimals tests
diff --git a/src/Leevel/Support/Fn.php b/src/Leevel/Support/Fn.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Support/Fn.php +++ b/src/Leevel/Support/Fn.php @@ -49,7 +49,7 @@ class Fn try { return $fn(...$args); } catch (Error $th) { - $fnName = is_string($fn) ? $fn : $this->normalizeFn($th); + $fnName = $this->normalizeFn($fn, $th); if ($this->match($fnName)) { return $fn(...$args); @@ -94,22 +94,25 @@ class Fn /** * 整理函数名字. * + * @param string $fn * @param \Error $th * * @return string */ - protected function normalizeFn(Error $th): string + protected function normalizeFn(string $fn, Error $th): string { $message = $th->getMessage(); - $fnMessage = 'Call to undefined function '; + $undefinedFn = 'Call to undefined function '; - if (0 !== strpos($message, $fnMessage)) { + if (0 !== strpos($message, $undefinedFn)) { throw $th; } - $fn = substr($message, strlen($fnMessage), -2); + if (is_string($fn)) { + return $fn; + } - return $fn; + return substr($message, strlen($undefinedFn), -2); } /**
fix: fix Leevel\Support\Fn
diff --git a/client/my-sites/plans/current-plan/current-plan-thank-you-card/free-plan-thank-you-card.js b/client/my-sites/plans/current-plan/current-plan-thank-you-card/free-plan-thank-you-card.js index <HASH>..<HASH> 100644 --- a/client/my-sites/plans/current-plan/current-plan-thank-you-card/free-plan-thank-you-card.js +++ b/client/my-sites/plans/current-plan/current-plan-thank-you-card/free-plan-thank-you-card.js @@ -19,6 +19,7 @@ const FreePlanThankYouCard = ( { translate } ) => ( src="/calypso/images/illustrations/security.svg" /> } + showContinueButton title={ translate( 'Welcome to Jetpack Free!' ) } > <p>
Fix showing continue button for free sites on jetpack connect-flow (#<I>)
diff --git a/eulfedora/models.py b/eulfedora/models.py index <HASH>..<HASH> 100644 --- a/eulfedora/models.py +++ b/eulfedora/models.py @@ -63,7 +63,7 @@ class DatastreamObject(object): is set, it takes precedence over :attr:`content`.''' def __init__(self, obj, id, label, mimetype=None, versionable=False, - state='A', format=None, control_group='M', checksum=None, checksum_type="SHA-1"): + state='A', format=None, control_group='M', checksum=None, checksum_type="MD5"): self.obj = obj self.id = id
restore former default checksum type of MD5
diff --git a/optaplanner-core/src/main/java/org/optaplanner/core/score/holder/AbstractScoreHolder.java b/optaplanner-core/src/main/java/org/optaplanner/core/score/holder/AbstractScoreHolder.java index <HASH>..<HASH> 100644 --- a/optaplanner-core/src/main/java/org/optaplanner/core/score/holder/AbstractScoreHolder.java +++ b/optaplanner-core/src/main/java/org/optaplanner/core/score/holder/AbstractScoreHolder.java @@ -18,7 +18,7 @@ package org.optaplanner.core.score.holder; import java.io.Serializable; -import org.drools.common.AgendaItem; +import org.drools.core.common.AgendaItem; import org.kie.event.rule.ActivationUnMatchListener; import org.kie.runtime.rule.RuleContext; import org.kie.runtime.rule.Session;
Resolve split-packages: move everything from drools-core under org.drools.core: move org.drools.common
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -104,7 +104,10 @@ module.exports = function (settings = {}) { .filter(isNotInExtensions)); neutrino.use(eslint({ test: lintExtensions, - eslint: { baseConfig } + eslint: { + baseConfig, + resolvePluginsRelativeTo: path.resolve(__dirname, '../node_modules/.pnpm') + } })); }; }; \ No newline at end of file
Better integration with symlinked environment
diff --git a/framework/db/sqlite/QueryBuilder.php b/framework/db/sqlite/QueryBuilder.php index <HASH>..<HASH> 100644 --- a/framework/db/sqlite/QueryBuilder.php +++ b/framework/db/sqlite/QueryBuilder.php @@ -29,9 +29,9 @@ class QueryBuilder extends \yii\db\QueryBuilder */ public $typeMap = [ Schema::TYPE_PK => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL', - Schema::TYPE_UPK => 'integer UNSIGNED PRIMARY KEY AUTOINCREMENT NOT NULL', + Schema::TYPE_UPK => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL', Schema::TYPE_BIGPK => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL', - Schema::TYPE_UBIGPK => 'integer UNSIGNED PRIMARY KEY AUTOINCREMENT NOT NULL', + Schema::TYPE_UBIGPK => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL', Schema::TYPE_CHAR => 'char(1)', Schema::TYPE_STRING => 'varchar(255)', Schema::TYPE_TEXT => 'text',
Removed UNSIGNED from primary keys mapping
diff --git a/index.php b/index.php index <HASH>..<HASH> 100644 --- a/index.php +++ b/index.php @@ -48,7 +48,10 @@ try { $default_tree_name = $previous_tree_name ?: Site::getPreference('DEFAULT_GEDCOM'); $tree_name = $request->get('ged', $default_tree_name); $tree = Tree::findByName($tree_name); - Session::put('GEDCOM', $tree_name); + + if ($tree_name) { + Session::put('GEDCOM', $tree_name); + } $request->attributes->set('tree', $tree); $request->attributes->set('user', Auth::user());
Fixes #<I> (#<I>) * Prevent NOTICE about missing "title" attribute * Fixed admin only login with private tree * Fixed reading GEDCOM session parameter * Check tree before storing it in the session
diff --git a/src/YamlUpdater.php b/src/YamlUpdater.php index <HASH>..<HASH> 100644 --- a/src/YamlUpdater.php +++ b/src/YamlUpdater.php @@ -16,11 +16,6 @@ use Symfony\Component\Yaml\Parser; class YamlUpdater { /** - * @var $app Silex\Application - */ - private $app; - - /** * @var Symfony\Component\Yaml\Parser */ private $parser; @@ -61,7 +56,6 @@ class YamlUpdater */ public function __construct(Application $app, $filename = '') { - $this->app = $app; $this->changed = false; $this->filename = $filename; $this->file = new File($app['filesystem']->getManager('config'), $filename);
Remove unneeded $app as a class variable
diff --git a/Controller/Crud/CrudController.php b/Controller/Crud/CrudController.php index <HASH>..<HASH> 100644 --- a/Controller/Crud/CrudController.php +++ b/Controller/Crud/CrudController.php @@ -795,7 +795,7 @@ class CrudController extends Controller $action = $this->actions[$name]; $action->configure(new ActionConfig($this->entityClass)); - return call_user_func_array([$action, 'run'], $args); + return $action->{'run'}(...$args); }
Move CRUD show action to separate service.
diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index <HASH>..<HASH> 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -33,9 +33,11 @@ class GuildChannel extends Channel { super.setup(data); /** * The type of the Guild Channel - * @type {Number} + * @type {String} */ - this.type = data.type; + if (data.type === 0) this.type = 'text'; + else if (data.type === 2) this.type = 'voice'; + else this.type = data.type.toString(); /** * The topic of the Guild Channel, if there is one. * @type {?String}
Indev rewrite - Changed GuildChannel type (#<I>) * Altered GuildChannel.type to return a string containing either "text", "voice" or the id of the channel type. * Fixed typo * Altered code to pass ESLint test (Functionality Unchanged). * Third times the charm.
diff --git a/app/models/shipit/task.rb b/app/models/shipit/task.rb index <HASH>..<HASH> 100644 --- a/app/models/shipit/task.rb +++ b/app/models/shipit/task.rb @@ -13,7 +13,7 @@ module Shipit belongs_to :until_commit, class_name: 'Commit' belongs_to :since_commit, class_name: 'Commit' - has_many :chunks, -> { order(:id) }, class_name: 'OutputChunk', dependent: :destroy + has_many :chunks, -> { order(:id) }, class_name: 'OutputChunk', dependent: :delete_all serialize :definition, TaskDefinition serialize :env, Hash
Use :delete_all instead of :destroy for Task#output_chunks - Tasks with huge output were basically undestroyable without rolling them up first - OutputChunk is a very lightweight record anyway, so it's unlikely to have any kind of callbacks in the future.
diff --git a/linebot/models/filter.py b/linebot/models/filter.py index <HASH>..<HASH> 100644 --- a/linebot/models/filter.py +++ b/linebot/models/filter.py @@ -36,8 +36,8 @@ class Filter(with_metaclass(ABCMeta, Base)): :param demographic: Combination of different criteria using logical operator objects. - :type demographic: :py:class:`linebot.model.DemographicFilter` | - :py:class:`linebot.model.Operator` + :type demographic: :py:class:`linebot.model.filter.DemographicFilter` | + :py:class:`linebot.model.operator.Operator` :param kwargs: """ super(Filter, self).__init__(**kwargs)
modify class names (#<I>)
diff --git a/lib/filter_factory/active_record/condition.rb b/lib/filter_factory/active_record/condition.rb index <HASH>..<HASH> 100644 --- a/lib/filter_factory/active_record/condition.rb +++ b/lib/filter_factory/active_record/condition.rb @@ -26,7 +26,7 @@ module FilterFactory end def all(_obj) - fail NotImplementedError, "all operator is not available for ActiveRecord" + fail NotImplementedError, 'all operator is not available for ActiveRecord' end def is_in(obj) @@ -42,7 +42,7 @@ module FilterFactory end def exists(_obj) - fail NotImplementedError, "exists operator is not available for ActiveRecord" + fail NotImplementedError, 'exists operator is not available for ActiveRecord' end def presents(obj)
Use single-quoted strings without interpolation.
diff --git a/daemon/pod/exec.go b/daemon/pod/exec.go index <HASH>..<HASH> 100644 --- a/daemon/pod/exec.go +++ b/daemon/pod/exec.go @@ -81,11 +81,7 @@ func (wc *waitClose) Close() error { type writeCloser struct { io.Writer - closer io.Closer -} - -func (wc *writeCloser) Close() error { - return wc.closer.Close() + io.Closer } func (p *XPod) StartExec(stdin io.ReadCloser, stdout io.WriteCloser, containerId, execId string) error {
simplify writeCloser Embedded types are enough here.
diff --git a/concrete/src/Block/BlockType/BlockTypeList.php b/concrete/src/Block/BlockType/BlockTypeList.php index <HASH>..<HASH> 100644 --- a/concrete/src/Block/BlockType/BlockTypeList.php +++ b/concrete/src/Block/BlockType/BlockTypeList.php @@ -2,6 +2,7 @@ namespace Concrete\Core\Block\BlockType; use Concrete\Core\Entity\Block\BlockType\BlockType as BlockTypeEntity; +use Concrete\Core\Support\Facade\Application; use Core; use Loader; use Package; @@ -88,7 +89,7 @@ class BlockTypeList extends DatabaseItemList $bt = new BlockTypeEntity(); $bt->setBlockTypeHandle($file); $class = $bt->getBlockTypeClass(); - $bta = new $class(); + $bta = Application::getFacadeRoot()->make($class); $bt->setBlockTypeName($bta->getBlockTypeName()); $bt->setBlockTypeDescription($bta->getBlockTypeDescription()); $bt->hasCustomViewTemplate = file_exists(DIR_FILES_BLOCK_TYPES . '/' . $file . '/' . FILENAME_BLOCK_VIEW);
Update BlockTypeList.php The block object isn't created the correct way. The error popped up when creating a new BlockType with additional constructor parameters.
diff --git a/lib/bank_scrap/banks/ing.rb b/lib/bank_scrap/banks/ing.rb index <HASH>..<HASH> 100644 --- a/lib/bank_scrap/banks/ing.rb +++ b/lib/bank_scrap/banks/ing.rb @@ -18,7 +18,7 @@ module BankScrap def initialize(user, password, log: false, debug: false, extra_args:) @dni = user @password = password.to_s - @birthday = extra_args['birthday'] + @birthday = extra_args.with_indifferent_access['birthday'] @log = log @debug = debug
ING: Allow both symbols and strings as key for extra_args
diff --git a/pkg/plugins/dashboard_importer.go b/pkg/plugins/dashboard_importer.go index <HASH>..<HASH> 100644 --- a/pkg/plugins/dashboard_importer.go +++ b/pkg/plugins/dashboard_importer.go @@ -97,6 +97,8 @@ func ImportDashboard(cmd *ImportDashboardCommand) error { ImportedUrl: savedDash.GetUrl(), ImportedRevision: dashboard.Data.Get("revision").MustInt64(1), Imported: true, + DashboardId: savedDash.Id, + Slug: savedDash.Slug, } return nil
API: added dashboardId and slug in response after import (#<I>)
diff --git a/src/QueryBuilders/Postgres/PostgresQuery.php b/src/QueryBuilders/Postgres/PostgresQuery.php index <HASH>..<HASH> 100644 --- a/src/QueryBuilders/Postgres/PostgresQuery.php +++ b/src/QueryBuilders/Postgres/PostgresQuery.php @@ -129,7 +129,9 @@ class PostgresQuery implements QueryInterface $query = $this->type . ' INTO '; $query .= '"' . $this->table . '" '; if (!empty($this->columns)) { - $query .= '(' . $this->compileColumns() . ') '; + $columns = $this->compileColumns(); + $columns = str_replace('"' . $this->table . '".','', $columns); + $query .= '(' . $columns . ') '; } $query .= 'VALUES '; $query .= $this->compileRecords();
Fixed an issue with column compilation for Postgres
diff --git a/tcex/tcex_batch_v2.py b/tcex/tcex_batch_v2.py index <HASH>..<HASH> 100644 --- a/tcex/tcex_batch_v2.py +++ b/tcex/tcex_batch_v2.py @@ -788,7 +788,7 @@ class Group(object): self._group_data['attribute'].append(attr.data) else: self.tcex.log.debug('Invalid attribute value ({}) for type ({}).'.format( - attr.type, attr.value)) + attr.value, attr.type)) # add security labels if self._labels: self._group_data['securityLabel'] = [] @@ -1271,6 +1271,9 @@ class Indicator(object): for attr in self._attributes: if attr.valid: self._indicator_data['attribute'].append(attr.data) + else: + self.tcex.log.debug('Invalid attribute value ({}) for type ({}).'.format( + attr.value, attr.type)) # add file actions if self._file_actions: self._indicator_data.setdefault('fileAction', {}) @@ -1293,6 +1296,8 @@ class Indicator(object): for tag in self._tags: if tag.valid: self._indicator_data['tag'].append(tag.data) + else: + self.tcex.log.debug('Invalid tag value ({}).'.format(tag.name)) return self._indicator_data @property
+ added validation of tag name and attribute value to prevent null values in JSON.
diff --git a/csr/csr.go b/csr/csr.go index <HASH>..<HASH> 100644 --- a/csr/csr.go +++ b/csr/csr.go @@ -274,6 +274,9 @@ func getHosts(cert *x509.Certificate) []string { for _, dns := range cert.DNSNames { hosts = append(hosts, dns) } + for _, email := range cert.EmailAddresses { + hosts = append(hosts, email) + } return hosts }
added e-mail address retrieval to getHosts()
diff --git a/stacktrace.go b/stacktrace.go index <HASH>..<HASH> 100644 --- a/stacktrace.go +++ b/stacktrace.go @@ -23,10 +23,10 @@ type Stacktrace struct { func (s *Stacktrace) Class() string { return "sentry.interfaces.Stacktrace" } func (s *Stacktrace) Culprit() string { - if len(s.Frames) > 0 { - f := s.Frames[len(s.Frames)-1] - if f.Module != "" && f.Function != "" { - return f.Module + "." + f.Function + for i := len(s.Frames) - 1; i >= 0; i-- { + frame := s.Frames[i] + if *frame.InApp == true && frame.Module != "" && frame.Function != "" { + return frame.Module + "." + frame.Function } } return ""
Only report in-app culprits. Closes cupcake/raven-go#<I>. Condense initializer
diff --git a/pandas/tests/test_downstream.py b/pandas/tests/test_downstream.py index <HASH>..<HASH> 100644 --- a/pandas/tests/test_downstream.py +++ b/pandas/tests/test_downstream.py @@ -92,6 +92,7 @@ def test_pandas_datareader(): pandas_datareader.get_data_google('AAPL') +@pytest.mark.xfail(reason="install not working, gh-18780") def test_geopandas(): geopandas = import_module('geopandas') # noqa
TST: xfail geopandas downstream test (#<I>) xref #<I>
diff --git a/spec/unit/timeout_spec.rb b/spec/unit/timeout_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/timeout_spec.rb +++ b/spec/unit/timeout_spec.rb @@ -96,7 +96,7 @@ describe 'Flor unit' do exid = @unit.launch(flon) - sleep 0.350 + sleep 0.777 expect( @unit.timers.collect { |t|
Slow down timeout spec for JRuby
diff --git a/pyimgur/request.py b/pyimgur/request.py index <HASH>..<HASH> 100644 --- a/pyimgur/request.py +++ b/pyimgur/request.py @@ -92,9 +92,12 @@ def send_request(url, params=None, method='GET', data_field='data', if data_field is not None: content = content[data_field] if not resp.ok: - error_msg = "Imgur ERROR message: {}".format(content['error']) - print(error_msg) - print("-" * len(error_msg)) + try: + error_msg = "Imgur ERROR message: {}".format(content['error']) + print(error_msg) + print("-" * len(error_msg)) + except Exception: + pass resp.raise_for_status() ratelimit_info = {key: int(value) for (key, value) in resp.headers.items() if key.startswith('x-ratelimit')}
Wrap imgur error in try... except If the response isn't json with a error key, such as a <I> bad request, then the error handling would error out.
diff --git a/src/packet/secret_key.js b/src/packet/secret_key.js index <HASH>..<HASH> 100644 --- a/src/packet/secret_key.js +++ b/src/packet/secret_key.js @@ -324,7 +324,7 @@ async function produceEncryptionKey(s2k, passphrase, algorithm) { * @async */ SecretKey.prototype.decrypt = async function (passphrase) { - if (this.s2k.type === 'gnu-dummy') { + if (this.s2k && this.s2k.type === 'gnu-dummy') { this.isEncrypted = false; return false; } @@ -336,8 +336,10 @@ SecretKey.prototype.decrypt = async function (passphrase) { let key; if (this.s2k_usage === 254 || this.s2k_usage === 253) { key = await produceEncryptionKey(this.s2k, passphrase, this.symmetric); + } else if (this.s2k_usage === 255) { + throw new Error('Encrypted private key is authenticated using an insecure two-byte hash'); } else { - throw new Error('Unsupported legacy encrypted key'); + throw new Error('Private key is encrypted using an insecure S2K function: unsalted MD5'); } let cleartext;
Fix error message for legacy encrypted private keys
diff --git a/src/Drupal/DrupalExtension/Context/DrupalContext.php b/src/Drupal/DrupalExtension/Context/DrupalContext.php index <HASH>..<HASH> 100644 --- a/src/Drupal/DrupalExtension/Context/DrupalContext.php +++ b/src/Drupal/DrupalExtension/Context/DrupalContext.php @@ -195,7 +195,7 @@ class DrupalContext extends MinkContext implements DrupalAwareInterface, Transla * * @return \Behat\Mink\Element\NodeElement|NULL */ - private function getRegion($region) { + protected function getRegion($region) { $session = $this->getSession(); $regionObj = $session->getPage()->find('region', $region); if (!$regionObj) {
Issue #<I> by Vanille: Added Function to get region from region_map().
diff --git a/src/java/voldemort/utils/ByteBufferBackedInputStream.java b/src/java/voldemort/utils/ByteBufferBackedInputStream.java index <HASH>..<HASH> 100644 --- a/src/java/voldemort/utils/ByteBufferBackedInputStream.java +++ b/src/java/voldemort/utils/ByteBufferBackedInputStream.java @@ -56,7 +56,7 @@ public class ByteBufferBackedInputStream extends InputStream { if(!buffer.hasRemaining()) return -1; - return buffer.get(); + return buffer.get() & 0xff; } @Override
Fixed error where negative byte values were read causing the DataInputStream to throw an EOFException.
diff --git a/py/selenium/webdriver/remote/webelement.py b/py/selenium/webdriver/remote/webelement.py index <HASH>..<HASH> 100644 --- a/py/selenium/webdriver/remote/webelement.py +++ b/py/selenium/webdriver/remote/webelement.py @@ -203,7 +203,10 @@ class WebElement(object): return self._id def __eq__(self, element): - return self._id == element.id + if self._id == element.id + return True + else + return self._execute(Command.ELEMENT_EQUALS, {'other': element.id})['value'] # Private Methods def _execute(self, command, params=None):
Bring python implementation of web element equality in conformance with other languages
diff --git a/register.js b/register.js index <HASH>..<HASH> 100644 --- a/register.js +++ b/register.js @@ -1,9 +1,9 @@ var pug = require('./'); -var resolvedPug = require.resolve('./'); +var resolvedPug = JSON.stringify(require.resolve('./')); function compileTemplate(module, filename) { var template = pug.compileFileClient(filename, {inlineRuntimeFunctions: false}); - var body = "var pug = require('" + resolvedPug + "').runtime;\n\n" + + var body = "var pug = require(" + resolvedPug + ").runtime;\n\n" + "module.exports = " + template + ";"; module._compile(body, filename); }
Fixed register.js for Windows. (#<I>)
diff --git a/webhook/client_handler_test.go b/webhook/client_handler_test.go index <HASH>..<HASH> 100644 --- a/webhook/client_handler_test.go +++ b/webhook/client_handler_test.go @@ -28,7 +28,7 @@ func Example() { } defer req.Body.Close() - fmt.Fprintf(w, "Received signed event: %t", event) + fmt.Fprintf(w, "Received signed event: %v", event) }) log.Fatal(http.ListenAndServe(":8080", nil)) }
Correct `Fprintf` format verb Go-tip is failing because it looks like `Fprintf` got a little more picky about the use of inappropriate verbs. `%t` is meant to be used for booleans (it prints the word "true" or "false"). I think what we actually wanted here was `%v`.
diff --git a/tests/framework/web/CUploadedFileTest.php b/tests/framework/web/CUploadedFileTest.php index <HASH>..<HASH> 100644 --- a/tests/framework/web/CUploadedFileTest.php +++ b/tests/framework/web/CUploadedFileTest.php @@ -100,7 +100,7 @@ class CUploadedFileTest extends CTestCase * * @see https://github.com/yiisoft/yii/issues/159 */ - public function testGetInstanceByNamePartOfOtherName() + public function testGetInstancesByNamePartOfOtherName() { $baseInputName='base_name'; $tailedInputName=$baseInputName.'_tail'; @@ -120,7 +120,8 @@ class CUploadedFileTest extends CTestCase 'size'=>100, ); - $uploadedFile=CUploadedFile::getInstanceByName($tailedInputName); - $this->assertEquals($_FILES[$baseInputName]['name'],$uploadedFile->getName(),'Wrong file fetched!'); + $uploadedFiles=CUploadedFile::getInstancesByName($baseInputName); + foreach($uploadedFiles as $uploadedFile) + $this->assertEquals($_FILES[$baseInputName]['name'],$uploadedFile->getName(),'Wrong file fetched!'); } }
Test case "CUploadedFileTest::testGetInstancesByNamePartOfOtherName()" has been fixed to expose issue #<I>.
diff --git a/redash_client.py b/redash_client.py index <HASH>..<HASH> 100644 --- a/redash_client.py +++ b/redash_client.py @@ -9,14 +9,12 @@ class RedashClient(object): self.api_key = api_key def new_query(self, name, query_string, data_source_id): - r0 = requests.post( + query_id = requests.post( self.BASE_URL + "/queries?api_key=" + self.api_key, data = json.dumps({"name": name, "query": query_string, "data_source_id": data_source_id}), - ).json() - - query_id = r0["id"] + ).json()["id"] - r1 = requests.post( + requests.post( self.BASE_URL + "/queries/" + str(query_id) + "/refresh?api_key=" + self.api_key ).json()
Cleaning up new_query() function.
diff --git a/tests/test_serialization.py b/tests/test_serialization.py index <HASH>..<HASH> 100644 --- a/tests/test_serialization.py +++ b/tests/test_serialization.py @@ -15,6 +15,7 @@ from nose_parameterized import parameterized from unittest import TestCase +from zipline.finance.trading import TradingEnvironment from .serialization_cases import ( object_serialization_cases, @@ -36,6 +37,9 @@ def gather_bad_dicts(state): class SerializationTestCase(TestCase): + @classmethod + def setUpClass(cls): + cls.env = TradingEnvironment.instance() @parameterized.expand(object_serialization_cases()) def test_object_serialization(self,
TEST: Object serialization test requires a trading environment The object serialization test case requires a trading environment because risk report generation requires treasury curves.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,8 @@ setup( include_package_data = True, install_requires = [ 'Django >= 1.6', + # Form helper. + 'django-crispy-forms >= 1.4', # Needed for address field. 'django-countries >= 2.0', ],
Added django-crispy-forms dependency.
diff --git a/src/Illuminate/Database/Seeder.php b/src/Illuminate/Database/Seeder.php index <HASH>..<HASH> 100755 --- a/src/Illuminate/Database/Seeder.php +++ b/src/Illuminate/Database/Seeder.php @@ -2,6 +2,7 @@ namespace Illuminate\Database; +use Illuminate\Support\Arr; use InvalidArgumentException; use Illuminate\Console\Command; use Illuminate\Container\Container; @@ -31,7 +32,7 @@ abstract class Seeder */ public function call($class, $silent = false) { - $classes = is_array($class) ? $class : (array) $class; + $classes = Arr::wrap($class); foreach ($classes as $class) { if ($silent === false && isset($this->command)) {
Use Arr::wrap when calling seeders (#<I>)
diff --git a/wss-agent-report/src/main/java/org/whitesource/agent/report/PolicyCheckReport.java b/wss-agent-report/src/main/java/org/whitesource/agent/report/PolicyCheckReport.java index <HASH>..<HASH> 100644 --- a/wss-agent-report/src/main/java/org/whitesource/agent/report/PolicyCheckReport.java +++ b/wss-agent-report/src/main/java/org/whitesource/agent/report/PolicyCheckReport.java @@ -22,7 +22,6 @@ import freemarker.template.Configuration; import freemarker.template.Template; import freemarker.template.TemplateException; import org.apache.commons.collections.MapUtils; -import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.whitesource.agent.api.dispatch.BaseCheckPoliciesResult; import org.whitesource.agent.api.model.PolicyCheckResourceNode; @@ -242,7 +241,7 @@ public class PolicyCheckReport { protected void writeToFile(File file, String json) throws IOException { FileWriter fw = new FileWriter(file); try { - fw.write(StringEscapeUtils.unescapeJava(json)); + fw.write(json); fw.flush(); } finally { FileUtils.close(fw);
WSE-<I> - undo escaping to the json
diff --git a/src/sap.ui.unified/src/sap/ui/unified/CalendarMonthInterval.js b/src/sap.ui.unified/src/sap/ui/unified/CalendarMonthInterval.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.unified/src/sap/ui/unified/CalendarMonthInterval.js +++ b/src/sap.ui.unified/src/sap/ui/unified/CalendarMonthInterval.js @@ -443,6 +443,8 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/core/Control', 'sap/ui/core/LocaleDa } } + return this; + }; CalendarMonthInterval.prototype._getMonths = function(){ @@ -488,6 +490,8 @@ sap.ui.define(['jquery.sap.global', 'sap/ui/core/Control', 'sap/ui/core/LocaleDa oYearPicker.setYears(6); } + return this; + }; CalendarMonthInterval.prototype.setMinDate = function(oDate){
[INTERNAL] sap.ui.unified.CalendarMonthInterval - Correct context is now returned from setters -setMonths return correct context - setPickerPopup return correct context - Global qunit test will be added with gerrit change <I> Change-Id: I<I>b<I>c<I>a4c4f5fc<I>e9ed<I>a<I>bc
diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index <HASH>..<HASH> 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -225,14 +225,16 @@ const hygiene = exports.hygiene = (some, options) => { }); } - const program = tslint.Linter.createProgram("src/tsconfig.json"); + const program = tslint.Linter.createProgram('src/tsconfig.json'); const configuration = tslint.Configuration.findConfiguration('tslint-hygiene.json', '.'); const tslintOptions = { fix: false, formatter: 'json' }; const linter = new tslint.Linter(tslintOptions, program); const tsl = es.through(function (file) { const contents = file.contents.toString('utf8'); - linter.lint(file.relative, contents, configuration.results); + if (file.relative.startsWith('src/')) { // only lint files in src program + linter.lint(file.relative, contents, configuration.results); + } this.emit('data', file); });
ensure to only lint files in the src program
diff --git a/laravel/bootstrap/app.php b/laravel/bootstrap/app.php index <HASH>..<HASH> 100644 --- a/laravel/bootstrap/app.php +++ b/laravel/bootstrap/app.php @@ -7,7 +7,7 @@ $DB_CONNECTION = $_SERVER['DB_CONNECTION'] ?? $_ENV['DB_CONNECTION'] ?? 'testin $config = ['env' => ['APP_KEY="'.$APP_KEY.'"', 'DB_CONNECTION="'.$DB_CONNECTION.'"'], 'providers' => []]; -$app = (new Commander($config, realpath(__DIR__.'/../../')))->laravel(); +$app = (new Commander($config, getcwd()))->laravel(); unset($APP_KEY, $DB_CONNECTION, $config);
Use getcwd() to determine working path.
diff --git a/phy/cluster/manual/session.py b/phy/cluster/manual/session.py index <HASH>..<HASH> 100644 --- a/phy/cluster/manual/session.py +++ b/phy/cluster/manual/session.py @@ -61,6 +61,15 @@ class BaseSession(EventEmitter): return func + @property + def actions(self): + """List of registered actions.""" + return self._actions + + def execute_action(self, action, *args, **kwargs): + """Execute an action defined by an item in the 'actions' list.""" + action['func'](*args, **kwargs) + #------------------------------------------------------------------------------ # Store items diff --git a/phy/cluster/manual/tests/test_session.py b/phy/cluster/manual/tests/test_session.py index <HASH>..<HASH> 100644 --- a/phy/cluster/manual/tests/test_session.py +++ b/phy/cluster/manual/tests/test_session.py @@ -118,6 +118,10 @@ def test_action(): session.my_action() assert _track == ['action'] + assert session.actions == [{'func': my_action, 'title': 'My action'}] + session.execute_action(session.actions[0]) + assert _track == ['action', 'action'] + def test_action_event(): session = BaseSession()
Added actions property in session. Closes #<I>.
diff --git a/src/_utils/reakitTheme.js b/src/_utils/reakitTheme.js index <HASH>..<HASH> 100644 --- a/src/_utils/reakitTheme.js +++ b/src/_utils/reakitTheme.js @@ -22,6 +22,12 @@ const buildFontSizeFromTheme = (property, { theme, ...props }) => { return `${property}: ${size}em !important;`; }; +const buildFontWeightFromTheme = (property, { theme, ...props }) => { + let weight = theme.fannypack.fontWeights[props[_camelCase(property)]]; + if (!weight) return; + return `${property}: ${weight} !important;`; +}; + export default { Box: css` /* If the color is one from the palette, use it. E.g. background-color="primary" */ @@ -55,5 +61,7 @@ export default { ${props => buildSpacingFromTheme('padding-bottom', props)}; ${props => buildFontSizeFromTheme('font-size', props)}; + + ${props => buildFontWeightFromTheme('font-weight', props)}; ` };
Add ability to specify font weight from theme for the fontWeight prop
diff --git a/test/mp/runtime/directives/class.spec.js b/test/mp/runtime/directives/class.spec.js index <HASH>..<HASH> 100644 --- a/test/mp/runtime/directives/class.spec.js +++ b/test/mp/runtime/directives/class.spec.js @@ -254,4 +254,25 @@ describe(':class', () => { expectRootClass('foo a') }).then(done) }) + + it('class merge between parent and child and only static class on parent', () => { + function expectRootClass (expected) { + expect(page.data.$root['0v0'].h[0].rcl).toBe(expected) + } + + const pageOptions = { + mpType: 'page', + template: '<child class="a" ></child>', + data: { value: 'b' }, + components: { + child: { + template: '<div class="c"></div>' + } + } + } + + const { page } = createPage(pageOptions) + + expectRootClass('a') + }) })
test: add test for merging only static parent class
diff --git a/lib/js/app/components/explorer/EmbedHTML.js b/lib/js/app/components/explorer/EmbedHTML.js index <HASH>..<HASH> 100644 --- a/lib/js/app/components/explorer/EmbedHTML.js +++ b/lib/js/app/components/explorer/EmbedHTML.js @@ -65,6 +65,7 @@ class EmbedHTML extends Component { propertyNames, latest, percentile, + chartType, steps, stepLabels = '', } = this.props.ui; @@ -109,7 +110,7 @@ class EmbedHTML extends Component { params.push(` steps: [ ${stepsParams.join(',\n ')} ]\n`); - + if (stepLabels.length) { stepLabelsString = `,\n labels: ${JSON.stringify(stepLabels)}`; } @@ -135,21 +136,22 @@ class EmbedHTML extends Component { min-height: 300px; } </style> - + <script> const chart = new KeenDataviz({ container: '#demo_container', // querySelector + type: '${chartType}', title: false ${ stepLabels && stepLabelsString ? stepLabelsString : '' } }); - + // Use keen-analysis.js to run a query const client = new KeenAnalysis({ projectId: '${projectId}', readKey: '${readKey}' }); - + client .query({ ${params.join('')} })
fix: 🐛 embed code add chart type to embed code feature
diff --git a/lib/api/gitlab.js b/lib/api/gitlab.js index <HASH>..<HASH> 100644 --- a/lib/api/gitlab.js +++ b/lib/api/gitlab.js @@ -498,7 +498,10 @@ async function createFile(branchName, filePath, fileContents, message) { content: Buffer.from(fileContents).toString('base64'), }; } else { - url = `projects/${config.repoName}/repository/files/${filePath}`; + url = `projects/${config.repoName}/repository/files/${filePath.replace( + /\//g, + '%2F' + )}`; opts.body = { branch: branchName, commit_message: message, @@ -523,7 +526,10 @@ async function updateFile(branchName, filePath, fileContents, message) { content: Buffer.from(fileContents).toString('base64'), }; } else { - url = `projects/${config.repoName}/repository/files/${filePath}`; + url = `projects/${config.repoName}/repository/files/${filePath.replace( + /\//g, + '%2F' + )}`; opts.body = { branch: branchName, commit_message: message,
Fix: filepath encoding for gitlab createFile and updateFile (#<I>) Relates to #<I> and #<I> Auto detected file names are not encoded correctly so here's a fix for that.
diff --git a/container/lxd/container.go b/container/lxd/container.go index <HASH>..<HASH> 100644 --- a/container/lxd/container.go +++ b/container/lxd/container.go @@ -270,7 +270,7 @@ func (s *Server) CreateContainerFromSpec(spec ContainerSpec) (*Container, error) op, err := s.CreateContainerFromImage(spec.Image.LXDServer, *spec.Image.Image, req) if err != nil { if IsLXDAlreadyExists(err) { - container, runningErr := s.waitForContainerToRunningState(spec, ephemeral) + container, runningErr := s.waitForRunningContainer(spec, ephemeral) if runningErr != nil { // It's actually more helpful to display the original error // message, but we'll also log out what the new error message @@ -312,7 +312,7 @@ func (s *Server) CreateContainerFromSpec(spec ContainerSpec) (*Container, error) return &c, nil } -func (s *Server) waitForContainerToRunningState(spec ContainerSpec, ephemeral bool) (*api.Container, error) { +func (s *Server) waitForRunningContainer(spec ContainerSpec, ephemeral bool) (*api.Container, error) { var container *api.Container err := retry.Call(retry.CallArgs{ Func: func() error {
Better naming for waiting for running state method
diff --git a/lib/beaker/hypervisor/vagrant.rb b/lib/beaker/hypervisor/vagrant.rb index <HASH>..<HASH> 100644 --- a/lib/beaker/hypervisor/vagrant.rb +++ b/lib/beaker/hypervisor/vagrant.rb @@ -201,7 +201,8 @@ module Beaker f.write(ssh_config) f.rewind - host['ssh'] = {:config => f.path()} + + host['ssh'] = host['ssh'].merge(Net::SSH.configuration_for(host['ip'], f.path)) host['user'] = user @temp_files << f end
(BKR-<I>) Fix SSH settings in nodesets Allow SSH settings from nodesets to propagate properly into the host's SSH configuration. BKR-<I> #close
diff --git a/nats/js/client.py b/nats/js/client.py index <HASH>..<HASH> 100644 --- a/nats/js/client.py +++ b/nats/js/client.py @@ -303,7 +303,7 @@ class JetStreamContext(JetStreamManager): if cb and not manual_ack: cb = self._auto_ack_callback(cb) if config.deliver_subject is None: - config.deliver_subject = self._nc.new_inbox() + raise TypeError("config.deliver_subject is required") sub = await self._nc.subscribe( subject=config.deliver_subject, queue=config.deliver_group or "",
require deliver_subject in JS subscribe_bind
diff --git a/lib/negroku/modes/app.rb b/lib/negroku/modes/app.rb index <HASH>..<HASH> 100644 --- a/lib/negroku/modes/app.rb +++ b/lib/negroku/modes/app.rb @@ -15,6 +15,7 @@ module Negroku::Modes ask_features custom_capify data + install_binstubs end @@ -37,6 +38,10 @@ module Negroku::Modes end + def install_binstubs + `bundle binstub capistrano negroku` + end + # This code was exatracted from capistrano to be used with our own templates # https://github.com/capistrano/capistrano/blob/68e7632c5f16823a09c324d556a208e096abee62/lib/capistrano/tasks/install.rake def custom_capify(data={}, config=nil)
feat(app): run bundle binstub on app creation
diff --git a/src/main/java/org/junit/runners/model/FrameworkMethod.java b/src/main/java/org/junit/runners/model/FrameworkMethod.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/junit/runners/model/FrameworkMethod.java +++ b/src/main/java/org/junit/runners/model/FrameworkMethod.java @@ -69,6 +69,15 @@ public class FrameworkMethod { + " should have no parameters")); } + + /** + * Adds to {@code errors} if this method: + * <ul> + * <li>is not public, or + * <li>returns something other than void, or + * <li>is static (given {@code isStatic is false}), or + * <li>is not static (given {@code isStatic is true}). + */ public void validatePublicVoid(boolean isStatic, List<Throwable> errors) { if (Modifier.isStatic(fMethod.getModifiers()) != isStatic) { String state= isStatic ? "should" : "should not";
Javadoc on FrameworkMethod augmented
diff --git a/salt/cloud/clouds/vsphere.py b/salt/cloud/clouds/vsphere.py index <HASH>..<HASH> 100644 --- a/salt/cloud/clouds/vsphere.py +++ b/salt/cloud/clouds/vsphere.py @@ -367,6 +367,9 @@ def _deploy(vm_): ), 'sudo_password': config.get_cloud_config_value( 'sudo_password', vm_, __opts__, default=None + ), + 'key_filename': config.get_cloud_config_value( + 'key_filename', vm_, __opts__, default=None ) }
adding key_filename param to vsphere provider
diff --git a/src/event.js b/src/event.js index <HASH>..<HASH> 100644 --- a/src/event.js +++ b/src/event.js @@ -72,12 +72,9 @@ jQuery.event = { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded - return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; + return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; } // Handle multiple events separated by a space @@ -146,8 +143,6 @@ jQuery.event = { jQuery.event.global[ type ] = true; } - // Nullify elem to prevent memory leaks in IE - elem = null; }, // Detach an event or set of events from an element
Event: Fix #<I>. Remove elem from event handle, close gh-<I>. This also reduces memory leaks if the element is removed without cleaning events (e.g with native DOM operations). Not pickable into the 1.x branch because oldIE still needs this.
diff --git a/src/utils/types.js b/src/utils/types.js index <HASH>..<HASH> 100644 --- a/src/utils/types.js +++ b/src/utils/types.js @@ -59,6 +59,8 @@ const types = { enableQueryRules: bool, enableSearchRelevancy: bool, recordAnalytics: bool, + emptyQuery: bool, + suggestionAnalytics: bool, userId: string, useCache: bool, customEvents: object, // eslint-disable-line
fix: revert wrongly removed properties
diff --git a/Connection.php b/Connection.php index <HASH>..<HASH> 100644 --- a/Connection.php +++ b/Connection.php @@ -73,6 +73,11 @@ use Yii; class Connection extends Component { /** + * @event Event an event that is triggered after a DB connection is established + */ + const EVENT_AFTER_OPEN = 'afterOpen'; + + /** * @var string host:port * * Correct syntax is: @@ -233,6 +238,7 @@ class Connection extends Component $options['db'] = $this->defaultDatabaseName; } $this->mongoClient = new \MongoClient($this->dsn, $options); + $this->initConnection(); Yii::endProfile($token, __METHOD__); } catch (\Exception $e) { Yii::endProfile($token, __METHOD__); @@ -253,4 +259,14 @@ class Connection extends Component $this->_databases = []; } } + + /** + * Initializes the DB connection. + * This method is invoked right after the DB connection is established. + * The default implementation triggers an [[EVENT_AFTER_OPEN]] event. + */ + protected function initConnection() + { + $this->trigger(self::EVENT_AFTER_OPEN); + } } \ No newline at end of file
mongodb method "open" not triggered event "after open connection"
diff --git a/lib/cloudformer/stack.rb b/lib/cloudformer/stack.rb index <HASH>..<HASH> 100644 --- a/lib/cloudformer/stack.rb +++ b/lib/cloudformer/stack.rb @@ -105,7 +105,7 @@ class Stack end printed.concat(printable_events.map(&:event_id)) break if !stack.status.match(/_COMPLETE$/).nil? - sleep(5) + sleep(30) end end end diff --git a/lib/cloudformer/version.rb b/lib/cloudformer/version.rb index <HASH>..<HASH> 100644 --- a/lib/cloudformer/version.rb +++ b/lib/cloudformer/version.rb @@ -1,3 +1,3 @@ module Cloudformer - VERSION = "0.0.6" + VERSION = "0.0.7" end
Reducing the poll time for stack events.
diff --git a/amaascore/transactions/mtm_result.py b/amaascore/transactions/mtm_result.py index <HASH>..<HASH> 100644 --- a/amaascore/transactions/mtm_result.py +++ b/amaascore/transactions/mtm_result.py @@ -55,7 +55,7 @@ class MTMResult(AMaaSModel): @mtm_value.setter def mtm_value(self, val): - if not isinstance(val, Decimal): + if not isinstance(val, Decimal) and val is not None: self._mtm_value = Decimal(val) else: self._mtm_value = val \ No newline at end of file diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ requires = [ setup( name='amaascore', - version='0.5.18', + version='0.5.19', description='Asset Management as a Service - Core SDK', license='Apache License 2.0', url='https://github.com/amaas-fintech/amaas-core-sdk-python',
made mtm_value nullable
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -43,6 +43,9 @@ let request = module.exports._requestDefaults(); query.limit = query.limit || 50; query.sort = query.sort || '_id'; + const __no_skip__ = !!query.__no_skip__; + delete query.__no_skip__; + module.exports[type](query, function typeCb(typeErr, res, body) { if (typeErr) { return done(typeErr); } @@ -53,7 +56,7 @@ let request = module.exports._requestDefaults(); return done(null); } - if (!query.__no_skip__) { + if (!__no_skip__) { query.skip += query.limit; }
fix(api): prevent `__no_skip__` being sent as query parameter
diff --git a/lib/mongo/cluster.rb b/lib/mongo/cluster.rb index <HASH>..<HASH> 100644 --- a/lib/mongo/cluster.rb +++ b/lib/mongo/cluster.rb @@ -472,19 +472,11 @@ module Mongo end def servers_list - @update_lock.synchronize do - @servers.reduce([]) do |servers, server| - servers << server - end - end + @update_lock.synchronize { @servers.dup } end def addresses_list - @update_lock.synchronize do - @addresses.reduce([]) do |addresses, address| - addresses << address - end - end + @update_lock.synchronize { @addresses.dup } end end end
RUBY-<I> No reason to use reduce, just dup instead
diff --git a/lib/pysynphot/spectrum.py b/lib/pysynphot/spectrum.py index <HASH>..<HASH> 100644 --- a/lib/pysynphot/spectrum.py +++ b/lib/pysynphot/spectrum.py @@ -518,6 +518,12 @@ class CompositeSourceSpectrum(SourceSpectrum): if self.operation == 'multiply': return self.component1(wavelength) * self.component2(wavelength) + def __iter__(self): + """ Allow iteration over each component. """ + + complist = self.complist() + return complist.__iter__() + def complist(self): ans=[] for comp in (self.component1, self.component2):
Add an iterator to CompositeSourceSpectrum, for the use of callers that want to inspect its pieces git-svn-id: <URL>
diff --git a/tests/unit/test_http.py b/tests/unit/test_http.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_http.py +++ b/tests/unit/test_http.py @@ -216,7 +216,6 @@ class TestHTTP(object): conn = serve.recv() for request in conn: conn.socket.close() - request.reply(vanilla.http.Status(200), {}, '.') uri = 'http://localhost:%s' % serve.port conn = h.http.connect(uri) @@ -277,9 +276,7 @@ class TestWebsocket(object): conn = serve.recv() request = conn.recv() ws = request.upgrade() - # TODO: test close while a request is still pending - # looks to be a bug in HTTPClient - # ws.recv() + ws.recv() ws.close() uri = 'ws://localhost:%s' % serve.port
actually, it's fine .. just a timing issue which I'm not sure we care about
diff --git a/src/Codeception/Module/SOAP.php b/src/Codeception/Module/SOAP.php index <HASH>..<HASH> 100644 --- a/src/Codeception/Module/SOAP.php +++ b/src/Codeception/Module/SOAP.php @@ -266,7 +266,7 @@ EOF; public function seeSoapResponseEquals($xml) { $xml = SoapUtils::toXml($xml); - $this->assertEquals($this->getXmlResponse()->C14N(), $xml->C14N()); + $this->assertEquals($xml->C14N(), $this->getXmlResponse()->C14N()); } /** @@ -307,7 +307,7 @@ EOF; public function dontSeeSoapResponseEquals($xml) { $xml = SoapUtils::toXml($xml); - \PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlString($this->getXmlResponse()->C14N(), $xml->C14N()); + \PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlString($xml->C14N(), $this->getXmlResponse()->C14N()); }
inverse expected and actual (#<I>)
diff --git a/src/main/java/picocli/AbbreviationMatcher.java b/src/main/java/picocli/AbbreviationMatcher.java index <HASH>..<HASH> 100644 --- a/src/main/java/picocli/AbbreviationMatcher.java +++ b/src/main/java/picocli/AbbreviationMatcher.java @@ -92,16 +92,16 @@ class AbbreviationMatcher { private static boolean startsWith(String str, String prefix, boolean caseInsensitive) { if (prefix.length() > str.length()) { return false; - } else if (isHyphenPrefix(str)) { + } else if (isNonAlphabetic(str)) { return str.equals(prefix); } String strPrefix = str.substring(0, prefix.length()); return caseInsensitive ? strPrefix.equalsIgnoreCase(prefix) : strPrefix.equals(prefix); } - private static boolean isHyphenPrefix(String prefix) { - for (char ch : prefix.toCharArray()) { - if (ch != '-') { return false; } + private static boolean isNonAlphabetic(String str) { + for (int i = 0; i < str.length(); i++) { + if (Character.isLetterOrDigit(str.codePointAt(i))) { return false; } } return true; }
Change isHyphenPrefix to isNonAlphabetic to match splitIntoChunks
diff --git a/masonite/providers/AppProvider.py b/masonite/providers/AppProvider.py index <HASH>..<HASH> 100644 --- a/masonite/providers/AppProvider.py +++ b/masonite/providers/AppProvider.py @@ -75,7 +75,7 @@ class AppProvider(ServiceProvider): Autoload(self.app).load(directories) def _set_application_debug_level(self): - if self.app.make('Application').DEBUG == 'True': + if self.app.make('Application').DEBUG is 'True': self.app.make('Application').DEBUG == True elif self.app.make('Application').DEBUG == 'False': - self.app.make('Application').DEBUG == False + self.app.make('Application').DEBUG is False
E<I> comparison to False should be 'if cond is False:' or 'if not cond:'
diff --git a/spec/decorators/socializer/person_decorator_spec.rb b/spec/decorators/socializer/person_decorator_spec.rb index <HASH>..<HASH> 100644 --- a/spec/decorators/socializer/person_decorator_spec.rb +++ b/spec/decorators/socializer/person_decorator_spec.rb @@ -7,7 +7,6 @@ module Socializer let(:decorated_person) { PersonDecorator.new(person) } context "#avatar_url" do - context "when the provider is Facebook, LinkedIn, or Twitter" do let(:authentication_attributes) do { provider: provider.downcase,
extra empty line detected at block body beginning
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,21 +1,5 @@ -import sys -from setuptools import setup, Command - - -class Tox(Command): - - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - import tox - sys.exit(tox.cmdline([])) +from setuptools import setup, find_packages setup( @@ -27,10 +11,7 @@ setup( 'FastMurmur2': ['Murmur>=0.1.3'], }, - tests_require=["tox", "mock"], - cmdclass={"test": Tox}, - - packages=["afkak"], + packages=find_packages(), zip_safe=True, @@ -59,5 +40,5 @@ high-level consumer and producer classes. Request batching is supported by the protocol as well as broker-aware request routing. Gzip and Snappy compression is also supported for message sets. """, - keywords=['Kafka client', 'distributed messaging'] + keywords=['Kafka client', 'distributed messaging', 'txkafka'] )
Remove Tox runner from setup.py This isn't used to run Tox by the Makefile, so it's just dead code with unfortunate dependency installation implications.
diff --git a/lib/smartsheet/client.rb b/lib/smartsheet/client.rb index <HASH>..<HASH> 100644 --- a/lib/smartsheet/client.rb +++ b/lib/smartsheet/client.rb @@ -46,7 +46,7 @@ module Smartsheet request_logger = logger ? - API::RequestLogger.new(logger, log_full_body) : + API::RequestLogger.new(logger, log_full_body: log_full_body) : API::MuteRequestLogger.new token = token_env_var if token.nil?
Ensure log_full_body is a named param.
diff --git a/response.go b/response.go index <HASH>..<HASH> 100644 --- a/response.go +++ b/response.go @@ -68,6 +68,16 @@ func (r *Response) fixCharset(detectCharset bool, defaultEncoding string) error return nil } contentType := strings.ToLower(r.Headers.Get("Content-Type")) + + if strings.Contains(contentType, "image/") || + strings.Contains(contentType, "video/") || + strings.Contains(contentType, "audio/") || + strings.Contains(contentType, "font/") { + // These MIME types should not have textual data. + + return nil + } + if !strings.Contains(contentType, "charset") { if !detectCharset { return nil
Ignore certain MIME types in fixCharset Some MIME types do not involve any text data and should not be processed in fixCharset. This should be done instead of forcing the user to toggle the Collector.DetectCharset flag as it could prove problematic. Fix #<I>
diff --git a/shopify/base.py b/shopify/base.py index <HASH>..<HASH> 100644 --- a/shopify/base.py +++ b/shopify/base.py @@ -137,16 +137,10 @@ class ShopifyResource(ActiveResource, mixins.Countable): self._update(self.__class__.format.decode(response.body)) def __get_id(self): - if self.klass.primary_key != "id": - return self.attributes.get(self.klass.primary_key) - else: - return super(ShopifyResource, self).id + return self.attributes.get(self.klass.primary_key) def __set_id(self, value): - if self.klass.primary_key != "id": - self.attributes[self.klass.primary_key] = value - else: - super(ShopifyResource, self).id = value + self.attributes[self.klass.primary_key] = value id = property(__get_id, __set_id, None, 'Value stored in the primary key')
Fix id property compatibility with latest pyactiveresource.
diff --git a/lib/plugins/disco.js b/lib/plugins/disco.js index <HASH>..<HASH> 100644 --- a/lib/plugins/disco.js +++ b/lib/plugins/disco.js @@ -168,7 +168,7 @@ module.exports = function (client, stanzas) { client.registerFeature('caps', 100, function (features, cb) { this.emit('disco:caps', { - from: new JID(client.jid.domain), + from: new JID(client.jid.domain || client.config.server), caps: features.caps }); this.features.negotiated.caps = true;
Fallback to use configured server for stream feature caps
diff --git a/distribute_setup.py b/distribute_setup.py index <HASH>..<HASH> 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -47,7 +47,7 @@ except ImportError: return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 DEFAULT_VERSION = "0.6.13" -DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" +DEFAULT_URL = "https://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" SETUPTOOLS_PKG_INFO = """\
Fix: PyPi only supports HTTPS/TLS downloads now
diff --git a/report/src/main/java/com/buschmais/jqassistant/core/report/api/graph/SubGraphFactory.java b/report/src/main/java/com/buschmais/jqassistant/core/report/api/graph/SubGraphFactory.java index <HASH>..<HASH> 100644 --- a/report/src/main/java/com/buschmais/jqassistant/core/report/api/graph/SubGraphFactory.java +++ b/report/src/main/java/com/buschmais/jqassistant/core/report/api/graph/SubGraphFactory.java @@ -94,6 +94,9 @@ public final class SubGraphFactory { relationship.setEndNode(endNode); relationship.getProperties().putAll(properties); relationship.setLabel((String) virtualObject.get(LABEL)); + if (startNode == null || endNode == null || type == null) { + throw new ReportException("The virtual relationship does not contain either start node, end node or type: " + relationship); + } return (I) relationship; case GRAPH: SubGraph subgraph = new SubGraph();
throw exception in SubGraphFactory if a provided virtual relationship is inconsistent
diff --git a/features/support/demo_app.rb b/features/support/demo_app.rb index <HASH>..<HASH> 100644 --- a/features/support/demo_app.rb +++ b/features/support/demo_app.rb @@ -13,7 +13,7 @@ class DemoApp end def teardown - [@app, @test_app].each do |app| + all_apks do |app| puts "Removing #{app[:package]}..." uninstall app[:package] end @@ -21,7 +21,7 @@ class DemoApp private def install_app - [@app, @test_app].each do |app| + all_apks do |app| puts "Installing #{app[:apk]}..." install app[:apk] end @@ -34,6 +34,12 @@ class DemoApp forward local, host end + def all_apks(&block) + [@app, @test_app].each do |app| + block.call app + end + end + def start shell "am instrument -e packageName #{@app[:package]} -e fullLauncherName #{@app[:package]}.ApiDemos -e class com.leandog.gametel.driver.TheTest #{@test_app[:package]}/com.leandog.gametel.driver.GametelInstrumentation" sleep 2
refactor apks.each into block call
diff --git a/src/main/java/de/timroes/axmlrpc/serializer/DateTimeSerializer.java b/src/main/java/de/timroes/axmlrpc/serializer/DateTimeSerializer.java index <HASH>..<HASH> 100644 --- a/src/main/java/de/timroes/axmlrpc/serializer/DateTimeSerializer.java +++ b/src/main/java/de/timroes/axmlrpc/serializer/DateTimeSerializer.java @@ -24,6 +24,8 @@ public class DateTimeSerializer implements Serializer { } public Object deserialize(String dateStr) throws XMLRPCException { + if (dateStr==null || dateStr.trim().length()==0) + return null; try { return Iso8601Deserializer.toDate(dateStr); } catch (Exception ex) {
Return empty datetime elements as NULL
diff --git a/evfl/timeline.py b/evfl/timeline.py index <HASH>..<HASH> 100644 --- a/evfl/timeline.py +++ b/evfl/timeline.py @@ -71,20 +71,20 @@ class Oneshot(BinaryObject): class Cut(BinaryObject): def __init__(self) -> None: super().__init__() - self.duration = -1.0 # TODO: is this correct? + self.start_time = -1.0 # TODO: is this correct? self.x4 = 0xffffffff # TODO: what is this? self.name = '' self.params: typing.Optional[Container] = None self._params_offset_writer: typing.Optional[PlaceholderWriter] = None def _do_read(self, stream: ReadStream) -> None: - self.duration = stream.read_f32() + self.start_time = stream.read_f32() self.x4 = stream.read_u32() self.name = stream.read_string_ref() self.params = stream.read_ptr_object(Container) def _do_write(self, stream: WriteStream) -> None: - stream.write(f32(self.duration)) + stream.write(f32(self.start_time)) stream.write(u32(self.x4)) stream.write_string_ref(self.name) self._params_offset_writer = stream.write_placeholder_ptr_if(bool(self.params))
timeline: Fix cut structure The float is not a duration; it seems to be the start time.
diff --git a/snmpsim/grammar/snmprec.py b/snmpsim/grammar/snmprec.py index <HASH>..<HASH> 100644 --- a/snmpsim/grammar/snmprec.py +++ b/snmpsim/grammar/snmprec.py @@ -47,7 +47,5 @@ class SnmprecGrammar(AbstractGrammar): rfc1902.IpAddress.tagSet): nval = value.asNumbers() for x in nval: - if x in self.alnums: + if x not in self.alnums: return ''.join([ '%.2x' % x for x in nval ]) - else: - return value
hopefully final fix to hexifyValue()
diff --git a/queue/queue.go b/queue/queue.go index <HASH>..<HASH> 100644 --- a/queue/queue.go +++ b/queue/queue.go @@ -147,7 +147,7 @@ func (q *Queue) Run(c *colly.Collector) error { q.finish() continue } - r.Retry(true) + r.Do() q.finish() } }(c, wg) diff --git a/request.go b/request.go index <HASH>..<HASH> 100644 --- a/request.go +++ b/request.go @@ -137,8 +137,13 @@ func (r *Request) PostMultipart(URL string, requestData map[string][]byte) error } // Retry submits HTTP request again with the same parameters -func (r *Request) Retry(checkRevisit bool) error { - return r.collector.scrape(r.URL.String(), r.Method, r.Depth, r.Body, r.Ctx, *r.Headers, checkRevisit) +func (r *Request) Retry() error { + return r.collector.scrape(r.URL.String(), r.Method, r.Depth, r.Body, r.Ctx, *r.Headers, false) +} + +// Do submits the request +func (r *Request) Do() error { + return r.collector.scrape(r.URL.String(), r.Method, r.Depth, r.Body, r.Ctx, *r.Headers, r.collector.AllowURLRevisit) } // Marshal serializes the Request
Add Request.Do() method which repects AllowURLRevisit
diff --git a/test/aggregate_tests.rb b/test/aggregate_tests.rb index <HASH>..<HASH> 100644 --- a/test/aggregate_tests.rb +++ b/test/aggregate_tests.rb @@ -42,7 +42,10 @@ class TestSensuAggregate < TestCase assert_equal(2, body[:outputs].size) assert(body[:results].is_a?(Array)) assert_equal(2, body[:results].size) - done + api_request('/aggregates/check_http', :delete) do |http, body| + assert_equal(204, http.response_header.status) + done + end end end end
[aggregate-limit] minor delete aggregate test
diff --git a/lib/engine-client.js b/lib/engine-client.js index <HASH>..<HASH> 100644 --- a/lib/engine-client.js +++ b/lib/engine-client.js @@ -16,6 +16,22 @@ exports.version = '0.1.0'; exports.protocol = 1; /** + * Utils. + * + * @api public + */ + +exports.util = require('./util'); + +/** + * Parser. + * + * @api public + */ + +exports.parser = require('./parser'); + +/** * Socket constructor. * * @api public.
Exposed util and parser.
diff --git a/kafka/consumer/fetcher.py b/kafka/consumer/fetcher.py index <HASH>..<HASH> 100644 --- a/kafka/consumer/fetcher.py +++ b/kafka/consumer/fetcher.py @@ -492,8 +492,7 @@ class Fetcher(six.Iterator): def _create_fetch_requests(self): """Create fetch requests for all assigned partitions, grouped by node. - FetchRequests skipped if no leader, node has requests in flight, or we - have not returned all previously fetched records to consumer + FetchRequests skipped if no leader, or node has requests in flight Returns: dict: {node_id: [FetchRequest,...]} @@ -509,9 +508,7 @@ class Fetcher(six.Iterator): " Requesting metadata update", partition) self._client.cluster.request_update() elif self._client.in_flight_request_count(node_id) == 0: - # if there is a leader and no in-flight requests, - # issue a new fetch but only fetch data for partitions whose - # previously fetched data has been consumed + # fetch if there is a leader and no in-flight requests position = self._subscriptions.assignment[partition].position partition_info = ( partition.partition,
Update docstring and comments in _create_fetch_requests re KAFKA-<I>
diff --git a/server/peer_server.go b/server/peer_server.go index <HASH>..<HASH> 100644 --- a/server/peer_server.go +++ b/server/peer_server.go @@ -122,6 +122,8 @@ func NewPeerServer(name string, path string, url string, bindAddr string, tlsCon s.raftServer.AddEventListener(raft.HeartbeatTimeoutEventType, s.raftEventLogger) s.raftServer.AddEventListener(raft.ElectionTimeoutThresholdEventType, s.raftEventLogger) + s.raftServer.AddEventListener(raft.HeartbeatEventType, s.recordMetricEvent) + return s } @@ -499,6 +501,12 @@ func (s *PeerServer) raftEventLogger(event raft.Event) { } } +func (s *PeerServer) recordMetricEvent(event raft.Event) { + name := fmt.Sprintf("raft.event.%s", event.Type()) + value := event.Value().(time.Duration) + (*s.metrics).Timer(name).Update(value) +} + func (s *PeerServer) monitorSnapshot() { for { time.Sleep(s.snapConf.checkingInterval)
feat(metrics): Publish peer heartbeat events as metrics
diff --git a/src/main/java/com/samskivert/util/Randoms.java b/src/main/java/com/samskivert/util/Randoms.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/samskivert/util/Randoms.java +++ b/src/main/java/com/samskivert/util/Randoms.java @@ -146,18 +146,20 @@ public class Randoms * Pick a random key from the specified mapping of weight values, or return * <code>ifEmpty</code> if no mapping has a weight greater than 0. * + * <p><b>Implementation note:</b> a random number is generated for every entry with a + * non-zero weight. + * * @throws IllegalArgumentException if any weight is less than 0. */ public <T> T pick (Map<? extends T, ? extends Number> weightMap, T ifEmpty) { T pick = ifEmpty; - double r = _r.nextDouble(); double total = 0.0; for (Map.Entry<? extends T, ? extends Number> entry : weightMap.entrySet()) { double weight = entry.getValue().doubleValue(); if (weight > 0.0) { total += weight; - if ((r * total) < weight) { + if ((_r.nextDouble() * total) < weight) { pick = entry.getKey(); } } else if (weight < 0.0) {
What was I thinking?: we can't just pick a random number once. Unsmoke that crack. git-svn-id: <URL>
diff --git a/builtin/providers/aws/resource_aws_db_subnet_group_test.go b/builtin/providers/aws/resource_aws_db_subnet_group_test.go index <HASH>..<HASH> 100644 --- a/builtin/providers/aws/resource_aws_db_subnet_group_test.go +++ b/builtin/providers/aws/resource_aws_db_subnet_group_test.go @@ -107,6 +107,7 @@ resource "aws_subnet" "bar" { resource "aws_db_subnet_group" "foo" { name = "foo" + description = "foo description" subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"] } `
providers/aws: add description to test cc/ @buth Looks like the schema was correctly defining description as required, added it to the tests and it's passing now.
diff --git a/core/Pimf/Util/Validator.php b/core/Pimf/Util/Validator.php index <HASH>..<HASH> 100644 --- a/core/Pimf/Util/Validator.php +++ b/core/Pimf/Util/Validator.php @@ -295,7 +295,9 @@ class Validator protected function middleware($fieldName, $comparing, $operator, $expecting) { if (in_array($operator, array("<", ">", "==", "<=", ">="), true)) { - $func = create_function('$a,$b', 'return ($a ' . '' . $operator . ' $b);'); + $func = function($a,$b) use ($operator) { + return ($a.' '.$operator.' '.$b); + }; return ($func($comparing, $expecting) === true) ?: $this->error($fieldName, $operator); }
refactoring of create_function() - that has been deprecated in PHP <I> - and will be removed from PHP in the next major version.
diff --git a/lxd/db/db_internal_test.go b/lxd/db/db_internal_test.go index <HASH>..<HASH> 100644 --- a/lxd/db/db_internal_test.go +++ b/lxd/db/db_internal_test.go @@ -63,7 +63,7 @@ func (s *dbTestSuite) CreateTestDb() (*Cluster, func()) { s.Nil(err) } - db, cleanup := NewTestCluster(s.T()) + db, cleanup := NewTestCluster(s.T().(*testing.T)) return db, cleanup }
lxd/db: Fix for new testify
diff --git a/src/python/dxpy/utils/resolver.py b/src/python/dxpy/utils/resolver.py index <HASH>..<HASH> 100644 --- a/src/python/dxpy/utils/resolver.py +++ b/src/python/dxpy/utils/resolver.py @@ -227,7 +227,7 @@ def resolve_container_id_or_name(raw_string, is_error=False, unescape=True, mult return ([cached_project_names[string]] if multi else cached_project_names[string]) try: - results = list(dxpy.find_projects(name=string, describe=True)) + results = list(dxpy.find_projects(name=string, describe=True, level='LIST')) except BaseException as details: raise ResolutionError(str(details))
dxpy.utils.resolver: fixed bug where it would not resolve projects for which you have < CONTRIBUTE access
diff --git a/pybromo/timestamps.py b/pybromo/timestamps.py index <HASH>..<HASH> 100644 --- a/pybromo/timestamps.py +++ b/pybromo/timestamps.py @@ -171,14 +171,14 @@ class TimestapSimulation: print('%s Donor timestamps - %s' % (header, ctime()), flush=True) self.S.simulate_timestamps_mix( populations = self.populations, - max_rates = self.max_rates_d, - bg_rate = self.bg_rate_d, + max_rates = self.params['em_rates_d'], + bg_rate = self.params['bg_rate_d'], **kwargs) print('%s Acceptor timestamps - %s' % (header, ctime()), flush=True) self.S.simulate_timestamps_mix( populations = self.populations, - max_rates = self.max_rates_a, - bg_rate = self.bg_rate_a, + max_rates = self.params['em_rates_d'], + bg_rate = self.params['bg_rate_d'], **kwargs) print('%s Completed. %s' % (header, ctime()), flush=True)
Fix TimestampSimulation from previous update
diff --git a/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/route/NavigationMapRoute.java b/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/route/NavigationMapRoute.java index <HASH>..<HASH> 100644 --- a/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/route/NavigationMapRoute.java +++ b/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/route/NavigationMapRoute.java @@ -277,6 +277,7 @@ public class NavigationMapRoute implements LifecycleObserver { public void addProgressChangeListener(MapboxNavigation navigation, boolean vanishRouteLineEnabled) { this.navigation = navigation; this.vanishRouteLineEnabled = vanishRouteLineEnabled; + this.mapRouteProgressChangeListener = buildMapRouteProgressChangeListener(); navigation.registerRouteProgressObserver(mapRouteProgressChangeListener); }
added update to listener that was erroneously omitted
diff --git a/terminal/output.go b/terminal/output.go index <HASH>..<HASH> 100644 --- a/terminal/output.go +++ b/terminal/output.go @@ -6,13 +6,13 @@ import ( "io" ) -// Returns special stdout, which converts escape sequences to Windows API calls +// NewAnsiStdout returns special stdout, which converts escape sequences to Windows API calls // on Windows environment. func NewAnsiStdout(out FileWriter) io.Writer { return out } -// Returns special stderr, which converts escape sequences to Windows API calls +// NewAnsiStderr returns special stderr, which converts escape sequences to Windows API calls // on Windows environment. func NewAnsiStderr(out FileWriter) io.Writer { return out
Fix function comments based on best practices from Effective Go (#<I>)
diff --git a/gibica/interpreter.py b/gibica/interpreter.py index <HASH>..<HASH> 100644 --- a/gibica/interpreter.py +++ b/gibica/interpreter.py @@ -115,7 +115,14 @@ class Interpreter(NodeVisitor): def visit_Assignment(self, node): """Visitor for `Assignment` AST node.""" - self.memory[node.left.identifier.name] = self.visit(node.right) + obj_memory = self.memory[node.left.identifier.name] + obj_program = self.visit(node.right) + if obj_memory is not None: + obj_program_value = obj_program.value + obj_program = obj_memory + obj_program.value = obj_program_value + + self.memory[node.left.identifier.name] = obj_program def visit_Variable(self, node): """Visitor for `Variable` AST node."""
Better memory management of mutable variables
diff --git a/library/src/main/java/de/mrapp/android/dialog/MaterialDialog.java b/library/src/main/java/de/mrapp/android/dialog/MaterialDialog.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/de/mrapp/android/dialog/MaterialDialog.java +++ b/library/src/main/java/de/mrapp/android/dialog/MaterialDialog.java @@ -706,6 +706,16 @@ public class MaterialDialog extends Dialog implements DialogInterface { } /** + * Returns the context, which is used by the builder. + * + * @return The context, which is used by the builder, as an instance of the class {@link + * Context} + */ + public final Context getContext() { + return context; + } + + /** * Sets the color of the title of the dialog, which is created by the builder. * * @param color
Added getContext-method to Builder.