diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/backports/datetime_timestamp/__init__.py b/backports/datetime_timestamp/__init__.py index <HASH>..<HASH> 100644 --- a/backports/datetime_timestamp/__init__.py +++ b/backports/datetime_timestamp/__init__.py @@ -27,6 +27,9 @@ def timestamp(dt): >>> timestamp(datetime.datetime.now()) > 1494638812 True + + >>> timestamp(datetime.datetime.now()) % 1 > 0 + True """ if dt.tzinfo is None: return time.mktime((
Add test ensuring that fractional seconds are present on naive datetimes.
diff --git a/tests/test_tools.py b/tests/test_tools.py index <HASH>..<HASH> 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -37,7 +37,7 @@ def compare_nifti(nifti_file_1, nifti_file_2): if nifti_1.get_data_dtype() != nifti_2.get_data_dtype(): logging.warning('dtype mismatch') result = False - if not numpy.allclose(nifti_1.get_data(), nifti_2.get_data()): + if not numpy.allclose(nifti_1.get_data(), nifti_2.get_data(), rtol=1e-04, atol=1e-04,): logging.warning('data mismatch') result = False
icometrix/dicom2nifti#<I>: Allow for rounding differences
diff --git a/lib/spree/adyen/engine.rb b/lib/spree/adyen/engine.rb index <HASH>..<HASH> 100644 --- a/lib/spree/adyen/engine.rb +++ b/lib/spree/adyen/engine.rb @@ -8,6 +8,7 @@ module Spree initializer "spree.spree-adyen.payment_methods", :after => "spree.register.payment_methods" do |app| app.config.spree.payment_methods << Gateway::AdyenPayment app.config.spree.payment_methods << Gateway::AdyenHPP + app.config.spree.payment_methods << Gateway::AdyenPaymentEncrypted end end end
Add additional payment method using Client Side Encrytion
diff --git a/modeltranslation/admin.py b/modeltranslation/admin.py index <HASH>..<HASH> 100644 --- a/modeltranslation/admin.py +++ b/modeltranslation/admin.py @@ -215,7 +215,7 @@ class TranslationBaseModelAdmin(BaseModelAdmin): TranslationAdmin and TranslationInlineModelAdmin. """ base_fields = self.replace_orig_field(form.base_fields.keys()) - fields = base_fields + list(self.get_readonly_fields(request, obj)) + fields = list(base_fields) + list(self.get_readonly_fields(request, obj)) return [(None, {'fields': self.replace_orig_field(fields)})] def get_translation_field_excludes(self, exclude_languages=None):
Fix TypeError in admin when all fields are read-only
diff --git a/src/mutable.js b/src/mutable.js index <HASH>..<HASH> 100644 --- a/src/mutable.js +++ b/src/mutable.js @@ -1,4 +1,4 @@ -import ItemSelection from './immutable' +import { ItemSelection } from './immutable' class MutableItemSelection extends ItemSelection { set (selection, lastIndex) {
extend MutableItemSelection from superclass instead of factory function
diff --git a/site/src/_layout.js b/site/src/_layout.js index <HASH>..<HASH> 100644 --- a/site/src/_layout.js +++ b/site/src/_layout.js @@ -260,7 +260,7 @@ const Hits = ({ searchResults }) => { }, }, } - const slug = highlightedHit.url.replace(/https:\/\/cli.netlify.com/, '') + const slug = highlightedHit.url.replace('https://cli.netlify.com', '') return ( <HitsOverlay key={index}> <a href={slug}>
chore(site): fix wrong regex (#<I>)
diff --git a/lib/puppet/version.rb b/lib/puppet/version.rb index <HASH>..<HASH> 100644 --- a/lib/puppet/version.rb +++ b/lib/puppet/version.rb @@ -7,7 +7,7 @@ module Puppet - PUPPETVERSION = '3.3.1-rc3' + PUPPETVERSION = '3.3.1' ## # version is a public API method intended to always provide a fast and
(packaging) Update PUPPETVERSION for <I>
diff --git a/liquibase-core/src/test/java/liquibase/verify/AbstractVerifyTest.java b/liquibase-core/src/test/java/liquibase/verify/AbstractVerifyTest.java index <HASH>..<HASH> 100644 --- a/liquibase-core/src/test/java/liquibase/verify/AbstractVerifyTest.java +++ b/liquibase-core/src/test/java/liquibase/verify/AbstractVerifyTest.java @@ -33,10 +33,11 @@ public class AbstractVerifyTest { this.testGroup = testGroup; this.stateName = stateName; - File liquibaseRootDir = new File("."); - if (liquibaseRootDir.getName().equals("liquibase-core")) { - liquibaseRootDir = liquibaseRootDir.getParentFile(); + File liquibaseRootDir = new File(""); + if (liquibaseRootDir.getAbsolutePath().endsWith("liquibase-core")) { //sometimes running in liquibase-core, especially in maven + liquibaseRootDir = liquibaseRootDir.getAbsoluteFile().getParentFile(); } + this.savedStateDir = new File(liquibaseRootDir, "liquibase-core/src/test/java/liquibase/verify/saved_state/"+testName+"/"+testGroup); this.stateFile = new File(savedStateDir, stateName+"."+type.name().toLowerCase());
Fixed problem where maven was using a different root for running the VerifyTests
diff --git a/photutils/aperture/mask.py b/photutils/aperture/mask.py index <HASH>..<HASH> 100644 --- a/photutils/aperture/mask.py +++ b/photutils/aperture/mask.py @@ -237,14 +237,14 @@ class ApertureMask: input ``data``. """ - # make a copy to prevent changing the input data - cutout = self.cutout(data, fill_value=fill_value, copy=True) - + cutout = self.cutout(data, fill_value=fill_value) if cutout is None: return None else: + weighted_cutout = cutout * self.data + # needed to zero out non-finite data values outside of the - # aperture mask but within the bounding box - cutout[self._mask] = 0. + # mask but within the bounding box + weighted_cutout[self._mask] = 0. - return cutout * self.data + return weighted_cutout
Improve performance of ApetureMask.multiply
diff --git a/commands/commands.rb b/commands/commands.rb index <HASH>..<HASH> 100644 --- a/commands/commands.rb +++ b/commands/commands.rb @@ -68,8 +68,13 @@ command :fetch do |user, branch| branch ||= 'master' GitHub.invoke(:track, user) unless helper.tracking?(user) + die "Unknown branch (#{branch}) specified" unless helper.remote_branch?(user, branch) + die "Unable to switch branches, your current branch has uncommitted changes" if helper.branch_dirty? + + puts "Fetching #{user}/#{branch}" git "fetch #{user} #{branch}:refs/remotes/#{user}/#{branch}" - git_exec "checkout -b #{user}/#{branch} refs/remotes/#{user}/#{branch}" + git "update-ref refs/heads/#{user}/#{branch} refs/remotes/#{user}/#{branch}" + git_exec "checkout #{user}/#{branch}" end desc "Pull from a remote."
Make sure it exists on the remote and force it to update on the local. These changes ensures that the branch actually exists on the remote repository and that the locally created branch is a pristine copy of the remote branch.
diff --git a/lib/middleware/init.js b/lib/middleware/init.js index <HASH>..<HASH> 100644 --- a/lib/middleware/init.js +++ b/lib/middleware/init.js @@ -20,6 +20,8 @@ module.exports = function (req, res, next) { // 本次请求附加的静态模版变量 res.templateData = {}; + res.set('X-Powered-By', 'Rebas'); + next(); }); };
Add `X-Powered-By`
diff --git a/lib/common/error_codes.js b/lib/common/error_codes.js index <HASH>..<HASH> 100644 --- a/lib/common/error_codes.js +++ b/lib/common/error_codes.js @@ -13,6 +13,7 @@ module.exports = { unexpectedEqualsSignBeforeAttributeName: 'unexpected-equals-sign-before-attribute-name', missingEndTagName: 'missing-end-tag-name', unexpectedCharacterInAttributeName: 'unexpected-character-in-attribute-name', + missingSemicolonAfterCharacterReference: 'missing-semicolon-after-character-reference', eofBeforeTagName: 'eof-before-tag-name', eofInTag: 'eof-in-tag', missingAttributeValue: 'missing-attribute-value', diff --git a/lib/tokenizer/index.js b/lib/tokenizer/index.js index <HASH>..<HASH> 100644 --- a/lib/tokenizer/index.js +++ b/lib/tokenizer/index.js @@ -2402,8 +2402,10 @@ _[HEXADEMICAL_CHARACTER_REFERENCE_STATE] = function hexademicalCharacterReferenc else if (cp === $.SEMICOLON) this.state = NUMERIC_CHARACTER_REFERENCE_END_STATE; - else + else { + this._err(ERR.missingSemicolonAfterCharacterReference); this._reconsumeInState(NUMERIC_CHARACTER_REFERENCE_END_STATE); + } };
Add Hexademical character reference state errors.
diff --git a/brothon/analysis/dataframe_to_matrix.py b/brothon/analysis/dataframe_to_matrix.py index <HASH>..<HASH> 100644 --- a/brothon/analysis/dataframe_to_matrix.py +++ b/brothon/analysis/dataframe_to_matrix.py @@ -107,6 +107,10 @@ class DataFrameToMatrix(object): def _normalize_series(series): smin = series.min() smax = series.max() + if smax - smin == 0: + print('Cannot normalize series (div by 0) so not normalizing...') + smin = 0 + smax = 1 return (series - smin) / (smax - smin), smin, smax
fix possible div by zero in normalization
diff --git a/client-js/QueryResultDataTable.js b/client-js/QueryResultDataTable.js index <HASH>..<HASH> 100644 --- a/client-js/QueryResultDataTable.js +++ b/client-js/QueryResultDataTable.js @@ -86,7 +86,7 @@ var QueryResultDataTable = React.createClass({ top: 0, bottom: 0, width: (Math.abs(value) / range) * 100 + '%', - backgroundColor: '#ffcf78' + backgroundColor: '#bae6f7' } numberBar = <div style={barStyle} /> }
change cell bar to light blue orange isn’t really used anywhere else so it looks out of place
diff --git a/elytron/src/main/java/org/wildfly/extension/elytron/CertificateAuthorityAccountDefinition.java b/elytron/src/main/java/org/wildfly/extension/elytron/CertificateAuthorityAccountDefinition.java index <HASH>..<HASH> 100644 --- a/elytron/src/main/java/org/wildfly/extension/elytron/CertificateAuthorityAccountDefinition.java +++ b/elytron/src/main/java/org/wildfly/extension/elytron/CertificateAuthorityAccountDefinition.java @@ -79,7 +79,7 @@ class CertificateAuthorityAccountDefinition extends SimpleResourceDefinition { enum CertificateAuthority { - LETS_ENCRYPT("LetsEncrypt", "https://acme-v02.api.letsencrypt.org/directory", "https://acme-staging.api.letsencrypt.org/directory"); + LETS_ENCRYPT("LetsEncrypt", "https://acme-v02.api.letsencrypt.org/directory", "https://acme-staging-v02.api.letsencrypt.org/directory"); private final String name; private final String url;
[WFCORE-<I>] Fix the staging URL for the Let's Encrypt certificate-authority
diff --git a/spec/unit/mongoid/identity_map_spec.rb b/spec/unit/mongoid/identity_map_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/mongoid/identity_map_spec.rb +++ b/spec/unit/mongoid/identity_map_spec.rb @@ -439,6 +439,7 @@ describe Mongoid::IdentityMap do end it "gets the object from the identity map" do + pending "segfault on 1.9.2-p290 on Intel i7 OSX Lion" fiber.resume end end
Pend spec getting segfault on Lion
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index <HASH>..<HASH> 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -1619,7 +1619,7 @@ module ActionView @index = options[:index] || options[:child_index] end - (field_helpers - [:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each do |selector| + (field_helpers - [:label, :check_box, :radio_button, :fields_for, :fields, :hidden_field, :file_field]).each do |selector| class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 def #{selector}(method, options = {}) # def text_field(method, options = {}) @template.send( # @template.send(
Fix warning: method redefined; discarding old fields Follow up to #<I>.
diff --git a/build.php b/build.php index <HASH>..<HASH> 100755 --- a/build.php +++ b/build.php @@ -3,7 +3,7 @@ chdir(__DIR__); $returnStatus = null; -passthru('composer install --dev', $returnStatus); +passthru('composer install', $returnStatus); if ($returnStatus !== 0) { exit(1); }
Remove --dev from composer install. --dev is the default.
diff --git a/lib/environmentlib.php b/lib/environmentlib.php index <HASH>..<HASH> 100644 --- a/lib/environmentlib.php +++ b/lib/environmentlib.php @@ -630,8 +630,8 @@ function environment_check_database($version) { */ function process_environment_bypass($xml, &$result) { -/// Only try to bypass if we were in error - if ($result->getStatus()) { +/// Only try to bypass if we were in error and it was required + if ($result->getStatus() || $result->getLevel() == 'optional') { return; }
We only allow to bypass "required" checks.
diff --git a/pypet/storageservice.py b/pypet/storageservice.py index <HASH>..<HASH> 100644 --- a/pypet/storageservice.py +++ b/pypet/storageservice.py @@ -1950,7 +1950,7 @@ class HDF5StorageService(StorageService, HasLogger): if col_name == 'example_item_run_name': # The example item run name has changed due to merging - old_run_name = not_inserted_row[col_name] + old_run_name = compat.tostr(not_inserted_row[col_name]) # Get the old name old_full_name = key.replace(run_mask, old_run_name) # Find the new name
fixed unicode/str problem in python 3 in test
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,7 @@ +require 'rubygems' $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) +require 'sequel' require 'sequel/migration_builder' require 'spec' require 'spec/autorun'
Requiring sequel in spec helper.
diff --git a/salt/cloud/clouds/azurearm.py b/salt/cloud/clouds/azurearm.py index <HASH>..<HASH> 100644 --- a/salt/cloud/clouds/azurearm.py +++ b/salt/cloud/clouds/azurearm.py @@ -390,7 +390,7 @@ def list_nodes(conn=None, call=None): # pylint: disable=unused-argument try: provider, driver = __active_provider_name__.split(':') active_resource_group = __opts__['providers'][provider][driver]['resource_group'] - except: + except KeyError: pass for node in nodes:
Add "KeyError" to bare except in azurearm Fixes pylint, refs #<I>.
diff --git a/src/pusher_connection.js b/src/pusher_connection.js index <HASH>..<HASH> 100644 --- a/src/pusher_connection.js +++ b/src/pusher_connection.js @@ -34,7 +34,7 @@ } connection.connectedTimeout = 2000; connection.connectionSecure = connection.compulsorySecure; - connection.connectionAttempts = 0; + connection.failedAttempts = 0; } function Connection(key, options) { @@ -86,18 +86,18 @@ self.emit('connecting_in', self.connectionWait); } - if (self.netInfo.isOnLine() && self.connectionAttempts <= 4) { - updateState('connecting'); - } else { - updateState('unavailable'); - } - - // When in the unavailable state we attempt to connect, but don't - // broadcast that fact if (self.netInfo.isOnLine()) { + if (self.failedAttempts < 5) { + updateState('connecting'); + } else { + updateState('unavailable'); + } self._waitingTimer = setTimeout(function() { + // Even when unavailable we try connecting (not changing state) self._machine.transition('connecting'); }, connectionDelay()); + } else { + updateState('unavailable'); } }, @@ -255,7 +255,7 @@ self.connectionSecure = !self.connectionSecure; } - self.connectionAttempts++; + self.failedAttempts++; } function connectBaseURL(isSecure) {
Refactor waitingPre code The logic should now be clearer to understand
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -41,7 +41,7 @@ function slang(opt) { } // create full URL for curl path - URL = 'http://' + USER + ':' + PASS + '@' + + URL = 'http://' + USER + ':' + encodeURIComponent(PASS) + '@' + HOST + ':' + PORT + '/' + path.dirname(destPath) + ".json"; var options = {
UPDATE: Apply the encodeURIComponent function to Password - If a special character is used in an URL without encoding, a bug that can not be accessed normally has been found and fixed.
diff --git a/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java b/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java index <HASH>..<HASH> 100644 --- a/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java +++ b/spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java @@ -71,7 +71,7 @@ public class SampleIntegrationTests { @Before public void setup() throws Exception { - System.setProperty("disableSpringSnapshotRepos", "true"); + System.setProperty("disableSpringSnapshotRepos", "false"); new CleanCommand().run("org.springframework"); }
Allow snapshot repositories in integration tests Update CLI SampleIntegrationTests to no longer disable snapshot repos.
diff --git a/lib/Stripe/ApiResource.php b/lib/Stripe/ApiResource.php index <HASH>..<HASH> 100644 --- a/lib/Stripe/ApiResource.php +++ b/lib/Stripe/ApiResource.php @@ -118,10 +118,10 @@ abstract class Stripe_ApiResource extends Stripe_Object return Stripe_Util::convertToStripeObject($response, $apiKey); } - protected function _scopedSave($class, $apiKey=null) + protected function _scopedSave($class) { self::_validateCall('save'); - $requestor = new Stripe_ApiRequestor($apiKey); + $requestor = new Stripe_ApiRequestor($this->_apiKey); $params = $this->serializeParameters(); if (count($params) > 0) { diff --git a/lib/Stripe/Customer.php b/lib/Stripe/Customer.php index <HASH>..<HASH> 100644 --- a/lib/Stripe/Customer.php +++ b/lib/Stripe/Customer.php @@ -44,7 +44,7 @@ class Stripe_Customer extends Stripe_ApiResource public function save() { $class = get_class(); - return self::_scopedSave($class, $this->_apiKey); + return self::_scopedSave($class); } /**
Always try to pass a local API key when saving
diff --git a/src/Sentry/Laravel/EventHandler.php b/src/Sentry/Laravel/EventHandler.php index <HASH>..<HASH> 100644 --- a/src/Sentry/Laravel/EventHandler.php +++ b/src/Sentry/Laravel/EventHandler.php @@ -173,7 +173,7 @@ class EventHandler */ public function __call($method, $arguments) { - $handlerMethod = $handlerMethod = "{$method}Handler"; + $handlerMethod = "{$method}Handler"; if (!method_exists($this, $handlerMethod)) { throw new RuntimeException("Missing event handler: {$handlerMethod}");
Fix variable duplication (#<I>)
diff --git a/pandas/tests/test_frame.py b/pandas/tests/test_frame.py index <HASH>..<HASH> 100644 --- a/pandas/tests/test_frame.py +++ b/pandas/tests/test_frame.py @@ -1798,6 +1798,16 @@ class TestDataFrame(unittest.TestCase, CheckIndexing, self.assert_(not self.frame._is_mixed_type) self.assert_(self.mixed_frame._is_mixed_type) + def test_constructor_ordereddict(self): + from pandas.util.compat import OrderedDict + import random + nitems = 100 + nums = range(nitems) + random.shuffle(nums) + expected=['A%d' %i for i in nums] + df=DataFrame(OrderedDict(zip(expected,[[0]]*nitems))) + self.assertEqual(expected,list(df.columns)) + def test_constructor_dict(self): frame = DataFrame({'col1' : self.ts1, 'col2' : self.ts2})
TST: DataFrame ctor should respect col order when given OrderedDict
diff --git a/lib/rabl/builder.rb b/lib/rabl/builder.rb index <HASH>..<HASH> 100644 --- a/lib/rabl/builder.rb +++ b/lib/rabl/builder.rb @@ -110,7 +110,7 @@ module Rabl def extends(file, options={}, &block) options = @options.slice(:child_root).merge(:object => @_object).merge(options) result = self.partial(file, options, &block) - @_result.merge!(result) if result + @_result.merge!(result) if result && result.is_a?(Hash) end # resolve_condition(:if => true) => true
[builder] Only merge in a result if the result is a hash
diff --git a/src/Silex/Controller.php b/src/Silex/Controller.php index <HASH>..<HASH> 100644 --- a/src/Silex/Controller.php +++ b/src/Silex/Controller.php @@ -16,6 +16,17 @@ use Silex\Exception\ControllerFrozenException; /** * A wrapper for a controller, mapped to a route. * + * __call() forwards method-calls to Route, but returns instance of Controller + * listing Route's methods below, so that IDEs know they are valid + * + * @method \Silex\Controller assert(string $variable, string $regexp) + * @method \Silex\Controller value(string $variable, mixed $default) + * @method \Silex\Controller convert(string $variable, mixed $callback) + * @method \Silex\Controller method(string $method) + * @method \Silex\Controller requireHttp() + * @method \Silex\Controller requireHttps() + * @method \Silex\Controller before(mixed $callback) + * @method \Silex\Controller after(mixed $callback) * @author Igor Wiedler <igor@wiedler.ch> */ class Controller
Define "magic" methods of \Silex\Controller This makes IDEs (PHPStorm, in particular) a bit happier about route-definitions. see <URL>
diff --git a/aemsync.js b/aemsync.js index <HASH>..<HASH> 100644 --- a/aemsync.js +++ b/aemsync.js @@ -308,8 +308,8 @@ function Pusher(targets, interval, sync) { // Add NT_FOLDER if needed. var contentXml = subItem + "/.content.xml"; var hasContentXml = fs.existsSync(contentXml); - var isContentFolder = path.basename(subItem) === '_jcr_content'; - if (!isContentFolder && !hasContentXml) { + var hasContentFolder = subItem.indexOf('/_jcr_content') !== -1; + if (!hasContentFolder && !hasContentXml) { pack.zip.addLocalFile(NT_FOLDER, getZipPath(contentXml)); debug(" Added as nt:folder.") }
Updated _jcr_content folder handling.
diff --git a/app/controllers/garage/docs/resources_controller.rb b/app/controllers/garage/docs/resources_controller.rb index <HASH>..<HASH> 100644 --- a/app/controllers/garage/docs/resources_controller.rb +++ b/app/controllers/garage/docs/resources_controller.rb @@ -40,20 +40,20 @@ class Garage::Docs::ResourcesController < Garage::ApplicationController def authenticate session[:platform_return_to] = params[:return_to] - redirect_to oauth2_client(@app).auth_code.authorize_url( + client = oauth2_client(@app) + + # TODO: because it authenticates against self host provider, use + # Implicit Grant flow to prevent the callback app accessing itself + # and blocks with a single process server i.e. Webrick + redirect_to client.implicit.authorize_url( :redirect_uri => garage_docs.callback_resources_url, :scope => params[:scopes].join(' ') ) end def callback - if params[:code] - client = oauth2_client(@app) - - # This will block if your API server runs on the same process (e.g. Webrick) - token = client.auth_code.get_token(params[:code], redirect_uri: garage_docs.callback_resources_url) - session[:access_token] = token.token - + if params[:access_token] + session[:access_token] = params[:access_token] redirect_to session[:platform_return_to] || garage_docs.console_resources_path else render :layout => false
Revert the code auth flow and use Implicit Grant.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ extras_require = { 'cluster': ["python-pam", "django-pam", "gunicorn", - "python-prctl ==1.6.1", + "python-prctl", "setproctitle"], 'osgeo': [ 'GDAL >= 2.4',
remove specific version of python-prctl inside setup.py
diff --git a/src/neon.js b/src/neon.js index <HASH>..<HASH> 100644 --- a/src/neon.js +++ b/src/neon.js @@ -20,5 +20,5 @@ module.exports.Entity = require('./entity'); module.exports.Map = require('./map'); module.exports.CHAIN = DecoderClass.CHAIN; module.exports.BLOCK = EncoderClass.BLOCK; -module.exports.dumper = require('./dumper'); +module.exports.Dumper = require('./dumper'); module.exports.Error = require('./error');
api: dumper renamed to Dumper
diff --git a/lib/vimrunner/client.rb b/lib/vimrunner/client.rb index <HASH>..<HASH> 100644 --- a/lib/vimrunner/client.rb +++ b/lib/vimrunner/client.rb @@ -198,5 +198,12 @@ module Vimrunner def kill server.kill end + + # Bring the server to foreground + def foreground + server.remote_expr("foreground()") + end + + end end
Add client.foreground to Bring the server to foreground
diff --git a/mythril/ethereum/util.py b/mythril/ethereum/util.py index <HASH>..<HASH> 100644 --- a/mythril/ethereum/util.py +++ b/mythril/ethereum/util.py @@ -78,9 +78,11 @@ def solc_exists(version): os.environ.get("HOME", str(Path.home())), ".py-solc/solc-v" + version, "bin/solc", - ), # py-solc setup - #"/usr/bin/solc", # Ubuntu PPA setup + ) # py-solc setup ] + if version.startswith("0.5"): + # Temporary fix to support v0.5.x with Ubuntu PPA setup + solc_binaries.append("/usr/bin/solc") for solc_path in solc_binaries: if os.path.exists(solc_path): return solc_path
updated with temp fix for solc <I>.x
diff --git a/spec/lib/protobuf/rpc/stat_spec.rb b/spec/lib/protobuf/rpc/stat_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/protobuf/rpc/stat_spec.rb +++ b/spec/lib/protobuf/rpc/stat_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' require 'timecop' -require 'active_support/core_ext/numeric/time' +require 'active_support/all' RSpec.describe ::Protobuf::Rpc::Stat do
Use activesupport/all in tests (>= 6 causes load errors)
diff --git a/tofu/data/_class1_Diagnostic.py b/tofu/data/_class1_Diagnostic.py index <HASH>..<HASH> 100644 --- a/tofu/data/_class1_Diagnostic.py +++ b/tofu/data/_class1_Diagnostic.py @@ -35,6 +35,20 @@ class Diagnostic(_class0_Plasma2D.Plasma2D): # _show_in_summary_core = ['shape', 'ref', 'group'] _show_in_summary = 'all' + _dshow = { + 'aperture': [ + 'planar', 'area', + 'outline', 'poly', + 'cent', + ], + 'camera': [ + 'parallel', '2d', + 'area', 'outline', + 'cent', 'cents', + 'qeff', + ], + } + def add_aperture( self,
[#<I>] added _dshow for aperture and camera
diff --git a/test/plugins_test.rb b/test/plugins_test.rb index <HASH>..<HASH> 100644 --- a/test/plugins_test.rb +++ b/test/plugins_test.rb @@ -33,7 +33,7 @@ class PluginsTest < MiniTest::Test suffix = '... #lolcommits' Lolcommits::LolTwitter.send(:define_method, :max_tweet_size, Proc.new { max_tweet_size }) - assert_match "#{long_commit_message[0..(max_tweet_size - suffix.length)]}#{suffix}", plugin.build_tweet(long_commit_message) + assert_equal "#{long_commit_message[0..(max_tweet_size - suffix.length)]}#{suffix}", plugin.build_tweet(long_commit_message) end def test_lol_twitter_prefix_suffix @@ -46,6 +46,6 @@ class PluginsTest < MiniTest::Test 'suffix' => '#suffixing!' } Lolcommits::LolTwitter.send(:define_method, :configuration, Proc.new { plugin_config }) - assert_match '@prefixing! commit msg #suffixing!', plugin.build_tweet('commit msg') + assert_equal '@prefixing! commit msg #suffixing!', plugin.build_tweet('commit msg') end end
switch to assert_equal to see fail condition
diff --git a/src/createReduxForm.js b/src/createReduxForm.js index <HASH>..<HASH> 100755 --- a/src/createReduxForm.js +++ b/src/createReduxForm.js @@ -646,7 +646,7 @@ const createReduxForm = (structure: Structure<*, *>) => { submitFailed = (error: any): void => { delete this.submitPromise - throw error + return error } listenToSubmit = (promise: any) => {
fix of the uncaught exception in promise within asyncValidation (#<I>)
diff --git a/src/widgets/form/Select.php b/src/widgets/form/Select.php index <HASH>..<HASH> 100755 --- a/src/widgets/form/Select.php +++ b/src/widgets/form/Select.php @@ -90,6 +90,8 @@ class Select extends BaseInputWidget * @var boolean whether the select shall allow multiple selections. * * Please note: this options takes precedence over the 'multiple' key in [[$options]] + * + * @since 1.2.1 */ public $multiple = false; @@ -108,7 +110,7 @@ class Select extends BaseInputWidget if (!isset($this->options['options'])) { $this->options['options'] = []; } - + $this->options['multiple'] = $this->multiple; $this->parseItems();
added since doc to property multiple on Select
diff --git a/src/main/java/io/iron/ironmq/Message.java b/src/main/java/io/iron/ironmq/Message.java index <HASH>..<HASH> 100644 --- a/src/main/java/io/iron/ironmq/Message.java +++ b/src/main/java/io/iron/ironmq/Message.java @@ -17,6 +17,7 @@ public class Message implements Serializable { // it. @SerializedName("expires_in") private Long expiresIn; @SerializedName("reserved_count") private long reservedCount; + @SerializedName("reservation_id") private String reservationId; public Message() {} @@ -67,13 +68,18 @@ public class Message implements Serializable { * @param delay The new delay. */ public void setDelay(long delay) { this.delay = delay; } - + /** - * Returns the number of times the message has been reserved. - */ + * Returns the number of times the message has been reserved. + */ public long getReservedCount() { return reservedCount; } /** + * Returns the reservation id if the message has been reserved. + */ + public String getReservationId() { return reservationId; } + + /** * Returns the number of seconds in which the Message will be removed from the * queue. If the server default of 7 days will be used, 0 is returned. */
Add reservation_id to message model
diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index <HASH>..<HASH> 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -36,7 +36,7 @@ module ActiveSupport # string. # # If passed an optional +locale+ parameter, the word will be - # pluralized using rules defined for that language. By default, + # singularized using rules defined for that language. By default, # this parameter is set to <tt>:en</tt>. # # 'posts'.singularize # => "post"
Fix doc for singularize - `pluralized` => `singularized`
diff --git a/tidb-server/main.go b/tidb-server/main.go index <HASH>..<HASH> 100644 --- a/tidb-server/main.go +++ b/tidb-server/main.go @@ -419,7 +419,7 @@ func overrideConfig(cfg *config.Config) { if actualFlags[nmAdvertiseAddress] { cfg.AdvertiseAddress = *advertiseAddress } - if len(cfg.AdvertiseAddress) == 0 { + if len(cfg.AdvertiseAddress) == 0 && cfg.Host == "0.0.0.0" { cfg.AdvertiseAddress = util.GetLocalIP() } if len(cfg.AdvertiseAddress) == 0 { diff --git a/util/misc.go b/util/misc.go index <HASH>..<HASH> 100644 --- a/util/misc.go +++ b/util/misc.go @@ -440,7 +440,8 @@ type SequenceSchema interface { SequenceByName(schema, sequence model.CIStr) (SequenceTable, error) } -// SequenceTable is implemented by tableCommon, and it is specialised in handling sequence operation. +// SequenceTable is implemented by tableCommon, +// and it is specialised in handling sequence operation. // Otherwise calling table will cause import cycle problem. type SequenceTable interface { GetSequenceID() int64
*:Bug fix/Sign in failed: Failed to connect to TiDB in tiup dashboard (#<I>)
diff --git a/src/assets/js/core.js b/src/assets/js/core.js index <HASH>..<HASH> 100644 --- a/src/assets/js/core.js +++ b/src/assets/js/core.js @@ -50,6 +50,11 @@ class Core { if ('select2' in $.fn) { $('.inside .papi-table tr .papi-component-select2').select2(); + + // Fix issue with browsers where selected attribute is not removed correct. + $(document.body).on('change', 'select.papi-component-select2', function () { + $(this).find('option[selected]').removeAttr('selected'); + }); } $('.papi-meta-type-term button.handlediv').on('click', this.handlediv);
Fix issue with browsers where selected attribute is not removed correct
diff --git a/lib/trestle/evaluation_context.rb b/lib/trestle/evaluation_context.rb index <HASH>..<HASH> 100644 --- a/lib/trestle/evaluation_context.rb +++ b/lib/trestle/evaluation_context.rb @@ -9,9 +9,9 @@ module Trestle # # We include private methods as methods such as current_user # are usually declared as private or protected. - def method_missing(name, *args, &block) + def method_missing(name, *args, **kwargs, &block) if @context && @context.respond_to?(name, true) - @context.send(name, *args, &block) + @context.send(name, *args, **kwargs, &block) else super end
Forward keyword arguments in `method_missing` This is a breaking change introduced in Ruby <I>
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -117,6 +117,12 @@ module ActiveRecord # Clears out the association cache. def clear_association_cache #:nodoc: self.class.reflect_on_all_associations.to_a.each do |assoc| + if IdentityMap.enabled? && instance_variable_defined?("@#{assoc.name}") + targets = [*instance_variable_get("@#{assoc.name}")] + targets.map! { |t| t.respond_to?(:target) ? t.target : t } + targets.compact! + targets.each { |r| IdentityMap.remove r } + end instance_variable_set "@#{assoc.name}", nil end if self.persisted? end
Remove associated objects from IM when clearing them from association cache.
diff --git a/codequality/main.py b/codequality/main.py index <HASH>..<HASH> 100755 --- a/codequality/main.py +++ b/codequality/main.py @@ -89,6 +89,9 @@ class CodeQuality(object): for filename, location in scmhandler.srcs_to_check( paths, rev=self.options.rev): + if self._should_ignore(filename): + continue + checker_classes = self._relevant_checkers(filename) for checker_class in checker_classes: loc_to_filename = checker_to_loc_to_filename.setdefault(
Fix ignore not applying to paths generated by SCM
diff --git a/spec/cleaner_spec.rb b/spec/cleaner_spec.rb index <HASH>..<HASH> 100644 --- a/spec/cleaner_spec.rb +++ b/spec/cleaner_spec.rb @@ -6,6 +6,8 @@ describe Bugsnag::Cleaner do subject { described_class.new(nil) } describe "#clean_object" do + is_jruby = defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby' + it "cleans up recursive hashes" do a = {:a => {}} a[:a][:b] = a @@ -13,6 +15,8 @@ describe Bugsnag::Cleaner do end it "cleans up hashes when keys infinitely recurse in to_s" do + skip "JRuby doesn't allow recovery from SystemStackErrors" if is_jruby + class RecursiveHashKey def to_s to_s @@ -79,6 +83,8 @@ describe Bugsnag::Cleaner do end it "cleans custom objects when they infinitely recurse" do + skip "JRuby doesn't allow recovery from SystemStackErrors" if is_jruby + class RecursiveObject def to_s to_s
Skip infinite recursion tests on JRuby We can't recover from stack overflows so there's not much we can do here other than skip these tests
diff --git a/test/03-lib/migrationManager.js b/test/03-lib/migrationManager.js index <HASH>..<HASH> 100644 --- a/test/03-lib/migrationManager.js +++ b/test/03-lib/migrationManager.js @@ -12,7 +12,7 @@ describe('MigrationManager', () => { expect(MigrationManager.prototype).ok(); }); - const publicMethodNames = [ + const allowedPublicMethodNames = [ 'configure', 'getParams', 'init', @@ -26,9 +26,24 @@ describe('MigrationManager', () => { 'disconnect' ]; - _(publicMethodNames).each((publicMethodName) => { + _(allowedPublicMethodNames).each((publicMethodName) => { it(`should have "${publicMethodName}" public method`, () => { expect(MigrationManager.prototype).have.keys(publicMethodName); }); }); + + it('should not have other public methods', () => { + const allPublicMethodNames = _(MigrationManager.prototype) + .chain() + .functions() + .filter((methodName) => _(MigrationManager.prototype).has(methodName)) + .reject((methodName) => methodName.charAt(0) === '_') + .value(); + + const difference = _(allPublicMethodNames).difference( + allowedPublicMethodNames + ); + + expect(difference).eql([]); + }); });
check at tests that migrator should not contain any other public methods
diff --git a/lib/logstasher/active_job/log_subscriber.rb b/lib/logstasher/active_job/log_subscriber.rb index <HASH>..<HASH> 100644 --- a/lib/logstasher/active_job/log_subscriber.rb +++ b/lib/logstasher/active_job/log_subscriber.rb @@ -1,7 +1,8 @@ -if ActiveJob::VERSION::MAJOR >= 6 && ActiveJob::VERSION::MINOR >= 1 - require 'active_job/log_subscriber' -else +# For Rails 6.0 or below, require the logging module which contains LogSubscriber +if ActiveJob::VERSION::MAJOR < 6 || (ActiveJob::VERSION::MAJOR == 6 && ActiveJob::VERSION::MINOR == 0) require 'active_job/logging' +else + require 'active_job/log_subscriber' end module LogStasher
Fix potential issue for Rails 7 in require (#<I>) The older condition wouldn't require the newer location for Rails 7 in the future. Caught by @petergoldstein
diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index <HASH>..<HASH> 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -53,7 +53,7 @@ module Dummy # This will create an empty whitelist of attributes available for mass-assignment for all models # in your app. As such, your models will need to explicitly whitelist or blacklist accessible # parameters by using an attr_accessible or attr_protected declaration. - config.active_record.whitelist_attributes = true + #config.active_record.whitelist_attributes = true # Enable the asset pipeline config.assets.enabled = true
turn off whitelist-attributes in spec dummy (not used in Rails 4)
diff --git a/python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/event_log_storage.py b/python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/event_log_storage.py index <HASH>..<HASH> 100644 --- a/python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/event_log_storage.py +++ b/python_modules/dagster/dagster_tests/core_tests/storage_tests/utils/event_log_storage.py @@ -1048,6 +1048,9 @@ class TestEventLogStorage: assert step_stats[0].end_time > step_stats[0].start_time assert step_stats[0].attempts == 4 + # After adding the IN_PROGRESS field to the StepEventStatus enum, tests in internal fail + # Temporarily skipping this test + @pytest.mark.skip def test_run_step_stats_with_in_progress(self, storage): def _in_progress_run_records(run_id): now = time.time()
skipping test (#<I>)
diff --git a/spec/models/twitter_review.rb b/spec/models/twitter_review.rb index <HASH>..<HASH> 100644 --- a/spec/models/twitter_review.rb +++ b/spec/models/twitter_review.rb @@ -1,6 +1,6 @@ class TwitterReview < Review counter_culture :product, column_name: 'twitter_reviews_count' - counter_culture :user, column_name: 'review_value_sum', delta_magnitude: Proc.new {|model| model.weight} + counter_culture :user, column_name: 'review_value_sum', delta_magnitude: proc {|model| model.weight} counter_culture [:manages_company]
replace test code which use Proc.new
diff --git a/blockstack/lib/operations/revoke.py b/blockstack/lib/operations/revoke.py index <HASH>..<HASH> 100644 --- a/blockstack/lib/operations/revoke.py +++ b/blockstack/lib/operations/revoke.py @@ -85,11 +85,16 @@ def check( state_engine, nameop, block_id, checked_ops ): log.debug("Name '%s' is revoked" % name) return False - # name must not be expired + # name must not be expired as of *this* block if state_engine.is_name_expired( name, block_id ): log.debug("Name '%s' is expired" % name) return False + # name must not be in grace period in this block + if state_engine.is_name_in_grace_period(name, block_id): + log.debug("Name '{}' is in the renewal grace period. It can only be renewed at this time.".format(name)) + return False + # the name must be registered if not state_engine.is_name_registered( name ): log.debug("Name '%s' is not registered" % name )
don't allow revoke if we're in the name renewal grace period
diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index <HASH>..<HASH> 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -304,7 +304,7 @@ kind: ServiceAccount metadata: name: {{ include "<CHARTNAME>.serviceAccountName" . }} labels: -{{ include "<CHARTNAME>.labels" . | nindent 4 }} + {{- include "<CHARTNAME>.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -405,7 +405,7 @@ kind: Pod metadata: name: "{{ include "<CHARTNAME>.fullname" . }}-test-connection" labels: -{{ include "<CHARTNAME>.labels" . | nindent 4 }} + {{- include "<CHARTNAME>.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success spec: @@ -413,7 +413,7 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include "<CHARTNAME>.fullname" . }}:{{ .Values.service.port }}'] + args: ['{{ include "<CHARTNAME>.fullname" . }}:{{ .Values.service.port }}'] restartPolicy: Never `
fix(chartutil): remove empty lines and a space from rendered chart templates (#<I>)
diff --git a/bin/php/updateniceurls.php b/bin/php/updateniceurls.php index <HASH>..<HASH> 100755 --- a/bin/php/updateniceurls.php +++ b/bin/php/updateniceurls.php @@ -742,7 +742,7 @@ if ( $urlCount > 0 ) list( $actionType, $actionValue ) = explode( ":", $action, 2 ); $aliases = eZURLAliasML::fetchByAction( $actionType, $actionValue ); - if ( $aliases && $actionType = 'eznode' ) + if ( $aliases && $actionType == 'eznode' ) { // This is a user-entered URL so lets make it an alias of the found dupe. $linkID = (int)$aliases[0]->attribute( 'id' );
- Fix typo introduced in commit #<I>, '=' -> '=='.
diff --git a/lib/awesome_bot/check.rb b/lib/awesome_bot/check.rb index <HASH>..<HASH> 100644 --- a/lib/awesome_bot/check.rb +++ b/lib/awesome_bot/check.rb @@ -22,13 +22,11 @@ module AwesomeBot log.add "> White list: #{white_listed.join ', '}" if r.white_listing - r.dupes = r.links.select { |e| r.links.count(e) > 1 } unless skip_dupe + r.dupes = r.links.select { |e| r.links.count(e) > 1 } log.addp "Links found: #{r.links.count}" log.addp ", #{r.links_white_listed.count} white listed" if r.white_listing - unless skip_dupe - log.addp ", #{r.links.uniq.count} unique" if r.dupes.count > 0 - end + log.addp ", #{r.links.uniq.count} unique" if r.dupes.count > 0 log.add '' r.links.uniq.each_with_index { |u, j| log.add " #{j + 1}. #{u}" }
[output] always display unique links
diff --git a/dist/index.js b/dist/index.js index <HASH>..<HASH> 100644 --- a/dist/index.js +++ b/dist/index.js @@ -98,9 +98,12 @@ module.exports = { body: JSON.stringify(params || {}) }); }, - raw: function raw(url, options) { + raw: function raw(url, options, deleteContentType) { options.credentials = options.credentials || 'same-origin'; options.headers = Object.assign({}, headers, options.headers || {}); + if (deleteContentType) { + delete options.headers['Content-Type']; + } return customFetch(url, options); }, setGlobalHeaders: function setGlobalHeaders(newHeaders) { diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -92,9 +92,12 @@ module.exports = { body: JSON.stringify(params || {}) }); }, - raw: function(url, options) { + raw: function(url, options, deleteContentType) { options.credentials = options.credentials || 'same-origin'; options.headers = Object.assign({}, headers, options.headers || {}); + if(deleteContentType) { + delete options.headers['Content-Type']; + } return customFetch(url, options); }, setGlobalHeaders: function(newHeaders) {
Add deleteContentType param to raw
diff --git a/alot/db/utils.py b/alot/db/utils.py index <HASH>..<HASH> 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -132,8 +132,12 @@ def decode_header(header, normalize=False): except UnicodeEncodeError: return value + # some mailers send out incorrectly escaped headers + # and double quote the escaped realname part again. remove those + value = re.sub(r'\"(.*?=\?.*?.*?)\"', r'\1', value) + # otherwise we interpret RFC2822 encoding escape sequences - valuelist = email.header.decode_header(header) + valuelist = email.header.decode_header(value) decoded_list = [] for v, enc in valuelist: v = string_decode(v, enc)
fix: be more relaxed wrt non-rfc-compliant headers this makes db.utils.decode_header remove superflous double quotes around header values before decoding them
diff --git a/nion/instrumentation/camera_base.py b/nion/instrumentation/camera_base.py index <HASH>..<HASH> 100644 --- a/nion/instrumentation/camera_base.py +++ b/nion/instrumentation/camera_base.py @@ -856,7 +856,7 @@ def update_intensity_calibration(data_element, stem_controller, camera): calibration_controls = camera.calibration_controls counts_per_electron = get_stem_control(stem_controller, calibration_controls, "counts_per_electron") if counts_per_electron: - data_element["counts_per_electron"] = counts_per_electron + data_element["properties"]["counts_per_electron"] = counts_per_electron def update_autostem_properties(data_element, stem_controller, camera):
Fix issue in calibration control for counts per electron.
diff --git a/lib/vagrant/plugin/v2/trigger.rb b/lib/vagrant/plugin/v2/trigger.rb index <HASH>..<HASH> 100644 --- a/lib/vagrant/plugin/v2/trigger.rb +++ b/lib/vagrant/plugin/v2/trigger.rb @@ -36,11 +36,11 @@ module Vagrant triggers = [] if stage == :before triggers = config.before_triggers.select do |t| - t.command == action || (t.command == :all && !t.ignore.any?(action)) + t.command == action || (t.command == :all && !t.ignore.include?(action)) end elsif stage == :after triggers = config.after_triggers.select do |t| - t.command == action || (t.command == :all && !t.ignore.any?(action)) + t.command == action || (t.command == :all && !t.ignore.include?(action)) end else raise Errors::TriggersNoStageGiven,
Use inclunde? instead of any? for ruby <I>
diff --git a/worker/agent.go b/worker/agent.go index <HASH>..<HASH> 100644 --- a/worker/agent.go +++ b/worker/agent.go @@ -74,6 +74,7 @@ func (a *agent) work() { } if inpack, l, err = decodeInPack(data); err != nil { a.worker.err(err) + leftdata = data continue } leftdata = nil
keep already received data if not enough to decode
diff --git a/tests/integration.test.js b/tests/integration.test.js index <HASH>..<HASH> 100644 --- a/tests/integration.test.js +++ b/tests/integration.test.js @@ -48,6 +48,7 @@ describe('integration tests', () => { // the implementation of each of the specific classes via conditionals. if (testcase.cache && testcase.published) { await expect(redis.get(key)).resolves.toEqual(JSON.stringify(val)); + await expect(redis.client.ttl(key)).resolves.toBeGreaterThan(-1); } else { await expect(redis.get(key)).rejects.toThrow(); } @@ -85,6 +86,7 @@ describe('integration tests', () => { await expect(db.get(key, testcase.cache)).resolves.toEqual(val); if (testcase.cache && (testcase.published || expectStr)) { await expect(redis.get(key)).resolves.toEqual(expectStr ? val : JSON.stringify(val)); + await expect(redis.client.ttl(key)).resolves.toBeGreaterThan(-1); } else { await expect(redis.get(key)).rejects.toThrow(); }
verifies that TTLs are set in integration tests
diff --git a/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/UnpairedQuotesBracketsRule.java b/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/UnpairedQuotesBracketsRule.java index <HASH>..<HASH> 100644 --- a/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/UnpairedQuotesBracketsRule.java +++ b/trunk/JLanguageTool/src/java/de/danielnaber/languagetool/rules/UnpairedQuotesBracketsRule.java @@ -21,8 +21,8 @@ public class UnpairedQuotesBracketsRule extends Rule { private final String[] startSymbols; private final String[] endSymbols; - private static final String[] EN_START_SYMBOLS = {"[", "(", "{", "‘", "“"}; - private static final String[] EN_END_SYMBOLS = {"]", ")", "}", "’", "”"}; + private static final String[] EN_START_SYMBOLS = {"[", "(", "{","“"}; + private static final String[] EN_END_SYMBOLS = {"]", ")", "}", "”"}; private static final String[] PL_START_SYMBOLS = {"[", "(", "{", "„", "»"}; private static final String[] PL_END_SYMBOLS = {"]", ")", "}", "”", "«"};
small update to English quotation marks (conflict with typographical apostrophe)
diff --git a/bundle/Templating/Twig/Extension/SiteExtension.php b/bundle/Templating/Twig/Extension/SiteExtension.php index <HASH>..<HASH> 100644 --- a/bundle/Templating/Twig/Extension/SiteExtension.php +++ b/bundle/Templating/Twig/Extension/SiteExtension.php @@ -33,6 +33,10 @@ class SiteExtension extends AbstractExtension 'ngsite_image_url', [SiteRuntime::class, 'getImageUrl'], ), + new TwigFunction( + 'ngsite_reading_time', + [SiteRuntime::class, 'calculateReadingTime'], + ), ]; } } diff --git a/bundle/Templating/Twig/Extension/SiteRuntime.php b/bundle/Templating/Twig/Extension/SiteRuntime.php index <HASH>..<HASH> 100644 --- a/bundle/Templating/Twig/Extension/SiteRuntime.php +++ b/bundle/Templating/Twig/Extension/SiteRuntime.php @@ -21,6 +21,8 @@ use function ucwords; class SiteRuntime { + private const WORDS_PER_MINUTE = 230; + protected PathHelper $pathHelper; protected LocaleConverterInterface $localeConverter; @@ -117,4 +119,12 @@ class SiteRuntime return '/'; } + + public function calculateReadingTime(string $text): float + { + $wordCount = str_word_count($text); + $readingTime = floor($wordCount / self::WORDS_PER_MINUTE); + + return $readingTime === false || $readingTime < 1 ? 1 : $readingTime; + } }
NGSTACK-<I> implement reading time twig function
diff --git a/examples/idle.py b/examples/idle.py index <HASH>..<HASH> 100644 --- a/examples/idle.py +++ b/examples/idle.py @@ -4,10 +4,15 @@ # #http://www.musicpd.org/doc/protocol/ch02.html#id525963 #Example +from select import select client.send_idle() -select([client], [], []) -changed = client.fetch_idle() +# do this periodically, e.g. in event loop +canRead = select([client], [], [], 0)[0] +if canRead: + changes = client.fetch_idle() + print(changes) # handle changes + client.send_idle() # continue idling #You can also poll the socket FD (returned by client.fileno(), which is called by default by select, poll, etc.) using other tools too.
Improved the idle.py example. It now becomes clear what to do with the output of select(), and how to call that function properly.
diff --git a/lib/Model.js b/lib/Model.js index <HASH>..<HASH> 100644 --- a/lib/Model.js +++ b/lib/Model.js @@ -220,19 +220,6 @@ Model.prototype.invalidate = function invalidate() { Model.prototype.deref = require("./deref"); /** - * Synchronously returns a clone of the {@link Model} bound to a location within the {@link JSONGraph}. Unlike bind or bindSync, softBind never optimizes its path. Soft bind is ideal if you want to retrieve the bound path every time, rather than retrieve the optimized path once and then always retrieve paths from that object in the JSON Graph. For example, if you always wanted to retrieve the name from the first item in a list you could softBind to the path "list[0]". - * @param {Path} path - The path prefix to retrieve every time an operation is executed on a Model. - * @return {Model} - */ -Model.prototype.softDeref = function softDeref(path) { - path = pathSyntax.fromPath(path); - if(Array.isArray(path) === false) { - throw new Error("Model#softDeref must be called with an Array path."); - } - return this.clone({ _path: path }); -}; - -/** * Get data for a single {@link Path} * @param {Path} path - The path to retrieve * @return {Observable.<*>} - The value for the path
Removing softDeref/bind
diff --git a/src/Str.php b/src/Str.php index <HASH>..<HASH> 100644 --- a/src/Str.php +++ b/src/Str.php @@ -525,6 +525,7 @@ final class Str implements \Countable { * Returns whether this string is entirely lowercase * * @return bool + * @deprecated use `equals` and `toLowerCase` instead */ public function isLowerCase() { return $this->equals($this->toLowerCase());
Deprecate method 'isLowerCase'
diff --git a/spec/build-url-spec.js b/spec/build-url-spec.js index <HASH>..<HASH> 100644 --- a/spec/build-url-spec.js +++ b/spec/build-url-spec.js @@ -294,4 +294,19 @@ describe('buildUrl', function () { })).toEqual('http://example.com?foo=bar&bar=one%2Ctwo%2Cthree'); }); + it('should maintain trailing slash if no options provided', function () { + expect(buildUrl('http://example.com/api/v2/')).toEqual('http://example.com/api/v2/'); + }); + + it('should maintain trailing slash if empty path is provided', function () { + expect(buildUrl('http://example.com/api/v2/', { path: '' })).toEqual('http://example.com/api/v2/'); + }); + + it('should maintain no trailing slash if one is not present in the url argument', function () { + expect(buildUrl('http://example.com/api/v2')).toEqual('http://example.com/api/v2'); + }); + + it('should maintain trailing slash if provided in path', function () { + expect(buildUrl('http://example.com/api/v2', { path: '/' })).toEqual('http://example.com/api/v2/'); + }); });
Add tests for trailing slash bug
diff --git a/lib/sensu/api.rb b/lib/sensu/api.rb index <HASH>..<HASH> 100644 --- a/lib/sensu/api.rb +++ b/lib/sensu/api.rb @@ -443,11 +443,12 @@ module Sensu response = Array.new $redis.smembers('aggregates').callback do |checks| unless checks.empty? + params[:last] ? last = params[:last].to_i : last = 10 checks.each_with_index do |check_name, index| $redis.smembers('aggregates:' + check_name).callback do |aggregates| collection = { :check => check_name, - :issued => aggregates.sort.reverse.take(10) + :issued => aggregates.sort.reverse.take(last) } response.push(collection) if index == checks.size - 1 @@ -463,7 +464,12 @@ module Sensu aget %r{/aggregates/([\w\.-]+)$} do |check_name| $redis.smembers('aggregates:' + check_name).callback do |aggregates| - body aggregates.sort.reverse.take(10).to_json + unless aggregates.empty? + params[:last] ? last = params[:last].to_i : last = 10 + body aggregates.sort.reverse.take(last).to_json + else + not_found! + end end end
return only ?last=N aggregates + return not found instead of empty set for non exising check aggregates
diff --git a/logagg/nsqsender.py b/logagg/nsqsender.py index <HASH>..<HASH> 100644 --- a/logagg/nsqsender.py +++ b/logagg/nsqsender.py @@ -17,7 +17,7 @@ class NSQSender(object): self.nsq_max_depth = nsq_max_depth self.log = log - self.session = requests.Session() + self.session = requests self._ensure_topic(self.topic_name) self._ensure_topic(self.HEARTBEAT_TOPIC) @@ -27,7 +27,7 @@ class NSQSender(object): def _ensure_topic(self, topic_name): u = 'http://%s/topic/create?topic=%s' % (self.nsqd_http_address, topic_name) try: - self.session.post(u) + self.session.post(u, timeout=1) except requests.exceptions.RequestException as e: self.log.exception('could_not_create_topic,retrying....', topic=topic_name) raise
fixed logagg creating multiple connections when nsq is down
diff --git a/src/OAuth2/GrantType/RefreshToken.php b/src/OAuth2/GrantType/RefreshToken.php index <HASH>..<HASH> 100644 --- a/src/OAuth2/GrantType/RefreshToken.php +++ b/src/OAuth2/GrantType/RefreshToken.php @@ -60,7 +60,7 @@ class RefreshToken implements GrantTypeInterface public function getUserId() { - return $this->refreshToken['user_id']; + return isset($this->refreshToken['user_id']) ? $this->refreshToken['user_id'] : null; } public function getScope()
make user_id not required for refresh_token grant
diff --git a/src/WP/ScriptsAndStyles.php b/src/WP/ScriptsAndStyles.php index <HASH>..<HASH> 100644 --- a/src/WP/ScriptsAndStyles.php +++ b/src/WP/ScriptsAndStyles.php @@ -81,7 +81,7 @@ class ScriptsAndStyles */ public function hospitalRegisterStyle($file) { - wp_register_style('hospital_admin_style' . $file, $this->path . '/css/' . $file, array(), '1', 'screen'); + wp_register_style('hospital_admin_style' . $file, $this->path . '/css/' . $file, array(), '1', 'all'); wp_enqueue_style('hospital_admin_style' . $file); }
'all' for wp register styles
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ data_files=[ ('cherrypy/scaffold', ['cherrypy/scaffold/example.conf', 'cherrypy/scaffold/site.conf', ]), - ('cherrypy/scaffold/static', ['made_with_cherrypy_small.png', + ('cherrypy/scaffold/static', ['cherrypy/scaffold/static/made_with_cherrypy_small.png', ]), ('cherrypy/test', ['cherrypy/test/style.css', 'cherrypy/test/test.pem',
Oops. Buglet in setup.py.
diff --git a/mrq/dashboard/app.py b/mrq/dashboard/app.py index <HASH>..<HASH> 100644 --- a/mrq/dashboard/app.py +++ b/mrq/dashboard/app.py @@ -180,7 +180,7 @@ def api_datatables(unit): if with_mongodb_size: jobs = connections.mongodb_jobs.mrq_jobs.count({ "queue": name, - "status": "queued" + "status": request.args.get("status") or "queued" }) q = {
Allow querying jobs with a different status than "queued"
diff --git a/ColonyDSL/GlobalConfig.py b/ColonyDSL/GlobalConfig.py index <HASH>..<HASH> 100644 --- a/ColonyDSL/GlobalConfig.py +++ b/ColonyDSL/GlobalConfig.py @@ -41,15 +41,6 @@ def generate_memory_list() -> list: result.append(ProcedureFileLibrary("/usr/share/ColonyDSL/lib_contrib/procedure/")) result.append(FileTypeDictLibrary("/usr/share/ColonyDSL/lib_contrib/dict/filetype.dict")) result.append(SchemeFileLibrary("/usr/share/ColonyDSL/lib_contrib/scheme/")) - try: - result.append(GrammarFileLibrary("./lib_contrib/grammar/")) - result.append(SchemeFileLibrary("./lib_contrib/scheme/")) - result.append(FileTypeDictLibrary("./lib_contrib/dict/filetype.dict")) - result.append(ProcedureFileLibrary("./lib_contrib/procedure/")) - result.append(TransformerDirLibrary("./lib_contrib/transformer/")) - result.append(BoardFileLibrary("./lib_contrib/board/")) - except IOError: - pass result.append(RegexpDictLibrary("/usr/share/ColonyDSL/lib_contrib/dict/regexp.dict")) return result
library is no longer loaded from WD
diff --git a/dispatch/static/manager/src/js/components/ContentEditor/ContentStateHelper.js b/dispatch/static/manager/src/js/components/ContentEditor/ContentStateHelper.js index <HASH>..<HASH> 100644 --- a/dispatch/static/manager/src/js/components/ContentEditor/ContentStateHelper.js +++ b/dispatch/static/manager/src/js/components/ContentEditor/ContentStateHelper.js @@ -63,15 +63,10 @@ function createBlock(acc, block) { let blocksFromJSON - switch (block.type) { - case 'paragraph': + if (block.type === 'paragraph') { blocksFromJSON = createParagraphBlock(block) - break - case 'image': - case 'video': - case 'quote': + } else { blocksFromJSON = createEntityBlock(block) - break } if (blocksFromJSON) {
refactor switch statement in content editor
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ setup( ], keywords="PEP 287, pep287, docstrings, rst, reStructuredText", py_modules=["flake8_rst_docstrings"], - python_requires=">=3.6", + python_requires=">=3.7", install_requires=[ "flake8 >= 3.0.0", "restructuredtext_lint",
Require Python <I> or later
diff --git a/lib/fog/aws/requests/rds/modify_db_instance.rb b/lib/fog/aws/requests/rds/modify_db_instance.rb index <HASH>..<HASH> 100644 --- a/lib/fog/aws/requests/rds/modify_db_instance.rb +++ b/lib/fog/aws/requests/rds/modify_db_instance.rb @@ -24,6 +24,7 @@ module Fog # * MultiAZ <~Boolean> Specifies if the DB Instance is a Multi-AZ deployment # * PreferredBackupWindow <~String> The daily time range during which automated backups are created if automated backups are enabled # * PreferredMaintenanceWindow <~String> The weekly time range (in UTC) during which system maintenance can occur, which may result in an outage + # * VpcSecurityGroups <~Array> A list of VPC Security Group IDs to authorize on this DB instance # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: @@ -33,6 +34,10 @@ module Fog options.merge!(Fog::AWS.indexed_param('DBSecurityGroups.member.%d', [*security_groups])) end + if vpc_security_groups = options.delete('VpcSecurityGroups') + options.merge!(Fog::AWS.indexed_param('VpcSecurityGroupIds.member.%d', [*vpc_security_groups])) + end + request({ 'Action' => 'ModifyDBInstance', 'DBInstanceIdentifier' => db_name,
Support VPC security group modifictions for RDS
diff --git a/scout/models/case/case.py b/scout/models/case/case.py index <HASH>..<HASH> 100644 --- a/scout/models/case/case.py +++ b/scout/models/case/case.py @@ -83,7 +83,7 @@ class Case(Document): distinct_genes = set() for panel in self.default_panels: for gene in panel.gene_objects.values(): - distinct_genes.add(gene.hgnc_id) + distinct_genes.add(gene.hgnc_gene.hgnc_id) return distinct_genes @property diff --git a/scout/models/case/gene_list.py b/scout/models/case/gene_list.py index <HASH>..<HASH> 100644 --- a/scout/models/case/gene_list.py +++ b/scout/models/case/gene_list.py @@ -37,7 +37,7 @@ class GenePanel(Document): @property def gene_ids(self): for gene in self.gene_objects.values(): - yield gene.hgnc_id + yield gene.hgnc_gene.hgnc_id @property def name_and_version(self):
correct getting hgnc id
diff --git a/oidc_provider/admin.py b/oidc_provider/admin.py index <HASH>..<HASH> 100644 --- a/oidc_provider/admin.py +++ b/oidc_provider/admin.py @@ -1,9 +1,8 @@ from django.contrib import admin -from oidc_provider.models import Client, Code, Token, UserInfo +from oidc_provider.models import Client, Code, Token admin.site.register(Client) admin.site.register(Code) admin.site.register(Token) -admin.site.register(UserInfo) \ No newline at end of file
Remove UserInfo from admin.py.
diff --git a/carbonate/util.py b/carbonate/util.py index <HASH>..<HASH> 100644 --- a/carbonate/util.py +++ b/carbonate/util.py @@ -14,14 +14,18 @@ def common_parser(description='untitled'): description=description, formatter_class=argparse.ArgumentDefaultsHelpFormatter) + config_file = os.environ.get('CARBONATE_CONFIG', + '/opt/graphite/conf/carbonate.conf') + cluster = os.environ.get('CARBONATE_CLUSTER', 'main') + parser.add_argument( '-c', '--config-file', - default='/opt/graphite/conf/carbonate.conf', + default=config_file, help='Config file to use') parser.add_argument( '-C', '--cluster', - default='main', + default=cluster, help='Cluster name') return parser
Read config-file and cluster options from environ This would make it DRY in scripts/wrappers with non-default values.
diff --git a/Spreadsheet.php b/Spreadsheet.php index <HASH>..<HASH> 100644 --- a/Spreadsheet.php +++ b/Spreadsheet.php @@ -497,6 +497,8 @@ class Spreadsheet extends Base case 'h2': case 'h3': case 'h4': + case 'h5': + case 'h6': $currentFormats[] = static::FORMAT_BOLD; break; case 'a': @@ -536,6 +538,12 @@ class Spreadsheet extends Base 'formattings' => [static::FORMAT_LINEBREAK], ]; } + if (in_array($child->nodeName, ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])) { + $return[] = [ + 'text' => '', + 'formattings' => [static::FORMAT_LINEBREAK, static::FORMAT_BOLD], + ]; + } break; case XML_TEXT_NODE: /** @var \DOMText $child */ diff --git a/Text.php b/Text.php index <HASH>..<HASH> 100644 --- a/Text.php +++ b/Text.php @@ -215,6 +215,8 @@ class Text extends Base $inP = true; break; case 'h4': + case 'h5': + case 'h6': $dstEl = $this->createNodeWithBaseStyle('p', $lineNumbered); $dstEl->setAttribute('text:style-name', 'Antragsgrün_20_H4'); $inP = true;
Improve support for H1-H6
diff --git a/tornado/autoreload.py b/tornado/autoreload.py index <HASH>..<HASH> 100644 --- a/tornado/autoreload.py +++ b/tornado/autoreload.py @@ -71,6 +71,7 @@ import logging import os import pkgutil import sys +import traceback import types import subprocess @@ -275,7 +276,16 @@ def main(): logging.info("Script exited with status %s", e.code) except Exception, e: logging.warning("Script exited with uncaught exception", exc_info=True) + # If an exception occurred at import time, the file with the error + # never made it into sys.modules and so we won't know to watch it. + # Just to make sure we've covered everything, walk the stack trace + # from the exception and watch every file. + for (filename, lineno, name, line) in traceback.extract_tb(sys.exc_info()[2]): + watch(filename) if isinstance(e, SyntaxError): + # SyntaxErrors are special: their innermost stack frame is fake + # so extract_tb won't see it and we have to get the filename + # from the exception object. watch(e.filename) else: logging.info("Script exited normally")
Improve autoreload for import-time errors. We already had a special case for SyntaxErrors, but NameErrors and other import-time errors could leave a file unwatched.
diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/CoalesceAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/CoalesceAnalyzer.php index <HASH>..<HASH> 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/CoalesceAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/CoalesceAnalyzer.php @@ -35,7 +35,10 @@ class CoalesceAnalyzer ) { $left_var_id = '$<tmp coalesce var>' . (int) $left_expr->getAttribute('startFilePos'); - ExpressionAnalyzer::analyze($statements_analyzer, $left_expr, clone $context); + $cloned = clone $context; + $cloned->inside_isset = true; + + ExpressionAnalyzer::analyze($statements_analyzer, $left_expr, $cloned); $condition_type = $statements_analyzer->node_data->getType($left_expr) ?: Type::getMixed();
Avoid false-positives while analysing memoised coalesce
diff --git a/src/Tooltip.js b/src/Tooltip.js index <HASH>..<HASH> 100644 --- a/src/Tooltip.js +++ b/src/Tooltip.js @@ -150,6 +150,10 @@ Titon.Tooltip = new Class({ * Hide the tooltip and set all relevant values to null. */ hide: function() { + if (!this.isVisible) { + return; + } + this.isVisible = false; this.node.removeEvents('mousemove'); @@ -357,7 +361,7 @@ Titon.Tooltip = new Class({ Titon.Tooltip.instances = {}; /** - * Easily create multiple instances. + * Easily create multiple Tooltip instances. * * @param query * @param options @@ -368,4 +372,13 @@ Titon.Tooltip.factory = function(query, options) { Titon.Tooltip.instances[query] = instance; return instance; -}; \ No newline at end of file +}; + +/** + * Hide all Tooltip instances. + */ +Titon.Tooltip.hide = function() { + Object.each(Titon.Tooltip.instances, function(tooltip) { + tooltip.hide(); + }); +};
<I> Added a static top level hide() method that will hide all instances on the page
diff --git a/src/main/java/com/cloudbees/jenkins/GitHubWebHook.java b/src/main/java/com/cloudbees/jenkins/GitHubWebHook.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/cloudbees/jenkins/GitHubWebHook.java +++ b/src/main/java/com/cloudbees/jenkins/GitHubWebHook.java @@ -153,7 +153,7 @@ public class GitHubWebHook implements UnprotectedRootAction { Matcher matcher = REPOSITORY_NAME_PATTERN.matcher(repoUrl); if (matcher.matches()) { GitHubRepositoryName changedRepository = new GitHubRepositoryName(matcher.group(1), ownerName, repoName); - for (AbstractProject<?,?> job : Hudson.getInstance().getItems(AbstractProject.class)) { + for (AbstractProject<?,?> job : Hudson.getInstance().getAllItems(AbstractProject.class)) { GitHubPushTrigger trigger = job.getTrigger(GitHubPushTrigger.class); if (trigger!=null) { LOGGER.fine("Considering to poke "+job.getFullDisplayName());
Needs to look for all the projects recursively.
diff --git a/core/lib/refinery/crud.rb b/core/lib/refinery/crud.rb index <HASH>..<HASH> 100644 --- a/core/lib/refinery/crud.rb +++ b/core/lib/refinery/crud.rb @@ -18,16 +18,16 @@ module Refinery this_class = class_name.constantize.base_class { - :title_attribute => "title", - :order => ('position ASC' if this_class.table_exists? and this_class.column_names.include?('position')), :conditions => '', - :sortable => true, - :searchable => true, + :order => ('position ASC' if this_class.table_exists? and this_class.column_names.include?('position')), :include => [], :paging => true, - :search_conditions => '', + :per_page => false, :redirect_to_url => "admin_#{plural_name}_url", - :per_page => false + :searchable => true, + :search_conditions => '', + :sortable => true, + :title_attribute => "title" } end
Ordered the default attributes in crudify alphabetically.
diff --git a/actionview/lib/action_view/template/types.rb b/actionview/lib/action_view/template/types.rb index <HASH>..<HASH> 100644 --- a/actionview/lib/action_view/template/types.rb +++ b/actionview/lib/action_view/template/types.rb @@ -6,13 +6,7 @@ module ActionView class Types class Type cattr_accessor :types - self.types = Set.new - - def self.register(*t) - types.merge(t.map(&:to_s)) - end - - register :html, :text, :js, :css, :xml, :json + self.types = Set.new([ :html, :text, :js, :css, :xml, :json ]) def self.[](type) return type if type.is_a?(self)
Remove register abstraction. The template types is a private abstraction to fill in basic blanks from Action Dispatch's mime types. As such we can modify the data structure ourselves.
diff --git a/lib/alchemy/essence.rb b/lib/alchemy/essence.rb index <HASH>..<HASH> 100644 --- a/lib/alchemy/essence.rb +++ b/lib/alchemy/essence.rb @@ -61,7 +61,7 @@ module Alchemy #:nodoc: delegate :restricted?, to: :page, allow_nil: true delegate :public?, to: :element, allow_nil: true - after_save :touch_element + after_update :touch_element def acts_as_essence_class #{name}
Performance: Only touch element after update When creating an element, we do not need to touch it for every time it creates a content.
diff --git a/mobile/bindings.go b/mobile/bindings.go index <HASH>..<HASH> 100644 --- a/mobile/bindings.go +++ b/mobile/bindings.go @@ -79,6 +79,19 @@ func Start(extraArgs string, unlockerReady, rpcReady Callback) { go func() { <-rpcListening + + // Now that the RPC server is ready, we can get the needed + // authentication options, and add them to the global dial + // options. + auth, err := lnd.AdminAuthOptions() + if err != nil { + rpcReady.OnError(err) + return + } + + // Add the auth options to the listener's dial options. + addLightningLisDialOption(auth...) + rpcReady.OnResponse([]byte{}) }() }
mobile: authenticate with rpc server This makes the mobile bindings work with TLS and macaroons enabled, which is supported from falafel <I>.
diff --git a/test/test_audio.rb b/test/test_audio.rb index <HASH>..<HASH> 100644 --- a/test/test_audio.rb +++ b/test/test_audio.rb @@ -41,7 +41,7 @@ class TestAudio < Test::Unit::TestCase end def test_analyze - # We don't test the full ESTER2 algorithm for now + # TODO - We don't test the full ESTER2 algorithm for now end def test_set_uri_and_type_uri
Changing message as a TODO
diff --git a/libraries/lithium/test/Unit.php b/libraries/lithium/test/Unit.php index <HASH>..<HASH> 100644 --- a/libraries/lithium/test/Unit.php +++ b/libraries/lithium/test/Unit.php @@ -543,6 +543,9 @@ class Unit extends \lithium\core\Object { $data[] = $compare; } } + if (empty($data)) { + return compact('trace', 'expected', 'result'); + } return $data; }
return all data if unit compare can not figure out differences
diff --git a/src/Controller/UsersController.php b/src/Controller/UsersController.php index <HASH>..<HASH> 100644 --- a/src/Controller/UsersController.php +++ b/src/Controller/UsersController.php @@ -368,6 +368,7 @@ class UsersController extends BackendAppController if (!$this->request->isAll(['ajax', 'post'])) { throw new MethodNotAllowedException(); } + $this->viewClass = null; $this->request->session()->renew(); $this->set([ 'status' => 200,
set viewclass to null in heartbeat action
diff --git a/test/test_job.py b/test/test_job.py index <HASH>..<HASH> 100644 --- a/test/test_job.py +++ b/test/test_job.py @@ -1,5 +1,7 @@ '''Basic tests about the Job class''' +import sys + from common import TestQless from qless.job import Job, BaseJob @@ -188,7 +190,10 @@ class TestJob(TestQless): self.client.queues['nonstatic'].pop().process() job = self.client.jobs['jid'] self.assertEqual(job.state, 'failed') - self.assertEqual(job.failure['group'], 'nonstatic-method-type') + if sys.version_info[0] >= 3: + self.assertEqual(job.failure['group'], 'nonstatic-TypeError') + else: + self.assertEqual(job.failure['group'], 'nonstatic-method-type') def test_reload(self): '''Ensure that nothing blows up if we reload a class'''
Python3 cannot distinguish functions from class instances
diff --git a/framework/db/ColumnSchema.php b/framework/db/ColumnSchema.php index <HASH>..<HASH> 100644 --- a/framework/db/ColumnSchema.php +++ b/framework/db/ColumnSchema.php @@ -126,6 +126,7 @@ class ColumnSchema extends Object return $value; } if (is_float($value)) { + // ensure type cast always has . as decimal separator in all locales return str_replace(',', '.', (string)$value); } return (string)$value;
Update ColumnSchema.php added comment
diff --git a/spec/unit/lib/itamae/resource/remote_file_spec.rb b/spec/unit/lib/itamae/resource/remote_file_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/lib/itamae/resource/remote_file_spec.rb +++ b/spec/unit/lib/itamae/resource/remote_file_spec.rb @@ -27,6 +27,7 @@ module Itamae expect(subject).to receive(:run_specinfra).with(:check_file_is_file, "/path/to/dst").and_return(true) expect(subject).to receive(:run_command).with(["cp", "/path/to/dst", "/path/to/dst.bak"]) expect(subject).to receive(:run_command).with(["mv", %r{/tmp/itamae/[\d\.]+}, "/path/to/dst"]) + subject.pre_action subject.create_action end end
Fix remote_file_spec.rb If pre_action is not executed, @temppath is not set and spec fails.
diff --git a/ioc_writer/ioc_api.py b/ioc_writer/ioc_api.py index <HASH>..<HASH> 100644 --- a/ioc_writer/ioc_api.py +++ b/ioc_writer/ioc_api.py @@ -47,7 +47,7 @@ date_regex = r'^[12][9012][0-9]{2}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[ class IOCParseError(Exception): pass -class IOC(): +class IOC(object): """ Class for easy creation and manipulation of IOCs.
IOC class should inherit from object.
diff --git a/client.go b/client.go index <HASH>..<HASH> 100644 --- a/client.go +++ b/client.go @@ -63,6 +63,7 @@ func (c *Client) Subscribe(stream string, handler func(msg *Event)) error { func (c *Client) SubscribeChan(stream string, ch chan *Event) error { resp, err := c.request(stream) if err != nil { + close(ch) return err } defer resp.Body.Close()
Consistently close channel on error